query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Get the settings option array and print one of its values
public function title_callback() { printf( '<input type="text" id="my_title" name="my_title" value="%s" />', isset( $this->options['my_title'] ) ? esc_attr( $this->options['my_title']) : '' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_settings($option)\n {\n }", "function bdpp_get_settings() {\n\t\n\t$options = get_option('bdpp_opts');\n\t\n\t$settings = (is_array($options)) ? $options : array();\n\t\n\treturn $settings;\n}", "public function viewSettings(array $settings = array());", "function print_options(){\n\t\tforeach ($this->options as $value) {\n\t\t\t$this->print_option($value);\n\t\t}\n\t}", "function display_var_settings($settings)\n {\n return $this->_settings_ui($settings);\n }", "public static function get_option_setting()\n\t\t{ \n\t\t\t\tglobal $wpdb;\n\t\t\t\t\n\t\t\t\t$opt_list = $wpdb->get_results( \"SELECT * FROM \".$wpdb->prefix.self::$table_name_settings);\n\t\t\t\t\n\t\t\t\t$option =array();\n\t\t\t\t\n\t\t\t\tif(!empty($opt_list)){\n\t\t\t\t\t\n\t\t\t\t\tforeach($opt_list as $key => $val){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$option[] = $val->rs_lang;\n\t\t\t\t\t\t\t$option[] = $val->rs_type;\t\t\t\t\t\n\t\t\t\t\t\t\t$option[] = $val->rs_postid;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $option;\n\t\t\t\t\n\t\t}", "public function getOptions() {\n\t\tif ($this->row->options != '') {\n\t\t\t$options = explode(\";\", $this->row->options);\n\t\t}\n\t\tif ($this->row->intoptions != '') {\n\t\t\t$intoptions = explode(\";\", $this->row->intoptions);\n\t\t\t$options_map = array_combine($intoptions, $options);\n\t\t}\n\t\tif ($options) {\n\t\t\t$msg = \"Predefined Options:\\n\";\n\t\t\tif ($intoptions) {\n\t\t\t\tforeach ($options_map as $key => $label) {\n\t\t\t\t\t$save_link = $this->text->makeChatcmd('Select', \"/tell <myname> settings save {$this->row->name} {$key}\");\n\t\t\t\t\t$msg .= \"<tab> <highlight>{$label}<end> ({$save_link})\\n\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach ($options as $char) {\n\t\t\t\t\t$save_link = $this->text->makeChatcmd('Select', \"/tell <myname> settings save {$this->row->name} {$char}\");\n\t\t\t\t\t$msg .= \"<tab> <highlight>{$char}<end> ({$save_link})\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $msg;\n\t}", "function printOptions()\n {\n $lines = $this->outputOptions();\n echo join( \"\\n\" , $lines );\n }", "function getOptions() ;", "public function showOptions()\n {\n\treturn $this->getConfigData('checkout/delivery_options');\n }", "public function printOptValue($array){\n if(empty($array)){\n print \"<h1>Array is empty!</h1>\";\n return false;\n }\n foreach($array as $key => $value){\n print(\"<option value='$value'>$value</option>\");\n }\n\n }", "public static function get_current_options(){\n\t\t\t\n\t\t\tglobal $wpdb;\n\t\t\t\t\t\t\t\n\t\t\t$settings = $wpdb->get_results(\"SELECT * FROM \".$wpdb->prefix.self::$table_name_settings); \n\t\t\t\n\t\t\t$arr_opt = array();\n\t\t\tif(!empty($settings)){\n\t\t\t\t\tforeach($settings as $key => $val){\n\t\t\t\t\t\t$arr_opt[] = $val->rs_postid;\n\t\t\t\t\t\t$arr_opt[] = $val->rs_lang;\n\t\t\t\t\t\t$arr_opt[] = $val->rs_posttype;\n\t\t\t\t\t\t$arr_opt[] = $val->rs_type;\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\t\t$arr_opt[] = null;\n\t\t\t\t\t\t$arr_opt[] = null;\n\t\t\t\t\t\t$arr_opt[] = null;\n\t\t\t\t\t\t$arr_opt[] = null;\n\t\t\t}\n\t\t\t\n\t\t\treturn $arr_opt;\n\t\n\t\t}", "function bb_print_mystique_option( $option ) {\r\n\techo bb_get_mystique_option( $option );\r\n}", "public function get_setting() {\n // $this->db->where('option_name', $opname);\n \n $query = $this->db->get('t_pref');\n return $query->row();\n }", "public function showSettings()\n\t{\n\n\t\treturn $this->showDefaultSettings();\n\t}", "function blog_analytics() { \n$options = get_option('blog_theme_options');\necho $options['analytics']; \n}", "public function getOpt($option) {}", "function __get_option($setting)\n {\n }", "private function getSettings()\n\t\t{\n\t\t\tforeach($this->settings as $key => $val) {\n\t\t\t\t$this->settings[$key] = !empty(get_option($this->tag.$key)) ? get_option($this->tag.$key) : '';\n\t\t\t}\n\t\t}", "public function getSettings();", "public function getSettings() : array;", "static function getGeneralSettingsValues(){\r\n\t\t\r\n\t\t$arrValues = get_option('revslider-global-settings', '');\r\n\t\t\r\n\t\t$arrValues = maybe_unserialize($arrValues);\r\n\r\n\t\treturn($arrValues);\r\n\t}", "abstract public function get_settings();", "public function get_settings() {\r\n\t\t\t$my_option = get_option( '_wpeo_log_settings', array() );\r\n\t\t\t$this->wpeologs_settings = array_merge( $this->wpeologs_settings, (array)$my_option );\r\n\t\t}", "public function get_settings( ) {\n\n $settingsArray = $this->mockinvoice_model->get_settings_array( $this->input->post( 'mockInvoiceId' ) );\n\n // Send back the timesheet settings as JSON.\n $this->json_library->print_array_json( $settingsArray );\n }", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public static function get_settings() {\n\t\treturn array_merge( SpamLyticsHelper::default_settings(), get_option( 'spamlytics', array() ) );\n\t}", "function getSettings() {\n\t\t$current_opts = get_option('wassup_settings');\n\t\t$default_opts = $this->defaultSettings();\n\t\t$settings = array();\n\t\tif (!empty($current_opts) && is_array($current_opts)) {\n\t\t\tforeach ($default_opts as $skey => $defaultvalue) {\n\t\t\t if (array_key_exists($skey,$current_opts)) {\n\t\t\t \t$settings[$skey] = $current_opts[$skey];\n\t\t\t } else {\n\t\t\t \t$settings[$skey] = $defaultvalue;\n\t\t\t }\n\t\t\t} //end foreach\n\t\t} else {\n\t\t\t$settings = $default_opts;\n\t\t}\n\t\treturn $settings;\n\t}", "public function get() {\n\t\treturn $this->options->get( self::OPTION );\n\t}", "abstract public function settings(): array;", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getValues(){\n\t\treturn $this->_settings;\n\t}", "public function print_settings_section_info()\n {\n }", "public function settings_get()\n \t{\n \t\tlog_message('debug', 'Score/setting_get');\n\n\t\t$result = $this->_score->get_settings(\n\t\t\t$this->get('type'),\n\t\t\t$this->get('use'),\n\t\t\textract_id($this->get('storeId'))\n\t\t);\n\n\t\tlog_message('debug', 'Score/setting_get:: [1] result='.json_encode($result));\n\t\t$this->response($result);\n\t}", "function cpo_get_option( $option_name = '', $option_array = 'ctct_settings' ) {\n\t//Determines whether to grab current language, or original language's option\n\t$option_list_name = $option_array;\n\t$option_list = get_option( $option_list_name, false );\n\tif ( $option_list && isset( $option_list[ $option_name ] ) ) {\n\t\t$option_value = $option_list[ $option_name ];\n\t} else {\n\t\t$option_value = false;\n\t}\n\n\treturn $option_value;\n}", "function getOptions();", "public function get_settings() {\n\t\tif ( ! is_array( $this->_settings ) ) {\n\t\t\t$this->_settings = get_option( $this->token, array() );\n\t\t}\n\t\t\n\t\tforeach ( $this->fields as $k => $v ) {\n\t\t\tif ( ! isset( $this->_settings[$k] ) && isset( $v['default'] ) ) {\n\t\t\t\t$this->_settings[$k] = $v['default'];\n\t\t\t}\n\t\t\tif ( $v['type'] == 'checkbox' && $this->_settings[$k] != true ) {\n\t\t\t\t$this->_settings[$k] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->_settings;\n\t}", "function get_options(){\n\t\treturn $this->options;\n\t}", "public function get_settings()\n {\n }", "function get_the_option( $key ) {\n return genesis_get_option( $key, GENESIS_SIMPLE_SETTINGS_FIELD );\n }", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "public function value()\n {\n return $this->app->input->get('option');\n }", "public function config_vars()\n\t{\n\t\tglobal $txt;\n\n\t\t$return_data = array();\n\n\t\t$core_features = $this->settings();\n\n\t\t// Convert this to a format that admin search will understand\n\t\tforeach ($core_features as $id => $data)\n\t\t{\n\t\t\t$return_data[] = array('switch', $data['title'] ?? $txt['core_settings_item_' . $id]);\n\t\t}\n\n\t\treturn $return_data;\n\t}", "function bdpp_settings_tab() {\n\t\n\t$result_arr = array();\n\n\t$settings_arr = apply_filters('bdpp_settings_tab', array(\n\t\t\t\t\t\t\t'general'\t=> __('General', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'trending'\t=> __('Trending Post', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'taxonomy'\t=> __('Taxonomy', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'sharing'\t=> __('Sharing', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'css'\t\t=> __('CSS', 'blog-designer-pack'),\n\t\t\t\t\t\t\t'misc'\t\t=> __('Misc', 'blog-designer-pack'),\n\t\t\t\t\t\t));\n\n\tforeach ($settings_arr as $sett_key => $sett_val) {\n\t\tif( !empty($sett_key) && !empty($sett_val) ) {\n\t\t\t$result_arr[trim($sett_key)] = trim($sett_val);\n\t\t}\n\t}\n\n\treturn $result_arr;\n}", "public function show_options( array $opts ) : void {\t\n\t\t$i = -1;\n\t\twhile( ($i++) < sizeof( $opts ) - 1 ){\n\t\t\tif( $i == 1 )\n\t\t\t\techo \"<br><br>\";\n\t\t\tforeach( $opts[ $i ] as $optn => $optv ){\n\t\t\t\techo \"<span style='position: absolute;'>\".$optn.\" -> \".$optv.\"</span><br>\";\n\t\t\t}\n\t\t}\n\t}", "function the_option( $key ) {\n\n if ( ! $this->get_the_option( $key ) )\n return false;\n\n echo $this->get_the_option( $key );\n }", "public function getOptions(){ return $this->option_map; }", "public function ovpnDisplayConfig()\n {\n $readArr = unserialize(file_get_contents(\"./vpn/ovpn.array.config\"));\n foreach ($readArr as $key=>$value) {\n echo \"$key = $value<br />\\n\";\n }\n }", "public function run()\n {\n// Options are settings\n\n if ($this->command) $this->command->info('Creating Option Settings');\n\n\n $options_array = array(\n [\n 'key' => 'Landing Title',\n 'default' => \"What is trending in Kenya.\",\n 'value_type' =>Option::TYPE_STR\n ],\n [\n 'key' => 'Landing Description',\n 'default' => \"Getting all the news that are trending in Kenya.\",\n 'value_type' =>Option::TYPE_STR\n ],\n\n [\n 'key' => 'Contact Title',\n 'default' => \"Talk to us.\",\n 'value_type' =>Option::TYPE_STR\n ],\n [\n 'key' => 'Contact Description',\n 'default' => \"Find our contact information and contact form.\",\n 'value_type' =>Option::TYPE_STR\n ],\n\n [\n 'key' => 'Footer Title',\n 'default' => \"Welcome to Inatrend Kenya\",\n 'value_type' =>Option::TYPE_STR\n ],\n\n [\n 'key' => 'Footer Description',\n 'default' => \"\n <p>\n <small>We are here to get you the latest that is trending in Kenya.</small>\n </p>\n <div class=\\\"social-list\\\">\n <a class=\\\"social-list-item\\\" href=\\\"http://twitter.com\\\">\n <span class=\\\"icon icon-twitter\\\"></span>\n </a>\n <a class=\\\"social-list-item\\\" href=\\\"http://facebook.com\\\">\n <span class=\\\"icon icon-facebook\\\"></span>\n </a>\n <a class=\\\"social-list-item\\\" href=\\\"http://linkedin.com\\\">\n <span class=\\\"icon icon-linkedin\\\"></span>\n </a>\n </div>\n \",\n 'value_type' =>Option::TYPE_LON\n ],\n\n [\n 'key' => 'Latest Post Count',\n 'default' => 4,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Trending Post Count',\n 'default' => 4,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Trending Days Limit',\n 'default' => 30,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Limit Latest Post Per Category',\n 'default' => 6,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Primary Color',\n 'default' => '#56c8f3',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Primary Text Color',\n 'default' => '#111111',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Secondary Color',\n 'default' => '#0D325B',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Secondary Text Color',\n 'default' => '#EEEEEE',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Primary Button Color',\n 'default' => '#029ACF',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Secondary Button Color',\n 'default' => '#0D325B',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Danger Button Color',\n 'default' => '#ff0000',\n 'value_type' =>Option::TYPE_COL\n ],\n\n [\n 'key' => 'Maximum Rating',\n 'default' => 10,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n [\n 'key' => 'Default Font Size',\n 'default' => 16,\n 'value_type' =>Option::TYPE_NUM\n ],\n\n );\n\n foreach ($options_array as $option) {\n Option::create([\n 'key' => $option['key'],\n 'default' => $option['default'],\n 'value_type' =>$option['value_type']\n ]);\n }\n }", "public function option()\n\t{\n\t\treturn [];\n\t}", "public function get_settings() {\n\n\t\tif($this->settings) {\n\t\t\treturn $this->settings;\n\t\t}\n\n\t\t$query = $this->db->get('shortee_settings');\n\t\t$this->settings = $query->row_array();\n\t\t$this->domain_list = explode(',',$this->settings['short_domain']);\n\n\t\treturn $this->settings;\n\t}", "private static function getOption()\n {\n return array_merge(\n array_flip(['application_id', 'api_key', 'index_name']),\n array_filter((array) get_option('algolia_index'))\n );\n }", "public function actionMyOptions()\n {\n echo \"option1 - $this->option1\\n\\roption2 - $this->option2\\n\\rcolor - $this->color\\n\\r\";\n }", "public function get_settings() {\n\n\t\t$settings = get_option($this->option_name);\n\n\t\tif ( false === $settings && isset($this->alt_option_name) )\n\t\t\t$settings = get_option($this->alt_option_name);\n\n\t\tif ( !is_array($settings) )\n\t\t\t$settings = array();\n\n\t\tif ( !empty($settings) && !array_key_exists('_multiwidget', $settings) ) {\n\t\t\t// old format, convert if single widget\n\t\t\t$settings = wp_convert_widget_settings($this->id_base, $this->option_name, $settings);\n\t\t}\n\n\t\tunset($settings['_multiwidget'], $settings['__i__']);\n\t\treturn $settings;\n\t}", "public function getSetting() {}", "public function getSetting() {}", "public function general_settings_inputs() {\n\t\t$option_object = $this->get_analytics_options();\n\n\t\t$campus = array(\n\t\t\t'pullman' => 'Pullman',\n\t\t\t'spokane' => 'Spokane',\n\t\t\t'vancouver' => 'Vancouver',\n\t\t\t'tri-cities' => 'Tri-Cities',\n\t\t\t'globalcampus' => 'Global Campus',\n\t\t\t'everett' => 'Everett',\n\t\t);\n\n\t\t$college = array(\n\t\t\t'arts-and-sciences' => 'Arts & Sciences',\n\t\t\t'cahnrs' => 'CAHNRS & Extension',\n\t\t\t'carson' => 'Carson',\n\t\t\t'education' => 'Education',\n\t\t\t'honors' => 'Honors',\n\t\t\t'medicine' => 'Medicine',\n\t\t\t'murrow' => 'Murrow',\n\t\t\t'nursing' => 'Nursing',\n\t\t\t'pharmacy' => 'Pharmacy',\n\t\t\t'vetmed' => 'VetMed',\n\t\t\t'voiland' => 'Voiland',\n\t\t);\n\n\t\t$unit_type = array(\n\t\t\t'center' => 'Center',\n\t\t\t'department' => 'Department',\n\t\t\t'laboratory' => 'Laboratory',\n\t\t\t'office' => 'Office',\n\t\t\t'program' => 'Program',\n\t\t\t'school' => 'School',\n\t\t\t'unit' => 'Unit',\n\t\t);\n\n\t\t// @todo complete units taxonomy.\n\t\t$units = array();\n\n\t\t?>\n\t\t<!-- campus -->\n\t\t<p><label class=\"wsu-analytics-label\" for=\"wsu-analytics-campus\">Campus:</label>\n\t\t<select id=\"wsu-analytics-campus\" name=\"wsuwp_analytics_option_map[campus]\">\n\t\t\t<option value=\"none\" <?php selected( 'none', $option_object['campus'] ); ?>>None</option>\n\t\t\t<option value=\"all\" <?php selected( 'all', $option_object['campus'] ); ?>>All</option>\n\t\t\t<?php foreach ( $campus as $key => $name ) : ?>\n\t\t\t\t<option value=\"<?php echo $key; ?>\" <?php selected( $key, $option_object['campus'] ); ?>><?php echo $name; ?></option>\n\t\t\t<?php endforeach; ?>\n\t\t</select></p>\n\t\t<p class=\"description\">Does this site represent a campus in location or association?</p><br/>\n\n\t\t<!-- college -->\n\t\t<p><label class=\"wsu-analytics-label\" for=\"wsu-analytics-college\">College:</label>\n\t\t<select id=\"wsu-analytics-college\" name=\"wsuwp_analytics_option_map[college]\">\n\t\t\t<option value=\"none\" <?php selected( 'none', $option_object['college'] ); ?>>None</option>\n\t\t\t<option value=\"all\" <?php selected( 'all', $option_object['college'] ); ?>>All</option>\n\t\t\t<?php foreach ( $college as $key => $name ) : ?>\n\t\t\t\t<option value=\"<?php echo $key; ?>\" <?php selected( $key, $option_object['college'] ); ?>><?php echo $name; ?></option>\n\t\t\t<?php endforeach; ?>\n\t\t</select></p>\n\t\t<p class=\"description\">Does this site represent a college as a whole or by association?</p><br/>\n\n\t\t<p><label class=\"wsu-analytics-label\" for=\"wsu-analytics-unit-type\">Unit Type:</label>\n\t\t<select id=\"wsu-analytics-unit-type\" name=\"wsuwp_analytics_option_map[unit_type]\">\n\t\t\t<option value=\"none\" <?php selected( 'none', $option_object['unit_type'] ); ?>>None</option>\n\t\t\t<?php foreach ( $unit_type as $k => $v ) : ?>\n\t\t\t\t<option value=\"<?php echo $k; ?>\" <?php selected( $k, $option_object['unit_type'] ); ?>><?php echo $v; ?></option>\n\t\t\t<?php endforeach; ?>\n\t\t</select></p>\n\t\t<p class=\"description\">What type of unit does this site represent?</p><br/>\n\n\t\t<!-- units -->\n\t\t<p><label class=\"wsu-analytics-label\" for=\"wsu-analytics-parent-unit\">Parent Unit:</label>\n\t\t<select id=\"wsu-analytics-parent-unit\" name=\"wsuwp_analytics_option_map[unit]\">\n\t\t\t<option value=\"none\" <?php selected( 'none', $option_object['unit'] ); ?>>None</option>\n\t\t\t<?php foreach ( $units as $key => $group ) : ?>\n\t\t\t\t<optgroup label=\"<?php echo $key; ?>\">\n\t\t\t\t<?php foreach ( $group as $item_key => $name ) : ?>\n\t\t\t\t\t<option value=\"<?php echo $item_key; ?>\" <?php selected( $item_key, $option_object['unit'] ); ?>><?php echo $name; ?></option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t\t</optgroup>\n\t\t\t<?php endforeach; ?>\n\t\t</select></p>\n\t\t<p class=\"description\">Does this site represent an entity that has a parent unit? (e.g department, office, school)</p><br/>\n\n\t\t<!-- units -->\n\t\t<p><label class=\"wsu-analytics-label\" for=\"wsu-analytics-unit\">Unit:</label>\n\t\t<select id=\"wsu-analytics-unit\" name=\"wsuwp_analytics_option_map[subunit]\">\n\t\t\t<option value=\"none\" <?php selected( 'none', $option_object['subunit'] ); ?>>None</option>\n\t\t\t<?php foreach ( $units as $key => $group ) : ?>\n\t\t\t\t<optgroup label=\"<?php echo $key; ?>\">\n\t\t\t\t<?php foreach ( $group as $item_key => $name ) : ?>\n\t\t\t\t\t<option value=\"<?php echo $item_key; ?>\" <?php selected( $item_key, $option_object['subunit'] ); ?>><?php echo $name; ?></option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t\t</optgroup>\n\t\t\t<?php endforeach; ?>\n\t\t</select></p>\n\t\t<p class=\"description\">Does this site represent an entity that is a unit? (e.g. department, office, school)</p><br/>\n\n\t\t<?php if ( ( function_exists( 'wsuwp_is_global_admin' ) && wsuwp_is_global_admin( wp_get_current_user()->ID ) ) || is_super_admin() ) : ?>\n\t\t<p><span class=\"wsu-analytics-label\">Track Global Analytics</span></p>\n\t\t<label>Yes <input type=\"radio\" class=\"regular-radio\" name=\"wsuwp_analytics_option_map[track_global]\" value=\"true\" <?php checked( 'true', $option_object['track_global'] ); ?> /></label>\n\t\t<label>No <input type=\"radio\" class=\"regular-radio\" name=\"wsuwp_analytics_option_map[track_global]\" value=\"false\" <?php checked( 'false', $option_object['track_global'] ); ?> /></label>\n\t\t<p class=\"description\">Should global WSU analytics be tracked on this site? This should normally be on and only disabled for debugging.</p><br/>\n\n\t\t<p><span class=\"wsu-analytics-label\">Track App Analytics</span></p>\n\t\t<label>Yes <input type=\"radio\" class=\"regular-radio\" name=\"wsuwp_analytics_option_map[track_app]\" value=\"true\" <?php checked( 'true', $option_object['track_app'] ); ?> /></label>\n\t\t<label>No <input type=\"radio\" class=\"regular-radio\" name=\"wsuwp_analytics_option_map[track_app]\" value=\"false\" <?php checked( 'false', $option_object['track_app'] ); ?> /></label>\n\t\t<p class=\"description\">Should WSUWP Platform analytics be tracked on this site? This should normally be on and only disabled for debugging.</p><br/>\n\n\t\t<p><span class=\"wsu-analytics-label\">Track Site Analytics</span></p>\n\t\t<label>Yes <input type=\"radio\" class=\"regular-radio\" name=\"wsuwp_analytics_option_map[track_site]\" value=\"true\" <?php checked( 'true', $option_object['track_site'] ); ?> /></label>\n\t\t<label>No <input type=\"radio\" class=\"regular-radio\" name=\"wsuwp_analytics_option_map[track_site]\" value=\"false\" <?php checked( 'false', $option_object['track_site'] ); ?> /></label>\n\t\t<p class=\"description\">Should analytics be tracked on this site? A Google Analytics ID is still required if this is enabled.</p><br/>\n\t\t<?php endif; ?>\n\n\t\t<hr/>\n\t\t<p class=\"description\">Instructions on how to set up your Google analytics to best use this plugin can be <a href=\"https://web.wsu.edu/wordpress/plugins/wsu-analytics/\">found here</a>.</p>\n\n\t\t<style>\n\t\t\t.wsu-analytics-label {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\twidth: 185px;\n\t\t\t\tfont-weight: 700;\n\t\t\t}\n\t\t\t.form-table td p.description {\n\t\t\t\tfont-size: 13px;\n\t\t\t}\n\t\t</style>\n\t\t<?php\n\t}", "function get_array_option($option, $subarray='') {\r\n\r\n $options = get_option('foliamaptool');\r\n\r\n\r\n\r\n if (empty($options))\r\n\t\t\treturn false;\r\n\r\n\t\tif ($subarray) {\r\n\t\t\tif (isset($options[$subarray][$option]))\r\n\t\t\t\treturn $options[$subarray][$option];\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// No subarray\r\n\t\tif (isset($options[$option]))\r\n\t\t\treturn $options[$option];\r\n\t\telse\r\n\t\t\treturn false;\r\n\r\n\t\t// If we get here it's an error\r\n\t\treturn false;\r\n\t}", "function get_option() {\n\t\t\tcheck_ajax_referer('ajax-nonce', 'nonce');\n\t\t\tif (!empty($_POST['option'])) {\n\t\t\t\tswitch ($_POST['option']) {\n\t\t\t\t\tcase 'blogname':\n\t\t\t\t\t\techo preg_replace_callback(\"/(&#[0-9]+;)/\", array($this, 'decode_entities'), html_entity_decode(get_bloginfo('name')));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'blogdescription':\n\t\t\t\t\t\techo preg_replace_callback(\"/(&#[0-9]+;)/\", array($this, 'decode_entities'), html_entity_decode(get_bloginfo('description')));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\techo get_option($_POST['option']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo 'notfound';\n\t\t\t}\n\t\t\tdie;\n\t\t}", "function print_additional_settings_section_info() {\n }", "function get_settings() {\n\t\treturn $this->settings;\n\t}", "function getValue($setting)\n\t\t{\n\t\t\t// lookup the value in the array \n\t\t\tif (isset($this->options[$setting]))\n\t\t\t{\n\t\t\t\t// return its value, if set\n\t\t\t\treturn $this->options[$setting];\n\t\t\t}\n\t\t\t\n\t\t\t// default to NULL\n\t\t\treturn NULL;\n\t\t}", "abstract public function getSettings();", "function settings_html() {\n $this->render_setting( 'label_any' );\n $this->render_setting( 'modifiers' );\n $this->render_setting( 'orderby' );\n $this->render_setting( 'count' );\n }", "public function pluginReadSettingsPage()\n {\n $this->getOptions();\n global $rundizable_wp_features_optname;\n\n $output['rundizable_wp_features_optname'] = $rundizable_wp_features_optname;\n\n $Loader = new \\RundizableWpFeatures\\App\\Libraries\\Loader();\n $Loader->loadView('admin/readsettings_v', $output);\n unset($Loader, $output);\n }", "function get_option($name) {\n $setting = Setting::where('name', $name)->first();\n if(!$setting) {\n return \"\";\n }\n return $setting->value;\n}", "protected function getOptions() {}", "protected function getOptions() {}", "public function wp_get_info(string $option = 'siteurl'){\n\n\t $bdd = Bdd::getInstance();\n\n\t\t$req = $bdd->dbh->prepare('SELECT option_value FROM '.$this->_table_prefix.'options WHERE option_name = \"' . $option . '\";');\n\t\t$req->execute();\n\n\t\treturn $req->fetch();\n\t}", "protected function getOptions() {}", "function getSettings($settings) {\r\n $this->reduceSettings();\r\n return array_merge($settings, $this->settings_array);\r\n }", "function get_settings()\n {\n #global $pdo, $db_settings;\n #$database = Database::getInstance();\n $result = Database::$content->query(\"SELECT name, value FROM \".Database::$db_settings['settings_table']);\n while($line = $result->fetch())\n {\n $settings[$line['name']] = $line['value'];\n }\n return $settings;\n }", "abstract public function getOptions();", "static public function get_settings() {\n\n\t\t$settings[] = array();\n\n\t\t$settings = array(\n\t\t\t'default_tab' => array(\n\t\t\t\t'default_tab_settings' => array(\n\t\t\t\t\t'name' => '<strong>' . __( 'Header', self::$plugin_name ) . '</strong>',\n\t\t\t\t\t'type' => 'header'\n\t\t\t\t),\n\t\t\t\t'missing_callback' => array(\n\t\t\t\t\t'name' => '<strong>' . __( 'Missing Callback', self::$plugin_name ) . '</strong>',\n\t\t\t\t\t'type' => 'non-exisit'\n\t\t\t\t),\n\t\t\t\t'checkbox' => array(\n\t\t\t\t\t'name' => __( 'Checkbox', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Checkbox', self::$plugin_name ),\n\t\t\t\t\t'type' => 'checkbox'\n\t\t\t\t),\n\t\t\t\t'multicheck' => array(\n\t\t\t\t\t'name' => __( 'Multicheck', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Multicheck with 3 options', self::$plugin_name ),\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'wp-human' => __( \"I read the <a href='https://wphuman.com/blog/'>WP Human Blog</a>\", self::$plugin_name ),\n\t\t\t\t\t\t'tang-rufus' => __( \"<a href='http://tangrufus.com/'>Tang Rufus' Blog</a> looks great\", self::$plugin_name ),\n\t\t\t\t\t\t'Filter' => __( 'You can apply filters on this option!', self::$plugin_name )\n\t\t\t\t\t),\n\t\t\t\t\t'type' => 'multicheck'\n\t\t\t\t),\n\t\t\t\t'multicheck_without_options' => array(\n\t\t\t\t\t'name' => __( 'Multicheck', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Multicheck without options', self::$plugin_name ),\n\t\t\t\t\t'type' => 'multicheck'\n\t\t\t\t),\n\t\t\t\t'radio' => array(\n\t\t\t\t\t'name' => __( 'Radio', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Radio with 3 options', self::$plugin_name ),\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'wp-human' => __( \"I read the <a href='https://wphuman.com/blog/'>WP Human Blog</a>\", self::$plugin_name ),\n\t\t\t\t\t\t'tang-rufus' => __( \"<a href='http://tangrufus.com/'>Tang Rufus' Blog</a> looks great\", self::$plugin_name ),\n\t\t\t\t\t\t'Filter' => __( 'You can apply filters on this option!', self::$plugin_name )\n\t\t\t\t\t),\n\t\t\t\t\t'type' => 'radio'\n\t\t\t\t),\n\t\t\t\t'radio_without_options' => array(\n\t\t\t\t\t'name' => __( 'Radio', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Radio without options', self::$plugin_name ),\n\t\t\t\t\t'type' => 'radio'\n\t\t\t\t),\n\t\t\t\t'text' => array(\n\t\t\t\t\t'name' => __( 'Text', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Text', self::$plugin_name ),\n\t\t\t\t\t'type' => 'text'\n\t\t\t\t),\n\t\t\t\t'text_with_std' => array(\n\t\t\t\t\t'name' => __( 'Text with std', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Text with std', self::$plugin_name ),\n\t\t\t\t\t'std' => __( 'std will be saved!', self::$plugin_name ),\n\t\t\t\t\t'type' => 'text'\n\t\t\t\t),\n\t\t\t\t'email' => array(\n\t\t\t\t\t'name' => __( 'Email', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Email', self::$plugin_name ),\n\t\t\t\t\t'type' => 'email'\n\t\t\t\t),\n\t\t\t\t'url' => array(\n\t\t\t\t\t'name' => __( 'URL', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'By default, only http & https are allowed', self::$plugin_name ),\n\t\t\t\t\t'type' => 'url'\n\t\t\t\t),\n\t\t\t\t'password' => array(\n\t\t\t\t\t'name' => __( 'Password', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Password', self::$plugin_name ),\n\t\t\t\t\t'type' => 'password'\n\t\t\t\t),\n\t\t\t\t'number' => array(\n\t\t\t\t\t'name' => __( 'Number', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Number', self::$plugin_name ),\n\t\t\t\t\t'type' => 'number'\n\t\t\t\t),\n\t\t\t\t'number_with_attributes' => array(\n\t\t\t\t\t'name' => __( 'Number', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Max: 1000, Min: 20, Step: 30', self::$plugin_name ),\n\t\t\t\t\t'max' => 1000,\n\t\t\t\t\t'min' => 20,\n\t\t\t\t\t'step' => 30,\n\t\t\t\t\t'type' => 'number'\n\t\t\t\t),\n\t\t\t\t'textarea' => array(\n\t\t\t\t\t'name' => __( 'Textarea', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Textarea', self::$plugin_name ),\n\t\t\t\t\t'type' => 'textarea'\n\t\t\t\t),\n\t\t\t\t'textarea_with_std' => array(\n\t\t\t\t\t'name' => __( 'Textarea with std', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Textarea with std', self::$plugin_name ),\n\t\t\t\t\t'std' => __( 'std will be saved!', self::$plugin_name ),\n\t\t\t\t\t'type' => 'textarea'\n\t\t\t\t),\n\t\t\t\t'select' => array(\n\t\t\t\t\t'name' => __( 'Select', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Select with 3 options', self::$plugin_name ),\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'wp-human' => __( \"I read the <a href='https://wphuman.com/blog/'>WP Human Blog</a>\", self::$plugin_name ),\n\t\t\t\t\t\t'tang-rufus' => __( \"<a href='http://tangrufus.com/'>Tang Rufus' Blog</a> looks great\", self::$plugin_name ),\n\t\t\t\t\t\t'Filter' => __( 'You can apply filters on this option!', self::$plugin_name )\n\t\t\t\t\t),\n\t\t\t\t\t'type' => 'select'\n\t\t\t\t),\n\t\t\t\t'rich_editor' => array(\n\t\t\t\t\t'name' => __( 'Rich Editor', self::$plugin_name ),\n\t\t\t\t\t'desc' => __( 'Rich Editor save as HTML markups', self::$plugin_name ),\n\t\t\t\t\t'type' => 'rich_editor'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'second_tab' => array(\n\t\t\t\t'extend_me' => array(\n\t\t\t\t\t'name' => 'Extend me',\n\t\t\t\t\t'desc' => __( 'You can extend me via hooks and filters.', self::$plugin_name ),\n\t\t\t\t\t'type' => 'text'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\treturn self::apply_tab_slug_filters( $settings );\n\t}", "public function getSettings(){\n $allSettings = GeneralSetting::all();\n \n $settingsArray = array();\n foreach ($allSettings as $settings) {\n $refl3 = new ReflectionObject($settings);\n $prop3 = $refl3->getProperty('attributes');\n $prop3->setAccessible(true);\n $setting = $prop3->getValue($settings);\n array_push($settingsArray, $setting);\n \n }\n $this->layout->content = View::make('admin.settings')->with('settings',$settingsArray);\n }", "protected function get()\n {\n return get_option($this->hash);\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 function getOptions() : array;" ]
[ "0.6824561", "0.671921", "0.6705289", "0.67030084", "0.66402143", "0.6639999", "0.6455486", "0.6395388", "0.63846093", "0.63763034", "0.62828046", "0.62750417", "0.623459", "0.6221672", "0.61626196", "0.61619353", "0.6152463", "0.61518425", "0.61435235", "0.61194867", "0.6114976", "0.6109243", "0.61084056", "0.60828537", "0.60793424", "0.60753995", "0.60753995", "0.60753995", "0.60753995", "0.60753995", "0.60753995", "0.60753995", "0.60721755", "0.6063073", "0.6035946", "0.6030223", "0.60286856", "0.60286856", "0.60286856", "0.60286856", "0.60286856", "0.60286856", "0.60286856", "0.60286856", "0.60286856", "0.60286856", "0.60286856", "0.60286856", "0.60286856", "0.60286856", "0.60286856", "0.60286856", "0.60281086", "0.6006877", "0.6002907", "0.6002428", "0.5996894", "0.59931254", "0.59865403", "0.59827006", "0.5975807", "0.5965986", "0.5965986", "0.596598", "0.5962266", "0.5952332", "0.5942179", "0.5937633", "0.59243923", "0.5920928", "0.59136075", "0.5911844", "0.59069145", "0.5906076", "0.5899176", "0.58831733", "0.5879437", "0.58776903", "0.58776903", "0.58756375", "0.5871966", "0.5845849", "0.58318025", "0.5827284", "0.58266526", "0.5822805", "0.58177775", "0.5802163", "0.57976335", "0.57967883", "0.57967883", "0.57960933", "0.5793842", "0.5783255", "0.5782464", "0.57789594", "0.5777345", "0.57765716", "0.57702476", "0.576829", "0.5766706" ]
0.0
-1
Run the database seeds.
public function run() { (new Event)->updateOrCreate([ 'id' => 1, 'name' => 'view', ]); (new Event)->updateOrCreate([ 'id' => 2, 'name' => 'play', ]); (new Event)->updateOrCreate([ 'id' => 3, 'name' => 'click', ]); }
{ "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' => 'simpleadressemail@mail.com', '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'=> \"admin@admin.com\"\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' => 'admin@petstore.com',\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' => 'prosales@researchmobile.co',\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' => 'movil@researchmobile.co',\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'=>'test@yandex.ru'\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' => 'admin@yahoo.com',\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' => 'programmerlemar@gmail.com',\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' => 'qwerty@gmail.com',\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=> 'admin@example.com',\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' => 'briedis@aa.bb',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => 'briedis2@aa.bb',\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' => 'admin@admin.com',\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' => 'ignacio@dh.com',\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' => 'admin@gmail.com',\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\"=>'alice@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'bob@gmail.com',\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 = your.email@domain.com\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' => 'admin@gmail.com',\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'=>'papesambandour@hotmail.com',\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' => 'rognales@gmail.com',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => 'sonic21danger@gmail.com',\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' => 'sovon.kucse@gmail.com']);\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'=>'abada@gmail.com',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','abada@gmail.com')->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' => 'eddyjaair@gmail.com']);\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' => 'barbozagonzalesjose@gmail.com',\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' => 'russell@gmail.com',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => 'bitfumes@gmail.com',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => 'paul@gmail.com',\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' => 'pkw@pkw.com',\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' => 'empresa02@gmail.com',\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' => 'carlos@email.com',\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'=>'izzanniroshlei@gmail.com',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'aina@gmail.com',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'sab@gmail.com',\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' => 'pedrito@juase.com',\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'=>'hienphan18112015@gmail.com', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'haphan@gmail.com', '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
Method to get a model object, loading it if required.
public function getModel($name = 'Addon', $prefix = 'ConvertFormsModel', $config = array('ignore_request' => true)) { return parent::getModel($name, $prefix, $config); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadModel() {\n // name as requested resource.\n $name = $this->name.'Model';\n $path = str_replace(kPlaceholder, $this->version, kModelsFolder);\n $path = $path . $name . \".php\";\n // If it does not exist, go with\n // the default Model class.\n if (!file_exists($path)) {\n return new Model();\n } else {\n if (!class_exists($name)) {\n include $path;\n }\n\n return new $name();\n }\n }", "public function get_model() {\r\n\t\t$model = null;\r\n\t\t\r\n\t\t//Includes the shared model, if exists.\r\n\t\t$path_shared = 'models/shared.php';\r\n\t\tif (file_exists($path_shared)) include($path_shared);\r\n\t\t\r\n\t\t//Checks if the models' file for the current controller exists.\r\n\t\t$path_current_model = 'models/'.$this->controller.'.php';\r\n\t\t\r\n\t\tif (file_exists($path_current_model)) {\r\n\t\t\t//If the file exists, checks if the class for the current action exists.\r\n\t\t\tinclude($path_current_model);\r\n\t\t\t$class_name = ucwords($this->controller).ucwords($this->action).\"Model\";\r\n\t\t\t\r\n\t\t\tif (class_exists($class_name)) {\r\n\t\t\t\t//Creates the class and populates its properties.\r\n\t\t\t\t$model = new $class_name();\r\n\t\t\t\t\r\n\t\t\t\t//Iterates through all request values and check for properties with the same name.\r\n\t\t\t\tforeach ($_REQUEST as $key => $value) {\r\n\t\t\t\t\tif (property_exists($model, $key)) {\r\n\t\t\t\t\t\t$model->$key = $value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $model;\r\n\t}", "private function _getModel()\n {\n if (NULL === $this->_model) {\n $this->_model = new Model();\n }\n\n return $this->_model;\n }", "public function loadModel ($name) { \n $modelName = $name . 'Model';\n if (class_exists($modelName, FALSE)) {\n return new $modelName($this->db);\n } else {\n $path = MODEL_PATH . strtolower($name) . '_model.php';\n // Check for model: Does such a model exist?\n if (file_exists($path)) {\n require MODEL_PATH . strtolower($name) . '_model.php'; \n // Return new model and pass the database connection to the model\n return new $modelName($this->db);\n } else {\n return null;\n }\n }\n }", "public function load_model( $model_name = false ) {\n\t\tif ( ! $model_name ) return;\n\n\t\t$model_name = strtolower( $model_name );\n\t\t$model_path = ABSPATH . '/models/' . $model_name . '.php';\n\n\t\tif ( file_exists( $model_path ) ) {\n\t\t\trequire_once $model_path;\n\n\t\t\t// Pega só o nome final do caminho\n\t\t\t$model_name = explode('/', $model_name);\n\t\t\t$model_name = end( $model_name );\n\t\t\t$model_name = preg_replace( '/[^a-zA-Z0-9]/is', '', $model_name );\n\n\t\t\t// Retorna um objeto da classe\n\t\t\tif ( class_exists( $model_name ) ) {\n\t\t\t\treturn new $model_name( $this->db, $this );\n\t\t\t}\n\n\t\t\treturn;\n\t\t} // load_model\n\n\t}", "public function getModel()\n {\n $modelData = is_resource($this->model_data)\n ? stream_get_contents($this->model_data,-1,0)\n : $this->model_data;\n\n $className = self::getActualClassNameForMorph($this->versionable_type);\n $model = new $className();\n $model->unguard();\n $model->fill(unserialize($modelData));\n $model->exists = true;\n $model->reguard();\n return $model;\n }", "public function loadModel()\n {\n if ($this->_modelName == null) {\n $this->_modelName = $this->_controllerName . '_Model';\n $this->load->model($this->_modelName);\n }\n }", "public function loadModel()\n {\n if ($this->_model === null) {\n if (isset($_GET['id'])) {\n if (Yii::app()->user->isGuest)\n //$condition='status='.Post::STATUS_PUBLISHED.' OR status='.Post::STATUS_ARCHIVED;\n $condition = '';\n else\n $condition = '';\n $this->_model = Object::model()->with(array('author','files'))->findByPk($_GET['id']);\n }\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }", "protected function get_model()\n {\n if( ! isset(self::$models[$this->_model]))\n {\n $model = $this->_model;\n self::$models[$this->_model] = new $model;\n }\n return self::$models[$this->_model];\n }", "protected static function getModel()\n {\n $modelName = get_called_class();\n $model = new $modelName();\n $model->setFetchMode(\\Phalcon\\Db::FETCH_OBJ);\n return $model;\n }", "protected function getModel()\n {\n if (! $this->model) {\n $this->model = $this->createModel();\n\n $this->prepareModel($this->model);\n }\n\n return $this->model;\n }", "private function loadModel()\n {\n require_once APP . '/model/User.php';\n // create new \"model\" (and pass the database connection)\n $this->model = new User($this->db);\n }", "public function loadModel()\n\t{\n\t\tif( $this->_model === null ) {\n\t\t\tif( Yii::app()->user->isAuthenticated() ) { // если пользователь авторизирован\n\t\t\t\t$this->_model = User::model()->findbyPk(Yii::app()->user->id);\n\t\t\t}\n\t\t\tif( $this->_model === null ) {\n\t\t\t\tthrow new CHttpException(404, 'The requested page does not exist.');\n\t\t\t}\n }\n return $this->_model;\n }", "public function getModel()\n {\n $model = new $this->versionable_type();\n $model->unguard();\n $model->fill(unserialize($this->model_data));\n $model->exists = true;\n $model->reguard();\n return $model;\n }", "protected function resolveModel()\n {\n if (!\\method_exists($this, 'model')) {\n throw new NoModelDefined('No model defined');\n }\n\n return app()->make($this->model()); //make model\n }", "public function loadModel($name)\r\n\t\t{\r\n\r\n\t\t\t$path = 'application\\models\\\\'.ucfirst($name);\r\n\t\t\tif (class_exists($path))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\treturn new $path;\r\n\t\t\t}\r\n\t\t}", "function getModelObject(){\n\t\t\n\t\tif ( !isset($this->modObj) ){\n\t\t\t$this->modObj = new DoctrineModel();\n\t\t}\t\n\t\treturn $this->modObj;\n\t}", "public function getModel()\n {\n return $this->model->newInstance();\n }", "public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=emprestimo::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}", "public function Model($model){\r\n $fullpath=cf(\"BASE/MVCPATH\").\"models\".DS.ucwords($model).EXT;\r\n if($this->Load($fullpath)){\r\n return new $model();\r\n }\r\n else {\r\n return null;\r\n } \r\n }", "public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=LicenceApplication::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}", "public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Invoice::model()->findByPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}", "public static function getInstance() {\n if (is_null(self::$_modelLoader)) {\n self::$_modelLoader = new self();\n //Zend_Debug::dump(self::$_instance);\n return self::$_modelLoader;\n } else {\n return self::$_modelLoader;\n }\n }", "public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t{ \n //$command = Yii::app()->db->createCommand('SELECT * FROM tbl_user');\n // следующая строка НЕ добавит WHERE к SQL\n //$command->where('id=:id', array(':id'=>$id));\n\n \n\t\t\t\tif(Yii::app()->user->isGuest)\n\t\t\t\t\t$condition='status='.Post::STATUS_PUBLISHED.' OR status='.Post::STATUS_ARCHIVED;\n\t\t\t\telse\n\t\t\t\t\t$condition='';\n\t\t\t\t$this->_model=Post::model()->findByPk($_GET['id'], $condition);\n \n \n \n\t\t\t} \n \n\t\t}\n\t\treturn $this->_model;\n\t}", "public function getModel()\n {\n if (! $this->_model) {\n $this->_model = $this->createModel();\n }\n\n return $this->_model;\n }", "public function getModel(){\n\t\tif( isset($this->model) ){\n\t\t\treturn $this->model;\n\t\t}\n\t\t$nameModel = str_replace(' View' , 'Model' ,__CLASS__ );\n\t\t$this->model = new $nameModel();\n\t}", "protected function getModelInstance()\n {\n return new $this->model();\n }", "public function loadModel(){\n $this->load->model('Data_Model');\n return new Data_Model($this->used_table,$this->used_db);\n }", "public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Residencebaseinfo::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}", "public function load($model) {\n\t\tstatic $models = array();\n\t\t$db = DBO::init();\n\n\t\t$atom = explode('.', $model);\n\n\t\tif(isset($models[$model]))\n\t\t\treturn $models[$model];\n\n\t\t$path = \"site/models/{$atom[0]}/{$atom[1]}Model.php\";\n\t\tif(!file_exists($path)) {\n\t\t\tthrow new \\Exception(\"Model '{$model}' does not exist!<br />$path\");\n\t\t}\n\n\t\tinclude($path);\n\t\t$class = \"{$atom[1]}Model\";\n\t\t$obj = new $class($db);\n\t\t$models[$model] = $obj;\n\t\t$this->initialise($obj);\n\t\treturn $obj;\n\t}", "public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=User::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}", "public function getModel()\n {\n return new $this->model;\n }", "public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=DiasLetivos::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}", "protected function model($model)\r\n {\r\n if (file_exists(ROOT_DIR . '/app/models/' . $model . '.php'))\r\n {\r\n require_once ROOT_DIR . '/app/models/' . $model . '.php';\r\n return new $model(self::$db);\r\n }\r\n return NULL;\r\n }", "public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t{\n\t\t\t\t$condition='';\n\t\t\t\t$this->_model=Chat::model()->findByPk($_GET['id'], $condition);\n\t\t\t}\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}", "function loadModel($model){\n $url='models/'.$model.'model.php';//models/alumnomodel.php\n //validando que el modelo exista\n if(file_exists($url)){\n //si axiste lo llamamos\n require $url;\n $modelName=$model.'Model';\n //instancia de la clase del modelo recibido\n $this->model=new $modelName;\n }\n }", "abstract function load(Model $model);", "public function getObject()\n {\n $object = Doctrine::getTable($this->getModel())->findOneById($this->getModelId());\n\n return $object;\n }", "protected function _getInstance(){\n\n if (!($this->_modelInstance && is_object($this->_modelInstance))){\n $this->_modelInstance = $this->_p->Model($this->_model);\n }\n\n if (!$this->_modelInstance)\n throw new \\Exception($this->_p->trans('error.no_model_instance'), ERROR_NO_MODEL_FOUND);\n\n return $this->_modelInstance;\n\n }", "public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Image::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}", "public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Image::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}", "public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=RR_TipoHorario::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}", "public static function getModel($name)\n\t{\n\t\t$model = null;\n\n\t\t// If the file exists, let's\n\t\tif (file_exists(JPATH_SITE . '/components/com_zvcuotas/models/' . strtolower($name) . '.php'))\n\t\t{\n\t\t\trequire_once JPATH_SITE . '/components/com_zvcuotas/models/' . strtolower($name) . '.php';\n\t\t\t$model = JModelLegacy::getInstance($name, 'ZvcuotasModel');\n\t\t}\n\n\t\treturn $model;\n\t}", "function loadModel($modelName,$negocio){\r\n\tif($modelName=='database'){\r\n\t\t$modelPath = '../Config/'.$negocio.'_'.$modelName.'.php';\r\n\t\tif(is_file($modelPath)){\r\n\t\t\tif (!class_exists($modelName)) {\r\n\t\t\t\trequire_once($modelPath);\r\n\t\t\t}\t\t\r\n\t\t}else{\r\n\t\t\techo 'No existe la conexion'.$modelPath;\r\n\t\t\texit();\r\n\t\t}\r\n\t\t$model = new $modelName();\r\n\t\treturn $model;\t\r\n\t}else{\r\n\t\t$modelPath = '../Model/'.$modelName.'.php';\r\n\t\tif(is_file($modelPath)){\r\n\t\t\tif (!class_exists($modelName)) {\r\n\t\t\t\trequire_once($modelPath);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\techo 'No existe este modelo '.$modelPath;\r\n\t\t\texit();\r\n\t\t}\r\n\t\t$model = new $modelName();\r\n\t\tif($negocio != 'null'){\r\n\t\t\t$model->negocio = $negocio;\r\n\t\t}\t\t\r\n\t\treturn $model;\r\n\t}\r\n}", "final public static function getModel($model){\n $fileClass = self::getConfig()->path->path_modules.'/'. self::getPathModule().'/model/'.ucfirst($model).self::getConfig()->path->ext_file;\n if(file_exists($fileClass)){\n\n $model = str_replace('/', '\\\\', self::getPathModule().'/model/'.ucfirst($model));\n $obj = new $model();\n return $obj;\n\n }\n\n }", "public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Report::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}", "public function getModel(): Model;", "public function getModel(): Model;", "public function model()\n {\n $model = $this->_model;\n return new $model;\n\n }", "public function loadModel()\n {\n if ($this->_model === null)\n {\n if (isset($_GET['id']))\n $this->_model = User::model()->findbyPk($_GET['id']);\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }", "public static function getModel()\n {\n return self::$model;\n }", "public function loadModel()\n\t{\n\t\tif( $this->_model===null )\n\t\t{\n\t\t\t$itemName = $this->getItemName();\n\t\t\t\n\t\t\tif( $itemName!==null )\n\t\t\t{\n\t\t\t\t$this->_model = $this->_authorizer->authManager->getAuthItem($itemName);\n\t\t\t\t$this->_model = $this->_authorizer->attachAuthItemBehavior($this->_model);\n\t\t\t}\n\n\t\t\tif( $this->_model===null )\n\t\t\t\tthrow new CHttpException(404, Rights::t('core', 'The requested page does not exist.'));\n\t\t}\n\n\t\treturn $this->_model;\n\t}", "private function get_model() : ModelInterface\n {\n return $this->model;\n }", "public function getModel($model)\n {\n $class = $this->_loader->load($model);\n return new $class;\n }", "abstract protected function getModel();", "public function loadModel($modelName)\n {\n require 'application/models/' . strtolower($modelName) . '.php';\n // return new model (and pass the database connection to the model)\n return new $modelName($this->db);\n }", "static public function getModel($model) {\n if(isset($model)){\n $class='app'.DS.'models'.DS.$model;\n $file=ROOT.DS.'app'.DS.'models'.DS.lcfirst($model).'.php';\n if(file_exists($file))\n {\n return new $class();\n }\n else\n {\n return false;\n }\n }\n else{\n return false;\n }\n }", "public function _getModel(string $modelName) {\n\t\tif($this->models) {\n\t\t\t// if we already scanned the directory (which we should have done already), we can simply check if it's in there and return true\n\t\t\tif(isset($this->models[$modelName])) {\n\t\t\t\t// found as plural version\n\t\t\t\treturn $this->models[$modelName];\n\t\t\t}\n\t\t\t// now check for singular version.\n\t\t\t// I think we need to walk through all available models and get the singleName out of that.\n\t\t\tforeach ($this->models as $model) {\n\t\t\t\tif($model->modelName===$modelName) {\n\t\t\t\t\treturn $model;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$modelFile = Environment::$dirs->models . ucfirst($modelName) . \".php\";\n\t\t\n\t\tif (!file_exists($modelFile)) {\n\t\t\tErrorHandler::throwOne(Array(\"Api Error\", \"Requested recource '{$modelName}' not found/defined.\", 400, ErrorHandler::CRITICAL_EMAIL, false));\n\t\t\texit;\n\t\t} else {\n\t\t\tinclude_once($modelFile);\n\t\t\t$classNameNamespaced = \"\\\\Jeff\\\\Api\\\\Models\\\\\" . ucfirst($modelName);\n\t\t\t$model = new $classNameNamespaced($this->db, $this->account);\n\t\t\treturn $model;\n\t\t}\n\t\treturn null;\n\t}", "public function loadModel() {\n if ($this->_model === null) {\n if (isset($_GET['id']))\n $this->_model = Project::model()->findbyPk($_GET['id']);\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }", "function getModelObject(){\n\t\t\n\t\tif ( !isset($this->modObj) ){\n\t\t\t//$this->modObj = new Menu_PDO_Model();\n\t\t\t$this->modObj = new DoctrineMenu();\t\n\t\t}\n\t\t\n\t\treturn $this->modObj;\n\t}", "public static function getModel($name)\n {\n try {\n $model = null;\n // If the file exists, let's\n if (file_exists(JPATH_SITE . '/components/com_gm_ceiling/models/' . strtolower($name) . '.php')) {\n require_once JPATH_SITE . '/components/com_gm_ceiling/models/' . strtolower($name) . '.php';\n $model = JModelLegacy::getInstance($name, 'Gm_ceilingModel');\n }\n return $model;\n } catch (Exception $e) {\n Gm_ceilingHelpersGm_ceiling::add_error_in_log($e->getMessage(), __FILE__, __FUNCTION__, func_get_args());\n }\n }", "protected function _getModel() {\n\n\t\t$config = Configure::read('Leaflet.model');\n\n\t\tif (!is_array($config) && strpos($config, '.')) {\n\t\t\t$config = explode('.', $config);\n\t\t}\n\n\t\tif (is_array($config)) {\n\t\t\tlist($plugin, $model) = $config;\n\t\t} else {\n\t\t\t$model = $config;\n\t\t}\n\n\t\t$model = ClassRegistry::init((!empty($plugin) ? $plugin . '.' : '') . $model);\n\n\t\tif (!$model->hasMethod('_findPlots')) {\n\t\t\t$model->Behaviors->attach('Leaflet.Plottable');\n\t\t}\n\n\t\treturn $model;\n\t}", "public static function model($name, $id = null) {\n\t\t$model_name = ucfirst($name).'_Model';\n\n\t\t// Set the path to the model\n\t\t$model_path = 'application/models/'.strtolower($model_name).'.php';\n\n\t\t// Check if the model file exists\n\t\tif (file_exists($model_path)) {\n\n\t\t\t// Include the base model\n\t\t\tinclude_once 'core/base_model.php';\n\n\t\t\t// Include the file\n\t\t\trequire_once $model_path;\n\n\n\t\t\t// Check if the model class exists\n\t\t\tif (class_exists($model_name)) {\n\n\t\t\t\t// Create a new model instance\n\t\t\t\t$model = new $model_name();\n\n\t\t\t\t// Call the initialize function\n\t\t\t\t$model->initialize($id);\n\n\t\t\t\t// Return the model\n\t\t\t\treturn $model;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public function loadModel(string $path): Model {\n\t\tlist($module, $model) = explode('/', $path);\n\t\t$model = ucfirst($model).'Model';\n\t\trequire_once($_SERVER['DOCUMENT_ROOT'].\"/modules/$module/models/{$model}.php\");\n\t\t$model = '\\\\'.ucfirst($module).'\\\\'.$model;\n\t\treturn new $model;\n\t}", "public function loadModel($id)\n {\n $model=SALookupM::model()->findByPk($id);\n return $model;\n }", "public function model($model) {\n // Require model file\n require_once \"../app/models/{$model}.php\";\n\n // Instantiate model\n return new $model();\n }", "static public function getModel($model_name) {\n return new $model_name();\n }", "protected function _model() {\n\t\treturn $this->_container->model;\n\t}", "public function getModel($model = null);", "public function GetModel()\n {\n return $this->model;\n }", "protected function _getModel() {\n $model = Configure::read('Postmark.Inbound.model');\n return $model ? ClassRegistry::init($model) : false;\n }", "public function model($model){\n\n if(file_exists('../src/models/' . $model . '.php')){\n require_once '../src/models/' . $model . '.php';\n return new $model();\n } else {\n die('<strong>Fatal Error:</strong> Model <em>' . $model .'</em> does not exist');\n }\n }", "public function getModel($id = null)\n {\n $model = Yii::createObject($this->modelClass);\n if ($id) {\n return $model->findOne($id);\n } elseif ($id === null) {\n return $model->find()->where(['is_default' => 1])->one();\n } else {\n return $model;\n }\n }", "function loadModel($model = null) {\n\t\tif ($model && $this->$model == null) {\n\t\t\tApp::import('Model',\"Seo.$model\");\n\t\t\t$this->$model = ClassRegistry::init(\"Seo.$model\");\n\t\t}\n\t}", "protected function GetModel() {\n\t\treturn parent::GetModel();\n\t}", "abstract function getModel();", "abstract public function getModel();", "public function loadModel($id) {\n $model = ArticleModel::model()->findByPk($id);\n //if ($model === null)\n //throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "function loadModel ($name){\n $file = ROOT.DS.'models'.DS.$name.'.php';\n require_once($file);\n\n if(!isset($this->name)){\n $this->$name = new $name();\n }\n }", "public function loadModel($id)\n\t{\n\t\t$model=RequestFuel::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,Yii::t('rdt','The requested page does not exist.'));\n\t\treturn $model;\n\t}", "public function model() {\n require_once \"../app/models/model.php\";\n $this->model = new Model($this->db);\n }", "public function makeModel()\n {\n return $this->model;\n }", "public function getOne($model = null): ?Model\n {\n $this->loadModel($model);\n return $this->query()->first();\n }", "public function LoadModel($model = \"\"){\n\t\t$model = $model != \"\" ? $model : CONTROLLER_CALLED;\t\t// Si $model esta vacia significa que se esta llamando al modelo que se llama igual al controlador actual\n\t\t$nameModel = $model.\"Model\";\n\t\t$routeModelModule = MODULE_USED.\"models/\".$model.\".php\";\n\t\tif(is_file($routeModelModule)){\n\t\t\t// Vista del Modulo actual\n\t\t\t$routeModel = $routeModelModule;\n\t\t}else{\n\t\t\tif(strpos($model,\"/\") !== false){\t\t\t// Con slashes ignificaria que se esta llamando el modelo de otro modulo\n\t\t\t\t$modelInfo = explode(\"/\",$model);\n\t\t\t\t$module = $modelInfo[0];\n\t\t\t\t$model2 = $modelInfo[1];\n\t\t\t\t$nameModel = $model2.\"Model\";\n\t\t\t\t\n\t\t\t\t$routeModelApp = APP_PATH.\"modules/\".$module.\"/models/\".$model2.\".php\";\n\t\t\t\tif(is_file($routeModelApp)){\n\t\t\t\t\t$routeModel = $routeModelApp;\n\t\t\t\t}else{\n\t\t\t\t\tthrow new \\Exception(\"The model \".$model.\" is not found in the application\");\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthrow new \\Exception(\"The model \".$model.\" is not found in the module application\");\n\t\t\t}\n\t\t}\n\t\tinclude($routeModel);\n\t\t$objModel = new $nameModel;\n\t\treturn $objModel;\n\t}", "function getModel($model, $params = array()) {\n $model = \"app\\\\models\\\\\" . $model . \"Model\";\n return new $model($params);\n }", "protected function getUserModel()\n\t{\n\t\t$userModel = Config::get('maclof/revisionable::user_model', 'User');\n\n\t\tif(!class_exists($userModel))\n\t\t{\n\t\t\tthrow new ModelNotFoundException('The model ' . $userModel . ' was not found.');\n\t\t}\n\n\t\treturn new $userModel;\n\t}", "protected function getModel($key)\n {\n\n if (isset($this->models[$key]))\n return $this->models[$key];\n else\n return null;\n\n }", "public function _instanciar_model() {\n $Model = ClassRegistry::init('Autenticacao.' . $this->config['model_usuario']);\n return $Model;\n }", "protected function loadModel($model,$space = false){\n $modelName = $model.\"Model\";\n $modelRoute = (!$space)?\n ROOT.\"private\".DS.\"models\".DS.$modelName.\".php\"\n : ROOT.\"private\".DS.\"models\".DS.$space.DS.$modelName.\".php\";\n \n if(is_readable($modelRoute)){\n require_once $modelRoute;\n $model = new $modelName;\n return $model;\n }\n else {\n throw new Exception(\"{$modelRoute} > Error de modelo\");\n }\n }", "public function loadModel() {\n if ($this->_model === null) {\n if (isset($_GET['id']))\n $this->_model = Alocacao::model()->findbyPk($_GET['id']);\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }", "public final function getModel($model_name = null)\n {\n if (!isset($model_name))\n $model_name = $this->getName();\n\n return $this->app->getModel($model_name);\n }", "public function loadModel($id)\n\t{\n\t\t$this->_model=Promocion::model()->findByPk($id);\n\t\tif($this->_model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $this->_model;\n\t}", "private function _load_default_model(){\n\n\t\t$default_model_name = strtolower(get_class($this)) . '_model';\n\n\t\tif(file_exists(APPPATH . 'models/' . $default_model_name . '.php')){\n\n\t\t\t$this->load->model($default_model_name, strtolower(get_class($this)));\n\t\t\t$this->_default_model = strtolower(get_class($this));\n\t\t}\n\n\t}", "public function getModel(): Model\n {\n return $this->model;\n }", "public function getModel(): Model\n {\n return $this->model;\n }", "protected function instantiate()\n\t{\n\t\t$class = get_class($this);\n\t\t$model = new $class(null);\n\t\treturn $model;\n\t}", "public function model($model) {\r\n require_once \"../app/models/$model.php\";\r\n return new $model; //return class\r\n }", "public function getModel() : Model\n {\n return $this->model;\n }", "public function loadModel($id ) {\n\t\tif ($this->_model === NULL) {\n\t\t\tif($id) {\n\t\t\t\t$this->_model = User::model()->findbyPk($id);\n\t\t\t}\n\t\t\t\n\t\t\tif($this->_model === NULL) {\n\t\t\t\tthrow new CHttpException(404, 'The requested page does not exist.');\n\t\t\t}\n\t\t}\n\t\treturn $this->_model;\n\t}", "public function getModel();", "public function getModel();" ]
[ "0.81622297", "0.7858937", "0.7495792", "0.74897254", "0.73663926", "0.73318446", "0.73231834", "0.7296261", "0.72876805", "0.7237489", "0.72194386", "0.7130801", "0.71138895", "0.7099651", "0.7087238", "0.7081371", "0.7074529", "0.70627034", "0.705441", "0.70409226", "0.7027053", "0.70235384", "0.70162773", "0.7015433", "0.7009289", "0.7003933", "0.6991139", "0.6989482", "0.69874907", "0.69683605", "0.6966038", "0.6955517", "0.6947652", "0.6941307", "0.69316125", "0.69140095", "0.69075024", "0.68659496", "0.68512", "0.68259835", "0.68259835", "0.6817532", "0.68072665", "0.6798516", "0.67965674", "0.6795091", "0.6794474", "0.6794474", "0.6793132", "0.67912626", "0.6789734", "0.6789545", "0.6773939", "0.6773835", "0.6773139", "0.6759357", "0.6746828", "0.67467797", "0.6736917", "0.6734811", "0.67190164", "0.6714263", "0.6714249", "0.67049927", "0.6703171", "0.6695401", "0.66911536", "0.6690795", "0.6674803", "0.66730237", "0.66728497", "0.666426", "0.666332", "0.66572016", "0.665025", "0.6643965", "0.66383123", "0.6619565", "0.66069746", "0.66035795", "0.6602085", "0.65890914", "0.658754", "0.6585086", "0.6583075", "0.6571222", "0.6553779", "0.6544416", "0.6544204", "0.6541312", "0.65338415", "0.6514913", "0.64971995", "0.64869314", "0.64869314", "0.6486217", "0.6472808", "0.64632463", "0.6458968", "0.6458344", "0.6458344" ]
0.0
-1
For internal only. DO NOT USE IT.
public function deserialize($param) { if ($param === null) { return; } if (array_key_exists("BirthPlace",$param) and $param["BirthPlace"] !== null) { $this->BirthPlace = new BirthPlaceBlock(); $this->BirthPlace->deserialize($param["BirthPlace"]); } if (array_key_exists("LivePlace",$param) and $param["LivePlace"] !== null) { $this->LivePlace = new BirthPlaceBlock(); $this->LivePlace->deserialize($param["LivePlace"]); } if (array_key_exists("Job",$param) and $param["Job"] !== null) { $this->Job = new BirthPlaceBlock(); $this->Job->deserialize($param["Job"]); } if (array_key_exists("SmokeHistory",$param) and $param["SmokeHistory"] !== null) { $this->SmokeHistory = new SmokeHistoryBlock(); $this->SmokeHistory->deserialize($param["SmokeHistory"]); } if (array_key_exists("AlcoholicHistory",$param) and $param["AlcoholicHistory"] !== null) { $this->AlcoholicHistory = new SmokeHistoryBlock(); $this->AlcoholicHistory->deserialize($param["AlcoholicHistory"]); } if (array_key_exists("MenstrualHistory",$param) and $param["MenstrualHistory"] !== null) { $this->MenstrualHistory = new MenstrualHistoryBlock(); $this->MenstrualHistory->deserialize($param["MenstrualHistory"]); } if (array_key_exists("ObstericalHistory",$param) and $param["ObstericalHistory"] !== null) { $this->ObstericalHistory = new ObstetricalHistoryBlock(); $this->ObstericalHistory->deserialize($param["ObstericalHistory"]); } if (array_key_exists("FamilyHistory",$param) and $param["FamilyHistory"] !== null) { $this->FamilyHistory = new FamilyHistoryBlock(); $this->FamilyHistory->deserialize($param["FamilyHistory"]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "private function __() {\n }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "private function __construct()\t{}", "private function init()\n\t{\n\t\treturn;\n\t}", "final private function __construct() {}", "final private function __construct() {}", "final private function __construct(){\r\r\n\t}", "final private function __construct() {\n\t\t\t}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "private function _i() {\n }", "protected function fixSelf() {}", "protected function fixSelf() {}", "protected final function __construct() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function initialize() {}", "protected function init()\n\t{\n\t\t\n\t}", "private function __construct() {\r\n\t\r\n\t}", "private function __construct() {\r\n\t\t\r\n\t}", "protected function init() {return;}", "final private function __construct()\n\t{\n\t}", "private function __construct () {}", "final private function __construct()\n {\n }", "private final function __construct() {}", "public function __init(){}", "public function helper()\n\t{\n\t\n\t}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct()\n\t{\n\t\t\n\t}" ]
[ "0.62662613", "0.6151871", "0.5989886", "0.5989886", "0.5989886", "0.5989886", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5989418", "0.5988404", "0.5988404", "0.5949015", "0.5939596", "0.59168774", "0.59168774", "0.58703923", "0.58665824", "0.5855589", "0.5855589", "0.5855589", "0.5799749", "0.5797107", "0.5797107", "0.57807934", "0.5749856", "0.5749856", "0.5749856", "0.5749856", "0.57458705", "0.5741364", "0.571247", "0.5701768", "0.5694139", "0.5680823", "0.5673589", "0.5668696", "0.5640213", "0.5639332", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5627174", "0.5626381", "0.56240404", "0.56240404", "0.5610547" ]
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\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(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "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 }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.7891453", "0.7890965", "0.7862504", "0.78414804", "0.78414804", "0.7837965", "0.78248763", "0.7812292", "0.7809632", "0.77928597", "0.7788316", "0.7781619", "0.77815884", "0.7763308", "0.7754035", "0.7717961", "0.7717961", "0.77171147", "0.77138597", "0.7705001", "0.7693082", "0.7692783", "0.76915383", "0.76909506", "0.76733255", "0.7667128", "0.7665592", "0.7656238", "0.7650853", "0.764326", "0.76431626", "0.76431614", "0.7635147", "0.76311624", "0.76294273", "0.7627076", "0.76207024", "0.76207024", "0.76139116", "0.76036394", "0.76035625", "0.76035625", "0.76032084", "0.7602515", "0.76007926", "0.75971127", "0.7588128", "0.7586303", "0.7581912", "0.7563037", "0.7554785", "0.75526226", "0.755171", "0.75436753", "0.75432944", "0.7540682", "0.7538806", "0.75280696", "0.751548", "0.75149626", "0.7501161", "0.74959517", "0.74956346", "0.74911124", "0.7489147", "0.74858016", "0.748033", "0.7478443", "0.7472642", "0.7472576", "0.7465409", "0.7464371", "0.74630046", "0.7462218", "0.7461453", "0.7449168", "0.74399257", "0.74358094", "0.7433247", "0.7432659", "0.74248093" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'name' => 'required|min:3', 'surname' => 'required|min:3', 'patronymic' => 'required|min:3', 'dob' => 'required|date_format:d-m-Y', 'sex' => 'required|integer|min:1', 'country' => 'required|integer|min:1', 'city' => 'required|integer|min:1', 'institution' => 'required|integer|min:1', 'role' => 'required|integer|min:1', 'group' => 'required|min:3', 'email' => 'bail|required|min:3|email|unique:users', 'pass' => 'required|min:6', 'code' => 'required|min:3', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Traitement de la liste des arguments
public function parseArgs(array $args): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getArguments() ;", "abstract protected function get_args();", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "public function getArgs();", "public function getArgs();", "public function getArguments();", "public function getArguments();", "public function getArguments();", "public function getArguments();", "public function getArguments() {}", "public function getArguments() {}", "public function getArguments() {}", "public function getArguments() {}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "public function arguments(): array;", "abstract public static function args();", "protected function getArguments() {\n\t\treturn array(\n\t\t);\n\t}", "protected function getArguments()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getArguments()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\t\t];\n\t}", "abstract protected function arguments(): array;", "protected function getArguments()\n\t{\n\t\treturn [\n\n\t\t];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [\n\n\t\t];\n\t}", "protected function getArguments()\n {\n return [\n ];\n }", "protected function getArguments()\n {\n\n }", "protected function getArguments()\n {\n return array(\n );\n }", "protected function getArguments() {\n\t\treturn array();\n\t}", "protected function getArguments()\n {\n return [\n\n ];\n }", "protected function getArguments()\n {\n return [\n\n ];\n }", "function a(){ \n return $arg_list = func_get_args(); \n \n }", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "public function argList(){\n try {\n // Sparql11query.g:243:3: ( OPEN_BRACE ( WS )* CLOSE_BRACE | OPEN_BRACE expression ( COMMA expression )* CLOSE_BRACE ) \n $alt31=2;\n $LA31_0 = $this->input->LA(1);\n\n if ( ($LA31_0==$this->getToken('OPEN_BRACE')) ) {\n $LA31_1 = $this->input->LA(2);\n\n if ( ($LA31_1==$this->getToken('COALESCE')||$LA31_1==$this->getToken('IF')||($LA31_1>=$this->getToken('STR') && $LA31_1<=$this->getToken('FALSE'))||$LA31_1==$this->getToken('IRI_REF')||$LA31_1==$this->getToken('PNAME_NS')||$LA31_1==$this->getToken('PNAME_LN')||($LA31_1>=$this->getToken('VAR1') && $LA31_1<=$this->getToken('MINUS'))||$LA31_1==$this->getToken('INTEGER')||$LA31_1==$this->getToken('DECIMAL')||($LA31_1>=$this->getToken('DOUBLE') && $LA31_1<=$this->getToken('DOUBLE_NEGATIVE'))||($LA31_1>=$this->getToken('STRING_LITERAL1') && $LA31_1<=$this->getToken('STRING_LITERAL_LONG2'))||$LA31_1==$this->getToken('NOT_SIGN')||$LA31_1==$this->getToken('OPEN_BRACE')) ) {\n $alt31=2;\n }\n else if ( ($LA31_1==$this->getToken('WS')||$LA31_1==$this->getToken('CLOSE_BRACE')) ) {\n $alt31=1;\n }\n else {\n $nvae = new NoViableAltException(\"\", 31, 1, $this->input);\n\n throw $nvae;\n }\n }\n else {\n $nvae = new NoViableAltException(\"\", 31, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt31) {\n case 1 :\n // Sparql11query.g:244:3: OPEN_BRACE ( WS )* CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_argList830); \n // Sparql11query.g:244:14: ( WS )* \n //loop29:\n do {\n $alt29=2;\n $LA29_0 = $this->input->LA(1);\n\n if ( ($LA29_0==$this->getToken('WS')) ) {\n $alt29=1;\n }\n\n\n switch ($alt29) {\n \tcase 1 :\n \t // Sparql11query.g:244:14: WS \n \t {\n \t $this->match($this->input,$this->getToken('WS'),self::$FOLLOW_WS_in_argList832); \n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop29;\n }\n } while (true);\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_argList835); \n\n }\n break;\n case 2 :\n // Sparql11query.g:245:5: OPEN_BRACE expression ( COMMA expression )* CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_argList841); \n $this->pushFollow(self::$FOLLOW_expression_in_argList843);\n $this->expression();\n\n $this->state->_fsp--;\n\n // Sparql11query.g:245:27: ( COMMA expression )* \n //loop30:\n do {\n $alt30=2;\n $LA30_0 = $this->input->LA(1);\n\n if ( ($LA30_0==$this->getToken('COMMA')) ) {\n $alt30=1;\n }\n\n\n switch ($alt30) {\n \tcase 1 :\n \t // Sparql11query.g:245:28: COMMA expression \n \t {\n \t $this->match($this->input,$this->getToken('COMMA'),self::$FOLLOW_COMMA_in_argList846); \n \t $this->pushFollow(self::$FOLLOW_expression_in_argList848);\n \t $this->expression();\n\n \t $this->state->_fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop30;\n }\n } while (true);\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_argList852); \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 }", "abstract public function getArguments(): array;", "public function getArguments(): array;", "public function getArguments(): array;", "public function getArguments(): array;", "protected function getArguments() { return isset($this->_arguments) ? $this->_arguments : array();\n }", "protected function get_arguments(): array {\n\t\treturn [];\n\t}", "public function __construct()\n {\n $this->arguments = func_get_args();\n }", "public function getArgumentNames() {}", "public function args()\n {\n return $this->arguments->get();\n }", "protected function getArguments()\n {\n return array();\n }", "protected function getArguments()\n {\n return array();\n }", "protected function getArguments()\n {\n return array();\n }", "protected function getArguments()\n {\n return array();\n }", "protected function getArguments()\n {\n return array();\n }", "protected function getArguments()\n {\n return array();\n }", "private function getArg($arguments){\n $list=[];\n foreach($arguments as $key=>$value){\n if($key==\"pull\" || $key==\"push\"){\n $list['project']=$value;\n $list['migration']=$key;\n }\n else{\n $list[$key]=$value;\n }\n }\n\n return $list;\n\n }", "public function args()\n {\n return [];\n }", "public function getAdditionalArguments() {}", "public function getAdditionalArguments() {}", "function ola(){\n\n$argumentos = func_get_args();// recupera todos os argumentos da variavel que é um array \nreturn $argumentos;\n}", "protected\n function getArguments() {\n return array();\n }", "protected function getArguments()\n {\n return [];\n }", "protected function getArguments()\n {\n return [];\n }", "protected function getArguments()\n {\n return [];\n }", "protected function getArguments()\n {\n return [];\n }", "protected function getArguments()\n {\n return [];\n }", "protected function getArguments()\n {\n return [];\n }", "protected function getArguments()\n {\n return [];\n }", "protected function getArguments()\n {\n return [];\n }", "protected function getArguments()\n {\n return [];\n }", "protected function getArguments()\n {\n return [];\n }", "protected function getArguments()\n {\n return [];\n }", "protected function getArguments()\n {\n return [];\n }", "protected function getArguments()\n {\n return [];\n }", "public function getArguments()\n {\n return sprintf(\n \"--%s %s \\\"%s\\\" %s %s %s %s\",\n $this->name,\n $this->getBoxOptionToString(),\n $this->message,\n $this->height,\n $this->width,\n $this->height - 8,\n $this->getListString()\n );\n }", "public function args(){\n return $this->args;\n }", "function a() {\n\t\t$args = func_get_args();\n\t\treturn $args;\n\t}", "protected function getArguments() {\n return [];\n }", "protected function getArguments() {\n return [];\n }", "public function getArgs() : array\n {\n }", "public function prepareArguments() {}" ]
[ "0.74953103", "0.73835933", "0.7371641", "0.7371641", "0.7371641", "0.7371641", "0.7339812", "0.7339812", "0.73086166", "0.73086166", "0.73086166", "0.73086166", "0.7228776", "0.7228776", "0.7228776", "0.7228776", "0.72169733", "0.72169733", "0.72169733", "0.72169733", "0.72169733", "0.72169733", "0.72169733", "0.71979856", "0.71749526", "0.7119373", "0.7100303", "0.7100303", "0.7086596", "0.7086596", "0.7086596", "0.7086596", "0.7086596", "0.7086596", "0.7086596", "0.7086596", "0.7086596", "0.7086596", "0.7086596", "0.7086596", "0.7082825", "0.7013826", "0.7008689", "0.7008689", "0.69438446", "0.69137645", "0.68966687", "0.6886595", "0.68792135", "0.68792135", "0.6870639", "0.68514514", "0.68514514", "0.68514514", "0.68514514", "0.68514514", "0.68514514", "0.68514514", "0.68514514", "0.6845632", "0.68395716", "0.6839007", "0.6839007", "0.6839007", "0.68061155", "0.67867345", "0.67814165", "0.67707807", "0.6766942", "0.6746061", "0.6746061", "0.6746061", "0.6746061", "0.6746061", "0.6746061", "0.6732173", "0.6717527", "0.6684748", "0.66840094", "0.6672053", "0.6668116", "0.66372114", "0.66372114", "0.66372114", "0.66372114", "0.66372114", "0.66372114", "0.66372114", "0.66372114", "0.66372114", "0.66372114", "0.66372114", "0.66372114", "0.66372114", "0.6628125", "0.6627628", "0.6566578", "0.6563928", "0.6563928", "0.65582573", "0.6545867" ]
0.0
-1
Conversion de l'instance de la classe sous la forme d'un JSON.
public function toJson(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toObject(){\r\n return json_decode($this->toJson());\r\n }", "protected function asObject()\n\t{\n\t\treturn \\json_decode($this->response);\n\t}", "public function toObject();", "public static function instanceToJson() : string{\n\n if(!method_exists(self::class,'instance')):\n return json_encode([]);\n endif;\n\n return json_encode( self::instanceToArray() );\n }", "public function _jsonSerialize();", "public function jsonToObject(): ?ViaCepApi {\n if ($this->responseType == \"json\" && $this->response != \"[]\") {\n $this->responseType = \"object\";\n $this->response = (object) json_decode($this->response);\n }\n \n return $this; \n }", "public function json(){ return json_encode( $this->objectify() ); }", "function jsonSerialize()\n {\n return (object) get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return (object) get_object_vars($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize():mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize() : mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize() : mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\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 __toString(){\n return json_encode($this->json);\n }", "private function convertFromJson() {\n if ($this->value == null) {\n $this->data = null;\n return;\n }\n\n // array\n $data = trim($this->value);\n if ($data == '[]') {\n $this->data = [];\n return;\n }\n\n // null value (as string)\n if (mb_strtolower($data) == 'null') {\n $this->data = null;\n return;\n }\n\n // is object\n $json = json_decode($data);\n if ($json != null) {\n $this->data = $json;\n return;\n }\n\n // simple type: numberic or string\n $this->data = $data;\n $data = mb_strtolower($data);\n if ($data == 'false') $this->data = false;\n else if ($data == 'true') $this->data = true;\n else if (is_int($data)) $this->data = (int)$data;\n else if (is_float($data)) $this->data = (float)$data;\n else if (is_double($data)) $this->data = (double)$data;\n }", "abstract public function getJsObjectClass();", "public function jsonSerialize(): mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize(): mixed\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "final public function jsonSerialize() {}", "function __construct($obj){\n parent::__construct($obj);\n $this->parseJSON($obj);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "#[\\ReturnTypeWillChange]\n public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "function to_json(tSerializable $object){\r\n return json_encode($object->jsonData());\r\n}", "public function asObject(): stdClass\n {\n return json_decode($this->result);\n }", "public function toObject() \n {\n return $this->toJson();\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }", "public function jsonSerialize()\n {\n return ObjectSerializer::sanitizeForSerialization($this);\n }" ]
[ "0.74441385", "0.6721152", "0.65005624", "0.6424984", "0.6358623", "0.63547385", "0.6348821", "0.633618", "0.6281824", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.62111986", "0.61784786", "0.61668247", "0.61668247", "0.6164849", "0.6164849", "0.6164849", "0.6164849", "0.6164849", "0.6164849", "0.6164849", "0.6164849", "0.61493623", "0.61054903", "0.6096808", "0.6041729", "0.6041729", "0.60400075", "0.6010862", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6005766", "0.6001016", "0.59896946", "0.5988163", "0.59753484", "0.59753484" ]
0.0
-1
A basic test example.
public function testEndPoint() { $response = $this->json('POST', '/api/module_reminder_assigner', ['contact_email' => 'carlos.harvey@example.com']); $response->assertStatus(204); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testExample()\n {\n }", "public function test() {\n \t\n\t\tprint_r('hello stef');\n \t\n }", "public function testBasicExample()\n {\n $this->assertTrue(true);\n }", "public function testBasicExample()\n {\n $this->assertEquals(1, 1);\n }", "function test_sample() {\n\n\t\t$this->assertTrue( true );\n\n\t}", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('TROLOLOLO');\n }", "public function testBasicTest()\n {\n\n }", "public function testExample()\n {\n dump(\"testExample\");\n $this->assertTrue(true);\n }", "public function testExample()\n\t{\n\t\t$this->assertTrue(true);\n\t}", "public function testExample()\n {\n //this test is empty as we have not yet decided if we want to use dusk\n\n // $this->get('/')\n // ->click('About')\n // ->seePageIs('/about');\n }", "function testSample() {\n\t\t$this->assertTrue( true );\n\t}", "public function test() {\n\n\t}", "public static function test() {\r\n echo 'this is a test';\r\n }", "public function testExample()\n {\n $this->assertTrue(true);\n \n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n // lets make it risky to destroy the green\n }", "public function testBasicExample()\n\t{\n \t$response = $this->call('GET', '/');\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t}", "public function testExample()\n {\n $this->visit('ticket')\n ->see('Listado de Tickets')\n ->seeLink('Ver Ticket') \n ->visit('ticket/1')\n ->see('Quod et autem sed')\n ->seeLink('Ver todos los tickets')\n ->click('Ver todos los tickets')\n ->see('Listado de Tickets')\n ->seeLink('Agregar un ticket', 'ticket/crear');\n }", "function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Login to Airtel Sales Force System');\n });\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('API tester');\n }", "public function testExample()\n {\n $response = $this->get('/api/test/');\n\n $response->assertStatus(200);\n }", "public function testBasicExample()\n\t{\n\t\t$response = $this->call('GET', '/');\n\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t}", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('URL Notes');\n }", "public function testBasicTest()\n {\n $response = $this->get('/test');\n\n $response->assertStatus(200);\n\n $response->assertSeeText('小粽子');\n\n }", "function test_sampleme() {\n\t\t// Replace this with some actual testing code.\n\t\t$this->assertTrue( true );\n\t}", "public function testBasic()\n {\n $this->assertEquals(1, 1);\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/news/create')\n ->type('title', '123')\n ->type('text', 'test123')\n ->press('Добавить новость')\n\n ->assertSee('Мало букв в поле Заголовок');\n });\n }", "public function testBasicTest()\n {\n $response = $this->get('/dangthi');\n $response->assertStatus(200);\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('html');\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visitRoute('subscription', ['id' => '1'])\n ->radio('gender', 'L')\n ->type('fullName', 'GHF')\n ->type('birthdate', '04/24/1999')\n ->type('phone', '088177552')\n ->type('address', 'Bandung')\n ->press('Submit');\n });\n }", "public function testExample(): void\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->browse(function ($browser , $second) {\n $browser->visit('/')\n //->assertVueContains('name','sina','@editor');\n ->assertVue('name','sina','@editor');\n // ->pause(3000)\n // ->click('.test');\n // ->assertSee('Register')\n // ->value('#name' , 'sina')\n // ->value('#email' , Str::random(10).'@gmail.com')\n // ->value('#password' , '123456789')\n // ->value('#password-confirm' , '123456789')\n // ->click('button[type=\"submit\"]')\n // ->assertPathIs('/home')\n // ->refresh()\n // ->script('alert(\"ok\")');\n });\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->with('.special-text', function ($text) {\n $text->assertSee('title1');\n });\n\n // 確認商品數量\n $browser->click('.check_product')\n ->waitForDialog(5)\n ->assertDialogOpened('商品數量充足')\n ->acceptDialog();\n\n // 設定中斷點\n eval(\\Psy\\sh());\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(\"admin123@gilacoding.com\")\n ->visit(\"/home\");\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('React JS examples');\n });\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Laravel');\n });\n }", "public function testBasicExample()\n {\n $response = $this->call('GET', '/');\n\n $this->assertResponseOk();\n }", "public function test_example()\n {\n $this->assertTrue(true);\n }", "public function test_example()\n {\n $this->assertTrue(true);\n }", "public function test_example()\n {\n $this->assertTrue(true);\n }", "public function test_example()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->visit('/')\n ->see('WELCOME');\n }" ]
[ "0.7977854", "0.77753335", "0.76435244", "0.7610687", "0.754975", "0.75405073", "0.75393844", "0.74867696", "0.74400353", "0.7432722", "0.7412231", "0.73547494", "0.73383486", "0.7337478", "0.7308627", "0.7305436", "0.72681046", "0.7260569", "0.72460294", "0.7215908", "0.71952444", "0.7174572", "0.71719897", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7171955", "0.7167066", "0.715222", "0.7132968", "0.7123071", "0.7119535", "0.7109628", "0.70886546", "0.70870566", "0.70733815", "0.7068619", "0.7050562", "0.7045842", "0.7031207", "0.7030824", "0.7030337", "0.70302093", "0.70302093", "0.70302093", "0.70302093", "0.70291555" ]
0.0
-1
Initializes the cache plugin.
public function __construct($cache) { if (is_array($cache)) { $cache = self::createCacheStorage($cache); } if (!$cache instanceof CacheStorageInterface) { throw new InvalidArgumentException( "Cannot initialize the cache plugin.\n" . 'Expects an array or instance of CacheStorageInterface, and got ' . gettype($cache) ); } $this->storage = $cache; $this->stats = array( self::STATS_HITS => 0, self::STATS_MISSES => 0, ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initializeCache() {}", "protected function initializeCache() {}", "public function initCache() {\n $cacheclass = \"corelib_cache_mongoCache\";\n if (self::$_config['caching']['type']) {\n $cacheclass = \"corelib_cache_\" . self::$_config['caching']['type'] . \"Cache\";\n }\n $this->_cache = new $cacheclass(self::$_config['caching']);\n }", "public function init()\n {\n parent::init();\n $this->_cache = new \\Memcache;\n $this->_cache->connect();\n }", "protected function initCaches() {}", "protected function _initCache() {\n\t\t$options = $this->getOptions();\n\t\tswitch($options['cache']) {\n\t\t\tcase 'apc':\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\ApcCache();\n\t\t\tbreak;\n\n\t\t\tcase 'memcache':\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\MemcacheCache();\n\t\t\tbreak;\n\n\t\t\tcase 'xcache':\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\XcacheCache();\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\t\t}\n\n// \t\t$this->_config->setMetadataCacheImpl($cache);\n// \t\t$this->_config->setQueryCacheImpl($cache);\n\t}", "public function init()\n {\n parent::init();\n\t\trequire_once \"IronCache/IronCore.class.php\";\n\t\trequire_once \"IronCache/IronCache.class.php\";\n\n\t\t$this->_yiiron = new IronCache(array(\n\t 'token' => $this->token,\n\t 'project_id' => $this->project_id\n\t\t), $this->cacheName);\n\t\t\n }", "public function init() {\n\t\t$this->cacheDir = $this->chatBot->vars[\"cachefolder\"];\n\n\t\t//Making sure that the cache folder exists\n\t\tif (!dir($this->cacheDir)) {\n\t\t\tmkdir($this->cacheDir, 0777);\n\t\t}\n\t}", "public function init()\n\t{\n\t\t$this->_app = classes_like_registry::getApp();\n\t\t$this->_area = classes_like_registry::getArea();\n\t\t\n\t\tif ( empty( $this->_app ) OR empty( $this->_area ) )\n\t\t{\n\t\t\ttrigger_error( \"Missing area or app variable in \" . __CLASS__ . '::' . __FUNCTION__, E_USER_WARNING );\n\t\t}\n\t\t\n\t\t/* Fetch cache class */\n\t\t$this->likeCache = classes_like_cache::getInstance();\n\t\t\n\t\t/* Set a default cache expiration of 24 hours */\n\t\t$this->likeCache->setExpiration( 86400 );\n\t}", "public function __construct()\n {\n $this->initContrexxCaching();\n $this->initOPCaching();\n $this->initUserCaching();\n $this->getActivatedCacheEngines();\n }", "public function initializeCachingFramework() {}", "protected function init()\n {\n $this->memcache = new MemcacheDB();\n $driverConfig = $this->config->get('cache.memcache');\n $this->memcache->connect(\n $driverConfig['host'],\n $driverConfig['port']\n );\n }", "function __construct() {\n $this->_cache = [];\n }", "private function __construct()\n\t{\n\t\t$this->_loadCacheObj();\n\t\treturn;\n\t}", "function wp_cache_init()\n {\n }", "function init_cache_setup()\n\t{\n\t\t//--------------------------------\n\t\t// Eaccelerator...\n\t\t//--------------------------------\n\t\t\n\t\tif( function_exists('eaccelerator_get') AND isset($this->vars['use_eaccelerator']) AND $this->vars['use_eaccelerator'] == 1 )\n\t\t{\n\t\t\trequire KERNEL_PATH.'class_cache_eaccelerator.php';\n\t\t\t$this->cachelib = new cache_lib( $this->vars['board_url'] );\n\t\t}\n\t\t\n\t\t//--------------------------------\n\t\t// Turck-mmcache...\n\t\t//--------------------------------\n\t\t\n\t\tif( function_exists('mmcache_get') AND isset($this->vars['use_mmcache']) AND $this->vars['use_mmcache'] == 1 )\n\t\t{\n\t\t\trequire KERNEL_PATH.'class_cache_mmcache.php';\n\t\t\t$this->cachelib = new cache_lib( $this->vars['board_url'] );\n\t\t}\t\t\n\t\t\n\t\t//--------------------------------\n\t\t// Memcache\n\t\t//--------------------------------\t\n\t\t\t\n\t\telse if( function_exists('memcache_connect') AND isset($this->vars['use_memcache']) AND $this->vars['use_memcache'] == 1 )\n\t\t{\n\t\t\trequire KERNEL_PATH.'class_cache_memcache.php';\n\t\t\t$this->cachelib = new cache_lib( $this->vars['board_url'] );\n\t\t\t\n\t\t\t$this->cachelib->connect( $this->vars );\n\t\t}\n\t\t\n\t\t//--------------------------------\n\t\t// XCache...\n\t\t//--------------------------------\n\t\t\n\t\telse if( function_exists('xcache_get') AND isset($this->vars['use_xcache']) AND $this->vars['use_xcache'] == 1 )\n\t\t{\n\t\t\trequire KERNEL_PATH.'class_cache_xcache.php';\n\t\t\t$this->cachelib = new cache_lib( $this->vars['board_url'] );\n\t\t}\t\t\n\t\t\n\t\t//--------------------------------\n\t\t// APC...\n\t\t//--------------------------------\n\t\t\n\t\telse if( function_exists('apc_fetch') AND isset($this->vars['use_apc']) AND $this->vars['use_apc'] == 1 )\n\t\t{\n\t\t\trequire KERNEL_PATH.'class_cache_apc.php';\n\t\t\t$this->cachelib = new cache_lib( $this->vars['board_url'] );\n\t\t}\t\t\n\t\t\n\t\t//--------------------------------\n\t\t// Diskcache\n\t\t//--------------------------------\t\n\t\t\n\t\telse if( isset($this->vars['use_diskcache']) AND $this->vars['use_diskcache'] == 1 )\n\t\t{\n\t\t\trequire KERNEL_PATH.'class_cache_diskcache.php';\n\t\t\t$this->cachelib = new cache_lib( $this->vars['board_url'] );\n\t\t}\n\t\t\n\t\tif( is_object($this->cachelib) AND $this->cachelib->crashed )\n\t\t{\n\t\t\t// There was a problem - not installed maybe?\n\t\t\t\n\t\t\tunset($this->cachelib);\n\t\t\t$this->cachelib = NULL;\n\t\t}\n\t}", "protected function initialize() {\n $cacheFile = $this->getCacheFile();\n\n if ($cacheFile->isLocked()) {\n $cacheFile->waitForUnlock();\n }\n\n if (!$cacheFile->exists()) {\n $this->reset();\n return;\n }\n\n $serializedIndex = $cacheFile->read();\n $this->index = unserialize($serializedIndex);\n }", "private function init()\n {\n if (!$this->adapter instanceof CacheAdapterInterface) {\n $this->adapter = app($this->defaultAdapter);\n }\n }", "function object_cache_init() {\n\tif (!isset($GLOBALS['ts_object_cache']))\n\t\t$GLOBALS['ts_object_cache'] = service('ObjectCache');\n}", "private function initializeLevel2Cache() {}", "protected function init()\n {\n if (null !== $this->config) {\n return;\n }\n\n $cache = $this->getCache();\n $cacheKey = $this->getCacheKey();\n\n if ($cache->isValid($cacheKey, $this->getTimestamp())) {\n $config = $cache->read($cacheKey);\n } else {\n $config = $this->parse();\n $cache->write($cacheKey, $config, $this->getPaths());\n }\n\n $this->config = new Config($config);\n }", "function wp_cache_init()\n{\n global $wp_object_cache;\n\n if (! ($wp_object_cache instanceof WP_Object_Cache)) {\n $fail_gracefully = ! defined('WP_REDIS_GRACEFUL') || WP_REDIS_GRACEFUL;\n\n $wp_object_cache = new WP_Object_Cache($fail_gracefully);\n }\n}", "private static function cache_init()\n\t{\n\t\tif(function_exists('apc_fetch') && !isset(self::$class_loader_cache))\n\t\t{\n\t\t\tif(function_exists('apc_exists'))\n\t\t\t{\n\t\t\t\tif(apc_exists(self::get_CACHE_KEY()))\n\t\t\t\t\tself::$class_loader_cache = apc_fetch(self::get_CACHE_KEY());\n\t\t\t\telse\n\t\t\t\t\tself::$class_loader_cache = array();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tself::$class_loader_cache = apc_fetch(self::get_CACHE_KEY());\n\t\t\t\tif(self::$class_loader_cache === false)\n\t\t\t\t\tself::$class_loader_cache = array();\n\t\t\t}\n\t\t}\n\t\telse if(defined('STF_CACHE_PATH'))\n\t\t{\n\t\t\tself::$cache = STF_CACHE_PATH.DIRECTORY_SEPARATOR.self::CACHE_KEY.'_cache.phpserial';\n\t\t\tif(!isset(self::$class_loader_cache))\n\t\t\t{\n\t\t\t\tself::$class_loader_cache = array();\n\t\t\t\tif(!file_exists(self::$cache))\n\t\t\t\t{\n\t\t\t\t\tif(is_writable(STF_CACHE_PATH))\n\t\t\t\t\t\tif(touch(self::$cache))\n\t\t\t\t\t\t\tfile_put_contents(self::$cache, serialize(self::$class_loader_cache));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new ClassLoader_Exception('Can not create cache file.');\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new ClassLoader_Exception('Can not create cache file in cache directory.');\n\t\t\t\t}\n\t\t\t\telse if(!empty(self::$cache))\n\t\t\t\t{\n\t\t\t\t\t$cacheAge = filemtime(self::$cache);\n\t\t\t\t\t$cacheTimeOut = $cacheAge + (defined('STF_CACHE_TIME') ? STF_CACHE_TIME : self::CACHE_TIME);\n\t\t\t\t\t\n\t\t\t\t\tif($cacheTimeOut < time())\n\t\t\t\t\t\tfile_put_contents(self::$cache, self::CACHE_INIT);\n\n\t\t\t\t\tself::$class_loader_cache = unserialize(file_get_contents(self::$cache));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// throw new ClassLoader_Exception('STF_CACHE_PATH not defined.');\n\t\t}\n\t}", "public function __construct() {\n include Config::create()->load('cache');\n $this->config = $cache;\n $this->mc = new Memcached();\n foreach ($this->config['server'] as $s) {\n $this->mc->addServer($s['host'], $s['port']);\n }\n }", "protected function _initCache()\n {\n $this->bootstrap('Config');\n $appConfig = Zend_Registry::get('config');\n $cache = NULL;\n\n // only attempt to init the cache if turned on\n if ($appConfig->app->caching) {\n\n // get the cache settings\n $config = $appConfig->app->cache;\n\n if (NULL !== $this->_tmpFolder) {\n if ('File' == $config->backend->adapter && !isset($config->backend->options->cache_dir)) {\n $config->backend->options->cache_dir = $this->_tmpFolder . '/cache';\n if (!is_dir($config->backend->options->cache_dir)) {\n mkdir($config->backend->options->cache_dir);\n }\n }\n }\n\n try {\n $cache = Zend_Cache::factory(\n $config->frontend->adapter,\n $config->backend->adapter,\n $config->frontend->options->toArray(),\n $config->backend->options->toArray()\n );\n } catch (Zend_Cache_Exception $e) {\n // send email to alert caching failed\n Zend_Registry::get('log')->alert(\n 'Caching failed: adapter=' . $config->backend->adapter . ', message=' . $e->getMessage(\n ));\n }\n }\n Zend_Registry::set('cache', $cache);\n return $cache;\n }", "public static function initCache()\n {\n// $cache->delete('config');\n }", "public static function init()\n\t{\n\t\tstatic $run;\n\n\t\t// This function can only be run once\n\t\tif ($run === TRUE)\n\t\t\treturn;\n\t\t\n\t\t// Load configuration object\n\t\tTC::$config = new TC_Config();\n\t\t\n\t\t// Load cache\n\t\tTC::$cache = new TC_Cache(TC::$config->get('tc.config_driver'));\n\t}", "public function initialize() {\r\n\t\tparent::initialize();\r\n\t\t$this->settings = $this->pluginSettingsDemandService->getSettings();\r\n\t}", "function __construct(\\qio\\Directory\\Cache $cache) {\n $this->cache = $cache;\n }", "protected static function init_cache(){\n if(static::$_cache === false){ \n $tmp = [];\n static::$_cache =& $tmp;\n unset($tmp);\n }\n }", "public function setUpCache();", "public function __construct() {\r\n $this->cache = new MemCacheInterface(self::$CACHE_HOST, self::$CACHE_PORT, self::$CACHE_PREFIX, self::$CACHE_GROUP);\r\n }", "public function __construct(){\n parent::__construct();\n\t\t$this->load->library('Memcached_library');\n }", "protected function init()\n {\n $classParser = $this->getContainer()->get('classParser');\n $classParser->setAllowedMethods( array($this->allowedMethod) );\n $this->data = $classParser->getData($this->paths, $this->cacheFile);\n }", "private function setup_cache() {\n // Set up non-persistent object caching groups\n wp_cache_add_non_persistent_groups( [ '_np_pedestal' ] );\n }", "protected function _initCache() {\n\trequire_once 'Zend/Cache.php';\n\trequire_once 'Zend/Config/Ini.php';\n\n\t$this->bootstrap('ServerRegistry');\n\t$config = new Zend_Config_Ini(APPLICATION_CONFIG_PATH . '/cache.ini');\n\t$cache = Zend_Cache::factory($config->get('frontend'), $config->get('backend'), $config->get('frontendOption')->toArray(), $config->get('backendOption')->toArray(), TRUE, TRUE);\n\t$cache->cleanByRegistry();\n\tif (isset($_GET ['clear_cache']) && ('all' == $_GET ['clear_cache'])) {\n\t $cache->clean();\n\t}\n\n\treturn $cache;\n }", "public function init()\n {\n // TODO: initialize by config ordering\n foreach ($this->plugins as $name => $plugin) {\n $plugin->init();\n }\n }", "function wp_cache_init()\n{\n $autoloadFile = WP_CONTENT_DIR.'/mu-plugins/wp-stash/vendor/autoload.php';\n if (file_exists($autoloadFile)) {\n require_once $autoloadFile;\n }\n $GLOBALS['wp_object_cache'] = \\Inpsyde\\WpStash\\WpStash::instance()->objectCacheProxy();\n}", "private function setCache()\n\t{\n\t\t$this->_cache = new Cache('./', array('prefix' => 'pageReader'));\n\t}", "public function __construct()\n\t{\n\t\t$this->cache_ttl = intval(ee()->TMPL->fetch_param('ttl'));\n\t\t// For speed and API purposes, limit the cache to 30sec minimum\n\t\tif ($this->cache_ttl < 30)\n\t\t{\n\t\t\t$this->cache_ttl = 30;\n\t\t}\n\t}", "public function init()\n {\n $manager = $this->getCacheManager();\n Ezy_Cache_Manager::setInstance($manager);\n\n if(isset($_GET['CLEAR_CACHE']) && $_GET['allowme'] == 1){\n $cache = Ezy_Cache_Manager::getInstance()->getCache($_GET['CLEAR_CACHE']);\n $cache->clean(Zend_Cache::CLEANING_MODE_ALL);\n }\n \n return $manager;\n }", "public function init()\n {\n parent::init();\n if (!empty($this->gateway)) {\n $continer = new Container();\n $continer->set($this->gateway['class'], $this->gateway);\n $this->redis = $continer->get($this->gateway['class']);\n } else {\n $this->redis = Yii::$app->redis;\n }\n }", "protected function _initCache(array $cacheInitOptions = array())\n {\n //its to early to make use of normal rewrites as they are not yet loaded\n //so just set it our self\n $this->_config->setNode('global/models/core/rewrite/cache', 'Ecocode_Profiler_Model_Core_Cache');\n return parent::_initCache($cacheInitOptions);\n }", "public function _init() {}", "public function __construct()\n {\n parent::__construct();\n\n /** @var FileCache $oFileCache */\n $oFileCache = Factory::service('FileCache');\n $this->cacheDir = $oFileCache->getDir();\n }", "function __construct(Cache $cache) {\n// $client = RedisAdapter::createConnection('redis://localhost');\n// $this->cache = new RedisTagAwareAdapter($client);\n $this->cache = $cache->getCache();\n\n }", "private function init() {\r\n parent::init();\r\n $this->redisInit();\r\n}", "public static function setup()\n\t{\n\t\tif (false === self::$data_cache_provider)\n\t\t{\n\t\t\tself::$data_cache_provider = new aw_cache();\n\t\t}\n\t}", "public function __construct() {\n $memcached = new Memcached();\n $memcached->addServer('localhost', 11211);\n\n $this->engine = new MemcachedCache();\n $this->engine->setMemcached($memcached);\n }", "public function startCache() {}", "function cache_classes_Initialize()\n{\n if ( !core_cache_Has(CACHE_CLASSES_KEY) ) {\n core_cache_Set(CACHE_CLASSES_KEY, array(), CACHE_CLASSES_TTL);\n }\n}", "private static function prep() {\n\t\tif (!isset(F3::$global['CACHE'])) {\n\t\t\t// Extensions usable as cache back-ends\n\t\t\t$_exts=array_intersect(\n\t\t\t\texplode('|','apc|xcache'),get_loaded_extensions()\n\t\t\t);\n\t\t\tforeach (array_keys($_exts,'') as $_null)\n\t\t\t\tunset($_exts[$_null]);\n\t\t\t$_exts=array_merge($_exts,array());\n\t\t\tF3::$global['CACHE']=$_exts[0]?:\n\t\t\t\t('folder='.F3::$global['BASE'].'cache/');\n\t\t}\n\t\tif (preg_match(\n\t\t\t'/^(?:(folder)\\=(.+\\/)|(apc)|(memcache)=(.+))|(xcache)/i',\n\t\t\tF3::$global['CACHE'],$_match)) {\n\t\t\tif ($_match[1]) {\n\t\t\t\tif (!file_exists($_match[2])) {\n\t\t\t\t\tif (!is_writable(dirname($_match[2])) &&\n\t\t\t\t\t\tfunction_exists('posix_getpwuid')) {\n\t\t\t\t\t\t\t$_uid=posix_getpwuid(posix_geteuid());\n\t\t\t\t\t\t\tF3::$global['CONTEXT']=array(\n\t\t\t\t\t\t\t\t$_uid['name'],realpath(dirname($_match[2]))\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\ttrigger_error(F3::TEXT_Write);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// Create the framework's cache folder\n\t\t\t\t\tmkdir($_match[2],0755);\n\t\t\t\t}\n\t\t\t\t// File system\n\t\t\t\tself::$l1cache=array('type'=>'folder','id'=>$_match[2]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$_ext=strtolower($_match[3]?:($_match[4]?:$_match[6]));\n\t\t\t\tif (!extension_loaded($_ext)) {\n\t\t\t\t\tF3::$global['CONTEXT']=$_ext;\n\t\t\t\t\ttrigger_error(F3::TEXT_PHPExt);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ($_match[4]) {\n\t\t\t\t\t// Open persistent MemCache connection(s)\n\t\t\t\t\t// Multiple servers separated by semi-colon\n\t\t\t\t\t$_pool=explode(';',$_match[5]);\n\t\t\t\t\t$_mcache=NULL;\n\t\t\t\t\tforeach ($_pool as $_server) {\n\t\t\t\t\t\t// Hostname:port\n\t\t\t\t\t\tlist($_host,$_port)=explode(':',$_server);\n\t\t\t\t\t\tif (is_null($_port))\n\t\t\t\t\t\t\t// Use default port\n\t\t\t\t\t\t\t$_port=11211;\n\t\t\t\t\t\t// Connect to each server\n\t\t\t\t\t\tif (is_null($_mcache))\n\t\t\t\t\t\t\t$_mcache=memcache_pconnect($_host,$_port);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmemcache_add_server($_mcache,$_host,$_port);\n\t\t\t\t\t}\n\t\t\t\t\t// MemCache\n\t\t\t\t\tself::$l1cache=array('type'=>$_ext,'id'=>$_mcache);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t// APC and XCache\n\t\t\t\t\tself::$l1cache=array('type'=>$_ext);\n\t\t\t}\n\t\t\tself::$l1cache['current']=FALSE;\n\t\t\treturn TRUE;\n\t\t}\n\t\t// Unknown back-end\n\t\ttrigger_error(self::TEXT_Backend);\n\t\treturn FALSE;\n\t}", "public function cacheInit( \\FutoIn\\AsyncSteps $as );", "protected function initCache()\n {\n $this->di->set('viewCache', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $frontend = new FrontOutput(['lifetime' => $config->get('viewCache')->lifetime]);\n\n $config = $config->get('viewCache')->toArray();\n $backend = '\\Phalcon\\Cache\\Backend\\\\' . $config['backend'];\n unset($config['backend'], $config['lifetime']);\n\n return new $backend($frontend, $config);\n });\n\n $this->di->setShared('modelsCache', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $frontend = '\\Phalcon\\Cache\\Frontend\\\\' . $config->get('modelsCache')->frontend;\n $frontend = new $frontend(['lifetime' => $config->get('modelsCache')->lifetime]);\n\n $config = $config->get('modelsCache')->toArray();\n $backend = '\\Phalcon\\Cache\\Backend\\\\' . $config['backend'];\n unset($config['backend'], $config['lifetime'], $config['frontend']);\n\n return new $backend($frontend, $config);\n });\n\n $this->di->setShared('dataCache', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $frontend = '\\Phalcon\\Cache\\Frontend\\\\' . $config->get('dataCache')->frontend;\n $frontend = new $frontend(['lifetime' => $config->get('dataCache')->lifetime]);\n\n $config = $config->get('dataCache')->toArray();\n $backend = '\\Phalcon\\Cache\\Backend\\\\' . $config['backend'];\n unset($config['backend'], $config['lifetime'], $config['frontend']);\n\n return new $backend($frontend, $config);\n });\n }", "public function _init(){}", "static function init(){\n\t\tif( ! self::$backend instanceof self::$useBackend){\n\t\t\t$backend = new self::$useBackend();\n\t\t\tself::setBackend($backend);\n\t\t\tif(! $backend instanceof cacheBackend)\n\t\t\t\tthrow new RuntimeException(__class__.'::init() invalid cacheBackend');\n\t\t\tif( self::$autoClear )\n\t\t\t\tself::clear(self::$ttl);\n\t\t}\n\t}", "public static function initCacheItem(&$item) { }", "public function __construct(Cache $cache)\n {\n $this->cache = $cache;\n }", "public function __construct(Cache $cache)\n {\n $this->cache = $cache;\n }", "protected function initializeWorkspacesCachingFramework() {}", "public function init()\n {\n $this->loadMeta();\n }", "public function init()\n {\n parent::init();\n self::$plugin = $this;\n\n Event::on(DataTypes::class, DataTypes::EVENT_AFTER_FETCH_FEED, function(FeedDataEvent $event) {\n if ($event->response['success']) {\n $this->_processFeed($event);\n }\n });\n\n Event::on(DataTypes::class, DataTypes::EVENT_AFTER_PARSE_FEED, function(FeedDataEvent $event) {\n if ($event->response['success']) {\n $this->_enhanceFeed($event);\n }\n });\n }", "protected function _init()\n {\n }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {return;}", "protected function init() {\n }", "protected function init() {\n }", "public function initialize()\n\t{\n\t\t//Require Driver\n\t\t$this->requireServiceFile('CRedisDriver');\n\t\t$this->_drivers = array();\n\t}", "public function _init() {\r\n\r\n }", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "public function init() {}", "private function _init()\n {\n if (!$this->_isInitialized()) {\n $this->synchronize();\n }\n }" ]
[ "0.8182683", "0.81820893", "0.804299", "0.78593117", "0.78361547", "0.77119774", "0.754953", "0.7457983", "0.73937154", "0.7387409", "0.7298174", "0.72157913", "0.72142047", "0.7201764", "0.7195759", "0.7132335", "0.7064053", "0.70339", "0.69897896", "0.694475", "0.6939703", "0.6927076", "0.6898077", "0.6876279", "0.6860204", "0.6853302", "0.6847211", "0.68354094", "0.6834037", "0.6830465", "0.6799786", "0.6769612", "0.67269623", "0.6698049", "0.6678799", "0.6672605", "0.6663934", "0.66627526", "0.665457", "0.6581286", "0.6558784", "0.6554097", "0.6529359", "0.6514224", "0.64835054", "0.64821184", "0.64681375", "0.6452247", "0.6449517", "0.64348406", "0.6427801", "0.6417142", "0.6417027", "0.6416703", "0.64112014", "0.64046645", "0.63986105", "0.6387758", "0.6387758", "0.63712233", "0.6353951", "0.63533765", "0.6350309", "0.6336279", "0.6336279", "0.6336279", "0.6336279", "0.6336279", "0.6336279", "0.6336078", "0.6336078", "0.6335957", "0.6335957", "0.6335957", "0.6335957", "0.63317657", "0.632805", "0.632805", "0.6326376", "0.63170356", "0.63134223", "0.63134223", "0.63134223", "0.63134223", "0.63134223", "0.63134223", "0.63134223", "0.63134223", "0.63134223", "0.63134223", "0.63134223", "0.63134223", "0.63134223", "0.63134223", "0.63134223", "0.63131374", "0.63131374", "0.63131374", "0.63131374", "0.63131374", "0.6303126" ]
0.0
-1
Checks if results in cache will satisfy the source before parsing.
public function onReflectProgress(ProgressEvent $event): void { if ($response = $this->storage->fetch($event->getArguments())) { ++$this->stats[self::STATS_HITS]; $this->hashUserData = sha1(serialize($response)); $event['notModified'] = $response; } else { $this->hashUserData = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function check_cache() \r\n\t{\r\n\t\tif (!is_readable($this->cache_file))\r\n\t\t{\r\n\t\t\t$this->generate_cache();\r\n\t\t}\r\n\t\t$contents = file_get_contents($this->cache_file);\r\n\t\treturn $contents;\r\n\t}", "public function allow_cache() {\n\t\treturn $this->query_str == $this->query_escaped;\n\t}", "protected function extractDataFromCache()\n\t{\n\t\treturn false;\n\t}", "private function decide(): bool\n {\n if ($this->cloudflare && isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {\n $this->cache = false;\n $this->addMessage('request from cloudflare');\n }\n // don't cache if user is logged in\n if (strpos('test ' . implode(' ', array_keys($_COOKIE)), 'wordpress_logged_in')) {\n $this->cache = false;\n $this->loggedin = true;\n $this->addMessage('Loggedin user');\n }\n // don't cache post requests\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n $this->cache = false;\n $this->addMessage('Post request');\n }\n // don't cache requests to wordpress php files\n if (preg_match('%(/wp-admin|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)%',\n $this->path)) {\n $this->cache = false;\n $this->addMessage('This is a WordPress file ');\n }\n\n // don't cache if url has a query string\n // TODO verify that this is reasonable\n if (parse_url($this->url, PHP_URL_QUERY)) {\n $this->cache = false;\n $this->addMessage('Not caching query strings');\n }\n\n return $this->cache;\n }", "protected function _cached_exists()\n {\n return file_exists($this->cached_file);\n }", "protected function _loadCache()\n {\n return false;\n }", "private function check_cache() {\n if (!file_exists($this->cache_file)) {\n return false;\n }\n if (filemtime($this->cache_file) >= strtotime(\"-\" . CACHE_EXPIRATION . \" seconds\")) {\n return true;\n } else {\n return false;\n }\n }", "protected function checkSomePhpOpcodeCacheIsLoaded() {}", "private function getCache() {\n // cache for single run\n // so that getLastModified and getContent in single request do not add additional cache roundtrips (i.e memcache)\n if (isset($this->parsed)) {\n return $this->parsed;\n }\n\n // check from cache first\n $cache = null;\n $cacheId = $this->getCacheId();\n if ($this->cache->isValid($cacheId, 0)) {\n if ($cache = $this->cache->fetch($cacheId)) {\n $cache = unserialize($cache);\n }\n }\n\n $less = $this->getCompiler();\n $input = $cache ? $cache : $this->filepath;\n $cache = $less->cachedCompile($input);\n\n if (!is_array($input) || $cache['updated'] > $input['updated']) {\n $this->cache->store($cacheId, serialize($cache));\n }\n\n return $this->parsed = $cache;\n }", "public function cacheCheck(){\n \n if(file_exists($this->cacheName)){\n\t \n $cTime = intval(filemtime($this->cacheName));\n \n if( $cTime + $this->cacheTime > time() ) {\n\t \n echo file_get_contents( $this->cacheName );\n \n ob_end_flush();\n \n exit;}\t\t\t\t\t\n \n \t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n return false;\n \n}", "public function isCached() {}", "private function _checkCache()\r\n {\r\n // get a string representation of the object\r\n ob_start();\r\n var_dump(get_object_vars($this));\r\n $buffer = ob_get_clean();\r\n \r\n // build the hash for this object\r\n $hash = md5($buffer);\r\n \r\n // check if the cache file exists, if it does use it\r\n if (file_exists(\"{$this->_config['paths']['cache']}/{$hash}\")){\r\n die(file_get_contents(\"{$this->_config['paths']['cache']}/{$hash}\"));\r\n }\r\n }", "public static function hasCache() {\n\t\treturn false;\n\t}", "public function check_solr_cache() \r\n\t{\r\n\t\tif (!is_readable($this->solr_cache_file))\r\n\t\t{\r\n\t\t\t$this->generate_solr_cache();\r\n\t\t}\r\n\t\t$contents = file_get_contents($this->solr_cache_file);\r\n\t\treturn $contents;\r\n\t}", "function _can_cache() {\n\t\treturn true;\n\t}", "public function hasCache(): bool\n {\n return isset($this->contents);\n }", "private function isCached()\n\t{\n\t\t$q = 'SELECT UNIX_TIMESTAMP(lastResult) as lastUpdated FROM twitterSearch WHERE searchTerm = \"' .$this->_searchString .'\"';\n\t\t$r = mysql_query($q, CONN) or die('could not query the database for caching check');\n\t\t$arr = mysql_fetch_array($r);\n\t\t\n\t\t$now \t= time();\n\t\t$diff \t= $now - $arr[0];\n\t\t\n\t\tif ($this->_testMode) {\n\t\t\t\n\t\t\tprint \"is cached? results --------------------\";\n\t\t\tprint \"<pre>\";\n\t\t\t\tprint_r($arr);\n\t\t\tprint \"</pre><br />\";\n\t\t\t\n\t\t\tprint \"array count = \" .count($arr) .'<br />';\n\n\t\t\tprint \"is cached? q = \" .$q .\"<br>\";\n\t\t\tprint \"is cached? last modified = \" .$arr[0] .\"<br>\";\n\t\t\tprint \"is cached? now = \" .$now .\"<br>\";\n\t\t\tprint \"is cached? diff = \" .$diff .\"<br>\";\n\t\t}\n\t\t\n\t\tif (!isset($arr['lastUpdated'])) {\n\t\t\tdie('the search term has not been setup properly');\n\t\t}\n\t\t\n\t\tif($diff > $this->_cacheFileTime){\n\t\t\tif ($this->_testMode) {print \"is cached? returning false<br>\";}\n\t\t\treturn false;\n\t\t} else {\n\t\t\tif ($this->_testMode) {print \"is cached? returning true<br>\";}\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t\tif ($this->_testMode) {print \"is cached? returning true<br>\";}\n\t\treturn true;\n\t}", "private function get_posts_from_cache() : bool {\n\t\tif ($this->use_cache && file_exists($this->cache_path)) {\n\t\t\t$this->posts = json_decode(utf8_encode(file_get_contents($this->cache_path)));\n\n\t\t\tif (!$this->posts) {\n\t\t\t\tthrow new Exception('Error on loading posts from cache (no posts?).');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$this->posts = (array) $this->posts;\n\t\t\t$this->count_posts = count($this->posts);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function checkCache() {\n \tif (file_exists(dirname($this->cache_file)) || !is_writable(dirname($this->cache_file))) {\n \t\t$this->createCacheDirectory();\n \t}\n \tif (file_exists($this->cache_file)) {\n \t\t$this->mod_time = filemtime($this->cache_file) + $this->cache_time;\n \t\tif ($this->mod_time > time()) {\n \t\t\treturn true;\n \t\t} else {\n \t\t\treturn false;\n \t\t}\n \t} else {\n \t\treturn false;\n \t}\n \n }", "final protected function getCacheNeed()\n\t{\n\t\treturn\tintval($this->arParams['CACHE_TIME']) > 0 &&\n\t\t\t\t$this->arParams['CACHE_TYPE'] != 'N' &&\n\t\t\t\tConfig\\Option::get(\"main\", \"component_cache_on\", \"Y\") == \"Y\";\n\t}", "function MustUseCache()\n {\n if ($this->cacheLifetime == 0)\n {\n return false;\n }\n if (!File::Exists($this->file))\n {\n return false;\n }\n $now = Date::Now();\n $lastMod = File::GetLastModified($this->file);\n if ($now->TimeStamp() - $lastMod->TimeStamp() < $this->cacheLifetime)\n {\n return true;\n }\n return false;\n }", "function should_cache() {\n return array_key_exists('cache', $this->options) && $this->options['cache'] === TRUE;\n }", "private function check_cache()\n\t{\n\t\t$cache_file = Kohana::config($this->type.'.cache_folder').'/'.md5($this->file).EXT;\n\t\t$this->skip = FALSE;\n\t\t\n\t\tif (is_file($cache_file))\n\t\t{\n\t\t\t// touch file. helps determine if template was modified\n\t\t\ttouch($cache_file);\n\t\t\t// check if template has been mofilemtime($cache_file)dified and is newer than cache\n\t\t\t// allow $cache_time difference\n\t\t\tif ((filemtime($this->file)) > (filemtime($cache_file)+$this->cache_time))\n\t\t\t\t$this->skip = TRUE;\n\t\t}\n\t\t\n\t\treturn $cache_file;\n\t}", "public function isCachable() {\n\n // The error page should not be cached\n if($this->isErrorPage()) {\n return false;\n }\n\n $lang = ($this->site->defaultLanguage())? $this->site->defaultLanguage()->code : null;\n foreach($this->kirby->option('cache.ignore') as $pattern) {\n if(fnmatch($pattern, $this->uri($lang)) === true) {\n return false;\n }\n }\n\n return true;\n\n }", "public function canBeCached(): bool\n {\n foreach ($this->getValidators() as $validator) {\n if (!$validator->canBeCached()) {\n return false;\n }\n }\n\n return true;\n }", "public function isCached(): bool;", "function check_cache ( $url ) {\n $this->ERROR = \"\";\n $filename = $this->file_name( $url );\n \n if ( file_exists( $filename ) ) {\n // find how long ago the file was added to the cache\n // and whether that is longer then MAX_AGE\n $mtime = filemtime( $filename );\n $age = time() - $mtime;\n if ( $this->MAX_AGE > $age ) {\n // object exists and is current\n return 'HIT';\n }\n else {\n // object exists but is old\n return 'STALE';\n }\n }\n else {\n // object does not exist\n return 'MISS';\n }\n }", "function InPlaceCache_cacheHit(&$cacheOutput, &$parser)\r\n{\r\n\t/*\r\n\t\tMerge the stored ParserOutput with the current one to ensure things like template link dependencies get updated correctly\r\n\t*/\r\n\tInPlaceCache_mergeParserOutputTo($parser->mOutput, $cacheOutput);\r\n\t\r\n\treturn $cacheOutput->getText();\r\n}", "protected function useCache()\n {\n // Should we use a cached version?\n if ($this->cache && $this->cacheExists()) {\n $this->templateOutput = $this->getCache();\n if ($this->templateOutput !== false) {\n return true;\n }\n }\n return false;\n }", "public function _check_if_need_to_cache()\n {\n // Fast implementation of disabling output caching for the current page\n if (conf('no_output_cache')) {\n $this->NO_NEED_TO_CACHE = true;\n return false;\n }\n if (main()->NO_GRAPHICS && ! conf('output_cache_force')) {\n $this->NO_NEED_TO_CACHE = true;\n return false;\n }\n if ($_SESSION['user_group'] > 1 || $_COOKIE['member_id']) {\n $this->NO_NEED_TO_CACHE = true;\n return false;\n }\n // Special for the 'share on facebook' feature\n if (false !== strpos($_SERVER['HTTP_USER_AGENT'], 'facebookexternalhit')) {\n $this->NO_NEED_TO_CACHE = true;\n return false;\n }\n // Check 'white' list first\n $w = $this->WHITE_LIST_PATTERN;\n if ( ! empty($w)) {\n // Array like: 'search' => array(), 'static_pages' => array('show')\n if (is_array($w)) {\n if ( ! isset($w[$_GET['object']])) {\n $this->NO_NEED_TO_CACHE = true;\n return $this->NO_NEED_TO_CACHE;\n } elseif ( ! empty($w[$_GET['object']]) && ! in_array($_GET['action'], (array) $w[$_GET['object']])) {\n $this->NO_NEED_TO_CACHE = true;\n return $this->NO_NEED_TO_CACHE;\n }\n } else {\n if ( ! preg_match('/' . $w . '/i', $_SERVER['QUERY_STRING'])) {\n $this->NO_NEED_TO_CACHE = true;\n return $this->NO_NEED_TO_CACHE;\n }\n }\n return false;\n }\n // Try to search current query string in the stop list\n foreach ((array) $this->_OC_STOP_LIST as $pattern) {\n if (preg_match('/' . $pattern . '/i', $_SERVER['QUERY_STRING'])) {\n $this->NO_NEED_TO_CACHE = true;\n return $this->NO_NEED_TO_CACHE;\n }\n }\n return false; // Default return value\n }", "private function do_caching() {\n if ($this->is_logged_in) {\n return false;\n }\n //Dont cache the request if it's either POST or PUT\n else if (preg_match(\"/^(?:POST|PUT)$/i\", $_SERVER[\"REQUEST_METHOD\"])) {\n return false;\n }\n if (preg_match(\"#register#\", $_SERVER[\"REQUEST_URI\"])) {\n return false;\n }\n if (preg_match(\"#login#\", $_SERVER[\"REQUEST_URI\"])) {\n return false;\n }\n if (is_array($_COOKIE) && !empty($_COOKIE)) {\n foreach ($_COOKIE as $k => $v) {\n if (preg_match('#session#', $k) && strlen($v))\n return false;\n if (preg_match(\"#fbs_#\", $k) && strlen($v))\n return false;\n }\n }\n return true;\n }", "public function can_cache() {\n return $this->valid;\n }", "public function valid ()\n {\n return isset($this->offset) && isset($this->cache[ $this->offset ]);\n }", "public static function loadFromCache() {\n\t\tif (Server::isDebugModeEnabled()) {\n\t\t\t// in debug mode the server never uses caching\n\t\t\treturn false;\n\t\t}\n\n\t\t// If we are trying to load routing from cache, we must save cache after compilation for the next time\n\t\tself::$saveCache = true;\n\n\t\tif (self::isInitialized()) {\n\t\t\t// prevent calling this method a second time\n\t\t\treturn true;\n\t\t}\n\n\t\t$fileName = Server::getCacheDir() . DIRECTORY_SEPARATOR . self::CACHE_FILE_NAME;\n\n\t\tif (!is_file($fileName) || !is_readable($fileName)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (time() > (filemtime($fileName) + self::CACHE_LIFETIME)) {\n\t\t\t// cache file is expired, delete it and re-render routing table\n\t\t\tunlink($fileName);\n\n\t\t\treturn false;\n\t\t}\n\n\t\t$content = file_get_contents($fileName);\n\n\t\tif ($content) {\n\t\t\t$map = @unserialize($content);\n\n\t\t\tif (!empty($map) && is_array($map)) {\n\t\t\t\tself::$cachedMap = $map;\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// cache file contains wrong data\n\t\tunlink($fileName);\n\n\t\treturn false;\n\t}", "private function checkForCache($key)\n {\n if ($this->cache && !$this->ignoreCache && (false !== $data = $this->cache->fetch($key))) {\n return $data;\n }\n }", "public function wasCached();", "final public function isHit(): bool\n\t{\n\t\tif ($stm = $this->_prepare('SELECT COUNT(*) AS `found` FROM `Cache` WHERE `key` = :key LIMIT 1;')) {\n\t\t\t$stm->execute(['key' => $this->getkey()]);\n\t\t\t$result = $stm->fetchObject();\n\t\t\tvar_dump($result);\n\t\t\treturn $result->found === '1';\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "protected function analyzeCachingTables() {}", "function mysteam_check_cache()\n{\t\n\tglobal $mybb, $cache;\n\t\n\t// Don't touch the cache if disabled, just return the results from Steam's network.\n\tif (!$mybb->settings['mysteam_cache'])\n\t{\n\t\t$steam = mysteam_build_cache();\n\t\t\n\t\tif ($steam['users'])\n\t\t{\n\t\t\treturn $steam;\n\t\t}\n\t\treturn false;\n\t}\n\t\n\t$steam = $cache->read('mysteam');\n\t\n\t// Convert the cache lifespan setting into seconds.\n\t$cache_lifespan = 60 * (int) $mybb->settings['mysteam_cache'];\n\t\n\t// If the cache is still current enough, just return the cached info.\n\tif (TIME_NOW - (int) $steam['time'] < $cache_lifespan)\n\t{\t\n\t\treturn $steam;\n\t}\t\n\t\n\t// If last attempt to contact Steam failed, check if it has been over 3 minutes since then. If not, return false (i.e. do not attempt another contact).\n\tif (TIME_NOW - (int) $steam['lastattempt'] < 180)\n\t{\n\t\treturn false;\n\t}\n\t\t\n\t$steam_update = mysteam_build_cache();\n\t\n\t// If response generated, update the cache.\n\tif ($steam_update['users'])\n\t{\n\t\t$steam_update['version'] = $steam['version'];\n\t\t$cache->update('mysteam', $steam_update);\n\t\treturn $steam_update;\n\t}\n\t// If not, cache time of last attempt to contact Steam, so it can be checked later.\n\telse\n\t{\n\t\t$steam_update['lastattempt'] = TIME_NOW;\n\t\t$steam_update['version'] = $steam['version'];\n\t\t$cache->update('mysteam', $steam_update);\n\t\treturn false;\n\t}\n}", "protected function _cached_required()\n {\n $image_info = getimagesize($this->source_file);\n\n if (($this->url_params['w'] == $image_info[0]) AND ($this->url_params['h'] == $image_info[1]))\n {\n $this->serve_default = TRUE;\n return FALSE;\n }\n\n return TRUE;\n }", "public function isCached()\n\t{\n\t\treturn is_file($this->getCacheFile());\n\t}", "public function hasSource() : bool;", "private function loadCache()\r\n {\r\n if (file_exists(WEMO_CACHE)) {\r\n $fp = fopen(WEMO_CACHE, 'r');\r\n $json = fread($fp, filesize(WEMO_CACHE));\r\n fclose($fp);\r\n return json_decode($json);\r\n } else {\r\n return false;\r\n }\r\n }", "public function IsCacheDifferent(){\r\n\t\tself::Debug('Determine if the cache is different from this instance');\r\n\t\t// Load the cache\r\n\t\t$temp=new PhpWsdl(null,$this->EndPoint);\r\n\t\t$temp->GetWsdlFromCache();\r\n\t\tif(is_null($temp->WSDL))\r\n\t\t\treturn true;// Not cached yet\r\n\t\t// Initialize this instance\r\n\t\t$this->DetermineConfiguration();\r\n\t\t$this->ParseSource();\r\n\t\t// Compare the cache with this instance\r\n\t\t$res=serialize(\r\n\t\t\t\tArray(\r\n\t\t\t\t\t$this->Methods,\r\n\t\t\t\t\t$this->Types\r\n\t\t\t\t)\r\n\t\t\t)!=serialize(\r\n\t\t\t\tArray(\r\n\t\t\t\t\t$temp->Methods,\r\n\t\t\t\t\t$temp->Types\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\tself::Debug('Cache is '.(($res)?'equal':'different'));\r\n\t\treturn $res;\r\n\t}", "public function is_cachable()\n {\n $h = $this->server_reply_headers;\n\n if (isset($h['Content-Range']) && substr($h['Content-Range'],0,strlen(\"bytes 0-\"))!=\"bytes 0-\") {\n $this->log(1,__FUNCTION__,\"Uncachable: Content-Range header is present: [{$h['Content-Range']}].\");\n return FALSE;\n }\n\n if (!isset($h['Content-Type'])) {\n $this->log(1,__FUNCTION__,\"Uncachable: No Content-Type header.\");\n return FALSE;\n }\n else if (strncasecmp($h['Content-Type'], 'video/', 6)) {\n $this->log(1,__FUNCTION__,\"Uncachable: Content-Type is not video: [{$h['Content-Type']}].\");\n return FALSE;\n }\n\n if (!isset($h['Content-Length'])) {\n $this->log(1,__FUNCTION__,\"Uncachable: No Content-Length header.\");\n return FALSE;\n }\n\n if ($this->cache_request==\"\") {\n $this->log(2,__FUNCTION__,\"EMPTY request, original url [{$this->original_url}]\");\n return FALSE;\n }\n \n if (isset($this->parsed_url['begin']) && (int)$this->parsed_url['begin']>0) {\n //\n // The user is not downloading the whole video, but seeking within it.\n // TODO How to deal with this?\n // Maybe nginx's FLV module could help.\n //\n $this->log(1,__FUNCTION__,\"Uncachable: begin is set: [{$this->parsed_url['begin']}]\");\n return FALSE;\n }\n \n if ($this->parsed_url['sver'] != '3') {\n //\n // Stream Version?\n //\n // All requests seem to have this field set to the number 3.\n // If this ever changes, we should look at the new requests to make\n // sure that they are still compatible with this script.\n //\n $this->log(2,__FUNCTION__,\"Uncachable: sver is not 3: [{$this->parsed_url['sver']}]\");\n return FALSE;\n }\n \n return TRUE;\n }", "public function isCacheExists()\n {\n if(file_exists($this->cachedPath))\n return true;\n else\n return false;\n }", "protected function loadCacheData()\n\t{\n\t\t//is it enabled?\n\t\tif ($this->useObjectCaching)\n\t\t{\n\t\t\t//get our cache data... is it there?\n\t\t\t$data = $this->getCache();\n\t\t\tif ($data)\n\t\t\t{\n\t\t\t\t//load it, and we're good.\n\t\t\t\t$this->hydrate($data);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "protected function loadFromCache() {}", "public function isExpired(): bool\n {\n if (!FS::isFile($this->resultFile)) {\n return true;\n }\n\n $fileAge = \\time() - (int)\\filemtime($this->resultFile);\n $fileAge = \\abs($fileAge);\n\n if ($fileAge >= $this->cacheTtl) {\n return true;\n }\n\n $firstLine = \\trim((string)FS::firstLine($this->resultFile));\n $expected = \\trim($this->getHeader());\n\n return $expected !== $firstLine;\n }", "public function readCache() {\n\t\tif(file_exists($this -> sCacheDir . $this -> sCacheFile)) {\n\t\t\treturn file_get_contents($this -> sCacheDir . $this -> sCacheFile);\n\t\t}\n\t\treturn false;\n\t}", "function loadFromCache (CachingFileCompiler $cache, $sourceFile);", "private function get_cache() {\n exit(file_get_contents($this->cache_file));\n }", "function pmxc_checkCacheStatus()\n\t{\n\t\tglobal $pmxCacheFunc;\n\n\t\t$result = true;\n\t\tif($this->cfg['cache'] > 0 && !empty($this->cache_trigger))\n\t\t{\n\t\t\tif(($data = $pmxCacheFunc['get']($this->cache_key, $this->cache_mode)) !== null)\n\t\t\t{\n\t\t\t\t$res = eval($this->cache_trigger);\n\t\t\t\tif(!empty($res))\n\t\t\t\t\t$pmxCacheFunc['drop']($this->cache_key, $this->cache_mode);\n\n\t\t\t\tunset($data);\n\t\t\t\t$result = ($res === null);\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function isCacheUsed()\n\t{\n\t\treturn $this->__isMainTree() and $this->use_cache;\n\t}", "public function memCached() { return true; }", "private function checkCache(\\Request\\Module $request)\n\t{\n\t\tif ($this->cache === true && isset($this->expires)) {\n\t\t\t$registry = $this->cacheRegistry();\n\t\t\t$cached = $registry->get(\"response\", \"cache\", $request->params());\n\t\t\t\n\t\t\tif ($cached && !$cached->isExpired()) {\n\t\t\t\t$this->_send($cached->contents(), $request);\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t}", "public function isLoadedFromCache()\n {\n return $this->loadedFromCache;\n }", "private function isCached()\n {\n return Cache::has($this->cacheKey());\n }", "public function cacheUpToDate()\n\t{\n\t\t$expiredSites = $this->getExpiredCacheSites();\n\n\t\treturn empty($expiredSites);\n\t}", "public function get_css_cache_invalidated(): bool{\n\t\t\t// false = cache valid\n\n\t\t\tif($this->module_css_cache_invalidated !== NULL){\n\t\t\t\treturn $this->module_css_cache_invalidated; // status already retrieved\n\t\t\t}\n\n\t\t\tif(!isset(static::$list[$this->get_UID()]['cache'][ 'invalidated' ])){\n\t\t\t\t$this->module_css_cache_invalidated = true;\n\t\t\t\treturn true; // setting not saved yet\n\t\t\t}\n\n\t\t\tif(is_admin() && intval(static::$list[$this->get_UID()]['cache'][ 'invalidated' ]['gutenberg']->get_data()) === 1){\n\t\t\t\t$this->module_css_cache_invalidated = true;\n\t\t\t\treturn true; // cache is invalidated\n\t\t\t}\n\t\t\tif(!is_admin() && intval(static::$list[$this->get_UID()]['cache'][ 'invalidated' ]['frontend']->get_data()) === 1){\n\t\t\t\t$this->module_css_cache_invalidated = true;\n\t\t\t\treturn true; // cache is invalidated\n\t\t\t}\n\n\t\t\t$this->module_css_cache_invalidated = false;\n\t\t\treturn false; // cache is valid\n\t\t}", "public function hasSource(){\n return $this->_has(37);\n }", "protected static function need_compile($source, $destination)\n {\n clearstatcache();\n\n if( ! file_exists($source) )\n return FALSE;\n\n if ( ! file_exists($destination) )\n return TRUE;\n\n if ((filemtime($source) > filemtime($destination))\n || (fileatime($source) > fileatime($destination)))\n return TRUE;\n return FALSE;\n }", "public function hasLoadedCacheFile( $classname );", "function InPlaceCache_checkCache($hash)\r\n{\r\n\tglobal $gInPlaceCacheIP;\r\n\t\r\n\t$path[3] = $gInPlaceCacheIP . '/' . $hash[0];\r\n\t$path[2] = $path[3] . '/' . substr($hash,1,2);\r\n\t$path[1] = $path[2] . '/' . $hash;\r\n\t\r\n\t$path[0] = file_exists($path[1]);\r\n\r\n\treturn $path;\r\n}", "public function cacheExists()\n {\n $cacheFile = $this->getCacheFile();\n if (file_exists($cacheFile) && filemtime($cacheFile) > (time()-$this->cachePeriod)) {\n return(true);\n } else {\n return(false);\n }\n }", "private function _getCache($term) {\n\t\t// find our search term\n\t\t$result = $this->db->get_where('Cache', array('Term' => $term, 'Expires >' => date(\"Y-m-d H:i:s\")))->row_array();\n\t\t// did we get one that isn't expired?\n\t\tif ($result) { \n\t\t\t// cache hit\n\t\t\treturn $result['Data'];\n\t\t}\n\t\t// cache miss\n\t\treturn false;\n\t}", "function cache();", "protected function isCached(): bool\n {\n $cacheTime = self::CACHE_TIME * 60;\n\n if (!is_file($this->pathCache)) {\n return false;\n }\n\n $cachedTime = filemtime($this->pathCache);\n $cacheAge = $this->time - $cachedTime;\n\n return $cacheAge < $cacheTime;\n }", "function check_cache($cachefile, $cachetime)\n\t{\n\t\t$cachefile = $this->folder . $cachefile . '.html';\n\t\tif (file_exists($cachefile) && time() - $cachetime < filemtime($cachefile)) \n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function getCache() {\n\t\tif (file_exists($this->cache_file)) {\n\t\t\t$cache_contents = file_get_contents($this->cache_file);\n\t\t\treturn $cache_contents;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function checkCache()\n {\n $this->assertWritableDir($this->config->getPath('cache'));\n }", "public static function hasDefaultCache();", "public function validateCache($xml)\n {\n $tz = date_default_timezone_get();\n date_default_timezone_set('UTC');\n\n $xml = @new \\SimpleXMLElement($xml);\n $dt = (int) strtotime($xml->cachedUntil);\n $time = time();\n\n date_default_timezone_set($tz);\n\n return (bool) ($dt > $time);\n }", "function exists() {\n \n return !empty($this->cache);\n \n }", "protected function useCache() {\n\t\tif (isset($_COOKIE['nc']) && $_COOKIE['nc'] == 1) {\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (isset($_GET['nc']) && $_GET['nc'] == 1) {\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "private function isCacheFresh()\n {\n $documentDirs = $this->documentLocator->getAllDocumentDirs();\n\n foreach ($documentDirs as $dir) {\n $isFresh = $this->cache->fetch('[C]'.self::CACHE_KEY) >= filemtime($dir);\n if (!$isFresh) {\n return false;\n }\n }\n\n return true;\n }", "private function check_cache($hash)\n {\n $cache_file = Config::$cache_path.\"/\".$hash;\n \n if (file_exists($cache_file))\n {\n $handle = fopen($cache_file, 'r');\n $cache_time = fgets($handle);\n \n $cache_age = (time() - $cache_time) / 60;\n \n if ($cache_age > Config::$cache_time)\n {\n fclose($handle);\n unlink($cache_file);\n \n return false;\n }\n \n return true;\n }\n else return false;\n }", "function MustStoreToCache()\n {\n return $this->cacheLifetime > 0;\n }", "private function grabQueryFromCache( $query ) {\n\t\tif( ShelveIt::$cachePolicy == 'never' ) {\n\t\t\t// don't even bother checking if we're not caching\n\t\t\treturn false;\n\t\t}\n\t\t// check by seeing selecting results and storing them in results\n\t\t// (if it is then all are and this saves results time )\n\t\t\n\t\t$this->mysql = mysql_connect( ShelveIt::$db[ 'host' ],\n\t\t\t\t\t\t\t\t\t ShelveIt::$db[ 'user' ],\n\t\t\t\t\t\t\t\t\t ShelveIt::$db[ 'password' ] );\n\n\t\tif( !$this->mysql ) {\n\t\t\tdie( 'CRITICAL ERROR: Failed to connect to the database server.<br />' .\n 'Please contact the administrator and report this.<br />' .\n 'MySQL error: ' .\n mysql_error( $this->mysql ). '<br />' );\n\t\t}\n\t\t\n\t\tif( !mysql_select_db( ShelveIt::$db[ 'name' ], $this->mysql ) ) {\n\t\t\tdie( 'CRITICAL ERROR: Failed to select the Shelve It database.<br />' .\n 'Please contact the administrator and report this.<br />' .\n 'MySQL error: ' .\n mysql_error( $this->mysql ). '<br />' );\n\t\t}\n\t\t\n\t\t$query = 'SELECT title,year,author,lcc,lcn FROM ' .\n\t\t\tShelveIt::$query_cache[ 'table' ] .\n\t\t\t' WHERE query=\\'' .\n\t\t\tmysql_real_escape_string( $query, $this->mysql ) .\n\t\t\t'\\'';\n\t\t\n\t\tif( $_GET[ 'sort' ] ) {\n\t\t\t//append sort by option\n\t\t\t$query .= ' ORDER BY ' . $_GET[ 'sort' ];\n\t\t\tif( $_GET[ 'desc' ] ) {\n\t\t\t\t//append sort by option\n\t\t\t\t$query .= ' DESC';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->results = mysql_query( $query,\n\t\t\t\t\t\t\t\t\t $this->mysql );\n\t\t\n if( !$this->results ) {\n die( \"Cache check query: $query<br />\" .\n 'Invalid query: ' . mysql_error( $this->mysql ) );\n };\n \n\t\t//mysql_close( $this->mysql );\n\t\t\n\t\t\n\t\treturn mysql_num_rows( $this->results ) > 0;\n\t}", "function InPlaceCache_cacheMiss($cachePath, $content, &$parser)\r\n{\r\n\tglobal $gInPlaceCache_mergePostRender, $gInPlaceCacheEmitComments, $action;\r\n\r\n\t// create a copy of the parser to prevent side effects\r\n\t// to the main parser\r\n\t$local_parser = clone $parser;\r\n\t// create a new ParserOutput object\r\n\t// so that only the templates this section is dependent on\r\n\t// will be written to cache\r\n\t$local_parser->mOutput = new ParserOutput;\r\n\t// parse the content save the ParserOutput object\r\n\t$cacheOutput = $local_parser->parse($content, $parser->getTitle(), $parser->getOptions());\r\n\t// return the text output of the ParserOutput object\r\n\t$retv = $cacheOutput->mText;\r\n \r\n\t// Check if parsing caused caching to be disabled\r\n\tif($local_parser->mCacheTime == -1)\r\n\t{\r\n\t\t// disable caching since content is not cacheable\r\n\t\t$parser->disableCache();\r\n\t\tif($gInPlaceCacheEmitComments)\r\n\t\t\t$retv .= '<!-- InPlaceCache: parsing content caused caching to be disabled, cache not stored -->';\r\n\t}\r\n elseif($action == 'submit')\r\n {\r\n // Don't write cache for previews, also wierdly MW renders once for action=submit then again action=view after saving an article\r\n // this causes issues with <ti3>...</ti3> rendering as if it had <pre> infront of it\r\n $retv .= '<!-- InPlaceCache: action=submit cache write ignored -->';\r\n // If the cache exists:\r\n // remove the old cache file when action=submit since its bad\r\n // and cacheMiss isn't going to write to the cache\r\n if($cachePath[0])\r\n unlink($cachePath[1]);\r\n }\r\n\t// write the parser output cache to file since content is cacheable\r\n\telse \r\n InPlaceCache_writeCache($cachePath, $cacheOutput);\r\n\t\r\n\t// perform the equivalent of a cache hit\r\n\tInPlaceCache_mergeParserOutputTo($parser->mOutput, $cacheOutput);\r\n\t\r\n\treturn $retv; \r\n}", "public function from_cache(Memcached $cache): bool {\n\t\t$country_arr = $cache->get(self::MEMCACHED_KEY_PREFIX . $this->alpha3_code);\n\t\tif (is_array($country_arr) && $country_arr !== false)\n\t\t{\n\t\t\t$this->from_array($country_arr);\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "static function is_cache()\n\t{\n\t\tif (file_exists(Cache::$path))\n\t\t{\n\t\t\tif(Cache::$time>0)\n\t\t\t{\n\t\t\t\t$info_file=stat(Cache::$path);\n\t\t\t\tif(time() > $info_file[9]+Cache::$time)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tCache::delete();\n\t\t\t\t\tCache::$time=0;\n\t\t\t\t\treturn false;\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getCache(Array $vars)\n {\n return false;\n }", "protected function _loadCache($filename) {\n\n\t\t\tif (file_exists($filename)) {\n\t\t\t\t$file = file_get_contents($filename);\n\t\t\t\treturn json_decode($file, true);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function validateSource() {\n\t\treturn true;\n\t}", "protected function is_parsing_needed() {\n //most engines will need parsing\n return true;\n }", "public function fetch_data( $name ){\n $data = $this->fetch( $name, false );\n if( ! is_array($data) ){\n return null;\n }\n foreach( $data as $hash => $d ){\n extract($d);\n // validate and add source code cache\n $data[$hash]['js'] = $this->fetch( $hash, true );\n if( ! $data[$hash]['js'] ){\n // source code missing from cache\n return null;\n }\n // add self to checks below\n $deps[ $path ] = $mtime;\n // validate all dependencies and check source file is unmodified\n foreach( $deps as $path => $mtime ){\n if( ! file_exists($path) || filemtime($path) > $mtime ){\n // no longer valid\n return null;\n }\n }\n }\n // valid\n return $data;\n }", "function cacheObjectExists ()\n {\n return is_file($this->cacheObjectId);\n }", "protected function isMemcachedUsed() {}", "protected function isMemcachedUsed() {}", "public function isStaticCacheble() {}", "function markup_from_cache();", "public function checkAdvancedCache()\n {\n if (!$this->options['enable']) {\n return; // Nothing to do.\n } elseif (!empty($_REQUEST[GLOBAL_NS])) {\n return; // Skip on plugin actions.\n }\n $cache_dir = $this->cacheDir();\n $advanced_cache_file = WP_CONTENT_DIR.'/advanced-cache.php';\n $advanced_cache_check_file = $cache_dir.'/'.mb_strtolower(SHORT_NAME).'-advanced-cache';\n\n // Fixes zero-byte advanced-cache.php bug related to migrating from ZenCache\n // See: <https://github.com/websharks/zencache/issues/432>\n\n // Also fixes a missing `define( 'WP_CACHE', true )` bug related to migrating from ZenCache\n // See <https://github.com/websharks/zencache/issues/450>\n\n if (!is_file($advanced_cache_check_file) || !is_file($advanced_cache_file) || filesize($advanced_cache_file) === 0) {\n $this->addAdvancedCache();\n $this->addWpCacheToWpConfig();\n }\n }", "public function valid() {\n\t\treturn $this->can_fetch() && (false !== $this->fetch());\n\t}", "public function build() {\r\n\r\n $this->set_storage();\r\n\r\n $this->cache->key = 'ts3.' . sha1($this->ts3_host . $this->ts3_query . $this->ts3_sid . $this->ts3_port);\r\n\r\n $cache = $this->cache->get();\r\n\r\n if ($cache !== false && is_array($cache) && !empty($cache)) {\r\n $this->clist = $cache['clist'];\r\n $this->plist = $cache['plist'];\r\n $this->sinfo = $cache['sinfo'];\r\n return true;\r\n }\r\n\r\n if ($this->refresh() === false) {\r\n return false;\r\n }\r\n\r\n unset($cache);\r\n $cache['clist'] = $this->clist;\r\n $cache['plist'] = $this->plist;\r\n $cache['sinfo'] = $this->sinfo;\r\n\r\n\r\n return $this->cache->set($cache);\r\n }", "public function set_from_cache() {\n\t\t$this->from_cache = true;\n\t}", "public function hasCacheStore(): bool;", "public function configurationIsCached();", "public function IsCacheValid($file=null){\r\n\t\tself::Debug('Check cache valid');\r\n\t\tif(is_null($file))\r\n\t\t\t$file=$this->GetCacheFileName();\r\n\t\tif(!$this->CacheFileExists($file))\r\n\t\t\treturn false;\r\n\t\treturn self::$CacheTime<0||time()-file_get_contents($file.'.cache')<=self::$CacheTime;\r\n\t}", "function testContentLocallyCached() {\n\t\t$this->cache\n\t\t\t->expects( $this->once() ) // <-- the assert\n\t\t\t->method( 'get' )\n\t\t\t->will( $this->returnValue( $this->statusSchema ) );\n\t\t$this->schema->get();\n\t\t$this->schema->get();\n\t\t$this->schema->get();\n\t}", "private function _readCache($key)\n\t{\n\t\t$cache = FALSE;\n\t\t$cache_path = APPPATH.'cache/' . __CLASS__;\n\t\t$filepath = $cache_path .\"/\". $key . \".xml\";\n\n\t\tif ( ! file_exists($filepath))\n\t\t\treturn FALSE;\n\t\tif ( ! $fp = fopen($filepath, FOPEN_READ))\n\t\t\treturn FALSE;\n\n\t\tif( filemtime($filepath) + $this->cache_lifetime < time() )\n\t\t{\n\t\t\tunlink($filepath);\n\t\t\t// print(\"<!-- Cache file has expired. File deleted: \" . $filepath . \" -->\\n\");\n\t\t\tlog_message('debug', \"Cache file has expired. File deleted\");\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tflock($fp, LOCK_SH);\n\t\t$cache = fread($fp, filesize($filepath));\n\t\tflock($fp, LOCK_UN);\n\t\tfclose($fp);\n\n\t\t//print(\"<!-- Loaded file from cache: \" . $filepath . \" -->\\n\");\n\n\t\treturn $cache;\n\t}" ]
[ "0.6511327", "0.64452875", "0.63297546", "0.62183815", "0.6138322", "0.60989577", "0.60326976", "0.6005131", "0.60039437", "0.59921056", "0.59733415", "0.5952109", "0.5951425", "0.5935808", "0.59320825", "0.59297174", "0.5923823", "0.58976007", "0.5897422", "0.58910537", "0.58865494", "0.58816856", "0.5821865", "0.581504", "0.5811934", "0.5807837", "0.5773508", "0.57692266", "0.5767873", "0.5713088", "0.56845444", "0.56826687", "0.56545997", "0.5629892", "0.5628039", "0.5617336", "0.56137025", "0.5599071", "0.55744123", "0.5567124", "0.5561062", "0.5553575", "0.5545105", "0.5530951", "0.5513252", "0.5501646", "0.54897165", "0.5477924", "0.5466614", "0.54665744", "0.5457934", "0.5437453", "0.5423668", "0.542265", "0.54033065", "0.53996485", "0.5392161", "0.5377437", "0.5360705", "0.53605855", "0.53489214", "0.53416836", "0.5330797", "0.53269595", "0.53231204", "0.5321594", "0.53085345", "0.5307132", "0.53026605", "0.5281669", "0.5280093", "0.5277982", "0.52754915", "0.52645415", "0.52634543", "0.5246118", "0.5244486", "0.5218307", "0.52181035", "0.5210675", "0.5201267", "0.52012265", "0.51917", "0.5178218", "0.51701486", "0.5168656", "0.51596963", "0.5149781", "0.5139923", "0.5139923", "0.5135673", "0.5135604", "0.5133799", "0.5130789", "0.51303476", "0.5125898", "0.5123273", "0.5122033", "0.5117063", "0.5114634", "0.5111967" ]
0.0
-1
If possible, store results in cache after source parsing.
public function onReflectSuccess(SuccessEvent $event): void { if (sha1(serialize($event['ast'])) !== $this->hashUserData) { // cache need to be refresh ++$this->stats[self::STATS_MISSES]; $this->storage->cache($event->getArguments()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function process(): void {\n if($this->shouldCache() && $this->hasCache()) {\n $this->restoreCache();\n\n return;\n }\n\n $folders = [];\n foreach($this->sources_to_parse as $source_to_parse) {\n $folder = $source_to_parse->getFolderToParse();\n if(!isset($folders[$folder])) {\n $folders[$folder] = [\n 'extensions' => [],\n 'flags' => [],\n ];\n }\n $folders[$folder]['extensions'] = [...$folders[$folder]['extensions'], ...$source_to_parse->getExtensions()];\n $folders[$folder]['flags'] = [...$folders[$folder]['flags'], ...$source_to_parse->getFlags()];\n }\n\n foreach($folders as $folder => $folder_sources) {\n $folder_sources['extensions'] = array_values(array_unique($folder_sources['extensions']));\n $folder_sources['flags'] = array_values(array_unique($folder_sources['flags']));\n $code_data = $this->analyzer->parseFolder($folder, $folder_sources);\n $this->info_data[] = $code_data;\n $i = count($this->info_data) - 1;\n foreach($folder_sources['flags'] as $flag) {\n if(!isset($this->info_data_flag_refs[$flag])) {\n $this->info_data_flag_refs[$flag] = [];\n }\n $this->info_data_flag_refs[$flag][] = $i;\n }\n $this->flags = [...$this->flags, ...$folder_sources['flags']];\n }\n $this->flags = array_values(array_unique($this->flags));\n\n if($this->shouldCache()) {\n file_put_contents(\n $this->file_cache,\n \"<?php\\n\\nreturn \" .\n var_export([\n 'info_data' => $this->info_data,\n 'info_data_flag_refs' => $this->info_data_flag_refs,\n ], true) . ';',\n );\n }\n }", "private function getCache() {\n // cache for single run\n // so that getLastModified and getContent in single request do not add additional cache roundtrips (i.e memcache)\n if (isset($this->parsed)) {\n return $this->parsed;\n }\n\n // check from cache first\n $cache = null;\n $cacheId = $this->getCacheId();\n if ($this->cache->isValid($cacheId, 0)) {\n if ($cache = $this->cache->fetch($cacheId)) {\n $cache = unserialize($cache);\n }\n }\n\n $less = $this->getCompiler();\n $input = $cache ? $cache : $this->filepath;\n $cache = $less->cachedCompile($input);\n\n if (!is_array($input) || $cache['updated'] > $input['updated']) {\n $this->cache->store($cacheId, serialize($cache));\n }\n\n return $this->parsed = $cache;\n }", "abstract function cache_output();", "function InPlaceCache_mergeParserOutputTo(&$dest, &$src)\r\n{\r\n\tInPlaceCache_mergeTo($dest->mLanguageLinks, $src->mLanguageLinks);\r\n\tInPlaceCache_mergeTo($dest->mCategories, $src->mCategories);\r\n\t$dest->mContainsOldMagic = $dest->mContainsOldMagic || $src->mContainsOldMagic;\r\n\tInPlaceCache_mergeTo($dest->mLinks, $src->mLinks);\r\n\tInPlaceCache_mergeTo($dest->mTemplates, $src->mTemplates);\r\n\tInPlaceCache_mergeTo($dest->mImages, $src->mImages);\r\n\tInPlaceCache_mergeTo($dest->mExternalLinks, $src->mExternalLinks);\r\n\tInPlaceCache_mergeTo($dest->mHeadItems, $src->mHeadItems);\r\n\tInPlaceCache_mergeTo($dest->mTemplateIds, $src->mTemplateIds);\r\n\tInPlaceCache_mergeTo($dest->mOutputHooks, $src->mOutputHooks);\r\n\t$dest->mNoGallery = $dest->mNoGallery || $src->mNoGallery;\r\n}", "abstract protected function cacheData();", "function loadFromCache (CachingFileCompiler $cache, $sourceFile);", "function markup_from_cache();", "public static function reload()\n {\n clearstatcache();\n return self::parse();\n }", "private function cacheThis()\n\t{\n\t\t$q = 'UPDATE twitterSearch SET searchResults = \"' .addslashes($this->_results) .'\" WHERE searchTerm = \"' .$this->_searchString .'\"';\n\t\t$r = mysql_query($q, CONN) or die('could not update the results in the database for caching');\n\t}", "protected function _extractAndParse()\n {\n if (isset($this->_params['cache'])) {\n $result = $this->_params['cache']->get('horde_timezone',\n $this->_params['cachettl']);\n if ($result) {\n $this->_zones = $result['zones'];\n $this->_rules = $result['rules'];\n $this->_links = $result['links'];\n return;\n }\n }\n\n if (!$this->_tmpfile) {\n $this->_download();\n }\n $tar = new Archive_Tar($this->_tmpfile);\n foreach ($tar->listContent() as $file) {\n if ($file['typeflag'] != 0) {\n continue;\n }\n $this->_parse($tar->extractInString($file['filename']));\n }\n\n if (isset($this->_params['cache'])) {\n $this->_params['cache']->set('horde_timezone',\n array('zones' => $this->_zones,\n 'rules' => $this->_rules,\n 'links' => $this->_links),\n $this->_params['cachettl']);\n }\n }", "protected function saveParsedFilesInfoToCache($sourcePath)\n {\n $parsedFiles = $this->compiler->getParsedFiles();\n $parsedFiles[$sourcePath] = filemtime($sourcePath);\n\n $info = array(\n 'compiledFiles' => $parsedFiles,\n 'autoAddCurrentDirectoryAsImportPath'\n => $this->autoAddCurrentDirectoryAsImportPath,\n 'enableCompass' => $this->enableCompass,\n 'importPaths' => $this->compiler->getImportPaths(),\n 'compilerOutputFormatting' => $this->compilerOutputFormatting,\n );\n\n $this->cacheSet($this->getCacheCompiledPrefix() . $sourcePath, $info);\n }", "function cache();", "protected function loadFromCache() {}", "public function process()\n {\n $this->_processVoiceCache();\n $this->_processUserCache();\n\n return $this->_store();\n }", "private function get_results() {\n $cache = new SearchCache();\n\n if ($this->cache and $cache->can_cache()) {\n if (!($resultdocs = $cache->cache($this->term))) {\n $resultdocs = $this->process_results();\n //cache the results so we don't have to compute this on every page-load\n $cache->cache($this->term, $resultdocs);\n //print \"Using new results.\";\n } else {\n //There was something in the cache, so we're using that to save time\n //print \"Using cached results.\";\n } \n } else {\n //no caching :(\n //print \"Caching disabled!\";\n $resultdocs = $this->process_results();\n } \n return $resultdocs;\n }", "function InPlaceCache_cacheHit(&$cacheOutput, &$parser)\r\n{\r\n\t/*\r\n\t\tMerge the stored ParserOutput with the current one to ensure things like template link dependencies get updated correctly\r\n\t*/\r\n\tInPlaceCache_mergeParserOutputTo($parser->mOutput, $cacheOutput);\r\n\t\r\n\treturn $cacheOutput->getText();\r\n}", "protected function parse() {}", "function handle_parser_cache_use(&$event, $param) {\n // FIXME should move queue be able to get fixed using an admin plugin/cli interface?\n }", "public abstract function parse($resultFile);", "protected function getContentFromCacheFile() {}", "function process() {\n return $this->_parse();\n }", "private function get_cache() {\n exit(file_get_contents($this->cache_file));\n }", "protected function extractDataFromCache()\n\t{\n\t\treturn false;\n\t}", "private function readFromCache()\n\t{\n\t\t$q = 'SELECT searchResults FROM twitterSearch WHERE searchTerm = \"' .$this->_searchString .'\"';\n\t\t$r = mysql_query($q, CONN) or die('could not fetch the cached search results');\n\t\t$arr = mysql_fetch_array($r);\n\t\t$searchResults = $arr['searchResults'];\n\t\t\n\t\tif ($this->_testMode) { echo \"fetching the cached<br />\"; }\n\t\t\n\t\treturn $searchResults;\n\t\t//var_dump($fData);\n\t}", "function _parse() {\n $file = $this->_get_file();\n $search = array();\n $replace = array();\n $i = 0;\n foreach($this->_keys as $key => $value) {\n $search[$i] = $value;\n $replace[$i] = $this->_vals[$key];\n if(is_object($replace[$i])) {\n $replace[$i] = $replace[$i]->get_string();\n }\n ++$i;\n }\n return str_replace($search, $replace, $file);\n }", "public function parse()\n\t{\t\n\t if(isset($this->_cache))\n\t {\n\t $identifier = md5($this->_path);\n\t \n\t if (!$template = $this->_cache->get($identifier)) \n\t {\n\t $template = parent::parse();\n\t \n\t //Store the object in the cache\n\t\t \t $this->_cache->store($template, $identifier);\n\t }\n\t \n\t return $template;\n\t }\n\t \n\t return parent::parse();\n\t}", "private function generate_solr_cache()\r\n\t{\r\n\t\tfile_put_contents($this->solr_cache_file, $this->solr_stream);\r\n\t}", "public function load(): void\n {\n $list = $this->localCache->getObject($this->key);\n $value = $this->resultExtractor->extractObjectFromList($list, $this->targetType);\n $this->resultObject->setValue($this->property, $value);\n }", "protected function initSources(): self {\n if(preg_match_all(Templater::MARKERS['source'], $this->source, $matches)) {\n foreach($matches[0] as $marker) {\n if(!array_key_exists($marker, $this->sources)) { $this->sources[$marker] = null; }\n }\n }\n return $this;\n }", "protected function analyzeCachingTables() {}", "public function getCache();", "private function parseToCache($viewFile,$cacheFile) {\n\t\t$content = $this->parse(file_get_contents($viewFile));\t\t\n\t\tfile_put_contents($cacheFile,$content);\n\t}", "private function generate_cache() \r\n\t{\r\n\t\t$contents = $this->check_solr_cache();\r\n\t\t$result = json_decode($contents, TRUE);\r\n\t\t$result = $result['response']['objects'];\r\n\t\t$geonames = new Geonames(DBNAME, DBUSER, DBPASS, DBTABLE);\r\n\t\t\r\n\t\t$out = \"{\\n\\\"items\\\": [\";\r\n\t\tforeach($result as $record) \r\n\t\t{\r\n\t\t\t$el = new Element();\r\n\t\t\t\r\n\t\t\t$el->pid = $record[EVENT_PID];\r\n\t\t\t$el->source = \"$this->server_base/islandora/object/$el->pid/\";\r\n\t\t\t\r\n\t\t\t$record = $record[EVENT_OBJECT];\r\n\t\t\t\r\n\t\t\t$el->group = $this->collection_name;\r\n\t\t\t$el->event_type = $this->get_event_type(); // Abstract function\r\n\t\t\t\r\n\t\t\t$el->date_type = \"Unknown\";\r\n\t\t\tif (isset($record[START_DATE][0]))\r\n\t\t\t{\r\n\t\t\t\t$el->start_date = Transformer::date_parse($record[START_DATE][0]);\r\n\t\t\t\t$el->date_type = Transformer::get_date_grain($el->start_date, $el->start_date);\r\n\t\t\t}\r\n\r\n\t\t\t$locgrain = \"Unknown\";\r\n\t\t\t$pointtype = \"Unknown\";\r\n\t\t\tif (isset($record[LOCATION_NAME][0]))\r\n\t\t\t{\r\n\t\t\t\t$point = $record[LOCATION_NAME][0];\r\n\t\t\t\t$location = $point;\r\n\r\n\t\t\t\t$geoxml = $geonames->get_results($point, 1, '', ''); \r\n\t\t\t\t\r\n\t\t\t\tif ($geoxml != NULL)\r\n\t\t\t\t{\r\n\t\t\t\t\t$geoxml = (object) $geoxml[0];\r\n\t\r\n\t\t\t\t\t$ctry = $geonames->get_country_name($geoxml->country_code);\r\n\t\t\t\t\tif ($ctry != \"\") \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$location .= \", $ctry\";\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t$el->location = $location;\r\n\t\t\t\t\t$el->asciiname = $geoxml->asciiname;\r\n\t\t\t\t\t$lat = $geoxml->latitude;\r\n\t\t\t\t\t$lon = $geoxml->longitude;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($lon != \"\" && $lat != \"\") \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$el->lat_lng = \"$lat,$lon\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$pointtype = \"Point\";\r\n\t\t\t\t\t$locgrain = $geonames->get_location_grain($geoxml->feature_class, $geoxml->feature_code);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$el->location_type = $locgrain;\r\n\t\t\t$el->point_type = $pointtype;\r\n\r\n\t\t\t$el->long_label = str_replace('\"', \"'\", $record[LONG_TITLE][0]);\r\n\t\t\t$el->label = Transformer::neat_trim($el->long_label, 35);\r\n\t\t\t$el->label = Transformer::format_label($el->label, $el->start_date, $el->end_date, $el->location);\r\n\t\t\t$el->description = str_replace('\"', \"\", $record[DESCRIPTION][0]);\r\n\t\t\t\r\n\t\t\t$out .= Transformer::output_element($el);\r\n\t\t}\r\n\t\t$out .= \"\\n]\\n}\";\r\n\t\t$this->write_cache($out);\r\n\t}", "abstract protected function setresults();", "private function getResult(): void\n {\n $matches = $this->getNeedlesResult();\n foreach ($matches as $n_key => $match) {\n if (isset($match['matching_filters'])) {\n $match_count = count($match['matching_filters']);\n if ($match_count === 1) { // Save Matches\n $match = $this->getReturnValues($match);\n $match = $this->getLayerData($match);\n unset($match['matching_filters']);\n $this->SearchResult->matches[$n_key] = $match;\n continue;\n } elseif ($match_count > 1) { // Save Indecisive\n $result = [];\n $matching_filters = $match['matching_filters'];\n unset($match['matching_filters']);\n foreach ($matching_filters as $filter) {\n $result[] = $this->getReturnValues($match, $filter['filter_id']);\n }\n $match[$this->config->prefix . 'matching_filters'] = $result;\n $this->SearchResult->indecisive_matches[$n_key] = $match;\n continue;\n }\n }\n // Save no matches\n $this->SearchResult->no_matches[$n_key] = $match;\n }\n }", "protected function update_cache(){\r\n\t\t$html = file_get_contents($this->_cfg->get('sfbaseurl'));\r\n\t\tif($html === false || !trim($html))\r\n\t\t\tthrow new Exception('Could not read SourceForge website');\r\n\t\t$mtch = null;\r\n\t\tif(!preg_match('/lazarus-(\\\\d+.\\\\d+.\\\\d+)-fpc-(\\\\d+.\\\\d+.\\\\d+)-/', $html, $mtch))\r\n\t\t\tthrow new Exception('Could not parse version from SourceForge');\r\n\t\t$data = array(\r\n\t\t\t'laz' => $mtch[1],\r\n\t\t\t'fpc' => $mtch[2],\r\n\t\t);\r\n\t\t$data = '<'.'?php return '.var_export($data, true).'; ?>';\r\n\t\tfile_put_contents($this->get_cache(), $data);\r\n\t}", "public function PreparerMiseEnCache()\n\t\t{\n\t\t\tob_start();\n\t\t}", "function GetFromCache()\n {\n return File::GetContents($this->file);\n }", "public function cache() {\n $this->select(null,null,'slug asc');\n\t\tforeach ($this->cursor as $rec) {\n\t\t\t$this->cache[$rec->slug] = $rec->value;\n\t\t}\n\t}", "function parse($text)\n {\n // set the object property for the source text\n $this->source = $text;\n \n // reset the tokens.\n $this->tokens = array();\n \n // apply the parse() method of each requested rule to the source\n // text.\n foreach ($this->rules as $name) {\n // do not parse the rules listed in $disable\n if (! in_array($name, $this->disable)) {\n \n // load the parsing object\n $this->loadParseObj($name);\n \n // load may have failed; only parse if\n // an object is in the array now\n if (is_object($this->parseObj[$name])) {\n $this->parseObj[$name]->parse();\n }\n }\n }\n }", "public function parse();", "public function parse();", "public function parse();", "public function parse( $contents );", "protected function _merge_cache()\n\t{\n\t\tif (count($this->qb_cache_exists) === 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\telseif (in_array('select', $this->qb_cache_exists, TRUE))\n\t\t{\n\t\t\t$qb_no_escape = $this->qb_cache_no_escape;\n\t\t}\n\n\t\tforeach (array_unique($this->qb_cache_exists) as $val) // select, from, etc.\n\t\t{\n\t\t\t$qb_variable\t= 'qb_'.$val;\n\t\t\t$qb_cache_var\t= 'qb_cache_'.$val;\n\t\t\t$qb_new \t= $this->$qb_cache_var;\n\n\t\t\tfor ($i = 0, $c = count($this->$qb_variable); $i < $c; $i++)\n\t\t\t{\n\t\t\t\tif ( ! in_array($this->{$qb_variable}[$i], $qb_new, TRUE))\n\t\t\t\t{\n\t\t\t\t\t$qb_new[] = $this->{$qb_variable}[$i];\n\t\t\t\t\tif ($val === 'select')\n\t\t\t\t\t{\n\t\t\t\t\t\t$qb_no_escape[] = $this->qb_no_escape[$i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->$qb_variable = $qb_new;\n\t\t\tif ($val === 'select')\n\t\t\t{\n\t\t\t\t$this->qb_no_escape = $qb_no_escape;\n\t\t\t}\n\t\t}\n\n\t\t// If we are \"protecting identifiers\" we need to examine the \"from\"\n\t\t// portion of the query to determine if there are any aliases\n\t\tif ($this->_protect_identifiers === TRUE && count($this->qb_cache_from) > 0)\n\t\t{\n\t\t\t$this->_track_aliases($this->qb_from);\n\t\t}\n\t}", "public function getLiveResult() {\n $url = $this->_buildUrl();\n $default_timeout = ini_get('default_socket_timeout');\n ini_set('default_socket_timeout', OPENDIGI_API_TIMEOUT);\n $result = @file_get_contents($url);\n ini_set('default_socket_timeout', $default_timeout);\n if ($result && $result != '[]' && @json_decode($result) != false) {\n if (!is_dir(DIR_PUBLIC_CACHE_SEARCHES))\n mkdir(DIR_PUBLIC_CACHE_SEARCHES, 0777, true);\n file_put_contents($this->_getCachePath(), $result);\n return $result;\n }\n }", "private function readCache(): void{\n //stdClass é uma classe predefinido ou dinamica\n $this->cache = new stdClass();\n if(file_exists('cache.cache')){\n $this->cache = json_decode(file_get_contents('cache.cache'));\n }\n }", "public function parse()\n {\n $time = time();\n $gmdate = gmdate('D, d M Y H:i:s', $time);\n\n Container::get('response')\n ->setHeader('MDE-Version', \\MarkdownExtended\\MarkdownExtended::VERSION)\n ->setHeader('Last-Modified', $gmdate.' GMT')\n ;\n\n $etag = '';\n $sources = $this->getSources();\n $options = Container::get('request')->getData('options', array());\n $format = Container::get('request')->getData('format');\n $extract = Container::get('request')->getData('extract', 'full');\n if (!empty($format)) {\n $options['output_format'] = $format;\n }\n if (!empty($sources)) {\n try {\n foreach ($sources as $index=>$source) {\n\n /* @var \\MarkdownExtended\\Content $mde_content */\n $mde_content = Helper::parseMdeSource($source, $options);\n //var_export($mde_content);\n\n switch ($extract) {\n case 'metadata':\n $parsed_content = $mde_content->getMetadataFormatted();\n break;\n case 'body':\n $parsed_content = $mde_content->getBody();\n break;\n case 'notes':\n $parsed_content = $mde_content->getNotesFormatted();\n break;\n case 'full':\n default:\n $parsed_content =\n $mde_content->getMetadataFormatted()\n .PHP_EOL\n .$mde_content->getBody()\n .PHP_EOL\n .$mde_content->getNotesFormatted()\n ;\n break;\n }\n $etag .= $source.'='.$parsed_content.';';\n\n $content_index = $this->addContent($parsed_content);\n if ($this->getSourceType() == 'file' && is_string($index)) {\n $source = $index;\n }\n if ($content_index !== $index) {\n $this\n ->unsetSource($index)\n ->setSource($content_index, $source)\n ;\n }\n }\n } catch (\\Exception $e) {\n throw $e;\n }\n $etag = md5($etag);\n Container::get('response')->setHeader('ETag', $etag);\n\n }\n\n // if not modified, fetch headers and exit\n $if_modified_since = Container::get('request')->getHeader('If-Modified-Since');\n $if_none_match = Container::get('request')->getHeader('If-None-Match');\n if (\n (!empty($if_modified_since) && @strtotime($if_modified_since) >= $time) ||\n (!empty($if_none_match) && !empty($etag) && trim($if_none_match) == $etag)\n ) {\n Container::get('response')\n ->setStatus(Response::STATUS_NOT_MODIFIED)\n ->fetchHeaders()\n ;\n exit(PHP_EOL);\n }\n\n return $this;\n }", "public function check_solr_cache() \r\n\t{\r\n\t\tif (!is_readable($this->solr_cache_file))\r\n\t\t{\r\n\t\t\t$this->generate_solr_cache();\r\n\t\t}\r\n\t\t$contents = file_get_contents($this->solr_cache_file);\r\n\t\treturn $contents;\r\n\t}", "public function readCache()\n {\n return $this->readFile()->unpackData();\n }", "protected function _loadCacheFile()\n\t{\n\t\tif ( $this->obj['query_cache_file'] )\n \t{\n \t\trequire_once( $this->obj['query_cache_file'] );/*noLibHook*/\n \t\n\t\t\t$sql_queries_name = $this->sql_queries_name ? $this->sql_queries_name : 'sql_queries';\n\n \t\t$this->sql = new $sql_queries_name( $this );\n \t}\n\t}", "public function testExpressionResultsCacheing()\n {\n\n $ast = (new Builder('ap ap ap ap s i i ap cons 42 t'))->build();\n $symbols = new SymbolStorage();\n $links = new LinkStorage();\n $context = new Context($symbols, $links);\n\n $main = new NodeExpression($context, $ast);\n $result = $main->eval();\n\n $this->assertInstanceOf(ValueInterface::class, $result);\n /** @var ValueInterface $result */\n $this->assertTrue($result->hasValue());\n $this->assertEquals(42, $result->getValue());\n }", "private function parse()\n {\n $lines = file($this->filename);\n\n // skip get worker info\n $offset = 0;\n while (isset($lines[$offset])) {\n $line = $lines[$offset];\n\n if (preg_match('/(?:\\[0m\\t)(\\[.*\\])\\s*({.*})(?:[\\r\\n]*)$/', $line, $matches)) {\n $ctx = json_decode($matches[2], true);\n if (isset($ctx['receive'])) {\n $this->in[] = [$matches[1], $matches[2]];\n $offset++;\n continue;\n }\n\n $this->out[] = [$matches[1], $matches[2]];\n }\n\n $offset++;\n }\n }", "protected function initCaches() {}", "static protected function _preProcess($rows, $params = array()) {\n\t\t$return = array();\n\t\tforeach($rows as $row => &$file) {\n\t\t\tself::log($row);\n\t\t\tif (!file_exists($file)) {\n\t\t\t\tself::log('Cache file not found');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$_ = '';\n\t\t\t$_file = $file;\n\t\t\t$contents = file_get_contents($file);\n\n\t\t\tif (file_exists($file . '.preprocessed')) {\n\t\t\t\tself::log(\"File $file.preprocessed exists\");\n\t\t\t} else {\n\t\t\t\t$contents = preg_replace(\"@<script[^>]*>.*?</script>@s\", '', $contents);\n\t\t\t\t$contents = preg_replace(\"@\\s*<!--.*?-->\\s*@s\", '', $contents);\n\t\t\t\tfile_put_contents($file . '.preprocessed', $contents);\n\t\t\t\t$contents = `tidy -asxhtml -utf8 -modify --break-before-br y --clean y --drop-empty-paras y --drop-font-tags y -i --quiet y --tab-size 4 --wrap 1000 - < $file.preprocessed 2>/dev/null`;\n\n\t\t\t\tself::log(\"Writing $file.preprocessed\");\n\t\t\t\tfile_put_contents($file . '.preprocessed', $contents);\n\t\t\t}\n\t\t\t$return[$row] = 'processed';\n\t\t}\n\t\treturn $return;\n\t}", "public function read() {\n if ($this->_expires > 0) {\n $name = preg_replace(\n '([^A-Za-z\\d]+)', '_', get_class($this->_source)\n );\n $cacheData = $this->_cache->read(\n $name, $this->_identifier, $this->_expires\n );\n if ($cacheData) {\n $dom = new \\DOMDocument();\n $dom->loadXml($cacheData);\n return $dom;\n } else {\n $dom = $this->_source->read();\n $this->_cache->write(\n $name, $this->_identifier, $this->_expires, $dom->saveXml()\n );\n return $dom;\n }\n }\n return NULL;\n }", "function saveAndFlushCalculationCaches() {\n\n $this->saveToFile();\n\n $file = $this->getExtractedFile();\n\n $this->flushFileCachedValues();\n\n $this->saveToFile();\n }", "private function _loadCacheObj()\n {\n $cache = new mime_type_cache();\n self::$_mime_type_obj = $cache->getCache();\n\t\treturn;\n }", "function &createCache() {}", "public function getFromCache() {}", "protected function saveToCache() {}", "private function setCache()\n\t{\n\t\t$this->_cache = new Cache('./', array('prefix' => 'pageReader'));\n\t}", "public function fetchSources () {\r\n\t}", "protected function fetch_data(&$cache)\n {\n }", "function yy_r7(){ $this->compiler->tag_nocache = true; $this->_retvalue = $this->cacher->processNocacheCode(\"<?php echo '<?xml';?>\", $this->compiler, true); }", "private function ParseFile() {\r\n\t\t$this->ini_array = parse_ini_file($this->$results_file, true); //Load the results into a array //\r\n\t}", "public static function getCache() {}", "protected function initializeCache() {}", "protected function initializeCache() {}", "function get($key, $source, $ttl = DAY_IN_SECONDS, $flush_on = array(), $ob = false){\n\n $key = md5($key.$ttl.serialize($flush_on));\n $key = apply_filters('fragWP/cache_prefix', 'fragwp_cache_').$key;\n\n $frag = $this->get_frag($key);\n\n if(empty($frag)){\n\n /* Determine type of source */\n $source_type = false;\n if(is_callable($source)){\n $source_type = 'callback';\n }\n elseif(is_string($source)){\n $source_type = 'file';\n }\n else{\n error_log('Source type used in fragWP::get() is not valid. It must be either the full path to a file or a valid callback');\n return false;\n }\n\n if($ob){\n $GLOBALS['fragwp_key'] = $key;\n $GLOBALS['fragwp_ttl'] = $ttl;\n $GLOBALS['fragwp_flush_on'] = $flush_on;\n error_log('fragWP :: Caching entire output as '.$key);\n ob_start($source);\n }\n else{\n\n /* Start the buffer */\n ob_start();\n\n /* Call or require the source */\n if($source_type == 'callback'){\n add_action('fragWP/call_source', $source);\n do_action('fragWP/call_source');\n }\n else{\n require $source;\n }\n \n /* Save buffer output in $frag */\n $frag = ob_get_clean();\n\n /* And finally save the output to a transient with the key name */\n $this->save_frag($key, $frag, $ttl);\n\n }\n\n /* Make sure that the flush rules are setup */\n if(!is_array($flush_on))\n $flush_on = array();\n\n $flush_on[] = 'fragwp/flush';\n\n /* If there are any flush rules, we deal with them here */\n if($flush_on){\n \n /* Get the saved flush rules */\n $fr_key = apply_filters('fragWP/flush_rules_key', 'fragwp_flush_rules');\n if(!$flush_rules = get_transient($fr_key)){\n /*\n Instantiate a new array if there are no rules\n or the call returns false */\n $flush_rules = array();\n }\n\n /* Add this rule to the ruleset */\n $flush_rules[$key] = array(\n 'actions' => $flush_on,\n 'ttl' => time()+((int)$ttl) // <- Timestamp indicating when the rule self-terminates\n );\n\n /* And save the ruleset */\n set_transient($fr_key, $flush_rules);\n\n }\n\n }\n\n /* Woo, frag! */\n return $frag;\n\n }", "protected function getRuntimeCache() {}", "function yy_r9(){$this->_retvalue = $this->cacher->processNocacheCode($this->yystack[$this->yyidx + 0]->minor, $this->compiler,false); }", "public function cache() {\r\n\t\t$key = $this->cacher.'.' . $this->hash();\r\n\t\tif (($content = pzk_store($key)) === NULL) {\r\n\t\t\t$content = $this->getContent();\r\n\t\t\tpzk_store($key, $content);\r\n\t\t}\r\n\t\techo $content;\r\n\t}", "private static function prep() {\n\t\tif (!isset(F3::$global['CACHE'])) {\n\t\t\t// Extensions usable as cache back-ends\n\t\t\t$_exts=array_intersect(\n\t\t\t\texplode('|','apc|xcache'),get_loaded_extensions()\n\t\t\t);\n\t\t\tforeach (array_keys($_exts,'') as $_null)\n\t\t\t\tunset($_exts[$_null]);\n\t\t\t$_exts=array_merge($_exts,array());\n\t\t\tF3::$global['CACHE']=$_exts[0]?:\n\t\t\t\t('folder='.F3::$global['BASE'].'cache/');\n\t\t}\n\t\tif (preg_match(\n\t\t\t'/^(?:(folder)\\=(.+\\/)|(apc)|(memcache)=(.+))|(xcache)/i',\n\t\t\tF3::$global['CACHE'],$_match)) {\n\t\t\tif ($_match[1]) {\n\t\t\t\tif (!file_exists($_match[2])) {\n\t\t\t\t\tif (!is_writable(dirname($_match[2])) &&\n\t\t\t\t\t\tfunction_exists('posix_getpwuid')) {\n\t\t\t\t\t\t\t$_uid=posix_getpwuid(posix_geteuid());\n\t\t\t\t\t\t\tF3::$global['CONTEXT']=array(\n\t\t\t\t\t\t\t\t$_uid['name'],realpath(dirname($_match[2]))\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\ttrigger_error(F3::TEXT_Write);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// Create the framework's cache folder\n\t\t\t\t\tmkdir($_match[2],0755);\n\t\t\t\t}\n\t\t\t\t// File system\n\t\t\t\tself::$l1cache=array('type'=>'folder','id'=>$_match[2]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$_ext=strtolower($_match[3]?:($_match[4]?:$_match[6]));\n\t\t\t\tif (!extension_loaded($_ext)) {\n\t\t\t\t\tF3::$global['CONTEXT']=$_ext;\n\t\t\t\t\ttrigger_error(F3::TEXT_PHPExt);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ($_match[4]) {\n\t\t\t\t\t// Open persistent MemCache connection(s)\n\t\t\t\t\t// Multiple servers separated by semi-colon\n\t\t\t\t\t$_pool=explode(';',$_match[5]);\n\t\t\t\t\t$_mcache=NULL;\n\t\t\t\t\tforeach ($_pool as $_server) {\n\t\t\t\t\t\t// Hostname:port\n\t\t\t\t\t\tlist($_host,$_port)=explode(':',$_server);\n\t\t\t\t\t\tif (is_null($_port))\n\t\t\t\t\t\t\t// Use default port\n\t\t\t\t\t\t\t$_port=11211;\n\t\t\t\t\t\t// Connect to each server\n\t\t\t\t\t\tif (is_null($_mcache))\n\t\t\t\t\t\t\t$_mcache=memcache_pconnect($_host,$_port);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmemcache_add_server($_mcache,$_host,$_port);\n\t\t\t\t\t}\n\t\t\t\t\t// MemCache\n\t\t\t\t\tself::$l1cache=array('type'=>$_ext,'id'=>$_mcache);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t// APC and XCache\n\t\t\t\t\tself::$l1cache=array('type'=>$_ext);\n\t\t\t}\n\t\t\tself::$l1cache['current']=FALSE;\n\t\t\treturn TRUE;\n\t\t}\n\t\t// Unknown back-end\n\t\ttrigger_error(self::TEXT_Backend);\n\t\treturn FALSE;\n\t}", "private function _reducer ()\r\n {\r\n // (stored string or regexp) | +?+ ++? |\r\n //whitespace\r\n $reg = $this->_getRegex('whitespace', array(\r\n 'fbov' => $this->_IdRegex('fbov'),\r\n 'fbo' => $this->_IdRegex('fbo')\r\n ), true);\r\n $this->_script = preg_replace_callback($reg, array(&$this, '_spaceRemover'), $this->_script);\r\n \r\n $reg = preg_replace('#\\s+#','','\r\n for\\s*\\{;;\\}\r\n|\r\n (;\\})\r\n|\r\n (;+)(?=;)\r\n');\r\n \r\n if ($this->getConcatString()) {\r\n $reg .= '|'.$this->_IdRegex('s',true).'((?:\\+'.$this->_IdRegex('s').')+)';\r\n }\r\n \r\n $this->_script = preg_replace_callback('#'.$reg.'#', array(&$this, '_reducerOptimal'), $this->_script);\r\n }", "protected function compileAndCache(CompilerInterface $compiler, $path, $inputFile)\n {\n return $this->cacheFileContents($path, $compiler->compileFile($inputFile), $compiler->getCurrentImportPaths());\n }", "private function loadCache(): void\n {\n //====================================================================//\n // Safety Check\n if (!is_string($this->cacheKey) || empty($this->cacheKey)) {\n return;\n }\n //====================================================================//\n // Connect to Apcu Cache\n $this->cacheAdapter = new ApcuAdapter();\n //====================================================================//\n // Load Links from Cache\n try {\n /** @var array $cache */\n $cache = $this->cacheAdapter->get($this->cacheKey, function (ItemInterface $item): array {\n $item->expiresAfter(self::$cacheTtl);\n\n return array();\n });\n $this->cache = $cache;\n $this->cacheItem = $this->cacheAdapter->getItem($this->cacheKey);\n } catch (InvalidArgumentException $e) {\n $this->cache = array();\n }\n //====================================================================//\n // Load Empty Value\n if (!isset($this->cache)) {\n $this->cache = array();\n }\n }", "private static function _readCacheFile() {\r\n if (!self::$_hasCacheFile) {\r\n self::_createCacheFile();\r\n }\r\n\r\n $paths = array();\r\n require(ZEEYE_TMP_PATH . self::CACHE_FILE_PATH);\r\n self::$_paths = $paths;\r\n }", "public function startContrexxCaching()\n {\n if (!$this->boolIsEnabled) {\n return null;\n }\n $files = glob($this->strCachePath . $this->strCacheFilename . \"*\");\n\n foreach ($files as $file) {\n if (filemtime($file) > (time() - $this->intCachingTime)) {\n //file was cached before, load it\n readfile($file);\n exit;\n } else {\n $File = new \\Cx\\Lib\\FileSystem\\File($file);\n $File->delete();\n }\n }\n\n //if there is no cached file, start recording\n ob_start();\n }", "public function rebuildCache()\r\n {\r\n $themes = $this->scanJsonFiles();\r\n // file_put_contents($this->cachePath, json_encode($themes, JSON_PRETTY_PRINT));\r\n\r\n $stub = file_get_contents(__DIR__ . '/stubs/cache.stub');\r\n $contents = str_replace('[CACHE]', var_export($themes, true), $stub);\r\n file_put_contents($this->cachePath, $contents);\r\n }", "protected function cache()\n {\n // Cache location items\n $this->locations->get(); // All\n $this->locations->menu(); // Menu\n $this->locations->mapItems(); // Map\n $this->locations->featured(); // Featured\n\n // Cache properties\n $this->properties->cacheAll(); // All\n $this->properties->specials();\n }", "public function getCachedResult() {\n $cachePath = $this->_getCachePath();\n if (is_file($cachePath)) {\n $cacheModifiedTime = filemtime($cachePath);\n if ($cacheModifiedTime < time() - CACHE_EXPIRED_DELAY) {\n $result = $this->getLiveResult();\n if ($result)\n return $result;\n else\n touch($cachePath);\n }\n\n return file_get_contents($cachePath);\n }\n\n return $this->getLiveResult();\n }", "function betterEval($code) {\n $result = [];\n $tmp = tmpfile ();//file resource\n //we'll need to uri to include the file:\n $tmpMeta = stream_get_meta_data ( $tmp );\n $uri = $tmpMeta ['uri'];\n fwrite ( $tmp, $code );\n \n ob_start();\n $start = microtime(true);\n //anonymously, so our scope will not be polluted (very optimistic here, ofc)\n call_user_func(function() use ($uri) {\n include ($uri);\n }); \n \n $result['time'] = microtime(true) - $start;\n $result['output'] = ob_get_clean(); \n $result['length'] = strlen($result['output']);\n $result['lengthCharacters'] = mb_strlen($result['output']);\n $result['dbg'] = [\n 'fileUri' => $uri\n ];\n fclose ( $tmp );\n return $result;\n}", "protected function getMemoryCache() {}", "public function analyze()\n {\n $this->line('Tokenizing your codebase, this can take a few moments');\n $this->entities = $this->filterEntities();\n $codebase = $this->codebase->getTokenized();\n\n /* @type AbstractAnalyzedEntity $entity */\n $this->line('Analyzing codebase...');\n $progress = $this->getProgressBar($this->entities);\n\n foreach ($this->entities as $key => $entity) {\n $progress->advance();\n $progress->setMessage($entity->name);\n\n foreach ($entity->getUsageMatrix() as $usageNeedle) {\n foreach ($codebase as $file => $tokens) {\n if (!$tokens) {\n continue;\n }\n\n if ($token = $this->containsTokens($tokens, $usageNeedle)) {\n $this->entities[$key]->usage = $usageNeedle->usage;\n $this->entities[$key]->occurences[] = [\n 'file' => $file,\n 'context' => $token,\n ];\n\n break 2;\n }\n }\n }\n }\n\n $progress->finish();\n\n return $this->entities;\n }", "public function process()\n\t{\n\t\ttry {\n\t\t\t# Bind variables to local scope:\n\t\t\tforeach ($this->variables as $k => $v)\n\t\t\t\t${$k} = $v;\n\n\t\t\t# Start output buffering:\n\t\t\tob_start();\n\n\t\t\t# Do replacements:\n\t\t\t$this->replaced_contents = $this->contents;\n\t\t\tforeach (self::$replacements as $this->from => $this->to)\n\t\t\t\t$this->replaced_contents = preg_replace ($this->from, $this->to, $this->replaced_contents);\n\n\t\t\t$this->evaled_result = eval ('?>'.$this->replaced_contents.'<?php ');\n\n\t\t\tif ($this->evaled_result === false)\n\t\t\t\tthrow new ViewParserException ('Error on parsing view code');\n\t\t\telse\n\t\t\t\techo $this->evaled_result;\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t# Ensure that capture has ended and rethrow:\n\t\t\tob_end_clean();\n\t\t\tthrow $e;\n\t\t}\n\n\t\t# End output buffering:\n\t\treturn $this->result = ob_get_clean();\n\t}", "function dumpOptimizationReport($testPath, $run, $cached, $includeHeader = false)\r\n{\r\n // load the raw results\r\n $cachedText='';\r\n if((int)$cached == 1)\r\n $cachedText='_Cached';\r\n $fileName = $testPath . '/' . $run . $cachedText . '_optimization.txt';\r\n $lines = file($fileName, FILE_IGNORE_NEW_LINES);\r\n if( $lines)\r\n {\r\n if( $includeHeader )\r\n echo '<h3>Statistics:</h3>';\r\n \r\n $needsClose = true;\r\n $display = false;\r\n echo '<p class=\"indented1\">';\r\n\r\n // loop through each line in the file\r\n foreach($lines as $linenum => $line) \r\n {\r\n $line = htmlspecialchars(trim($line));\r\n if( !strcmp($line,\"Enable browser caching of static assets:\") ||\r\n !strcmp($line,\"Use one CDN for all static assets:\") ||\r\n !strcmp($line,\"Combine static CSS and JS files:\") ||\r\n !strncmp($line,\"GZIP encode all appropriate text assets (text responses > 1400 bytes):\", 20) ||\r\n !strcmp($line,\"Compress Images:\") ||\r\n !strcmp($line,\"Use persistent connections (keep alive):\") ||\r\n !strcmp($line,\"Proper cookie usage:\") ||\r\n !strcmp($line,\"Minify JS:\") ||\r\n !strcmp($line,\"JQuery Selectors not descended from an ID:\") ||\r\n !strcmp($line,\"No ETag headers (ETag headers should generally not be used unless you have an explicit reason to need them):\") )\r\n {\r\n if( $needsClose )\r\n echo '</p>';\r\n\r\n echo \"<h3>\" . $line . '</h3><p class=\"indented1\">' . \"\\n\";\r\n $needsClose = true;\r\n $display = true;\r\n }\r\n else\r\n {\r\n if( !$display && $includeHeader && (strpos($line, 'Page load time:') !== false) )\r\n $display = true;\r\n \r\n if( $display )\r\n {\r\n if( strpos($line, \"Cache score :\") !== false || \r\n strpos($line, \"CDN score (static objects) :\") !== false || \r\n strpos($line, \"Combine score :\") !== false || \r\n strpos($line, \"GZIP score :\") !== false || \r\n strpos($line, \"Image Compression score :\") !== false || \r\n strpos($line, \"Keep-Alive score :\") !== false || \r\n strpos($line, \"Cookie score :\") !== false || \r\n strpos($line, \"Minify score :\") !== false || \r\n strpos($line, \"ETag score :\") !== false )\r\n {\r\n echo '<br><b>' . $line . \"</b><br>\\n\";\r\n }\r\n elseif( !strncmp($line, 'cookie:', 7) || !strncmp($line, 'Line ', 5) || !strncmp($line, '...', 3) )\r\n {\r\n echo '<span class=\"indented1\">' . $line . \"</span><br>\\n\";\r\n }\r\n else\r\n {\r\n echo $line . \"<br>\\n\";\r\n }\r\n }\r\n }\r\n }\r\n if( $needsClose )\r\n echo '</p>';\r\n }\r\n}", "private function cacheResults($url, $results) {\n\t\tif (!empty($results)) {\n\t\t\t$cache = new Cache();\n\t\t\t$cache->set($this->getCacheKey($url), $results);\n\t\t}\n\t}", "public function processMeasurements()\n {\n $log = $this->logger();\n $c = $this->cache();\n $results = [\n 'success' => 0,\n 'errors' => 0\n ];\n $log->debug(\"Processesing Cached Measurements\");\n $done = false;\n do {\n\n $log->debug(\" ------------------- Next Cached Item --------------------\");\n $items = $c->llen($this->rkey);\n $log->debug(\"Items left on the \" . $this->rkey . \" list: \" . $items);\n if ($items == 0) {\n break;\n }\n\n $retval = $c->lpop($this->rkey);\n if ($retval) {\n $log->debug(\"Got measurement data: \" . $retval);\n $blockstr = $retval;\n $block = explode('|', $blockstr);\n $ok = $this->parseMeasurement($block);\n if (!$ok) {\n $log->error(\"Failed to parse: \" . $block); \n $results['errors']++;\n } else {\n $results['success']++;\n }\n } else {\n $done = true;\n }\n \n } while ( ! $done );\n return $results;\n }", "public function collectData(){\n\t\t// Simple HTML Dom is not accurate enough for the job\n\t\t$content = getContents($this->getURI())\n\t\t\tor returnServerError('No results for LWNprev');\n\n\t\tlibxml_use_internal_errors(true);\n\t\t$html = new DOMDocument();\n\t\t$html->loadHTML($content);\n\t\tlibxml_clear_errors();\n\n\t\t$cat1 = '';\n\t\t$cat2 = '';\n\n\t\tforeach($html->getElementsByTagName('a') as $a){\n\t\t\tif($a->textContent === 'Multi-page format'){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$realURI = self::URI . $a->getAttribute('href');\n\t\t$URICounter = 0;\n\n\t\t$edition = $html->getElementsByTagName('h1')->item(0)->textContent;\n\t\t$editionTimeStamp = strtotime(\n\t\t\tsubstr($edition, strpos($edition, 'for ') + strlen('for '))\n\t\t);\n\n\t\tforeach($html->getElementsByTagName('h2') as $h2){\n\t\t\tif($h2->getAttribute('class') !== 'SummaryHL'){\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$item = array();\n\n\t\t\t$h2NextSibling = $h2->nextSibling;\n\t\t\t$this->jumpToNextTag($h2NextSibling);\n\n\t\t\tswitch($h2NextSibling->getAttribute('class')){\n\t\t\tcase 'FeatureByline':\n\t\t\t\t$item['author'] = $h2NextSibling->getElementsByTagName('b')->item(0)->textContent;\n\t\t\t\tbreak;\n\t\t\tcase 'GAByline':\n\t\t\t\t$text = $h2NextSibling->textContent;\n\t\t\t\t$item['author'] = substr($text, strpos($text, 'by '));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$item['author'] = 'LWN';\n\t\t\t\tbreak;\n\t\t\t};\n\n\t\t\t$h2FirstChild = $h2->firstChild;\n\t\t\t$this->jumpToNextTag($h2FirstChild);\n\t\t\tif($h2FirstChild->nodeName === 'a'){\n\t\t\t\t$item['uri'] = self::URI . $h2FirstChild->getAttribute('href');\n\t\t\t}else{\n\t\t\t\t$item['uri'] = $realURI . '#' . $URICounter;\n\t\t\t}\n\t\t\t$URICounter++;\n\n\t\t\t$item['timestamp'] = $editionTimeStamp + $URICounter;\n\n\t\t\t$h2PrevSibling = $h2->previousSibling;\n\t\t\t$this->jumpToPreviousTag($h2PrevSibling);\n\t\t\tswitch($h2PrevSibling->getAttribute('class')){\n\t\t\tcase 'Cat2HL':\n\t\t\t\t$cat2 = $h2PrevSibling->textContent;\n\t\t\t\t$h2PrevSibling = $h2PrevSibling->previousSibling;\n\t\t\t\t$this->jumpToPreviousTag($h2PrevSibling);\n\t\t\t\tif($h2PrevSibling->getAttribute('class') !== 'Cat1HL'){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$cat1 = $h2PrevSibling->textContent;\n\t\t\t\tbreak;\n\t\t\tcase 'Cat1HL':\n\t\t\t\t$cat1 = $h2PrevSibling->textContent;\n\t\t\t\t$cat2 = '';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$h2PrevSibling = null;\n\n\t\t\t$item['title'] = '';\n\t\t\tif(!empty($cat1)){\n\t\t\t\t$item['title'] .= '[' . $cat1 . ($cat2 ? '/' . $cat2 : '') . '] ';\n\t\t\t}\n\t\t\t$item['title'] .= $h2->textContent;\n\n\t\t\t$node = $h2;\n\t\t\t$content = '';\n\t\t\t$contentEnd = false;\n\t\t\twhile(!$contentEnd){\n\t\t\t\t$node = $node->nextSibling;\n\t\t\t\tif(!$node || (\n\t\t\t\t\t\t$node->nodeType !== XML_TEXT_NODE && (\n\t\t\t\t\t\t\t$node->nodeName === 'h2' || (\n\t\t\t\t\t\t\t\t!is_null($node->attributes) &&\n\t\t\t\t\t\t\t\t!is_null($class = $node->attributes->getNamedItem('class')) &&\n\t\t\t\t\t\t\t\tin_array($class->nodeValue, array('Cat1HL', 'Cat2HL'))\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\t$contentEnd = true;\n\t\t\t\t}else{\n\t\t\t\t\t$content .= $node->C14N();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$item['content'] = $content;\n\t\t\t$this->items[] = $item;\n\t\t}\n\t}", "public function load()\n\t{\n\t\tif (!$this->cache->contains($this->cache_id)) {\n\t\t\t$this->generateCacheList();\n\t\t}\n\n\t\t$this->list = $this->cache->fetch($this->cache_id);\n\n\t\t$this->num = count($this->list);\n\t\t$this->unique = (boolean)($this->num == 1);\n\t}", "public function fetch_data( $name ){\n $data = $this->fetch( $name, false );\n if( ! is_array($data) ){\n return null;\n }\n foreach( $data as $hash => $d ){\n extract($d);\n // validate and add source code cache\n $data[$hash]['js'] = $this->fetch( $hash, true );\n if( ! $data[$hash]['js'] ){\n // source code missing from cache\n return null;\n }\n // add self to checks below\n $deps[ $path ] = $mtime;\n // validate all dependencies and check source file is unmodified\n foreach( $deps as $path => $mtime ){\n if( ! file_exists($path) || filemtime($path) > $mtime ){\n // no longer valid\n return null;\n }\n }\n }\n // valid\n return $data;\n }", "protected function cacheModel()\n {\n $xmlObject = $this->getSimpleXmlObject();\n if ($xmlObject === null) {\n return;\n }\n\n $this->cache = $this->convertItem($xmlObject);\n }", "public function parse($source)\r\n {\r\n $this->iterator = Scanner::scan($source);\r\n \r\n $this->parseBlock(FALSE);\r\n \r\n return $this;\r\n }", "protected function cache()\n\t{\n\t\tif ( ! $this->executed OR $this->result === NULL)\n\t\t\treturn;\n\n\t\tif ($this->config['cache'] === FALSE OR ! ($this->cache instanceof Cache))\n\t\t\tthrow new Kohana_User_Exception('Curl.cache()', 'Cache not enabled for this instance. Please check your settings.');\n\n\t\t// Store the correct data\n\t\t$cache_data = array\n\t\t(\n\t\t\t'result' => $this->result,\n\t\t\t'info' => $this->info,\n\t\t);\n\n\t\treturn $this->cache->set($this->create_cache_key(), $cache_data, $this->config['cache_tags'], $this->config['cache']);\n\t}", "public function getContents(){\n return file_get_contents($this->source);\n }", "abstract public function getCacheContent( $cacheID = '', $unserialize = true );", "protected function parseSourceFile($file_path, &$result = array()) {\n if (false === ($source = file_get_contents($file_path))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->I18n(\"Can't get file content: {{ file }}\", array(\n 'file' => $file_path\n ))));\n return false;\n }\n $path = substr($file_path, strlen(WB_PATH));\n $module = dirname(substr($file_path, strlen(WB_PATH . '/modules/')));\n if (strpos($module, DIRECTORY_SEPARATOR) > 0) $module = substr($module, 0, strpos($module, DIRECTORY_SEPARATOR));\n $file = basename($file_path);\n $tokens = token_get_all($source);\n $matches = array();\n // first run: get only matches for \"I18n\"\n for($i = 0; $i < count($tokens); $i++) {\n if (is_array($tokens[$i]) && (token_name($tokens[$i][0]) == 'T_STRING') &&\n \t\t(($tokens[$i][1] == 'I18n') || ($tokens[$i][1] == 'I18n_Register'))) $matches[] = $i;\n }\n foreach ($matches as $match) {\n $parensis_open = 0;\n $concat = false;\n $text = '';\n $has_content = false;\n for($i = $match; $i < count($tokens); $i++) {\n if ($parensis_open < 1) {\n // first detect the opening parensis!\n if (is_string($tokens[$i]) && ($tokens[$i] == '(')) {\n $parensis_open++;\n }\n }\n else {\n if (is_string($tokens[$i])) {\n // handle strings\n if ($tokens[$i] == ')') {\n $parensis_open--;\n $concat = false;\n if ($parensis_open == 0) break;\n }\n if ($tokens[$i] == '(') {\n $concat = false;\n $parensis_open++;\n }\n if ($has_content && ($tokens[$i] == '.')) {\n $concat = true;\n }\n }\n else {\n // handle tokens\n if (token_name($tokens[$i][0]) == 'T_CONSTANT_ENCAPSED_STRING') {\n if (empty($text)) {\n $item = trim($tokens[$i][1]);\n $text = substr($item, 1, strlen($item) - 2);\n $has_content = true;\n }\n elseif ($concat) {\n $item = trim($tokens[$i][1]);\n $text .= substr($item, 1, strlen($item) - 2);\n }\n }\n }\n }\n }\n if (!empty($text)) {\n $result[] = array(\n 'module' => $module,\n 'path' => $path,\n 'file' => $file,\n 'key' => $text,\n 'line' => $tokens[$match][2]\n );\n }\n }\n return true;\n }", "private function loadFromStore() {\r\n \r\n /*\r\n * Request start time\r\n */\r\n $this->requestStartTime = microtime(true);\r\n \r\n /*\r\n * Clean search filters\r\n */\r\n $originalFilters = $this->defaultModel->getFiltersFromQuery($this->context->query);\r\n \r\n /*\r\n * Number of returned results is never greater than MAXIMUM_LIMIT\r\n */\r\n $limit = isset($originalFilters['count']) && is_numeric($originalFilters['count']) ? min($originalFilters['count'], isset($this->defaultModel->searchFilters['count']->maximumInclusive) ? $this->defaultModel->searchFilters['count']->maximumInclusive : 500) : $this->context->dbDriver->resultsPerPage;\r\n\r\n /*\r\n * Compute offset based on startPage or startIndex\r\n */\r\n $offset = $this->getOffset($originalFilters, $limit);\r\n \r\n /*\r\n * Query Analyzer \r\n */\r\n $analysis = $this->analyze($originalFilters);\r\n \r\n /*\r\n * Completely not understood query - return an empty result without\r\n * launching a search on the database\r\n */\r\n if (isset($analysis['notUnderstood'])) {\r\n $this->restoFeatures = array();\r\n $this->paging = $this->getPaging(array(\r\n 'total' => 0,\r\n 'isExact' => true\r\n ), $limit, $offset);\r\n }\r\n /*\r\n * Read features from database\r\n */ \r\n else {\r\n $this->loadFeatures($analysis['appliedFilters'], $limit, $offset);\r\n }\r\n \r\n /*\r\n * Set description\r\n */\r\n $this->setDescription($analysis, $offset, $limit);\r\n \r\n }", "public function tempPageCacheContent() {}", "abstract public function parse();" ]
[ "0.6392229", "0.6312114", "0.62876636", "0.5798775", "0.56857747", "0.56788224", "0.56556416", "0.5545527", "0.5513545", "0.5454279", "0.5418758", "0.5345854", "0.5320333", "0.5295625", "0.5262732", "0.5259719", "0.5253486", "0.52467006", "0.52380097", "0.5227921", "0.5227646", "0.52048314", "0.52039504", "0.5187334", "0.51736003", "0.5135765", "0.5134118", "0.5112811", "0.50887984", "0.5033351", "0.49920753", "0.49875522", "0.4973907", "0.4970513", "0.49701488", "0.4949432", "0.4938439", "0.49368796", "0.49315637", "0.49002385", "0.4881334", "0.4881334", "0.4881334", "0.48699418", "0.48664647", "0.4854174", "0.4844332", "0.48415288", "0.48312515", "0.48292777", "0.48281994", "0.4823831", "0.48162186", "0.4810028", "0.47995362", "0.47852302", "0.47840363", "0.4782429", "0.47703713", "0.47556517", "0.47555533", "0.47472927", "0.47360092", "0.47352535", "0.47338957", "0.47295177", "0.47245577", "0.47207063", "0.4717791", "0.47077206", "0.4707132", "0.47016016", "0.47000536", "0.46992284", "0.46917838", "0.46888822", "0.46823162", "0.46819922", "0.4681646", "0.46775967", "0.46769404", "0.4675436", "0.46746278", "0.4674301", "0.46671578", "0.4664037", "0.46570173", "0.46525028", "0.46479702", "0.46392953", "0.46362528", "0.46321708", "0.46203482", "0.46158847", "0.46095598", "0.4604065", "0.46029887", "0.45958698", "0.4593809", "0.45934516", "0.45762616" ]
0.0
-1
Cache statistics at end of a parse process.
public function onReflectComplete(CompleteEvent $event): void { $event['extra'] = array('cache' => $this->stats); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cache_gc() {\n // TO DO!!!!!\n }", "private function clearstatcache() {\n static $cleared = false;\n if ( !$cleared ) {\n clearstatcache();\n $cleared = true;\n }\n }", "public function stats() {\n\t\techo \"<p>\";\n\t\techo \"<strong>Cache Hits:</strong> {$this->cache_hits}<br />\";\n\t\techo \"<strong>Cache Misses:</strong> {$this->cache_misses}<br />\";\n\t\techo \"</p>\";\n\t\techo '<ul>';\n\t\tforeach ( $this->cache as $group => $cache ) {\n\t\t\techo \"<li><strong>Group:</strong> $group - ( \" . number_format( strlen( serialize( $cache ) ) / 1024, 2 ) . 'k )</li>';\n\t\t}\n\t\techo '</ul>';\n\t}", "public static function reload()\n {\n clearstatcache();\n return self::parse();\n }", "abstract function cache_output();", "function stats() {\n\t\techo '<h2>Summary</h2>';\n\t\techo '<p>';\n\t\techo '<strong>Engine</strong>: ' . Cache::engine_name( $this->_config->get_string( array( 'fragmentcache', 'engine' ) ) ) . '<br />';\n\t\techo '<strong>Caching</strong>: ' . ( $this->_caching ? 'enabled' : 'disabled' ) . '<br />';\n\n\t\tif ( !$this->_caching ) {\n\t\t\techo '<strong>Reject reason</strong>: ' . $this->cache_reject_reason . '<br />';\n\t\t}\n\n\t\techo '<strong>Total calls</strong>: ' . $this->cache_total . '<br />';\n\t\techo '<strong>Cache hits</strong>: ' . $this->cache_hits . '<br />';\n\t\techo '<strong>Cache misses</strong>: ' . $this->cache_misses . '<br />';\n\t\techo '<strong>Total time</strong>: '. round( $this->time_total, 4 ) . 's';\n\t\techo '</p>';\n\n\t\techo '<h2>Cache info</h2>';\n\n\t\tif ( $this->_debug ) {\n\t\t\techo '<table cellpadding=\"0\" cellspacing=\"3\" border=\"1\">';\n\t\t\techo '<tr><td>#</td><td>Status</td><td>Source</td><td>Data size (b)</td><td>Query time (s)</td><td>ID:Group</td></tr>';\n\n\t\t\tforeach ( $this->debug_info as $index => $debug ) {\n\t\t\t\techo '<tr>';\n\t\t\t\techo '<td>' . ( $index + 1 ) . '</td>';\n\t\t\t\techo '<td>' . ( $debug['cached'] ? 'cached' : 'not cached' ) . '</td>';\n\t\t\t\techo '<td>' . ( $debug['internal'] ? 'internal' : 'persistent' ) . '</td>';\n\t\t\t\techo '<td>' . $debug['data_size'] . '</td>';\n\t\t\t\techo '<td>' . round( $debug['time'], 4 ) . '</td>';\n\t\t\t\techo '<td>' . sprintf( '%s:%s', $debug['id'], $debug['group'] ) . '</td>';\n\t\t\t\techo '</tr>';\n\t\t\t}\n\n\t\t\techo '</table>';\n\t\t} else {\n\t\t\techo '<p>Enable debug mode.</p>';\n\t\t}\n\t}", "protected function renderStats() {\n\t\t$stats = WCF::getCache()->get('stat');\n\t\tWCF::getTPL()->assign('stats', $stats);\n\t}", "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}", "function _garbage_collection()\n\t{\n\t\tif (class_exists('Stats'))\n\t\t{\n\t\t\tif (ee()->stats->statdata('last_cache_clear')\n\t\t\t\t&& ee()->stats->statdata('last_cache_clear') > 1)\n\t\t\t{\n\t\t\t\t$last_clear = ee()->stats->statdata('last_cache_clear');\n\t\t\t}\n\t\t}\n\n\t\tif ( ! isset($last_clear))\n\t\t{\n\t\t\tee()->db->select('last_cache_clear');\n\t\t\tee()->db->where('site_id', ee()->config->item('site_id'));\n\t\t\t$query = ee()->db->get('stats');\n\n\t\t\t$last_clear = $query->row('last_cache_clear') ;\n\t\t}\n\n\t\tif (isset($last_clear) && ee()->localize->now > $last_clear)\n\t\t{\n\t\t\t$data = array(\n\t\t\t\t'last_cache_clear'\t=> ee()->localize->now + (60*60*24*7)\n\t\t\t);\n\n\t\t\tee()->db->where('site_id', ee()->config->item('site_id'));\n\t\t\tee()->db->update('stats', $data);\n\n\t\t\tif (ee()->config->item('enable_throttling') == 'y')\n\t\t\t{\n\t\t\t\t$expire = time() - 180;\n\n\t\t\t\tee()->db->where('last_activity <', $expire);\n\t\t\t\tee()->db->delete('throttle');\n\t\t\t}\n\n\t\t\tee()->functions->clear_caching('all');\n\t\t}\n\t}", "protected function UpdateStats() {\n\n $Path= $this->StorageDir.'/Stats.txt';\n // load and parse file\n $Lines= explode(\"\\n\", file_get_contents($Path));\n $Parsed= [];\n foreach($Lines as $Line) {\n $Parts= explode(':', $Line, 2);\n if (count($Parts) > 1) {\n $Parsed[$Parts[0]]= trim(end($Parts));\n }\n }\n // update values\n $Period= $Parsed['Period'] ?: date('r').' - 0';\n $Stats= $Parsed;\n foreach($this->Stats as $k => $v) {\t// transfer values from buffer\n $Stats[$k]= isset($Parsed[$k]) ? intval($Parsed[$k]) + $v : $v;\n }\n // prepare report\n array_walk($Stats, function(&$v, $k){$v= \"$k: $v\";});\n natcasesort($Stats);\n unset($Stats['Period']);\n array_unshift($Stats, 'Period: '.trim(explode(' - ', $Period)[0]).' - '.date('r'), '');\n // save\n file_put_contents($Path, implode(\"\\n\", $Stats));\n }", "private function finalizeUrlCounts()\n\t{\n\t\t// batch process any remaining pages in the page cache\n\t\tif (!empty($this->page_cache)) {\n\t\t\t$sql = sprintf('INSERT INTO %s (page_id) VALUES (%s)', $this->tempTable, implode('),(', $this->page_cache));\n\t\t\tmysql_query($sql);\n\t\t}\n\n\t\t// update the counts\n\t\t$sql = sprintf('UPDATE crawl_index\n\t\t\t\t\t\tLEFT JOIN (SELECT page_id, COUNT(page_id) AS total FROM %s GROUP BY page_id) AS crawl_count\n\t\t\t\t\t\tON (crawl_index.id = crawl_count.page_id)\n\t\t\t\t\t\tSET crawl_index.count = (crawl_index.count + IFNULL(crawl_count.total, 0))',\n\t\t\t\t\t\t$this->tempTable);\n\n\t\tmysql_query($sql);\n\n\t\t// delete the temporary table\n\t\t$sql = sprintf('DROP TABLE %s', $this->tempTable);\n\t\tmysql_query($sql);\n\t}", "public function addStatFinalize();", "public function generateStats()\n {\n $this->cache = json_decode (file_get_contents ($this->cfg_cache_file), true);\n if (!is_array ($this->cache)) $this->cache = array();\n if (!isset ($this->cache['index'])) $this->cache['index'] = array();\n if (!isset ($this->cache['total'])) $this->cache['total'] = 0;\n if (!isset ($this->cache['size'])) $this->cache['size'] = 0;\n $edited = false;\n if (!isset ($this->cache['timecache']))\n {\n //print \"No cache\";\n $this->generateTimeInterval();\n $this->cache['timecache'] = array (\n \"generated\" => date (\"d-m-Y\"),\n \"day\" => $this->stats->screenshots_per_day,\n \"month\" => $this->stats->screenshots_per_month\n );\n }\n else\n {\n $today = date (\"d-m-Y\");\n $gen_month = false; $gen_day = false;\n if (substr ($today, 3) != substr ($this->cache['timecache']['generated'], 3))\n $gen_month = true;\n if ($today != $this->cache['timecache']['generated'])\n $gen_day = true;\n if ($gen_day || $gen_month)\n {\n $this->generateTimeInterval ($gen_month, $gen_day);\n //print \"Generating timecache: [{$gen_month} / {$gen_day}]\";\n $this->cache['timecache']['generated'] = $today;\n if ($gen_day)\n $this->cache['timecache']['day'] = $this->stats->screenshots_per_day;\n else\n $this->stats->screenshots_per_day = $this->cache['timecache']['day'];\n if ($gen_month)\n $this->cache['timecache']['month'] = $this->stats->screenshots_per_month;\n else\n $this->stats->screenshots_per_month = $this->cache['timecache']['month'];\n $edited = true;\n }\n else\n {\n $this->stats->screenshots_per_day = $this->cache['timecache']['day'];\n $this->stats->screenshots_per_month = $this->cache['timecache']['month'];\n }\n }\n // $this->cache = array ( 'total' => n, 'size' => n, 'index' => array ('name' => date)) )\n $flist = glob (\"{$this->cfg_img_path}/*.{{$this->cfg_extensions}}\", GLOB_BRACE);\n foreach ($flist as $file)\n {\n if (!isset ($this->cache['index'][$file]))\n {\n $edited = true;\n $_stat = stat ($file);\n $this->cache['index'][$file] = date ('d-m-Y', $_stat['mtime']) . '/' . $_stat['size'];\n $this->cache['size'] += $_stat['size'];\n $this->cache['total'] += 1;\n }\n $_date = substr ($this->cache['index'][$file], 0, strpos ($this->cache['index'][$file], '/'));\n $month = substr ($_date, 3);\n if (isset ($this->stats->screenshots_per_day[$_date]))\n $this->stats->screenshots_per_day[$_date]++;\n if (isset ($this->stats->screenshots_per_month[$month]))\n $this->stats->screenshots_per_month[$month]++;\n }\n if ($this->cfg_check_deleted)\n {\n foreach (array_diff (array_keys ($this->cache['index']), $flist) as $deleted)\n {\n $edited = true;\n $this->cache['size'] -= intval (substr ($this->cache['index'][$deleted], strpos ($this->cache['index'][$deleted], '/') + 1));\n $this->cache['total'] -= 1;\n unset ($this->cache['index'][$deleted]);\n }\n }\n $this->stats->total_files = $this->cache['total'];\n $this->stats->used_space = $this->cache['size'];\n //print_r ($this->stats->screenshots_per_day);\n //print($edited);\n if ($edited)\n file_put_contents ($this->cfg_cache_file, json_encode ($this->cache));\n return $this;\n }", "public function process()\n {\n $this->run_deploystudio_stats();\n }", "public function postExecute() {\n\t\t// someone retrieves a bench value from \n\t\t// Benchmark class.\n\t}", "public function clearCacheAndStats() {\n\t\tif (Shop::isFeatureActive()) {\n\t\t\tforeach (Shop::getContextListShopID() as $id_shop) {\n\t\t\t\tif (file_exists(_PS_CACHE_DIR_ . 'pagecache/' . $id_shop)) {\n\t\t\t\t\tTools::deleteDirectory(_PS_CACHE_DIR_ . 'pagecache/' . $id_shop, false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tPageCacheDAO::resetCache(Shop::getContextListShopID());\n\t\t}\n\t\telse {\n\t\t\tif (file_exists(_PS_CACHE_DIR_ . 'pagecache/')) {\n\t\t\t\tTools::deleteDirectory(_PS_CACHE_DIR_ . 'pagecache', false);\n\t\t\t}\n\t\t\tPageCacheDAO::resetCache();\n\t\t}\n\t}", "public function flushParsedKeys()\n {\n $this->parsed = [];\n }", "function saveAndFlushCalculationCaches() {\n\n $this->saveToFile();\n\n $file = $this->getExtractedFile();\n\n $this->flushFileCachedValues();\n\n $this->saveToFile();\n }", "function handle_parser_cache_use(&$event, $param) {\n // FIXME should move queue be able to get fixed using an admin plugin/cli interface?\n }", "protected function getStats()\n {\n $endTime = microtime() - $this->startTime;\n $stats = sprintf(\n 'Request-response cycle finished: %1.3fs'\n . ' - Memory usage: %1.2fMB (peak: %1.2fMB)'\n ,\n $endTime,\n memory_get_usage(true) / 1048576,\n memory_get_peak_usage(true) / 1048576\n );\n\n return $stats;\n }", "private function postUpdate() {\n\t\t$this->info('Import finished, cleaning up.');\n\t\t$this->reCache();\n\t}", "public function processMeasurements()\n {\n $log = $this->logger();\n $c = $this->cache();\n $results = [\n 'success' => 0,\n 'errors' => 0\n ];\n $log->debug(\"Processesing Cached Measurements\");\n $done = false;\n do {\n\n $log->debug(\" ------------------- Next Cached Item --------------------\");\n $items = $c->llen($this->rkey);\n $log->debug(\"Items left on the \" . $this->rkey . \" list: \" . $items);\n if ($items == 0) {\n break;\n }\n\n $retval = $c->lpop($this->rkey);\n if ($retval) {\n $log->debug(\"Got measurement data: \" . $retval);\n $blockstr = $retval;\n $block = explode('|', $blockstr);\n $ok = $this->parseMeasurement($block);\n if (!$ok) {\n $log->error(\"Failed to parse: \" . $block); \n $results['errors']++;\n } else {\n $results['success']++;\n }\n } else {\n $done = true;\n }\n \n } while ( ! $done );\n return $results;\n }", "public function fetchStats()\n\t{\n\t\t$statsData = array();\n\t\t\n\t\t// Get all cache action\n\t\t$select = $this->_statsTable->select()\n\t\t\t\t\t\t\t\t\t->where('session_id = ?', $this->_sessionId);\n\t\t$rowSet = $this->_statsTable->fetchall($select);\n\t\t$statsData['AllActionCount'] = 0;\n\t\tforeach ($rowSet as $row)\n\t\t{\n\t\t\t$statsData['AllAction'][] = $row->toArray();\n\t\t\t$statsData['AllActionCount'] += 1;\n\t\t}\n\t\t\n\t\t// Calculate current cache use for every scope;\n\t\t//SELECT * FROM stats_ivc_cache WHERE session_id = 12 AND (action = \"insert\" OR action = \"cache_hit\") GROUP BY full_key;\n\t\t$select = $this->_statsTable->select()\n\t\t\t\t\t\t\t\t\t->where('session_id = ?', $this->_sessionId)\n\t\t\t\t\t\t\t\t\t->where('action = \"insert\" OR action = \"cache_hit\" OR action = \"replace\"')\n\t\t\t\t\t\t\t\t\t->group('full_key');\n\t\t$rowSet = $this->_statsTable->fetchall($select);\n\t\t$statsData['totalUse'] = 0;\n\t\t$statsData['ivcUse'] = 0;\n\t\t$statsData['clubUse'] = 0;\n\t\t$statsData['userUse'] = 0;\n\t\tforeach ($rowSet as $row)\n\t\t{\n\t\t\t$statsData['keyUseList'][$row['full_key']] = $row->toArray();\n\t\t\t$statsData['totalUse'] += $row['size'];\n\t\t\t$statsData[$row['scope'] . 'Use'] += $row['size'];\n\t\t}\n\t\t\n\t\t// Calculate average use of user session ... need user session for that\n\t\t\n\t\treturn ($statsData);\n\t}", "public function finPerformance(){\n $memoria = memory_get_usage() - $this->memoria;\n $tiempo = microtime(true) - $this->tiempo;\n\n echo \"<pre>\";\n print_r(array(\"memoria\" => $memoria.\" bytes \", \"tiempo\" => $tiempo.\" segundos\" ));\n die;\n }", "protected function _pushStat()\n {\n\n $this->_detectRefIP();\n\n $this->_detectOS();\n\n $this->_detectBrowser();\n\n $this->_detectCountry();\n\n $this->_detectRef();\n\n // push to redis\n $this->redis->pipeline(function($pipe)\n {\n //Page to set of pages\n $pipe->sadd('gstat:pages', $this->page);\n\n //Site\n $this->_keyPipeSend($pipe, 'gstat:site');\n\n //Page\n $this->_keyPipeSend($pipe, 'gstat:page:'.$this->page);\n\n\n });\n\n }", "public function getStats()\n\t{\n\t $this->load->model('tasks');\n\t $this->tasks->truncate('stats');\n\t $this->load->model('configuration');\n\t $dbList = $this->configuration->getDBList();\n\t foreach($dbList->result() as $db)\n\t $this->tasks->pullStats($db->dbGroup,$db->friendlyName);\n\n\t $this->_updateCronStats();\n\t}", "public function gatherMemoryData()\n {\n $memoryTotals = array();\n\n $memoryTotals['used'] = $this->getReadableFileSize(memory_get_peak_usage());\n\n $memoryTotals['total'] = ini_get(\"memory_limit\");\n\n $this->output['memoryTotals'] = $memoryTotals;\n }", "protected function _clear_cache() {\n\t\t$this->_attrs = array();\n\t\t$this->_options = array();\n\t}", "public function process(): void {\n if($this->shouldCache() && $this->hasCache()) {\n $this->restoreCache();\n\n return;\n }\n\n $folders = [];\n foreach($this->sources_to_parse as $source_to_parse) {\n $folder = $source_to_parse->getFolderToParse();\n if(!isset($folders[$folder])) {\n $folders[$folder] = [\n 'extensions' => [],\n 'flags' => [],\n ];\n }\n $folders[$folder]['extensions'] = [...$folders[$folder]['extensions'], ...$source_to_parse->getExtensions()];\n $folders[$folder]['flags'] = [...$folders[$folder]['flags'], ...$source_to_parse->getFlags()];\n }\n\n foreach($folders as $folder => $folder_sources) {\n $folder_sources['extensions'] = array_values(array_unique($folder_sources['extensions']));\n $folder_sources['flags'] = array_values(array_unique($folder_sources['flags']));\n $code_data = $this->analyzer->parseFolder($folder, $folder_sources);\n $this->info_data[] = $code_data;\n $i = count($this->info_data) - 1;\n foreach($folder_sources['flags'] as $flag) {\n if(!isset($this->info_data_flag_refs[$flag])) {\n $this->info_data_flag_refs[$flag] = [];\n }\n $this->info_data_flag_refs[$flag][] = $i;\n }\n $this->flags = [...$this->flags, ...$folder_sources['flags']];\n }\n $this->flags = array_values(array_unique($this->flags));\n\n if($this->shouldCache()) {\n file_put_contents(\n $this->file_cache,\n \"<?php\\n\\nreturn \" .\n var_export([\n 'info_data' => $this->info_data,\n 'info_data_flag_refs' => $this->info_data_flag_refs,\n ], true) . ';',\n );\n }\n }", "public function updateMemoryUsage(): void\n {\n $this->data['memory'] = \\memory_get_peak_usage(true);\n }", "protected function printCachedInfo() {}", "public static function clear_memory_heavy_variables() {\n\t\tglobal $wpdb, $wp_object_cache;\n\n\t\t$wpdb->queries = [];\n\n\t\tif ( is_object( $wp_object_cache ) ) {\n\t\t\t$wp_object_cache->cache = [];\n\t\t\t$wp_object_cache->group_ops = [];\n\t\t\t$wp_object_cache->memcache_debug = [];\n\t\t}\n\t}", "public function refresh() {\n $this->datastreamInfo = NULL;\n $this->datastreamHistory = NULL;\n }", "public function clearCache()\n {\n if ($this->clear_cache && !empty($this->pageinfo)) {\n $dataHandler = GeneralUtility::makeInstance(DataHandler::class);\n $dataHandler->start([], []);\n $dataHandler->clear_cacheCmd($this->id);\n }\n }", "public function getStats() {}", "function flush(){\n $path = $this->cachePath .'/'. $this->prefix .'*';\n $files = glob($path);\n $rm_total = 0;\n if (is_array($files) && !empty($files)){\n foreach($files as $file){\n $fp = fopen($file, \"r\");\n $meta = $this->_readMeta($fp);\n if ($meta['expired']!=0 && $meta['expired']<time()){\n fclose($fp);\n unlink($file);\n ++$rm_total;\n }\n }\n }\n return $rm_total;\n }", "public static function saveStats()\r\n {\r\n }", "function end_caching()\n{\n\tglobal $cachefile;\n\n\t//Disable Caching on Description Page\n\t// open the cache file \"cache/home.html\" for writing\n\t$fp = fopen($cachefile, 'w');\n\t// save the contents of output buffer to the file\n\tfwrite($fp, ob_get_contents());\n\t// close the file\n\tfclose($fp);\n\t// Send the output to the browser\n\tob_end_flush();\n}", "public static function clean_cached_data()\n {\n }", "private static function CLEAR_CACHE() {\n\t\tclearstatcache();\n\t}", "public function cacheNewSpotCount()\n {\n $statisticsUpdate = [];\n\n /*\n * Update the filter counts for the users.\n *\n * Basically it compares the lasthit of the session with the lastupdate\n * of the filters. If lasthit>lastupdate, it will store the lastupdate as\n * last counters read, hence we need to do it here and not at the end.\n */\n $this->_userFilterCountDao->updateCurrentFilterCounts();\n\n /*\n * First we want a unique list of all currently\n * created filter combinations so we can determine\n * its' spotcount\n */\n $filterList = $this->_userFilterDao->getUniqueFilterCombinations();\n\n /* We add a dummy entry for 'all new spots' */\n $filterList[] = ['id' => 9999, 'userid' => -1, 'filtertype' => 'dummyfilter',\n 'title' => 'NewSpots', 'icon' => '', 'torder' => 0, 'tparent' => 0,\n 'tree' => '', 'valuelist' => 'New:0', 'sorton' => '', 'sortorder' => '', ];\n\n /*\n * Now get the current number of spotcounts for all\n * filters. This allows us to add to the current number\n * which is a lot faster than just asking for the complete\n * count\n */\n $cachedList = $this->_userFilterCountDao->getCachedFilterCount(-1);\n\n /*\n * Loop throug each unique filter and try to calculate the\n * total amount of spots\n */\n foreach ($filterList as $filter) {\n // Reset the PHP timeout timer\n set_time_limit(960);\n\n // Calculate the filter hash\n if (is_null($filter['valuelist'])) {\n $filter['valuelist'] = 'NULL';\n }\n $filter['filterhash'] = sha1($filter['tree'].'|'.urldecode($filter['valuelist']));\n $filter['userid'] = -1;\n\n //echo 'Calculating hash for: \"' . $filter['tree'] . '|' . $filter['valuelist'] . '\"' . PHP_EOL;\n //echo ' ==> ' . $filter['filterhash'] . PHP_EOL;\n\n // Check to see if this hash is already in the database\n if (isset($cachedList[$filter['filterhash']])) {\n $filter['lastupdate'] = $cachedList[$filter['filterhash']]['lastupdate'];\n $filter['lastvisitspotcount'] = $cachedList[$filter['filterhash']]['currentspotcount'];\n $filter['currentspotcount'] = $cachedList[$filter['filterhash']]['currentspotcount'];\n } else {\n // Apparently a totally new filter\n $filter['lastupdate'] = 0;\n $filter['lastvisitspotcount'] = 0;\n $filter['currentspotcount'] = 0;\n } // else\n\n /*\n * Now we have to simulate a search. Because we want to\n * utilize existing infrastructure, we convert the filter to\n * a format which can be used in this system\n */\n $strFilter = '&amp;search[tree]='.$filter['tree'];\n if (is_null($filter['valuelist'])) {\n $filter['valuelist'] = 'NULL';\n }\n $valueArray = explode('&', $filter['valuelist']);\n if (!empty($valueArray)) {\n foreach ($valueArray as $value) {\n $strFilter .= '&amp;search[value][]='.$value;\n } // foreach\n } // if\n\n /*\n * Now we will artifficially add the 'stamp' column to the\n * list of parameters. Basically this tells the query\n * system to only query for spots newer than the last\n * update of the filter\n */\n $strFilter .= '&amp;search[value][]=stamp:>:'.$filter['lastupdate'];\n\n // Now parse it to an array as we would get when called from a webpage\n parse_str(html_entity_decode($strFilter), $query_params);\n\n /*\n * Create a fake session\n */\n $userSession = [];\n $userSession['user'] = ['lastread' => $filter['lastupdate']];\n $userSession['user']['prefs'] = ['auto_markasread' => false];\n\n /*\n * And convert the parsed system to an SQL statement and actually run it\n */\n $parsedSearch = $this->_queryParser->filterToQuery($query_params['search'], [], $userSession, []);\n $spotCount = $this->_spotDao->getSpotCount($parsedSearch['filter']);\n\n /*\n * Because we only ask for new spots, just increase the current\n * amount of spots. This has a slight chance of sometimes missing\n * a spot but it's sufficiently accurate for this kind of importance\n */\n $filter['currentspotcount'] += $spotCount;\n\n $this->_userFilterCountDao->setCachedFilterCount(-1, [$filter['filterhash'] => $filter]);\n\n /*\n * Now determine the users wich actually have this filter\n */\n $usersWithThisFilter = $this->_userFilterDao->getUsersForFilter($filter['tree'], $filter['valuelist']);\n foreach ($usersWithThisFilter as $thisFilter) {\n $statisticsUpdate[$thisFilter['userid']][] = ['title' => $thisFilter['title'],\n 'newcount' => $spotCount,\n 'enablenotify' => $thisFilter['enablenotify'], ];\n } // foreach\n } // foreach\n\n /*\n * We want to make sure all filtercounts are available for all\n * users, hence we make sure all these records do exist\n */\n $this->_userFilterCountDao->createFilterCountsForEveryone();\n\n return $statisticsUpdate;\n }", "public function end() {\n $this->memcache->delete(PREFIX_LOCDATA.$this->getShareID());\n }", "private function get_cache() {\n exit(file_get_contents($this->cache_file));\n }", "public static function flushInternalRuntimeCaches() {}", "public function refresh()\n {\n $this->_totalCount = null;\n $this->_models = null;\n $this->_keys = null;\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 }", "public function execute()\n {\n return $this->smarty->cache_lifetime;\n }", "public function on_wp_shutdown() {\n\t\tself::$cache[ $this->prefix ] = array( $this->rules, $this->endpoints, $this->tags );\n\t}", "private function finalize() {\n $this->_log_queries[] = $this->_active_query;\n $this->_active_query = empty($this->_hold_queries) ? NULL : array_pop($this->_hold_queries);\n }", "public function stats(){\n\t\treturn apc_cache_info('user',true);\n\t}", "function _cleanup_all_stats () {\n\t\tif (!$this->STATS_ENABLED || !$this->ENABLE_REFRESH_STATS) {\n\t\t\treturn false;\n\t\t}\n\t\tdb()->query(\"TRUNCATE TABLE \".db('user_stats').\"\");\n\t}", "function flush()\n\t\t{\n\t\t\t// Get rid of these\n\t\t\t$this->last_result = null;\n\t\t\t$this->col_info = null;\n\t\t\t$this->last_query = null;\n\t\t\t$this->from_disk_cache = false;\n\t\t}", "protected function _getCacheLifetime()\n\t{\n\t\treturn Mage::helper('bcp')->getAdvancedConfig('html_page_cache_time');\n\t}", "private function refresh() {\n natcasesort($this->_cont->tags);\n $this->_cont->tags = array_count_values($this->_cont->tags);\n $this->_cont->tag_count = count($this->_cont->tags);\n\n $this->_cont->task_count = count($this->_cont->tasks);\n $this->_cont->count = count($this->_cont->raw_items);\n }", "public function parse_stats($argv)\n {\n $statArgc = 2;\n $this->request = true;\n\n $path = preg_grep(\"/^--stats=.+$/\", $argv);\n if(count($path) != 1)\n {\n fwrite(STDERR, \"Error, unknwon parameters!\\n\");\n fwrite(STDERR, \"\\n\");\n exit(10);\n }\n $path = array_pop($path);\n $path = explode(\"=\", $path);\n $path = $path[1];\n $this->file = $path;\n \n $loc = preg_grep(\"/^--loc$/\", $argv);\n if(count($loc) == 1)\n {\n $statArgc++;\n }\n\n $comments = preg_grep(\"/^--comments$/\", $argv);\n if(count($comments) == 1)\n {\n $statArgc++;\n }\n\n $labels = preg_grep(\"/^--labels$/\", $argv);\n if(count($labels) == 1)\n {\n $statArgc++;\n }\n\n $jumps = preg_grep(\"/^--jumps$/\", $argv);\n if(count($jumps) == 1)\n {\n $statArgc++;\n }\n\n if($statArgc != count($argv))\n {\n fwrite(STDERR, \"Error, expecting parameters for stats!\\n\");\n exit(10);\n }\n }", "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}", "public static function clearCache()\n\t{\n\t\tself::$definitions = null;\n\t}", "function _deleteCache() {\n require_once(\"Cache/Output.php\");\n $cache = new Cache_Output($GLOBALS[\"BX_config\"][\"popoon\"][\"cacheContainer\"], $GLOBALS[\"BX_config\"][\"popoon\"][\"cacheParams\"] );\n \n // for the time being, just flush everything...\n @$cache->flush('outputcache');\n $cache->flush('');\n }", "public static function set_process_end_time()\n {\n $timer = &self::$timer;\n $session_start = $timer->__set('process_end');\n }", "function counterHits(){\n\tglobal $pth; include($pth['app']['globals']);\n\t$count \t\t= '';\n\t$counterHits= $pth['site']['counterHits'];\n\tclearstatcache();\n\tif(!is_file($counterHits)){ $handle\t= fopen($counterHits,'w'); fwrite($handle,'0'); fclose($handle); }\n\t// get current Hits + count\n\t$count\t= file_get_contents($counterHits);\n\tif(!$adm){\n\t\t$count = $count+1;\n\t\t// save Hits\n\t\t$files = fopen($counterHits,'w'); \n\t\tfwrite($files,$count);\n\t\tfclose($files);\n\t}\n\t\n\treturn '<p><strong>'.$count.'</strong> '.$txt['counterHits']['views'].'.</p>';\n}", "function process_stats() {\r\n\t global $wpdb;\r\n\r\n\t $date = date(\"Y-m-d\", time());\r\n\r\n\t //don't process if already completed today (in case wp_cron goes nutzy)\r\n\t $existing = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites_daily_stats WHERE date = '\" . $date . \"'\");\r\n\t if ($existing)\r\n\t return;\r\n\r\n\t $active_pro_sites = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE expire > '\" . time() . \"'\");\r\n\t $expired_pro_sites = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE expire <= '\" . time() . \"'\");\r\n\t $term_1_pro_sites = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE term = 1 AND expire > '\" . time() . \"'\");\r\n\t $term_3_pro_sites = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE term = 3 AND expire > '\" . time() . \"'\");\r\n\t $term_12_pro_sites = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE term = 12 AND expire > '\" . time() . \"'\");\r\n\t $term_manual_pro_sites = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE term NOT IN (1,3,12) AND expire > '\" . time() . \"'\");\r\n\r\n\t\t//get level counts\r\n $levels = get_site_option('psts_levels');\r\n for ($i=1; $i<=10; $i++) $level_count[$i] = 0; //prefill the array\r\n\t\tif (is_array($levels) && count($levels) > 1) {\r\n\t\t\tforeach ($levels as $level => $data) {\r\n\t\t\t\t//if last level include all previous ones greater than that level, in case a level was deleted\r\n\t\t\t\tif (count($levels) == $level)\r\n\t\t\t\t\t$level_count[$level] = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE level >= $level AND expire > '\" . time() . \"'\");\r\n\t\t\t\telse\r\n $level_count[$level] = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE level = $level AND expire > '\" . time() . \"'\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$level_count[1] = $active_pro_sites;\r\n\t\t}\r\n\r\n\t $wpdb->query( \"INSERT INTO {$wpdb->base_prefix}pro_sites_daily_stats ( date, supporter_count, expired_count, term_count_1, term_count_3, term_count_12, term_count_manual, level_count_1, level_count_2, level_count_3, level_count_4, level_count_5, level_count_6, level_count_7, level_count_8, level_count_9, level_count_10 ) VALUES ( '$date', $active_pro_sites, $expired_pro_sites, $term_1_pro_sites, $term_3_pro_sites, $term_12_pro_sites, $term_manual_pro_sites, {$level_count[1]}, {$level_count[2]}, {$level_count[3]}, {$level_count[4]}, {$level_count[5]}, {$level_count[6]}, {$level_count[7]}, {$level_count[8]}, {$level_count[9]}, {$level_count[10]} )\" );\r\n\t}", "protected function _clearDataCache() {}", "public function getLastUsed();", "protected function loadStats()\n {\n if ($this->stat === false) {\n $this->stat = @stat($this->getPath());\n if ($this->stat===false) {\n throw new T_Exception_File($this->getPath(),'stat error');\n }\n }\n }", "public function gc()\n\t{\n\t\t$prefix = $this->options['hash'] . '-cache-';\n\n\t\tforeach ($this->data as $key => $value)\n\t\t{\n\t\t\tif (substr($key, 0, strlen($prefix)) == $prefix)\n\t\t\t{\n\t\t\t\t$value = $this->data[$key];\n\n\t\t\t\tif ($this->isDataExpired($value))\n\t\t\t\t{\n\t\t\t\t\tunset($this->data[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function gatherSpeedData()\n {\n $speedTotals = array();\n\n $speedTotals['total'] = $this->getReadableTime((microtime(true) - $this->startTime) * 1000);\n $speedTotals['allowed'] = ini_get(\"max_execution_time\");\n\n $this->output['speedTotals'] = $speedTotals;\n }", "public function _cache_refresh_all()\n {\n }", "public function parse()\n {\n $raw = $this->getRaw();\n $count = count($raw);\n for ($i = 7; $i < $count; $i++) {\n $line = $raw[$i];\n\n $process = new Process(\n $line[11],\n $line[0],\n floatval($line[8]),\n floatval($line[9])\n );\n\n $this->processes[] = $process;\n }\n }", "function aggregateStats($pageid, $firstUrl, $firstHtmlUrl, $statusInfo) {\n\tglobal $gPagesTable, $gRequestsTable, $gUrlsTable;\n\t$link = getDBConnection();\n\n\t// CVSNO - move this error checking to the point before this function is called\n\tif ( ! $firstUrl ) {\n\t\tdprint(\"ERROR($gPagesTable pageid: $pageid): no first URL found.\");\n\t\treturn false;\n\t}\n\tif ( ! $firstHtmlUrl ) {\n\t\tdprint(\"ERROR($gPagesTable pageid: $pageid): no first HTML URL found.\");\n\t\treturn false;\n\t}\n\n\t// initialize variables for counting the page's stats\n\t$bytesTotal = 0;\n\t$reqTotal = 0;\n\t$hSize = array();\n\t$hCount = array();\n\t// This is a list of all mime types AND file formats that we care about.\n\tforeach(array(\"css\", \"image\", \"script\", \"html\", \"font\", \"other\", \"audio\", \"video\", \"text\", \"xml\", \"gif\", \"jpg\", \"png\", \"webp\", \"svg\", \"ico\", \"flash\", \"swf\", \"mp4\", \"flv\", \"f4v\") as $type) {\n\t\t// initialize the hashes\n\t\t$hSize[$type] = 0;\n\t\t$hCount[$type] = 0;\n\t}\n\t$hDomains = array();\n\t$maxageNull = $maxage0 = $maxage1 = $maxage30 = $maxage365 = $maxageMore = 0;\n\t$bytesHtmlDoc = $numRedirects = $numErrors = $numGlibs = $numHttps = $numCompressed = $maxDomainReqs = 0;\n\n\t$result = doQuery(\"select type, format, urlShort, resp_content_type, respSize, expAge, firstHtml, status, resp_content_encoding, req_host from $gRequestsTable where pageid = $pageid;\");\n\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t$url = $row['urlShort'];\n\t\t$prettyType = $row['type'];\n\t\t$respSize = intval($row['respSize']);\n\t\t$reqTotal++;\n\t\t$bytesTotal += $respSize;\n\t\t$hCount[$prettyType]++;\n\t\t$hSize[$prettyType] += $respSize;\n\n\t\t$format = $row['format'];\n\t\tif ( $format && (\"image\" === $prettyType || \"video\" === $prettyType) ) {\n\t\t\t$hCount[$format]++;\n\t\t\t$hSize[$format] += $respSize;\n\t\t}\n\n\t\t// count unique domains (really hostnames)\n\t\t$aMatches = array();\n\t\tif ( $url && preg_match('/http[s]*:\\/\\/([^\\/]*)/', $url, $aMatches) ) {\n\t\t\t$hostname = $aMatches[1];\n\t\t\tif ( ! array_key_exists($hostname, $hDomains) ) {\n\t\t\t\t$hDomains[$hostname] = 0;\n\t\t\t}\n\t\t\t$hDomains[$hostname]++; // count hostnames\n\t\t}\n\t\telse {\n\t\t\tdprint(\"ERROR($gPagesTable pageid: $pageid): No hostname found in URL: $url\");\n\t\t}\n\n\t\t// count expiration windows\n\t\t$expAge = $row['expAge'];\n\t\t$daySecs = 24*60*60;\n\t\tif ( NULL === $expAge ) {\n\t\t\t$maxageNull++;\n\t\t}\n\t\telse if ( 0 === intval($expAge) ) {\n\t\t\t$maxage0++;\n\t\t}\n\t\telse if ( $expAge <= (1 * $daySecs) ) {\n\t\t\t$maxage1++;\n\t\t}\n\t\telse if ( $expAge <= (30 * $daySecs) ) {\n\t\t\t$maxage30++;\n\t\t}\n\t\telse if ( $expAge <= (365 * $daySecs) ) {\n\t\t\t$maxage365++;\n\t\t}\n\t\telse {\n\t\t\t$maxageMore++;\n\t\t}\n\n\t\tif ( $row['firstHtml'] ) {\n\t\t\t$bytesHtmlDoc = $respSize; // CVSNO - can we get this UNgzipped?!\n\t\t}\n\n\t\t$status = $row['status'];\n\t\tif ( 300 <= $status && $status < 400 && 304 != $status ) {\n\t\t\t$numRedirects++;\n\t\t}\n\t\telse if ( 400 <= $status && $status < 600 ) {\n\t\t\t$numErrors++;\n\t\t}\n\n\t\tif ( 0 === stripos($url, \"https://\") ) {\n\t\t\t$numHttps++;\n\t\t}\n\n\t\tif ( FALSE !== stripos($row['req_host'], \"googleapis.com\") ) {\n\t\t\t$numGlibs++;\n\t\t}\n\n\t\tif ( \"gzip\" == $row['resp_content_encoding'] || \"deflate\" == $row['resp_content_encoding'] ) {\n\t\t\t$numCompressed++;\n\t\t}\n\t}\n\tmysqli_free_result($result);\n\t$numDomains = count(array_keys($hDomains));\n\tforeach (array_keys($hDomains) as $domain) {\n\t\t$maxDomainReqs = max($maxDomainReqs, $hDomains[$domain]);\n\t}\n\n\t$cmd = \"UPDATE $gPagesTable SET reqTotal = $reqTotal, bytesTotal = $bytesTotal\" .\n\t\t\", reqHtml = \" . $hCount['html'] . \", bytesHtml = \" . $hSize['html'] .\n\t\t\", reqJS = \" . $hCount['script'] . \", bytesJS = \" . $hSize['script'] .\n\t\t\", reqCSS = \" . $hCount['css'] . \", bytesCSS = \" . $hSize['css'] .\n\t\t\", reqImg = \" . $hCount['image'] . \", bytesImg = \" . $hSize['image'] .\n\t\t\", reqGif = \" . $hCount['gif'] . \", bytesGif = \" . $hSize['gif'] .\n\t\t\", reqJpg = \" . $hCount['jpg'] . \", bytesJpg = \" . $hSize['jpg'] .\n\t\t\", reqPng = \" . $hCount['png'] . \", bytesPng = \" . $hSize['png'] .\n\t\t\", reqFlash = \" . $hCount['flash'] . \", bytesFlash = \" . $hSize['flash'] .\n\t\t\", reqFont = \" . $hCount['font'] . \", bytesFont = \" . $hSize['font'] .\n\t\t\", reqOther = \" . $hCount['other'] . \", bytesOther = \" . $hSize['other'] .\n\t\t\", reqAudio = \" . $hCount['audio'] . \", bytesAudio = \" . $hSize['audio'] .\n\t\t\", reqVideo = \" . $hCount['video'] . \", bytesVideo = \" . $hSize['video'] .\n\t\t\", reqText = \" . $hCount['text'] . \", bytesText = \" . $hSize['text'] .\n\t\t\", reqXml = \" . $hCount['xml'] . \", bytesXml = \" . $hSize['xml'] .\n\t\t\", reqWebp = \" . $hCount['webp'] . \", bytesWebp = \" . $hSize['webp'] .\n\t\t\", reqSvg = \" . $hCount['svg'] . \", bytesSvg = \" . $hSize['svg'] .\n\t\t\", numDomains = $numDomains\" .\n\t\t\", maxageNull = $maxageNull\" .\n\t\t\", maxage0 = $maxage0\" .\n\t\t\", maxage1 = $maxage1\" .\n\t\t\", maxage30 = $maxage30\" .\n\t\t\", maxage365 = $maxage365\" .\n\t\t\", maxageMore = $maxageMore\" .\n\t\t( $bytesHtmlDoc ? \", bytesHtmlDoc = $bytesHtmlDoc\" : \"\" ) .\n\t\t\", numRedirects = $numRedirects\" .\n\t\t\", numErrors = $numErrors\" .\n\t\t\", numGlibs = $numGlibs\" .\n\t\t\", numHttps = $numHttps\" .\n\t\t\", numCompressed = $numCompressed\" .\n\t\t\", maxDomainReqs = $maxDomainReqs\" .\n\t\t\", wptid = \" . \"'\" . mysqli_real_escape_string($link, $statusInfo['wptid']) . \"'\" . \n\t\t\", wptrun = \" . $statusInfo['medianRun'] . \n\t\t( $statusInfo['rank'] ? \", rank = \" . $statusInfo['rank'] : \"\" ) .\n\t\t\" where pageid = $pageid;\";\n\tdoSimpleCommand($cmd);\n\n\treturn true;\n}", "public function stats()\n {\n }", "public function _process_output_cache()\n {\n $this->_check_if_need_to_cache();\n if ( ! $this->OUTPUT_CACHING || $_SERVER['REQUEST_METHOD'] != 'GET' || MAIN_TYPE_ADMIN || $this->NO_NEED_TO_CACHE) {\n return false;\n }\n if (DEBUG_MODE) {\n $time_start = microtime(true);\n }\n $cache_key = $this->CACHE_NS . $this->_get_page_cache_name();\n /*\n if ($this->USE_MEMCACHED) {\n // Remove old page from cache (force)\n if (conf('refresh_output_cache')) {\n $this->_memcache->del($cache_key);\n return false;\n }\n } else {\n // Prepare path to the current page cache\n $this->CACHE_FILE_PATH = $this->_prepare_cache_path();\n // Try to process output cache file\n if (!file_exists($this->CACHE_FILE_PATH)) {\n // Do create empty file to lock current page creation from being used\n file_put_contents($this->CACHE_FILE_PATH, '');\n return false;\n }\n // Get cache last modification time\n $cache_last_modified_time = filemtime($this->CACHE_FILE_PATH);\n // Check if file is locked for generation (prevent parallel creation)\n if (filesize($this->CACHE_FILE_PATH) < 5) {\n // Remove old lock\n $lock_ttl = 600;\n if ($cache_last_modified_time < (time() - $lock_ttl)) {\n unlink($this->CACHE_FILE_PATH);\n }\n return false;\n }\n // Remove old page from cache\n if (($this->OUTPUT_CACHE_TTL != 0 && $cache_last_modified_time < (time() - $this->OUTPUT_CACHE_TTL)) || conf('refresh_output_cache')) {\n unlink($this->CACHE_FILE_PATH);\n return false;\n }\n }\n */\n/*\n main()->_IN_OUTPUT_CACHE = true;\n\n $this->_post_filter();\n*/\n/*\n if ($this->USE_MEMCACHED) {\n $mc_result = $this->_memcache->get($this->CACHE_NS. $cache_key);\n if (DEBUG_MODE) {\n debug('output_cache::size', strlen($mc_result));\n }\n if (empty($mc_result)) {\n return false;\n }\n if ($this->OUTPUT_CACHE_INCLUDE) {\n eval('?>'.$mc_result.'<?php ');\n } else {\n echo $mc_result;\n }\n } else {\n if (DEBUG_MODE) {\n debug('output_cache::size', filesize($this->CACHE_FILE_PATH));\n }\n if ($this->OUTPUT_CACHE_INCLUDE) {\n include ($this->CACHE_FILE_PATH);\n } else {\n echo file_get_contents($this->CACHE_FILE_PATH);\n }\n }\n*/\n/*\n $output = ob_get_clean();\n if (DEBUG_MODE) {\n debug('output_cache::exec_time', microtime(true) - $time_start);\n }\n if (DEBUG_MODE || conf('exec_time')) {\n echo common()->_show_execution_time();\n }\n if (DEBUG_MODE) {\n echo common()->show_debug_info();\n }\n $this->_send_http_headers($cache_last_modified_time);\n ob_end_flush();\n main()->NO_GRAPHICS = true;\n\n exit();\n*/\n }", "protected function analyzeCachingTables() {}", "public function saveToCacheForever();", "public function run() {\n\t\t$this->updateProjectCounterCache();\n\t\t$this->updateUserCounterCache();\n\t}", "public function refreshCache() {\n\t\t$this->_cache->clean(Zend_Cache::CLEANING_MODE_ALL);\n\t\t$this->_loadTableNames();\n\n\t\t$this->_tableInfo = array();\n\t}", "function update_finished($success, $results, $operations) {\n drupal_flush_all_caches();\n\n $_SESSION['update_results'] = $results;\n $_SESSION['update_success'] = $success;\n $_SESSION['updates_remaining'] = $operations;\n}", "public function __destruct()\n {\n if ($this->args->has('profile'))\n {\n $td = microtime(true) - $this->time_start;\n $td = $td < 1 ? round($td * 1000, 2) . \"ms\" : round($td, 2) . \"s\";\n $mem = round(memory_get_peak_usage(false) / 1048576, 2) . \" MB\";\n printf(\"\\nRuntime: %s - mem: %s\", $td, $mem);\n }\n }", "protected function get_stats()\n\t{\n\t\tif ($this->index_created())\n\t\t{\n\t\t\t$sql = 'SELECT COUNT(post_id) as total_posts\n\t\t\t\tFROM ' . POSTS_TABLE;\n\t\t\t$result = $this->db->sql_query($sql);\n\t\t\t$this->stats['total_posts'] = (int) $this->db->sql_fetchfield('total_posts');\n\t\t\t$this->db->sql_freeresult($result);\n\n\t\t\t$sql = 'SELECT COUNT(p.post_id) as main_posts\n\t\t\t\tFROM ' . POSTS_TABLE . ' p, ' . SPHINX_TABLE . ' m\n\t\t\t\tWHERE p.post_id <= m.max_doc_id\n\t\t\t\t\tAND m.counter_id = 1';\n\t\t\t$result = $this->db->sql_query($sql);\n\t\t\t$this->stats['main_posts'] = (int) $this->db->sql_fetchfield('main_posts');\n\t\t\t$this->db->sql_freeresult($result);\n\t\t}\n\t}", "private function flushFileCachedValues() {\n\n foreach ( $this->getSheetNames( true ) as $sheet ) {\n\n $this->setActiveSheet( $sheet, 'name' );\n $this->activeSheet->updateCalculations();\n $this->saveActiveSheetChanges();\n }\n\n }", "public function after_optimize() {\n\t\t$message = sprintf(_n('%s unused comment metadata item removed', '%s unused comment metadata items removed', $this->processed_trash_count, 'wp-optimize'), number_format_i18n($this->processed_trash_count));\n\t\t$message1 = sprintf(_n('%s unused akismet comment metadata item removed', '%s unused akismet comment metadata items removed', $this->processed_akismet_count, 'wp-optimize'), number_format_i18n($this->processed_akismet_count));\n\n\t\tif ($this->is_multisite_mode()) {\n\t\t\t$blogs_count_text = ' '.sprintf(_n('across %s site', 'across %s sites', count($this->blogs_ids), 'wp-optimize'), count($this->blogs_ids));\n\t\t\t$message .= $blogs_count_text;\n\t\t\t$message1 .= $blogs_count_text;\n\t\t}\n\n\t\t$this->logger->info($message);\n\t\t$this->register_output($message);\n\n\t\t$this->logger->info($message1);\n\t\t$this->register_output($message1);\n\t}", "public function updateAnalysis() {\n return;\n }", "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}", "public function process() {\r\n\r\n\t\trequire_once('t3lib/class.t3lib_tcemain.php');\r\n\t\t$tce = t3lib_div::makeInstance('t3lib_tcemain');\r\n\t\t$tce->clear_cacheCmd($GLOBALS['TSFE']->id);\r\n\t\treturn $this->gp;\r\n\t}", "abstract protected function cacheData();", "function process() {\n return 0;\n }", "public function getStatsHierarchical()\n\t{\n\t $this->load->model('tasks');\n\t $this->tasks->truncate('stats');\n\t echo \"<pre>\";\n\t $this->load->model('configuration');\n\t $dbList = $this->configuration->getDBList();\n\t foreach($dbList->result() as $db) {\n\t $this->tasks->pullStatsHierarchical($db->dbGroup,$db->friendlyName);\n\t }\n \t$this->_updateCronStats();\n\t}", "public static function flushCache()\n {\n self::$cache = array();\n }", "function wp_cache_flush_runtime()\n {\n }", "private function parse()\n {\n $this->info('Start profiles refresh...');\n // Load the file and\n // parse the csv format\n $path = storage_path(config('constants.stations_infos_path'));\n\n if (($pointer = fopen($path, 'r')))\n {\n DB::beginTransaction();\n $first = true;\n $this->info('Parsing CSV profiles...');\n while (($line = fgetcsv($pointer, 0, ';')))\n {\n // Ignore the first header line\n if (! $first)\n {\n $this->refresh($line);\n }\n $first = false;\n }\n fclose($pointer);\n\n if ($this->commit)\n {\n $this->info('Done. Saving changes...');\n DB::commit();\n }\n else\n {\n $this->info('Error, rollback changes!');\n DB::rollBack();\n }\n }\n }", "public function endProfile($token){\n\t\t$log = $this->_profiles[$token];\n $log[0] = \"End Profiling $token\";\n\t\t$this->_logs[] = $log;\n\t\t$this->_profiles[$token]['result'] = microtime(true) - $this->_profiles[$token][3];\n\t\t$this->_profiles[$token]['memory'] = $this->memory_used() - $this->_profiles[$token]['startmem'];\n\t}", "private function endScript($st_Time='')\n {\n $end_time = microtime(TRUE);\n $var = memory_get_usage(true);\n\n if ($var < 1024)\n $mem = $var.\" bytes\";\n elseif ($var < 1048576)\n $mem = round($var/1024,2).\" kilobytes\";\n else\n $mem = round($var/1048576,2).\" megabytes\";\n \n if($this->m_bDebugInfo)\n {\n $this->logSection('Memory usages : ', $mem);\n $this->logSection('Time taken : ', $end_time - $st_Time);\n }\n }", "public function BasicInfo(){\n\t\t$this->pointlist = new CachedArrayList();\n\t\t$this->clusterlist = new CachedArrayList(ListNames::CLUSTERLISTNAME);\n\t\t$this->masterlist = new CachedArrayList(ListNames::MASTERPOINTLISTNAME);\n\t\t$this->outlierlist = new CachedArrayList(ListNames::OUTLYINGPOINTLISTNAME);\n\t\t$this->sse = new SSE();\n\t\t$this->cache = new Cache();\n\t\t\n\t\t$info = $this->cache->getCacheInfo();\n\t\t\n\t\t$this->sse->start();\n\t\t\n\t\t$oldpointsize = -1;\n\t\t$oldmemory = -1;\n\t\t$oldclustersize = -1;\n\t\t$oldoutliersize = -1;\n\t\t$oldmastersize = -1;\n\t\twhile (true){\n\t\t\t$size = $this->pointlist->size();\n\t\t\tif($oldpointsize != $size){\n\t\t\t\t$oldpointsize = $size;\n\t\t\t\t$this->sse->sendData(\"pointsize\", $size);\n\t\t\t}\n\t\t\t\n\t\t\t$size = $this->clusterlist->size();\n\t\t\tif($oldclustersize != $size){\n\t\t\t\t$oldclustersize = $size;\n\t\t\t\t$this->sse->sendData(\"clustersize\", $size);\n\t\t\t}\n\t\t\t\n\t\t\t$size = $this->masterlist->size();\n\t\t\tif($oldmastersize != $size){\n\t\t\t\t$oldmastersize = $size;\n\t\t\t\t$this->sse->sendData(\"mastersize\", $size);\n\t\t\t}\n\t\t\t\n\t\t\t$size = $this->outlierlist->size();\n\t\t\tif($oldoutliersize != $size){\n\t\t\t\t$oldoutliersize = $size;\n\t\t\t\t$this->sse->sendData(\"outliersize\", $size);\n\t\t\t}\n\t\t\t\n\t\t\t$info = $this->cache->getCacheInfo();\n\t\t\t$memory = round($info[\"mem_size\"]/1000, 2);\n\t\t\t\n\t\t\tif($memory != $oldmemory){\n\t\t\t\t$oldmemory = $memory;\n\t\t\t\t$this->sse->sendData(\"usedmemory\", $memory);\n\t\t\t}\n\t\t\t\n\t\t\t// sover i 1 sec\n\t\t\tsleep(1);\n\t\t}\n\t}", "function InPlaceCache_cacheHit(&$cacheOutput, &$parser)\r\n{\r\n\t/*\r\n\t\tMerge the stored ParserOutput with the current one to ensure things like template link dependencies get updated correctly\r\n\t*/\r\n\tInPlaceCache_mergeParserOutputTo($parser->mOutput, $cacheOutput);\r\n\t\r\n\treturn $cacheOutput->getText();\r\n}", "abstract protected function clearCache();", "public function flushCache();", "public function clearCachedDefinitions();", "protected function calculatePageCacheTimeout() {}", "protected function afterSave(){\n\t\tparent::afterSave();\n\t\t\n\t\tYii::app()->cache->delete('sponsorsAdDisplayPercent');\n\t}", "protected function doGetStats()\n {\n $info = $this->yac->info();\n\n return array(\n Cache::STATS_HITS => $info['hits'],\n Cache::STATS_MISSES => $info['miss'],\n Cache::STATS_UPTIME => 0,\n Cache::STATS_MEMORY_USAGE => 0,\n Cache::STATS_MEMORY_AVAILABLE => 0,\n );\n }", "protected function setMemory()\n {\n if (empty($this->memory)) {\n $meminfo = $this->readFile(self::FILE_MEMINFO, true);\n\n preg_match(\"/(\\d+)/\", $meminfo[0], $matches);\n $this->memory['total'] = $matches[1];\n\n preg_match(\"/(\\d+)/\", $meminfo[2], $matches);\n $this->memory['available'] = $matches[1];\n $this->memory['used'] = $this->memory['total'] - $this->memory['available'];\n }\n }" ]
[ "0.55138963", "0.54980993", "0.5493032", "0.54116476", "0.5400537", "0.5372186", "0.5370113", "0.5339954", "0.5339462", "0.5280427", "0.52359015", "0.51532537", "0.51424515", "0.5120536", "0.51201475", "0.50544363", "0.50503665", "0.5047164", "0.5035324", "0.5009194", "0.5007863", "0.4974323", "0.49629465", "0.49578118", "0.49473697", "0.49345908", "0.49258354", "0.49217856", "0.4910423", "0.49060655", "0.4902835", "0.48778975", "0.48692316", "0.48674402", "0.4857052", "0.48430938", "0.48259398", "0.48117268", "0.48076633", "0.47992277", "0.4786751", "0.47755638", "0.4775017", "0.47708002", "0.47627547", "0.475608", "0.47538638", "0.4751304", "0.47414818", "0.4737748", "0.47345802", "0.47107613", "0.47106037", "0.47090247", "0.47066465", "0.4705435", "0.47018987", "0.46977678", "0.469148", "0.4686486", "0.46744403", "0.46716216", "0.46688548", "0.4668619", "0.4665585", "0.46523958", "0.46487138", "0.46458742", "0.46412358", "0.46401504", "0.4636945", "0.46330702", "0.461878", "0.46136633", "0.46131346", "0.46102062", "0.46094224", "0.46087825", "0.4606331", "0.46050817", "0.46050665", "0.46048895", "0.46013275", "0.45999908", "0.4598922", "0.45983052", "0.4595504", "0.4594197", "0.45909184", "0.45908958", "0.45812476", "0.45769596", "0.4570638", "0.45667928", "0.4564394", "0.4560821", "0.45595473", "0.45587498", "0.45483458", "0.45447817" ]
0.4926496
26
Get the current cache storage instance.
public function getCacheStorage(): CacheStorageInterface { return $this->storage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStorage()\n {\n if($this->_storageInstance == null)\n {\n $storageClass = $this->_storageClass;\n $this->_storageInstance = new $storageClass($this->_storageConfig);\n $this->_storageInstance->setMapperInstance($this);\n }\n return $this->_storageInstance;\n }", "public function getStorage()\n {\n if (null === $this->storage) {\n $this->setStorage();\n }\n return $this->storage;\n }", "function _getStorage()\n {\n if ($this->_handler instanceof CacheStorage) {\n return $this->_handler;\n }\n\n $this->_handler = CacheStorage::getInstance($this->_options['storage'], $this->_options);\n if ($this->_handler != null) {\n if ($this->_handler->test()) {\n return $this->_handler;\n } else {\n $this->_handler = CacheStorage::getInstance('file', $this->_options);\n return $this->_handler;\n }\n } else {\n return null;\n }\n }", "public function getInstanceStorage() {\n if (null == $this->instanceStorage) {\n $this->instanceStorage = new InstanceStorage();\n }\n\n return $this->instanceStorage;\n }", "public function &_getStorage()\n\t{\n\t\t$hash = md5(serialize($this->_options));\n\n\t\tif (isset(self::$_handler[$hash]))\n\t\t{\n\t\t\treturn self::$_handler[$hash];\n\t\t}\n\n\t\tself::$_handler[$hash] = TCacheStorage::getInstance($this->_options['storage'], $this->_options);\n\n\t\treturn self::$_handler[$hash];\n\t}", "public function getStorage(): StorageInterface\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->get(self::_STORAGE);\n }", "public function getStorage()\n {\n return $this->_storage;\n }", "public function getStorage() {\n\t\treturn $this->_storage;\n\t}", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\n {\n return $this->storage;\n }", "public function getStorage()\r\n {\r\n return $this->storage;\r\n }", "function getStorage()\n{\n\tif (!$this->storage) $this->storage = new AuthDbStorage;\n\treturn $this->storage;\t\n}", "public function getStorage(): StorageInterface\n {\n return $this->configuration[ConfigurationInterface::STORAGE];\n }", "public function getStorage()\n {\n return Controllers\\StorageController::getInstance();\n }", "public static function getStorage() {}", "protected function getStorage()\n{\n\tglobal $pclib;\n\tif (!$this->storage) $this->storage = new TranslatorDbStorage($this);\n\treturn $this->storage;\n}", "public function get()\n {\n if (!$this->storage->has(self::STORAGE_KEY)) {\n $this->update();\n }\n return $this->storage->get(self::STORAGE_KEY);\n }", "private function getStorage()\n {\n if (empty($this->storage)) {\n $this->storage = $this->wizardStorageFactory->create([\n 'key' => $this->getRequest()->getParam(UrlBuilder::REQUEST_PARAM_CONFIGURE_KEY)\n ]);\n }\n return $this->storage;\n }", "public function getCacheStore(): Store|null;", "public function getStorage();", "public function getStorage();", "public function getStorage() {}", "public function getStorage() {}", "public function getStorage() {}", "public function getCache() {\n\t\treturn $this->get('Cundd\\\\Rest\\\\Cache\\\\Cache');\n\t}", "protected function getSessionStorage()\n {\n if (! $this->storage) {\n $this->storage = $this->getServiceLocator()\n ->get('cp_user_auth_storage');\n }\n\n return $this->storage;\n }", "public static function getCache()\n {\n return self::$_cache;\n }", "protected function getStorage()\n {\n return unserialize(Session::retrieve(__NAMESPACE__));\n }", "protected function getCache()\n {\n return $this->cache;\n }", "public function getCache() {\n\t\t$this->sync();\n\t\treturn $this->cache;\n\t}", "public function initStorage()\n {\n $dbMasterConfig = C(self::$dbKey);\n $this->storage = $this->getDbInstance($dbMasterConfig);\n $this->setTableName($dbMasterConfig);\n\n return $this->storage;\n }", "public function getStorage()\n {\n if (NULL === $this->_storage) {\n $this->setStorage(new Auth\\Storage\\MultipleIdentities());\n }\n \n return $this->_storage;\n }", "public static function getCache()\n\t{\n\t\tif (null === self::$_cache) {\n\t\t\tself::setCache(Zend_Cache::factory(\n\t\t\t\tnew Core_Cache_Frontend_Runtime(),\n\t\t\t\tnew Core_Cache_Backend_Runtime()\n\t\t\t));\n\t\t}\n\t\n\t\treturn self::$_cache;\n\t}", "public function getCache() {\n\n // return our instance of Cache\n return $this->oCache;\n }", "public function getCache()\n {\n return $this->get('cache', false);\n }", "public function getCache(): Cache\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->cache;\n }", "public function getCache()\n {\n return $this->Cache;\n }", "public function getCurrentStorage() {\n return @$this->attributes['current_storage'];\n }", "public function get()\n {\n return Cache::get($this->cacheKey);\n }", "public function getCache()\n {\n return $this->_cache;\n }", "public function cache(): object\n {\n return $this->baseApp($this)->loadCache();\n }", "public function getCache()\r\n\t{\r\n\t\treturn $this->m_cache;\r\n\t}", "public function getCache()\n\t{\n\t\treturn $this->cache;\n\t}", "public function getCache()\n\t{\n\t\treturn CacheBot::get($this->getCacheKey(), self::$objectCacheLife);\n\t}", "public function getCache()\r\n\t{\r\n\t\treturn \\Bitrix\\Main\\Data\\Cache::createInstance();\r\n\t}", "public function getCaching()\n {\n return (!is_null($this->_cache) ? $this->_cache : Cache::instance('redis'));\n }", "protected function get_cache() {\n\t\n // uncomment next line to flush previous cache\n\t //delete_transient($this->get_cache_id()); \n\t\n \treturn get_transient( $this->get_cache_id() ); \t \n\t}", "public function getStorageService();", "public function storage($storage)\n\t{\n\t\treturn $this->storage->get($storage);\n\t}", "public function getCache() {\n return $this->cache;\n }", "public function cache()\n {\n return $this->cache;\n }", "public function getCache()\r\n {\r\n \treturn $this->_cache;\r\n }", "public static function getInstance($type = 'file', $options = array())\r\n\t{\r\n\t\treturn TCacheStorage::getInstance($type, $options);\r\n\t}", "public static function getCache()\n\t{\n\t if (!self::$cache) {\n\t\t\t$frontendOptions = array('lifetime' => 604800, \n\t\t\t\t\t\t\t\t\t 'automatic_serialization' => true);\n\t\t\t$backendOptions = array('cache_dir' => APPLICATION_PATH . '/../data/cache');\n\t\t\tself::$cache \t = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);\n\t }\n\t\treturn self::$cache;\n\t}", "function getCache() {\n return $this->cache;\n }", "function getStorageEngine() {\n \treturn $this->storage_engine;\n }", "public function getCache()\n\t{\n\t\treturn ($this->_cache);\n\t}", "public function getSessionStorage()\n {\n if (! $this->storage) {\n $this->storage = $this->getServiceLocator()\n ->get('Application\\Event\\MyAuthStorage');\n }\n return $this->storage;\n }", "public static function getInstance()\n {\n if (!isset(self::$instance)) {\n switch (CACHE_TYPE) {\n case CacheType::apc:\n self::$cache = new APC();\n break;\n case CacheType::eaccelerator:\n self::$cache = new eAccelerator;\n break;\n case CacheType::xcache:\n self::$cache = new XCache;\n break;\n case CacheType::file:\n self::$cache = new File;\n break;\n\n case CacheType::none:\n default:\n self::$cache = new NoCache;\n break;\n }\n\n $c = __CLASS__;\n self::$instance = new $c;\n }\n\n return self::$instance;\n }", "public function get()\n {\n $file_path = $this->path();\n\n if (Storage::exists($file_path)) {\n\n return Storage::get($file_path);\n\n }\n }", "protected function getCache()\n {\n return Mage::app()->getCache();\n }", "protected function getCache()\n {\n return Mage::app()->getCache();\n }", "function getCache() {\n return $this->cache;\n }", "public static function get($cacheName='_'){\n\t\tif(!isset(self::$_instances[$cacheName]))\n\t\t\tself::$_instances[$cacheName]=CCache::create(self::$_config[$cacheName]);\n\t\treturn self::$_instances[$cacheName];\n\t}", "protected function _getCache()\n\t{\n\t\t/**\n\t\t * @todo needs to be adjusted for use with Zend_Cache_Manager\n\t\t */\n\t\treturn self::$_cache;\n\n\t}", "public function storage(): FilesystemAdapter\n {\n return Storage::disk($this->getDiskName());\n }", "function getStorage();", "public function getCache() {\n if( null === $this->_cache ) {\n $this->_cache = Zend_Cache::factory\n ( $this->_frontend\n , $this->_backend\n , $this->_frontendOptions\n , $this->_backendOptions\n );\n }\n return $this->_cache;\n }", "public function cache() {\n\t\treturn $this->_cache;\n\t}", "public static function getCache() {\n\t\treturn null;\n\t}", "public function getStorageClass()\n {\n return $this->_storageClass;\n }", "public function getStorageClass()\n {\n return $this->storage_class;\n }", "function getStorage() ;", "public function getSymbolStorage() {\n if (null == $this->symbolStorage) {\n $this->symbolStorage = new SymbolStorage();\n }\n\n return $this->symbolStorage;\n }", "function getCache() {\n\t\tif (!is_a($this->_cache, 'PubObjectCache')) {\n\t\t\t// Instantiate the cache.\n\t\t\timport('classes.plugins.PubObjectCache');\n\t\t\t$this->_cache = new PubObjectCache();\n\t\t}\n\t\treturn $this->_cache;\n\t}", "public function getStorageService()\n {\n $class = $this->app['config']->get('shoppingcart.storage','session');\n\n switch ($class)\n {\n case 'session':\n return 'session';\n break;\n case 'database':\n return 'database';\n break;\n default:\n return 'session';\n break;\n }\n }", "static public function cache($provider = null) {\n $impl = self::instance();\n return $impl->get_resource('cache', $provider);\n }", "abstract protected function getStorage(): StorageInterface;", "private function getStore() {\n if (NULL === $this->obj_store) {\n $this->obj_store = new Store($this->makeSchema());\n }\n return $this->obj_store;\n }", "static public function getCache(){\n return static::$cache;\n }", "protected function getFromCache()\n {\n return $this->cache->get($this->getCacheKey());\n }", "public static function getInstance()\n {\n if (self::$instance == null) {\n self::$instance = new DBStorageAdapter();\n\n self::$instance->setStateHash(self::getStateHash());\n self::$instance->init();\n }\n \n return self::$instance;\n }", "public function getCache()\n {\n return Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('cachemanager')->getCache( 'frontcore' );\n }", "public function get_storage_unit()\n {\n return $this->storage_unit;\n }", "public static function getStorage($mountPoint) {\n\t\tif (!self::$mounts) {\n\t\t\t\\OC_Util::setupFS();\n\t\t}\n\t\t$mount = self::$mounts->find($mountPoint);\n\t\treturn $mount->getStorage();\n\t}" ]
[ "0.77159727", "0.7692149", "0.7602252", "0.75962543", "0.7593023", "0.75266165", "0.751827", "0.7460767", "0.7439358", "0.7403198", "0.7403198", "0.7403198", "0.7403198", "0.7403198", "0.7403198", "0.7403198", "0.7403198", "0.7403198", "0.7349725", "0.7345112", "0.7220292", "0.70425326", "0.70228887", "0.6997328", "0.6986788", "0.69768566", "0.69605434", "0.6949104", "0.6949104", "0.6949033", "0.6948225", "0.6947201", "0.6947156", "0.6926804", "0.6907035", "0.6887517", "0.684219", "0.6817611", "0.6810989", "0.68070346", "0.6803257", "0.677555", "0.6751227", "0.67390585", "0.6735861", "0.6735861", "0.6735861", "0.6735861", "0.6735861", "0.6735861", "0.6735861", "0.67336017", "0.67164654", "0.6708377", "0.6702714", "0.66918194", "0.6674842", "0.66655654", "0.66558903", "0.66544616", "0.6648386", "0.6618217", "0.6598356", "0.6591619", "0.658427", "0.6577848", "0.6555114", "0.65535146", "0.6546299", "0.65234005", "0.6513877", "0.6512193", "0.64811003", "0.64726675", "0.6467332", "0.6447568", "0.6447568", "0.6428229", "0.64247316", "0.6420493", "0.64120203", "0.6394734", "0.6388829", "0.6373126", "0.63462526", "0.6345522", "0.6333897", "0.6322523", "0.6319993", "0.6315231", "0.63090277", "0.6307243", "0.6305522", "0.63042384", "0.6290464", "0.627239", "0.6267895", "0.6232961", "0.6215041", "0.6214218" ]
0.835624
0
Creates a default cache storage corresponding to $options
private static function createCacheStorage(array $options): CacheStorageInterface { $options = array_merge( array( 'adapter' => 'DoctrineCacheAdapter', 'backend' => array( 'class' => 'Doctrine\Common\Cache\FilesystemCache', 'args' => array('%{TEMP}/bartlett/cache'), ), ), $options ); if (!isset($options['adapter'])) { throw new InvalidArgumentException('Adapter is missing'); } $adapterClass = $options['adapter']; if (strpos($adapterClass, '\\') === false) { // add default namespace $adapterClass = __NAMESPACE__ . '\Cache\\' . $adapterClass; } if (!class_exists($adapterClass)) { throw new InvalidArgumentException( sprintf( 'Adapter "%s" cannot be loaded.', $adapterClass ) ); } if (!isset($options['backend']['class'])) { throw new InvalidArgumentException( sprintf( 'Backend is missing for %s', $adapterClass ) ); } $backendClass = $options['backend']['class']; if (!class_exists($backendClass)) { throw new InvalidArgumentException( sprintf( 'Backend "%s" cannot be loaded.', $backendClass ) ); } $rc = new ReflectionClass($backendClass); if (isset($options['backend']['args'])) { $args = self::replaceTokens($options['backend']['args']); } else { $args = array(); } $backend = $rc->newInstanceArgs($args); $cacheAdapter = new $adapterClass($backend); return new DefaultCacheStorage($cacheAdapter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createCache($options)\n {\n return null;\n }", "public function cache($options = true);", "public static function getInstance($type = 'file', $options = array())\r\n\t{\r\n\t\treturn TCacheStorage::getInstance($type, $options);\r\n\t}", "public function getCacheOptions();", "public function createCache(string $driverName, array $options=null): \\Nofuzz\\SimpleCache\\CacheInterface;", "public function setCacheOptions($options);", "protected function _initCache() {\n\t\t$options = $this->getOptions();\n\t\tswitch($options['cache']) {\n\t\t\tcase 'apc':\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\ApcCache();\n\t\t\tbreak;\n\n\t\t\tcase 'memcache':\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\MemcacheCache();\n\t\t\tbreak;\n\n\t\t\tcase 'xcache':\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\XcacheCache();\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$cache = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\t\t}\n\n// \t\t$this->_config->setMetadataCacheImpl($cache);\n// \t\t$this->_config->setQueryCacheImpl($cache);\n\t}", "private function set_storage() {\r\n if (!is_array($this->cache_handler) && !empty($this->cache_handler)) {\r\n $this->cache_handler = array($this->cache_handler);\r\n }\r\n\r\n foreach ($this->cache_handler as $handler) {\r\n if ((extension_loaded($handler) || $handler == 'File') && class_exists('TS3ViewerStorage' . $handler)) {\r\n $handler = 'TS3ViewerStorage' . $handler;\r\n $this->cache = new $handler;\r\n break;\r\n }\r\n }\r\n\r\n if ($this->cache === null && class_exists('TS3ViewerStorageFile')) {\r\n $this->cache = new TS3ViewerStorageFile;\r\n }\r\n elseif ($this->cache === null) {\r\n $this->errors[] = 'no cache handler found..';\r\n return;\r\n }\r\n $this->cache_handler = get_class($this->cache);\r\n if ($this->cache_handler == 'TS3ViewerStorageFile') {\r\n $this->cache->path = $this->cache_path;\r\n }\r\n\r\n $this->cache->timeout = $this->cache_timeout;\r\n }", "protected function loadDefaultStorageEngine() {\n\t\t//Create a cache config\n\t\tCache::config($this->defaultCacheName, array(\n\t\t\t\t'engine' => 'Apc',\n\t\t\t\t'path' => CACHE,\n\t\t\t\t'prefix' => 'rate_limiter'\n\t\t));\n\t\t$this->storageEngine = new RateLimitCakeCacheAdapter($this->defaultCacheName);\n\t}", "public static function getInstance($handler = 'file', $options = array())\n {\n static $now = null;\n if (is_null($now)) {\n $now = time();\n }\n $options['now'] = $now;\n //We can't cache this since options may change...\n $handler = strtolower(preg_replace('/[^A-Z0-9_\\.-]/i', '', $handler));\n $class = 'CacheStorage' . ucfirst($handler);\n if (!class_exists($class)) {\n $path = dirname(__FILE__) . DS . 'storage' . DS . $handler . '.php';\n require_once($path);\n }\n $return = new $class($options);\n return $return;\n }", "public function __construct ($options)\r\n {\r\n \t//echo get_class($options);exit;\r\n \tif (get_class($options) == 'Zend_Cache_Core'){\r\n \t\t$this->cache = $options;\r\n \t} else {\r\n\t if ($options instanceof Zend_Config) {\r\n\t $options = $options->toArray();\r\n\t }\r\n\t if (! is_array($options)) {\r\n\t throw new Exception('Invalid cache options; must be array or Zend_Config object');\r\n\t }\r\n\t if (array('frontend' , 'backend' , 'frontendOptions' , 'backendOptions') != array_keys($options)) {\r\n\t throw new Exception('Invalid cache options provided');\r\n\t }\r\n\t $options['frontendOptions']['automatic_serialization'] = true;\r\n\t $this->cache = Zend_Cache::factory($options['frontend'], $options['backend'], $options['frontendOptions'], $options['backendOptions']);\r\n \t}\r\n }", "public function __construct( $options = array() )\n {\n $this->properties['ttl'] = 86400;\n $this->properties['extension'] = '.cache';\n parent::__construct( $options );\n }", "public function getDefaultCacheStore(): Store|null;", "public static function getInstance($handler = null, $options = array())\n\t{\n\t\tstatic $now = null;\n\n\t\tself::addIncludePath(JPATH_PLATFORM . '/joomla/cache/storage');\n\n\t\tif (!isset($handler))\n\t\t{\n\t\t\t$conf = JFactory::getConfig();\n\t\t\t$handler = $conf->get('cache_handler');\n\t\t\tif (empty($handler))\n\t\t\t{\n\t\t\t\tthrow new UnexpectedValueException('Cache Storage Handler not set.');\n\t\t\t}\n\t\t}\n\n\t\tif (is_null($now))\n\t\t{\n\t\t\t$now = time();\n\t\t}\n\n\t\t$options['now'] = $now;\n\n\t\t// We can't cache this since options may change...\n\t\t$handler = strtolower(preg_replace('/[^A-Z0-9_\\.-]/i', '', $handler));\n\n\t\t$class = 'JCacheStorage' . ucfirst($handler);\n\t\tif (!class_exists($class))\n\t\t{\n\t\t\t// Search for the class file in the JCacheStorage include paths.\n\t\t\tjimport('joomla.filesystem.path');\n\t\t\tif ($path = JPath::find(self::addIncludePath(), strtolower($handler) . '.php'))\n\t\t\t{\n\t\t\t\tinclude_once $path;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new RuntimeException(sprintf('Unable to load Cache Storage: %s', $handler));\n\t\t\t}\n\t\t}\n\n\t\treturn new $class($options);\n\t}", "public function __construct(Array $options = array())\n {\n $this->setCacheOptions($options);\n }", "public function __construct($options = array()) {\n\t\t$default = array(\n\t\t\t'cachePath' => dirname(dirname(dirname(__FILE__))) . DS . 'webroot' . DS . 'img' . DS . get_class($this) . DS,\n\t\t\t'cacheImagePath' => sprintf('/google/img/%s/', get_class($this))\n\t\t);\n\n\t\t$options = array_merge($default, (array)$options);\n\t\t$this->cachePath = $options['cachePath'];\n\t\t$this->cacheImagePath = $options['cacheImagePath'];\n\t}", "public static function factory($cache, array $options = array())\n\t{\n\t\tif (! $cache instanceof Rest_Cache)\n\t\t{\n\t\t\t$cache = Rest_Cache::instance($cache);\n\t\t}\n\n\t\t$options['cache'] = $cache;\n\n\t\treturn new Rest_HTTP_Cache($options);\n\t}", "public function getCacheStore(): Store|null;", "public static function cache(){\n\n if (!isset(self::$_cache)) {\n if(!GO::isInstalled()){\n self::$_cache=new \\GO\\Base\\Cache\\None();\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif(!isset(GO::session()->values['cacheDriver'])){\n\t\t\t\t\t\t\t\t$cachePref = array(\n\t\t\t\t\t\t\t\t\t\t\"\\\\GO\\\\Base\\\\Cache\\\\Apcu\",\n\t\t\t\t\t\t\t\t\t\t\"\\\\GO\\\\Base\\\\Cache\\\\Disk\"\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tforeach($cachePref as $cacheDriver){\n\t\t\t\t\t\t\t\t\t$cache = new $cacheDriver;\n\t\t\t\t\t\t\t\t\tif($cache->supported()){\n\n\t\t\t\t\t\t\t\t\t\tGO::debug(\"Using $cacheDriver cache\");\n\t\t\t\t\t\t\t\t\t\tGO::session()->values['cacheDriver'] = $cacheDriver;\n\t\t\t\t\t\t\t\t\t\tself::$_cache=$cache;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cacheDriver = GO::session()->values['cacheDriver'];\n\t\t\t\t\t\t\t\tGO::debug(\"Using $cacheDriver cache\");\n\t\t\t\t\t\t\t\tself::$_cache = new $cacheDriver;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n }\n return self::$_cache;\n }", "protected function defaultCache() : Repository\n {\n return Cache::store();\n }", "function &createCache() {}", "public static function getInstance($type = 'output', $options = array(), $object = null)\n {\n $type = strtolower(preg_replace('/[^A-Z0-9_\\.-]/i', '', $type));\n $class = 'Cache' . ucfirst($type);\n if (!class_exists($class)) {\n $path = dirname(__FILE__) . DS . 'handler' . DS . $type . '.php';\n require_once($path);\n }\n $instance = new $class($options, $object);\n return $instance;\n }", "public static function factory($driver, $options = [])\n {\n if (!class_exists($cacheClass = sprintf('ILess\\Cache\\%s', $driver))) {\n throw new InvalidArgumentException(sprintf('The cache driver \"%s\" does not exist.', $driver));\n }\n\n return new $cacheClass($options);\n }", "public function getCache();", "public function __construct(array $options = array())\n {\n $available_options = array('cache_dir');\n foreach ($available_options as $name) {\n if (isset($options[$name])) {\n $this->$name = $options[$name];\n }\n }\n }", "public function __construct(array $options = array())\n {\n $available_options = array('cache_dir');\n foreach ($available_options as $name) {\n if (isset($options[$name])) {\n $this->$name = $options[$name];\n }\n }\n }", "public static function store($name = null){\n return \\Illuminate\\Cache\\CacheManager::store($name);\n }", "public function cacheOptions ()\n {\n\n foreach ( $this->optionsToPersist as $option ) {\n\n $this->optionsCache[ $option ] = $this->getOption ( $option );\n\n }\n\n }", "public function getCacheAdapter();", "protected function getCache() {\n\t\t$factory = $this->policy('rate_factoryname');\n\t\t$lifetime = $this->policy('rate_lock_timeout') + 60; // As long as it's longer than the actual timeout\n\t\t$cache = SS_Cache::factory($factory);\n\t\t$cache->setOption('automatic_serialization', true);\n\t\t$cache->setOption('lifetime', $lifetime);\n\t\treturn $cache;\n\t}", "public function createStorage();", "public function memory($options=[])\n {\n return new InMemory();\n }", "public function getCacheStorage(): CacheStorageInterface\n {\n return $this->storage;\n }", "public function __construct($options)\n\t{\n\t\t$this->memcached = new \\Memcached();\n\n\t\tif (isset($options['servers'])) {\n\t\t\t$servers = array();\n\t\t\tforeach ($options['servers'] as $server) {\n\t\t\t\t$defaults = array(\n\t\t\t\t\t'weight' => 1,\n\t\t\t\t\t'port' => self::DEFAULT_PORT,\n\t\t\t\t);\n\t\t\t\t$server = parse_url($server[0]) + $server + $defaults;\n\t\t\t\tif (!isset($server['host'])) {\n\t\t\t\t\t$server['host'] = $server['path'];\n\t\t\t\t\tunset($server['path']);\n\t\t\t\t}\n\t\t\t\t$servers[] = array(\n\t\t\t\t\t$server['host'],\n\t\t\t\t\t$server['port'],\n\t\t\t\t\t$server['weight']\n\t\t\t\t);\n\t\t\t}\n\t\t\t$this->memcached->addServers($servers);\n\t\t} else {\n\t\t\t$options['port'] = isset($options['port']) ? $options['port'] : self::DEFAULT_PORT;\n\t\t\t$this->memcached->addServer($options['host'],$options['port']);\n\t\t}\n\n\t\tif (isset($options['options'])) {\n\t\t\tforeach ($options['options'] as $option => $value) {\n\t\t\t\t$this->memcached->setOption($option, $value);\n\t\t\t}\n\t\t}\n\t}", "private function get_caches () {\n $caches_slug = 'cache';\n return $this->get_option($caches_slug, array());\n }", "public static function getCache() {}", "public function getCacheInstance($cacheName = null);", "static public function factory($driver, array$options = array())\n {\n $filename = 'DiggLite/Cache/' . str_replace('_', '/', $driver . '.php');\n $class = 'DiggLite_Cache_' . $driver;\n\n include_once $filename;\n if (!class_exists($class)) {\n throw new DiggLite_Exception(\"Cache driver $class does not exist\");\n }\n\n return new $class($options);\n }", "public function __construct(CacheFactory $cache, array $options = [])\n {\n parent::__construct($options);\n\n $this->cache = $cache;\n }", "public static function getInstance($options = array());", "private function _getStorage($name, $duration = null)\n\t{\n\t\t$name_parts = explode(':', $name, 2);\n\n\t\tif ( count($name_parts) != 2 ) {\n\t\t\tthrow new \\InvalidArgumentException('The $name parameter must be in \"namespace:name\" format.');\n\t\t}\n\n\t\t$filename_parts = array(\n\t\t\t$name_parts[0],\n\t\t\tsubstr(hash_hmac('sha1', $name_parts[1], 'svn-buddy'), 0, 8),\n\t\t\t'D' . (isset($duration) ? $duration : 'INF'),\n\t\t);\n\n\t\t$cache_filename = $this->_workingDirectory . DIRECTORY_SEPARATOR . implode('_', $filename_parts) . '.cache';\n\n\t\tif ( isset($this->_io) && $this->_io->isVerbose() ) {\n\t\t\t$message = $cache_filename;\n\n\t\t\tif ( file_exists($cache_filename) ) {\n\t\t\t\t$message .= ' (hit: ' . $this->_sizeHelper->formatSize(filesize($cache_filename)) . ')';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$message .= ' (miss)';\n\t\t\t}\n\n\t\t\t$this->_io->writeln(array(\n\t\t\t\t'',\n\t\t\t\t'<debug>[cache]: ' . $message . '</debug>',\n\t\t\t));\n\t\t}\n\n\t\treturn new FileCacheStorage($cache_filename);\n\t}", "public static function getDefaultDriver(){\n return \\Illuminate\\Cache\\CacheManager::getDefaultDriver();\n }", "public function cacheAnObject($key, $data, $options = array())\n\t{\n\t\t$cache = $this->get('dxFilecache')->getFileCache()->setOptions($options);\n\t\treturn $cache->setItem($key, $data);\n\t}", "protected function createFilesystemDriver(): StoreContract\n {\n return $this->createCacheBased('filesystem');\n }", "private function __construct()\r\r\n\t{\t\t\r\r\n\t\t$class_name = sprintf(CPF_CACHE_STORAGE_CLASS_FORMAT, Cpf_Core_Config::get_instance()->value('CACHE.STORAGE'));\t\t\r\r\n\t\t$this->_storage = new $class_name();\r\r\n\t}", "public static function createWithOptions(array $options): ThrowableStorageInterface;", "protected function pluginCache(): FilesystemAdapter\n {\n return $this->plugin->getPluginCache();\n }", "protected function createCache($identifier) {\n\t\tif (isset($this->cacheConfigurations[$identifier]['frontend'])) {\n\t\t\t$frontend = $this->cacheConfigurations[$identifier]['frontend'];\n\t\t} else {\n\t\t\t$frontend = $this->defaultCacheConfiguration['frontend'];\n\t\t}\n\n\t\tif (isset($this->cacheConfigurations[$identifier]['backend'])\n\t\t\t&& isset($this->cacheConfigurations[$identifier]['backend']['frontend'])\n\t\t) {\n\t\t\t/** @var \\TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService $reflectionService */\n\t\t\t$reflectionService = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Reflection\\\\ReflectionService');\n\t\t\t$phpBackendRequired = $reflectionService->hasMethod($this->cacheConfigurations[$identifier]['frontend'], 'requireOnce');\n\t\t}\n\n\t\tif ($phpBackendRequired) {\n\t\t\t$backend = 'TYPO3\\\\CMS\\\\Core\\\\Cache\\\\Backend\\\\NullBackend';\n\t\t} else {\n\t\t\t$backend = 'FluidTYPO3\\\\Uncache\\\\Cache\\\\Backend\\\\TransientMemoryBackend';\n\t\t}\n\n\t\t$backendOptions = $this->defaultCacheConfiguration['options'];\n\n\t\t// Add the cache identifier to the groups that it should be attached to, or use the default ones.\n\t\tif (isset($this->cacheConfigurations[$identifier]['groups']) && is_array($this->cacheConfigurations[$identifier]['groups'])) {\n\t\t\t$assignedGroups = $this->cacheConfigurations[$identifier]['groups'];\n\t\t} else {\n\t\t\t$assignedGroups = $this->defaultCacheConfiguration['groups'];\n\t\t}\n\t\tforeach ($assignedGroups as $groupIdentifier) {\n\t\t\tif (!isset($this->cacheGroups[$groupIdentifier])) {\n\t\t\t\t$this->cacheGroups[$groupIdentifier] = array();\n\t\t\t}\n\t\t\t$this->cacheGroups[$groupIdentifier][] = $identifier;\n\t\t}\n\n\t\t$this->cacheFactory->create($identifier, $frontend, $backend, $backendOptions);\n\t}", "public function &_getStorage()\n\t{\n\t\t$hash = md5(serialize($this->_options));\n\n\t\tif (isset(self::$_handler[$hash]))\n\t\t{\n\t\t\treturn self::$_handler[$hash];\n\t\t}\n\n\t\tself::$_handler[$hash] = TCacheStorage::getInstance($this->_options['storage'], $this->_options);\n\n\t\treturn self::$_handler[$hash];\n\t}", "protected function getCacheStoreFromConfig(): Repository\n {\n // where 'default' means to use config(cache.default)\n $cacheDriver = config('permission.cache.store', 'default');\n\n // when 'default' is specified, no action is required since we already have the default instance\n if ($cacheDriver === 'default') {\n return $this->cacheManager->store();\n }\n\n // if an undefined cache store is specified, fallback to 'array' which is Laravel's closest equiv to 'none'\n if (! \\array_key_exists($cacheDriver, config('cache.stores'))) {\n $cacheDriver = 'array';\n }\n\n return $this->cacheManager->store($cacheDriver);\n }", "public static function getCache()\n\t{\n\t if (!self::$cache) {\n\t\t\t$frontendOptions = array('lifetime' => 604800, \n\t\t\t\t\t\t\t\t\t 'automatic_serialization' => true);\n\t\t\t$backendOptions = array('cache_dir' => APPLICATION_PATH . '/../data/cache');\n\t\t\tself::$cache \t = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);\n\t }\n\t\treturn self::$cache;\n\t}", "public function __construct(CacheItemPoolInterface $cache, array $options = array())\n {\n $this->cache = $cache;\n\n $this->ttl = isset($options['cookie_lifetime']) ? (int) $options['cookie_lifetime'] : 86400;\n $this->prefix = isset($options['prefix']) ? $options['prefix'] : 'sf2ses_';\n }", "public static function create(\n ContainerInterface $container = null,\n array $configs = []\n ){\n if (null === $container) {\n $container = Factory::create();\n }\n\n return new Cache(\n $container,\n new SerializerManager(),\n new CompressorManager(),\n $configs\n );\n }", "protected function _initCache()\n {\n $this->bootstrap('Config');\n $appConfig = Zend_Registry::get('config');\n $cache = NULL;\n\n // only attempt to init the cache if turned on\n if ($appConfig->app->caching) {\n\n // get the cache settings\n $config = $appConfig->app->cache;\n\n if (NULL !== $this->_tmpFolder) {\n if ('File' == $config->backend->adapter && !isset($config->backend->options->cache_dir)) {\n $config->backend->options->cache_dir = $this->_tmpFolder . '/cache';\n if (!is_dir($config->backend->options->cache_dir)) {\n mkdir($config->backend->options->cache_dir);\n }\n }\n }\n\n try {\n $cache = Zend_Cache::factory(\n $config->frontend->adapter,\n $config->backend->adapter,\n $config->frontend->options->toArray(),\n $config->backend->options->toArray()\n );\n } catch (Zend_Cache_Exception $e) {\n // send email to alert caching failed\n Zend_Registry::get('log')->alert(\n 'Caching failed: adapter=' . $config->backend->adapter . ', message=' . $e->getMessage(\n ));\n }\n }\n Zend_Registry::set('cache', $cache);\n return $cache;\n }", "public static function driver($driver = null){\n return \\Illuminate\\Cache\\CacheManager::driver($driver);\n }", "private function _createCache($cache)\n {\n $defaults = array(\n 'class' => 'Doctrine\\Common\\Cache\\ArrayCache',\n 'namespace' => '__kodefoundry_yiiext_doctrine',\n );\n\n $config = array_merge($defaults, $this->caches[$cache]);\n\n if (class_exists($config['class']) === false) {\n throw new \\Doctrine\\Common\\CommonException(\\Yii::t('kf.ext', 'Unknown class \"{class}\" specified in the cache configuration', array(\n '{class}' => $config['class']\n )));\n }\n\n $driver = new $config['class'];\n\n // Memcache specific\n if ($driver instanceof \\Doctrine\\Common\\Cache\\MemcacheCache) {\n $driver->setMemcache($this->_createMemcacheDriver($config));\n }\n\n // Memcached specific\n if ($driver instanceof \\Doctrine\\Common\\Cache\\MemcachedCache) {\n $driver->setMemcached($this->_createMemcachedDriver($config));\n }\n\n if ($driver instanceof \\Doctrine\\Common\\Cache\\CacheProvider) {\n $driver->setNamespace($config['namespace']);\n $this->_cachedObjects[$cache] = $driver;\n return $driver;\n }\n\n throw new \\Doctrine\\Common\\CommonException(\\Yii::t(\n 'kf.ext',\n 'The cache driver {driver} must implement \\Doctrine\\Common\\Cache\\CacheProvider',\n array('{driver}' => $config['class'])\n ));\n }", "function _getStorage()\n {\n if ($this->_handler instanceof CacheStorage) {\n return $this->_handler;\n }\n\n $this->_handler = CacheStorage::getInstance($this->_options['storage'], $this->_options);\n if ($this->_handler != null) {\n if ($this->_handler->test()) {\n return $this->_handler;\n } else {\n $this->_handler = CacheStorage::getInstance('file', $this->_options);\n return $this->_handler;\n }\n } else {\n return null;\n }\n }", "protected function getCache_DriverService()\n {\n return $this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file();\n }", "public function setOptions($options)\n {\n if (!$options instanceof MemcacheOptions) {\n $options = new MemcacheOptions($options);\n }\n\n return parent::setOptions($options);\n }", "protected function initCache()\n {\n $this->di->set('viewCache', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $frontend = new FrontOutput(['lifetime' => $config->get('viewCache')->lifetime]);\n\n $config = $config->get('viewCache')->toArray();\n $backend = '\\Phalcon\\Cache\\Backend\\\\' . $config['backend'];\n unset($config['backend'], $config['lifetime']);\n\n return new $backend($frontend, $config);\n });\n\n $this->di->setShared('modelsCache', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $frontend = '\\Phalcon\\Cache\\Frontend\\\\' . $config->get('modelsCache')->frontend;\n $frontend = new $frontend(['lifetime' => $config->get('modelsCache')->lifetime]);\n\n $config = $config->get('modelsCache')->toArray();\n $backend = '\\Phalcon\\Cache\\Backend\\\\' . $config['backend'];\n unset($config['backend'], $config['lifetime'], $config['frontend']);\n\n return new $backend($frontend, $config);\n });\n\n $this->di->setShared('dataCache', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $frontend = '\\Phalcon\\Cache\\Frontend\\\\' . $config->get('dataCache')->frontend;\n $frontend = new $frontend(['lifetime' => $config->get('dataCache')->lifetime]);\n\n $config = $config->get('dataCache')->toArray();\n $backend = '\\Phalcon\\Cache\\Backend\\\\' . $config['backend'];\n unset($config['backend'], $config['lifetime'], $config['frontend']);\n\n return new $backend($frontend, $config);\n });\n }", "protected function createMemcachedDriver(): StoreContract\n {\n return $this->createCacheBased('memcached');\n }", "public function setCaching($cache);", "protected function createMemcacheDriver(): StoreContract\n {\n return $this->createCacheBased('memcache');\n }", "private function getCacheServer()\n {\n /**\n * The configuration options are encapsulated in a class called RedisOptions\n * Here we setup the server configuration using the values from our config file\n */\n $redis_options = new RedisOptions();\n $redis_options->setServer(array(\n 'host' => self::$__endpoint,\n 'port' => self::$__port,\n 'timeout' => self::$__timeout\n ));\n // /**\n // * This is not required, although it will allow to store anything that can be serialized by PHP in Redis\n // */\n // $redis_options->setLibOptions ( array (\n // Redis::OPT_SERIALIZER => Redis::SERIALIZER_PHP\n // ) );\n \n /**\n * We create the cache passing the RedisOptions instance we just created\n */\n $redis_cache = new Redis($redis_options);\n \n return $redis_cache;\n }", "public function getCache()\r\n\t{\r\n\t\treturn \\Bitrix\\Main\\Data\\Cache::createInstance();\r\n\t}", "protected function _initCache(array $cacheInitOptions = array())\n {\n //its to early to make use of normal rewrites as they are not yet loaded\n //so just set it our self\n $this->_config->setNode('global/models/core/rewrite/cache', 'Ecocode_Profiler_Model_Core_Cache');\n return parent::_initCache($cacheInitOptions);\n }", "private function _readDefaultCache() {\n $settingFile = APPLICATION_PATH . '/application/settings/restapi_cache.php';\n $defaultFilePath = APPLICATION_PATH . '/temporary/restapicache';\n\n if (file_exists($settingFile)) {\n $currentCache = include $settingFile;\n } else {\n $currentCache = array(\n 'default_backend' => 'File',\n 'frontend' => array(\n 'automatic_serialization' => true,\n 'cache_id_prefix' => 'Engine4_restapi',\n 'lifetime' => '300',\n 'caching' => true,\n 'status' => true,\n 'gzip' => true,\n ),\n 'backend' => array(\n 'File' => array(\n 'file_locking' => true,\n 'cache_dir' => APPLICATION_PATH . '/temporary/restapicache',\n ),\n ),\n );\n }\n $currentCache['default_file_path'] = $defaultFilePath;\n\n return $currentCache;\n }", "public function getCache(string $driverName): \\Nofuzz\\SimpleCache\\CacheInterface;", "public function getDefaultCacheFactory(): ?Factory\n {\n return Cache::getFacadeRoot();\n }", "public static function getCache() {\n\t\treturn null;\n\t}", "public function __construct()\n {\n $this->driver = \\App::make(\\App::config('cache.driver')); \n }", "public static function factory($options)\n {\n return new self();\n }", "public function getConfiguration(string|ExtendedCacheItemPoolInterface $driver = \"\", ConfigurationOptionInterface $config = null){\n\n # Set result\n $result = [];\n\n # Check not test\n if(\n (Env::has(\"phpunit_test\") && Env::get(\"phpunit_test\")) ||\n (Env::has(\"cache_driver\") && Env::get(\"cache_driver\") == \"Files\")\n )\n\n # Set driver\n $driver = \"Files\";\n\n # Get driver if empty\n if(!$driver){\n\n # Get mongodb config\n $mongodbConfig = Config::getValue(\"Database.collection.mongodb\");\n\n # Check mongodb config\n if($mongodbConfig && !empty($mongodbConfig))\n\n # Set driver\n $driver = \"Mongodb\";\n\n # Else default driver\n else\n\n $driver = \"Files\";\n\n }\n\n # Check driver\n if(!$driver || !in_array($driver, self::DRIVERS_ALLOWED)){\n\n echo $driver;\n\n # New Exception\n throw new CrazyException(\n \"Driver \\\"$driver\\\" for your cache instance isn't valid...\",\n 500,\n [\n \"custom_code\" => \"cache-001\",\n ]\n );\n\n }\n\n # Push driver in result\n $result[\"driver\"] = $driver;\n\n # Check config\n if(!empty($config)){\n\n # Push config\n $result[\"options\"] = $config;\n\n }else\n # Check if files driver\n if($driver == \"Files\"){\n\n # Set Files config\n $result[\"options\"] = [\n 'path' => self::_getPath(),\n 'itemDetailedDate' => true,\n ];\n\n }else\n # Check if mongodb driver\n if($driver == \"Mongodb\"){\n\n # Get cache config\n\n # Set Mongodb config\n $result[\"options\"] = [\n 'itemDetailedDate' => true,\n \"host\" => $mongodbConfig[\"host\"],\n \"port\" => $mongodbConfig[\"port\"],\n \"username\" => $mongodbConfig[\"users\"][0][\"login\"],\n \"password\" => $mongodbConfig[\"users\"][0][\"password\"],\n \"collectionName\" => \"cache\", \n \"databaseName\" => \"crazy_db\",\n ];\n\n }\n\n # Return result\n return $result;\n\n }", "public function __construct(array $options = array())\n\t{\n\t\tforeach ($options as $key => $value)\n\t\t{\n\t\t\tif (method_exists($this, $key))\n\t\t\t{\n\t\t\t\t$this->$key($value);\n\t\t\t}\n\t\t}\n\n\t\tif ($this->_cache_key_callback === NULL)\n\t\t{\n\t\t\t$this->cache_key_callback('Rest_HTTP_Cache::basic_cache_key_generator');\n\t\t}\n\t}", "public function __construct($type=NULL)\n {\n if (empty($type) AND !empty($GLOBALS['config']['cachetype'])) {$type = $GLOBALS['config']['cachetype'];}\n if (empty($type) OR !in_array($type,self::$cachetypes)) \n {\n $type = 'session';\n }\n $this->type = $type;\n if ($this->type == 'file' AND !is_dir(self::$cachedir))\n {\n mkdir(self::$cachedir);\n }\n }", "private function getCached($options = array())\n {\n $md5 = $this->getMd5();\n \n if (empty($md5) === true) {\n throw new Exception('md5 can\\'t be empty');\n }\n \n $filename = ApiPrint::getPdfTmpFilename($md5, $options);\n \n if (file_exists($filename) === true && filemtime($filename) > time() - PRINT_TIME_CACHE) {\n return $filename;\n }\n \n return null;\n }", "public function getCacheDriver(): ?string;", "private function getFileCache()\n {\n $shopIdCalculatorMock = $this->getMock(ShopIdCalculator::class, array('getShopId'), array(), '', false);\n $shopIdCalculatorMock->method('getShopId')->willReturn(1);\n\n return oxNew(SubShopSpecificFileCache::class, $shopIdCalculatorMock);\n }", "public function setCache(StorageInterface $cache = null)\n {\n $this->cache = $cache;\n\n return $this;\n }", "public function initStorage() {}", "public static function getDefaultCache()\n {\n return self::$_defaultCache;\n }", "public function __construct($apiKey, array $options = [])\n {\n if (empty($apiKey)) {\n throw new InvalidArgumentException(\"apiKey cannot be empty.\");\n }\n\n $hash = Murmur::hash3($apiKey);\n $this->cacheKey = sprintf(self::CACHE_KEY, $hash);\n\n if (isset($options['logger']) && $options['logger'] instanceof LoggerInterface) {\n $this->logger = $options['logger'];\n } else {\n $this->logger = new NullLogger();\n }\n\n if (isset($options['cache']) && $options['cache'] instanceof ConfigCache) {\n $this->cache = $options['cache'];\n } else {\n $this->cache = new ArrayCache();\n }\n\n if (isset($options['cache-refresh-interval']) && is_int($options['cache-refresh-interval'])) {\n $this->cacheRefreshInterval = $options['cache-refresh-interval'];\n }\n\n $this->cache->setLogger($this->logger);\n $this->fetcher = new ConfigFetcher($apiKey, $this->logger, $options);\n }", "public function storages($write = false)\n {\n if ($this->customStorages !== null) {\n return $this->customStorages;\n }\n if (static::$storages === null) {\n static::initStorages();\n }\n if (static::$storages === null) {\n $e = new \\Exception();\n throw new \\Exception('$storages is null: ' . get_class($this) . PHP_EOL\n . ' storagesConf = ' . var_export(static::$storagesConf, true));\n }\n if (isset($this->options['storages'])) {\n /** @var \\Zer0\\Model\\Storages\\Generic[] $storages */\n $storages = [];\n foreach ($this->options['storages'] as $storageName => $storageConf) {\n if (!is_array($storageConf) && isset(static::$storagesConf[$storageName])) {\n // If, for example, ['SQL' => true], add SQL storage object to array\n if ($storageConf === true) {\n $storages[$storageName] = static::$storages[$storageName];\n }\n } else {\n // Storage conf from options is an array, so override default options and get a\n // new storage object with this config.\n if (!isset($storageConf['type'])) {\n $storageConf['type'] = $storageName;\n }\n if (!isset($storageConf['primaryKey'])) {\n $storageConf['primaryKey'] = static::$primaryKey;\n }\n $storageConf['modelClass'] = get_class($this);\n $class = ClassFinder::getNamespace(\\Zer0\\Model\\Storages\\Generic::class) . '\\\\' . $storageConf['type'];\n\n // This is a custom storage object, since config values have been overriden by options\n $storages[$storageName] = new $class($storageConf);\n }\n }\n return $this->customStorages = $storages;\n }\n return static::$storages;\n }", "public function initStorage()\n {\n $dbMasterConfig = C(self::$dbKey);\n $this->storage = $this->getDbInstance($dbMasterConfig);\n $this->setTableName($dbMasterConfig);\n\n return $this->storage;\n }", "public static function expireCacheEntry(array $options) {\n $options['caching'] = 'expire';\n // With caching set to expire, get_population_data doesn't actually do the\n // service request.\n self::get_population_data($options);\n }", "static public function factory($driver = 'CacheLite', array $options = array())\n {\n $class = 'OpenID_Store_' . $driver;\n if (!class_exists($class)) {\n throw new OpenID_Store_Exception(\n 'Invalid storage driver: ' . $driver,\n OpenID_Exception::INVALID_VALUE\n );\n }\n\n $instance = new $class($options);\n if (!$instance instanceof OpenID_Store_Interface) {\n throw new OpenID_Store_Exception(\n $class . ' does not implement OpenID_Store_Interface',\n OpenID_Exception::INVALID_DEFINITION\n );\n }\n\n return $instance;\n }", "public static function factory($options = [])\n {\n return new static();\n }", "public function get_storage($for = null)\n {\n if (!isset($this->storage) || (!empty($for) && $this->storage->username !== $for)) {\n $rcmail = rcmail::get_instance();\n try {\n $this->storage = \\Kolab2FA\\Storage\\Base::factory(\n $rcmail->config->get('kolab_2fa_storage', 'roundcube'),\n $rcmail->config->get('kolab_2fa_storage_config', array())\n );\n\n $this->storage->set_username($for);\n $this->storage->set_logger(new \\Kolab2FA\\Log\\RcubeLogger());\n\n // set user properties from active session\n if (!empty($_SESSION['kolab_dn'])) {\n $this->storage->userdn = $_SESSION['kolab_dn'];\n }\n }\n catch (Exception $e) {\n $this->storage = false;\n\n rcube::raise_error(array(\n 'code' => 600,\n 'type' => 'php',\n 'file' => __FILE__,\n 'line' => __LINE__,\n 'message' => $error),\n true, false);\n }\n }\n\n return $this->storage;\n }", "public function cache(string $key)\n {\n if (isset($this->caches[$key]) === true) {\n return $this->caches[$key];\n }\n\n // get the options for this cache type\n $options = $this->cacheOptions($key);\n\n if ($options['active'] === false) {\n // use a dummy cache that does nothing\n return $this->caches[$key] = new NullCache();\n }\n\n $type = strtolower($options['type']);\n $types = $this->extensions['cacheTypes'] ?? [];\n\n if (array_key_exists($type, $types) === false) {\n throw new InvalidArgumentException([\n 'key' => 'app.invalid.cacheType',\n 'data' => ['type' => $type]\n ]);\n }\n\n $className = $types[$type];\n\n // initialize the cache class\n $cache = new $className($options);\n\n // check if it is a useable cache object\n if (is_a($cache, 'Kirby\\Cache\\Cache') !== true) {\n throw new InvalidArgumentException([\n 'key' => 'app.invalid.cacheType',\n 'data' => ['type' => $type]\n ]);\n }\n\n return $this->caches[$key] = $cache;\n }", "public static function getBestMatch( $type ) {\n\t\tstatic $order = array( 'db', 'apc', 'shm', 'file' );\n\t\t\n\t\t$type = strtolower($type);\n\t\t\n\t\tif (!in_array($type, $order)) { // try to be as graceful as possible\n\t\t\t$type = 'file';\n\t\t}\n\t\t\n\t\t$options = $order;\n\t\t$cache = NULL;\n\t\t\n\t\tarray_unshift( $options, $type );\n\t\t$options = array_unique($options);\n\t\t\n\t\twhile ($cache === NULL && ($currentOption = array_shift($options))) {\n\t\t\tswitch ($currentOption) {\n\t\t\t\tcase 'db':\n\t\t\t\t\trequire_once STROOT . '/cache/class.DBCache.php';\n\t\t\t\t\tif (DBCache::available()) $cache = new DBCache( self::$storage );\n\t\t\t\tbreak;\n\t\t\t\tcase 'apc':\n\t\t\t\t\trequire_once STROOT . '/cache/class.ApcCache.php';\n\t\t\t\t\tif (APCCache::available()) $cache = new ApcCache();\n\t\t\t\tbreak;\n\t\t\t\tcase 'shm':\n\t\t\t\t\trequire_once STROOT . '/cache/class.ShmopCache.php';\n\t\t\t\t\tif (ShmopCache::available()) $cache = new ShmopCache();\n\t\t\t\tbreak;\n\t\t\t\tcase 'file':\n\t\t\t\tdefault:\n\t\t\t\t\trequire_once STROOT . '/cache/class.FileCache.php';\n\t\t\t\t\tif (FileCache::available()) $cache = new FileCache();\n\t\t\t\tbreak;\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!$cache) {\n\t\t\tthrow new RuntimeException('No cache available');\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $cache;\n\t}", "function Cache_Container_file($options = '')\n {\n if (is_array($options)) {\n $this->setOptions($options, array_merge($this->allowed_options, array('cache_dir', 'filename_prefix', 'max_userdata_linelength')));\n }\n clearstatcache();\n if ($this->cache_dir) {\n // make relative paths absolute for use in deconstructor.\n // it looks like the deconstructor has problems with relative paths\n if (OS_UNIX && '/' != $this->cache_dir{0} )\n $this->cache_dir = realpath( getcwd() . '/' . $this->cache_dir) . '/';\n\n // check if a trailing slash is in cache_dir\n if ($this->cache_dir{strlen($this->cache_dir)-1} != DIRECTORY_SEPARATOR)\n $this->cache_dir .= '/';\n\n if (!file_exists($this->cache_dir) || !is_dir($this->cache_dir))\n mkdir($this->cache_dir, 0755);\n }\n $this->entries = array();\n $this->group_dirs = array();\n \n } // end func contructor\n\n function fetch($id, $group)\n {\n $file = $this->getFilename($id, $group);\n if (PEAR::isError($file)) {\n return $file;\n }\n\n if (!file_exists($file)) {\n return array(null, null, null);\n }\n // retrive the content\n if (!($fh = @fopen($file, 'rb'))) {\n return new Cache_Error(\"Can't access cache file '$file'. Check access rights and path.\", __FILE__, __LINE__);\n }\n // File locking (shared lock)\n if ($this->fileLocking) {\n flock($fh, LOCK_SH);\n }\n // file format:\n // 1st line: expiration date\n // 2nd line: user data\n // 3rd+ lines: cache data\n $expire = trim(fgets($fh, 12));\n if ($this->max_userdata_linelength == 0 ) {\n $userdata = trim(fgets($fh));\n } else {\n $userdata = trim(fgets($fh, $this->max_userdata_linelength));\n }\n $buffer = '';\n while (!feof($fh)) {\n \t$buffer .= fread($fh, 8192);\n }\n $cachedata = $this->decode($buffer);\n\n // Unlocking\n if ($this->fileLocking) {\n flock($fh, LOCK_UN);\n }\n fclose($fh);\n\n // last usage date used by the gc - maxlifetime\n // touch without second param produced stupid entries...\n touch($file,time());\n clearstatcache();\n\n return array($expire, $cachedata, $userdata);\n } // end func fetch\n\n /**\n * Stores a dataset.\n *\n * WARNING: If you supply userdata it must not contain any linebreaks,\n * otherwise it will break the filestructure.\n */\n function save($id, $cachedata, $expires, $group, $userdata)\n {\n $this->flushPreload($id, $group);\n\n $file = $this->getFilename($id, $group);\n if (!($fh = @fopen($file, 'wb'))) {\n return new Cache_Error(\"Can't access '$file' to store cache data. Check access rights and path.\", __FILE__, __LINE__);\n }\n\n // File locking (exclusive lock)\n if ($this->fileLocking) {\n flock($fh, LOCK_EX);\n }\n // file format:\n // 1st line: expiration date\n // 2nd line: user data\n // 3rd+ lines: cache data\n $expires = $this->getExpiresAbsolute($expires);\n fwrite($fh, $expires . \"\\n\");\n fwrite($fh, $userdata . \"\\n\");\n fwrite($fh, $this->encode($cachedata));\n\n // File unlocking\n if ($this->fileLocking) {\n flock($fh, LOCK_UN);\n }\n fclose($fh);\n\n // I'm not sure if we need this\n\t// i don't think we need this (chregu)\n // touch($file);\n\n return true;\n } // end func save\n\n function remove($id, $group)\n {\n $this->flushPreload($id, $group);\n\n $file = $this->getFilename($id, $group);\n if (PEAR::isError($file)) {\n return $file;\n }\n\n if (file_exists($file)) {\n $ok = unlink($file);\n clearstatcache();\n\n return $ok;\n }\n\n return false;\n } // end func remove\n\n function flush($group)\n {\n $this->flushPreload();\n $dir = ($group) ? $this->cache_dir . $group . '/' : $this->cache_dir;\n\n $num_removed = $this->deleteDir($dir);\n unset($this->group_dirs[$group]);\n clearstatcache();\n\n return $num_removed;\n } // end func flush\n\n function idExists($id, $group)\n {\n return file_exists($this->getFilename($id, $group));\n } // end func idExists\n\n /**\n * Deletes all expired files.\n *\n * Garbage collection for files is a rather \"expensive\", \"long time\"\n * operation. All files in the cache directory have to be examined which\n * means that they must be opened for reading, the expiration date has to be\n * read from them and if neccessary they have to be unlinked (removed).\n * If you have a user comment for a good default gc probability please add it to\n * to the inline docs.\n *\n * @param integer Maximum lifetime in seconds of an no longer used/touched entry\n * @throws Cache_Error\n */\n function garbageCollection($maxlifetime)\n {\n $this->flushPreload();\n clearstatcache();\n\n $ok = $this->doGarbageCollection($maxlifetime, $this->cache_dir);\n\n // check the space used by the cache entries \n if ($this->total_size > $this->highwater) {\n \n krsort($this->entries);\n reset($this->entries);\n \n while ($this->total_size > $this->lowwater && list($lastmod, $entry) = each($this->entries)) {\n if (@unlink($entry['file'])) {\n $this->total_size -= $entry['size'];\n } else {\n new CacheError(\"Can't delete {$entry['file']}. Check the permissions.\");\n }\n }\n \n }\n \n $this->entries = array();\n $this->total_size = 0;\n \n return $ok;\n } // end func garbageCollection\n \n /**\n * Does the recursive gc procedure, protected.\n *\n * @param integer Maximum lifetime in seconds of an no longer used/touched entry\n * @param string directory to examine - don't sets this parameter, it's used for a\n * recursive function call!\n * @throws Cache_Error\n */\n function doGarbageCollection($maxlifetime, $dir)\n {\n if (!is_writable($dir) || !is_readable($dir) || !($dh = opendir($dir))) {\n return new Cache_Error(\"Can't remove directory '$dir'. Check permissions and path.\", __FILE__, __LINE__);\n }\n\n while ($file = readdir($dh)) {\n if ('.' == $file || '..' == $file)\n continue;\n\n $file = $dir . $file;\n if (is_dir($file)) {\n $this->doGarbageCollection($maxlifetime,$file . '/');\n continue;\n }\n\n // skip trouble makers but inform the user\n if (!($fh = @fopen($file, 'rb'))) {\n new Cache_Error(\"Can't access cache file '$file', skipping it. Check permissions and path.\", __FILE__, __LINE__);\n continue;\n }\n\n $expire = fgets($fh, 11);\n fclose($fh);\n $lastused = filemtime($file);\n \n $this->entries[$lastused] = array('file' => $file, 'size' => filesize($file));\n $this->total_size += filesize($file);\n \n // remove if expired\n if (( ($expire && $expire <= time()) || ($lastused <= (time() - $maxlifetime)) ) && !unlink($file)) {\n new Cache_Error(\"Can't unlink cache file '$file', skipping. Check permissions and path.\", __FILE__, __LINE__);\n }\n }\n\n closedir($dh);\n\n // flush the disk state cache\n clearstatcache();\n\n } // end func doGarbageCollection\n\n /**\n * Returns the filename for the specified id.\n *\n * @param string dataset ID\n * @param string cache group\n * @return string full filename with the path\n * @access public\n */\n function getFilename($id, $group)\n {\n if (isset($this->group_dirs[$group])) {\n return $this->group_dirs[$group] . $this->filename_prefix . $id;\n }\n\n $dir = $this->cache_dir . $group . '/';\n if (is_writeable($this->cache_dir)) {\n if (!file_exists($dir)) {\n mkdir($dir, 0755, true);\n clearstatcache();\n }\n } else {\n return new Cache_Error(\"Can't make directory '$dir'. Check permissions and path.\", __FILE__, __LINE__);\n }\n $this->group_dirs[$group] = $dir;\n\n return $dir . $this->filename_prefix . $id;\n } // end func getFilename\n\n /**\n * Deletes a directory and all files in it.\n *\n * @param string directory\n * @return integer number of removed files\n * @throws Cache_Error\n */\n function deleteDir($dir)\n {\n if (!is_writable($dir) || !is_readable($dir) || !($dh = opendir($dir))) {\n return new Cache_Error(\"Can't remove directory '$dir'. Check permissions and path.\", __FILE__, __LINE__);\n }\n\n $num_removed = 0;\n\n while (false !== $file = readdir($dh)) {\n if ('.' == $file || '..' == $file)\n continue;\n\n $file = $dir . $file;\n if (is_dir($file)) {\n $file .= '/';\n $num = $this->deleteDir($file . '/');\n if (is_int($num))\n $num_removed += $num;\n } else {\n if (unlink($file))\n $num_removed++;\n }\n }\n // according to php-manual the following is needed for windows installations.\n closedir($dh);\n unset( $dh);\n if ($dir != $this->cache_dir) { //delete the sub-dir entries itself also, but not the cache-dir.\n rmDir($dir);\n $num_removed++;\n }\n\n return $num_removed;\n } // end func deleteDir\n \n}", "protected function createRedisDriver(): StoreContract\n {\n return $this->createCacheBased('redis');\n }", "public function getCacheConfig()\n {\n $config = null;\n if (file_exists($this->options['cache_path'])) {\n $content = @file_get_contents($this->options['cache_path']);\n $config = new Config($this->app, $content);\n }\n return $config;\n }", "public function initCache() {\n $cacheclass = \"corelib_cache_mongoCache\";\n if (self::$_config['caching']['type']) {\n $cacheclass = \"corelib_cache_\" . self::$_config['caching']['type'] . \"Cache\";\n }\n $this->_cache = new $cacheclass(self::$_config['caching']);\n }", "protected function createAllCaches() {}", "public function getStorageService();", "public function save(array $options = [])\n {\n $this->saveToCache();\n return parent::save();\n }", "private function mockCache()\n {\n $this->objectManager->configure([\n 'preferences' => [\n Cache::class => DummyCache::class\n ]\n ]);\n }", "public static function make()\n {\n return new waCache(new waFileCacheAdapter([]), wa()->getConfig()->getApplication());\n }", "public static function make(array $options = []);" ]
[ "0.7478693", "0.70312876", "0.6921806", "0.6653214", "0.66279614", "0.6561047", "0.64723235", "0.6411063", "0.62593985", "0.62202966", "0.62182903", "0.62181276", "0.6215864", "0.6186114", "0.6099348", "0.60897356", "0.60789764", "0.60651135", "0.60473174", "0.59767187", "0.58720905", "0.58707327", "0.58632964", "0.5844844", "0.5841442", "0.5841442", "0.58269894", "0.5793298", "0.57881266", "0.5766336", "0.57522255", "0.5748505", "0.5718168", "0.56950206", "0.56758755", "0.5668664", "0.5665977", "0.56641966", "0.56600016", "0.5647386", "0.5590673", "0.54906857", "0.54819924", "0.54582435", "0.5454723", "0.5448582", "0.5432688", "0.54319674", "0.5428844", "0.5424957", "0.54089665", "0.5405918", "0.5395915", "0.5385702", "0.5383868", "0.5383056", "0.53588563", "0.53487104", "0.5347027", "0.53283876", "0.53087807", "0.53060615", "0.5304958", "0.5296529", "0.529401", "0.52756226", "0.5251615", "0.5250507", "0.5249762", "0.52496487", "0.52435166", "0.524231", "0.5233823", "0.52328724", "0.5225415", "0.52198327", "0.5213495", "0.5205737", "0.5202088", "0.51965606", "0.51962245", "0.5183281", "0.51821476", "0.51732796", "0.5161349", "0.51540333", "0.5153413", "0.5151878", "0.51509255", "0.51470834", "0.51373184", "0.5129498", "0.51248807", "0.5114288", "0.5108639", "0.5101388", "0.5097417", "0.50940305", "0.50880504", "0.50822735" ]
0.77182066
0
Conversational form specific hooks.
public function conversational_form_hooks() { \add_filter( 'template_include', array( $this, 'get_form_template' ), PHP_INT_MAX ); \add_filter( 'document_title_parts', array( $this, 'change_form_page_title' ) ); \add_filter( 'post_type_link', array( $this, 'modify_permalink' ), 10, 2 ); \remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10 ); \add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); \add_action( 'wpforms_wp_footer', array( $this, 'dequeue_scripts' ) ); \add_action( 'wpforms_frontend_confirmation', array( $this, 'dequeue_scripts' ) ); \add_action( 'wp_print_styles', array( $this, 'css_compatibility_mode' ) ); \add_action( 'wp_head', array( $this, 'print_form_styles' ) ); \add_filter( 'body_class', array( $this, 'set_body_classes' ) ); \add_filter( 'wpseo_opengraph_desc', array( $this, 'yoast_seo_description' ) ); \add_filter( 'wpseo_twitter_description', array( $this, 'yoast_seo_description' ) ); \add_filter( 'wpforms_frontend_form_data', array( $this, 'ignore_pagebreaks' ) ); \add_filter( 'wpforms_field_data', array( $this, 'ignore_date_dropdowns' ), 10, 2 ); \add_filter( 'wpforms_field_properties', array( $this, 'ignore_multi_column_layout' ), 10, 3 ); \add_filter( 'wpforms_field_properties', array( $this, 'add_data_field_type_attr' ), 10, 3 ); \add_action( 'wpforms_display_field_after', array( $this, 'add_file_upload_html' ), 10, 2 ); \add_action( 'wpforms_conversational_forms_content_before', array( $this, 'form_loader_html' ) ); \add_action( 'wpforms_conversational_forms_content_before', array( $this, 'form_header_html' ) ); \add_action( 'wpforms_conversational_forms_footer', array( $this, 'form_footer_html' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hookForm() {\n }", "public function hookForm() {\n if ($this->isCompanyForm()) {\n $this->setDefaultExpDate();\n $this->makeBillingAreaRequired();\n }\n elseif ($this->isCompanyViewsMultiSearchForm()) {\n $this->form['company_name']['#type'] = 'textarea';\n $this->duplicateField('sort_by');\n }\n }", "public function hookConfigForm() {\n }", "abstract function setupform();", "public function hookConfigForm() {\n\t\trequire IIIF_API_BRIDGE_DIRECTORY . '/config_form.php';\n\t}", "function form_alter(&$form, &$form_state) {\n }", "abstract public function bindForm();", "abstract public function bindForm();", "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}", "function process_form()\n {\n }", "function weldata_form_alter(&$form, &$form_state){\n\n}", "public function hookConfigForm()\n {\n require 'config_form.php';\n }", "abstract public function forms();", "protected function Form_Run() {}", "public function register_hooks() {\n\t\tadd_filter( 'acf/pre_render_fields', array( $this, 'fields_on_translated_options_page' ), 10, 2 );\n\t\tadd_filter( 'acf/update_value', array( $this, 'overwrite_option_value' ), 10, 4 );\n\t\tadd_filter( 'acf/validate_post_id', [ $this, 'append_language_code_for_option_pages' ] );\n\t}", "protected function wp_hooks() {\n\t\tadd_action( 'category_add_form_fields', array( &$this, 'setup_add_category_form_view' ), 10 );\n\n\t\t// Display populated custom form fields while editing a category\n\t\tadd_action( 'category_edit_form_fields', array( &$this, 'setup_edit_category_form_view' ), 10, 2 );\n\n\t\t// Save custom form field data when category is created\n\t\tadd_action( 'created_category', array( &$this, 'save_category_form' ), 10, 2 );\n\n\t\t// Save custom form field data when category is edited\n\t\tadd_action( 'edited_category', array( &$this, 'save_category_form' ), 10, 2 );\n\n\t\t// Delete custom form field data when a category is deleted\n\t\tadd_action( 'delete_category', array( &$this, 'delete_category_form_data' ) );\n\n\t}", "abstract protected function _setNewForm();", "public function _get_form_callback()\n {\n }", "public function alterForm(Form $form)\n {\n }", "abstract protected function getForm();", "public function form( &$form )\n\t{\n\t}", "public function postSetupForm() {\r\n\r\n $l = $this->bootstrap->getLocalization();\r\n // ugyanaz submitnak mint title-nek\r\n $this->form->submit =\r\n $this->controller->toSmarty['title'] = $l('users', 'login_title');\r\n if ( $this->application->getParameter('nolayout') )\r\n $this->controller->toSmarty['nolayout'] = true;\r\n\r\n $this->controller->toSmarty['formclass'] = 'halfbox centerformwrap';\r\n $this->controller->toSmarty['titleclass'] = 'center';\r\n parent::postSetupForm();\r\n\r\n }", "abstract public function getForm() : void;", "public function manipulateForm(&$aForm) {\n }", "public function hooks() {\n\t\tadd_action( 'wp_ajax_wp_sc_form_process_'. $this->button_slug, array( $this, 'process_form' ) );\n\n\t\t// If we have a conditional callback and the return of the callback is false\n\t\tif ( $this->args['conditional_callback'] && is_callable( $this->args['conditional_callback'] ) && ! call_user_func( $this->args['conditional_callback'], $this ) ) {\n\t\t\t// Then that means we should bail\n\t\t\treturn;\n\t\t}\n\n\t\tadd_action( 'admin_init', array( $this, 'button_init' ) );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'register_quicktag_button_script' ) );\n\t\tadd_action( 'admin_footer', array( $this, 'add_quicktag_button_script' ) );\n\t\tadd_action( 'admin_footer', array( $this, 'add_modal_form' ) );\n\t}", "abstract function form();", "public function setForm() {\n\t\t$translator = Zend_Registry::get('Zend_Translate');\n\t\t$this->setMethod('post');\n\t\t \n\t\t$this->addEnabled();\n\t\t$this->addRentDueDay();\n\t\t$this->addProrationType();\n\t\t$this->addProrationApplyMonth();\n\t\t$this->addSecondMonthDue();\n\t\t$this->addSubmitButton();\n\n\t\t$this->addDisplayGroup( $this->displayGroupArray, 'updateRentProrationSetting',array('legend' => 'rentProrationSettings'));\n\t\t$this->getDisplayGroup('updateRentProrationSetting')->setDecorators(array(\n 'FormElements',\n 'Fieldset', \n\t\t));\n\t}", "public function __construct() {\n\t\t$form_event = ( isset( \\REALTY_BLOC_LOG::$option['form_event'] ) ? \\REALTY_BLOC_LOG::$option['form_event'] : array() );\n\n\t\t// List Active Form\n\t\t$active_forms = ( ( isset( $form_event['form'] ) and is_array( $form_event['form'] ) ) ? array_keys( $form_event['form'] ) : array() );\n\n\t\t// Add Hook For Save Form\n\t\tforeach ( $active_forms as $form_id ) {\n\t\t\tadd_action( \"wpforms_process_complete_{$form_id}\", array( $this, 'save_form_event' ), 10, 4 );\n\t\t}\n\t}", "public function buildForm()\n {\n }", "public function saveForm()\n\t{\n\t\tparent::saveForm();\n\t\t$this->setNeedReinitRulesFlag();\n\t}", "public function populateForm() {}", "function MYMODULE_my_custom_form_submit(&$form, &$form_state) {\n // from what I've tested they even get validated accordingly by \n // their \"parent modules\" (the CCK modules which define them).\n //var_dump($form_state['values']);\n}", "abstract function setupForm(&$mform);", "function _onRenderForm($tmp) {\n\t\t\n\t\t/* Show Page title */\n\t\tif ($this->_FORM_CONFIG ['showtitle'] == 1) {\n\t\t\t$tmp->assign ( 'SHOW_PAGE_TITLE', TRUE );\n\t\t}\n\t\t\n\t\t/* Show Reset Button */\n\t\tif ($this->_FORM_CONFIG ['showresetbutton'] == 1) {\n\t\t\t$tmp->assign ( 'SHOW_RESET_BUTTON', TRUE );\n\t\t}\n\t\t\n\t\t$tmp->assign ( 'RESETBUTTONTEXT', $this->_FORM_CONFIG ['resetbuttontext'] );\n\t\t$tmp->assign ( 'SUBMITBUTTONTEXT', $this->_FORM_CONFIG ['submitbuttontext'] );\n\t\t\n\t\treturn $tmp;\n\t}", "public function hookConfigForm()\n {\n?>\n<div class=\"field\">\n <label for=\"collection_tree_alpha_order\">Order the collection tree alphabetically?</label>\n <div class=\"inputs\">\n <?php echo __v()->formCheckbox('collection_tree_alpha_order', \n null, \n array('checked' => (bool) get_option('collection_tree_alpha_order'))); ?>\n <p class=\"explanation\">This does not affect the order of the collections \n browse page.</p>\n </div>\n</div>\n<?php\n }", "function rebound_form_alter(&$form, &$form_state) {\n $form['comment_body']['#after_build'][] = 'rebound_customize_form';\n\t\n\tif($form['#node']->type == \"guild_application\") {\n\t\t$form['body']['#after_build'][] = 'rebound_customize_form';\n\t\t$form['application_references']['#after_build'][] = 'rebound_customize_form';\n\t\t$form['application_raid_experience']['#after_build'][] = 'rebound_customize_form';\n\t\t$form['application_raid_availablity']['#after_build'][] = 'rebound_customize_form';\n\t}\n\n}", "abstract function getForm();", "public function hook()\n {\n // Add the settings tab\n// $this->on('!wprss_options_tabs', array($this, 'addTab'), null, 100);\n // Register the settings option, sections and fields\n// $this->on('!wprss_admin_init', array($this, 'register'));\n\n parent::hook();\n }", "protected function _setForm()\n\t{\t\n\t\t$controller = $this->getActionController();\n\t\t\n\t\t$this->_setViewFormData($controller)\n\t\t\t ->_setViewErrors($controller)\n\t\t\t ->_setViewWarnings($controller);\n\t\t\t\n\t}", "public function add_hooks_and_filters() {\n\t\t\t$this->debugMP('msg',__FUNCTION__ . ' started JdB');\n\t\t parent::add_hooks_and_filters();\n\n\t\t\t/**\n\t\t\t * Simplify the Gravity Forms action and filters\n\t\t\t *\n\t\t\t */\n//\t\t\tadd_filter( 'gform_entry_info', array( $this, 'slp_gfl_gform_entry_info' ), 10, 2 );\n\n//\t\t\tadd_action( 'gform_entry_post_save', array( $this, 'slp_gfl_gform_entry_post_save' ), 10, 2 );\n\t\t}", "protected function createFormFields() {\n\t}", "function install_form_process()\n\t{\n\t\t//-----------------------------------------\n\t\t// When processed, return all vars to save\n\t\t// in conf_global in the array $this->info_extra\n\t\t// This will also be saved into $INFO[] for\n\t\t// the installer\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $_REQUEST['mysql_tbl_type'] )\n\t\t{\n\t\t\t$this->errors[] = 'You must complete the required SQL section!';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->info_extra['mysql_tbl_type'] = $_REQUEST['mysql_tbl_type'];\n\t}", "public function valiteForm();", "private function define_hooks() {\n\n\t\tadd_action( 'add_meta_boxes', array( $this, 'hook_add_meta_boxes' ), 10, 1 );\n\n\t\tadd_action( 'save_post', array( $this, 'hook_save_post' ), 10, 1 );\n\n\t\treturn;\n\t}", "public function 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 add_specific_form_fields() {\n\t\treturn false;\n\t}", "function renderConfigForm() {\n\t}", "function ux_t3lib_TCEforms()\t{\n\t\tglobal $CLIENT, $TYPO3_CONF_VARS;\n\n\t\t$this->clientInfo = t3lib_div::clientInfo();\n\n\t\tif ($GLOBALS['BE_USER'])\t{\n\t\t\t$this->RTEenabled = $GLOBALS['BE_USER']->isRTE();\n\t\t} else\t{\n\t\t\t$this->RTEenabled = $this->FE_RTE;\n\t\t}\n\t\tif (!$this->RTEenabled)\t{\n\t\t\t$this->RTEenabled_notReasons = implode(chr(10),$GLOBALS['BE_USER']->RTE_errors);\n\t\t\t$this->commentMessages[] = 'RTE NOT ENABLED IN SYSTEM due to:'.chr(10).$this->RTEenabled_notReasons;\n\t\t}\n\n\t\t\t// Default color+class scheme\n\t\t$this->defColorScheme = array(\n\t\t\t$GLOBALS['SOBE']->doc->bgColor,\t// Background for the field AND palette\n\t\t\tt3lib_div::modifyHTMLColorAll($GLOBALS['SOBE']->doc->bgColor,-20),\t// Background for the field header\n\t\t\tt3lib_div::modifyHTMLColorAll($GLOBALS['SOBE']->doc->bgColor,-10),\t// Background for the palette field header\n\t\t\t'black',\t// Field header font color\n\t\t\t'#666666'\t// Palette field header font color\n\t\t);\n\t\t$this->defColorScheme = array();\n\n\t\t\t// Override / Setting defaults from TBE_STYLES array\n\t\t$this->resetSchemes();\n\n\t\t\t// Setting the current colorScheme to default.\n\t\t$this->defColorScheme = $this->colorScheme;\n\t\t$this->defClassScheme = $this->classScheme;\n\n \t\t\t// Prepare user defined objects (if any) for hooks which extend this function:\n \t\t$this->hookObjectsMainFields = array();\n \t\tif (is_array ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass']))\t{\n \t\t\tforeach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass'] as $classRef)\t{\n \t\t\t\t$this->hookObjectsMainFields[] = &t3lib_div::getUserObj($classRef);\n \t\t\t}\n \t\t}\n \t\t$this->hookObjectsSingleField = array();\n \t\tif (is_array ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getSingleFieldClass']))\t{\n \t\t\tforeach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tceforms.php']['getSingleFieldClass'] as $classRef)\t{\n \t\t\t\t$this->hookObjectsSingleField[] = &t3lib_div::getUserObj($classRef);\n \t\t\t}\n \t\t}\n\t\t$this->inline = t3lib_div::makeInstance('t3lib_TCEforms_inline');\n\t}", "function onProcess($formID, $formStruct, $formData, $flagHTML, &$tVars) {\n\n\t}", "public function hookConfigForm($args)\n {\n $view = get_view();\n echo $view->partial('plugins/clean-url-config-form.php');\n }", "protected function customizeForm($form, $charges)\n {\n }", "protected function addFormValidators() {\n \t}", "private function public_hooks()\n\t{\n\t}", "private function updater() {\n\n\t\t\\add_action(\n\t\t\t'wpforms_updater',\n\t\t\tfunction ( $key ) {\n\t\t\t\tnew \\WPForms_Updater(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'plugin_name' => 'WPForms Conversational Forms',\n\t\t\t\t\t\t'plugin_slug' => 'wpforms-conversational-forms',\n\t\t\t\t\t\t'plugin_path' => \\plugin_basename( \\WPFORMS_CONVERSATIONAL_FORMS_FILE ),\n\t\t\t\t\t\t'plugin_url' => \\trailingslashit( $this->url ),\n\t\t\t\t\t\t'remote_url' => \\WPFORMS_UPDATER_API,\n\t\t\t\t\t\t'version' => \\WPFORMS_CONVERSATIONAL_FORMS_VERSION,\n\t\t\t\t\t\t'key' => $key,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t}", "function setup_comment_form(){\r\n $options = $this->get_options();\r\n if($options['field_method'] == 'after_fields' && $options['form_type'] == 'wp3'){\r\n add_filter('comment_form_defaults',array(&$this,'add_twitterfield_wp3'));\r\n } elseif( $options['field_method'] == 'after_fields' && $options['form_type']== 'legacy'){\r\n add_action('comment_form_after_fields',array(&$this,'add_twitterfield_legacy'));\r\n } elseif( $options['field_method'] == 'after_form' ){\r\n add_action('comment_form',array(&$this,'add_twitterfield_box'));\r\n }\r\n }", "protected function _prepareForm()\r\n {\r\n $form = new Varien_Data_Form(array(\r\n 'id' => 'edit_form',\r\n 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),\r\n 'method' => 'post',\r\n 'enctype' => 'multipart/form-data',\r\n )\r\n );\r\n\r\n $fieldSet = $form->addFieldset('magento_form', array('legend' => $this->helper->__('Webhook information')));\r\n\r\n $fieldSet->addField('code', 'select', array(\r\n 'label' => $this->helper->__('Code'),\r\n 'class' => 'required-entry',\r\n 'name' => 'code',\r\n 'values' => ApiExtension_Magento_Block_Adminhtml_Webhooks_Grid::getAvailableHooks()\r\n ));\r\n\r\n $fieldSet->addField('url', 'text', array(\r\n 'label' => $this->helper->__('Callback URL'),\r\n 'class' => 'required-entry',\r\n 'name' => 'url',\r\n ));\r\n\r\n $fieldSet->addField('description', 'textarea', array(\r\n 'label' => $this->helper->__('Description'),\r\n 'name' => 'description',\r\n ));\r\n\r\n $fieldSet->addField('data', 'textarea', array(\r\n 'label' => $this->helper->__('Data'),\r\n 'name' => 'data',\r\n ));\r\n\r\n $fieldSet->addField('token', 'text', array(\r\n 'label' => $this->helper->__('Token'),\r\n 'name' => 'token',\r\n ));\r\n\r\n $fieldSet->addField('active', 'select', array(\r\n 'label' => $this->helper->__('Active'),\r\n 'values' => ApiExtension_Magento_Block_Adminhtml_Webhooks_Grid::getOptionsForActive(),\r\n 'name' => 'active',\r\n ));\r\n\r\n if ($this->session->getWebhooksData()) {\r\n $form->setValues($this->session->getWebhooksData());\r\n $this->session->setWebhooksData(null);\r\n } elseif (Mage::registry('webhooks_data')) {\r\n $form->setValues(Mage::registry('webhooks_data')->getData());\r\n }\r\n\r\n $form->setUseContainer(true);\r\n $this->setForm($form);\r\n return parent::_prepareForm();\r\n }", "public function beforeHtml() {\n $form_name = $this->getAttribute('id');\n\n if ($this->getAttribute('method') == 'post') {\n\n $uni = session::getInstance()->createToken($form_name);\n\n $this->addHidden('token')->setValue($uni)->setId('token_' . $form_name);\n $this->addHidden('token_name')->setId('token_name' . $form_name)->setValue($form_name);\n }\n\n $classe = 'form';\n\n if ($this->getAttribute('class'))\n $classe = $this->getAttribute('class') . ' ' . $classe;\n\n $this->setAttribute('class',$classe);\n\n\t\treturn parent::beforeHtml(array(), 'form_' . $form_name);\n //return $this->processElementsWrap();\n\n\n //Old process code!!\n\n $hidden = array();\n\n $wrap_class = 'form_output_handler_' . $this->_wrapper;\n $wrapper = new $wrap_class($form_name);\n\n foreach ($this->_elements as $element) {\n if (!is_object($element))\n $wrapper->wrap($element,true);\n else {\n switch ($element->type) {\n case 'hidden':\n if ($element->getAttribute('name') == 'MAX_FILE_SIZE')\n $wrapper->wrap($element,true);\n else\n $hidden[] = $element->html();\n break;\n case 'submit':\n case 'reset':\n $wrapper->wrapSubmit($element);\n break;\n default:\n $wrapper->wrap($element);\n }\n }\n }\n\n return array(\n 'elements' => $wrapper->output($form_name) .\n implode(\"\\n\",$hidden)\n );\n }", "public static function add_hooks_action() {\n\t\t\tif ( self::$options_page_id !== optionsframework_get_cur_page_id() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Setup custom dependencies.\n\t\t\tadd_filter( 'of_localized_vars', array( __CLASS__, 'of_localized_vars_filter' ) );\n\n\t\t\tadd_filter( 'of_get_default_values', array( __CLASS__, 'override_options_filter' ) );\n\t\t\tadd_filter( 'optionsframework_get_validated_options', array(\n\t\t\t\t__CLASS__,\n\t\t\t\t'optionsframework_get_validated_options_filter',\n\t\t\t), 10, 2 );\n\n\t\t\tif ( self::wizard_start_from_scratch() ) {\n\t\t\t\tadd_filter( 'optionsframework_fields_saved_settings-' . self::$options_page_id, array(\n\t\t\t\t\t__CLASS__,\n\t\t\t\t\t'optionsframework_fields_saved_settings_filter',\n\t\t\t\t) );\n\t\t\t\tadd_action( 'optionsframework_after_options', array( __CLASS__, 'wizard_mode_hidden_fields_action' ) );\n\t\t\t\tadd_action( 'optionsframework_before', array( __CLASS__, 'optionsframework_before_action' ) );\n\t\t\t} else {\n\t\t\t\tadd_action( 'optionsframework_after', array( __CLASS__, 'print_wizard_mode_selector_action' ) );\n\t\t\t\tadd_action( 'admin_enqueue_scripts', array( __CLASS__, 'admin_enqueue_scripts_action' ) );\n\t\t\t}\n\t\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 }", "public function updateForms()\n {\n $this->updateSubmitForms();\n $this->updateSearchForms();\n $this->updateSearchFields();\n $this->updateFeaturedFormFields();\n $this->updateTitlesFormFields();\n $this->updateShortFormFields();\n $this->updateSortingFormFields();\n }", "public function execute()\n\t{\n\t\t$opf = Opl_Registry::get('opf');\n\n\t\t$this->invokeEvent('preInit');\n\t\t$this->onInit();\n\t\t$this->invokeEvent('postInit');\n\n\t\t// Validate the input data.\n\t\t$data = $this->_retrieveData();\n\n\t\t// Decide, if the form has been sent to us.\n\t\tif($_SERVER['REQUEST_METHOD'] == $this->_method && isset($data[$opf->formInternalId]))\n\t\t{\n\t\t\t// Get the internal data and remove them from the \"official\" scope.\n\t\t\t$internals = $data[$opf->formInternalId];\n\t\t\tunset($data[$opf->formInternalId]);\n\n\t\t\t// The names must match.\n\t\t\tif(isset($internals['name']) && $internals['name'] == $this->_name)\n\t\t\t{\n\t\t\t\t$this->_step = 0;\n\t\t\t\tif(isset($internals['step']))\n\t\t\t\t{\n\t\t\t\t\t$this->_step = (integer)$internals['step'];\n\t\t\t\t}\n\t\t\t\t$tracker = $this->getTracker();\n\t\t\t\t$tracker->setSequence($this);\n\t\t\t\t$current = 0;\n\t\t\t\twhile($current < $this->_step)\n\t\t\t\t{\n\t\t\t\t\t// Get the current form and advance the placeholder pointer.\n\t\t\t\t\t$form = $this->getNextSubform();\n\n\t\t\t\t\t// Attempt to ensure that the tracked data are still valid.\n\t\t\t\t\t$formData = $tracker->retrieve($internals, $current);\n\t\t\t\t\t$current++;\n\n\t\t\t\t\t$state = $form->_validate($formData);\n\t\t\t\t\tif(!$state)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_step = $current;\n\t\t\t\t\t\t$this->_state = $form->_state = self::ERROR;\n\t\t\t\t\t\t$form->populate($data);\n\t\t\t\t\t\t$form->_onRender($this->_view);\n\t\t\t\t\t\t$this->_onRender($this->_view);\n\t\t\t\t\t\t$this->invokeEvent('preRender');\n\t\t\t\t\t\t$form->invokeEvent('preRender');\n\t\t\t\t\t\t$form->onRender();\n\t\t\t\t\t\t$form->invokeEvent('postRender');\n\t\t\t\t\t\t$this->invokeEvent('postRender');\n\t\t\t\t\t\treturn $this->_state;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$form = $this->getNextSubform();\n\t\t\t\t// Now, the currently displayed form.\n\t\t\t\t$state = $form->_validate($data);\n\t\t\t\tif(!$state)\n\t\t\t\t{\n\t\t\t\t\t$this->_state = $form->_state = self::ERROR;\n\t\t\t\t\t$form->populate($data);\n\t\t\t\t\t$form->_onRender($this->_view);\n\t\t\t\t\t$form->invokeEvent('preRender');\n\t\t\t\t\t$form->onRender();\n\t\t\t\t\t$form->invokeEvent('postRender');\n\t\t\t\t\treturn $this->_state;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$tracker->track($data, $current);\n\t\t\t\t\t$form->_state = self::ACCEPTED;\n\t\t\t\t}\n\t\t\t\t// Decide, what to do next: display another form or return\n\t\t\t\t$this->_step++;\n\t\t\t\tif(($form = $this->getNextSubform()) === false)\n\t\t\t\t{\n\t\t\t\t\t$this->_state = self::ACCEPTED;\n\t\t\t\t\t$this->invokeEvent('preAccept');\n\t\t\t\t\t$this->onAccept();\n\t\t\t\t\t$this->invokeEvent('postAccept');\n\t\t\t\t\treturn $this->_state;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->_state = $form->_state = self::RENDER;\n\t\t\t\t\t$form->_onRender($this->_view);\n\t\t\t\t\t$this->_onRender($this->_view);\n\t\t\t\t\t$form->invokeEvent('preRender');\n\t\t\t\t\t$form->onRender();\n\t\t\t\t\t$form->invokeEvent('postRender');\n\t\t\t\t\treturn $this->_state;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$form = $this->getNextSubform();\n\t\t$this->_state = $form->_state = self::RENDER;\n\t\t$form->_onRender($this->_view);\n\t\t$this->_onRender($this->_view);\n\t\t$form->invokeEvent('preRender');\n\t\t$form->onRender();\n\t\t$form->invokeEvent('postRender');\n\t\treturn $this->_state;\n\t}", "public function configure()\n\t{\n\t\tif (!$this->form)\n\t\t{\n\t\t\t$this->form = new WebForm\\Form($this->getId());\n\t\t}\n\n\t\t$data = $this->form->get();\n\t\t$isCloud = Loader::includeModule('bitrix24');\n\n\t\t$this->fileDir = 'form';\n\t\t$this->fileName = str_replace(\n\t\t\t['#id#', '#sec#'],\n\t\t\t[$this->getId(), $data['SECURITY_CODE']],\n\t\t\t$isCloud ? 'loader_#id#.js' : 'loader_#id#_#sec#.js'\n\t\t);\n\n\t\t$name = 'crm.site.form.embed.unit';\n\t\t$this->addExtension($name);\n\t\t$module = $this->getModule($name);\n\t\t$module->getProfile()->setCallParameter($this->getCallParameter());\n\n\t\t$this->embeddedModuleName = 'crm.site.form.unit.loader';\n\t}", "public function afterSave()\n\t{\n\t\t//annoying on every edit, move to a checkbox on form and handle in controller\n\t}", "function options_form(&$form, &$form_state) {\r\n // It is very important to call the parent function here:\r\n parent::options_form($form, $form_state);\r\n\r\n switch ($form_state['section']) {\r\n // Only add if section is allow because this is called for all sections for some reason.\r\n case 'allow':\r\n // Add allow option to the form.\r\n $form['allow']['#options']['expose_imagestyle'] = t('Expose imagestyle settings');\r\n break;\r\n }\r\n }", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "public function boot()\n {\n Event::listen('backend.form.extendFields', function ($form) {\n if (get_class($form->config->model) == 'Cms\\Classes\\Page' && Settings::get('klyp_builder_cms', true)) {\n // remove the existing two fields and add them back again later\n // in order to reorder these fields\n $form->removeField('markup');\n $form->removeField('code');\n\n // add our custom page builder field\n $form->addSecondaryTabFields(\n [\n 'markup' => [\n 'tab' => 'Klyp Builder',\n 'stretch'=> true,\n 'type'=>'Klyp\\PageBuilder\\FormWidgets\\PageBuilder'\n ],\n 'code' => [\n 'tab' => 'cms::lang.editor.code',\n 'stretch'=> true,\n 'type'=> 'codeeditor',\n 'language'=> 'php'\n ]\n ]\n );\n }\n\n return;\n });\n }", "protected function _readFormFields() {}", "function layout_builder_post_update_override_entity_form_controller() {\n // Empty post-update hook.\n}", "abstract function getForm($form, &$form_state, $disabled, $myvalues_override);", "public function gateway_cc_form()\n {\n // register the action to remove default CC form\n return;\n }", "public function formAction() {}", "function definition_after_data($newmsform) {\n $mform = $newmsform->_form;\n\t\t\n if ($mform->isSubmitted()) {\n $someelem = $mform->getElement('salt');\n $value = $someelem->getValue();\n\t\t\techo $value & 'Hello world';\n // Do whatever checking you need\n //$someelem->setValue($someothervalue);\n // etc.\n // add some new elements...\n }\n\t\n\t}", "function opensky_form_islandora_scholar_embargo_form_alter (&$form, &$form_state, $form_id) {\n // dpm ('opensky_form_islandora_scholar_embargo_form_alter');\n\n $options = array(\n 'object' => t('Object-level embargo'),\n 'datastream' => t('Datastream'),\n );\n\n // add options for the object datastreams\n $pid = $form['pid']['#value'];\n $object = islandora_object_load($pid);\n foreach ($object as $datastream) {\n $options[$datastream->id] = $datastream->label;\n }\n\n // allowable options - these are the only \"embargop options\" allowed in opensky\n $allowed_options = array (\n 'object' => '',\n 'PDF' => '', // OPenSky added PDF to original \n 'OBJ' => '',\n 'PROXY_MP3' => '',\n );\n\n // reduce options to those allowable\n $options = array_intersect_key($options, $allowed_options);\n $form['dsid']['#options'] = $options;\n\n // stick opensky form submit handler in before islandora_scholar version\n module_load_include('inc', 'opensky', 'includes/utilities');\n // array_splice ($form['#submit'], 0, 0, 'opensky_embargo_form_submit');\n\n \n $form['#submit'] = array('opensky_embargo_form_submit');\n\n // dpm ($form);\n\n}", "public function createForm()\n {\n }", "abstract public function createForm();", "abstract public function createForm();", "abstract public function getFormDesc();", "public static function onBeforeFormInfo(){\n\t\t\t\t\n\t\tif(BlogPress::IsError()){\n\t\t\t\t\t\n\t\t\tif(strpos(BlogPress::GetError(), 'code002') !== false){\n\t\t\t\techo '<div class=\"box-form-error\">\n\t\t\t\t\t<h2>' . MUI('Une erreur est survenue lors de la modification des informations de votre compte') .' (code: 002)</h2>\n\t\t\t\t\t<p>' . MUI('Une erreur technique est survenue. L\\'équipe technique travail à la résolution du problème, merci de retenter cette opération un peu plutard !').'</p>\n\t\t\t\t\t<p>' . MUI('Cordialement').',</p>\n\t\t\t\t\t<p>' . MUI('L\\'équipe de') .' '. Blog::GetInfo('title').'</p>\n\t\t\t\t</div>';\n\t\t\t\t\n\t\t\t}elseif(strpos(BlogPress::GetError(), 'code002') !== false){\n\t\t\t\techo '<div class=\"box-form-error\">\n\t\t\t\t\t\t<h2>' . MUI('Une erreur est survenue lors de la modification des informations de votre compte').' (code: 001)</h2>\n\t\t\t\t\t\t<p>' . MUI('Une erreur technique est survenue. L\\'équipe technique travail à la résolution du problème, merci de retenter cette opération un peu plutard !').'</p>\n\t\t\t\t\t\t<p>' . MUI('Cordialement').',</p>\n\t\t\t\t\t\t<p>' . MUI('L\\'équipe de') . ' '. Blog::GetInfo('title').'</p>\n\t\t\t\t\t</div>';\n\t\t\t}else{\n\t\t\t\techo '\n\t\t\t\t\t<div class=\"box-form-error\">\n\t\t\t\t\t\t<h2>' . MUI('Erreur dans le formulaire').'</h2>\n\t\t\t\t\t\t<p>' . MUI('Le formulaire a rencontré une ou plusieurs erreurs indiquées ci-après').' :</p>\n\t\t\t\t\t\t'.BlogPress::GetError().'\n\t\t\t\t\t</div>';\n\t\t\t}\n\t\t}else{\n\t\t\t\t\t\t\t\t\t\n\t\t\techo '\n\t\t\t\t<div class=\"box-form-valid\">\n\t\t\t\t\t<h2>' . MUI('Vos informations ont correctement enregistrés !') . '</h2>\n\t\t\t\t</div>\t\t\t\t\n\t\t\t\t';\n\t\t\t\t\t\t\n\t\t}\n\t}", "function form( $instance ) {\r\n\t}", "function form( $instance ) {\r\n\t}", "private function hooks() {\n\n\t\t\t/** Actions *******************************************************************/\n\n\t\t\t// Build the submenus.\n\t\t\tadd_action( 'admin_menu', array( $this, 'admin_menus' ), 10 );\n\n\t\t\t// Loading the talks edit screen\n\t\t\tadd_action( 'load-edit.php', array( $this, 'load_edit_talk' ) );\n\n\t\t\t// Make sure Editing a plugin's taxonomy highlights the plugin's nav\n\t\t\tadd_action( 'load-edit-tags.php', array( $this, 'taxonomy_highlight' ) );\n\n\t\t\t// Add metaboxes for the post type\n\t\t\tadd_action( \"add_meta_boxes_{$this->post_type}\", array( $this, 'add_metaboxes' ), 10, 1 );\n\t\t\t// Save metabox inputs\n\t\t\tadd_action( \"save_post_{$this->post_type}\", array( $this, 'save_metaboxes' ), 10, 3 );\n\n\t\t\t// Display upgrade notices\n\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices' ) );\n\n\t\t\t// Register the settings\n\t\t\tadd_action( 'admin_init', array( $this, 'register_admin_settings' ) );\n\n\t\t\tadd_action( 'load-settings_page_wc_talks', array( $this, 'settings_load' ) );\n\n\t\t\t// Talks columns (in post row)\n\t\t\tadd_action( \"manage_{$this->post_type}_posts_custom_column\", array( $this, 'column_data' ), 10, 2 );\n\n\t\t\t// Maybe neutralize quick edit\n\t\t\tadd_action( 'post_row_actions', array( $this, 'talk_row_actions' ), 10, 2 );\n\n\t\t\t// Do some global stuff here (custom css rule)\n\t\t\tadd_action( 'admin_head', array( $this, 'admin_head' ), 10 );\n\n\t\t\t/** Filters *******************************************************************/\n\n\t\t\t// Updated message\n\t\t\tadd_filter( 'post_updated_messages', array( $this, 'talks_updated_messages' ), 10, 1 );\n\t\t\tadd_filter( 'bulk_post_updated_messages', array( $this, 'talks_updated_bulk_messages' ), 10, 2 );\n\n\t\t\t// Redirect\n\t\t\tadd_filter( 'redirect_post_location', array( $this, 'redirect_talk_location' ), 10, 2 );\n\n\t\t\t// Filter the WP_List_Table views to include custom views.\n\t\t\tadd_filter( \"views_edit-{$this->post_type}\", array( $this, 'talk_views' ), 10, 1 );\n\n\t\t\t// temporarly remove bulk edit\n\t\t\tadd_filter( \"bulk_actions-edit-{$this->post_type}\", array( $this, 'talk_bulk_actions' ), 10, 1 );\n\n\t\t\t// Talks column headers.\n\t\t\tadd_filter( \"manage_{$this->post_type}_posts_columns\", array( $this, 'column_headers' ) );\n\n\t\t\t// Add a link to About & settings page in plugins list\n\t\t\tadd_filter( 'plugin_action_links', array( $this, 'modify_plugin_action_links' ), 10, 2 );\n\n\t\t\t/** Specific case: ratings ****************************************************/\n\n\t\t\t// Only sort by rates & display people who voted if ratings is not disabled.\n\t\t\tif ( ! wct_is_rating_disabled() ) {\n\t\t\t\tadd_action( \"manage_edit-{$this->post_type}_sortable_columns\", array( $this, 'sortable_columns' ), 10, 1 );\n\n\t\t\t\t// Manage votes\n\t\t\t\tadd_filter( 'wct_admin_get_meta_boxes', array( $this, 'ratings_metabox' ), 9, 1 );\n\t\t\t\tadd_action( 'load-post.php', array( $this, 'maybe_delete_rate' ) );\n\n\t\t\t\t// Custom feedback\n\t\t\t\tadd_filter( 'wct_admin_updated_messages', array( $this, 'ratings_updated' ), 10, 1 );\n\n\t\t\t\t// Help tabs\n\t\t\t\tadd_filter( 'wct_get_help_tabs', array( $this, 'rates_help_tabs' ), 11, 1 );\n\t\t\t}\n\t\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function form( $instance ) {\n\t}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "protected function skipForeignFormProcessing() {}", "public function hook() {\n\t\tadd_action( 'admin_print_scripts', [ $this, 'admin_scripts' ] );\n\t\t// Elementor support.\n\t\tadd_action( 'elementor/editor/after_enqueue_scripts', [ $this, 'admin_scripts' ] );\n\t\t// UGH! Beaver Builder hack.\n\t\tif ( isset( $_GET['fl_builder'] ) ) { // phpcs:ignore\n\t\t\tadd_action( 'wp_enqueue_scripts', [ $this, 'admin_scripts' ] );\n\t\t}\n\n\t\tadd_action( 'advanced-sidebar-menu/widget/category/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t\tadd_action( 'advanced-sidebar-menu/widget/page/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t\tadd_action( 'advanced-sidebar-menu/widget/navigation-menu/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t}", "public function getForm();", "function build() {\n $this->built = TRUE;\n foreach ($this->build_callbacks as $callback) {\n call_user_func($callback, $this);\n drupal_alter(\"fapitng_form_$callback\", $this);\n }\n drupal_alter('fapitng_form', $this);\n }", "function handle_post($indata) {\n// showDebug('form_class POST:');\n// showArray($indata); \n return;\n }", "function form_init_elements()\r\n {\r\n parent::form_init_elements() ;\r\n\r\n $override = new FECheckBox('Override Z0 Record Validation') ;\r\n $this->add_element($override) ;\r\n }", "function layout_builder_post_update_routing_entity_form() {\n // Empty post-update hook.\n}", "function action_instituer_forms_donnee_dist() {\n\t//$securiser_action();\n\t$arg = _request('arg');\n\t$hash = _request('hash');\n\t$id_auteur = $auteur_session['id_auteur'];\n\t$redirect = _request('redirect');\n\tif ($redirect==NULL) $redirect=\"\";\n\tif (!include_spip(\"inc/securiser_action\"))\n\t\tinclude_spip(\"inc/actions\");\n\tif (verifier_action_auteur(\"instituer_forms_donnee-$arg\",$hash,$id_auteur)==TRUE) {\n\t\n\t\tlist($id_donnee, $statut) = preg_split('/\\W/', $arg);\n\t\tif (!$statut) $statut = _request('statut_nouv'); // cas POST\n\t\tif (!$statut) return; // impossible mais sait-on jamais\n\n\t\t// if ($GLOBALS['spip_version_code']<1.92)\n\t\t\t// include_spip('inc/forms_compat_191');\n\t\t$id_donnee = intval($id_donnee);\n\n\t\tsql_update('spip_forms_donnees', array('statut'=>_q($statut)), \"id_donnee=\"._q($id_donnee));\n\t\t// spip_query(\"UPDATE spip_forms_donnees SET statut=\"._q($statut).\" WHERE id_donnee=\"._q($id_donnee));\n\t\t\n\t\tif ($rang_nouv = intval(_request('rang_nouv'))){\n\t\t\tinclude_spip(\"inc/forms\");\n\t\t\tForms_rang_update($id_donnee,$rang_nouv);\n\t\t}\n\t}\n}" ]
[ "0.8037746", "0.77281487", "0.7497923", "0.6808536", "0.6784301", "0.6636347", "0.65648687", "0.65648687", "0.6557904", "0.6537432", "0.6503394", "0.6428154", "0.63955647", "0.6384943", "0.63213515", "0.62174726", "0.61859185", "0.6148009", "0.61426324", "0.6132485", "0.60992736", "0.60942537", "0.60457194", "0.6031547", "0.6028063", "0.6010403", "0.60062563", "0.59948575", "0.5957888", "0.5937156", "0.59177476", "0.59108347", "0.5906659", "0.59021616", "0.5900618", "0.5890845", "0.5844109", "0.5816695", "0.581366", "0.579919", "0.57853526", "0.57792807", "0.57745445", "0.57442635", "0.57260066", "0.571697", "0.5714693", "0.57088596", "0.5701628", "0.56857115", "0.5685495", "0.5664517", "0.5663051", "0.56604886", "0.56538373", "0.5652181", "0.5641954", "0.5629235", "0.5626754", "0.56013453", "0.5596654", "0.5596498", "0.5594775", "0.559112", "0.5586636", "0.55801946", "0.5572158", "0.5572013", "0.55708003", "0.5564743", "0.55646944", "0.5560628", "0.554207", "0.5510932", "0.54920226", "0.54920226", "0.5489386", "0.5482208", "0.5477812", "0.5477812", "0.5473362", "0.5457803", "0.5457803", "0.5457803", "0.5457803", "0.5457803", "0.5457803", "0.5457803", "0.5457803", "0.5457803", "0.5457803", "0.54565746", "0.5455102", "0.5454744", "0.545207", "0.54511577", "0.54503167", "0.54423386", "0.544025", "0.54366237" ]
0.7765114
1
Change document title to a custom form title.
public function change_form_page_title( $title ) { if ( ! empty( $this->form_data['settings']['conversational_forms_title'] ) ) { $title['title'] = $this->form_data['settings']['conversational_forms_title']; } return $title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDocumentTitle($newTitle) {\n $this->document['title'] = $newTitle;\n }", "public function setTitle($newTitle) { $this->Title = $newTitle; }", "protected function setPageTitle() {\r\n\t\t$pageTitleText = (empty($this->settings['news']['semantic']['general']['pageTitle']['useAlternate'])) ? $this->newsItem->getTitle() : $this->newsItem->getAlternativeTitle();\r\n\t\t$pageTitleAction = $this->settings['news']['semantic']['general']['pageTitle']['action'];\r\n\r\n\t\tif (!empty($pageTitleAction)) {\r\n\t\t\tswitch ($pageTitleAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$pageTitleText .= ': ' . $GLOBALS['TSFE']->page['title'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$pageTitleText = $GLOBALS['TSFE']->page['title'] . ': ' . $pageTitleText;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t\t$this->pageTitle = html_entity_decode($pageTitleText, ENT_QUOTES, \"UTF-8\");\r\n\t\t\t$GLOBALS['TSFE']->page['title'] = $this->pageTitle;\r\n\t\t\t$GLOBALS['TSFE']->indexedDocTitle = $this->pageTitle;\r\n\t\t}\r\n\t}", "public function setTitle( $newTitle )\n {\n\t\t$this->title = $newTitle;\n\t}", "public function setTitle($newTitle) {\n\t\t$this->title = $newTitle;\n\t}", "function edit_form_after_title()\n {\n }", "function edit_form_after_title()\n {\n }", "function od_set_page_title($orig_title) {\n\t\treturn \"Map | \"; // set the page title (could be improved, eg based on filters. Might be something the user wants to set\n\t}", "public function setPageTitle($title);", "public function setTitle($title)\n {\n $this->setValue('title', $title);\n }", "public function the_title( $title ) {\n\n\t\tif ( in_the_loop() ) {\n\t\t\t$title = sprintf( /* translators: %s - form title. */\n\t\t\t\tesc_html__( '%s Preview', 'wpforms-lite' ),\n\t\t\t\t! empty( $this->form_data['settings']['form_title'] ) ? sanitize_text_field( $this->form_data['settings']['form_title'] ) : esc_html__( 'Form', 'wpforms-lite' )\n\t\t\t);\n\t\t}\n\n\t\treturn $title;\n\t}", "public function setTitle($title) {\n $this->_title = $title;\n }", "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "protected function setTitle()\n\t{\n\t\tglobal $APPLICATION;\n\n\t\tif ($this->arParams[\"SET_TITLE\"] == 'Y')\n\t\t\t$APPLICATION->SetTitle(Localization\\Loc::getMessage(\"SPOL_DEFAULT_TITLE\"));\n\t}", "function setTitle($title) {\n\t\t$this->_title = $title;\n\t}", "public function setTitle($title) {\r\n $this->_title = $title;\r\n }", "public static function setTitle($projectTitle=\"Default App\")\n {\n global $application_name;\n $application_name = $projectTitle;\n }", "public function setTitle($title) {\r\n $this->title = $title;\r\n }", "function set_title($title){\r\n\t\t$this->_title = $title;\r\n\t}", "public function setTitle($title)\r\n\t\t{\r\n\t\t\t$this->_title = $title;\r\n\t\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\n {\n $this->_title = $title;\n }", "public function setTitle($title)\n {\n $this->_title = $title;\n }", "function setTitle($title)\n {\n $this->m_title = $title;\n }", "public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "public function setFormTitle()\n {\n if ($enquiry = Mage::registry('enquiry')) {\n return $this->__('Enquiry: #%s', $enquiry->getid());\n }\n return $this->__('Contact Enquiry Information');\n }", "public function setTitle($title) {\n $this->title = $title ;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function set_title($title)\n {\n $this->title = $title;\n }", "static public function setTitle($new_title) {\n\t\tif (is_array($new_title)) {\n\t\t\t$new_title = implode(' • ', $new_title);\n\t\t}\n\t\tself::$page_title = 'Illarion • ' . $new_title;\n\t}", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t\n\t\t\t$this->_title = $title;\n\t\t\n\t\t}", "public function setTitle($title) {\n $this->_title = $title;\n }", "public function setTitle($title) {\n\t\tTemplate::setSiteTitle($title);\n\t}", "function setTitle($title)\r\n\t{\r\n\t\t$this->title = $title;\r\n\t}", "function getTitle() {\n return 'Forms Demo';\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title){\n $this->title = $title;\n }", "function set_the_title($title) {\n\n md_set_the_title($title);\n \n }", "function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "public function setTitle($title){\n $this->title = $title;\n }", "public function set_pagetitle($title)\n {\n $this->pagetitle = $title;\n }", "public function setTitle($title){\n\t\t$this->mail_title = $title;\n\t}", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "public function setPageTitle($title)\n {\n self::set('_title', $title);\n }", "function setTitle( $title )\n {\n $title = trim( $title );\n $this->properties['TITLE'] = $title;\n }", "public function setTitle($title = '')\n {\n $this->title = $title;\n }", "function edan_search_set_doc_title( $title )\n {\n $options = new esw_options_handler();\n $cache = new esw_cache_handler();\n\n if(edan_search_name_from_url() == $options->get_path() && $options->get_title() != '')\n {\n if(get_query_var('edanUrl'))\n {\n $object = $cache->get()['object'];\n\n if($object)\n {\n if(property_exists($object, 'content') && property_exists($object->{'content'}, 'descriptiveNonRepeating'))\n {\n if(property_exists($object->{'content'}->{'descriptiveNonRepeating'}, 'title'))\n {\n $title = $object->{'content'}->{'descriptiveNonRepeating'}->{'title'}->{'content'};\n }\n }\n elseif(property_exists($object, 'title'))\n {\n if(property_exists($object->{'title'}, 'content'))\n {\n $title = $this->object->{'title'}->{'content'};\n }\n else\n {\n $title = $this->object->{'title'};\n }\n }\n }\n }\n else\n {\n $title = $options->get_title();\n }\n }\n\n $sitename = get_bloginfo('name');\n return $title . \" - $sitename\";\n }", "function setTitle($title) {\n $this->fields['title'] = $title;\n return $this;\n }", "public function setTitle($title)\n\t{\n\t\t$this->setBodyTitle($title);\n\t\t$this->setPageTitle($title);\n\t}", "public function setTitle($title){\n $this->p_title = $title;\n }", "public function setTitle($title){\n \t$this->title = $title;\n }", "function setTitle($title)\n\t{\n\t\t$this->table->title = $title;\n\t\t$this->record->title = $title;\n\t}", "public static function setTitle(string $title) {}", "function set_title($title) \r\n\t{\r\n\t\t//$this->title = $title;\r\n\t\t$this->data['title_for_layout'] = $title;\r\n\t\t$this;\r\n\t}", "public function set_title($title)\n {\n $this->set_default_property(self::PROPERTY_TITLE, $title);\n }", "protected function _buildTitle()\n\t{\n\t\tif ($this->_task)\n\t\t{\n\t\t\t$title = Lang::txt('COM_MEMBERS_REGISTER_' . strtoupper($this->_task));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$title = Lang::txt('COM_MEMBERS_REGISTER');\n\t\t}\n\t\t\\Document::setTitle($title);\n\t}", "protected function regeneratePageTitle() {}", "protected function setPageTitle($title) {\n\n $this->pageTitle = $title;\n\n $args = array('class' => 'title');\n $titleTag = \\MUtil_Html::create('h3', $title, $args);\n\n $this->html->append($titleTag);\n }", "public function change_default_title($title)\n {\n $screen = get_current_screen();\n\n if ($this->token == $screen->post_type) {\n $title = 'Enter a title for your Chiro Quiz';\n }\n\n return $title;\n }", "public function _settings_field_contact_form_title() {\n global $zendesk_support;\n $value = $zendesk_support->_is_default( 'contact_form_title' ) ? '' : $zendesk_support->settings['contact_form_title'];\n ?>\n <input type=\"text\" class=\"regular-text\" name=\"zendesk-settings[contact_form_title]\" value=\"<?php echo $value; ?>\"\n placeholder=\"<?php echo $zendesk_support->default_settings['contact_form_title']; ?>\"/>\n <?php\n }", "public function setTitle($title = ''){\n $this->setVar('TITLE', $title);\n }", "public function setPageTitle($page_name);", "public function setPageTitle($page_name);", "public function set_name($title)\n {\n if (!empty($title)) {\n $this->title = Database::escape_string($title);\n }\n }", "public function setTitle(string $title) {\n\t\t$this->title = $title;\n\t}", "function setBrowserTitle( $pTitle ) {\n\t\tglobal $gBitSmarty, $gPageTitle;\n\t\t$gPageTitle = $pTitle;\n\t\t$gBitSmarty->assign( 'browserTitle', $pTitle );\n\t\t$gBitSmarty->assign( 'gPageTitle', $pTitle );\n\t}", "function DBDataFormTitle()\n {\n return\n $this->GetRealNameKey\n (\n $this->ApplicationObj()->PertainsSetup[ $this->ApplicationObj()->Pertains ],\n \"Data_Form_Title\"\n );\n }", "protected function setDocument() {\n $document = JFactory::getDocument();\n $document->setTitle(JText::_('COM_LAJVIT_ADMINISTRATION'));\n }", "public static function change_default_title( $title ){\n\t\t$screen = get_current_screen();\n\n\t\tif ( self::$post_type_name == $screen->post_type )\n\t\t\t$title = __( 'Enter Sponsor Name', self::$text_domain );\n\n\t\treturn $title;\n\t}", "function setPageTitle($pageTitle)\n\t{\n\t\t$this->pageTitle = $pageTitle;\n\t}", "public function setTitle($title)\n\t{\n\t\tif (!empty($title)) {\n\t\t\t$this->title = $title;\n\t\t}\n\t}", "public function setTitle($val){ return $this->setField('title',$val); }", "public function setTitle($value)\n {\n if (!array_key_exists('title', $this->fieldsModified)) {\n $this->fieldsModified['title'] = $this->data['fields']['title'];\n } elseif ($value === $this->fieldsModified['title']) {\n unset($this->fieldsModified['title']);\n }\n\n $this->data['fields']['title'] = $value;\n }", "public function setTitle(string $title);", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\n\t\tif($this->pageInitialized)\n\t\t{\n\t\t\t$titleElement = $this->document->getElementsByTagName('title')->item(0);\n\t\t\t$titleElement->clear();\n\t\t\t$titleElement->loadHtml($title);\n\t\t}\n\t}", "public function setPageTitle($title)\n\t{\n\t\t$this->_themeExtras['title'] = $title;\n\t}", "public static function setPageTitle($title)\n\t{\n\t\tYii::app()->controller->pageTitle = $title;\n\t}", "public function setTitle($title)\n {\n $this->title = (string) $title;\n }" ]
[ "0.75656223", "0.73269576", "0.7274044", "0.7259687", "0.7222403", "0.7209773", "0.7209773", "0.71800333", "0.71607107", "0.71281415", "0.7075794", "0.70539314", "0.70444083", "0.70444083", "0.7036988", "0.70235217", "0.701972", "0.7018842", "0.6986756", "0.6979772", "0.6971207", "0.697042", "0.697042", "0.697042", "0.696861", "0.6957624", "0.6957624", "0.695481", "0.69542575", "0.694255", "0.6937008", "0.6932703", "0.6932703", "0.6928251", "0.6928161", "0.69269043", "0.6924901", "0.6924901", "0.69234014", "0.6919284", "0.6913746", "0.6908409", "0.69041616", "0.69040734", "0.69040734", "0.69040734", "0.69040734", "0.69040734", "0.69040734", "0.6903528", "0.68953276", "0.6888416", "0.68731654", "0.68699145", "0.6868189", "0.68660915", "0.68660915", "0.68660915", "0.68660915", "0.68660915", "0.68660915", "0.68660915", "0.685725", "0.685725", "0.685725", "0.6847529", "0.6845202", "0.6817494", "0.68161756", "0.6805278", "0.6796756", "0.6796211", "0.6782141", "0.67810386", "0.6779132", "0.6778966", "0.67765784", "0.67643523", "0.6762328", "0.676085", "0.67501026", "0.6745293", "0.67391413", "0.6715157", "0.6715157", "0.6715051", "0.6711342", "0.67029434", "0.67005", "0.66937286", "0.66937065", "0.66747063", "0.6669956", "0.66678023", "0.6663932", "0.6662408", "0.66599154", "0.66454244", "0.66378635", "0.663714" ]
0.7908041
0
Modify permalink for a conversational form.
public function modify_permalink( $post_link, $post ) { if ( empty( $this->form_data['id'] ) || \absint( $this->form_data['id'] ) !== $post->ID ) { return $post_link; } if ( empty( $this->form_data['settings']['conversational_forms_enable'] ) ) { return $post_link; } return \home_url( $post->post_name ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function permalink_link()\n {\n }", "function rewrite_post_parmalink($original) {\n $parts = parse_url($original);\n $oparts = explode('/', preg_replace('/\\/$/', '', $parts['path']));\n $slug = end($oparts);\n\n $prefix = preg_replace('/\\/$/', '', $_SERVER[\"REQUEST_URI\"]);\n return \"//{$parts['host']}{$prefix}/{$slug}\";\n}", "function paper_wasp_edit_link( WP_Post $post = null ) {\n\n\tif ( is_null( $post ) ) {\n\t\t$post = get_post();\n\t}\n\n\treturn add_query_arg( 'paper-wasp', 1, get_permalink( $post ) );\n}", "public function using_mod_rewrite_permalinks()\n {\n }", "function cc_rewrite_permalink($link) {\n\n\tglobal $cc_pl_rewrites;\n\n\tforeach ( $cc_pl_rewrites as $cc_pl_rewrite ) {\n\t\tif ( preg_match(\"/{$cc_pl_rewrite[0]}/\", $link) ) {\n\t\t\t$rewritten_link = preg_replace(\"/{$cc_pl_rewrite[0]}/\", $cc_pl_rewrite[1], $link);\n\t\t\treturn $rewritten_link;\n\t\t}\n\t}\n\n\t# If nothing was changed, then just return the original link\t\n\treturn $link;\n\n}", "function custom_page_permalink() {\r\n global $wp_rewrite;\r\n\r\n if ( get_option('permalink_structure') != '' && !strpos($wp_rewrite->get_page_permastruct(), '.' . $this->options->extension) ) {\r\n $wp_rewrite->page_structure = $wp_rewrite->page_structure . '.' . $this->options->extension;\r\n }\r\n }", "function mizzouChangeAuthorPermalinks()\n{\n global $wp_rewrite;\n $wp_rewrite->author_structure= '';\n}", "public function using_permalinks()\n {\n }", "function simple_history_add_update_option_page_permalinks($action, $result) {\n\t\n\tif (\"update-permalink\" == $action) {\n\t\t$option_page_name = __(\"Permalink Settings\");\n\t\t$option_page = \"permalink\";\n\t\tsimple_history_add(\"action=modified&object_type=settings page&object_id=$option_page&object_name=$option_page_name\");\n\t}\n\n}", "public function permalink()\n {\n $permalink = get_permalink($this->wpPost);\n\n return $this->setAttribute(__METHOD__, $permalink);\n }", "function ca_rewrite_pattern_form_submit(&$form, &$form_state) {\n $ca_rewrite_pattern = entity_ui_form_submit_build_entity($form, $form_state);\n // Save and go back.\n $ca_rewrite_pattern->save();\n $form_state['redirect'] = CA_REWRITE_URI_PATH;\n}", "function setUrlLink(){\n if( $this->id == 0 ) return;\n $url = $this->aFields[\"url\"]->toString();\n if( $url == \"\" ) return;\n $url = strip_tags( preg_replace( \"/[\\\"']/\", \"\", $url ) );\n if( !$this->aFields[\"url\"]->editable ) $this->aFields[\"url\"]->display = false;\n $this->aFields[\"url_link\"]->display = true;\n $this->aFields[\"url_link\"]->value = \"<a href=\\\"\".$url.\"\\\">\".$url.\"</a>\";\n }", "function setPermalink($v) {\n\t\t$this->set('permalink', $v);\n\t}", "public function getPermalink();", "public function get_permalink()\n {\n }", "public function getBlogUrl()\n {\n return '<a href=\"https://cart2quote.zendesk.com/hc/en-us/articles/360028730291-No-Custom-Form-Request\"->__(Here)</a>';\n }", "function jn_htmlInUrl_page_permalink() {\r\n\t\tglobal $wp_rewrite;\r\n\t\tif ( in_array( 'page', $this->selected_post_type ) ) {\r\n\t\t\tif ( ! strpos( $wp_rewrite->get_page_permastruct(), '.html' ) ) {\r\n\t\t\t\t$wp_rewrite->page_structure = $wp_rewrite->page_structure . '.html';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$wp_rewrite->flush_rules();\r\n\t}", "function _prep_url($field)\r\n\t{\r\n\t\t$this->{$field} = $this->form_validation->prep_url($this->{$field});\r\n\t}", "public static function permalink_changed( $action ) {\r\n\t\tif ( 'update-permalink' === $action ) {\r\n\t\t\tif ( isset( $_POST['permalink_structure'] ) || isset( $_POST['category_base'] ) || isset( $_POST['tag_base'] ) ) {\r\n\t\t\t\tdelete_option( 'mainwp_child_clone_permalink' );\r\n\t\t\t\tdelete_option( 'mainwp_child_restore_permalink' );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function rebrandly_url_shortcode( $atts ) {\n // global $post;\n\n $atts = shortcode_atts(\n array(\n 'id' => get_the_ID(),\n ),\n $atts,\n 'rebrandly_url'\n );\n\n // $_scheme = ( is_ssl() ) ? 'https://' : 'http://'; // Rebrandly domains don't work with HTTPS\n $_scheme = 'http://';\n $_short_url = get_post_meta( $atts['id'], '_rebrandly_link_url', true );\n\n if ( $_short_url != '' ) {\n return $_scheme . $_short_url;\n } else {\n return get_permalink( $atts['id'] );\n }\n}", "function hub_edit_sample_permalink_html( $return, $id, $new_title, $new_slug ) {\r\n $post = get_post( $id );\r\n if ( $post && 'hubpage' == $post->post_type ) {\r\n $return = '<strong>' . __( 'Permalink:' ) . '</strong> ' . '<span id=\"sample-permalink\" tabindex=\"-1\">' . wpc_client_get_slug( 'hub_page_id' ) . '</span>';\r\n $return .= ' <span id=\"view-post-btn\"><a href=\"'. wpc_client_get_slug( 'hub_page_id' ) . $post->ID .'\" target=\"_blank\" class=\"button button-small\">Preview</a></span>';\r\n }\r\n return $return;\r\n }", "function kp_portfolio_link( $post )\n{\n wp_nonce_field( 'kp_save_portfolio_link_data', 'kp_portfolio_link_meta_box_nonce' );\n\n $value = get_post_meta( $post->ID, '_link', true );\n $hint = '<p class=\"howto\">Link to project website</p>';\n echo '<input name=\"kp_portfolio_link_field\" type=\"url\" value=\"' . esc_attr( $value ) . '\" style=\"width:100%\">' . $hint;\n}", "public function urlEdit( $post_ID )\n {\n echo $this->getUrlEdit( $post_ID );\n }", "public function link() { return site_url().'/'.$this->post->post_name; }", "function get_post_permalink($postid){\n if(defined('CLEANURLS')){\n return str_replace('%postid%',$postid,URL_POST);\n }\n else{\n return BLOGURL.'?postid='.$postid;\n }\n }", "function categ_url_hack_options() {\n\t\t $redirects = get_option('categ_url_hack');\n\n $categ_redirect = $redirects['categ'];\n\t\t $categ_url_url = $redirects['url'];\n \n $args = array(\n \t'hide_empty' => 0, \n \t'hierarchical' => 1, \n \t'name' => 'categ_url_hack[categ]',\n \t'id' => 'categ_redirect',\n \t'selected' => $categ_redirect,\n \t'show_option_none' => '-- ' . __('No redirect', 'categ_url_hack') . ' --'\n );\n ?>\n \n \n <div class=\"wrap\">\n <div id=\"icon-edit\" class=\"icon32\"></div>\n <h2><?php _e( 'Category redirect settings', 'categ_url_hack' ); ?></h2> \n <form method=\"post\" action=\"options-general.php?page=category-redirect\">\n <p><label for=\"categ_redirect\"><?php _e('Choose a category to redirect', 'categ_url_hack');?></label>&nbsp;<?php wp_dropdown_categories( $args ) ?></p>\n <p><label for=\"categ_url_url\"><?php _e(\"URL to redirect to:\", 'categ_url_hack' ); ?></label>&nbsp;<input type=\"text\" id=\"categ_url_url\" name=\"categ_url_hack[url]\" value=\"<?php echo $categ_url_url; ?>\" placeholder=\"<?php _e('Relative or Absolute URL', 'categ_url_hack' );?>\" size=\"20\">&nbsp;<?php _e(\"eg: /my-page or https://www.smol.org\" ); ?></p> \n \n <p class=\"submit\"><input type=\"submit\" name=\"submit_categ_url\" value=\"<?php _e('Save settings', 'categ_url_hack' ) ?>\" /></p>\n </form>\n </div>\n\t\t<?php\n\t\t}", "function dvs_change_blog_links($post_link, $id=0){\n\n $post = get_post($id);\n\n if( is_object($post) && $post->post_type == 'post'){\n return home_url('/my-prefix/'. $post->post_name.'/');\n }\n\n return $post_link;\n}", "function permalink_anchor($mode = 'id')\n {\n }", "function cd_post_slug_remove_short( $post_link, $post, $leavename ) { \r\n if ( 'cd-short' != $post->post_type || 'publish' != $post->post_status ) {\r\n return $post_link;\r\n }\r\n \r\n $post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );\r\n \r\n return $post_link;\r\n}", "function reset_permalinks() {\n global $wp_rewrite;\n $wp_rewrite->set_permalink_structure( '/%postname%/' );\n}", "function ca_rewrite_pattern_form($form, &$form_state, $ca_rewrite_pattern, $op = 'edit') {\n $form['description'] = array(\n '#type' => 'textfield',\n '#title' => t('Description'),\n '#default_value' => $ca_rewrite_pattern->description,\n );\n $form['pattern'] = array(\n '#type' => 'textfield',\n '#title' => t('Pattern'),\n '#default_value' => $ca_rewrite_pattern->pattern,\n );\n $form['replacement'] = array(\n '#type' => 'textfield',\n '#title' => t('Replacement'),\n '#default_value' => $ca_rewrite_pattern->replacement,\n );\n $form['actions'] = array('#type' => 'actions');\n $form['actions']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save Pattern'),\n '#weight' => 40,\n );\n return $form;\n}", "public function update_permalinks( $url, $post ) {\n\n\t\t$doc_types = get_option( 'ibx_docs_type' );\n\t\t$doc_types = maybe_unserialize( $doc_types );\n\n\t\tif ( empty( $doc_types ) ) {\n\t\t\treturn $url;\n\t\t}\n\t\t$post_type = get_post_type( $post );\n\n\t\tif ( in_array( $post_type, array_keys( $doc_types ), true ) ) {\n\t\t\treturn home_url( '/ibx/' . $post_type . '/' . $post->post_name . '/' );\n\t\t}\n\t\treturn $url;\n\t}", "function wpcom_referral_footer_field_refer_url_render() {\n\t\t$options = get_option( 'wpcom_referral_footer_settings' );\n\t\t?>\n\t\t<input type='text' name='wpcom_referral_footer_settings[wpcom_referral_footer_field_refer_url]' value='<?php echo $options['wpcom_referral_footer_field_refer_url']; ?>' style='width:100%;max-width:760px'>\n\t\t<p class=\"description\"><?php _e( 'For example: https://refer.wordpress.com/r/01/wordpress-com/' ); ?></p>\n\t\t<?php\n\t}", "function urlConfigForm()\r\n\t{\r\n\t\t/*\tAdd the field for the back link configuration\t*/\r\n\t\tadd_settings_field('wpklikandpay_payment_success', __('Url de retour pour un paiement accept&eacute;', 'wpklikandpay'), array('wpklikandpay_option', 'urlSuccess'), 'wpklikandpayUrlConfig', 'backUrlConfig');\r\n\t\tadd_settings_field('wpklikandpay_payment_canceled', __('Url de retour pour un paiement annul&eacute;', 'wpklikandpay'), array('wpklikandpay_option', 'urlCanceled'), 'wpklikandpayUrlConfig', 'backUrlConfig');\r\n\t\tadd_settings_field('wpklikandpay_payment_declined', __('Url de retour pour un paiement refus&eacute;', 'wpklikandpay'), array('wpklikandpay_option', 'urlDeclined'), 'wpklikandpayUrlConfig', 'backUrlConfig');\r\n\t}", "function wp_bibtexbrowser_url_builder( &$entry ) {\n\n // gets the posts corresponding to this entry\n $my_posts = get_posts(\n array(\n 'name' => $entry->getKey(),\n 'post_type' => __WP_PLUGIN__,\n )\n );\n \n // returns the permalink\n return get_permalink($my_posts[0]);\n}", "function mft_form_comment_form_alter(&$form, &$form_state) {\n $form['author']['homepage']['#access'] = FALSE;\n $form['actions']['submit']['#value'] = t('Post');\n}", "function post_permalink($post = 0)\n {\n }", "public function rewriteURL(): void\n {\n global $wp_rewrite;\n $customEndpoint = $this->customEndpoint();\n $newRules = [\n $customEndpoint . '/?$' => 'index.php?' . self::CUSTOMPAGEVAR . '=' . $customEndpoint,\n ];\n $wp_rewrite->rules = $newRules + (array) $wp_rewrite->rules;\n }", "function save_categ_redirect($data) {\n\t\t\tupdate_option('categ_url_hack', $data);\n\t\t}", "public function update()\n {\n $validatedDate = $this->validate([\n 'title' => 'required',\n 'original_url' => 'required',\n 'platform_id' => 'required'\n ]);\n \n $link = Url::find($this->link_id);\n $link->update([\n 'title' => $this->title,\n 'shorten_url' => $this->shorten_url,\n ]);\n \n $this->updateMode = false;\n \n session()->flash('message', 'Shorten URL Updated Successfully.');\n $this->resetInputFields();\n }", "function widget_sandbox_rsslinks_control() {\n\t$options = $newoptions = get_option('widget_sandbox_rsslinks');\n\tif ( $_POST['rsslinks-submit'] ) {\n\t\t$newoptions['title'] = strip_tags( stripslashes( $_POST['rsslinks-title'] ) );\n\t}\n\tif ( $options != $newoptions ) {\n\t\t$options = $newoptions;\n\t\tupdate_option( 'widget_sandbox_rsslinks', $options );\n\t}\n\t$title = attribute_escape( $options['title'] );\n?>\n\t\t\t<p><label for=\"rsslinks-title\"><?php _e( 'Title:', 'sandbox' ) ?> <input class=\"widefat\" id=\"rsslinks-title\" name=\"rsslinks-title\" type=\"text\" value=\"<?php echo $title; ?>\" /></label></p>\n\t\t\t<input type=\"hidden\" id=\"rsslinks-submit\" name=\"rsslinks-submit\" value=\"1\" />\n<?php\n}", "public function getPermalinkAttribute()\n {\n return url('/author/'.$this->attributes['slug']);\n }", "function chocolife_external_permalink( $link, $post )\n{\n //$meta = get_post_meta( $post->ID, 'syndication_permalink', TRUE );\n $meta = get_field(\"news_link\");\n $url = esc_url( filter_var( $meta, FILTER_VALIDATE_URL ) );\n\n return $url ? $url : $link;\n}", "function renderFilterCreationLink() {\n\t\t$content = tslib_CObj::getSubpart($this->fileContent, '###NEWFILTER_LINK###');\n\n\t\tif (!isset($this->conf['newfilter_link.']['form_url.']['parameter'])) {\n\t\t\t$this->conf['newfilter_link.']['form_url.']['parameter'] = $GLOBALS['TSFE']->id;\n\t\t}\n\t\t$this->conf['newfilter_link.']['form_url.']['returnLast'] = 'url';\n\t\t$content = tslib_cObj::substituteMarker($content, '###FORM_URL###', $this->cObj->typolink('', $this->conf['newfilter_link.']['form_url.']));\n\n\t\treturn $content;\n\t}", "public function get_settings_page_link() {\n\n\t\t\treturn add_query_arg(\n\t\t\t\tarray(\n\t\t\t\t\t'page' => $this->key,\n\t\t\t\t),\n\t\t\t\tesc_url( admin_url( 'admin.php' ) )\n\t\t\t);\n\t\t}", "public function onAfterWrite() {\n\n\t\tparent::onAfterWrite();\n\n\t\t// Determine whether the default automated URL handling has been replaced.\n\n\t\tif(Config::inst()->get(MisdirectionRequestFilter::class, 'replace_default')) {\n\n\t\t\t// Determine whether the URL segment or parent ID has been updated.\n\n\t\t\t$changed = $this->owner->getChangedFields();\n\t\t\tif((isset($changed['URLSegment']['before']) && isset($changed['URLSegment']['after']) && ($changed['URLSegment']['before'] != $changed['URLSegment']['after'])) || (isset($changed['ParentID']['before']) && isset($changed['ParentID']['after']) && ($changed['ParentID']['before'] != $changed['ParentID']['after']))) {\n\n\t\t\t\t// The link mappings should only be created for existing pages.\n\n\t\t\t\t$URL = (isset($changed['URLSegment']['before']) ? $changed['URLSegment']['before'] : $this->owner->URLSegment);\n\t\t\t\tif(strpos($URL, 'new-') !== 0) {\n\n\t\t\t\t\t// Determine the page URL.\n\n\t\t\t\t\t$parentID = (isset($changed['ParentID']['before']) ? $changed['ParentID']['before'] : $this->owner->ParentID);\n\t\t\t\t\t$parent = SiteTree::get_one(SiteTree::class, \"SiteTree.ID = {$parentID}\");\n\t\t\t\t\twhile($parent) {\n\t\t\t\t\t\t$URL = Controller::join_links($parent->URLSegment, $URL);\n\t\t\t\t\t\t$parent = SiteTree::get_one(SiteTree::class, \"SiteTree.ID = {$parent->ParentID}\");\n\t\t\t\t\t}\n\n\t\t\t\t\t// Instantiate a link mapping for this page.\n\n\t\t\t\t\tsingleton(MisdirectionService::class)->createPageMapping($URL, $this->owner->ID);\n\n\t\t\t\t\t// Purge any link mappings that point back to the same page.\n\n\t\t\t\t\t$this->owner->regulateMappings(($this->owner->Link() === Director::baseURL()) ? Controller::join_links(Director::baseURL(), 'home/') : $this->owner->Link(), $this->owner->ID);\n\n\t\t\t\t\t// Recursively create link mappings for any children.\n\n\t\t\t\t\t$children = $this->owner->AllChildrenIncludingDeleted();\n\t\t\t\t\tif($children->count()) {\n\t\t\t\t\t\t$this->owner->recursiveMapping($URL, $children);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function changes_post_update_link($link)\r\n{\r\n\tglobal $post;\r\n\t$postid=$post->ID;\r\n\t$post_type=$post->post_type;\r\n\t$postdate = $post->post_date;\r\n\t/*get the submitted page id from post type*/\r\n\t$args=array(\t\r\n\t\t'post_type' => 'page',\r\n\t\t'post_status' => 'publish',\r\n\t\t'posts_per_page' => 1,\r\n\t\t'meta_query' => array(\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'key' => 'is_tevolution_submit_form',\r\n\t\t\t\t\t\t\t\t\t'value' => '1',\r\n\t\t\t\t\t\t\t\t\t'compare' => '='\r\n\t\t\t\t\t\t\t\t\t),\t\t\t\t\r\n\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t'key' => 'submit_post_type',\r\n\t\t\t\t\t\t\t\t\t'value' => $post_type,\r\n\t\t\t\t\t\t\t\t\t'compare' => '='\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);\r\n\tremove_all_actions('posts_where');\r\n\t$the_query = new WP_Query( $args );\t\r\n\tif( $the_query->have_posts()):\r\n\t\tforeach($the_query as $post):\r\n\t\t\tif($post->ID != \"\"):\r\n\t\t\t\t$page_id=$post->ID;\r\n\t\t\tendif;\t\r\n\t\tendforeach;\r\n\t\t/*get the front side submitted page id permalink*/\r\n\t\t$page_link=get_permalink($page_id);\r\n\t\t$edit_link = '';\r\n\t\t$review_link = '';\r\n\t\tif(strpos($page_link, \"?\"))\r\n\t\t{\r\n\t\t\t$edit_link = $page_link.\"&pid=\".$postid.\"&action=edit\";\r\n\t\t\t$review_link = $page_link.\"&pid=\".$postid.\"&renew=1\";\r\n\t\t\t$delete_link = $page_link.\"&pid=\".$postid.\"&page=preview&action=delete\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$edit_link = $page_link.\"?pid=\".$postid.\"&action=edit\";\r\n\t\t\t$review_link = $page_link.\"?pid=\".$postid.\"&renew=1\";\r\n\t\t\t$delete_link = $page_link.\"?pid=\".$postid.\"&page=preview&action=delete\";\r\n\t\t}\r\n\t\t$exp_days = get_time_difference_plugin( $postdate, $postid);\r\n\t\t$link = '';\r\n\t\tif($exp_days > 0 && $exp_days != '' )\r\n\t\t {\r\n\t\t\t$link='<a class=\"post-edit-link\" title=\"'.__('Edit','templatic').'\" href=\"'.$edit_link.'\" target=\"_blank\">'.__('Edit','templatic').'</a>&nbsp;&nbsp;';\r\n\t\t }\r\n\t\telse\r\n {\t\t\r\n\t\t\t$link.='<a class=\"post-edit-link\" title=\"'.__('Renew','templatic').'\" href=\"'.$review_link.'\" target=\"_blank\">'.__('Renew','templatic').'</a>&nbsp;&nbsp;';\r\n\t\t }\t\r\n\t\t $link.='&nbsp;<a class=\"post-edit-link\" title=\"'.__('Delete','templatic').'\" href=\"'.$delete_link.'\" target=\"_blank\">'.__('Delete','templatic').'</a>&nbsp;&nbsp;';\r\n\tendif;\r\n\tif(is_author()){\r\n\t\treturn $link;\r\n\t}\r\n}", "public static function modifyTermPermalink( $permalink, $glossaryItem, $shortcodeAtts ) {\n\t\tif ( 'sidebar-termpage' === $shortcodeAtts[ 'glossary_index_style' ] ) {\n\t\t\t$name\t\t = get_post_field( 'post_name', $glossaryItem->ID );\n\t\t\t$permalink\t = add_query_arg( array( 'term' => $name ) );\n\t\t}\n\t\treturn $permalink;\n\t}", "function wp_force_plain_post_permalink($post = \\null, $sample = \\null)\n {\n }", "function modify_attachment_link( $markup, $id, $size, $permalink ) {\n global $post;\n if ( ! $permalink ) {\n $markup = str_replace( '<a href', '<a class=\"view\" data-rel=\"prettyPhoto[slides]-'. $post->ID .'\" href', $markup );\n }\n return $markup;\n }", "function do_permalink($atts) {\n\textract(shortcode_atts(array(\n\t\t'id' => 1,\n\t\t'text' => \"\" // default value if none supplied\n\t), $atts));\n\n\tif ($text) {\n\t\t$url = get_permalink($id);\n\t\treturn \"<a href='$url'>$text</a>\";\n\t} else {\n\t\treturn get_permalink($id);\n\t}\n}", "abstract public function get_url_update();", "function url_save($post_ID) {\n global $post;\n\n if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) {\n return $post_id;\n }\n \n if (isset($_POST)) {\n update_post_meta( $post_ID, '_url_name', strip_tags( $_POST['url_name'] ) );\n }\n}", "public function editUrl() {}", "public function display_inf_url() {\r\n\t\t$key = 'inf_url';\r\n\r\n\t\tif ( isset( $this->existing_options[$key] ) && $this->existing_options[$key] )\r\n\t\t\t$existing_value = $this->existing_options[$key];\r\n\t\telse\r\n\t\t\t$existing_value = '';\r\n\r\n\t\t$id = $key;\r\n\t\tsettings_errors( $id );\r\n\t\techo 'http://<input type=\"text\" name=\"' . self::OPTION_NAME . '[' . $key . ']\" id=\"' . $id . '\"';\r\n\t\tif ( $existing_value )\r\n\t\t\techo ' value=\"' . esc_attr( $existing_value ) . '\"';\r\n\t\techo ' maxlength=\"32\" size=\"40\" pattern=\"[a-zA-Z0-9-_]+\" autocomplete=\"off\" />.infusionsoft.com';\r\n\r\n\t\techo '<p class=\"description\">' . esc_html( __( 'Your subdomain for Infusion login', 'inf-mem' ) ) . '</p>';\r\n\t}", "function getPermalink() {\n\t\treturn $this->get(\"permalink\");\n\t}", "public function set_permalink_structure($structure = '')\n {\n global $wp_rewrite;\n\n $wp_rewrite->init();\n $wp_rewrite->set_permalink_structure($structure);\n $wp_rewrite->flush_rules();\n }", "function get_rebrandly_url( $post_id ) {\n $_post_id = ( $post_id ) ? $post_id : get_permalink( $post->ID );\n $_short_url = get_post_meta( $_post_id, '_rebrandly_link_url', true );\n\n return $_short_url;\n}", "public function diviroids_permalink($atts)\n {\n extract(shortcode_atts(array( 'slug' => null, 'title' => null, 'target' => null, 'class' => null ), $atts));\n\n $page = get_page_by_path($slug);\n\n $output = sprintf(\n '<a href=\"%1$s\" title=\"%2$s\"%3$s%4$s>%2$s</a>',\n get_permalink($page->ID),\n empty($title) ? get_the_title($page) : $title,\n !empty($target) ? ' target=\"'. $target .'\"' : '',\n !empty($class) ? ' class=\"'. $class .'\"' : ''\n );\n\n return $output;\n }", "public function update(){\n foreach (the()->project->languages as $lang){\n $field=\"url_$lang\";\n if($this->urlExists($this->$field,$lang)){\n $increment=1;\n $url=$this->$field.'-'.$increment;\n while($this->urlExists($url,$lang)){\n $increment++;\n $url=$this->$field.'-'.$increment;\n }\n $this->$field=$url;\n }\n $this->$field=strtolower($this->$field);\n $this->$field=pov()->utils->string->clean($this->$field,\"/\");\n }\n\n\n parent::update();\n\n }", "public function getUrlEditPost(){\n\t\t\n\t\t$this->validateInited();\n\t\t\n\t\t$urlEdit = get_edit_post_link($this->id);\n\t\t\n\t\treturn($urlEdit);\n\t}", "public function editUrl() {\n\t\treturn str_replace('/page/edit/',\n '/lab_charger/lab_charge_items/edit/',\n parent::editUrl());\n\t}", "function wpcf_filter_type( $data, $post_type ) {\n if ( !empty( $data['rewrite']['enabled'] ) ) {\n $data['rewrite']['with_front'] = !empty( $data['rewrite']['with_front'] );\n $data['rewrite']['feeds'] = !empty( $data['rewrite']['feeds'] );\n $data['rewrite']['pages'] = !empty( $data['rewrite']['pages'] );\n\n // If slug is not submitted use default slug\n if ( empty( $data['rewrite']['slug'] ) ) {\n $data['rewrite']['slug'] = $data['slug'];\n }\n\n // Also force default slug if rewrite mode is 'normal'\n if ( !empty( $data['rewrite']['custom'] ) && $data['rewrite']['custom'] != 'normal' ) {\n $data['rewrite']['slug'] = $data['rewrite']['slug'];\n }\n\n // Register with _x()\n $data['rewrite']['slug'] = _x( $data['rewrite']['slug'], 'URL slug',\n 'wpcf' );\n //\n // CHANGED leave it for reference if we need\n // to return handling slugs back to WP.\n // \n // We unset slug settings and leave WP to handle it himself.\n // Let WP decide what slugs should be!\n// if (!empty($data['rewrite']['custom']) && $data['rewrite']['custom'] != 'normal') {\n// unset($data['rewrite']['slug']);\n// }\n // Just discard non-WP property\n unset( $data['rewrite']['custom'] );\n } else {\n $data['rewrite'] = false;\n }\n\n return $data;\n}", "function the_permalink($post = 0)\n {\n }", "function permalink_save_twice_notice() {\n\tif( isset($_POST['_wp_http_referer']) && strpos($_POST['_wp_http_referer'], 'options-permalink.php') ) {\n\t\tprint_r('<div id=\"message\" class=\"updated\"><p>'.__('Note: Please make sure you save your permalink settings <strong>twice</strong> in order for them to be applied correctly in Jigoshop', 'jigoshop' ).'</p></div>');\n\t}\n}", "function press_save_link( $post_id ){\n\tif ( !isset( $_POST['press_link_box_nonce'] ) || !wp_verify_nonce( $_POST['press_link_box_nonce'], basename( __FILE__ ) ) ){\n\treturn;}\n \n // Check the user's permissions.\nif ( ! current_user_can( 'edit_post', $post_id ) ){\n\treturn;\n}\n if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $post_id;\n}\n //save value\n if ( isset( $_REQUEST['press_link'] ) ) {\n\tupdate_post_meta( $post_id, '_press_link', sanitize_text_field( $_POST['press_link'] ) );\n}\n \n}", "abstract public function url($manipulation_name = '');", "public function permalink($leaveName = false, $includePostType = false, $includeCategories = false)\n {\n return parent::permalink($leaveName, $includePostType, $includeCategories);\n }", "function get_sample_permalink_html($post, $new_title = \\null, $new_slug = \\null)\n {\n }", "function wp_admin_canonical_url()\n {\n }", "function labdevs_short_url_link()\n{\n return get_option(\"labdevs_settings_option_short_url\");\n}", "public function getCpEditUrl()\n {\n return UrlHelper::cpUrl('simple-forms/submissions/edit/'.$this->id);\n }", "function svo_link( $post_id = 0 ) {\n\n\t// If we have not activated it, return the original canonical.\n\tif ( false === $check = RKV_SVO_Helper::check_post_active( $post_id ) ) {\n\t\treturn get_permalink( $post_id );\n\t}\n\n\t// Return the updated link.\n\treturn RKV_SVO_Helper::all_permalink( $post_id );\n}", "function activate() {\r\n global $wp_rewrite;\r\n\r\n if ( get_option('permalink_structure') != '' && !strpos($wp_rewrite->get_page_permastruct(), '.' . $this->options->extension) ) {\r\n $wp_rewrite->page_structure = $wp_rewrite->page_structure . '.' . $this->options->extension;\r\n }\r\n\r\n $wp_rewrite->flush_rules();\r\n }", "function shorten_admin_submit($form, &$form_state) {\n // Changed settings usually mean that different URLs should be used.\n cache_clear_all('*', 'cache_shorten', TRUE);\n}", "public function get_permalink() {\n\t\treturn apply_filters( 'the_permalink', get_permalink( $this->get_id() ) );\n\t}", "function edit_post_link($text = \\null, $before = '', $after = '', $post = 0, $css_class = 'post-edit-link')\n {\n }", "function replacePermalink($link, $id) {\r\n\t\t/*\r\n\t\tif (!defined('IS_UWR1RESULTS_VIEW')) {\r\n\t\t\treturn $link;\r\n\t\t}\r\n\t\tif (UWR1RESULTS_PAGE_ID_INDEX == $id) {\r\n\t\t\t$link = UWR1RESULTS_URL;\r\n\t\t} else if (UWR1RESULTS_PAGE_ID_PX == substr($id, 0, 2) && strlen($id) == strlen(UWR1RESULTS_PAGE_ID_PX) + 6) {\r\n\t\t\t$twoChars = str_split($id, 2);\r\n\t\t\t$link = UWR1RESULTS_URL.'/'.$twoChars[1].$twoChars[2];\r\n\t\t\tif ('00' != $twoChars[3]) {\r\n\t\t\t\t$link .= '/'.$twoChars[3];\r\n\t\t\t}\r\n\t\t}\r\n\t\t*/\r\n\t\treturn $link;\r\n\t}", "public function updateURL (\n\t)\t\t\t\t\t\t// RETURNS <bool> TRUE if the update is successful, FALSE if there is a failure.\n\t\n\t// $contentForm->updateURL();\n\t{\n\t\t// Make sure you're allowed to update the URL\n\t\tif(!$this->urlUpdate)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Make sure a URL Slug was set\n\t\tif(!isset($_POST['url_slug']) or $_POST['url_slug'] == $this->contentData['url_slug'])\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Validate the URL Slug\n\t\tFormValidate::variable(\"URL\", $_POST['url_slug'], 10, 55, \"-\");\n\t\t\n\t\tif(strpos($_POST['url_slug'], \"-\") === false)\n\t\t{\n\t\t\tAlert::error(\"URL\", \"The URL must contain at least one \\\"-\\\" dash.\");\n\t\t}\n\t\t\n\t\t// Update the URL\n\t\tif(FormValidate::pass(\"URL\"))\n\t\t{\n\t\t\tDatabase::startTransaction();\n\t\t\t\n\t\t\tif($pass = Database::query(\"DELETE FROM content_by_url WHERE url_slug=? LIMIT 1\", array($this->contentData['url_slug'])))\n\t\t\t{\n\t\t\t\tif($pass = Database::query(\"UPDATE IGNORE content_entries SET url_slug=? WHERE id=? LIMIT 1\", array($this->urlPrefix . $_POST['url_slug'], $this->contentID)))\n\t\t\t\t{\n\t\t\t\t\t$pass = Database::query(\"INSERT INTO content_by_url (url_slug, content_id) VALUES (?, ?)\", array($this->urlPrefix . $_POST['url_slug'], $this->contentID));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Update Values\n\t\t\t$this->contentData['url_slug'] = $_POST['url_slug'];\n\t\t\t\n\t\t\t// Finalize the update\n\t\t\tif(Database::endTransaction($pass))\n\t\t\t{\n\t\t\t\t$this->urlUpdate = true;\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function permalink( $permalink ) {\n\t\treturn $this->args['permalink'];\n\t}", "function custom_settings_page() { ?>\n <div class=\"wrap\">\n <h1>Social Links</h1>\n <form method=\"post\" action=\"options.php\">\n <?php\n settings_fields( 'section' );\n do_settings_sections( 'theme-options' ); \n submit_button(); \n ?> \n </form>\n </div>\n<?php }", "private function format_permalink ( $url ) {\n\t\t\t$base_url = Site::get_url( 'habari' );\n\t\t\t\n\t\t\tif ( MultiByte::strpos( $url, $base_url ) !== false ) {\n\t\t\t\t$url = MultiByte::substr( $url, MultiByte::strlen( $base_url ) );\n\t\t\t}\n\t\t\t\n\t\t\treturn $url;\n\t\t\t\n\t\t}", "function journalize_auto_link_urls_activate() {\n\t$options = get_option('journalize');\n\t$options['auto_link_urls'] = true;\n\tupdate_option('journalize', $options);\n}", "private function createSlug() {\r\n \r\n $proposal = !empty($this->subject) ? substr(create_slug($this->subject), 0, 60) : $this->id;\r\n \r\n $result = $this->db->fetchAll(\"SELECT post_id FROM nuke_bbposts_text WHERE url_slug = ?\", $proposal); \r\n \r\n if (count($result)) {\r\n $proposal .= count($result);\r\n }\r\n \r\n $this->url_slug = $proposal;\r\n \r\n }", "public function setDefaultPermalinks()\n {\n $permalinks = get_option('woocommerce_permalinks');\n\n $permalinks['category_base'] = $permalinks['category_base'] ? : self::PRODUCT_CATEGORY_BASE;\n $permalinks['tag_base'] = $permalinks['tag_base'] ? : self::PRODUCT_TAG_BASE;\n $permalinks['product_base'] = $permalinks['product_base'] ? : self::PRODUCT_BASE;\n\n update_option('woocommerce_permalinks', $permalinks);\n }", "protected function _getSaveAndContinueUrl() \n {\n\treturn $this->getUrl('Brituy_SimpleBlog/*/save', ['_current' => true, 'back' => 'edit', 'active_tab' => '{{tab_id}}']);\n }", "function post_link($post){\n if(strcasecmp($post->post_type, 'primary_page') == 0){\n return e($post->post_slug);\n }else{\n return strtolower($post->category_name). '/' . e($post->post_slug);\n }\n}", "public static function filter_active_url(){\n $url = get_permalink();\n $url = self::get_relative_permalink($url);\n $url = self::remove_the_slash($url);\n $url = self::turn_dash_to_space($url);\n return $url;\n }", "function linkblog_save_post( $post_id ) {\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n\t\treturn;\n\n\t// verify data came from the linkblog meta box\n\tif ( !wp_verify_nonce( $_POST['linkblog_noncename'], plugin_basename( __FILE__ ) ) )\n\t\treturn; \n\n\t// Check user permissions\n\tif ( 'post' == $_POST['post_type'] ) {\n\t\tif ( !current_user_can( 'edit_page', $post_id ) )\n\t\t\treturn;\n\t} else {\n\t\tif ( !current_user_can( 'edit_post', $post_id ) )\n\t\t\treturn;\n\t}\n\n\t$linkblog_data = $_POST['linkblog_url'];\n\n\tif ($linkblog_data == \"\") {\n\t\treturn;\n\t} else {\n\t\tupdate_post_meta($post_id, 'linkblog_url', $linkblog_data);\n\t}\n\n}", "public function getPermalink()\n {\n return $this->permalink;\n }", "public function change_details_url() {\n\t\t\tglobal $change_details_plugin_url_script, $pagenow;\n\t\t\t$plugins = get_plugin_updates();\n\t\t\tif ( ! $change_details_plugin_url_script && in_array( $pagenow, array( 'update-core.php', 'plugins.php' ) ) && ! empty( $plugins ) ) {\n\t\t\t\t$plugins_string = '';\n\t\t\t\tforeach ( $plugins as $plugin_key => $plugin_value ) {\n\t\t\t\t\t$plugin_key = strtolower( $plugin_key );\n\t\t\t\t\tif ( strpos( $plugin_key, 'cherry' ) !== false ) {\n\t\t\t\t\t\t$plugins_string .= '\"' . $plugin_value ->update ->slug . '\" : \"' . $plugin_value ->update ->url .'\", ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<script>\n\t\t\t\t\t( function( $ ){\n\t\t\t\t\t\tvar plugin_updates = {<?php echo $plugins_string; ?>};\n\t\t\t\t\t\tfor ( var plugin in plugin_updates ) {\n\t\t\t\t\t\t\t$('[href*=\"' + plugin + '\"].thickbox').removeClass('thickbox').attr( {'href': plugin_updates[plugin], 'target' : \"_blank\" } );\n\t\t\t\t\t\t};\n\t\t\t\t\t}( jQuery ) )\n\t\t\t\t</script>\n\t\t\t\t<?php\n\t\t\t}\n\t\t\t$change_details_plugin_url_script = true;\n\t\t}", "protected function updateBrokenLinks() {}", "function update_home_siteurl($old_value, $value)\n {\n }", "function charity_canonical_url() {\n\t\tif (charity_seo()) {\n \t\tif ( is_singular() ) {\n \t\t$canonical_url = \"\\t\";\n \t\t$canonical_url .= '<link rel=\"canonical\" href=\"' . get_permalink() . '\" />';\n \t\t$canonical_url .= \"\\n\\n\"; \n \t\techo apply_filters('charity_canonical_url', $canonical_url);\n\t\t\t\t}\n }\n}", "public function filter_post_link( $permalink, $post ) {\n\t\t// Abort early if we aren't on the right CPT\n\t\tif ( 'ctrs-projects' !== $post->post_type )\n\t\t\treturn $permalink;\n\n\t\t// Abort early if the placeholder rewrite tag isn't in the generated URL\n\t\tif ( false === strpos( $permalink, $this->rewrite_tag ) )\n\t\t\treturn $permalink;\n\n\t\t// Get the custom taxonomy terms in use by this post\n\t\t$terms = get_the_terms( $post->ID, $this->tax_name );\n\t\tif ( $terms && ! is_wp_error( $terms ) ) {\n\t\t\t$terms = array_pop( $terms );\n\t\t}\n\n\t\t// If no terms are assigned to this post, use the taxonomy slug instead (can't leave the placeholder there)\n\t\tif ( ! $terms && empty( $terms ) ) {\n\t\t\t$permalink = str_replace( $this->rewrite_tag, $this->tax_name, $permalink );\n\t\t}\n\n\t\t// Replace the placeholder rewrite tag with the first term's slug\n\t\telse {\n\t\t\t$permalink = str_replace( $this->rewrite_tag, $terms->slug, $permalink );\n\t\t}\n\n\t\treturn $permalink;\n\t}", "function wp_ajax_sample_permalink()\n {\n }", "function ua_webtide_filter_jobs_permalink( $post_link, $post, $leavename, $sample ) {\n\tif ( ! ( 'jobs' == $post->post_type ) ) {\n\t\treturn $post_link;\n\t}\n\t\t\n\t// Get job posting URL\n\tif ( $job_posting_permalink = get_post_meta( $post->ID, 'job_posting_permalink', true ) ) {\n\t\treturn $job_posting_permalink;\n\t}\n\t\t\n\treturn $post_link;\n\t\n}", "protected function get_admin_form_uri()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $_SERVER['PHP_SELF'].'?page=bmlt-wordpress-satellite-plugin.php';\n }", "protected function sectionUrls()\n {\n // One place to set Friendly URL for all pages\n // originally code F (delete this line later)\n $output = '<h1><i class=\"fa fa-link\"></i> ' . $this->tableAdmin->translate('Friendly URL')\n . '</h1><div id=\"agenda-urls\">'\n . '<form action=\"\" method=\"post\" class=\"friendly-urls\" onsubmit=\"return confirm(\\''\n . $this->tableAdmin->translate('Are you sure?') . '\\')\">'\n . Tools::htmlInput('urls', '', 1, ['type' => 'hidden'])\n . Tools::htmlInput('token', '', end($_SESSION['token']), 'hidden');\n $urls = []; // all URLs, all language versions with a link to what it links to (product, page, … id, etc.)\n $langs = array_keys($this->MyCMS->TRANSLATIONS);\n // Todo queryStrictArray\n $query = $this->MyCMS->dbms->queryStrictNonEmptyArray(\n 'SELECT id,\"content\" AS _table,type,' . Tools::arrayListed($langs, 0, ',', 'url_') . ','\n . Tools::arrayListed($langs, 0, ',', 'name_') . ' FROM `' . TAB_PREFIX . 'content` WHERE type IN ('\n . '\"article\", \"page\", \"news\"' // list of types to be listed for Friendly URL settings\n . ') ORDER BY type'\n );\n foreach ($query as $row) {\n $urls [] = $row;\n }\n // Friendly URL folders for types to be listed for Friendly URL settings\n $TYPE2PATH = [\n 'content-article' => '',\n 'content-page' => '',\n 'content-news' => 'news'\n ];\n $lastType = false;\n foreach ($urls as $value) {\n Assert::isArray($value);\n if ($lastType != $value['_table'] . '-' . $value['type']) {\n $output .= '<h3 class=\"lead\">' . Tools::h($lastType = $value['_table'] . '-' . $value['type'])\n . '</h3>' . PHP_EOL;\n }\n $output .= '<div class=\"mb-3\"><div><a href=\"?table=' . urlencode(TAB_PREFIX . $value['_table'])\n . '&where[id]=' . (int) $value['id'] . '\" target=\"_blank\">'\n . '<i class=\"fa fa-external-link\"></i></a> ' .\n (Tools::h($value['name_' . DEFAULT_LANGUAGE]) ?: '<i>N/A</i>') . '</div>';\n foreach ($langs as $key => $lang) {\n // TODO should trailing slash be present?\n $value['fill'] = rtrim('/' . Tools::wrap($TYPE2PATH[$lastType], '', '/') .\n /* $value['id'] . '-' . */ Tools::webalize($value[\"name_$lang\"]), '-');\n $output .= '<div class=\"input-group input-group-sm\">'\n . '<div class=\"input-group-prepend\"><tt class=\"input-group-text btn\" title=\"'\n . $this->tableAdmin->translate('Fill up') . '\">' . $lang . '</tt></div>'\n . Tools::htmlInput(\n 'url-' . urlencode($value['_table']) . '-' . $value['id'] . '-' . $lang,\n '',\n $value[\"url_$lang\"],\n array('class' => 'form-control monospace', 'data-fill' => $value['fill'])\n )\n . '</div>' . PHP_EOL;\n }\n $output .= '</div>';\n }\n $output .= '<p><button class=\"btn btn-primary mr-1\" type=\"submit\" name=\"urls-save\"><i class=\"fa fa-save\"></i> '\n . $this->tableAdmin->translate('Save') . '</button>\n <button class=\"btn btn-secondary btn-fill\" type=\"button\"><i class=\"fa fa-edit\"></i> '\n . $this->tableAdmin->translate('Fill up') . '</button>\n ' . Tools::htmlInput(\n '',\n $this->tableAdmin->translate('only empty'),\n '',\n array('type' => 'checkbox', 'id' => 'only-empty', 'label-after' => true, 'label-class' => 'mx-1')\n ) . '\n <button class=\"btn btn-secondary btn-check-up\" type=\"button\"><i class=\"fa fa-eye\"></i> '\n . $this->tableAdmin->translate('Check up') . '</button>\n </p></form>';\n\n // Identify duplicit URLs\n // originally code A (delete this line later)\n $output .= '<hr><h1><i class=\"fa fa-unlink\"></i> ' . $this->tableAdmin->translate('Duplicit URL') . '</h1>'\n . '<p>' . $this->tableAdmin->translate('Duplicities may appear across languages.') . '</p>'\n . '<div id=\"agenda-urls\">';\n $urls = [];\n foreach (\n [\n // Note: not all apps have all those tables\n 'category',\n 'content',\n 'product'\n ] as $table\n ) {\n foreach (array_keys($this->tableAdmin->TRANSLATIONS) as $i) {\n foreach (\n $this->MyCMS->dbms->fetchAll(\"SELECT COUNT(url_$i) AS _count, url_$i AS url\"\n . ' FROM `' . TAB_PREFIX . \"{$table}` GROUP BY url ORDER BY _count DESC\") as $row\n ) {\n // Tools::add($urls[$row['url']], $row['_count']); // next line is more static analysis friendly:\n $urls[$row['url']] = (isset($urls[$row['url']]) ? $urls[$row['url']] : 0) + $row['_count'];\n }\n }\n }\n foreach ($urls as $key => $value) {\n if ($value <= 1) {\n unset($urls[$key]);\n }\n }\n foreach (array_keys($urls) as $url) {\n $sql = [];\n foreach (['category', 'content', 'product'] as $table) {\n $sql [] = \"SELECT '$table' AS type,id,name\" . '_' . $_SESSION['language']\n . ' AS name FROM `' . TAB_PREFIX . \"{$table}` WHERE \" .\n Tools::arrayListed(\n array_keys($this->tableAdmin->TRANSLATIONS),\n 0,\n ' OR ',\n 'url_',\n '=\"' . $this->MyCMS->escapeSQL((string) $url) . '\"'\n );\n }\n $query = $this->MyCMS->fetchAll(implode(\" UNION\\n\", $sql));\n $output .= '<details><summary>' . Tools::h((string) $url) . ' <sup class=\"badge badge-secondary\">'\n . count($query) . '</sup></summary>';\n foreach ($query as $row) {\n $output .= '<div class=\"ml-2\"><a href=\"?table=' . TAB_PREFIX . $row['type'] . '&amp;where[id]='\n . $row['id'] . '\"><i class=\"fa fa-table\"></i> ' . Tools::h((string) $row['name'])\n . ' (' .\n// $this->tableAdmin->translate(\n $row['type']\n// )\n .\n ')</a></div>' . PHP_EOL;\n }\n $output .= '</details>' . PHP_EOL;\n }\n $output .= (count($urls) ? '' : '<i>' . $this->tableAdmin->translate('None') . '</i>')\n . '</div><footer class=\"mt-2\">'\n . (count($urls) ? '<button type=\"button\" class=\"btn btn-sm btn-secondary mr-2\" id=\"urls-toggle\" title=\"'\n . $this->tableAdmin->translate('Open/close')\n . '\" data-open=\"1\"><i class=\"fas fa-caret-right\"></i> <i class=\"fas fa-caret-down\"></i></button>' : '')\n . '</footer>';\n return $output;\n }", "public function using_index_permalinks()\n {\n }" ]
[ "0.6453277", "0.6368505", "0.6137175", "0.61346346", "0.61203265", "0.6077995", "0.60520995", "0.6043979", "0.5966338", "0.58839244", "0.587051", "0.5865073", "0.58648974", "0.5805068", "0.5793216", "0.57831466", "0.57518655", "0.5747351", "0.56894964", "0.56873083", "0.56810546", "0.56688166", "0.5652739", "0.56450135", "0.5590881", "0.5578924", "0.557678", "0.55659956", "0.55649394", "0.55551684", "0.55448955", "0.5543955", "0.55411047", "0.5539903", "0.5538996", "0.5537261", "0.55352753", "0.5493268", "0.54471564", "0.54200846", "0.5410398", "0.5396651", "0.5382974", "0.5378372", "0.5371037", "0.5370733", "0.53630984", "0.5351878", "0.535136", "0.53496784", "0.53397685", "0.5332217", "0.53298366", "0.53259724", "0.53178734", "0.53171635", "0.5313633", "0.5302237", "0.52996063", "0.52930963", "0.5292598", "0.5291467", "0.5290455", "0.5285551", "0.5284544", "0.5283277", "0.52769095", "0.5275076", "0.5270852", "0.52680176", "0.5246406", "0.5240513", "0.5237388", "0.5230898", "0.52284014", "0.52269655", "0.5221675", "0.5218422", "0.52143025", "0.52017754", "0.5190284", "0.51830536", "0.5179644", "0.5173959", "0.5159523", "0.5158528", "0.51557696", "0.51537436", "0.5150011", "0.5149729", "0.5134758", "0.5134108", "0.51276886", "0.51246244", "0.5122196", "0.5118771", "0.5115798", "0.51130366", "0.5112941", "0.51065373" ]
0.63981473
1
Enqueue scripts and styles.
public function enqueue_scripts() { $min = \wpforms_get_min_suffix(); if ( \wpforms_has_field_type( 'date-time', $this->form_data ) ) { \wp_enqueue_script( 'wpforms-maskedinput', WPFORMS_PLUGIN_URL . 'assets/js/jquery.inputmask.bundle.min.js', array( 'jquery' ), '4.0.6', true ); } \wp_enqueue_script( 'wpforms-conversational-forms-mobile-detect', \wpforms_conversational_forms()->url . "assets/js/vendor/mobile-detect{$min}.js", array(), '1.4.3', true ); \wp_enqueue_script( 'wpforms-conversational-forms', \wpforms_conversational_forms()->url . "assets/js/conversational-forms{$min}.js", array( 'jquery', 'wpforms-conversational-forms-mobile-detect' ), \WPFORMS_CONVERSATIONAL_FORMS_VERSION, true ); \wp_enqueue_style( 'wpforms-conversational-forms', \wpforms_conversational_forms()->url . "assets/css/conversational-forms{$min}.css", array( 'wpforms-font-awesome' ), \WPFORMS_CONVERSATIONAL_FORMS_VERSION ); \wp_localize_script( 'wpforms-conversational-forms', 'wpforms_conversational_forms', array( 'html' => $this->get_field_additional_html(), 'i18n' => array( 'select_placeholder' => \esc_html__( 'Type or select an option', 'wpforms-conversational-forms' ), 'select_list_empty' => \esc_html__( 'No suggestions found', 'wpforms-conversational-forms' ), 'select_option_helper' => \wp_kses( __( '<strong>Enter</strong> to select option', 'wpforms-conversational-forms' ), array( 'strong' => array() ) ), ), ) ); \wp_enqueue_style( 'wpforms-font-awesome', WPFORMS_PLUGIN_URL . 'assets/css/font-awesome.min.css', array(), '4.7.0' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enqueue_scripts() {\n\t\t$this->styles();\n\t\t$this->scripts();\n\t}", "public function enqueueScripts(){}", "public function enqueueScripts() {\n\t\t\twp_enqueue_script('jquery');\n//\t\t\twp_enqueue_script('owl', self::asset(\"node_modules/owl.carousel/dist/owl.carousel.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('headroom', self::asset(\"node_modules/headroom.js/dist/headroom.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('prettyPhoto', self::asset(\"js/vendor/jquery.prettyPhoto.js\"), ['jquery'], '1.0.0', ' all');\n//\t\t\twp_enqueue_script('navigo', self::asset(\"node_modules/navigo/lib/navigo.min.js\"), ['jquery'], '1.0.0', ' all')\\;\n\t\t\twp_enqueue_script('app', self::asset(\"js/app.min.js\"), ['jquery'], '1.0.0', ' all');\n\t\t}", "public function enqueue_scripts() {\n\t\twp_enqueue_style( 'pt-style', plugins_url( 'assets/css/style.css', __FILE__ ), array(), '1.0.0', false );\n\n\t\twp_enqueue_script( 'pt-script', plugins_url( 'assets/js/script.js', __FILE__ ), array(), '1.0.0', true );\n\t}", "public function enqueueScripts() {\n wp_register_style('rrze-faq-style', plugins_url('assets/css/rrze-faq.css', plugin_basename($this->pluginFile)));\n wp_enqueue_style('rrze-faq-style');\n }", "static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}", "public function enqueueScripts()\n {\n wp_enqueue_style('gfbitpay-admin', $this->plugin->urlBase . 'style-admin.css', false, GFBITPAY_PLUGIN_VERSION);\n }", "public function frontEndStyleScripts(): void\n {\n wp_enqueue_style('users-data-bootstrap', plugin_dir_url(dirname(__FILE__)) . 'assets/css/bootstrap.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-fontawsome', plugin_dir_url(dirname(__FILE__)) . 'assets/css/font-awesome.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-styles', plugin_dir_url(dirname(__FILE__)) . 'assets/css/users-data.css', [], UsersListing::getVersion());\n //\n wp_enqueue_script('jquery-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/jquery.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('jquery-popper', plugin_dir_url(dirname(__FILE__)) . 'assets/js/popper.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('bootstrap-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/bootstrap.min.js', ['jquery'], UsersListing::getVersion(), false);\n }", "public function setup_scripts_and_styles() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_css' ), 50 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_js' ), 10 );\n\t}", "public function onEnqueueScripts()\n {\n $this->enqueue('front');\n }", "public function enqueue_scripts() {\r\n\r\n\t\t}", "public function enqueue_scripts() {\n wp_enqueue_script(\n 'moment',\n plugins_url('includes/moment.min.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'minidaemon',\n plugins_url('includes/mdn-minidaemon.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'vspi-admin',\n plugins_url('includes/vspi-admin.js', __FILE__),\n array('jquery'),\n VSPI_VERSION,\n false\n );\n }", "public function enqueue_scripts() {\n wp_enqueue_style( $this->name, plugins_url( '/assets/css/admin.css', IMFILE ), '', $this->version, 'all' );\n \n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( $this->name, plugins_url( '/assets/js/admin.js', IMFILE ), array( 'jquery' ), $this->version, true );\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts() {\n\n\t\twp_enqueue_style( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) . '/dist/control.css' ), array(), '1.0' );\n\n\t}", "public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}", "public function add_scripts_and_styles()\n {\n // Estilos css \n wp_register_style( 'wiAjustesStyles', WI_PLUGIN_URL . '/style.css', null, WI_VERSION );\n wp_enqueue_style( 'wiAjustesStyles' );\n\n // Scripts de javascript\n wp_enqueue_script('wiAjustesStylesJs', WI_PLUGIN_URL . '/script.js' , array('jquery'));\n }", "function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/scripts.min.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}", "public function enqueue_front_end_scripts() {}", "public function enqueue_scripts() {\n\n\t}", "function mandiberg_scripts() {\n\n\t\t//include bootstrap:\n\t\twp_register_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css' );\n\t\twp_enqueue_style( 'bootstrap-style');\n\n\n\n\t\t// Register the style like this for a theme:\n\t wp_register_style( 'mandiberg-style', get_template_directory_uri() . '/style.css', array(), '20120208', 'all' );\n\t\twp_enqueue_style( 'mandiberg-style');\n\n\t\t//barba js for transitions\n\n\t\t wp_register_script('barba', get_template_directory_uri() . '/build/barba.min.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('barba');\n\n\t\t//js\n\t\twp_register_script('js-file', get_template_directory_uri() . '/build/script.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('js-file');\n\n\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "function innelyz_scripts() {\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.js', array('jquery'), '3.3.7', false);\n wp_enqueue_style( 'bootstrap', get_template_directory_uri() .'/assets/css/bootstrap.css', array(), false, 'all' );\n wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lora|Pacifico|Roboto');\n wp_enqueue_style( 'innelyz-style', get_stylesheet_uri() );\n }", "public function enqueue_scripts() {\n\t\tif ( is_singular() ) wp_enqueue_script( 'comment-reply' );\n\n\t\twp_enqueue_style( 'app', get_template_directory_uri().'/assets/css/app.css', false, '1.0.0', 'all' );\n\t\twp_enqueue_script( 'foundation-modernizr', get_template_directory_uri().'/bower_components/foundation/js/vendor/modernizr.js', false, '', false );\n\t\twp_enqueue_script( 'foundation-fastclick', get_template_directory_uri().'/bower_components/foundation/js/vendor/fastclick.js', false, '', true );\n\t\twp_enqueue_script( 'foundation', get_template_directory_uri().'/bower_components/foundation/js/foundation.min.js', array('jquery'), '', true );\n\t\twp_enqueue_script( 'main', get_template_directory_uri().'/assets/js/main.js', array('jquery', 'foundation'), '1.0.0', true );\n\t}", "public function enqueue_scripts() {\n\n\t\tif ($this->js) {\n\t\t\tforeach ($this->js as $js) {\n\t\t\t\t$fileTitle = basename($js['link']);\n\t\t\t\t$fileTitle = str_replace('.js', '', $fileTitle);\n\t\t\t\t$fileTitle = preg_replace(\n\t\t\t\t\t'/[^0-9a-zA-Z]/',\n\t\t\t\t\t\"-\",\n\t\t\t\t\tstr_replace('@', '', $js['package']) . '-' . $fileTitle\n\t\t\t\t);\n\t\t\t\twp_enqueue_script($fileTitle, $js['link'], array(), $js['version']);\n\t\t\t}\n\t\t}\n\t}", "public function enqueue()\n {\n foreach ($this->assets as $name => $asset) {\n if (preg_match('/\\.js$/', $asset)) {\n wp_enqueue_script($name, $this->assetsUrl . $asset, [], false, true);\n }\n if (preg_match('/\\.css$/', $asset)) {\n wp_enqueue_style($name, $this->assetsUrl . $asset);\n }\n }\n }", "function assets(){\n\t\t\twp_enqueue_style( 'sp-2020-styles', get_template_directory_uri() .'/assets/css/main.css', array(), SPUTZNIK_2020_THEME_VERSION );\n\t\t\twp_enqueue_script( 'sp-2020-js', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), SPUTZNIK_2020_THEME_VERSION, true );\n\n\t\t}", "public function enqueue_scripts() {\n\t\t// wp_enqueue_style( 'simple-grams', plugins_url( '/assets/css/simple-grams.css', __FILE__ ) );\n\t}", "final public function wp_enqueue_scripts()\n {\n // Bypass\n if (!self::tFyAppConfig('enqueue_scripts')) {\n return;\n }\n\n if (self::tFyAppConfig('modal')) :\n wp_enqueue_style('tiFyComponentsPdfViewerModal');\n wp_enqueue_script('tiFyComponentsPdfViewerModal');\n else :\n wp_enqueue_style('tiFyComponentsPdfViewer');\n wp_enqueue_script('tiFyComponentsPdfViewer');\n endif;\n }", "public function scripts(){\n //Enqueue scripts\n /**\n * wp_enqueue_script('sample-script',$this->directory_uri . '/sample.min.js',array('jquery'),false,false);\n * ...\n * ....\n */\n }", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Fastnetmarketing_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Fastnetmarketing_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/fastnetmarketing-admin-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "protected function enqueue_scripts()\n {\n \\wp_enqueue_style('tify_control-progress');\n \\wp_enqueue_script('tify_control-progress');\n }", "function enqueue_scripts() {\n\t\tinclude $this->dir_path . 'scripts.php';\n\t}", "public static function wp_enqueue_scripts() {\n\t\t\t\n\t\t\tWPPFrontendUI::_register_styles();\n\t\t\t\n\t\t}", "public function enqueue_scripts() {\n\t\t/**\n\t\t * Filters the path to the admin JS script.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param string $path The path to the admin JS script.\n\t\t */\n\t\t$script_path = apply_filters( 'stellarwp/telemetry/' . Config::get_hook_prefix() . 'script_path', $this->get_asset_path() . 'resources/js/scripts.js' );\n\n\t\twp_enqueue_script(\n\t\t\tself::SCRIPT_HANDLE,\n\t\t\t$script_path,\n\t\t\t[ 'jquery' ],\n\t\t\tself::SCRIPT_VERSION,\n\t\t\ttrue\n\t\t);\n\t}", "public function enqueueAssets()\n {\n wp_enqueue_style( WPADW_DOMAIN . '-admin-style', WPADW_URL . '/assets/style.css' );\n }", "public function register_scripts()\n {\n wp_register_style(\n 'fau-oembed-style',\n plugins_url('assets/css/fau-oembed.css', plugin()->getBasename()),\n [],\n plugin()->getVersion()\n ); \n }", "function hugomitoire_scripts() {\n wp_enqueue_style( 'appStyles', get_template_directory_uri() . '/dist/css/style.min.css' );\n wp_enqueue_script( 'Js', get_template_directory_uri() . '/dist/js/all.js', array(), '1.0.0', true );\n wp_enqueue_script( 'Swiper', get_template_directory_uri() . '/dis/js/all.js', array(), '4.4.2', true);\n}", "function berry_scripts() {\n\n\twp_dequeue_style( 'seed-style');\n\twp_enqueue_style( 'berry-style', get_stylesheet_uri() );\n\twp_enqueue_script( 'berry-main', get_stylesheet_directory_uri() . '/js/main.js', array(), '2016-1', true );\n\n}", "protected function enqueue_scripts()\n {\n\n }", "function register_scripts() {\n\t\t\t$id = get_the_ID();\n\t\t\t// Only continue if current page is home\n\t\t\tif ( !is_home() ) return;\n\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'kevinw-sf-react', plugins_url( 'assets/react.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\twp_enqueue_script( 'kevinw-sf-react-app', plugins_url( 'assets/scripts.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\n\t\t\t$this->register_scripts_css();\n\t\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array('jquery'), BRAND_VER );\n\t\t\twp_enqueue_style('jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css');\n\t\t\twp_enqueue_style('jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css');\n\n\t\t}", "public function action_wp_enqueue_scripts() {\n\n\t\twp_enqueue_style( 'bootstrap', get_stylesheet_directory_uri() . '/lib/bootstrap/dist/css/bootstrap.css' );\n\t\twp_enqueue_style( 'core-style', get_stylesheet_directory_uri() . '/assets/stylesheets/core.css' );\n\n\t}", "public function enqueue_scripts() {\n\t\twp_enqueue_script( 'slick-js', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/js/slick.min.js', array( 'jquery' ), '1.8.1', false );\n\t\twp_enqueue_script( 'index-js', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/js/index.js', array( 'jquery', 'slick-js' ), '1.0.0', true );\n\t}", "public function enqueue_assets() {\n\t\twp_enqueue_script( 'satispress-admin' );\n\t\twp_enqueue_style( 'satispress-admin' );\n\t}", "public function wp_enqueue_scripts() {\n wp_enqueue_style('normalize', get_template_directory_uri() .\n '/normalize.css', array(), '8.0.1');\n wp_enqueue_style('theme-css', get_stylesheet_uri(),\n array(), '1.0');\n wp_enqueue_script('jquery');\n }", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "function aitAdminEnqueueScriptsAndStyles()\n{\n\t$mapLanguage = get_locale();\n\taitAddScripts(array(\n\t\t'ait-googlemaps-api' => array(\n\t\t\t\t\t\t\t\t\t //'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyC62AaIu5cD1nwSCmyO4-33o3DjkFCH4KE&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyBL0QWiORKMYd585E4qvcsHcAR1R7wmdiY&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'deps' => array('jquery')\n\t\t\t\t\t\t\t\t\t ),\n\t\t'ait-jquery-gmap3' => array('file' => THEME_JS_URL . '/libs/gmap3.min.js', 'deps' => array('jquery', 'ait-googlemaps-api')),\n\t));\n}", "function kinectiv_start_scripts() {\n\twp_enqueue_style('kinectiv-start-style', get_stylesheet_directory_uri() . '/style.min.css', array(), '0.1.0');\n//\twp_enqueue_style('kinectiv-start-vendor-style', get_stylesheet_directory_uri() . '/css/vendor.min.css', array(), '1.0.0');\n \n wp_deregister_script('wp-embed');\n wp_deregister_script('jquery');\n wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-3.6.2.min.js', array(), null, true);\n\twp_enqueue_script('kinectiv-start-script', get_template_directory_uri() . '/js/script.min.js', array('jquery'), '0.1.0', true);\n}", "public function enqueue_scripts () {\n\n\t\t$visibility = apply_filters( 'wp_simple_flexslider_insert_frontend_script', true );\n\n\t\tif( $visibility ) {\n\t\t\twp_enqueue_style( 'jquery-flexslider', WP_SIMPLE_FLEXSLIDER_URL . 'flexslider/flexslider.css', array(), '2.3.0', 'all' );\n\t\t\twp_register_script( 'jquery-flexslider', WP_SIMPLE_FLEXSLIDER_URL . 'flexslider/jquery.flexslider-min.js', array( 'jquery'), '2.3.0', 'all' );\n\t\t\twp_enqueue_script( 'wc-simple-flexslider-frontend', WP_SIMPLE_FLEXSLIDER_URL . 'js/wp-simple-flexslider-frontend.js', array( 'jquery', 'jquery-flexslider' ), '0.1', 'all' );\n\t\t}\n\t}", "function accvent_scripts() {\n\t wp_enqueue_style( 'main', get_stylesheet_uri() );\n\t wp_enqueue_script( 'bundle', get_template_directory_uri() . '/js/build.min.js', array(), '1.0.0', true );\n\t}", "function krypton_scripts() {\n\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');\n\twp_enqueue_style( 'style', get_template_directory_uri() . '/css/style.css' );\n\t//wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr.js');\n}", "function cs_style_and_scripts() {\n \n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/vendor.css' );\n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/app.css' );\n wp_enqueue_style( 'main-css', get_stylesheet_uri() );\n\n /*wp_enqueue_script( 'myscripts', get_stylesheet_directory_uri() . '/assets/js/app.js', '', '1.0.0', true );\n wp_localize_script('myscripts', 'cs_obj', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n ));*/\n\n }", "function scripts(){\n wp_register_style('style',get_template_directory_uri() . '/assets/css/style.css',[],1,'all');\n wp_enqueue_style('style');\n wp_enqueue_style('custom-google-font','//fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');\n wp_register_script('app',get_template_directory_uri() . '/assets/js/app.js',[],1,true);\n wp_enqueue_script('app');\n}", "public function load_admin_scripts()\n {\n // Enqueue styles\n wp_enqueue_style('soccerpress', plugins_url('assets/css/soccerpress.css', __FILE__), array(), '1.0.0', false);\n wp_enqueue_style('bootstrap-css', plugins_url('assets/css/bootstrap.min.css', __FILE__), array(), '4.3.1', false);\n\n // Enqueue scripts\n wp_register_script('bootstrap-js', plugins_url('assets/js/bootstrap.min.js', __FILE__), array(), '4.3.1', false);\n }", "public function enqueue_scripts() {\n\n /**\n * All styles goes here\n */\n wp_enqueue_style( 'wp-allmeta-styles', plugins_url( 'css/style.css', __FILE__ ), false, date( 'Ymd' ) );\n\n /**\n * All scripts goes here\n */\n wp_enqueue_script( 'wp-allmeta-scripts', plugins_url( 'js/script.js', __FILE__ ), array( 'jquery' ), false, true );\n\n\n /**\n * Example for setting up text strings from Javascript files for localization\n *\n * Uncomment line below and replace with proper localization variables.\n */\n // $translation_array = array( 'some_string' => __( 'Some string to translate', 'baseplugin' ), 'a_value' => '10' );\n // wp_localize_script( 'base-plugin-scripts', 'baseplugin', $translation_array ) );\n\n }", "public function scripts() {\n\t\tif ( get_post_type() == 'agenda' && ! is_single() ) {\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'events-calendar', plugins_url( 'assets/js/calendar.js', plugin_dir_path( __FILE__ ) ), array( 'jquery' ), '', true );\n\t\t\twp_enqueue_style( 'events-calendar-styles', plugins_url( 'assets/css/calendar.css', plugin_dir_path( __FILE__ ) ), array(), '' );\n\t\t}\n\n\t\twp_enqueue_style( 'timeline-styles', plugins_url( 'assets/css/timeline.css', plugin_dir_path( __FILE__ ) ), array(), '' );\n\t}", "public function enqueue_scripts()\n {\n wp_enqueue_script($this->fast_social_sharing, plugin_dir_url(__FILE__) . 'js/fast-social-sharing-public.js', array( 'jquery' ), $this->version, false);\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n\t{\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Prosvit_Extension_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Prosvit_Extension_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_script('script_select2', plugin_dir_url(__FILE__) . 'js/select2.min.js', array('jquery'), $this->version, false);\n\t\twp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/prosvit-extension-admin.js', array('jquery'), $this->version, false);\n\t}", "public function enqueue_scripts()\n {\n if (is_singular($this->token)) {\n wp_register_style($this->token, esc_url($this->assets_url . 'css/chiroquiz.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('animate', esc_url($this->assets_url . 'css/animate.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('roboto', 'https://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,900,900italic,300italic,300');\n wp_register_style('robo-slab', 'https://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300,100');\n wp_enqueue_style($this->token);\n wp_enqueue_style('animate');\n wp_enqueue_style('roboto');\n wp_enqueue_style('roboto-slab');\n\n wp_register_script('icheck', esc_url($this->assets_url . 'js/icheck.js'), ['jquery']);\n wp_register_script($this->token . '-js', esc_url($this->assets_url . 'js/scripts.js'), [\n 'jquery',\n 'icheck'\n ]);\n wp_enqueue_script('icheck');\n wp_enqueue_script($this->token . '-js');\n wp_register_script('platform-email-validator', esc_url($this->assets_url . 'js/platform-email-validator.js'), [\n 'jquery'\n ], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_enqueue_script('platform-email-validator');\n\n $localize = [\n 'ajaxurl' => admin_url('admin-ajax.php'),\n ];\n wp_localize_script($this->token . '-js', 'ChiroQuiz', $localize);\n }\n }", "public function admin_scripts() {\n\t\twp_enqueue_style( 'wpex-font-awesome', WPEX_CSS_DIR_URI .'font-awesome.min.css' );\n\t}", "private function register_scripts()\n\t{\n\t\tif (is_admin()) {\n\t\t\t// Load our main stylesheet.\n\t\t\twp_enqueue_style('kd-letters', plugin_dir_url( __FILE__ ) . '/templates/style/kd-letters.css');\n\t\t}\n\t}", "public function enqueue_scripts()\n {\n wp_enqueue_script($this->andmoraho_vendors, plugin_dir_url(__FILE__) . 'js/andmoraho-vendors-admin.js', array( 'jquery' ), $this->version, false);\n }", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Plugin_Name_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Plugin_Name_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/drinkers-edition-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "function wpstarter_scripts() {\n\n\t// Set a dynamic version for cache busting\n\t$theme = wp_get_theme();\n\t$version = $theme['Version'];\n\n\twp_enqueue_style( 'wpstarter-style', get_template_directory_uri() . '/dist/css/main.css' );\n\n\twp_enqueue_script( 'wpstarter-vendorjs', get_template_directory_uri() . '/dist/js/vendor.min.js', array(), $version, true );\n\n wp_enqueue_script( 'wpstarter-customjs', get_template_directory_uri() . '/dist/js/main.js', array(), $version, true );\n\n}", "protected function enqueue_scripts()\n {\n wp_enqueue_style('tify_control-text_remaining');\n wp_enqueue_script('tify_control-text_remaining');\n }", "public function adminThemeStylesAndScripts()\n {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.admin.min.css', array());\n wp_enqueue_style('my-admin-theme', get_template_directory_uri() . '/includes/snv/Theme/admin/style.css');\n wp_enqueue_script('my-admin-script', get_template_directory_uri() . '/includes/snv/Theme/admin/script.js', array('jquery'), '1.0', true);\n\n // for the contactonfo page\n wp_enqueue_script('media-upload');\n wp_enqueue_script('thickbox');\n wp_enqueue_style('thickbox');\n }", "public function scripts()\n\t{\n\n\t\twp_enqueue_script('jquery');\n\n\t\t// If using the regular comments of wordpress\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t\t//put modernizr as late as possible\n\t\twp_enqueue_script('bootstrap',DION_THEME_URL.'/assets/js/bootstrap.min.js');\n\t\twp_enqueue_script('owl-carousel',DION_THEME_URL.'/assets/js/owl.carousel.min.js');\n\t\twp_enqueue_script('darkmode','https://cdn.jsdelivr.net/npm/darkmode-js@1.5.0/lib/darkmode-js.min.js');\n\t\twp_enqueue_script('main',DION_THEME_URL.'/assets/js/main.min.js');\n\t}", "function _s_scripts() {\n\twp_enqueue_style( 'main.css', get_stylesheet_directory_uri() . '/dist/src/style.css', false, '6.9' );\n\twp_enqueue_script( 'main.js', get_stylesheet_directory_uri() . '/dist/main.js', false, false, true );\n}", "function wpdocs_theme_name_scripts() {\n wp_enqueue_style('pva-style', get_stylesheet_uri());\n wp_enqueue_style('pva-bootstrap', get_stylesheet_directory_uri() . '/css/bootstrap.min.css', array(), '1.0.0', 'all');\n wp_enqueue_script('pva-script', get_template_directory_uri() . '/js/sitescript.js', array(), '1.0.0', true);\n}", "function grd_scripts() {\n\twp_enqueue_style( 'main-style', get_stylesheet_uri() );\n\tif( !is_admin() ) {\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'modernizr', get_template_directory_uri() . '/bower_components/modernizr/modernizr.js', array('jquery'), NULL, true );\n\t\twp_enqueue_script( 'plugins', get_template_directory_uri() . '/assets/scripts/plugins.min.js', array('jquery'), NULL, true );\n\t\twp_enqueue_script( 'scripts', get_template_directory_uri() . '/assets/scripts/main.min.js', array('jquery'), NULL, true );\n\t\tif( DEV ) {\n\t\t\twp_enqueue_script( 'livereload', '//localhost:35729/livereload.js', NULL, NULL, true);\n\t\t}\n\t}\n}", "function ajout_scripts() {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/bootstrap/css/bootstrap.min.css');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/fonts/font-awesome.min.css');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/css/styles.min.css');\n wp_enqueue_style('font-1', 'https://fonts.googleapis.com/css?family=Open+Sans');\n wp_enqueue_style('font-2', 'https://fonts.googleapis.com/css?family=Roboto');\n\n wp_enqueue_script('messcripts', get_template_directory_uri() . '/assets/js/jquery.min.js');\n wp_enqueue_script('messcripts2', get_template_directory_uri() . '/assets/js/script.js');\n wp_enqueue_style('crdStyles', get_stylesheet_uri());\n\n\n}", "public function admin_enqueue_scripts()\n\t\t{\n\t\t\tglobal $pagenow; \n\t\t\tif (is_admin() || $pagenow === 'wc_prd_vendor') { \n\t\t\t\twp_register_script( 'bootstrap-tooltip', $this->assets_url . 'js/bootstrap-tooltip.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'select2', $this->assets_url . 'js/select2/select2.min.js', array( 'jquery' ), '3.5.2' );\n\t\t\t\twp_register_script( 'topgroupshops-media', $this->assets_url . 'js/topgroupshops-media.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'sf-scripts', $this->assets_url . 'js/sf-jquery.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_style( 'select2', $this->assets_url . 'js/select2/select2.css' );\n\t\t\t\twp_register_style( 'sf-styles', $this->assets_url . 'css/sf-styles.css' );\n\t\t\t}\n\t\t}", "public function queue_scripts() {\n\t\t\tif ( $queue = WPO_WCPDF_Dropbox()->hooks->get_queued_files() ) {\n\t\t\t\twp_register_script(\n\t\t\t\t\t'dropbox-queue',\n\t\t\t\t\tplugins_url( 'js/dropbox-queue.js' , dirname(__FILE__) ),\n\t\t\t\t\tarray( 'jquery', 'thickbox' )\n\t\t\t\t);\n\t\t\t\twp_enqueue_script( 'dropbox-queue' );\n\t\t\t\twp_enqueue_style( 'thickbox' );\n\t\t\t}\n\t\t}", "function alpha_scripts() {\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\n\t\t// Register scripts\n\t\twp_register_script( 'bootstrap-js', 'http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js', array( 'jquery' ), false, true );\n\t\twp_register_script( 'alpha-custom', SCRIPTS . '/scripts.js', array( 'jquery' ), false, true );\n\n\t\t// Load the custom scripts\n\t\twp_enqueue_script( 'bootstrap-js' );\n\t\twp_enqueue_script( 'alpha-custom' );\n\n\t\t// Load the stylesheets\n\t\twp_enqueue_style( 'font-awesome', THEMEROOT . '/css/font-awesome.min.css' );\n\t\twp_enqueue_style( 'alpha-master', THEMEROOT . '/css/master.css' );\n\t}", "public function enqueue_scripts(){\n\t\t\t// Add the color picker JS & CSS files\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\twp_enqueue_script( 'wp-color-picker' );\n\t\t}", "function aitEnqueueScriptsAndStyles(){\r\n\tif(!is_admin()){\r\n\t\t// just shortcuts\r\n\t\t$s = THEME_CSS_URL;\r\n\t\t$j = THEME_JS_URL;\r\n\r\n\t\taitAddStyles(array(\r\n\t\t\t'ait-colorbox' => array('file' => \"$s/libs/colorbox.css\"),\r\n\t\t\t'ait-fancybox' => array('file' => \"$s/libs/fancybox.css\"),\r\n\t\t\t'jquery-ui' \t => array('file' => \"$s/libs/jquery-ui.css\"),\r\n\t\t\t'prettysociable' => array('file' => \"$s/libs/prettySociable.css\"),\r\n\t\t\t'hoverzoom' \t => array('file' => \"$s/libs/hoverZoom.css\"),\r\n\t\t));\r\n\r\n\t\taitAddScripts(array(\r\n\t\t\t'jquery-ui-tabs' \t\t\t=> true,\r\n\t\t\t'jquery-ui-accordion' \t\t\t=> true,\r\n\t\t\t'jquery-infieldlabel' \t\t\t=> array('file' => \"$j/libs/jquery-infieldlabel.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-iconmenu' \t\t\t\t=> array('file' => \"$j/libs/jquery-iconmenu.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-plugins'\t \t\t\t=> array('file' => \"$j/libs/jquery-plugins.js\", 'deps' => array('jquery')),\r\n\t\t\t'modernizr'\t\t\t\t\t\t=> array('file' => \"$j/libs/modernizr-2.6.1-custom.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\r\n\t\t\t'ait-gridgallery' \t\t\t=> array('file' => \"$j/gridgallery.js\", 'deps' => array('jquery', 'jquery-plugins'), 'inFooter' => true),\r\n\t\t\t'ait-testimonials' \t\t\t=> array('file' => \"$j/testimonials.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'ait-script' \t\t\t=> array('file' => \"$j/script.js\", 'deps' => array('jquery', 'jquery-infieldlabel', 'jquery-iconmenu', 'jquery-plugins', 'modernizr'), 'inFooter' => true),\r\n\t\t));\r\n\t}\r\n}", "function queue_scripts() {\n\n if (!is_admin()) {\n\n // Deregister scripts.\n wp_deregister_script('jquery');\n\n\n // Scripts in header.\n wp_register_script('modernizr-js', get_stylesheet_directory_uri() . '/assets/js/vendor/modernizr-2.7.1.min.js', array(), '2.7.1', false);\n\n\n // Scripts in footer.\n wp_register_script('jquery', get_stylesheet_directory_uri() . '/assets/js/vendor/jquery-1.10.2.min.js', array(), '1.10.2', true);\n wp_register_script('main-js', get_stylesheet_directory_uri() . '/assets/js/main.min.js', array(), '', true);\n\n\n // Queue scripts.\n wp_enqueue_script('modernizr-js');\n // wp_enqueue_script('jquery');\n // wp_enqueue_script('main-js');\n\n }\n}", "function aurum_wp_enqueue_scripts() {\n\t// Styles\n\t$rtl_include = '';\n\n\twp_enqueue_style( 'icons-entypo' );\n\twp_enqueue_style( 'icons-fontawesome' );\n\twp_enqueue_style( 'bootstrap' );\n\twp_enqueue_style( 'aurum-main' );\n\t\n\tif ( ! is_child_theme() ) {\n\t\twp_enqueue_style( 'style' );\n\t}\n\n\t// Right to left bootstrap\n\tif ( is_rtl() ) {\n\t\twp_enqueue_style( array( 'bootstrap-rtl' ) );\n\t}\t\n\n\t// Custom Skin\n\tif ( get_data( 'use_custom_skin' ) ) {\n\t\tif ( false == apply_filters( 'aurum_use_filebased_custom_skin', aurum_use_filebased_custom_skin() ) ) {\n\t\t\twp_enqueue_style( 'custom-skin', site_url( '?custom-skin=1' ), null, null );\n\t\t}\n\t}\n\n\t// Scripts\n\twp_enqueue_script( array( 'jquery', 'bootstrap', 'tweenmax' ) );\n}", "public function enqueue_assets()\n\t{\n\t\twp_enqueue_script( 'automatic-link-title', plugins_url( '/script.js', __FILE__ ), array(), false, true );\n\t}", "function enqueue() {\n\n\t$js_path = trailingslashit( get_template_directory() ) . 'assets/js/main.min.js';\n\t$css_path = trailingslashit( get_template_directory() ) . 'assets/css/main.min.css';\n\t$req_path = trailingslashit( get_template_directory() ) . 'assets/js/vendor.min.js';\n\n\twp_enqueue_script(\n\n\t\t'req_js',\n\t\ttrailingslashit( get_stylesheet_directory_uri() ) . 'assets/js/vendor.min.js',\n\t\tfalse,\n\t\tfilemtime($req_path),\n\t\ttrue\n\n\t);\n\n\twp_enqueue_script(\n\n\t\t'main_js',\n\t\ttrailingslashit( get_stylesheet_directory_uri() ) . 'assets/js/main.min.js',\n\t\tfalse,\n\t\tfilemtime($js_path),\n\t\ttrue\n\n\t);\n\n\twp_enqueue_style(\n\n\t\t'main_css',\n\t\ttrailingslashit( get_stylesheet_directory_uri() ) . 'assets/css/main.min.css',\n\t\tfalse,\n\t\tfilemtime($css_path),\n\t\t'all'\n\n\t);\n\n}", "public function enqueue_scripts() {\n\t\twp_enqueue_script(\n\t\t\t'woocommerce_ebanx_one_click_script',\n\t\t\tplugins_url( 'assets/js/one-click.js', WC_EBANX::DIR ),\n\t\t\tarray(),\n\t\t\tWC_EBANX::VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\t'woocommerce_ebanx_one_click_style',\n\t\t\tplugins_url( 'assets/css/one-click.css', WC_EBANX::DIR )\n\t\t);\n\t}", "function bfc_add_scripts() {\n\twp_register_script('principal', get_template_directory_uri() . '/js/vendor/jquery.js', array(), 'null', true);\n\twp_enqueue_script('principal');\n\twp_register_script('foundation', get_template_directory_uri() . '/js/vendor/foundation.js', array(), 'null', true);\n\twp_enqueue_script('foundation');\n\twp_register_script('modernizr', get_template_directory_uri() . '/js/modernizr.js', array(), 'null', true);\n\twp_enqueue_script('modernizr');\n\twp_register_script('app', get_template_directory_uri() . '/js/app.js', array(), 'null', true);\n\twp_enqueue_script('app');\n\twp_register_script('slick', get_template_directory_uri() . '/js/slick.js', array(), 'null', true);\n\twp_enqueue_script('slick');\n}", "public function register_scripts()\r\n\t{\r\n\t\twp_register_style('poll', plugins_url('assets/poll.css', __DIR__));\r\n\t\twp_register_script('vue', 'https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js', array('jquery'), null, true);\r\n\t\twp_register_script('poll', plugins_url('assets/poll.js', __DIR__), array('vue'), null, true);\r\n\t}", "function artistpress_scripts() {\n\t\twp_enqueue_style( 'reset', get_template_directory_uri() . '/css/reset.css', array(), '2.0' );\n\t\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.7' );\n\t\twp_enqueue_style( 'main_style', get_template_directory_uri() . '/style.css' );\n\t\twp_enqueue_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', array(), '1.11.3', true );\n\t\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.6', true );\n\t\twp_register_script( 'load', get_template_directory_uri() . '/js/load.js' );\n\n\t\t//localize params for use in load.js\n\t\t$theme_params = array(\n\t\t 'backround_image' => get_option('backround_image'),\n\t\t 'action_url' => get_option('action_url'),\n\t\t);\n\n\t\twp_localize_script( 'load', 'themeParams', $theme_params );\n\n\t\twp_enqueue_script( 'load', get_template_directory_uri() . '/js/load.js', array( 'jquery' ,'bootstrap'), '1', true );\n\t}", "function clea_base_enqueue_scripts() {\n\n\t/* Enqueue scripts. */\n\n}", "public function enqueue_scripts() {\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/deeppress-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "function smash_enqueue_scripts() {\n\n\tglobal $wp_scripts;\n\n\t$js_assets = smash_get_scripts();\n\n\tforeach ( $js_assets AS $handle => $asset ) {\n\n\t\twp_enqueue_script( $handle, $asset[ 'file' ], $asset[ 'deps' ], $asset[ 'ver' ], $asset[ 'in_footer' ] );\n\n\t\t// checking for localize script args\n\t\tif ( array_key_exists( 'localize', $asset ) && ! empty( $asset[ 'localize' ] ) ) {\n\t\t\tforeach ( $asset[ 'localize' ] as $name => $args ) {\n\t\t\t\twp_localize_script( $handle, $name, $args );\n\t\t\t}\n\t\t}\n\n\t\tif ( array_key_exists( 'data', $asset ) ) {\n\t\t\tforeach ( $asset[ 'data' ] as $key => $value ) {\n\t\t\t\t$wp_scripts->add_data( $handle, $key, $value );\n\t\t\t}\n\t\t}\n\n\t}\n}", "function theme_scripts() {\n\t\twp_enqueue_style('bootstrap-css', get_template_directory_uri().'/styles/bootstrap/css/bootstrap.min.css');\n\t\twp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js');\n\t\twp_enqueue_script('bootstrap-js', get_template_directory_uri().'/styles/bootstrap/js/bootstrap.min.js');\n\t\twp_enqueue_script('custom-js', get_template_directory_uri().'/js/functions.js');\n\t}", "function register_scripts_and_styles() {\n\t\tif(!is_admin()) {\n\n\t\t\t// register styles\n\t\t\twp_register_style('wpinabox/css', $this->assets('main.css'), array());\n\n\t\t\t// register scripts\n\t\t\twp_register_script('wpinabox/js', $this->assets('main.js'), array(), null, true);\n\n\t\t\t// enqueue styles/scripts\n\t\t\twp_enqueue_style('wpinabox/css');\t\t\t\n\t\t\twp_enqueue_script('wpinabox/js');\t\t\n\n\t\t} else {\n\t\t\t// admin-specific styles / scripts\n\t\t}\n\t}", "public function enqueue_scripts() {\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Nerd_Wp_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Nerd_Wp_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/nerd-wp-admin.js', array( 'jquery' ), $this->version, false );\n\t}", "public static function enqueue_scripts() {\n\t\tif ( ! static::$enqueued && wp_script_is( 'cmb2-scripts', 'enqueued' ) ) {\n\t\t\twp_enqueue_script( 'wplibs-form' );\n\t\t\tstatic::$enqueued = true;\n\t\t}\n\t}", "function enqueue_script() {\n\t\twp_enqueue_script( 'aztec-vendors-script', get_stylesheet_directory_uri() . '/assets/vendor.js', [], false, true );\n\t\twp_enqueue_script( 'aztec-script', get_stylesheet_directory_uri() . '/assets/app.js', [ 'aztec-vendors-script', 'jquery' ], false, true );\n\t}", "public function wcufd_load_styles_scripts() {\n //main script file of the plugin\n wp_register_script( 'wcufd-front-end-js', plugins_url( 'js/wcufd-script.js',__FILE__ ), array('jquery'), '', true );\n wp_localize_script( 'wcufd-front-end-js', 'wcufd_vars', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'current_user_can' => current_user_can('administrator')\n )\n );\n wp_register_style( 'wcufd-front-end-style', plugins_url( 'css/wcufd-style.css',__FILE__ ) );\n }", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in SpaceAPI_WP_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The SpaceAPI_WP_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/spaceapi-wp-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}" ]
[ "0.84427583", "0.83777124", "0.827782", "0.8170448", "0.8113787", "0.81112075", "0.80826175", "0.806161", "0.8060361", "0.8021049", "0.80033284", "0.79941314", "0.79924446", "0.7956022", "0.7955681", "0.7955324", "0.78941464", "0.7890423", "0.78880215", "0.7862587", "0.78464085", "0.7846163", "0.78428835", "0.7840795", "0.7840795", "0.7839446", "0.7829157", "0.7810021", "0.78083277", "0.78056735", "0.7793223", "0.7761152", "0.77603424", "0.7759635", "0.7753105", "0.77474654", "0.7746989", "0.7741764", "0.7734666", "0.7724364", "0.77104455", "0.7708926", "0.77052504", "0.7687628", "0.7677986", "0.767741", "0.76754373", "0.76677936", "0.7666637", "0.7660766", "0.7660766", "0.7660766", "0.76595074", "0.7656174", "0.76520616", "0.76450896", "0.7631865", "0.7626216", "0.7623775", "0.76225036", "0.76154536", "0.76134527", "0.76129085", "0.76107234", "0.76097107", "0.7602857", "0.7602513", "0.7602257", "0.75992644", "0.7597493", "0.759466", "0.75914127", "0.75891834", "0.75791466", "0.75754637", "0.7574486", "0.7573492", "0.75693625", "0.7568348", "0.7565079", "0.7564729", "0.7561106", "0.75598866", "0.7555721", "0.75553733", "0.7553854", "0.75466114", "0.7545855", "0.7533353", "0.753055", "0.75260216", "0.75254226", "0.75237614", "0.75155044", "0.750887", "0.75062907", "0.7505938", "0.7505767", "0.750546", "0.7502705", "0.7501783" ]
0.0
-1
Enqueue scripts and styles.
public function dequeue_scripts() { \wp_dequeue_script( 'wpforms-flatpickr' ); \wp_dequeue_script( 'wpforms-jquery-timepicker' ); \wp_dequeue_style( 'wpforms-jquery-timepicker' ); \wp_dequeue_style( 'wpforms-flatpickr' ); \wp_dequeue_style( 'wpforms-full' ); \wp_dequeue_style( 'wpforms-base' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enqueue_scripts() {\n\t\t$this->styles();\n\t\t$this->scripts();\n\t}", "public function enqueueScripts(){}", "public function enqueueScripts() {\n\t\t\twp_enqueue_script('jquery');\n//\t\t\twp_enqueue_script('owl', self::asset(\"node_modules/owl.carousel/dist/owl.carousel.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('headroom', self::asset(\"node_modules/headroom.js/dist/headroom.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('prettyPhoto', self::asset(\"js/vendor/jquery.prettyPhoto.js\"), ['jquery'], '1.0.0', ' all');\n//\t\t\twp_enqueue_script('navigo', self::asset(\"node_modules/navigo/lib/navigo.min.js\"), ['jquery'], '1.0.0', ' all')\\;\n\t\t\twp_enqueue_script('app', self::asset(\"js/app.min.js\"), ['jquery'], '1.0.0', ' all');\n\t\t}", "public function enqueue_scripts() {\n\t\twp_enqueue_style( 'pt-style', plugins_url( 'assets/css/style.css', __FILE__ ), array(), '1.0.0', false );\n\n\t\twp_enqueue_script( 'pt-script', plugins_url( 'assets/js/script.js', __FILE__ ), array(), '1.0.0', true );\n\t}", "public function enqueueScripts() {\n wp_register_style('rrze-faq-style', plugins_url('assets/css/rrze-faq.css', plugin_basename($this->pluginFile)));\n wp_enqueue_style('rrze-faq-style');\n }", "static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}", "public function enqueueScripts()\n {\n wp_enqueue_style('gfbitpay-admin', $this->plugin->urlBase . 'style-admin.css', false, GFBITPAY_PLUGIN_VERSION);\n }", "public function frontEndStyleScripts(): void\n {\n wp_enqueue_style('users-data-bootstrap', plugin_dir_url(dirname(__FILE__)) . 'assets/css/bootstrap.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-fontawsome', plugin_dir_url(dirname(__FILE__)) . 'assets/css/font-awesome.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-styles', plugin_dir_url(dirname(__FILE__)) . 'assets/css/users-data.css', [], UsersListing::getVersion());\n //\n wp_enqueue_script('jquery-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/jquery.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('jquery-popper', plugin_dir_url(dirname(__FILE__)) . 'assets/js/popper.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('bootstrap-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/bootstrap.min.js', ['jquery'], UsersListing::getVersion(), false);\n }", "public function setup_scripts_and_styles() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_css' ), 50 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_js' ), 10 );\n\t}", "public function onEnqueueScripts()\n {\n $this->enqueue('front');\n }", "public function enqueue_scripts() {\r\n\r\n\t\t}", "public function enqueue_scripts() {\n wp_enqueue_script(\n 'moment',\n plugins_url('includes/moment.min.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'minidaemon',\n plugins_url('includes/mdn-minidaemon.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'vspi-admin',\n plugins_url('includes/vspi-admin.js', __FILE__),\n array('jquery'),\n VSPI_VERSION,\n false\n );\n }", "public function enqueue_scripts() {\n wp_enqueue_style( $this->name, plugins_url( '/assets/css/admin.css', IMFILE ), '', $this->version, 'all' );\n \n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( $this->name, plugins_url( '/assets/js/admin.js', IMFILE ), array( 'jquery' ), $this->version, true );\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts() {\n\n\t\twp_enqueue_style( 'kirki-field-dimensions', URL::get_from_path( dirname( __DIR__ ) . '/dist/control.css' ), array(), '1.0' );\n\n\t}", "public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}", "public function add_scripts_and_styles()\n {\n // Estilos css \n wp_register_style( 'wiAjustesStyles', WI_PLUGIN_URL . '/style.css', null, WI_VERSION );\n wp_enqueue_style( 'wiAjustesStyles' );\n\n // Scripts de javascript\n wp_enqueue_script('wiAjustesStylesJs', WI_PLUGIN_URL . '/script.js' , array('jquery'));\n }", "function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/scripts.min.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}", "public function enqueue_front_end_scripts() {}", "public function enqueue_scripts() {\n\n\t}", "function mandiberg_scripts() {\n\n\t\t//include bootstrap:\n\t\twp_register_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css' );\n\t\twp_enqueue_style( 'bootstrap-style');\n\n\n\n\t\t// Register the style like this for a theme:\n\t wp_register_style( 'mandiberg-style', get_template_directory_uri() . '/style.css', array(), '20120208', 'all' );\n\t\twp_enqueue_style( 'mandiberg-style');\n\n\t\t//barba js for transitions\n\n\t\t wp_register_script('barba', get_template_directory_uri() . '/build/barba.min.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('barba');\n\n\t\t//js\n\t\twp_register_script('js-file', get_template_directory_uri() . '/build/script.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('js-file');\n\n\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "function innelyz_scripts() {\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.js', array('jquery'), '3.3.7', false);\n wp_enqueue_style( 'bootstrap', get_template_directory_uri() .'/assets/css/bootstrap.css', array(), false, 'all' );\n wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lora|Pacifico|Roboto');\n wp_enqueue_style( 'innelyz-style', get_stylesheet_uri() );\n }", "public function enqueue_scripts() {\n\t\tif ( is_singular() ) wp_enqueue_script( 'comment-reply' );\n\n\t\twp_enqueue_style( 'app', get_template_directory_uri().'/assets/css/app.css', false, '1.0.0', 'all' );\n\t\twp_enqueue_script( 'foundation-modernizr', get_template_directory_uri().'/bower_components/foundation/js/vendor/modernizr.js', false, '', false );\n\t\twp_enqueue_script( 'foundation-fastclick', get_template_directory_uri().'/bower_components/foundation/js/vendor/fastclick.js', false, '', true );\n\t\twp_enqueue_script( 'foundation', get_template_directory_uri().'/bower_components/foundation/js/foundation.min.js', array('jquery'), '', true );\n\t\twp_enqueue_script( 'main', get_template_directory_uri().'/assets/js/main.js', array('jquery', 'foundation'), '1.0.0', true );\n\t}", "public function enqueue_scripts() {\n\n\t\tif ($this->js) {\n\t\t\tforeach ($this->js as $js) {\n\t\t\t\t$fileTitle = basename($js['link']);\n\t\t\t\t$fileTitle = str_replace('.js', '', $fileTitle);\n\t\t\t\t$fileTitle = preg_replace(\n\t\t\t\t\t'/[^0-9a-zA-Z]/',\n\t\t\t\t\t\"-\",\n\t\t\t\t\tstr_replace('@', '', $js['package']) . '-' . $fileTitle\n\t\t\t\t);\n\t\t\t\twp_enqueue_script($fileTitle, $js['link'], array(), $js['version']);\n\t\t\t}\n\t\t}\n\t}", "public function enqueue()\n {\n foreach ($this->assets as $name => $asset) {\n if (preg_match('/\\.js$/', $asset)) {\n wp_enqueue_script($name, $this->assetsUrl . $asset, [], false, true);\n }\n if (preg_match('/\\.css$/', $asset)) {\n wp_enqueue_style($name, $this->assetsUrl . $asset);\n }\n }\n }", "function assets(){\n\t\t\twp_enqueue_style( 'sp-2020-styles', get_template_directory_uri() .'/assets/css/main.css', array(), SPUTZNIK_2020_THEME_VERSION );\n\t\t\twp_enqueue_script( 'sp-2020-js', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), SPUTZNIK_2020_THEME_VERSION, true );\n\n\t\t}", "public function enqueue_scripts() {\n\t\t// wp_enqueue_style( 'simple-grams', plugins_url( '/assets/css/simple-grams.css', __FILE__ ) );\n\t}", "final public function wp_enqueue_scripts()\n {\n // Bypass\n if (!self::tFyAppConfig('enqueue_scripts')) {\n return;\n }\n\n if (self::tFyAppConfig('modal')) :\n wp_enqueue_style('tiFyComponentsPdfViewerModal');\n wp_enqueue_script('tiFyComponentsPdfViewerModal');\n else :\n wp_enqueue_style('tiFyComponentsPdfViewer');\n wp_enqueue_script('tiFyComponentsPdfViewer');\n endif;\n }", "public function scripts(){\n //Enqueue scripts\n /**\n * wp_enqueue_script('sample-script',$this->directory_uri . '/sample.min.js',array('jquery'),false,false);\n * ...\n * ....\n */\n }", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Fastnetmarketing_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Fastnetmarketing_Admin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/fastnetmarketing-admin-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "protected function enqueue_scripts()\n {\n \\wp_enqueue_style('tify_control-progress');\n \\wp_enqueue_script('tify_control-progress');\n }", "function enqueue_scripts() {\n\t\tinclude $this->dir_path . 'scripts.php';\n\t}", "public static function wp_enqueue_scripts() {\n\t\t\t\n\t\t\tWPPFrontendUI::_register_styles();\n\t\t\t\n\t\t}", "public function enqueue_scripts() {\n\t\t/**\n\t\t * Filters the path to the admin JS script.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param string $path The path to the admin JS script.\n\t\t */\n\t\t$script_path = apply_filters( 'stellarwp/telemetry/' . Config::get_hook_prefix() . 'script_path', $this->get_asset_path() . 'resources/js/scripts.js' );\n\n\t\twp_enqueue_script(\n\t\t\tself::SCRIPT_HANDLE,\n\t\t\t$script_path,\n\t\t\t[ 'jquery' ],\n\t\t\tself::SCRIPT_VERSION,\n\t\t\ttrue\n\t\t);\n\t}", "public function enqueueAssets()\n {\n wp_enqueue_style( WPADW_DOMAIN . '-admin-style', WPADW_URL . '/assets/style.css' );\n }", "public function register_scripts()\n {\n wp_register_style(\n 'fau-oembed-style',\n plugins_url('assets/css/fau-oembed.css', plugin()->getBasename()),\n [],\n plugin()->getVersion()\n ); \n }", "function hugomitoire_scripts() {\n wp_enqueue_style( 'appStyles', get_template_directory_uri() . '/dist/css/style.min.css' );\n wp_enqueue_script( 'Js', get_template_directory_uri() . '/dist/js/all.js', array(), '1.0.0', true );\n wp_enqueue_script( 'Swiper', get_template_directory_uri() . '/dis/js/all.js', array(), '4.4.2', true);\n}", "function berry_scripts() {\n\n\twp_dequeue_style( 'seed-style');\n\twp_enqueue_style( 'berry-style', get_stylesheet_uri() );\n\twp_enqueue_script( 'berry-main', get_stylesheet_directory_uri() . '/js/main.js', array(), '2016-1', true );\n\n}", "protected function enqueue_scripts()\n {\n\n }", "function register_scripts() {\n\t\t\t$id = get_the_ID();\n\t\t\t// Only continue if current page is home\n\t\t\tif ( !is_home() ) return;\n\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'kevinw-sf-react', plugins_url( 'assets/react.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\twp_enqueue_script( 'kevinw-sf-react-app', plugins_url( 'assets/scripts.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\n\t\t\t$this->register_scripts_css();\n\t\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array('jquery'), BRAND_VER );\n\t\t\twp_enqueue_style('jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css');\n\t\t\twp_enqueue_style('jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css');\n\n\t\t}", "public function action_wp_enqueue_scripts() {\n\n\t\twp_enqueue_style( 'bootstrap', get_stylesheet_directory_uri() . '/lib/bootstrap/dist/css/bootstrap.css' );\n\t\twp_enqueue_style( 'core-style', get_stylesheet_directory_uri() . '/assets/stylesheets/core.css' );\n\n\t}", "public function enqueue_scripts() {\n\t\twp_enqueue_script( 'slick-js', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/js/slick.min.js', array( 'jquery' ), '1.8.1', false );\n\t\twp_enqueue_script( 'index-js', plugin_dir_url( dirname( __FILE__, 2 ) ) . '/assets/js/index.js', array( 'jquery', 'slick-js' ), '1.0.0', true );\n\t}", "public function enqueue_assets() {\n\t\twp_enqueue_script( 'satispress-admin' );\n\t\twp_enqueue_style( 'satispress-admin' );\n\t}", "public function wp_enqueue_scripts() {\n wp_enqueue_style('normalize', get_template_directory_uri() .\n '/normalize.css', array(), '8.0.1');\n wp_enqueue_style('theme-css', get_stylesheet_uri(),\n array(), '1.0');\n wp_enqueue_script('jquery');\n }", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "public function enqueue() {\n\n\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\twp_enqueue_script( 'brand-slider-js', get_template_directory_uri() . '/assets/javascripts/admin/customcontrol.slider.js', array( 'jquery' ), BRAND_VER );\n\t\t\twp_enqueue_style( 'jquery-ui-slider', get_template_directory_uri() . '/assets/css/admin/jquery-ui.structure.css' );\n\t\t\twp_enqueue_style( 'jquery-ui-slider-theme', get_template_directory_uri() . '/assets/css/admin/jquery-ui.theme.css' );\n\n\t\t}", "function aitAdminEnqueueScriptsAndStyles()\n{\n\t$mapLanguage = get_locale();\n\taitAddScripts(array(\n\t\t'ait-googlemaps-api' => array(\n\t\t\t\t\t\t\t\t\t //'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyC62AaIu5cD1nwSCmyO4-33o3DjkFCH4KE&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyBL0QWiORKMYd585E4qvcsHcAR1R7wmdiY&sensor=false&amp;language='.$mapLanguage,\n\t\t\t\t\t\t\t\t\t 'deps' => array('jquery')\n\t\t\t\t\t\t\t\t\t ),\n\t\t'ait-jquery-gmap3' => array('file' => THEME_JS_URL . '/libs/gmap3.min.js', 'deps' => array('jquery', 'ait-googlemaps-api')),\n\t));\n}", "function kinectiv_start_scripts() {\n\twp_enqueue_style('kinectiv-start-style', get_stylesheet_directory_uri() . '/style.min.css', array(), '0.1.0');\n//\twp_enqueue_style('kinectiv-start-vendor-style', get_stylesheet_directory_uri() . '/css/vendor.min.css', array(), '1.0.0');\n \n wp_deregister_script('wp-embed');\n wp_deregister_script('jquery');\n wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-3.6.2.min.js', array(), null, true);\n\twp_enqueue_script('kinectiv-start-script', get_template_directory_uri() . '/js/script.min.js', array('jquery'), '0.1.0', true);\n}", "public function enqueue_scripts () {\n\n\t\t$visibility = apply_filters( 'wp_simple_flexslider_insert_frontend_script', true );\n\n\t\tif( $visibility ) {\n\t\t\twp_enqueue_style( 'jquery-flexslider', WP_SIMPLE_FLEXSLIDER_URL . 'flexslider/flexslider.css', array(), '2.3.0', 'all' );\n\t\t\twp_register_script( 'jquery-flexslider', WP_SIMPLE_FLEXSLIDER_URL . 'flexslider/jquery.flexslider-min.js', array( 'jquery'), '2.3.0', 'all' );\n\t\t\twp_enqueue_script( 'wc-simple-flexslider-frontend', WP_SIMPLE_FLEXSLIDER_URL . 'js/wp-simple-flexslider-frontend.js', array( 'jquery', 'jquery-flexslider' ), '0.1', 'all' );\n\t\t}\n\t}", "function accvent_scripts() {\n\t wp_enqueue_style( 'main', get_stylesheet_uri() );\n\t wp_enqueue_script( 'bundle', get_template_directory_uri() . '/js/build.min.js', array(), '1.0.0', true );\n\t}", "function krypton_scripts() {\n\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');\n\twp_enqueue_style( 'style', get_template_directory_uri() . '/css/style.css' );\n\t//wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr.js');\n}", "function cs_style_and_scripts() {\n \n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/vendor.css' );\n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/app.css' );\n wp_enqueue_style( 'main-css', get_stylesheet_uri() );\n\n /*wp_enqueue_script( 'myscripts', get_stylesheet_directory_uri() . '/assets/js/app.js', '', '1.0.0', true );\n wp_localize_script('myscripts', 'cs_obj', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n ));*/\n\n }", "function scripts(){\n wp_register_style('style',get_template_directory_uri() . '/assets/css/style.css',[],1,'all');\n wp_enqueue_style('style');\n wp_enqueue_style('custom-google-font','//fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');\n wp_register_script('app',get_template_directory_uri() . '/assets/js/app.js',[],1,true);\n wp_enqueue_script('app');\n}", "public function load_admin_scripts()\n {\n // Enqueue styles\n wp_enqueue_style('soccerpress', plugins_url('assets/css/soccerpress.css', __FILE__), array(), '1.0.0', false);\n wp_enqueue_style('bootstrap-css', plugins_url('assets/css/bootstrap.min.css', __FILE__), array(), '4.3.1', false);\n\n // Enqueue scripts\n wp_register_script('bootstrap-js', plugins_url('assets/js/bootstrap.min.js', __FILE__), array(), '4.3.1', false);\n }", "public function enqueue_scripts() {\n\n /**\n * All styles goes here\n */\n wp_enqueue_style( 'wp-allmeta-styles', plugins_url( 'css/style.css', __FILE__ ), false, date( 'Ymd' ) );\n\n /**\n * All scripts goes here\n */\n wp_enqueue_script( 'wp-allmeta-scripts', plugins_url( 'js/script.js', __FILE__ ), array( 'jquery' ), false, true );\n\n\n /**\n * Example for setting up text strings from Javascript files for localization\n *\n * Uncomment line below and replace with proper localization variables.\n */\n // $translation_array = array( 'some_string' => __( 'Some string to translate', 'baseplugin' ), 'a_value' => '10' );\n // wp_localize_script( 'base-plugin-scripts', 'baseplugin', $translation_array ) );\n\n }", "public function scripts() {\n\t\tif ( get_post_type() == 'agenda' && ! is_single() ) {\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'events-calendar', plugins_url( 'assets/js/calendar.js', plugin_dir_path( __FILE__ ) ), array( 'jquery' ), '', true );\n\t\t\twp_enqueue_style( 'events-calendar-styles', plugins_url( 'assets/css/calendar.css', plugin_dir_path( __FILE__ ) ), array(), '' );\n\t\t}\n\n\t\twp_enqueue_style( 'timeline-styles', plugins_url( 'assets/css/timeline.css', plugin_dir_path( __FILE__ ) ), array(), '' );\n\t}", "public function enqueue_scripts()\n {\n wp_enqueue_script($this->fast_social_sharing, plugin_dir_url(__FILE__) . 'js/fast-social-sharing-public.js', array( 'jquery' ), $this->version, false);\n }", "public function enqueue_scripts()\n {\n }", "public function enqueue_scripts()\n\t{\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Prosvit_Extension_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Prosvit_Extension_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_script('script_select2', plugin_dir_url(__FILE__) . 'js/select2.min.js', array('jquery'), $this->version, false);\n\t\twp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/prosvit-extension-admin.js', array('jquery'), $this->version, false);\n\t}", "public function enqueue_scripts()\n {\n if (is_singular($this->token)) {\n wp_register_style($this->token, esc_url($this->assets_url . 'css/chiroquiz.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('animate', esc_url($this->assets_url . 'css/animate.css'), [], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_register_style('roboto', 'https://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,900,900italic,300italic,300');\n wp_register_style('robo-slab', 'https://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300,100');\n wp_enqueue_style($this->token);\n wp_enqueue_style('animate');\n wp_enqueue_style('roboto');\n wp_enqueue_style('roboto-slab');\n\n wp_register_script('icheck', esc_url($this->assets_url . 'js/icheck.js'), ['jquery']);\n wp_register_script($this->token . '-js', esc_url($this->assets_url . 'js/scripts.js'), [\n 'jquery',\n 'icheck'\n ]);\n wp_enqueue_script('icheck');\n wp_enqueue_script($this->token . '-js');\n wp_register_script('platform-email-validator', esc_url($this->assets_url . 'js/platform-email-validator.js'), [\n 'jquery'\n ], CHIRO_QUIZ_PLUGIN_VERSION);\n wp_enqueue_script('platform-email-validator');\n\n $localize = [\n 'ajaxurl' => admin_url('admin-ajax.php'),\n ];\n wp_localize_script($this->token . '-js', 'ChiroQuiz', $localize);\n }\n }", "public function admin_scripts() {\n\t\twp_enqueue_style( 'wpex-font-awesome', WPEX_CSS_DIR_URI .'font-awesome.min.css' );\n\t}", "private function register_scripts()\n\t{\n\t\tif (is_admin()) {\n\t\t\t// Load our main stylesheet.\n\t\t\twp_enqueue_style('kd-letters', plugin_dir_url( __FILE__ ) . '/templates/style/kd-letters.css');\n\t\t}\n\t}", "public function enqueue_scripts()\n {\n wp_enqueue_script($this->andmoraho_vendors, plugin_dir_url(__FILE__) . 'js/andmoraho-vendors-admin.js', array( 'jquery' ), $this->version, false);\n }", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Plugin_Name_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Plugin_Name_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/drinkers-edition-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "function wpstarter_scripts() {\n\n\t// Set a dynamic version for cache busting\n\t$theme = wp_get_theme();\n\t$version = $theme['Version'];\n\n\twp_enqueue_style( 'wpstarter-style', get_template_directory_uri() . '/dist/css/main.css' );\n\n\twp_enqueue_script( 'wpstarter-vendorjs', get_template_directory_uri() . '/dist/js/vendor.min.js', array(), $version, true );\n\n wp_enqueue_script( 'wpstarter-customjs', get_template_directory_uri() . '/dist/js/main.js', array(), $version, true );\n\n}", "protected function enqueue_scripts()\n {\n wp_enqueue_style('tify_control-text_remaining');\n wp_enqueue_script('tify_control-text_remaining');\n }", "public function adminThemeStylesAndScripts()\n {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.admin.min.css', array());\n wp_enqueue_style('my-admin-theme', get_template_directory_uri() . '/includes/snv/Theme/admin/style.css');\n wp_enqueue_script('my-admin-script', get_template_directory_uri() . '/includes/snv/Theme/admin/script.js', array('jquery'), '1.0', true);\n\n // for the contactonfo page\n wp_enqueue_script('media-upload');\n wp_enqueue_script('thickbox');\n wp_enqueue_style('thickbox');\n }", "public function scripts()\n\t{\n\n\t\twp_enqueue_script('jquery');\n\n\t\t// If using the regular comments of wordpress\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t\t//put modernizr as late as possible\n\t\twp_enqueue_script('bootstrap',DION_THEME_URL.'/assets/js/bootstrap.min.js');\n\t\twp_enqueue_script('owl-carousel',DION_THEME_URL.'/assets/js/owl.carousel.min.js');\n\t\twp_enqueue_script('darkmode','https://cdn.jsdelivr.net/npm/darkmode-js@1.5.0/lib/darkmode-js.min.js');\n\t\twp_enqueue_script('main',DION_THEME_URL.'/assets/js/main.min.js');\n\t}", "function _s_scripts() {\n\twp_enqueue_style( 'main.css', get_stylesheet_directory_uri() . '/dist/src/style.css', false, '6.9' );\n\twp_enqueue_script( 'main.js', get_stylesheet_directory_uri() . '/dist/main.js', false, false, true );\n}", "function wpdocs_theme_name_scripts() {\n wp_enqueue_style('pva-style', get_stylesheet_uri());\n wp_enqueue_style('pva-bootstrap', get_stylesheet_directory_uri() . '/css/bootstrap.min.css', array(), '1.0.0', 'all');\n wp_enqueue_script('pva-script', get_template_directory_uri() . '/js/sitescript.js', array(), '1.0.0', true);\n}", "function grd_scripts() {\n\twp_enqueue_style( 'main-style', get_stylesheet_uri() );\n\tif( !is_admin() ) {\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'modernizr', get_template_directory_uri() . '/bower_components/modernizr/modernizr.js', array('jquery'), NULL, true );\n\t\twp_enqueue_script( 'plugins', get_template_directory_uri() . '/assets/scripts/plugins.min.js', array('jquery'), NULL, true );\n\t\twp_enqueue_script( 'scripts', get_template_directory_uri() . '/assets/scripts/main.min.js', array('jquery'), NULL, true );\n\t\tif( DEV ) {\n\t\t\twp_enqueue_script( 'livereload', '//localhost:35729/livereload.js', NULL, NULL, true);\n\t\t}\n\t}\n}", "function ajout_scripts() {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/bootstrap/css/bootstrap.min.css');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/fonts/font-awesome.min.css');\n wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/css/styles.min.css');\n wp_enqueue_style('font-1', 'https://fonts.googleapis.com/css?family=Open+Sans');\n wp_enqueue_style('font-2', 'https://fonts.googleapis.com/css?family=Roboto');\n\n wp_enqueue_script('messcripts', get_template_directory_uri() . '/assets/js/jquery.min.js');\n wp_enqueue_script('messcripts2', get_template_directory_uri() . '/assets/js/script.js');\n wp_enqueue_style('crdStyles', get_stylesheet_uri());\n\n\n}", "public function admin_enqueue_scripts()\n\t\t{\n\t\t\tglobal $pagenow; \n\t\t\tif (is_admin() || $pagenow === 'wc_prd_vendor') { \n\t\t\t\twp_register_script( 'bootstrap-tooltip', $this->assets_url . 'js/bootstrap-tooltip.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'select2', $this->assets_url . 'js/select2/select2.min.js', array( 'jquery' ), '3.5.2' );\n\t\t\t\twp_register_script( 'topgroupshops-media', $this->assets_url . 'js/topgroupshops-media.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_script( 'sf-scripts', $this->assets_url . 'js/sf-jquery.js', array( 'jquery' ), '1.0' );\n\t\t\t\twp_register_style( 'select2', $this->assets_url . 'js/select2/select2.css' );\n\t\t\t\twp_register_style( 'sf-styles', $this->assets_url . 'css/sf-styles.css' );\n\t\t\t}\n\t\t}", "public function queue_scripts() {\n\t\t\tif ( $queue = WPO_WCPDF_Dropbox()->hooks->get_queued_files() ) {\n\t\t\t\twp_register_script(\n\t\t\t\t\t'dropbox-queue',\n\t\t\t\t\tplugins_url( 'js/dropbox-queue.js' , dirname(__FILE__) ),\n\t\t\t\t\tarray( 'jquery', 'thickbox' )\n\t\t\t\t);\n\t\t\t\twp_enqueue_script( 'dropbox-queue' );\n\t\t\t\twp_enqueue_style( 'thickbox' );\n\t\t\t}\n\t\t}", "function alpha_scripts() {\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\n\t\t// Register scripts\n\t\twp_register_script( 'bootstrap-js', 'http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js', array( 'jquery' ), false, true );\n\t\twp_register_script( 'alpha-custom', SCRIPTS . '/scripts.js', array( 'jquery' ), false, true );\n\n\t\t// Load the custom scripts\n\t\twp_enqueue_script( 'bootstrap-js' );\n\t\twp_enqueue_script( 'alpha-custom' );\n\n\t\t// Load the stylesheets\n\t\twp_enqueue_style( 'font-awesome', THEMEROOT . '/css/font-awesome.min.css' );\n\t\twp_enqueue_style( 'alpha-master', THEMEROOT . '/css/master.css' );\n\t}", "public function enqueue_scripts(){\n\t\t\t// Add the color picker JS & CSS files\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\twp_enqueue_script( 'wp-color-picker' );\n\t\t}", "function aitEnqueueScriptsAndStyles(){\r\n\tif(!is_admin()){\r\n\t\t// just shortcuts\r\n\t\t$s = THEME_CSS_URL;\r\n\t\t$j = THEME_JS_URL;\r\n\r\n\t\taitAddStyles(array(\r\n\t\t\t'ait-colorbox' => array('file' => \"$s/libs/colorbox.css\"),\r\n\t\t\t'ait-fancybox' => array('file' => \"$s/libs/fancybox.css\"),\r\n\t\t\t'jquery-ui' \t => array('file' => \"$s/libs/jquery-ui.css\"),\r\n\t\t\t'prettysociable' => array('file' => \"$s/libs/prettySociable.css\"),\r\n\t\t\t'hoverzoom' \t => array('file' => \"$s/libs/hoverZoom.css\"),\r\n\t\t));\r\n\r\n\t\taitAddScripts(array(\r\n\t\t\t'jquery-ui-tabs' \t\t\t=> true,\r\n\t\t\t'jquery-ui-accordion' \t\t\t=> true,\r\n\t\t\t'jquery-infieldlabel' \t\t\t=> array('file' => \"$j/libs/jquery-infieldlabel.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-iconmenu' \t\t\t\t=> array('file' => \"$j/libs/jquery-iconmenu.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-plugins'\t \t\t\t=> array('file' => \"$j/libs/jquery-plugins.js\", 'deps' => array('jquery')),\r\n\t\t\t'modernizr'\t\t\t\t\t\t=> array('file' => \"$j/libs/modernizr-2.6.1-custom.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\r\n\t\t\t'ait-gridgallery' \t\t\t=> array('file' => \"$j/gridgallery.js\", 'deps' => array('jquery', 'jquery-plugins'), 'inFooter' => true),\r\n\t\t\t'ait-testimonials' \t\t\t=> array('file' => \"$j/testimonials.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'ait-script' \t\t\t=> array('file' => \"$j/script.js\", 'deps' => array('jquery', 'jquery-infieldlabel', 'jquery-iconmenu', 'jquery-plugins', 'modernizr'), 'inFooter' => true),\r\n\t\t));\r\n\t}\r\n}", "function queue_scripts() {\n\n if (!is_admin()) {\n\n // Deregister scripts.\n wp_deregister_script('jquery');\n\n\n // Scripts in header.\n wp_register_script('modernizr-js', get_stylesheet_directory_uri() . '/assets/js/vendor/modernizr-2.7.1.min.js', array(), '2.7.1', false);\n\n\n // Scripts in footer.\n wp_register_script('jquery', get_stylesheet_directory_uri() . '/assets/js/vendor/jquery-1.10.2.min.js', array(), '1.10.2', true);\n wp_register_script('main-js', get_stylesheet_directory_uri() . '/assets/js/main.min.js', array(), '', true);\n\n\n // Queue scripts.\n wp_enqueue_script('modernizr-js');\n // wp_enqueue_script('jquery');\n // wp_enqueue_script('main-js');\n\n }\n}", "function aurum_wp_enqueue_scripts() {\n\t// Styles\n\t$rtl_include = '';\n\n\twp_enqueue_style( 'icons-entypo' );\n\twp_enqueue_style( 'icons-fontawesome' );\n\twp_enqueue_style( 'bootstrap' );\n\twp_enqueue_style( 'aurum-main' );\n\t\n\tif ( ! is_child_theme() ) {\n\t\twp_enqueue_style( 'style' );\n\t}\n\n\t// Right to left bootstrap\n\tif ( is_rtl() ) {\n\t\twp_enqueue_style( array( 'bootstrap-rtl' ) );\n\t}\t\n\n\t// Custom Skin\n\tif ( get_data( 'use_custom_skin' ) ) {\n\t\tif ( false == apply_filters( 'aurum_use_filebased_custom_skin', aurum_use_filebased_custom_skin() ) ) {\n\t\t\twp_enqueue_style( 'custom-skin', site_url( '?custom-skin=1' ), null, null );\n\t\t}\n\t}\n\n\t// Scripts\n\twp_enqueue_script( array( 'jquery', 'bootstrap', 'tweenmax' ) );\n}", "public function enqueue_assets()\n\t{\n\t\twp_enqueue_script( 'automatic-link-title', plugins_url( '/script.js', __FILE__ ), array(), false, true );\n\t}", "function enqueue() {\n\n\t$js_path = trailingslashit( get_template_directory() ) . 'assets/js/main.min.js';\n\t$css_path = trailingslashit( get_template_directory() ) . 'assets/css/main.min.css';\n\t$req_path = trailingslashit( get_template_directory() ) . 'assets/js/vendor.min.js';\n\n\twp_enqueue_script(\n\n\t\t'req_js',\n\t\ttrailingslashit( get_stylesheet_directory_uri() ) . 'assets/js/vendor.min.js',\n\t\tfalse,\n\t\tfilemtime($req_path),\n\t\ttrue\n\n\t);\n\n\twp_enqueue_script(\n\n\t\t'main_js',\n\t\ttrailingslashit( get_stylesheet_directory_uri() ) . 'assets/js/main.min.js',\n\t\tfalse,\n\t\tfilemtime($js_path),\n\t\ttrue\n\n\t);\n\n\twp_enqueue_style(\n\n\t\t'main_css',\n\t\ttrailingslashit( get_stylesheet_directory_uri() ) . 'assets/css/main.min.css',\n\t\tfalse,\n\t\tfilemtime($css_path),\n\t\t'all'\n\n\t);\n\n}", "public function enqueue_scripts() {\n\t\twp_enqueue_script(\n\t\t\t'woocommerce_ebanx_one_click_script',\n\t\t\tplugins_url( 'assets/js/one-click.js', WC_EBANX::DIR ),\n\t\t\tarray(),\n\t\t\tWC_EBANX::VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\t'woocommerce_ebanx_one_click_style',\n\t\t\tplugins_url( 'assets/css/one-click.css', WC_EBANX::DIR )\n\t\t);\n\t}", "function bfc_add_scripts() {\n\twp_register_script('principal', get_template_directory_uri() . '/js/vendor/jquery.js', array(), 'null', true);\n\twp_enqueue_script('principal');\n\twp_register_script('foundation', get_template_directory_uri() . '/js/vendor/foundation.js', array(), 'null', true);\n\twp_enqueue_script('foundation');\n\twp_register_script('modernizr', get_template_directory_uri() . '/js/modernizr.js', array(), 'null', true);\n\twp_enqueue_script('modernizr');\n\twp_register_script('app', get_template_directory_uri() . '/js/app.js', array(), 'null', true);\n\twp_enqueue_script('app');\n\twp_register_script('slick', get_template_directory_uri() . '/js/slick.js', array(), 'null', true);\n\twp_enqueue_script('slick');\n}", "public function register_scripts()\r\n\t{\r\n\t\twp_register_style('poll', plugins_url('assets/poll.css', __DIR__));\r\n\t\twp_register_script('vue', 'https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js', array('jquery'), null, true);\r\n\t\twp_register_script('poll', plugins_url('assets/poll.js', __DIR__), array('vue'), null, true);\r\n\t}", "function artistpress_scripts() {\n\t\twp_enqueue_style( 'reset', get_template_directory_uri() . '/css/reset.css', array(), '2.0' );\n\t\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.7' );\n\t\twp_enqueue_style( 'main_style', get_template_directory_uri() . '/style.css' );\n\t\twp_enqueue_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', array(), '1.11.3', true );\n\t\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.6', true );\n\t\twp_register_script( 'load', get_template_directory_uri() . '/js/load.js' );\n\n\t\t//localize params for use in load.js\n\t\t$theme_params = array(\n\t\t 'backround_image' => get_option('backround_image'),\n\t\t 'action_url' => get_option('action_url'),\n\t\t);\n\n\t\twp_localize_script( 'load', 'themeParams', $theme_params );\n\n\t\twp_enqueue_script( 'load', get_template_directory_uri() . '/js/load.js', array( 'jquery' ,'bootstrap'), '1', true );\n\t}", "function clea_base_enqueue_scripts() {\n\n\t/* Enqueue scripts. */\n\n}", "public function enqueue_scripts() {\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/deeppress-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "function smash_enqueue_scripts() {\n\n\tglobal $wp_scripts;\n\n\t$js_assets = smash_get_scripts();\n\n\tforeach ( $js_assets AS $handle => $asset ) {\n\n\t\twp_enqueue_script( $handle, $asset[ 'file' ], $asset[ 'deps' ], $asset[ 'ver' ], $asset[ 'in_footer' ] );\n\n\t\t// checking for localize script args\n\t\tif ( array_key_exists( 'localize', $asset ) && ! empty( $asset[ 'localize' ] ) ) {\n\t\t\tforeach ( $asset[ 'localize' ] as $name => $args ) {\n\t\t\t\twp_localize_script( $handle, $name, $args );\n\t\t\t}\n\t\t}\n\n\t\tif ( array_key_exists( 'data', $asset ) ) {\n\t\t\tforeach ( $asset[ 'data' ] as $key => $value ) {\n\t\t\t\t$wp_scripts->add_data( $handle, $key, $value );\n\t\t\t}\n\t\t}\n\n\t}\n}", "function theme_scripts() {\n\t\twp_enqueue_style('bootstrap-css', get_template_directory_uri().'/styles/bootstrap/css/bootstrap.min.css');\n\t\twp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js');\n\t\twp_enqueue_script('bootstrap-js', get_template_directory_uri().'/styles/bootstrap/js/bootstrap.min.js');\n\t\twp_enqueue_script('custom-js', get_template_directory_uri().'/js/functions.js');\n\t}", "function register_scripts_and_styles() {\n\t\tif(!is_admin()) {\n\n\t\t\t// register styles\n\t\t\twp_register_style('wpinabox/css', $this->assets('main.css'), array());\n\n\t\t\t// register scripts\n\t\t\twp_register_script('wpinabox/js', $this->assets('main.js'), array(), null, true);\n\n\t\t\t// enqueue styles/scripts\n\t\t\twp_enqueue_style('wpinabox/css');\t\t\t\n\t\t\twp_enqueue_script('wpinabox/js');\t\t\n\n\t\t} else {\n\t\t\t// admin-specific styles / scripts\n\t\t}\n\t}", "public function enqueue_scripts() {\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Nerd_Wp_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Nerd_Wp_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/nerd-wp-admin.js', array( 'jquery' ), $this->version, false );\n\t}", "public static function enqueue_scripts() {\n\t\tif ( ! static::$enqueued && wp_script_is( 'cmb2-scripts', 'enqueued' ) ) {\n\t\t\twp_enqueue_script( 'wplibs-form' );\n\t\t\tstatic::$enqueued = true;\n\t\t}\n\t}", "function enqueue_script() {\n\t\twp_enqueue_script( 'aztec-vendors-script', get_stylesheet_directory_uri() . '/assets/vendor.js', [], false, true );\n\t\twp_enqueue_script( 'aztec-script', get_stylesheet_directory_uri() . '/assets/app.js', [ 'aztec-vendors-script', 'jquery' ], false, true );\n\t}", "public function wcufd_load_styles_scripts() {\n //main script file of the plugin\n wp_register_script( 'wcufd-front-end-js', plugins_url( 'js/wcufd-script.js',__FILE__ ), array('jquery'), '', true );\n wp_localize_script( 'wcufd-front-end-js', 'wcufd_vars', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'current_user_can' => current_user_can('administrator')\n )\n );\n wp_register_style( 'wcufd-front-end-style', plugins_url( 'css/wcufd-style.css',__FILE__ ) );\n }", "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in SpaceAPI_WP_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The SpaceAPI_WP_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/spaceapi-wp-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}" ]
[ "0.84427583", "0.83777124", "0.827782", "0.8170448", "0.8113787", "0.81112075", "0.80826175", "0.806161", "0.8060361", "0.8021049", "0.80033284", "0.79941314", "0.79924446", "0.7956022", "0.7955681", "0.7955324", "0.78941464", "0.7890423", "0.78880215", "0.7862587", "0.78464085", "0.7846163", "0.78428835", "0.7840795", "0.7840795", "0.7839446", "0.7829157", "0.7810021", "0.78083277", "0.78056735", "0.7793223", "0.7761152", "0.77603424", "0.7759635", "0.7753105", "0.77474654", "0.7746989", "0.7741764", "0.7734666", "0.7724364", "0.77104455", "0.7708926", "0.77052504", "0.7687628", "0.7677986", "0.767741", "0.76754373", "0.76677936", "0.7666637", "0.7660766", "0.7660766", "0.7660766", "0.76595074", "0.7656174", "0.76520616", "0.76450896", "0.7631865", "0.7626216", "0.7623775", "0.76225036", "0.76154536", "0.76134527", "0.76129085", "0.76107234", "0.76097107", "0.7602857", "0.7602513", "0.7602257", "0.75992644", "0.7597493", "0.759466", "0.75914127", "0.75891834", "0.75791466", "0.75754637", "0.7574486", "0.7573492", "0.75693625", "0.7568348", "0.7565079", "0.7564729", "0.7561106", "0.75598866", "0.7555721", "0.75553733", "0.7553854", "0.75466114", "0.7545855", "0.7533353", "0.753055", "0.75260216", "0.75254226", "0.75237614", "0.75155044", "0.750887", "0.75062907", "0.7505938", "0.7505767", "0.750546", "0.7502705", "0.7501783" ]
0.0
-1
Unload CSS potentially interfering with Conversational Forms layout.
public function css_compatibility_mode() { if ( ! \apply_filters( 'wpforms_conversational_forms_css_compatibility_mode', true ) ) { return; } $styles = \wp_styles(); if ( empty( $styles->queue ) ) { return; } $theme_uri = \wp_make_link_relative( \get_stylesheet_directory_uri() ); $parent_theme_uri = \wp_make_link_relative( \get_template_directory_uri() ); $upload_uri = \wp_get_upload_dir(); $upload_uri = isset( $upload_uri['baseurl'] ) ? \wp_make_link_relative( $upload_uri['baseurl'] ) : $theme_uri; foreach ( $styles->queue as $handle ) { if ( ! isset( $styles->registered[ $handle ]->src ) ) { continue; } $src = \wp_make_link_relative( $styles->registered[ $handle ]->src ); // Dequeue theme or upload folder CSS. foreach ( array( $theme_uri, $parent_theme_uri, $upload_uri ) as $uri ) { if ( \strpos( $src, $uri ) !== false ) { \wp_dequeue_style( $handle ); break; } } } \do_action( 'wpforms_conversational_forms_enqueue_styles' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function remove_gform_styles()\n {\n wp_dequeue_style( 'gforms_reset_css' );\n // wp_dequeue_style( 'gforms_datepicker_css' );\n wp_dequeue_style( 'gforms_formsmain_css' );\n wp_dequeue_style( 'gforms_ready_class_css' );\n wp_dequeue_style( 'gforms_browsers_css' );\n }", "function remove_gravityforms_style() {\n\twp_dequeue_style('gforms_css');\n}", "function webbusiness_reset_cache_custom_css() {\n\tdelete_transient('webbusiness_custom_css_preview');\n\twebbusiness_cache_custom_css_preview();\n}", "protected function cleanup()\n {\n $this->internalInliner->setHTML('');\n $this->internalInliner->setCSS('');\n }", "function remove_default_admin_stylesheets() {\n \t// wp_deregister_style('wp-reset-editor-styles');\n }", "function habitat_wp_dequeue_cau_css() {\n wp_dequeue_style('civicrm_admin_utilities_admin_tweaks');\n}", "function delete_stylesheet() {\n\t\t\t$css_file = $this->get_stylesheet();\n\t\t\tThemify_Filesystem::delete($css_file,'f');\n\t\t}", "function unhook_parent_style() {\n \n wp_dequeue_style( 'genericons' );\n\twp_deregister_style( 'genericons' );\n wp_dequeue_style( 'twentyfifteen-ie' );\n\twp_deregister_style( 'twentyfifteen-ie' );\n wp_dequeue_style( 'twentyfifteen-ie7' );\n\twp_deregister_style( 'twentyfifteen-ie7' );\n wp_dequeue_style( 'twentyfifteen-fonts' );\n\twp_deregister_style( 'twentyfifteen-fonts' );\n}", "function ResetCSS() {\n \t$this->RowAttrs[\"style\"] = \"\";\n\t\t$this->RowAttrs[\"class\"] = \"\";\n\t\tforeach ($this->fields as $fld) {\n\t\t\t$fld->ResetCSS();\n\t\t}\n\t}", "function ResetCSS() {\n \t$this->RowAttrs[\"style\"] = \"\";\n\t\t$this->RowAttrs[\"class\"] = \"\";\n\t\tforeach ($this->fields as $fld) {\n\t\t\t$fld->ResetCSS();\n\t\t}\n\t}", "public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('mobiletemplate.component_controller_admincp_managestyles_clean')) ? eval($sPlugin) : false);\n\t}", "function first_edition_deregister_styles() {\n\tif ( '' != get_option( 'first_edition_font_pair' ) ) {\n\t\twp_dequeue_style( 'quattrocento' );\n\t\twp_dequeue_style( 'quattrocento-sans' );\n\t}\n}", "function remove_block_css() {\n wp_dequeue_style( 'wp-block-library' ); // Wordpress core\n}", "function DisableGutenbergCSS(){\n wp_dequeue_style( 'wp-block-library' );\n wp_dequeue_style( 'wp-block-library-theme' );\n wp_dequeue_style( 'wc-block-style' );\n }", "function remove_editor_styles()\n {\n }", "public function clearStylesheets()\n {\n foreach (array_keys($this->getStylesheets()) as $file)\n {\n $this->removeStylesheet($file);\n }\n }", "function affwp_remove_bctt_styling() {\n remove_action('wp_enqueue_scripts', 'bctt_scripts');\n}", "function wp_deregister_style($handle)\n {\n }", "public function disableConcatenateCss() {}", "function v2_mumm_css_alter(&$css) {\n $path = drupal_get_path('theme', 'v2_mumm');\n if ($_GET['q'] === 'outdated-browser') {\n unset($css[$path . '/css/style.css']);\n }\n else {\n unset($css[$path . '/css/unsupported-browsers.css']);\n }\n}", "public function removeStyleDec() {\n\t}", "function sf_child_theme_dequeue_style()\n{\n wp_dequeue_style('storefront-style');\n wp_dequeue_style('storefront-woocommerce-style');\n}", "public function resetForm() {\n\n\t\tforeach ( $this->getOptionsList() as $element ) {\n\t\t\t$element->reset();\n\t\t}\n\t\t$this->setLastAction( self::ACTION_RESET );\n\n\t\t$custom_style = new Custom_CSS_Style();\n\t\t$custom_style->reinit();\n\t}", "public function tear_down(): void {\n\t\tremove_action( 'wp_body_open', [ $this->instance, 'embed_web_stories' ] );\n\n\t\tremove_theme_support( 'web-stories' );\n\n\t\tdelete_option( Customizer::STORY_OPTION );\n\t\tupdate_option( 'stylesheet', $this->stylesheet );\n\n\t\tparent::tear_down();\n\t}", "function updated_file() {\r\n\t\tdelete_transient( 'av5_css_file' );\r\n\t}", "function webbusiness_save_custom_css() {\n\tdelete_transient('webbusiness_custom_css');\n\twebbusiness_cache_custom_css();\n\tset_theme_mod('save-custom-css', time() + 3);\n}", "public static function dequeueStylesheets(): void\n {\n // ----------------------------------------------------\n // Check if we are not on the administration screen and\n // if we are not viewing a gravity forms demo screen\n // ----------------------------------------------------\n if (!is_admin() && !array_key_exists('gf_page', $_GET)) {\n wp_dequeue_style('gforms_reset_css');\n wp_dequeue_style('gforms_datepicker_css');\n wp_dequeue_style('gforms_formsmain_css');\n wp_dequeue_style('gforms_ready_class_css');\n wp_dequeue_style('gforms_browsers_css');\n }\n }", "function disable_shopp_css() {\n\tglobal $Shopp;\n\tremove_action('wp_head',array(&$Shopp,'header'));\n}", "public function reset_cache() {\n remove_theme_mod( 'athen_customizer_css_cache' );\n }", "function remove_pending_css_admin() { \n\t?>\n\n\t<link rel=\"stylesheet\" href=\"<?php echo get_bloginfo( 'home' ) . '/' . PLUGINDIR . '/remove-pending-comments/css/admin.css' ?>\" type=\"text/css\" media=\"all\" /> \n\n\t<?php\n}", "public function hestia_elementor_deactivate_default_styles() {\n\t\t$nonce = $_POST['nonce'];\n\t\tif ( ! wp_verify_nonce( $nonce, 'hestia-elementor-notice-nonce' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$reply = $_POST['reply'];\n\t\tif ( ! empty( $reply ) ) {\n\t\t\tif ( $reply === 'yes' ) {\n\t\t\t\tupdate_option( 'elementor_disable_color_schemes', 'yes' );\n\t\t\t\tupdate_option( 'elementor_disable_typography_schemes', 'yes' );\n\t\t\t}\n\t\t\tupdate_option( 'hestia_had_elementor', 'yes' );\n\t\t}\n\t\tdie();\n\t}", "public function ckfinder()\n {\n $this->viewBuilder()->layout(false);\n }", "function ru_filter_styles(){\n $this->removestyle(\"bbp-default\");\n\n // download monitor is not used in the front-end.\n $this->removestyle(\"wp_dlmp_styles\");\n\n if( !is_singular( 'docs' ) ){\n // the table of contents plugin is being used on documentation pages only\n $this->removestyle(\"toc-screen\");\n }\n\n if ( !( is_page( 'account' ) || is_page( 'edit-profile' )) ){\n // this should not be like this. Need to look into it.\n $this->removestyle(\"wppb_stylesheet\");\n }\n\n if( !is_singular( array('docs', 'post' ) ) ){\n $this->removestyle(\"codebox\");\n }\n }", "function cloud4all_dequeue_styles() {\n\twp_dequeue_style('twentytwelve-ie');\n}", "public function disableCompressCss() {}", "protected static function remove_insecure_styles($input)\n {\n }", "public function clear_style_keys()\t{\n\t\tglobal $phpbbForum;\n\t\t\n\t\t$phpbbForum->erase_style_keys();\n\t\t$this->styleKeys = array();\n\t}", "protected function _afterSave()\n {\n if ($this->isValueChanged()) {\n Mage::getModel('core/design_package')->cleanMergedJsCss();\n }\n }", "public function setCleanLayout()\n {\n $this->layout = \"@app/modules/site/views/layouts/public_clean\";\n }", "function smartwp_remove_wp_block_library_css(){\n wp_dequeue_style( 'wp-block-library' );\n wp_dequeue_style( 'wp-block-library-theme' );\n wp_dequeue_style( 'wc-block-style' ); // Remove WooCommerce block CSS\n }", "function slug_disable_woocommerce_block_editor_styles()\n{\n wp_deregister_style('wc-block-editor');\n wp_deregister_style('wc-block-style');\n}", "function discard_sidebar_being_rendered()\n {\n }", "function sf_child_theme_dequeue_style() {\n wp_dequeue_style( 'storefront-style' );\n wp_dequeue_style( 'storefront-woocommerce-style' );\n}", "private static final function cleanCSSEnvironmentIfCSSFile () {\r\n if (strpos ($_SERVER['SCRIPT_FILENAME'], '.css') && isset ($_SESSION['CSS'][$_SERVER['SCRIPT_FILENAME']])) {\r\n unset ($_SESSION['CSS'][$_SERVER['SCRIPT_FILENAME']]);\r\n // Do return ...\r\n return new B (TRUE);\r\n } else {\r\n // Do return ...\r\n return new B (FALSE);\r\n }\r\n }", "function unregister_block_style($block_name, $block_style_name)\n {\n }", "function remove_word_styles() {\r\n\t\t$this->code = preg_replace('/<style[^<>]*?>(.*?)<\\/style>/is', '<style type=\"text/css\"></style>', $this->code);\r\n\t}", "function del_stylesheets( $haystack )\n\t{\n\t\tpreg_match_all( '|<link(.*)=(.*)\"stylesheet\"(.*)/>|Us', $haystack, $tmp_array );\n\t\t$to_delete = $tmp_array[ 0 ];\n\t\tpreg_match_all( '|<style(.*)=(.*)\"text/css\">(.*)</style>|Us', $haystack, $tmp_array );\n\n\t\t// FIXME: Was ist das? ($this->cssfilter verwenden für eine verbesserung)\n\t\tforeach($tmp_array[0] as $file) {\n\t\t\tif(!strpos($file, \"IEFixes\") &&\n\t\t\t\t!strpos($file, \"ie6bar\") &&\n\t\t\t\t!strpos($file, \"awesome\") &&\n\t\t\t\t!strpos($file, \"dropdown\") &&\n\t\t\t\t!strpos($file, \"mobile\") &&\n\t\t\t\t!strpos($file, \"jquery\") &&\n\t\t\t\t!strpos($file, \"hreflang\")\n\t\t\t) {\n\t\t\t\t$to_delete = array_merge($to_delete, (array)$file);\n\t\t\t}\n\t\t}\n\t\tforeach($to_delete as $key => $file) {\n\t\t\tif(!strpos($file, \"IEFixes\") &&\n\t\t\t\t!strpos($file, \"ie6bar\") &&\n\t\t\t\t!strpos($file, \"awesome\") &&\n\t\t\t\t!strpos($file, \"mobile\") &&\n\t\t\t\t!strpos($file, \"dropdown\") &&\n\t\t\t\t!strpos($file, \"jquery\") &&\n\t\t\t\t!strpos($file, \"hreflang\")\n\t\t\t) {\n\t\t\t\t$to_delete2[$key] = $file;\n\t\t\t}\n\t\t}\n\t\tIfNotSetNull($to_delete2);\n\t\t$to_delete = $to_delete2;\n\n\t\tif(isset($this->not_delete) && is_array($this->not_delete)) {\n\t\t\tforeach($this->not_delete as $key => $value) {\n\t\t\t\tif(is_array($to_delete)) {\n\t\t\t\t\tforeach($to_delete as $key2 => $value2) {\n\t\t\t\t\t\tif(stristr($value2, basename($value))) {\n\t\t\t\t\t\t\t$this->special_css[] = $value2;\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\treturn $to_delete;\n\t}", "public function deactivate()\n {\n $this->setTheme(null);\n $this->removeSymlink();\n }", "function ct_clean_bigcommerce( $css ) {\n return '';\n}", "function noc_deregister_scripts() {\n\n //Deregister styles\n\n\t// Parent\n\twp_dequeue_style( 'theme-style-child' );\n\twp_deregister_style( 'theme-style-child' );\n\n\t// Theme child from parent\n\twp_dequeue_style( 'theme-style' );\n\twp_deregister_style( 'theme-style' );\n\n\t// // tt-main-style\n\t// wp_dequeue_style( 'tt-main-style' );\n\t// wp_deregister_style( 'tt-main-style' );\n\n\t// // tt-theme-style\n\t// wp_dequeue_style( 'tt-theme-style' );\n\t// wp_deregister_style( 'tt-theme-style' );\n\n}", "public function reset()\n\t\t{\n\t\t\t$this->styles = [];\n\t\t}", "function smartwp_remove_wp_block_library_css(){\nwp_dequeue_style( 'wp-block-library' );\nwp_dequeue_style( 'wp-block-library-theme' );\nwp_dequeue_style( 'wc-block-style' ); // Remove WooCommerce block CSS\n}", "public function afterReady() {\t\t\n\t\t$this->element = 'style';\n\n\t\t$children = array();\n\t\tforeach($this->children as $child) {\n\t\t\tif(empty($child) || !is_string($child))\n\t\t\t\tcontinue;\n\n\t\t\t$children[] = e::$less->string($child);\n\t\t} $this->children = $children;\n\n\t\t$head = $this->findChildOfParent('head');\n\t\t$this->detach();\n\n\t\t$this->appendTo($head);\n\t}", "public static function uninstall() {\n\t\tglobal $wpdb;\n\n\t\t$sql = \"\n\t\t\tDELETE\n\t\t\tFROM $wpdb->postmeta\n\t\t\tWHERE meta_key LIKE 'im8_additional_css%'\";\n\t\t$wpdb->query($sql);\n\n\t\tdelete_option(self::get_instance()->option_name);\n\t}", "public static function unsetRebuildBlockMark()\n {\n \\Includes\\Utils\\FileManager::deleteFile(\n static::getRebuildBlockMarkFilePath()\n );\n }", "private function removeStyleAndNoscriptTags(Document $document)\n {\n /**\n * Style element.\n *\n * @var Element $style\n */\n foreach (iterator_to_array($document->head->getElementsByTagName(Tag::STYLE)) as $style) {\n if (! $this->isBoilerplateStyle($style)) {\n continue;\n }\n if (Tag::NOSCRIPT === $style->parentNode->nodeName) {\n $style->parentNode->parentNode->removeChild($style->parentNode);\n } else {\n $style->parentNode->removeChild($style);\n }\n }\n }", "public function wp_footer() {\n\t\t\twp_register_style('sv_core_init_style', $this->get_url_core('frontend/css/style.css'));\n\n\t\t\tforeach ( $this->get_scripts() as $script ) {\n\t\t\t\tif(!$script->get_is_backend() && !$script->get_load_in_header()) {\n\t\t\t\t\t$this->add_script($script);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// inline styles are printed\n\t\t\twp_enqueue_style('sv_core_init_style');\n\n\t\t\tob_start();\n\t\t\t// now remove the attached style\n\t\t\tadd_action('wp_print_footer_scripts', function(){\n\t\t\t\t$this->replace_type_attributes();\n\t\t\t});\n\t\t}", "protected function removeCSS($id)\n\t{\n\t\twp_dequeue_style($id);\n\t\twp_deregister_style($id);\n\t}", "public function output_style() {\n\t\t\tif ( ! $this->output_style ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t?>\n\t\t\t<style>.acf-field-hidden {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}</style>\n\t\t\t<?php\n\t\t\t$this->output_style = false;\n\t\t}", "function wpgrade_head_cleanup() {\r\n\t// Remove WP version\r\n\tremove_action( 'wp_head', 'wp_generator' );\r\n\t\r\n\tremove_action( 'wp_head', 'rsd_link' );\r\n\t// windows live writer\r\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\r\n\t\r\n\t// remove WP version from css - those parameters can prevent caching\r\n\t//add_filter( 'style_loader_src', 'wpgrade_noversion_css_js', 9999 );\r\n\t// remove WP version from scripts - those parameters can prevent caching\r\n\t//add_filter( 'script_loader_src', 'wpgrade_noversion_css_js', 9999 );\r\n\r\n}", "function remove_admin_bar_style_frontend() {\n echo '<style type=\"text/css\" media=\"screen\">\n html { margin-top: 0px !important; }\n * html body { margin-top: 0px !important; }\n </style>';\n }", "function start_remove_wp_block_library_css() {\n\twp_dequeue_style( 'wp-block-library' );\n\twp_dequeue_style( 'wp-block-library-theme' );\n\twp_dequeue_style( 'wc-block-style' ); // Remove WooCommerce block CSS\n}", "function layout_builder_post_update_cancel_link_to_discard_changes_form() {\n // Empty post-update hook.\n}", "public function head_cleanup() {\n\n\t\tremove_action( 'wp_head', 'rsd_link' );\n\t\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t\tremove_action( 'wp_head', 'wp_generator' );\n\t}", "public function admin_css() {\n\t\t\treturn '';\n\t\t}", "function layout_builder_post_update_remove_layout_is_rebuilding() {\n // Empty post-update hook.\n}", "protected function cleanup()\n {\n $this->currentRule = '';\n $this->currentUserAgent = self::USER_AGENT;\n }", "function headClean() {\n\tremove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n\tremove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n\tremove_action( 'wp_print_styles', 'print_emoji_styles' );\n\tremove_action( 'admin_print_styles', 'print_emoji_styles' );\n\tremove_action( 'wp_head', 'wp_generator' );\n\tremove_action( 'wp_head', 'wp_wlwmanifest' );\n\tremove_action( 'wp_head', 'rsd_link' );\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n}", "function wpfolio_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n\t}", "function _style_fix()\n {\n }", "public function print_styles( ) { ?>\n\t\t<style type=\"text/css\">\n\t\t.edit-php .actions select[name=\"m\"] {\n\t\t\tdisplay: none;\n\t\t}\n\t\t</style>\n\t<?php }", "function bleachwave_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function hook_style() {\n\t\treturn null;\n\t}", "public function clearStylesheets()\n {\n $this->stylesheets = array();\n return $this;\n }", "function enfold_customization_admin_css() {\n\techo \"<style>\n\t\t\t\ta[href='#avia_sc_contact'] { display: none; }\n\t\t\t\ta[href='#avia_sc_tab'] { display: none; }\n\t\t\t\ta[href='#avia_sc_toggle'] { display: none; }\n\t\t\t\ta[href='#avia_sc_comments_list'] { display: none; }\n\t\t\t</style>\";\n}", "public function htmleditorAction()\r\n {\r\n $this->_view->unsetMain();\r\n }", "public function head_cleanup() {\n\t\t// RSS links.\n\t\t$this->remove_action( 'wp_head', 'feed_links_extra', 3 );\n\t\t$this->remove_action( 'wp_head', 'rsd_link' );\n\n\t\t// Manifest link.\n\t\t$this->remove_action( 'wp_head', 'wlwmanifest_link' );\n\n\t\t// Prev / next post links.\n\t\t$this->remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );\n\n\t\t// Generator tag.\n\t\t$this->remove_action( 'wp_head', 'wp_generator' );\n\t\t$this->add_filter( 'the_generator', '__return_false' );\n\n\t\t// Shortlink.\n\t\t$this->remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );\n\n\t\t// Emoji scripts & styles.\n\t\t$this->remove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n\t\t$this->remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n\t\t$this->remove_action( 'wp_print_styles', 'print_emoji_styles' );\n\t\t$this->remove_action( 'admin_print_styles', 'print_emoji_styles' );\n\t\t$this->remove_filter( 'the_content_feed', 'wp_staticize_emoji' );\n\t\t$this->remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );\n\t\t$this->remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );\n\n\t\t// Inline gallery styles.\n\t\t$this->add_filter( 'use_default_gallery_style', '__return_false' );\n\t}", "function head_cleanup(){\n\tremove_action( 'wp_head', 'rsd_link' );\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\tremove_action( 'wp_head', 'index_rel_link' );\n\tremove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );\n\tremove_action( 'wp_head', 'start_post_rel_link', 10, 0 );\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );\n\tremove_action( 'wp_head', 'wp_generator' );\n\tadd_filter( 'style_loader_src', 'remove_wp_ver_css_js', 9999 );\n\tadd_filter( 'script_loader_src', 'remove_wp_ver_css_js', 9999 );\n}", "function deenqueue_parent_scripts_styles() {\n wp_dequeue_script( 'one-page-slitslider' );\n wp_deregister_script( 'one-page-slitslider' );\n wp_dequeue_script( 'one-page-custom' );\n wp_deregister_script( 'one-page-custom' );\n}", "public function finished() {\n\t\t// Reset the CSS.\n\t\tupdate_option( 'fusion_dynamic_css_posts', [] );\n\t}", "public function remove_css($name = '')\n\t{\n\t\t$this->remove_asset('css', $name);\n\t}", "function flatsome_remove_recent_comments_style() {\n global $wp_widget_factory;\n remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );\n }", "function sydney_dequeue_styles( $enqueue_styles ) {\n unset( $enqueue_styles['woocommerce-general'] ); \n return $enqueue_styles;\n}", "function twentyten_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function twentyten_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function spr_section_exclude_style() {\n\techo\n\t\t'<style type=\"text/css\">\n\t\t\th2 { font-weight:bold }\n\t\t\t.spr_exclude_form { margin-top:2em; }\n\t\t\t.spr_exclude_form div { margin-top:2em }\n\t\t\t#page-spr_section_exclude .txp-list { width: auto;}\n\t\t</style>';\n}", "function cardealer_head_cleanup() {\r\n\tadd_filter( 'style_loader_src', 'cardealer_remove_wp_ver_css_js', 9999 ); // remove WP version from css\r\n\tadd_filter( 'script_loader_src', 'cardealer_remove_wp_ver_css_js', 9999 ); // remove WP version from scripts\r\n}", "function rusticmodern_remove_gallery_css( $css ) {\n\treturn preg_replace( \"#<style type='text/css'>(.*?)</style>#s\", '', $css );\n}", "function spartan_head_cleanup() {\n\t// EditURI link\n\tremove_action( 'wp_head', 'rsd_link' );\n\t// windows live writer\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t// index link\n\tremove_action( 'wp_head', 'index_rel_link' );\n\t// previous link\n\tremove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );\n\t// start link\n\tremove_action( 'wp_head', 'start_post_rel_link', 10, 0 );\n\t// links for adjacent posts\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );\n\t// WP version\n\tremove_action( 'wp_head', 'wp_generator' );\n // remove WP version from css\n add_filter( 'style_loader_src', 'spartan_remove_wp_ver_css_js', 9999 );\n // remove Wp version from scripts\n add_filter( 'script_loader_src', 'spartan_remove_wp_ver_css_js', 9999 );\n\n}", "function mro_deregister_scripts() {\n\n //Deregister styles\n\n\t// Bootstrap\n\twp_dequeue_style( 'tt-bootstrap.css' );\n\twp_deregister_style( 'tt-bootstrap.css' );\n\n\t// icomoon\n\twp_dequeue_style( 'tt-icomoon.css' );\n\twp_deregister_style( 'tt-icomoon.css' );\n\n\t// tt-main-style\n\twp_dequeue_style( 'tt-main-style' );\n\twp_deregister_style( 'tt-main-style' );\n\n\t// tt-theme-style\n\twp_dequeue_style( 'tt-theme-style' );\n\twp_deregister_style( 'tt-theme-style' );\n\n}", "private function cleanHead()\n {\n remove_action('wp_head', 'print_emoji_detection_script', 7);\n remove_action('wp_print_styles', 'print_emoji_styles');\n remove_action('wp_head', 'rsd_link'); //removes EditURI/RSD (Really Simple Discovery) link.\n remove_action('wp_head', 'wlwmanifest_link'); //removes wlwmanifest (Windows Live Writer) link.\n remove_action('wp_head', 'wp_generator'); //removes meta name generator.\n remove_action('wp_head', 'wp_shortlink_wp_head'); //removes shortlink.\n remove_action('wp_head', 'feed_links', 2); //removes feed links.\n remove_action('wp_head', 'feed_links_extra', 3); //removes comments feed.\n }", "public function regenerate_css_on_mec_settings_save() {\n\t\tpresscore_set_force_regenerate_css( true );\n\t}", "function tempera_remove_recent_comments_style() {\n\tglobal $wp_widget_factory;\n\tremove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );\n}", "function ks_remove_recent_comments_style() {\n\tglobal $wp_widget_factory;\n\tremove_action( 'wp_head', array(\n\t\t$wp_widget_factory->widgets['WP_Widget_Recent_Comments'],\n\t\t'recent_comments_style'\n\t) );\n}", "protected function _prepareLayout() {\n $this->_removeButton('reset'); // Remove unused buttons\n $this->_removeButton('delete');\n $this->_removeButton('save');\n\n return parent::_prepareLayout();\n }", "function start_remove_gallery_style( $css ) {\n\treturn preg_replace( \"!<style type='text/css'>(.*?)</style>!s\", '', $css );\n}", "function cultiv8_deregister_scripts() {\n\tglobal $wp_query, $post;\n\t\n\tif( ! ( strpos( json_encode( $wp_query ), '[contact-form-7' ) || strpos( json_encode( $post ), '[contact-form-7' ) ) ) {\n\t\t\twp_deregister_script( 'contact-form-7' );\n\t\t\twp_deregister_style( 'contact-form-7' );\n\t}\n\n}", "public function unsetJavascript() {\n $this->javascript = false;\n }", "function mdwpfp_init_markup_cleanup() {\n add_action('init', 'mdwpfp_head_cleanup');\n\n // Remove WP version from the RSS feed.\n add_filter('the_generator', 'mdwpfp_rss_version');\n\n // Clean the WP generated code around images.\n add_filter('the_content', 'mdwpfp_filter_ptags_on_images');\n\n // Remove pesky injected css for recent comments widget.\n add_filter('wp_head', 'mdwpfp_remove_wp_widget_recent_comments_style', 1);\n // Clean up injected comment styles in the <head>.\n add_action('wp_head', 'mdwpfp_remove_recent_comments_style', 1);\n\n // Clean the default WP photo gallery output.\n add_filter('gallery_style', 'mdwpfp_gallery_style');\n\n}", "function wp_dequeue_style($handle)\n {\n }" ]
[ "0.7220992", "0.70769256", "0.6813966", "0.65006685", "0.64512193", "0.64283574", "0.64038485", "0.6373439", "0.63565725", "0.63565725", "0.62134296", "0.61846644", "0.61759585", "0.6145601", "0.6067693", "0.6044833", "0.5980777", "0.59724414", "0.59232706", "0.59001535", "0.5860394", "0.5847979", "0.5841071", "0.5827644", "0.5818272", "0.5815142", "0.58034915", "0.5749673", "0.57491726", "0.57474995", "0.57473874", "0.5731973", "0.5706671", "0.57043326", "0.5682485", "0.5682012", "0.567523", "0.5671357", "0.5635413", "0.56210726", "0.56123996", "0.5593026", "0.55868363", "0.5579866", "0.55746746", "0.5563346", "0.55476743", "0.55404526", "0.55346435", "0.5524247", "0.55172026", "0.5514664", "0.551159", "0.55003065", "0.54844314", "0.54813224", "0.5464244", "0.5458398", "0.5457451", "0.54504836", "0.5447336", "0.5440372", "0.5436504", "0.54347134", "0.54346937", "0.5432528", "0.54242337", "0.5421268", "0.54170686", "0.54139936", "0.54104763", "0.54017806", "0.5395964", "0.53958726", "0.53954077", "0.5394048", "0.5378338", "0.5376053", "0.5348407", "0.5348214", "0.5337697", "0.53311086", "0.53308386", "0.5329561", "0.5329561", "0.5328604", "0.5325829", "0.53252786", "0.5323764", "0.5320888", "0.5319555", "0.53122795", "0.53028536", "0.52999663", "0.5296684", "0.52880615", "0.52708566", "0.52690095", "0.5265555", "0.5264762" ]
0.56428313
38
Print dynamic form styles.
public function print_form_styles() { if ( empty( $this->form_data['settings']['conversational_forms_color_scheme'] ) ) { return; } $color = \sanitize_hex_color( $this->form_data['settings']['conversational_forms_color_scheme'] ); if ( empty( $color ) ) { $color = '#448ccb'; } $min = \wpforms_get_min_suffix(); switch ( $color ) { case '#448ccb': $theme = 'color-scheme-blue'; break; case '#1a3c5a': $theme = 'color-scheme-dark_blue'; break; case '#4aa891': $theme = 'color-scheme-teal'; break; case '#9178b3': $theme = 'color-scheme-purple'; break; case '#cccccc': $theme = 'color-scheme-light'; break; case '#363636': $theme = 'color-scheme-dark'; break; default: $theme = ''; } if ( ! $theme ) { require \plugin_dir_path( WPFORMS_CONVERSATIONAL_FORMS_FILE ) . 'templates/dynamic-color-scheme-styles.php'; return; } \wp_enqueue_style( "wpforms-conversational-forms-{$theme}", \wpforms_conversational_forms()->url . "assets/css/color-schemes/{$theme}{$min}.css", array( 'wpforms-conversational-forms' ), \WPFORMS_CONVERSATIONAL_FORMS_VERSION ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function print_styles()\n {\n }", "public function print_styles( ) { ?>\n\t\t<style type=\"text/css\">\n\t\t.edit-php .actions select[name=\"m\"] {\n\t\t\tdisplay: none;\n\t\t}\n\t\t</style>\n\t<?php }", "function _print_styles()\n {\n }", "public static function printStyle (){\n\t?>\n\t\t\t\t\n\t\t\t\t<!-- Stylesheet Settings -->\n\t\t\t\t<h3>Stylesheet Settings</h3>\n\t\t\t\t<table class='form-table'>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr valign='top'>\n\t\t\t\t\t\t\t<th scope='row'><label for='gdocs_style_dir'>Directory</label></th>\n\t\t\t\t\t\t\t<td><span class='description'><?php bloginfo ('wpurl')?>/</span><input type='text' size=\"30\" id=\"gdocs_style_dir\" name=\"gdocs_style_dir\" value=\"<?php echo get_option ('gdocs_style_dir'); ?>\" /><br /><span class='description'><strong>Specify the directory where you keep your CSS stylesheets in.</strong></span></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t\n\t<?php\n\t}", "function maybe_print_styles() {\n\t\tif ( empty( $this->_styles ) )\n\t\t\treturn;\n\n\t\t$styles = '<style type=\"text/css\">' . \"\\n\" . '/* BEGIN dynamic styles */';\n\n\t\t\tforeach ( $this->_styles as $handle => $styles )\n\t\t\t\t$styles .= '/* ' . $handle . \"*/\\n\" . $styles . \"\\n\\n\";\n\n\t\t$styles .= '/* END dynamic styles */' . \"\\n\" . '</style>';\n\n\t\techo $styles;\n\n\t\t$this->_styles = array();\n\t}", "function print_admin_styles()\n {\n }", "function getPrintStyles(){\r\n require $this->sRessourcesFile;\r\n if (in_array(\"print_styles\", $this->aSelectedFields)){\r\n $aParams['sSchemaVmap'] = array('value' => $this->aProperties['schema_vmap'], 'type' => 'schema_name');\r\n $aParams['user_id'] = array('value' => $this->aValues['my_vitis_id'], 'type' => 'number');\r\n $oPDOresult = $this->oConnection->oBd->executeWithParams($aSql['getUserPrintStyles'], $aParams);\r\n\t\t$sListPrintStyleId = \"\";\r\n $aListPrintStyleId = array();\r\n\t\twhile($aLigne=$this->oConnection->oBd->ligneSuivante ($oPDOresult)) {\r\n\t\t\tif ($sListPrintStyleId == \"\"){\r\n\t\t\t\t$sListPrintStyleId = $aLigne[\"printstyle_id\"];\r\n\t\t\t}else{\r\n\t\t\t\t$sListPrintStyleId .= \"|\".$aLigne[\"printstyle_id\"];\r\n\t\t\t}\r\n $aListPrintStyleId[] = $aLigne[\"name\"];\r\n\t\t}\r\n\t\t$oPDOresult=$this->oConnection->oBd->fermeResultat();\r\n $this->aFields['print_styles'] = $sListPrintStyleId;\r\n $this->aFields['print_styles_label'] = implode(',', $aListPrintStyleId);\r\n }\r\n }", "protected abstract function printFormElements();", "public function printCssCode()\n {\n if (!function_exists('get_field')) {\n return;\n }\n\n $customCss = get_field('custom_css_input', 'option');\n\n if (empty($customCss)) {\n return;\n }\n\n echo '<style>' . $customCss . '</style>';\n }", "public function printPreviewCSS() {\r\n\r\n\t\t// Only print the styles once per namespace\r\n\t\tif ( ! in_array( $this->owner->optionNamespace, self::$namespacesWithPrintedPreviewCSS ) ) {\r\n\t\t\tself::$namespacesWithPrintedPreviewCSS[] = $this->owner->optionNamespace;\r\n\r\n\t\t\techo '<style id=\"titan-preview-' . esc_attr( $this->owner->optionNamespace ) . '\">';\r\n\t\t\techo $this->owner->cssInstance->generateCSS();\r\n\t\t\techo '</style>';\r\n\t\t}\r\n\t}", "public function saveForm() {\n\n\t\tforeach ( $this->getOptionsList() as $element ) {\n\t\t\t$element->save();\n\t\t}\n\t\t$this->setLastAction( self::ACTION_SAVE );\n\n\t\t$custom_style = new Custom_CSS_Style();\n\t\t$custom_style->reinit();\n\t}", "public function print_preview_css()\n {\n }", "function wp_print_styles($handles = \\false)\n {\n }", "private function printFormTypeDefitions(): void\n {\n $out = self::TPL_BUILD_FORM;\n foreach ($this->fieldsBuffer as $type => $buffer) {\n if (!empty($buffer)) {\n $placeholder = PHP_EOL;\n $placeholder .= sprintf('// %s', trim($this->fieldsMap[$type], '{}'));\n $placeholder .= PHP_EOL;\n $placeholder .= implode(PHP_EOL, $buffer);\n } else {\n $placeholder = '';\n }\n\n $out = str_replace($this->fieldsMap[$type], $placeholder, $out);\n }\n\n print \"\\e[45m$out\\e[0m\\n\";\n }", "function genFormStyle(){\n $res = '<form action=\"preferences.php\" method=\"post\">';\n $res .= '<p>Selctionner un style</p>';\n $res .= '<select name=\"style\" id=\"style\">';\n if(isset($_SESSION['style'])){\n switch($_SESSION['style']){\n case \"blue.css\":\n $res .= '<option value=\"blue.css\" selected>Blue</option>';\n $res .= '<option value=\"italic.css\">Italic</option>';\n $res .= '<option value=\"vertetjaune.css\">V et J</option>';\n break;\n case \"italic.css\":\n $res .= '<option value=\"blue.css\">Blue</option>';\n $res .= '<option value=\"italic.css\" selected>Italic</option>';\n $res .= '<option value=\"vertetjaune.css\">V et J</option>';\n break;\n case \"vertetjaune.css\":\n $res .= '<option value=\"blue.css\">Blue</option>';\n $res .= '<option value=\"italic.css\">Italic</option>';\n $res .= '<option value=\"vertetjaune.css\" selected>V et J</option>';\n break;\n }\n }\n else{\n $res .= '<option value=\"blue.css\">Blue</option>';\n $res .= '<option value=\"italic.css\">Italic</option>';\n $res .= '<option value=\"vertetjaune.css\">V et J</option>';\n }\n $res .= '</select>';\n $res .= '<button value=\"submit\">Go !</button>';\n $res .= '</form>';\n echo $res;\n }", "function pc_content_init_form( $font=[], $color='', $background='', $border='' ) {\n\n $css = ['', ''];\n\n\tif ( isset($font['font-family']) && $font['font-family'] ) {\n\t\t$is_custom_font = get_aifonts_from_dir( $font['font-family'], true );\n\n\t\tif ( ! is_font_loaded( $font['font-family'] ) ) :\n\t\t\tif ( !$is_custom_font ) {\n\t\t\t\t$css[0] = \"</style><style>@import url('https://fonts.googleapis.com/css?family=\" . $font['font-family'] . \"');\";\n\t\t\t} else {\n\t\t\t\t$css[0] = \"</style>{$is_custom_font}<style>\";\n\t\t\t}\n\t\tendif;\n\n\t \t$css[1] .= \"font-family:'\" . $font['font-family'] . \"';\";\n\t}\n\n\t$css[1] .= isset($font['font-weight'])&&$font['font-weight'] ? \"font-weight:\" . $font['font-weight'] . \";\" : '';\n\t$css[1] .= isset($font['font_size'])&&$font['font_size'] ? \"font-size:\" . $font['font_size'] . \"px;\" : '';\n\t$css[1] .= isset($font['line_height'])&&$font['line_height'] ? \"line-height:\" . $font['line_height'] . \"px;\" : '';\n\t$css[1] .= isset($font['font_style'])&&$font['font_style'] ? \"font-style:\" . $font['font_style'] . \";\" : '';\n\t$css[1] .= isset($font['text_align'])&&$font['text_align'] ? \"text-align:\" . $font['text_align'] . \";\" : '';\n\t$css[1] .= isset($font['letter_spacing'])&&$font['letter_spacing'] ? \"letter-spacing:\" . $font['letter_spacing'] . \"px;\" : '';\n\n\t$css[1] .= $color ? 'color:' . $color . ';' : '';\n\t$css[1] .= $background ? 'background-color:' . $background . ';' : '';\n\t$css[1] .= $border ? 'border-color:' . $border . ';' : '';\n\n\treturn $css;\n}", "function print_stylebox($value, $type){\n\t\t\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title;\n\t\t$input_value = $this->get_field_value($value['id']);\n\t\techo '<div class=\"styles-holder\">';\n\t\techo '<input name=\"'.$value['id'].'\" id=\"'.$value['id'].'\" type=\"hidden\" value=\"'.$input_value.'\" /><ul>';\n\t\t\n\t\t$counter=0;\n\t\tforeach ($value['options'] as $option) {\n\t\t\t//set a style the option if this is an option for selecting a color or pattern \n\t\t\tif($type=='pattern') {\n\t\t\t\t//this is a pattern, set a background image to it\n\t\t\t\t$style='background-image:url('.HANA_PATTERNS_URL.$option.');';\n\t\t\t}elseif($type=='color'){\n\t\t\t\t//this is a color, set background color to it\n\t\t\t\t$style='background-color:#'.$option.';';\n\t\t\t}\n\t\t\t$class=$option==$input_value?'selected-style':'';\n\t\t\t\n\t\t\techo '<li style=\"'.$style.'\" class=\"'.$class.'\"><a class=\"style-box\" title=\"'.$option.'\" href=\"\"></a></li>';\n\t\t} \n\t\techo '</ul></div>';\n\t\t$this->close_option($value);\n\t}", "public function getFormStyle()\n {\n $prop = array();\n\n $prop['alignment'] = $this->value['text-align'];\n\n if (isset($this->value['background']['color']) && is_array($this->value['background']['color'])) {\n $prop['fillColor'] = $this->value['background']['color'];\n }\n\n if (isset($this->value['border']['t']['color'])) {\n $prop['strokeColor'] = $this->value['border']['t']['color'];\n }\n\n if (isset($this->value['border']['t']['width'])) {\n $prop['lineWidth'] = $this->value['border']['t']['width'];\n }\n\n if (isset($this->value['border']['t']['type'])) {\n $prop['borderStyle'] = $this->value['border']['t']['type'];\n }\n\n if (!empty($this->value['color'])) {\n $prop['textColor'] = $this->value['color'];\n }\n\n if (!empty($this->value['font-size'])) {\n $prop['textSize'] = $this->value['font-size'];\n }\n\n return $prop;\n }", "function initStylePropertiesForm()\n\t{\n\t\tglobal $ilCtrl, $lng, $ilTabs, $ilSetting;\n\t\t\n\t\tinclude_once(\"./Services/Style/classes/class.ilObjStyleSheet.php\");\n\t\t$lng->loadLanguageModule(\"style\");\n\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\t\t\n\t\t$fixed_style = $ilSetting->get(\"fixed_content_style_id\");\n\t\t$style_id = $this->object->getStyleSheetId();\n\n\t\tif ($fixed_style > 0)\n\t\t{\n\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t$st->setValue(ilObject::_lookupTitle($fixed_style).\" (\".\n\t\t\t\t$this->lng->txt(\"global_fixed\").\")\");\n\t\t\t$this->form->addItem($st);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$st_styles = ilObjStyleSheet::_getStandardStyles(true, false,\n\t\t\t\t$_GET[\"ref_id\"]);\n\n\t\t\t$st_styles[0] = $this->lng->txt(\"default\");\n\t\t\tksort($st_styles);\n\n\t\t\tif ($style_id > 0)\n\t\t\t{\n\t\t\t\t// individual style\n\t\t\t\tif (!ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t\t{\n\t\t\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t\t\t$st->setValue(ilObject::_lookupTitle($style_id));\n\t\t\t\t\t$this->form->addItem($st);\n\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"edit\"));\n\n\t\t\t\t\t// delete command\n\t\t\t\t\t$this->form->addCommandButton(\"editStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_edit_style\"));\n\t\t\t\t\t$this->form->addCommandButton(\"deleteStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_delete_style\"));\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"delete\"));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t{\n\t\t\t\t$style_sel = ilUtil::formSelect ($style_id, \"style_id\",\n\t\t\t\t\t$st_styles, false, true);\n\t\t\t\t$style_sel = new ilSelectInputGUI($lng->txt(\"style_current_style\"), \"style_id\");\n\t\t\t\t$style_sel->setOptions($st_styles);\n\t\t\t\t$style_sel->setValue($style_id);\n\t\t\t\t$this->form->addItem($style_sel);\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"create\"));\n\t\t\t\t$this->form->addCommandButton(\"saveStyleSettings\",\n\t\t\t\t\t\t$lng->txt(\"save\"));\n\t\t\t\t$this->form->addCommandButton(\"createStyle\",\n\t\t\t\t\t$lng->txt(\"sty_create_ind_style\"));\n\t\t\t}\n\t\t}\n\t\t$this->form->setTitle($lng->txt(\"wiki_style\"));\n\t\t$this->form->setFormAction($ilCtrl->getFormAction($this));\n\t}", "function printForm(){\n\n\t\tif( $this->returnOutput ){\n\n\t\t\tob_start();\n\t\t\techo $this->openForm();\n\t\t\tfor ($n=0; $n < $this->columns; $n++) $this->_outputField($n);\n\t\t\techo $this->closeForm();\n\t\t\t$html_block = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\treturn $html_block;\n\n\t\t} else {\n\n\t\t\t$this->openForm();\n\t\t\tfor ($n=0; $n < $this->columns; $n++) $this->_outputField($n);\n\t\t\t$this->closeForm();\n\n\t\t}\n\n\t}", "function salong_admin_print_styles_outbox(){\n\tdo_action( 'salong_print_styles', 'outbox' );\n}", "public function print_styles() {\n\t\tglobal $pagenow;\n\n\t\t$pages = array( 'edit.php' );\n\n\t\tif ( in_array( $pagenow, $pages ) )\n\t\t\twp_enqueue_style( 'reorderpages_style', AERIA_RESOURCE_URL . 'css/reorder-admin.css' );\n\n\t}", "public function printForm() {\n\t\t$html = $this->printPre().'<input type=\"file\" id=\"'.$this->name().'\" name=\"'.$this->name().'\" />'.$this->printPost().$this->printDescription();\n\n\t\tif ($this->allowMultiple) {\n\t\t\t$html .= $this->print_js();\n\t\t}\n\t\treturn $html;\n\t}", "public function printStyles()\n {\n foreach($this->styles as $css) {\n echo '<link href=\"'.$css.'\" rel=\"stylesheet\" type=\"text/css\" />' . PHP_EOL;\n }\n }", "function print_styles( $meta_boxes ) {\r\n $prefix = '';\r\n\r\n $meta_boxes[] = array(\r\n 'id' => 'print_styles',\r\n 'title' => esc_html__( 'Print Styles', 'ps_metabox' ),\r\n 'post_types' => array( 'page', 'guide', 'hardware' ),\r\n 'context' => 'side',\r\n 'priority' => 'high',\r\n 'autosave' => true,\r\n 'fields' => array(\r\n array(\r\n\t\t\t\t'id' => $prefix . 'print_template',\r\n\t\t\t\t'name' => esc_html__( 'Print Template', 'metabox-online-generator' ),\r\n\t\t\t\t'type' => 'select_advanced',\r\n\t\t\t\t'desc' => esc_html__( 'Choose Style template for printable page', 'metabox-online-generator' ),\r\n\t\t\t\t'placeholder' => esc_html__( 'Select an Item', 'metabox-online-generator' ),\r\n\t\t\t\t'options' => array(\r\n 'no_column' => esc_html__( 'No Columns', 'metabox-online-generator' ),\r\n\t\t\t\t\t'hero' => esc_html__( 'Hero', 'metabox-online-generator' ),\r\n\t\t\t\t\t'two_columns_with_header' => esc_html__( 'Two Columns with Header', 'metabox-online-generator' ),\r\n\t\t\t\t\t'two_columns_sans_header' => esc_html__( 'Two Columns Sans Header', 'metabox-online-generator' ),\r\n\t\t\t\t\t'table_of_contents' => esc_html__( 'Table of Contents', 'metabox-online-generator' )\r\n\t\t\t\t\t\r\n\t\t\t\t),\r\n ),\r\n \r\n\t\t\tarray(\r\n\t\t\t\t'id' => $prefix . 'full_bleed',\r\n\t\t\t\t'name' => esc_html__( 'Full Bleed', 'metabox-online-generator' ),\r\n\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t'desc' => esc_html__( 'Page has no margins', 'metabox-online-generator' ),\r\n ),\r\n array(\r\n\t\t\t\t'id' => 'page_break_after',\r\n\t\t\t\t'name' => esc_html__( 'Checkbox', 'metabox-online-generator' ),\r\n\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t'desc' => esc_html__( 'Page Break After', 'metabox-online-generator' )\r\n\t\t\t)\r\n \r\n \r\n ),\r\n );\r\n\r\n return $meta_boxes;\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function dumpCSS()\r\n {\r\n if(($this->ControlState & csDesigning) == csDesigning)\r\n {\r\n echo \"border: thin dotted #C0C0C0;\\n\";\r\n }\r\n\r\n parent::dumpCSS();\r\n\r\n if ($this->Style==\"\")\r\n {\r\n // Adds the cursor to the style\r\n if ($this->_cursor != \"\")\r\n {\r\n echo parent::parseCSSCursor();\r\n }\r\n }\r\n\r\n }", "function renderForm()\t{\n\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('settings'), 'divider', '');\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('spaceTitle'), 'text', 'title');\n\t\n\t\tif(count($this->error) > 0) {\n\t\t\t$form .= \"<span style='display:block;color:red;font-weight:bold;padding:10px;'>\" .\n\t\t\t\t\t\t\t implode(\"<br />\", $this->error) . \n\t\t\t\t\t \"</span>\";\t\n\t\t}\n\n\t\t$form .= \"<form action=\" . t3lib_div::getThisUrl() . \"><table border='0' cellpadding='7'>\";\n\t\t$form .= implode(\"\\n\", $fields);\n\t\t$form .= \"<tr><td colspan='2' align='right'>\" .\n\t\t\t\t \"<input type='hidden' name='formPosted' value='1'>\" . \n\t\t\t\t \"<input type='submit' value='\" . $GLOBALS['LANG']->getLL('createSpace') . \"'></td></tr></table></form>\";\n\n\t\treturn $form;\n\t}", "function print_embed_styles()\n {\n }", "function printForm() {\n $this->printDebugMessage('printForm', 'Begin', 1);\n $stypeStr = $this->paramDetailToStr('stype');\n $programStr = $this->paramDetailToStr('program');\n $databaseStr = $this->paramDetailToStr('database', TRUE);\n $scoresStr = $this->paramDetailToStr('scores');\n $alignmentsStr = $this->paramDetailToStr('alignments');\n $expStr = $this->paramDetailToStr('exp');\n \n print <<<EOF\n<form method=\"POST\">\n<p>E-mail: <input type=\"text\" name=\"email\" />&nbsp;\nJob title: <input type=\"text\" name=\"title\" /></p>\n\n<p>$stypeStr<br />\n<a href=\"?paramDetail=sequence\">Sequence</a>:<br />\n<textarea name=\"sequence\" rows=\"5\" cols=\"80\">\n</textarea></p>\n\n<p>$programStr $databaseStr</p>\n\n<p>$scoresStr $alignmentsStr $expStr</p>\n\n<p align=\"right\">\n<input type=\"submit\" value=\"Submit\" />\n<input type=\"reset\" value=\"Reset\" />\n</p>\n</form>\nEOF\n ;\n $this->printDebugMessage('printForm', 'End', 1);\n }", "public function printStyles() {\r\n if ($this->getParent()->isAAMScreen()) {\r\n wp_enqueue_style(\r\n 'aam-feature-example-admin', \r\n AAM_FEATURE_EXAMPLE_BASE_URL . '/stylesheet.css', \r\n array('aam-style') //Extension can overwrite the main AAM style\r\n );\r\n }\r\n }", "public function printForm() {\n\t\t$html = '';\n\t\t$values = $this->value();\n\n\t\tforeach ($this->options as $value => $label) {\n\t\t\t$id = $this->name().'_'.$value;\n\t\t\t$html .= '<div><input type=\"checkbox\" id=\"'.$id.'\" name=\"'.$id.'\" value=\"'.$value.'\" '.((isset($this->selected[$id]) && $this->selected[$id])?' checked':'').'/><label for=\"'.$id.'\">'.$label.'</label></div>'.\"\\n\";\n\t\t}\n\n\t\tforeach ($this->others as $name => $label) {\n\t\t\t$value = $values[$name];\n\n\n\t\t\t$id = $this->name().'_'.$name;\n\t\t\t$label = '<label for=\"'.$id.'\">'.$label.'</label> <input onclick=\"document.getElementById(\\''.$id.'\\').checked=\\'checked\\';\" name=\"'.$id.'[]\" value=\"'.htmlentities($value).'\" />';\n\t\t\t$input = '<input type=\"checkbox\" id=\"'.$id.'\" '.(($value)?(' checked=\"checked\" '):('')).'name=\"'.$id.'[]\" value=\"'.htmlentities($value).'\" />';\n\t\t\t$html .= '<div class=\"checkbox\">'.($this->label_left?($label.$input):($input.$label)).'</div>';\n\t\t}\n\t\treturn $html;\n\t}", "function print_late_styles()\n {\n }", "function ag_set_predefined_style() {\n\tif(!isset($_POST['lcwp_nonce']) || !wp_verify_nonce($_POST['lcwp_nonce'], 'lcwp_nonce')) {die('Cheating?');}\n\tif(!isset($_POST['style'])) {die('data is missing');}\n\n\trequire_once(AG_DIR .'/settings/preset_styles.php');\n\trequire_once(AG_DIR .'/functions.php');\n\t\n\t$style_data = ag_preset_styles_data($_POST['style']);\n\tif(empty($style_data)) {die('Style not found');}\n\t\n\t\n\t// override values\n\tforeach($style_data as $key => $val) {\n\t\tupdate_option($key, $val);\t\t\n\t}\n\n\n\t// if is not forcing inline CSS - create static file\n\tif(!get_option('mg_inline_css')) {\n\t\tag_create_frontend_css();\n\t}\n\t\n\tdie('success');\n}", "public function admin_print_styles()\n\t{\n\t\tif($_GET['type'] == 'picasa')\n\t\t{\n\t\t\twp_enqueue_style('inverted-google-apps');\n\t\t\twp_enqueue_script('inverted-google-apps');\n\t\t}\n\t}", "function object_css() {\n\tif ( is_singular( get_object_type_names() ) ) {\n\t\t$display_options = get_customizer_settings()[ WPM_PREFIX . 'mobject_style' ];\n\t\t$styles = [];\n\n\t\tif ( 'bold' === $display_options['field_label_font_weight'] ) {\n\t\t\t$styles[ '.' . WPM_PREFIX . 'field-label-div' ]['font-weight'] = 'bold';\n\t\t\t$styles[ '.' . WPM_PREFIX . 'field-label' ]['font-weight'] = 'bold';\n\t\t}\n\t\tif ( $display_options['field_label_color'] ) {\n\t\t\t$styles[ '.' . WPM_PREFIX . 'field-label-div' ]['color'] = $display_options['field_label_color'];\n\t\t\t$styles[ '.' . WPM_PREFIX . 'field-label' ]['color'] = $display_options['field_label_color'];\n\t\t}\n\t\tif ( $display_options['field_text_color'] ) {\n\t\t\t$styles[ '.' . WPM_PREFIX . 'field-text' ]['color'] = $display_options['field_text_color'];\n\t\t}\n\t\tif ( 0 < $display_options['image_max_width'] ) {\n\t\t\t$styles[ '.' . WPM_PREFIX . 'obj-image img' ]['max-width'] = $display_options['image_max_width'] . 'px';\n\t\t}\n\t\tif ( 0 < $display_options['image_max_height'] ) {\n\t\t\t$styles[ '.' . WPM_PREFIX . 'obj-image img' ]['max-height'] = $display_options['image_max_height'] . 'px';\n\t\t}\n\t\tif ( 0 < $display_options['image_border_width'] ) {\n\t\t\t$styles[ '.' . WPM_PREFIX . 'obj-image img' ]['border-width'] = $display_options['image_border_width'] . 'px';\n\t\t\t$styles[ '.' . WPM_PREFIX . 'obj-image img' ]['border-style'] = 'solid';\n\t\t}\n\t\tif ( $display_options['image_border_color'] ) {\n\t\t\t$styles[ '.' . WPM_PREFIX . 'obj-image img' ]['border-color'] = $display_options['image_border_color'];\n\t\t}\n\t\tif ( 'right' === $display_options['image_gallery_position'] || 'left' === $display_options['image_gallery_position'] ) {\n\t\t\t$styles[ '#' . WPM_PREFIX . 'obj-gallery' ]['width'] = $display_options['image_max_width'];\n\t\t\t$styles[ '.' . WPM_PREFIX . 'obj-image' ]['margin-top'] = $display_options['image_margin'] . 'px';\n\t\t\t$styles[ '.' . WPM_PREFIX . 'obj-image' ]['margin-bottom'] = $display_options['image_margin'] . 'px';\n\t\t}\n\t\tswitch ( $display_options['image_gallery_position'] ) {\n\t\t\tcase 'right':\n\t\t\t\t$styles[ '#' . WPM_PREFIX . 'obj-gallery' ]['float'] = 'right';\n\t\t\t\t$styles[ '#' . WPM_PREFIX . 'obj-gallery' ]['margin-left'] = $display_options['image_gallery_margin'] . 'px';\n\t\t\t\t$styles[ '.' . WPM_PREFIX . 'field-text' ]['margin-right'] =\n\t\t\t\t\t(\n\t\t\t\t\t\t$display_options['image_gallery_margin'] +\n\t\t\t\t\t\t$display_options['image_max_width'] +\n\t\t\t\t\t\t$display_options['image_border_width']\n\t\t\t\t\t) . 'px !important';\n\t\t\t\tbreak;\n\t\t\tcase 'left':\n\t\t\t\t$styles[ '#' . WPM_PREFIX . 'obj-gallery' ]['float'] = 'left';\n\t\t\t\t$styles[ '#' . WPM_PREFIX . 'obj-gallery' ]['margin-right'] = $display_options['image_gallery_margin'] . 'px';\n\t\t\t\t$styles[ '.' . WPM_PREFIX . 'field-text' ]['margin-left'] =\n\t\t\t\t\t(\n\t\t\t\t\t\t$display_options['image_gallery_margin'] +\n\t\t\t\t\t\t$display_options['image_max_width'] +\n\t\t\t\t\t\t$display_options['image_border_width']\n\t\t\t\t\t) . 'px !important';\n\t\t\t\tbreak;\n\t\t\tcase 'top':\n\t\t\tcase 'bottom':\n\t\t\t\t$styles[ '.' . WPM_PREFIX . 'obj-image' ]['margin-left'] = $display_options['image_margin'] . 'px';\n\t\t\t\t$styles[ '.' . WPM_PREFIX . 'obj-image' ]['margin-right'] = $display_options['image_margin'] . 'px';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t/**\n\t\t * Child object div\n\t\t */\n\t\t$styles['.child-object']['display'] = 'flex';\n\t\t$styles['.child-object']['flex-direction'] = 'row';\n\t\t$styles['.child-object']['flex-wrap'] = 'nowrap';\n\t\t$styles['.child-object-thumb']['width'] = '100px';\n\t\t$styles['.child-object-thumb']['height'] = '100px';\n\t\t$styles['.child-object-thumb']['min-width'] = '100px';\n\t\t$styles['.child-object-thumb']['object-fit'] = 'cover';\n\t\t$styles['.child-object-thumb']['margin-right'] = '1em';\n\n\t\techo '<style type=\"text/css\">';\n\t\techo esc_html( css_from_array( $styles ) );\n\t\techo '</style>';\n\t}\n}", "public function resetForm() {\n\n\t\tforeach ( $this->getOptionsList() as $element ) {\n\t\t\t$element->reset();\n\t\t}\n\t\t$this->setLastAction( self::ACTION_RESET );\n\n\t\t$custom_style = new Custom_CSS_Style();\n\t\t$custom_style->reinit();\n\t}", "private static function get_styles() {\n\n\t\treturn [\n\t\t\t'basic' => esc_html__( 'Basic', 'wpforms' ),\n\t\t\t'compact' => esc_html__( 'Compact', 'wpforms' ),\n\t\t\t'table' => esc_html__( 'Table', 'wpforms' ),\n\t\t\t'table_compact' => esc_html__( 'Table, Compact', 'wpforms' ),\n\t\t];\n\t}", "private function printCSS() \n\t{\t\t\n\t\t// str with error type and nr of errors\n\t\tif ($this->css_error == '' && $this->error_nr_css != -1) {\n\t\t\t$this->SetFont('DejaVu', 'B', 14);\n\t\t\t$this->SetTextColor(0);\n\t\t\t$this->Write(5, _AC('file_report_css').' ('.$this->error_nr_css.' '._AC('file_report_found').'):');\t\t\n\t\t\t$this->Ln(10);\n\t\t\t$this->SetFont('DejaVu', 'B', 12);\n\t\t\t$this->Write(5,strip_tags(_AC(\"css_validator_provided_by\")));\n\t\t\t$this->Ln(10);\n\t\t} else if ($this->css_error == '' && $this->error_nr_css == -1) {\n\t\t\t// css validator is disabled\n\t\t\t$this->SetTextColor(0, 0, 255);\n\t\t\t$path = AC_BASE_HREF.\"images/jpg/info.jpg\";\n\t\t\t$this->Image($path, $this->GetX(), $this->GetY(), 4, 4);\n\t\t\t$this->SetX(14);\n\t\t\t$this->SetFont('DejaVu', 'B', 12);\t\t\t\n\t\t\t$this->Write(5,_AC(\"css_validator_disabled\"));\n\t\t\t$this->SetTextColor(0);\n\t\t}\n\t\t\n\t\tif ($this->css_error != '') {\n\t\t\t// css validator is only available at validating url, not at validating a uploaded file or pasted html\n\t\t\t$this->Ln(3);\n\t\t\t$this->SetTextColor(0, 0, 255);\n\t\t\t$path = AC_BASE_HREF.\"images/jpg/info.jpg\";\n\t\t\t$this->Image($path, $this->GetX(), $this->GetY(), 4, 4);\n\t\t\t$this->SetX(14);\n\t\t\t$this->SetFont('DejaVu', 'B', 12);\n\t\t\t$this->Write(5, $this->css_error);\n\t\t} else {\n\t\t\tif ($this->error_nr_css == 0) {\n\t\t\t\t// show congratulations if no errors found\n\t\t\t\t$this->Ln(3);\n\t\t\t\t$this->SetTextColor(0, 128, 0);\n\t\t\t\t$path = AC_BASE_HREF.\"images/jpg/feedback.jpg\";\n\t\t\t\t$this->Image($path, $this->GetX(), $this->GetY(), 4, 4);\n\t\t\t\t$this->SetX(14);\n\t\t\t\t$this->SetFont('DejaVu', 'B', 12);\n\t\t\t\t$this->Write(5, _AC(\"congrats_css_validation\"));\n\t\t\t} else { // else make report on errors\n\t\t\t\tforeach($this->css as $uri => $group) {\n\t\t\t\t\t// uri\n\t\t\t\t\t$this->Ln(3);\n\t\t\t\t\t$this->SetX(17);\n\t\t\t\t\t$this->SetTextColor(0);\n\t\t\t\t\t$this->SetFont('DejaVu', 'B', 10);\n\t\t\t\t\t$this->Write(5, \"URI: \");\n\t\t\t\t\t$this->SetTextColor(26, 74, 114);\n\t\t\t\t\t$this->SetFont('DejaVu', 'B', 12);\n\t\t\t\t\t$this->Write(5, $uri);\n\t\t\t\t\t$this->Ln(10);\n\t\t\t\t\t\n\t\t\t\t\tforeach($group as $error) {\n\t\t\t\t\t\t// line, code\n\t\t\t\t\t\t$this->SetX(17);\n\t\t\t\t\t\t$this->SetTextColor(0);\n\t\t\t\t\t\t$this->SetFont('DejaVu', 'BI', 9);\n\t\t\t\t\t\t$location = _AC('line').\" \".$error['line'].\": \";\n\t\t\t\t\t\t$this->Write(5, $location);\n\t\t\t\t\t\tif ($error['code'] != '') {\n\t\t\t\t\t\t\t$this->SetFont('DejaVu', '', 9);\n\t\t\t\t\t\t\t$this->Write(5, $error['code']); \n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->Ln(7);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// parse\n\t\t\t\t\t\tif ($error['parse'] != '') {\n\t\t\t\t\t\t\t$this->SetX(17);\n\t\t\t\t\t\t\t$this->SetFont('DejaVu', '', 10);\n\t\t\t\t\t\t\t$str = str_replace(\"\\t\", \" \", strip_tags(htmlspecialchars_decode(html_entity_decode($error['parse']), ENT_QUOTES)));\n\t\t\t\t\t\t\t$this->Write(5, $str);\n\t\t\t\t\t\t\t$this->Ln(10);\n\t\t\t\t\t\t}\n\t\t\t\t\t} // end foreach error\n\t\t\t\t} // end foreach group\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function drawStyle()\r\n\t{\r\n\t}", "public function output_style() {\n\t\t\tif ( ! $this->output_style ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t?>\n\t\t\t<style>.acf-field-hidden {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}</style>\n\t\t\t<?php\n\t\t\t$this->output_style = false;\n\t\t}", "function hwm_label_printer_form() {\n if( current_user_can('administrator' ) )\n return gravity_form( 22 );\n}", "function admin_print_styles() {\r\n global $wpi_settings, $current_screen;\r\n\r\n wp_enqueue_style('wpi-custom-jquery-ui');\r\n wp_enqueue_style('wpi-admin-css');\r\n\r\n //** Prints styles specific for this page */\r\n wp_enqueue_style('wpi-this-page-css');\r\n wp_enqueue_style('wpi-ie7');\r\n }", "private function styles_pointer() {\n\t\treturn array(\n\t\t\t'content' => '<h3>' . __( 'Styles', 'formidable' ) . '</h3>'\n\t\t\t . '<p>' . __( 'Want to make changes to the way your forms look? Make all the changes you would like right here, and watch the sample form change before your eyes.', 'formidable' ) . '</p>',\n\t\t\t'prev_page' => 'entries',\n\t\t\t'next_page' => 'import',\n\t\t\t'selector' => '.general-style',\n\t\t\t'position' => array( 'edge' => 'left', 'align' => 'right' ),\n\t\t);\n\t}", "function my_custom_override_form_template_styles() {\n wp_enqueue_style(\n 'form-template-styles',\n get_stylesheet_directory_uri() . '/form-template-styles.css',\n 'give-sequoia-template-css'\n );\n }", "function dumpCSS()\r\n {\r\n if(($this->ControlState & csDesigning) == csDesigning)\r\n {\r\n if($this->Style == \"\")\r\n {\r\n echo \"border: 1px dotted #000000;\\n\";\r\n }\r\n }\r\n // position\r\n if($this->_islayer)\r\n {\r\n echo \"position: absolute;\\n\";\r\n echo \"visibility: hidden;\\n\";\r\n echo \"top: \" . $this->_top . \"px;\\n\";\r\n echo \"left:\" . $this->_left . \"px;\\n\";\r\n }\r\n\r\n echo $this->_readCSSSize();\r\n\r\n // fix borders, spacings and margins\r\n echo \"box-sizing: border-box;\\n\";\r\n echo \"margin: 0;\\n\";\r\n echo \"padding: 0;\\n\";\r\n\r\n if($this->_hidden)\r\n {\r\n echo \"visibility: hidden;\\n\";\r\n }\r\n\r\n // dump style\r\n if($this->Style == \"\")\r\n {\r\n if($this->Color != \"\")\r\n echo \"background-color:$this->Color;\\n\";\r\n if($this->Background != \"\")\r\n echo \"background:$this->Background;\\n\";\r\n\r\n if($this->BackgroundRepeat != \"\")\r\n echo \"background-repeat: $this->BackgroundRepeat;\\n\";\r\n if($this->BackgroundPosition != \"\")\r\n echo \"background-position: {$this->parseBackgroundPosition()};\\n\";\r\n\r\n if ($this->_cursor != \"\")\r\n {\r\n echo $this->parseCSSCursor();\r\n }\r\n\r\n // only design font visualization\r\n if(($this->ControlState & csDesigning) == csDesigning)\r\n {\r\n echo $this->Font->FontString;\r\n }\r\n\r\n parent::dumpCSS();\r\n }\r\n }", "public function form()\n {\n $this->switch('footer_remove', Support::trans('main.footer_remove'))\n ->default(admin_setting('footer_remove'));\n $defaultColors = [\n 'default' => '墨蓝',\n 'blue' => '蓝',\n 'blue-light' => '亮蓝',\n 'green' => '墨绿',\n ];\n foreach (explode(\",\", ServiceProvider::setting('additional_theme_colors')) as $value) {\n if (!empty($value)) {\n [$k, $v] = explode(\":\", $value);\n $defaultColors[$k] = $v;\n }\n }\n\n $this->radio('theme_color', Support::trans('main.theme_color'))\n ->options($defaultColors)\n ->default(admin_setting('theme_color'));\n $this->radio('sidebar_style', Support::trans('main.sidebar_style'))\n ->options([\n 'default' => '默认',\n 'sidebar-separate' => '菜单分离',\n 'horizontal_menu' => '水平菜单'\n ])\n ->default(admin_setting('sidebar_style'));\n $this->switch('grid_row_actions_right', Support::trans('main.grid_row_actions_right'))\n ->help('启用后表格行操作按钮将永远贴着最右侧。')\n ->default(admin_setting('grid_row_actions_right'));\n }", "function print_custom($value){\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title.'<br/><br/><br/>';\n\t\t\n\t\t$field_ids=array();\n\t\t$field_names=array();\n\t\t$is_textarea=array();\n\t\t\n\t\tforeach($value['fields'] as $field){\n\t\t\techo '<div class=\"custom-option\"><span class=\"custom-heading\">'.$field['name'].'</span>';\n\t\t\tswitch($field['type']){\n\t\t\t\tcase 'text':\n\t\t\t\t\t//print a standart text field\n\t\t\t\t\techo '<input type=\"text\" id=\"'.$field['id'].'\" name=\"'.$field['id'].'\"/>';\n\t\t\t\t\t$is_textarea[]=\"false\";\n\t\t\t\tbreak;\n\t\t\t\tcase 'upload':\n\t\t\t\t\t//print a field with an upload button\n\t\t\t\t\techo '<input class=\"option-input upload\" name=\"'.$field['id'].'\" id=\"'.$field['id'].'\" type=\"text\" />';\n\t\t\t\t\techo '<div id=\"'.$field['id'].'_button\" class=\"upload-button upload-logo\" ><a class=\"hana-button alignright\"><span>Upload</span></a></div><br/>';\n\t\t\t\t\techo '<script type=\"text/javascript\">jQuery(document).ready(function($){\n\t\t\t\t\t\t\t\thanaOptions.loadUploader(jQuery(\"div#'.$field['id'].'_button\"));\n\t\t\t\t\t\t});</script>';\n\t\t\t\t\t$preview=$field['id'];\n\t\t\t\t\t$is_textarea[]=\"false\";\n\t\t\t\tbreak;\n\t\t\t\tcase 'textarea':\n\t\t\t\t\t//print a textarea\n\t\t\t\t\techo '<textarea id=\"'.$field['id'].'\" name=\"'.$field['id'].'\"></textarea>';\n\t\t\t\t\t$is_textarea[]=\"true\";\n\t\t\t\tbreak;\n\t\t\t\tcase 'imageselect':\n\t\t\t\t\t//print a textarea\n\t\t\t\t\techo '<div class=\"styles-holder images-select-holder\" id=\"'.$field['id'].'_container\">';\n\t\t\t\t\techo '<input name=\"'.$field['id'].'\" id=\"'.$field['id'].'\" type=\"hidden\" /><ul>';\n\t\t\t\t\n\t\t\t\t\t$counter=0;\n\t\t\t\t\tforeach ($field['options'] as $key=>$option) {\n\t\t\t\t\t\t//$style='background-image:url('.$option.');';\n\t\t\t\t\t\techo '<li><a class=\"style-box\" title=\"'.$option.'\" href=\"\"><img src=\"'.$option.'\" /></a>'.$key.'</li>';\n\t\t\t\t\t} \n\t\t\t\t\techo '</ul></div>';\n\t\t\t\t\t$is_textarea[]=\"false\";\n\t\t\t\t\tbreak;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$saved_value=$this->get_field_value( $field['id'].'s');\n\t\t\t\n\t\t\t\n\t\t\t$saved_value=stripslashes($saved_value);\n\t\t\t//echo '<input type=\"hidden\" name=\"'.$field['id'].'s\" id=\"'.$field['id'].'s\" value=\"'.$saved_value.'\" /></div>';\n\t\t\techo '<textarea style=\"display:none;\" name=\"'.$field['id'].'s\" id=\"'.$field['id'].'s\">'.$saved_value.'</textarea></div>';\n\t\t\t$field_ids[]=$field['id'];\n\t\t\t$field_names[]=$field['name'];\n\t\t}\n\t\t\n\t\t//print the add button\n\t\techo '<a class=\"hana-button custom-option-button\" id=\"'.$value['id'].'_button\"><span>'.$value['button_text'].'</span></a>';\n\t\t\n\t\t//print the list that will contain the added items\n\t\techo '<ul id=\"'.$value['id'].'_list\" class=\"sortable\"></ul>';\n\t\t\n\t\t$idsString=implode('\",\"', $field_ids);\n\t\t$namesString=implode('\",\"', $field_names);\n\t\t$textareaString=implode(',', $is_textarea);\n\t\t\n\t\t//call the script that enables the functionality for adding custom fields\n\t\techo '<script type=\"text/javascript\">\n\t\t\tjQuery(document).ready(function($){\n\t\t\t\thanaOptions.setCustomFieldsFunc(\"'.$value['id'].'\", [\"'.$idsString.'\"], [\"'.$namesString.'\"], ['.$textareaString.'] , \"'.((isset($value['preview']))?$value['preview']:'').'\", \"'.HANA_TIMTHUMB_URL.'\");\n\t\t\t});\n\t\t</script>';\n\t\t\n\t\t$this->close_option($value);\n\t}", "public static function output_global_styles()\n {\n }", "function cbstdsys_render_form() {\n\t?>\n\t<div class=\"wrap\">\n\n\t\t<!-- Display Plugin Icon, Header, and Description -->\n\t\t<div class=\"icon32\" id=\"icon-options-general\"><br></div>\n\t\t<h2><span style=\"font-family:Consolas,Monaco,Courier,monospace\">cb-std-sys</span>-<?php _e('Settings'); ?>, Version <?php echo CB_STD_SYS_VERSION; ?></h2>\n\n\t\t<!-- Beginning of the Plugin Options Form -->\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields('cbstdsys_plugin_options'); ?>\n\n<!--\n <fieldset>\n <legend><?php _e('Content','cb-std-sys'); ?></legend>\n\n \t\t\t<table class=\"form-table\">\n-->\n<?php render_form_fields( get_cbstdsys_options(), 'cbstdsys', 'cbstdsys_options' ); ?>\n<!--\n </table>\n\n </fieldset>\n-->\n\t\t\t<p class=\"submit\">\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\t\t\t</p>\n\n\t\t</form>\n\n\t</div>\n\t<?php\n}", "public function print_meta_box($post) {\n\t\twp_nonce_field(basename(__FILE__), $this->nonce);\n\t\t?>\n\t\t<p>\n\t\t\t<?php _e(\"Here you can select an additional CSS file or define additional CSS styles which should be loaded for this post or page.<br/><b>In order to show up here, the CSS files have to be located in the \\\"/css\\\" sub-folder of your theme.</b>\", 'im8-additional-css'); ?>\n\t\t</p>\n\t\t<table class=\"form-table\">\n\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t<label for=\"im8_additional_css_file\">\n\t\t\t\t\t\t\t<?php _e(\"Additional CSS file\", 'im8-additional-css'); ?>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<select id=\"im8_additional_css_file\" name=\"im8_additional_css_file\">\n\t\t\t\t\t\t\t<option value=\"-1\">\n\t\t\t\t\t\t\t\t<?php _e(\"None\", 'im8-additional-css'); ?>\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tif (file_exists($path = get_stylesheet_directory().'/css/')) {\n\t\t\t\t\t\t\t\t$additional_css_file = get_post_meta($post->ID, 'im8_additional_css_file', true);\n\t\t\t\t\t\t\t\tforeach (glob($path.'*.css') as $file) {\n\t\t\t\t\t\t\t\t\t$file = substr($file, strlen($path));\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<option value=\"<?php echo $file; ?>\" <?php selected($file, $additional_css_file); ?>>\n\t\t\t\t\t\t\t\t\t\t<?php echo $file; ?>\n\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t<label for=\"im8_additional_css\">\n\t\t\t\t\t\t\t<?php _e(\"Additional CSS styles\", 'im8-additional-css'); ?>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<textarea id=\"im8_additional_css\" name=\"im8_additional_css\" class=\"widefat\" rows=\"10\"><?php echo get_post_meta($post->ID, 'im8_additional_css', true); ?></textarea>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</tbody>\n\t\t</table>\n\t\t<?php\n\t\t$this->unload_textdomain();\n\t}", "static public function remove_gform_styles()\n {\n wp_dequeue_style( 'gforms_reset_css' );\n // wp_dequeue_style( 'gforms_datepicker_css' );\n wp_dequeue_style( 'gforms_formsmain_css' );\n wp_dequeue_style( 'gforms_ready_class_css' );\n wp_dequeue_style( 'gforms_browsers_css' );\n }", "public function print_widget_form( $options )\n\t{\n\t\t$options = $this->merge_options( $options );\n\t\textract( $options );\n\t\t?>\n\t\t\n\t\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id( 'title' ); ?>\"><?php _e( 'Title:' ); ?></label> \n\t\t<input id=\"<?php echo $this->get_field_id( 'title' ); ?>\" name=\"<?php echo $this->get_field_name( 'title' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\" class=\"widefat\">\n\t\t</p>\n\n\t\t<p>\n\t\t<label for=\"<?php echo $this->get_field_id( 'placeholder' ); ?>\"><?php _e( 'Placeholder:' ); ?></label> \n\t\t<input id=\"<?php echo $this->get_field_id( 'placeholder' ); ?>\" name=\"<?php echo $this->get_field_name( 'placeholder' ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $placeholder ); ?>\" class=\"widefat\">\n\t\t</p>\n\t\t\n\t\t<?php\n\t}", "function admin_print_styles() {\n global $SlideDeckPlugin;\n\n wp_enqueue_style( \"{$this->namespace}-admin\" );\n\n if( $SlideDeckPlugin->is_plugin() ) {\n wp_enqueue_style( 'codemirror' );\n wp_enqueue_style( 'codemirror-theme-default' );\n wp_enqueue_style( 'jquery-minicolors' );\n }\n }", "public function form_css(){\n\t\twp_register_style( 'lead_gen_plugin', plugin_dir_url( __FILE__ ) . 'css/style.css', false );\n\t\twp_enqueue_style( 'lead_gen_plugin' );\n\t}", "public function cs_generate_form() {\n global $post;\n }", "protected function _drawStyle($style) {}", "function gdl_print_style( $selector, $content ){\n\t\tgdl_write_data( $selector . '{ ' . $content . '} ');\n\t}", "public function print_theme_inline_styles(){\n\n $inline_styles_4_script = array(\n // 'theme_main_style' => THEME_URL.$this->main_style,\n );\n\n foreach ($inline_styles_4_script as $name => $url) {\n print_inline_style($url, $name);\n }\n }", "public function fusion_dynamic_css_head() {\n\n\t\t$css = '';\n\n\t\t// Append the user-entered dynamic CSS.\n\t\t$option = get_option( Avada::get_option_name(), [] );\n\t\tif ( isset( $option['custom_css'] ) && ! empty( $option['custom_css'] ) ) {\n\t\t\t$css = wp_strip_all_tags( $option['custom_css'] );\n\t\t}\n\n\t\techo '<style type=\"text/css\" id=\"fusion-builder-custom-css\">' . $css . '</style>'; // phpcs:ignore WordPress.Security.EscapeOutput\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function renderConfigForm() {\n\t}", "function _name_field_instance_settings_pre_render($form) {\n\n $form['instance_properties'] = array(\n '#prefix' => '<table>',\n '#suffix' => '</table>',\n '#weight' => 1,\n 'thead' => array(\n '#prefix' => '<thead><tr><th>' . t('Field') . '</th>',\n '#suffix' => '</tr></thead>',\n '#weight' => 0,\n ),\n 'tbody' => array(\n '#prefix' => '<tbody>',\n '#suffix' => '</tbody>',\n '#weight' => 1,\n 'title_display' => array(\n '#prefix' => '<tr><td><strong>' . t('Title display') . ' <sup>1</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 1,\n ),\n 'size' => array(\n '#prefix' => '<tr><td><strong>' . t('HTML size') . ' <sup>2</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 2,\n ),\n 'inline_css_enabled' => array(\n '#prefix' => '<tr><td><strong>' . t('Inline style') . ' <sup>3</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 3,\n ),\n ),\n 'tfoot' => array(\n '#value' => '<tfoot><tr><td colspan=\"6\"><ol>'\n . '<li>'. t('The title display controls how the label of the name component is displayed in the form. \"%above\" is the standard title; \"%below\" is the standard description; \"%hidden\" removes the label.',\n array('%above' => t('above'), '%below' => t('below'), '%hidden' => t('hidden'))) . '</li>'\n . '<li>'. t('The HTML size property tells the browser what the width of the field should be when it is rendered. This gets overriden by the themes CSS properties. This must be between 1 and 255.') . '</li>'\n . '<li>'. t('The inline style property tells the browser what the width of the field <strong>really</strong> should be when it is rendered. This is dynamically calculated from the HTML size property.') . '</li>'\n . '</ol></td></tr></tfoot>' ,\n '#weight' => 2,\n ),\n 'extra_fields' => array(\n '#weight' => 3,\n ),\n );\n\n $i = 0;\n foreach (_name_translations() as $key => $title) {\n // Adds the table header for the particullar field.\n $form['instance_properties']['thead'][$key]['#value'] = '<th>' . $title . '</th>';\n $form['instance_properties']['thead'][$key]['#weight'] = ++$i;\n\n // Strip the title & description.\n unset($form['size'][$key]['#description']);\n unset($form['size'][$key]['#title']);\n $form['size'][$key]['#size'] = 5;\n\n unset($form['title_display'][$key]['#description']);\n unset($form['title_display'][$key]['#title']);\n\n unset($form['inline_css_enabled'][$key]['#description']);\n unset($form['inline_css_enabled'][$key]['#title']);\n\n // Moves the size element into the table.\n $form['instance_properties']['tbody']['size'][$key] = $form['size'][$key];\n $form['instance_properties']['tbody']['size'][$key]['#prefix'] = '<td>';\n $form['instance_properties']['tbody']['size'][$key]['#suffix'] = '</td>';\n $form['instance_properties']['tbody']['size'][$key]['#weight'] = $i;\n\n $form['instance_properties']['tbody']['title_display'][$key] = $form['title_display'][$key];\n $form['instance_properties']['tbody']['title_display'][$key]['#prefix'] = '<td>';\n $form['instance_properties']['tbody']['title_display'][$key]['#suffix'] = '</td>';\n $form['instance_properties']['tbody']['title_display'][$key]['#weight'] = $i;\n\n $form['instance_properties']['tbody']['inline_css_enabled'][$key] = $form['inline_css_enabled'][$key];\n $form['instance_properties']['tbody']['inline_css_enabled'][$key]['#prefix'] = '<td>';\n $form['instance_properties']['tbody']['inline_css_enabled'][$key]['#suffix'] = '</td>';\n $form['instance_properties']['tbody']['inline_css_enabled'][$key]['#weight'] = $i;\n\n // Clean up the leftovers.\n unset($form['size'][$key]);\n $form['size']['#access'] = FALSE;\n\n unset($form['title_display'][$key]);\n $form['title_display']['#access'] = FALSE;\n\n unset($form['inline_css_enabled'][$key]);\n $form['inline_css_enabled']['#access'] = FALSE;\n\n }\n\n // Move the additional options under the table.\n $form['extra_fields'] = array(\n '#weight' => 2,\n );\n $form['inline_css']['#weight'] = 0;\n $form['title_field']['#weight'] = 1;\n $form['generational_field']['#weight'] = 2;\n $form['extra_fields']['inline_css'] = $form['inline_css'];\n $form['extra_fields']['title_field'] = $form['title_field'];\n $form['extra_fields']['generational_field'] = $form['generational_field'];\n unset($form['title_field']);\n unset($form['inline_css']);\n unset($form['generational_field']);\n\n return $form;\n}", "abstract public function register_style();", "function box_build_attributes($properties, $i, $showtrunc = true, $showfont = true, $showborder = true, $showfill = true, $pre = '', $title = '') {\n global $kFonts, $kFontSizes, $kFontAlign, $kFontColors, $kLineSizes;\n $fields = array('font', 'size', 'align', 'color', 'bordershow', 'bordersize', 'bordercolor', 'fillshow', 'fillcolor');\n\tforeach ($fields as $value) {\n $temp = $pre . $value;\n\t $$value = $properties->$temp;\n\t}\n $output = NULL;\n $output .= '<table class=\"ui-widget\" style=\"border-collapse:collapse;margin-left:auto;margin-right:auto;\">' . nl;\n $output .= ' <thead class=\"ui-widget-header\">' . nl;\n $output .= ' <tr><th colspan=\"5\">' . ($title ? $title : TEXT_ATTRIBUTES) . '</th></tr>' . nl;\n $output .= ' </thead>' . nl;\n $output .= ' <tbody class=\"ui-widget-content\">' . nl;\n if ($showtrunc) {\n $output .= ' <tr>' . nl;\n $output .= ' <td colspan=\"2\">' . TEXT_TRUNCATE . html_radio_field($pre.'box_trun_' . $i, '0', (!$properties->truncate) ? true : false) . TEXT_NO . html_radio_field($pre.'box_trun_' . $i, '1', ($properties->truncate) ? true : false) . TEXT_YES . '</td>' . nl;\n $output .= ' <td colspan=\"3\">' . TEXT_DISPLAY_ON . html_radio_field($pre.'box_last_' . $i, '0', (!$properties->display || $properties->display == '0') ? true : false) . TEXT_ALL_PAGES . html_radio_field($pre.'box_last_' . $i, '1', ($properties->display == '1') ? true : false) . TEXT_FIRST_PAGE . html_radio_field($pre.'box_last_' . $i, '2', ($properties->display == '2') ? true : false) . TEXT_LAST_PAGE . '</td>' . nl;\n $output .= ' </tr>' . nl;\n }\n if ($showfont) {\n $output .= ' <tr class=\"ui-widget-header\">' . nl;\n $output .= ' <th>' . '&nbsp;' . '</th>' . nl;\n $output .= ' <th>' . TEXT_STYLE . '</th>' . nl;\n $output .= ' <th>' . TEXT_SIZE . '</th>' . nl;\n $output .= ' <th>' . TEXT_ALIGN . '</th>' . nl;\n $output .= ' <th>' . TEXT_COLOR . '</th>' . nl;\n $output .= ' </tr>' . nl;\n $output .= ' <tr>' . nl;\n $output .= ' <td>' . TEXT_FONT .'</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_fnt_' . $i, $kFonts, $font) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_size_'. $i, $kFontSizes, $size) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_aln_' . $i, $kFontAlign, $align) . '</td>' . nl;\n $output .= ' <td id=\"' . $pre.'box_td_' . $i . '\" style=\"background-color:#' . convertPfColor($color) . '\">' . nl;\n $output .= ' <div id=\"' . $pre.'box_whl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'box_td_' . $i . '\\', \\''.$pre.'box_clr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'sel_clr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_clr_' . $i, $color ? $color : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_clr_' . $i, $kFontColors, $color ? $color : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_clr_' . $i . '\\', \\''.$pre.'box_td_' . $i . '\\', \\''.$pre.'box_clr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'sel_clr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= ' </tr>' . nl;\n }\n if ($showborder) {\n $output .= ' <tr>' . nl;\n $output .= ' <td>' . TEXT_BORDER_AREA . '</td>' . nl;\n $output .= ' <td>' . html_checkbox_field($pre.'box_bdr_' . $i, '1', ($bordershow) ? true : false) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_bsz_' . $i, $kLineSizes, $bordersize) . TEXT_POINTS . '</td>' . nl;\n $output .= ' <td>' . '&nbsp;' . '</td>' . nl;\n $output .= ' <td id=\"'.$pre.'box_btd_' . $i . '\" style=\"background-color:#' . convertPfColor($bordercolor) . '\">' . nl;\n $output .= ' <div id=\"'.$pre.'box_bwhl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'box_btd_' . $i . '\\', \\''.$pre.'box_bclr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'sel_bclr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_bclr_' . $i, $bordercolor ? $bordercolor : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_bclr_' . $i, $kFontColors, $bordercolor ? $bordercolor : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_bclr_' . $i . '\\', \\''.$pre.'box_btd_' . $i . '\\', \\''.$pre.'box_bclr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'sel_bclr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= '</tr>' . nl;\n }\n if ($showfill) {\n $output .= '<tr>' . nl;\n $output .= ' <td>'. TEXT_FILL_AREA . '</td>' . nl;\n $output .= ' <td>'. html_checkbox_field($pre.'box_fill_' . $i, '1', ($fillshow) ? true : false) . '</td>' . nl;\n $output .= ' <td>'. '&nbsp;' . '</td>' . nl;\n $output .= ' <td>'. '&nbsp;' . '</td>' . nl;\n $output .= ' <td id=\"'.$pre.'box_ftd_' . $i .'\" style=\"background-color:#' . convertPfColor($fillcolor) .'\">' . nl;\n $output .= ' <div id=\"'.$pre.'box_fwhl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'box_ftd_' . $i . '\\', \\''.$pre.'box_fclr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'sel_fclr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_fclr_' . $i, $fillcolor ? $fillcolor : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_fclr_' . $i, $kFontColors, $fillcolor ? $fillcolor : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_fclr_' . $i . '\\', \\''.$pre.'box_ftd_' . $i . '\\', \\''.$pre.'box_fclr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'sel_fclr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= '</tr>' . nl;\n }\n $output .= '</tbody></table>' . nl;\n return $output;\n}", "protected function buildFormStyle(array &$form, FormStateInterface $form_state, $type) {\n $style_form = &$form['displays'][$type]['options']['style'];\n $style = $style_form['style_plugin']['#default_value'];\n $style_plugin = Views::pluginManager('style')->createInstance($style);\n if (isset($style_plugin) && $style_plugin->usesRowPlugin()) {\n $options = $this->rowStyleOptions();\n $style_form['row_plugin'] = [\n '#type' => 'select',\n '#title' => $this->t('of'),\n '#options' => $options,\n '#access' => count($options) > 1,\n ];\n // For the block display, the default value should be \"titles (linked)\",\n // if it's available (since that's the most common use case).\n $block_with_linked_titles_available = ($type == 'block' && isset($options['titles_linked']));\n $default_value = $block_with_linked_titles_available ? 'titles_linked' : key($options);\n $style_form['row_plugin']['#default_value'] = static::getSelected($form_state, [$type, 'style', 'row_plugin'], $default_value, $style_form['row_plugin']);\n // Changing this dropdown updates the individual row options via AJAX.\n views_ui_add_ajax_trigger($style_form, 'row_plugin', ['displays', $type, 'options', 'style', 'row_options']);\n\n // This is the region that can be updated by AJAX. The base class doesn't\n // add anything here, but child classes can.\n $style_form['row_options'] = [\n '#theme_wrappers' => ['container'],\n ];\n }\n elseif ($style_plugin->usesFields()) {\n $style_form['row_plugin'] = ['#markup' => '<span>' . $this->t('of fields') . '</span>'];\n }\n }", "protected function customizeForm($form, $charges)\n {\n }", "protected function generateCSS() {}", "function ywccp_add_custom_style() {\r\n\r\n\t\t$css = \"\";\r\n\r\n\t\t// checkout columns\r\n\t\t$one_columns = get_option( 'ywccp-field-checkout-columns' ) == 'yes';\r\n\t\tif( $one_columns ) {\r\n\t\t\t$css .= \"#customer_details .col-1, #customer_details .col-2 { float: none; width:100%; margin-bottom: 10px; }\r\n\t\t#customer_details .col-1:after, #customer_details .col-2:after { content: ''; display: table; clear: both; }\";\r\n\t\t}\r\n\r\n\t\t$input_height\t\t = get_option( 'ywccp-field-input-height' );\r\n\t\t$color_border = get_option( 'ywccp-field-border-color' );\r\n\t\t$focus_color_border = get_option( 'ywccp-field-border-color-focus' );\r\n\t\t$success_color_border = get_option( 'ywccp-field-border-color-success' );\r\n\t\t$invalid_color_border = get_option( 'ywccp-field-border-color-error' );\r\n\t\t$invalid_color_message = get_option( 'ywccp-field-error-color' );\r\n\r\n\t\t$css .= \"\r\n\t.woocommerce form .form-row input.input-text,\r\n\t.woocommerce form .form-row .select2-container .select2-choice,\r\n\t.woocommerce form .form-row select { height: {$input_height}px; }\r\n\t.woocommerce form .form-row .select2-container .select2-choice,\r\n\t.woocommerce form .form-row input.input-text ,\r\n\t.woocommerce form .form-row select,\r\n\t.woocommerce form .form-row textarea { border-color: {$color_border}; }\r\n\t.woocommerce form .form-row .select2-container .select2-choice,\r\n\t.woocommerce form .form-row input.input-text :focus,\r\n\t.woocommerce form .form-row select:focus, \r\n\t.woocommerce form .form-row textarea:focus { border-color: {$focus_color_border}; }\r\n\t.woocommerce form .form-row.woocommerce-validated .select2-container .select2-choice, \r\n\t.woocommerce form .form-row.woocommerce-validated input.input-text , \r\n\t.woocommerce form .form-row.woocommerce-validated select,\r\n\t.woocommerce form .form-row.woocommerce-validated textarea { border-color: {$success_color_border}; }\r\n\t.woocommerce form .form-row.woocommerce-invalid .select2-container .select2-choice, \r\n\t.woocommerce form .form-row.woocommerce-invalid input.input-text , \r\n\t.woocommerce form .form-row.woocommerce-invalid select,\r\n\t.woocommerce form .form-row.woocommerce-invalid textarea { border-color: {$invalid_color_border}; }\r\n\t.woocommerce form .form-row.woocommerce-invalid label,\r\n\t.woocommerce form .form-row.woocommerce-invalid .ywccp_error { color: {$invalid_color_message}; }\";\r\n\r\n\t\treturn apply_filters( 'ywccp_custom_style_frontend', $css );\r\n\t}", "function theme(&$form) {\n\n\t\t$retval = \"\";\n\n\t\t$retval .= \"<table >\";\n\n\t\t$retval .= $this->theme_children($form);\n\n\t\t$retval .= \"</table>\";\n\n\t\treturn($retval);\n\n\t}", "public static function printForm(array $z)\n {\n\n $formTitle = $z['form_title'] ?? \"No title\";\n $formText = $z['form_text'] ?? \"\";\n $formTextClass = $z['form_text_class'] ?? \"\";\n $fields = $z['form_fields'] ?? [];\n $btnText = $z['submit_btn_text'] ?? \"Submit\";\n $btnClass = $z['submit_btn_class'] ?? \"btn btn-primary btn-block btn-lg\";\n\n\n ?>\n <?php if ($formTitle): ?>\n <h3><?php echo $formTitle; ?></h3>\n <?php endif; ?>\n\n <?php if ($formText): ?>\n <p class=\"<?php echo htmlspecialchars($formTextClass); ?>\"><?php echo $formText; ?></p>\n <?php endif; ?>\n <form>\n <?php foreach ($fields as $field):\n $iconWrapperClass = $field['icon_wrapper_class'] ?? \"\";\n $class = $field['class'] ?? \"\";\n $icon = $field['icon'] ?? \"\";\n $type = $field['type'];\n ?>\n <div class=\"input-group input-group-lg mb-3\">\n <?php if ($icon): ?>\n <div class=\"input-group-prepend\">\n <span class=\"input-group-text <?php echo htmlspecialchars($iconWrapperClass); ?>\">\n <i class=\"<?php echo htmlspecialchars($icon); ?>\"></i>\n </span>\n </div>\n <?php endif; ?>\n\n <?php switch ($type):\n case 'text':\n case 'email':\n ?>\n <input\n type=\"<?php echo $type; ?>\"\n class=\"form-control <?php echo htmlspecialchars($class); ?>\"\n name=\"<?php echo htmlspecialchars($field['name']); ?>\"\n placeholder=\"<?php echo htmlspecialchars($field['label']); ?>\"\n >\n <?php break;\n case 'textarea':\n $rows = $field['rows'] ?? null;\n ?>\n <textarea class=\"form-control <?php echo htmlspecialchars($class); ?>\"\n placeholder=\"<?php echo htmlspecialchars($field['label']); ?>\"\n <?php if ($rows): ?>\n rows=\"<?php echo htmlspecialchars($rows); ?>\"\n <?php endif; ?>\n name=\"<?php echo htmlspecialchars($field['name']); ?>\"\n ></textarea>\n <?php break; ?>\n <?php default: ?>\n <?php break; ?>\n <?php endswitch; ?>\n\n\n </div>\n <?php endforeach; ?>\n\n\n <input type=\"submit\" value=\"<?php echo htmlspecialchars($btnText); ?>\"\n class=\"<?php echo htmlspecialchars($btnClass); ?>\">\n </form>\n\n <?php\n }", "public function displayForm() {\n\t\t$output = $this->getOutput();\n\n\t\t$form_class = $this->adapter->getFormClass();\n\t\t// TODO: use interface. static ctor.\n\t\tif ( $form_class && class_exists( $form_class ) ){\n\t\t\t$form_obj = new $form_class();\n\t\t\t$form_obj->setGateway( $this->adapter );\n\t\t\t$form_obj->setGatewayPage( $this );\n\t\t\t$form = $form_obj->getForm();\n\t\t\t$output->addModules( $form_obj->getResources() );\n\t\t\t$output->addModuleStyles( $form_obj->getStyleModules() );\n\t\t\t$output->addHTML( $form );\n\t\t} else {\n\t\t\t$this->logger->error( \"Displaying fail page for bad form class '$form_class'\" );\n\t\t\t$this->displayFailPage( false );\n\t\t}\n\t}", "public function baseCssAction()\n {\n $defaultStylesForm = $this->createForm(new DefaultStylesFormType());\n $controlStatesForm = $this->createForm(new ControlStatesFormType());\n $supportedFormControls = $this->createForm(new SupportedFormControlsType());\n $extendingControlsForm = $this->createForm(\n new ExtendingControlsFormType()\n );\n $horizontalForm = $this->createForm(new HorizontalFormType());\n $inlineForm = $this->createForm(new InlineFormType());\n $searchForm = $this->createForm(new SearchFormType());\n\n return $this->render(\n 'BraincraftedBootstrapDemoBundle:Bootstrap:baseCss.html.twig',\n array(\n 'defaultStylesForm' => $defaultStylesForm->createView(),\n 'controlStatesForm' => $controlStatesForm->createView(),\n 'supportedFormControls' => $supportedFormControls->createView(),\n 'extendingControlsForm' => $extendingControlsForm->createView(),\n 'horizontalForm' => $horizontalForm->createView(),\n 'inlineForm' => $inlineForm->createView(),\n 'searchForm' => $searchForm->createView()\n )\n );\n }", "public function getCSS()\n {\n ob_start();\n ?>\n div.webFormHelpBox {\n position: absolute;\n left: 320px;\n top: 330px;\n width: 200px;\n font-family: Arial, Verdana, sans-serif;\n font-size: 8pt;\n line-height: 8pt;\n font-weight: normal;\n background-color: #f7f7f7;\n border: 1px solid #cccccc;\n padding: 8px;\n visibility: hidden;\n }\n div.webFormErrorBox {\n position: absolute;\n left: 320px;\n top: 330px;\n width: 200px;\n font-family: Arial, Verdana, sans-serif;\n font-size: 8pt;\n line-height: 8pt;\n font-weight: normal;\n background-color: #fddbdb;\n border: 1px solid #9a1515;\n padding: 8px;\n visibility: hidden;\n color: #000000;\n }\n td.wfErrorText {\n font-family: Arial, Verdana, sans-serif;\n font-size: 12px;\n font-weight: normal;\n color: #000000;\n line-height: 14px;\n }\n div.webFormCaption {\n font-size: 8pt;\n color: #888888;\n line-height: 10pt;\n font-family: Arial, Verdana, sans-serif;\n text-align: left;\n width: 150px;\n padding: 2px;\n display: none;\n }\n span.webFormVerifyText {\n font-family: Arial, Verdana, sans-serif;\n font-size: 9pt;\n font-weight: normal;\n }\n input.webFormSaveButton {\n font-family: Arial, Verdana, sans-serif;\n font-size: 7pt;\n font-weight: bold;\n }\n div.webFormVerifyFieldContainer {\n padding: 1px;\n background-color: #f0f0f0;\n border: 1px solid #c0c0c0;\n }\n div.webFormVerifyFieldContainerBox {\n padding: 1px;\n background-color: #f0f0f0;\n border: 1px solid #c0c0c0;\n /*height: 63px;*/\n }\n a.webFormVerifyFieldLink {\n font-family: Arial, Verdana, sans-serif;\n font-size: 10pt;\n font-weight: normal;\n text-decoration: none;\n color: #000000;\n }\n input:hover {\n background-color: #f2f2f2;\n }\n textarea:hover {\n background-color: #f2f2f2;\n }\n\n /* Elements <input>-type items */\n <?php if ($this->_verifyForm) { ?>\n .webFormElementText {\n padding: 3px 0px 2px 18px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementTextBox {\n padding: 0px 0px 0px 0px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementSelect {\n\n }\n <?php } else { ?>\n .webFormElementText {\n padding: 3px 0px 2px 3px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementTextBox {\n padding: 0px 0px 0px 0px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementSelect {\n\n }\n <?php } ?>\n\n <?php\n $css = ob_get_contents();\n ob_end_clean();\n\n return $css;\n }", "function modStyle(){\n if(isset($_POST['style']))\n $_SESSION['style'] = $_POST['style'];\n }", "function output_styles () {\n\t\n\tforeach ($_GET as $key => $value) { \n\t\t$segment \t= explode(\"-\", $key, 2);\n\t\t$selector \t= $segment[0];\n\t\t$property \t= $segment[1];\n\t\t$value\t\t= $value;\n\t\t\n\t\tglobal $abbreviations;\n\n\t\t$selector = $abbreviations[$selector];\n\t\t$property = $abbreviations[$property];\n\n\t\t//DEBUGGING\n\t\t//echo \"<br />\\$selector: \" \t. $selector;\n\t\t//echo \"<br />\\$property: \" \t. $property;\n\t\t//echo \"<br />\\$value: \" \t\t. $value;\n\t\t//echo \"<br />\";\n\n\t\tbuild_styles($selector, $property, $value); //USES build_styles() FUNCTION\n\t}\n\n}", "private function _displayForm(){\n\t $moneda = Tools::getValue('moneda', $this->moneda);\n\t $iseuro = ($moneda == '978') ? ' selected=\"selected\" ' : '';\n\t $isdollar = ($moneda == '840') ? ' selected=\"selected\" ' : '';\n \t // Opciones para activar/desactivar SSL\n\t $ssl = Tools::getValue('ssl', $this->ssl);\n\t $ssl_si = ($ssl == 'si') ? ' checked=\"checked\" ' : '';\n\t $ssl_no = ($ssl == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para el comportamiento en error en el pago\n\t $error_pago = Tools::getValue('error_pago', $this->error_pago);\n\t $error_pago_si = ($error_pago == 'si') ? ' checked=\"checked\" ' : '';\n\t $error_pago_no = ($error_pago == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para activar los idiomas\n\t $idiomas_estado = Tools::getValue('idiomas_estado', $this->idiomas_estado);\n\t $idiomas_estado_si = ($idiomas_estado == 'si') ? ' checked=\"checked\" ' : '';\n\t $idiomas_estado_no = ($idiomas_estado == 'no') ? ' checked=\"checked\" ' : '';\n\t \n\t \n\t // Mostar formulario\n\t\t$this->_html .=\n\t\t'<form action=\"'.$_SERVER['REQUEST_URI'].'\" method=\"post\">\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/admin/contact.gif\" />'.$this->l('Configuraci&oacute;n del TPV').'</legend>\n\t\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t\t\t\t<tr><td colspan=\"2\">'.$this->l('Por favor completa la informaci&oacute;n requerida que te proporcionar&aacute; tu banco Servired.').'.<br /><br /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('URL de llamada del entorno').'</td><td><input type=\"text\" name=\"urltpv\" value=\"'.Tools::getValue('urltpv', $this->urltpv).'\" style=\"width: 330px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Clave secreta de encriptaci&oacute;n').'</td><td><input type=\"password\" name=\"clave\" value=\"'.Tools::getValue('clave', $this->clave).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Nombre del comercio').'</td><td><input type=\"text\" name=\"nombre\" value=\"'.htmlentities(Tools::getValue('nombre', $this->nombre), ENT_COMPAT, 'UTF-8').'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de comercio (FUC)').'</td><td><input type=\"text\" name=\"codigo\" value=\"'.Tools::getValue('codigo', $this->codigo).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de terminal').'</td><td><input type=\"text\" name=\"terminal\" value=\"'.Tools::getValue('terminal', $this->terminal).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de moneda').'</td><td>\n\t\t\t\t\t<select name=\"moneda\" style=\"width: 80px;\"><option value=\"\"></option><option value=\"978\"'.$iseuro.'>EURO</option><option value=\"840\"'.$isdollar.'>DOLLAR</option></select></td></tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de transacci&oacute;n').'</td><td><input type=\"text\" name=\"trans\" value=\"'.Tools::getValue('trans', $this->trans).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t\t<br>\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/t/9.gif\" />'.$this->l('Personalizaci&oacute;n').'</legend>\n\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t<tr>\n\t\t\t<td colspan=\"2\">'.$this->l('Por favor completa los datos adicionales.').'.<br /><br /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('SSL en URL de validaci&oacute;n').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_1\" value=\"si\" '.$ssl_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_0\" value=\"no\" '.$ssl_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('En caso de error, permitir elegir otro medio de pago').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_1\" value=\"si\" '.$error_pago_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_0\" value=\"no\" '.$error_pago_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('Activar los idiomas en el TPV').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_si\" value=\"si\" '.$idiomas_estado_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_no\" value=\"no\" '.$idiomas_estado_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t\t</fieldset>\t\n\t\t\t<br>\n\t\t<input class=\"button\" name=\"btnSubmit\" value=\"'.$this->l('Guardar configuraci&oacute;n').'\" type=\"submit\" />\n\t\t\t\t\t\n\t\t\t\n\t\t</form>';\n\t}", "public function displayForm() {\n\t\t$output = $this->getOutput();\n\n\t\t$form_class = $this->adapter->getFormClass();\n\t\t// TODO: use interface. static ctor.\n\t\tif ( $form_class && class_exists( $form_class ) ) {\n\t\t\t$form_obj = new $form_class();\n\t\t\t$form_obj->setGateway( $this->adapter );\n\t\t\t$form_obj->setGatewayPage( $this );\n\t\t\t$form = $form_obj->getForm();\n\t\t\t$output->addModules( $form_obj->getResources() );\n\t\t\t$output->addModuleStyles( $form_obj->getStyleModules() );\n\t\t\t$output->addHTML( $form );\n\t\t} else {\n\t\t\t$this->logger->error( \"Displaying fail page for bad form class '$form_class'\" );\n\t\t\t$this->displayFailPage( false );\n\t\t}\n\t}", "public function login_styles() {\n\n\t\t\t// @todo Check login.css exists in theme, if so load it!\n\t\t\tif ( is_string( $this->args['login_style'] ) ) {\n\t\t\t\tprintf( '<style type=\"text/css\">body.login div#login h1 a { %s }</style>', $this->args['login_style'] );\n\t\t\t} else {\n\t\t\t\t$defaults = array(\n\t\t\t\t\t'background-size' => '90px 90px',\n\t\t\t\t\t'height' => '90px',\n\t\t\t\t\t'width' => '320px',\n\t\t\t\t\t'padding-bottom' => '30px',\n\t\t\t\t);\n\n\t\t\t\t$login_style = wp_parse_args( $args['login_style'], $defaults );\n\n\t\t\t\tprintf(\n\t\t\t\t\t'<style type=\"text/css\">body.login div#login h1 a { %s; }</style>',\n\t\t\t\t\tWPS_Brand::implode( $login_style )\n\t\t\t\t);\n\t\t\t}\n\t\t}", "function select_specific_font_style_for_specific_fields_all_pages($font_style, $weight_type, $font_type){\n\tif( isset($_POST[$font_style]) ){\n\t\t$font_weight = $_POST[$weight_type];\n\t\t$font_type = $_POST[$font_type];\n\t\t$font_style = $_POST[$font_style];\n\n\t\tif( $font_style == 'headline'){\n\t\t\t$result = major_class::select_headlinefield_font_style_for_all_pages($font_weight, $font_type);\n\t\t}\n\n\t\tif( $font_style == 'title'){\n\t\t\t$result = major_class::select_title_font_style_for_all_pages($font_weight, $font_type);\n\t\t}\n\n\t\tif( $font_style == 'text' ){\n\t\t\t$result = major_class::select_textfield_font_style_for_all_pages($font_weight, $font_type);\n\t\t}\n\n\n\t}\n\n}", "function fluid_edge_contact_form7_text_styles_4() {\n\t\t$selector = array(\n\t\t\t'.cf7_custom_style_4 input.wpcf7-form-control.wpcf7-text',\n\t\t\t'.cf7_custom_style_4 input.wpcf7-form-control.wpcf7-number',\n\t\t\t'.cf7_custom_style_4 input.wpcf7-form-control.wpcf7-date',\n\t\t\t'.cf7_custom_style_4 textarea.wpcf7-form-control.wpcf7-textarea',\n\t\t\t'.cf7_custom_style_4 select.wpcf7-form-control.wpcf7-select',\n\t\t\t'.cf7_custom_style_4 input.wpcf7-form-control.wpcf7-quiz'\n\t\t);\n\t\t\n\t\t$styles = fluid_edge_get_typography_styles('cf7_style_4_text');\n\t\t\n\t\t$placeholder_color = fluid_edge_options()->getOptionValue('cf7_style_4_text_color');\n\t\tif(!empty($placeholder_color)) {\n\t\t\techo fluid_edge_dynamic_css(\n\t\t\t\tarray(\n\t\t\t\t\t'.cf7_custom_style_4 input.wpcf7-text::-webkit-input-placeholder',\n\t\t\t\t\t'.cf7_custom_style_4 textarea.wpcf7-textarea::-webkit-input-placeholder'\n\t\t\t\t),\n\t\t\t\tarray('color' => $placeholder_color)\n\t\t\t);\n\t\t}\n\t\t\n\t\t$background_color = fluid_edge_options()->getOptionValue('cf7_style_4_background_color');\n\t\t$background_opacity = 1;\n\t\tif($background_color !== ''){\n\t\t\tif(fluid_edge_options()->getOptionValue('cf7_style_4_background_transparency') !== ''){\n\t\t\t\t$background_opacity = fluid_edge_options()->getOptionValue('cf7_style_4_background_transparency');\n\t\t\t}\n\t\t\t$styles['background-color'] = fluid_edge_rgba_color($background_color,$background_opacity);\n\t\t}\n\t\t\n\t\t$border_color = fluid_edge_options()->getOptionValue('cf7_style_4_border_color');\n\t\t$border_opacity = 1;\n\t\tif($border_color !== ''){\n\t\t\tif(fluid_edge_options()->getOptionValue('cf7_style_4_border_transparency') !== ''){\n\t\t\t\t$border_opacity = fluid_edge_options()->getOptionValue('cf7_style_4_border_transparency');\n\t\t\t}\n\t\t\t$styles['border-color'] = fluid_edge_rgba_color($border_color,$border_opacity);\n\t\t}\n\t\t\n\t\t$border_width = fluid_edge_options()->getOptionValue('cf7_style_4_border_width');\n\t\tif($border_width !== ''){\n\t\t\t$styles['border-width'] = fluid_edge_filter_px($border_width) . 'px';\n\t\t}\n\t\t\n\t\t$border_radius = fluid_edge_options()->getOptionValue('cf7_style_4_border_radius');\n\t\tif($border_radius !== ''){\n\t\t\t$styles['border-radius'] = fluid_edge_filter_px($border_radius) . 'px';\n\t\t}\n\t\t\n\t\t$padding_top = fluid_edge_options()->getOptionValue('cf7_style_4_padding_top');\n\t\tif($padding_top !== ''){\n\t\t\t$styles['padding-top'] = fluid_edge_filter_px($padding_top) . 'px';\n\t\t}\n\t\t\n\t\t$padding_right = fluid_edge_options()->getOptionValue('cf7_style_4_padding_right');\n\t\tif($padding_right !== ''){\n\t\t\t$styles['padding-right'] = fluid_edge_filter_px($padding_right) . 'px';\n\t\t}\n\t\t\n\t\t$padding_bottom = fluid_edge_options()->getOptionValue('cf7_style_4_padding_bottom');\n\t\tif($padding_bottom !== ''){\n\t\t\t$styles['padding-bottom'] = fluid_edge_filter_px($padding_bottom) . 'px';\n\t\t}\n\t\t\n\t\t$padding_left = fluid_edge_options()->getOptionValue('cf7_style_4_padding_left');\n\t\tif($padding_left !== ''){\n\t\t\t$styles['padding-left'] = fluid_edge_filter_px($padding_left) . 'px';\n\t\t}\n\t\t\n\t\t$margin_top = fluid_edge_options()->getOptionValue('cf7_style_4_margin_top');\n\t\tif($margin_top !== ''){\n\t\t\t$styles['margin-top'] = fluid_edge_filter_px($margin_top) . 'px';\n\t\t}\n\t\t\n\t\t$margin_bottom = fluid_edge_options()->getOptionValue('cf7_style_4_margin_bottom');\n\t\tif($margin_bottom !== ''){\n\t\t\t$styles['margin-bottom'] = fluid_edge_filter_px($margin_bottom) . 'px';\n\t\t}\n\t\t\n\t\tif(fluid_edge_options()->getOptionValue('cf7_style_4_textarea_height')) {\n\t\t\t$textarea_height = fluid_edge_options()->getOptionValue('cf7_style_4_textarea_height');\n\t\t\techo fluid_edge_dynamic_css(\n\t\t\t\t'.cf7_custom_style_4 textarea.wpcf7-form-control.wpcf7-textarea',\n\t\t\t\tarray('height' => fluid_edge_filter_px($textarea_height).'px')\n\t\t\t);\n\t\t}\n\t\t\n\t\techo fluid_edge_dynamic_css($selector, $styles);\n\t}", "function register_custom_css( $fields ){\r\n\r\n return $fields;\r\n\r\n }", "function register_style() {\n}", "function zuhaus_mikado_design_styles() {\n\t $font_family = zuhaus_mikado_options()->getOptionValue( 'google_fonts' );\n\t if ( ! empty( $font_family ) && zuhaus_mikado_is_font_option_valid( $font_family ) ) {\n\t\t $font_family_selector = array(\n\t\t\t 'body'\n\t\t );\n\t\t echo zuhaus_mikado_dynamic_css( $font_family_selector, array( 'font-family' => zuhaus_mikado_get_font_option_val( $font_family ) ) );\n\t }\n\n\t\t$first_main_color = zuhaus_mikado_options()->getOptionValue('first_color');\n if(!empty($first_main_color)) {\n $color_selector = array(\n\t\t\t\t'a:hover',\n\t\t\t\t'h1 a:hover',\n\t\t\t\t'h2 a:hover',\n\t\t\t\t'h3 a:hover',\n\t\t\t\t'h5 a:hover',\n\t\t\t\t'h6 a:hover',\n\t\t\t\t'p a:hover',\n\t\t\t\t'.mkdf-comment-holder .mkdf-comment-text .comment-edit-link:hover',\n\t\t\t\t'.mkdf-comment-holder .mkdf-comment-text .comment-reply-link:hover',\n\t\t\t\t'.mkdf-comment-holder .mkdf-comment-text .replay:hover',\n\t\t\t\t'.mkdf-comment-holder .mkdf-comment-text #cancel-comment-reply-link',\n\t\t\t\t'.mkdf-cf7-newsletter .mkdf-cf7-submit-newsletter:hover',\n\t\t\t\t'footer .widget ul li a:hover',\n\t\t\t\t'footer .widget #wp-calendar tfoot a:hover',\n\t\t\t\t'footer .widget.widget_search .input-holder button:hover',\n\t\t\t\t'footer .widget.widget_tag_cloud a:hover',\n\t\t\t\t'.mkdf-side-menu .widget ul li a:hover',\n\t\t\t\t'.mkdf-side-menu .widget #wp-calendar tfoot a:hover',\n\t\t\t\t'.mkdf-side-menu .widget.widget_search .input-holder button:hover',\n\t\t\t\t'.mkdf-side-menu .widget.widget_tag_cloud a:hover',\n\t\t\t\t'.wpb_widgetised_column .widget.widget_tag_cloud a:hover',\n\t\t\t\t'aside.mkdf-sidebar .widget.widget_tag_cloud a:hover',\n\t\t\t\t'.widget.widget_mkdf_twitter_widget .mkdf-twitter-widget.mkdf-twitter-slider li .mkdf-tweet-text a',\n\t\t\t\t'.widget.widget_mkdf_twitter_widget .mkdf-twitter-widget.mkdf-twitter-slider li .mkdf-tweet-text span',\n\t\t\t\t'.widget.widget_mkdf_twitter_widget .mkdf-twitter-widget.mkdf-twitter-standard li .mkdf-tweet-text a:hover',\n\t\t\t\t'.widget.widget_mkdf_twitter_widget .mkdf-twitter-widget.mkdf-twitter-slider li .mkdf-twitter-icon i',\n\t\t\t\t'.mkdf-blog-holder article.sticky .mkdf-post-title a',\n\t\t\t\t'.mkdf-blog-holder article .mkdf-post-read-more-button a',\n\t\t\t\t'.mkdf-blog-holder article .mkdf-post-info-top>div a:hover',\n\t\t\t\t'.mkdf-author-description .mkdf-author-description-text-holder .mkdf-author-name a:hover',\n\t\t\t\t'.mkdf-author-description .mkdf-author-description-text-holder .mkdf-author-social-icons a:hover',\n\t\t\t\t'.mkdf-blog-pagination ul li a.mkdf-pag-active',\n\t\t\t\t'.mkdf-blog-pagination ul li a:hover',\n\t\t\t\t'.mkdf-bl-standard-pagination ul li.mkdf-bl-pag-active a',\n\t\t\t\t'.mkdf-blog-list-holder .mkdf-bli-info>div a:hover',\n\t\t\t\t'.mkdf-fullscreen-menu-opener.mkdf-fm-opened',\n\t\t\t\t'nav.mkdf-fullscreen-menu ul li ul li.current-menu-ancestor>a',\n\t\t\t\t'nav.mkdf-fullscreen-menu ul li ul li.current-menu-item>a',\n\t\t\t\t'nav.mkdf-fullscreen-menu>ul>li.mkdf-active-item>a',\n\t\t\t\t'.mkdf-mobile-header .mkdf-mobile-menu-opener.mkdf-mobile-menu-opened a',\n\t\t\t\t'.mkdf-mobile-header .mkdf-mobile-nav ul li a:hover',\n\t\t\t\t'.mkdf-mobile-header .mkdf-mobile-nav ul li h6:hover',\n\t\t\t\t'.mkdf-search-page-holder article.sticky .mkdf-post-title a',\n\t\t\t\t'.mkdf-title-holder.mkdf-centered-with-breadcrumbs-type .mkdf-breadcrumbs a:hover',\n\t\t\t\t'.mkdf-title-holder.mkdf-standard-with-breadcrumbs-type .mkdf-breadcrumbs a:hover',\n\t\t\t\t'.mkdf-testimonials-holder.mkdf-testimonials-standard .mkdf-testimonials-author-holder .mkdf-testimonial-author .mkdf-testimonials-author-job',\n\t\t\t\t'.mkdf-testimonials-holder.mkdf-testimonials-light .owl-nav .owl-next:hover',\n\t\t\t\t'.mkdf-testimonials-holder.mkdf-testimonials-light .owl-nav .owl-prev:hover',\n\t\t\t\t'.mkdf-countdown .countdown-row .countdown-section .countdown-amount',\n\t\t\t\t'.mkdf-counter-holder .mkdf-counter',\n\t\t\t\t'.mkdf-iwt .mkdf-iwt-icon',\n\t\t\t\t'.mkdf-team.main-info-below-image .mkdf-team-social-wrapp .mkdf-icon-shortcode i:hover',\n\t\t\t\t'.mkdf-team.main-info-below-image .mkdf-team-social-wrapp .mkdf-icon-shortcode span:hover',\n\t\t\t\t'.mkdf-team.main-info-below-image.info-below-image-boxed .mkdf-team-social-wrapp .mkdf-icon-shortcode .flip-icon-holder .icon-normal span',\n\t\t\t\t'.mkdf-team.main-info-below-image.info-below-image-standard .mkdf-team-social-wrapp .mkdf-icon-shortcode .flip-icon-holder .icon-flip span',\n\t\t\t\t'.mkdf-package-list-holder .mkdf-package-price .mkdf-price-value',\n\t\t\t\t'.mkdf-package-list-holder .mkdf-package-price .mkdf-price-currency',\n\t\t\t\t'.mkdf-package-list-holder .mkdf-package-icon',\n\t\t\t\t'.mkdf-property-single-holder .mkdf-property-attachment a',\n\t\t\t\t'.mkdf-property-basic-info-holder .mkdf-property-price',\n\t\t\t\t'.mkdf-property-enquiry-inner .mkdf-property-enquiry-form label:after',\n\t\t\t\t'.mkdf-property-tags .mkdf-tag-item a:hover',\n\t\t\t\t'.widget.mkdf-contact-property-widget .mkdf-contact-social-icons a:hover',\n\t\t\t\t'.widget.mkdf-recently-viewed-property-widget article:hover .mkdf-pli-title a',\n\t\t\t\t'.mkdf-pl-standard-pagination ul li.mkdf-pl-pag-active a',\n\t\t\t\t'.mkdf-property-list-holder .mkdf-property-list-filter-part .mkdf-filter-type-holder .mkdf-property-type-list-holder .mkdf-ptl-item.active .mkdf-ptl-item-title',\n\t\t\t\t'.mkdf-property-list-holder.mkdf-pl-layout-simple .mkdf-pl-item .mkdf-property-price',\n\t\t\t\t'.mkdf-property-search-holder .mkdf-search-type-section .mkdf-property-type-list-holder .mkdf-ptl-item.active .mkdf-ptl-item-title',\n\t\t\t\t'.dsidx-results .dsidx-prop-summary .dsidx-prop-title b',\n\t\t\t\t'.dsidx-results .dsidx-prop-summary .dsidx-prop-title b a:hover',\n\t\t\t\t'#ihf-main-container a:hover',\n\t\t\t\t'#ihf-main-container .ihf-listing-detail h4.ihf-price .ihf-sold-price',\n\t\t\t\t'.mkdf-map-marker-holder .mkdf-info-window-inner>a:hover~.mkdf-info-window-details h5',\n\t\t\t\t'.mkdf-agency-agent-list .mkdf-aal-item-social .mkdf-icon-shortcode a:hover',\n\t\t\t\t'.mkdf-login-register-content.ui-tabs ul li.ui-state-active a',\n\t\t\t\t'.mkdf-login-register-content.ui-tabs ul li a:hover',\n\t\t\t\t'.mkdf-login-register-content.ui-tabs .mkdf-login-form-social-login .mkdf-login-social-link',\n\t\t\t\t'.mkdf-mobile-header .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'.mkdf-sidebar .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'footer .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'.mkdf-side-menu .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'.mkdf-login-register-widget.mkdf-user-logged-in .mkdf-user-mobile-icon:hover>span',\n '.mkdf-single-links-pages .mkdf-single-links-pages-inner>a:hover',\n '.mkdf-single-links-pages .mkdf-single-links-pages-inner>span'\n );\n\n $woo_color_selector = array();\n if(zuhaus_mikado_is_woocommerce_installed()) {\n $woo_color_selector = array(\n\t\t\t\t\t'.woocommerce-pagination .page-numbers.current',\n\t\t\t\t\t'.woocommerce-pagination .page-numbers:hover',\n\t\t\t\t\t'.woocommerce-page .mkdf-content .mkdf-quantity-buttons .mkdf-quantity-minus:hover',\n\t\t\t\t\t'.woocommerce-page .mkdf-content .mkdf-quantity-buttons .mkdf-quantity-plus:hover',\n\t\t\t\t\t'div.woocommerce .mkdf-quantity-buttons .mkdf-quantity-minus:hover',\n\t\t\t\t\t'div.woocommerce .mkdf-quantity-buttons .mkdf-quantity-plus:hover',\n\t\t\t\t\t'ul.products>.product .price',\n\t\t\t\t\t'.mkdf-woo-single-page .mkdf-single-product-summary .price',\n\t\t\t\t\t'.mkdf-woo-single-page .mkdf-single-product-summary .product_meta>span a:hover',\n\t\t\t\t\t'.widget.woocommerce.widget_layered_nav ul li.chosen a'\n );\n }\n\n $color_selector = array_merge($color_selector, $woo_color_selector);\n\n $background_color_selector = array(\n\t\t\t\t'.mkdf-st-loader .pulse',\n\t\t\t\t'.mkdf-st-loader .double_pulse .double-bounce1',\n\t\t\t\t'.mkdf-st-loader .double_pulse .double-bounce2',\n\t\t\t\t'.mkdf-st-loader .cube',\n\t\t\t\t'.mkdf-st-loader .rotating_cubes .cube1',\n\t\t\t\t'.mkdf-st-loader .rotating_cubes .cube2',\n\t\t\t\t'.mkdf-st-loader .stripes>div',\n\t\t\t\t'.mkdf-st-loader .wave>div',\n\t\t\t\t'.mkdf-st-loader .two_rotating_circles .dot1',\n\t\t\t\t'.mkdf-st-loader .two_rotating_circles .dot2',\n\t\t\t\t'.mkdf-st-loader .five_rotating_circles .container1>div',\n\t\t\t\t'.mkdf-st-loader .five_rotating_circles .container2>div',\n\t\t\t\t'.mkdf-st-loader .five_rotating_circles .container3>div',\n\t\t\t\t'.mkdf-st-loader .atom .ball-1:before',\n\t\t\t\t'.mkdf-st-loader .atom .ball-2:before',\n\t\t\t\t'.mkdf-st-loader .atom .ball-3:before',\n\t\t\t\t'.mkdf-st-loader .atom .ball-4:before',\n\t\t\t\t'.mkdf-st-loader .clock .ball:before',\n\t\t\t\t'.mkdf-st-loader .mitosis .ball',\n\t\t\t\t'.mkdf-st-loader .lines .line1',\n\t\t\t\t'.mkdf-st-loader .lines .line2',\n\t\t\t\t'.mkdf-st-loader .lines .line3',\n\t\t\t\t'.mkdf-st-loader .lines .line4',\n\t\t\t\t'.mkdf-st-loader .fussion .ball',\n\t\t\t\t'.mkdf-st-loader .fussion .ball-1',\n\t\t\t\t'.mkdf-st-loader .fussion .ball-2',\n\t\t\t\t'.mkdf-st-loader .fussion .ball-3',\n\t\t\t\t'.mkdf-st-loader .fussion .ball-4',\n\t\t\t\t'.mkdf-st-loader .wave_circles .ball',\n\t\t\t\t'.mkdf-st-loader .pulse_circles .ball',\n\t\t\t\t'.mkdf-blog-holder article.format-audio .mkdf-blog-audio-holder .mejs-container .mejs-controls>.mejs-time-rail .mejs-time-total .mejs-time-current',\n\t\t\t\t'.mkdf-blog-holder article.format-audio .mkdf-blog-audio-holder .mejs-container .mejs-controls>a.mejs-horizontal-volume-slider .mejs-horizontal-volume-current',\n\t\t\t\t'.mkdf-icon-shortcode.mkdf-circle',\n\t\t\t\t'.mkdf-icon-shortcode.mkdf-dropcaps.mkdf-circle',\n\t\t\t\t'.mkdf-icon-shortcode.mkdf-square',\n\t\t\t\t'.mkdf-property-title-section .mkdf-property-statuses',\n\t\t\t\t'#dsidx #dsidx-listings li.dsidx-listing-container .dsidx-data .dsidx-primary-data .dsidx-price',\n\t\t\t\t'#dsidx.dsidx-details #dsidx-header #dsidx-primary-data #dsidx-price td',\n\t\t\t\t'.widget.dsidx-widget-single-listing-wrap .dsidx-widget-single-listing .dsidx-widget-single-listing-meta .dsidx-widget-single-listing-price',\n\t\t\t\t'#ihf-main-container .btn-group.open>.dropdown-menu>.active a',\n\t\t\t\t'#ihf-main-container .btn-group.open>.dropdown-menu>li>a:hover',\n\t\t\t\t'#ihf-main-container .title-bar-1',\n\t\t\t\t'#ihf-main-container .ihf-grid-result .ihf-map-icon',\n\t\t\t\t'#ihf-main-container .ihf-result.row .ihf-map-icon',\n\t\t\t\t'#ui-datepicker-div .ui-datepicker-header',\n\t\t\t\t'.mkdf-login-register-content.ui-tabs .mkdf-login-form-social-login .mkdf-login-social-link:after'\n );\n\n $woo_background_color_selector = array();\n if(zuhaus_mikado_is_woocommerce_installed()) {\n $woo_background_color_selector = array();\n }\n\n $background_color_selector = array_merge($background_color_selector, $woo_background_color_selector);\n\n $border_color_selector = array(\n\t\t\t\t'.mkdf-st-loader .pulse_circles .ball',\n\t\t\t\t'.mkdf-side-menu .widget.widget_tag_cloud a:hover',\n\t\t\t\t'.wpb_widgetised_column .widget.widget_tag_cloud a:hover',\n\t\t\t\t'aside.mkdf-sidebar .widget.widget_tag_cloud a:hover',\n\t\t\t\t'.widget.widget_tag_cloud a:hover',\n\t\t\t\t'.mkdf-blog-pagination ul li a.mkdf-pag-active',\n\t\t\t\t'.mkdf-blog-pagination ul li a:hover',\n\t\t\t\t'.mkdf-blog-pagination ul li.mkdf-pag-first a:hover',\n\t\t\t\t'.mkdf-blog-pagination ul li.mkdf-pag-last a:hover',\n\t\t\t\t'.mkdf-blog-pagination ul li.mkdf-pag-next a:hover',\n\t\t\t\t'.mkdf-blog-pagination ul li.mkdf-pag-prev a:hover',\n\t\t\t\t'.mkdf-property-tags .mkdf-tag-item a:hover',\n\t\t\t\t'.mkdf-mobile-header .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'.mkdf-sidebar .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'footer .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'.mkdf-side-menu .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'.mkdf-login-register-widget.mkdf-user-logged-in .mkdf-user-mobile-icon:hover>span',\n '.mkdf-single-links-pages .mkdf-single-links-pages-inner>a:hover',\n '.mkdf-single-links-pages .mkdf-single-links-pages-inner>span'\n );\n\n\t\t\t$woo_border_color_selector = array();\n\t\t\tif(zuhaus_mikado_is_woocommerce_installed()) {\n\t\t\t\t$woo_border_color_selector = array(\n\t\t\t\t\t'.woocommerce-pagination .page-numbers.current',\n\t\t\t\t\t'.woocommerce-pagination .page-numbers:hover',\n\t\t\t\t\t'.woocommerce-pagination .page-numbers.next:hover',\n\t\t\t\t\t'.woocommerce-pagination .page-numbers.prev:hover'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$border_color_selector = array_merge($border_color_selector, $woo_border_color_selector);\n\n echo zuhaus_mikado_dynamic_css($color_selector, array('color' => $first_main_color));\n\t echo zuhaus_mikado_dynamic_css($background_color_selector, array('background-color' => $first_main_color));\n\t echo zuhaus_mikado_dynamic_css($border_color_selector, array('border-color' => $first_main_color));\n }\n\n\t\t$second_main_color = zuhaus_mikado_options()->getOptionValue('second_color');\n\n\t\tif(!empty($second_main_color)) {\n\t\t\t$second_color_selector = array(\n\t\t\t\t'blockquote:before',\n\t\t\t\t'.mkdf-cf7-newsletter-footer input[type=submit]:hover',\n\t\t\t\t'#mkdf-back-to-top>span:hover',\n\t\t\t\t'.mkdf-main-menu>ul>li.mkdf-active-item>a',\n\t\t\t\t'.mkdf-main-menu>ul>li>a:hover',\n\t\t\t\t'.mkdf-light-header .mkdf-page-header>div:not(.mkdf-sticky-header):not(.fixed) .mkdf-main-menu>ul>li.mkdf-active-item>a',\n\t\t\t\t'.mkdf-light-header .mkdf-page-header>div:not(.mkdf-sticky-header):not(.fixed) .mkdf-main-menu>ul>li>a:hover',\n\t\t\t\t'.mkdf-mobile-header .mkdf-mobile-nav .mkdf-grid>ul>li.mkdf-active-item>a',\n\t\t\t\t'.mkdf-mobile-header .mkdf-mobile-nav .mkdf-grid>ul>li.mkdf-active-item>h6',\n\t\t\t\t'.mkdf-mobile-header .mkdf-mobile-nav ul ul li.current-menu-ancestor>a',\n\t\t\t\t'.mkdf-mobile-header .mkdf-mobile-nav ul ul li.current-menu-ancestor>h6',\n\t\t\t\t'.mkdf-mobile-header .mkdf-mobile-nav ul ul li.current-menu-item>a',\n\t\t\t\t'.mkdf-mobile-header .mkdf-mobile-nav ul ul li.current-menu-item>h6',\n\t\t\t\t'.mkdf-search-opener:hover',\n\t\t\t\t'.mkdf-search-cover .mkdf-search-close a:hover',\n\t\t\t\t'.mkdf-side-menu-button-opener .mkdf-side-menu-icon:hover',\n\t\t\t\t'.mkdf-side-menu a.mkdf-close-side-menu:hover',\n\t\t\t\t'.mkdf-btn.mkdf-btn-outline',\n\t\t\t\t'.mkdf-social-share-holder.mkdf-list li a:hover',\n\t\t\t\t'.mkdf-property-title-section .mkdf-property-stars',\n\t\t\t\t'.mkdf-property-list-holder.mkdf-pl-layout-info-over .mkdf-pl-item .mkdf-item-featured',\n\t\t\t\t'.mkdf-property-list-holder.mkdf-pl-layout-standard .mkdf-pl-item .mkdf-item-featured',\n\t\t\t\t'.mkdf-property-reviews .mkdf-comment-holder .mkdf-review-rating .mkdf-rating-inner',\n\t\t\t\t'.mkdf-property-reviews .mkdf-property-stars-wrapper .mkdf-property-stars',\n\t\t\t\t'.mkdf-property-reviews .mkdf-comment-form-rating .mkdf-comment-rating-box .mkdf-star-rating.active',\n\t\t\t\t'.mkdf-top-bar .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'.mkdf-menu-area .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'.mkdf-sticky-header .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'.mkdf-menu-area .mkdf-login-register-widget.mkdf-user-logged-in:hover .mkdf-logged-in-user .mkdf-logged-in-user-inner span',\n\t\t\t\t'.mkdf-sticky-header .mkdf-login-register-widget.mkdf-user-logged-in:hover .mkdf-logged-in-user .mkdf-logged-in-user-inner span',\n\t\t\t\t'.mkdf-top-bar .mkdf-login-register-widget.mkdf-user-logged-in:hover .mkdf-logged-in-user .mkdf-logged-in-user-inner span'\n\t\t\t);\n\n\t\t\t$woo_second_color_selector = array();\n\t\t\tif(zuhaus_mikado_is_woocommerce_installed()) {\n\t\t\t\t$woo_second_color_selector = array(\n\t\t\t\t\t'.mkdf-shopping-cart-holder:hover .mkdf-cart-icon'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$second_color_selector = array_merge($second_color_selector, $woo_second_color_selector);\n\n\t\t\t$second_color_important_selector = array(\n\t\t\t\t'.mkdf-menu-area .widget.mkdf-add-property-widget .mkdf-btn:hover',\n\t\t\t\t'.mkdf-top-bar .widget.mkdf-add-property-widget .mkdf-btn:hover'\n\t\t\t);\n\n\t\t\t$second_background_color_selector = array(\n\t\t\t\t'#submit_comment',\n\t\t\t\t'.post-password-form input[type=submit]',\n\t\t\t\t'input.wpcf7-form-control.wpcf7-submit',\n\t\t\t\t'.mkdf-blog-holder article.format-link .mkdf-post-text',\n\t\t\t\t'.mkdf-blog-holder article.format-quote .mkdf-post-text',\n\t\t\t\t'.mkdf-testimonials-holder.mkdf-testimonials-standard .mkdf-testimonials-author-holder .mkdf-quotes-holder',\n\t\t\t\t'.mkdf-btn.mkdf-btn-solid',\n\t\t\t\t'.mkdf-process-holder .mkdf-process-add-text',\n\t\t\t\t'.mkdf-progress-bar .mkdf-pb-content-holder .mkdf-pb-content',\n\t\t\t\t'.mkdf-property-list-holder .mkdf-property-list-filter-part .mkdf-filter-features-holder .mkdf-feature-item input[type=checkbox]+label .mkdf-label-view:after',\n\t\t\t\t'.mkdf-property-city-list-holder .mkdf-pcl-item-separator span',\n\t\t\t\t'.mkdf-property-list-holder .mkdf-property-list-filter-part .mkdf-range-slider .ui-slider-range',\n\t\t\t\t'.mkdf-property-list-holder .mkdf-property-list-filter-part .mkdf-range-slider .ui-slider-handle',\n\t\t\t\t'.dsidx-resp-search-box input[type=submit]',\n\t\t\t\t'#dsidx.dsidx-details #dsidx-contact-form #dsidx-contact-form-submit',\n\t\t\t\t'#ihf-main-container a.btn.btn-default:not(.dropdown-toggle)',\n\t\t\t\t'#ihf-main-container a.btn.btn-primary',\n\t\t\t\t'#ihf-main-container button.btn.btn-default:not(.dropdown-toggle)',\n\t\t\t\t'#ihf-main-container button.btn.btn-primary',\n\t\t\t\t'#ihf-main-container #ihf-main-search-form #ihf-search-location-tab #areaPickerExpandAllCloseButton span',\n\t\t\t\t'#ihf-main-container #ihf-main-search-form #ihf-search-location-tab .areaPickerExpandAllElement>div',\n\t\t\t\t'.mkdf-login-register-content.ui-tabs .mkdf-lost-pass-remember-holder .mkdf-login-remember .mkdf-checkbox-style input[type=checkbox]+label .mkdf-label-view:after',\n\t\t\t\t'.mkdf-membership-input-holder .mkdf-checkbox-style input[type=checkbox]+label .mkdf-label-view:after'\n\t\t\t);\n\n\t\t\t$woo_second_background_color_selector = array();\n\t\t\tif(zuhaus_mikado_is_woocommerce_installed()) {\n\t\t\t\t$woo_second_background_color_selector = array(\n\t\t\t\t\t'.woocommerce-page .mkdf-content .wc-forward:not(.added_to_cart):not(.checkout-button)',\n\t\t\t\t\t'.woocommerce-page .mkdf-content a.added_to_cart',\n\t\t\t\t\t'.woocommerce-page .mkdf-content a.button',\n\t\t\t\t\t'.woocommerce-page .mkdf-content button[type=submit]:not(.mkdf-woo-search-widget-button)',\n\t\t\t\t\t'.woocommerce-page .mkdf-content input[type=submit]',\n\t\t\t\t\t'div.woocommerce .wc-forward:not(.added_to_cart):not(.checkout-button)',\n\t\t\t\t\t'div.woocommerce a.added_to_cart',\n\t\t\t\t\t'div.woocommerce a.button',\n\t\t\t\t\t'div.woocommerce button[type=submit]:not(.mkdf-woo-search-widget-button)',\n\t\t\t\t\t'div.woocommerce input[type=submit]',\n\t\t\t\t\t'.woocommerce .mkdf-onsale',\n\t\t\t\t\t'.woocommerce .mkdf-out-of-stock',\n\t\t\t\t\t'.mkdf-shopping-cart-dropdown .mkdf-cart-bottom .mkdf-view-cart',\n\t\t\t\t\t'.widget.woocommerce.widget_price_filter .price_slider_wrapper .ui-widget-content .ui-slider-handle',\n\t\t\t\t\t'.widget.woocommerce.widget_price_filter .price_slider_wrapper .ui-widget-content .ui-slider-range'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$second_background_color_selector = array_merge($second_background_color_selector, $woo_second_background_color_selector);\n\n\t\t\t$second_background_color_important_selector = array(\n\t\t\t\t'.mkdf-btn.mkdf-btn-outline:not(.mkdf-btn-custom-hover-bg):hover'\n\t\t\t);\n\n\t\t\t$second_border_color_selector = array(\n\t\t\t\t'#submit_comment:hover',\n\t\t\t\t'.post-password-form input[type=submit]:hover',\n\t\t\t\t'input.wpcf7-form-control.wpcf7-submit:hover',\n\t\t\t\t'#mkdf-back-to-top>span:hover',\n\t\t\t\t'.mkdf-search-opener:hover .mkdf-search-opener-wrapper',\n\t\t\t\t'.mkdf-side-menu-button-opener .mkdf-side-menu-icon:hover',\n\t\t\t\t'.mkdf-side-menu a.mkdf-close-side-menu:hover',\n\t\t\t\t'.mkdf-btn.mkdf-btn-outline',\n\t\t\t\t'.mkdf-tabs.mkdf-tabs-simple .mkdf-tabs-nav li.ui-state-active a',\n\t\t\t\t'.mkdf-tabs.mkdf-tabs-simple .mkdf-tabs-nav li.ui-state-hover a',\n\t\t\t\t'.dsidx-resp-search-box input[type=submit]:hover',\n\t\t\t\t'#dsidx.dsidx-details #dsidx-contact-form #dsidx-contact-form-submit:hover',\n\t\t\t\t'#ihf-main-container #ihf-main-search-form #ihf-search-location-tab .ihf-one-selectedArea button',\n\t\t\t\t'#ihf-main-container #ihf-main-search-form #ihf-search-location-tab #areaPickerExpandAllCloseButton:hover span',\n\t\t\t\t'#ihf-main-container #ihf-main-search-form #ihf-search-location-tab .areaPickerExpandAllElement>div.areaSelected',\n\t\t\t\t'#ihf-main-container #ihf-main-search-form #ihf-search-location-tab .areaPickerExpandAllElement>div.autocompleteMouseOver',\n\t\t\t\t'.mkdf-top-bar .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'.mkdf-menu-area .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'.mkdf-sticky-header .widget.mkdf-login-register-widget.mkdf-user-not-logged-in .mkdf-login-opener:hover',\n\t\t\t\t'.mkdf-menu-area .mkdf-login-register-widget.mkdf-user-logged-in:hover .mkdf-logged-in-user .mkdf-logged-in-user-inner span',\n\t\t\t\t'.mkdf-sticky-header .mkdf-login-register-widget.mkdf-user-logged-in:hover .mkdf-logged-in-user .mkdf-logged-in-user-inner span',\n\t\t\t\t'.mkdf-top-bar .mkdf-login-register-widget.mkdf-user-logged-in:hover .mkdf-logged-in-user .mkdf-logged-in-user-inner span'\n\t\t\t);\n\n\t\t\t$woo_second_border_color_selector = array();\n\t\t\tif(zuhaus_mikado_is_woocommerce_installed()) {\n\t\t\t\t$woo_second_border_color_selector = array(\n\t\t\t\t\t'.woocommerce-page .mkdf-content .wc-forward:not(.added_to_cart):not(.checkout-button):hover',\n\t\t\t\t\t'.woocommerce-page .mkdf-content a.added_to_cart:hover',\n\t\t\t\t\t'.woocommerce-page .mkdf-content a.button:hover',\n\t\t\t\t\t'.woocommerce-page .mkdf-content button[type=submit]:not(.mkdf-woo-search-widget-button):hover',\n\t\t\t\t\t'.woocommerce-page .mkdf-content input[type=submit]:hover',\n\t\t\t\t\t'div.woocommerce .wc-forward:not(.added_to_cart):not(.checkout-button):hover',\n\t\t\t\t\t'div.woocommerce a.added_to_cart:hover',\n\t\t\t\t\t'div.woocommerce a.button:hover',\n\t\t\t\t\t'div.woocommerce button[type=submit]:not(.mkdf-woo-search-widget-button):hover',\n\t\t\t\t\t'div.woocommerce input[type=submit]:hover',\n\t\t\t\t\t'.mkdf-shopping-cart-holder:hover .mkdf-cart-icon',\n\t\t\t\t\t'.mkdf-shopping-cart-dropdown .mkdf-cart-bottom .mkdf-view-cart:hover'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$second_border_color_selector = array_merge($second_border_color_selector, $woo_second_border_color_selector);\n\n\t\t\t$second_border_color_important_selector = array(\n\t\t\t\t'.mkdf-btn.mkdf-btn-solid:not(.mkdf-btn-custom-border-hover):hover',\n\t\t\t\t'.mkdf-btn.mkdf-btn-outline:not(.mkdf-btn-custom-border-hover):hover'\n\t\t\t);\n\n\t\t\techo zuhaus_mikado_dynamic_css($second_color_selector, array('color' => $second_main_color));\n\t\t\techo zuhaus_mikado_dynamic_css($second_color_important_selector, array('color' => $second_main_color.'!important'));\n\t\t\techo zuhaus_mikado_dynamic_css($second_background_color_selector, array('background-color' => $second_main_color));\n\t\t\techo zuhaus_mikado_dynamic_css($second_background_color_important_selector, array('background-color' => $second_main_color.'!important'));\n\t\t\techo zuhaus_mikado_dynamic_css($second_border_color_selector, array('border-color' => $second_main_color));\n\t\t\techo zuhaus_mikado_dynamic_css($second_border_color_important_selector, array('border-color' => $second_main_color.'!important'));\n\t\t}\n\t\n\t $page_background_color = zuhaus_mikado_options()->getOptionValue( 'page_background_color' );\n\t if ( ! empty( $page_background_color ) ) {\n\t\t $background_color_selector = array(\n\t\t\t 'body',\n\t\t\t '.mkdf-content',\n\t\t\t '.mkdf-container'\n\t\t );\n\t\t echo zuhaus_mikado_dynamic_css( $background_color_selector, array( 'background-color' => $page_background_color ) );\n\t }\n\t\n\t $selection_color = zuhaus_mikado_options()->getOptionValue( 'selection_color' );\n\t if ( ! empty( $selection_color ) ) {\n\t\t echo zuhaus_mikado_dynamic_css( '::selection', array( 'background' => $selection_color ) );\n\t\t echo zuhaus_mikado_dynamic_css( '::-moz-selection', array( 'background' => $selection_color ) );\n\t }\n\t\n\t $preload_background_styles = array();\n\t\n\t if ( zuhaus_mikado_options()->getOptionValue( 'preload_pattern_image' ) !== \"\" ) {\n\t\t $preload_background_styles['background-image'] = 'url(' . zuhaus_mikado_options()->getOptionValue( 'preload_pattern_image' ) . ') !important';\n\t }\n\t\n\t echo zuhaus_mikado_dynamic_css( '.mkdf-preload-background', $preload_background_styles );\n }", "function fluid_edge_contact_form7_label_styles_4() {\n\t\t$item_styles = fluid_edge_get_typography_styles('cf7_style_4_label');\n\t\t\n\t\t$item_selector = array(\n\t\t\t'.cf7_custom_style_4 p'\n\t\t);\n\t\t\n\t\techo fluid_edge_dynamic_css($item_selector, $item_styles);\n\t}", "function creaped() {\n\t\t// Esto debe hacerse por dataform\n\t\t$styles = \"\\n<!-- Estilos -->\\n\";\n\t\t$styles .= style('rapyd.css');\n\t\t$styles .= style('ventanas.css');\n\t\t$styles .= style('themes/proteo/proteo.css');\n\t\t$styles .= style(\"themes/ui.jqgrid.css\");\n\t\t$styles .= style(\"themes/ui.multiselect.css\");\n\t\t$styles .= style('layout1.css');\n\t\t$styles .= '<link rel=\"stylesheet\" href=\"'.base_url().'system/application/rapyd/elements/proteo/css/rapyd_components.css\" type=\"text/css\" />'.\"\\n\";\n\n\n\t\t$styles .= '\n<style type=\"text/css\">\n\tp {font-size:1em; margin: 1ex 0;}\n\tp.buttons {text-align:center;line-height:2.5em;}\n\tbutton {line-height: normal;}\n\t.hidden {display: none;}\n\tul {z-index:100000;margin:1ex 0;padding:0;list-style:none;cursor:pointer;border:1px solid Black;width:15ex;position:\trelative;}\n\tul li {background-color: #EEE;padding: 0.15em 1em 0.3em 5px;}\n\tul ul {display:none;position:absolute;width:100%;left:-1px;bottom:0;margin:0;margin-bottom: 1.55em;}\n\t.ui-layout-north ul ul {bottom:auto;margin:0;margin-top:1.45em;}\n\tul ul li { padding: 3px 1em 3px 5px; }\n\tul ul li:hover { background-color: #FF9; }\n\tul li:hover ul { display:block; background-color: #EEE; }\n\n\t#feedback { font-size: 0.8em; }\n\t#tablas .ui-selecting { background: #FECA40; }\n\t#tablas .ui-selected { background: #F39814; color: white; }\n\t#tablas { list-style-type: none; margin: 0; padding: 0; width: 90%; }\n\t#tablas li { margin: 1px; padding: 0em; font-size: 0.8em; height: 14px; }\n\n\ttable.tc td.header {padding-right: 1px;padding-left: 1px;font-weight: bold;font-size: 8pt;color: navy;background-color: #f4edd5;text-align:center;}\n\ttable.tc td.title{padding-right: 1px;padding-left: 1px;font-weight: bold;font-size: 8pt;color:navy;text-align:center;background-color: #fdffdf;}\n\ttable.tc td.resalte{border-left:solid 1px #daac00;border-top:solid 1px #daac00;text-align:center;font-weight: bold;}\n\ttable.tc td{ border-left:solid 1px #DAAC00;border-TOP:solid 1px #DAAC00;}\n\ttable.tc {border-right: #daac00 1px solid;padding-right: 0px;border-top: medium none;padding-left: 0px;padding-bottom: 0px;border-left: medium none;border-bottom: #daac00 1px solid;font-family: verdana;font-size:8pt;cellspacing: 0px}\n\ttable.tc td.sin_borde{border-left:solid 1px #DAAC00;border-TOP:solid 1px #DAAC00;text-align:center;border-right:solid 5px #f6f6f6;border-bottom:solid 5px #f6f6f6;}\n\n\t.custom-combobox {position: relative;display: inline-block;}\n\t.custom-combobox-toggle {position: absolute;top: 0;bottom: 0;margin-left: -1px;padding: 0;}\n\t.custom-combobox-input {margin: 0;padding: 5px 10px;}\n\n</style>\n';\n\n\t\t$title = \"\n<div id='encabe'>\n<table width='98%'>\n\t<tr>\n\t\t<td>\".heading('Generar Orden de Produccion').\"</td>\n\t\t<td align='right' width='40'>\".image('cerrar.png','Cerrar Ventana',array('onclick'=>'window.close()','height'=>'20')).\"</td>\n\t</tr>\n</table>\n</div>\n\";\n\t\t$script = \"\\n<!-- JQUERY -->\\n\";\n\t\t$script .= script('jquery-min.js');\n\t\t$script .= script('jquery-migrate-min.js');\n\t\t$script .= script('jquery-ui.custom.min.js');\n\n\t\t$script .= script(\"jquery.layout.js\");\n\t\t$script .= script(\"i18n/grid.locale-sp.js\");\n\n\t\t$script .= script(\"ui.multiselect.js\");\n\t\t$script .= script(\"jquery.jqGrid.min.js\");\n\t\t$script .= script(\"jquery.tablednd.js\");\n\t\t$script .= script(\"jquery.contextmenu.js\");\n\n\t\t$script .= script('plugins/jquery.numeric.pack.js');\n\t\t$script .= script('plugins/jquery.floatnumber.js');\n\t\t$script .= script('plugins/jquery.maskedinput.min.js');\n\n\t\t$script .= '\n<script type=\"text/javascript\">\n\t$(function(){\n\t\t$(\".inputnum\").numeric(\".\");\n\t});\n\t$(function() {\n\t\t$( \"input:submit, a, button\", \".botones\",\".otros\" ).button();\n\t});\n';\n\n\t\t$script .= '\n\t// set EVERY state here so will undo ALL layout changes\n\t// used by the Reset State button: myLayout.loadState( stateResetSettings )\n\tvar stateResetSettings = {\n\t\tnorth__size:\t\t\"auto\"\n\t,\tnorth__initClosed:\tfalse\n\t,\tnorth__initHidden:\tfalse\n\t,\tsouth__size:\t\t\"auto\"\n\t,\tsouth__initClosed:\tfalse\n\t,\tsouth__initHidden:\tfalse\n\t,\twest__size:\t\t\t200\n\t,\twest__initClosed:\tfalse\n\t,\twest__initHidden:\tfalse\n\t,\teast__size:\t\t\t100\n\t,\teast__initClosed:\ttrue\n\t,\teast__initHidden:\ttrue\n\n\t};\n\n\tvar myLayout;\n\n\t$(document).ready(function () {\n\n\t\t// this layout could be created with NO OPTIONS - but showing some here just as a sample...\n\t\t// myLayout = $(\"body\").layout(); -- syntax with No Options\n\n\t\tmyLayout = $(\"body\").layout({\n\n\t\t//\treference only - these options are NOT required because \"true\" is the default\n\t\t\tclosable: true,\tresizable:\ttrue, slidable:\ttrue, livePaneResizing:\ttrue\n\t\t//\tsome resizing/toggling settings\n\t\t,\tnorth__slidable: false, north__togglerLength_closed: \"100%\", north__spacing_closed:\t20\n\t\t,\tsouth__resizable:false,\tsouth__spacing_open:0\n\t\t,\tsouth__spacing_closed:20\n\t\t//\tsome pane-size settings\n\t\t,\twest__minSize: 100, east__size: 100, east__minSize: 50, east__maxSize: .5, center__minWidth: 100\n\t\t//\tsome pane animation settings\n\t\t,\twest__animatePaneSizing: false,\twest__fxSpeed_size:\t\"fast\",\twest__fxSpeed_open: 1000\n\t\t,\twest__fxSettings_open:{ easing: \"easeOutBounce\" },\twest__fxName_close:\"none\"\n\t\t//\tenable showOverflow on west-pane so CSS popups will overlap north pane\n\t\t//,\twest__showOverflowOnHover:\ttrue\n\t\t,\tstateManagement__enabled:true, showDebugMessages: true\n\t\t});\n\n\t\t$(function() {\n\t\t\t$(\"button\").button().click(function(event) {event.preventDefault();});\n\t\t\t//$( \"#almacen\" ).combobox();\n\t\t});\n\n\n \t});\n\n\tfunction sumar(j){\n\t\tvar nn = \\'[name=\"codigo_\\'+j+\\'\"]\\';\n\t\tvar k = 0;\n\t\tvar t;\n\t\tvar totalc = 0;\n\t\tvar maximo = 0;\n\n\t\t// Valida el maximo\n\t\t$(\"#resultados\").html(\"Maximo \"+maximo);\n\n\t\t$(nn).each( function() {\n\t\t\tk = $(this).val();\n\t\t\tt = Number($(\"#cana_\"+k).val());\n\t\t\tmaximo = Number($(\"#falta_\"+k).val());\n\t\t\tif ( t > maximo ){\n\t\t\t\tt = maximo;\n\t\t\t\t$(\"#cana_\"+k).val(maximo);\n\t\t\t}\n\t\t\ttotalc += t;\n\t\t});\n\t\t$(\\'#totalc_\\'+j).val(totalc);\n\t}\n\n\tfunction guardar(){\n\t\talert(\"Guardar\");\n\t\t$.post( \"'.base_url().'inventario/prdo/guardaoe\", $(\"#guardar\").serialize(),\n\t\t\tfunction(data) {\n\t\t\t\talert(data);\n\t\t\t\tlocation.reload();\n\t\t\t\twindow.opener.actualiza();\n\t\t\t}\n\t\t);\n\t}\n</script>\n';\n\n// ENCABEZADO\n$tabla = '\n<div class=\"ui-layout-north\" onmouseover=\"myLayout.allowOverflow(\\'north\\')\" onmouseout=\"myLayout.resetOverflow(this)\">\n<table width=\"100%\" bgcolor=\"#2067B5\">\n\t<tr>\n\t\t<td align=\"left\" width=\"80px\"><img src=\"'.base_url().'assets/default/css/templete_01.jpg\" width=\"120\"></td><td align=\"center\"><h1 style=\"font-size: 20px; color: rgb(255, 255, 255);\" onclick=\"history.back()\">ORDEN DE PRODUCCION</h1></td><td align=\"left\" width=\"100px\" nowrap=\"nowrap\"><font style=\"color:#FFFFFF;font-size:12px\">Usuario: '.$this->secu->usuario().'<br/>'.$this->secu->getnombre().'</font></td><td align=\"right\" width=\"28px\"></td>\n\t</tr>\n</table>\n</div>\n';\n\n// IZQUIERDO\n$tabla .= '\n<div class=\"ui-layout-west\">\n<form id=\"guardar\" >\n<center>\n<lable>Almacen</lable> ';\n$tabla .= $this->datasis->llenaopciones(\"SELECT ubica, ubides FROM caub WHERE gasto='N' ORDER BY ubica\", false, $id='almacen' );\n\n$tabla .= '\n\t<br><br>\n\t<lable>Instruciones</lable>\n\t<textarea rows=\"4\" cols=\"25\" id=\"instrucciones\" name=\"instrucciones\"></textarea>\n\t<br><br>\n\t<button type=\"button\" onclick=\"guardar()\">Guardar Orden</button>\n\t<div id=\"resultados\"></div>\n</center>\n</div>';\n\n// INFERIOR\n$tabla .= '\n<div class=\"ui-layout-south\">\n';\n\n$tabla .= $this->datasis->traevalor('TITULO1');\n\n$tabla .= '\n</div>\n';\n\n// DERECHA\n$tabla .= '\n<div class=\"ui-layout-east\">\n</div>\n';\n\n// CENTRO\n$norden = $this->datasis->dameval('SELECT MAX(id) maxi FROM prdo');\nif ($norden == '') $norden = 0;\n\n$tabla .= '\n<div class=\"ui-layout-center\">';\n\n$mSQL = '\nSELECT a.id, b.numero, b.fecha, b.cod_cli, b.nombre, a.codigoa, a.desca, a.cana, COALESCE(sum(e.ordenado),0) producido, a.cana-COALESCE(sum(e.ordenado),0) falta, COALESCE(sum(e.ordenado),0) ordenado, d.ruta, d.descrip\nFROM itpfac a\nJOIN pfac b ON a.numa = b.numero\nLEFT JOIN sclitrut c ON b.cod_cli=c.cliente\nLEFT JOIN sclirut d ON c.ruta=d.ruta\nLEFT JOIN itprdo e ON a.id = e.idpfac\nWHERE b.producir=\"S\" AND ( b.ordprod=\"\" OR b.ordprod IS NULL )\nGROUP BY a.id\nHAVING falta>0\nORDER BY a.codigoa, d.ruta, a.numa\n';\n\n$query = $this->db->query($mSQL);\n$ruta = 'XX0XX';\n$codigo = 'XXZZWWXXWWXXZZZZ';\n$i = 0;\n$c = 0;\nif ($query->num_rows() > 0){\n\tforeach ($query->result() as $row){\n\t\tif ( $codigo != $row->codigoa ){\n\t\t\tif ( $i > 0 ) $tabla .= \"</tbody></table><br>\\n\";\n\t\t\t$tabla .= '<table class=\"tc\" width=\"100%\">';\n\t\t\t$tabla .= \"<tbody>\\n\";\n\n\t\t\tif ( $i > 0 ) $c++;\n\n\t\t\t$tabla .= \"<tr style='background:#2067B5;color:#FFFFFF;'>\\n\";\n\t\t\t$tabla .= \"\t<td colspan='7'>Cod: \".$row->codigoa.\" Desc: \".$row->desca.\"</td>\\n\";\n\t\t\t//$tabla .= \"\t<td>&nbsp;</td>\\n\";\n\t\t\t$tabla .= \"\t<td><input class='inputnum' name='totalc_$c' id='totalc_$c' size='4' type='text' readonly></td>\\n\";\n\t\t\t$tabla .= \"</tr>\\n\";\n\n\t\t\t$tabla .= \"<tr bgcolor='#BEDCFD'>\\n\";\n\t\t\t$tabla .= \"\t<td >Ruta</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Pedido</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Fecha</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Cliente</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Nombre</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Cantidad</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Producido</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Ordenado</td>\\n\";\n\t\t\t$tabla .= \"</tr>\\n\";\n\n\t\t\t$codigo = $row->codigoa;\n\t\t}\n\n\t\t$tabla .= \"<tr>\\n\";\n\t\t$tabla .= \"\t<td><a href='#' title='\".$row->descrip.\"'>\".$row->ruta.\"&nbsp;</a></td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->numero.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->fecha.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->cod_cli.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->nombre.\"</td>\\n\";\n\t\t$tabla .= \"\t<td align='right'>\".$row->cana.\"</td>\\n\";\n\t\t$tabla .= \"\t<td align='right'>\".$row->producido.\"</td>\\n\";\n\n\t\t$tabla .= \"\t<td>\\n\";\n\t\t$tabla .= \"\t\t<input class='inputnum' name='cana_$i' id='cana_$i' size='4' onkeyUp='sumar($c)' value='0.00' >\\n\";\n\t\t$tabla .= \"\t\t<input name='codigo_$c' id='codigo_$c' type='hidden' value='$i' >\\n\";\n\t\t$tabla .= \"\t\t<input name='idpfac_$i' id='idpfac_$i' type='hidden' value='\".$row->id. \"' >\\n\";\n\t\t$tabla .= \"\t\t<input name='falta_$i' id='falta_$i' type='hidden' value='\".$row->falta.\"' >\\n\";\n\t\t$tabla .= \"\t</td>\\n\";\n\n\t\t$tabla .= \"</tr>\\n\";\n\t\t$i++;\n\t}\n\t$tabla .= \"</table>\\n\";\n}\n\n$tabla .= '\n<input id=\"totalitem\" name=\"totalitem\" type=\"hidden\" value=\"'.$i.'\">\n</form>\n</div>\n';\n\t\t$data['content'] = $tabla;\n\t\t$data['title'] = $title;\n\t\t$data['head'] = $styles;\n\t\t$data['head'] .= $script;\n\t\t$this->load->view('view_ventanas_lite',$data);\n\t}", "final public function print_editor_options() {\r\n\t\tob_start(); ?>\r\n\t\t<div class=\"field-settings-wrapper\" v-if=\"field.type == '<?php echo esc_attr( $this->props['type'] ) ?>'\">\r\n\t\t\t<?php $this->get_editor_options(); ?>\r\n\t\t\t<?php $this->get_visibility_settings() ?>\r\n\t\t</div>\r\n\t\t<?php return ob_get_clean();\r\n\t}", "public function editFormPrint(Request $request)\n\t{\n\n\t\t$order_id = $request->id;\n\t\t//order info\n\t\t$order= DB::table('mr_order_entry AS OE')\n\t\t\t\t\t->where('OE.order_id', $order_id)\n\t\t\t\t\t->select([\n\t\t\t\t\t\t\"OE.order_id\",\n\t\t\t\t\t\t\"OE.order_code\",\n\t\t\t\t\t\t\"OE.unit_id\",\n\t\t\t\t\t\t\"u.hr_unit_name\",\n\t\t\t\t\t\t\"b.b_name\",\n\t\t\t\t\t\t\"br.br_name\",\n\t\t\t\t\t\t\"s.se_name\",\n\t\t\t\t\t\t\"stl.stl_no\",\n\t\t\t\t\t\t\"OE.mr_style_stl_id\",\n\t\t\t\t\t\t\"OE.order_ref_no\",\n\t\t\t\t\t\t\"OE.order_qty\",\n\t\t\t\t\t\t\"OE.order_delivery_date\",\n\t\t \t\t\t\"stl.stl_img_link\"\n\t\t\t\t\t])\n\t\t\t\t\t->leftJoin('hr_unit AS u', 'u.hr_unit_id', 'OE.unit_id')\n\t\t\t\t\t->leftJoin('mr_buyer AS b', 'b.b_id', 'OE.mr_buyer_b_id')\n\t\t\t\t\t->whereIn('b.b_id', auth()->user()->buyer_permissions())\n\t\t\t\t\t->leftJoin('mr_brand AS br', 'br.br_id', 'OE.mr_brand_br_id')\n\t\t\t\t\t->leftJoin('mr_season AS s', 's.se_id', 'OE.mr_season_se_id')\n\t\t\t\t\t->leftJoin('mr_style AS stl', 'stl.stl_id', \"OE.mr_style_stl_id\")\n\t\t\t\t\t->first();\n\n\t\t//id= Style Id\n\t\t$id= $order->mr_style_stl_id;\n\n\t\t// Other Costs of style for showing\n\t\t$style_other_costing= BomOtherCosting::where('mr_style_stl_id', $id)->first();\n\n //sampleTypes\n\t\t$samples = DB::table(\"mr_stl_sample AS ss\")\n\t\t\t\t\t\t->select(DB::raw(\"GROUP_CONCAT(st.sample_name SEPARATOR ', ') AS name\"))\n\t\t\t\t\t\t->leftJoin(\"mr_sample_type AS st\", \"st.sample_id\", \"ss.sample_id\")\n\t\t\t\t\t\t->where(\"ss.stl_id\", $id)\n\t\t\t\t\t\t->first();\n\n //operations\n\t\t$operations = DB::table(\"mr_style_operation_n_cost AS oc\")\n\t\t\t\t\t\t->select(\"o.opr_name\")\n\t\t\t\t\t\t->select(DB::raw(\"GROUP_CONCAT(o.opr_name SEPARATOR ', ') AS name\"))\n\t\t\t\t\t\t->leftJoin(\"mr_operation AS o\", \"o.opr_id\", \"oc.mr_operation_opr_id\")\n\t\t\t\t\t\t->where(\"oc.mr_style_stl_id\", $id)\n\t\t\t\t\t\t->first();\n\n //machines\n\t\t$machines = DB::table(\"mr_style_sp_machine AS sm\")\n\t\t\t\t\t\t->select(DB::raw(\"GROUP_CONCAT(m.spmachine_name SEPARATOR ', ') AS name\"))\n\t\t\t\t\t\t->leftJoin(\"mr_special_machine AS m\", \"m.spmachine_id\", \"sm.spmachine_id\")\n\t\t\t\t\t\t->where(\"sm.stl_id\", $id)\n\t\t\t\t\t\t->first();\n\n\t\t/*\n\t\t* LOAD BOM ITEM DATA\n\t\t*---------------------------------------------\n\t\t*/\n\t\t$boms = DB::table(\"mr_order_bom_costing_booking AS b\")\n\t\t->select(\n\t\t\t\"b.*\",\n\t\t\t\"c.mcat_name\",\n\t\t\t\"i.item_name\",\n\t\t\t\"i.item_code\",\n\t\t\t\"mc.clr_code\",\n\t\t\t\"s.sup_name\",\n\t\t\t\"a.art_name\",\n\t\t\t\"com.comp_name\",\n\t\t\t\"con.construction_name\",\n\t\t\t\"OE.order_qty\"\n\t\t)\n\t\t->leftJoin(\"mr_material_category AS c\", function($join) {\n\t\t\t$join->on(\"c.mcat_id\", \"=\", \"b.mr_material_category_mcat_id\");\n\t\t})\n\t\t->leftJoin(\"mr_cat_item AS i\", function($join) {\n\t\t\t$join->on(\"i.mcat_id\", \"=\", \"b.mr_material_category_mcat_id\");\n\t\t\t$join->on(\"i.id\", \"=\", \"b.mr_cat_item_id\");\n\t\t})\n\t\t->leftJoin(\"mr_material_color AS mc\", \"mc.clr_id\", \"b.clr_id\")\n\t\t->leftJoin(\"mr_supplier AS s\", \"s.sup_id\", \"b.mr_supplier_sup_id\")\n\t\t->leftJoin(\"mr_article AS a\", \"a.id\", \"b.mr_article_id\")\n\t\t->leftJoin(\"mr_composition AS com\", \"com.id\", \"b.mr_composition_id\")\n\t\t->leftJoin(\"mr_construction AS con\", \"con.id\", \"b.mr_construction_id\")\n\t\t->where(\"b.order_id\", $order_id)\n\t\t->leftJoin('mr_order_entry AS OE', 'OE.order_id', 'b.order_id')\n\t\t->leftJoin(\"mr_material_sub_cat as scat\", \"i.mr_material_sub_cat_id\", \"scat.msubcat_id\")\n\t\t->orderBy(\"i.tab_index\")\n\t\t->orderBy(\"scat.subcat_index\");\n\n\t\t$boms_pluck = $boms->pluck('mcat_name','id')->toArray();\n\t\t$boms = $boms->get();\n\n\t\t// echo \"<pre>\"; print_r($boms);exit;\n\t\t$bomItemData = \"\";\n\t\t$previousCategory = null;\n\t\t$previousCategoryName = null;\n\t\t$loop = 0;\n\t\t$sub_stl_cost=0;\n\t\t$subtotalName = \"no_category\";\n\t #------------------------------------\n\t $boms_pluck_count = array_count_values($boms_pluck);\n\t\tforeach ($boms as $bom)\n\t\t{\n\t\t\t#---- Style Total Cost for showing ----------------#\n\t\t\tif($bom->mr_style_stl_id!=null){\n\t\t\t\t$stl_total= DB::table('mr_stl_bom_n_costing')\n\t\t\t\t->where('id', $bom->mr_style_stl_id)\n\t\t\t\t->where('mr_material_category_mcat_id', $bom->mr_material_category_mcat_id)\n\t\t\t\t->where('mr_cat_item_id', $bom->mr_cat_item_id)\n\t\t\t\t->select([\n\t\t\t\t\t'consumption',\n\t\t\t\t\t'precost_unit_price'\n\t\t\t\t])\n\t\t\t\t->first();\n\t\t\t\t//dd($stl_total);\n\n\t\t\t\tif($stl_total){\n\t\t\t\t \t$stl_extra_qty = ($bom->consumption/100)*$bom->extra_percent;\n\n\t\t\t\t\t$stl_consumptionEx = $bom->consumption + $stl_extra_qty;\n\n\t\t\t\t\t$stl_cost = $stl_consumptionEx*$stl_total->precost_unit_price;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$stl_cost=0;\n\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$stl_cost=0;\n\t\t\t}\n\t\t\t//--- Style Total Cost for showing\n\n\t\t\t//$total_price = $bom->consumption*$bom->precost_unit_price;\n\t\t\t// show subtotal\n\t\t\tif ($loop == 0)\n\t\t\t{\n\t\t\t\t$previousCategory = $bom->mr_material_category_mcat_id;\n\t\t\t\t$previousCategoryName = $bom->mcat_name;\n\t\t\t}\n\t\t\telse if (($previousCategory != $bom->mr_material_category_mcat_id))\n\t\t\t{\n\t\t\t\tif ($previousCategory==1)\n\t\t\t\t{\n\t\t\t\t\t$subtotalName = \"total_fabric\";\n\t\t\t\t}\n\t\t\t\telse if ($previousCategory==2)\n\t\t\t\t{\n\t\t\t\t\t$subtotalName = \"total_sewing\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$subtotalName = \"total_finishing\";\n\t\t\t\t}\n\n\t\t\t\t$bomItemData .= \"<tr><td class='no-border-right'><b> Total $previousCategoryName Price</b></td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td >&nbsp;</td><td class='no-border-right'></td><td class='no-border-right'></td><td></td><td><input name=\\\"$subtotalName\\\" id=\\\"$subtotalName\\\" type=\\\"text\\\" class=\\\"fob form-control input-sm subtotal\\\" data-subtotal=\\\"$previousCategory\\\" placeholder=\\\"Sub Total\\\" readonly value=\\\"0\\\" step=\\\"any\\\"/></td>\n\t\t\t\t<td><input name=\\\"stl_$subtotalName\\\" type=\\\"text\\\" class=\\\"form-control input-sm _style_subtotal\\\" style-data-subtotal=\\\"$previousCategory\\\" placeholder=\\\"Style Sub Total\\\" readonly value=\\\"$sub_stl_cost\\\" style='background: #feffb6 !important'></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t</tr>\";\n\t\t\t\t//newAdd\n\t\t\t\tif($subtotalName == 'total_finishing'){\n\t\t\t\t\t$bomItemData .= \"<tr>\n\t\t\t\t\t\t<td class='no-border-right'><b> Total Sewing and Finishing Accessories Price</b></td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'></td>\n\t\t\t\t\t\t<td class='no-border-right'></td>\n\t\t\t\t\t\t<td class='no-border-right'></td>\n\t\t\t\t\t\t<td class='no-border-right'></td>\n\t\t\t\t\t\t<td class='no-border-right'></td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t<td style=\\\"padding: 8px 4px 8px 0px;\\\"> \n\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"total_sewing_n_finishing_price\\\" id=\\\"total_sewing_n_finishing_price\\\" class=\\\"form-control input-sm\\\" readonly=\\\"readonly\\\" style='background: #feff00 !important; color: black;'>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\";\n\t\t\t\t}\n\n\t\t\t\t$previousCategory = $bom->mr_material_category_mcat_id;\n\t\t\t\t$previousCategoryName = $bom->mcat_name;\n\t\t\t\t$sub_stl_cost=0;\n\t\t\t}\n\t\t\t// ---------------------------------\n\n\t\t\t$extra_qty = ($bom->consumption/100)*$bom->extra_percent;\n\t\t\t$consumptionEx = $bom->consumption + $extra_qty;\n\t\t\t$total_price = $consumptionEx*$bom->precost_unit_price;\n\t\t\t$total = $bom->consumption+$extra_qty;\n\t\t\t$precost_req_pre = ($bom->consumption * $bom->extra_percent)/100;\n\t\t\t$precost_req_qty = ($bom->consumption + $precost_req_pre) * $order->order_qty;\n\t\t\t$total_value = $bom->precost_unit_price * $precost_req_qty;\n\t\t\t$trRowColor = '';\n\t\t\tif($bom->po_no != null) {\n\t\t\t\t$trRowColor = \"style='background-color: lightgoldenrodyellow;'\";\n\t\t\t}\n\t\t\tif(isset($boms_pluck_count[$bom->mcat_name])) {\n\t\t\t\t$row_count = $boms_pluck_count[$bom->mcat_name];\n\t\t\t\t$mcat_name = \"<td rowspan='$row_count'>$bom->mcat_name</td>\";\n\t\t\t\tunset($boms_pluck_count[$bom->mcat_name]);\n\t\t\t} else {\n\t\t\t\t$mcat_name = '';\n\t\t\t}\n\t\t\t$bomItemData .= \"<tr $trRowColor>\n\t\t\t$mcat_name\n\t\t\t<td>$bom->item_name</td>\n\t\t\t<td>$bom->item_code</td>\n\t\t\t<td>$bom->item_description</td>\n\t\t\t<td><span class='label' style=\\\"color:#87B87F;border:1px solid;background:$bom->clr_code\\\">$bom->clr_code</span></td>\n\t\t\t<td>$bom->size</td>\n\t\t\t<td>$bom->art_name</td>\n\t\t\t<td>$bom->comp_name</td>\n\t\t\t<td>$bom->construction_name</td>\n\t\t\t<td>$bom->sup_name</td>\n\t\t\t<td class='consumption'>\n\t\t\t<input type=\\\"hidden\\\" name=\\\"mr_style_stl_id\\\" value=\\\"$id\\\"/>\n\t\t\t<input type=\\\"hidden\\\" name=\\\"id[]\\\" value=\\\"$bom->id\\\"/>\n\t\t\t$bom->consumption\n\t\t\t</td>\n\t\t\t<td class='extra'>$bom->extra_percent</td>\n\t\t\t<td>$bom->uom</td>\n\t\t\t<td>\n\t\t\t<div class=\\\"radio\\\" style=\\\"margin:0\\\">\n\t\t\t<label style=\\\"font-size:9px;min-height:0\\\">\n\t\t\t<input type=\\\"radio\\\" name=\\\"bom_term[$loop]\\\" value=\\\"FOB\\\" class=\\\"bom_term\\\" style=\\\"margin-top:0\\\" \".($bom->bom_term=='FOB'?'checked':null).\"> FOB\n\t\t\t</label>\n\t\t\t</div>\n\t\t\t<div class=\\\"radio\\\" style=\\\"margin:0\\\">\n\t\t\t<label style=\\\"font-size:9px;min-height:0\\\">\n\t\t\t<input type=\\\"radio\\\" name=\\\"bom_term[$loop]\\\" value=\\\"C&F\\\" class=\\\"bom_term\\\" style=\\\"margin-top:0\\\" \".($bom->bom_term=='C&F'?'checked':null).\"> C&F\n\t\t\t</label>\n\t\t\t</div>\n\t\t\t</td>\n\t\t\t<td><input name=\\\"precost_fob[]\\\" type=\\\"text\\\" class=\\\"fob form-control input-sm\\\" placeholder=\\\"FOB\\\" value=\\\"$bom->precost_fob\\\" step=\\\"any\\\" data-validation=\\\"required\\\" autocomplete=\\\"off\\\" \".($bom->bom_term=='C&F'?'readonly':null).\"/></td>\n\t\t\t<td><input name=\\\"precost_lc[]\\\" type=\\\"text\\\" class=\\\"lc form-control input-sm\\\" placeholder=\\\"L/C\\\" value=\\\"$bom->precost_lc\\\" step=\\\"any\\\" data-validation=\\\"required\\\" autocomplete=\\\"off\\\" \".($bom->bom_term=='C&F'?'readonly':null).\"/></td>\n\t\t\t<td><input name=\\\"precost_freight[]\\\" type=\\\"text\\\" class=\\\"freight form-control input-sm\\\" placeholder=\\\"Freight\\\" value=\\\"$bom->precost_freight\\\" step=\\\"any\\\" data-validation=\\\"required\\\" autocomplete=\\\"off\\\" \".($bom->bom_term=='C&F'?'readonly':null).\"/></td>\n\t\t\t<td><input name=\\\"precost_unit_price[]\\\" type=\\\"text\\\" min='0' step=\\\"any\\\" class=\\\"form-control input-sm unit_price\\\" placeholder=\\\"Unit Price\\\" value=\\\"$bom->precost_unit_price\\\" data-validation=\\\"required\\\" autocomplete=\\\"off\\\"/></td>\n\t\t\t<td><input type=\\\"text\\\" class=\\\"form-control input-sm total_price total_category_price\\\" data-cat-id=\\\"$bom->mr_material_category_mcat_id\\\" placeholder=\\\"Total Price\\\" value=\\\"$total_price\\\" step=\\\"any\\\" data-validation=\\\"required\\\" readonly/></td>\n\t\t\t<td><input type=\\\"text\\\" class=\\\"form-control stl_total_price input-sm\\\" name=\\\"style_cost[]\\\" placeholder=\\\"Style Total Price\\\" value=\\\"\".$stl_cost.\"\\\" step=\\\"any\\\" readonly style='background: #feffb6 !important'></td>\n\n\t\t\t<td><input name=\\\"precost_req_qty[]\\\" readonly type=\\\"text\\\" class=\\\"form-control input-sm required_qty\\\" placeholder=\\\"Req. Qty\\\" value=\\\"\".($precost_req_qty).\"\\\" step=\\\"any\\\" data-validation=\\\"required\\\" autocomplete=\\\"off\\\"/></td>\n\t\t\t<td><input name=\\\"precost_value[]\\\" readonly type=\\\"text\\\" class=\\\"form-control input-sm total_val\\\" placeholder=\\\"Precost Value\\\" value=\\\"$total_value\\\" step=\\\"any\\\" data-validation=\\\"required\\\" autocomplete=\\\"off\\\"/></td>\n\t\t\t</tr>\";\n\n\t\t\t$sub_stl_cost= (float)$sub_stl_cost+ (float)$stl_cost;\n\t\t\t// show subtotal\n\t\t\tif ($loop+1 == sizeof($boms))\n\t\t\t{\n\t\t\t\tif ($previousCategory==1)\n\t\t\t\t{\n\t\t\t\t\t$subtotalName = \"total_fabric\";\n\t\t\t\t}\n\t\t\t\telse if ($previousCategory==2)\n\t\t\t\t{\n\t\t\t\t\t$subtotalName = \"total_sewing\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$subtotalName = \"total_finishing\";\n\t\t\t\t}\n\t\t\t\t$bomItemData .= \"<tr><td class='no-border-right'><b> Total $previousCategoryName Price</b></td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td><td >&nbsp;</td><td class='no-border-right'></td><td class='no-border-right'></td><td></td><td><input name=\\\"$subtotalName\\\" id=\\\"$subtotalName\\\" type=\\\"text\\\" class=\\\"fob form-control input-sm subtotal\\\" data-subtotal=\\\"$previousCategory\\\" placeholder=\\\"Sub Total\\\" readonly value=\\\"0\\\" step=\\\"any\\\"/></td>\n\t\t\t\t<td><input name=\\\"stl_$subtotalName\\\" type=\\\"text\\\" class=\\\"form-control input-sm _style_subtotal\\\" style-data-subtotal=\\\"$previousCategory\\\" placeholder=\\\"Style Sub Total\\\" readonly value=\\\"$sub_stl_cost\\\" style='background: #feffb6 !important'></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t</tr>\";\n\t\t\t\t//newAdd\n\t\t\t\tif($subtotalName == 'total_finishing'){\n\t\t\t\t\t$bomItemData .= \"<tr>\n\t\t\t\t\t\t<td class='no-border-right'><b> Total Sewing and Finishing Accessories Price</b></td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'>&nbsp;</td><td class='no-border-right'>&nbsp;</td>\n\t\t\t\t\t\t<td class='no-border-right'></td>\n\t\t\t\t\t\t<td class='no-border-right'></td>\n\t\t\t\t\t\t<td class='no-border-right'></td>\n\t\t\t\t\t\t<td class='no-border-right'></td>\n\t\t\t\t\t\t<td class='no-border-right'></td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t<td style=\\\"padding: 8px 4px 8px 0px;\\\"> \n\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"total_sewing_n_finishing_price\\\" id=\\\"total_sewing_n_finishing_price\\\" class=\\\"form-control input-sm\\\" readonly=\\\"readonly\\\" style='background: #feff00 !important; color: black; '>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\";\n\t\t\t\t}\n\n\t\t\t\t$sub_stl_cost=0;\n\t\t\t}\n\t\t\t// ---------------------------------\n\n\t\t\t$loop++;\n\t\t}\n\t\t/*\n\t\t* LOAD STYLE OPERATION & COST\n\t\t*---------------------------------------------\n\t\t*/\n\t\t$special_operation = DB::table(\"mr_order_operation_n_cost AS oc\")\n\t\t->select(\n\t\t\t\"oc.*\",\n\t\t\t\"o.opr_name\"\n\t\t)\n\t\t->leftJoin(\"mr_operation AS o\", \"o.opr_id\", \"=\", \"oc.mr_operation_opr_id\")\n\t\t->where(\"oc.mr_order_entry_order_id\", $request->segment(3))\n\t\t->where(\"oc.opr_type\", 2)\n\t\t->get();\n\n\t\t//dd($special_operation);\n\n\t\tforeach ($special_operation as $spo)\n\t\t{\n\t\t\t$bomItemData .= \"\n\t\t\t<tr>\n\t\t\t<td ><b>$spo->opr_name</b></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td>1</td>\n\t\t\t<td>0</td>\n\t\t\t<td>\".$spo->uom.\"</td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td>\n\t\t\t<input type=\\\"hidden\\\" name=\\\"style_op_id[]\\\" value=\\\"$spo->order_op_id\\\"/>\n\t\t\t<input type=\\\"text\\\" min='0' step=\\\"any\\\" name=\\\"unit_price[]\\\" class=\\\"form-control input-sm sp_price\\\" placeholder=\\\"Unit Price\\\" value=\\\"$spo->unit_price\\\"/>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t<input type=\\\"text\\\" class=\\\"form-control input-sm sp_total_price total_price\\\" placeholder=\\\"Total Price\\\" value=\\\"$spo->unit_price\\\" step=\\\"any\\\" readonly/>\n\t\t\t</td>\n\t\t\t<td><input type=\\\"text\\\" class=\\\"form-control input-sm _style_subtotal\\\" placeholder=\\\"Style Unit Price\\\" value=\\\"$spo->unit_price\\\" readonly style='background: #feffb6 !important' ></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t</tr>\";\n\t\t}\n\t\t/*\n\t\t* LOAD OTHER COST\n\t\t*---------------------------------------------\n\t\t*/\n\t\t$other_cost = OrderBomOtherCosting::where('mr_order_entry_order_id', $request->segment(3))->first(); //dd($other_cost);\n\t\tif($other_cost!=null){\n\n\t\t\t$buyer_commision = floatval($other_cost->buyer_fob) - floatval($other_cost->net_fob);\n\t\t\t$agent_commision = floatval($other_cost->agent_fob) - floatval($other_cost->buyer_fob);\n\t\t\t$style_buyer_commision = $style_other_costing->buyer_fob - $style_other_costing->net_fob;\n\t\t\t$style_agent_commision = $style_other_costing->agent_fob - $style_other_costing->buyer_fob;\n\t }\n\t else{\n\t \t$buyer_commision = 0;\n\t \t$agent_commision = 0;\n\t \t$style_buyer_commision = 0;\n\t \t$style_agent_commision = 0;\n\t }\n\n\t\t$bomItemData .= \"\n\n\t\t<tr>\n\t\t<td ><b>Testing Cost</b></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td class='consumption'><input type=\\\"hidden\\\" name=\\\"other_cost_id\\\" value=\\\"$other_cost->id\\\"/>1</td>\n\t\t<td>0</td>\n\t\t<td>Piece</td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td>\n\t\t<input name=\\\"testing_cost\\\" type=\\\"number\\\" min='0' step=\\\"any\\\" class=\\\"form-control input-sm sp_price\\\" placeholder=\\\"Unit Price\\\" value=\\\"$other_cost->testing_cost\\\"/>\n\t\t</td>\n\t\t<td>\n\t\t<input type=\\\"text\\\" class=\\\"form-control input-sm total_price sp_total_price\\\" placeholder=\\\"Total Price\\\" value=\\\"$other_cost->testing_cost\\\" step=\\\"any\\\" readonly/>\n\t\t</td>\n\t\t<td><input type=\\\"text\\\" class=\\\"form-control input-sm _style_subtotal\\\" placeholder=\\\"Testing Cost\\\" value=\\\"$style_other_costing->testing_cost\\\" step=\\\"any\\\" readonly style='background: #feffb6 !important'></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td ><b>CM</b></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td class='consumption'>1</td>\n\t\t<td>0</td>\n\t\t<td>Piece</td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td>\n\t\t<input name=\\\"cm\\\" type=\\\"number\\\" min='0' step=\\\"any\\\" class=\\\"form-control input-sm sp_price\\\" placeholder=\\\"Unit Price\\\" value=\\\"$other_cost->cm\\\"/>\n\t\t</td>\n\t\t<td>\n\t\t<input type=\\\"text\\\" class=\\\"form-control input-sm total_price sp_total_price\\\" placeholder=\\\"Total Price\\\" value=\\\"$other_cost->cm\\\" step=\\\"any\\\" readonly/>\n\t\t</td>\n\t\t<td><input type=\\\"text\\\" class=\\\"form-control input-sm _style_subtotal\\\" placeholder=\\\"CM\\\" value=\\\"$style_other_costing->cm\\\" readonly style='background: #feffb6 !important' ></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td><b>Commercial cost</b></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td class='text-left'></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td>\n\t\t\t\t<input name=\\\"commercial_cost\\\" type=\\\"number\\\" min='0' step=\\\"any\\\" class=\\\"form-control input-sm sp_price\\\" placeholder=\\\"Price Unit\\\" value=\\\"$other_cost->commercial_cost\\\"/>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<input type=\\\"text\\\" class=\\\"form-control input-sm sp_total_price total_price\\\" placeholder=\\\"Commercial cost\\\" value=\\\"$other_cost->commercial_cost\\\" step=\\\"any\\\" readonly/>\n\t\t\t</td>\n\t\t\t<td><input type=\\\"text\\\" class=\\\"form-control input-sm _style_subtotal\\\" placeholder=\\\"Style Commercial cost\\\" value=\\\"$style_other_costing->commercial_cost\\\" readonly style='background: #feffb6 !important' ></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td ><b>Net FOB</b> </td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td>\n\t\t\t\t<input name=\\\"net_fob\\\" type=\\\"text\\\" class=\\\"form-control input-sm net_fob\\\" placeholder=\\\"Net FOB\\\" value=\\\"$other_cost->net_fob\\\" step=\\\"any\\\" readonly/>\n\t\t\t</td>\n\t\t\t<td><input type=\\\"text\\\" class=\\\"form-control input-sm _style_subtotal\\\" placeholder=\\\"Style Net FOB\\\" value=\\\"$style_other_costing->net_fob\\\" readonly style='background: #feffb6 !important' ></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td ><b>Buyer Commision</b></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td><input name=\\\"buyer_comission_percent\\\" type=\\\"number\\\" min='0' step=\\\"any\\\" class=\\\"form-control input-sm buyer_comission_percent\\\" placeholder=\\\"Buyer Commision\\\" value=\\\"$other_cost->buyer_comission_percent\\\" style=\\\"width:56px\\\"></td>\n\t\t\t<td class='text-left'>%</td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td>\n\t\t\t\t<input type=\\\"text\\\" name=\\\"buyer_commision\\\" class=\\\"form-control input-sm buyer_price sp_price\\\" placeholder=\\\"Unit Price\\\" value=\\\"$buyer_commision\\\" step=\\\"any\\\" readonly/>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<input type=\\\"text\\\" class=\\\"form-control input-sm buyer_total_price sp_total_price\\\" placeholder=\\\"Buyer Commision \\\" value=\\\"$buyer_commision\\\" step=\\\"any\\\" readonly/>\n\t\t\t</td>\n\t\t\t<td><input type=\\\"text\\\" class=\\\"form-control input-sm _style_subtotal\\\" placeholder=\\\"Style Buyer Commision\\\" value=\\\"$style_buyer_commision\\\" readonly style='background: #feffb6 !important' ></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td ><b>Buyer FOB</b> </td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td>\n\t\t\t\t<input name=\\\"buyer_fob\\\" type=\\\"text\\\" class=\\\"form-control input-sm buyer_fob\\\" placeholder=\\\"Buyer FOB\\\" value=\\\"$other_cost->buyer_fob\\\" step=\\\"any\\\" readonly/>\n\t\t\t</td>\n\t\t\t<td><input type=\\\"text\\\" class=\\\"form-control input-sm _style_subtotal\\\" placeholder=\\\"Style Buyer FOB\\\" value=\\\"$style_other_costing->buyer_fob\\\" readonly style='background: #feffb6 !important' ></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td ><b>Agent Commision</b></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td><input name=\\\"agent_comission_percent\\\" type=\\\"number\\\" min='0' step=\\\"any\\\" class=\\\"form-control input-sm agent_comission_percent\\\" placeholder=\\\"Agent Commision\\\" value=\\\"$other_cost->agent_comission_percent\\\" style=\\\"width:56px\\\"></td>\n\t\t\t<td class='text-left'>%</td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td>\n\t\t\t\t<input type=\\\"text\\\" name=\\\"agent_commision\\\" class=\\\"form-control input-sm agent_price sp_price\\\" placeholder=\\\"Unit Price\\\" value=\\\"$agent_commision\\\" step=\\\"any\\\" readonly />\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<input type=\\\"text\\\" class=\\\"form-control input-sm agent_total_price sp_total_price\\\" placeholder=\\\"Agent Commision \\\" value=\\\"$agent_commision\\\" step=\\\"any\\\" readonly/>\n\t\t\t</td>\n\t\t\t<td><input type=\\\"text\\\" class=\\\"form-control input-sm _style_subtotal\\\" placeholder=\\\"Style Buyer Commision\\\" value=\\\"$style_agent_commision\\\" readonly style='background: #feffb6 !important' ></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td ><b>Total FOB </b></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t\t<td>\n\t\t\t\t<input name=\\\"agent_fob\\\" type=\\\"text\\\" class=\\\"form-control input-sm agent_fob\\\" placeholder=\\\"Agent FOB\\\" value=\\\"$other_cost->agent_fob\\\" step=\\\"any\\\" readonly/>\n\t\t\t\t<input name=\\\"final_fob\\\" type=\\\"hidden\\\" class=\\\"form-control input-sm total_fob\\\" placeholder=\\\"Commision FOB\\\" value=\\\"$other_cost->agent_fob\\\" readonly/>\n\t\t\t</td>\n\t\t\t<td><input type=\\\"text\\\" class=\\\"form-control input-sm _style_subtotal\\\" placeholder=\\\"Style Agent FOB\\\" value=\\\"$style_other_costing->agent_fob\\\" readonly style='background: #feffb6 !important' ><input type=\\\"hidden\\\" class=\\\"form-control input-sm style_final_fob\\\" placeholder=\\\"Final FOB\\\" value=\\\"$style_other_costing->agent_fob\\\" readonly style='background: #feffb6 !important'></td>\n\t\t\t<td></td>\n\t\t\t<td></td>\n\t\t</tr>\";\n\n\t\t/*\n\t\t* Approval Button\n\t\t*/\n\t\t$buttons = $this->approvalButtons($order_id,$order->unit_id);\n\t\t/*\n\n\t\t/*\n\t\t* LOAD STYLE OPERATION & COST\n\t\t*---------------------------------------------\n\t\t*/\n\n\t\t$check_booking = OrderBOM::where('order_id', $order_id)\n\t\t\t\t\t\t\t->where('booking_qty', '!=', null)\n\t\t\t\t\t\t\t->exists();\n\t\treturn view(\"merch.order_costing.order_costing_print\", compact(\n\t\t\"order\",\n\t\t\"samples\",\n\t\t\"operations\",\n\t\t\"machines\",\n\t\t\"bomItemData\",\n\t\t\"buttons\",\n\t\t\"check_booking\"\n\t\t));\n\t}", "function beaver_extender_fe_style_editor_build_form() {\n\t\n?>\n\t\t<form action=\"/\" id=\"beaver-extender-fe-style-editor-form\" name=\"beaver-extender-fe-style-editor-form\">\n\t\t\t\n\t\t\t<input type=\"hidden\" name=\"action\" value=\"beaver_extender_fe_style_editor_save\" />\n\t\t\t<input type=\"hidden\" name=\"security\" value=\"<?php echo wp_create_nonce( 'beaver-extender-fe-style-editor' ); ?>\" />\n\t\t\n\t\t\t<div class=\"beaver-extender-fe-style-editor-nav\">\n\t\t\t\t<input id=\"beaver-extender-fe-style-editor-save-button\" type=\"submit\" value=\"<?php _e( 'Save Changes', 'extender' ); ?>\" name=\"Submit\" alt=\"Save Changes\" />\n\t\t\t\t<img class=\"beaver-extender-ajax-save-spinner\" src=\"<?php echo site_url() . '/wp-admin/images/spinner-2x.gif'; ?>\" />\n\t\t\t\t<span class=\"beaver-extender-saved\"></span>\n\t\n\t\t\t\t<span id=\"beaver-extender-fe-style-editor-contract-icon\" class=\"beaver-extender-fe-style-editor-icons dashicons dashicons-editor-contract\"></span>\n\t\t\t\t<span id=\"beaver-extender-fe-style-editor-css-builder-toggle-icon\" class=\"beaver-extender-fe-style-editor-icons dashicons dashicons-admin-customizer\"></span>\n\t\t\t\t<span id=\"beaver-extender-fe-style-editor-search-icon\" class=\"beaver-extender-fe-style-editor-icons dashicons dashicons-search\"></span>\n\t\t\t</div><!-- END .beaver-extender-fe-style-editor-nav -->\n\t\t\t\n\t\t\t<div id=\"beaver-extender-fe-style-editor-container\">\n\t\t\t\t\n\t\t\t\t<textarea data-editor=\"css\" style=\"display:none;\" wrap=\"off\" id=\"beaver-extender-fe-style-editor-output\" class=\"code-builder-output\" name=\"extender[custom_css]\"><?php echo beaver_extender_get_custom_css( 'custom_css' ); ?></textarea>\t\t\t\t\t\n\t\t\t\n\t\t\t</div><!-- END #beaver-extender-fe-style-editor-container -->\n\t\t\n\t\t</form><!-- END #beaver-extender-fe-style-editor-form -->\n<?php\n\t\n}", "protected function getStyles() {\r\n\t\treturn \"\";\r\n\t}", "public function getFormTheme()\n {\n return array_merge(parent::getFormTheme(), ['ZitecRuleEngineBundle:Form:rule_engine.html.twig']);\n }", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "function print_color($value){\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title;\n\t\t$input_value = $this->get_field_value($value['id']);\n\t\techo '<span class=\"numbersign\">&#35;</span><input class=\"option-input option-color\" name=\"'.$value['id'].'\" id=\"'.$value['id'].'\" type=\"text\" value=\"'.$input_value.'\" />';\n\t\techo '<div class=\"color-preview\" style=\"background-color:#'.$input_value.'\"></div>';\n\t\t$this->close_option($value);\n\t}", "private function render_css(): void {\r\n echo JKNCSS::tag('\r\n tr .'.self::cl_dropdown.' {\r\n display: inline-table;\r\n height: 80px;\r\n }\r\n\r\n tr .'.self::cl_dropdown.' th {\r\n width: auto;\r\n max-width: 180px;\r\n height: 40px;\r\n vertical-align: middle;\r\n padding-left: 10px;\r\n }\r\n\r\n .form-table tr {\r\n border-bottom: 1px dashed;\r\n margin-top: 0;\r\n }\r\n \r\n .'.self::cl_intro.' {\r\n background: #fdfdfd;\r\n border: 1px dashed #ddd;\r\n margin-bottom: 5px;\r\n }\r\n\r\n .'.self::cl_p_report.' {\r\n padding: 10px;\r\n }\r\n\r\n .'.self::cl_p_report.' .button {\r\n margin: 0 3px 0 3px;\r\n vertical-align: middle;\r\n }\r\n\r\n .'.self::cl_p_report.' .button:first-child {\r\n margin-left: 0;\r\n }\r\n\r\n .'.self::cl_p_report.' tr {\r\n height: 50px;\r\n vertical-align: middle;\r\n }\r\n\r\n .'.self::cl_p_report.' select {\r\n margin-left: 10px;\r\n margin-right: 25px;\r\n vertical-align: middle;\r\n }\r\n \r\n a.disabled, a.disabled:hover {\r\n color: #222;\r\n cursor: wait;\r\n }\r\n \r\n .'.self::cl_lg_report_true.' {\r\n color: #21a847;\r\n }\r\n \r\n .'.self::cl_lg_report_false.' {\r\n color: #ad0f0f;\r\n }\r\n \r\n #'.self::id_main.' {\r\n background: #dedede;\r\n }\r\n\r\n .'.self::cl_p_report_table.' {\r\n background: #fefefe;\r\n width: 100%;\r\n padding-bottom: 10px;\r\n padding-top: 10px;\r\n border-bottom: 5px solid #dedede;\r\n }\r\n\r\n #'.self::id_main.' {\r\n padding: 5px;\r\n }\r\n\r\n .'.self::cl_p_report.' tr:nth-child(3) td,\r\n .'.self::cl_p_report.' tr:nth-child(4) td {\r\n border-top: 1px dashed #555;\r\n padding-top: 10px;\r\n }\r\n\r\n .'.self::cl_p_report.' tr:nth-child(3) td {\r\n padding-bottom: 10px;\r\n }\r\n\r\n\r\n #'.self::id_main.' table:first-child {\r\n padding-top: 0;\r\n }\r\n\r\n .'.self::cl_p_report_table.':last-child {\r\n border-bottom: none;\r\n }\r\n .'.self::cl_preload_note.' {\r\n display: inline-block;\r\n padding: 10px;\r\n vertical-align: middle;\r\n border-left: 1px solid #ddd;\r\n }\r\n\r\n #'.self::id_main.' tr:first-child {\r\n height: 30px;\r\n }\r\n\r\n #'.self::id_main.' tr:first-child td {\r\n padding-top: 0;\r\n padding-bottom: 0;\r\n height: 15px;\r\n }\r\n\r\n #'.self::id_main.' h2 {\r\n margin-top: 0;\r\n margin-bottom: 0;\r\n }\r\n ');\r\n }", "public function appendStyles()\n {\n return '';\n }", "protected function getStyles() {\r\n return \"\";\r\n }", "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "public function decorationstylesAction() {\n\t$decs = new Decstyles();\n\t$this->view->decs = $decs->getDecStyles();\n\t}", "function bootstrap_form()\n{\n\twp_register_style( 'boostrap_form', get_template_directory_uri() . '/css/bootstrap.css');\n\twp_enqueue_style('bootstrap_form');\n}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }" ]
[ "0.6935468", "0.69345456", "0.6792859", "0.6765264", "0.66079646", "0.6557212", "0.65504694", "0.64969945", "0.6408599", "0.6378213", "0.6375284", "0.63278544", "0.62328", "0.6194642", "0.61486685", "0.61189866", "0.6104056", "0.60786146", "0.6048365", "0.6044863", "0.60039926", "0.59595746", "0.595784", "0.59543324", "0.5936968", "0.5853935", "0.58326256", "0.5830154", "0.5788769", "0.57696587", "0.5764168", "0.57439536", "0.57308286", "0.5720953", "0.56936014", "0.5674716", "0.5649706", "0.5623115", "0.5613121", "0.55857927", "0.55820596", "0.5579339", "0.55778813", "0.5565878", "0.5563009", "0.55470407", "0.5524518", "0.5505884", "0.55051947", "0.5503044", "0.5489422", "0.546862", "0.54622245", "0.5459094", "0.5454444", "0.5447838", "0.544644", "0.54318774", "0.5420813", "0.5418997", "0.54089475", "0.5406081", "0.5400142", "0.53965133", "0.53842103", "0.538357", "0.5371657", "0.5370132", "0.53691643", "0.5369032", "0.5368417", "0.535888", "0.5358862", "0.5347964", "0.5343715", "0.5337656", "0.53364366", "0.53330743", "0.53325033", "0.53125834", "0.5311188", "0.53067917", "0.529005", "0.52846456", "0.5283994", "0.52797306", "0.52710515", "0.5269446", "0.5266571", "0.52642334", "0.52602494", "0.52389264", "0.52293366", "0.52237624", "0.5217752", "0.5217649", "0.52164", "0.5206231", "0.5205015", "0.51997983" ]
0.77675277
0
Set body classes to apply different form styling.
public function set_body_classes( $classes ) { if ( ! empty( $this->form_data['settings']['conversational_forms_custom_logo'] ) ) { $classes[] = 'wpforms-conversational-form-custom-logo'; } return $classes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setBodyClass($class) {\r\n $this->bodyClass = \"class=\\\"$class\\\"\";\r\n }", "public function setBodyClass($class) {\n $this->bodyClass = \"class=\\\"$class\\\"\";\n }", "public function admin_body_class($body_class)\n {\n }", "public function setBodyClass($class) {\n\t\t\t# Prevents duplicate \"index\" classes\n\t\t\tif ($this->_context['page'] != 'index' || $class != 'index')\n\t\t\t\t$this->_body_class .= $class;\n\t\t}", "function add_body_class( $classes ) {\n\n\t$classes[] = 'fl-builder-full';\n\treturn $classes;\n\n}", "function admin_body_class($classes)\n {\n }", "public function addBodyClass($classes)\n {\n $this->data[\"site\"][\"body_class\"] = array_merge(\n $this->data[\"site\"][\"body_class\"],\n (array) $classes\n );\n }", "function set_uwmadison_body_classes( $classes ) {\n\t\tglobal $post;\n\n\t\t$current_layout = get_theme_mod('uwmadison_theme_layout','content-sidebar');\n\n\t\t// set column number class\n\t\t$uwmadison_use_sidebar = get_post_meta( $post->ID, '_uwmadison_use_sidebar', true );\n\n\t\t// default to use sidebar if it has not been set on a page\n\t\tif ( !is_numeric( $uwmadison_use_sidebar ) )\n\t\t\t$uwmadison_use_sidebar = 1;\n\n\t\t// we have a two-column layout if the theme option is set and\n\t\t// it's either not a page or the use_sidebar meta option is \n\t\t// set on the page\n\t\tif ( in_array( $current_layout, array( 'content-sidebar', 'sidebar-content' ) ) && ( !is_singular() || $uwmadison_use_sidebar ))\n\t\t\t$classes[] = 'two-column';\n\t\telse\n\t\t\t$classes[] = 'one-column';\n\n\t\t// set column order class\n\t\tif ( 'content-sidebar' == $current_layout )\n\t\t\t$classes[] = 'right-sidebar';\n\t\telseif ( 'sidebar-content' == $current_layout )\n\t\t\t$classes[] = 'left-sidebar';\n\t\telse\n\t\t\t$classes[] = $current_layout;\n\n\t\t// set body background color option class\n\t $body_bgcolor_class = (get_theme_mod('uwmadison_body_bg','uw-white-bg') == \"uw-white-bg\") ? \"uw-white-bg\" : \"uw-light-gray-bg\";\n\t $classes[] = $body_bgcolor_class;\n\n\t\t// set author class\n\t\tif ( function_exists( 'is_multi_author' ) && ! is_multi_author() )\n\t\t\t$classes[] = 'single-author';\n\n\t\t// set singular class\n\t\tif ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) )\n\t\t\t$classes[] = 'singular';\n\n /**\n * Filter the classes array\n *\n * @param Array $classes The current classes set for <body>\n * @param Array $current_layout The theme option value for current_layout\n */\n\t\t$classes = apply_filters( 'uwmadison_body_classes', $classes, $current_layout );\n\n\t\treturn $classes;\n\t}", "public function admin_body_class($classes)\n {\n }", "private function _addBodyClassAttr()\n {\n $request = $this->app()->request();\n $doc = $this->app()->response()->document();\n $content = $request->param(\"_content_active\");\n\n if ((!$doc instanceof PHPFrame_HTMLDocument)) {\n return;\n }\n\n $body_class = $request->controllerName().\"-\".$request->action();\n\n if ($content instanceof Content) {\n $body_class .= \" content-type-\";\n\n switch (get_class($content)) {\n case \"FeedContent\" :\n $body_class .= \"feed\";\n break;\n case \"MVCContent\" :\n $body_class .= \"mvc\";\n break;\n case \"PageContent\" :\n $body_class .= \"page\";\n break;\n case \"PostContent\" :\n $body_class .= \"post\";\n break;\n case \"PostsCollectionContent\" :\n $body_class .= \"blog\";\n break;\n }\n\n $body_class .= \" content-item-\".$content->id();\n }\n\n $body_node = $doc->dom()->getElementsByTagName(\"body\")->item(0);\n $doc->addNodeAttr($body_node, \"class\", $body_class);\n }", "function flatsome_body_classes( $classes ) {\n\n\n // Change Body Layouts\n if(get_theme_mod('body_layout')) $classes[] = get_theme_mod('body_layout');\n if(get_theme_mod('box_shadow_header')) $classes[] = 'header-shadow';\n if(get_theme_mod('body_bg_type') == 'bg-full-size') $classes[] = 'bg-fill';\n if(get_theme_mod('box_shadow')) $classes[] = 'box-shadow';\n if(get_theme_mod('flatsome_lightbox', 1)) $classes[] = 'lightbox';\n if(get_theme_mod('lazy_load_icons', 0) ) $classes[] = 'lazy-icons';\n if(get_theme_mod('dropdown_arrow', 1)) $classes[] = 'nav-dropdown-has-arrow';\n\n\treturn $classes;\n}", "function admin_body_class( $classes ) {\n\t\tglobal $wp_version;\n\t\t\n\t\t// Determine body class version.\n\t\t$wp_minor_version = floatval( $wp_version );\n\t\tif( $wp_minor_version >= 5.3 ) {\n\t\t\t$classes .= ' acf-admin-5-3';\n\t\t} else {\n\t\t\t$classes .= ' acf-admin-3-8';\n\t\t}\n\t\t\n\t\t// Add browser for specific CSS.\n\t\t$classes .= ' acf-browser-' . acf_get_browser();\n\t\t\n\t\t// Append and return.\n\t\treturn $classes;\n\t}", "public function set_body_class($classes = array())\n {\n $classes[] = 'page-home';\n\n return $classes;\n }", "function _s_add_custom_body_class( $classes ) {\n\t\n\t$body_class = '';\n\t\n \tif( wp_is_mobile() ) {\n\t\t$body_class = 'mobile';\n\t}\n\t\n\t\n\t\n\t// If exists add body class\n\tif( !empty( $body_class ) ) {\n\t\t$classes[] = $body_class;\n\t}\n\t\n\treturn $classes;\n}", "function add_body_class( $classes )\n{\n global $post;\n if ( isset( $post ) ) {\n $classes[] = $post->post_type . '-' . $post->post_name;\n }\n return $classes;\n}", "function add_body_class( $classes )\n{\n global $post;\n if ( isset( $post ) ) {\n $classes[] = $post->post_type . '-' . $post->post_name;\n }\n return $classes;\n}", "function twentytwelve_body_class($classes) {\n $background_color = get_background_color();\n\n if (!is_active_sidebar('sidebar-1') || is_page_template('page-templates/full-width.php'))\n $classes[] = 'full-width';\n\n if (is_page_template('page-templates/store-front-page.php') || is_page_template('page-templates/blank-front-page.php')) {\n $classes[] = 'template-front-page';\n if (has_post_thumbnail())\n $classes[] = 'has-post-thumbnail';\n if (is_active_sidebar('sidebar-2') && is_active_sidebar('sidebar-3'))\n $classes[] = 'two-sidebars';\n }\n\n if (empty($background_color))\n $classes[] = 'custom-background-empty';\n elseif (in_array($background_color, array('fff', 'ffffff')))\n $classes[] = 'custom-background-white';\n\n // Enable custom font class only if the font CSS is queued to load.\n if (wp_style_is('twentytwelve-fonts', 'queue'))\n $classes[] = 'custom-font-enabled';\n\n if (!is_multi_author())\n $classes[] = 'single-author';\n\n return $classes;\n }", "private function __appendBodyClass(array $context = array()){\n\t\t\tforeach($context as $c) {\n\t\t\t\tif (is_numeric($c)) $c = 'id-' . $c;\n\t\t\t\t$body_class .= trim($c) . ' ';\n\t\t\t}\n\t\t\t$classes = array_merge(explode(' ', trim($body_class)), explode(' ', trim($this->_body_class)));\n\t\t\t$body_class = trim(implode(' ', $classes));\n\t\t\tif (!empty($body_class)) $this->Body->setAttribute('class', $body_class);\n\t\t}", "public function body_class ($class) {\n if (is_array($class)) {\n foreach ($class as $k=>$v) {\n $this->body_class = array_merge($this->body_class, array($v => $v));\n }\n } else {\n $this->body_class = array_merge($this->body_class, array($class => $class)); \n }\n return $this;\n }", "function arras_body_class() {\n\tif ( function_exists('body_class') ) {\n\t\t$body_class = array('layout-' . arras_get_option('layout'), 'no-js');\n\t\t\n\t\tif ( !defined('ARRAS_INHERIT_STYLES') || ARRAS_INHERIT_STYLES == true ) {\n\t\t\t$body_class[] = 'style-' . arras_get_option('style');\n\t\t}\t\n\t\t\n\t\treturn body_class( apply_filters('arras_body_class', $body_class) );\n\t}\n}", "function admin_body_class( $classes ) {\n\n\t\t$custom_class = '';\n\n\t\tif ( $this->subtitle ) {\n\t\t\t$custom_class .= ' publisher-field-subtitle ';\n\t\t}\n\n\t\tif ( $this->excerpt ) {\n\t\t\t$custom_class .= ' publisher-field-excerpt ';\n\t\t}\n\n\t\tif ( empty( $custom_class ) ) {\n\t\t\treturn $classes;\n\t\t} else {\n\t\t\treturn $classes . ' publisher-fields-page' . $custom_class;\n\t\t}\n\t}", "function wolf_share_add_body_class( $classes ) {\n\n\t// theme slug body class for default WP themes styling\n\t$classes[] = sanitize_title_with_dashes( get_template() );\n\n\treturn $classes;\n}", "function custom_body_classes( $classes ) {\n\tif ( is_singular( 'page' ) ) {\n\t\tglobal $post;\n\n\t\t$classes[] = 'page-' . $post->post_name;\n\t}\n\n\treturn $classes;\n}", "function madara_body_classes( $classes ) {\n\t\t$classes[] = 'page';\n\n\t\t$header_layout = Madara::getOption( 'header_style', 1 );\n\t\t$classes[] = 'header-style-' . $header_layout;\n\n\t\t// if we are in Full Page template and Sectionized mode, sticky menu should be turned off\n\t\tif ( is_page() && basename( get_page_template() ) == 'fullpage.php' && get_post_meta( get_the_ID(), 'fullpage_autoscrolling', true ) == 'on' ) {\n\t\t\t// do nothing\n\t\t} else {\n\t\t\t$sticky_menu = Madara::getOption( 'nav_sticky', 1 );\n\t\t\t$sticky_navgiation = Madara::getOption( 'manga_reading_sticky_navigation', 'on' );\n\t\t\tif ( $sticky_menu != 0 || $sticky_navgiation == 'on' ) {\n\t\t\t\t$classes[] = 'sticky-enabled';\n\t\t\t\t$classes[] = 'sticky-style-' . $sticky_menu;\n\t\t\t}\n\t\t}\n\n\t\t$sidebar = madara_get_theme_sidebar_setting();\n\t\tif ( $sidebar != 'full' && is_active_sidebar( 'main_sidebar' ) ) {\n\t\t\t$classes[] = 'is-sidebar';\n\t\t}\n\n\n\t\t$user_id = get_current_user_id();\n\t\tif($user_id){\n\t\t\t$body_schema = get_user_meta( $user_id, '_manga_user_site_schema', true);\n\t\t}\n\t\t\n\t\t$body_schema = (isset($body_schema) && $body_schema != '') ? $body_schema : Madara::getOption( 'body_schema', 'light' );\n\t\t\n\t\t$is_manga_reading_page = false;\n\t\tif( function_exists( 'is_manga_reading_page' ) && is_manga_reading_page() ) {\n\t\t\t$is_manga_reading_page = true;\n\t\t}\n\t\t\n\t\tif( $is_manga_reading_page ) {\n\t\t\t//$body_schema = Madara::getOption( 'manga_reading_dark_mode', 'off' ) == 'off' ? 'light' : 'dark';\n\t\t}\n\t\t\n\t\t$overwrite_body_schema = isset( $_GET['body_schema'] ) && $_GET['body_schema'] != '' ? $_GET['body_schema'] : '';\n\n\t\tif ( $overwrite_body_schema != '' ) {\n\t\t\tif ( $overwrite_body_schema == 'dark' ) {\n\t\t\t\t$classes[] = 'text-ui-light';\n\t\t\t} else {\n\t\t\t\t$classes[] = 'text-ui-dark';\n\t\t\t}\n\t\t} else {\n\t\t\tif ( $body_schema == 'light' ) {\n\t\t\t\t$classes[] = 'text-ui-dark';\n\t\t\t} else {\n\t\t\t\t$classes[] = 'text-ui-light';\n\t\t\t}\n\t\t}\n\t\t\n\t\tglobal $wp_manga_setting;\n\t\t\t\n\t\tif(!isset($wp_manga_setting)){\n\t\t\treturn $classes;\n\t\t}\n\n\t\tif ( is_manga_single() || is_manga_reading_page() ) {\n\t\t\t$manga_adult_content = get_post_meta( get_the_ID(), 'manga_adult_content', true );\n\t\t\tif ( ! empty( $manga_adult_content ) && $manga_adult_content[0] == 'yes' ) {\n\t\t\t\t$classes[] = 'adult-content censored';\n\t\t\t}\n\t\t}\n\n\t\tif ( $is_manga_reading_page ) {\n\t\t\tglobal $wp_manga_functions;\n\t\t\t\n\t\t\t$manga_reading_style = isset( $_GET['style'] ) ? $_GET['style'] : $wp_manga_functions->get_reading_style();\n\t\t\t\n\t\t\t$classes[] = 'manga-reading-' . $manga_reading_style . '-style';\n\t\t}\n\t\t\n\t\t$manga_archives_item_type_icon = Madara::getOption('manga_archives_item_type_icon', 'off');\n\t\tif($manga_archives_item_type_icon == 'on'){\n\t\t\t$classes[] = 'manga-type-icon';\n\t\t}\n\t\t\n\t\t$minimal_reading_layout = Madara::getOption('minimal_reading_page', 'off');\n\t\tif($minimal_reading_layout == 'on'){\n\t\t\t$classes[] = 'minimal-reading-layout';\n\t\t}\n\t\t\n\t\t$sticky_for_mobile = Madara::getOption('manga_reading_sticky_navigation_mobile', 'off');\n\t\tif($sticky_for_mobile == 'on'){\n\t\t\t$classes[] = 'sticky-for-mobile';\n\t\t}\n\n\t\treturn $classes;\n\t}", "public function renderBodyClass() {\n\t\t$page = $this->wire('page');\n\t\t$bodyClass = $this->wire('input')->get->modal ? 'modal ' : '';\n\t\t$bodyClass .= \"id-{$page->id} template-{$page->template->name}\";\n\t\tif(wire('config')->js('JqueryWireTabs')) $bodyClass .= \" hasWireTabs\";\n\t\treturn $bodyClass; \n\t}", "function twentytwelve_body_class( $classes ) {\n\t$background_color = get_background_color();\n\n\tif ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/full-width.php' ) )\n\t\t$classes[] = 'full-width';\n\n\tif ( is_page_template( 'page-templates/front-page.php' ) ) {\n\t\t$classes[] = 'template-front-page';\n\t\tif ( has_post_thumbnail() )\n\t\t\t$classes[] = 'has-post-thumbnail';\n\t\tif ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) )\n\t\t\t$classes[] = 'two-sidebars';\n\t}\n\n\tif ( empty( $background_color ) )\n\t\t$classes[] = 'custom-background-empty';\n\telseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) )\n\t\t$classes[] = 'custom-background-white';\n\n\t// Enable custom font class only if the font CSS is queued to load.\n\tif ( wp_style_is( 'twentytwelve-fonts', 'queue' ) )\n\t\t$classes[] = 'custom-font-enabled';\n\n\tif ( ! is_multi_author() )\n\t\t$classes[] = 'single-author';\n\n\treturn $classes;\n}", "function twentytwelve_body_class( $classes ) {\n\t$background_color = get_background_color();\n\n\tif ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/full-width.php' ) )\n\t\t$classes[] = 'full-width';\n\n\tif ( is_page_template( 'page-templates/front-page.php' ) ) {\n\t\t$classes[] = 'template-front-page';\n\t\tif ( has_post_thumbnail() )\n\t\t\t$classes[] = 'has-post-thumbnail';\n\t\tif ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) )\n\t\t\t$classes[] = 'two-sidebars';\n\t}\n\n\tif ( empty( $background_color ) )\n\t\t$classes[] = 'custom-background-empty';\n\telseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) )\n\t\t$classes[] = 'custom-background-white';\n\n\t// Enable custom font class only if the font CSS is queued to load.\n\tif ( wp_style_is( 'twentytwelve-fonts', 'queue' ) )\n\t\t$classes[] = 'custom-font-enabled';\n\n\tif ( ! is_multi_author() )\n\t\t$classes[] = 'single-author';\n\n\treturn $classes;\n}", "public function admin_body_class( $classes ) {\n\t\tif ( $entry_type = $this->get_entry_type() ) {\n\t\t\t$classes .= sprintf( ' papi-body papi-meta-type-%s', papi_get_meta_type() );\n\n\t\t\t// Add custom css classes from entry type.\n\t\t\t$arr = $entry_type->get_body_classes();\n\t\t\t$arr = is_string( $arr ) ? [ $arr ] : $arr;\n\t\t\t$arr = is_array( $arr ) ? $arr : [];\n\n\t\t\t$classes .= ' ' . implode( ' ', $arr );\n\t\t}\n\n\t\t// Add custom css classes from query string.\n\t\tif ( $css = papi_get_qs( 'papi_css' ) ) {\n\t\t\t$css = is_array( $css ) ? $css : [];\n\t\t\t$css = array_map( 'sanitize_text_field', $css );\n\t\t\t$classes .= ' ' . implode( ' ', $css );\n\t\t}\n\n\t\treturn $classes;\n\t}", "function body_class($css_class = '')\n {\n }", "function twentytwelve_body_class( $classes ) {\n\t$background_color = get_background_color();\n\t$background_image = get_background_image();\n\tif ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/full-width.php' ) )\n\t\t$classes[] = 'full-width';\n\tif ( is_page_template( 'page-templates/front-page.php' ) ) {\n\t\t$classes[] = 'template-front-page';\n\t\tif ( has_post_thumbnail() )\n\t\t\t$classes[] = 'has-post-thumbnail';\n\t\tif ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) )\n\t\t\t$classes[] = 'two-sidebars';\n\t}\n\tif ( empty( $background_image ) ) {\n\t\tif ( empty( $background_color ) )\n\t\t\t$classes[] = 'custom-background-empty';\n\t\telseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) )\n\t\t\t$classes[] = 'custom-background-white';\n\t}\n\t// Enable custom font class only if the font CSS is queued to load.\n\tif ( wp_style_is( 'twentytwelve-fonts', 'queue' ) )\n\t\t$classes[] = 'custom-font-enabled';\n\tif ( ! is_multi_author() )\n\t\t$classes[] = 'single-author';\n\treturn $classes;\n}", "public function __construct()\n {\n\n $body_classes = [];\n\n if (Auth::check()) {\n $body_classes[] = 'logged-in';\n } else {\n $body_classes[] = 'not-logged-in';\n }\n\n if (session()->has('errors')) {\n $body_classes[] = 'has-errors';\n }\n\n $body_class = implode(' ', $body_classes);\n $this->body_class = $body_class;\n\n }", "public function add_body_class( $classes ) {\n\t\t$context = $this->get_context();\n\n\t\t$sidebar_setup = $this->get_sidebar_setup( $context );\n\t\t$theme_mod = $sidebar_setup['theme_mod'];\n\t\t$theme_mod = apply_filters( 'neve_sidebar_position', get_theme_mod( $theme_mod, 'right' ) );\n\n\t\t$classes[] = 'nv-sidebar-' . $theme_mod;\n\n\t\tif ( ! $sidebar_setup['has_widgets'] && $theme_mod !== 'full-width' ) {\n\t\t\t$classes[] = 'nv-empty-sidebar';\n\t\t}\n\n\t\treturn $classes;\n\t}", "function uos_team_body_class( $classes ) {\n\n\t$classes[] = 'team-page';\n\treturn $classes;\n\n}", "function sellegance_body_classes( $classes ) {\n\n\t// add boxed layout class if selected\n\tif ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {\n\t\n\t// Modify the array $classes to your needs\n\tif( is_page() )\n\t{\n\t\t$classes[] = 'woocommerce';\n\t\t$classes[] = 'woocommerce-page';\n\t} \n\treturn $classes;\n\t}\n\n}", "function hm_custom_rewrite_rule_body_class( $classes ) {\n\n\tglobal $hm_current_rewrite_rule;\n\n\tif ( !empty( $hm_current_rewrite_rule[2] ) )\n\t\t$classes[] = sanitize_html_class( end( explode( '/', str_replace( '.php', '', $hm_current_rewrite_rule[2] ) ) ) );\n\n\treturn $classes;\n\n}", "function _hs_body_classes( $classes ) {\n\tglobal $post;\n\t\n\t// Adds a class of group-blog to blogs with more than 1 published author.\n\tif ( is_multi_author() ) {\n\t\t$classes[] = 'group-blog';\n\t}\n\n\t// Adds page slug to body class\n\tif ( isset( $post ) ) {\n\t\t$classes[] = $post->post_type . '-' . $post->post_name;\n\t}\n\n\treturn $classes;\n}", "function twentytwelve_body_class( $classes ) {\n\t$background_color = get_background_color();\n\t$background_image = get_background_image();\n\n\tif ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/full-width.php' ) ) {\n\t\t$classes[] = 'full-width';\n\t}\n\n\tif ( is_page_template( 'page-templates/front-page.php' ) ) {\n\t\t$classes[] = 'template-front-page';\n\t\tif ( has_post_thumbnail() ) {\n\t\t\t$classes[] = 'has-post-thumbnail';\n\t\t}\n\t\tif ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) ) {\n\t\t\t$classes[] = 'two-sidebars';\n\t\t}\n\t}\n\n\tif ( empty( $background_image ) ) {\n\t\tif ( empty( $background_color ) ) {\n\t\t\t$classes[] = 'custom-background-empty';\n\t\t} elseif ( in_array( $background_color, array( 'fff', 'ffffff' ) ) ) {\n\t\t\t$classes[] = 'custom-background-white';\n\t\t}\n\t}\n\n\t// Enable custom font class only if the font CSS is queued to load.\n\tif ( wp_style_is( 'twentytwelve-fonts', 'queue' ) ) {\n\t\t$classes[] = 'custom-font-enabled';\n\t}\n\n\tif ( ! is_multi_author() ) {\n\t\t$classes[] = 'single-author';\n\t}\n\n\treturn $classes;\n}", "function genesis_body_class( $classes ) {\n\n $classes[] = 'front-page';\n\n return $classes;\n\n}", "public static function makeBodyClasses()\n {\n $classes = [];\n\n $classes = array_merge($classes, self::makeLayoutClasses());\n $classes = array_merge($classes, self::makeSidebarClasses());\n $classes = array_merge($classes, self::makeRightSidebarClasses());\n $classes = array_merge($classes, self::makeCustomBodyClasses());\n\n return trim(implode(' ', $classes));\n }", "function howes_body_class( $classes ) {\n\tglobal $howes;\n\tif ( ! is_multi_author() )\n\t\t$classes[] = 'single-author';\n\n\tif ( ! get_option( 'show_avatars' ) )\n\t\t$classes[] = 'no-avatars';\n\t\n\tif($howes['responsive']=='1'){\n\t\t$classes[] = 'thememount-responsive-on';\n\t} else {\n\t\t$classes[] = 'thememount-responsive-off';\n\t}\n\t\n\treturn $classes;\n}", "function greenspace_body_classes($classes ) {\n\n\t// Helps detect if JS is enabled or not.\n\t$classes[] = 'no-js';\n\n\t// Adds `singular` to singular pages, and `hfeed` to all other pages.\n\t$classes[] = is_singular() ? 'singular' : 'hfeed';\n\n\t// Add a body class if main navigation is active.\n\tif ( has_nav_menu( 'primary' ) ) {\n\t\t$classes[] = 'has-main-navigation';\n\t}\n\n\treturn $classes;\n}", "static public function admin_body_class( $classes ) {\r\n\t\t\t$classes .= ' wpmud';\r\n\t\t\tif ( self::$body_class ) {\r\n\t\t\t\t$classes .= ' ' . self::$body_class;\r\n\t\t\t}\r\n\t\t\t$classes .= ' ';\r\n\r\n\t\t\treturn $classes;\r\n\t\t}", "function base_admin_body_class( $classes ) {\n\tif (is_admin() && isset($_GET['action'])) { $classes .= 'action-'.$_GET['action']; }\n\tif (is_admin() && isset($_GET['post'])){ $classes .= ' '; $classes.='post-'.$_GET['post']; }\n\t// Return the $classes array\n\treturn $classes;\n}", "function ecademy_body_classes( $classes ) {\n\t\tif ( ! is_singular() ) {\n\t\t\t$classes[] = 'hfeed';\n\t\t}\n\n\t\t// Adds a class of no-sidebar when there is no sidebar present.\n\t\tif ( ! is_active_sidebar( 'sidebar-1' ) ) {\n\t\t\t$classes[] = 'no-sidebar';\n\t\t}\n\n\t\treturn $classes;\n\t}", "public function handler_wp_body_class( array $classes )\n\t\t{\n\t\t\tif( defined( 'REST_REQUEST' ) )\n\t\t\t{\n\t\t\t\t$classes[] = 'avia-rest-request';\n\t\t\t}\n\n\t\t\tif( defined( 'IFRAME_REQUEST' ) )\n\t\t\t{\n\t\t\t\t$classes[] = 'avia-iframe-request';\n\t\t\t}\n\n\t\t\treturn $classes;\n\t\t}", "function fanwood_body_class( $classes ) {\n\n\tif ( get_background_image() || get_background_color() )\n\t\t$classes[] = 'custom-background';\n\n\tif ( is_tax( 'post_format' ) )\n\t\t$classes = array_map( 'fanwood_clean_post_format_slug', $classes );\n\n\treturn $classes;\n}", "function classiera_body_class( $classes ) {\r\n\tif ( ! is_multi_author() )\r\n\t\t$classes[] = 'single-author';\r\n\r\n\tif ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() )\r\n\t\t$classes[] = 'sidebar';\r\n\r\n\tif ( ! get_option( 'show_avatars' ) )\r\n\t\t$classes[] = 'no-avatars';\r\n\r\n\treturn $classes;\r\n}", "public function add_body_class( $class ) {\n\n global $post_ID;\n\n // Grab the existing value for the custom template\n $active_editor = get_post_meta( $post_ID, '_cv_active_editor', true );\n $active_editor = cv_filter( $active_editor, array( 'default', 'advanced' ) );\n\n // Add the appropriate class\n return 'advanced' === $active_editor ? 'cv-builder-active' : 'cv-builder-hidden';\n\n }", "function add_to_admin_body_class($classes) {\n\t\t// get the global post variable\n\t\tglobal $post;\n\t\t// instantiate, should be overwritten\n\t\t$mode = '';\n\t\t// get the current page's URI (the part /after/ your domain name)\n\t\t$uri = $_SERVER[\"REQUEST_URI\"];\n\t\t// get the post type from WP\n\t\t$post_type = get_post_type($post->ID);\n\t\t// set the $mode variable to reflect the editorial /list/ page...\n\t\tif (strstr($uri,'edit.php')) {\n\t\t\t$mode = 'edit-list-';\n\t\t}\n\t\t// or the actual editor page\n\t\tif (strstr($uri,'post.php')) {\n\t\t\t$mode = 'edit-page-';\n\t\t}\n\t\t// append our new mode/post_type class to any existing classes\n\t\t$classes .= $mode . $post_type;\n\t\t// and send them back to WP\n\t\treturn $classes;\n\t}", "function fullfoto_body_class( $classes ) {\n\t$background_color = get_background_color();\n\t\t\n\tif ( ! is_active_sidebar( 'sidebar-1' ) || is_page_template( 'page-templates/clearbg.php' ) )\n\t\t$classes[] = 'full-width';\n\n\tif ( is_page_template( 'page-templates/front-page.php' ) ) {\n\t\t$classes[] = 'imgbackground';\n\t\tif ( has_post_thumbnail() )\n\t\t\t$classes[] = 'has-post-thumbnail';\n\t\tif ( is_active_sidebar( 'sidebar-2' ) && is_active_sidebar( 'sidebar-3' ) )\n\t\t\t$classes[] = 'two-sidebars';\n\t}\n\n\tif ( empty( $background_color ) )\n\t\t$classes[] = 'custom-background-empty';\n\telseif ( in_array( $background_color, array( '000', '000000' ) ) )\n\t\t$classes[] = 'custom-background-black';\n\n\t// Enable custom font class only if the font CSS is queued to load.\n\tif ( wp_style_is( 'fullfoto-fonts', 'queue' ) )\n\t\t$classes[] = 'custom-font-enabled';\n\n\tif ( ! is_multi_author() )\n\t\t$classes[] = 'single-author';\n\n\treturn $classes;\n}", "function rw_admin_body_class( $classes )\n{\n $classes .= '' . 'rkt';\n return $classes;\n}", "function jumpoff_admin_body_class( $classes ){ \n\n global $post;\n\n if( !is_object($post) ) \n return;\n \n // Make sure we're getting $post object\n setup_postdata( $post );\n\n // Returns an object that includes the screen’s ID, base, post type, taxonomy\n // @see https://developer.wordpress.org/reference/functions/get_current_screen\n $screen = get_current_screen();\n\n // Construct class form the post_name\n $page_name = 'admin-'.$post->post_name;\n \n // Construct class from post id\n $post_id = 'admin-post-'.$post->ID;\n \n // If post\n if ( 'post' == $screen->base ) {\n $classes .= ' ' . $screen->post_type . ' ' . $post_id . ' ' . $page_name;\n }\n\n // if default page.php\n if(basename(get_page_template()) === 'page.php'){\n $classes .= ' admin-page';\n }\n \n // Return our admin classes\n return $classes;\n \n // Reset\n wp_reset_postdata( $post );\n}", "function theme_body_class($classes) {\n if (!is_multi_author())\n $classes[] = 'single-author';\n\n if (is_active_sidebar('sidebar-2') && !is_attachment() && !is_404())\n $classes[] = 'sidebar';\n\n if (!get_option('show_avatars'))\n $classes[] = 'no-avatars';\n\n return $classes;\n}", "function Sidebar_Body_Class( $classes ) {\n\n // Do not add any classes if value is false\n if ( !SIDEBAR_DEFAULT_LAYOUT ) {\n\n return $classes;\n\n }\n\n $sidebar_direction = Sidebar_Orientation();\n\n if ( !Conditionals\\hide_sidebar() ) {\n\n $classes[] = 'sidebar-layout';\n $classes[] = 'sidebar-' . $sidebar_direction;\n\n }\n\n return $classes;\n\n}", "function mpress_body_classes( $classes ) {\n if ( is_multi_author() ) {\n $classes[] = 'group-blog';\n }\n // Add menu type class\n $classes[] = get_theme_mod( 'mpress_mobile_menu', 'menu-simple' );\n // return array of classes\n return $classes;\n }", "function launchpad_modify_body_class($classes) {\n\t\n\t// If we're on a single page/post, add a class that matches the slug.\n\tif (is_single() || is_page() && !is_front_page()) {\n\t\t$classes[] = basename(get_permalink());\n\t}\n\t\n\t// Implode the classes array.\n\t$classes = implode(' ', $classes);\n\t\n\t// Replace some of the classes we don't need.\n\t$classes = preg_replace(\n\t\t\tarray(\n\t\t\t\t'/page-template-.+? /',\n\t\t\t\t'/page-id-\\d+ /',\n\t\t\t\t'/parent-pageid-\\d+ /',\n\t\t\t),\n\t\t\t'', \n\t\t\t$classes\n\t\t);\n\t\n\t// Explode the string back to an array.\n\t$classes = explode(' ', $classes);\n\t\n\t// Apply filters to allow the developer to change it.\n\t$classes = apply_filters('launchpad_body_class', $classes);\n\n\treturn $classes;\n}", "function twentytwelve_body_class( $classes ) {\n\n\tif ( is_page_template( 'page-templates/front-page.php' ) ) {\n\t\t$classes[] = 'template-front-page';\n\t\tif ( has_post_thumbnail() )\n\t\t\t$classes[] = 'has-post-thumbnail';\n\t}\n\n\t$classes[] = 'custom-font-enabled';\n\t$classes[] = 'single-author';\n\n\treturn $classes;\n}", "function fs_body_class( $classes ) {\r\n\t// Add post/page slug\r\n\tif ( is_single() || is_page() && !is_front_page() ) {\r\n\t\t$classes[] = basename( get_permalink() );\r\n\t}\r\n\r\n\t// Remove unnecessary classes\r\n\t$home_id_class = 'page-id-' . get_option( 'page_on_front' );\r\n\t$remove_classes = array(\r\n\t\t'page-template-default',\r\n\t\t$home_id_class\r\n\t);\r\n\t$classes = array_diff( $classes, $remove_classes );\r\n\r\n\treturn $classes;\r\n}", "function emc_body_classes( $classes ) {\r\n\t// Adds a class of group-blog to blogs with more than 1 published author\r\n\tif ( is_multi_author() ) {\r\n\t\t$classes[] = 'group-blog';\r\n\t}\r\n\treturn $classes;\r\n}", "function fabric_body_class($classes) {\n // Add post/page slug\n if (is_single() || is_page() && !is_front_page()) {\n $classes[] = basename(get_permalink());\n }\n\n // Current controller\n $classes[] = 'controller-' . FABRIC_CONTROLLER;\n\n // Remove unnecessary classes\n $home_id_class = 'page-id-' . get_option('page_on_front');\n $remove_classes = array(\n 'page-template-default',\n $home_id_class\n );\n $classes = array_diff($classes, $remove_classes);\n\n return $classes;\n}", "function madang_body_classes( $classes ) {\n\t// Adds a class of group-blog to blogs with more than 1 published author.\n\tif ( is_multi_author() ) {\n\t\t$classes[] = 'group-blog';\n\t}\n\n\t// Adds a class of hfeed to non-singular pages.\n\tif ( ! is_singular() ) {\n\t\t$classes[] = 'hfeed';\n\t}\n\n\treturn $classes;\n}", "function get_body_class($css_class = '')\n {\n }", "function mpajax_add_body_class( $classes ) {\n\n\tif( is_archive() || is_home() || is_page_template( 'page-templates/page-collections.php' ) )\n\t\t$classes[] = 'mpajax-init';\n\n\treturn $classes;\n}", "function samplecode_body_classes( $classes ) {\n\tif ( ! is_singular() ) {\n\t\t$classes[] = 'hfeed';\n\t}\n\n\t// Adds a class of no-sidebar when there is no sidebar present.\n\tif ( ! is_active_sidebar( 'sidebar-1' ) ) {\n\t\t$classes[] = 'no-sidebar';\n\t}\n\n\treturn $classes;\n}", "function flux_add_body_class( $wp_classes = array(), $custom_classes = false ) {\n\n\t// The special flux body classes\n\t$flux_classes = array();\n\n\t// Add Flux class if we are within a timeline page\n\tif ( is_flux_query() )\n\t\t$flux_classes[] = 'flux';\n\n\t// Merge WP classes with Flux classes and remove duplicates\n\t$classes = array_unique( array_merge( (array) $flux_classes, (array) $wp_classes ) );\n\t\n\treturn apply_filters( 'flux_add_body_class', $classes, $flux_classes, $wp_classes, $custom_classes );\n}", "function thb_theme_body_classes( $classes ) {\n\t\t$thb_id = thb_get_page_ID();\n\t\t$header_inner_bg = get_theme_mod( 'header_panel_color' );\n\n\t\t$classes[] = thb_get_theme_layout();\n\n\t\tif ( thb_get_option( 'disable_contextmenu' ) == '1' ) {\n\t\t\t$classes[] = 'thb-disable-contextmenu';\n\t\t}\n\n\t\tif ( thb_is_enable_theme_animations() ) {\n\t\t\t$classes[] = 'thb-theme-animations-enabled';\n\t\t}\n\n\t\tif ( ! thb_is_preloader_disabled() ) {\n\t\t\t$classes[] = 'thb-preloader-enabled';\n\t\t}\n\n\t\tif ( thb_is_gallery_modal_disabled() ) {\n\t\t\t$classes[] = 'thb-gallery-modal-disabled';\n\t\t}\n\n\t\tif ( ! empty( $header_inner_bg ) ) {\n\t\t\t$classes[] = 'thb-header-inner-filled';\n\t\t}\n\n\t\tif ( thb_is_slideshow_fullscreen() ) {\n\t\t\t$classes[] = 'thb-slideshow-fullscreen';\n\t\t}\n\n\t\tif ( thb_is_page_template( 'template-splash.php' ) ) {\n\t\t\t$classes[] = thb_get_splash_subtitle_position();\n\t\t\t$classes[] = thb_get_splash_page_alignment();\n\t\t}\n\n\t\tif ( thb_get_theme_templates( 'gallery' ) || thb_is_page_template( 'single-works.php' ) ) {\n\t\t\t$classes[] = 'thb-' . thb_get_gallery_modal_skin();\n\n\t\t\tif ( thb_is_gallery_modal_details_opened() ) {\n\t\t\t\t$classes[] = 'thb-is-gallery-modal-details-opened';\n\t\t\t}\n\n\t\t\tif ( thb_is_gallery_modal_without_margins() ) {\n\t\t\t\t$classes[] = 'thb-is-gallery-without-margins';\n\t\t\t}\n\t\t}\n\n\t\tif ( thb_is_page_template( 'template-carousel-gallery.php' ) ) {\n\t\t\tif ( thb_is_carousel_highlight_active() ) {\n\t\t\t\t$classes[] = \"thb-carousel-highlight-active\";\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $thb_id ) ) {\n\t\t\treturn $classes;\n\t\t}\n\n\t\t$classes[] = thb_get_page_width();\n\t\t$classes[] = thb_get_page_header_alignment();\n\n\t\treturn $classes;\n\t}", "function darksnow_body_classes( $classes ) {\n\n\tif ( function_exists( 'is_multi_author' ) && ! is_multi_author() )\n\t\t$classes[] = 'single-author';\n\n\tif ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) )\n\t\t$classes[] = 'singular';\n\n\treturn $classes;\n}", "function calvero_body_classes( $classes ) {\n // Adds a class of group-blog to blogs with more than 1 published author\n if ( is_multi_author() ) {\n $classes[] = 'group-blog';\n }\n \n return $classes;\n}", "public static function add_body_class( $classes ) {\n\t\t$post_type = Registrations::get_post_type();\n\t\tif (\n\t\t\t// Post listing of photos.\n\t\t\tfilter_input(INPUT_GET, 'post_type') === $post_type\n\t\t||\n\t\t\t// Editing a photo post.\n\t\t\t( ( $post_id = filter_input(INPUT_GET, 'post', FILTER_SANITIZE_NUMBER_INT) ) && get_post_type( $post_id ) === $post_type )\n\t\t) {\n\t\t\t$classes .= ' post-type-photo';\n\t\t}\n\n\t\treturn $classes;\n\t}", "public function addBodyStyleClass($name)\n\t{\n\t\t$this->_pageData['data']['style']['class'][] = $name;\n\t}", "function sld_admin_body_class( $classes ) {\n\tglobal $wpdb, $post;\n\t$post_type = get_post_type( $post->ID );\n\tif ( is_admin() ) {\n\t\t$classes .= 'type-' . $post_type;\n\t}\n\treturn $classes;\n}", "function thrive_body_classes( $classes ) {\n\t// Adds a class of group-blog to blogs with more than 1 published author.\n\tif ( is_multi_author() ) {\n\t\t$classes[] = 'group-blog';\n\t}\n\n\tif ( thrive_is_rtl() ) {\n\t\t$classes[] = 'rtl';\n\t}\n\n\tif ( ! is_user_logged_in() ) {\n\t\t$classes[] = 'logged-out';\n\t}\n\n\tif ( is_single() ) {\n\t\tglobal $post;\n\t\tif ( 'post' === $post->post_type ) {\n\t\t\t$classes[] = 'single-blog';\n\t\t}\n\t}\n\n\treturn $classes;\n}", "function wprt_body_classes() {\n\t$classes[] = '';\n\n\t// Header fixed\n\tif ( wprt_get_mod( 'header_fixed', false ) )\n\t\t$classes[] = 'header-fixed';\n\n\t// Get layout position\n\t$classes[] = wprt_layout_position();\n\n\t// Get layout style\n\t$layout_style = wprt_get_mod( 'site_layout_style', 'full-width' );\n\t$classes[] = 'site-layout-'. $layout_style;\n\n\t// Get header style\n\t$header_style = wprt_get_mod( 'header_site_style', 'style-1' );\n\tif ( is_page() && wprt_metabox('header_style') )\n\t\t$header_style = wprt_metabox('header_style');\n\t$classes[] = 'header-'. $header_style;\n\n\tif ( is_page() ) $classes[] = 'is-page';\n\n\tif ( ( is_page() && wprt_metabox('hide_padding_content') )\n\t\t|| ( is_singular('gallery') && wprt_metabox('hide_padding_content') )\n\t\t)\n\t\t$classes[] = 'no-padding-content';\n\n\t// Add classes for Woo pages\n\tif ( wprt_is_woocommerce_page() )\n\t\t$classes[] = 'woocommerce-page';\n\n\tif ( wprt_is_woocommerce_shop() || wprt_is_woocommerce_archive_product() ) {\n\t\t$shop_cols = wprt_get_mod( 'shop_columns', '3' );\n\t\t$classes[] = 'shop-col-'. $shop_cols;\n\t}\n\n\t// Boxed Layout dropshadow\n\tif ( 'boxed' == $layout_style && wprt_get_mod( 'site_layout_boxed_shadow' ) )\n\t\t$classes[] = 'box-shadow';\n\n\t// Boxed layout has border\n\t$classes[] = wprt_get_mod( 'wrapper_border_color' ) ? 'wrap-has-border' : '';\n\n\tif ( wprt_get_mod( 'header_search_icon' ) )\n\t\t$classes[] = 'menu-has-search';\n\n\tif ( wprt_get_mod( 'header_cart_icon' ) )\n\t\t$classes[] = 'menu-has-cart';\t\n\n\tif ( is_singular( 'project' ) )\n\t\t$classes[] = 'page-single-project';\n\n\t// Return classes\n\treturn $classes;\n}", "function cucina_body_classes( $classes ) {\n\t// Adds a class of group-blog to blogs with more than 1 published author.\n\tif ( is_multi_author() ) {\n\t\t$classes[] = 'group-blog';\n\t}\n\n\tif ( is_year() ) {\n\t\t$classes[] = 'year-archive';\n\t}\n\n\tif ( is_singular() ) {\n\t\t$classes[] = 'singular';\n\n\t\tif ( has_post_thumbnail() ) {\n\t\t\t$classes[] = 'has-image';\n\t\t} else {\n\t\t\t$classes[] = 'no-image';\n\t\t}\n\t}\n\n\treturn $classes;\n}", "function twentyfourteen_body_classes( $classes ) {\n\tif ( is_multi_author() ) {\n\t\t$classes[] = 'group-blog';\n\t}\n\n\tif ( get_header_image() ) {\n\t\t$classes[] = 'header-image';\n\t} else {\n\t\t$classes[] = 'masthead-fixed';\n\t}\n\n\tif ( is_archive() || is_search() || is_home() ) {\n\t\t$classes[] = 'list-view';\n\t}\n\n\tif ( ( ! is_active_sidebar( 'sidebar-2' ) )\n\t\t|| is_page_template( 'page-templates/full-width.php' )\n\t\t|| is_page_template( 'page-templates/contributors.php' )\n\t\t|| is_attachment() ) {\n\t\t$classes[] = 'full-width';\n\t}\n\n\tif ( is_active_sidebar( 'sidebar-3' ) ) {\n\t\t$classes[] = 'footer-widgets';\n\t}\n\n\tif ( is_singular() && ! is_front_page() ) {\n\t\t$classes[] = 'singular';\n\t}\n\n\tif ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) {\n\t\t$classes[] = 'slider';\n\t} elseif ( is_front_page() ) {\n\t\t$classes[] = 'grid';\n\t}\n\n\treturn $classes;\n}", "public function add_body_class( $classes ) {\n\t\t\t$wishlist_page_id = yith_wcwl_object_id( get_option( 'yith_wcwl_wishlist_page_id' ) );\n\n\t\t\tif ( ! empty( $wishlist_page_id ) && is_page( $wishlist_page_id ) ) {\n\t\t\t\t$classes[] = 'woocommerce-wishlist';\n\t\t\t\t$classes[] = 'woocommerce';\n\t\t\t\t$classes[] = 'woocommerce-page';\n\t\t\t}\n\n\t\t\treturn $classes;\n\t\t}", "function mv_browser_body_class($classes) {\n global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;\n if($is_lynx) $classes[] = 'lynx';\n elseif($is_gecko) $classes[] = 'gecko';\n elseif($is_opera) $classes[] = 'opera';\n elseif($is_NS4) $classes[] = 'ns4';\n elseif($is_safari) $classes[] = 'safari';\n elseif($is_chrome) $classes[] = 'chrome';\n elseif($is_IE) {\n $classes[] = 'ie';\n if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $_SERVER['HTTP_USER_AGENT'], $browser_version))\n $classes[] = 'ie'.$browser_version[1];\n } else $classes[] = 'unknown';\n if($is_iphone) $classes[] = 'iphone';\n if ( stristr( $_SERVER['HTTP_USER_AGENT'],\"mac\") ) {\n $classes[] = 'osx';\n } elseif ( stristr( $_SERVER['HTTP_USER_AGENT'],\"linux\") ) {\n $classes[] = 'linux';\n } elseif ( stristr( $_SERVER['HTTP_USER_AGENT'],\"windows\") ) {\n $classes[] = 'windows';\n }\n return $classes;\n}", "function mv_browser_body_class($classes) {\n global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;\n if($is_lynx) $classes[] = 'lynx';\n elseif($is_gecko) $classes[] = 'gecko';\n elseif($is_opera) $classes[] = 'opera';\n elseif($is_NS4) $classes[] = 'ns4';\n elseif($is_safari) $classes[] = 'safari';\n elseif($is_chrome) $classes[] = 'chrome';\n elseif($is_IE) {\n $classes[] = 'ie';\n if(preg_match('/MSIE ([0-9]+)([a-zA-Z0-9.]+)/', $_SERVER['HTTP_USER_AGENT'], $browser_version))\n $classes[] = 'ie'.$browser_version[1];\n } else $classes[] = 'unknown';\n if($is_iphone) $classes[] = 'iphone';\n if ( stristr( $_SERVER['HTTP_USER_AGENT'],\"mac\") ) {\n $classes[] = 'osx';\n } elseif ( stristr( $_SERVER['HTTP_USER_AGENT'],\"linux\") ) {\n $classes[] = 'linux';\n } elseif ( stristr( $_SERVER['HTTP_USER_AGENT'],\"windows\") ) {\n $classes[] = 'windows';\n }\n return $classes;\n}", "function red_starter_body_classes( $classes ) {\n\t// Adds a class of group-blog to blogs with more than 1 published author.\n\tif ( is_multi_author() ) {\n\t\t$classes[] = 'group-blog';\n\t}\n\n\treturn $classes;\n}", "function twentyfourteen_body_classes( $classes ) {\n\tif ( is_multi_author() ) {\n\t\t$classes[] = 'group-blog';\n\t}\n\n\tif ( get_header_image() ) {\n\t\t$classes[] = 'header-image';\n\t} elseif ( ! in_array( $GLOBALS['pagenow'], array( 'wp-activate.php', 'wp-signup.php' ) ) ) {\n\t\t$classes[] = 'masthead-fixed';\n\t}\n\n\tif ( is_archive() || is_search() || is_home() ) {\n\t\t$classes[] = 'list-view';\n\t}\n\n\tif ( ( ! is_active_sidebar( 'sidebar-2' ) )\n\t\t|| is_page_template( 'page-templates/full-width.php' )\n\t\t|| is_page_template( 'page-templates/contributors.php' )\n\t\t|| is_attachment() ) {\n\t\t$classes[] = 'full-width';\n\t}\n\n\tif ( is_active_sidebar( 'sidebar-footer-1' ) && is_active_sidebar( 'sidebar-footer-2' ) && is_active_sidebar( 'sidebar-footer-3' ) && is_active_sidebar( 'sidebar-footer-4' ) ) {\n\t\t$classes[] = 'footer-widgets';\n\t}\n\n\tif ( is_singular() && ! is_front_page() ) {\n\t\t$classes[] = 'singular';\n\t}\n\tif ( is_single() ) {\n\t\t$classes[] = 'page';\n\t}\n\n\t//if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) ) {\n//\t\t$classes[] = 'slider';\n//\t} elseif ( is_front_page() ) {\n//\t\t$classes[] = 'grid';\n//\t}\n\n\treturn $classes;\n}", "public function body_class(){\n if (func_num_args() > 0){\n $this->body_class = func_get_arg(0);\n }\n \n return $this->body_class;\n }", "function b4st_browser_body_class( $classes ) {\n\tglobal $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;\n\t\n\tif($is_lynx) $classes[] = 'lynx';\n\telseif($is_gecko) $classes[] = 'gecko';\n\telseif($is_opera) $classes[] = 'opera';\n\telseif($is_NS4) $classes[] = 'ns4';\n\telseif($is_safari) $classes[] = 'safari';\n\telseif($is_chrome) $classes[] = 'chrome';\n\telseif($is_IE) {\n\t\t$browser = $_SERVER['HTTP_USER_AGENT'];\n\t\t$browser = substr( \"$browser\", 25, 8);\n\t\tif ($browser == \"MSIE 7.0\" ) {\n\t\t\t$classes[] = 'ie7';\n\t\t\t$classes[] = 'ie';\n\t\t} elseif ($browser == \"MSIE 6.0\" ) {\n\t\t\t$classes[] = 'ie6';\n\t\t\t$classes[] = 'ie';\n\t\t} elseif ($browser == \"MSIE 8.0\" ) {\n\t\t\t$classes[] = 'ie8';\n\t\t\t$classes[] = 'ie';\n\t\t} elseif ($browser == \"MSIE 9.0\" ) {\n\t\t\t$classes[] = 'ie9';\n\t\t\t$classes[] = 'ie';\n\t\t} else {\n\t $classes[] = 'ie';\n\t }\n\t}\n\telse $classes[] = 'unknown';\n \n\tif( $is_iphone ) $classes[] = 'iphone';\n \n\treturn $classes;\n}", "private static function makeCustomBodyClasses()\n {\n $classes = [];\n $cfg = static::getConfig('classes_body', '');\n\n if (is_string($cfg) && $cfg) {\n $classes[] = $cfg;\n }\n\n return $classes;\n }", "function mixtape_qodef_woocommerce_body_class( $classes ) {\n\t\tif(mixtape_qodef_is_woocommerce_page()) {\n\t\t\t$classes[] = 'qodef-woocommerce-page';\n\t\t\tif (is_singular('product')) {\n\t\t\t\t$classes[] = 'qodef-woocommerce-single-page';\n\t\t\t}\n\t\t}\n\t\treturn $classes;\n\t}", "function body_class( $classes ) {\r\n if('cycloneslider' == get_post_type()){\r\n $classes .= 'cycloneslider';\r\n }\r\n return $classes;\r\n }", "public function add_fundraiser_body_class( $bodyClass ) {\n\n // Get the unique id of the fundraiser\n $fundraiserId = $this->get_user_fundraiser();\n\n // If the user is currently in a Fundraiser, set body classes\n // appropriately.\n if( $fundraiserId )\n {\n $bodyClass[] = 'in-rwc-fundraiser';\n $bodyClass[] = 'in-rwc-fundraiser-' . esc_attr( $fundraiserId );\n }\n\n // If the user is browsing a product and that product is not in\n // the fundraiser, assign classes.\n if( is_singular( 'product' ) )\n {\n $post_id = get_the_ID();\n $fundraiser = $this->get_fundraiser( $fundraiserId );\n\n // This product is not in the fundraiser.\n if( ! $fundraiser->is_product_enabled( $post_id ) ) {\n $bodyClass[] = 'product-not-in-fundraiser';\n }\n\n }\n return $bodyClass;\n }", "function siteorigin_panels_body_class($classes){\n\tif(siteorigin_panels_is_panel()) $classes[] = 'siteorigin-panels';\n\treturn $classes;\n}", "function fluid_edge_search_body_class($classes) {\n\n $classes[] = 'edgtf-fullscreen-search';\n $classes[] = 'edgtf-search-fade';\n\n return $classes;\n\n }", "function get_body_class($classes){\n $group=groups_get_current_group();\n \n if(!empty($group))\n $classes[]='is-single-group';\n\n return $classes;\n\n\n }", "function superultra_body_classes( $classes ) {\n\t// Adds a class of hfeed to non-singular pages.\n\tif ( ! is_singular() ) {\n\t\t$classes[] = 'hfeed';\n\t}\n\n\t// Adds a class of no-sidebar when there is no sidebar present.\n\tif ( ! is_active_sidebar( 'sidebar-1' ) ) {\n\t\t$classes[] = 'no-sidebar';\n\t}\n\n\treturn $classes;\n}", "function sandbox_body_class( $print = true ) {\n\tglobal $wp_query, $current_user;\n\n\t// It's surely a WordPress blog, right?\n\t$c = array('wordpress');\n\n\t// Applies the time- and date-based classes (below) to BODY element\n\tsandbox_date_classes( time(), $c );\n\n\t// Generic semantic classes for what type of content is displayed\n\tis_front_page() ? $c[] = 'home' : null; // New 'front' class for WP 2.5\n\tis_home() ? $c[] = 'blog' : null; // Class for the posts, if set\n\tis_archive() ? $c[] = 'archive' : null;\n\tis_date() ? $c[] = 'date' : null;\n\tis_search() ? $c[] = 'search' : null;\n\tis_paged() ? $c[] = 'paged' : null;\n\tis_attachment() ? $c[] = 'attachment' : null;\n\tis_404() ? $c[] = 'four04' : null; // CSS does not allow a digit as first character\n\n\t// Special classes for BODY element when a single post\n\tif ( is_single() ) {\n\t\t$postID = $wp_query->post->ID;\n\t\tthe_post();\n\n\t\t// Adds 'single' class and class with the post ID\n\t\t$c[] = 'single postid-' . $postID;\n\n\t\t// Adds classes for the month, day, and hour when the post was published\n\t\tif ( isset( $wp_query->post->post_date ) )\n\t\t\tsandbox_date_classes( mysql2date( 'U', $wp_query->post->post_date ), $c, 's-' );\n\n\t\t// Adds category classes for each category on single posts\n\t\tif ( $cats = get_the_category() )\n\t\t\tforeach ( $cats as $cat )\n\t\t\t\t$c[] = 's-category-' . $cat->slug;\n\n\t\t// Adds tag classes for each tags on single posts\n\t\tif ( $tags = get_the_tags() )\n\t\t\tforeach ( $tags as $tag )\n\t\t\t\t$c[] = 's-tag-' . $tag->slug;\n\n\t\t// Adds MIME-specific classes for attachments\n\t\tif ( is_attachment() ) {\n\t\t\t$mime_type = get_post_mime_type();\n\t\t\t$mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/', 'music/' );\n\t\t\t\t$c[] = 'attachmentid-' . $postID . ' attachment-' . str_replace( $mime_prefix, \"\", \"$mime_type\" );\n\t\t}\n\n\t\t// Adds author class for the post author\n\t\t$c[] = 's-author-' . sanitize_title_with_dashes(strtolower(get_the_author_login()));\n\t\trewind_posts();\n\t}\n\n\t// Author name classes for BODY on author archives\n\telseif ( is_author() ) {\n\t\t$author = $wp_query->get_queried_object();\n\t\t$c[] = 'author';\n\t\t$c[] = 'author-' . $author->user_nicename;\n\t}\n\n\t// Category name classes for BODY on category archvies\n\telseif ( is_category() ) {\n\t\t$cat = $wp_query->get_queried_object();\n\t\t$c[] = 'category';\n\t\t$c[] = 'category-' . $cat->slug;\n\t}\n\n\t// Tag name classes for BODY on tag archives\n\telseif ( is_tag() ) {\n\t\t$tags = $wp_query->get_queried_object();\n\t\t$c[] = 'tag';\n\t\t$c[] = 'tag-' . $tags->slug;\n\t}\n\n\t// Page author for BODY on 'pages'\n\telseif ( is_page() ) {\n\t\t$pageID = $wp_query->post->ID;\n\t\t$page_children = wp_list_pages(\"child_of=$pageID&echo=0\");\n\t\tthe_post();\n\t\t$c[] = 'page pageid-' . $pageID;\n\t\t$c[] = 'page-author-' . sanitize_title_with_dashes(strtolower(get_the_author('login')));\n\t\t// Checks to see if the page has children and/or is a child page; props to Adam\n\t\tif ( $page_children != '' )\n\t\t\t$c[] = 'page-parent';\n\t\tif ( $wp_query->post->post_parent )\n\t\t\t$c[] = 'page-child parent-pageid-' . $wp_query->post->post_parent;\n\t\trewind_posts();\n\t}\n\n\t// For when a visitor is logged in while browsing\n\tif ( $current_user->ID )\n\t\t$c[] = 'loggedin';\n\n\t// Paged classes; for 'page X' classes of index, single, etc.\n\tif ( ( ( $page = $wp_query->get('paged') ) || ( $page = $wp_query->get('page') ) ) && $page > 1 ) {\n\t\t$c[] = 'paged-' . $page;\n\t\tif ( is_single() ) {\n\t\t\t$c[] = 'single-paged-' . $page;\n\t\t} elseif ( is_page() ) {\n\t\t\t$c[] = 'page-paged-' . $page;\n\t\t} elseif ( is_category() ) {\n\t\t\t$c[] = 'category-paged-' . $page;\n\t\t} elseif ( is_tag() ) {\n\t\t\t$c[] = 'tag-paged-' . $page;\n\t\t} elseif ( is_date() ) {\n\t\t\t$c[] = 'date-paged-' . $page;\n\t\t} elseif ( is_author() ) {\n\t\t\t$c[] = 'author-paged-' . $page;\n\t\t} elseif ( is_search() ) {\n\t\t\t$c[] = 'search-paged-' . $page;\n\t\t}\n\t}\n\n\t// Separates classes with a single space, collates classes for BODY\n\t$c = join( ' ', apply_filters( 'body_class', $c ) );\n\n\t// And tada!\n\treturn $print ? print($c) : $c;\n}", "static function body_class() {\n\t\t$config = self::config();\n\n\t\tif ( ! empty( $config['body-classes'] ) ) {\n\t\t\t$classes = array();\n\t\t\t$handlers_results = array();\n\t\t\tforeach ( $config['body-classes'] as $classname => $resolution ) {\n\t\t\t\tif ( is_string( $resolution ) ) {\n\t\t\t\t\t// ensure handler is executed; and only executed once\n\t\t\t\t\tif ( ! isset( $handlers_results[ $resolution ] ) ) {\n\t\t\t\t\t\t$handlers_results[ $resolution ] = call_user_func( $resolution );\n\t\t\t\t\t}\n\t\t\t\t\t// process result of handler\n\t\t\t\t\tif ( $handlers_results[ $resolution ] ) {\n\t\t\t\t\t\t$classes[] = $classname;\n\t\t\t\t\t}\n\t\t\t\t} else { // assume boolean\n\t\t\t\t\tif ( $resolution ) {\n\t\t\t\t\t\t$classes[] = $classname;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $classes;\n\t\t} else { // no body class handlers\n\t\t\treturn null;\n\t\t}\n\t}", "function voyage_mikado_search_body_class($classes) {\n\n\t\tif(is_active_widget(false, false, 'mkd_search_opener')) {\n\n\t\t\t$classes[] = 'mkdf-'.voyage_mikado_options()->getOptionValue('search_type');\n\n\t\t\tif(voyage_mikado_options()->getOptionValue('search_type') == 'fullscreen-search') {\n\n\t\t\t\t$is_fullscreen_bg_image_set = voyage_mikado_options()->getOptionValue('fullscreen_search_background_image') !== '';\n\n\t\t\t\tif($is_fullscreen_bg_image_set) {\n\t\t\t\t\t$classes[] = 'mkdf-fullscreen-search-with-bg-image';\n\t\t\t\t}\n\n\t\t\t\t$classes[] = 'mkdf-search-fade';\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $classes;\n\n\t}", "function pluton_body_classes( $classes ) {\n\n\t// Save some vars\n\t$main_layout = pluton_global_obj( 'main_layout' );\n\t$post_layout = pluton_global_obj( 'post_layout' );\n\t$post_id = pluton_global_obj( 'post_id' );\n\n\t// RTL\n\tif ( is_RTL() ) {\n\t\t$classes[] = 'rtl';\n\t}\n\t\n\t// Main class\n\t$classes[] = 'pluton-theme';\n\n\t// Layout Style\n\t$classes[] = $main_layout .'-main-layout';\n\n\t// Top menu header style to control the responsive\n\tif ( 'top' == pluton_global_obj( 'header_style' ) ) {\n\t\t$classes[] = 'top-header-style';\n\t}\n\n\t// Centered header style to control the responsive\n\tif ( 'centered' == pluton_global_obj( 'header_style' ) ) {\n\t\t$classes[] = 'centered-header-style';\n\t}\n\n\t// Boxed layout dropshadow\n\tif ( 'boxed' == $main_layout\n\t\t&& get_theme_mod( 'boxed_dropdshadow' )\n\t) {\n\t\t$classes[] = 'wrap-boxshadow';\n\t}\n\n\t// Sidebar enabled\n\tif ( 'left-sidebar' == $post_layout || 'right-sidebar' == $post_layout ) {\n\t\t$classes[] = 'has-sidebar';\n\t}\n\n\t// Content layout\n\tif ( $post_layout ) {\n\t\t$classes[] = 'content-'. $post_layout;\n\t}\n\n\t// If media above content\n\tif ( 'above' == get_post_meta( get_the_ID(), 'pluton_post_media_position', true ) ) {\n\t\t$classes[] = 'media-above-content';\n\t}\n\n\t// Single Post cagegories\n\tif ( is_singular( 'post' ) ) {\n\t\t$cats = get_the_category( $post_id );\n\t\tforeach ( $cats as $cat ) {\n\t\t\t$classes[] = 'post-in-category-'. $cat->category_nicename;\n\t\t}\n\t}\n\n\t// If landing page template\n\tif ( is_page_template( 'templates/landing.php' ) ) {\n\t\t$classes[] = 'landing-page';\n\t}\n\n\t// Breadcrumbs\n\tif ( pluton_global_obj( 'has_breadcrumbs' ) ) {\n\t\t$classes[] = 'has-breadcrumbs';\n\t}\n\n\t// Topbar\n\tif ( pluton_global_obj( 'has_top_bar' ) ) {\n\t\t$classes[] = 'has-topbar';\n\t}\n\n\t// Transparent header style\n\tif ( 'transparent' == pluton_global_obj( 'header_style' ) ) {\n\t\t$classes[] = 'has-transparent-header';\n\t}\n\n\t// If no header border bottom\n\tif ( false == get_theme_mod( 'has_header_border_bottom', true ) ) {\n\t\t$classes[] = 'no-header-border';\n\t}\n\n\t// Widget Icons\n\tif ( get_theme_mod( 'has_widget_icons', true ) ) {\n\t\t$classes[] = 'sidebar-widget-icons';\n\t}\n\n\t// Title with Background Image\n\tif ( 'background-image' == pluton_global_obj( 'page_header_style' ) ) {\n\t\t$classes[] = 'page-with-background-title';\n\t}\n\n\t// Disabled header\n\tif ( ! pluton_global_obj( 'has_page_header' ) ) {\n\t\t$classes[] = 'page-header-disabled';\n\t}\n\n\t// Disabled margins\n\tif ( ! pluton_global_obj( 'has_margins' ) ) {\n\t\t$classes[] = 'no-margins';\n\t}\n\n\t// Add class if footer parallax\n\tif ( 'true' == get_theme_mod( 'footer_parallax_effect' ) ) {\n\t\t$classes[] = 'has-footer-parallax';\n\t}\n\t\n\t// Return classes\n\treturn $classes;\n\n}", "public function body_classes( $classes )\n {\n // Adds a class of group-blog to blogs with more than 1 published author.\n if ( is_multi_author() ) {\n $classes[] = 'group-blog';\n }\n\n // Adds a class of hfeed to non-singular pages.\n if ( ! is_singular() ) {\n $classes[] = 'hfeed';\n }\n\n return $classes;\n }", "function wc_browser_body_class($classes) {\n\n\t\tglobal $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;\n\n\t\tif ($is_lynx)\t\t$classes[] = 'lynx';\n\t\telseif ($is_gecko)\t$classes[] = 'gecko';\n\t\telseif ($is_opera)\t$classes[] = 'opera';\n\t\telseif ($is_NS4)\t$classes[] = 'ns4';\n\t\telseif ($is_safari)\t$classes[] = 'safari';\n\t\telseif ($is_chrome)\t$classes[] = 'chrome';\n\t\telseif ($is_IE) {\n\t\t\t$classes[] = 'ie';\n\t\t\tif (preg_match('/MSIE ( [0-9]+)([a-zA-Z0-9.]+)/', $_SERVER['HTTP_USER_AGENT'], $browser_version))\n\t\t\t\t$classes[] = 'ie' . $browser_version[1];\n\t\t} else $classes[] = 'unknown';\n\n\t\tif ($is_iphone) $classes[] = 'iphone';\n\n\t\treturn $classes;\n\t}", "function _l7_body_classes( $classes ) {\n\t// Adds a class of group-blog to blogs with more than 1 published author.\n\tif ( is_multi_author() ) {\n\t\t$classes[] = 'group-blog';\n\t}\n\n\treturn $classes;\n}", "function dustrial_body_classes( $classes ) {\n // Adds a class of group-blog to blogs with more than 1 published author.\n if ( is_multi_author() ) {\n $classes[] = 'group-blog';\n }\n return $classes;\n}", "function theme_add_body_classes($classes)\n{\n if (is_front_page()) {\n return array_merge($classes, array('is-front-page'));\n }\n return ($classes);\n}", "function nuthemes_body_classes( $classes ) {\n\t// Adds a class of group-blog to blogs with more than 1 published author\n\tif ( is_multi_author() ) {\n\t\t$classes[] = 'group-blog';\n\t}\n\n\treturn $classes;\n}" ]
[ "0.7187739", "0.7144234", "0.7097593", "0.7094299", "0.7047378", "0.6997141", "0.6917339", "0.68522084", "0.6827744", "0.6688731", "0.66107845", "0.65838456", "0.6524732", "0.6516879", "0.6405402", "0.6405402", "0.6393907", "0.63869137", "0.63861287", "0.63791215", "0.63735056", "0.6368773", "0.6351211", "0.63506126", "0.63416183", "0.6327621", "0.6327621", "0.62803525", "0.627088", "0.62616974", "0.6261171", "0.6257309", "0.62278414", "0.62260437", "0.62203515", "0.62103796", "0.6179165", "0.6178708", "0.61729646", "0.6164815", "0.6147058", "0.6144269", "0.6129912", "0.61289114", "0.6123247", "0.61113256", "0.61048985", "0.60995036", "0.609591", "0.60864145", "0.6071261", "0.6067053", "0.60586464", "0.60582805", "0.60482216", "0.6037104", "0.6029491", "0.60274416", "0.6025982", "0.60251325", "0.6021818", "0.6021197", "0.60185254", "0.60121554", "0.60054356", "0.5989952", "0.59877276", "0.5980503", "0.5966276", "0.5955502", "0.5954037", "0.59502643", "0.5948882", "0.59471494", "0.59415543", "0.59366536", "0.59299695", "0.59299695", "0.5922412", "0.59210706", "0.5917684", "0.59176123", "0.59085274", "0.5907709", "0.5902235", "0.5894584", "0.5888331", "0.5864984", "0.58612907", "0.5858823", "0.58577234", "0.5847698", "0.58395654", "0.5828536", "0.5820172", "0.5812178", "0.58106667", "0.5798656", "0.5797962", "0.5793333" ]
0.6978272
6
Ignore pagebreak elements on render.
public function ignore_pagebreaks( $form_data ) { foreach ( $form_data['fields'] as $id => $field ) { if ( 'pagebreak' !== $field['type'] ) { continue; } unset( $form_data['fields'][ $id ] ); } return $form_data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ins_pagebreak()\n\t{\n\t\t// Create the view\n\t\t$view = & $this->getView( 'article', 'html' );\n\n\t\t// Set the layout\n\t\t$view->setLayout( 'pagebreak' );\n\n\t\t// Display the view\n\t\t$view->display();\n\n\t}", "public static function tag_page_break() {\n\t//--\n\treturn '<!-- PAGE BREAK -->';\n\t//--\n}", "public function AcceptPageBreak() {\r\n\t\t$this->pagina_nueva = true;\r\n\t return false;\r\n\t}", "public function addPageBreak() {\n\t\t$this->_elementCollection[] = new PHPWord_Section_PageBreak();\n\t}", "function AcceptPageBreak()\n{\n if($this->col<2)\n {\n //Go to next column\n $this->SetCol($this->col+1);\n //Set ordinate to top\n $this->SetY($this->y0);\n //Keep on page\n return false;\n }\n else\n {\n //Go back to first column\n $this->SetCol(0);\n //Page break\n return true;\n }\n}", "function AcceptPageBreak()\n\t\t{\n\t\t\treturn $this->AutoPageBreak;\n\t\t}", "public function acceptPageBreak()\n {\n return $this->_autoPageBreak;\n }", "function setNoBreak() {\t \r\n\t \t$this->noBreak = true;\r\n\t}", "public function disableRemoveLineBreaksFromTemplate() {}", "protected function stopRendering() {}", "protected function disableContentRender()\n {\n $this->contentRenderingDisabled = true;\n }", "protected function render_nothing()\n\t{\n\t\t$this->render_text (null, false);\n\t\t$this->stop_autorender = true;\n\t}", "public function generatePage_preProcessing() {}", "public function getDisableContentElementRendering() {}", "function CheckPageBreak($h)\r\n {\r\n if($this->GetY()+$h>$this->PageBreakTrigger) {\r\n $this->AddPage();\r\n $this->Row(array('Směr','Pořad. č. / JID','Datum doručení / Datum vytvoření','Odesílatel/Adresát','Čj. odesilatele','Stručný obsah dokumentu (věc)','Spis.uzel / Zpracovatel','Spis','Způsob vyřízení',\r\n 'Počet listů','Počet příloh a druh','Spis. znak a skart. režim','JID vypravení','Datum vypravení','Spisovna / Vyřazení', 'Poznámka'));\r\n }\r\n }", "public function verPageBreak($column, $break) {\n\t}", "protected function break_flow()\n\t{\n\t\t$this->_flow = PAGE_FLOW_BREAK;\n\t}", "function CheckPageBreak($h,$pru)\r\n{\r\n if($this->GetY()+$h>$this->PageBreakTrigger){\r\n $this->AddPage($this->CurOrientation);\r\n\t\t\t\t$x=$this->GetX();\r\n\t\t$this->SetX($pru);\r\n\t\t}\r\n}", "protected function getPageRenderer() {}", "function DOM_non_breaking() {\r\n\t\t//' ### numbers over 10 000\r\n\t\t$array_other_numbers = array(\r\n\t\t'¼', html_entity_decode('&frac14;'), '&#188;', '&#xbc;', '&frac14;',\r\n\t\t'½', html_entity_decode('&frac12;'), '&#189;', '&#xbd;', '&frac12;',\r\n\t\t'¾', html_entity_decode('&frac34;'), '&#190;', '&#xbe;', '&frac34;',\r\n\t\t);\r\n\t\t$other_number_string = implode(\"|\", $array_other_numbers);\r\n\t\t$body_text_nodes = $this->xpath->query(ReTidy::get_html_namespace() . 'body//' . ReTidy::get_html_namespace() . '*/child::text()');\r\n\t\tforeach($body_text_nodes as $node) {\r\n\t\t\tif($this->config['non_breaking_type'] === 'noWrap') {\r\n\t\t\t\t$node->nodeValue = preg_replace('/([0-9]+)(\\s([0-9]|(' . $other_number_string . '))+)+/s', 'XXX9o9NewTagBeginXXXspan style=\"white-space: nowrap;\"9o9XXX$0XXX9o9NewTagEndXXXspan9o9XXX', $node->nodeValue, -1, $count1);\r\n\t\t\t} else { // default\r\n\t\t\t\t$node->nodeValue = preg_replace('/([0-9])\\s([0-9]|(' . $other_number_string . '))/s', '$1XXX9o9NewEntityXXXnbsp9o9XXX$2', $node->nodeValue, -1, $count1);\r\n\t\t\t\t//$node->nodeValue = preg_replace('/([0-9])\\s([0-9]|(' . $other_number_string . '))/s', '$1&nbsp;$2', $node->nodeValue, -1, $count1);\r\n\t\t\t}\r\n\t\t\t$count += $count1;\r\n\t\t}\r\n\t\t$this->logMsgIf('([0-9])\\s([0-9])', $count);\t\r\n\t\tReTidy::DOM_phys_units();\r\n\t}", "public function renderUnrepresentable()\r\n\t{\r\n\t\treturn $this->renderError(new XenForo_Phrase('requested_page_is_unrepresentable_in_html'));\r\n\t}", "protected function prepareRendering() {}", "public final function maybe_render()\n {\n }", "public final function maybe_render()\n {\n }", "public final function maybe_render()\n {\n }", "protected function _post_render() {\n\t\n\t\t// Silence is golden\n\t\n\t}", "public function prePageContent();", "public function enableRemoveLineBreaksFromTemplate() {}", "function CheckPageBreak($h){\r\n \tif($this->GetY()+$h>$this->PageBreakTrigger)\r\n \t\t$this->AddPage($this->CurOrientation);\r\n }", "function CheckPageBreak($h){\n\t if($this->GetY()+$h>$this->PageBreakTrigger)\n\t $this->AddPage($this->CurOrientation);\n\t}", "public function blankPage()\n {\n $this->_sidebar = false;\n $this->_layout = false;\n $this->_render = false;\n }", "function non_breaking() {\r\n\t\t// between the date number and month name (e.g. 3 June or June 3); and\r\n\t\t// in other places where breaking across lines might be disruptive to the reader, especially in infoboxes, such as £11 billion, June 2011, 5° 24′ 21.12″ N, Boeing 747, after the number in a numbered address (e.g. 123 Fake Street) and before roman numerals at the end of phrases (e.g. World War II and Pope Benedict XVI).\r\n\r\n\t\t// browsers treat dashes to be same as hyphens (even though they shouldn't)\r\n\t\t// consider http://www.punctuationmatters.com/the-hyphen-dash-n-dash-and-m-dash/\r\n\t\tReTidy::line_wrapping();\r\n\t\tReTidy::phys_units();\r\n\t\tReTidy::non_breaking_phone_number();\r\n\t\tReTidy::non_breaking_date();\r\n\t\tReTidy::non_breaking_dollar_amounts();\r\n\t\tReTidy::non_breaking_postal_code();\r\n\t\tReTidy::non_breaking_year_range();\r\n\t\t// some others we may want to do are names, honorifics, places...\r\n\t\tReTidy::clean_nowrap();\r\n\t\tReTidy::remove_tags_intra_tags(); // for dates in the <title> that earned <span style=\"white-space: nowrap;\">, for example\r\n\t\t\r\n\t}", "function CheckPageBreak($h)\r\n{\r\n\tif($this->GetY()+$h>$this->PageBreakTrigger)\r\n\t\t$this->AddPage($this->CurOrientation);\r\n}", "function CheckPageBreak($h)\r\n{\r\n\tif($this->GetY()+$h>$this->PageBreakTrigger)\r\n\t\t$this->AddPage($this->CurOrientation);\r\n}", "function CheckPageBreak($h)\n{\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n}", "function CheckPageBreak($h)\n{\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n}", "function CheckPageBreak($h)\n{\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n}", "function CheckPageBreak($h)\n{\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n}", "function CheckPageBreak($h){\n\t\t\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t\t\t$this->AddPage($this->CurOrientation);\n\t\t}", "function CheckPageBreak($h) {\n\t\t\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t\t\t$this->AddPage($this->CurOrientation);\n\t\t}", "public function pagesOnly() {}", "protected function initPageRenderer() {}", "protected function initPageRenderer() {}", "function CheckPageBreak($h)\n {\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h)\n\t{\n\t if($this->GetY()+$h>$this->PageBreakTrigger)\n\t $this->AddPage($this->CurOrientation);\n\t}", "function CheckPageBreak($h)\n\t{\n\t if($this->GetY()+$h>$this->PageBreakTrigger)\n\t $this->AddPage($this->CurOrientation);\n\t}", "function CheckPageBreak($h)\n\t{\n\t\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t\t$this->AddPage($this->CurOrientation);\n\t}", "function CheckPageBreak($h)\n\t{\n\t\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t\t$this->AddPage($this->CurOrientation);\n\t}", "public function shouldRender()\n {\n if ($this->totalPages > 1) {\n \n return true;\n }\n \n return false;\n }", "function CheckPageBreak($h)\n {\n if($this->GetY()+$h>$this->PageBreakTrigger) {\n $this->AddPage($this->CurOrientation);\n $this->SetFont('Arial','B',8);\n \n $this->Cell(20,5,'USERID','LTRB',0,'C',0);\n $this->Cell(60,5,'NAME','LTRB',0,'C',0);\n $this->Cell(25,5,'DATE','LTRB',0,'C',0);\n $this->Cell(20,5,'WEEKDAY','LTRB',0,'C',0);\n $this->Cell(30,5,'IN','LTRB',0,'C',0);\n $this->Cell(30,5,'OUT','LTRB',0,'C',0);\n\n $this->Ln();\n \n }\n }", "abstract protected function render_page_content(): void;", "public function drawPage()\n\t\t{\n\t\t}", "function CheckPageBreak($h)\n{\n\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t$this->AddPage($this->CurOrientation);\n}", "function CheckPageBreak($h)\n{\n\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t$this->AddPage($this->CurOrientation);\n}", "function CheckPageBreak($h)\n{\n\tif($this->GetY()+$h>$this->PageBreakTrigger)\n\t\t$this->AddPage($this->CurOrientation);\n}", "public function ee_breakouts_page_load() {}", "public function horPageBreak($row, $break) {\n\t}", "function CheckPageBreak($h)\n {\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h) {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h) {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h) {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h) {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "protected function renderThenChild() {}", "protected function _beforeToHtml()\n {\n if (!$this->isReviewsEnabled()) {\n $this->setTemplate('');\n return parent::_beforeToHtml();\n }\n\n if (!$this->_setReviews()) {\n $this->setTemplate('');\n return parent::_beforeToHtml();\n }\n\n return parent::_beforeToHtml();\n }", "protected function _render()\n {\n }", "function CheckPageBreak($h)\n {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "function CheckPageBreak($h)\n {\n if ($this->GetY() + $h > $this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n }", "public function CheckPageBreak($h){\n if($this->GetY()+$h>$this->PageBreakTrigger)\n $this->AddPage($this->CurOrientation);\n\n }", "public function generatePage_postProcessing() {}", "protected function _beforeToHtml()\n {\n return parent::_beforeToHtml();\n }", "public function cropHtmlWorksWithLinebreaks() {}", "protected function executePreRenderHook() {}", "private function renderPage()\n {\n $content = <<<EOD\n<div id=\"layout-block\">\n{$this->searchForm->render()}\n{$this->renderLegend()}\n{$this->renderPools()}\n</div>\nEOD;\n return $this->renderBaseTemplate($content);\n }", "function discard_sidebar_being_rendered()\n {\n }", "public function render() {\n\t\t$this->render_page_content();\n\t}", "function _block_template_render_without_post_block_context($context)\n {\n }", "protected function renderElseChild() {}", "public function render() {\r\n\t\t// be able to create a sliding page window. If we have less than that, we\r\n\t\t// will just render a simple range of page links insteadof the sliding.\r\n\t\t/*------------------------------------------------\r\n\t\t| >>beststrelok<<\r\n\t\t------------------------------------------------*/\r\n\t\t// https://gist.github.com/beststrelok/17a6328d75da5492860d/revisions\r\n\t\t// http://laravel.com/docs/4.2/pagination#custom-presenters\r\n\t\t/*----------------------------------------------*/\r\n\t\tif ($this->lastPage < 7)\r\n\t\t{\r\n\t\t\t$content = $this->getPageRange(1, $this->lastPage);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$content = $this->getPageSlider();\r\n\t\t}\r\n\r\n\t\treturn $content;\r\n\t}", "public function disableRendering($disable = true);", "protected function render() {}", "protected function render() {}", "protected function render() {}", "protected function shouldRender()\n {\n return true;\n }", "function CheckPageBreak1($h)\r\n{\r\n if($this->GetY()+$h>$this->PageBreakTrigger)\r\n $this->AddPage($this->CurOrientation);\r\n}", "public function getPageRenderer() {}", "public function getPageRenderer() {}", "private function writeBreaks(): void\n {\n // initialize\n $vbreaks = [];\n $hbreaks = [];\n\n foreach ($this->phpSheet->getRowBreaks() as $cell => $break) {\n // Fetch coordinates\n $coordinates = Coordinate::coordinateFromString($cell);\n $hbreaks[] = $coordinates[1];\n }\n foreach ($this->phpSheet->getColumnBreaks() as $cell => $break) {\n // Fetch coordinates\n $coordinates = Coordinate::indexesFromString($cell);\n $vbreaks[] = $coordinates[0] - 1;\n }\n\n //horizontal page breaks\n if (!empty($hbreaks)) {\n // Sort and filter array of page breaks\n sort($hbreaks, SORT_NUMERIC);\n if ($hbreaks[0] == 0) { // don't use first break if it's 0\n array_shift($hbreaks);\n }\n\n $record = 0x001b; // Record identifier\n $cbrk = count($hbreaks); // Number of page breaks\n $length = 2 + 6 * $cbrk; // Bytes to follow\n\n $header = pack('vv', $record, $length);\n $data = pack('v', $cbrk);\n\n // Append each page break\n foreach ($hbreaks as $hbreak) {\n $data .= pack('vvv', $hbreak, 0x0000, 0x00ff);\n }\n\n $this->append($header . $data);\n }\n\n // vertical page breaks\n if (!empty($vbreaks)) {\n // 1000 vertical pagebreaks appears to be an internal Excel 5 limit.\n // It is slightly higher in Excel 97/200, approx. 1026\n $vbreaks = array_slice($vbreaks, 0, 1000);\n\n // Sort and filter array of page breaks\n sort($vbreaks, SORT_NUMERIC);\n if ($vbreaks[0] == 0) { // don't use first break if it's 0\n array_shift($vbreaks);\n }\n\n $record = 0x001a; // Record identifier\n $cbrk = count($vbreaks); // Number of page breaks\n $length = 2 + 6 * $cbrk; // Bytes to follow\n\n $header = pack('vv', $record, $length);\n $data = pack('v', $cbrk);\n\n // Append each page break\n foreach ($vbreaks as $vbreak) {\n $data .= pack('vvv', $vbreak, 0x0000, 0xffff);\n }\n\n $this->append($header . $data);\n }\n }", "protected function get_vc_inline_html() {\n\t\t\treturn false;\n\t\t}", "function outputEntitiesOff()\n\t{\n\t\t$this->bOutputEntities = false;\n\t}", "protected function render()\n {\n }", "protected function render()\n {\n }", "protected function render()\n {\n }", "protected function applyPageLayout()\n {\n $this->content = \"\n @extends('generated/layout')\n \";\n }", "protected function render()\n {\n }", "protected function renderTableSeparateBlock(): string\n {\n return\n '<tbody class=\"skipped\">' .\n '<tr>' .\n '<td></td>' .\n '</tr>' .\n '</tbody>';\n }", "abstract function render_page();", "public function beforeRender() {\r\n\t}", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }" ]
[ "0.6742706", "0.6448495", "0.6311502", "0.6277528", "0.6229835", "0.61273193", "0.60398173", "0.5789953", "0.5690878", "0.56736743", "0.559771", "0.55736536", "0.55182624", "0.55023396", "0.54714656", "0.54564226", "0.54258126", "0.5423736", "0.5387681", "0.53630674", "0.5347457", "0.53122294", "0.5304103", "0.5303762", "0.53027403", "0.52953994", "0.52929413", "0.5279239", "0.52736527", "0.5273197", "0.526719", "0.526639", "0.5266339", "0.5266339", "0.526445", "0.526445", "0.526445", "0.526445", "0.5259697", "0.5250979", "0.52486235", "0.52288866", "0.52286017", "0.52183825", "0.52106494", "0.52106494", "0.5202597", "0.5202597", "0.5194088", "0.51887584", "0.51845", "0.5175912", "0.51753706", "0.51753706", "0.51753706", "0.5173121", "0.5159757", "0.5148714", "0.514803", "0.514803", "0.514803", "0.514803", "0.5137014", "0.5104599", "0.50899255", "0.5084001", "0.5084001", "0.50624394", "0.50525147", "0.5051431", "0.5044237", "0.5039529", "0.5005512", "0.5002193", "0.4992425", "0.49812347", "0.49762163", "0.49718237", "0.49685875", "0.49509645", "0.49509645", "0.49500382", "0.4943466", "0.49328995", "0.49325314", "0.49305946", "0.49270806", "0.49190727", "0.49166247", "0.49121442", "0.49115628", "0.49115628", "0.4911406", "0.4911284", "0.49079645", "0.49062213", "0.48994657", "0.48985615", "0.48985615", "0.48985615" ]
0.5832763
7
Ignore date dropdown style on render.
public function ignore_date_dropdowns( $field, $form_data ) { if ( 'date-time' === $field['type'] && 'dropdown' === $field['date_type'] ) { $field['date_type'] = 'datepicker'; } return $field; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function minorite_date_popup_process_alter(&$element, &$form_state, $context) {\n $element['date']['#attributes']['class'][] = 'has-datepicker';\n $element['date']['#title_display'] = 'none';\n}", "function get_style_type() { return 'date_nav'; }", "function remove_date_drop(){\n$screen = get_current_screen();\n if ( 'contact' == $screen->post_type ){\n add_filter('months_dropdown_results', '__return_empty_array');\n }\n}", "public function datepicker_css()\n\t{\n\t\t$this->actions();\n\t\treturn $this->actions->datepicker_css( ! $this->check_no(ee()->TMPL->fetch_param('include_jqui')));\n\t}", "public function disableYear() {\n\t\t$this->displayYear = false;\n\t}", "public function render() {\n Openbizx::$app->getClientProxy()->includeCalendarScripts();\n\n $format = $this->dateFormat ? $this->dateFormat : \"%Y-%m-%d\";\n\n $sHTML = parent::render();\n\n $showTime = 'false';\n //$image = \"<img src=\\\"\".Openbizx::$app->getImageUrl().\"/calendar.gif\\\" border=0 title=\\\"Select date...\\\" align='top' hspace='2'>\";\n $sHTML .= \"<a class=\\\"date_picker\\\" href=\\\"javascript: void(0);\\\" onclick=\\\"return showCalendar('$this->objectName','$format',$showTime,true);\\\"></a>\";\n return $sHTML;\n }", "function DateDropDowns($name,$sel,$attr,$class_time,$class_date,$showdate,$tag_between,$p=array(),$return=false) {\n\tif (!is_array($p)) {\n\t\t$p = array();\t\n\t}\n\tif (is_array($sel)) {\n\t\t$sel = sprintf('%04d-%02d-%02d %02d:%02d:00', $sel['Year'],$sel['Month'],$sel['Day'],$sel['Hour'],$sel['Minute']);\n\t}\n\telseif (is_numeric($sel)) {\n\t\t$sel = Date::td($sel);\n\t}\n\t$tag_sep = ' ';\n\tif (is_array($tag_between)) {\n\t\t$tag_sep = $tag_between[1];\n\t\t$tag_between = $tag_between[0];\t\n\t}\n\tif (!isset($p['hour_next'])) $p['hour_next'] = 0;\n\tif (!isset($p['minute_next'])) $p['minute_next'] = 0;\n\n\t\n\tif (!isset($p['empty'])) $p['empty'] = false;\n\t\n\tif (!$sel || $sel=='0000-00-00 00:00:00') {\n\t\tif (!$p['empty']) {\n\t\t\t$sel = Date::now($p['year_next'],$p['month_next'],$p['day_next'],$p['hour_next'],$p['minute_next']);\n\t\t}\n\t}\n\t$year_sel = $month_sel = $day_sel = $minute_sel = $hour_sel = '';\n\t$l = strlen($sel);\n\tif ($l==19 || $l==10) {\n\t\t$year_sel = (int)substr($sel, 0, 4);\n\t\t$month_sel = (int)substr($sel, 5, 2);\n\t\t$day_sel = (int)substr($sel, 8, 2);\n\t\tif ($l!=10) {\n\t\t\t$hour_sel = (int)substr($sel, 11, 2);\n\t\t\t$minute_sel = (int)substr($sel, 14, 2);\n\t\t}\n\t} elseif ($l==8) {\n\t\t$hour_sel = (int)substr($sel, 0, 2);\n\t\t$minute_sel = (int)substr($sel, 3, 2);\n\t}\n\tif (!$p['empty']) {\n\t\tif (!$day_sel) $day_sel = Date::day();\n\t\tif (!$month_sel) $day_sel = date('m');\n\t\tif (!$year_sel) $year_sel = date('Y');\n\t\tif (!$hour_sel) $hour_sel = Date::hour();\n\t\tif (!$minute_sel) $minute_sel = Date::minute();\n\t}\n\telseif ($l!=19 && $l!=10) {\n\t\t$hour_sel = -1;\n\t\t$minute_sel = -1;\n\t}\n\t$time = $date = '';\t\n\t$attr = ' style=\"width:auto\"'.$attr;\n\t\n\tif (!$p['hour_from']) $p['hour_from'] = 0;\n\tif (!$p['hour_to']) $p['hour_to'] = 23;\n\tif (!$p['minute_from']) $p['minute_from'] = 0;\n\tif (!$p['minute_to']) $p['minute_to'] = 59;\n\tif (!$p['month_from']) $p['month_from'] = 1;\n\tif (!$p['month_to']) $p['month_to'] = 12;\n\tif (!$p['day_from']) $p['day_from'] = 1;\n\t\n\tif (!$p['day_to']) {\n\t\tif (!$p['day_to']) $p['day_to'] = 31;\n\t}\n\t$e = '';\n\t\n\tif (strpos($name,'[')) $e = ']';\n\tif ($showdate=='front' || $showdate=='left' || $showdate=='end' || $showdate=='right' || $showdate=='no_date') {\n\t\t// Hours\n\t\t$time .= '<select name=\"'.$name.'Hour'.$e.'\" id=\"'.name2id($name.'Hour'.$e).'\" class=\"'.$class_time.' select-hour\"'.$attr.'>';\n\t\tif ($p['empty']) $time .= '<option value=\"\"></option>';\n\t\t$time .= dateToOpts($p['hour_from'],$p['hour_to'],$p['hour_step'],0,23,$hour_sel,'hour',false,@$p['now']);\n\t\t$time .= '</select>';\n\t\t// Minutes\n\t\t$time .= ' <select name=\"'.$name.'Minute'.$e.'\" id=\"'.name2id($name.'Minute'.$e).'\" class=\"'.$class_time.' select-minute\"'.$attr.'>';\n\t\tif ($p['empty']) $time .= '<option value=\"\"></option>';\n\t\t$time .= dateToOpts($p['minute_from'],$p['minute_to'],$p['minute_step'],0,59,$minute_sel,'minute',false,@$p['now']);\n\t\t$time .= '</select>';\n\t}\n\t\n\tif ($showdate!='no_date') {\n\t\tif ($showdate=='front' || $showdate=='left') $date .= $tag_between;\n\t\t// Days\n\t\t$date .= '<select name=\"'.$name.'Day'.$e.'\" id=\"'.name2id($name.'Day'.$e).'\" class=\"'.$class_date.' select-day\"'.$attr.'>';\n\t\tif ($p['empty']) $date .= '<option value=\"\"'.(!$day_sel?' selected disabled':'').'>'.lang('_Day').'</option>';\n\t\t$date .= dateToOpts($p['day_from'],$p['day_to'],$p['day_step'],0,$p['day_to'],$day_sel,'day');\n\t\t$date .= '</select>';\n\t\t// Months\n\t\t$date .= $tag_sep.'<select name=\"'.$name.'Month'.$e.'\" id=\"'.name2id($name.'Month'.$e).'\" class=\"'.$class_date.' select-month\"'.$attr.'>';\n\t\tif ($p['empty']) $date .= '<option value=\"\"'.(!$month_sel?' selected disabled':'').'>'.lang('_Month').'</option>';\n\t\tif (!isset($p['months']) || !$p['months']) $p['months'] = Data::getArray('arr:months_med');\n\t\t$date .= dateToOpts($p['month_from'],$p['month_to'],$p['month_step'],1,12,$month_sel,'month',$p['months']);\n\t\t$date .= '</select>';\n\t\t// Years\n\t\tif ($p['year_from']-$p['year_to']<>0) {\n\t\t\t$date .= $tag_sep.'<select name=\"'.$name.'Year'.$e.'\" id=\"'.name2id($name.'Year'.$e).'\" class=\"'.$class_date.' select-year\"'.$attr.'>';\n\t\t\tif ($p['empty']) $date .= '<option value=\"\"'.(!$year_sel?' selected disabled':'').'>'.lang('_Year').'</option>';\n\t\t\t$date .= dateToOpts($p['year_from'],$p['year_to'],$p['year_step'],date('Y')-TOTAL_YEARS,date('Y')+TOTAL_YEARS,$year_sel,'year');\n\t\t\t$date .= '</select>';\n\t\t}\n\t\tif ($showdate=='end' || $showdate=='right') $date .= $tag_between;\n\t}\n\t\n\tif ($showdate=='front') $ret = $time.$date; else $ret = $date.$time;\n\tif ($return) return $ret; else echo $ret;\n}", "function kcsite_add_events_date_filter() {\n\n\tglobal $wpdb, $wp_locale;\n\n\t$months = $wpdb->get_results( $wpdb->prepare( \"\n\t\tSELECT DISTINCT YEAR( meta_value ) AS year, MONTH( meta_value ) AS month\n\t\tFROM $wpdb->postmeta\n\t\tWHERE meta_key = %s\n\t\tORDER BY meta_value ASC\n\t\", '_EventStartDate' ) );\n\n\t$month_count = count( $months );\n\n\tif ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) )\n\t\treturn;\n\n\t$m = isset( $_GET['_EventStartDate'] ) ? (int) $_GET['_EventStartDate'] : 0;\n\t?>\n\n\t<select id=\"EventStartDate-filter\" name='_EventStartDate'>\n\t\t<option<?php selected( $m, 0 ); ?> value='0'><?php _e( 'Pasirinkite renginio datą' ); ?></option>\n\t<?php\n\tforeach ( $months as $arc_row ) {\n\t\tif ( 0 == $arc_row->year )\n\t\t\tcontinue;\n\n\t\t$month = zeroise( $arc_row->month, 2 );\n\t\t$year = $arc_row->year;\n\n\t\tprintf( \"<option %s value='%s'>%s</option>\\n\",\n\t\t\tselected( $m, $year . $month, false ),\n\t\t\tesc_attr( $arc_row->year . $month ),\n\t\t\t/* translators: 1: month name, 2: 4-digit year */\n\t\t\tsprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )\n\t\t);\n\t}\n\t?>\n\t</select>\n\t<?php\n}", "public function disableNonMonthDays() {\n\t\t$this->displayNonMonthDays = false;\n\t}", "public function renderDateRange() {\n\t\tif(!empty($this->dateRange)) {\n\t\t\t$date_range_data = array(\n\t\t\t\t'from' => $this->dateRange->from->format(\"d.m.Y\"),\n\t\t\t\t'to' => $this->dateRange->to->format(\"d.m.Y\")\n\t\t\t);\n\t\t\t\n\t\t\t$this->template->date_range_data = $date_range_data;\n\t\t}\n\t}", "function beeldgeluid_date_all_day_label() {\n return '';\n}", "function olc_draw_date_selector($prefix, $date='') {\n\t$month_array = array();\n\t$month_array[1] =_JANUARY;\n\t$month_array[2] =_FEBRUARY;\n\t$month_array[3] =_MARCH;\n\t$month_array[4] =_APRIL;\n\t$month_array[5] =_MAY;\n\t$month_array[6] =_JUNE;\n\t$month_array[7] =_JULY;\n\t$month_array[8] =_AUGUST;\n\t$month_array[9] =_SEPTEMBER;\n\t$month_array[10] =_OCTOBER;\n\t$month_array[11] =_NOVEMBER;\n\t$month_array[12] =_DECEMBER;\n\t$usedate = getdate($date);\n\t$day = $usedate['mday'];\n\t$month = $usedate['mon'];\n\t$year = $usedate['year'];\n\t$date_selector = '<select name=\"'. $prefix .'_day\">';\n\tfor ($i=1;$i<32;$i++){\n\t\t$date_selector .= '<option value=\"' . $i . QUOTE;\n\t\tif ($i==$day) $date_selector .= 'selected';\n\t\t$date_selector .= '>' . $i . '</option>';\n\t}\n\t$date_selector .= '</select>';\n\t$date_selector .= '<select name=\"'. $prefix .'_month\">';\n\tfor ($i=1;$i<13;$i++){\n\t\t$date_selector .= '<option value=\"' . $i . QUOTE;\n\t\tif ($i==$month) $date_selector .= 'selected';\n\t\t$date_selector .= '>' . $month_array[$i] . '</option>';\n\t}\n\t$date_selector .= '</select>';\n\t$date_selector .= '<select name=\"'. $prefix .'_year\">';\n\tfor ($i=2001;$i<2019;$i++){\n\t\t$date_selector .= '<option value=\"' . $i . QUOTE;\n\t\tif ($i==$year) $date_selector .= 'selected';\n\t\t$date_selector .= '>' . $i . '</option>';\n\t}\n\t$date_selector .= '</select>';\n\treturn $date_selector;\n}", "public function getDateFilterHtml()\n {\n return $this->getChildHtml('date_filter');\n }", "function print_date_selection_set( $p_name, $p_format, $p_date = 0, $p_default_disable = false, $p_allow_blank = false, $p_year_start = 0, $p_year_end = 0, $p_input_css = \"input-sm\" ) {\n\tif( $p_date != 0 ) {\n\t\t$t_date = date( $p_format, $p_date );\n\t} else {\n\t\t$t_date = '';\n\t}\n\n\t$t_disable = '';\n\tif( $p_default_disable == true ) {\n\t\t$t_disable = ' readonly=\"readonly\"';\n\t}\n\n \techo '<input ' . helper_get_tab_index() . ' type=\"text\" name=\"' . $p_name . '_date\" ' .\n\t\t' class=\"datetimepicker ' . $p_input_css . '\" ' . $t_disable .\n\t\t' data-picker-locale=\"' . lang_get_current_datetime_locale() . '\"' .\n\t\t' data-picker-format=\"' . convert_date_format_to_momentjs( $p_format ) . '\"' .\n\t\t' size=\"16\" maxlength=\"20\" value=\"' . $t_date . '\" />';\n\techo '<i class=\"fa fa-calendar fa-xlg datetimepicker\"></i>';\n}", "public function getControl()\n {\n $control = parent::getControl();\n $rules = json_encode($control->attrs['data-nette-rules']);\n\n $name = $this->getHtmlName();\n $result = Html::el('div')->addAttributes(['class' => 'input-date',]);\n\n $selectDay = $this->day ?: '';\n $selectMonth = $this->month ?: '';\n $selectYear = $this->year ?: '';\n\n return $result\n ->add(Nette\\Forms\\Helpers::createSelectBox(\n self::$days,\n ['selected?' => $selectDay,'disabled:' => ['' => TRUE],]\n )->addAttributes(['class' => 'form-control input-date-item', 'placeholder'=> 'den', 'data-nette-rules' => $rules])->name($name . '[day]'))\n ->add(Nette\\Forms\\Helpers::createSelectBox(\n self::$months,\n ['selected?' => $selectMonth,'disabled:' => ['' => TRUE],]\n )->addAttributes(['class' => 'form-control input-date-item', 'data-nette-rules' => $rules])->name($name . '[month]'))\n ->add(Nette\\Forms\\Helpers::createSelectBox(\n $this->getYears(),\n ['selected?' => $selectYear,'disabled:' => ['' => TRUE],]\n )->addAttributes(['class' => 'form-control input-date-item', 'data-nette-rules' => $rules])->name($name . '[year]'));\n }", "function DatesSelectField($dates=array())\n {\n if (empty($dates)) { $dates=$this->Dates(); }\n return\n $this->Html_Select_Multi_Field\n (\n $dates,\n \"Dates\",\n \"ID\",\n \"#Text\",\n \"\",\n $this->CGI2Dates(),\n $addempty=FALSE\n );\n }", "function form_date($field, $options){\n $defaults = array(\n 'wrap' => true,\n 'label' => true,\n 'class' => array('date', 'input'),\n 'minYear' => date('Y') - 10,\n 'maxYear' => date('Y') + 10,\n 'months' => array(\n 1 => 'January',\n 2 => 'February',\n 3 => 'March',\n 4 => 'April',\n 5 => 'May',\n 6 => 'June',\n 7 => 'July',\n 8 => 'August',\n 9 => 'September',\n 10 => 'October',\n 11 => 'November',\n 12 => 'December'\n ),\n 'days' => array(\n 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8,\n 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15,\n 16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20, 21 => 21, 22 => 22,\n 23 => 23, 24 => 24, 25 => 25, 26 => 26, 27 => 27, 28 => 28, 29 => 29,\n 30 => 30, 31 => 31\n ),\n 'separator' => '-'\n );\n\n $options = array_merge($defaults, $options);\n\n $years = array();\n for($i = $options['minYear']; $i <= $options['maxYear']; $i++) {\n $years[$i] = $i;\n }\n\n if(empty($_POST[$field . '[day]'])) {\n $today = date('j');\n if(!empty($options['days'][$today])) {\n $_POST[$field . '[day]'] = $today;\n }\n }\n\n $output = form_select(\n $field . '[day]',\n array(\n 'wrap' => false,\n 'label' => false,\n 'options' => $options['days']\n )\n );\n\n $output .= $options['separator'];\n\n if(empty($_POST[$field . '[month]'])) {\n $today = date('n');\n if(!empty($options['months'][$today])) {\n $_POST[$field . '[month]'] = $today;\n }\n }\n\n $output .= form_select(\n $field . '[month]',\n array(\n 'wrap' => false,\n 'label' => false,\n 'options' => $options['months']\n )\n );\n\n $output .= $options['separator'];\n\n if(empty($_POST[$field . '[year]'])) {\n $today = date('Y');\n if(!empty($years[$today])) {\n $_POST[$field . '[year]'] = $today;\n }\n }\n\n $output .= form_select(\n $field . '[year]',\n array(\n 'wrap' => false,\n 'label' => false,\n 'options' => $years\n )\n );\n\n if($options['wrap']) {\n $options['field'] = $field;\n $output = form__wrap($output, $options);\n }\n\n $error = form_error_message($field);\n if(!empty($error)) {\n $output .= $error;\n }\n\n return html__output($output);\n}", "public function dateViewHelperFormatsDateLocalizedDataProvider() {}", "public function hideEndDateWhenEmpty(DataContainer $dc)\r\n {\r\n $date = $this->Database->prepare(\"SELECT id, start_date FROM tl_ausschreibung WHERE start_date!='' AND end_date=''\")->execute();\r\n while ($row = $date->next())\r\n {\r\n $end_date = $this->Database->prepare(\"UPDATE tl_ausschreibung SET end_date = ? WHERE id = ?\");\r\n $end_date->execute($row->start_date, $row->id);\r\n }\r\n //Wenn end-datum leer ist, wird es ausgeblendet, das ist der Fall beim Erstellen neuer Anlaesse\r\n if ($dc->id != \"\" && $this->Input->get('mode') != 'csv_import')\r\n {\r\n\r\n $date = $this->Database->prepare(\"SELECT start_date FROM tl_ausschreibung WHERE id = ?\")->execute($dc->id);\r\n $date->fetchAssoc();\r\n if ($date->start_date == \"\")\r\n {\r\n $GLOBALS['TL_DCA']['tl_ausschreibung']['palettes']['default'] = 'start_date, art, ort, wettkampfform; zeit, trainer; kommentar; phase, trainingsstunden';\r\n }\r\n }\r\n\r\n }", "public function hideStartDay()\n\t{\n\t\treturn '\n <script>\n var enableStartDay = function() {\n var e1 = $(\"ctrl_news_startDay\").getParent(\"div\");\n var e2 = $(\"ctrl_news_order\").getParent(\"div\");\n if ($(\"ctrl_news_format\").value == \"news_day\") {\n e1.setStyle(\"display\", \"block\");\n e2.setStyle(\"display\", \"none\");\n\t } else {\n e1.setStyle(\"display\", \"none\");\n e2.setStyle(\"display\", \"block\");\n\t }\n };\n window.addEvent(\"domready\", function() {\n if ($(\"ctrl_news_startDay\")) {\n enableStartDay();\n $(\"ctrl_news_format\").addEvent(\"change\", enableStartDay);\n }\n });\n </script>';\n\t}", "function _webform_datelist_date_date_callback(array &$element, FormStateInterface $form_state, $date) {\n $no_abbreviate = (isset($element['#date_abbreviate']) && $element['#date_abbreviate'] === FALSE);\n if ($no_abbreviate && isset($element['month']) && isset($element['month']['#options'])) {\n // Load translated date part labels from the appropriate calendar plugin.\n $date_helper = new DateHelper();\n $element['month']['#options'] = $date_helper->monthNames($element['#required']);;\n }\n}", "function disable_text_select() {\n if (get_theme_mod('select_details')) {\n wp_enqueue_style('noselect', get_template_directory_uri() . '/framework/assets/css/disable_select.css');\n }\n}", "public function enableNonMonthDays() {\n\t\t$this->displayNonMonthDays = true;\n\t}", "function wp_ajax_date_format()\n {\n }", "function get_birthdate_options($date_of_birth)\n\t\t{\n\t\t\tglobal $user;\n\t\t\t$bdate = explode(\"-\", $date_of_birth); //day-month-year\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\n\t\t\t$s_birthday_day_options = '<option value=\"0\"' . ((!$day) ? ' selected=\"selected\"' : '') . '>' . $user->lang['DAY'] . '</option>';\n\t\t\tfor ($i = 1; $i < 32; $i++)\n\t\t\t{\n\t\t\t\t$selected = ($i == $day) ? ' selected=\"selected\"' : '';\n\t\t\t\t$s_birthday_day_options .= \"<option value=\\\"$i\\\"$selected>$i</option>\";\n\t\t\t}\n\n\t\t\t$s_birthday_month_options = '<option value=\"0\"' . ((!$month) ? ' selected=\"selected\"' : '') . '>' . $user->lang['MONTH'] . '</option>';\n\t\t\t$lang_dates = array(1 => $user->lang['datetime']['Jan'], $user->lang['datetime']['Feb'], $user->lang['datetime']['Mar'], $user->lang['datetime']['Apr'], $user->lang['datetime']['May_short'], $user->lang['datetime']['Jun'], $user->lang['datetime']['Jul'], $user->lang['datetime']['Aug'], $user->lang['datetime']['Sep'], $user->lang['datetime']['Oct'], $user->lang['datetime']['Nov'], $user->lang['datetime']['Dec']);\n\t\t\tfor ($i = 1; $i < 13; $i++)\n\t\t\t{\n\t\t\t\t$selected = ($i == $month) ? ' selected=\"selected\"' : '';\n\t\t\t\t$s_birthday_month_options .= \"<option value=\\\"$i\\\"$selected>{$lang_dates[$i]}</option>\";\n\t\t\t}\n\n\t\t\t$now = getdate();\n\t\t\t$s_birthday_year_options = '<option value=\"0\"' . ((!$year) ? ' selected=\"selected\"' : '') . '>' . $user->lang['YEAR'] . '</option>';\n\t\t\tfor ($i = $now['year']; $i > $now['year'] - 100; $i--)\n\t\t\t{\n\t\t\t\t$selected = ($i == $year) ? ' selected=\"selected\"' : '';\n\t\t\t\t$s_birthday_year_options .= \"<option value=\\\"$i\\\"$selected>$i</option>\";\n\t\t\t}\n\t\t\tunset($now);\n\t\t\treturn(array($s_birthday_day_options, $s_birthday_month_options, $s_birthday_year_options));\n\t\t}", "public function datepicker_js()\n\t{\n\t\t$this->actions();\n\t\treturn $this->actions->datepicker_js( ! $this->check_no(ee()->TMPL->fetch_param('include_jqui')));\n\t}", "protected function formats_dropdown($post_type)\n {\n }", "public function render()\n {\n switch ($this->form) {\n case 'v':\n case 'vertical':\n return view('components.forms.date-vertical');\n break;\n default:\n return view('components.forms.date');\n break;\n }\n }", "function options_submit($form, &$form_state) {\r\n parent::options_submit($form, $form_state);\r\n \r\n if ($form_state['values']['form_id'] == 'views_ui_config_item_form') {\r\n $form_state['values']['options']['date_fields'] = array_filter($form_state['values']['options']['date_fields']);\r\n }\r\n }", "function carton_date_format() {\n\treturn apply_filters( 'carton_date_format', get_option( 'date_format' ) );\n}", "public function render_date_filter_mode_selector() {\n\t\t$modes = $this->get_date_filter_mode_list();\n\t\tif ( ! $modes ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$selected = $this->get_date_filter_mode();\n\n\t\t$select_html = '<select name=\"date_filter_mode\" style=\"line-height:26px;height:26px;\">';\n\t\tforeach ( $modes as $key => $value) {\n\t\t\t$select_html .= sprintf( '<option value=\"%s\"%s>%s</option>',\n\t\t\t\tesc_html( $key ),\n\t\t\t\t$key == $selected ? ' selected=\"selected\"' : '',\n\t\t\t\tesc_html( $value )\n\t\t\t);\n\t\t}\n\t\t$select_html .= '</select>';\n\n\t\treturn sprintf( '<div style=\"padding-left:10px\">%s %s</div>', esc_html__( 'Filter by', 'adventure-tours' ), $select_html );\n\t}", "function theme_date(&$item) {\n\n\t\t$retval = $this->theme_select($item[\"year\"])\n\t\t\t. \" \"\n\t\t\t. $this->theme_select($item[\"month\"])\n\t\t\t. \" \"\n\t\t\t. $this->theme_select($item[\"day\"])\n\t\t\t. \" \"\n\t\t\t;\n\n\t\treturn($retval);\n\n\t}", "function widget_date($inputname, $defaultdate=NULL) {\n\t\treturn '<div data-date-viewmode=\"years\" data-date-format=\"dd-mm-yyyy\" data-date=\"'.$defaultdate.'\" id=\"'.$inputname.'-container\" class=\"input-append date\">\n\t\t\t\t<input type=\"text\" value=\"'.$defaultdate.'\" name=\"'.$inputname.'\" size=\"16\" class=\"span\">\n\t\t\t\t<span class=\"add-on\"><i class=\"icon-calendar\"></i></span>\n\t\t\t</div>\n\t\t\t<script>$(\"#'.$inputname.'-container\").datepicker({\n\t\t\t\t\t\t\t\t\"setValue\": \"'.$defaultdate.'\",\n\t\t\t\t\t\t\t\t\"format\": \"dd/mm/yyyy\"\n\t\t\t});</script>\n\t\t\t';\n\t}", "public function getDuedateAttribute(){\n\n if($this->attributes['duedate']){\n return Helpers::custom_date_format(env('SITE_DATEPICKERFORMAT'),$this->attributes['duedate']);\n }\n\n\n }", "function template_date_select($params,&$smarty)\n {\n extract($params);\n \n if (empty($name)) {\n return;\n }\n \n $buffer = '<input type=\"text\" size=\"12\" maxlength=\"12\" name=\"'.$name.'\" value=\"'.$value.'\" /> (Format: mm/dd/yyyy)';\n return $buffer;\n }", "function hundope_select_field_render() { \n\t\n}", "public function testYearOnlyDateSkip() {\n $defaults = json_decode(get_option('neatline_time_defaults'), true);\n $defaults['render_year'] = 'skip';\n set_option('neatline_time_defaults', json_encode($defaults));\n $this->assertFalse(\n neatlinetime_convert_date('2012')\n );\n }", "public function configureOptions(OptionsResolver $resolver): void\n {\n parent::configureOptions($resolver);\n $resolver->setDefault('displayFormat', 'dd/mm/yyyy');\n $resolver->setDefault('todayHighlight', false);\n $resolver->setDefault('weekStart', 1);\n $resolver->setDefault('daysOfWeekHighlighted', '');\n $resolver->setDefault('daysOfWeekDisabled', '');\n $resolver->setDefault('multidate', '');\n }", "function cp_v2_framework_datepicker_admin_styles( $hook ) {\r\n\r\n\t$cp_page = strpos( $hook, CP_PRO_SLUG );\r\n\t$dev_mode = get_option( 'cp_dev_mode' );\r\n\tif ( '1' === $dev_mode ) {\r\n\t\twp_enqueue_script( 'cp-datetime-script', plugins_url( 'datetimepicker.js', __FILE__ ), array( 'cp-datetimepicker-script' ), '1.0.0', true );\r\n\t}\r\n\r\n}", "function DateSelector($SelectedDate, $StartDate, $Prefix = 'date', $Years = 10) {\n\t \t\t// The selcted year\n\t \t\t$selectedYear = date('Y', $SelectedDate);\n\t \t\t// The 'maximum'-year (StartDate->Year + Years)\n\t \t\t$endYear = date('Y', $StartDate) + $Years;\n\t \t\t// The selected day\n\t \t\t$selectedDay = date('j', $SelectedDate);\n\t \t\t// The selected month\n\t \t\t$selectedMonth = date('n', $SelectedDate);\n\t \t\t// The selected hour\n\t \t\t$selectedHour = date('G', $SelectedDate);\n\t \t\t// The selected minute\n\t \t\t$selectedMinute = date('i', $SelectedDate);\n\t \t\t\t \t\t\t \t\t\n\t \t\t$out = \"<select id=\\\"{$Prefix}Day\\\" name=\\\"{$Prefix}Day\\\">\";\n\t \t\t// print all possible days of a month\n\t \t\tfor($i = 1; $i <= 31; $i++) {\n\t \t\t\tif($i == $selectedDay)\n\t \t\t\t\t$out .= \"<option selected=\\\"selected\\\" value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t\telse\n\t \t\t\t\t$out .= \"<option value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t}\n\t \t\t$out .= \"</select>\\r\\n\n\t\t\t\t<select id=\\\"{$Prefix}Month\\\" name=\\\"{$Prefix}Month\\\">\";\n\t\t\t// print all months\n\t \t\tfor($i = 1; $i <= 12; $i++) {\n\t \t\t\tif($i == $selectedMonth)\n\t \t\t\t\t$out .= \"<option selected=\\\"selected\\\" value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t\telse\n\t \t\t\t\t$out .= \"<option value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t}\n\t \t\t$out .= \"</select>\\r\\n\n\t \t\t\t<select id=\\\"{$Prefix}Year\\\" name=\\\"{$Prefix}Year\\\">\";\n\t \t\t// print all selectable years, but make sure that the year is greater than 1970 (lower years will make trouble in windows environments)\n\t \t\tfor($i = ($selectedYear - $Years < 1970) ? 1970 : ($selectedYear - $Years); $i <= $endYear; $i++) {\n\t \t\t\tif($i == $selectedYear)\n\t \t\t\t\t$out .= \"<option selected=\\\"selected\\\" value=\\\"$i\\\">$i</option>\\r\\n\";\n\t \t\t\telse\n\t \t\t\t\t$out .= \"<option value=\\\"$i\\\">$i</option>\\r\\n\";\n\t \t\t}\n\t \t\t$out .= \"</select>\\r\\n\n\t\t\t\t<select id=\\\"{$Prefix}Hour\\\" name=\\\"{$Prefix}Hour\\\">\";\n\t \t\t// print all hours\n\t \t\tfor($i = 0; $i <= 23; $i++) {\n\t \t\t\tif($i == $selectedHour)\n\t \t\t\t\t$out .= \"<option selected=\\\"selected\\\" value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t\telse\n\t \t\t\t\t$out .= \"<option value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t}\n\t \t\t$out .= \"</select>\\r\\n\n\t\t\t\t<select id=\\\"{$Prefix}Minute\\\" name=\\\"{$Prefix}Minute\\\">\";\n\t \t\t// print all minutes\n\t \t\tfor($i = 0; $i <= 59;$i++) {\n\t \t\t\tif($i == $selectedMinute)\n\t \t\t\t\t$out .= \"<option selected=\\\"selected\\\" value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t\telse\n\t \t\t\t\t$out .= \"<option value=\\\"$i\\\">\" . substr('0' . $i, -2) . \"</option>\\r\\n\";\n\t \t\t}\n\t \t\t$out .= \"</select>\";\n\t \t\treturn $out;\n\t \t}", "function getDateRangePicker(){\n\treturn array('last60days'=>'Last 60 Days','today'=>'Today','thisweek'=>'This Week (Mon to Sun)','lastweek'=>'Last Week (Mon to Sun)','thismonth'=>'This Month','lastmonth'=>'Last Month','last6months'=>'Last 6 Months','thisyear'=>'This Year','custom'=>'Custom');\n}", "public function getTypeDateOptions($selected=\"\")\n {\n $status_opt =[\"timerange\"=>\"Zeitspannen (Saison)\", \"validrange\"=>\"Zeitspanne (Veröffentlichungsdatum)\", \"fixdates\"=>\"Feste Termine\"];\n $opt ='<option value=\"\">- Datum-Typ auswählen -</option>';\n foreach ($status_opt as $key => $value)\n {\n $checked = ($key==$selected)?'selected':'';\n $opt .= '<option value=\"'.$key.'\" '.$checked.'>'.$value.'</option>';\n }\n return $opt;\n }", "private function renderDate($def)\n {\n $def = implode(' ', $def);\n\n $tpl = \"<sing-form-date $def></sing-form-date>\";\n\n return $tpl;\n }", "protected function date_to_html($event, $no_calendar_style, $date_color) {\n /*\n * Localization (l10n) of the date.\n *\n * Translation of day and month is leveraged to strftime(), the output\n * of which is controlled by the locale. The locale must therefore be\n * set to a value based on WPLANG (WordPress localized language).\n */\n // Save current locale setting.\n // WARNING: setlocale() is known to not be thread-safe!\n $date = $this->date();\n $saved_locale = setlocale(LC_TIME, \"0\");\n setlocale(LC_TIME, WPLANG . '.UTF-8');\n $day_name = strftime('%a', $date);\n $month_name = strftime('%b', $date);\n // Restore previous locale setting\n setlocale(LC_TIME, $saved_locale);\n\n // Not happy doing this, but the calendar styling is easily broken by the blog's or other plugin's styling.\n $css = array();\n if ($no_calendar_style) {\n $date_color = null;\n $css['year'] = '';\n $css['day'] = '';\n $css['month'] = '';\n $css['day-month'] = '';\n $css['date-wrapper'] = '';\n $css['a-date-wrapper'] = '';\n $css['day-name'] = '';\n } else {\n $css['year'] = 'font-size:1.6em;line-height:1em;';\n $css['day'] = 'display:block;font-size:1.8em;margin: 0px;margin-top: 2px;padding: 0px;';\n $css['month'] = 'font-size:1.4em;margin: 0px;margin-bottom: 2px;padding: 0px;';\n $css['day-month'] = 'border: 1px solid ' . $this->border_color . ';display:block;padding-bottom:4px;padding-top:3px;line-height:1.1em;';\n $css['date-wrapper'] = 'font-size:7px;font-weight:bold;margin-right:10px;color:' . $this->border_color . ';float:left;text-align:center;width:34px;margin-left:0px;line-height:1.1em;';\n $css['a-date-wrapper'] = 'text-decoration: none;color:' . $this->border_color;\n $css['day-name'] = 'background-color: #303030;color:#FFFFFF;display:block;font-size:7px;line-height:10px;padding-bottom:1px;padding-top:2px;text-shadow:1px 1px rgba(0, 0, 0, 0.6);text-transform:uppercase;';\n }\n\n // Construct the HTML block presenting the formatted date.\n $override_color = (empty($date_color)) ? '' : ';background-color:' . $date_color;\n $str = '<meta itemprop=\"startDate\" content=\"' . date('c', $date) . '\">';\n $str .= '<span class=\"date-wrapper\" style=\"' . $css['date-wrapper'] . '\"><a style=\"' . $css['a-date-wrapper'] . '\" title=\"' . date('Y-m-d', $date) . '\" href=\"' . $this->event_url($event) . '\">';\n $str .= ' <span class=\"day-name\" style=\"' . $css['day-name'] . $override_color . '\">' . htmlentities($day_name, ENT_QUOTES, 'UTF-8') . '</span>';\n $str .= ' <span class=\"day-month\" style=\"' . $css['day-month'] . '\"><span class=\"month\" style=\"' . $css['month'] . '\">' . htmlentities($month_name, ENT_QUOTES, 'UTF-8') . '</span>';\n $str .= ' <span class=\"day\" style=\"' . $css['day'] . '\">' . date('d', $date) . '</span></span>';\n $str .= ' <span class=\"year\" style=\"' . $css['year'] . '\">' . date('Y', $date) . '</span>';\n $str .= '</a></span>';\n\n return $str;\n }", "function filterByDate($date) {\n $this->setDateFilter(self::DATE_FILTER_SELECTED_DATE);\n $this->setAdditionalProperty('date_filter_on', (string) $date);\n }", "function setDateHtmlOptions( $html, $ctrlName, $date = \"\", $format = \"Y-m-d h:i:s\")\n\t{\n\t\tif($format == \"\")\n\t\t\t$format = \"Y-m-d h:i:s\";\n\t\tif($date == \"\")\n\t\t\t$date = date($format);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Day>\", \"</soo:datarepeater:\".$ctrlName.\"Day>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 1; $i < 32; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Day}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"DayDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Day}\", ($i == date(\"d\", strtotime( $date ) ) ) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Month>\", \"</soo:datarepeater:\".$ctrlName.\"Month>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 1; $i < 13; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Month}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"MonthDisplay}\", SoondaUtil::getMonthName( $i), $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Month}\", ($i == date(\"m\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Year>\", \"</soo:datarepeater:\".$ctrlName.\"Year>\");\n\t\t$sOptions = \"\";\n\t\t$currentYear = date(\"Y\");\n\t\tfor($i = $currentYear - 20; $i < $currentYear + 20; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Year}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"YearDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Year}\", ($i == date(\"Y\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Hour>\", \"</soo:datarepeater:\".$ctrlName.\"Hour>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 0; $i < 24; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Hour}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"HourDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Hour}\", ($i == date(\"h\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\t\t\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Minute>\", \"</soo:datarepeater:\".$ctrlName.\"Minute>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 0; $i < 60; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Minute}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"MinuteDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Minute}\", ($i == date(\"i\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\t\t\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Second>\", \"</soo:datarepeater:\".$ctrlName.\"Second>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 0; $i < 60; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Second}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"SecondDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Second}\", ($i == date(\"s\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\t\t\t\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\t\t$html = str_replace( \"{SOO.FUNCTION:SELECTEDDATE:\".$ctrlName.\"}\", date($format, strtotime($date) ), $html);\n\t\treturn $html;\n\t}", "private function initialize_datepicker_field($_field, $_post_type) {\r\n $localize = \"none\";\r\n $year_range = \"-10:+10\";\r\n \r\n if ( isset( $_field[\"language\"] ) && !empty( $_field[\"language\"] ) && $_field[\"language\"] != \"default\") {\r\n $localize = esc_attr($_field[\"language\"]);\r\n }\r\n if (isset($_field[\"dropdown_year_range\"]) && !empty($_field[\"dropdown_year_range\"])) {\r\n $year_range = esc_attr($_field[\"dropdown_year_range\"]);\r\n }\r\n \r\n /* Determine the current locale */\r\n $current_locale = wcff()->locale->detrmine_current_locale();\r\n /*If admin hadn't set locale, then try to determine */\r\n $localize = ($localize == \"none\") ? $current_locale : $localize;\r\n \r\n ob_start(); ?>\r\n \t\r\n\t\t<script type=\"text/javascript\">\t\t\r\n\t\t(function($) {\r\n\t\t\tjQuery(document).ready(function() {\r\n\t\t\t<?php\t\t\t\r\n\t\t\tif ($localize != \"none\" && $localize != \"en\") { ?>\r\n\t\t\t\t/* Datepicker User configured localization */\t\r\n\t\t\t\tif( typeof jQuery != \"undefined\" && typeof jQuery.datepicker != \"undefined\" ){\t\t\t\t\t\r\n \t\t\t\tvar options = jQuery.extend({}, jQuery.datepicker.regional[\"<?php echo $localize; ?>\"]);\r\n \t\t\t\t$.datepicker.setDefaults(options);\r\n\t\t\t\t}\r\n\t\t\t<?php \r\n\t\t\t} else { ?>\r\n\t\t\t\t/* Datepicker default configuration */\t\r\n\t\t\t\tif( typeof jQuery != \"undefined\" && typeof jQuery.datepicker != \"undefined\" ){\t\t\t\t\t\t\t\t\r\n \t\t\t\tvar options = jQuery.extend({}, jQuery.datepicker.regional[\"en-GB\"]);\r\n \t\t\t\t$.datepicker.setDefaults(options);\r\n\t\t\t\t}\r\n\t\t\t<?php \r\n\t\t\t}\t\t\t\t\r\n\t\t\t?>\r\n\t\t\t\r\n\t\t\tjQuery(\"body\").on(\"focus\", \".<?php echo $_post_type; ?>-datepicker-<?php echo esc_attr($_field[\"admin_class\"]); ?>\", function() {\r\n\t\t\t\t\tvar $ = jQuery;\r\n\t\t\t\t<?php if (isset($_field[\"timepicker\"]) && $_field[\"timepicker\"] == \"yes\") : ?>\r\n\t\t\t\tjQuery(this).datetimepicker({\r\n\t\t\t\t\t\tcontrolType: 'select',\r\n\t\t\t\t\t\toneLine: true,\r\n\t\t\t\t\t\ttimeFormat: 'hh:mm tt',\r\n\t\t\t\t\t<?php \r\n\t\t\t\t\tif (isset($_field[\"min_max_hours_minutes\"]) && !empty($_field[\"min_max_hours_minutes\"])) {\r\n\t\t\t\t\t\t$hour_minute = explode(\"|\", $_field[\"min_max_hours_minutes\"]);\r\n\t\t\t\t\t\tif (is_array($hour_minute) && count($hour_minute) == 2) {\r\n\t\t\t\t\t\t\tif ($hour_minute[0] != \"\") {\r\n\t\t\t\t\t\t\t\t$min_max_hours = explode(\":\", $hour_minute[0]);\r\n\t\t\t\t\t\t\t\tif (is_array($min_max_hours) && count($min_max_hours) == 2) { ?>\r\n\r\n\t\t\t\t\t\t\t\thourMin: <?php echo trim($min_max_hours[0]); ?>,\r\n\t\t\t\t\t\t\t\thourMax: <?php echo trim($min_max_hours[1]); ?>,\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\t$min_max_minutes = explode(\":\", $hour_minute[1]);\r\n\t\t\t\t\t\t\t\t\tif (is_array($min_max_minutes) && count($min_max_minutes) == 2) { ?>\r\n\r\n\t\t\t\t\t\t\t\t\tminuteMin: <?php echo trim($min_max_minutes[0]); ?>,\r\n\t\t\t\t\t\t\t\t\tminuteMax: <?php echo trim($min_max_minutes[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<?php \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\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\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\r\n\t\t\t\t<?php else : ?>\r\n\t\t\t\tjQuery(this).datepicker({\r\n\t\t\t\t<?php endif; ?>\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t<?php\t\t\t\r\n\t\t\t\t if (isset($_field[\"date_format\"]) && $_field[\"date_format\"] != \"\") {\r\n\t\t\t\t \techo \"dateFormat:'\". $this->convert_php_jquery_datepicker_format(esc_attr($_field[\"date_format\"])) .\"'\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t echo \"dateFormat:'\". $this->convert_php_jquery_datepicker_format(\"d-m-Y\") .\"'\";\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif (isset($_field[\"display_in_dropdown\"]) && !empty($_field[\"display_in_dropdown\"])) {\r\n\t\t\t\t\t\tif ($_field[\"display_in_dropdown\"] == \"yes\") {\r\n\t\t\t\t\t\t\techo \",changeMonth: true\";\r\n\t\t\t\t\t\t\techo \",changeYear: true\";\r\n\t\t\t\t\t\t\techo \",yearRange:'\". $year_range .\"'\";\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\tif (isset($_field[\"disable_date\"]) && !empty($_field[\"disable_date\"]) ) {\r\n\t\t\t\t\t\tif (\"future\" == $_field[\"disable_date\"]) {\r\n\t\t\t\t\t\t\techo \",maxDate: 0\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (\"past\" == $_field[\"disable_date\"]) {\r\n\t\t\t\t\t\t\techo \",minDate: new Date()\";\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isset($_field[\"disable_next_x_day\"]) && strlen($_field[\"disable_next_x_day\"]) > 0){\r\n\t\t\t\t\t echo \",minDate: '+\".$_field[\"disable_next_x_day\"].\"d'\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isset($_field[\"allow_next_x_years\"]) && !empty($_field[\"allow_next_x_years\"]) ||\r\n\t\t\t\t\t\tisset($_field[\"allow_next_x_months\"]) && !empty($_field[\"allow_next_x_months\"]) ||\r\n\t\t\t\t\t\tisset($_field[\"allow_next_x_weeks\"]) && !empty($_field[\"allow_next_x_weeks\"]) ||\r\n\t\t\t\t\t\tisset($_field[\"allow_next_x_days\"]) && !empty($_field[\"allow_next_x_days\"]) ) {\r\n\t\t\t\t\t\t$allowed_dates = \"\";\r\n\t\t\t\t\t\tif (isset($_field[\"allow_next_x_years\"]) && !empty($_field[\"allow_next_x_years\"]) && is_numeric($_field[\"allow_next_x_years\"])) {\r\n\t\t\t\t\t\t\t$allowed_dates .= \"+\". trim($_field[\"allow_next_x_years\"]) .\"y \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (isset($_field[\"allow_next_x_months\"]) && !empty($_field[\"allow_next_x_months\"]) && is_numeric($_field[\"allow_next_x_months\"])) {\r\n\t\t\t\t\t\t\t$allowed_dates .= \"+\". trim($_field[\"allow_next_x_months\"]) .\"m \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (isset($_field[\"allow_next_x_weeks\"]) && !empty($_field[\"allow_next_x_weeks\"]) && is_numeric($_field[\"allow_next_x_weeks\"])) {\r\n\t\t\t\t\t\t\t$allowed_dates .= \"+\". trim($_field[\"allow_next_x_weeks\"]) .\"w \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (isset($_field[\"allow_next_x_days\"]) && !empty($_field[\"allow_next_x_days\"]) && is_numeric($_field[\"allow_next_x_days\"])) {\r\n\t\t\t\t\t\t\t$allowed_dates .= \"+\". trim($_field[\"allow_next_x_days\"]) .\"d\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\techo \",minDate: 0\";\r\n\t\t\t\t\t\techo \",maxDate: \\\"\". trim($allowed_dates) .\"\\\"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/* Hooks up a call back for 'beforeShowDay' */\r\n\t\t\t\t\techo \",beforeShowDay: disableDates\";\t\t\r\n\t\t\t\t?>\t\t\t\t\t\r\n\t\t\t\t\t\t,onSelect: function( dateText ) {\t\r\n\t\t\t\t\t\t\t$( this ).trigger( \"change\" );\t\t\t\t\t\t\r\n\t\t\t\t\t\t $( this ).next().hide();\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t});\r\n\t\t\t\t});\t\t\r\n\r\n\t\t\t\tfunction disableDates( date ) {\t\r\n\t\t\t\t\t<?php if (is_array($_field[\"disable_days\"]) && count($_field[\"disable_days\"]) > 0) { ?>\r\n\t\t\t\t\t\t\t var disableDays = <?php echo json_encode($_field[\"disable_days\"]); ?>;\r\n\t\t\t\t\t\t\t var day \t= date.getDay();\r\n\t\t\t\t\t\t\t for (var i = 0; i < disableDays.length; i++) {\r\n\t\t\t\t\t\t\t\t\t var test = disableDays[i]\r\n\t\t\t\t\t\t\t\t \t\t test = test == \"sunday\" ? 0 : test == \"monday\" ? 1 : test == \"tuesday\" ? 2 : test == \"wednesday\" ? 3 : test == \"thursday\" ? 4 : test == \"friday\" ? 5 : test == \"saturday\" ? 6 : \"\";\r\n\t\t\t\t\t\t\t if ( day == test ) {\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t return [false];\r\n\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<?php } ?>\t\r\n\t\t\t\t\t<?php if (isset($_field[\"specific_date_all_months\"]) && !empty($_field[\"specific_date_all_months\"])){ ?>\r\n\t\t\t\t\t \t\tvar disableDateAll = <?php echo '\"'.$_field[\"specific_date_all_months\"].'\"'; ?>;\r\n\t\t\t\t\t \t\t\tdisableDateAll = disableDateAll.split(\",\");\r\n\t\t\t\t\t \t\tfor (var i = 0; i < disableDateAll.length; i++) {\r\n\t\t\t\t\t\t\t\tif (parseInt(disableDateAll[i].trim()) == date.getDate()){\r\n\t\t\t\t\t\t\t\t\treturn [false];\r\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t \t\t}\r\n\t\t\t\t\t<?php } ?>\t\t\t\t\t\t\r\n\t\t\t\t\t<?php if (isset($_field[\"specific_dates\"]) && !empty($_field[\"specific_dates\"])) { ?>\r\n\t\t\t\t\t\t\t\tvar disableDates = <?php echo \"'\".$_field[\"specific_dates\"].\"'\"; ?>;\r\n\t\t\t\t\t\t\t\t\tdisableDates = disableDates.split(\",\");\r\n\t\t\t\t\t\t\t\t\t/* Sanitize the dates */\r\n\t\t\t\t\t\t\t\t\tfor (var i = 0; i < disableDates.length; i++) {\t\r\n\t\t\t\t\t\t\t\t\t\tdisableDates[i] = disableDates[i].trim();\r\n\t\t\t\t\t\t\t\t\t}\t\t\r\n\t\t\t\t\t\t\t\t\t/* Form the date string to compare */\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tvar m = date.getMonth(),\r\n\t\t\t\t\t\t\t\t\td = date.getDate(),\r\n\t\t\t\t\t\t\t\t\ty = date.getFullYear(),\r\n\t\t\t\t\t\t\t\t\tcurrentdate = ( m + 1 ) + '-' + d + '-' + y ;\r\n\t\t\t\t\t\t\t\t/* Make dicision */\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif ( jQuery.inArray( currentdate, disableDates ) != -1 ) {\r\n\t\t\t\t\t\t\t\t\treturn [false];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<?php } ?>\t\r\n\t\t\t\t\t<?php if (isset($_field[\"disable_next_x_day\"]) && strlen($_field[\"disable_next_x_day\"]) > 0) {} ?>\t\t\t\t\t\r\n\t\t\t\t\t<?php if (isset($_field[\"weekend_weekdays\"]) && !empty($_field[\"display_in_dropdown\"])) { ?>\r\n\t\t\t\t\t\t\t<?php if ($_field[\"weekend_weekdays\"] == \"weekdays\"){ ?>\r\n\t\t\t\t\t\t\t\t//weekdays disable callback\r\n\t\t\t\t\t\t\t\tvar weekenddate = jQuery.datepicker.noWeekends(date);\r\n\t\t\t\t\t\t\t\tvar disableweek = [!weekenddate[0]]; \r\n\t\t\t\t\t\t\t\treturn disableweek;\r\n\t\t\t\t\t\t\t<?php } else if ($_field[\"weekend_weekdays\"] == \"weekends\") { ?>\r\n\t\t\t\t\t\t\t\t//weekend disable callback\r\n\t\t\t\t\t\t\t\tvar weekenddate = jQuery.datepicker.noWeekends(date);\r\n\t\t\t\t\t\t\t\treturn weekenddate; \r\n\t\t\t\t\t\t\t<?php } ?>\t\t\t\t\t\t\t\r\n\t\t\t\t\t<?php } ?>\t\t\t\t\t\t\r\n\t\t\t\t\treturn [true];\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t});\r\n\t\t})(jQuery);\r\n\t\t</script>\r\n\t\t\r\n\t\t<?php\r\n\t\treturn ob_get_clean();\r\n\t}", "protected function months_dropdown($post_type)\n {\n }", "function cfdef_input_date( $p_field_def, $p_custom_field_value ) {\n\tprint_date_selection_set( 'custom_field_' . $p_field_def['id'], config_get( 'short_date_format' ), $p_custom_field_value, false, true );\n}", "function export_date_options($post_type = 'post')\n {\n }", "public function __construct() {\n\t\tparent::__construct();\n\n\t\t$this->category = _x( 'Single Fields', 'xprofile field type category', 'buddypress' );\n\t\t$this->name = _x( 'Date Selector', 'xprofile field type', 'buddypress' );\n\n\t\t$this->set_format( '/^\\d{4}-\\d{1,2}-\\d{1,2} 00:00:00$/', 'replace' ); // \"Y-m-d 00:00:00\"\n\t\tdo_action( 'bp_xprofile_field_type_datebox', $this );\n\t}", "function printDateRange(){\n //http://www.daterangepicker.com/ \n $ret_val = \"\";\n\n $ret_val .= \"<input type='text' id='daterange' name='daterange' style='width: 300px; display:none' autocomplete='off' />\";\n $ret_val .= \"<script>\n$(function() {\n $('input[name=\\\"daterange\\\"]').daterangepicker({\n timePicker: true,\n startDate: moment().startOf('hour').subtract(24, 'hour'), \n endDate: moment().startOf('hour'),\n locale: {\n format: 'YYYY/MM/DD hh:mm:ss '\n }\n });\n});\n</script>\";\n \n return $ret_val;\n }", "function make_calendar_pulldowns() {\n $months = array (1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\n\n\n\n // Make the days pull-down menu:\n echo '<select required=\"required\" name=\"day\" id=\"day\" style=\"width: 33%; display: inline; float: left; margin-left: 0%; margin-right: 0%\" ;>';\n echo '<option selected value=\"\">Day</option>\\n';\n for ($day = 1; $day <= 31; $day++) {\n echo \"<option value=\\\"$day\\\">$day</option>\\n\";\n }\n echo '</select>';\n\n\n// Make the months pull-down menu:\n //echo '<p><label for=\"dob\" style=\"font-family: Verdana, Arial; font-size: 1.0em; font-weight: 600; color: #595959; line-height: 1.9em;\">Date of Birth</label></p>';\n echo '<select required=\"required\" name=\"month\" id=\"month\" style=\"width: 33%; display: inline; float: left; margin-left: 1%; margin-right: 0%\">';\n echo '<option selected value=\"\">Month</option>\\n';\n foreach ($months as $key => $value) {\n echo \"<option value=\\\"$key\\\" >$value</option>\\n\";\n }\n echo '</select>';\n\n\n // Make the years pull-down menu:\n echo '<select required=\"required\" name=\"year\" id=\"year\" style=\"width: 33%; display: inline; float: left; margin-left: 0%; margin-right: 0%\" ;>';\n echo '<option selected value=\"\">Year</option>\\n';\n for ($year = 1980; $year <= 2015; $year++) {\n echo \"<option value=\\\"$year\\\">$year</option>\\n\";\n }\n echo '</select>';\n }", "function date_forbid() {\n if (empty($this->argument)) {\n return TRUE;\n }\n $this->date_range = $this->date_handler->arg_range($this->argument);\n $this->min_date = $this->date_range[0];\n $this->max_date = $this->date_range[1];\n $this->limit = date_range_years($this->options['year_range']);\n $group = !empty($this->options['date_group']) ? $this->options['date_group'] : 0;\n\n // See if we're outside the allowed date range for our argument.\n if (date_format($this->min_date, 'Y') < $this->limit[0] || date_format($this->max_date, 'Y') > $this->limit[1]) {\n $this->forbid = TRUE;\n $this->view->build_info['fail'] = TRUE;\n return TRUE;\n }\n return FALSE;\n }", "public function getDropDown() {}", "public function getDropDown() {}", "public function twig_filter_tdate()\n\t{\n\t\treturn new \\Twig_SimpleFilter('tdate', function ($_string, $_format =\"Y/m/d\", $_convert = true)\n\t\t{\n\t\t\t$result = $_string;\n\t\t\tif($this->data->site['currentlang'] == 'fa')\n\t\t\t{\n\t\t\t\t$result = \\lib\\utility\\jdate::date($_format, $_string, $_convert);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result = date($_format, strtotime($_string));\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t});\n\t}", "function getInput($attr=array()){\n // we need it in locale format\n\n $this->js(true)->datepicker(array_merge(array(\n 'duration'=>0,\n 'showOn'=>'button',\n 'buttonImage'=>$this->api->locateURL('images','calendar.gif'),\n 'buttonImageOnly'=> true,\n 'changeMonth'=>true,\n 'changeYear'=>true,\n 'dateFormat'=>$this->api->getConfig('locale/date_js','dd/mm/yy')\n ),$this->options));\n\n return parent::getInput(array_merge(\n array(\n 'value'=>$this->value?(date($this->api->getConfig('locale/date','d/m/Y'),strtotime($this->value))):'',\n ),$attr\n ));\n }", "function training_dates_callback() {\n ctools_include('modal');\n ctools_include('ajax');\n ctools_modal_add_js();\n $output = ctools_modal_text_button('Click me to show date', 'training/dates/nojs/form', 'Click', 'ctools-modal-date-class');\n $settings = array(\n 'date-class' => array(\n 'modalSize' => array(\n 'type' => 'fixed',\n 'width' => 300,\n 'height' => 300,\n ),\n 'animation' => 'fadeIn',\n ),\n );\n\n return array(\n array(\n '#type' => 'markup',\n '#markup' => $output,\n ),\n array(\n '#attached' => array(\n 'js' => array(\n array(\n 'data' => $settings,\n 'type' => 'setting',\n ),\n ),\n ),\n ),\n );\n}", "public function disableDates($value) {\n\t\tif (is_string($value)) {\n $value = new \\Kendo\\JavaScriptFunction($value);\n }\n return $this->setProperty('disableDates', $value);\n }", "private function get_date_options() {\n\t\tglobal $wpdb;\n\t\t$options = array();\n\n\t\t$date_options = $wpdb->get_col(\"SELECT DATE_FORMAT(`post_date`, '%M %Y') as `formatted_post_date` FROM {$wpdb->posts} WHERE `post_type` = 'attachment' AND `post_status` = 'inherit' GROUP BY `formatted_post_date` ORDER BY `post_date` DESC\");\n\n\t\tif (!empty($date_options)) {\n\t\t\tforeach ($date_options as $monthyear) {\n\t\t\t\t$timestr = strtotime($monthyear);\n\t\t\t\t$options[] = array('label' => date('F Y', $timestr), 'value' => date('n:Y', $timestr));\n\t\t\t}\n\t\t}\n\n\t\treturn $options;\n\t}", "protected function getDateWidget($attributes = array())\n {\n return new sfWidgetFormInputText($this->getOptionsFor('date'), $this->getAttributesFor('date', $attributes));\n }", "private function render_day_dropdown(MJKGenToolsPage $page,\r\n string $previous=null): void {\r\n \r\n $vals = [\r\n 1 => 'Monday',\r\n 2 => 'Tuesday',\r\n 3 => 'Wednesday',\r\n 4 => 'Thursday',\r\n 5 => 'Friday',\r\n 6 => 'Saturday',\r\n 0 => 'Sunday'\r\n ];\r\n\r\n $this->render_schedule_dropdown($page, $vals, 'day', $previous);\r\n }", "public function get_sidebar_dates(){\n\n $html = '<tr class=\"wm-widget-sub-title\"><td>Published:</td></tr><tr class=\"wm-widget-info\"><td>';\n $html .= get_the_date() . '</td></tr>';\n\n if( strtotime( get_the_date() ) < strtotime( get_the_modified_date() ) ){\n $html .= '<tr class=\"wm-widget-sub-title\"><td>Last Updated:</td></tr><tr class=\"wm-widget-info\"><td>';\n $html .= get_the_modified_date() . '</td></tr>';\n }\n\n return $html;\n }", "function XoopsFormTextDateSelect($caption, $name, $size = 15, $value= 0)\n\t{\n\t\t$this->XoopsFormText($caption, $name, $size, 25, $value);\n\t}", "function drawOptionSaveDates() {\r\n global $projectDate, $saveDates; ?>\r\n <span title=\"<?php echo i18n('saveDates')?>\" dojoType=\"dijit.form.CheckBox\"\r\n type=\"checkbox\" id=\"listSaveDates\" name=\"listSaveDates\" class=\"whiteCheck\"\r\n <?php if ($projectDate) {echo 'disabled'; } ?> \r\n <?php if ( $saveDates) {echo 'checked=\"checked\"'; } ?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n refreshJsonPlanning();\r\n </script>\r\n </span>\r\n <span for=\"listSaveDates\"><?php echo i18n(\"saveDates\");?></span>\r\n<?php \r\n}", "public function renderLanguageSelect() {}", "public function get_month_choices()\n {\n }", "public function renderDefault()\n\t{\n\t\t$this->template->reservations = $this->reservations->findBy(array(),array('date' => 'DESC'));\n\n\t}", "function Dates_Menu()\n {\n $args=$this->CGI_URI2Hash();\n unset($args[ \"Place\" ]);\n\n return $this->DatesObj()->MyMod_Items_Menu($args,$this->Dates(),\"Date\",$idkey=\"ID\",$titlekey=\"Title\");\n }", "public static function renderSelect();", "function getDateFilterSelectedDate() {\n $on = $this->getAdditionalProperty('date_filter_on');\n \n return $on ? new DateValue($on) : null;\n }", "function drawFieldEndDate() {\r\n global $projectDate,$endDate; ?> \r\n <div dojoType=\"dijit.form.DateTextBox\"\r\n <?php if (sessionValueExists('browserLocaleDateFormatJs')) {\r\n\t\t\t\techo ' constraints=\"{datePattern:\\''.getSessionValue('browserLocaleDateFormatJs').'\\'}\" ';\r\n\t\t\t}?>\r\n id=\"endDatePlanView\" name=\"endDatePlanView\"\r\n invalidMessage=\"<?php echo i18n('messageInvalidDate')?>\"\r\n type=\"text\" maxlength=\"10\"\r\n <?php if ($projectDate) {echo 'disabled'; } ?> \r\n style=\"width:100px; text-align: center;\" class=\"input roundedLeft\"\r\n hasDownArrow=\"true\"\r\n value=\"<?php if(sessionValueExists('endDatePlanView') and !$projectDate){ echo getSessionValue('endDatePlanView'); }else{ echo $endDate; } ?>\" >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveDataToSession('endDatePlanView',formatDate(dijit.byId('endDatePlanView').get(\"value\")), false);\r\n refreshJsonPlanning();\r\n </script>\r\n </div>\r\n<?php \r\n}", "public function create()\n {\n return view('layouts.excluded_dates.create');\n }", "public function getDropdownCssClass() {\n\n return 'dropdown';\n }", "public function ec_customizer_styles() {\n\t\t?>\n\t\t<style>\n\t\t\tli#customize-control-tribe_customizer-month_week_view-highlight_color,\n\t\t\tli#customize-control-tribe_customizer-photo_view-bg_color,\n\t\t\tli#customize-control-tribe_customizer-single_event-post_title_color {\n\t\t\t\topacity: 0.2;\n\t\t\t\tpointer-events: none;\n\t\t\t\tcursor: not-allowed;\n\t\t\t}\n\t\t</style>\n\t\t<?php\n\t}", "public function getHtml(){\n $options = $this->getOptions();\n if ($this->getColumn()->getWithEmpty()) {\n array_unshift($options, array(\n 'value' => '',\n 'label' => ''\n ));\n }\n $html = sprintf('<select name=\"%s\" id=\"%s\" class=\"no-changes\">', $this->_getHtmlName(), $this->_getHtmlId())\n . $this->_drawOptions($options)\n . '</select>';\n return $html;\n }", "public function bookingListByDate()\n {\n $dateOptipns = [];\n $bookingMgr = new BookingMgr();\n $bookings = $bookingMgr->getBookings();\n foreach ($bookings->toArray() as $booking) {\n $dateOptipns[] = $booking['reserve_date'];\n }\n $dateOptipns = array_unique($dateOptipns);\n $dateOptipns = array_sort($dateOptipns);\n \n return view('booking/date', [\n 'dateOptipns' => $dateOptipns,\n ]);\n }", "public function render()\n {\n return view('bs-component::form.field-template', ['field' => 'bs-component::form.field.datepicker']);\n }", "static function add_bod_date(): void {\r\n\t\tself::add_acf_inner_field(self::bods, self::bod_date, [\r\n\t\t\t'label' => 'Date',\r\n\t\t\t'type' => 'text',\r\n\t\t\t'instructions' => 'Enter the month of the election, e.g. March 2018.',\r\n\t\t\t'required' => 1,\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]);\r\n\t}", "public function getHTMLDatePickerFormatValue(): string\n {\n return Carbon::parse($this->value)->format('Y-m-d');\n }", "function _webform_datetime_date(array &$element, FormStateInterface $form_state, DrupalDateTime $date = NULL) {\n // Make sure the date element is being displayed.\n if (!isset($element['date'])) {\n return;\n }\n\n $type = (isset($element['#date_date_element'])) ? $element['#date_date_element'] : 'date';\n switch ($type) {\n case 'datepicker':\n // Convert #type from datepicker to textfield.\n $element['date']['#type'] = 'textfield';\n\n // Must manually set 'data-drupal-date-format' to trigger date picker.\n // @see \\Drupal\\Core\\Render\\Element\\Date::processDate\n $element['date']['#attributes']['data-drupal-date-format'] = [$element['date']['#date_date_format']];\n break;\n }\n}", "function _field_date($fval) \n {\n // if $fval is not already split up, we assume std. date string // YYYY-MM-DD\n if (is_array($fval)) {\n $f_date = &$fval;\n }\n elseif ($fval) {\n $f_date = split('-', $fval, 3);\n }\n else {\n $f_date = array('','','');\n }\n\n $res = \"<span id=\\\"\" . $this->name . \"\\\">\";\n\n for ($i=1; $i<32; $i++) { $days[sprintf(\"%02d\", $i)] = $i; }\n\n $months_abbr = array(\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\");\n for ($i=1; $i<13; $i++) { $months[sprintf(\"%02d\", $i)] = $months_abbr[$i-1]; }\n\n $fmonths = new formex_field($this->fex, $this->name.'_month', array('Months', 'select', $months));\n $res .= $fmonths->get_html($f_date[1]);\n\n if (isset($this->attribs) and !isset($this->attribs['suppress_day'])) {\n $fdays = new formex_field($this->fex, $this->name.'_day', array('Dates', 'select', $days));\n $res .= $fdays->get_html($f_date[2]);\n }\n\n $year_range = null;\n $this_year = date('Y');\n if (isset($this->opts) and is_numeric($this->opts)) { // int val will be this year +\n $year_range = $this->_array_stringify(range($this_year, $this_year+$this->opts));\n }\n elseif (isset($this->attribs) && is_array($this->attribs)) { // exact range specified\n $begin = (isset($this->attribs['year_begin']))? $this->attribs['year_begin'] : $this_year;\n $end = $this_year;\n if (isset($this->attribs['year_end'])) {\n if (substr($this->attribs['year_end'], 0, 4) == 'now+') {\n $end = $this_year + intval(substr($this->attribs['year_end'], 4));\n }\n elseif (substr($this->attribs['year_end'], 0, 4) == 'now-') {\n $end = $this_year - intval(substr($this->attribs['year_end'], 4));\n }\n elseif (substr($this->attribs['year_end'], 0, 1) == '+') {\n $end = $begin + intval(substr($this->attribs['year_end'], 1));\n }\n elseif (substr($this->attribs['year_end'], 0, 1) == '-') {\n $end = $begin - intval(substr($this->attribs['year_end'], 1));\n }\n else {\n $end = intval($this->attribs['year_end']);\n }\n }\n\n if ($begin != $end) {\n $year_range = $this->_array_stringify(range($begin, $end));\n }\n }\n\n if ($year_range) { // dropdown w/ that range\n $fyears = new formex_field($this->fex, $this->name.'_year', array('Years', 'select', $year_range));\n }\n else { // 4-space text field\n $fyears = new formex_field($this->fex, $this->name.'_year', array('Years', 'text', null, array('size'=>4)));\n }\n $res .= $fyears->get_html($f_date[0]);\n unset($fmonths, $fdays, $fyears);\n $res .= \"</span>\";\n\n return $res;\n }", "public function unselectableDaysOfWeek(array $dates): self\n {\n $this->attributes(['unselectableDaysOfWeek' => $dates]);\n return $this;\n }", "public function render()\n {\n $fromList = array();\n $this->getFromList($fromList);\n $value = $this->getValue()!==null?$this->getValue():$this->getDefaultValue();\n $valueArray = explode(',', $value);\n \n $disabledStr = ($this->getEnabled() == \"N\") ? \"DISABLED=\\\"true\\\"\" : \"\";\n $style = $this->getStyle();\n $func = $this->getFunction();\n\n //$sHTML = \"<SELECT NAME=\\\"\" . $this->objectName . \"[]\\\" ID=\\\"\" . $this->objectName .\"\\\" $disabledStr $this->htmlAttr $style $func>\";\n $sHTML = \"<SELECT NAME=\\\"\" . $this->objectName . \"\\\" ID=\\\"\" . $this->objectName .\"\\\" $disabledStr $this->htmlAttr $style $func>\";\n\n if ($this->blankOption) // ADD a blank option\n {\n $entry = explode(\",\",$this->blankOption);\n $text = $entry[0];\n $value = ($entry[1]!= \"\") ? $entry[1] : null;\n $entryList = array(array(\"val\" => $value, \"txt\" => $text ));\n $fromList = array_merge($entryList, $fromList);\n }\n\n $defaultValue = null;\n foreach ($fromList as $option)\n {\n $test = array_search($option['val'], $valueArray);\n if ($test === false)\n {\n $selectedStr = '';\n }\n else\n {\n $selectedStr = \"SELECTED\";\n $defaultValue = $option['val']; \n }\n $sHTML .= \"<OPTION VALUE=\\\"\" . $option['val'] . \"\\\" $selectedStr>\" . $option['txt'] . \"</OPTION>\";\n }\n if($defaultValue == null){\n \t$defaultOpt = array_shift($fromList);\n \t$defaultValue = $defaultOpt['val'];\n \tarray_unshift($fromList,$defaultOpt);\n }\n \n \n $this->setValue($defaultValue);\n $sHTML .= \"</SELECT>\";\n return $sHTML;\n }", "function getDateFilter() {\n return $this->getAdditionalProperty('date_filter', self::DATE_FILTER_ANY);\n }", "function drawFieldStartDate() {\r\n global $projectDate,$startDate; ?> \r\n <div dojoType=\"dijit.form.DateTextBox\"\r\n \t<?php if (sessionValueExists('browserLocaleDateFormatJs')) {\r\n\t\t\techo ' constraints=\"{datePattern:\\''.getSessionValue('browserLocaleDateFormatJs').'\\'}\" ';\r\n\t\t}?>\r\n id=\"startDatePlanView\" name=\"startDatePlanView\"\r\n invalidMessage=\"<?php echo i18n('messageInvalidDate')?>\"\r\n type=\"text\" maxlength=\"10\" \r\n <?php if ($projectDate) {echo 'disabled'; } ?> \r\n style=\"width:100px; text-align: center;\" class=\"input roundedLeft\"\r\n hasDownArrow=\"true\"\r\n value=\"<?php if(sessionValueExists('startDatePlanView') and !$projectDate){ echo getSessionValue('startDatePlanView'); }else{ echo $startDate; } ?>\" >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveDataToSession('startDatePlanView',formatDate(dijit.byId('startDatePlanView').get(\"value\")), true);\r\n refreshJsonPlanning();\r\n </script>\r\n </div>\r\n<?php \r\n}", "function my_remove_recent_comments_style() {\n\tadd_filter( 'show_recent_comments_widget_style', '__return_false' );\n}", "public function getDateStyles()\n\t{\n\t\treturn $this->dateStyles;\n\t}", "public function gridedit()\n\t{\n\t\tif ($this->request->is('post') || $this->request->is('put'))\n\t\t{\n\t\t\tif(isset($this->request->data['ReportItem']['item_date']))\n\t\t\t{\n\t\t\t\t$this->request->data['ReportItem']['item_date_set'] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn parent::gridedit();\n\t}", "public function show()\n {\n $template = $this->getTemplate();\n\n $template->addCss('group', $this->getType());\n \n $this->decorateElement($template, 'dateStart');\n $this->decorateElement($template, 'dateEnd');\n\n $template->setAttr('dateStart', 'name', $this->getName() . 'Start');\n $template->setAttr('dateEnd', 'name', $this->getName() . 'End');\n $template->setAttr('dateStart', 'id', $this->getId().'Start');\n $template->setAttr('dateEnd', 'id', $this->getId().'End');\n\n // Set the field value\n $value = $this->getValue();\n if (is_array($value)) {\n if (!empty($value[$this->getName() . 'Start']))\n $template->setAttr('dateStart', 'value', $value[$this->getName() . 'Start']);\n if (!empty($value[$this->getName() . 'End']))\n $template->setAttr('dateEnd', 'value', $value[$this->getName() . 'End']);\n }\n\n return $template;\n }", "public function init() {\r\n\t\t\r\n\t\tparent::init();\r\n\r\n\t\tif (isset($this->htmlOptions['class'])) {\r\n\t\t\t$this->htmlOptions['class'] .= ' dropdown-menu';\r\n\t\t} else {\r\n\t\t\t$this->htmlOptions['class'] = 'dropdown-menu';\r\n\t\t}\r\n\t}", "static function add_eb_date(): void {\r\n\t\tself::add_acf_inner_field(self::ebs, self::eb_date, [\r\n\t\t\t'label' => 'Date',\r\n\t\t\t'type' => 'text',\r\n\t\t\t'instructions' => 'Enter the month of the election, e.g. March 2018.',\r\n\t\t\t'required' => 1,\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]);\r\n\t}", "function drawOptionAllProject() { \r\n global $projectDate;?> \r\n <span title=\"<?php echo i18n(\"projectDate\")?>\" dojoType=\"dijit.form.CheckBox\"\r\n type=\"checkbox\" id=\"projectDate\" name=\"projectDate\" class=\"whiteCheck\"\r\n <?php if ($projectDate) {echo 'checked=\"checked\"'; } ?> >\r\n <script type=\"dojo/method\" event=\"onChange\" >\r\n saveUserParameter('projectDate',((this.checked)?'1':'0'));\r\n var now = formatDate(new Date());\r\n if (this.checked == false) {\r\n //dojo.setAttr('startDatePlanView', 'value', date.toLocaleDateString());\r\n dijit.byId('startDatePlanView').set(\"value\",now);\r\n enableWidget(\"startDatePlanView\");\r\n enableWidget(\"endDatePlanView\");\r\n enableWidget(\"listSaveDates\");\r\n } else {\r\n dijit.byId('startDatePlanView').reset();\r\n dijit.byId('endDatePlanView').reset();\r\n dijit.byId('listSaveDates').set('checked', false);\r\n disableWidget(\"startDatePlanView\");\r\n disableWidget(\"endDatePlanView\");\r\n disableWidget(\"listSaveDates\");\r\n }\r\n refreshJsonPlanning();\r\n </script>\r\n </span>\r\n <span for=\"projectDate\"><?php echo i18n(\"projectDate\");?></span>\r\n<?php \r\n}", "public function style(){\n\t\treturn '';\n\t}", "function form_date($variable='date', $date='', $nopop = false) {\n\n\tglobal $request;\n\n\t/***********\n\t* Select the current date\n\t***********/\n\n\t// use now\n\tif ($date == 'NOW') {\n\n\t\t$date = convert_gmt_timestamp_to_local_input(TIMENOW);\n\n\t// use the value submitted by form\n\t} elseif ($date == 'FORM') {\n\n\t\t$date = $request->getArrayString($variable);\n\n\t// use a numeric\n\t} elseif (is_numeric($date) AND $date > 0) {\n\t\t$date = convert_gmt_timestamp_to_local_input($date);\n\t}\n\n\t// the other option is an array for $date; which all the others are converted to so it is covered\n\tif (dpcheckdate($date)) {\n\t\t$month = $date['month'];\n\t\t$day = $date['day'];\n\t\t$year = $date['year'];\n\t}\n\n\t// we load the javascript & css if this is first time here\n\tif (!defined('DESKPRO_JSLOADED_DATA')) {\n\t\t$html .= get_javascript('./../3rdparty/selectcalendar/calendar.js');\n\t\t$html .= get_javascript('./../3rdparty/selectcalendar/lang/calendar-en.js');\n\t\t$html .= get_javascript('./../3rdparty/selectcalendar/calendar-setup.js');\n\t\t$html .= get_css('./../3rdparty/selectcalendar/calendar-win2k-cold-1.css');\n\t\tdefine('DESKPRO_JSLOADED_DATA', 1);\n\t}\n\n\t// random button link\n\t$button = 'data' . dp_rand(1,1000000);\n\n\t// the html for creating the calendar\n\t$html .= \"\n\t<table cellspacing=\\\"0\\\" cellpadding=\\\"0\\\"><tr>\n\t\t<td style=\\\"padding-right:4px\\\">\" . form_select_day($variable . '[day]', $day, $variable . '_day') . \"</td>\n\t\t<td style=\\\"padding-right:4px\\\">\" . form_select_month($variable . '[month]', $month, $variable . '_month'). \"</td>\n\t\t<td style=\\\"padding-right:4px\\\">\" . form_select_year($variable . '[year]', $year, $variable . '_year') . \"</td>\n\t\t<td style=\\\"padding-right:4px\\\">\n\n\t<input style=\\\"display:none\\\" type=\\\"text\\\" value=\\\"$current\\\" name=\\\"$variable\" . \"_selector\\\" id=\\\"$variable\\\" /></td>\";\n\n\tif (!$nopop) {\n\n\t\t$html .= \"<td>\" . html_image('icons/view_calendar.gif', '', \"id=\\\"$button\\\" title=\\\"Date selector\\\"\n onmouseover=\\\"this.style.background='red';\\\" onmouseout=\\\"this.style.background=''\\\"\");\n\n\t\tif ($time) {\n\n\t\t\t$html .= \"\n\t\t\t<script type=\\\"text/javascript\\\">\n\t\t\t\tCalendar.setup({\n\t\t\t\t\tinputField : \\\"$variable\" . \"_selector\\\",\n\t\t\t\t\tifFormat : \\\"%Y-%m-%d %H:%M\\\",\n\t\t\t\t\tshowsTime : true,\n\t\t\t\t\tbutton : \\\"$button\\\",\n\t\t\t\t\tsingleClick : true,\n\t\t\t\t\talign\t\t\t:\t'Bl',\n\t\t\t\t\tstep : 1,\n\t\t\t\t\tonSelect : onSelect\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t\";\n\n\t\t} else {\n\n\t\t\t$html .= \"\n\t\t\t<script type=\\\"text/javascript\\\">\n\t\t\t\tCalendar.setup({\n\t\t\t\t\tinputField : \\\"$variable\\\",\n\t\t\t\t\tifFormat : \\\"%Y-%m-%d\\\",\n\t\t\t\t\tshowsTime : false,\n\t\t\t\t\tbutton : \\\"$button\\\",\n\t\t\t\t\tsingleClick : true,\n\t\t\t\t\talign\t\t\t:\t'Bl',\n\t\t\t\t\tstep : 1,\n\t\t\t\t\tonSelect : onSelect\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t\";\n\n\t\t}\n\n\t\t$html .= \"</td>\";\n\n\t}\n\n\t$html .= \"</tr></table>\";\n\n\treturn $html;\n}", "public function getCustomDesignDate()\n {\n $result = array();\n $result['from'] = $this->getData('custom_design_from');\n $result['to'] = $this->getData('custom_design_to');\n\n return $result;\n }", "public function render()\n {\n return view('filament::components.dropdown');\n }", "public function init()\n {\n parent::init();\n $this->clientOptions = false;\n Html::addCssClass($this->options, ['widget' => 'btn']);\n }", "function selectDateEntry($display,$namePre,$month,$day,$year,$errors)\n{\n\t$returnVal = \"<tr>\n\t\t<td>$display:</td>\n\t\t<td>\n\t\t\t<select name='$namePre\" . \"Month'>\";\n\t\t\tfor ($i=1; $i<=12; $i++)\n\t\t\t{\n\t\t\t\tif ($i == $month)\n\t\t\t\t{\n\t\t\t\t\t$returnVal .= \"<option value='$i' selected>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$returnVal .= \"<option value='$i'>\";\n\t\t\t\t}\n\t\t\t\t$returnVal .= monthAsString($i) . \"</option>\";\n\t\t\t}\n\t\t\t$returnVal .= \"</select>\n\t\t\t<select name='$namePre\" . \"Day'>\";\n\t\t\tfor ($i=1; $i<=31; $i++)\n\t\t\t{\n\t\t\t\tif ($i == $day)\n\t\t\t\t{\n\t\t\t\t\t$returnVal .= \"<option value='$i' selected>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$returnVal .= \"<option value='$i'>$i</option>\";\n\t\t\t\t}\n\t\t\t\t$returnVal .= \"$i</option>\";\n\t\t\t}\n\t\t\t$returnVal .= \"</select>\n\t\t\t<select name='$namePre\" . \"Year'>\";\n\t\t\tfor ($i=date('Y'); $i>=1900; $i=$i-1)\n\t\t\t{\n\t\t\t\tif ($i == $year)\n\t\t\t\t{\n\t\t\t\t\t$returnVal .= \"<option value='$i' selected>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$returnVal .= \"<option value='$i'>$i</option>\";\n\t\t\t\t}\n\t\t\t\t$returnVal .= \"$i</option>\";\n\t\t\t}\n\t\t\t$returnVal .= \"</select>\n\t\t</td>\n\t</tr>\";\n\n\tif (array_key_exists($namePre . 'Date',$errors))\n\t{\n\t\t$returnVal .= addErrorRow($namePre . 'Date',$errors);\n\t}\n\treturn $returnVal;\n}" ]
[ "0.632969", "0.6179744", "0.61425465", "0.5893836", "0.5859255", "0.5821381", "0.57154423", "0.570414", "0.56863594", "0.56124145", "0.5603562", "0.5554115", "0.5550043", "0.5497851", "0.54188436", "0.5415733", "0.5401579", "0.53661215", "0.53657573", "0.53625053", "0.5351409", "0.53408474", "0.5296917", "0.5285911", "0.5269628", "0.5260643", "0.5247209", "0.523758", "0.5235064", "0.5215096", "0.5202942", "0.51988286", "0.51838166", "0.51502186", "0.5132023", "0.51194906", "0.5112951", "0.5100533", "0.50930613", "0.5081638", "0.50752825", "0.5072675", "0.506078", "0.50547147", "0.5045571", "0.50432587", "0.50299376", "0.50281906", "0.5012276", "0.49965432", "0.49936968", "0.49892944", "0.49892923", "0.49848968", "0.49752083", "0.49752083", "0.49744716", "0.49589956", "0.4958212", "0.4942586", "0.49371105", "0.49353647", "0.49306792", "0.49296427", "0.49294913", "0.492688", "0.49191967", "0.49133074", "0.49124265", "0.49089417", "0.49065092", "0.4902782", "0.4901575", "0.4901405", "0.48963052", "0.48887414", "0.48842648", "0.48817596", "0.48606107", "0.48410174", "0.4840629", "0.48315677", "0.48312917", "0.4831162", "0.4830242", "0.48263305", "0.4818482", "0.4814534", "0.48112696", "0.4807204", "0.4802837", "0.47907546", "0.47906488", "0.47885075", "0.4786745", "0.47829384", "0.47801396", "0.4776993", "0.47747645", "0.47728714" ]
0.66154855
0
Ignore multicolumn fields layout.
public function ignore_multi_column_layout( $properties, $field, $form_data ) { if ( empty( $properties['container']['class'] ) ) { return $properties; } foreach ( $properties['container']['class'] as $i => $class ) { if ( \in_array( $class, array( 'wpforms-first', 'wpforms-one-half', 'wpforms-one-third', 'wpforms-two-thirds', 'wpforms-one-fourth', 'wpforms-two-fourths', 'wpforms-one-fifth', 'wpforms-two-fifths', ), true ) ) { unset( $properties['container']['class'][ $i ] ); } } return $properties; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dumpColLayout($exclude=array())\r\n {\r\n $this->dumpGrid($exclude, 1, $this->_rows, \"100%\");\r\n }", "public function fieldLayout(): FieldLayout;", "function dumpRowLayout($exclude=array())\r\n {\r\n $this->dumpGrid($exclude, $this->_cols, 1, \"100%\");\r\n }", "protected function wrap_fields()\n {\n }", "public static function getDefaultColumnLayout() {}", "abstract public function getColsFields();", "function get_row_layout()\n{\n}", "public function buildFormLayout()\n {\n $this->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('title');\n })->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('cover');\n $column->withSingleField('description');\n $column->withSingleField('price');\n $column->withSingleField('tags');\n });\n }", "public function getFieldLayout()\n {\n return $this->getForm() ? $this->getForm()->getFieldLayout() : parent::getFieldLayout();\n }", "public function hideExtraField()\n {\n $this->houses=false;\n $this->jobs_training=false;\n $this->motorcycles =false;\n $this->cars = false;\n $this->offices=false;\n $this->lands_plots=false;\n return;\n }", "public function discardPreviewColumns();", "function forceFields(){\n foreach($this->xset->desc as $fn=>&$fd){\n if (in_array($fn, self::$bfields)){\n $fd->browsable = 1;\n } else {\n $fd->browsable = 0;\n }\n }\n }", "function dumpGridBagLayout($exclude=array())\r\n {\r\n $this->dumpGrid($exclude, $this->_cols, $this->_rows, \"100%\");\r\n }", "function _excerpt_render_inner_columns_blocks($columns, $allowed_blocks)\n {\n }", "public function getFieldLayout()\n\t{\n\t\treturn $this->asa('fieldLayout')->getFieldLayout();\n\t}", "function omega_theme_layout_one_column( $layout ) {\n\treturn '1c';\n}", "function dumpLayoutContents($exclude=array())\r\n {\r\n switch($this->_type)\r\n {\r\n case COL_LAYOUT: $this->dumpColLayout($exclude); break;\r\n case ROW_LAYOUT: $this->dumpRowLayout($exclude); break;\r\n case GRIDBAG_LAYOUT: $this->dumpGridBagLayout($exclude); break;\r\n case ABS_XY_LAYOUT: $this->dumpABSLayout($exclude); break;\r\n case REL_XY_LAYOUT: $this->dumpRELLayout($exclude); break;\r\n case XY_LAYOUT: $this->dumpXYLayout($exclude); break;\r\n case FLOW_LAYOUT: $this->dumpFlowLayout($exclude); break;\r\n case BOXED_LAYOUT: $this->dumpBoxedLayout($exclude); break;\r\n }\r\n }", "function happy_one_column() {\n\n\tif ( !is_active_sidebar( 'primary' ) && !is_active_sidebar( 'secondary' ) )\n\t\tadd_filter( 'get_theme_layout', 'happy_post_layout_one_column' );\n\n\telseif ( is_attachment() )\n\t\tadd_filter( 'get_theme_layout', 'happy_post_layout_one_column' );\n}", "public function set_fields() {\n $this->fields = apply_filters('wpucommentmetas_fields', $this->fields);\n foreach ($this->fields as $id => $field) {\n if (!is_array($field)) {\n $this->fields[$id] = array();\n }\n if (!isset($field['label'])) {\n $this->fields[$id]['label'] = ucfirst($id);\n }\n if (!isset($field['admin_label'])) {\n $this->fields[$id]['admin_label'] = $this->fields[$id]['label'];\n }\n if (!isset($field['type'])) {\n $this->fields[$id]['type'] = 'text';\n }\n if (!isset($field['help'])) {\n $this->fields[$id]['help'] = '';\n }\n if (!isset($field['required'])) {\n $this->fields[$id]['required'] = false;\n }\n if (!isset($field['admin_visible'])) {\n $this->fields[$id]['admin_visible'] = true;\n }\n if (!isset($field['admin_column'])) {\n $this->fields[$id]['admin_column'] = false;\n }\n if (!isset($field['admin_list_visible'])) {\n $this->fields[$id]['admin_list_visible'] = false;\n }\n if (!isset($field['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array(\n 'comment_form_logged_in_after',\n 'comment_form_after_fields'\n );\n }\n if (!is_array($this->fields[$id]['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array($this->fields[$id]['display_hooks']);\n }\n }\n }", "function happy_post_layout_one_column( $layout ) {\n\treturn 'layout-1c';\n}", "function beforeSave() {\r\n\t\t$fields = $this->getColumnTypes();\r\n\t\tforeach ($fields as $k => $v) {\r\n\t\t\tif (isset($this->data[$this->name][$k]) and ($v == 'integer' or $v == 'float')\r\n\t\t\t\t and $this->data[$this->name][$k] === '') {\r\n\t\t\t\t $this->data[$this->name][$k] = NULL; \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn parent::beforeSave(); \r\n\t}", "function omega_one_column() {\n\n\tif ( !is_active_sidebar( 'primary' ) )\n\t\tadd_filter( 'theme_mod_theme_layout', 'omega_theme_layout_one_column' );\n\n\telseif ( is_attachment() && wp_attachment_is_image() && 'default' == get_post_layout( get_queried_object_id() ) )\n\t\tadd_filter( 'theme_mod_theme_layout', 'omega_theme_layout_one_column' );\n\n}", "public function horizontalLayout() {\n }", "protected function restrict_fields()\n {\n }", "protected function get_default_format_fields() {\n\t\treturn null;\n\t}", "function RGC_dashboard_columns() {\n add_screen_option(\n 'layout_columns',\n array(\n 'max' => 1,\n 'default' => 1\n )\n );\n}", "function dumpGrid($exclude=array(),$cols,$rows,$width)\r\n {\r\n $pwidth=$this->_control->Width;\r\n $pheight=$this->_control->Height;\r\n\r\n $cwidth = round($pwidth / $cols,0);\r\n $cheight = round($pheight / $rows,0);\r\n\r\n $controls=array();\r\n reset($this->_control->controls->items);\r\n while (list($k,$v)=each($this->_control->controls->items))\r\n {\r\n $col=round($v->Left / $cwidth,0);\r\n $row=round($v->Top / $cheight,0);\r\n\r\n $controls[$col][$row]=$v;\r\n }\r\n\r\n echo \"<table width=\\\"$width\\\" height=\\\"$pheight\\\" border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\">\\n\";\r\n for($y=0;$y<=$rows-1;$y++)\r\n {\r\n echo \"<tr>\\n\";\r\n for($x=0;$x<=$cols-1;$x++)\r\n {\r\n if (isset($controls[$x][$y]))\r\n {\r\n $v=$controls[$x][$y];\r\n if (is_object($v))\r\n {\r\n $v->AdjustToLayout=true;\r\n\r\n $cspan=\"\";\r\n $rspan=\"\";\r\n\r\n $cspan = round(($v->Width / $cwidth),0);\r\n if ($cspan > 1)\r\n {\r\n //for ($xx=$x+1;$xx<=$x+$cspan;$xx++) $controls[$xx][$y]=-1;\r\n }\r\n\r\n $rspan = round(($v->Height / $cheight),0);\r\n if ($rspan > 1)\r\n {\r\n //for ($yy=$y+1;$yy<=$y+$rspan;$yy++) $controls[$x][$yy]=-1;\r\n }\r\n\r\n\r\n for ($xx=$x;$xx<$x+$cspan;$xx++)\r\n {\r\n for ($yy=$y;$yy<$y+$rspan;$yy++)\r\n {\r\n $controls[$xx][$yy]=-1;\r\n }\r\n }\r\n\r\n\r\n if ($cspan>1) $cspan=\" colspan=\\\"$cspan\\\" \";\r\n else $cspan=\"\";\r\n\r\n if ($rspan>1) $rspan=\" rowspan=\\\"$rspan\\\" \";\r\n else $rspan=\"\";\r\n\r\n $pw=round((100*$v->Width)/$pwidth);\r\n $pw=\" width=\\\"$pw%\\\" \";\r\n\r\n $ph=round((100*$v->Height)/$pheight);\r\n $ph=\" height=\\\"$ph%\\\" \";\r\n\r\n echo \"<td valign=\\\"top\\\" $pw $ph $cspan $rspan>\\n\";\r\n echo \"<div id=\\\"\".$v->Name.\"_outer\\\" style=\\\"height:100%;width:100%;\\\">\\n\";\r\n $v->show();\r\n echo \"\\n</div>\\n\";\r\n echo \"\\n</td>\\n\";\r\n }\r\n }\r\n else\r\n {\r\n echo \"<td>&nbsp;\\n\";\r\n echo \"</td>\\n\";\r\n }\r\n }\r\n echo \"</tr>\\n\";\r\n }\r\n echo \"</table>\\n\";\r\n }", "public function pubFields()\n {\n $fields = array();\n\n foreach ($this as $column => $value) {\n $fields[$column] = 'column';\n }\n\n // FIXME From Doctrine: prevent mapped Doctrine_Records from being displayed fully\n foreach ($this->_values as $key => $value) {\n $fields[$key] = 'value';\n }\n\n foreach ($this->_table->getRelations() as $key => $relation) {\n if (strpos($key, 'Clip_Model_Relation') !== 0) {\n $fields[$key] = 'relation';\n }\n }\n\n // reorder the fields conveniently\n $reorder = array(\n 'core_title' => 'map',\n 'core_uniqueid' => 'map',\n 'core_tid' => 'map',\n 'core_pid' => 'value',\n 'core_author' => 'value',\n 'core_creator' => 'map',\n 'core_approvalstate' => 'map'\n );\n $fields = array_merge($reorder, $fields);\n\n return $fields;\n }", "private function normalize()\n {\n $field_id = isset($this->columns[0]) ? $this->columns[0] : 'id';\n\n $field_text = isset($this->columns[1]) ? $this->columns[1] : $field_id;\n\n $groups = [];\n\n $has_empty_groups = false;\n\n foreach ($this->data as $key => $datum) {\n $has_empty_groups = !is_numeric($key);\n }\n\n foreach ($this->data as $key => $datum) {\n if (is_array($datum) && isset($datum['id']) && isset($datum['text'])) {\n $this->push($datum);\n\n continue;\n }\n\n if (is_numeric($key)) {\n if (is_string($datum)) {\n $datum = [$datum];\n }\n\n $id = multi_dot_call($datum, $field_id);\n $id = $id === null ? (string) multi_dot_call($datum, '0') : (string) $id;\n\n $text = multi_dot_call($datum, $field_text);\n if (is_array($text)) {\n $lang = App::getLocale();\n $text = $text[$lang] ?? implode($this->separator, $text);\n }\n $text = $text === null ? (string) multi_dot_call($datum, '0') : (string) $text;\n\n if ($id && $text) {\n $text = $id . \") \" . $text;\n }\n\n foreach (array_slice($this->columns, 2) as $part) {\n $t = multi_dot_call($datum, $part);\n if ($t) {\n $text .= $this->separator.$t;\n }\n }\n\n $item = ['id' => $id, 'text' => $text];\n\n if ($id == $this->value) {\n $item['selected'] = true;\n }\n\n if (!$has_empty_groups) {\n $this->push($item);\n } else {\n $groups['Other'][] = $item;\n }\n } else {\n $groups[ucfirst($key)] = $datum;\n }\n }\n\n foreach ($groups as $group_name => $group) {\n $this->push([\n 'text' => $group_name,\n 'children' => collect($group)->map(function ($datum) use ($field_id, $field_text) {\n if (is_string($datum)) {\n $datum = [$field_id => $datum, $field_text => $datum];\n }\n\n $id = (string) multi_dot_call($datum, $field_id);\n\n $text = (string) multi_dot_call($datum, $field_text);\n\n foreach (array_slice($this->columns, 2) as $part) {\n $t = multi_dot_call($datum, $part);\n\n if ($t) {\n $text .= ' '.$t;\n }\n }\n\n $item = ['id' => $id, 'text' => $text];\n\n if ($id == $this->value) {\n $item['selected'] = true;\n }\n\n return $item;\n })->toArray()\n ]);\n }\n }", "function InsertNotOrdinaryFields($data){\n if ($this->nonordinary) {\n foreach ($this->form_fields as $sectionname => $section) {\n foreach ($section as $number => $field) {\n switch ($field[\"control\"]) {\n case \"dbcombobox\":\n case \"dbcheckboxgroup\":\n case \"dbtreecombobox\":\n case \"checkboxgroup\":\n if ($field[\"multiple\"])\n EditPageHelper::InsertDBMultipleField($field, $this);\n break;\n case \"autocomplete\":\n \tif ($field[\"field_table\"]!=\"\")\n EditPageHelper::InsertAutocompleteField($field,$this, $data[$this->key_field]);break;\n default:\n $this->InsertCustomNotOrdinaryField($field);\n \tbreak;\n\n }\n }\n }\n }\n }", "protected function prepare_fields()\n {\n }", "abstract protected function doCols();", "abstract protected function columns();", "protected function _prepareLayout() {\n $this->_removeButton('reset'); // Remove unused buttons\n $this->_removeButton('delete');\n $this->_removeButton('save');\n\n return parent::_prepareLayout();\n }", "public function useAllFields() {\n $this->__onlyFields = array();\n }", "function fillEmptyFields()\n\t{\n\t\tif(isset($this->data[$this->name])) \n\t\t{\n\t\t\t$data = $this->data[$this->name];\n\t\t} else {\n\t\t\t$data = $this->data;\n\t\t}\n\t\t\n\t\tforeach($this->_schema as $fieldname => $details) \n\t\t{\n\t\t\tif(!isset($data[$fieldname]))\n\t\t\t\t$this->set($fieldname, '');\n\t\t}\n\t}", "protected function hideFieldsForAddEdit()\n\t{\n\t\tif ($this->isAdd() || $this->isCopy() || $this->isGridAdd())\n\t\t\t$this->document_sequence->Visible = FALSE;\n\t}", "public function setDispFields() {}", "function _custom_teasers_fields_views_format($fields) {\n foreach ($fields as $name => $field) {\n $fields[$name] = _custom_teasers_views_field_views_format($field);\n if (!is_array($fields[$name])) {\n unset($fields[$name]);\n }\n }\n return $fields;\n}", "public function prepareFieldset();", "protected function _prepareLayout()\n\t{\n\t\treturn parent::_prepareLayout();\n\t}", "function getFixedColumns() { return $this->_fixedcolumns; }", "protected function getExcludeFields() {}", "protected function setDbalInputFieldsToRender() {}", "public function delegateFieldSetNoDefault(DbalSchema $dbal_schema, $drupal_table_name, $field_name);", "function _dhz_collapse_all_flexible_fields( $field ) {\n\n\t\tif ( array_key_exists('hide_collapse', $field) ) {\n\n\t\t\tif ( $field['hide_collapse'] == 1 ) return $field;\n\n\t\t}\n\n\t\t$field['wrapper']['class'] = \"flexible-collapse\";\n\n\t\tif ( array_key_exists('collapse_all_flexible', $field) && array_key_exists('btn-icon-only', $field) ) {\n\n\t\t\t// bail early if no 'collapse_all_flexible' and 'btn-icon-only' setting\n\t\t\tif( empty($field['collapse_all_flexible']) && empty($field['btn-icon-only'])) return $field;\n\n\t\t\tif ( $field['hide_collapse'] == 1 ) return $field;\n\t\t\t\n\t\t\tif ( $field['collapse_all_flexible'] == 1 && $field['btn-icon-only'] == 1 ) {\n\t\t\t\t$field['wrapper']['class'] = \"flexible-collapse collapse-all btn-icon-only\";\n\t\t\t} else if ( $field['collapse_all_flexible'] == 1 ) {\n\t\t\t\t$field['wrapper']['class'] = \"flexible-collapse collapse-all\";\n\t\t\t} else if ( $field['btn-icon-only'] == 1 ) {\n\t\t\t\t$field['wrapper']['class'] = \"flexible-collapse btn-icon-only\";\n\t\t\t}\n\t\t}\n\n\t\treturn $field;\n\t}", "protected abstract function generateParagraphTypeBaseFields(Row $row);", "function _hippel_discussions_content_default_fields() {\n $fields = array();\n\n // Exported field: field_discuss_body\n $fields[] = array(\n 'field_name' => 'field_discuss_body',\n 'type_name' => 'discuss',\n 'display_settings' => array(\n 'weight' => '31',\n 'parent' => '',\n 'label' => array(\n 'format' => 'above',\n ),\n 'teaser' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n 'full' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n '4' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'text',\n 'required' => '0',\n 'multiple' => '0',\n 'module' => 'text',\n 'active' => '1',\n 'text_processing' => '1',\n 'max_length' => '',\n 'allowed_values' => '',\n 'allowed_values_php' => '',\n 'widget' => array(\n 'rows' => '5',\n 'size' => 60,\n 'default_value' => array(\n '0' => array(\n 'value' => '',\n '_error_element' => 'default_value_widget][field_discuss_body][0][value',\n ),\n ),\n 'default_value_php' => NULL,\n 'label' => 'Body',\n 'weight' => '-4',\n 'description' => '',\n 'type' => 'text_textarea',\n 'module' => 'text',\n ),\n );\n\n // Exported field: field_discuss_image\n $fields[] = array(\n 'field_name' => 'field_discuss_image',\n 'type_name' => 'discuss',\n 'display_settings' => array(\n 'weight' => '33',\n 'parent' => '',\n 'label' => array(\n 'format' => 'above',\n ),\n 'teaser' => array(\n 'format' => 'image_nodelink',\n 'exclude' => 0,\n ),\n 'full' => array(\n 'format' => 'image_plain',\n 'exclude' => 0,\n ),\n '4' => array(\n 'format' => 'image_plain',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'filefield',\n 'required' => '0',\n 'multiple' => '1',\n 'module' => 'filefield',\n 'active' => '1',\n 'list_field' => '0',\n 'list_default' => 1,\n 'description_field' => '0',\n 'widget' => array(\n 'file_extensions' => 'png gif jpg jpeg',\n 'file_path' => 'images/[uid]',\n 'progress_indicator' => 'bar',\n 'max_filesize_per_file' => '1M',\n 'max_filesize_per_node' => '3M',\n 'max_resolution' => '0',\n 'min_resolution' => '0',\n 'alt' => '',\n 'custom_alt' => 1,\n 'title' => '',\n 'custom_title' => 0,\n 'title_type' => 'textfield',\n 'default_image' => NULL,\n 'use_default_image' => 0,\n 'label' => 'Image',\n 'weight' => '-3',\n 'description' => '',\n 'type' => 'imagefield_widget',\n 'module' => 'imagefield',\n ),\n );\n\n // Exported field: field_discuss_image\n $fields[] = array(\n 'field_name' => 'field_discuss_image',\n 'type_name' => 'reply',\n 'display_settings' => array(\n 'weight' => '33',\n 'parent' => '',\n 'label' => array(\n 'format' => 'above',\n ),\n 'teaser' => array(\n 'format' => 'image_plain',\n 'exclude' => 0,\n ),\n 'full' => array(\n 'format' => 'image_plain',\n 'exclude' => 0,\n ),\n '4' => array(\n 'format' => 'image_plain',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'filefield',\n 'required' => '0',\n 'multiple' => '1',\n 'module' => 'filefield',\n 'active' => '1',\n 'list_field' => '0',\n 'list_default' => 1,\n 'description_field' => '0',\n 'widget' => array(\n 'file_extensions' => 'png gif jpg jpeg',\n 'file_path' => 'images/[uid]',\n 'progress_indicator' => 'bar',\n 'max_filesize_per_file' => '1M',\n 'max_filesize_per_node' => '3M',\n 'max_resolution' => '0',\n 'min_resolution' => '0',\n 'alt' => '',\n 'custom_alt' => 1,\n 'title' => '',\n 'custom_title' => 0,\n 'title_type' => 'textfield',\n 'default_image' => NULL,\n 'use_default_image' => 0,\n 'label' => 'Image',\n 'weight' => '-3',\n 'description' => '',\n 'type' => 'imagefield_widget',\n 'module' => 'imagefield',\n ),\n );\n\n // Exported field: field_reply_body\n $fields[] = array(\n 'field_name' => 'field_reply_body',\n 'type_name' => 'reply',\n 'display_settings' => array(\n 'weight' => '31',\n 'parent' => '',\n 'label' => array(\n 'format' => 'above',\n ),\n 'teaser' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n 'full' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n '4' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'text',\n 'required' => '0',\n 'multiple' => '0',\n 'module' => 'text',\n 'active' => '1',\n 'text_processing' => '1',\n 'max_length' => '',\n 'allowed_values' => '',\n 'allowed_values_php' => '',\n 'widget' => array(\n 'rows' => '5',\n 'size' => 60,\n 'default_value' => array(\n '0' => array(\n 'value' => '',\n '_error_element' => 'default_value_widget][field_reply_body][0][value',\n ),\n ),\n 'default_value_php' => NULL,\n 'label' => 'Reply Body',\n 'weight' => '31',\n 'description' => '',\n 'type' => 'text_textarea',\n 'module' => 'text',\n ),\n );\n\n // Exported field: field_reply_refto_discuss\n $fields[] = array(\n 'field_name' => 'field_reply_refto_discuss',\n 'type_name' => 'reply',\n 'display_settings' => array(\n 'weight' => '33',\n 'parent' => '',\n 'label' => array(\n 'format' => 'hidden',\n ),\n 'teaser' => array(\n 'format' => 'hidden',\n 'exclude' => 0,\n ),\n 'full' => array(\n 'format' => 'hidden',\n 'exclude' => 0,\n ),\n '4' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n 'token' => array(\n 'format' => 'default',\n 'exclude' => 0,\n ),\n ),\n 'widget_active' => '1',\n 'type' => 'nodereference',\n 'required' => '1',\n 'multiple' => '0',\n 'module' => 'nodereference',\n 'active' => '1',\n 'referenceable_types' => array(\n 'discuss' => 'discuss',\n 'page' => 0,\n 'reply' => 0,\n 'story' => 0,\n ),\n 'advanced_view' => '--',\n 'advanced_view_args' => '',\n 'widget' => array(\n 'node_link' => array(\n 'teaser' => 1,\n 'full' => 1,\n 'title' => 'Reply to this Topic',\n 'hover_title' => '',\n 'destination' => 'node',\n ),\n 'fallback' => 'page_not_found',\n 'edit_fallback' => 1,\n 'label' => 'Reference to Discussion',\n 'weight' => '37',\n 'description' => '',\n 'type' => 'nodereference_url',\n 'module' => 'nodereference_url',\n ),\n );\n\n // Translatables\n array(\n t('Body'),\n t('Image'),\n t('Reference to Discussion'),\n t('Reply Body'),\n );\n\n return $fields;\n}", "function power_user_layout_fields( $user ) {\n\n\tif ( ! current_theme_supports( 'power-archive-layouts' ) || ! power_has_multiple_layouts() ) {\n\t\treturn;\n\t}\n\n\tif ( current_user_can( 'edit_users', $user->ID ) ) {\n\t\tpower_meta_boxes()->show_meta_box( 'power-user-layout', $user );\n\t}\n\n}", "protected function unsetFields()\n {\n }", "public function takesTwoColumns() {\n return false;\n }", "function DeleteNotOrdinaryFields($fields = array()){\n if ($this->nonordinary) {\n foreach ($this->form_fields as $sectionname => $section) {\n foreach ($section as $number => $field) {\n switch ($field[\"control\"]) {\n case \"dbcombobox\":\n case \"dbcheckboxgroup\":\n case \"checkboxgroup\":\n case \"dbtreecombobox\":\n if ($field[\"multiple\"])\n EditPageHelper::DeleteDBMultipleField($field, $fields, $this);\n break;\n case \"autocomplete\":\n \tif ($field[\"field_table\"]!=\"\")\n EditPageHelper::DeleteAutocompleteField($field, $fields, $this);break;\n default:\n \t$this->DeleteCustomNotOrdinaryField($field, $fields);\n break;\n }\n\n }\n }\n }\n }", "function custom_theme_sanitize_page_layout($input)\n{\n $valid = array(\n 'one-column' => __('One Column', 'theme'),\n 'two-column' => __('Two Column', 'theme'),\n );\n\n if (array_key_exists($input, $valid)) {\n return $input;\n }\n\n return '';\n}", "function gssettings_settings_layout_columns( $columns, $screen ) {\n global $_gssettings_settings_pagehook;\n if ( $screen == $_gssettings_settings_pagehook ) {\n $columns[$_gssettings_settings_pagehook] = 1;\n }\n return $columns;\n }", "function extraFields() {\n\t\n\t\t$file_id = JRequest::getVar('id');\n\t\t$filename = JRequest::getVar('filename');\n\t\t\n\t\tif (!$filename) {\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$model = $this->getModel();\n\t\t$form = $model->getFieldForm($file_id, 'bulk');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\">';\n\t\techo '<legend>Edit '.$filename.'</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}", "public static function getMeetingsRelatedListViewLayoutWithAllStandardAndCustomFieldsPlaced()\n {\n return array(\n 'panels' => array(\n array(\n 'rows' => array(\n array('cells' =>\n array(\n array(\n 'element' => 'name',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'owner',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'startDateTime',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'endDateTime',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'location',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'category',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'description',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'createdDateTime',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'modifiedDateTime',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'createdByUser',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'modifiedByUser',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'checkbox',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'currency',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'date',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'datetime',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'decimal',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'picklist',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'integer',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'multiselect',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'tagcloud',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'calculatednumber',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'countrypicklist',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'statepicklist',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'citypicklist',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'phone',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'radio',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'text',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'textarea',\n ),\n )\n ),\n array('cells' =>\n array(\n array(\n 'element' => 'url',\n ),\n )\n ),\n ),\n ),\n ),\n );\n }", "function layout_builder_post_update_make_layout_untranslatable() {\n /** @var \\Drupal\\Core\\Entity\\EntityFieldManagerInterface $field_manager */\n $field_manager = \\Drupal::service('entity_field.manager');\n $field_map = $field_manager->getFieldMap();\n foreach ($field_map as $entity_type_id => $field_infos) {\n if (isset($field_infos[OverridesSectionStorage::FIELD_NAME]['bundles'])) {\n $non_translatable_bundle_count = 0;\n foreach ($field_infos[OverridesSectionStorage::FIELD_NAME]['bundles'] as $bundle) {\n // The field map can contain stale information. If the field does not\n // exist, ignore it. The field map will be rebuilt when the cache is\n // cleared at the end of the update process.\n if (!$field_config = FieldConfig::loadByName($entity_type_id, $bundle, OverridesSectionStorage::FIELD_NAME)) {\n continue;\n }\n if (!$field_config->isTranslatable()) {\n $non_translatable_bundle_count++;\n // The layout field is already configured to be non-translatable so it\n // does not need to be updated.\n continue;\n }\n if (_layout_builder_bundle_has_no_translations($entity_type_id, $bundle) || _layout_builder_bundle_has_no_layouts($entity_type_id, $bundle)) {\n // Either none of the entities have layouts or none of them have\n // translations. In either case it is safe to set the field to be\n // non-translatable.\n $field_config->setTranslatable(FALSE);\n $field_config->save();\n $non_translatable_bundle_count++;\n }\n }\n // Set the field storage to untranslatable if the field config for each\n // bundle is now untranslatable. This removes layout fields for the\n // entity type from the Content Translation configuration form.\n if (count($field_infos[OverridesSectionStorage::FIELD_NAME]['bundles']) === $non_translatable_bundle_count) {\n $field_storage = FieldStorageConfig::loadByName($entity_type_id, OverridesSectionStorage::FIELD_NAME);\n $field_storage->setTranslatable(FALSE);\n $field_storage->save();\n }\n }\n }\n}", "public function getMainFields_preProcess() {\n\t\tif (GeneralUtility::_GP('in-page-edit-iframe')) {\n\t\t\t$initialColumns = GeneralUtility::_GP('columns');\n\t\t\t$columns = preg_replace('/--div--;[^,]+,/', '', $initialColumns);\n\t\t\t$columns = GeneralUtility::trimExplode(',', $columns);\n\n\t\t\tforeach($GLOBALS['TCA']['pages']['columns'] as $key => $val) {\n\t\t\t\tif (!in_array($key, $columns)) {\n\t\t\t\t\tunset($GLOBALS['TCA']['pages']['columns'][$key]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$GLOBALS['TCA']['pages']['types'][GeneralUtility::_GP('doktype')]['showitem'] = $initialColumns;\n\t\t}\n\t}", "public function getModlogOmitFields();", "public function testWhenColsShownByDefaultAndHideNotSpecified()\n {\n // no label provide), and not explicitly hidden.\n $testName = 'MyField';\n\n $showColsByDefault = 'true';\n $field = new Application_Model_Field($testName, array(),\n array(), $showColsByDefault);\n $this->assertTrue($field->isVisible());\n $this->assertSame(\"MyField\", $field->getLabel());\n $this->_assertNoMetaInfo($field);\n }", "function get_hidden_columns( ) {\r\n\t\t$columns = get_user_option( 'managemedia_page_' . MLACore::ADMIN_PAGE_SLUG . 'columnshidden' );\r\n\r\n\t\tif ( is_array( $columns ) ) {\r\n\t\t\tforeach ( $columns as $index => $value ){\r\n\t\t\t\tif ( empty( $value ) ) {\r\n\t\t\t\t\tunset( $columns[ $index ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$columns = self::$default_hidden_columns;\r\n\t\t}\r\n\r\n\t\treturn apply_filters( 'mla_list_table_get_hidden_columns', $columns );\r\n\t}", "function setLineBetweenColumns() {\t \r\n\t \t$this->lineBetweenColumns = true;\t\r\n\t}", "public function get_hidden_columns()\r\n {\r\n return array();\r\n }", "function ResetCSS() {\n \t$this->RowAttrs[\"style\"] = \"\";\n\t\t$this->RowAttrs[\"class\"] = \"\";\n\t\tforeach ($this->fields as $fld) {\n\t\t\t$fld->ResetCSS();\n\t\t}\n\t}", "function ResetCSS() {\n \t$this->RowAttrs[\"style\"] = \"\";\n\t\t$this->RowAttrs[\"class\"] = \"\";\n\t\tforeach ($this->fields as $fld) {\n\t\t\t$fld->ResetCSS();\n\t\t}\n\t}", "public function checkout_column_layout_fields( $fields ) {\n\n\t\t\tif ( empty( $fields['billing']['billing_address_2'] ) ) {\n\n\t\t\t\tif ( isset( $fields['billing']['billing_address_1'] ) && is_array( $fields['billing']['billing_address_1'] ) ) {\n\t\t\t\t\t$fields['billing']['billing_address_1']['class'][] = 'form-row-full';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! empty( $fields['billing']['billing_company'] ) ) {\n\n\t\t\t\tif ( isset( $fields['billing']['billing_company'] ) && is_array( $fields['billing']['billing_company'] ) ) {\n\t\t\t\t\t$fields['billing']['billing_company']['class'][] = 'form-row-full';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! empty( $fields['shipping']['shipping_company'] ) ) {\n\n\t\t\t\tif ( isset( $fields['shipping']['shipping_company'] ) && is_array( $fields['shipping']['shipping_company'] ) ) {\n\t\t\t\t\t$fields['shipping']['shipping_company']['class'][] = 'form-row-full';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! empty( $fields['billing']['billing_country'] ) ) {\n\n\t\t\t\tif ( isset( $fields['billing']['billing_country'] ) && is_array( $fields['billing']['billing_country'] ) ) {\n\t\t\t\t\t$fields['billing']['billing_country']['class'][] = 'form-row-full';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! empty( $fields['shipping']['shipping_country'] ) ) {\n\n\t\t\t\tif ( isset( $fields['shipping']['shipping_country'] ) && is_array( $fields['shipping']['shipping_country'] ) ) {\n\t\t\t\t\t$fields['shipping']['shipping_country']['class'][] = 'form-row-full';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! empty( $fields['billing']['billing_phone'] ) ) {\n\n\t\t\t\tif ( isset( $fields['billing']['billing_phone'] ) && is_array( $fields['billing']['billing_phone'] ) ) {\n\t\t\t\t\t$fields['billing']['billing_phone']['class'][] = 'form-row-full';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! empty( $fields['billing']['billing_email'] ) ) {\n\n\t\t\t\tif ( isset( $fields['billing']['billing_email'] ) && is_array( $fields['billing']['billing_email'] ) ) {\n\t\t\t\t\t$fields['billing']['billing_email']['class'][] = 'form-row-full';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( empty( $fields['shipping']['shipping_address_2'] ) ) {\n\n\t\t\t\tif ( isset( $fields['shipping']['shipping_address_1'] ) && is_array( $fields['shipping']['shipping_address_1'] ) ) {\n\t\t\t\t\t$fields['shipping']['shipping_address_1']['class'][] = 'form-row-full';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Billing address classes for 50% width */\n\t\t\tif (\n\t\t\t\tisset( $fields['billing']['billing_address_1'] ) &&\n\t\t\t\tisset( $fields['billing']['billing_address_2'] )\n\t\t\t) {\n\t\t\t\t$fields['billing']['billing_address_1']['class'][] = 'ast-column-50';\n\t\t\t\t$fields['billing']['billing_address_2']['class'][] = 'ast-column-50';\n\n\t\t\t\tif ( isset( $fields['billing']['billing_address_2']['label_class'] ) ) {\n\t\t\t\t\tif ( ! astra_get_option( 'checkout-labels-as-placeholders' ) ) {\n\t\t\t\t\t\t$fields['billing']['billing_address_2']['label_class'] = array_diff( $fields['billing']['billing_address_2']['label_class'], array( 'screen-reader-text' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Shipping address classes for 50% width */\n\t\t\tif (\n\t\t\t\tisset( $fields['shipping']['shipping_address_1'] ) &&\n\t\t\t\tisset( $fields['shipping']['shipping_address_2'] )\n\t\t\t) {\n\t\t\t\t$fields['shipping']['shipping_address_1']['class'][] = 'ast-column-50';\n\t\t\t\t$fields['shipping']['shipping_address_2']['class'][] = 'ast-column-50';\n\n\t\t\t\tif ( isset( $fields['shipping']['shipping_address_2']['label_class'] ) ) {\n\t\t\t\t\tif ( ! astra_get_option( 'checkout-labels-as-placeholders' ) ) {\n\t\t\t\t\t\t$fields['shipping']['shipping_address_2']['label_class'] = array_diff( $fields['shipping']['shipping_address_2']['label_class'], array( 'screen-reader-text' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Billing address classes for 33% width */\n\t\t\tif (\n\t\t\t\tisset( $fields['billing']['billing_city'] ) &&\n\t\t\t\tisset( $fields['billing']['billing_state'] ) && isset( $fields['billing']['billing_postcode'] )\n\t\t\t) {\n\n\t\t\t\t$fields['billing']['billing_city']['class'][] = 'ast-column-33';\n\t\t\t\t$fields['billing']['billing_state']['class'][] = 'ast-column-33';\n\t\t\t\t$fields['billing']['billing_postcode']['class'][] = 'ast-column-33';\n\t\t\t}\n\n\t\t\t/* Billing address classes for 33% width */\n\t\t\tif (\n\t\t\t\tisset( $fields['shipping']['shipping_city'] ) &&\n\t\t\t\tisset( $fields['shipping']['shipping_state'] ) && isset( $fields['shipping']['shipping_postcode'] )\n\t\t\t) {\n\n\t\t\t\t$fields['shipping']['shipping_city']['class'][] = 'ast-column-33';\n\t\t\t\t$fields['shipping']['shipping_state']['class'][] = 'ast-column-33';\n\t\t\t\t$fields['shipping']['shipping_postcode']['class'][] = 'ast-column-33';\n\t\t\t}\n\n\t\t\treturn $fields;\n\t\t}", "protected function removeCheckboxFieldNamesFromViewHelperVariableContainer() {}", "function add_specific_form_fields() {\n\t\treturn false;\n\t}", "public static function filter_fields_html( $args, $post ) {\n\t\t\t$format\t = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'layout-format' );\n\t\t\t$nowrap\t = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'lf-nowrap' );\n\n\t\t\tif ( !empty( $args[ 'thumbnail' ] ) && $format === '2-col' && $nowrap ) {\n\t\t\t\t$exclude_fields = apply_filters( PT_CV_PREFIX_ . '2col_nowrap_fields', array( 'thumbnail' ) );\n\n\t\t\t\tif ( PT_CV_Functions::get_global_variable( 'view_type' ) === 'collapsible' ) {\n\t\t\t\t\t$exclude_fields[] = 'title';\n\t\t\t\t}\n\n\t\t\t\t$others = array();\n\t\t\t\tforeach ( $args as $field => $value ) {\n\t\t\t\t\tif ( !in_array( $field, $exclude_fields ) ) {\n\t\t\t\t\t\t$others[ $field ] = $value;\n\t\t\t\t\t\tunset( $args[ $field ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( $others ) {\n\t\t\t\t\t$args[ 'others-wrap' ] = '<div class=\"' . PT_CV_PREFIX . 'colwrap\">' . implode( '', $others ) . '</div>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $args;\n\t\t}", "public function get_hidden_columns()\n {\n return array();\n }", "public function get_hidden_columns()\n {\n return array();\n }", "function mb_fields()\n {\n }", "function facebook_instant_articles_field_ui_fields($entity_type, $bundle, $view_mode, array &$form, array &$form_state) {\n\n // Do not add the fields if there is no layout.\n if (!isset($form['#fbia_layout'])) {\n return;\n }\n\n // Get the fields and put them on the form.\n $fields = facebook_instant_articles_get_fields($entity_type, FALSE);\n\n // Get field settings.\n $field_settings = facebook_instant_articles_get_field_settings($entity_type, $bundle, $view_mode, FALSE);\n $form['#field_settings'] = $field_settings;\n\n $table = &$form['fields'];\n $form['#fbia_fields'] = array();\n\n $field_label_options = array(\n 'above' => t('Above'),\n 'inline' => t('Inline'),\n 'hidden' => t('<Hidden>'),\n );\n drupal_alter('facebook_instant_articles_label_options', $field_label_options);\n\n foreach ($fields as $key => $field) {\n\n $form['#fbia_fields'][] = $key;\n\n // Check on formatter settings.\n if (isset($form_state['formatter_settings'][$key])) {\n $field['formatter_settings'] = $form_state['formatter_settings'][$key];\n }\n elseif (isset($field_settings[$key]['formatter_settings'])) {\n $field['formatter_settings'] = $field_settings[$key]['formatter_settings'];\n $form_state['formatter_settings'][$key] = $field['formatter_settings'];\n }\n\n if (!isset($field_settings[$key]['ft']) && isset($field_settings[$key]['ft'])) {\n $form_state['formatter_settings'][$key]['ft'] = $field_settings[$key]['ft'];\n }\n\n $hidden = array('hidden' => t('<Hidden>'));\n $formatters = isset($field['properties']['formatters']) ? $hidden + $field['properties']['formatters'] : $hidden + array('default' => t('Default'));\n\n $table[$key] = array(\n '#row_type' => 'field',\n '#js_settings' => array('field'),\n '#region_callback' => 'field_ui_display_overview_row_region',\n '#attributes' => array('class' => array('draggable', 'tabledrag-leaf')),\n 'human_name' => array(\n '#markup' => check_plain($field['title']),\n ),\n 'weight' => array(\n '#type' => 'textfield',\n '#default_value' => isset($field_settings[$key]['weight']) ? $field_settings[$key]['weight'] : 0,\n '#size' => 3,\n '#attributes' => array('class' => array('field-weight')),\n ),\n 'parent_wrapper' => array(\n 'parent' => array(\n '#type' => 'select',\n '#empty_value' => '',\n '#options' => array(),\n '#attributes' => array('class' => array('field-parent')),\n '#parents' => array('fields', $key, 'parent'),\n ),\n 'hidden_name' => array(\n '#type' => 'hidden',\n '#default_value' => $key,\n '#attributes' => array('class' => array('field-name')),\n ),\n ),\n 'label' => array(\n '#type' => 'select',\n '#options' => $field_label_options,\n '#default_value' => isset($field_settings[$key]['label']) ? $field_settings[$key]['label'] : 'hidden',\n ),\n 'format' => array(\n 'type' => array(\n '#type' => 'select',\n '#options' => $formatters,\n '#default_value' => isset($field_settings[$key]['format']) ? $field_settings[$key]['format'] : 'hidden',\n '#attributes' => array('class' => array('field-formatter-type')),\n ),\n ),\n 'settings_summary' => array(),\n 'settings_edit' => array(),\n );\n\n $field['name'] = $key;\n $field['entity_type'] = $entity_type;\n $field['bundle'] = $bundle;\n $field['view_mode'] = $view_mode;\n }\n\n // Add fields submit handler.\n $form['#submit'][] = 'facebook_instant_articles_field_ui_fields_save';\n}", "public function database()\n {\n return $this->fields->reject(function($field) {\n return is_null($field->type()->getColumn());\n });\n }", "public static function columns()\n {\n if (Deal::first() ?? false) {\n return array_diff(array_keys(Deal::first()->attributesToArray()), Deal::first()->exclude); \n } else {\n return array();\n }\n }", "abstract public function closeEmptyFieldset();", "protected static function LegacyLayoutTypeMap()\n {\n $oldToNew = array(\n 'column1' => 'Column1',\n 'column1topheader' => 'Column1top',\n 'column1woheader' => 'Column1woheader',\n 'column2_1_2header' => 'Column212',\n 'column2_2575_header' => 'Column2d2575',\n 'column2_3070_header' => 'Column2d3070',\n 'column2_3366_header' => 'Column2d3366',\n 'column2_3862_header' => 'Column2d3862',\n 'column2_6238_header' => 'Column2d6238',\n 'column2_6633_header' => 'Column2d6633',\n 'column2_7030_header' => 'Column2d7030',\n 'column2_7525_header' => 'Column2d7525',\n 'column2header' => 'Column2header',\n 'column3_252550_header' => 'Column3d252550',\n 'column3_255025_header' => 'Column3d255025',\n 'column3_502525_header' => 'Column3d502525',\n 'column3header' => 'Column3header',\n 'column2_1_2_1_2header' => 'Column21212',\n 'column21212_header_rightcol' => 'Column21212rightcol',\n );\n return $oldToNew;\n }", "function Field() {\n\t\t$fs = $this->FieldSet();\n \t$spaceZebra = isset($this->zebra) ? \" $this->zebra\" : '';\n \t$idAtt = isset($this->id) ? \" id=\\\"{$this->id}\\\"\" : '';\n\t\t$content = \"<div class=\\\"fieldgroup$spaceZebra\\\"$idAtt>\";\n\t\tforeach($fs as $subfield) {\n\t\t\t$childZebra = (!isset($childZebra) || $childZebra == \"odd\") ? \"even\" : \"odd\";\n\t\t\tif($subfield->hasMethod('setZebra')) $subfield->setZebra($childZebra);\n\t\t\t$content .= \"<div class=\\\"fieldgroupField\\\">\" . $subfield->{$this->subfieldParam}() . \"</div>\";\n\t\t}\n\t\t$content .= \"</div>\";\n\t\treturn $content;\n\t}", "function _reset()\n {\n foreach ($this->_cols as $col => $val) {\n if (isset($val['default'])) {\n $this->_data[$col] = $val['default'];\n } else {\n $this->_data[$col] = '';\n }\n }\n }", "public function setLayout($layout)\n\t{\n\t\t//LAYOUT CAN BE FLAT\t\n\t}", "protected abstract function retrieveFormDisplayFields(Row $row);", "protected function hiddenColumns(): array\n {\n return [];\n }", "public function get_hidden_columns()\n\t{\n\t\treturn array();\n\t}", "final private function sanitzeCol($i,$j){\n\t\tif(@$k = $this->checkCol($i,$j)and @!$this->markspan[$i][$j] ){\n\t\t\t@$move = $this->contents[$i]->contents[$j]->contents;\n\t\t\t$k =$k - 1;\n\n\t\t\tif (is_array($move))\n\t\t\t\tforeach($move as $v)\n\t\t\t\t$this->cellContent($i,$k,$v);\n\n\t\t\t$this->markspan[$i][$j] = true;\n\t\t\t$this->contents[$i]->contents[$j] = '';\n\n\n\t\t}else{\n\t\t\t$this->markspan[$i][$j] = false;\n\t\t}\n\n\t}", "final private function sanitzeRow($i,$j){\n\t\tif(@$k = $this->checkRow($i,$j) and @!$this->markspan[$i][$j]){\n\n\t\t\t$k =$k- 1;\n\n\t\t\t//check colspan at rowpan\n\t\t\t$span = (int) @$this->contents[$k]->contents[$j]->attrs['colspan'];\n\t\t\tfor ($a = $j; $a <$j + $span; $a++){\n\t\t\t\tif ($this->checkCol($k,$a)){\n\t\t\t\t\t@$move = $this->contents[$i]->contents[$a]->contents;\n\t\t\t\t\tif (is_array($move))\n\t\t\t\t\t\tforeach($move as $v) $this->cellContent($i,$j,$v);\n\n\t\t\t\t\t$this->markspan[$i][$a] = true;//\n\t\t\t\t\t$this->contents[$i]->contents[$a] = '';\n\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t@$move = $this->contents[$i]->contents[$j]->contents;\n\t\t\tif (is_array($move))\n\t\t\t\tforeach($move as $v)\n\t\t\t\t$this->cellContent($k,$j,$v);\n\n\t\t\t$this->markspan[$i][$j] = true;///\n\t\t\t$this->contents[$i]->contents[$j] = '';\n\n\t\t}\n\t\t\t\n\t\telse{\n\t\t\t$this->markspan[$i][$j] = false;\n\t\t}\n\t\t//else leave as it is\n\t}", "public function get_hidden_columns()\r\n\t{\r\n\t\treturn [ ];\r\n\t}", "public function buildFormLayout(FormLayoutColumn &$column)\n {\n }", "protected function _prepareColumns()\n\t{\n\t\t$this->addColumn('id',\n\t\t\t\tarray(\n\t\t\t\t\t\t'header'=> $this->__('ID'),\n\t\t\t\t\t\t'align' =>'right',\n\t\t\t\t\t\t'width' => '50px',\n\t\t\t\t\t\t'index' => 'id'\n\t\t\t\t)\n\t\t);\n\t\t \n\t\t$this->addColumn('name',\n\t\t\t\tarray(\n\t\t\t\t\t\t'header'=> $this->__('Name'),\n\t\t\t\t\t\t'index' => 'name'\n\t\t\t\t)\n\t\t);\n\t\t\n\t\t$this->addColumn('description',\n\t\t\t\tarray(\n\t\t\t\t\t\t'header'=> $this->__('Description'),\n\t\t\t\t\t\t'index' => 'description'\n\t\t\t\t)\n\t\t);\n\t\t\n\t\t$this->addColumn('percentage',\n\t\t\t\tarray(\n\t\t\t\t\t\t'header'=> $this->__('Percentage'),\n\t\t\t\t\t\t'index' => 'percentage'\n\t\t\t\t)\n\t\t);\n\t\t \n\t\treturn parent::_prepareColumns();\n\t}", "protected function getUniqeFields()\n\t{\n\t\treturn array('meetingid');\n\t}", "function uc_group_columns( $columns ) {\n unset( $columns['date'] );\n $columns['school_year'] = __( 'School Year', UPTOWNCODE_PLUGIN_NAME );\n $columns['class'] = __( 'Class', UPTOWNCODE_PLUGIN_NAME );\n $columns['activity'] = __( 'Activity', UPTOWNCODE_PLUGIN_NAME );\n $columns['signup'] = __( 'Signup', UPTOWNCODE_PLUGIN_NAME );\n return $columns;\n}", "public function get_fieldset_sql($sql, array $params=null) {\n if ($result = parent::get_fieldset_sql($sql, $params)) {\n array_walk($result, 'onespace2empty');\n }\n return $result;\n }", "protected function __fields() {\n $Fields = array_keys(get_object_vars($this));\n if (!empty ($this->__onlyFields)) {\n $Fields = $this->__onlyFields;\n }\n $NewFields = array();\n foreach ($Fields as $field) {\n if (in_array ($field, array ('__bound', '__Data', 'cleaned_data', 'label_suffix', 'required_suffix', 'is_editable', 'suppress_errors'))) continue;\n if (!is_object($this->$field)) continue;\n if (!empty ($this->disabled[$field])) continue;\n if (in_array ($field, $this->__Exclude)) continue;\n $NewFields[] = $field;\n }\n return $NewFields;\n }", "public function getFields() {\n return null;\n }", "function theme_helper_import_field_table($form) {\n $header = $form['#node_import-columns'];\n $rows = array();\n $groups = array();\n\n foreach (element_children($form) as $child) {\n if (!isset($form[$child]['#type']) || $form[$child]['#type'] != 'value') {\n $title = check_plain($form[$child]['#title']);\n $description = $form[$child]['#description'];\n $group = isset($form[$child]['#node_import-group']) ? $form[$child]['#node_import-group'] : '';\n unset($form[$child]['#title']);\n unset($form[$child]['#description']);\n\n if (!isset($groups[$group])) {\n $groups[$group] = array();\n }\n\n $groups[$group][] = array(\n check_plain($title) . '<div class=\"description\">'. $description .'</div>',\n drupal_render($form[$child]),\n );\n }\n }\n\n if (isset($groups['']) && !empty($groups[''])) {\n $rows = array_merge($rows, $groups['']);\n }\n\n foreach ($groups as $group => $items) {\n if ($group !== '' && !empty($items)) {\n $rows[] = array(\n array('data' => $group, 'colspan' => 2, 'class' => 'region'),\n );\n $rows = array_merge($rows, $items);\n }\n }\n\n if (empty($rows)) {\n $rows[] = array(array('data' => $form['#node_import-empty'], 'colspan' => 2));\n }\n\n return theme('table', $header, $rows) . drupal_render($form);\n}", "protected function setLockedFieldsets()\n {\n foreach ($this->defs['panels'] as $pIndex => $panel) {\n foreach ($panel as $rIndex => $row) {\n foreach ($row as $fIndex => $field) {\n $fieldName = is_array($field) && isset($field['name'])\n ? $field['name']\n : $field;\n\n if (in_array($fieldName, $this->lockedFields)) {\n if (isset($field['type']) && $field['type'] == 'address') {\n $this->lockedFieldsets[$fieldName] = 1;\n }\n }\n }\n }\n }\n }", "function AddCol($field=-1,$width=-1,$caption='',$align='')\r\n{\r\n if($field==-1)\r\n $field=count($this->aCols);\r\n $this->aCols[]=array('f'=>$field,'c'=>$caption,'w'=>$width,'a'=>$align);\r\n}", "public function getFieldsSeparator();", "function AddCol($field=-1,$width=-1,$align='L')\r\n{\r\n\tif($field==-1)\r\n\t{\r\n\t\t$field=count($this->columnProp);\r\n\t}\r\n\r\n\t$this->columnProp[$field]=array('f'=>$field,'w'=>$width,'a'=>$align);\r\n\t#$this->Write(5, \"Ajout de colonne : \".$field.\"/\".$width.\"/\".$align); $this->Ln();\r\n}", "protected abstract function retrieveNonBaseFields(Row $row);", "function cs_meta_layout(){\n\tglobal $cs_xmlObject;\n\tif ( empty($cs_xmlObject->sidebar_layout->cs_layout) ) $cs_layout = \"\"; else $cs_layout = $cs_xmlObject->sidebar_layout->cs_layout;\n\tif ( empty($cs_xmlObject->sidebar_layout->cs_sidebar_left) ) $cs_sidebar_left = \"\"; else $cs_sidebar_left = $cs_xmlObject->sidebar_layout->cs_sidebar_left;\n\tif ( empty($cs_xmlObject->sidebar_layout->cs_sidebar_right) ) $cs_sidebar_right = \"\"; else $cs_sidebar_right = $cs_xmlObject->sidebar_layout->cs_sidebar_right;\n ?>\n\t<div class=\"elementhidden\">\n <div class=\"clear\"></div>\n \t<div class=\"opt-head\">\n <h4>Layout Options</h4>\n <div class=\"clear\"></div>\n </div>\n <ul class=\"form-elements\">\n <li class=\"to-label\">\n <label>Select Layout</label>\n </li>\n <li class=\"to-field\">\n <div class=\"meta-input\">\n <div class='radio-image-wrapper'>\n <input <?php if($cs_layout==\"none\")echo \"checked\"?> onclick=\"show_sidebar('none')\" type=\"radio\" name=\"cs_layout\" class=\"radio\" value=\"none\" id=\"radio_1\" />\n <label for=\"radio_1\">\n <span class=\"ss\"><img src=\"<?php echo get_template_directory_uri()?>/images/admin/1.gif\" alt=\"\" /></span>\n <span <?php if($cs_layout==\"none\")echo \"class='check-list'\"?> id=\"check-list\"><img src=\"<?php echo get_template_directory_uri()?>/images/admin/1-hover.gif\" alt=\"\" /></span>\n </label>\n </div>\n <div class='radio-image-wrapper'>\n <input <?php if($cs_layout==\"right\")echo \"checked\"?> onclick=\"show_sidebar('right')\" type=\"radio\" name=\"cs_layout\" class=\"radio\" value=\"right\" id=\"radio_2\" />\n <label for=\"radio_2\">\n <span class=\"ss\"><img src=\"<?php echo get_template_directory_uri()?>/images/admin/2.gif\" alt=\"\" /></span>\n <span <?php if($cs_layout==\"right\")echo \"class='check-list'\"?> id=\"check-list\"><img src=\"<?php echo get_template_directory_uri()?>/images/admin/2-hover.gif\" alt=\"\" /></span>\n </label>\n </div>\n <div class='radio-image-wrapper'>\n <input <?php if($cs_layout==\"left\")echo \"checked\"?> onclick=\"show_sidebar('left')\" type=\"radio\" name=\"cs_layout\" class=\"radio\" value=\"left\" id=\"radio_3\" />\n <label for=\"radio_3\">\n <span class=\"ss\"><img src=\"<?php echo get_template_directory_uri()?>/images/admin/3.gif\" alt=\"\" /></span>\n <span <?php if($cs_layout==\"left\")echo \"class='check-list'\"?> id=\"check-list\"><img src=\"<?php echo get_template_directory_uri()?>/images/admin/3-hover.gif\" alt=\"\" /></span>\n </label>\n </div>\n </div>\n </li>\n </ul>\n <ul class=\"form-elements meta-body\" style=\" <?php if($cs_sidebar_left == \"\"){echo \"display:none\";}else echo \"display:block\";?>\" id=\"sidebar_left\" >\n <li class=\"to-label\">\n <label>Select Left Sidebar</label>\n </li>\n <li class=\"to-field\">\n <select name=\"cs_sidebar_left\" class=\"select_dropdown\" id=\"page-option-choose-left-sidebar\">\n <?php\n $cs_theme_option = get_option('cs_theme_option');\n if ( isset($cs_theme_option['sidebar']) and count($cs_theme_option['sidebar']) > 0 ) {\n foreach ( $cs_theme_option['sidebar'] as $sidebar ){\n ?>\n <option <?php if ($cs_sidebar_left==$sidebar)echo \"selected\";?> ><?php echo $sidebar;?></option>\n <?php\n }\n }\n ?>\n </select>\n </li>\n </ul>\n <ul class=\"form-elements meta-body\" style=\" <?php if($cs_sidebar_right == \"\"){echo \"display:none\";}else echo \"display:block\";?>\" id=\"sidebar_right\" >\n <li class=\"to-label\">\n <label>Select Right Sidebar</label>\n </li>\n <li class=\"to-field\">\n <select name=\"cs_sidebar_right\" class=\"select_dropdown\" id=\"page-option-choose-right-sidebar\">\n <?php\n if ( isset($cs_theme_option['sidebar']) and count($cs_theme_option['sidebar']) > 0 ) {\n foreach ( $cs_theme_option['sidebar'] as $sidebar ){\n ?>\n <option <?php if ($cs_sidebar_right==$sidebar)echo \"selected\";?> ><?php echo $sidebar;?></option>\n <?php\n }\n }\n ?>\n </select>\n <input type=\"hidden\" name=\"cs_orderby[]\" value=\"meta_layout\" />\n </li>\n </ul>\n\t</div>\n\t<div class=\"clear\"></div>\n<?php\t\n}" ]
[ "0.6280614", "0.594543", "0.5879387", "0.56917953", "0.56364375", "0.55118126", "0.54647386", "0.5445683", "0.54436845", "0.54215914", "0.53723294", "0.53179884", "0.5275125", "0.5262669", "0.5218573", "0.51989305", "0.51636857", "0.5112799", "0.50914645", "0.5091071", "0.50606465", "0.5035617", "0.5008702", "0.4971847", "0.4952455", "0.4949666", "0.49072856", "0.49064922", "0.48999825", "0.4898357", "0.48966464", "0.48790026", "0.48775268", "0.48583746", "0.4836213", "0.48352817", "0.48292136", "0.48187557", "0.4816965", "0.48153722", "0.4813695", "0.47841", "0.47690243", "0.47559258", "0.4755458", "0.47549385", "0.47535038", "0.4752544", "0.47515422", "0.47489578", "0.47356713", "0.47356042", "0.4709243", "0.47076803", "0.47067505", "0.47029242", "0.46967775", "0.46946302", "0.4688243", "0.468203", "0.4680102", "0.4665611", "0.46601382", "0.4657253", "0.4657253", "0.46536788", "0.46534094", "0.46528217", "0.46477076", "0.46447575", "0.46447575", "0.46435276", "0.4635745", "0.46337357", "0.46249244", "0.46249175", "0.4618589", "0.46171755", "0.46110258", "0.46092868", "0.45925608", "0.45917767", "0.45894197", "0.45881376", "0.4587233", "0.45870516", "0.45730197", "0.45656577", "0.4563292", "0.45592222", "0.45553276", "0.4550206", "0.45479992", "0.45461112", "0.45393088", "0.45375973", "0.45363572", "0.45360819", "0.4534611", "0.4533326" ]
0.60427624
1
Add datafieldtype attribute to field elements.
public function add_data_field_type_attr( $properties, $field, $form_data ) { $properties['container']['data']['field-type'] = $field['type']; return $properties; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function add($field_type, $data)\n\t{\n\t\tswitch (SQL_DBAL)\n\t\t{\n\t\t\tcase 'mysql' :\n\t\t\tcase 'mysqli' :\n\t\t\t\t$method = 'add_column_mysql';\n\t\t\tbreak;\n\n\t\t\tcase 'pgsql' :\n\t\t\t\t$method = 'add_column_pgsql';\n\t\t\tbreak;\n\n\t\t\tcase 'sqlite' :\n\t\t\t\t$method = 'add_column_sqlite';\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t// on recupere l'ordre maximale pour placer le nouveau champ\n\t\t$sql = 'SELECT MAX(pf_order) AS max_order\n\t\t\t\tFROM ' . SQL_PREFIX . 'profil_fields\n\t\t\t\tWHERE pf_type = ' . $field_type . '\n\t\t\t\tLIMIT 1';\n\t\t$data['pf_order'] = Fsb::$db->get($sql, 'max_order') + 1;\n\t\t$data['pf_type'] = $field_type;\n\t\t$data['pf_list'] = serialize($data['pf_list']);\n\n\t\tFsb::$db->insert('profil_fields', $data);\n\n\t\tswitch ($field_type)\n\t\t{\n\t\t\tcase PROFIL_FIELDS_CONTACT :\n\t\t\t\t$tablename = 'users_contact';\n\t\t\t\t$sql_field_name = 'contact_';\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase PROFIL_FIELDS_PERSONAL :\n\t\t\t\t$tablename = 'users_personal';\n\t\t\t\t$sql_field_name = 'personal_';\n\t\t\tbreak;\n\t\t}\n\t\tProfil_fields_admin::$method(SQL_PREFIX . $tablename, $sql_field_name, $data['pf_html_type'], Fsb::$db->last_id());\n\t}", "public function addField($data) {\n $field = $data['field'];\n $class = 'AetherORM' . ucfirst($data['type']) . 'Field';\n $this->fields[$field] = new $class($data['default'], $data['null']);\n }", "public function getDataWithTypeField() {}", "function register_field_type($class)\n {\n }", "function registerFieldType($name, $type);", "public function addField(DataField $field)\r\n\t{\r\n\t\t$this->fields[] = $field;\r\n\t\tif ($field instanceOf TableField && $field->isPrimaryKey)\r\n\t\t{\r\n\t\t\t$this->primaryKey = $field->name;\r\n\t\t}\r\n\t}", "function acf_register_field_type($class)\n{\n}", "public function add_field($name, $type)\n {\n $this->fields[$name] = $type;\n }", "public function setFieldType($field_type)\n\t{\n\t\t$this->forced_field_type = JFilterInput::getInstance()->clean($field_type, 'CMD');\n\t}", "function register_field_type_info($info)\n {\n }", "function get_field_types()\n {\n }", "function acf_register_field_type_info($info)\n{\n}", "public function addField($field, array $data)\n {\n $this->fields[$field] = $this->prepareField($data);\n }", "public function getFieldType($fieldname);", "public function setDataType($value)\n {\n $this->_fields['DataType']['FieldValue'] = $value;\n return $this;\n }", "function getFieldType() {\n\t\treturn 'field';\n\t}", "public function getFieldType(){\n \treturn $this->field_type;\n }", "protected function handleFieldTypes($field, $fieldData)\n {\n switch ($field->type) {\n // Untranslatable fields. These do not include the\n // actual label in the page data.\n case 'suggest':\n case 'radio':\n case 'checkboxes':\n return;\n\n case 'array':\n case 'collection':\n case 'list':\n case 'tags':\n case 'checkbox':\n $this->fields = (new ArrayField($this->fields))->map($fieldData);\n break;\n\n case 'table':\n case 'replicator':\n $this->fields = (new ReplicatorField($this->fields))->map($fieldData);\n break;\n\n // \"Default\" fields include:\n // - Bard\n // - Regular string values\n default:\n $this->fields = (new StringField($this->fields))->map($fieldData);\n break;\n }\n }", "public function addAttribute($name, $type)\n {\n $this->attributeTypes[$name] = $type;\n $this->attributeValues[$name] = NULL; // Inicializacion de campo simple, garantiza que siempre hay un valor para la key $name\n }", "private function addFieldType($type,$hasOptions){\n $this->hasOptions[$type]=$hasOptions;\n }", "public static function fieldTypes()\n {\n $types = [\n 'label' => _MA_XMARTICLE_FIELDTYPE_LABEL,\n 'vs_text' => _MA_XMARTICLE_FIELDTYPE_VSTEXT,\n 's_text' => _MA_XMARTICLE_FIELDTYPE_STEXT,\n 'm_text' => _MA_XMARTICLE_FIELDTYPE_MTEXT,\n 'l_text' => _MA_XMARTICLE_FIELDTYPE_LTEXT,\n 'text' => _MA_XMARTICLE_FIELDTYPE_TEXT,\n 'select' => _MA_XMARTICLE_FIELDTYPE_SELECT,\n 'select_multi' => _MA_XMARTICLE_FIELDTYPE_SELECTMULTI,\n 'radio_yn' => _MA_XMARTICLE_FIELDTYPE_RADIOYN,\n 'radio' => _MA_XMARTICLE_FIELDTYPE_RADIO,\n 'checkbox' => _MA_XMARTICLE_FIELDTYPE_CHECKBOX,\n 'number' => _MA_XMARTICLE_FIELDTYPE_NUMBER\n ];\n\n return $types;\n }", "public function setType($type)\n {\n parent::setAttr(\"type\", $type);\n }", "public function attributeCustomTypes()\n {\n $flagEnabled = \\common\\components\\Consts::STATUS_ENABLED;\n return array(\n 'id' => array('data-options' => array('checkbox'=>'true'), 'key' => true),\n 'type' => array('width' => 100),\n 'office_id' => array('width' => 100),\n 'int_value' => array('width' => 100),\n 'float_value' => array('width' => 100),\n 'str_value' => array('width' => 100),\n 'flag' => array('width' => 100, 'formatter'=>\"function(value,row){ return '0x'+parseInt(value).toString(16); }\"),\n 'status' => array('width' => 80, 'sortable' => 'true',\n 'formatter' => \"function(value,row){ if (value == {$flagEnabled}) { return $.custom.lan.defaults.role.enabled; } else { return $.custom.lan.defaults.role.disabled; };}\"),\n 'edit_user_id' => array('width' => 100, 'sortable' => 'true', 'formatter' => \"function(value,row){ return row.edit_user_disp; }\"),\n 'created_at' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'updated_at' => array('width' => 140, 'sortable' => 'true', 'formatter' => \"function(value,row){return $.custom.utils.humanTime(value);}\"),\n 'operation' => array('width' => 160, \n 'buttons' => array(\n ),\n ),\n );\n }", "function add_field($table_name, $field_name, $data_type, $length, $comment = \"\")\r\n{\r\n\tif($length != \"\")\r\n\t{\r\n\t\t$type = $data_type.\"(\".$length.\")\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$type = $data_type;\r\n\t}\r\n\r\n\t$alter = \"ALTER TABLE \".$table_name.\" ADD \".strtoupper($field_name).\" \".strtoupper($type).\" \";\r\n\tdb::query($alter);\r\n\r\n\tif($comment != \"\")\r\n\t{\r\n\t\tif(db::$_dbType == \"ORACLE\")\r\n\t\t{\r\n\t\t\t$comment_sql = \"COMMENT ON COLUMN \".$table_name.\".\".$field_name.\" IS '\".$comment.\"' \";\r\n\t\t}\r\n\t\telseif(db::$_dbType == \"MYSQL\")\r\n\t\t{\r\n\r\n\t\t}\r\n\t\telseif(db::$_dbType == \"MSSQL\")\r\n\t\t{\r\n\r\n\t\t}\r\n\r\n\t\tdb::query($comment_sql);\r\n\t}\r\n}", "public function get_field_type() {\n\t\treturn $this->get_field_attr( 'type' );\n\t}", "public function getDataType(): string\n {\n return $this->col->getAttribute('data-type');\n }", "public function getFieldDataType() {\n\t\t$fieldDataType = '';\n\t\t$uitype = $this->get('uitype');\n\t\tif ($uitype == '9') {\n\t\t\t$fieldDataType = 'percent';\n\t\t}\n\n\t\tif (!$fieldDataType) {\n\t\t\t$webserviceField = $this->getWebserviceFieldObject();\n\t\t\t$fieldDataType = $webserviceField->getFieldDataType();\n\t\t\tswitch($fieldDataType) {\n\t\t\t\tcase 'text' : $fieldDataType = 'textArea'; break;\n\t\t\t\tcase 'boolean' : $fieldDataType = 'checkBox'; break;\n\t\t\t case 'multipicklist' : $fieldDataType = 'multiSelectCombo'; break;\n\t\t\t}\n\t\t}\n\t\treturn $fieldDataType;\n\t}", "function hook_acquia_contenthub_field_type_mapping_alter(array &$mapping) {\n $mapping['my_custom_field'] = 'array<string>';\n}", "function get_field_type($name)\n {\n }", "function forceType($fieldName,$inputType){\n\n\t\tif($inputType == \"file\") $this->hasFiles = true;\n\t\t$this->forced[$fieldName] = $inputType;\n\n\t}", "function is_field_type($name)\n {\n }", "public abstract function getTypeAttribute();", "public function getTypeAttribute();", "public function addType($type);", "protected function _createDataNode(\\DOMElement $fieldNode) {}", "public function setTypeAttribute($type)\n {\n $this->attributes['type'] = str_replace(array(' '),'_',$type);\n }", "public function addField( $table, $field, $type, $default=NULL );", "protected function setDataType(Field &$field, $type)\n {\n $map = $this->dataTypeMap();\n\n if (array_key_exists($type, $map)) {\n $field->dataType = $map[$type];\n }\n\n return $this;\n }", "public function set_field_types( $field, $id ) {\n\n\t\t\tif ( is_array( $field ) || ! isset( $field['type'] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( ! in_array( $field['type'], $this->field_types ) ) {\n\t\t\t\t$this->field_types[] = $field['type'];\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t}", "function FieldTypesArray() {}", "public function setDataType($value)\n\t{\n\t\t$this->setViewState('DataType',TPropertyValue::ensureEnum($value,'TValidationDataType'),TValidationDataType::String);\n\t}", "function getFieldType() {\n\t\treturn 'contact_field';\n\t}", "public function definition_after_data() {\n parent::definition_after_data();\n $this->_form->freeze(['type']);\n $this->tool->form_definition_after_data($this->_form);\n }", "private function add_field($field_name, $field_description = '', $field_default_value = '', $field_type = 'text')\n\t{\n\t\tif(!is_array($this->fields))\n\t\t\t$this->fields = array();\n\n\t\t$this->fields[$field_name] = array('name' => $field_name, 'description' => $field_description, 'default_value' => $field_default_value, 'type' => $field_type);\n\t}", "function acf_get_field_type($name)\n{\n}", "function add($type,$data){\n\t// PARAM $type : type of data, as above\n\t// $data : data to add\n\n\t\tif (!is_array($this->$type)) { die(\"Not a valid data type\"); }\n\t\t$this->$type[] = $data;\n\t}", "function acadp_get_custom_field_types() {\n\n\t$types = array(\n\t\t'text' => __( 'Text', 'advanced-classifieds-and-directory-pro' ),\n\t\t'textarea' => __( 'Text Area', 'advanced-classifieds-and-directory-pro' ),\n\t\t'select' => __( 'Select', 'advanced-classifieds-and-directory-pro' ),\n\t\t'checkbox' => __( 'Checkbox', 'advanced-classifieds-and-directory-pro' ),\n\t\t'radio' => __( 'Radio Button', 'advanced-classifieds-and-directory-pro' ),\n\t\t'url' => __( 'URL', 'advanced-classifieds-and-directory-pro' )\n\t);\n\n\t// Return\n\treturn apply_filters( 'acadp_custom_field_types', $types );\n\n}", "public function data_type($type) {\n\t\tstatic $types = array(\n\t\t\t'BIT' => array('type' => 'Binary', 'max_length' => 1, 'nullable' => FALSE),\n\t\t\t'DATETIME' => array('type' => 'Integer'),\n\t\t\t'IMAGE' => array('type' => 'Blob', 'max_length' => 2147483647),\n\t\t\t'MONEY' => array('type' => 'Decimal', 'precision' => 18, 'scale' => 4),\n\t\t\t'NTEXT' => array('type' => 'Text', 'max_length' => '1073741823'),\n\t\t\t'SMALLDATETIME' => array('type' => 'Integer'),\n\t\t\t'SMALLMONEY' => array('type' => 'Decimal', 'precision' => 10, 'scale' => 4),\n\t\t\t'SQL_VARIANT' => array('type' => 'Blob', 'varying' => TRUE),\n\t\t\t//'TABLE' => array('type' => 'Table'),\n\t\t\t'TINYINT' => array('type' => 'Integer', 'range' => array(0, 255)),\n\t\t\t'UNIQUEIDENTIFIER' => array('type' => 'String', 'max_length' => 38),\n\t\t);\n\n\t\t$type = strtoupper($type);\n\n\t\tif (isset($types[$type])) {\n\t\t\treturn $types[$type];\n\t\t}\n\n\t\treturn parent::data_type($type);\n\t}", "function acf_is_field_type($name = '')\n{\n}", "function set_attributes_data_types(&$table, $attributes)\n{\n\tforeach($attributes as $key_attr => $attribute)\n\t{\n\t\t$key_attr = mb_strtolower($key_attr, 'UTF-8');\n\n\t\tif(isset($table[$key_attr]))\n\t\t\t$table[$key_attr] = compare_data_type($table[$key_attr], recognize_data_type($attribute)); //if there already is set data type compare old and now to get the highest one\n\t\telse\n\t\t\t$table[$key_attr] = recognize_data_type($attribute); // if data type not set, recognize it\n\n\t\tif($table[$key_attr] == \"NTEXT\") // setting an attributes data type requires a conversion of ntext type to nvarchar\n\t\t\t$table[$key_attr] = \"NVARCHAR\";\n\t}\n}", "function acf_get_field_types($args = array())\n{\n}", "private function getTypeOfData(string $fieldType, ?string $formatType): string\n {\n $type = $formatType;\n if ($fieldType == 'bool') {\n $type = 'string2bool';\n } elseif ($formatType == null) {\n $type = 'string';\n } elseif ($fieldType != $formatType) {\n if ($formatType == 'datetime') {\n $type = 'string2' . $type;\n }\n }\n return $type;\n }", "function get_field_type($field)\n\t{\n\t\tif( $field == \"usr_email\" )\n\t\t\treturn \"email\";\n\t\telse if( $field == \"usr_cod_postal\" )\n\t\t\treturn \"number\";\n\t\telse\n\t\t\treturn \"text\";\n\t}", "public function set_field( string $field, $data ) {\n\t\t$this->data[ $field ] = $data;\n\t}", "public function add_attr($type,$content){\n\t\tif(!isset($this->attr[$type])){\n\t\t\t$this->attr=array_merge($this->attr,array((string)$type=>(string)$content));\n\t\t}\n\t\treturn $this;\n\t}", "public function setFieldType(string $type): self\n {\n $this->setOption('fieldtype', $type);\n\n return $this;\n }", "public function fieldTypes($fieldName, $type, $parameters = \"\") {\r\n $this->fieldType[$fieldName] = array(\r\n \"type\" => strtoupper($type),\r\n \"parameters\" => $parameters\r\n );\r\n return $this;\r\n }", "private function addField ( $type, \\r8\\iface\\Form\\Field $field )\n {\n if ( !$field->isHidden() ) {\n $tpl = clone $this->fieldTpl;\n $tpl->set( \"type\", $type );\n $tpl->set( \"field\", $field->__toString() );\n $tpl->set( \"label\", $field->getLabelTag()->__toString() );\n $tpl->set( \"errors\", $this->getErrorTpl( $field->validate() ) );\n $tpl->set( \"showErrors\", $this->showErrors );\n $this->fields->add( $tpl );\n }\n }", "private function field_declaration_builder_from_data( $env, $field_data ) {\n\t\t$field_name = $field_data['name'];\n\t\t$field_builder = $env->field( $field_name );\n\t\t$default_value = isset( $field_data['std'] ) ? $field_data['std'] : $this->default_for_attribute( $field_data, 'std' );\n\t\t$label = isset( $field_data['label'] ) ? $field_data['label'] : $field_name;\n\t\t$description = isset( $field_data['desc'] ) ? $field_data['desc'] : $label;\n\t\t$setting_type = isset( $field_data['type'] ) ? $field_data['type'] : null;\n\t\t$choices = isset( $field_data['options'] ) ? array_keys( $field_data['options'] ) : null;\n\t\t$field_type = 'string';\n\n\t\tif ( 'checkbox' === $setting_type ) {\n\t\t\t$field_type = 'boolean';\n\t\t\tif ( $default_value ) {\n\t\t\t\t// convert our default value as well.\n\t\t\t\t$default_value = $this->bit_to_bool( $default_value );\n\t\t\t}\n\t\t\t$field_builder\n\t\t\t\t->with_serializer( array( $this, 'bool_to_bit' ) )\n\t\t\t\t->with_deserializer( array( $this, 'bit_to_bool' ) );\n\n\t\t} elseif ( 'select' === $setting_type ) {\n\t\t\t$field_type = 'string';\n\t\t} else {\n\t\t\t// try to guess numeric fields, although this is not perfect.\n\t\t\tif ( is_numeric( $default_value ) ) {\n\t\t\t\t$field_type = is_float( $default_value ) ? 'float' : 'integer';\n\t\t\t}\n\t\t}\n\n\t\tif ( $default_value ) {\n\t\t\t$field_builder->with_default( $default_value );\n\t\t}\n\t\t$field_builder\n\t\t\t->with_description( $description )\n\t\t\t->with_dto_name( $field_name )\n\t\t\t->with_type( $env->type( $field_type ) );\n\t\tif ( $choices ) {\n\t\t\t$field_builder->with_choices( $choices );\n\t\t}\n\n\t\t$this->on_field_setup( $field_name, $field_builder, $field_data, $env );\n\n\t\treturn $field_builder;\n\t}", "protected function AssignPageTypeFields() {\n $this->AddField('showmap', self::DT_BOOLEAN, true);\n $this->AddField('mapaddress', self::DT_STRING);\n }", "public function add_pod_type( $data ) {\n\n\t\t$data['pod'] = __( 'Advanced Content Type (separate from WP, blank slate, in its own table)', 'pods' );\n\n\t\treturn $data;\n\t}", "function appendUserFieldDecl($name, $type, $value) {\r\n\t\t$newNode = new UserFieldDecl($this->domFragment);\r\n\t\t$ret = false;\r\n\t\tswitch ($type) {\r\n\t\t\tcase 'string': \r\n\t\t\t\t$newNode->setStringValue(value);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault :\r\n\t\t\t\t$ret = false;\r\n\t\t}\r\n\t\t$newNode->setName($name);\t \t\t\r\n\t\tif (isset($newNode) && $newNode != NULL) {\r\n\t\t\t$this->root->appendChild($newNode->getDocumentFragment);\r\n\t\t\t$ret = true;\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}", "function getTypeOfField($fieldName);", "public function add_type($data){\n\t\t$this->db->insert('training_types', $data);\n\t\tif ($this->db->affected_rows() > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getDataWithTypeLevelfield() {}", "public function setDataType($dataType) {\n\t\t\t$this->limit = false;\n\t\t\t$this->offset = false;\n\n\t\t\t$this->dataType = $dataType;\n\t\t}", "public function addDynamicMetaFields($type, $post)\n {\n // Add the fields\n $this->addItemFields($post, true);\n }", "function addField($type, $name){\n\t\tif($this->fields[$name])throw new APortalException(\"Field $name already exist\",$this);\n\t\t$this->fields[$name][\"type\"] = $type;\n\t\t$this->last_field=$name;\n\t\treturn $this;\n\t}", "public function getDataTypeAttribute(): string\n {\n return $this->config['data_type'];\n }", "function getFieldsTypes()\n {\n return array(\n'id' =>'integer',\n'paypalid'=>'string',\n'notifyid'=>'string',\n\n\t\t\t\n\t );\n }", "public function getDbFieldType()\n {\n }", "public function getDataType()\n {\n return $this->_fields['DataType']['FieldValue'];\n }", "protected function addField($name, $type, $id, $auto_inc){\n\t\t$this->fields[$name]=array(\"type\" => $type, \"id\" => $id, \"auto\" => $auto_inc);\n\t\tif ($id){\n\t\t\t$this->id=$name;\n\t\t}\n\t}", "protected function get_array_field_types() {\n\t\treturn array( 'multicheck' );\n\t}", "function acf_get_field_types_info($args = array())\n{\n}", "public function setType($type) {\n\t\t$this->data['type'] = $type;\n\t}", "public function getType()\n {\n return 'text field';\n }", "public function setTypeAttribute($value)\n {\n $this->attributes['type'] = $value;\n }", "public function setTyp( $type );", "function field_data_type_view(){\r\n\t\tglobal $current_user;\r\n\t\t$current_user = wp_get_current_user();\r\n\t\tif( !current_user_can( 'manage_options', $current_user->ID ) ){\r\n\t\t\twp_die( __( 'You do not have permissions to activate this plugin, sorry, check with site administrator to resolve this issue please!', 'user-registration-aide' ) );\r\n\t\t}else{\r\n\t\t\t$field = new FIELDS_DATABASE();\r\n\t\t\t?>\r\n\t\t\t<table class=\"style\">\t\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th colspan=\"3\"><?php _e( 'Change Field Type: ', 'user-registration-aide' );?></th>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th colspan=\"2\"><?php _e( 'Field Title: ', 'user-registration-aide' );?></th>\r\n\t\t\t\t\t<th><?php _e( 'Field Type: ', 'user-registration-aide' );?></th>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<?php\r\n\t\t\t\t$nfc = new INPUT_NEW_FIELDS_MODEL();\r\n\t\t\t\t$input = $nfc->input_options_array();\r\n\t\t\t\t$ura_fields = $field->get_all_fields();\r\n\t\t\t\tif( !empty( $ura_fields ) ){\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach( $ura_fields as $objects ){\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td class=\"fieldName\" colspan=\"2\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\techo '<label for=\"'.$objects->meta_key.'\">'. _e( $objects->field_name, 'user-registration-aide').'</label>';\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<select class=\"fieldOrder\" name=\"<?php echo $objects->meta_key.'_data_type'; ?>\" title=\"<?php _e( 'Select the field type to change to', 'user-registration-aide' );?>\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\tforeach( $input as $key => $title ){\r\n\t\t\t\t\t\t\t\t\tif( $objects->data_type == $key ){\r\n\t\t\t\t\t\t\t\t\t\t$selected = \"selected=\\\"selected\\\"\";\r\n\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t$selected = null;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\techo \"<option value=\\\"$key\\\" $selected >$title</option>\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=\"fieldName\" colspan=\"3\">\r\n\t\t\t\t\t\t<p class=\"deleteFields\">\r\n\t\t\t\t\t\t<?php _e( 'No new fields currently exist, you have to add new fields on the main page before you can change the order!', 'user-registration-aide' ); ?>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t}?>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\"3\">\r\n\t\t\t\t\t<div class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"change_field_type\" value=\"<?php _e( 'Change Field Type', 'user-registration-aide' );?>\" /></div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t\t\t\r\n\t\t\t<?php\r\n\t\t}\r\n\t}", "public function setDataType(string $type) {\n if(array_key_exists($type, $this->dataTypes)) {\n $this->data['dataType'] = $this->dataTypes[$type];\n }\n return $this;\n }", "public function set_type( $type ) {\n\t\t$this->set_prop( 'type', sanitize_title( $type ) ) ;\n\t}", "protected abstract function get_rest_field_type();", "function add($data){\n if(array_key_exists($data['id'], $this->fields)){\n exit(\"Field with ID: '\".$data['id'].\"' already exists.\");\n }\n if(!isset($data['validate'])){\n $data['validate'] = false;\n }\n if(!isset($data['inline'])){\n $data['inline'] = null;\n }\n if(!isset($data['value'])){\n $data['value'] = null;\n }\n if(!isset($data['readonly'])){\n $data['readonly'] = false;\n }\n\n $this->fields[$data['id']] = $data;\n }", "public function addField();", "public function setDataType($var)\n {\n GPBUtil::checkString($var, True);\n $this->data_type = $var;\n\n return $this;\n }", "public function prepareDataType($inputData) {\n\t\t\t$data = array();\n\t\t\t$data['full:type'] = $inputData;\n\t\t\txmlTranslator::$showHiddenFieldGroups = true;\n\t\t\treturn $data;\n\t\t}", "public function addField(Field $field);", "public function addField(Field $field);", "protected function _attr_type(&$attributes)\n\t{\n\t\t// Reset field lenghts for data types that don't support it\n\t\tif (isset($attributes['CONSTRAINT']) && stripos($attributes['TYPE'], 'int') !== FALSE)\n\t\t{\n\t\t\t$attributes['CONSTRAINT'] = NULL;\n\t\t}\n\n\t\tswitch (strtoupper($attributes['TYPE']))\n\t\t{\n\t\t\tcase 'TINYINT':\n\t\t\t\t$attributes['TYPE'] = 'SMALLINT';\n\t\t\t\t$attributes['UNSIGNED'] = FALSE;\n\t\t\t\treturn;\n\t\t\tcase 'MEDIUMINT':\n\t\t\t\t$attributes['TYPE'] = 'INTEGER';\n\t\t\t\t$attributes['UNSIGNED'] = FALSE;\n\t\t\t\treturn;\n\t\t\tdefault: return;\n\t\t}\n\t}", "public function getDataType()\n {\n return $this->data_type;\n }", "public function setTypes($types){\n\t\tif(!is_array($types)) return;\n\t\t\n\t\tforeach($types as $field_name => $type){\n\t\t\tif(isset($this->Fields[$field_name])){\n\t\t\t\t$this->Fields[$field_name]->type = $type;\n\t\t\t}\n\t\t}\n\t}", "function ks_include_custom_acf_field_types() {\n include_once(get_template_directory() . '/includes/acf-custom/fields/acf-gf-select.php'); // add Gravity Form field type\n}", "function acf_get_grouped_field_types()\n{\n}", "public function getType() {\n return $this->field->type;\n }", "public function setDataType( $column, $type='string' )\n\t{\n\t\tif( is_array($column) )\n\t\t{\n\t\t\tforeach( $column as $_column )\n\t\t\t{\n\t\t\t\t$this->_dataTypes[ $_column ]\t= $type;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_dataTypes[ $column ]\t= $type;\n\t\t}\n\t}", "public function setType(string $type) : field {\r\n $this->type = $type;\r\n return $this;\r\n }", "public function addDataType($dataType, $ormDataType)\n {\n $this->dataTypeMapping[$dataType] = $ormDataType;\n return $this;\n }", "function acf_append_data($name, $data)\n{\n}", "public function setDataType(?string $value): void {\n $this->getBackingStore()->set('dataType', $value);\n }" ]
[ "0.6677286", "0.6548983", "0.65036374", "0.6428761", "0.6410023", "0.6391312", "0.62939584", "0.62787825", "0.62717515", "0.61973524", "0.6162065", "0.6051442", "0.5947942", "0.5921413", "0.58969367", "0.5882803", "0.581757", "0.5816522", "0.5789367", "0.5761108", "0.5751325", "0.574049", "0.5714168", "0.56985426", "0.56958264", "0.56911314", "0.56898224", "0.568912", "0.5685491", "0.56844455", "0.56787163", "0.56706005", "0.56533206", "0.5632774", "0.5621744", "0.56122565", "0.56096214", "0.5605703", "0.5602788", "0.55944943", "0.55776757", "0.55742234", "0.5557765", "0.5555503", "0.55511993", "0.55353224", "0.55168885", "0.5505598", "0.550527", "0.5496657", "0.54890233", "0.5488751", "0.54800516", "0.5469918", "0.5455338", "0.5453579", "0.5451442", "0.5439784", "0.5438914", "0.5432119", "0.54292095", "0.5423473", "0.5422549", "0.5408005", "0.54027617", "0.5399078", "0.53987396", "0.5396279", "0.5382092", "0.53724706", "0.5365604", "0.5364786", "0.5359148", "0.535821", "0.5354123", "0.5346256", "0.53421205", "0.5341064", "0.53407943", "0.5333336", "0.53312933", "0.5321047", "0.53201395", "0.5308031", "0.5307378", "0.5306489", "0.52936506", "0.5290679", "0.5290679", "0.5287754", "0.52814275", "0.5266047", "0.52508336", "0.5245561", "0.5245461", "0.5243303", "0.5240347", "0.52335674", "0.523331", "0.5228424" ]
0.7508322
0
Add HTML to file upload field.
public function add_file_upload_html( $field, $form_data ) { if ( empty( $field['type'] ) || 'file-upload' !== $field['type'] ) { return; } ?> <label class="wpforms-field-file-upload-label wpforms-conversational-btn" for="<?php echo \esc_attr( $field['properties']['inputs']['primary']['id'] ); ?>"> <?php esc_html_e( 'Choose File', 'wpforms-conversational-forms' ); ?> </label> <span class="wpforms-field-file-upload-file-name wpforms-conversational-form-btn-desc"> <?php esc_html_e( 'No file chosen', 'wpforms-conversational-forms' ); ?> </span> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderField()\n\t{\n\t\tif ($this->hasModel()) {\n\t\t\techo \\CHtml::activeFileField($this->model, $this->attribute, $this->options);\n\n\t\t} else {\n\t\t\techo \\CHtml::fileField($this->options['name'], $this->value, $this->options);\n\t\t}\n\t}", "public function renderUploadForm() {}", "function wp_custom_attachment() {\n\n\twp_nonce_field(plugin_basename(__FILE__), 'wp_custom_attachment_nonce');\n\t\n\t$html = '<p class=\"description\">';\n\t\t$html .= 'Upload your file here.';\n\t$html .= '</p>';\n\t$html .= '<input id=\"wp_custom_attachment\" name=\"wp_custom_attachment\" value=\"\" size=\"25\" type=\"file\">';\n\t\n\techo $html;\n\n}", "function _field_file($val) \n {\n $res = \"\";\n $size = $this->_get_field_size();\n $size -= 12; // compensate for Browse.. button\n\n if (isset($this->attribs['ws_path'])) {\n $path = $this->attribs['ws_path'];\n }\n\n\n $res .= sprintf(\"<input type=\\\"file\\\" name=\\\"%s\\\" id=\\\"%s\\\" size=\\\"%d\\\" maxlength=\\\"%d\\\" class=\\\"%s\\\" %s/>\\n\",\n $this->fname,\n $this->fname,\n $size,\n $this->attribs['maxlength'],\n (isset($this->attribs['class']))? $this->attribs['class'] : $this->element_class,\n $this->extra_attribs);\n\n if (isset($this->attribs['show_current']) and !empty($val)) {\n $res .= sprintf('<br /><span style=\"font-size: 9px\">current file: <a href=\"%s/%s\" target=\"flashWin\">%s</a></span>', $path, $val, $val);\n }\n\n return $res;\n }", "public function doRender(){\r\n\t\t$label = ($this->label != '') ? Label::get($this)->doRender() : '';\r\n\r\n\t\treturn\r\n\t\t\t '<div class=\"'.$this->printWrapperClasses().'\">'\r\n\t\t\t\t.$label\r\n\t\t\t\t.'<div class=\"'.parent::WIDGETCLASS.'\">'\r\n\t\t\t\t\t.'<input'\r\n\t\t\t\t\t\t.$this->printId()\r\n\t\t\t\t\t\t.$this->printName()\r\n\t\t\t\t\t\t.' type=\"file\"'\r\n\t\t\t\t\t\t.$this->printTitle()\r\n\t\t\t\t\t\t.$this->printAccept()\r\n\t\t\t\t\t\t.$this->printSize()\r\n\t\t\t\t\t\t.$this->printMaxLength()\r\n\t\t\t\t\t\t.$this->printCssClasses()\r\n\t\t\t\t\t\t.$this->printJavascriptEventHandler()\r\n\t\t\t\t\t\t.$this->printTabindex()\r\n\t\t\t\t\t\t.$this->printReadonly()\r\n\t\t\t\t\t\t.$this->printDisabled()\r\n\t\t\t\t\t\t.$this->masterForm->printSlash()\r\n\t\t\t\t\t.'>'\r\n\t\t\t\t.'</div>'\r\n\t\t\t\t.$this->masterForm->printFloatBreak()\r\n\t\t\t.'</div>'\r\n\t\t;\r\n\t}", "public function init(){\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this->_html .= '<input type=\"file\" ';\n\t\t\n\t\tif(isset($this->_options['id'])){\n\t\t\t$this->_html .= 'id=\"'.$this->_options['id'].'\" ';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['class'])){\n\t\t\t$this->_html .= 'class=\"'.$this->_options['class'].'\" ';\n\t\t}\n\t\t\n\t\tif(isset($this->_options['name'])){\n\t\t\t$this->_html .= 'name=\"'.$this->_options['name'].'\" ';\n\t\t}\n \n if(isset($this->_options['placeholder'])){\n\t\t\t$this->_html .= 'placeholder=\"'.$this->_options['placeholder'].'\" ';\n\t\t}\n\t\t\n\t\t$this->_html .= ' />';\n\t\tif(isset($this->_options['max']) && $this->_options['max'] == true){\n if(isset($this->_options['max_value'])){\n $this->_html .= '<input type=\"hidden\" name=\"MAX\" value=\"'.$this->_options['max_value'].'\" />';\n }else{\n $this->_html .= '<input type=\"hidden\" name=\"MAX\" value=\"10240\" />';\n }\n }else{\n $this->_html .= '<input type=\"hidden\" name=\"MAX\" value=\"10240\" />';\n }\n \n if(isset($this->_options['action'])){\n $this->_html .= '<input type=\"hidden\" name=\"action\" value=\"'.$this->_options['action'].'\" />';\n }else{\n $this->_html .= '<input type=\"hidden\" name=\"action\" value=\"wp_handle_upload\" />';\n }\n\t}", "public function append_media_upload_form() {\n \n ?>\n <!-- Add from Media Library -->\n <a href=\"#\" class=\"envira-media-library button\" title=\"<?php _e( 'Click Here to Insert from Other Image Sources', 'envira-gallery' ); ?>\" style=\"vertical-align: baseline;\">\n <?php _e( 'Select Files from Other Sources', 'envira-gallery' ); ?>\n </a>\n\n <!-- Progress Bar -->\n <div class=\"envira-progress-bar\">\n <div class=\"envira-progress-bar-inner\"></div>\n <div class=\"envira-progress-bar-status\">\n <span class=\"uploading\">\n <?php _e( 'Uploading Image', 'envira-gallery' ); ?>\n <span class=\"current\">1</span>\n <?php _e( 'of', 'envira-gallery' ); ?>\n <span class=\"total\">3</span>\n </span>\n\n <span class=\"done\"><?php _e( 'All images uploaded.', 'envira-gallery' ); ?></span>\n </div>\n </div>\n <?php\n\n }", "public function fileFieldBlock($model, $attribute, $htmlOptions = array())\r\n\t{\r\n\t\treturn $this->inputBlock('filefield', $model, $attribute, null, $htmlOptions);\r\n\t}", "function render() {\n switch($this->getAttribute('plugin')) {\n case 'drop':\n default:\n $rendered = '<input type=\"hidden\" name=\"tmp_upload_dir\" value=\"[ATTRIBUTE|name=tmp_files_dir]\" />' . '<div class=\"upload-files\"><div class=\"drop\">Drop here files<a>or press here</a><input type=\"file\" name=\"' . $this->getName() . '\" id=\"' . $this->getId() . '\" multiple /></div></div>';\n break;\n }\n return $rendered;\n }", "public static function file_field_tag($name, $html_attributes = array())\n {\n return self::text_field_tag($name, null, array_merge(array('type' => 'file'), $html_attributes));\n }", "protected function renderFileInput()\n {\n $options = $this->fileInputOptions;\n if (!isset($options['name'])) {\n $options['name'] = 'file';\n }\n if (!isset($options['value'])) {\n $options['value'] = false;\n }\n\n $accept = $this->_context()->inputAccept;\n if ($accept !== null && !isset($options['accept'])) {\n $options['accept'] = is_array($accept) ? implode(',', $accept) : $accept;\n }\n\n return Html::activeInput('file', $this->model, $this->attribute, $options);\n }", "protected function getFileFieldSettings() { ?>\n\t\t<div class=\"form-group\" v-if=\"['job_logo', 'job_cover', 'job_gallery'].indexOf(field.slug) <= -1\">\n\t\t\t<label>Allowed file types</label>\n\t\t\t<select multiple=\"multiple\" v-model=\"field.allowed_mime_types_arr\" @change=\"editFieldMimeTypes($event, field)\">\n\t\t\t\t<?php foreach ( (array) get_allowed_mime_types() as $extension => $mime ): ?>\n\t\t\t\t\t<option value=\"<?php echo \"{$extension} => {$mime}\" ?>\"><?php echo $mime ?></option>\n\t\t\t\t<?php endforeach ?>\n\t\t\t</select>\n\t\t\t<br><br>\n\t\t\t<label><input type=\"checkbox\" v-model=\"field.multiple\" class=\"form-checkbox\"> Allow multiple files?</label>\n\t\t</div>\n\t\t<div class=\"form-group\" v-show=\"field.multiple\">\n\t\t\t<label>Maximum number of uploads allowed</label>\n\t\t\t<input type=\"number\" v-model=\"field.file_limit\" style=\"width: 100px; margin: 0;\">\n\t\t</div>\n\t<?php }", "protected function printUploadInput()\n {\n $accepts = \"\";\n\n if (sizeof($this->filters) > 0) {\n $accepts = \" accept=\\\"\" . implode(\",\", $this->filters) . \"\\\"\";\n }\n\n ?>\n <input type=\"file\" name=\"<?= $this->getIndexedPresenterPath(); ?>\" id=\"<?= $this->getIndexedPresenterPath(); ?>\"\n presenter-name=\"<?= $this->presenterName ?>\"<?= $accepts . $this->getHtmlAttributeTags() . $this->getClassTag() ?>/>\n <?php\n }", "public function render($content){\n\n\n\t\t$attributes = array(\n\t\t\t\t'name' => 'Upload['.$this->getElement()->getName(false).']',\n\t\t\t\t'value' => 'Select a file',\n\t\t\t\t'type' => $this->getElement()->getType(),\n\t\t\t\t'data-url' => $this->getUploadUrl(),\n\t\t\t\t'multiple' => 'multiple'\n\t\t\t);\n\n\t\t$uploadsHtml = $this->renderUploads();\n\n\t\t$attributes = array_merge($attributes,$this->_element->getAttributes());\n\n\t\t$html = '<div class=\"input file\">';\n\t\t$html = $this->getForm()->getDecorator('error',$this->_element)->render($html);\n\t\t$html .= '<input '.\\Smally\\Util::toAttributes($attributes).'/> <span class=\"html5-browser\">'.__('FORM_DECORATOR_FILE_HELPER').'</span>';\n\t\t$html .= '<hr />';\n\t\t$html .= $this->getElement()->getItemTemplate();\n\t\t$html .= $uploadsHtml;\n\t\t$html = $this->getForm()->getDecorator('help',$this->_element)->render($html);\n\t\t$html .= '<hr />';\n\t\t$html .= '</div>';\n\n\t\treturn $this->concat($html,$content);\n\t}", "function print_upload_field($id, $options = array()) {\n\t$id_esc = htmlentities($id);\n\t$classes_html = build_class_attribute($options['required'], $options['class']);\n\t\n\t$element_html = <<<EOD\n<input type=\"file\" name=\"$id_esc\" id=\"$id_esc\" $classes_html />\nEOD;\n\n\tprint_field($id, $element_html, $options);\n}", "function khLess_field_pill_cb($args)\n{\n $options = get_option('khLess_options');\n // output the field\n ?>\n <input type=\"file\" name=\"file\">\n\n <input type=\"submit\" name=\"open_file\" value=\"Загрузить расписание\"/>\n\n\n <?php\n}", "public function display() {\r\n self::createUploaderScript();\r\n\r\n $this->echoOptionHeader();\r\n\r\n // Display the preview file name.\r\n $value = $this->getValue();\r\n if ( ! is_array( $value ) ) {\r\n $value = $this->getValue();\r\n }\r\n\r\n $previewFile = '';\r\n if ( ! empty( $value ) ) {\r\n $previewFile = \"<i class='dashicons dashicons-no-alt remove'></i><p>\". basename( get_attached_file( $value ) ) . \"</p>\";\r\n } else {\r\n $previewFile = $this->settings['label'];\r\n }\r\n echo \"<div class='tf-file-upload'>\" . $previewFile . '</div>';\r\n\r\n printf('<input name=\"%s\" placeholder=\"%s\" id=\"%s\" type=\"hidden\" value=\"%s\" />',\r\n $this->getID(),\r\n $this->settings['placeholder'],\r\n $this->getID(),\r\n esc_attr( $this->getValue() )\r\n );\r\n $this->echoOptionFooter();\r\n }", "public function file($fieldName, $options = array())\n {\n $btnOptions = $this->_extractOption('button', $options, array());\n if(isset($options['button'])) {\n unset($options['button']);\n }\n\n $btnText = $this->_extractOption('text', $btnOptions, 'FILE');\n if(isset($btnOptions['text'])) {\n unset($btnOptions['text']);\n }\n\n // TODO: pro\n $out = '<div class=\"file-field input-field\">';\n $out .= '<input class=\"file-path validate\" type=\"text\" />';\n $out .= '<div class=\"btn\">';\n $out .= $this->Html->tag('span', $btnText, $btnOptions);\n $out .= parent::file($fieldName, $options);\n $out .= '</div>';\n $out .= '</div>';\n return $out;\n }", "public function render()\n {\n return view('components.admin.file-input');\n }", "public function requires_file_upload_message() {\n\n\t\t// Generate form editor URL.\n\t\t$url = add_query_arg( array( 'view' => null, 'subview' => null ) );\n\n\t\treturn sprintf(\n\t\t\tesc_html__( \"You must add a File Upload field to your form before creating a feed. Let's go %sadd one%s!\", 'gravityformsdropbox' ),\n\t\t\t'<a href=\"' . esc_url( $url ) . '\">', '</a>'\n\t\t);\n\n\t}", "function phptemplate_filefield_file($file) {\n if (empty($file['fid'])) {\n return '';\n }\n\n $path = $file['filepath'];\n $url = file_create_url($path);\n $icon = theme('filefield_icon', $file);\n\n // Set options as per anchor format described at\n $options = array(\n 'attributes' => array(\n 'type' => $file['filemime'] . '; length=' . $file['filesize'],\n ),\n );\n\n // Use the description as the link text if available.\n if (empty($file['data']['description'])) {\n $link_text = $file['filename'];\n }\n else {\n $link_text = $file['data']['description'];\n $options['attributes']['title'] = $file['filename'];\n }\n\n //open files of particular mime types in new window\n $new_window_mimetypes = array(\n 'application/pdf',\n 'text/plain'\n );\n if (in_array($file['filemime'], $new_window_mimetypes)) {\n $options['attributes']['target'] = '_blank';\n }\n\n return '<div class=\"filefield-file clear-block\">'. $icon . l($link_text, $url, $options) .'</div>';\n}", "function shortcode_field() {\n\n\t\t$shortcode = '[file id=\"' . get_the_ID() . '\" ]';\n\n\t\t?>\n\t\t<div class=\"misc-pub-section\">\n\t\t\t<label for=\"attachment_url\"><?php _e( 'File Shortcode:' ); ?></label>\n\t\t\t<input type=\"text\" class=\"widefat urlfield\" readonly=\"readonly\" name=\"attachment_url\" value=\"<?php echo esc_attr($shortcode); ?>\" />\n\t\t</div>\n\t\t<?php\n\t}", "public function printForm() {\n\t\t$html = $this->printPre().'<input type=\"file\" id=\"'.$this->name().'\" name=\"'.$this->name().'\" />'.$this->printPost().$this->printDescription();\n\n\t\tif ($this->allowMultiple) {\n\t\t\t$html .= $this->print_js();\n\t\t}\n\t\treturn $html;\n\t}", "static function renderFileField($name, $label = null, $attributes = null)\n {\n echo '<li>';\n \n if ($label) echo '<label>'.textH8($label).'</label>';\n \n if (!is_array($attributes)) $attributes = array();\n $attributes['type'] = 'file';\n $attributes['name'] = $name;\n \n self::renderSingleTag('input', $attributes);\n \n echo '</li>';\n }", "public function render()\n {\n $output = '';\n $resource = $this->getUploadedResource();\n if ($resource !== null) {\n $resourcePointerIdAttribute = '';\n if ($this->hasArgument('id')) {\n $resourcePointerIdAttribute = ' id=\"' . htmlspecialchars($this->arguments['id']) . '-file-reference\"';\n }\n $resourcePointerValue = $resource->getUid();\n if ($resourcePointerValue === null) {\n // Newly created file reference which is not persisted yet.\n // Use the file UID instead, but prefix it with \"file:\" to communicate this to the type converter\n $resourcePointerValue = 'file:' . $resource->getOriginalResource()->getOriginalFile()->getUid();\n }\n $output .= '<input type=\"hidden\" name=\"' . $this->getName() . '[submittedFile][resourcePointer]\" value=\"' . htmlspecialchars($this->hashService->appendHmac((string)$resourcePointerValue)) . '\"' . $resourcePointerIdAttribute . ' />';\n $this->templateVariableContainer->add('resource', $resource);\n $output .= $this->renderChildren();\n $this->templateVariableContainer->remove('resource');\n }\n $output .= parent::render();\n return $output;\n }", "private function build_file_field($_meta, $_ptype = \"wccpf\", $_class = \"\", $_index, $_show_value = \"no\", $_readonly = \"\", $_cloneable = \"\", $_wrapper = true, $_is_pricing_rule = \"no\") {\r\n /*\r\n * Show as value option not available for FILE field\r\n * since file field not supported for Admin Field */\r\n \r\n $_index .= (isset($_meta[\"multi_file\"]) && $_meta[\"multi_file\"] == \"yes\") ? \"[]\" : \"\";\r\n $accept = (isset($_meta[\"filetypes\"]) && ! empty($_meta[\"filetypes\"])) ? ('accept=\"' . esc_attr(trim($_meta[\"filetypes\"])) . '\"') : '';\r\n $multifile = (isset($_meta[\"multi_file\"]) && $_meta[\"multi_file\"] == \"yes\") ? 'multiple=\"multiple\"' : '';\r\n $maxsize = (isset($_meta[\"max_file_size\"]) && ! empty($_meta[\"max_file_size\"])) ? ('max-size=\"' . esc_attr(trim($_meta[\"max_file_size\"])) . '\"') : '';\r\n $preview = (isset($_meta[\"img_is_prev\"]) && $_meta[\"img_is_prev\"] == \"yes\") ? \"yes\" : \"no\";\r\n $preview_width = (isset($_meta[\"img_is_prev_width\"]) && $_meta[\"img_is_prev_width\"] != \"\") ? $_meta[\"img_is_prev_width\"] : \"65px\";\r\n $has_field_rules = isset( $_meta[\"field_rules\"] ) && is_array( $_meta[\"field_rules\"] ) && count( $_meta[\"field_rules\"] ) != 0 ? \"yes\" : \"no\";\r\n /* Construct the field */\r\n $html = '<input type=\"file\" data-has_field_rules=\"'.$has_field_rules.'\" data-has_pricing_rules=\"'.$_is_pricing_rule.'\" ' . $maxsize . ' data-fkey=\"'. $_meta[\"key\"] .'\" class=\"' . $_ptype . '-field ' . $_class . '\" name=\"' . esc_attr($_meta[\"key\"] . $_index) . '\" ' . $accept . ' ' . $multifile . ' data-field-type=\"'. $_meta[\"type\"] .'\" ' . $_ptype . '-pattern=\"mandatory\" ' . $_ptype . '-mandatory=\"' . $_meta[\"required\"] . '\" ' . $_cloneable . ' ' . $_readonly . ' data-preview=\"'. $preview .'\" data-preview-width=\"'. $preview_width .'\" />';\r\n /* Add wrapper around the field, based on the user options */\r\n if ($_wrapper) {\r\n $html = $this->built_field_wrapper($html, $_meta, $_ptype, $_index);\r\n }\r\n return $html;\r\n }", "function print_upload($value){\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title;\n\t\t$input_value = $this->get_field_value($value['id']);\n\t\techo '<input class=\"option-input upload hana-upload\" name=\"'.$value['id'].'\" id=\"'.$value['id'].'\" type=\"text\" value=\"'.$input_value.'\" />';\n\t\techo '<div id=\"'.$value['id'].'_button\" class=\"upload-button upload-logo hana-upload-btn\" ><a class=\"hana-button alignright\"><span>Upload</span></a></div><br/>';\n\t\t\n\t\t$this->close_option($value);\n\t}", "function file_field($object, $field, $options = array()) {\n $form = new FormHelper($object, $field);\n return $form->to_input_field_tag(\"file\", $options);\n}", "public function renderEndActiveFileInput()\n {\n return Html::endTag(isset($this->options['tag']) ? $this->options['tag'] : 'div');\n }", "function\nwidget_upload ($name, $upload_path, $max_file_size, $mime_type, $submit_button_html, $uploaded_html)\n{\n $debug = 0;\n $p = '';\n\n if (!$_FILES)\n return '<form action=\"'\n .$_SERVER['PHP_SELF']\n .'\" method=\"POST\" enctype=\"multipart/form-data\"'\n// .' style=\"margin:0;\"'\n .' style=\"display:inline;\"'\n .'>'\n .'<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"'\n .$max_file_size\n .'\">'\n .'<input type=\"file\"'\n .' name=\"'.$name.'\"'\n// .' title=\"'\n// .$tooltip\n// .'\"'\n .($max_file_size ? ' maxlength=\"'.$max_file_size.'\"' : '')\n .($mime_type ? ' accept=\"'.$mime_type.'\"' : '')\n .'>'\n .($submit_button_html ? $submit_button_html :\n '<input type=\"submit\" name=\"'.$name.'\" value=\"Upload\"'\n// .' tooltip=\"'\n// .$tooltip\n// .'\"'\n)\n .'>'\n .'</form>'\n;\n\n if ($debug)\n {\n $p .= '<pre><tt>'\n .sprint_r ($_FILES);\n }\n\n $d = $upload_path.'/'\n// .str_replace (' ', '_', basename($_FILES[''.$name.'']['name']));\n .basename($_FILES[''.$name.'']['name']);\n\n if (file_exists ($d))\n $p .= 'ERROR: file already exists';\n else if (move_uploaded_file ($_FILES[''.$name.'']['tmp_name'], $d) == FALSE)\n $p .= 'ERROR: move_uploaded_file() failed';\n\n $s = Array (\n UPLOAD_ERR_OK => 'OK',\n UPLOAD_ERR_INI_SIZE => 'The uploaded file exceeds the upload_max_filesize directive ('\n .ini_get ('upload_max_filesize')\n .') in php.ini',\n UPLOAD_ERR_FORM_SIZE => 'The uploaded file exceeds the MAX_FILE_SIZE directive ('\n .$max_file_size\n .') that was specified in the HTML form',\n UPLOAD_ERR_PARTIAL => 'The uploaded file was only partially uploaded',\n UPLOAD_ERR_NO_FILE => 'No file was uploaded',\n UPLOAD_ERR_NO_TMP_DIR => 'Missing a temporary folder',\n// UPLOAD_ERR_CANT_WRITE => 'Failed to write file to disk',\n// UPLOAD_ERR_EXTENSION => 'File upload stopped by extension'\n );\n\n if (!empty ($_FILES[''.$name.'']) &&\n $_FILES[''.$name.'']['error'] == UPLOAD_ERR_OK)\n {\n $p .= $uploaded_html;\n }\n else\n {\n $e = $s[$_FILES[''.$name.'']['error']];\n if (!$e)\n $e .= 'An unknown error occured';\n $p .= 'ERROR: '.$e;\n }\n\n if ($debug)\n {\n $p .= '<pre><tt>'\n .sprint_r ($s)\n .sprint_r ($_FILES);\n }\n\n return $p;\n}", "function _webform_submission_display_file($data, $component, $enabled = FALSE) {\r\n $filedata = unserialize($data['value'][0]);\r\n $form_item = _webform_render_file($component);\r\n if (!$enabled) {\r\n $form_item['#type'] = 'textfield';\r\n $form_item['#tree'] = TRUE;\r\n $form_item['#attributes']['readonly'] = 'readonly';\r\n $form_item['#default_value'] = empty($filedata['filepath']) ? $filedata['error'] : $filedata['filepath'];\r\n }\r\n if (!empty($filedata['filename'])) {\r\n $form_item['#suffix'] = ' <a href=\"'. webform_file_url($filedata['filepath']) .'\">Download '. webform_file_name($filedata['filepath']) .'</a>'. $form_item['#suffix'];\r\n if ($enabled) {\r\n $form_item['#description'] = t('Uploading a new file will replace the current file.');\r\n $form_item['existing'] = array(\r\n '#type' => 'value',\r\n '#value' => $filedata,\r\n );\r\n }\r\n }\r\n return $form_item;\r\n}", "public function renderFileActiveFileInput($file)\n {\n $content = '';\n\n $inputID = Html::getInputId($this->model, $this->attribute);\n\n $liOptions = [\n 'id' => 'preview-block-' . $inputID . '-file-'.$file->id,\n 'class' => 'file-view-file ' . str_replace('/', '-', $file->kind) . ' ' . $file->extension,\n ];\n $content .= Html::beginTag('li', $liOptions);\n\n $linkOptions = [\n 'class' => 'preview-block-file-link',\n ];\n if (!in_array($file->kind, ['image/jpeg','image/png'])) {\n $content .= Html::a($file->name . ' (' . $file->sizeInfo . ')', ['/file/file/view', 'id'=>$file->id], $linkOptions);\n } else {\n $imageOptions = [\n 'class' => 'preview-block-file-image ' . str_replace('/', '-', $file->kind) . ' ' . $file->extension,\n 'width' => '100',\n 'height' => '100',\n 'alt' => $this->model->getAttributeLabel($this->attribute),\n ];\n\n if (isset($this->previewOptions['imageWidth']) && $this->previewOptions['imageWidth'] != '') {\n $imageOptions['width'] = intval($this->previewOptions['imageWidth']);\n }\n\n if (isset($this->previewOptions['imageHeight']) && $this->previewOptions['imageHeight'] != '') {\n $imageOptions['height'] = intval($this->previewOptions['imageHeight']);\n }\n\n if (isset($this->previewOptions['imageAlt']) && $this->previewOptions['imageAlt'] != '') {\n $imageOptions['alt'] = $this->previewOptions['imageAlt'];\n }\n\n $content .= Html::a(Html::img($file->path, $imageOptions), ['/file/file/view', 'id'=>$file->id], $linkOptions);\n }\n\n $buttonLabel = '<span class=\"glyphicon glyphicon-trash\"></span>';\n\n if (isset($this->previewOptions['buttonLabel']) && $this->previewOptions['buttonLabel'] != '') {\n $buttonLabel = $this->previewOptions['buttonLabel'];\n }\n\n $buttonOptions = [\n 'id' => 'preview-block-' . $inputID . '-button-' . $file->id,\n 'class' => 'btn btn-xs btn-danger preview-block-' . $inputID . '-button',\n 'value' => Url::toRoute(['/file/file/delete', 'id' => $file->id]),\n 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),\n 'data-file-id' => $file->id,\n ];\n\n if (isset($this->previewOptions['buttonClass']) && $this->previewOptions['buttonClass'] != '') {\n $buttonOptions['class'] = $this->previewOptions['buttonClass'];\n }\n\n if (isset($this->previewOptions['buttonConfirm']) && $this->previewOptions['buttonConfirm'] != '') {\n $buttonOptions['confirm'] = $this->previewOptions['buttonConfirm'];\n }\n\n $content .= Html::button($buttonLabel, $buttonOptions);\n\n $content .= Html::endTag('li');\n\n return $content;\n }", "function ffw_port_upload_callback( $args ) {\n global $ffw_port_settings;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) )\n $value = $ffw_port_settings[$args['id']];\n else\n $value = isset($args['std']) ? $args['std'] : '';\n\n $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';\n $html = '<input type=\"text\" class=\"' . $size . '-text ffw_port_upload_field\" id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" value=\"' . esc_attr( stripslashes( $value ) ) . '\"/>';\n $html .= '<span>&nbsp;<input type=\"button\" class=\"ffw_port_settings_upload_button button-secondary\" value=\"' . __( 'Upload File', 'ffw_port' ) . '\"/></span>';\n $html .= '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['desc'] . '</label>';\n\n echo $html;\n}", "function kiwip_post_edit_form_tag(){\n\t\techo ' enctype=\"multipart/form-data\"';\n\t}", "public function callback_file( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n $args['disable'] = (isset( $args['parent']['disable'])) ? $args['parent']['disable'] : false;\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n\n $disable = (isset( $args['disable'] ) && $args['disable'] === true) ? 'disabled' : '';\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';\n $id = $args['section'] . '[' . $args['id'] . ']';\n $label = isset( $args['options']['button_label'] ) ? $args['options']['button_label'] : __( 'Choose File' );\n $mime_type = isset( $args['options']['mime'] ) ? $args['options']['mime'] : 'image';\n\n $html = '<fieldset>';\n $html .= sprintf( '<input type=\"text\" class=\"%1$s-text wpsa-url\" id=\"%2$s\" name=\"%2$s\" value=\"%3$s\" %4$s/>', $size, $name_id, $value, $disable );\n $html .= '<input type=\"button\" class=\"button wpsa-browse\" value=\"' . $label . '\" ' . $disable . '/>';\n $html .= '<input type=\"hidden\" class=\"wpsa-mime\" value=\"' . $mime_type . '\" />';\n $html .= $this->get_field_description( $args );\n $html .= '</fieldset>';\n\n echo $html;\n }", "public function renderBeginActiveFileInput()\n {\n $inputID = Html::getInputId($this->model, $this->attribute);\n $attribute = Html::getAttributeName($this->attribute);\n $options = $this->options;\n $class = isset($options['class']) ? [$options['class']] : [];\n $class[] = \"field-$inputID\";\n if ($this->model->isAttributeRequired($attribute)) {\n $class[] = $this->form->requiredCssClass;\n }\n if ($this->model->hasErrors($attribute)) {\n $class[] = $this->form->errorCssClass;\n }\n $options['class'] = implode(' ', $class);\n $tag = ArrayHelper::remove($options, 'tag', 'div');\n\n return Html::beginTag($tag, $options);\n }", "public function inputfile($name, $display, $classlabel=\"control-label\", $classselect=\"\"){\n return $this->surround('\n <label for=\"'.$name.'\" class='.$classlabel.'>'.$display.'</label>\n <input id=\"'.$name.'\" type=\"file\" name=\"'.$name.'\" class=\"file \"'.$classselect.'>');\n }", "function attachment($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\techo \"<div><input class='attachment' id='\" . $args['id'] . \"' style='\" .$this->width($args['width']) . \"' type='text' size='57' \" . $this->placeholder($args['placeholder'] ) . \" name='\" . $args['formname'] . \"' value='\" . $args['value']. \"' />\";\r\n\t\t\techo \"<input class='attachment_upload button-secondary' id='$formname _button' type='button' value='Upload'/>\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// show a preview\r\n\t\t\t$this->attachment_preview($args['value']);\r\n\t\t\t$this->description($args['description']);\r\n\t\t\t\r\n\t\t }", "function acf_file_input($attrs = array())\n{\n}", "function form_file($name = '') {\n\n\tif ($name == 'attachment') {\n\t\tunset($name);\n\t\t$name = \"\";\n\t}\n\n\t$value = html_form_escape($value, $override);\n\n\t$name = 'attachment' . $name;\n\treturn \"<input type=\\\"file\\\" name=\\\"$name\\\" />\";\n\n}", "public function render()\n {\n return view('components.file-input');\n }", "function zen_draw_file_field($name, $required = false) {\n $field = zen_draw_input_field($name, '', ' size=\"50\" ', 'file');\n\n return $field;\n }", "public function render()\n {\n return view('components.form.file');\n }", "public function ajaxFile()\n\t{\n\t\t$type = $_POST['type'];\n\t\t$id = $_POST['id'];\n\t\t$file_src = wp_get_attachment_url( $id );\n\t\t$have_file = !empty( $file_src );\n\t\tswitch ( $type ) {\n\t\t\tcase 'image':\n\t\t\t\t?>\n\t\t\t\t<img src=\"<?php echo esc_url( $file_src ); ?>\" alt=\"\" />\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\n\t\t\tcase 'audio':\n\t\t\t\techo wp_audio_shortcode( array(\n\t\t\t\t\t'src' => $file_src\n\t\t\t\t) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'video':\n\t\t\t\techo wp_video_shortcode( array(\n\t\t\t\t\t'src' => $file_src\n\t\t\t\t) );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$filename = basename( get_attached_file( $id ) );\n\t\t\t\t?>\n\t\t\t\t<span class=\"dashicons dashicons-media-default\"></span>\n\t\t\t\t<span class=\"file-name\"><?php echo wp_kses_post( $filename ); ?></span>\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\t\t}\n\t\twp_die();\n\t}", "protected function createUploadButton(){\n if(!isset($this->uploadButtonOptions['onclick']))\n $this->uploadButtonOptions['onclick']=\"javascript:$('#{$this->inputId}').uploadifyUpload()\";\n if(!isset($this->uploadButtonOptions['href']))\n $this->uploadButtonOptions['href']='#';\n return CHtml::tag(\n $this->uploadButtonTagname,\n $this->uploadButtonOptions,\n $this->uploadButtonText\n );\n }", "static public function configureFileField() {}", "function _webform_help_file($section) {\r\n switch ($section) {\r\n case 'admin/settings/webform#file_description':\r\n return t('Allow users to submit files of the configured types.');\r\n }\r\n}", "function media_upload_html_bypass()\n {\n }", "public function pre_days_file_callback()\n {\n printf(\n \t\t'<input id=\"pre_days_file\" type=\"text\" size=\"36\" name=\"program_manager_option[pre_days_file]\" value=\"%s\" /> \n \t\t<input id=\"pre_upload_file_button\" class=\"button\" type=\"button\" value=\"Upload/Select PRE File\" />',\n\t isset( $this->options['pre_days_file'] ) ? esc_attr( $this->options['pre_days_file']) : ''\n );\n }", "function options_html($key, $field)\n\t{\n\t\t// vars\n\t\t$options = $field->options;\n\t\t$options['save_format'] = isset($options['save_format']) ? $options['save_format'] : 'url';\n\t\t\n\t\t?>\n\t\t<tr class=\"field_option field_option_file\">\n\t\t\t<td class=\"label\">\n\t\t\t\t<label><?php _e(\"Return Value\",'acf'); ?></label>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php \n\t\t\t\t\t$temp_field = new stdClass();\t\n\t\t\t\t\t$temp_field->type = 'select';\n\t\t\t\t\t$temp_field->input_name = 'acf[fields]['.$key.'][options][save_format]';\n\t\t\t\t\t$temp_field->input_class = '';\n\t\t\t\t\t$temp_field->value = $options['save_format'];\n\t\t\t\t\t$temp_field->options = array('choices' => array(\n\t\t\t\t\t\t'url'\t=>\t'File URL',\n\t\t\t\t\t\t'id'\t=>\t'Attachment ID'\n\t\t\t\t\t));\n\t\t\t\t\t$this->parent->create_field($temp_field);\n\t\t\t\t?>\n\t\t\t</td>\n\t\t</tr>\n\n\t\t<?php\n\t}", "public function uploadFileForm()\n {\n return view('admin.file.uploadFile');\n }", "public function content_for_upload();", "public function renderFile( $label, $key, $attributes = array() )\n {\n echo \"<div class=\\\"form-field\\\">\\n\";\n $this->renderLabel( $label, $key );\n $this->renderInput( 'file', $key, null, $attributes );\n $this->renderError( $key );\n echo \"</div>\\n\";\n }", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "public function renderPreviewActiveFileInput()\n {\n $content = '';\n\n $inputID = Html::getInputId($this->model, $this->attribute);\n $attribute = Html::getAttributeName($this->attribute);\n\n if (!isset($this->previewOptions['id'])) {\n $this->previewOptions['id'] = 'preview-block-' . $inputID;\n }\n\n $content .= Html::beginTag('ul', $this->previewOptions);\n\n if (isset($this->inputOptions['multiple']) && $this->inputOptions['multiple'] === true) {\n $files = File::find()->where([\n 'deleted' => 0,\n 'model' => get_class($this->model),\n 'property' => $this->attribute,\n 'pk' => $this->model->primaryKey,\n ])->all();\n\n if (count($files) > 0) {\n foreach($files as $file) {\n $content .= $this->renderFileActiveFileInput($file);\n }\n }\n } else {\n $file = File::find()->where([\n 'deleted' => 0,\n 'model' => get_class($this->model),\n 'property' => $this->attribute,\n 'pk' => $this->model->primaryKey,\n ])->one();\n\n if (NULL !== $file) {\n $content .= $this->renderFileActiveFileInput($file);\n }\n }\n\n\n $content .= Html::endTag('div');\n\n return $content;\n }", "public function GetControlHtml() {\n\t\t\t// Pull any Attributes\n\t\t\t$strAttributes = $this->GetAttributes();\n\n\t\t\t// Pull any styles\n\t\t\tif ($strStyle = $this->GetStyleAttributes())\n\t\t\t\t$strStyle = 'style=\"' . $strStyle . '\"';\n\n\t\t\t// Return the HTML\n\t\t\t$strHtml = null;\n\t\t\tif (!$this->strTempFilePath) {\n\t\t\t\t$strHtml .= sprintf('<input type=\"button\" class=\"button\" id=\"%s_button\" value=\"Browse...\"/>', $this->strControlId);\n\n\t\t\t\t$strHtml .= sprintf('<div class=\"progress\" id=\"%s_progress\" style=\"display: none;\">', $this->strControlId);\n\t\t\t\t$strHtml .= sprintf('<div class=\"size\" id=\"%s_size\">n/a</div>', $this->strControlId);\n\n\t\t\t\t$strHtml .= '<div class=\"bar\">';\n\t\t\t\t$strHtml .= sprintf('<div class=\"status\" id=\"%s_status\">Uploading...</div>', $this->strControlId);\n\t\t\t\t$strHtml .= sprintf('<div class=\"fill\" id=\"%s_fill\"></div>', $this->strControlId);\n\t\t\t\t$strHtml .= '</div>';\n\n\t\t\t\t$strHtml .= '<div class=\"cancel\"><a href=\"#\">Cancel</a></div>';\n\t\t\t\t$strHtml .= '</div>';\n\t\t\t} else {\n\t\t\t\t$strHtml .= sprintf('<strong>%s</strong> (%s) &nbsp; <a href=\"#\">Remove</a></div>', $this->strFileName, QString::GetByteSize($this->strFileSize));\n\t\t\t}\n\n\t\t\treturn sprintf('<div id=\"%s\" %s%s>%s</div>', $this->strControlId, $strAttributes, $strStyle, $strHtml);\n\t\t}", "public function ieditor_upload () {\n\t\t\tif (!empty($_FILES)) {\n\t\t\t\t$oUploadedFile = umiImageFile::upload('eip-ieditor-upload-fileinput', 0, CURRENT_WORKING_DIR . '/images/cms/data');\n\t\t\t\t// Переопределение стандартного вывода, чтобы выводилась просто строка с путем к файлу в plain text, без json.\n\t\t\t\t// Это нужно для обхода особенностей работы IE, который при выводе в hidden iframe валидного JSON предлагает его сохранить как файл.\n\t\t\t\t$buffer = new HTTPOutputBuffer();\n\t\t\t\t$buffer->push($oUploadedFile->getFilePath(true));\n\t\t\t\t$buffer->send();\n\t\t\t\texit();\n\t\t\t}\n\t\t}", "function upload_form ($folder_id) {\n\t\t$txt_file = __ ( 'File' ) ;\n\t\t$txt_desc = __ ( 'The file that should be uploaded' ) ;\n\t\t$txt_save = __ ( \"Upload\" ) ;\n\t\t$action\t= admin::get_callback(array('files', 'admin_files'), array(\n\t\t\t'folder' => $folder_id,\n\t\t\t'mode' => 'save'\n\t\t));\n\t\t$content = <<<CONTENT\n\t\t <form enctype=\"multipart/form-data\" action=\"$action\" class=\"upload\" method=\"post\">\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td width=\"70%\">\n\t\t\t\t\t\t<strong>$txt_file</strong><br />\n\t\t\t\t\t\t$txt_desc\n\t\t\t\t\t</td>\n\t\t\t\t\t\n\t\t\t\t\t<td width=\"30%\">\n\t\t\t\t\t\t<input name=\"file\" id=\"file\" type=\"file\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"2\">\n\t\t\t\t\t\t<input type=\"submit\" value=\"$txt_save\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</form>\nCONTENT;\n\t\techo $content ;\n\t\treturn ;\n\t}", "private function renderUploadLink()\n {\n \n return ($this->isLoggedIn()) ? \"<a href='?admin'>Upload content</a>\" :\"\";\n \n }", "protected function getInput()\n { \n $file = $this->get(\"file\", false);\n $text = $this->get(\"text\", false);\n $label = $this->get(\"label\", false);\n\n if (!$label)\n {\n $html[] = '</div><div class=\"freetext '.$this->get(\"class\").'\">';\n }\n\n if ($file)\n {\n $html[] = $this->renderContent($this->get(\"file\"), $this->get(\"path\"), $this); \n }\n\n if ($text)\n {\n $html[] = $this->prepareText($text);\n }\n\n return implode(\" \", $html);\n }", "public function meta_box_html() {\r\n // Use nonce for verification\r\n wp_nonce_field( plugin_basename( __FILE__ ), self::NONCE_KEY );\r\n $old_meta_value = get_post_meta(get_the_ID(), self::URL_META_KEY, true);\r\n\r\n $key = self::URL_META_KEY;\r\n\r\n $html = <<<EOT\r\n<label for=\"$key\">The address of the downloadable resource</label>\r\n<input type=\"text\" id=\"$key\" name=\"$key\" placeholder=\"Paste it in or click the button below\" style=\"width:100%\" value=\"$old_meta_value\" />\r\n<a href=\"#\" id=\"ah-dl-res-upload\" class=\"button-primary\" style=\"margin-top:10px\">Upload or Select Resource</a>\r\nEOT;\r\n echo $html;\r\n }", "function _webform_render_file($component) {\r\n $form_item[$component['form_key']] = array(\r\n '#type' => $component['type'],\r\n '#title' => $component['name'],\r\n //'#required' => $component['mandatory'], // Drupal core bug with required file uploads.\r\n '#weight' => $component['weight'],\r\n '#description' => _webform_filter_descriptions($component['extra']['description']),\r\n '#attributes' => $component['extra']['attributes'],\r\n '#tree' => FALSE, // file_check_upload assumes a flat $_FILES structure.\r\n '#prefix' => '<div class=\"webform-component-'. $component['type'] .'\" id=\"webform-component-'. $component['form_key'] .'\">',\r\n '#suffix' => '</div>',\r\n '#element_validate' => array(\r\n '_webform_validate_file',\r\n '_webform_required_file', // Custom required routine.\r\n ),\r\n '#webform_component' => $component,\r\n );\r\n $form_item['#weight'] = $component['weight'];\r\n $form_item['new'] = array(\r\n '#type' => 'hidden',\r\n '#weight' => $component['weight'],\r\n '#value' => $component['form_key'],\r\n '#tree' => TRUE,\r\n );\r\n // Change the 'width' option to the correct 'size' option.\r\n if ($component['extra']['width'] > 0) {\r\n $form_item[$component['form_key']]['#size'] = $component['extra']['width'];\r\n }\r\n\r\n return $form_item;\r\n}", "public function it_shows_file_input_on_type_of_file()\n {\n // configure\n $inputs = [\n [\n 'type' => 'file',\n 'name' => 'tc',\n 'label' => 'Upload Terms and Conditions'\n ]\n ];\n\n $this->configureInputs($inputs);\n\n // assert\n $this->get('/settings')\n ->assertStatus(200)\n ->assertSee('type=\"file\"', false);\n }", "public function render()\n\t{\n\t\t$name = $this->_obj->getId();\n\t\t$prefix = Core::getController('medias');\n\t\tif (! $prefix) {\n\t\t\t$prefix = '/t41/medias/';\n\t\t}\n\t\t$uri = $prefix . 'upload';\n\t\tView::addCoreLib(array('core.js','locale.js','view.js','uploader.css','view:action:upload.js'));\n\t\tView::addEvent(sprintf(\"t41.view.register('%s_ul', new t41.view.action.upload(jQuery('#%s_ul'),'%s'))\", $name, $name, $uri), 'js');\n\t\t\n\t\t$html = '';\n\t\t// @todo code media deletion JS\n\t\tif (($this->_obj->getValue()) != null) {\n\t\t\t$html .= sprintf('<span><a href=\"%s\" target=\"_blank\">%s %s</a> | <a href=\"#\" onclick=\"t41.view.get(\\'%s_ul\\').reset(this)\">%s</a></span>'\n\t\t\t\t\t, MediaElement::getDownloadUrl($this->_obj->getValue()->getUri())\n\t\t\t\t\t, 'Télécharger'\n\t\t\t\t\t, $this->_obj->getValue()->getLabel()\n\t\t\t\t\t, $name\n\t\t\t\t\t, 'Supprimer'\n\t\t\t);\n\t\t}\n\t\t$html .= sprintf('<div id=\"%s_ul\" class=\"qq-upload-list\"></div>', $this->_nametoDomId($name));\n\t\t$html .= sprintf('<input type=\"hidden\" name=\"%s\" id=\"%s\" value=\"%s\" class=\"hiddenfilename\"/>'\n\t\t\t\t, $name\n\t\t\t\t, $this->_nametoDomId($name)\n\t\t\t\t, $this->_obj->getValue() ? $this->_obj->getValue()->getIdentifier() : null\n\t\t);\n\t\t\n\t\treturn $html;\n\t\t\n\t\t$action = new UploadAction($this->_obj);\n\t\t\n\t\t$deco = View\\Decorator::factory($action);\n\t\t$deco->render();\n\t\t\n\t\treturn $html . \"\\n\";\n\t}", "protected function html()\r\n\t{\r\n\r\n\t\t$data = $this->form;\r\n\t\t$f = $data['form'];\r\n\r\n\t\tif($f == 'select'){\r\n\t\t\t$this->selectLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'file'){\r\n\t\t\t$this->fileLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'textarea'){\r\n\t\t\t$this->success = $this->textarea();\r\n\t\t}\r\n\r\n\t\tif($f == 'radio' || $f=='checkbox'){\r\n\t\t\t$this->chooseLink();\r\n\t\t}\r\n\t\tif($f == 'hidden'|| $f =='password'|| $f =='text'|| $f =='number'|| $f =='date'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($f == 'editor'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif(strpos($f,'extend')!==false){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($this->continue){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->replace();\r\n\t}", "function _webform_edit_file($currfield) {\r\n $edit_fields = array();\r\n $edit_fields['#theme'] = 'webform_edit_file';\r\n $edit_fields['extra']['filtering'] = array(\r\n '#type' => 'fieldset',\r\n '#collapsible' => TRUE,\r\n '#collapsed' => FALSE,\r\n '#title' => t('Upload Filtering'),\r\n '#description' => t('Select the types of uploads you would like to allow.'),\r\n '#element_validate' => array('_webform_edit_file_filtering_validate'),\r\n );\r\n\r\n // Find the list of all currently valid extensions.\r\n $current_types = isset($currfield['extra']['filtering']['types']) ? $currfield['extra']['filtering']['types'] : array();\r\n\r\n $types = array('gif', 'jpg', 'png');\r\n $edit_fields['extra']['filtering']['types']['webimages'] = array(\r\n '#type' => 'checkboxes',\r\n '#title' => t('Web Images'),\r\n '#options' => drupal_map_assoc($types),\r\n '#default_value' => array_intersect($current_types, $types),\r\n );\r\n\r\n $types = array('bmp', 'eps', 'tif', 'pict', 'psd');\r\n $edit_fields['extra']['filtering']['types']['desktopimages'] = array(\r\n '#type' => 'checkboxes',\r\n '#title' => t('Desktop Images'),\r\n '#options' => drupal_map_assoc($types),\r\n '#default_value' => array_intersect($current_types, $types),\r\n );\r\n\r\n $types = array('txt', 'rtf', 'html', 'odf', 'pdf', 'doc', 'ppt', 'xls', 'xml');\r\n $edit_fields['extra']['filtering']['types']['documents'] = array(\r\n '#type' => 'checkboxes',\r\n '#title' => t('Documents'),\r\n '#options' => drupal_map_assoc($types),\r\n '#default_value' => array_intersect($current_types, $types),\r\n );\r\n\r\n $types = array('avi', 'mov', 'mp3', 'ogg', 'wav');\r\n $edit_fields['extra']['filtering']['types']['media'] = array(\r\n '#type' => 'checkboxes',\r\n '#title' => t('Media'),\r\n '#options' => drupal_map_assoc($types),\r\n '#default_value' => array_intersect($current_types, $types),\r\n );\r\n\r\n $types = array('bz2', 'dmg', 'gz', 'jar', 'rar', 'sit', 'tar', 'zip');\r\n $edit_fields['extra']['filtering']['types']['archives'] = array(\r\n '#type' => 'checkboxes',\r\n '#title' => t('Archives'),\r\n '#options' => drupal_map_assoc($types),\r\n '#default_value' => array_intersect($current_types, $types),\r\n );\r\n\r\n $edit_fields['extra']['filtering']['addextensions'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Additional Extensions'),\r\n '#default_value' => $currfield['extra']['filtering']['addextensions'],\r\n '#description' => t('Enter a list of additional file extensions for this upload field, seperated by commas.<br /> Entered extensions will be appended to checked items above.'),\r\n '#size' => 60,\r\n '#weight' => 3,\r\n '#default_value' => $currfield['extra']['filtering']['addextensions'],\r\n );\r\n\r\n $edit_fields['extra']['filtering']['size'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Max Upload Size'),\r\n '#default_value' => $currfield['extra']['filtering']['size'],\r\n '#description' => t('Enter the max file size a user may upload (in KB).'),\r\n '#size' => 10,\r\n '#weight' => 3,\r\n '#default_value' => $currfield['extra']['filtering']['size'],\r\n );\r\n $edit_fields['extra']['savelocation'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Upload Directory'),\r\n '#default_value' => $currfield['extra']['savelocation'],\r\n '#description' => '<div style=\"display: block\">'. t('Webform uploads are always saved in the site files directory. You may optionally specify a subfolder to store your files.') .'</div>',\r\n '#weight' => 3,\r\n '#element_validate' => array('_webform_edit_file_check_directory', '_webform_edit_file_validate'),\r\n '#after_build' => array('_webform_edit_file_check_directory'),\r\n );\r\n $edit_fields['extra']['width'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Width'),\r\n '#default_value' => $currfield['extra']['width'],\r\n '#description' => t('Width of the file field.') .' '. t('Leaving blank will use the default size.'),\r\n '#size' => 5,\r\n '#maxlength' => 10,\r\n '#weight' => 4,\r\n );\r\n return $edit_fields;\r\n}", "public function fileUpload()\n {\n return View::make('file-upload.create');\n }", "public function tohtml() {\n global $PAGE, $OUTPUT;\n\n $id = $this->_attributes['id'];\n $elname = $this->_attributes['name'];\n\n if ($this->_hiddenlabel) {\n $this->_generateId();\n $str = '<label class=\"accesshide\" for=\"'.$this->getAttribute('id').'\" >'.\n $this->getLabel().'</label>'.parent::toHtml();\n } else {\n $str = HTML_QuickForm_Text::toHtml();\n }\n if (empty($this->_options['usefilepicker'])) {\n return $str;\n }\n\n $clientid = uniqid();\n\n $args = new stdClass();\n $args->accepted_types = '*';\n $args->return_types = FILE_EXTERNAL;\n $args->context = $PAGE->context;\n $args->client_id = $clientid;\n $args->env = 'url';\n\n $refrepos = repository::get_instances(array(\n 'currentcontext' => $PAGE->context,\n 'return_types' => FILE_EXTERNAL,\n ));\n $disabled = array();\n foreach ($refrepos as $repo) {\n if (($name = $repo->get_typename()) != $this->_options['repo']) {\n $disabled[] = $name;\n }\n }\n $args->disable_types = $disabled;\n\n $fp = new file_picker($args);\n $options = $fp->options;\n\n if (count($options->repositories) > 0) {\n $straddlink = get_string('choosealink', 'repository');\n $str .= <<<EOD\n<button id=\"filepicker-button-{$clientid}\" class=\"visibleifjs\">\n$straddlink\n</button>\nEOD;\n }\n\n // Print out file picker.\n $str .= $OUTPUT->render($fp);\n\n $module = [\n 'name' => 'form_url',\n 'fullpath' => '/lib/form/url.js',\n 'requires' => ['core_filepicker']\n ];\n $PAGE->requires->js_init_call('M.form_url.init', array($options), true, $module);\n\n return $str;\n }", "public static function media_field( $args ) {\n\n\t\t$value = get_option( $args['label_for'] );\n\t\t$has_image = ( ! empty( $value ) ) ? 'has_image' : '';\n\n\t\t$html = \"<div class='preview_{$args['label_for']} preview_image_box {$has_image}'>\";\n\t\t$html .= \" <img src='{$value}' alt='\" . esc_attr__( 'Image Preview', 'dorzki-notifications-to-slack' ) . \"'>\";\n\t\t$html .= \" <button type='button' class='remove-image'>\" . esc_html__( 'Remove Image', 'dorzki-notifications-to-slack' ) . '</button>';\n\t\t$html .= '</div>';\n\n\t\t$html .= sprintf( \"<input type='hidden' class='%s' name='%s' value='%s'>\", implode( ' ', $args['classes'] ), $args['label_for'], $value );\n\n\t\techo apply_filters( 'slack_before_output_media_field', $html );\n\n\t}", "public function add_html( $html = '' ) {\n\t\t\n\t\tarray_push( $this->fields, $html );\n\t\t\n\t\tif ( true === $this->progressive_render ) echo $html;\n\t\t\n\t}", "function bab_pm_file_upload_form($label, $pophelp, $step, $id = '')\n{\n global $file_max_upload_size;\n\n if (!$file_max_upload_size || intval($file_max_upload_size) == 0) {\n $file_max_upload_size = 2*(1024*1024);\n }\n\n $max_file_size = (intval($file_max_upload_size) == 0) ? '' : intval($file_max_upload_size);\n\n $label_id = (@$label_id) ? $label_id : 'postmaster-upload';\n\n return '<form method=\"post\" enctype=\"multipart/form-data\" action=\"index.php\">'\n . '<div>'\n . (!empty($max_file_size)? n.hInput('MAX_FILE_SIZE', $max_file_size): '')\n . eInput('postmaster')\n . sInput('import')\n . graf(\n '<label for=\"'.$label_id.'\">'.$label.'</label>'.sp.\n fInput('file', 'thefile', '', 'edit', '', '', '', '', $label_id).sp.\n fInput('submit', '', gTxt('upload'), 'smallerbox')\n )\n . '<br /><input type=\"checkbox\" name=\"overwrite\" /> Overwrite subscribers that already exist'\n . '<br /><input type=\"checkbox\" name=\"dump_first\" /> Empty subscribers list before import'\n . '</div></form>';\n ;\n}", "public function file($options = []){\n\t\t// Set default attributes.\n\t\tHtml::setAttribute($options, [\n\t\t\t'id' => $this->name,\n\t\t\t'class' => $this->getDefaultClass('file')\n\t\t]);\n\t\t// On error, add error class if error classes are enabled.\n\t\tif($this->hasError && $this->errorClasses){\n\t\t\tHtml::addToAttribute($options, 'class', $this->getDefaultClass('error'));\n\t\t}\n\t\t// Create and store the element.\n\t\t$this->elements['control'] = Html::file(\n\t\t\t$this->name,\n\t\t\t$options\n\t\t);\n\t\t// Return object to method chain.\n\t\treturn $this;\n\t}", "function _field_image_upload ($val) {\n\n $name = $this->fname;\n $path = '';\n $max = (!empty($this->attribs['displaysize']))? $this->attribs['displaysize'] : 64;\n\n if (isset($this->attribs['ws_path'])) {\n $path = $this->attribs['ws_path'];\n }\n elseif (defined('SITE_MEDIA_URLPATH')) {\n $path = SITE_MEDIA_URLPATH;\n }\n\n $res = '<div class=\"fieldImageW\">';\n\n if (!empty($val)) {\n $val = preg_replace('/^\\//', '', $val); // rid of a pesky leading slash now\n $url = \"$path/\" . urlencode($val);\n\n if (preg_match('/\\.swf$/', $val)) { // its a F'en Flash - just pop a new friggin windowz\n $res .= \"<span class='ffimg'><a href=\\\"$url\\\" target=\\\"flashWin\\\"><img src=\\\"/gfx/icons/flash.gif\\\"></a></span>\";\n }\n else {\n $size = '';\n $tw = $max;\n $th = $max;\n if (list($w, $h) = @getimagesize(UPLOAD_SAVE_PATH . '/' . $val)) {\n if ($w > $h) {\n $th = floor($h * ($tw / $w));\n }\n else {\n $tw = floor($w * ($th / $h));\n }\n $size = sprintf(\" [%dx%d]\", $w, $h);\n }\n $res .= sprintf('<img src=\"%s\" width=\"%d\" height=\"%d\" title=\"%s%s\">', \n $url, \n $tw,\n $th,\n htmlspecialchars($val),\n $size);\n }\n }\n\n $res .= $this->_field_file($val);\n $res .= \"</div>\";\n return $res;\n }", "public function file($name, array $attributes = NULL) {\n $this->load_values($name, $dummy, $attributes);\n $result = '<li>'.Kohana_Form::file($name, $attributes);\n // add error span\n if (isset($this->errors[$name])) {\n $result .= '<span class=\"error\">'.ucfirst($this->errors[$name]).'</span>';\n } else if (isset($attributes['info'])) {\n // else add info span\n $result .= '<span class=\"info\">'.$attributes['info'].'</span>';\n }\n $result .= '</li>';\n return $result;\n\t}", "function pafd_metabox_file_cb() {\n\n\tglobal $pafd_textdomain, $post, $post_meta;\n\n\t$post_meta = get_post_meta( $post->ID);\n\t$revisions = get_post_meta( $post->ID, 'pafd-file' );\n\t$revisions = array_reverse( $revisions );\n\n\t$rand = mt_rand( 100000, 999999 );\n\n\t// Maximum upload size \n\t$max_upload_size = wp_max_upload_size();\n\tif ( ! $max_upload_size ) {\n\t\t$max_upload_size = 0;\n\t}\n\t\n\t$info = K::wrap(\n\t\t'<i class=\"dashicons dashicons-info\"></i> ' \n\t\t. sprintf( \n\t\t\t__( 'Allowed file size is &lt; <strong>%s</strong><br /><i class=\"dashicons dashicons-info\"></i> Allowed file types are listed in <a target= \"_blank\" href=\"%s\">the WordPress Codex</a>.' , $pafd_textdomain ),\n\t\t\tpafd_format_bytes( $max_upload_size ),\n\t\t\t'http://codex.wordpress.org/Uploading_Files#About_Uploading_Files_on_Dashboard'\n\t\t)\n\t\t, null\n\t\t, array( 'in' => 'em', 'return' => true )\n\t);\n\n\t// Print a nonce field\n\tK::input(\n\t\t'pafd-file-nonce',\n\t\tarray( 'type' => 'hidden', 'value' => wp_create_nonce( 'pafd_save_file' ) )\t\n\t);\n\n\t// Upload label\n\tK::wrap( __( 'Upload New Revision', $pafd_textdomain ), null , array( 'in' => 'h2' ) );\n\n\n\t// Print the revision name and version fields\n\techo \n\t\t'<div class=\"alignleft\" style=\"width: 47.5%;\" >'\n\t\t. K::input(\n\t\t\t'pafd-file[name]',\n\t\t\tarray(\n\t\t\t\t'class' => 'large-text',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'format' => '<p><label><strong>' . __( 'Revision Name', $pafd_textdomain ) . '</strong><br />:input</label></p>',\n\t\t\t\t'return' => true,\n\t\t\t)\n\t\t)\n\t\t. K::input(\n\t\t\t'pafd-file[version]',\n\t\t\tarray(\n\t\t\t\t'class' => 'large-text',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'format' => '<p><label><strong>' . __( 'Version', $pafd_textdomain ) . '</strong><br />:input</label></p>',\n\t\t\t\t'return' => true,\n\t\t\t)\n\t\t)\n\t\t. '</div>'\n\t;\n\n\t// Print the file field\n\tK::input(\n\t\t'pafd-file',\n\t\tarray(\n\t\t\t'enctype' => 'multipart/form-data',\n\t\t\t'id' => 'pafd-file',\n\t\t\t'style' => '\n\t\t\t\theight: 500px;\n\t\t\t\tleft: 0;\n\t\t\t\tmargin: 0;\n\t\t\t\topacity: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0;\n\t\t\t\ttop: 0;\n\t\t\t\twidth: 100%;\n\t\t\t',\n\t\t\t'type' => 'file',\n\t\t),\n\t\tarray( 'format' => sprintf( '\n\t\t\t<div class=\"alignright\" style=\"width: 47.5%%;\">\n\t\t\t\t<div>\n\t\t\t\t\t<strong>%s</strong><br />\n\t\t\t\t\t<label style=\"\n\t\t\t\t\t\tborder: dashed 3px #2EA2CC;\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\theight: 200px;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tpadding: 2%%;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\twidth: calc( 96%% - 6px );\n\t\t\t\t\t\">\n\t\t\t\t\t\t<p style=\"font-size: 1.5em; text-align: center;\">%s</p>\n\t\t\t\t\t\t<p style=\"text-align: center;\" >%s <span class=\"button\">%s</span></p>\n\t\t\t\t\t\t<p style=\"\n\t\t\t\t\t\t\tborder-top: solid 1px #CCC;\n\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t\tfont-size: 1.1em;\n\t\t\t\t\t\t\tpadding-top: 1em;\n\t\t\t\t\t\t\tz-index: 999;\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\tbottom: 0px;\n\t\t\t\t\t\t\t\" id=\"pafd-file-name\">\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t:input\n\t\t\t\t\t</label>\n\t\t\t\t</div>\n\t\t\t\t<p>%s</p>\n\t\t\t</div>'\n\t\t\t, __( 'File', $pafd_textdomain )\n\t\t\t, __( 'Drop file here', $pafd_textdomain )\n\t\t\t, __( 'or', $pafd_textdomain )\n\t\t\t, __( 'Select file', $pafd_textdomain )\n\t\t\t, $info\n\t\t) )\n\t);\n\n\t// Print the file description field\n\tK::textarea(\n\t\t'pafd-file[description]',\n\t\tnull,\n\t\tarray(\n\t\t\t'format' => '<div class=\"clear\"><strong>' . __( 'Revision Description', $pafd_textdomain ) . '</strong><br />:textarea</div>',\n\t\t\t'editor' => true,\n\t\t)\n\t);\n\t\n\t// Revisions List Label\n\tK::wrap( __( 'Revisions', $pafd_textdomain ) , null , array( 'in' => 'h2' ) );\n\n\t// Prepare Revisions List\n\tif( $revisions ) {\n\t\t$revisions_list_tpl = '\n\t\t\t<table id=\"pafd-revisions\" class=\"wp-list-table widefat\">\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>' . __( 'Name', $pafd_textdomain ) . '</th>\n\t\t\t\t\t\t<th>' . __( 'Version', $pafd_textdomain ) . '</th>\n\t\t\t\t\t\t<th>' . __( 'Description', $pafd_textdomain ) . '</th>\n\t\t\t\t\t\t<th>' . __( 'Information/Download', $pafd_textdomain ) . '</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t:revisions\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t';\n\t\t$revision_row_tpl = '\n\t\t\t<tr class=\":current\">\n\t\t\t\t<td>:name</td>\n\t\t\t\t<td>:version</td>\n\t\t\t\t<td>:description</td>\n\t\t\t\t<td>:information</td>\n\t\t\t</tr>\n\t\t';\n\t\t$revisions_list = str_replace( ':revisions', \":revisions_$rand\", $revisions_list_tpl );\n\t\tforeach ( $revisions as $r => $revision ) {\n\n\t\t\t$revision[ 'author_display_name' ] = get_userdata( $revision[ 'author_ID' ] )->display_name;\n\t\t\t$revision[ 'date' ] = get_date_from_gmt ( date( 'Y-m-d H:i:s', ( int ) $revision[ 'timestamp' ] ), get_option( 'date_format' ) );\n\t\t\t$revision[ 'time' ] = get_date_from_gmt ( date( 'Y-m-d H:i:s', ( int ) $revision[ 'timestamp' ] ), get_option( 'time_format' ) );\n\n\t\t\t$revisions_list = str_replace(\n\t\t\t\t\":revisions_$rand\",\n\t\t\t\tstr_replace(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t':current',\n\t\t\t\t\t\t':version',\n\t\t\t\t\t\t':name',\n\t\t\t\t\t\t':description',\n\t\t\t\t\t\t':information',\n\t\t\t\t\t),\n\t\t\t\t\tarray( \n\t\t\t\t\t\t( $post_meta[ 'pafd-file-current' ][0] == $revision[ 'hash' ] ) ? 'pafd-current-revision' : '',\n\t\t\t\t\t\t$revision[ 'version' ],\n\t\t\t\t\t\t$revision[ 'name' ],\n\t\t\t\t\t\t$revision[ 'description' ],\n\t\t\t\t\t\tsprintf( ''\n\t\t\t\t\t\t\t. '<i class=\"dashicons dashicons-admin-users\"></i> %s<br />'\n\t\t\t\t\t\t\t. '<i class=\"dashicons dashicons-clock\"></i> %s &ndash; %s <em>(%s ago)</em><br />'\n\t\t\t\t\t\t\t. '<i class=\"dashicons dashicons-chart-bar\"></i> %s<br /><br />'\n\t\t\t\t\t\t\t. '<a class=\"button button-large pafd-download-link\" href=\"%s\">' . __( 'Download', $pafd_textdomain ) . ' (%s)</a> '\n\t\t\t\t\t\t\t. '<a class=\"button button-large button-primary pafd-restore-link\" href=\"%s\">' . __( 'Restore', $pafd_textdomain ) . '</a> '\n\t\t\t\t\t\t\t. '<a class=\"button button-large pafd-delete-link\" href=\"%s\">' . __( 'Delete', $pafd_textdomain ) . '</a> '\n\t\t\t\t\t\t\t, $revision[ 'author_display_name' ]\n\t\t\t\t\t\t\t, $revision[ 'date' ]\n\t\t\t\t\t\t\t, $revision[ 'time' ]\n\t\t\t\t\t\t\t, human_time_diff( $revision[ 'timestamp' ] )\n\t\t\t\t\t\t\t, sprintf( _n( '<span class=\"pafd-download-counter\">1</span> Download', '<span class=\"pafd-download-counter\">%s</span> Downloads', $revision[ 'downloaded' ], $pafd_textdomain ), $revision[ 'downloaded' ] )\n\t\t\t\t\t\t\t, wp_nonce_url( esc_url_raw( add_query_arg(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'pafd_action' => 'download',\n\t\t\t\t\t\t\t\t\t'pafd_revision_hash' => $revision[ 'hash' ],\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tget_edit_post_link()\n\t\t\t\t\t\t\t) ), 'pafd_action_download', 'pafd_nonce_action_download' )\n\t\t\t\t\t\t\t, pafd_format_bytes( $revision[ 'size' ] )\n\t\t\t\t\t\t\t, wp_nonce_url( esc_url_raw( add_query_arg(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'pafd_action' => 'restore',\n\t\t\t\t\t\t\t\t\t'pafd_revision_hash' => $revision[ 'hash' ],\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tget_edit_post_link()\n\t\t\t\t\t\t\t) ), 'pafd_action_restore', 'pafd_nonce_action_restore' )\n\t\t\t\t\t\t\t, wp_nonce_url( esc_url_raw( add_query_arg(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'pafd_action' => 'delete',\n\t\t\t\t\t\t\t\t\t'pafd_revision_hash' => $revision[ 'hash' ],\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tget_edit_post_link()\n\t\t\t\t\t\t\t) ), 'pafd_action_delete', 'pafd_nonce_action_delete' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t$revision_row_tpl) . \":revisions_$rand\",\n\t\t\t\t$revisions_list\n\t\t\t);\n\t\t}\n\t\t$revisions_list = str_replace( \":revisions_$rand\", '', $revisions_list );\n\t}\n\n\t// Output\n\tif( $revisions ) {\n\t\techo $revisions_list;\n\t} else {\n\t\tK::wrap(\n\t\t\t'<i class=\"btn dashicons dashicons-info\"></i> ' \n\t\t\t. __( 'No revisions uploaded yet.', $pafd_textdomain )\n\t\t\t, null\n\t\t\t, array( 'in' => 'em' )\n\t\t);\n\t}\n\n\t// Debugging information\n\tif ( PAFD_DEBUG ) {\n\t\t\n\t\t// Debugging Label\n\t\tK::wrap( __( 'Debugging', $pafd_textdomain ) , null , array( 'in' => 'h2' ) );\n\n\t\t!d( $post );\n\t\t!d( $post_meta );\n\t}\n}", "public function html(){\n\t\treturn '<div class=\"form-group\">'.$this->label.$this->input.'</div>';\n\t}", "protected function getInput()\n {\n $this->max = (int) $this->getUploadValue();\n $this->class = trim($this->class.' input-small');\n\n $html = '<div class=\"input-append input-group\">';\n\n $html .= parent::getInput();\n $html .= ' <div class=\"input-group-append\">';\n $html .= ' <span class=\"add-on input-group-text\">Kb</span>';\n $html .= ' </div>';\n $html .= '\t<small class=\"help-inline form-text\">&nbsp;<em>'.JText::_('WF_SERVER_UPLOAD_SIZE').' : '.$this->getUploadValue().'</em></small>';\n $html .= '</div>';\n\n return $html;\n }", "public function render() {\n $html = str_replace('{text}', $this->text, FORMWIZARD_SEPARATOR);\n $this->html = $html;\n }", "function textUpload($tF){\n // php is disable on server for this directory\n global $uploadOk, $uploadStatus;\n\n $textFileType = strtolower(pathinfo($tF,PATHINFO_EXTENSION));\n\n // Allow certain file formats\n if($textFileType != \"html\" && $textFileType != \"css\") {\n $uploadStatus .= \"<br>Sorry, only HTML and CSS files are allowed.\";\n $uploadOk = 0;\n }\n}", "public function getTag()\n {\n return parent::getTag()\n ->unsetAttr('value')\n ->setAttr(\"type\", \"file\");\n }", "function wck_get_entry_field_upload($id){\r\n\t\tif( !empty ( $id ) && is_numeric( $id ) ){\t\t\t\t\r\n\t\t\t$file_src = wp_get_attachment_url($id);\r\n\t\t\t$thumbnail = wp_get_attachment_image( $id, array( 80, 60 ), true );\r\n\t\t\t$file_name = get_the_title( $id );\r\n\t\t\t\r\n\t\t\tif ( preg_match( '/^.*?\\.(\\w+)$/', get_attached_file( $id ), $matches ) )\r\n\t\t\t\t$file_type = esc_html( strtoupper( $matches[1] ) );\r\n\t\t\telse\r\n\t\t\t\t$file_type = strtoupper( str_replace( 'image/', '', get_post_mime_type( $id ) ) );\r\n\t\t\t\r\n\t\t\treturn $display_value = '<div class=\"upload-field-details\">'. $thumbnail .'<p><span class=\"file-name\">'. $file_name .'</span><span class=\"file-type\">'. $file_type . '</span></p></div>';\t\r\n\t\t} else {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}", "function file_markup($files, array $options = array(), $wrapperAttributes = array('class' => 'item-file'))\n{\n if (!is_array($files)) {\n $files = array($files);\n }\n $files = apply_filters('file_markup_files', $files, array('options' => $options));\n $helper = new Omeka_View_Helper_FileMarkup;\n $output = '';\n foreach ($files as $file) {\n $output .= $helper->fileMarkup($file, $options, $wrapperAttributes);\n }\n return $output;\n}", "function fileForm($sqlType){ ?>\n\t\t<form name=\"eventInput\" action=\"<? printHTML(fullURL(getLangVar(\"fileURL\"), \"commit\")); ?>\" method=\"post\" enctype=\"multipart/form-data\">\n\t<?\tobjectForm(); ?>\n\t\t\t<div>\n\t\t\t\t<label for=\"file\">Filename:</label><input type=\"file\" name=\"file\" id=\"file\" />\n\t\t\t</div>\n\t\t\t<div class=\"fr\">\n\t\t\t\t<input type=\"submit\" value=\"Submit\"></input>\n\t\t\t</div>\n\t\t\t<input id=\"sqlType\" name=\"sqlType\" type=\"hidden\" value=\"<? printHTML($sqlType); ?>\"></input>\n\t\t\t<input id=\"fileId\" name=\"fileId\" type=\"hidden\" value=\"<? printHTML($GLOBALS['fileId']); ?>\"></input>\n\t\t</form>\n<?\t}", "function form_file($forms){\r\n\r\n\t$name = isset($forms['name']) ? $forms['name'] : rand(1000 , 9999 ) ;\r\n\t$class = isset( $forms['class'] ) ? $forms['class'] : $forms['name'] ;\r\n\t$value = isset( $forms['value'] ) ? $forms['value'] : \"\" ;\r\n\t$id = isset( $forms['id'] ) ? $forms['id'] : $forms['name'] ; \r\n\t\r\n\t$input = '<input onkeypress=\"return handleEnter(this, event)\" type=\"file\" size=\"52\" ';\r\n\t$input .= ' name=\"'.$name.'\" ';\r\n\t$input .= ' class=\"'.$class.'\" ';\r\n\t$input .= ' id=\"'.$id.'\" ';\r\n\t$input .= ' value=\"'.$value.'\" '; \r\n\t$input .= ' />';\r\n\r\n\treturn $input;\r\n}", "function render_html($fval) \n {\n $methodname = '_field_' . $this->type;\n if (!method_exists($this, $methodname)) {\n $methodname = \"_field_text\";\n }\n $this->html = '<span class=\"formexField' . ucfirst($this->type) . '\">';\n $this->html .= $this->$methodname($fval);\n $this->html .= '</span>';\n }", "function my_attachment_fields_edit($form_fields,$post){\n $html = \"<input type='hidden' name='attachments[\".$post->ID.\"][url]' value=''/>\";\n\n $form_fields['url']['html'] = $html; //Replace html\n $form_fields['url']['label'] = ''; //Remove label\n $form_fields['url']['helps'] ='';//Remove help text\n\n return $form_fields;\n}", "public function testAddFieldVisualisationFile() {\n $new_field_label = 'Testing visualisation file field';\n $new_field_name = 'testing_vis_file_field';\n $storage_type = 'dvf_file';\n\n $this->addNewFieldToPage($new_field_label, $new_field_name, $storage_type);\n }", "public function _editable($value, Field $field, HTMLNode $previous): HTMLNode\n {\n // add extra classes\n $input = $previous->get('input')[0];\n\n return HTMLNode::factory(\n 'div',\n ['class' => 'file-field'],\n [\n HTMLNode::factory(\n 'div',\n ['class' => \"btn\"],\n [\n HTMLNode::factory(\n 'span',\n [],\n 'Upload'\n ),\n $input\n ]\n ),\n HTMLNode::factory(\n 'div',\n ['class' => \"file-path-wrapper\"],\n HTMLNode::factory(\n 'input',\n ['class' => 'file-path validate', 'type' => 'text']\n )\n )\n ]\n );\n }", "function os_selectfile_add_meta_box() {\n\t//for general\n\tadd_meta_box('os_selectfile_meta_box', 'Select File', 'os_selectfile_meta_box_html', '', 'side');\n}", "function photo_reference_import_add_form() {\r\n \r\n global $base_url;\r\n $languageArray = get_languages();\r\n \r\n $adminRenamePath = ((variable_get('rename_admin_path') != NULL) ? variable_get('rename_admin_path_value') : 'admin');\r\n\r\n $form = array('#attributes' => array('enctype' => \"multipart/form-data\", \"class\" => \"ghpForm\"));\r\n\r\n $form['photo_reference_csv'] = array(\r\n '#type' => 'file',\r\n '#title' => t('Upload Photo Other Reference: <span title=\"This field is required.\" class=\"form-required\">*</span>'),\r\n '#description' => t('Allowed file .csv only.').'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"'.$base_url.'/'.$adminRenamePath.'/download_sample_csv/photo_reference_content_import\">Download Sample CSV</a>',\r\n '#size' => 20,\r\n );\r\n\r\n $form['submit'] = array('#type' => 'submit',\r\n '#value' => t('Save'),\r\n );\r\n return $form;\r\n}", "public function getFormInput() {\r\n\t\t$name\t\t\t= $this->getName();\r\n\t\t$id\t\t\t\t= $this->getId();\r\n\t\t$attr\t\t\t= $this->getAttributes();\r\n\t\t$type \t\t\t= 'file';\r\n\t\t$additional \t= '';\r\n\t\t\r\n\t\t// MAX_FILE_SIZE is no longer used, didn't provide anything useful\r\n\t\t\r\n\t\t// Start building the HTML input\r\n\t\t$html = '<input';\r\n\t\t// Parse Additional Attributes\r\n\t\tif ($attr) {\r\n\t\t\tforeach ($attr as $key => $values) {\r\n\t\t\t\t// @new feature - Some HTML attributes (type) can be overwritten\r\n\t\t\t\t// directly from the Additional Attributes area\r\n\t\t\t\tif ($key == 'type' && strlen($values)) {\r\n\t\t\t\t\t${$key} = $values;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$additional .= $this->attributeToHtml($key, $values);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Set the type\r\n\t\t$html .= ' type=\"'.$this->escape($type).'\"';\r\n\t\t// Name & id\r\n\t\t$html .= ' name=\"'.$this->escape($name).'\"'.\r\n\t\t\t\t ' id=\"'.$this->escape($id).'\"';\r\n\t\t// Additional HTML\r\n\t\t$html .= $additional;\r\n\t\t// Close the tag\r\n\t\t$html .= ' />';\r\n\t\t\r\n\t\treturn $html;\r\n\t}", "function extraFields() {\n\t\n\t\t$file_id = JRequest::getVar('id');\n\t\t$filename = JRequest::getVar('filename');\n\t\t\n\t\tif (!$filename) {\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$model = $this->getModel();\n\t\t$form = $model->getFieldForm($file_id, 'bulk');\n\t\t\n\t\tif (!$form) {\n\t\t\techo \"There was an error creating the form\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\techo '<div class=\"fltlft\" style=\"width:250px;\">';\n\t\techo '<fieldset class=\"adminform\">';\n\t\techo '<legend>Edit '.$filename.'</legend>';\n\t\techo '<div class=\"adminformlist\">';\n\n\t\tforeach ($form->getFieldset() as $field) {\n\t\t\tJHtml::_('wbty.renderField', $field);\n\t\t}\n\t\techo \"</div></fieldset></div>\";\n\t\t\n\t\texit();\n\t}", "public function main_days_file_callback()\n {\n printf(\n \t'<input id=\"main_days_file\" type=\"text\" size=\"36\" name=\"program_manager_option[main_days_file]\" value=\"%s\" /> \n \t\t<input id=\"main_upload_file_button\" class=\"button\" type=\"button\" value=\"Upload/Select MAIN File\" />',\n \n isset( $this->options['main_days_file'] ) ? esc_attr( $this->options['main_days_file']) : ''\n );\n }", "public function file($element) {\n $element['#type'] = 'file';\n $element = $this->_setRender($element);\n $element['_render']['element'] = '<input type=\"file\" id=\"'\n . $element['#id'] . '\" name=\"' . $element['#name'] . '\"'\n . $element['_attributes_string'];\n if (isset($element['#disable']) && $element['#disable']) {\n $element['_render']['element'] .= ' disabled=\"disabled\"';\n }\n /**\n * type and data_id\n */\n $element['_render']['element'] .= sprintf(' data-wpt-type=\"%s\"', __FUNCTION__);\n $element['_render']['element'] .= $this->_getDataWptId($element);\n\n $element['_render']['element'] .= ' />';\n $pattern = $this->_getStatndardPatern($element);\n $output = $this->_pattern($pattern, $element);\n $output = $this->_wrapElement($element, $output);\n return $output;\n }", "function form_multipart_encoding() {\n\techo ' enctype=\"multipart/form-data\"';\n}", "public function render_field_add( $taxonomy ) {\n\t\t$editor_settings = $this->get_editor_settings();\n\t\tif ( empty( $editor_settings ) || ! is_array( $editor_settings ) ) {\n\t\t\treturn;\n\t\t}\n\t?>\n\t\t<div>\n\t\t\t<label for=\"tag-description\"><?php _e( 'Description', APP_TD ); ?></label>\n\t\t\t<?php wp_editor( '', 'html-tag-description', $editor_settings ); ?>\n\t\t\t<p class=\"description\"><?php _e( 'The description is not prominent by default, however some themes may show it.', APP_TD ); ?></p>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\t// Remove the non-html field\n\t\t\t\tjQuery( 'textarea#tag-description' ).closest( '.form-field' ).remove();\n\t\t\t\tjQuery(function() {\n\t\t\t\t\t// Trigger save\n\t\t\t\t\tjQuery( '#addtag #submit' ).click( function() {\n\t\t\t\t\t\ttinyMCE.triggerSave();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t</script>\n\t\t</div>\n\t\t<?php\n\t}", "public function fileUpload()\n {\n return view('fileUpload');\n }", "public function shortcodeUploadImage()\n {\n if ($this->settings->has('formerror')) {\n $form = $this->model->getSubmittedForm();\n } else {\n $form = $this->model->getNewForm();\n }\n\n return $this->view->fetch('upload.html.twig', ['form' => $form->createView()]);\n }", "function FileFormField ($name, $description, $optional=false, $options=NULL) {\n $defaultoptions = array(\n 'type' => 'file'\n ,'title' => 'file'\n ,'placeholder' => 'file.ext'\n // Limit how crazy the file name can be\n ,'pattern' => \"/^(\\\\w| |[-_\\\\.]){1,64}$/\"\n ,'directory' => 'files'\n ,'maxsize' => 8388608\n );\n $options = $options ? array_merge($defaultoptions, $options) : $defaultoptions;\n parent::PatternFormField($name, $description, $optional, $options);\n $this->directory = $options['directory'];\n $this->maxsize = $options['maxsize'];\n }", "function ezp_upload_tab_ezpupload() {\n\t\t$id = get_the_ID();\n\t\tglobal $post_id, $tab, $style;\n\t\t$enctype = $id ? '' : ' enctype=\"multipart/form-data\"';\n\t?>\n\t\t<form<?php echo $enctype; ?> id=\"upload-file\" method=\"post\" action=\"<?php echo get_option('siteurl') . \"/wp-admin/upload.php?style=$style&amp;tab=ezpupload&amp;post_id=$post_id\"; ?>\">\n\t<?php\n\t\tif ( $id ) :\n\t\t\t$attachment = get_post_to_edit( $id );\n\t\t\t$attachment_data = wp_get_attachment_metadata( $id );\n\t?>\n\t\t\t<div id=\"file-title\">\n\t\t\t\t<h2><?php if ( !isset($attachment_data['width']) && 'inline' != $style )\n\t\t\t\t\t\techo \"<a href='\" . wp_get_attachment_url() . \"' title='\" . __('Direct link to file') . \"'>\";\n\t\t\t\t\tthe_title();\n\t\t\t\t\tif ( !isset($attachment_data['width']) && 'inline' != $style )\n\t\t\t\t\t\techo '</a>';\n\t\t\t\t?></h2>\n\t\t\t\t<span><?php\n\t\t\t\t\techo '[&nbsp;';\n\t\t\t\t\techo '<a href=\"' . get_permalink() . '\">' . __('view') . '</a>';\n\t\t\t\t\techo '&nbsp;|&nbsp;';\n\t\t\t\t\t\techo '<a href=\"' . attribute_escape(add_query_arg('action', 'view')) . '\">' . __('links') . '</a>';\n\t\t\t\t\techo '&nbsp;|&nbsp;';\n\t\t\t\t\techo '<a href=\"' . attribute_escape(remove_query_arg(array('action','ID'))) . '\" title=\"' . __('Browse your files') . '\">' . __('cancel') . '</a>';\n\t\t\t\t\techo '&nbsp;]'; ?></span>\n\t\t\t</div>\n\n\t\t<div id=\"upload-file-view\" class=\"alignleft\">\n\t<?php\t\tif ( isset($attachment_data['width']) && 'inline' != $style )\n\t\t\t\techo \"<a href='\" . wp_get_attachment_url() . \"' title='\" . __('Direct link to file') . \"'>\";\n\t\t\techo wp_upload_display( array(171, 128) );\n\t\t\tif ( isset($attachment_data['width']) && 'inline' != $style )\n\t\t\t\techo '</a>'; ?>\n\t\t</div>\n\t<?php\tendif; ?>\n\t\t\t<table><col /><col class=\"widefat\" />\n\t<?php\tif ( $id ): ?>\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\"><label for=\"url\"><?php _e('URL'); ?></label></th>\n\t\t\t\t\t<td><input type=\"text\" id=\"url\" class=\"readonly\" value=\"<?php echo wp_get_attachment_url(); ?>\" readonly=\"readonly\" /></td>\n\t\t\t\t</tr>\n\t<?php\telse : ?>\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\"><label for=\"upload\"><?php _e('File', 'easyphoto'); ?></label></th>\n\t\t\t\t\t<td><input type=\"file\" id=\"upload\" name=\"image\" /></td>\n\t\t\t\t</tr>\n\t<?php\tendif; ?>\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\"><label for=\"post_title\"><?php _e('Title', 'easyphoto'); ?></label></th>\n\t\t\t\t\t<td><input type=\"text\" id=\"post_title\" name=\"post_title\" value=\"<?php echo $attachment->post_title; ?>\" /><br><?php _e('Title will be used to rename the file', 'easyphoto'); ?></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\"><label for=\"post_content\"><?php _e('Description'); ?></label></th>\n\t\t\t\t\t<td><textarea name=\"post_content\" id=\"post_content\"><?php echo $attachment->post_content; ?></textarea></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr id=\"buttons\" class=\"submit\">\n\t\t\t\t\t<td colspan='2'>\n\t<?php\tif ( $id ) : ?>\n\t\t\t\t\t\t<input type=\"submit\" name=\"delete\" id=\"delete\" class=\"delete alignleft\" value=\"<?php _e('Delete File'); ?>\" />\n\t<?php\tendif; ?>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"from_tab\" value=\"<?php echo $tab; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"<?php echo $id ? 'save' : 'upload'; ?>\" />\n\t<?php\tif ( $post_id ) : ?>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"post_id\" value=\"<?php echo $post_id; ?>\" />\n\t<?php\tendif; if ( $id ) : ?>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"ID\" value=\"<?php echo $id; ?>\" />\n\t<?php\tendif; ?>\n\t\t\t\t\t\t<?php wp_nonce_field( 'inlineuploading' ); ?>\n\t\t\t\t\t\t<div class=\"submit\">\n\t\t\t\t\t\t\t<input type=\"submit\" value=\"<?php $id ? _e('Save') : _e('Upload'); ?> &raquo;\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</form>\n\t<?php\n\t}" ]
[ "0.6985672", "0.6855931", "0.67078996", "0.66784203", "0.66764235", "0.66670597", "0.66192865", "0.65691143", "0.6555691", "0.6519317", "0.6491626", "0.64685917", "0.6461459", "0.6440275", "0.6436876", "0.64250857", "0.63946015", "0.6394286", "0.6374414", "0.63552946", "0.6349626", "0.632733", "0.6296812", "0.62762463", "0.6257659", "0.6246795", "0.6243529", "0.6224969", "0.62133265", "0.6200194", "0.6181319", "0.6177822", "0.6146303", "0.6140234", "0.60755605", "0.6053384", "0.60467774", "0.60449874", "0.60415363", "0.6032975", "0.6019936", "0.60112953", "0.6006007", "0.6001076", "0.5981436", "0.59702355", "0.5911552", "0.58787626", "0.58692515", "0.58537406", "0.5831284", "0.581752", "0.58121073", "0.5799595", "0.5795046", "0.5794369", "0.57848954", "0.5777464", "0.5767898", "0.5755206", "0.5753861", "0.57508147", "0.57505083", "0.57372516", "0.5723233", "0.5702084", "0.5699119", "0.5694573", "0.56874776", "0.56658036", "0.5665102", "0.56593853", "0.56524026", "0.5650151", "0.564569", "0.5601563", "0.5600209", "0.55957943", "0.5562388", "0.555564", "0.5554063", "0.5528909", "0.55262893", "0.55136424", "0.5508437", "0.5507218", "0.5497204", "0.5495824", "0.5484793", "0.5480117", "0.5479924", "0.54670846", "0.54660857", "0.5461967", "0.5460358", "0.54349095", "0.5431432", "0.54290515", "0.5428968", "0.5427576" ]
0.7688398
0
Force Yoast SEO og/twitter descriptions.
public function yoast_seo_description() { return ! empty( $this->form_data['settings']['conversational_forms_description'] ) ? wp_strip_all_tags( $this->form_data['settings']['conversational_forms_description'], true ) : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ct_critic_update_yoast_og_description( $ogdesc ) {\n\t$read_more_text = get_theme_mod( 'read_more_text' );\n\tif ( empty( $read_more_text ) ) {\n\t\t$read_more_text = __( 'Continue reading', 'critic' );\n\t}\n\t$ogdesc = substr( $ogdesc, 0, strpos( $ogdesc, $read_more_text ) );\n\n\treturn $ogdesc;\n}", "public function SEO()\r\n {\r\n echo '\r\n <meta name=\"description\" content=\"Linktree. Make your link do more.\" />\r\n <meta property=\"og:title\" content=\"@sakaltimes\" />\r\n <meta property=\"og:description\" content=\"Linktree. Make your link do more.\" />\r\n <meta property=\"og:url\" content=\"https://linktr.ee/sakaltimes\" />\r\n <meta property=\"og:image\"\r\n content=\"https://d1fdloi71mui9q.cloudfront.net/IwsFe6SGRIq8jRgAIWCp_c6d32bbdb3d3e8a1ada41d428fa89269\" />\r\n <meta property=\"og:image:secure_url\"\r\n content=\"https://d1fdloi71mui9q.cloudfront.net/IwsFe6SGRIq8jRgAIWCp_c6d32bbdb3d3e8a1ada41d428fa89269\" />\r\n <meta property=\"profile:username\" content=\"sakaltimes\" />\r\n <meta name=\"twitter:title\" content=\"@sakaltimes\" />\r\n <meta name=\"twitter:description\" content=\"Linktree. Make your link do more.\" />\r\n <meta name=\"twitter:image\"\r\n content=\"https://d1fdloi71mui9q.cloudfront.net/IwsFe6SGRIq8jRgAIWCp_c6d32bbdb3d3e8a1ada41d428fa89269\" />\r\n <link rel=\"canonical\" href=\"https://linktr.ee/sakaltimes\" />\r\n <link rel=\"preconnect\" href=\"https://www.googletagmanager.com\" crossorigin=\"\" />\r\n <link rel=\"dns-prefetch\" href=\"https://www.googletagmanager.com\" crossorigin=\"\" />\r\n \r\n ';\r\n }", "function cxense_output_meta_tags($location=null, $site_name=false, $desc=false, $title=false) {\n\n $og_tags = array(\n 'og:site_name' => empty($site_name) ? str_replace( 'http://', '', get_site_url() ) : $site_name,\n 'og:description' => empty($desc) ? cxense_get_opt('CXENSE_DEFAULT_SITE_DESC') : $desc\n );\n\n if ( is_singular() || is_single() ) {\n global $post;\n\n $recs_tags = array();\n $og_tags = array(\n 'og:title' => get_the_title(),\n 'og:url' => apply_filters('cxense_og_url', get_permalink())\n );\n\n $recommendable_types = cxense_get_opt('cxense_recommendable_post_type');\n if( !$recommendable_types ) {\n $recommendable_types = 'post';\n }\n\n if( strpos($recommendable_types, $post->post_type) !== false ) {\n $og_tags['og:type'] = 'article';\n $og_tags['og:article:published_time'] = date('c', strtotime($post->post_date));\n $og_tags['og:article:author'] = get_user_by('id', $post->post_author)->display_name;\n $og_tags['og:description'] = get_the_excerpt();\n if( empty($og_tags['og:description']) ) {\n $og_tags['og:description'] = str_replace(\"\\n\", ' ', strip_tags($post->post_content));\n }\n\n if( mb_strlen($og_tags['og:description'], 'UTF-8') > 75 ) {\n $og_tags['og:description'] = mb_substr($og_tags['og:description'], 0, 75, 'UTF-8').'...';\n }\n if( has_post_thumbnail() ) {\n list($src, $width, $height) = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );\n $recs_tags['cXenseParse:recs:image'] = $src;\n if( $width > 200 && $height > 200 ) {\n $og_tags['og:image'] = $src;\n }\n } else {\n $recs_tags['cXenseParse:recs:image'] = 'noimage';\n }\n\n $is_recommendable = 'true';\n\n } else {\n // Page of some kind\n $is_recommendable = 'false';\n }\n\n $recs_tags['cXenseParse:recs:recommendable'] = apply_filters('cxense_is_recommendable', $is_recommendable);\n\n\n // Paywall\n if( defined('PAYGATE_PLUGIN_URL') ) {\n $recs_tags['cXenseParse:paywall'] = is_paygate_protected($post) ? 'true':'false';\n $recs_tags['cXenseParse:recs:paywall'] = $recs_tags['cXenseParse:paywall'];\n if( $recs_tags['cXenseParse:paywall'] == 'true' ) {\n // For content index search\n $recs_tags['cXenseParse:recs:custom0'] = 'paywall';\n }\n }\n\n // Post id\n $recs_tags['cXenseParse:recs:articleid'] = $post->ID;\n\n }\n else {\n // Tags/category/search etc....\n $recs_tags['cXenseParse:recs:recommendable'] = 'false';\n $og_tags['og:url'] = get_site_url().$_SERVER['REQUEST_URI'];\n $og_tags['og:type'] = 'website';\n }\n\n\n if( empty($og_tags['og:image']) ) {\n $og_tags['og:image'] = cxense_get_opt('cxense_default_og_image');\n }\n\n if( !empty($location) ) {\n $og_tags['og:url'] = $location;\n }\n\n if( !empty($title) ) {\n $og_tags['og:title'] = $title;\n }\n\n // Sanitize stuff\n foreach(array('og:title', 'og:description') as $tag => $val) {\n if( !empty($og_tags[$tag]) ) {\n $og_tags[$tag] = trim(str_replace('\"','&quot;', $val));\n }\n }\n\n foreach($og_tags as $name => $val) {\n echo '<meta property=\"'.$name.'\" content=\"'.$val.'\" />'.PHP_EOL;\n }\n foreach($recs_tags as $name => $val) {\n echo '<meta name=\"'.$name.'\" content=\"'.$val.'\" />'.PHP_EOL;\n }\n}", "function SEO_and_HEAD($Title, $Description, $OGP = \"DEFAULT\") {\n\t//Check is is set title and description\n\tif (isset($Title) && isset($Description)) {\n\n\t\t//Default color for webapp bar (Chrome)\n\t\t$WebApp_Color = \"#000000\";\n\n\t\t//Define the company name for author and copyright tags\n\t\t$Company_Name = \"Tama. Sebastian. | alotama\";\n\n\t\t//Set favicons path\n\t\t$Favicon_Path = WEBSITE_URL.\"/assets/img/favicon\";\n\n\t\t$Title = trim($Title);\n\t\t$Description = trim($Description);\n\n\t\t//Get current URL\n\t\t$URL = (isset($_SERVER['HTTPS']) ? \"https\" : \"http\") . \"://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\n\n\t\t//\n\t\tif ($OGP == \"DEFAULT\") {\n\t\t\t$OGP_Image = WEBSITE_URL.\"/assets/img/og.png\";\n\t\t} else {\n\t\t\t$OGP_Image = $OGP;\n\t\t}\n\n\t//Get current year for copyright\n\t$current_year = date(\"Y\");\n?>\n<title><?= $Title; ?></title>\n\n<!-- SEO -->\n\t<!-- HTML -->\n <link rel=\"image_src\" id=\"head_image_src\" type=\"image/png\" href=\"<?= $OGP_Image; ?>\" />\n <meta name=\"author\" content=\"<?= $Company_Name; ?>\" />\n <meta name=\"description\" content=\"<?= $Description; ?>\" />\n <meta name=\"robots\" content=\"ALL\" />\n <meta name=\"googlebot\" content=\"ALL, follow\" />\n <link rel=\"canonical\" href=\"<?= $URL; ?>\" />\n <!-- END: HTML -->\n\t<!-- OG -->\n <meta property=\"og:title\" content=\"<?= $Title; ?>\" />\n <meta property=\"og:url\" content=\"<?= $URL; ?>\" />\n <meta property=\"og:site_name\" content=\"<?= $Company_Name; ?>\" />\n <meta property=\"og:description\" content=\"<?= $Description; ?>\" />\n <meta property=\"og:locale\" content=\"es_AR\" />\n <meta property=\"og:locale:alternate\" content=\"es_ES\" />\n <meta property=\"og:image:url\" content=\"<?= $OGP_Image; ?>\" />\n <meta property=\"og:image:width\" content=\"1200\" />\n <meta property=\"og:image:height\" content=\"630\" />\n <!-- END: OG -->\n <!-- DCMI -->\n <meta name=\"dcterms.rights\" content=\"Copyright <?= $current_year; ?> <?= $Company_Name; ?>\" />\n <meta name=\"dcterms.dateCopyrighted\" content=\"<?= $current_year; ?>\" />\n <meta name=\"DC.Language\" content=\"es_AR\" />\n <meta name=\"geo.region\" content=\"AR-C\" />\n <!-- END: DCMI -->\n<!-- END: SEO -->\n\n<!-- Web App -->\n<meta name=\"apple-mobile-web-app-capable\" content=\"yes\" />\n<meta name=\"mobile-web-app-capable\" content=\"yes\" />\n<meta name=\"apple-mobile-web-app-title\" content=\"<?= $Title; ?>\">\n<meta name=\"application-name\" content=\"<?= $Title; ?>\">\n<meta name=\"msapplication-TileColor\" content=\"<?= $WebApp_Color; ?>\" />\n<meta name=\"theme-color\" content=\"<?= $WebApp_Color; ?>\" />\n<!-- END: Web App -->\n\n<!-- UA and Viewport -->\n<meta http-equiv=\"X-UA-Compatible\" content=\"Chrome=1\" />\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\" />\n<meta content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0\" name=\"viewport\" />\n<!-- END: UA and Viewport -->\n\n<!-- Favicons -->\n<link rel=\"apple-touch-icon\" sizes=\"\" href=\"<?= $Favicon_Path; ?>/apple-icon.png\">\n<link rel=\"apple-touch-icon\" sizes=\"57x57\" href=\"<?= $Favicon_Path; ?>/apple-icon-57x57.png\">\n<link rel=\"apple-touch-icon\" sizes=\"60x60\" href=\"<?= $Favicon_Path; ?>/apple-icon-60x60.png\">\n<link rel=\"apple-touch-icon\" sizes=\"72x72\" href=\"<?= $Favicon_Path; ?>/apple-icon-72x72.png\">\n<link rel=\"apple-touch-icon\" sizes=\"76x76\" href=\"<?= $Favicon_Path; ?>/apple-icon-76x76.png\">\n<link rel=\"apple-touch-icon\" sizes=\"114x114\" href=\"<?= $Favicon_Path; ?>/apple-icon-114x114.png\">\n<link rel=\"apple-touch-icon\" sizes=\"120x120\" href=\"<?= $Favicon_Path; ?>/apple-icon-120x120.png\">\n<link rel=\"apple-touch-icon\" sizes=\"144x144\" href=\"<?= $Favicon_Path; ?>/apple-icon-144x144.png\">\n<link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"<?= $Favicon_Path; ?>/apple-icon-152x152.png\">\n<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"<?= $Favicon_Path; ?>/apple-icon-180x180.png\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"<?= $Favicon_Path; ?>/android-icon-192x192.png\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"144x144\" href=\"<?= $Favicon_Path; ?>/android-icon-144x144.png\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"96x96\" href=\"<?= $Favicon_Path; ?>/android-icon-96x96.png\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"72x72\" href=\"<?= $Favicon_Path; ?>/android-icon-72x72.png\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"48x48\" href=\"<?= $Favicon_Path; ?>/android-icon-48x48.png\">\n<link rel=\"icon\" type=\"image/png\" sizes=\"36x36\" href=\"<?= $Favicon_Path; ?>/android-icon-36x36.png\">\n<meta name=\"msapplication-TileImage\" content=\"<?= $Favicon_Path; ?>/ms-icon-144x144.png\">\n<meta name=\"msapplication-TileImage\" content=\"<?= $Favicon_Path; ?>/ms-icon-70x70.png\">\n<link rel=\"shortcut icon\" href=\"<?= WEBSITE_URL; ?>/favicon.ico\" type=\"image/ico\" />\n<!-- END: Favicons -->\n\n<!-- General styles -->\n<link href=\"https://fonts.googleapis.com/css?family=Fira+Sans:400i,400,700|Frank+Ruhl+Libre:300,400,700\" rel=\"stylesheet\">\n<link rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\" integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\" crossorigin=\"anonymous\">\n<link href=\"<?= WEBSITE_URL; ?>/assets/css/general.min.css\" type=\"text/css\" rel=\"stylesheet\">\n<!-- END: General styles -->\n<?\n\t}\n}", "function sw_open_graph_tags($info) {\n\t\t\t\n\t\t\t\t// We only modify the Open Graph tags on single blog post pages\n\t\t\t\tif(is_singular()):\n\t\t\t\t\t\n\t\t\t\t\t// If Yoast Open Graph is activated, we only output Open Graph tags if the user has filled out at least one field\n\t\t\t\t\t// Then we'll work along with Yoast to make sure all fields get filled properly\n\t\t\t\t\tif(defined('WPSEO_VERSION')):\n\t\t\t\t\t\tglobal $wpseo_og;\n\t\t\t\t\t\t$yoast_og_setting = has_action( 'wpseo_head', array( $wpseo_og, 'opengraph' ));\n\t\t\t\t\telse:\n\t\t\t\t\t\t$yoast_og_setting = false;\n\t\t\t\t\tendif;\n\t\t\t\t\t\t\n\t\t\t\t\tif(\n\t\t\t\t\t\t(isset($info['title']) && $info['title']) || \n\t\t\t\t\t\t(isset($info['description']) && $info['description']) || \n\t\t\t\t\t\t(isset($info['imageURL']) && $info['imageURL']) ||\n\t\t\t\t\t\t!$yoast_og_setting\n\t\t\t\t\t):\n\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* YOAST SEO: It rocks, so let's coordinate with it\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\t// Check if Yoast Exists so we can coordinate output with their plugin accordingly\n\t\t\t\t\t\tif (defined('WPSEO_VERSION')):\n\n\t\t\t\t\t\t\t// Collect their Social Descriptions as backups if they're not defined in ours\n\t\t\t\t\t\t\t$yoast_og_title \t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_opengraph-title' , true );\n\t\t\t\t\t\t\t$yoast_og_description \t= get_post_meta( $info['postID'] , '_yoast_wpseo_opengraph-description' , true );\n\t\t\t\t\t\t\t$yoast_og_image \t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_opengraph-image' , true );\n\n\t\t\t\t\t\t\t// Collect their SEO fields as 3rd string backups in case we need them\n\t\t\t\t\t\t\t$yoast_seo_title\t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_title' , true );\n\t\t\t\t\t\t\t$yoast_seo_description\t= get_post_meta( $info['postID'] , '_yoast_wpseo_metadesc' , true );\n\n\t\t\t\t\t\t\t// Cancel their output if ours have been defined so we don't have two sets of tags\n\t\t\t\t\t\t\tglobal $wpseo_og;\n\t\t\t\t\t\t\tremove_action( 'wpseo_head', array( $wpseo_og, 'opengraph' ), 30 );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Fetch the WPSEO_SOCIAL Values\n\t\t\t\t\t\t\t$wpseo_social = get_option( 'wpseo_social' );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Add all our Open Graph Tags to the Return Header Output\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:type\" content=\"article\" /> ';\n\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* JETPACK: If ours are enabled, disable theirs\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( class_exists( 'JetPack' ) ) :\n\t\t\t\t\t\t\tadd_filter( 'jetpack_enable_opengraph', '__return_false', 99 );\n\t\t\t\t\t\t\tadd_filter( 'jetpack_enable_open_graph', '__return_false', 99 );\n\t\t\t\t\t\tendif;\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* OPEN GRAPH TITLE\t\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Open Graph Title: Create an open graph title meta tag\n\t\t\t\t\t\tif($info['title']):\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an social media title, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:title\" content=\"'.$info['title'].'\" />';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\telseif(isset($yoast_og_title) && $yoast_og_title):\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an title over in Yoast, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:title\" content=\"'.$yoast_og_title.'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\telseif(isset($yoast_seo_title) && $yoast_seo_title):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an title over in Yoast, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:title\" content=\"'.$yoast_seo_title.'\" />';\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// If nothing else is defined, let's use the post title\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:title\" content=\"'.convert_smart_quotes(htmlspecialchars_decode(get_the_title())).'\" />';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\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* OPEN GRAPH DESCRIPTION\t\t\t\t\t\t\t *\n\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\n\t\t\t\t\t\t// Open Graph Description: Create an open graph description meta tag\n\t\t\t\t\t\tif($info['description']):\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an social media description, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:description\" content=\"'.$info['description'].'\" />';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\telseif(isset($yoast_og_description) && $yoast_og_description):\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an description over in Yoast, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:description\" content=\"'.$yoast_og_description.'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\telseif(isset($yoast_seo_description) && $yoast_seo_description):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an description over in Yoast, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:description\" content=\"'.$yoast_seo_description.'\" />';\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// If nothing else is defined, let's use the post excerpt\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:description\" content=\"'.convert_smart_quotes(htmlspecialchars_decode(sw_get_excerpt_by_id($info['postID']))).'\" />';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\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* OPEN GRAPH IMAGE\t\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\n\t\t\t\t\t\t// Open Graph Image: Create an open graph image meta tag\n\t\t\t\t\t\tif($info['imageURL']):\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an image, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:image\" content=\"'.$info['imageURL'].'\" />';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\telseif(isset($yoast_og_image) && $yoast_og_image):\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the user defined an image over in Yoast, let's use it.\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:image\" content=\"'.$yoast_og_image.'\" />';\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// If nothing else is defined, let's use the post Thumbnail as long as we have the URL cached\n\t\t\t\t\t\t\t$og_image = get_post_meta( $info['postID'] , 'sw_open_thumbnail_url' , true );\n\t\t\t\t\t\t\tif($og_image):\n\t\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:image\" content=\"'.$og_image.'\" />';\n\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\tendif;\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* OPEN GRAPH URL & Site Name\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:url\" content=\"'.get_permalink().'\" />';\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:site_name\" content=\"'.get_bloginfo('name').'\" />';\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* OPEN GRAPH AUTHOR\t\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\n\t\t\t\t\t\t// Add the Facebook Author URL\n\t\t\t\t\t\tif( get_the_author_meta ( 'sw_fb_author' , sw_get_author($info['postID'])) ):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Output the Facebook Author URL\n\t\t\t\t\t\t\t$facebook_author = get_the_author_meta ( 'sw_fb_author' , sw_get_author($info['postID']));\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"article:author\" content=\"'.$facebook_author.'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\telseif( get_the_author_meta ( 'facebook' , sw_get_author($info['postID'])) && defined('WPSEO_VERSION')):\n\n\t\t\t\t\t\t\t// Output the Facebook Author URL\n\t\t\t\t\t\t\t$facebook_author = get_the_author_meta ( 'facebook' , sw_get_author($info['postID']));\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"article:author\" content=\"'.$facebook_author.'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\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* OPEN GRAPH PUBLISHER\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If they have a Facebook Publisher URL in our settings...\n\t\t\t\t\t\tif(isset($info['sw_user_options']['facebookPublisherUrl']) && $info['sw_user_options']['facebookPublisherUrl'] != ''):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Output the Publisher URL\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"article:publisher\" content=\"'.$info['sw_user_options']['facebookPublisherUrl'].'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If they have a Facebook Publisher URL in Yoast's settings...\n\t\t\t\t\t\telseif(isset($wpseo_social) && isset($wpseo_social['facebook_site']) && $wpseo_social['facebook_site'] != ''):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Output the Publisher URL\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"article:publisher\" content=\"'.$wpseo_social['facebook_site'].'\" />';\t\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"article:published_time\" content=\"'.get_post_time('c').'\" />';\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"article:modified_time\" content=\"'.get_post_modified_time('c').'\" />';\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"og:updated_time\" content=\"'.get_post_modified_time('c').'\" />';\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* OPEN GRAPH APP ID\t\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the Facebook APP ID is in our settings...\n\t\t\t\t\t\tif(isset($info['sw_user_options']['facebookAppID']) && $info['sw_user_options']['facebookAppID'] != ''):\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Output the Facebook APP ID\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"fb:app_id\" content=\"'.$info['sw_user_options']['facebookAppID'].'\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the Facebook APP ID is set in Yoast's settings...\n\t\t\t\t\t\telseif(isset($wpseo_social) && isset($wpseo_social['fbadminapp']) && $wpseo_social['fbadminapp'] != ''):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Output the Facebook APP ID\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"fb:app_id\" content=\"'.$wpseo_social['fbadminapp'].'\" />';\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\t// Output the Facebook APP ID\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta property=\"fb:app_id\" content=\"529576650555031\" />';\n\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\t// Return the variable containing our information for the meta tags\n\t\t\t\treturn $info;\n\t\t\t\t\n\t\t\t}", "function get_tags_og_protocol() {\n echo '<meta property=\"og:description\" content=\"'. get_bloginfo( \"description\" ) .'\">\n <meta property=\"og:image\" content=\"'. get_icon_url(\"og-image.jpg\", \"favicons\") .'\">\n <meta property=\"og:locale\" content=\"'. get_bloginfo( \"language\" ) .'\">\n <meta property=\"og:site_name\" content=\"'. get_bloginfo( \"short_name\" ) .'\">\n <meta property=\"og:title\" content=\"'. get_bloginfo( \"name\" ) .'\"> \n <meta property=\"og:type\" content=\"website\">\n <meta property=\"og:url\" content=\"'. get_bloginfo( \"url\" ) .'\">';\n}", "protected function setOgTags()\n {\n if ($this->arResult['OG_TAGS']['TITLE'])\n {\n Asset::getInstance()->addString('<meta property=\"og:title\" content=\"'.$this->arResult['OG_TAGS']['TITLE'].'\" />', true);\n }\n\n if ($this->arResult['OG_TAGS']['DESCRIPTION'])\n {\n Asset::getInstance()->addString('<meta property=\"og:description\" content=\"'.$this->arResult['OG_TAGS']['DESCRIPTION'].'\" />', true);\n }\n\n if ($this->arResult['OG_TAGS']['URL'])\n {\n Asset::getInstance()->addString('<meta property=\"og:url\" content=\"'.$this->arResult['OG_TAGS']['URL'].'\" />', true);\n }\n\n if ($this->arResult['OG_TAGS']['IMAGE'])\n {\n Asset::getInstance()->addString('<meta property=\"og:image\" content=\"'.$this->arResult['OG_TAGS']['IMAGE'].'\" />', true);\n }\n }", "public function getSeoDescription(){ return $this->seo_description; }", "function dp_fb_ogtags(){\n\t$site_name = esc_attr(get_option('blogname'));\n\t$type = is_front_page() ? 'website' : 'article';\n\t$url = get_permalink();\n\t$title = wp_title( '|', false, 'right' );\n\t$desc = dp_get_doc_desc();\n\t$image = '';\n\t$admins = '';\n\t\n\t// Get image\n if (is_singular()) {\n\t\t\tglobal $post;\n\t\t\t\n\t\t\t// Get image by feature image\n\t\t\t$image = dp_thumb_url('large', false, $post->ID);\n\t\t\t\n\t\t\t// Get image from post attachments\n\t\t\tif(empty($image) && $images = get_children('post_type=attachment&post_mime_type=image&post_parent='.$post->ID))\n\t\t\t\tif (is_array($images) && !empty($images))\n\t\t\t\t\t$image = wp_get_attachment_thumb_url(current($images)->ID);\n\t\t\t\n\t\t\t// Get first image from post content\n\t\t\tif(empty($image) && preg_match('/<img[^>]*src=([\\'\"])(.*?)\\\\1/i', $post->post_content, $matches))\n\t\t\t\t$image = $matches[2];\n }\n\t\n\t// Generate meta tags\n\t$nl = \"\\n\";\n\t$tags = '';\n\t$tags .= '<meta property=\"og:site_name\" content=\"'.$site_name.'\" />'.$nl;\n\t$tags .= '<meta property=\"og:type\" content=\"'.$type.'\" />'.$nl;\n\t$tags .= '<meta property=\"og:url\" content=\"'.$url.'\" />'.$nl;\n\tif($title)\n\t\t$tags .= '<meta property=\"og:title\" content=\"'.$title.'\" />'.$nl;\n\tif($desc)\n\t\t$tags .= '<meta property=\"og:description\" content=\"'. esc_attr($desc).'\" />'.$nl;\n\tif($image)\n\t\t$tags .= '<meta property=\"og:image\" content=\"'.$image.'\" />'.$nl;\n\tif($admins)\n\t\t$tags .= '<meta property=\"fb:admins\" content=\"'.esc_attr($admins).'\" />'.$nl;\n\n\techo $tags;\n}", "public function display_seo() {\n\n\t}", "function fb_add_og_protocol() {\n\tglobal $post;\n\n\t$meta_tags = array(\n\t\t'http://ogp.me/ns#locale' => fb_get_locale(),\n\t\t'http://ogp.me/ns#site_name' => get_bloginfo( 'name' ),\n\t\t'http://ogp.me/ns#type' => 'website'\n\t);\n\t\n\tif ( is_home() || is_front_page() ) {\n\t\t$meta_tags['http://ogp.me/ns#title'] = get_bloginfo( 'name' );\n\t\t$meta_tags['http://ogp.me/ns#description'] = get_bloginfo( 'description' );\n\t} else if ( is_single() ) {\n\t\t$post_type = get_post_type();\n\t\t$meta_tags['http://ogp.me/ns#type'] = 'article';\n\t\t$meta_tags['http://ogp.me/ns#url'] = apply_filters( 'rel_canonical', get_permalink() );\n\t\tif ( post_type_supports( $post_type, 'title' ) )\n\t\t\t$meta_tags['http://ogp.me/ns#title'] = get_the_title();\n\t\tif ( post_type_supports( $post_type, 'excerpt' ) ) {\n\t\t\t// thanks to Angelo Mandato (http://wordpress.org/support/topic/plugin-facebook-plugin-conflicts-with-powerpress?replies=16)\n\t\t\t// Strip and format the wordpress way, but don't apply any other filters which adds junk that ends up getitng stripped back out\n\t\t\tif ( !post_password_required($post) ) {\n\t\t\t\t// First lets get the post excerpt (shouldn't have any html, but anyone can enter anything...)\n\t\t\t\t$desc_no_html = $post->post_excerpt;\n\t\t\t\tif ( !empty($excerpt_no_html) ) {\n\t\t\t\t\t$desc_no_html = strip_shortcodes($desc_no_html); // Strip shortcodes first in case there is HTML inside the shortcode\n\t\t\t\t\t$desc_no_html = wp_strip_all_tags($desc_no_html); // Strip all html\n\t\t\t\t\t$desc_no_html = trim($desc_no_html); // Trim the final string, we may have stripped everything out of the post so this will make the value empty if that's the case\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Recheck if empty, may be that the strip functions above made excerpt empty, doubhtful but we want to be 100% sure.\n\t\t\t\tif( empty($desc_no_html) ) {\n\t\t\t\t\t$desc_no_html = $post->post_content; // Start over, this time with the post_content\n\t\t\t\t\t$desc_no_html = strip_shortcodes( $desc_no_html ); // Strip shortcodes first in case there is HTML inside the shortcode\n\t\t\t\t\t$desc_no_html = str_replace(']]>', ']]&gt;', $desc_no_html); // Angelo Recommendation, if for some reason ]]> happens to be in the_content, rare but We've seen it happen\n\t\t\t\t\t$desc_no_html = wp_strip_all_tags($desc_no_html);\n\t\t\t\t\t$excerpt_length = apply_filters('excerpt_length', 55);\n\t\t\t\t\t$excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');\n\t\t\t\t\t$desc_no_html = wp_trim_words( $desc_no_html, $excerpt_length, $excerpt_more );\n\t\t\t\t\t$desc_no_html = trim($desc_no_html); // Trim the final string, we may have stripped everything out of the post so this will make the value empty if that's the case\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$desc_no_html = str_replace( array( \"\\r\\n\", \"\\r\", \"\\n\" ), ' ',$desc_no_html); // I take it Facebook doesn't like new lines?\n\t\t\t\t$meta_tags['http://ogp.me/ns#description'] = $desc_no_html;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$meta_tags['http://ogp.me/ns/article#published_time'] = get_the_date('c');\n\t\t$meta_tags['http://ogp.me/ns/article#modified_time'] = get_the_modified_date('c');\n\t\t\n\t\tif ( post_type_supports( $post_type, 'author' ) && isset( $post->post_author ) )\n\t\t\t$meta_tags['http://ogp.me/ns/article#author'] = get_author_posts_url( $post->post_author );\n\n\t\t// add the first category as a section. all other categories as tags\n\t\t$cat_ids = get_the_category();\n\t\t\n\t\tif ( ! empty( $cat_ids ) ) {\n\t\t\t$cat = get_category( $cat_ids[0] );\n\t\t\t\n\t\t\tif ( ! empty( $cat ) )\n\t\t\t\t$meta_tags['http://ogp.me/ns/article#section'] = $cat->name;\n\n\t\t\t//output the rest of the categories as tags\n\t\t\tunset( $cat_ids[0] );\n\t\t\t\n\t\t\tif ( ! empty( $cat_ids ) ) {\n\t\t\t\t$meta_tags['http://ogp.me/ns/article#tag'] = array();\n\t\t\t\tforeach( $cat_ids as $cat_id ) {\n\t\t\t\t\t$cat = get_category( $cat_id );\n\t\t\t\t\t$meta_tags['http://ogp.me/ns/article#tag'][] = $cat->name;\n\t\t\t\t\tunset( $cat );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// add tags. treat tags as lower priority than multiple categories\n\t\t$tags = get_the_tags();\n\t\t\n\t\tif ( $tags ) {\n\t\t\tif ( ! array_key_exists( 'http://ogp.me/ns/article#tag', $meta_tags ) )\n\t\t\t\t$meta_tags['http://ogp.me/ns/article#tag'] = array();\n\t\t\t\t\n\t\t\tforeach ( $tags as $tag ) {\n\t\t\t\t$meta_tags['http://ogp.me/ns/article#tag'][] = $tag->name;\n\t\t\t}\n\t\t}\n\n\t\t// does current post type and the current theme support post thumbnails?\n\t\tif ( post_type_supports( $post_type, 'thumbnail' ) && function_exists( 'has_post_thumbnail' ) && has_post_thumbnail() ) {\n\t\t\tlist( $post_thumbnail_url, $post_thumbnail_width, $post_thumbnail_height ) = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );\n\t\t\t\n\t\t\tif ( ! empty( $post_thumbnail_url ) ) {\n\t\t\t\t$image = array( 'url' => $post_thumbnail_url );\n\n\t\t\t\tif ( ! empty( $post_thumbnail_width ) )\n\t\t\t\t\t$image['width'] = absint( $post_thumbnail_width );\n\n\t\t\t\tif ( ! empty($post_thumbnail_height) )\n\t\t\t\t\t$image['height'] = absint( $post_thumbnail_height );\n\t\t\t\t\t\n\t\t\t\t$meta_tags['http://ogp.me/ns#image'] = array( $image );\n\t\t\t}\n\t\t}\n\t}\n\telse if ( is_author() && isset( $post->post_author ) ) {\n\t\t$meta_tags['http://ogp.me/ns#type'] = 'profile';\n\t\t$meta_tags['http://ogp.me/ns/profile#first_name'] = get_the_author_meta( 'first_name', $post->post_author );\n\t\t$meta_tags['http://ogp.me/ns/profile#last_name'] = get_the_author_meta( 'last_name', $post->post_author );\n\t\tif ( is_multi_author() )\n\t\t\t$meta_tags['http://ogp.me/ns/profile#username'] = get_the_author_meta( 'login', $post->post_author );\n\t}\n\telse if ( is_page() ) {\n\t\t$meta_tags['http://ogp.me/ns#type'] = 'article';\n\t\t$meta_tags['http://ogp.me/ns#title'] = get_the_title();\n\t\t$meta_tags['http://ogp.me/ns#url'] = apply_filters( 'rel_canonical', get_permalink() );\n\t}\n\n\t$options = get_option( 'fb_options' );\n\t\n\tif ( ! empty( $options['app_id'] ) )\n\t\t$meta_tags['http://ogp.me/ns/fb#app_id'] = $options['app_id'];\n\n\t$meta_tags = apply_filters( 'fb_meta_tags', $meta_tags, $post );\n\n\tforeach ( $meta_tags as $property => $content ) {\n\t\tfb_output_og_protocol( $property, $content );\n\t}\n}", "function thinkup_opengraph_filter ( $tu_post ) {\n\n if ( $tu_post->html ) {\n $doc = new DomDocument();\n $doc->loadHTML($tu_post->html);\n $xpath = new DOMXPath($doc);\n $query = '//*/meta[starts-with(@property, \\'og:\\')]';\n $metas = $xpath->query($query);\n foreach ($metas as $meta) {\n $property = $meta->getAttribute('property');\n $content = $meta->getAttribute('content');\n $tu_post->metadata['opengraph'][$property] = $content;\n }\n }\n\n return $tu_post;\n}", "public function ogTags()\n {\n include $this->partial_selector( 'head/og' );\n }", "function writeMetatags($description) {\r\n echo '<meta name=\"author\" content=\"Stephen Wallace\">' . \"\\n\";\r\n echo \"<meta name=\\\"description\\\" content=\\\"$description\\\">\\n\";\r\n}", "function bt_remove_og_sitename( $og_sitename ) {\n return false;\n}", "function fs_remove_default_description( $bloginfo ) {\r\n\t$default_tagline = 'Just another WordPress site';\r\n\r\n\treturn ( $bloginfo === $default_tagline ) ? '' : $bloginfo;\r\n}", "function insert_fb_in_head()\n{\n\t\tglobal $post;\n\t\tif (!is_singular()) //if it is not a post or a page\n\t\t\t\treturn;\n\n\t\tif ($excerpt = $post->post_excerpt)\n\t\t{\n\t\t\t\t$excerpt = strip_tags($post->post_excerpt);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\t$excerpt = get_bloginfo('description');\n\t\t}\n\n\t\t//echo '<meta property=\"fb:app_id\" content=\"YOUR APPID\"/>'; //<-- this is optional\n\t\techo '<meta property=\"og:title\" content=\"' . get_the_title() . '\"/>';\n\t\techo '<meta property=\"og:description\" content=\"' . $excerpt . '\"/>';\n\t\techo '<meta property=\"og:type\" content=\"article\"/>';\n\t\techo '<meta property=\"og:url\" content=\"' . get_permalink() . '\"/>';\n\t\techo '<meta property=\"og:site_name\" content=\"' . get_bloginfo() . '\"/>';\n\n\t\techo '<meta name=\"twitter:title\" content=\"' . get_the_title() . '\"/>';\n\t\techo '<meta name=\"twitter:card\" content=\"summary\" />';\n\t\techo '<meta name=\"twitter:description\" content=\"' . $excerpt . '\" />';\n\t\techo '<meta name=\"twitter:url\" content=\"' . get_permalink() . '\"/>';\n\n\t\tif (!has_post_thumbnail($post->ID))\n\t\t{\n\t\t\t\t//the post does not have featured image, use a default image\n\t\t\t\t//$default_image = \"http://example.com/image.jpg\"; //<--replace this with a default image on your server or an image in your media library\n\t\t\t\t//echo '<meta property=\"og:image\" content=\"' . $default_image . '\"/>';\n\t\t\t\t//echo '<meta name=\"twitter:image\" content=\"' . $default_image . '\"/>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\t$thumbnail_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'large');\n\t\t\t\techo '<meta property=\"og:image\" content=\"' . esc_attr($thumbnail_src[0]) . '\"/>';\n\t\t\t\techo '<meta name=\"twitter:image\" content=\"' . esc_attr($thumbnail_src[0]) . '\"/>';\n\t\t}\n}", "protected function set_meta_desc()\r\r\n {\r\r\n define('_KEYWORDS',_BUY_ONLINE);\r\r\n define('_DESCRIPTION',_BUY_ONLINE);\r\r\n define('_TITLE_PAGE',_BUY_ONLINE);\r\r\n }", "function seo_details($title=null, $keyword=null,$desc=null, $image=null ){\n if(empty ($keyword)){$keyword=\"Fiorano ESB, Fiorano MQ, ESB, Fiorano, Psd2, Whitpaper, Solution Psd2, Digital Banking, business architecture, BPM, operational intelligence, Application Architecture, business integration,Banking, real-time analytics, real-time big data, Platform-as-a-service, digital Transformation\"; }\n if(empty ($title)){\n $title=\"Fiorano Software Technologies \";\n }\n if(empty ($desc)){\n $desc=\"Founded in 1995, Fiorano is a leading provider of JMS, including Service-Oriented Architecture (SOA), Enterprise Messaging, Java Messaging Service, JMS Server, SAP integration , Messaging Queue, SAP Solutions, Enterprise Service Bus, ESB, PSD2 enterprise middleware and peer-to-peer distributed systems\";\n }\n if(empty ($image)){\n $image =\"http://www.fiorano.com/new/assets/images/fiorano_logo.png\";\n }\n $seo=' <meta name=\"viewport\" content=\"width=device-width,initial-scale=1, maximum-scale=1\">\n <meta name=\"keywords\" content=\"'.$keyword.'\"/>\n <meta name=\"description\" content=\"'.$desc.'\" />\n <meta name=\"classification\" content=\"'.$desc.'\"/>\n <meta name=\"twitter:card\" content=\"summary\">\n <meta name=\"twitter:site\" content=\"@fiorano\">\n <meta name=\"twitter:title\" content=\"'.$title.'\" >\n <meta name=\"twitter:description\" content=\"'.$desc.'\">\n <meta name=\"twitter:image\" content=\"'.$image.'\">\n <meta property=\"og:title\" content=\"'.$title.'\" />\n <meta property=\"og:type\" content=\"article\" />\n <meta property=\"og:url\" content=\"http://www.fiorano.com/new/\" />\n <meta property=\"og:image\" content=\"'.$image.'\"/>\n <meta property=\"og:description\" content=\"'.$desc.'\" />\n <meta property=\"og:site_name\" content=\"http://www.fiorano.com\" />\n ';\n return $seo;\n}", "function newenglish_remove_default_description($bloginfo) {\n $default_tagline = 'Just another WordPress site';\n return ($bloginfo === $default_tagline) ? '' : $bloginfo;\n}", "function site_description($site_desc = '', $location = 'site-tagline') {\n\t\t\t$desc = json_decode($this->get_cached_mod($location));\n\t\t\t$is_image_mode = isset($desc->mode) && 'image' === $desc->mode && !empty($desc->src);\n\t\t\t$url = apply_filters('themify_customizer_tagline_url', !empty($desc->link) ? $desc->link : home_url() );\n\t\t\t$html = !empty($desc->link) ? '<a class=\"site-taglink\" href=\"' . esc_attr($url) .'\" >' : '';\n\t\t\tif ( $is_image_mode===true) {\n\t\t\t\t$alt = get_post_meta( $desc->id, '_wp_attachment_image_alt', true ) ?: $site_desc;\n\t\t\t\t$title = get_the_title( $desc->id ) ?: $site_desc;\n\t\t\t\t$html .= '<img src=\"' . esc_url(themify_https_esc($desc->src)) . '\" alt=\"' . esc_attr( $alt ) . '\" title=\"' . esc_attr( $title ) . '\">';\n\t\t\t\tif(is_customize_preview()){\n\t\t\t\t $html .= '<span style=\"display: none;\">' . esc_html($site_desc) . '</span>' ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$html .= '<span>' . html_entity_decode($site_desc) . '</span>';\n\t\t\t}\n\t\t\t$html .= ( !empty($desc->link) ) ? '</a>' : '';\n\t\t\treturn $html;\n\t\t}", "function wpcom_vip_meta_desc() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n\n $text = wpcom_vip_get_meta_desc();\n if ( !empty( $text ) ) {\n echo \"\\n<meta name=\\\"description\\\" content=\\\"$text\\\" />\\n\";\n }\n}", "function cosmetro_site_description() {\n\t$show_desc = get_theme_mod( 'show_tagline', cosmetro_theme()->customizer->get_default( 'show_tagline' ) );\n\n\tif ( ! $show_desc ) {\n\t\treturn;\n\t}\n\n\t$description = get_bloginfo( 'description', 'display' );\n\n\tif ( ! ( $description || is_customize_preview() ) ) {\n\t\treturn;\n\t}\n\n\t$format = apply_filters( 'cosmetro_site_description_format', '<div class=\"site-description\">%s</div>' );\n\n\tprintf( $format, $description );\n}", "function insert_fb_in_head() {\n\tglobal $post;\n\tif ( !is_singular()) {//if it is not a post or a page\n\t\treturn;\n } else {\n $tf_url = get_permalink();\n $tf_title = get_the_title();\n \n if( custom_field_excerpt() ):\n $tf_desc = wp_strip_all_tags(custom_field_excerpt());\n elseif( custom_field_excerpt2() ):\n $tf_desc = wp_strip_all_tags(custom_field_excerpt2());\n elseif( custom_field_excerpt3() ):\n $tf_desc = wp_strip_all_tags(custom_field_excerpt3());\n else :\n $tf_desc = wp_strip_all_tags(get_the_excerpt());\n endif;\n \n if (has_post_thumbnail()) {\n $thumbid = get_post_thumbnail_id();\n $imgurl = wp_get_attachment_url( $thumbid );\n } else {\n $imgurl = home_url() . '/wp-content/themes/settlementPC/library/images/eo-livelearn.png';\n }\n $tf_name = str_replace('@', '', get_the_author_meta('twitter'));\n ?>\n <meta name=\"twitter:card\" value=\"summary\" />\n <meta name=\"twitter:url\" value=\"<?php echo $tf_url; ?>\" />\n <meta name=\"twitter:title\" value=\"<?php echo $tf_title; ?>\" />\n \n <meta name=\"twitter:image\" value=\"<?php echo $imgurl; ?>\" />\n <meta name=\"twitter:site\" value=\"@EnglishOnlineMB\" />\n <?php if($tf_name) { ?>\n \n <meta name=\"twitter:creator\" value=\"@<?php echo $tf_name; ?>\" />\n \n <?php }\n \n echo '<meta property=\"og:title\" content=\"' . $tf_title . '\"/>';\n echo '<meta property=\"og:type\" content=\"article\"/>';\n echo '<meta property=\"og:url\" content=\"' . $tf_url . '\"/>';\n echo '<meta property=\"og:site_name\" content=\"Live &amp; Learn: a project of English Online Inc.\"/>';\n echo '<meta property=\"og:description\" content=\"' . $tf_desc . '\"/>';\n echo '<meta property=\"og:image\" content=\"' . $imgurl . '\"/>';\n }\n \n}", "function remove_default_description( $bloginfo ) {\n\t$default_tagline = 'Just another WordPress site';\n\n\treturn ( $bloginfo === $default_tagline ) ? '' : $bloginfo;\n}", "function insert_fb_in_head()\r\n{\r\n global $post;\r\n if (!is_singular()) //if it is not a post or a page\r\n return;\r\n\r\n if ($excerpt = $post->post_excerpt)\r\n {\r\n $excerpt = strip_tags($post->post_excerpt);\r\n }\r\n else\r\n {\r\n $excerpt = get_bloginfo('description');\r\n }\r\n\r\n echo '<meta property=\"fb:app_id\" content=\"YOUR APPID\"/>'; //<-- this is optional\r\n echo '<meta property=\"og:title\" content=\"' . get_the_title() . '\"/>';\r\n echo '<meta property=\"og:description\" content=\"' . $excerpt . '\"/>';\r\n echo '<meta property=\"og:type\" content=\"article\"/>';\r\n echo '<meta property=\"og:url\" content=\"' . get_permalink() . '\"/>';\r\n echo '<meta property=\"og:site_name\" content=\"' . get_bloginfo() . '\"/>';\r\n\r\n echo '<meta name=\"twitter:title\" content=\"' . get_the_title() . '\"/>';\r\n echo '<meta name=\"twitter:card\" content=\"summary\" />';\r\n echo '<meta name=\"twitter:description\" content=\"' . $excerpt . '\" />';\r\n echo '<meta name=\"twitter:url\" content=\"' . get_permalink() . '\"/>';\r\n\r\n if (!has_post_thumbnail($post->ID))\r\n {\r\n //the post does not have featured image, use a default image\r\n $default_image = \"https://www.absolutefencinggear.com/shopping/images/Not_available.jpg\"; //<--replace this with a default image on your server\r\n echo '<meta property=\"og:image\" content=\"' . $default_image . '\"/>';\r\n echo '<meta name=\"twitter:image\" content=\"' . $default_image . '\"/>';\r\n }\r\n else\r\n {\r\n $thumbnail_src = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'medium');\r\n echo '<meta property=\"og:image\" content=\"' . esc_attr($thumbnail_src[0]) . '\"/>';\r\n echo '<meta name=\"twitter:image\" content=\"' . esc_attr($thumbnail_src[0]) . '\"/>';\r\n }\r\n}", "static function description(): string {\r\n return 'A website owned or used by The Medium'; \r\n }", "public function customize_partial_blogdescription() {\n bloginfo('description');\n }", "function arras_document_description() {\n\tif ( class_exists('All_in_One_SEO_Pack') || class_exists('Platinum_SEO_Pack') ) return false;\n\t\n\tif ( is_single() || is_page() ) {\n\t\tif ( have_posts() ) {\n\t\t\twhile( have_posts() ) {\n\t\t\t\tthe_post();\n\t\t\t\techo '<meta name=\"description\" content=\"' . get_the_excerpt() . '\" />';\n\t\t\t}\n\t\t}\n\t} else {\n\t\techo '<meta name=\"description\" content=\"' . get_bloginfo('description') . '\" />';\n\t}\n}", "protected function setSeoTags()\n {\n global $APPLICATION;\n\n if ($this->arParams['SET_SEO_TAGS'] !== 'Y')\n {\n return false;\n }\n\n if ($this->arResult['SEO_TAGS']['TITLE'])\n {\n $APPLICATION->SetPageProperty('title', $this->arResult['SEO_TAGS']['TITLE']);\n }\n\n if ($this->arResult['SEO_TAGS']['DESCRIPTION'])\n {\n $APPLICATION->SetPageProperty('description', $this->arResult['SEO_TAGS']['DESCRIPTION']);\n }\n\n if ($this->arResult['SEO_TAGS']['KEYWORDS'])\n {\n $APPLICATION->SetPageProperty('keywords', $this->arResult['SEO_TAGS']['KEYWORDS']);\n }\n }", "public function daveyjacobson_customize_partial_blogdescription() {\n \tbloginfo( 'description' );\n }", "public function getDefaultOGDescription()\n {\n // Use MetaDescription if set\n if ($this->owner->MetaDescription) {\n $description = trim($this->owner->MetaDescription);\n if (!empty($description)) {\n return $description;\n }\n }\n\n // Fall back to Content\n if ($this->owner->Content) {\n $description = trim($this->owner->obj('Content')->Summary(20, 5));\n if (!empty($description)) {\n return $description;\n }\n }\n\n return false;\n }", "public static function add_opengraph($type) {\n\thead(\n\t\t'<meta property=\"og:title\" content=\"'.str_replace('\"','',strip_tags($type->title)).'\" />'._NL\n\t\t. '<meta property=\"og:type\" content=\"'.$type->type.'\" />'._NL\n\t\t. '<meta property=\"og:url\" content=\"'.cfg('domain').$type->url.'\" />'\n\t);\n\tif ($type->image) {\n\t\t$imgUrl=(preg_match('/^http\\:\\/\\/|https\\:\\/\\/|\\/\\//i',$type->image)?'':cfg('domain')).$type->image;\n\t\thead('<meta property=\"og:image\" content=\"'.$imgUrl.'\" />');\n\t\thead('<link rel=\"image_src\" href=\"'.$imgUrl.'\" />');\n\t}\n\tif ($type->description) head('<meta property=\"og:description\" content=\"'.trim(str_replace(array('\"','\\'',\"\\r\",\"\\n\",' '),array('','',' ',' ',' '),strip_tags($type->description))).'\" />');\n}", "function fabric_remove_default_description($bloginfo) {\n $default_tagline = 'Just another WordPress site';\n return ($bloginfo === $default_tagline) ? '' : $bloginfo;\n}", "function site_description() {\n\treturn site_meta('description');\n}", "function ci_slogan($before=\"\", $after=\"\"){ \n\t$slogan = get_bloginfo('description');\n\t$snippet = $before.$slogan.$after;\n\tif (!empty($slogan))\n\t\treturn $snippet;\n\telse\n\t\treturn FALSE;\n}", "public function opensearchdescription() {\n // Set the correct content type\n $this->response->type('application/opensearchdescription+xml');\n // and return the default view\n return;\n }", "function glbs_tax_seo_meta() {\n\tif ( glbs_is_tax() ) {\n\t\t$id = get_queried_object_id();\n\t\t$keyword = get_term_meta( $id, 'basic_seo_keywords', true );\n\t\t$desc = get_term_meta( $id, 'basic_seo_description', true );\n\t\t?>\n\t\t<?php if ( ! empty( $keyword ) ) : ?>\n\t\t\t<!-- Basic SEO Keywords-->\n\t\t\t<meta name=\"keywords\" content=\"<?php echo $keyword; ?>\">\n\t\t<?php endif; ?>\n\t\t<?php if ( ! empty( $desc ) ) : ?>\n\t\t\t<!-- Basic SEO Description-->\n\t\t\t<meta name=\"description\" content=\"<?php echo $desc; ?>\">\n\t\t<?php endif; ?>\n\t\t<?php\n\t}\n}", "function add_meta_to_plugin_pages() {\r\n echo '<meta name=\"robots\" content=\"noindex\"/>';\r\n echo '<meta name=\"robots\" content=\"nofollow\"/>';\r\n }", "function deft_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "function _supply_ontario_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "function fiveh_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "function header_meta() {\n\t/**\n\t * Filter the path used for the site's humans.txt attribution file\n\t *\n\t * @param string $humanstxt\n\t */\n\t$humanstxt = apply_filters( 'additive_humans', ADDITIVE_TEMPLATE_URL . '/humans.txt' );\n\n\techo '<link type=\"text/plain\" rel=\"author\" href=\"' . esc_url( $humanstxt ) . '\" />';\n}", "function ubiq_add_socialgraph() {\n if (!get_option('ubiq_fb_opengraph')) { return; }\n\n if (is_single()) {\n global $post;\n \n $image_id = get_post_thumbnail_id();\n $image_url = wp_get_attachment_image_src($image_id,'large', true);\n \n \n $content = $post->post_content;\n $content = strip_shortcodes( $content );\n \t\t$content = strip_tags($content);\n\t\t$excerpt_length = 55;\n\t\t$words = explode(' ', $content, $excerpt_length + 1);\n\t\tif(count($words) > $excerpt_length) :\n\t\t\tarray_pop($words);\n\t\t\tarray_push($words, '...');\n\t\t\t$content = implode(' ', $words);\n\t\tendif;\n \n ?>\n <meta property=\"og:title\" content=\"<?php the_title() ?>\"/>\n <meta property=\"og:type\" content=\"article\"/>\n <meta property=\"og:url\" content=\"<?php echo get_permalink() ?>\"/>\n <?php\n if (get_the_post_thumbnail()) {\n ?>\n <meta property=\"og:image\" content=\"<?php echo $image_url[0] ?>\"/>\n <?php } else { ?>\n <meta property=\"og:image\" content=\"<?php header_image(); ?>\"/>\n <?php } ?>\n <meta property=\"og:site_name\" content=\"<?php echo get_bloginfo('name') ?>\"/> \n <meta property=\"og:description\" content=\"<?php echo $content ?>\"/>\n <?php if (get_option('ubiq_fb_appid')) { ?>\n <meta property=\"fb:app_id\" content=\"<?php echo get_option('ubiq_fb_appid') ?>\" />\n <?php } ?>\n <?php\n if (function_exists('sharing_display')) {\n add_filter( 'excerpt_length', 'calculate_excerpt_length' ); \n add_filter( 'the_excerpt', 'sharing_display', 19 );\n }\n } else if(is_home()) {\n ?>\n <meta property=\"og:title\" content=\"<?php echo get_bloginfo('name') ?>\"/>\n <meta property=\"og:type\" content=\"website\"/>\n <meta property=\"og:url\" content=\"<?php bloginfo('url') ?>\"/>\n <meta property=\"og:image\" content=\"<?php header_image(); ?>\"/>\n <meta property=\"og:site_name\" content=\"<?php echo get_bloginfo('name') ?>\"/> \n <meta property=\"og:description\" content=\"<?php echo bloginfo('description') ?>\"/>\n <?php if (get_option('ubiq_fb_appid')) { ?>\n <meta property=\"fb:app_id\" content=\"<?php echo get_option('ubiq_fb_appid') ?>\" />\n <?php } ?>\n <?php\n }\n}", "public function setDescription($description) {\n\t\tTemplate::setSiteMetaDescription($description);\n\t}", "private function generateDefaultMetas($title, $description)\n\t{\n\t\t$metas = array(\n\t\t\t'title' => $title, \n\t\t\t'name' => array(\n\t\t\t 'description' => $description, \n\t\t\t 'twitter:card' => 'summary', \n\t\t\t 'twitter:site' => app_env('APP_TWITTER'), \n\t\t\t 'twitter:title' => $title, \n\t\t\t 'twitter:description' => $description, \n\t\t\t 'twitter:creator' => app_env('APP_TWITTER'), \n\t\t\t //Choose large image over small\n\t\t\t //At least 120px * 120px\n\t\t\t //No larger than 1Mb\n\t\t\t 'twitter:image' => app_env('APP_HOST') . DS . 'public/images/twitter_default_image.jpg', \n\t\t\t), \n\t\t\t'property' => array(\n\t\t\t 'og:title' => $title, \n\t\t\t 'og:type' => 'article', \n\t\t\t 'og:url' => app_env('APP_HOST'), \n\t\t\t //Choose large image over small\n\t\t\t //At least 200px * 200px\n\t\t\t //1200 * 630 is recommended\n\t\t\t 'og:image' => app_env('APP_HOST') . DS . 'public/images/og_default_image.jpg', \n\t\t\t 'og:site_name' => app_env('APP_NAME'), \n\t\t\t 'og:description' => $description\n\t\t\t), \n\t\t);\n\t\t\n\t\treturn $metas;\n\t}", "function get_fb_meta(){\r print('<meta property=\"og:title\" content=\"'. site_title .'\" />');\r print('<meta property=\"og:type\" content=\"'. site_type .'\" />');\r print('<meta property=\"og:url\" content=\"'. site_url .'\" />');\r print('<meta property=\"og:image\" content=\"'. site_photo_url .'\" />');\r print('<meta property=\"og:site_name\" content=\"'. site_name .'\" />');\r print('<meta property=\"fb:app_id\" content=\"'. site_fb_appid .'\" />');\r}", "function add_og_meta(){\n\n\t\tglobal $post;\n\n\t\t$options = get_option( WPC_OPTIONS );\n\n\t\t$image_url = $options[ WPC_OPTIONS_IMAGE_URL ];\n\n\t\t// check if the post has a feature image set and if the\n\t\t// feature image is at least 50x50 and has aspect ratio of 3:1 at most\n\t\tif ( function_exists( 'has_post_thumbnail' ) ){\n\t\t\tif ( has_post_thumbnail( $post->ID ) ){\n\t\n\t\t\t\t$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' );\n\t\n\t\t\t\t$image_width = $image[1];\n\t\t\t\t$image_height = $image[2];\n\t\t\t\tif ( floatval( $image_height ) > 0 ){\n\t\t\t\t\t$aspect_ratio = floatval( $image_width ) / floatval( $image_height );\n\t\t\t\t\t\n\t\t\t\t\tif ( $image_width >= 50 && $image_height >= 50 && $aspect_ratio <= 3.0 ){\n\t\t\t\t\t\t$image_url = $image[0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$separator = '|';\n\t\t$title = get_bloginfo( 'name' ) . wp_title( $separator, FALSE, 'left' );\n\n\t\t$description = str_replace( \"\\n\", \" \", $options[ WPC_OPTIONS_DESCRIPTION ] );\n\t\t$url = home_url();\n\t\t$type = 'blog';\n\n\t\tif( !is_home() ){\n\n\t\t\t$url = get_permalink( $post->ID );\n\t\t\t$type = 'website';\n\n\t\t\tif ( !empty( $post->post_excerpt ) ){\n\t\t\t\t$description = $post->post_excerpt;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$description = $post->post_content;\n\t\t\t}\n\n\t\t\tif ( is_page() ){}\n\t\t\telseif( is_sticky() ){}\n\t\t\telseif( is_attachment() ){}\n\t\t\telseif ( is_tag() ){\n\n\t\t\t\t$tagname = get_query_var( 'tag' );\n\t\t\t\t$tags = get_tags( 'slug=' . $tagname );\n\t\t\t\t$tag = $tags[0];\n\n\t\t\t\t$description = $tag->description;\n\t\t\t\t$url = get_tag_link( $tag->term_id );\n\n\t\t\t}\n\t\t\telseif ( is_single() ){\n\t\t\t\t$type = 'article';\n\t\t\t}\n\t\t\telseif ( is_category() ){\n\n\t\t\t\t$categories = get_the_category();\n\t\t\t\t$category = $categories[0];\n\n\t\t\t\t$description = $category->category_description;\n\t\t\t\t$url = get_category_link( $category->cat_ID );\n\n\t\t\t}\n\t\t\telseif ( is_archive() ){\n\n\t\t\t\t$description = $title;\n\t\t\t\t$url = \"http://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\n\t\t\t}\n\t\t}\n\n\t\t$description = $this->format_description( $post->post_content );\n\n\t\t// make sure there is a title for the url linter\n\t\tif ( empty( $title ) ){ $title = get_home_url(); }\n\n\t\t$title = htmlentities( $title, ENT_QUOTES, \"UTF-8\" );\n?>\n\t\t<!-- Wordpress Connect v<?php echo WPC_VERSION; ?> - Open Graph Meta START -->\n\t\t<meta property=\"og:site_name\" content=\"<?php bloginfo( 'name' ); ?>\" />\n\t\t<?php if ( !empty( $image_url ) ) : ?><meta property=\"og:image\" content=\"<?php echo $image_url; ?>\" /><?php endif; ?>\n\n\t\t<meta property=\"fb:admins\" content=\"<?php echo $options[ WPC_OPTIONS_APP_ADMINS ]; ?>\" />\n\t\t<meta property=\"fb:app_id\" content=\"<?php echo $options[ WPC_OPTIONS_APP_ID ]; ?>\" />\n\t\t<meta property=\"og:title\" content=\"<?php echo $title; ?>\" />\n\t\t<meta property=\"og:type\" content=\"<?php echo $type; ?>\" />\n\t\t<meta property=\"og:description\" content=\"<?php echo $description; ?>\" />\n\t\t<meta property=\"og:url\" content=\"<?php echo $url ?>\" />\n\t\t<!-- Wordpress Connect - Open Graph Meta END -->\n<?php\n\n\t}", "function superultra_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "function lalita_customize_partial_blogdescription() {\n\t\tbloginfo( 'description' );\n\t}", "function display_facebook_og(){\n global $post;\n $img_array=get_field('design_image');\n //echo '<meta property=\"og:url\" content=\"'.get_permalink($post->ID).'\"/>';\n echo '<meta property=\"og:image\" content=\"'.$img_array[\"sizes\"][\"medium\"].'\"/>';\n}", "function yoast_add_og_video() {\n if ( get_post_format() == 'video' ) {\n $post = get_post();\n preg_match('/\\[embed(.*)](.*)\\[\\/embed]/', $post->post_content, $video);\n $videoParts = explode('/',$video[2]);\n echo '<meta property=\"og:video\" content=\"' . $video[2] . '\" />', \"\\n\";\n echo '<meta property=\"og:video:secure_url\" content=\"' . str_replace('http://','https://' , $video[2]) . '\" />', \"\\n\";\n echo '<meta property=\"og:video:height\" content=\"1080\" />', \"\\n\";\n echo '<meta property=\"og:video:width\" content=\"1920\" />', \"\\n\";\n //echo '<meta property=\"og:image\" content=\"https://img.youtube.com/vi/'.$videoParts[3].'/maxresdefault.jpg\" />', \"\\n\";\n }\n}", "function add_opengraph_doctype($output)\n{\n\t\treturn $output . ' xmlns:og=\"http://opengraphprotocol.org/schema/\" xmlns:fb=\"http://www.facebook.com/2008/fbml\"';\n}", "function my_opengraph_url( $url ) {\n return false;\n}", "function header_meta() {\n\t/**\n\t * Filter the path used for the site's humans.txt attribution file\n\t *\n\t * @param string $humanstxt\n\t */\n\t$humanstxt = apply_filters( 'project_humans', Project_TEMPLATE_URL . '/humans.txt' );\n\n\techo '<link type=\"text/plain\" rel=\"author\" href=\"' . esc_url( $humanstxt ) . '\" />';\n}", "public function getMetaDescription();", "public function remove_default_description($bloginfo) {\n\t\t$default_tagline = 'Just another WordPress site';\n\t\treturn ($bloginfo === $default_tagline) ? '' : $bloginfo;\n\t}", "public function buildMetaTags()\n\t{\n\t\t/* Set basic ones */\n\t\t$this->metaTags['og:site_name'] = \\IPS\\Settings::i()->board_name;\n\t\t$this->metaTags['og:locale'] = preg_replace( \"/^([a-zA-Z0-9\\-_]+?)(?:\\..*?)$/\", \"$1\", \\IPS\\Member::loggedIn()->language()->short );\n\t\t\n\t\t/* Add the site name to the title */\n\t\tif( \\IPS\\Settings::i()->board_name )\n\t\t{\n\t\t\t$this->title .= ' - ' . \\IPS\\Settings::i()->board_name;\n\t\t}\n\t\t\n\t\t/* Add Admin-specified ones */\n\t\tif( !$this->metaTagsUrl )\n\t\t{\n\t\t\t$protocol = ( \\IPS\\Request::i()->isSecure() ) ? \"https://\" : \"http://\";\n\t\t\t$this->metaTagsUrl\t= \\IPS\\Http\\Url::external( $protocol . parse_url( \\IPS\\Settings::i()->base_url, PHP_URL_HOST ) . $_SERVER['REQUEST_URI'] );\n\t\t\t$this->metaTagsUrl\t= urldecode( mb_substr( (string) $this->metaTagsUrl, mb_strlen( \\IPS\\Settings::i()->base_url ) ) );\n\t\n\t\t\tif ( isset( \\IPS\\Data\\Store::i()->metaTags ) )\n\t\t\t{\n\t\t\t\t$rows = \\IPS\\Data\\Store::i()->metaTags;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$rows = iterator_to_array( \\IPS\\Db::i()->select( '*', 'core_seo_meta' ) );\n\t\t\t\t\\IPS\\Data\\Store::i()->metaTags = $rows;\n\t\t\t}\n\t\t\t\n\t\t\tif( is_array( $rows ) )\n\t\t\t{\n\t\t\t\tforeach ( $rows as $row )\n\t\t\t\t{\n\t\t\t\t\tif( \\strpos( $row['meta_url'], '*' ) !== FALSE )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( preg_match( \"#^\" . str_replace( '*', '(.+?)', trim( $row['meta_url'], '/' ) ) . \"$#i\", trim( $this->metaTagsUrl, '/' ) ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_tags\t= json_decode( $row['meta_tags'], TRUE );\n\t\t\n\t\t\t\t\t\t\tif( is_array( $_tags ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach( $_tags as $_tagName => $_tagContent )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif( !isset( $this->metaTags[ $_tagName ] ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$this->metaTags[ $_tagName ]\t= $_tagContent;\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\n\t\t\t\t\t\t\t/* Are we setting page title? */\n\t\t\t\t\t\t\tif( $row['meta_title'] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->title\t\t\t= $row['meta_title'];\n\t\t\t\t\t\t\t\t$this->metaTagsTitle\t= $row['meta_title'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif( trim( $row['meta_url'], '/' ) == trim( $this->metaTagsUrl, '/' ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_tags\t= json_decode( $row['meta_tags'], TRUE );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( is_array( $_tags ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach( $_tags as $_tagName => $_tagContent )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->metaTags[ $_tagName ]\t= $_tagContent;\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/* Are we setting page title? */\n\t\t\t\t\t\t\tif( $row['meta_title'] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->title\t\t\t= $row['meta_title'];\n\t\t\t\t\t\t\t\t$this->metaTagsTitle\t= $row['meta_title'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function get_recommendations_description(){\r\n\r\n\t\treturn elgg_echo(\"recommender:dataset:bloglikes:recommendationdescription\");\r\n\t}", "protected function setDescription() {\r\n\t\t$descriptionCrop = intval($this->settings['news']['semantic']['general']['description']['crop']);\r\n\t\t$descriptionAction = $this->settings['news']['semantic']['general']['description']['action'];\r\n\t\t$descriptionText = $this->newsItem->getTeaser();\r\n\t\tif (empty($descriptionText)) {\r\n\t\t\t$descriptionText = $this->newsItem->getBodytext();\r\n\t\t}\r\n\t\tif (!empty($descriptionText) && !empty($descriptionAction)) {\r\n\t\t\tif (!empty($GLOBALS['TSFE']->page['description'])) {\r\n\t\t\t\tswitch ($descriptionAction) {\r\n\t\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t\t$descriptionText .= ': ' . $GLOBALS['TSFE']->page['description'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'append':\r\n\t\t\t\t\t\t$descriptionText = $GLOBALS['TSFE']->page['description'] . ': ' . $descriptionText;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->description = $this->contentObject->crop($descriptionText, $descriptionCrop . '|...|' . TRUE);\r\n\t\t}\r\n\t}", "function customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "function wp_idolondemand_twitterfeed($args) {\n\textract($args);\t\n\techo $before_widget;\n\techo $before_title;?>twitter.com/idolondemand<?php echo $after_title;\n\tdisplay_wp_idolondemand_twitter_feed();\n\techo $after_widget;\n}", "public function add_open_graph_meta() {\n\t\t// Create/check default values\n\t\t$info = array(\n\t\t\t'postID' => absint( get_the_ID() ),\n\t\t\t'title' => esc_html( get_the_title() ),\n\t\t\t'imageURL' => get_post_thumbnail_id( absint( get_the_ID() ) ),\n\t\t\t'description' => esc_html( Kiwi_Social_Share_Helper::get_excerpt_by_id( absint( get_the_ID() ) ) ),\n\t\t\t'fb_app_id' => esc_attr( Kiwi_Social_Share_Helper::get_setting_value( 'facebook_page_id', '', 'kiwi_social_identities' ) ),\n\t\t\t'fp_url' => esc_attr( Kiwi_Social_Share_Helper::get_setting_value( 'facebook_page_url', '', 'kiwi_social_identities' ) ),\n\t\t\t'user_twitter_handle' => esc_attr( Kiwi_Social_Share_Helper::get_setting_value( 'twitter_username', '', 'kiwi_social_identities' ) )\n\t\t);\n\n\t\tif ( ! empty( $info['user_twitter_handle'] ) ) {\n\t\t\t$info['user_twitter_handle'] = str_replace( '@', '', $info['user_twitter_handle'] );\n\t\t}\n\n\t\t$metabox = array(\n\t\t\t'title' => get_post_meta( get_the_ID(), 'kiwi_social-media-title', true ),\n\t\t\t'description' => get_post_meta( get_the_ID(), 'kiwi_social-media-description', true ),\n\t\t\t'imageURL' => get_post_meta( get_the_ID(), 'kiwi_social-media-image', true ),\n\t\t\t'twitter_description' => get_post_meta( get_the_ID(), 'kiwi_social-media-custom-tweet', true ),\n\t\t);\n\n\t\t$info = wp_parse_args( $metabox, $info );\n\n\t\t$twitter_button = new Kiwi_Social_Share_Social_Button_Twitter();\n\t\t$url = $twitter_button->get_current_page_url( get_the_ID() );\n\n\t\t$info['header_output'] = '';\n\t\t// We only modify the Open Graph tags on single blog post pages\n\t\tif ( is_singular() ) {\n\t\t\tif ( ( isset( $info['title'] ) && $info['title'] ) || ( isset( $info['description'] ) && $info['description'] ) || ( isset( $info['imageURL'] ) && $info['imageURL'] ) ) {\n\n\t\t\t\t// Check if Yoast Exists so we can coordinate output with their plugin accordingly\n\t\t\t\tif ( ! defined( 'WPSEO_VERSION' ) ) {\n\t\t\t\t\t// Add twitter stuff\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<!-- Twitter OG tags by Kiwi Social Sharing Plugin -->';\n\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:card\" content=\"summary\" />';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:title\" content=\"' . trim( $info['title'] ) . '\" />';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:url\" content=\"' . esc_url( $url ) . '\" />';\n\n\t\t\t\t\tif ( ! empty( $info['user_twitter_handle'] ) ) {\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:site\" content=\"' . trim( $info['user_twitter_handle'] ) . '\" />';\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:creator\" content=\"' . trim( $info['user_twitter_handle'] ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! empty( $info['twitter_description'] ) ) {\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:description\" content=\"' . esc_attr( $info['twitter_description'] ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! empty( $info['imageURL'] ) ) {\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta name=\"twitter:image\" content=\"' . esc_attr( $info['imageURL'] ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<!-- / Twitter OG tags by Kiwi Social Sharing Plugin -->';\n\n\t\t\t\t\t// Add all our Open Graph Tags to the Return Header Output\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<!-- Meta OG tags by Kiwi Social Sharing Plugin -->';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:type\" content=\"article\" /> ';\n\n\t\t\t\t\t// Open Graph Title: Create an open graph title meta tag\n\t\t\t\t\tif ( $info['title'] ) {\n\t\t\t\t\t\t// If nothing else is defined, let's use the post title\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:title\" content=\"' . Kiwi_Social_Share_Helper::convert_smart_quotes( htmlspecialchars_decode( get_the_title() ) ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $info['description'] ) {\n\t\t\t\t\t\t// If nothing else is defined, let's use the post excerpt\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:description\" content=\"' . Kiwi_Social_Share_Helper::convert_smart_quotes( $info['description'] ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( has_post_thumbnail( $info['postID'] ) ) {\n\t\t\t\t\t\t// If nothing else is defined, let's use the post Thumbnail as long as we have the URL cached\n\t\t\t\t\t\t$og_image = wp_get_attachment_image_src( get_post_thumbnail_id( $info['postID'] ), 'full' );\n\t\t\t\t\t\tif ( $og_image ) {\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:image\" content=\"' . esc_url( $og_image[0] ) . '\" />';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:url\" content=\"' . esc_url( $url ) . '\" />';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:site_name\" content=\"' . esc_attr( get_bloginfo( 'name' ) ) . '\" />';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"article:published_time\" content=\"' . esc_attr( get_post_time( 'c' ) ) . '\" />';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"article:modified_time\" content=\"' . esc_attr( get_post_modified_time( 'c' ) ) . '\" />';\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"og:updated_time\" content=\"' . esc_attr( get_post_modified_time( 'c' ) ) . '\" />';\n\n\t\t\t\t\t// add facebook app id\n\t\t\t\t\tif ( ! empty( $info['fb_app_id'] ) ) {\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property = \"fb:app_id\" content=\"' . trim( $info['fb_app_id'] ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\t// add facebook url\n\t\t\t\t\tif ( ! empty( $info['fp_url'] ) ) {\n\t\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<meta property=\"article:publisher\" content=\"' . trim( $info['fp_url'] ) . '\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\t// append the closing comment :)\n\t\t\t\t\t$info['header_output'] .= PHP_EOL . '<!--/end meta tags by Kiwi Social Sharing Plugin -->';\n\t\t\t\t\t// Return the variable containing our information for the meta tags\n\t\t\t\t\techo $info['header_output'] . PHP_EOL;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function cosmo_get_site_meta() {\n\n ob_start();\n ob_clean();\n\n if( is_single() || is_page() ){ \n global $post; ?>\n <meta name=\"description\" content=\"<?php echo strip_tags( post::get_excerpt( $post, $ln=150 ) ); ?>\" /> \n <meta property=\"og:title\" content=\"<?php the_title() ?>\" />\n <meta property=\"og:site_name\" content=\"<?php echo get_bloginfo('name'); ?>\" />\n <meta property=\"og:url\" content=\"<?php the_permalink() ?>\" />\n <meta property=\"og:type\" content=\"article\" />\n <meta property=\"og:locale\" content=\"en_US\" /> \n <meta property=\"og:description\" content=\"<?php echo get_bloginfo('description'); ?>\"/>\n <?php\n\n } else { ?>\n <meta name=\"description\" content=\"<?php echo get_bloginfo('description'); ?>\" /> \n <meta property=\"og:title\" content=\"<?php echo get_bloginfo('name'); ?>\"/>\n <meta property=\"og:site_name\" content=\"<?php echo get_bloginfo('name'); ?>\"/>\n <meta property=\"og:url\" content=\"<?php echo home_url() ?>/\"/>\n <meta property=\"og:type\" content=\"blog\"/>\n <meta property=\"og:locale\" content=\"en_US\"/>\n <meta property=\"og:description\" content=\"<?php echo get_bloginfo('description'); ?>\"/>\n <?php\n }\n\n return ob_get_clean();\n\n }", "public function present() {\n\t\t\\_deprecated_function( __METHOD__, 'WPSEO 14.9' );\n\n\t\t$googlebot = \\implode( ', ', $this->get() );\n\t\t$googlebot = $this->filter( $googlebot );\n\n\t\tif ( \\is_string( $googlebot ) && $googlebot !== '' ) {\n\t\t\treturn \\sprintf( '<meta name=\"googlebot\" content=\"%s\" />', \\esc_attr( $googlebot ) );\n\t\t}\n\n\t\treturn '';\n\t}", "function custom_theme_customize_partial_blogdescription()\n{\n bloginfo('description');\n}", "function generate_do_archive_description() {\n\t$term_description = term_description();\n\n\tif ( ! empty( $term_description ) ) {\n\t\tprintf( '<div class=\"taxonomy-description\">%s</div>', $term_description ); // WPCS: XSS ok, sanitization ok.\n\t}\n\n\tif ( get_the_author_meta( 'description' ) && is_author() ) {\n\t\techo '<div class=\"author-info\">' . get_the_author_meta( 'description' ) . '</div>'; // WPCS: XSS ok, sanitization ok.\n\t}\n\n\t/**\n\t * generate_after_archive_description hook.\n\t *\n\t * @since 0.1\n\t */\n\tdo_action( 'generate_after_archive_description' );\n}", "function wc_fbog() {\n\n\t\tglobal $post;\n\t\tglobal $site;\n\n\t\techo \"\\n\\t\\t\";\n\t\t$metas = array();\n\n\t\t$metas[] = '<meta property=\"fb:admins\" content=\"535258781\">';\n\t\t$metas[] = '<meta property=\"og:title\" content=\"' . get_the_title() . '\">';\n\t\t$metas[] = '<meta property=\"og:type\" content=\"article\">';\n\t\t$metas[] = '<meta property=\"og:url\" content=\"' . get_permalink() . '\">';\n\t\t$metas[] = '<meta property=\"og:site_name\" content=\"' . get_bloginfo('name') . '\">';\n\n\t\t$default_image = $site->img('default-image.jpg', false);\n\n\t\tif ( ! is_singular() || is_home() ) {\n\t\t\t$metas[] = '<meta property=\"og:image\" content=\"' . $default_image . '\">';\n\t\t}\n\n\t\telse if ( ! has_post_thumbnail( $post->ID ) ) {\n\t\t\t$metas[] = '<meta property=\"og:image\" content=\"' . $default_image . '\">';\n\t\t}\n\n\t\telse {\n\t\t\t$thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'medium' );\n\t\t\t$metas[] = '<meta property=\"og:image\" content=\"' . esc_attr( $thumbnail_src[0] ) . '\">';\n\t\t}\n\n\t\techo implode(\"\\n\\t\\t\", $metas);\n\t\techo \"\\n\";\n\t}", "function wpcom_vip_enable_opengraph() {\n _deprecated_function( __FUNCTION__, '2.0.0', 'jetpack_enable_open_graph' );\n}", "function the_author_description()\n {\n }", "public function blogdescription() {\n\n\t\tbloginfo( 'description' );\n\n\t}", "private function retrieve_sitedesc() {\n\t\tstatic $replacement;\n\n\t\tif ( ! isset( $replacement ) ) {\n\t\t\t$description = wp_strip_all_tags( get_bloginfo( 'description' ) );\n\t\t\tif ( $description !== '' ) {\n\t\t\t\t$replacement = $description;\n\t\t\t}\n\t\t}\n\n\t\treturn $replacement;\n\t}", "function register_block_core_post_author_biography()\n {\n }", "function add_opengraph_doctype( $output ) {\n\t\treturn $output . ' xmlns:og=\"http://opengraphprotocol.org/schema/\" xmlns:fb=\"http://www.facebook.com/2008/fbml\"';\n\t}", "function add_opengraph_doctype( $output ) {\n\t\treturn $output . ' xmlns:og=\"http://opengraphprotocol.org/schema/\" xmlns:fb=\"http://www.facebook.com/2008/fbml\"';\n\t}", "function charity_create_description() {\n\t\t$content = '';\n\t\tif (charity_seo()) {\n \t\tif (is_single() || is_page() ) {\n \t\t if ( have_posts() ) {\n \t\t while ( have_posts() ) {\n \t\t the_post();\n\t\t\t\t\t\t\t\t\t\tif (charity_the_excerpt() == \"\") {\n \t\tif (charity_use_autoexcerpt()) {\n \t\t$content =\"\\t\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$content .= \"<meta name=\\\"description\\\" content=\\\"\";\n \t\t$content .= charity_excerpt_rss();\n \t\t$content .= \"\\\" />\";\n \t\t$content .= \"\\n\\n\";\n \t\t}\n \t\t} else {\n \t\tif (charity_use_excerpt()) {\n \t\t$content =\"\\t\";\n \t\t$content .= \"<meta name=\\\"description\\\" content=\\\"\";\n \t\t$content .= charity_the_excerpt();\n \t\t$content .= \"\\\" />\";\n \t\t$content .= \"\\n\\n\";\n \t\t}\n \t\t}\n \t\t}\n \t\t}\n \t\t} elseif ( is_home() || is_front_page() ) {\n \t\t$content =\"\\t\";\n \t\t$content .= \"<meta name=\\\"description\\\" content=\\\"\";\n \t\t$content .= get_bloginfo('description');\n \t\t$content .= \"\\\" />\";\n \t\t$content .= \"\\n\\n\";\n \t\t}\n \t\techo apply_filters ('charity_create_description', $content);\n\t\t}\n}", "function theme_customize_partial_blogdescription() {\n\tbloginfo('description');\n}", "function twentytwelve_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "function headOptimization()\r\n\t{\r\n\t\t\r\n\t\techo \"<meta name='description' content='\".$this->PageDescription().\"' />\";\r\n\t\techo \"<meta name='keywords' content='\".$this->PageKeywords().\"' />\";\r\n\t\techo \"<title>\".$this->PageTitle().\"</title>\";\r\n\t\r\n\t}", "function header_meta() {\n\t$humans = '<link type=\"text/plain\" rel=\"author\" href=\"' . WPDOC_HLTR_URL . '/humans.txt\" />';\n\n\techo apply_filters( 'wpd_humans', $humans );\n}", "function v2_mumm_add_meta_tags($open_graph_protocol) {\n $elements = array();\n $elements[] = array(\n '#type' => 'html_tag',\n '#tag' => 'meta',\n '#attributes' => array(\n 'property' => 'description',\n 'content' => htmlspecialchars_decode($open_graph_protocol['description'], ENT_QUOTES),\n ),\n );\n\n $i = 0;\n foreach ($elements as $element) {\n drupal_add_html_head($element, 'open_graph_protocol_' . $i++);\n }\n}", "public function desc()\n {\n $desc = '\n <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <OpenSearchDescription xmlns=\"http://a9.com/-/spec/opensearch/1.1/\">\n <ShortName>' . $this->feedTitle . '</ShortName>\n <Description>' . $this->feedDescription . '</Description>\n <Language>' . LANG_DIR . '</Language>\n <SyndicationRight>open</SyndicationRight>\n <OutputEncoding>UTF-8</OutputEncoding>\n <InputEncoding>UTF-8</InputEncoding>\n <Url xmlns:parameters=\"http://a9.com/-/spec/opensearch/extensions/parameters/1.0/\"\n template=\"' . Url::getShortEufBaseUrl('sameAsCurrentPage') . '/ci/opensearch/feed/\"\n type=\"text/xml\"\n parameters:method=\"GET\">\n <parameters:Parameter name=\"q\" value=\"{searchTerms}\"/>\n <parameters:Parameter name=\"count\" value=\"{itemsPerPage}\" minimum=\"0\"/>\n <parameters:Parameter name=\"startIndex\" value=\"{startIndex}\" minimum=\"0\"/>\n <parameters:Parameter name=\"startPage\" value=\"{startPage}\"/>\n </Url>\n <Url xmlns:parameters=\"http://a9.com/-/spec/opensearch/extensions/parameters/1.0/\"\n template=\"' . Url::getShortEufBaseUrl('sameAsCurrentPage') . '/ci/opensearch/feed/\"\n type=\"text/html\"\n parameters:method=\"GET\">\n <parameters:Parameter name=\"q\" value=\"{searchTerms}\"/>\n <parameters:Parameter name=\"count\" value=\"{itemsPerPage}\" minimum=\"0\"/>\n <parameters:Parameter name=\"startIndex\" value=\"{startIndex}\" minimum=\"0\"/>\n <parameters:Parameter name=\"startPage\" value=\"{startPage}\"/>\n </Url>\n </OpenSearchDescription>';\n\n header('Content-Type: application/opensearchdescription+xml; charset=\"utf-8\"');\n echo $desc;\n exit;\n }", "function the_author($deprecated = '', $deprecated_echo = \\true)\n {\n }", "function get_the_author_description()\n {\n }", "function fumseck_pagemeta() {\n\t\n\t// Initialize\n\t\n\t$output = '';\n\tglobal $post;\n\t$post_id = $post->ID;\n\t\n\t\n\t// Get metadata for the page from WordPress\n\t\n\t$post_title = get_the_title($post_id);\n\t$post_permalink = get_permalink($post_id);\n\t\n\t$post_has_featured_image = has_post_thumbnail( $post_id );\n\t\n\tif( $post_has_featured_image ) {\n\t\t$post_featured_image_large = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large'); // [URL, w, h, resized?]\n\t};\n\t\n\t$post_summary = wp_strip_all_tags( get_field( '_summary', $post_id, true ));\n\t\n\t\n\tif ( ! $post_summary ) {\t\t// if no summary, try a manual excerpt\n\t\t$post_summary = $post->post_excerpt;\n\t};\t// TODO: do something if there's no manual excerpt either\n\n\t\n\t// Static metadata\n\t\n\t$output .= '<meta name=\"twitter:site\" content=\"@gpaumier\"><meta name=\"twitter:creator\" content=\"@gpaumier\">';\t\n\t$output .= '<meta name=\"twitter:domain\" content=\"guillaumepaumier.com\">';\t\n\t$output .= '<meta property=\"fb:admins\" content=\"710543474\" />';\n\t//$output .= '<meta property=\"fb:admins\" content=\"579323492087704\" />';\n\t$output .= '<meta property=\"article:author\" content=\"https://www.facebook.com/gllmpmr\" />';\n\t$output .= '<meta property=\"article:publisher\" content=\"https://www.facebook.com/gllmpmr\" />';\n\t\n\t$output .= '<meta property=\"og:type\" content=\"article\" />'; // TODO: be more specific\n\t\n\t// Common metadata\n\t\n\t$output .= '<meta property=\"og:site_name\" content=\"' . get_bloginfo( 'name' ) . '\"/>';\n\t\n\t$output .= '<meta name=\"twitter:title\" content=\"' . $post_title . '\">';\n\t$output .= '<meta property=\"og:title\" content=\"' . $post_title . '\"/>';\n\t\n\t\n\t$output .= '<meta property=\"og:url\" content=\"' . $post_permalink . '\" />';\n\t\n\t\n\t$output .= '<meta property=\"og:description\" content=\"' . $post_summary . '\" />';\n\t\n\t// TODO: add locale\n\t\n\tif ( get_post_format( $post_id ) === 'image' ) {\n\t\t\n\t\t$output .= '<meta name=\"twitter:card\" content=\"photo\">';\n\t\t$output .= '<meta name=\"twitter:image\" content=\"' . $post_featured_image_large[0] . '\">';\n\t\t$output .= '<meta name=\"twitter:image:width\" content=\"' . $post_featured_image_large[1] . '\">';\n\t\t$output .= '<meta name=\"twitter:image:height\" content=\"' . $post_featured_image_large[2] . '\">';\n\t\t$output .= '<meta property=\"og:image:width\" content=\"' . $post_featured_image_large[1] . '\" />';\n\t\t$output .= '<meta property=\"og:image:height\" content=\"' . $post_featured_image_large[2] . '\" />';\n\t\t\n\t} else {\t// Not a photo\n\t\t\n\t\t$output .= '<meta name=\"twitter:description\" content=\"' . $post_summary . '\">';\n\t\t\n\t\tif( $post_has_featured_image ) {\n\t\t\t\n\t\t\t$output .= '<meta name=\"twitter:card\" content=\"summary_large_image\">';\n\t\t\t$output .= '<meta name=\"twitter:image:src\" content=\"' . $post_featured_image_large[0] . '\">';\n\t\t\t$output .= '<meta property=\"og:image\" content=\"' . $post_featured_image_large[0] . '\" />';\n\t\t\t$output .= '<meta property=\"og:image:width\" content=\"' . $post_featured_image_large[1] . '\" />';\n\t\t\t$output .= '<meta property=\"og:image:height\" content=\"' . $post_featured_image_large[2] . '\" />';\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t$output .= '<meta name=\"twitter:card\" content=\"summary\">';\n\t\t}\n\t\t\n\t};\n\t\n\n\techo $output;\n}", "function tct_noindex() {\n if ( '0' == get_option('blog_public') ) {\n echo \"<meta name='robots' content='noindex,nofollow'>\\n\";\n }\n}", "function opengraph_markup_callback(){\n //get markup data\n $data= get_markup_data_callback('open_graph');\n //extract\n extract($data);\n //init\n $html =\"\";\n //check\n if(is_single() || is_page()){\n $html .='<meta property=\"og:title\" content=\"'.$title.'\" />';\n }else{\n $html .='<meta property=\"og:site_name\" content=\"'.$site_name.'\" />';\n }\n //set\n $html .=' <meta property=\"og:type\" content=\"'.$type.'\" />\n <meta property=\"og:image\" content=\"'.$image.'\" />\n <meta property=\"og:url\" content=\"'.$url.'\" />\n <meta property=\"og:description\" content=\"'.$description.'\" />';\n\n //display\n print $html;\n}", "public function seoDescription(){\n return ($this->excerpt ? descriptionMaker($this->excerpt) : descriptionMaker($this->description));\n }", "function circle_author_biography() {\n\tif ( ! circle_option( 'display_author_bio' ) ) {\n\t\treturn;\n\t}\n\tget_template_part( 'template-parts/biography' );\n}", "protected function _afterObserver()\n\t{\n\t\t$headBlock = $this->_getHeadBlock();\n\t\t$helper = Mage::helper('wordpress');\n\t\t$robots = array();\n\t\t\t\n\t\tif ($this->getNoodp()) {\n\t\t\t$robots[] = 'noodp';\n\t\t}\n\t\t\t\n\t\tif ($this->getNoydir()) {\n\t\t\t$robots[] = 'noydir';\n\t\t}\n\t\t\n\t\tif (count($robots) > 0) {\n\t\t\tif ($headBlock->getRobots() === '*') {\n\t\t\t\t$headBlock->setRobots('index,follow,' . implode(',', $robots));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$robots = array_unique(array_merge(explode(',', $headBlock->getRobots()), $robots));\n\n\t\t\t\t$headBlock->setRobots(implode(',', $robots));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Open Graph Tags\n\t\t */\n\t\tif ((int)$this->getData('opengraph') === 1) {\n\t\t\t$tagString = '';\n\n\t\t\tforeach($this->_openGraphTags as $key => $value) {\n\t\t\t\t$tkey = strpos($key, ':') === false ? 'og:' . $key : $key;\n\t\t\t\t\n\t\t\t\tif (!is_array($value)) {\n\t\t\t\t\t$value = array($value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($value as $v) {\n\t\t\t\t\tif (trim($v) !== '') {\n\t\t\t\t\t\t$tagString .= sprintf('<meta property=\"%s\" content=\"%s\" />', $tkey, addslashes($helper->escapeHtml($v))) . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t$headBlock->setChild('wp.openGraph', \n\t\t\t\tMage::getSingleton('core/layout')->createBlock('core/text')->setText($tagString . \"\\n\")\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "public function show($url)\n\t{\n try{\n\t\t$tags = get_meta_tags(\"http://\".str_replace(\" \",\"\",$url));\n echo $tags['description'];\n }\n catch(Exception $e)\n {\n echo \"Sorry ..... No description available\";\n }\n \n\t}", "protected function _addPostOpenGraphTags($object, $type = 'post')\n\t{\n\t\t$tags = array(\n\t\t\t'type' => 'article',\n\t\t\t'title' => $object->getPostTitle(),\n\t\t\t'description' => $object->getMetaDescription(),\n\t\t\t'url' => $object->getPermalink(),\n\t\t\t'image' => $object->getFeaturedImage() ? $object->getFeaturedImage()->getFullSizeImage() : '',\n\t\t\t'updated_time' => $object->getPostModifiedDate('c'),\n\t\t\t'article:author' => $object->getAuthor()->getMetaValue('facebook'),\n\t\t\t'article:published_time' => $object->getPostDate('c'),\n\t\t\t'article:modified_time' => $object->getPostModifiedDate('c'),\n\t\t);\n\n\t\tif ($fbTitle = $object->getMetaValue('_yoast_wpseo_opengraph-title')) {\n\t\t\t$tags['title'] = $fbTitle;\n\t\t}\n\n\t\tif ($fbDesc = $object->getMetaValue('_yoast_wpseo_opengraph-description')) {\n\t\t\t$tags['description'] = $fbDesc;\n\t\t}\n\t\telse if (!$tags['description']) {\n\t\t\tif ($head = Mage::getSingleton('core/layout')->getBlock('head')) {\n\t\t\t\t$tags['description'] = $head->getDescription();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($fbImage = $object->getMetaValue('_yoast_wpseo_opengraph-image')) {\n\t\t\t$tags['image'] = $fbImage;\n\t\t}\n\n\t\tif ($items = $object->getTags()) {\n\t\t\t$tagValue = array();\n\n\t\t\tforeach($items as $item) {\n\t\t\t\t$tagValue[] = $item->getName();\n\t\t\t}\n\t\t\t\n\t\t\t$tags['article:tag'] = $tagValue;\n\t\t}\n\t\t\n\t\tif ($items = $object->getParentCategories()) {\n\t\t\t$categoryValue = array();\n\n\t\t\tforeach($items as $item) {\n\t\t\t\t$categoryValue[] = $item->getName();\n\t\t\t}\n\t\t\t\n\t\t\t$tags['article:section'] = $categoryValue;\n\t\t}\n\n\t\treturn $this->_applyOpenGraph($tags);\n\t}", "function sw_add_twitter_card($info) {\n\t\t\t\tif(is_singular()):\n\t\t\t\t\t// Check if Twitter Cards are Activated\n\t\t\t\t\tif($info['sw_user_options']['sw_twitter_card']):\n\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* YOAST SEO: It rocks, so let's coordinate with it\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\t// Check if Yoast Exists so we can coordinate output with their plugin accordingly\n\t\t\t\t\t\tif (defined('WPSEO_VERSION')):\n\n\t\t\t\t\t\t\t// Collect their Social Descriptions as backups if they're not defined in ours\n\t\t\t\t\t\t\t$yoast_twitter_title \t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_twitter-title' , true );\n\t\t\t\t\t\t\t$yoast_twitter_description \t= get_post_meta( $info['postID'] , '_yoast_wpseo_twitter-description' , true );\n\t\t\t\t\t\t\t$yoast_twitter_image \t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_twitter-image' , true );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Collect their SEO fields as 3rd string backups in case we need them\n\t\t\t\t\t\t\t$yoast_seo_title\t\t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_title' , true );\n\t\t\t\t\t\t\t$yoast_seo_description\t\t= get_post_meta( $info['postID'] , '_yoast_wpseo_metadesc' , true );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Cancel their output if ours have been defined so we don't have two sets of tags\n\t\t\t\t\t\t\tremove_action( 'wpseo_head' , array( 'WPSEO_Twitter' , 'get_instance' ) , 40 );\n\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* JET PACK: If ours are activated, disable theirs\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( class_exists( 'JetPack' ) ) :\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tadd_filter( 'jetpack_disable_twitter_cards', '__return_true', 99 );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\t\t\t\t\n\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* TWITTER TITLE\t\t\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the user defined a Social Media title, use it, otherwise check for Yoast's\n\t\t\t\t\t\tif(!$info['title'] && isset($yoast_twitter_title) && $yoast_twitter_title):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['title'] = $yoast_twitter_title;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If not title has been defined, let's check the SEO description as a 3rd string option\n\t\t\t\t\t\telseif(!$info['title'] && isset($yoast_seo_title) && $yoast_seo_title):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['title'] = $yoast_seo_title;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// If not title has been defined, let's use the post title\n\t\t\t\t\t\telseif(!$info['title']):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['title'] = convert_smart_quotes(htmlspecialchars_decode( get_the_title() ));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\n\t\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* TWITTER DESCRIPTION\t\t\t\t\t\t\t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Open Graph Description\n\t\t\t\t\t\tif(!$info['description'] && isset($yoast_twitter_description) && $yoast_twitter_description):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['description'] = $yoast_twitter_description;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If not title has been defined, let's check the SEO description as a 3rd string option\n\t\t\t\t\t\telseif(!$info['description'] && isset($yoast_seo_description) && $yoast_seo_description):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['description'] = $yoast_seo_description;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If not, then let's use the excerpt\n\t\t\t\t\t\telseif(!$info['description']):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['description'] = convert_smart_quotes(htmlspecialchars_decode( sw_get_excerpt_by_id( $info['postID'] )) );\n\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\n\t\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* TWITTER IMAGE\t\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\t\t\t\t\t\n\t\t\t\t\t\t// Open Graph Description\n\t\t\t\t\t\tif(!$info['imageURL'] && isset($yoast_twitter_image) && $yoast_twitter_image):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$info['imageURL'] = $yoast_twitter_image;\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// If nothing else is defined, let's use the post Thumbnail as long as we have the URL cached\n\t\t\t\t\t\t\t$twitter_image = get_post_meta( $info['postID'] , 'sw_open_thumbnail_url' , true );\n\t\t\t\t\t\t\tif($twitter_image):\n\t\t\t\t\t\t\t\t$info['imageURL'] = $twitter_image;\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t/*****************************************************************\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t* PUT IT ALL TOGETHER\t\t\t\t\t\t \t\t *\n\t\t\t\t\t\t* *\n\t\t\t\t\t\t******************************************************************/\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Check if we have everything we need for a large image summary card\n\t\t\t\t\t\tif($info['imageURL']):\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:card\" content=\"summary_large_image\">';\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:title\" content=\"'.$info['title'].'\">';\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:description\" content=\"'.$info['description'].'\">';\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:image\" content=\"'.$info['imageURL'].'\">';\n\t\t\t\t\t\t\tif($info['sw_user_options']['twitterID']):\n\t\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:site\" content=\"@'.$info['sw_user_options']['twitterID'].'\">';\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\tif($info['user_twitter_handle']):\n\t\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:creator\" content=\"@'.str_replace('@','',$info['user_twitter_handle']).'\">';\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Otherwise create a small summary card\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:card\" content=\"summary\">';\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:title\" content=\"'.str_replace('\"','\\'',$info['title']).'\">';\n\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:description\" content=\"'.str_replace('\"','\\'',$info['description']).'\">';\n\t\t\t\t\t\t\tif($info['sw_user_options']['twitterID']):\n\t\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:site\" content=\"@'.$info['sw_user_options']['twitterID'].'\">';\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\tif($info['user_twitter_handle']):\n\t\t\t\t\t\t\t\t$info['header_output'] .= PHP_EOL .'<meta name=\"twitter:creator\" content=\"@'.str_replace('@','',$info['user_twitter_handle']).'\">';\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\t\t\t\treturn $info;\n\t\t\t}", "function add_meta_tags() {\n?>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <meta property=\"og:image\" content=\"https://www.alessandramilburn.com/wp-content/uploads/2020/03/Logo.png\" />\n <meta name=\"p:domain_verify\" content=\"61eae8efaa5ec066ea42a394ab4b7e54\"/>\n <?php }", "function charity_create_robots() {\n global $paged;\n\t\tif (charity_seo()) {\n \t\t$content = \"\\t\";\n \t\tif((is_home() && ($paged < 2 )) || is_front_page() || is_single() || is_page() || is_attachment()) {\n\t\t\t\t$content .= \"<meta name=\\\"robots\\\" content=\\\"index,follow\\\" />\";\n \t\t} elseif (is_search()) {\n \t\t$content .= \"<meta name=\\\"robots\\\" content=\\\"noindex,nofollow\\\" />\";\n \t\t} else {\t\n \t\t$content .= \"<meta name=\\\"robots\\\" content=\\\"noindex,follow\\\" />\";\n \t\t}\n \t\t$content .= \"\\n\\n\";\n \t\tif (get_option('blog_public')) {\n \t\t\t\techo apply_filters('charity_create_robots', $content);\n \t\t}\n\t\t}\n}", "function emc_taxonomy_description( $description = null ) {\r\n\r\n\tif ( isset( $description ) ){\r\n\t\t$desc = $description;\r\n\t} else {\r\n\t\tglobal $wp_query;\r\n\t\t$term = $wp_query->get_queried_object();\r\n\t\t$desc = $term->description;\r\n\t}\r\n\r\n\t$html = apply_filters( 'the_content', $desc );\r\n\treturn $html;\r\n\r\n}", "public function getPackageDescription() {\r\n\t\treturn t(\"A social sharing block that protects your privacy\");\r\n\t}", "public function metaDescription()\n\t{\n\t\tif ( static::$titleLangPrefix and static::$descriptionLangSuffix )\n\t\t{\n\t\t\treturn \\IPS\\Member::loggedIn()->language()->addToStack( static::$titleLangPrefix . $this->id . static::$descriptionLangSuffix, FALSE, array( 'striptags' => TRUE ) );\n\t\t}\n\t\treturn NULL;\n\t}", "public function getMetaDescription(): string\n {\n return (string) $this->metaDescription;\n }", "function author_description() {\n if(get_the_author_meta('description')) {\n echo the_author_meta('description'); // Print Description If Have\n } else {\n echo '<div class=\"alert alert-danger\" role=\"alert\">No Have Description</div>';\n }\n}" ]
[ "0.71809506", "0.70009685", "0.6746647", "0.6679469", "0.6677574", "0.66033345", "0.65761894", "0.6329559", "0.63142025", "0.62948644", "0.62944764", "0.6273846", "0.62305105", "0.61850387", "0.6158151", "0.61378205", "0.6108721", "0.60827994", "0.60791034", "0.6073014", "0.6055499", "0.6044888", "0.6040294", "0.6027031", "0.59938586", "0.59812653", "0.5960487", "0.59488624", "0.59350264", "0.59339803", "0.59119564", "0.58931637", "0.58767265", "0.586287", "0.5856017", "0.5847844", "0.5847365", "0.58405393", "0.58254033", "0.58213234", "0.5820933", "0.5789839", "0.57765305", "0.57600474", "0.57552034", "0.57509506", "0.57504547", "0.5745351", "0.57229805", "0.571315", "0.5712732", "0.57085705", "0.57070845", "0.5699091", "0.5672797", "0.567046", "0.56523895", "0.56493884", "0.56465715", "0.564026", "0.5626037", "0.5625692", "0.5610001", "0.5604579", "0.55968267", "0.55934346", "0.55933994", "0.5591665", "0.5589282", "0.5589002", "0.55814457", "0.5569373", "0.55683917", "0.55626494", "0.55626494", "0.5561321", "0.5558941", "0.5552157", "0.5549171", "0.554612", "0.55429745", "0.55351835", "0.5526666", "0.55160373", "0.55060136", "0.54925543", "0.54843265", "0.5482522", "0.5479945", "0.54764193", "0.54711235", "0.54687184", "0.5455248", "0.54483956", "0.54481906", "0.54448986", "0.54430723", "0.54376185", "0.54287994", "0.54272133" ]
0.63556004
7
Form custom logo HTML.
public function form_logo_html() { if ( empty( $this->form_data['settings']['conversational_forms_custom_logo'] ) ) { return; } $custom_logo_url = wp_get_attachment_image_src( $this->form_data['settings']['conversational_forms_custom_logo'], 'full' ); $custom_logo_url = isset( $custom_logo_url[0] ) ? $custom_logo_url[0] : ''; ?> <div class="wpforms-conversational-form-logo"> <img src="<?php echo \esc_url( $custom_logo_url ); ?>" alt="<?php \esc_html_e( 'Form Logo', 'wpforms-conversational-forms' ); ?>"> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function custom_login_logo() {\n\t\techo '<style type=\"text/css\">\n\t\th1 a { background-image: url('.get_bloginfo('template_directory').'/assets/img/logo.svg) !important;\n\t\t background-size: 100% !important;\n\t\t width: 100% !important;\n\t\t height: 125px !important;\n\t\t pointer-events: none;\n\t\t}\n\t\t</style>';\n\t}", "public function logo() {\n\n\t\t/**\n\t\t * Filter the custom logo args.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @var array\n\t\t */\n\t\t$args = (array) apply_filters( 'primer_custom_logo_args',\n\t\t\tarray(\n\t\t\t\t'height' => 100,\n\t\t\t\t'width' => 400,\n\t\t\t\t'flex-height' => true,\n\t\t\t\t'flex-width' => true,\n\t\t\t\t'header-text' => array( 'site-title', 'site-description' ),\n\t\t\t)\n\t\t);\n\n\t\tadd_theme_support( 'custom-logo', $args );\n\n\t}", "public function _render_custom_logo_partial()\n {\n }", "function custom_login_logo() {\n\techo '<style type=\"text/css\">\n\th1 a { background-image: url('.get_bloginfo('template_directory').'/assets/img/logo_dark.svg) !important;\n\t background-size: contain !important;\n\t width: 100% !important;\n\t height: 75px !important;\n\t pointer-events: none;\n\t}\n\t</style>';\n}", "function ve_get_logo() {\n\t?>\n\t<img class=\"logo-area\" src=\"<?php echo get_template_directory_uri().'/images/logo_text.png'; ?>\">\n\t<?php\n}", "function obdiy_custom_login_logo() {\n\techo '<style type=\"text/css\">\n h1 a { background-image:url(/images/logo.png) !important; }\n </style>';\n}", "public function getLogo();", "function SPD_custom_login_logo()\r\n{\r\n echo '<style type=\"text/css\">\r\n h1 a { background-image:url(https://www.smartypantsdesign.ca/public/apple-touch-icon-ipad.png) !important; background-size: 72px 72px !important;height: 72px !important; width: 72px !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }\r\n .login form { margin-top: 10px !important; }\r\n </style>';\r\n}", "public function starLoginLogo() {\n\t\t$content = \"<style type='text/css'>\";\n $content .= \"body.login div#login h1 a {\";\n $content .= \"background-image: url(\".$this->options['logo']['url'].\") !important;\";\n $content .= \"background-size: 100% 100%;\";\n $content .= \"}\";\n \t$content .= \"</style>\";\n\n \techo $content;\n\t}", "function bethel_do_logo() {\n\techo \"<a class=\\\"logo_header\\\" href=\\\"\".home_url().\"\\\"><img src=\\\"\".get_stylesheet_directory_uri().\"/images/logo.png\\\" width=\\\"600\\\" height=\\\"139\\\" title=\\\"Bethel Evangelical Church, Clydach\\\" alt=\\\"Bethel Evangelical Church, Clydach\\\"/></a>\";\n}", "function cosmetro_header_logo() {\n\t$logo = cosmetro_get_site_title_by_type( get_theme_mod( 'header_logo_type', cosmetro_theme()->customizer->get_default( 'header_logo_type' ) ) );\n\n\tif ( is_front_page() && is_home() ) {\n\t\t$tag = 'h1';\n\t} else {\n\t\t$tag = 'div';\n\t}\n\n\t$format = apply_filters(\n\t\t'cosmetro_header_logo_format',\n\t\t'<%1$s class=\"site-logo\"><a class=\"site-logo__link\" href=\"%2$s\" rel=\"home\">%3$s</a></%1$s>'\n\t);\n\n\tprintf( $format, $tag, esc_url( home_url( '/' ) ), $logo );\n}", "function theme_logo()\n{\n $logo = get_theme_option('Logo');\n if ($logo) {\n $storage = Zend_Registry::get('storage');\n $uri = $storage->getUri($storage->getPathByType($logo, 'theme_uploads'));\n return '<img src=\"' . $uri . '\" alt=\"' . option('site_title') . '\" />';\n }\n}", "function custom_login_logo() {\n\techo '<style type=\"text/css\">\n\th1 a { background-image: url('.get_bloginfo('template_directory').'/assets/img/omega-logo-sharp.png) !important; width:310px !important; }\n\t</style>';\n}", "function render_block_core_site_logo($attributes)\n {\n }", "function bethel_add_login_logo() {\n\techo \"<style type=\\\"text/css\\\">\\r\\n\";\n\techo \"\\tbody.login div#login h1 a {\\r\\n\";\n\techo \"\\t\\tbackground-image: url('\".get_stylesheet_directory_uri().\"/images/logo-narrow-186.png');\\r\\n\";\n\techo \"\\t\\t-webkit-background-size: 186px 100px;\\r\\n\";\n\techo \"\\t\\tbackground-size: 186px 100px;\\r\\n\";\n\techo \"\\t\\theight: 100px;\\r\\n\";\n\techo \"\\t\\twidth: 186px;\\r\\n\";\n\techo \"\\t}\\r\\n\";\n\techo \"</style>\";\n}", "function _override_custom_logo_theme_mod($custom_logo)\n {\n }", "function site_logo($location = '') {\n\t\t\t$site_name = get_bloginfo('name');\n\t\t\t$logo = json_decode($this->get_cached_mod($location . '_image'));\n\t\t\t$is_image_mode = isset($logo->mode) && 'image' === $logo->mode && !empty($logo->src);\n\t\t\t$url = apply_filters('themify_customizer_logo_home_url', !empty($logo->link) ? $logo->link : home_url() );\n\t\t\t$html = '<a href=\"' . esc_url($url) . '\" title=\"' . esc_attr($site_name) . '\">';\n\t\t\tif ( $is_image_mode===true) {\n\t\t\t\t$attr = array(\n\t\t\t\t\t'src' => esc_url( themify_https_esc( $logo->src ) ),\n\t\t\t\t\t'alt' => get_post_meta( $logo->id, '_wp_attachment_image_alt', true ) ?: $site_name,\n\t\t\t\t\t'title' => get_the_title( $logo->id ) ?: $site_name,\n\t\t\t\t\t'width' => ! empty( $logo->imgwidth ) ? $logo->imgwidth : '',\n\t\t\t\t\t'height' => ! empty( $logo->imgheight ) ? $logo->imgheight : '',\n\t\t\t\t\t'class' => 'site-logo-image',\n\t\t\t\t);\n\n\t\t\t\tthemify_generateWebp( $attr['src'] );\n\t\t\t\t$html .= '<img ' . themify_get_element_attributes( $attr ) . '>';\n\t\t\t\tif ( is_customize_preview() ) {\n\t\t\t\t $html .= '<span style=\"display: none;\">' . esc_html($site_name) . '</span>' ;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t Themify_Enqueue_Assets::addPreLoadMedia( $attr['src'] );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$html .= '<span>' . html_entity_decode($site_name) . '</span>';\n\t\t\t}\n\t\t\t$html .= '</a>';\n\t\t\treturn $html;\n\t\t}", "function custom_logo() {\n\techo '<style type=\"text/css\">\n\t#wpadminbar > #wp-toolbar > #wp-admin-bar-root-default #wp-admin-bar-wp-logo .ab-icon {\n\t\tbackground: url(' . get_template_directory_uri() . '/assets/images/icons/admin-logo-20x20.png) center center no-repeat !important;\n\t\twidth: 20px;\n\t\theight: 32px;\n\t\tpadding: 0;\n\t}\n\t#wpadminbar > #wp-toolbar > #wp-admin-bar-root-default #wp-admin-bar-wp-logo .ab-icon:before {\n\t\tdisplay: none !important;\n\t}\n\t</style>';\n}", "function marctv_login_logo() { ?>\n<style type=\"text/css\">\n\t#login h1 a, .login h1 a {\n\t\tbackground-image: url(https://marc.tv/media/2017/04/marctv-logo-17-150x150.png);\n\t\theight: 75px;\n\t\twidth: 75px;\n\t\tbackground-size: 75px 75px;\n\t\tbackground-repeat: no-repeat;\n\t\tpadding-bottom: 0px;\n\t}\n</style>\n<?php }", "protected function _toHtml()\n {\n $type = $this->getLogoType();\n // assigned in layout etc.\n $logoUrl = $this->_getConfig()->getAdditionalOptionsLogoUrl($this->_localeResolver->getLocale(), $type);\n if (!$logoUrl) {\n return '';\n }\n $this->setLogoImageUrl($logoUrl);\n return parent::_toHtml();\n }", "function logo(){\n\t\t$this->model->logo();\n\t}", "function redart_header_logo() {\r\n\techo '<div id=\"logo\">';\r\n\t\tif( redart_option('layout', 'logo') ):\r\n\t\t\t$url = redart_option('layout', 'logo-url');\r\n\t\t\t$url = !empty( $url ) ? $url : REDART_URI . \"/images/logo.png\";\r\n\r\n\t\t\t$retina_url = redart_option('layout','retina-logo-url');\r\n\t\t\t$retina_url = !empty($retina_url) ? $retina_url : REDART_URI .\"/images/logo@2x.png\";\r\n\r\n\t\t\t$width = redart_option('layout','retina-logo-width');\r\n\t\t\t$width = !empty($width) ? $width.\"px;\" : \"140px\";\r\n\r\n\t\t\t$height = redart_option('layout','retina-logo-height');\r\n\t\t\t$height = !empty($height) ? $height.\"px;\" : \"88px\";?>\r\n\t\t\t<a href=\"<?php echo esc_url(home_url('/'));?>\" title=\"<?php bloginfo('title'); ?>\">\r\n\t\t\t\t<img class=\"normal_logo\" src=\"<?php echo esc_url($url);?>\" alt=\"<?php bloginfo('title'); ?>\" title=\"<?php bloginfo('title'); ?>\" />\r\n\t\t\t\t<img class=\"retina_logo\" src=\"<?php echo esc_url($retina_url);?>\" alt=\"<?php bloginfo('title'); ?>\" title=\"<?php bloginfo('title'); ?>\" style=\"width:<?php echo esc_attr($width);?>; height:<?php echo esc_attr($height);?>;\"/>\r\n\t\t\t</a><?php\r\n\t\telse: ?>\r\n\t\t\t<div class=\"logo-title\">\r\n\t\t\t\t<h1 id=\"site-title\"><a href=\"<?php echo esc_url(home_url('/')); ?>\" title=\"<?php bloginfo('title'); ?>\"><?php bloginfo('title'); ?></a></h1>\r\n\t\t\t\t<h2 id=\"site-description\"><?php bloginfo('description'); ?></h2>\r\n\t\t\t</div><?php\r\n\t\tendif;\r\n\techo '</div>';\r\n}", "function wolf_custom_login_logo() { \n\t\n\t$login_logo = wolf_get_theme_option( 'login_logo' );\n\n\tif ( $login_logo ) \n\t\techo '<style type=\"text/css\"> h1 a { background-image:url(' . $login_logo .' ) !important; } </style>';\n}", "public function logoAction();", "function ci_logo($before=\"\", $after=\"\"){ \n\t$snippet = $before;\n\t\t\n $snippet .= '<a href=\"'.home_url().'\">';\n\n if(ci_setting('logo')){\n\t\t$snippet .= '<img src=\"'.ci_setting('logo').'\" alt=\"'.get_bloginfo('name').'\" />';\n\t} \n\telse{\n\t\t$snippet .= get_bloginfo('name');\n\t}\n\n $snippet .= '</a>';\n \n $snippet .= $after;\n\n return $snippet;\n}", "public function logo()\n {\n $iPod = stripos($_SERVER['HTTP_USER_AGENT'], \"iPod\");\n $iPhone = stripos($_SERVER['HTTP_USER_AGENT'], \"iPhone\");\n $iPad = stripos($_SERVER['HTTP_USER_AGENT'], \"iPad\");\n $Android = stripos($_SERVER['HTTP_USER_AGENT'], \"Android\");\n $webOS = stripos($_SERVER['HTTP_USER_AGENT'], \"webOS\");\n $macOS = stripos($_SERVER['HTTP_USER_AGENT'], \"Macintosh\");\n\n if ($iPod || $iPhone || $iPad) {\n return asset('frontend/logo/ios.png');\n } else if ($Android) {\n return asset('frontend/logo/non-ios.png');\n } else if ($webOS) {\n return asset('frontend/logo/ios.png');\n }elseif($macOS){\n return asset('frontend/logo/ios.png');\n }else{\n return asset('frontend/logo/non-ios.png');\n }\n \n }", "function anva_header_logo_default() {\n\t$logo \t= anva_get_option('logo');\n\t$image \t= get_template_directory_uri() . '/assets/images/logo.png';\n\t$name \t= get_bloginfo( 'name' );\n\t?>\n\t<a class=\"logo__link\" href=\"<?php echo home_url(); ?>\" title=\"<?php echo $name; ?>\">\n\t\t<?php\n\t\t\tprintf(\n\t\t\t\t'<img class=\"logo__image\" src=\"%1$s\" alt=\"%2$s\" />',\n\t\t\t\t( empty( $logo ) ? esc_url( $image ) : esc_url( $logo ) ),\n\t\t\t\tget_bloginfo( 'name' )\n\t\t\t);\n\t\t?>\n\t</a>\n\t<?php\n}", "function ci_e_logo($before=\"\", $after=\"\"){ \n\techo ci_logo($before, $after);\n}", "function my_login_logo() { ?>\n\t\t<style type=\"text/css\">\n\t\t\tbody.login div#login h1 a {\n\t\t\t\tbackground-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/admin-login.png);\n\t\t\t\tpadding-bottom: 30px;\n\t\t\t\tbackground-size: contain;\n\t\t\t\tmargin-left: 0px;\n\t\t\t\tmargin-bottom: 0px;\n\t\t\t\tmargin-right: 0px;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t</style>\n\t<?php }", "function _sync_custom_logo_to_site_logo($value)\n {\n }", "function my_login_logo() { ?>\n\t\t<style type=\"text/css\">\n\t\t\tbody.login div#login h1 a {\n\t\t\t\tbackground-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/SD-logo.png);\n\t\t\t\tpadding-bottom: 30px;\n\t\t\t\tbackground-size: contain;\n\t\t\t}\n\t\t</style>\n\t<?php }", "function custom_login_logo() {\n\techo '<style type=\"text/css\">h1 a { background: url('.get_bloginfo('template_directory').'/assets/dist/logo-login.png) 50% 50% no-repeat !important; }</style>';\n}", "function wpex_header_logo_icon() {\n\n\t// Get logo img from admin panel\n\t$icon = esc_html( wpex_get_mod( 'logo_icon' ) );\n\n\t// Apply filter for child theming\n\t$icon = apply_filters( 'wpex_header_logo_icon', $icon );\n\n\t// Apply an empty/hidden icon in the customizer for postMessage support\n\tif ( 'none' == $icon && is_customize_preview() ) {\n\t\t$icon = 'wpex-hidden';\n\t}\n\n\t// Return icon\n\tif ( $icon && 'none' != $icon ) {\n\t\treturn '<span id=\"site-logo-fa-icon\" class=\"fa fa-'. $icon .'\" aria-hidden=\"true\"></span>';\n\t}\n\n}", "function wpstartup_toplogo_html(){\n\n if( get_theme_mod('custom_logo', '') != '' ){\n $custom_logo_id = get_theme_mod('custom_logo');\n $custom_logo_attr = array(\n 'class' => 'custom-logo',\n 'itemprop' => 'logo',\n\n );\n echo sprintf( '<a href=\"%1$s\" class=\"custom-logo-link image\" rel=\"home\" itemprop=\"url\">%2$s</a>',\n esc_url( home_url( '/' ) ),\n wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr )\n );\n }else{\n echo sprintf( '<a href=\"%1$s\" class=\"custom-logo-link text\" rel=\"home\" itemprop=\"url\">%2$s</a>',\n esc_url( home_url( '/' ) ),\n esc_attr( get_bloginfo( 'name', 'display' ) ) //get_bloginfo( 'description' )\n );\n }\n}", "public function custom_logo( $html ) {\n\n\t\t$logo_id = get_theme_mod( 'custom_logo' );\n\n\t\tif ( ! $logo_id ) {\n\t\t\treturn $html;\n\t\t}\n\n\t\t$logo = wp_get_attachment_image_src( $logo_id, 'full' );\n\n\t\tif ( $logo ) {\n\t\t\t// For clarity.\n\t\t\t$logo_width = esc_attr( $logo[1] );\n\t\t\t$logo_height = esc_attr( $logo[2] );\n\n\t\t\t// If the retina logo setting is active, reduce the width/height by half.\n\t\t\tif ( get_theme_mod( 'retina_logo', false ) ) {\n\t\t\t\t$logo_width = floor( $logo_width / 2 );\n\t\t\t\t$logo_height = floor( $logo_height / 2 );\n\n\t\t\t\t$search = [\n\t\t\t\t\t'/width=\\\"\\d+\\\"/iU',\n\t\t\t\t\t'/height=\\\"\\d+\\\"/iU',\n\t\t\t\t];\n\n\t\t\t\t$replace = [\n\t\t\t\t\t\"width=\\\"{$logo_width}\\\"\",\n\t\t\t\t\t\"height=\\\"{$logo_height}\\\"\",\n\t\t\t\t];\n\n\t\t\t\t// Add a style attribute with the height, or append the height to the style attribute if the style attribute already exists.\n\t\t\t\tif ( strpos( $html, ' style=' ) === false ) {\n\t\t\t\t\t$search[] = '/(src=)/';\n\t\t\t\t\t$replace[] = \"style=\\\"height: {$logo_height}px;\\\" src=\";\n\t\t\t\t} else {\n\t\t\t\t\t$search[] = '/(style=\"[^\"]*)/';\n\t\t\t\t\t$replace[] = \"$1 height: {$logo_height}px;\";\n\t\t\t\t}\n\n\t\t\t\t$html = preg_replace( $search, $replace, $html );\n\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\n\t}", "function custom_login_logo() {\n\techo '<style type=\"text/css\">h1 a { background: url('.get_bloginfo('template_directory').'/assets/logo-login.png) 50% 50% no-repeat !important; }</style>';\n}", "function wp_custom_logo_in_login() {\n\n $css = '<style type=\"text/css\">\n #login h1 a,\n .login h1 a {\n background-image: url(https://via.placeholder.com/120);\n background-repeat: no-repeat;\n background-size: 120px;\n height: 120px;\n width: 120px;\n }\n\n body {background: #141414 !important}\n\n .login #backtoblog a,\n .login #nav a {color: #adadad !important}\n\n .login #login_error,\n .login .message,\n .login .success,\n .login form {\n border-radius: 10px\n }\n\n .wp-core-ui .button-primary {\n background: #000 !important;\n border-color: #000 !important;\n box-shadow: none !important;\n color: #fff !important;\n text-decoration: none !important;\n text-shadow: none !important;\n border-radius: 0 !important;\n }\n\n input[type=text]:focus,\n input[type=password]:focus {\n border-color: #ff0083 !important;\n box-shadow: none !important;\n }\n </style>';\n\n echo $css;\n}", "function custom_login_logo() {\n $options = get_option('ea_settings');\n echo '<style>' . $options['ea_textarea_field_0'] . '</style>'; \n }", "function cmt_change_logo() {\n require_once(\"includes/cmt-customize-login.php\");\n CMT_Customize_Login_Screen::init();\n}", "function my_custom_login_logo()\n{\n\techo '<style type=\"text/css\">body.login div#login h1 a { background-image:url('.get_template_directory_uri().'/assets/images/logo_login_bodyrock.png) !important; } </style>';\n}", "function blueauthentic_custom_logo_setup() {\n\t$defaults = array(\n\t\t'height' => 150,\n\t\t'width' => 450,\n\t\t'flex-height' => true,\n\t\t'flex-width' => true,\n\t\t'header-text' => array( 'site-title', 'site-description' ),\n\t\t'unlink-homepage-logo' => true,\n\t);\n\tadd_theme_support( 'custom-logo' );\n}", "function custom_login_logo(){\n\techo '\n\t<style type=\"text/css\">\n\tbody.login { background-color: #fff !important; }\n\t#loginform { background-color: #515151 !important; }\n\t.login #nav a, .login #backtoblog a { color: #9B9B9B !important; }\n\t.wp-core-ui .button-primary { background: #000000; border-color: #000000 !important; -webkit-box-shadow: inset 0 1px 0 rgba(230, 230, 230, 0.5),0 1px 0 rgba(0,0,0,.15) !important; box-shadow: inset 0 1px 0 rgba(230,230,230,.5),0 1px 0 rgba(0,0,0,.15); color: #fff; text-decoration: none; }\n\t.wp-core-ui .button-primary:hover { background-color: #2E2E2E !important; }\n\th1 a { background-size:100% !important; background-image: url('.custom_logo().') !important; height: 110px !important; width: 220px !important;}\n\t.login form { background-color: #333333 !important; }\n\t#login form p, .login label { color: #fff; }\n\t.login .message { border-left: 4px solid #C62602; }\n\t</style>';\n}", "function mpcth_display_logo(){\r\n\tglobal $mpcth_options;\r\n\t\r\n\t$link = get_home_url();\r\n\t$output = '<div id=\"mpcth_logo_wrap\">';\r\n\t\t$output .= '<a id=\"mpcth_logo\" href=\"'.$link.'\">';\r\n\t\tif(isset($mpcth_options['mpcth_use_text_logo']) && $mpcth_options['mpcth_use_text_logo']) {\r\n\t\t\tif(isset($mpcth_options['mpcth_text_logo']) && $mpcth_options['mpcth_text_logo'] != '')\r\n\t\t\t\t$output .= '<h1>' . $mpcth_options['mpcth_text_logo'] . '</h1>';\r\n\t\t} else {\r\n\t\t\tif(isset($mpcth_options['mpcth_logo']) && $mpcth_options['mpcth_logo'] != '')\r\n\t\t\t\t$output .= '<img src=\"' . $mpcth_options['mpcth_logo'] . '\" alt=\"Logo\" data-retina=\"' . (isset($mpcth_options['mpcth_logo_2x']) && $mpcth_options['mpcth_logo_2x'] != '' ? $mpcth_options['mpcth_logo_2x'] : '') . '\">';\r\n\t\t\telse\r\n\t\t\t\t$output .= '<h1>' . get_bloginfo('name') . '</h1>';\r\n\t\t}\r\n\r\n\t\tif(isset($mpcth_options['mpcth_text_logo_description']) && $mpcth_options['mpcth_text_logo_description'] == '1')\r\n\t\t\t$output .= '<small>' . get_bloginfo('description') . '</small>';\r\n\t\t\r\n\t\t$output .= '</a>';\r\n\t\t$output .= '<div class=\"mpcth-clear-fix\"></div>';\r\n\t$output .= '</div>';\r\n\r\n\treturn $output;\r\n}", "function my_custom_login_logo(){\n echo '<style type=\"text/css\">\n h1 a {height:102px !important; width:316px !important; background-size:contain !important; background-image:url('.get_bloginfo(\"template_url\").'/img/logo.png) !important;}\n </style>';\n}", "function GetMainLogo(){\r\n\techo '<a href=index.php><img src=\"images/logo.jpg\"/ width=844 height=192 alt=RankThem></a>';\r\n}", "function register_block_core_site_logo()\n {\n }", "function my_custom_login_logo()\n{\n echo '\n <style type=\"text/css\">\n #login{\n padding:0;\n } \n .login h1 a { \n background-image:url(' . get_bloginfo('template_directory') . '/assets/img/dash-logo.png) !important;\n background-size: 180px;\n margin: 0 auto;\n margin-top:40px;\n width: 180px;\n height: 180px;\n } \n </style>';\n}", "function my_custom_login_logo() {\n echo '<style type=\"text/css\">\n h1 a { background-image:url(https://theorganicskinco.com/wp-content/uploads/2018/01/logo-tosc.png) !important;\n background-size: 190px !important; width: 201px !important;}\n </style>';\n}", "function sm_output_footer_logo() {\n\t$logo_image = esc_url( crf_get_theme_mod_value( 'style1-copyright-logo' ) );\n\t$logo_retina_image = esc_url( crf_get_theme_mod_value( 'style1-copyright-logo-retina' ) );\n\t$retina_attr = '';\n\tif( $logo_image != '' ) {\n\t\tif( $logo_retina_image != '' ) {\n\t\t\t$retina_attr = \"data-at2x='{$logo_retina_image}'\";\n\t\t} else {\n\t\t\t$retina_attr = \"data-no-retina\";\n\t\t}\n\t}\n\tif( $logo_image ) {\n\t\tob_start();\n\t\t?>\n\t\t<div class='logo-wrapper'><?php\n\t\t\t?><a href='<?php echo esc_url( home_url() )?>'><img src='<?php echo esc_url( $logo_image ) ?>' <?php echo ( $retina_attr ) ?> alt='<?php echo esc_html__( 'Logo', 'semona' ) ?>' title='<?php echo esc_html__( 'Logo', 'semona' ) ?>'></a><?php\n\t\t?></div>\n\t<?php\n\t\t$logo_content = ob_get_contents();\n\t\tob_get_clean();\n\t} else {\n\t\t$logo_content = '';\n\t}\n\t\n\techo apply_filters( 'sm_footer_logo', $logo_content );\n}", "function cutom_login_logo() {\n echo \"<style type=\\\"text/css\\\">\n body.login div#login h1 a {\n background-image: url(\" . get_bloginfo('template_directory') . \"/image/finer-logo.png);\n width: 274px;\n background-size: 274px 63px;\n }</style>\";\n}", "function my_login_logo()\n{\n ?>\n <style type=\"text/css\">\n #login h1 a, .login h1 a {\n background-image: url(https://www.yourdomain.com/image/source.png);\n \t\theight:84px;\n \t\twidth:84px;\n \t\tbackground-repeat: no-repeat;\n }\n </style>\n<?php\n}", "function my_custom_admin_logo()\n{\n\techo '<style type=\"text/css\">#wp-admin-bar-wp-logo .ab-item span.ab-icon { background: url('.get_template_directory_uri().'/img/logo_admin_unid.png) !important; }</style>';\n}", "function custom_loginlogo()\n{\n echo '<style type=\"text/css\">\n h1 a {background-image: url('. get_site_icon_url() . ') !important; }\n </style>';\n}", "function scribbles_custom_logo_args( $args ) {\n\n\t$args['width'] = 325;\n\t$args['height'] = 80;\n\n\treturn $args;\n\n}", "function custom_login_logo() { ?>\n <style type=\"text/css\">\n #login {\n padding-top: 30px;\n }\n\n .login h1 a {\n background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/assets/imgs/logo-mark.svg);\n padding-bottom: 20px;\n width: 300px;\n height: 184px;\n background-size: contain;\n }\n </style>\n<?php }", "public function logo()\n {\n return config('admin.logo');\n }", "public function getLogo()\n {\n return $this->logo;\n }", "function circle_menu_logo() {\n\tcircle_site_logo( 'menu_logo', true, false, '<div class=\"footer__logo\">', '</div>' );\n}", "public function render()\n {\n return view('components.main.logo')->with('classList', $this->classList);\n }", "function child_logo_image() {\n\n //Here's an example\n\n ?>\n\n <h1><a href=\"/\" title=\"\"><div id=\"logo\"></div></a></h1>\n\n <?php\n\n // End Example\n\n}", "public function getLogo() {\n return $this->logo;\n }", "function retro_login_logo() {\n\t$login_logo = ( get_theme_option('wp_login_logo') ? get_theme_option('wp_login_logo') : get_includes_dir('uri') . '/images/wp_login_logo.png' );\n echo '<style type=\"text/css\"> .login h1 a { background-image: url(' . $login_logo . '); background-size: auto; background-position: center; } </style>';\n}", "function custom_login_logo() {\n echo '<style type=\"text/css\">h1 a { background: url('.get_bloginfo('template_directory').'/images/login-logo.png) 50% 50% no-repeat !important; }</style>';\n}", "function custom_login_logo() { ?>\n <style type=\"text/css\">\n .login h1 a {\n background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/assets/imgs/logo-primary.svg);\n padding-bottom: 20px;\n width: 300px;\n background-size: contain;\n }\n </style>\n<?php }", "public function getLogo()\n {\n return $this->logo;\n }", "public function getLogo()\n {\n return $this->logo;\n }", "public function logo()\n {\n $settings = DB:: table('settings')->get();\n\n return view('admin.setting.logo', compact('settings'));\n }", "function register_block_core_site_logo_setting()\n {\n }", "function wpex_header_logo_img() {\n\n\t// Get logo from theme mod\n\t$logo = wpex_get_translated_theme_mod( 'custom_logo' );\n\n\t// Apply filters for child theme mods\n\t$logo = apply_filters( 'wpex_header_logo_img_url', $logo );\n\n\t// Sanitize return\n\t$logo = $logo ? set_url_scheme( $logo ) : false;\n\n\t// Return logo\n\treturn $logo;\n\n}", "function sprdh_custom_login_logo() {\n\techo '<style type=\"text/css\">\n\t h1{\n\t \twidth:213px !important;\n\t\tmargin:0 auto 30px !important;\n\t }\n h1 a { background-image:url(http://dev.sprdh.com/files/wordpress_dashboard/sprdh-logo-wordpress.png) !important;width:213px !important;height:80px !important; background-size: 100% 100% !important;}\t\n\t.login form{padding: 26px 24px 46px 0;}\n\t#login form p {float: left !important;\n\t margin-left: 24px !important;\n\t width: 258px !important;\n\t}\n\t.login form{\n\t\tfloat:left !important;\t\t\n\t}\n\t#login {\n\t width: 600px !important;\n\t\tpadding:60px 0 0 !important;\n\t\theight:450px;\t\t\n\t}\n\t.login #nav{\n\t\tfloat:left !important;\n\t}\n\t.login #backtoblog{\n\t\tfloat:right !important;\n\t}\n </style>';\n}", "function newenglish_login_logo() { ?>\n <style type=\"text/css\">\n body.login { background-color: #19485a; }\n #login h1 a, .login h1 a {\n background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/assets/img/humphris_logo.svg);\n height:65px;\n width:320px;\n background-size: contain;\n background-repeat: no-repeat;\n \tpadding-bottom: 30px;\n }\n body.login #backtoblog a, body.login #nav a {\n text-decoration: none;\n color: #FFFFFF;\n }\n body.login form {\n background: #14738b;\n color: #FFFFFF;\n border: none;\n border-radius: 10px;\n }\n </style>\n<?php }", "function custom_login_logo() {\necho '<style type=\"text/css\">\nh1 a { background-image: url('.get_bloginfo('template_directory').'/images/custom_login_logo.png) !important; height:58px!important; width:312px!important;}\n</style>';\n}", "function form( $instance ) {\n\t\t\t?>\n\t\t\t\n\t\t\t\t<img src=\"<?php echo get_stylesheet_directory_uri();?>/assets/img/gliologo.png\" width=\"100%\">\n\n\t\t\t<?php\n\n\t}", "function cosmetro_footer_logo() {\n\n\t$logo_url = get_theme_mod( 'footer_logo_url' );\n\n\tif ( ! $logo_url ) {\n\t\treturn;\n\t}\n\n\t$url = esc_url( home_url( '/' ) );\n\t$alt = esc_attr( get_bloginfo( 'name' ) );\n\t$logo_url = esc_url( cosmetro_render_theme_url( $logo_url ) );\n\t$logo_id = cosmetro_get_image_id_by_url( cosmetro_render_theme_url( $logo_url ) );\n\t$logo_src = wp_get_attachment_image_src( $logo_id, 'full' );\n\n\tif ( $logo_id && $logo_src ) {\n\t\t$atts = ' width=\"' . $logo_src[1] . '\" height=\"' . $logo_src[2] . '\"';\n\t} else {\n\t\t$atts = '';\n\t}\n\n\t$logo_format = apply_filters(\n\t\t'cosmetro_footer_logo_format',\n\t\t'<div class=\"footer-logo\"><a href=\"%2$s\" class=\"footer-logo_link\"><img src=\"%1$s\" alt=\"%3$s\" class=\"footer-logo_img\" %4$s></a></div>'\n\t);\n\n\tprintf( $logo_format, $logo_url, $url, $alt, $atts );\n\n}", "public static function custom_logo(): void\n\t{\n\t\tadd_action('after_setup_theme', function() {\n\t\t\tadd_theme_support('custom-logo');\n\t\t});\n\t}", "function techmarket_site_title_or_logo() {\n\t\tif ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {\n\t\t\tthe_custom_logo();\n\t\t} elseif ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) {\n\t\t\tjetpack_the_site_logo();\n\t\t} elseif ( apply_filters( 'techmarket_site_logo_svg', true ) ) {\n\t\t\techo '<a href=\"' . esc_url( home_url( '/' ) ) . '\" class=\"custom-logo-link\" rel=\"home\">';\n\t\t\ttechmarket_get_svg_logo();\n\t\t\techo '</a>';\n\t\t} else {\n\t\t\techo '<a href=\"' . esc_url( home_url( '/' ) ) . '\" class=\"custom-logo-link\" rel=\"home\">';\n\t\t\t?>\n\t\t\t<h1 class=\"site-title\"><?php bloginfo( 'name' ); ?></h1>\n\t\t\t<?php if ( '' != get_bloginfo( 'description' ) ) : ?>\n\t\t\t\t<p class=\"site-description\"><?php bloginfo( 'description' ); ?></p>\n\t\t\t<?php endif;\n\t\t\techo '</a>';\n\t\t}\n\t}", "function ywig_header_logo_callback() {\n\t$logo = esc_url( get_option( 'logo' ) );\n\n\tif ( empty( $logo ) ) {\n\t\techo '<input type=\"button\" class=\"button-secondary\" value=\"Choose Logo\" id=\"upload-button\" /><input type=\"hidden\" id=\"logo-input\" name=\"logo\" value=\"' . esc_url( get_option( 'logo' ) ) . '\" />';\n\t} else {\n\n\t\techo '<input type=\"button\" class=\"button-secondary\" value=\"Change Logo\" id=\"upload-button\" /><input type=\"hidden\" id=\"logo-input\" name=\"logo\" value=\"' . esc_url( get_option( 'logo' ) ) . '\" /> <input type=\"button\" class=\"button-secondary\" value=\"Delete\" id=\"logo-delete-button\" />';\n\t}\n}", "function my_custom_logo_link() {\n\n // The logo\n $custom_logo_id = get_theme_mod( 'custom_logo' );\n\n // If has logo\n if ( $custom_logo_id ) {\n\n // Attr\n $custom_logo_attr = array(\n 'class' => 'custom-logo',\n 'itemprop' => 'logo',\n );\n\n // Image alt\n $image_alt = get_post_meta( $custom_logo_id, '_wp_attachment_image_alt', true );\n if ( empty( $image_alt ) ) {\n $custom_logo_attr['alt'] = get_bloginfo( 'name', 'display' );\n }\n\n // Get the image\n $html = sprintf( '<a href=\"%1$s\" class=\"custom-logo-link\" rel=\"home\" itemprop=\"url\">%2$s</a>',\n esc_url( 'https://360pms.co.uk' ),\n wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr )\n );\n\n }\n\n // Return\n return $html; \n}", "function echoFormLogo() { ?>\n <noscript class=\"no-script\">\n Al parecer JavaScript está desactivado en el navegador.<br>\n La funcionalidad completa de esta página no estará disponible mientras JavaScript esté desactivado.<br>\n Se sugiere <a href=\"http://enable-javascript.com/es/\" target=\"_blank\">activar JavaScript</a> y volver a cargar esta página.\n </noscript>\n <div class=\"form--logo-slogan\">\n <div>\n <a href=\"/jubiladosaluchar\">\n <img src=\"/jubiladosaluchar/img/logo4.png\" alt=\"Logo de la Organización\">\n <h2 class=\"slogan\">jubiladosaluchar.pe</h2>\n </a>\n </div>\n </div>\n<?php }", "protected function GetLogo()\n {\n $oConfig = TdbCmsConfig::GetInstance();\n\n return $oConfig->GetThemeURL().'/images/chameleon_logo_header.png';\n }", "function detalhe_site_title_or_logo($echo = true) {\n $html = '';\n\n if(has_custom_logo()){\n $logo_url = get_custom_logo_url(false);\n $html = '<img id=\"brand-logo\" alt=\"Brand\" src=\"'. $logo_url .'\">';\n } else {\n // Deploy the name of the site only if no logo is present\n $html = get_bloginfo('name');\n }\n\n if ( ! $echo ) {\n return $html;\n }\n\n echo $html;\n}", "function extamus_login_logo_url_title() {\n return 'Custom WordPress design by Extamus Media';\n}", "function Header()\n{\n\t$this->Image('recursos/logo.jpg', 20, 20, 180 );\n\t$this->SetFont('Arial','',10);\n\t$this->Text(20,14,'',0,'C', 0);\n\t$this->Ln(30);\n}", "function base_admin_bar_add_custom_logo_bloom() {\n\t?>\n\t<style>\n\t#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon::before {\n\t\tbackground-image: url('<?php echo esc_url( THEME_IMAGES ); ?>/logo-admin-branding.svg');\n\t\tbackground-size: 100%;\t\t\n\t\tbackground-position: center;\n\t\tbackground-repeat: no-repeat;\n\t\tcolor: transparent;\n\t}\n\t</style>\n\t<?php\n}", "function mai_custom_logo( $content ) {\n\tif ( ! ( function_exists( 'has_custom_logo' ) && has_custom_logo() ) ) {\n\t\treturn $content;\n\t}\n\treturn get_custom_logo();\n}", "function clea_base_custom_logo( $wp_customize ) {\n\t\n\t/* Get the theme prefix. */\n\t$prefix = hybrid_get_prefix();\n\t// echo \"<p>prefixe : \" . $prefix . \"</p><br/>\" ; will print \"prefixe : unique\"\n\t\n\t$ald_description = __( 'charger le logo et le favicon du site', 'clea-base' );\t\n\t\n\t\t/* Add the test textarea section. */\n\t\t$wp_customize->add_section(\n\t\t\t'unique-impact-1-logo-upload',\n\t\t\tarray(\n\t\t\t\t'title' \t=> esc_html__( 'Logo & Favicon', 'clea-base' ),\n\t\t\t\t'priority' \t=> 35,\n\t\t\t\t'capability' \t=> 'edit_theme_options',\n\t\t\t\t'description'\t=> $ald_description\n\t\t\t)\n\t\t);\n\n\t/**\n\t * logo Upload\n\t * source http://code.tutsplus.com/tutorials/digging-into-the-theme-customizer-practicing-ii--wp-27486\n\t */\n\n\t $wp_customize->add_setting(\n\t\t\"{$prefix}_theme_settings[logo_upload]\",\n\tarray(\n\t\t'type' \t\t\t=> 'option',\n\t\t'sanitize_callback' => 'clea_base_logo_sanitize', \n\t));\n\t \n\t// see http://themefoundation.com/wordpress-theme-customizer/\n\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control(\n\t\t\t$wp_customize, \"{$prefix}_theme_settings[logo_upload]\", \n\t\t\tarray(\n\t\t\t\t'label' => __('Charger un logo', 'clea-base'),\n\t\t\t\t'section' => 'unique-impact-1-logo-upload',\n\t\t\t) \n\t\t) \n\t);\n\t\n\t/** \n\t* demander logo width en px\n\t**/\n\t$wp_customize->add_setting( \n\t\t\"{$prefix}_theme_settings[logo_width]\", \n\t\tarray(\n\t\t\t'type' \t=> 'option',\n\t\t\t'default' => __('Largeur du logo (en px)', 'clea-base'),\n\t\t\t'sanitize_callback' => 'clea_base_logo_sanitize',\n\t\t)\n\t);\n\t\n\n\t$wp_customize->add_control(\n \"{$prefix}_theme_settings[logo_width]\",\n array(\n 'label' => __('largeur du logo (px)', 'clea-base'),\n 'section' => 'unique-impact-1-logo-upload',\n 'type' => 'text',\n )\n\t);\n\n\t\t/** \n\t* demander logo height en px\n\t**/\n\t$wp_customize->add_setting( \n\t\t\"{$prefix}_theme_settings[logo_height]\", \n\t\tarray(\n\t\t\t'type' \t=> 'option',\n\t\t\t'default' => __('Hauteur du logo (en px)', 'clea-base'),\n\t\t\t'sanitize_callback' => 'clea_base_logo_sanitize',\n\t\t)\n\t);\n\t\n\n\t$wp_customize->add_control(\n \"{$prefix}_theme_settings[logo_height]\",\n array(\n 'label' => __('Hauteur du logo (px)', 'clea-base'),\n 'section' => 'unique-impact-1-logo-upload',\n 'type' => 'text',\n )\n\t);\n\n\t/**\n\t * favicon Upload\n\t */\n\t$wp_customize->add_setting(\n\t\t\"{$prefix}_theme_settings[favicon_upload]\",\n\tarray(\n\t\t'type' \t=> 'option',\n\t\t'sanitize_callback' => 'clea_base_logo_sanitize', \n\t));\n\t \n\t// see http://themefoundation.com/wordpress-theme-customizer/\n\t$wp_customize->add_control( \n\t\tnew WP_Customize_Image_Control(\n\t\t\t$wp_customize, \"{$prefix}_theme_settings[favicon_upload]\", \n\t\t\tarray(\n\t\t\t\t'label' => __('Charger un favicon', 'clea-base'),\n\t\t\t\t'section' => 'unique-impact-1-logo-upload',\n\t\t\t) \n\t\t) \n\t);\t\n\t\n\t\n}", "function havana_jetpack_site_logo() {\n\t$args = array(\n\t 'header-text' => array(\n\t 'site-title',\n\t 'site-description',\n\t ),\n\t 'size' => 'full',\n\t);\n\tadd_theme_support( 'site-logo', $args );\n}", "public function admin_logo(){\n\n\t\t\t/*if data sended by form*/\n\t\t\tif($this->request->is('post')){\n\n\t\t\t\t/*upload and replace logotype*/\n\t\t\t\t$filename = WWW_ROOT. DS . 'img'.DS.'logo.png'; \n\t\t\t\tmove_uploaded_file($this->data['file']['tmp_name'],$filename);\n\n\t\t\t\t/*reload page*/\n\t\t\t\t$this->redirect($this->request->here);\n\t\t\t\t}\n\n\t\t\t/*set variables of page*/\n\t\t\t$this->set(\"title\", \"Configuration\");\n\t\t\t$this->set(\"legend\", \"Logotype manager\");\n\t\t\t}", "function my_login_logo() { ?>\n <style type=\"text/css\">\n #login h1 a, .login h1 a {\n background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/full-logo.svg);\n\t\twidth:100%;\n\t\tbackground-size: contain;\n\t\tbackground-repeat: no-repeat;\n \tpadding-bottom: 30px;\n }\n </style>\n<?php }", "function sst_custom_logo_setup() {\n $defaults = array(\n 'height' => 100,\n 'width' => 150,\n 'flex-height' => false,\n 'flex-width' => false,\n 'header-text' => array( 'site-title', 'site-description' ),\n 'unlink-homepage-logo' => false, \n );\n \n add_theme_support( 'custom-logo', $defaults );\n}", "public function get_logo()\n {\n\n return $this->logo;\n }", "function my_login_logo() { ?>\n<style type=\"text/css\">\n body.login div#login h1 a {\n \tbackground-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/logo.png);\n \tbackground-size: 327px 67px;\n \twidth: 327px;\n \theight: 67px;\n }\n</style>\n<?php }", "function display_dealer_logo()\n {\n include 'assets/partials/dealer-logo.php';\n }", "function business_header_sitename_content() {\n\tglobal $themeslug, $options; //Call global variables\n\t$logo = $options->get($themeslug.'_logo'); //Calls the logo URL from the theme options\n\nif ($options->get($themeslug.'_custom_logo') == '1') { ?>\n\t<div id=\"logo\">\n\t\t<a href=\"<?php echo home_url(); ?>/\"><img src=\"<?php echo stripslashes($logo['url']); ?>\" alt=\"logo\"></a>\n\t</div> <?php\n\t}\n\t\t\t\t\t\t\n\telse{ ?>\n\t\t<h1 class=\"sitename\"><a href=\"<?php echo home_url(); ?>/\"><?php bloginfo('name'); ?> </a></h1>\n\t\t<?php\n\t}\t\t\t\t\t\t \n}", "function wp_debranding_change_login_page_logo() {\n?>\n <style type=\"text/css\">\n #login { padding: 0; }\n .login h1 a{\n background-image: url('<?php echo get_template_directory_uri(); ?>/assets/images/logo.png');\n background-size: 100%;\n margin: 0 auto;\n height: 230px;\n width: 250px;\n }\n .login form { margin-top: 10px; padding: 10px 18px 15px; }\n #loginform div.g-recaptcha { margin: 0 0 15px -8px !important; }\n .login #nav { margin: 10px 0 0; }\n .login #nav a { color: #F00; }\n #backtoblog { margin: 10px 0 0; text-align: center; }\n </style>\n<?php\n }", "function logo($type)\n {\n $logo = $this->db->get_where('ui_settings', array(\n 'type' => $type\n ))->row()->value;\n return base_url() . 'uploads/logo_image/logo_' . $logo . '.png';\n }", "function logo($type)\n {\n $logo = $this->db->get_where('ui_settings', array(\n 'type' => $type\n ))->row()->value;\n return base_url() . 'uploads/logo_image/logo_' . $logo . '.png';\n }", "function _delete_custom_logo_on_remove_site_logo()\n {\n }", "function vibe_login_logo() {\n \n $url=vibe_get_option('logo');\n\n $light_color = '#333';\n $light_bg = '#fff';\n $dark_color = '#fff';\n $dark_bg = '#313b3d';\n $primary_bg = '#009dd8';\n $primary_color = '#fff';\n $customizer = array();\n $customizer=get_option('vibe_customizer');\n if(isset($customizer) && is_array($customizer) && count($customizer)){\n if(isset($customizer['login_dark'])){\n $dark_bg = $customizer['login_dark'];\n }\n if(isset($customizer['login_dark_color'])){\n $dark_color = $customizer['login_dark_color'];\n }\n if(isset($customizer['login_light'])){\n $light_bg = $customizer['login_light'];\n\n }\n if(isset($customizer['login_light_color'])){\n $light_color = $customizer['login_light_color'];\n }\n if(isset($customizer['primary_bg'])){\n $primary_bg = $customizer['primary_bg'];\n }\n if(isset($customizer['primary_color'])){\n $primary_color = $customizer['primary_color'];\n }\n }\n\n if(!isset($url) || $url == '' ){\n $url = get_stylesheet_directory_uri().'/assets/images/logo.png';\n }\n ?>\n <style type=\"text/css\">\n <?php\n if(filter_var($url, FILTER_VALIDATE_URL)){\n ?>\n body.login div#login h1 a {\n background-image: url(<?php echo $url; ?>);\n }\n <?php \n }\n ?>\n .bp_social_connect{text-align:center;}\n .bp_social_connect>a{display:inline-block;float:none !important;text-decoration:none;}\n .bp_social_connect>a:before{content:'' !important;}\n .login h1 a{\n width:160px;\n background-size:100%;\n }\n html,body.login {\n background: <?php echo $dark_bg; ?>;\n }\n body:before{\n content:'';\n background:rgba(0,0,0,0.1);\n width:100%;\n height:10px;\n position:absolute;\n top:0;\n left:0;\n } \n body.login form#loginform label{\n color: <?php echo $dark_color; ?>;\n font-size:11px;\n text-transform: uppercase;\n font-weight:600;\n opacity: 0.8;\n }\n body.login input[type=checkbox]:checked:before{color: <?php echo $dark_color; ?>;}\n body.login.wp-core-ui .button-primary{background:<?php echo $primary_bg; ?>;border:none;box-shadow:none;text-shadow:none;color:<?php echo $primary_color; ?>;}\n body.login form#loginform {\n background:<?php echo $light_bg; ?>;\n box-shadow:none;\n border-radius:2px;\n margin:0;\n } \n body.login form#loginform label{color:<?php echo $light_color; ?>;;}\n body.login form#loginform .input,\n body.login form#loginform input[type=text], \n body.login form#loginform input[type=checkbox]{\n background: <?php echo $dark_bg; ?>;\n border-color: rgba(255,255,255,0.1);\n border-radius: 2px;\n color:<?php echo $dark_color; ?>;\n }\n body.login #nav a, body.login #backtoblog a{\n color: <?php echo $dark_color; ?>;\n text-transform: uppercase;\n font-size: 11px;\n opacity: 0.8;\n }\n body.login #nav a:hover, body.login #backtoblog a:hover{color:<?php echo $primary_bg; ?>}\n div.error,body.login #login_error{border-radius:2px;}\n <?php\n $wp_login_screen = vibe_get_option('wp_login_screen');\n echo $wp_login_screen;\n ?>\n </style>\n <?php \n }", "function remove_custom_login_logo() {\n echo '<style type=\"text/css\">\n .login h1 a { background-image:none !important; display:unset !important; font-size:1.5em !important; font-weight:bold; }\n </style>';\n}" ]
[ "0.7903747", "0.78039813", "0.76713777", "0.73446864", "0.7303115", "0.73019624", "0.7222574", "0.7181968", "0.71352875", "0.71217805", "0.71080524", "0.70713407", "0.70200807", "0.6991426", "0.6986128", "0.69791687", "0.6965433", "0.69398046", "0.693925", "0.69390523", "0.6938358", "0.69329154", "0.69324946", "0.6931055", "0.6923515", "0.6917958", "0.69168735", "0.6911481", "0.6899207", "0.68976396", "0.6892338", "0.68852556", "0.6877801", "0.68705887", "0.68611723", "0.6843673", "0.68211716", "0.6814108", "0.6811885", "0.6806697", "0.6805303", "0.67878616", "0.6768972", "0.6760655", "0.6758272", "0.6739629", "0.67301726", "0.6717556", "0.6712273", "0.6708901", "0.67019844", "0.6698038", "0.6686313", "0.66854", "0.66851526", "0.668405", "0.66812956", "0.6663451", "0.6663448", "0.6654732", "0.66410685", "0.6640528", "0.6639831", "0.66303116", "0.66223323", "0.66223323", "0.66143143", "0.6610237", "0.659796", "0.6589999", "0.658586", "0.65830785", "0.6578536", "0.6571475", "0.6570297", "0.6569839", "0.6569751", "0.6562811", "0.65627307", "0.6562069", "0.65581363", "0.65473664", "0.6545994", "0.6545673", "0.6543003", "0.6534084", "0.65282863", "0.6526449", "0.6525861", "0.6524294", "0.6516744", "0.6507762", "0.6502626", "0.6500135", "0.6494979", "0.6480212", "0.6480212", "0.6470537", "0.64679027", "0.64663607" ]
0.83300275
0
Form head area HTML.
public function form_head_html() { $settings = $this->form_data['settings']; $title = ! empty( $settings['conversational_forms_title'] ) ? $settings['conversational_forms_title'] : ''; $description = ! empty( $settings['conversational_forms_description'] ) ? $settings['conversational_forms_description'] : ''; if ( empty( $title ) && empty( $description ) ) { return; } $settings['form_title'] = $title; $settings['form_desc'] = $description; \wpforms()->frontend->head( \array_merge( $this->form_data, array( 'settings' => $settings ) ), null, true, true, array() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function htmlFormHead()\n {\n $html = \"\";\n\n $html .= '<div class=\" jumbotron DarkJumbotron width100\" style=\"background-color: #161b22;\">';\n\n $html .= '<div class=\"container\">\n <div class=\"row\"><h2>User\\'s Informations</h2></div>\n <div class=\"row\">\n <div class=\"col-sm\">\n <ul class=\"list-group\">';\n $html .= '<li class=\"list-group-item\">Username: ' . $_SESSION['user']->username . '</li>';\n $html .= '<li class=\"list-group-item\">Email: ' . $_SESSION['user']->email . '</li>';\n if ($_SESSION['user']->getPrivateAccount() == 1) {\n\n $html .= '<li class=\"list-group-item\">Your account is not visible for other users</li>';\n } else {\n $html .= '<li class=\"list-group-item\">Your account is visible for other users</li>';\n }\n $html .= '\n </ul>\n </div>\n <div class=\"col-sm\">\n <div style=\"width: 70%; margin: auto;\">\n <a href=\"?r=dashboard&e=updatePassword\" class=\"btn btn-warning my-2\">Update password</a>\n <a href=\"?r=dashboard&e=updatePrivateAccount\" class=\"btn btn-warning my-2\">Update if account is private</a>\n </div>\n </div>\n </div>';\n\n $html .= '\n \n </div>\n </div>';\n\n return $html;\n }", "public static function formhead(){\n\n $forms = \"<div class='limiter'>\";\n $forms .= \"<div class='container-table100'>\" ;\n $forms .= \"<div class='wrap-table100'>\";\n $forms .= \"<div class='table100 ver1 m-b-110'> \";\n $forms .= \"<div class='table100-head'> \";\n $forms .= \"<table><thead>\\n<tr class='row100 head'>\\n\";\n return $forms;\n\n }", "function acf_form_head()\n{\n}", "public function drawHeader() {\n\t\t\t// Is there scope for using Smarty or similar here?\n\t\t\t// Note that we don't display the <form> for the search box if we're editing a page, because we end up with nested <form>s\n\t\t\t$html = '';\n\t\t\treturn $html;\n\t\t}", "function input_admin_head()\n\t{\n\t\t// Note: This function can be removed if not used\n\n\t\t\n\t\t\n\t}", "function page_header()\n\t\t{\n\n\t\t\t$output = '<form id=\"ace_options_page\" action=\"#\" method=\"post\">';\n\t\t\t$output .= '\t<div class=\"ace_options_page_inner ace_sidebar_active\">';\n\t\t\t$output .= '\t<div class=\"ace_options_page_sidebar\"><div class=\"ace_header\"></div><div class=\"ace_sidebar_content\"></div></div>';\n\t\t\t$output .= '\t\t<div class=\"ace_options_page_content\">';\n\t\t\t$output .= '\t\t\t<div class=\"ace_header\">';\n\t\t\t$output .= '\t\t\t<h2 class=\"ace_logo\">'.$this->ace_superobject->base_data['prefix'].' '.$this->ace_superobject->currentpage.'</h2>';\n\t\t\t$output .= '\t\t\t\t<a class=\"ace_shop_option_link\" href=\"#\">Show all Options [+]</a>';\n\t\t\t$output .= '\t\t\t\t<span class=\"ace_loading\"></span>';\n\t\t\t$output .= \t\t\t\t\t$this->save_button();\n\t\t\t$output .= '\t\t\t</div>';\n\t\t\t$output .= '\t\t\t<div class=\"ace_options_container\">';\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "function onGetFormHead($output = false) {\n\t\t\n\t\t$html = '<div id=\"bf_previewform_div_' . $this->_FORM_CONFIG ['id'] . '\"></div>';\n\t\t//$html .= '<div id=\"bf_pleasewait_preview\"><h2>' . bfText::_ ( 'Please wait a moment, while we validate your submission...' ) . '</h2><br/><img src=\"' . bfCompat::getLiveSite () . '/' . bfCompat::mambotsfoldername () . '/system/blueflame/view/images/check_throbber.gif\" alt=\"throbber\" /></div>';\n\t\t//$html .= '<div id=\"bf_pleasewait_submit\"><h2>' . bfText::_ ( 'Please wait a moment, while we validate &amp; submit your submission...' ) . '</h2><br/><img src=\"' . bfCompat::getLiveSite () . '/' . bfCompat::mambotsfoldername () . '/system/blueflame/view/images/check_throbber.gif\" alt=\"throbber\" /></div>';\n\t\t$html .= \"\\n\\n\" . '<form %s>';\n\t\t\n\t\t$JMenu = JMenu::getInstance ( 'site' );\n\t\t$activeMenu = $JMenu->getActive ();\n\t\t$activeMenu === null ? $Itemid = 1 : $Itemid = $activeMenu->id;\n\t\t\n\t\t$attributes = array ();\n\t\t$attributes ['method'] = 'method=\"' . strtolower ( $this->_FORM_CONFIG ['method'] ) . '\"';\n\t\t$attributes ['action'] = 'action=\"' . ($this->_FORM_CONFIG ['processorurl'] ? $this->_FORM_CONFIG ['processorurl'] : bfCompat::getLiveSite () . '/index.php?Itemid=' . ($Itemid ? $Itemid : '1')) . '\"';\n\t\t$attributes ['name'] = 'name=\"' . 'BF_FORM_' . $this->_FORM_CONFIG ['id'] . '\"';\n\t\t$attributes ['id'] = 'id=\"' . 'BF_FORM_' . $this->_FORM_CONFIG ['id'] . '\"';\n\t\t$attributes ['enctype'] = 'enctype=\"' . $this->_FORM_CONFIG ['enctype'] . '\"';\n\t\t$attributes ['class'] = ' class=\"bfform ' . $this->_FORM_CONFIG ['layout'] . 'form\"';\n\t\t$attributes ['target'] = ' target=\"' . ($this->_FORM_CONFIG ['target'] ? $this->_FORM_CONFIG ['target'] : '_self') . '\"';\n\t\t\n\t\tksort ( $attributes );\n\t\t\n\t\t$attributes = implode ( ' ', $attributes );\n\t\t\n\t\t$html = sprintf ( $html, $attributes );\n\t\t\n\t\tswitch ($output) {\n\t\t\tcase true :\n\t\t\t\techo $html;\n\t\t\t\tbreak;\n\t\t\tcase false :\n\t\t\t\treturn $html;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn true;\n\t}", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "function customHead(){?>\n\t\t\t<style type=\"text/css\">\n\t\t\t.half-container:not(.full){\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tvertical-align: top;\n\t\t\t\twidth: 49%;\n\t\t\t\tbox-sizing:border-box;\n\t\t\t\t-moz-box-sizing:border-box;\n\t\t\t\t-webkit-box-sizing:border-box;\n\t\t\t\tpadding: 0 10px 0 0;\n\t\t\t\tmargin: 0 !important;\n\t\t\t}\n\t\t\tdiv.form-container input{\n\t\t\t\tborder: 2px solid #6A6A6A;\n\t\t\t\tfont-family: AurulentSansRegular;\n\t\t\t\tfont-size: 14px;\n\t\t\t\tpadding: 3px;\n\t\t\t}\n\t\t\tdiv.form-container label{\n\t\t\t\tcolor: #6A6A6A;\n\t\t\t\tfont-family: AurulentSansRegular;\n\t\t\t\tfont-size: 15px;\n\t\t\t\tfont-weight: normal;\n\t\t\t}\n\t\t\t</style>\n\t\t\t<style type=\"text/css\">\n\n\t\t\t/* General styles */\n\t\t\t/* body { margin: 0; padding: 0; font: 80%/1.5 Arial,Helvetica,sans-serif; color: #111; background-color: #FFF; } */\n\t\t\th2 { margin: 0px; padding: 10px; font-family: Georgia, \"Times New Roman\", Times, serif; font-size: 200%; font-weight: normal; color: #FFF; background-color: #CCC; border-bottom: #BBB 2px solid; }\n\t\t\tp#copyright { margin: 20px 10px; font-size: 90%; color: #999; }\n\n\t\t\t/* Form styles */\n\t\t\tdiv.form-container { margin: 10px; padding: 5px; background-color: #FFF; /* border: #EEE 1px solid; */ }\n\n\t\t\tp.legend { margin-bottom: 1em; }\n\t\t\tp.legend em { color: #C00; font-style: normal; }\n\n\t\t\tdiv.errors, div.form-container div.errors { margin: 0 0 10px 0; padding: 5px 10px; border: #FC6 2px solid; background-color: #FFC; }\n\t\t\tdiv.errors p { margin: 0; }\n\t\t\tdiv.errors p em { color: #C00; font-style: normal; font-weight: bold; }\n\n\t\t\tdiv.form-container form p { margin: 0; }\n\t\t\tdiv.form-container form p.note { margin-left: 170px; font-size: 90%; color: #333; }\n\t\t\tdiv.form-container form fieldset { margin: 10px 0; padding: 10px; border: #DDD 1px solid; }\n\t\t\tdiv.form-container form legend { font-weight: bold; color: #666; }\n\t\t\tdiv.form-container form fieldset div { padding: 0.25em 0; }\n\t\t\tdiv.form-container label { margin-right: 10px; padding-right: 10px; width: 100px; display: block; float: left; text-align: right; position: relative; }\n\t\t\tdiv.form-container label.error, \n\t\t\tdiv.form-container span.error { color: #C00; }\n\t\t\tdiv.form-container label em { position: absolute; right: 0; font-size: 120%; font-style: normal; color: #C00; }\n\t\t\tdiv.form-container input.error { border-color: #C00; background-color: #FEF; }\n\t\t\tdiv.form-container input:focus,\n\t\t\tdiv.form-container input.error:focus, \n\t\t\tdiv.form-container textarea:focus {\tbackground-color: #FFC; border-color: #FC6; }\n\t\t\tdiv.form-container div.controlset label, \n\t\t\tdiv.form-container div.controlset input { display: inline; float: none; }\n\t\t\tdiv.form-container div.controlset label.controlset { display: block; float: left; }\n\t\t\tdiv.form-container div.controlset div { margin-left: 170px; }\n\t\t\tdiv.form-container div.buttonrow { margin-left: 180px; }\n\t\t\t\n\t\t\tp.note { font-size: 12px; margin: 5px 0 0 170px; }\n\n\t\t</style>\n\t<?php\n\t}", "protected function form()\n {\n return Admin::form(Headline::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->text('title', 'Judul');\n $form->trumbowyg('excerpt','Summary');\n $form->image('image','Photo')->move('/headline');\n $form->trumbowyg('content','Content')->attribute(['id' => 'trumbowyg']);;\n\n //DPD use mutli select\n $form->select('daerah_id','DPD')->options(Daerah::all()->pluck('name', 'id')); \n\n $states = [\n 'on' => ['value' => 1, 'text' => 'enable', 'color' => 'success'],\n 'off' => ['value' => 0, 'text' => 'disable', 'color' => 'danger'],\n ];\n $form->text('uri','External Url');\n $form->switch('publish','Publish')->states($states);\n $form->hidden('author_id')->value(Admin::user()->id);\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "protected function htmlHead() {\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html>\\n\";\n echo str_repeat(\"\\t\",1) . \"<head>\\n\";\n echo str_repeat(\"\\t\",2) . \"<title>Евиденција волонтера</title>\\n\";\n echo str_repeat(\"\\t\",2) . \"<meta charset=\\\"UTF-8\\\">\\n\";\n echo str_repeat(\"\\t\",2) . \"<link rel=\\\"stylesheet\\\" href=\\\"css/style.css\\\">\\n\";\n if( !is_null($this->cssfile) ) {\n echo str_repeat(\"\\t\",2) . \"<link rel=\\\"stylesheet\\\" href=\\\"css/{$this->cssfile}\\\">\\n\";\n }\n echo str_repeat(\"\\t\",1) . \"</head>\\n\";\n }", "private static final function getHTMLHeadContainer () {\r\n // Return the <HTML><head> container;\r\n $containerHTMLHead = new FileContent (FORM_TP_DIR . _S . 'frm_web_html_head_container.tp');\r\n return $containerHTMLHead->doToken ('[%BASE_HREF_URL%]', DOCUMENT_HOST);\r\n }", "private function renderHead() {\n\t\t\n\t\t\t$this->outputLine('<head>');\n\t\t\t\n\t\t\tif ($this->_title != '') {\n\t\t\t\t$this->outputLine('\t<title>' . $this->_title . '</title>');\n\t\t\t}\n\t\t\t\n\t\t\t$this->outputLine('\t<base href=\"' . $this->_base . '\" />');\n\t\t\t\n\t\t\t$this->outputLine('\t<meta http-equiv=\"content-type\" content=\"' . $this->_contentType . '\" />');\n\t\t\t\n\t\t\t//Meta\n\t\t\tforeach ($this->_meta as $meta) {\n\t\t\t\t$this->outputLine('\t<meta name=\"' . $meta->name . '\" content=\"' . $meta->content . '\" />');\n\t\t\t}\n\t\t\t\n\t\t\t//CSS\n\t\t\tforeach ($this->_css as $css) {\n\t\t\t\t$this->outputLine(\"\t\" . $css);\n\t\t\t}\n\t\t\t\n\t\t\t//JS\n\t\t\tforeach ($this->_js as $js) {\n\t\t\t\t$this->outputLine(\"\t\" . $js);\n\t\t\t}\n\t\t\t\n\t\t\t$this->outputLine('</head>');\n\t\t\n\t\t}", "public function show_head() {\n \n $output = '<head>';\n \n if( empty( $this->title ) ) {\n $this->title = \"No Title Available\";\n } \n\n $output .= '<title>' . $this->title . '</title>';\n $output .= $this->get_header_elements();\n $output .= \"\\n</head>\";\n\n echo $output;\n }", "function print_heading(){\n\t\tif(isset($_GET['activated'])&&$_GET['activated']=='true'){\n\t\t\techo '<div class=\"note_box\">Welcome to '.$this->themename.' theme! On this page you can set the main options\n\t\t\tof the theme. For more information about the theme setup, please refer to the documentation included, which\n\t\t\tis located within the \"documentation\" folder of the downloaded zip file. We hope you will enjoy working with the theme!</div>';\n\t\t}\n\t\techo '<div id=\"hana-content-container\"><form method=\"post\" id=\"hana-options\">';\n\t\tif ( function_exists('wp_nonce_field') ){\n\t\t\twp_nonce_field('hana-theme-update-options','hana-theme-options');\n\t\t}\n\t\techo '<div id=\"sidebar\"><div id=\"logo\"></div><div id=\"navigation\"><ul>';\n\n\t\t$i=1;\n\t\tforeach ($this->options as $value) {\n\n\t\t\tif($value['type']=='title'){\n\t\t\t\techo '<li><span><a href=\"#navigation-'.$i.'\"><img src=\"'.$value['img'].'\" />'.$value['name'].'</a></span></li>';\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\n\t\techo '</ul></div></div><div id=\"content\"><div id=\"header\"><h3 id=\"theme_name\">'.$this->themename.' v.'.$this->hana_version.'</h3></div><div id=\"options_container\">';\n\t}", "function mpcth_add_admin_head() {\r\n\tmpcth_admin_alternative_styles();\r\n}", "function formHeader($action, $method=NULL, $formname=NULL){\r\n\t\t//find any referance uploading file and set form accordingly\r\n\t\t$columnBreakDown = explode(\"\\n\", $this->form);\r\n\r\n\t\tforeach ($columnBreakDown AS $value){\r\n\t\t\t$row = explode(\":\", $value);\r\n\t\t\tif ('upload' == trim(strtolower($row[2]))){\r\n\t\t\t\t$this->enctype=\"multipart/form-data\";\r\n\t\t\t\t$method = \"POST\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//check if method is either GET or POST if not then set POST as default\r\n\t\t$method = trim(strtoupper($method));\r\n\t\tif($method != \"POST\" && $method != \"GET\" ){\r\n\t\t\t$method = \"POST\";\r\n\t\t}\r\n\r\n\t\t//remove any spaces from $formname as can not be used with spaces\r\n\t\t$formname = str_replace(\" \", '', $formname);\r\n\r\n\t\t$ret = '<form method=\"'.$method.'\" action=\"'.$action.'\"';\r\n\t\t$ret .=(!empty($formname))? ' name=\"'.$formname.'\" id=\"'.$formname.'\"' : '';\r\n\t\t$ret .=($this->enctype)? ' enctype=\"'.$this->enctype.'\"' : '';\r\n\t\t$ret .=($this->formScript)? ' onSubmit=\"'.$this->formScript.'\"' : '';\r\n\t\t$ret .= '>';\r\n\r\n\t\treturn $ret;\r\n\t}", "public function head() {\r\n return '';\r\n }", "function head() { /*{{{*/\n\techo \"\n<HTML><HEAD>\n<META http-equiv=Content-Type content='text/html; charset=utf-8' />\n<title>admin</title>\n</HEAD>\n<link rel='stylesheet' type='text/css' href='css/css.css'>\n<link rel='stylesheet' type='text/css' href='css/datepicker.css' />\n<script type='text/javascript' src='js/jquery.js'></script>\n<script type='text/javascript' src='js/taffy-min.js'></script>\n<script type='text/javascript' src='js/moment.min.js'></script>\n<script type='text/javascript' src='js/datepicker.js'></script>\n<script type='text/javascript' src='js/script.js'></script>\n\";\n}", "public function head() {\n\t\treturn '';\n\t}", "private static final function getEndHTMLHeadContainer () {\r\n // Return the <HTML><head> container;\r\n return new FileContent (FORM_TP_DIR . _S . 'frm_web_html_head_body.tp');\r\n }", "public function afficheHead() {\n\t\t?>\n\t\t<!DOCTYPE html>\n\t\t<html lang=\"fr\">\n\t\t\n\t\t<head>\n\t\t <title>L'art public à Montréal - admin</title>\n\t\t <meta charset=\"utf-8\">\n\t\t <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n\t\t <meta name=\"description\" content=\"\">\n\t\t <meta name=\"viewport\" content=\"width=device-width\">\n\t\t \n\t\t <link rel=\"stylesheet\" href=\"<?php echo BASE_URL.\"css/flex.css\"?>\" type=\"text/css\" media=\"screen\">\n\t\t <link rel=\"stylesheet\" href=\"<?php echo BASE_URL.\"css/adminmain.css\"?>\" type=\"text/css\" media=\"screen\">\n\t\t \n\t\t <script src=\"<?php echo BASE_URL.\"js/define.js\"?>\"></script>\n\t\t <script src=\"<?php echo BASE_URL.\"js/admin.js\"?>\"></script>\n\t\t</head>\n\t\t<?php\n\t\t\n\t}", "function vmt_head()\n\t\t{\n\t\t\tif (! empty($this->options['google'])) {\n\t\t\t\techo '<meta name=\"google-site-verification\" content=\"' . esc_attr($this->options['google']) . '\" />';\n\t\t\t}\n\t\t\tif (! empty($this->options['pinterest'])) {\n\t\t\t\techo '<meta name=\"p:domain_verify\" content=\"' . esc_attr($this->options['pinterest']) . '\" />';\n\t\t\t}\n\t\t\tif (! empty($this->options['analytics'])) {\n\t\t\t\techo $this->options['analytics'];\n\t\t\t}\n\t\t}", "function common_header($formcode = \"\", $section = \"\", $extra = \"\")\r\n\t{\r\n\r\n\t\tglobal $IN, $INFO, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;\r\n\t\t$ibforums = Ibf::app();\r\n\r\n\t\t$extra = $extra\r\n\t\t\t? $extra . \"<br>\"\r\n\t\t\t: $extra;\r\n\r\n\t\t$ADMIN->page_detail = $extra . \"Please check the data you are entering before submitting the changes\";\r\n\t\t$ADMIN->page_title = \"Board Settings ($section)\";\r\n\r\n\t\t//+-------------------------------\r\n\r\n\t\t$ADMIN->html .= $SKIN->start_form(array(\r\n\t\t 1 => array('code', $formcode),\r\n\t\t 2 => array('act', 'op'),\r\n\t\t ));\r\n\r\n\t\t//+-------------------------------\r\n\r\n\t\t$SKIN->td_header[] = array(\"{none}\", \"40%\");\r\n\t\t$SKIN->td_header[] = array(\"{none}\", \"60%\");\r\n\r\n\t\t//+-------------------------------\r\n\r\n\t\t$ADMIN->html .= $SKIN->start_table(\"Settings\");\r\n\r\n\t}", "function admin_head()\n {\n }", "public function form_top_content() {\n\t\tif(!empty($this->copy_event)) {\n\t\t\tglobal $post;\n\t\t\t$post->post_title = $this->copy_event->title;\n\t\t\t$post->post_content = $this->copy_event->content;\n\t\t}\n\t\t// show label for event title\n\t\techo '\n\t\t\t<label class=\"event-option\">'.__('Event Title','event-list').':</label>';\n\t}", "public function form()\n\t{\n\t\tglobal $L;\n\n\t\t$html = '<div class=\"mb-3\">';\n\t\t$html .= '<label class=\"form-label\" for=\"label\">' . $L->get('Label') . '</label>';\n\t\t$html .= '<input class=\"form-control\" id=\"label\" name=\"label\" type=\"text\" value=\"' . $this->getValue('label') . '\">';\n\t\t$html .= '<div class=\"form-text\">' . $L->get('This title is almost always used in the sidebar of the site') . '</div>';\n\t\t$html .= '</div>';\n\n\t\tif (defined('BLUDIT_PRO')) {\n\t\t\t$html .= '<div class=\"mb-3\">';\n\t\t\t$html .= '<label class=\"form-label\" for=\"excludeAdmins\">' . $L->get('Exclude administrators users') . '</label>';\n\t\t\t$html .= '<select class=\"form-select\" id=\"excludeAdmins\" name=\"excludeAdmins\">';\n\t\t\t$html .= '<option value=\"true\" ' . ($this->getValue('excludeAdmins') === true ? 'selected' : '') . '>' . $L->get('Enabled') . '</option>';\n\t\t\t$html .= '<option value=\"false\" ' . ($this->getValue('excludeAdmins') === false ? 'selected' : '') . '>' . $L->get('Disabled') . '</option>';\n\t\t\t$html .= '</select>';\n\t\t\t$html .= '</div>';\n\t\t}\n\n\t\treturn $html;\n\t}", "public function admin_head()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $head_content = $this->standard_head(true).\"\\n\"; // We start with the standard stuff.\n \n $head_content .= \"<!-- Also Added by the BMLT plugin 3.X. -->\\n<meta http-equiv=\\\"X-UA-Compatible\\\" content=\\\"IE=EmulateIE7\\\" />\\n<meta http-equiv=\\\"Content-Style-Type\\\" content=\\\"text/css\\\" />\\n<meta http-equiv=\\\"Content-Script-Type\\\" content=\\\"text/javascript\\\" />\\n\";\n $options = $this->getBMLTOptions(1); // All options contain the admin key.\n $key = $options['google_api_key'];\n \n // Include the Google Maps API V3 files.\n $head_content .= '<script type=\"text/javascript\" src=\"https://maps.google.com/maps/api/js?key='.$key.'\"></script>'; // Load the Google Maps stuff for our map.\n \n if (function_exists('plugins_url')) {\n $head_content .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"';\n \n $url = $this->get_plugin_path();\n \n $head_content .= htmlspecialchars($url);\n \n $head_content .= 'admin_styles.css\" />';\n \n $head_content .= '<script type=\"text/javascript\" src=\"';\n \n $head_content .= htmlspecialchars($url);\n \n $head_content .= 'admin_javascript.js\"></script>';\n } else {\n echo \"<!-- BMLTPlugin ERROR (head)! No plugins_url()! -->\";\n }\n \n $head_content .= \"\\n<!-- End Also Added by the BMLT plugin 3.X. -->\\n\";\n echo $head_content;\n }", "function generateHead(){\n $title = $this->getTitle();\n echo \"<!DOCTYPE html>\n <html lang='en'>\n <head>\n <meta charset='UTF-8'>\n <meta name='viewport' content='width=device-width, initial-scale=1.0'>\n <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css'>\n <link href='https://cdn.quilljs.com/1.3.6/quill.snow.css' rel='stylesheet'>\n <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script>\n <script src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js'></script>\n <script src='https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js'></script>\n <link rel='stylesheet' href='static/styles/styles.css'>\n <title>$title</title>\n </head>\n <body>\";\n }", "public static function head()\n {\n require_once(getcwd() . \"/views/Template/head.php\");\n }", "private function printToolHead() {\n\t\t\t$this->page->openBlock('div', 'iw-content');\n\t\t\t$this->page->addInline('p', 'This tool generates reports about wikilinks in one article:');\n\t\t\t$this->page->openBlock('ul');\n\t\t\t$this->page->addInline('li', 'Links from given article which have no backlinks from target article');\n\t\t\t$this->page->addInline('li', 'Backlinks from other articles which have no links from given article');\n\t\t\t$this->page->addInline('li', 'Links from given article with backlinks from other articles');\n\t\t\t$this->page->closeBlock();\n\t\t\t$this->page->addInline('h2', 'Options');\n\t\t\t\n\t\t\t// options\n\t\t\t$optionForm = new HtmlForm('index.php', 'GET');\n\t\t\t$optionForm->addHTML('<table class=\"iw-nostyle\">');\n\t\t\t\n\t\t\t// lang/project\n\t\t\t$optionForm->addHTML('<tr><td>');\n\t\t\t$optionForm->addLabel('lang', 'Project');\n\t\t\t$optionForm->addHTML('</td><td>');\n\t\t\t$optionForm->addInput('lang', $this->par['lang'], '', 7, true);\n\t\t\t$optionForm->addHTML('&nbsp;.&nbsp;');\n\t\t\t$optionForm->addInput('project', $this->par['project'], '', 20, true);\n\t\t\t$optionForm->addHTML('&nbsp;.org</td></tr>');\n\t\t\t\n\t\t\t// page\n\t\t\t$optionForm->addHTML('<tr><td>');\n\t\t\t$optionForm->addLabel('page', 'Page title');\n\t\t\t$optionForm->addHTML('</td><td>');\n\t\t\t$optionForm->addInput('page', $this->par['page'], 'A page title in the main namespace (0)', 0, true);\n\t\t\t$optionForm->addHTML('</td></tr>');\n\t\t\t\n\t\t\t// submit button\n\t\t\t$optionForm->addHTML('<tr><td colspan=\"2\">');\n\t\t\t$optionForm->addButton('submit', 'View page conjunction');\n\t\t\t$optionForm->addHTML('</td></tr>');\n\t\t\t\n\t\t\t$optionForm->addHTML('</table>');\n\t\t\t$optionForm->output();\n\t\t\t\n\t\t\t$this->page->closeBlock();\n\t\t}", "public function head() {\r\n return <<<HTML\r\n <meta charset=\"utf-8\">\r\n <title>$this->title</title>\r\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\r\n <link href=\"steampunked.css\" type=\"text/css\" rel=\"stylesheet\" />\r\n\r\nHTML;\r\n }", "public function header()\n {\n echo \"<!doctype html>\\n<html lang='pt'>\\n<head>\\n\";\n echo \"\\t<meta charset='UTF-8'>\\n\";\n echo \"\\t<title>{$this->controller->getTitle()}</title>\\n\";\n $this->links();\n echo \"</head>\\n<body>\\n\";\n }", "private function generateHead(){\n echo '<div class=\"panel panel-default\">';\n echo '<div class=\"panel-heading\">';\n echo '<h1 class=\"panel-title\"><span class=\"glyphicon glyphicon-flag\"></span>Your last orders</h1>';\n echo '</div>';\n echo '<div class=\"panel-body\">';\n }", "function getPageHeader( ) {\n\t\tglobal $wgScript;\n\t\t\n\t\t// Various variables used for the form\n\t\t$action = htmlspecialchars( $wgScript );\n\t\t$title = Title::makeTitle( NS_SPECIAL, 'Listusers' );\n\t\t$special = htmlspecialchars( $title->getPrefixedDBkey() );\n\n\t\t// form header\n\t\t$out = '<form method=\"get\" action=\"'.$action.'\">' .\n\t\t\t\t'<input type=\"hidden\" name=\"title\" value=\"'.$special.'\" />' .\n\t\t\t\twfMsgHtml( 'groups-editgroup-name' ) . '<select name=\"group\">';\n\n\t\t// get all group names and IDs\n\t\t$groups = User::getAllGroups();\n\t\t\n\t\t// we want a default empty group\n\t\t$out.= '<option value=\"\"></option>';\n\t\t\n\t\t// build the dropdown list menu using datas from the database\n\t\tforeach ( $groups as $group ) {\n\t\t\t$selected = ($group == $this->requestedGroup);\n\t\t\t$out .= wfElement( 'option',\n\t\t\t\tarray_merge(\n\t\t\t\t\tarray( 'value' => $group ),\n\t\t\t\t\t$selected ? array( 'selected' => 'selected' ) : array() ),\n\t\t\t\tUser::getGroupName( $group ) );\n\t\t}\n\t\t$out .= '</select> ';\n\n\t\t$out .= wfMsgHtml( 'specialloguserlabel' ) . '<input type=\"text\" name=\"username\" /> ';\n\n\t\t// OK button, end of form.\n\t\t$out .= '<input type=\"submit\" /></form>';\n\t\t// congratulations the form is now build\n\t\treturn $out;\t\n\t}", "public function contentHTML() {\n\n\t\t// Check if the form has been submitted\n\t\tif(isset( $_POST['register-account'])) {\n\n\t\t\t// Save the form data so PHP can give it back later on\n\t\t\t$this->username = trim($_POST['username']);\n\n\n\t\t\t// Process the form\n\t\t\t$this->processNewAccount();\n\n\t\t\t// If there are no errors at all, display success\n\t\t\tif ($this->usernameErrorMsg == '' && $this->passwordErrorMsg == '') {\n\t\t\t\techo 'Congrats on your new account';\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t// Include the intro to the reg page\n\t\tinclude 'templates/registration/introRegistration.php';\n\n\t\t// Show the registration Form\n\t\t$this->showRegistrationForm();\n\t}", "function showHead($title='') {\n\tglobal $template, $config;\n?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html><head>\n<title><?=$title?></title>\n<link href=\"<?=joinPath($config['site_absolute_url'],'/')?>css/style.css\" rel=\"stylesheet\" type=\"text/css\" />\n<script src=\"<?=joinPath($config['site_absolute_url'],'/')?>js/JSL.js\" type=\"text/javascript\"></script>\n<script src=\"<?=joinPath($config['site_absolute_url'],'/')?>js/application.js\" type=\"text/javascript\"></script>\n<?=implode($template->includes,\"\\n\");?>\n<?php\n}", "public function admin_head()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $this->admin_ajax_handler();\n \n $head_content = $this->standard_head(); // We start with the standard stuff.\n \n $head_content .= '<script type=\"text/javascript\" src=\"https://maps.google.com/maps/api/js?sensor=false\"></script>'; // Load the Google Maps stuff for our map.\n \n $head_content .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"';\n \n $url = $this->get_plugin_path();\n \n $head_content .= htmlspecialchars($url);\n \n $head_content .= 'admin_styles.css\" />';\n \n $head_content .= '<script type=\"text/javascript\" src=\"';\n \n $head_content .= htmlspecialchars($url);\n \n if (!defined('_DEBUG_MODE_')) {\n $head_content .= 'js_stripper.php?filename=';\n }\n \n $head_content .= 'admin_javascript.js\"></script>';\n \n return $head_content;\n }", "public function head()\n {\n return <<<HTML\n<title>$this->title</title>\n<!-- Meta Tags -->\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<meta name=\"keywords\" content=\"josh benner, developer, javascript, api, web app, designer, linkedin scraper\">\n<meta name=\"author\" content=\"Josh Benner\">\n<meta name=\"description\" content=\"Web Apps, personal projects, and lots of data; The professional website of Josh Benner\">\n\n<!-- DOWNLOAD AND HOST BOOTSTRAP LOCALLY-->\n<!-- Stylesheets -->\n<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js\"></script>\n<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js\"></script>\n<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css\">\n<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css\">\n<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../lib/css/normalize.css\">\n<link rel=\"stylesheet\" href=\"../lib/css/main.css\">\nHTML;\n }", "private function _print_html_head()\n\t{\n\t\t$output = \"<head>\\n\";\n\t\t$output .= \"<title>{$this->title}</title>\\n\";\n\t\t$output .= $this->_print_html_head_metatags();\n\t\t$output .= $this->_print_html_head_javascript();\n\t\t$output .= $this->_print_html_head_css();\n\t\t$output .= \"</head>\\n<body>\\n\";\n\t\t\n\t\treturn $output;\n\t}", "function renderForm()\t{\n\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('settings'), 'divider', '');\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('spaceTitle'), 'text', 'title');\n\t\n\t\tif(count($this->error) > 0) {\n\t\t\t$form .= \"<span style='display:block;color:red;font-weight:bold;padding:10px;'>\" .\n\t\t\t\t\t\t\t implode(\"<br />\", $this->error) . \n\t\t\t\t\t \"</span>\";\t\n\t\t}\n\n\t\t$form .= \"<form action=\" . t3lib_div::getThisUrl() . \"><table border='0' cellpadding='7'>\";\n\t\t$form .= implode(\"\\n\", $fields);\n\t\t$form .= \"<tr><td colspan='2' align='right'>\" .\n\t\t\t\t \"<input type='hidden' name='formPosted' value='1'>\" . \n\t\t\t\t \"<input type='submit' value='\" . $GLOBALS['LANG']->getLL('createSpace') . \"'></td></tr></table></form>\";\n\n\t\treturn $form;\n\t}", "public function adminHead()\r\n\t{\r\n\t\tglobal $Site;\r\n\t\tglobal $layout;\r\n\t\t$pluginPath = $this->htmlPath(). 'libs' .DS. 'ckeditor'. DS;\r\n\t\t\r\n\t\t$html = '';\r\n\r\n\t\t\t$language = substr($Site->language(), 0, 2);\r\n\t\t\t$_SESSION[\"editor_lang\"] = $Site->language();\r\n\t\t\t$html .= '<script src=\"'.$pluginPath. 'ckeditor.js\"></script>'.PHP_EOL;\r\n\t\t\t$html .= '<script src=\"'.$pluginPath. 'lang' .DS. $language.'.js\"></script>'.PHP_EOL;\t\t \r\n\r\n\t\treturn $html;\r\n\t}", "protected function setFormContent()\n {\n\t\t$content = $this->getTitle();\n\t\t\n\t\t$content .= '<p>Your meditation time on <b>';\n\t\t$content .= $this->data['long_date'];\n\t\t$content .= '</b> has been deleted. Would you like to restore it?</p>';\n\t\t\n\t\t$this->Form = new Form;\n\t\t$this->buildForm();\n\t\t$content .= $this->Form->getHtml();\n\t\t\n\t\t// Add the cancel link\n\t\t$content .= $this->cancelLink();\n\t\t\n\t\t$this->content = $content;\n }", "private function _renderXhtmlHead() {\r\n\t\t\r\n?>\r\n\t<head>\r\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n\t\t<title><?php echo \"$this->_title\"; ?></title>\r\n\t\t<link rel=\"shortcut icon\" href=\"favicon.png\" type=\"image/png\" />\r\n<?php\r\n\r\n\t\t$this->_stylesheets->render();\r\n\t\t$this->_scripts->render();\r\n\t\t$this->_keywords->render();\r\n\r\n\t\tif (isset($this->_description)) {\r\n?>\r\n\t\t<meta name=\"description\" content=\"<?php echo \"$this->_description\"; ?>\" />\r\n<?php\r\n\r\n\t\t}\r\n\r\n?>\r\n\t</head>\r\n<?php\r\n\t\t\r\n\t}", "public function siteHead() {\n\t\t$webhook = $this->getValue('page');\n\t\tIF($this->webhook($webhook)) {\n\t\t $html = '';\n\t\t $css = THEME_DIR_CSS . 'contact3.css';\n\t\t IF(file_exists($css)) {\n\t\t\t$html .= Theme::css('css' . DS . 'contact3.css');\n\t\t } else {\n\t\t\t$html .= '<link rel=\"stylesheet\" href=\"' .$this->htmlPath(). 'layout' . DS . 'contact3.css\">' .PHP_EOL;\n\t\t }\n\n\t\t IF($this->getValue('google-recaptcha')){\n\t\t\t$html .= '<script src=\"https://www.google.com/recaptcha/api.js\"></script>';\n\t\t }\n\n\t\t return $html;\n\t\t}\n\n\t\t$webHookForBookingLog = $this->getValue('bookingsDisplayPage');\n\t\tIF($this->webhook($webHookForBookingLog)) {\n\t\t\t// Include plugin's CSS files\n\t\t\t$html = $this->includeCSS('BookingForm.css');\n\t\t\t\n\t\t\treturn $html;\n\t\t}\n\t}", "protected function _content_template() {\n ?>\n <form method=post style=\"color:black;\">\n <label>Uw naam*</label><input style=\"border-radius:10px;\" type=text name=naam /> <br>\n <label>Uw e-mailadres*</label><input style=\"border-radius:10px;\" type=email name=email /> <br>\n <label>Uw bericht*</label><textarea style=\"border-radius:10px;\" style=\"width:100%; border-radius:10xpx;\" name=bericht> </textarea><br>\n <input type=submit name=add style=\"border-radius:10px; color:white; background-color:#004020;\" value=\"Reactie plaatsen\"/>\n </form>\n <?php\n require('dbconnect.php');\n \n\t}", "public static function start_head()\n\t{\n\t\t?>\n\t\t<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fr\" lang=\"fr\">\n\t\t<head>\n\t\t<title></title>\n\t\t<link rel=\"shortcut icon\" href=\"favicon.ico\" />\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<meta http-equiv=\"content-language\" content=\"fr\" />\n\t\t<link href=\"style.css\"\ttitle=\"Défaut\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" />\n\t\t\n <?php\n\t}", "public function addHead()\n {\n if (file_exists(DIRREQ . \"app/view/{$this->getDir()}/head.php\")) {\n include(DIRREQ . \"app/view/{$this->getDir()}/head.php\");\n }\n }", "function showHead( $appctx )\n\t\t{\n\t\t}", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "function getTitle() {\n return 'Forms Demo';\n }", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 1px solid\") ;\r\n\r\n $table->add_row($this->element_label(\"Organization\"),\r\n $this->element_form(\"Organization\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Name\"),\r\n $this->element_form(\"Meet Name\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Address 1\"),\r\n $this->element_form(\"Meet Address 1\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Address 2\"),\r\n $this->element_form(\"Meet Address 2\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet State\"),\r\n $this->element_form(\"Meet State\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Postal Code\"),\r\n $this->element_form(\"Meet Postal Code\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Country\"),\r\n $this->element_form(\"Meet Country\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Code\"),\r\n $this->element_form(\"Meet Code\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet Start\"),\r\n $this->element_form(\"Meet Start\")) ;\r\n\r\n $table->add_row($this->element_label(\"Meet End\"),\r\n $this->element_form(\"Meet End\")) ;\r\n\r\n $table->add_row($this->element_label(\"Pool Altitude\"),\r\n $this->element_form(\"Pool Altitude\")) ;\r\n\r\n $table->add_row($this->element_label(\"Course Code\"),\r\n $this->element_form(\"Course Code\")) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "protected function showBeginHTML(): self {\n echo <<<HTML\n<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>{$this->getTitle()}</title>\n <meta name=\"keywords\" content=\"{$this->getKeywords()}\">\n <meta name=\"description\" content=\"{$this->getDescription()}\">\n <meta name=\"author\" content=\"Dmitri Serõn\">\n <link rel=\"stylesheet\" href=\"/assets/css/styles.css\">\n</head>\n<body>\nHTML;\n\n return $this;\n }", "function html_header()\n{\n\techo \"<html>\\n<head>\\n\";\n\techo \"\\t<title>CalDAVTester GUI</title>\\n\";\n\tif (file_exists(__DIR__.'/jquery.js'))\n\t{\n\t\techo \"\\t<script src='jquery.js'></script>\\n\";\n\t}\n\telse\n\t{\n\t\techo \"\\t<script src='https://code.jquery.com/jquery-2.2.4.min.js' integrity='sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=' crossorigin='anonymous'></script>\\n\";\n\t}\n\techo \"\\t<script src='gui.js'></script>\\n\";\n\techo \"\\t<link type='text/css' href='gui.css' rel='StyleSheet'/>\\n\";\n\techo \"</head>\\n<body>\\n\";\n}", "public function render() {\n $formContainsRequiredFields = FALSE;\n $htmlElements = array();\n\n foreach($this->elements as $element) {\n if(!$this->getMarkRequiredFields()) {\n $element['object']->markIfRequired(FALSE);\n }\n\n if($element['object']->isRequired()) $formContainsRequiredFields = TRUE;\n $element['object']->render();\n if($element['object']->errorOccured()) $this->setError(TRUE);\n\n $htmlElements[] = $element['object']->fetch();\n $this->javascripts .= $element['object']->getJavaScripts();\n }\n\n $this->html = implode(\"\\n<span class=\\\"element_separator\\\">&nbsp;</span>\", $htmlElements);\n $preForm = (bool)$this->headline ? FORMWIZARD_PRE_FORM_HEADLINE : FORMWIZARD_PRE_FORM;\n\n $html = NULL;\n\n $html .= '<style type=\"text/css\">@import url('.FORMWIZARD_CSS_URL.\");</style>\\n\";\n $html .= str_replace('{headline}', $this->headline, $preForm);\n $html .= \"\\n\".'<form name=\"'.$this->name.'\" method=\"'.$this->method.'\" action=\"'.$this->action.'\" enctype=\"multipart/form-data\">';\n $html .= \"\\n\".'<input type=\"hidden\" name=\"__'.$this->name.'_submitted\" value=\"1\" />';\n $html .= \"\\n\".$this->html;\n $html .= \"\\n\".'</form>';\n $html .= \"\\n\".'<script type=\"text/javascript\">'.$this->javascripts.'</script>';\n\n if($formContainsRequiredFields && $this->markRequiredFields) {\n $html .= \"\\n\".FORMWIZARD_LEGEND_REQUIRED_FIELD;\n }\n\n $this->html = $html.\"\\n\".FORMWIZARD_POST_FORM;\n\n $this->isRendered = TRUE;\n }", "public function renderHeadSection()\n\t{\n\t\treturn \"\";\n\t}", "protected function bodyHeader() {\n echo str_repeat(\"\\t\",1) . \"<body>\\n\";\n echo str_repeat(\"\\t\",2) . \"<div id=\\\"page\\\">\\n\";\n echo str_repeat(\"\\t\",3) . \"<header>\\n\";\n echo str_repeat(\"\\t\",4) . \"<h1>Евиденција волонтера</h1>\\n\";\n echo str_repeat(\"\\t\",3) . \"</header>\\n\";\n }", "function CMSBodyMain()\n\t{\techo $this->cat->InputForm();\n\t}", "function addHead()\n\t{\n\n\t\t$app = JFactory::getApplication();\n\t\t$user = JFactory::getUser();\n\t\t$input = $app->input;\n\n\t\t$responsive = $this->getParam('responsive', 1);\n\t\t$navtype = $this->getParam('navigation_type', 'joomla');\n\t\t$navtrigger = $this->getParam('navigation_trigger', 'hover');\n\t\t$offcanvas = $this->getParam('navigation_collapse_offcanvas', 0) || $this->getParam('addon_offcanvas_enable', 0);\n\t\t$legacycss = $this->getParam('legacy_css', 0);\n\t\t$frontedit = in_array($input->getCmd('option'), array('com_media', 'com_config'))\t//com_media or com_config\n\t\t\t\t\t\t\t\t\t\t|| in_array($input->getCmd('layout'), array('edit'))\t\t\t\t\t\t\t\t//edit layout\n\t\t\t\t\t\t\t\t\t\t|| (version_compare(JVERSION, '3.2', 'ge') && $user->id && $app->get('frontediting', 1) && \n\t\t\t\t\t\t\t\t\t\t\t\t($user->authorise('core.edit', 'com_modules') || $user->authorise('core.edit', 'com_menus')));\t//frontediting\n\n\t\t// LEGACY COMPATIBLE\n\t\tif($legacycss){\n\t\t\t$this->addCss('legacy-grid');\t//legacy grid\n\t\t\t$this->addStyleSheet(T3_URL . '/fonts/font-awesome/css/font-awesome.css'); //font awesome 3\n\t\t}\n\n\t\t// FRONTEND EDITING\n\t\tif($frontedit){\n\t\t\t$this->addCss('frontend-edit');\n\t\t}\n\n\t\t// BOOTSTRAP CSS\n\t\t$this->addCss('bootstrap', false);\n\n\t\t// TEMPLATE CSS\n\t\t$this->addCss('template', false);\n\n\t\tif (!$responsive && $this->responcls) {\n\t\t\t$this->addCss('non-responsive'); //no responsive\n\n\t\t\t$nonrespwidth = $this->getParam('non_responsive_width', '970px');\n\t\t\tif(preg_match('/^(-?\\d*\\.?\\d+)(px|%|em|rem|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn)?/', $nonrespwidth, $match)){\n\t\t\t\t$nonrespwidth = $match[1] . (!empty($match[2]) ? $match[2] : 'px');\n\t\t\t}\n\t\t\t$this->addStyleDeclaration('.container {width: ' . $nonrespwidth . ' !important;}');\n\t\t\n\t\t} else if(!$this->responcls){\n\t\t\t\n\t\t\t// BOOTSTRAP RESPONSIVE CSS\n\t\t\t$this->addCss('bootstrap-responsive');\n\t\t\t\n\t\t\t// RESPONSIVE CSS\n\t\t\t$this->addCss('template-responsive');\n\t\t}\n\n\t\t// add core megamenu.css in plugin\n\t\t// deprecated - will extend the core style into template megamenu.less & megamenu-responsive.less\n\t\t// to use variable overridden in template\n\t\tif($navtype == 'megamenu'){\n\n\t\t\t// If the template does not overwrite megamenu.less & megamenu-responsive.less\n\t\t\t// We check and included predefined megamenu style in base\n\t\t\tif(!is_file(T3_TEMPLATE_PATH . '/less/megamenu.less')){\n\t\t\t\t$this->addStyleSheet(T3_URL . '/css/megamenu.css');\n\n\t\t\t\tif ($responsive && !$this->responcls){\n\t\t\t\t\t$this->addStyleSheet(T3_URL . '/css/megamenu-responsive.css');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// megamenu.css override in template\n\t\t\t$this->addCss('megamenu');\n\t\t}\n\n\t\t// Add scripts\n\t\tif (version_compare(JVERSION, '3.0', 'ge')) {\n\t\t\tJHtml::_('jquery.framework');\n\t\t} else {\n\t\t\t$scripts = @$this->_scripts;\n\t\t\t$jqueryIncluded = 0;\n\t\t\tif (is_array($scripts) && count($scripts)) {\n\t\t\t\t//simple detect for jquery library. It will work for most of cases\n\t\t\t\t$pattern = '/(^|\\/)jquery([-_]*\\d+(\\.\\d+)+)?(\\.min)?\\.js/i';\n\t\t\t\tforeach ($scripts as $script => $opts) {\n\t\t\t\t\tif (preg_match($pattern, $script)) {\n\t\t\t\t\t\t$jqueryIncluded = 1;\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\tif (!$jqueryIncluded) {\n\t\t\t\t$this->addScript(T3_URL . '/js/jquery-1.8.3' . ($this->getParam('devmode', 0) ? '' : '.min') . '.js');\n\t\t\t\t$this->addScript(T3_URL . '/js/jquery.noconflict.js');\n\t\t\t}\n\t\t}\n\n\t\tdefine('JQUERY_INCLUED', 1);\n\n\n\t\t// As joomla 3.0 bootstrap is buggy, we will not use it\n\t\t$this->addScript(T3_URL . '/bootstrap/js/bootstrap.js');\n\t\t// a jquery tap plugin\n\t\t$this->addScript(T3_URL . '/js/jquery.tap.min.js');\n\n\t\t// add css/js for off-canvas\n\t\tif ($offcanvas && ($this->responcls || $responsive)) {\n\t\t\t$this->addCss('off-canvas', false);\n\t\t\t$this->addScript(T3_URL . '/js/off-canvas.js');\n\t\t}\n\n\t\t$this->addScript(T3_URL . '/js/script.js');\n\n\t\t//menu control script\n\t\tif ($navtrigger == 'hover') {\n\t\t\t$this->addScript(T3_URL . '/js/menu.js');\n\t\t}\n\n\t\t//reponsive script\n\t\tif ($responsive && !$this->responcls) {\n\t\t\t$this->addScript(T3_URL . '/js/responsive.js');\n\t\t}\n\n\t\t//some helper javascript functions for frontend edit\n\t\tif($frontedit){\n\t\t\t$this->addScript(T3_URL . '/js/frontend-edit.js');\n\t\t}\n\n\t\t//check and add additional assets\n\t\t$this->addExtraAssets();\n\t}", "public function form_logo_html() {\n\n\t\tif ( empty( $this->form_data['settings']['conversational_forms_custom_logo'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$custom_logo_url = wp_get_attachment_image_src( $this->form_data['settings']['conversational_forms_custom_logo'], 'full' );\n\t\t$custom_logo_url = isset( $custom_logo_url[0] ) ? $custom_logo_url[0] : '';\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-logo\">\n\t\t\t<img src=\"<?php echo \\esc_url( $custom_logo_url ); ?>\" alt=\"<?php \\esc_html_e( 'Form Logo', 'wpforms-conversational-forms' ); ?>\">\n\t\t</div>\n\t\t<?php\n\t}", "public function gluu_sso_form()\n {\n // add taskbar button\n\n $boxTitle = html::div(array('id' => \"prefs-title\", 'class' => 'boxtitle'), $this->gettext('hederGluu'));\n $this->include_stylesheet('GluuOxd_Openid/css/gluu-oxd-css.css');\n $this->include_script('GluuOxd_Openid/js/scope-custom-script.js');\n\n $tableHtml=$this->admin_html();\n unset($_SESSION['message_error']);\n unset($_SESSION['message_success']);\n return html::div(array('class' => ''),$boxTitle . html::div(array('class' => \"boxcontent\"), $tableHtml ));\n }", "public function head() {\n\t\t$html = parent::head();\n\n\t\t$root = $this->course->root;\n $stepTag = $this->assignment->tag;\n\n $html .= <<<HTML\n<base href=\"$root/$stepTag/\" />\n\nHTML;\n\n\t\tif($this->file !== false) {\n\t\t\t/*\n\t\t\t * Transfer everything between <head> and </head>\n\t\t\t * except for the line automatically included by\n\t\t\t * the template\n\t\t\t */\n\n\t\t\t// Read until we get to <head>\n\t\t\twhile(($line = fgets($this->file)) != false) {\n\t\t\t\tif(stristr($line, '<head>')) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$code = $this->codeStart();\n\n\t\t\t// Read until </head>\n\t\t\twhile(($line = fgets($this->file)) != false) {\n\t\t\t\tif(stristr($line, '</head>')) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(stristr($line, 'course.css') ||\n stristr($line, 'site.css') ||\n\t\t\t\t\tstristr($line, 'class.css') ||\n\t\t\t\t\tstristr($line, 'course.min.js') ||\n\t\t\t\t\tstristr($line, 'step/step.js') ||\n\t\t\t\t\tstristr($line, 'step/step.css') ||\n\t\t\t\t\tstristr($line, 'js/jquery') ||\n\t\t\t\t\tstristr($line, 'lib/js/video-js') ||\n\t\t\t\t\tstristr($line, 'video.css') ||\n\t\t\t\t\tstristr($line, '<title>')) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$code .= $line;\n\t\t\t}\n\n\t\t\t// This block of code does an eval on the header lines of\n\t\t\t// the page and saves the results into a string\n\t\t\tob_start();\n\t\t\teval($code);\n\t\t\t$html .= ob_get_contents();\n\t\t\tob_end_clean();\n\t\t}\n\n\t\treturn $html;\n }", "public function getHtmlHeadSection()\n\t{\n\t\t$paths = $this->m_common->getPathInfo();\n\t\t$file_paths = $paths[$this->m_common->m_env];\n\t\t\n\t\t$paths = $this->m_common->getPathInfo();\n\t\t$file_paths = $paths[$this->m_common->m_env];\n\t\t\n\t\t$sql = \"SELECT alias FROM common_Views WHERE LOWER( controller_name ) = '\" . strtolower( $this->m_active_controller_name ) . \"'\";\n\t\t$result = $this->m_common->m_db->query( $sql, __FILE__, __LINE__ );\n\t\t$row = $this->m_common->m_db->fetchRow( $result );\n\t\t$alias = $row[0];\n\t\t\n\t\t$sql = \"SELECT value FROM common_Settings WHERE LOWER( title ) = 'site-name'\";\n\t\t$result = $this->m_common->m_db->query( $sql, __FILE__, __LINE__ );\n\t\t$row = $this->m_common->m_db->fetchRow( $result );\n\t\t$site = $row[0];\n\t\t\n\t\t$return = '\n\t\t<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\" >\n\t\t\n\t\t<head>\n\t\t\n\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" >\n\t\t\t<link rel=\"icon\" type=\"image/png\" href=\"/images/favicon.ico\" />\n\t\t\t<title>' . $alias . ' - ' . $site . '</title>\n\t\t\t\n\t\t\t<link rel=\"stylesheet\" href=\"' . $file_paths['css_ex'] . '/jquery-ui-1.8.1.custom.css\" type=\"text/css\" />\n\t\t\t<link rel=\"stylesheet\" href=\"' . $file_paths['css_ex'] . '/960_grid.css\" type=\"text/css\" />\n\t\t\t<link rel=\"stylesheet\" href=\"' . $file_paths['css'] . '/common.css\" type=\"text/css\" />\n\t\t\t\n\t\t\t<script type=\"text/javascript\" src=\"' . $file_paths['js_ex'] . '/jquery-1.4.2.js\"></script>\n\t\t\t<script type=\"text/javascript\" src=\"' . $file_paths['js_ex'] . '/jquery-ui-1.8.1.custom.min.js\"></script>\n\t\t\t<script type=\"text/javascript\" src=\"' . $file_paths['js_ex'] . '/jquery.hotkeys.js\"></script>\n\t\t\t<script type=\"text/javascript\" src=\"' . $file_paths['js'] . '/jquery.common.js\"></script>\n\t\t\t<script type=\"text/javascript\" src=\"' . $file_paths['js_nerd'] . '/jquery.halfnerd.mail.js\"></script>\n\t\t\t\n\t\t</head>\n\t\t';\n\t\t\n\t\treturn $return;\n\t\t\n\t}", "function HTML_StartHead(){\n\t\techo \"<!DOCTYPE html>\\n\";\n\t\techo \"<html>\\n\";\n\t\techo \"<head>\\n\";\n}", "function getHtmlStep1Form()\r\n\t{\r\n\t\treturn $this->getAdminTableHtml( 1 );\r\n\t}", "function showForm() {\n \tglobal $pluginpath;\n \t\n \tif ($this->idt == \"\") {\n \t //user is creating new template\n \t\t$title = MF_NEW_TEMPLATE;\n \t\t$this->action = 'createtempl';\n\t\t$btnText = MF_CREATE_TEMPLATE_BUTTON; \n \t} else {\n \t //user is editing old template\n \t\t$title = \tMF_CHANGE_TEMPLATE;\n \t\t$this->action = 'changetempl';\n\t\t$btnText = MF_CHANGE_FORUM_BUTTON;\n \t}\n \t\n\t$this->doHtmlSpecChars();\n\t\t\n\tinclude \"admin/tempForm.php\";\n \t\n }", "public function renderForm()\n {\n\n $table = \"luda_resource_has_tag\";\n $identifier = \"Light_Kit_Admin_UserData.generated/luda_resource_has_tag\";\n $parentLayout = \"Light_Kit_Admin/kit/zeroadmin/dev/mainlayout_base\";\n $vars = [\n \"title\" => \"Resource has tag form\",\n ];\n if (array_key_exists(\"solo\", $_GET)) {\n $parentLayout = \"Light_Kit_Admin/kit/zeroadmin/dev/mainlayout_solo\";\n $vars['related_links'] = []; // cancel any existing related links\n $this->setOnSuccessIframeSignal(\"done\");\n }\n\n $form = $this->processForm($identifier, $table);\n\n\n\n //--------------------------------------------\n // RENDERING\n //--------------------------------------------\n return $this->renderAdminPage('Light_Kit_Admin_UserData/kit/zeroadmin/generated/luda_resource_has_tag_form', [\n \"parent_layout\" => $parentLayout,\n \"form\" => $form,\n ], PageConfUpdator::create()->updateWidget(\"body.lka_chloroform\", [\n 'vars' => $vars,\n ]));\n }", "function showContent()\n {\n $this->elementStart('form', array('method' => 'post',\n 'id' => 'form_openidtrust',\n 'class' => 'form_settings',\n 'action' => common_local_url('openidtrust')));\n $this->elementStart('fieldset');\n // TRANS: Button text to continue OpenID identity verification.\n $this->submit('allow', _m('BUTTON','Continue'));\n // TRANS: Button text to cancel OpenID identity verification.\n $this->submit('deny', _m('BUTTON','Cancel'));\n\n $this->elementEnd('fieldset');\n $this->elementEnd('form');\n }", "public function output_setup_form() {\n\t\t$this->output_controls_html( 'klicktipp' );\n\t}", "private function displayHeader()\n {\n\n $html = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">' . \"\\n\";\n $html .= '<html xmlns=\"http://www.w3.org/1999/xhtml\">';\n $html .= '<head>' . \"\\n\";\n\n //Meta tags\n $html .= '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />' . \"\\n\";\n $html .= '<meta name=\"description\" content=\"' . $this->pageInfo['pageDescription'] . '\" />' . \"\\n\";\n $html .= '<meta name=\"keywords\" content=\"jobs, freelance, work, design, freedom, choice, new zealand, quality\" />' . \"\\n\";\n $html .= '<link rel=\"icon\" type=\"image/png\" href=\"images/volition-icon.png\" />' . \"\\n\";\n\n //Stylesheets\n $html .= '<!-- Stylesheets -->' . \"\\n\";\n $html .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"css/styles.css\" />' . \"\\n\";\n $html .= '<!--[if lt IE 9]>' . \"\\n\";\n $html .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"css/ie.css\" />' . \"\\n\";\n $html .= '<![endif]-->' . \"\\n\";\n\n //Scripts\n //$html .= '<script type=\"text/javascript\" src=\"js/window.js\"></script>'.\"\\n\";\n\n //Page title\n $html .= '<title>Volition | ' . $this->pageInfo['pageTitle'] . '</title>' . \"\\n\";\n $html .= '</head>' . \"\\n\";\n $html .= '<body>' . \"\\n\";\n\n //Header\n $html .= '<div id=\"header\">' . \"\\n\";\n\n //Control buttons\n\n $html .= '<div id=\"headerImg\"><a href=\"index.php?page=home\"></a></div>' . \"\\n\";\n\n if ($this->model->userLoggedIn) {\n $html .= '<p class=\"controlButton\"><a href=\"index.php?page=logout\">Logout</a></p>' . \"\\n\";\n $html .= '<p class=\"userControl\">You are logged in as ' . $_SESSION['userName'] . '</p>' . \"\\n\";\n } else {\n $html .= '<p class=\"controlButton\"><a href=\"index.php?page=login\">Login</a></p>' . \"\\n\";\n $html .= '<p class=\"controlButton\"><a href=\"index.php?page=register\">Register</a></p>' . \"\\n\";\n }\n\n $html .= '<form id=\"searchForm\" method=\"post\" action=\"index.php?page=search\">';\n if ($_POST['searchInput']) {\n $html .= '<input type=\"text\" name=\"searchInput\" id=\"searchInput\" value=\"' . $_POST['searchInput'] . '\" />';\n } else {\n $html .= '<input type=\"text\" name=\"searchInput\" id=\"searchInput\" value=\"Search...\" />';\n }\n $html .= '<input type=\"submit\" class=\"submit\" name=\"searchSubmit\" id=\"searchSubmit\" value=\"Go\" />';\n $html .= '</form>';\n\n //Navbar\n $html .= $this->displayNav();\n\n $html .= '</div>' . \"\\n\";\n //Content tags\n $html .= '<div id=\"container\">' . \"\\n\";\n $html .= '<div id=\"content\" >' . \"\\n\";\n\n return $html;\n\n }", "function PKG_OptionPageHeader($title)\n{\n\tinclude_once('/m23/inc/db.php');\n\n\tdbConnect();\n\n\t$id = (isset($_GET['id']) ? $_GET['id'] : $_POST['id']);\n\n\techo(\"\n<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\" \\\"http://www.w3.org/TR/html4/loose.dtd\\\">\n<html>\n<head>\n<title>$title</title>\n<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"/m23admin/css/index.css\\\">\n</head>\n<body bgcolor=\\\"#596374\\\">\n\n<form method=\\\"post\\\">\n<input type=\\\"hidden\\\" name=\\\"id\\\" value=\\\"$id\\\">\n\n<table align=\\\"center\\\">\n<tr>\n\t<td>\n\t\t<div class=\\\"subtable_shadow\\\">\n\t\t\t<table align=\\\"center\\\" class=\\\"subtable\\\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\\\"2\\\">\n\t\t\t\t\t\t<span class=\\\"title\\\">$title</span><br><br>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\n\");\n\n\t$layout['allvalues']=PKG_getAllParams($id);\n\treturn($layout);\n}", "public static function easyFormStart()\n {\n echo '<!-- EasyCreator START -->'.NL;\n\n echo '<div id=\"ecr_box\">'.NL;\n\n echo '<form action=\"index.php?option=com_easycreator\" method=\"post\" '\n .'name=\"adminForm\" id=\"adminForm\">'.NL;\n }", "function content() {\n echo \"\n <form action='http://{$_SERVER['SERVER_NAME']}/mailmaid/subscriber/add' method='post'>\n <input name='token' type='hidden' value='{$this->params['token']}'>\n <label for='username'>Name</label>\n <input name='name' placeholder='Name' id='name' type='text' required>\n <label for='description'>Description</label>\n <input name='description' placeholder='Description (Optional)' id='description' type='text'>\n <input type='submit' value='Create List'>\n </form>\n \";\n }", "public function render_options_page()\n\t{\n\t\treturn include 'src/views/form.php';\n\t}", "public function displayRegisterForm()\n {\n // charger le HTML de notre template\n require OPROFILE_TEMPLATES_DIR . 'register-form.php';\n }", "function displayHtmlHeader() {\n\t\tglobal $page;\n\t\t\n\t\techo \"<!DOCTYPE html5>\";\n\t\techo \"<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='fr'>\";\n\t\t\n\t\t\techo \"<head>\";\n\t\t\t\t\n\t\t\t\t//Encodage et zoom\n\t\t\t\techo \"<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\";\n\t\t\t\techo \"<meta name='viewport' content='width=device-width, initial-scale=1.0' />\";\n\t\t\t\techo \"<meta http-equiv='X-UA-Compatible' content='IE=edge' />\";\n\t\t\t\t\n\t\t\t\t//Titre de la page\n\t\t\t\techo \"<title>Gestion maintenances | Best Engines Inc.</title>\";\n\t\t\t\t\n\t\t\t\t//Description et auteur de la page\n\t\t\t\techo \"<meta name='description' content='Application de gestion des maintenances de la société Best Engines Inc.' />\";\n\t\t\t\techo \"<meta name='author' content='Best Engines Inc.' />\";\n\t\t\t\t\n\t\t\t\t//Fichiers CSS\n\t\t\t\techo \"<link href='config/css/bootstrap.min.css' rel='stylesheet' />\";\n\t\t\t\techo \"<link href='config/css/animate.css' rel='stylesheet' />\";\n\t\t\t\techo \"<link href='config/css/styles.css' rel='stylesheet' />\";\n\t\t\t\t\n\t\t\t\t//Formulaire d'authentification\n\t\t\t\tif($page == \"authentification\") {\n\t\t\t\t\techo \"<link rel='stylesheet' href='config/font-awesome/css/font-awesome.min.css' />\";\n\t\t\t\t\techo \"<link rel='stylesheet' href='config/css/authentification/form-elements.css' />\";\n\t\t\t\t\techo \"<link rel='stylesheet' href='config/css/authentification/style.css' />\";\n\t\t\t\t\t\n\t\t\t\t\techo \"<!--[if lt IE 9]>\";\n\t\t\t\t\t\techo \"<script src='https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js'></script>\";\n\t\t\t\t\t\techo \"<script src='https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js'></script>\";\n\t\t\t\t\techo \"<![endif]-->\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Font\n\t\t\t\techo \"<link rel='stylesheet' type='text/css' href='http://fonts.googleapis.com/css?family=Montserrat' />\";\n\t\t\t\t\n\t\t\t\t//Favicon\n\t\t\t\techo \"<link href='doc/img/favicon/favicon.png' rel='shortcut icon' />\";\n\n\t\t\techo \"</head>\";\t\t\t\n\t\t\techo \"<body>\";\n\t}", "public function start()\n\t{\n\t\t$attrs = \"\";\n\t\tforeach($this->_attributes as $key => $val)\n\t\t\t$attrs .= \"$key=\\\"$val\\\" \";\n\n\t\t$attrs = trim($attrs);\n\t\techo \"<form $attrs>\\n\";\n\t}", "protected function html()\r\n\t{\r\n\r\n\t\t$data = $this->form;\r\n\t\t$f = $data['form'];\r\n\r\n\t\tif($f == 'select'){\r\n\t\t\t$this->selectLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'file'){\r\n\t\t\t$this->fileLink();\r\n\t\t}\r\n\r\n\t\tif($f == 'textarea'){\r\n\t\t\t$this->success = $this->textarea();\r\n\t\t}\r\n\r\n\t\tif($f == 'radio' || $f=='checkbox'){\r\n\t\t\t$this->chooseLink();\r\n\t\t}\r\n\t\tif($f == 'hidden'|| $f =='password'|| $f =='text'|| $f =='number'|| $f =='date'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($f == 'editor'){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif(strpos($f,'extend')!==false){\r\n\t\t\t$this->oneLink();\r\n\t\t}\r\n\t\tif($this->continue){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->replace();\r\n\t}", "function insert() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm(TRUE);\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function contentHTML() {\n\t\t// If not then offer them a login or registration link\n\t\tif( !isset($_SESSION['username']) ) {\n\t\t\techo 'You need to be logged in';\n\t\t\treturn;\n\t\t}\n\t\t//include account html\n\t\tinclude 'templates/search/searchform.php';\n\t\tinclude 'templates/account/user-account.php';\n\t\t// If user is an admin\n\t\tif( $_SESSION['privilege'] == 'admin' ) {\n\t\t\tinclude 'templates/account/admin-controls.php';\n\t\t}\n\t}", "public function adminHead ()\r\n {\r\n \tif ($GLOBALS['editing']) {\r\n \t\t$this->printScripts();\r\n \t}\r\n }", "function meta_html($post)\n {\n $view = new Xby2BaseView(get_post_meta($post->ID));\n $view->addInput('text', 'link-label', 'Label: ', 'label', 'regular-text');\n $view->addInput('text', 'link-link', 'Link: ', 'link', 'large-text');\n $view->addInput('text', 'link-priority', 'Priority: ', 'priority', 'regular-text');\n $view->displayForm();\n }", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $msg = html_div(\"ft_form_msg\") ;\r\n $msg->add(html_p(html_b(\"Processing the SDIF Queue requires\r\n processing swimmers, swim meets, and/or swim teams which are\r\n not currently stored in the database. Specify how unknown\r\n data should be processed.\"), html_br())) ;\r\n\r\n $td = html_td(null, null, $msg) ;\r\n $td->set_tag_attribute(\"colspan\", \"2\") ;\r\n $table->add_row($td) ;\r\n $table->add_row($this->element_label(\"Swimmers\"), $this->element_form(\"Swimmers\")) ;\r\n $table->add_row($this->element_label(\"Swim Meets\"), $this->element_form(\"Swim Meets\")) ;\r\n $table->add_row($this->element_label(\"Swim Teams\"), $this->element_form(\"Swim Teams\")) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "function loadInHeader() {\n $this->metaData();\n//\t\t$this->loadAddOns();\n $this->onHead(\"onHead\"); // call back to onHead in extensions things js, etc in head\n $this->onEditor(\"onHead\"); // only when login to admin, for fck to work??\n //If not in admin, blank initEditor\n if (!isset($_SESSION['name'])) { // not sure what this does??\n print \"<script type=\\\"text/javascript\\\">function initeditor(){}</script>\\n\";\n }\n }", "public function fields()\n\t{\n\t\t$block = new FieldsBuilder('page_header');\n\t\t$block\n\t\t\t->addText('title', [\n\t\t\t\t'label' => 'Title',\n\t\t\t\t'instructions' => 'Enter an optional title for this page header (will default to page title)',\n\t\t\t])\n\t\t\t->addImage('image', [\n\t\t\t\t'label' => 'Image',\n\t\t\t\t'instructions' => 'Select the image to be used in this page header (will default to featured image)'\n\t\t\t]);\n\n\t\treturn $block->build();\n\t}", "function initialize () {\n $this->set_openingtag ( \"<FORM[attributes]>\" );\n\t$this->set_closingtag ( \"</FORM>\" );\n }", "public function open(){\n\n $form = '<form ';\n $class = 'active-form';\n\n RMTemplate::get()->add_script(\n 'forms/active-form.js',\n 'rmcommon',\n array(\n 'location' => 'footer'\n )\n );\n\n RMTemplate::get()->add_style(\n 'active-form.css',\n 'rmcommon',\n array(\n 'location' => 'footer'\n )\n );\n\n foreach ( $this->attributes as $attr => $value ){\n\n switch ( $attr ){\n case 'submit-via':\n $class .= $value == 'ajax' ? ' ajax-form' : '';\n break;\n case 'validation':\n $class .= $value == 'local' ? ' validate-form' : '';\n RMTemplate::get()->add_script('jquery.validate.min.js', 'rmcommon', array('directory' => 'include', 'location' => 'footer'));\n break;\n case 'class':\n $class .= ' ' . $value;\n break;\n default:\n $form .= $attr . '=\"' . $value . '\"';\n break;\n }\n\n }\n\n $form .= ' class=\"' . $class . '\">';\n\n echo $form;\n\n }", "public function setFormTitle()\n {\n if ($enquiry = Mage::registry('enquiry')) {\n return $this->__('Enquiry: #%s', $enquiry->getid());\n }\n return $this->__('Contact Enquiry Information');\n }", "function fielding_head_top() {\n\t$theme_dir = get_template_directory_uri();\n\n\t?>\n\t<!--[if gt IE 8]><!--><link rel='stylesheet' id='fielding-site-css' href='<?php echo $theme_dir; ?>/css/site.css' type='text/css' media='all'><!--<![endif]-->\n\t<script type=\"text/javascript\">\n\t\tvar ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>',\n\t\t\ttemplateurl = '<?php echo get_bloginfo( 'template_url' ); ?>';\n\t</script>\n\t<?php\n}", "function getHead() {\n\n $out = \"\";\n\n if ($this->meta_keywords) array_push($this->head, \"<meta name='keywords' content='{$this->meta_keywords}' />\");\n if ($this->meta_description) array_push($this->head, \"<meta name='description' content='{$this->meta_description}' />\");\n\n foreach ($this->head as $string) {\n $out .= \" $string\\n\";\n }\n return \"\\n$out\\n\";\n }", "function head() {\n\n\techo '<h1>ATOM.CMS</h1>';\n\t\n}", "public function set_heading($heading) {\n $this->heading=$heading;\n if (!isset($this->form_name) or $this->form_name=='') {\n $this->form_name=$heading;\n error_log(\"BasicForm: Had to revert form name to form heading\");\n }\n }", "public function buildHeadMarkup(){\n\n echo file_get_contents(\"head/home.html\");\n\n $this->head_script_tags = \"\";\n\n foreach( $this->head_scripts as $value ){\n\n $this->head_script_tags .= \"<script src=\\\"\" . $value . \"\\\"></script>\";\n\n }\n\n $this->head = file_get_contents(\"head/home.html\").$this->head_script_tags.\"</head>\";\n\n }", "public static function printHead (){\n\t?>\n\t<style type=\"text/css\">\n\t\tdiv#gdocs_left {\n\t\t\tfloat:left;\n\t\t\twidth:50%;\n\t\t}\n\t\tdiv#gdocs_right {\n\t\t\tfloat:right;\n\t\t\twidth:50%;\n\t\t}\n\t\tdiv#gdocs_right td.gdocs_loader {\n\t\t\tbackground:#cfebf7 url(\"<?php echo GDOCS_ADDRESS ?>/inc/img/ajax-loader.gif\") center right no-repeat;\n\t\t}\n\t\tdiv#gdocs_right tr.gdocs_loader td{\n\t\t\tbackground-color:#cfebf7;\n\t\t}\n\t\tdiv#gdocs_right table.hor-zebra {\n\t\t\tfont-family: \"Lucida Sans Unicode\", \"Lucida Grande\", Sans-Serif;\n\t\t\tfont-size: 10px;\n\t\t\tmargin: 15px 0;\n\t\t\ttext-align: left;\n\t\t\tborder-collapse: collapse;\n\t\t}\n\t\tdiv#gdocs_right table.hor-zebra th {\n\t\t\tfont-size: 12px;\n\t\t\tfont-weight: normal;\n\t\t\tpadding: 10px 8px;\n\t\t\tcolor: #039;\n\t\t}\n\t\tdiv#gdocs_right table.hor-zebra td {\n\t\t\tpadding: 8px;\n\t\t\tcolor: #669;\n\t\t}\n\t\tdiv#gdocs_right table.hor-zebra .odd {\n\t\t\tbackground: #e8edff;\n\t\t}\n\t\t\n\t\tspan.description {\n\t\t\tfont-style:normal;\n\t\t}\n\t</style>\n\t\n\t<div class='wrap'>\n\t\t<h2>Inline Google Docs</h2>\n\t\t<div id='gdocs_left'>\n\t\t\t<form method='post' action='options.php'>\n\t\t\t\t<?php\n\t\t\t\tif (function_exists ('settings_fields')){\n\t\t\t\t\tsettings_fields ('gdocs-options');\n\t\t\t\t}else {\n\t\t\t\t?>\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"update\" />\n\t\t\t\t<input type=\"hidden\" name=\"page_options\" value=\"gdocs_user,gdocs_pwd,gdocs_proxy_host,gdocs_proxy_port,gdocs_proxy_user,gdocs_proxy_pwd,gdocs_cache_expiry,gdocs_style_dir\" />\n\t\t\t\t<?php \n\t\t\t\t\twp_nonce_field ('update-options');\t\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\n\t<?php\n\t\n\t}", "function head()\n {\n print($this->_head);\n }", "private function displayHeader(){\n\t\t\t$html = '<!doctype html>'.\"\\n\";\n\t\t\t$html .= '<!--[if LT IE 9]>'.\"\\n\";\n\t\t\t$html .= '<html class=\"ie\">'.\"\\n\";\n\t\t\t$html .= '<![endIF]-->'.\"\\n\";\n\t\t\t$html .= '<!--[if !IE]><!-->'.\"\\n\";\n\t\t\t$html .= '<html>'.\"\\n\";\n\t\t\t$html .= '<!--<![endif]-->'.\"\\n\";\n\t\t\t$html .= '<head>'.\"\\n\";\n\t\t\t$html .= '<title> PCInsight | ' .$this->pageInfo['pageTitle'].'</title>'.\"\\n\";\n\t\t\t$html .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"scripts/loadCSS.php\" />'.\"\\n\";\n\t\t\t$html .= '<link rel=\"shortcut icon\" type=\"image/png\" href=\"resources/images/favicon.png\" />'.\"\\n\";\n\t\t\t$html .= '<link rel=\"icon\" type=\"image/x-icon\" href=\"resources/images/favicon.ico\" />'.\"\\n\";\n\t\t\t$html .= '<meta charset=\"UTF-8\" />'.\"\\n\";\n\t\t\t$html .= '<meta name=\"description\" content=\"'.$this->pageInfo['pageDescription'].'\" />'.\"\\n\";\n\t\t\t$html .= '<script src=\"resources/lib/jquery-1.10.2.min.js\" type=\"text/javascript\"></script>'.\"\\n\";\n\t\t\t$html .= '<script src=\"resources/js/main.js\" type=\"text/javascript\"></script>'.\"\\n\";\n\t\t\t$html .= '</head>'.\"\\n\";\n\t\t\t$html .= '<body class=\"nojs\">'.\"\\n\";\n\t\t\t$html .= '<div id=\"topbar\" class=\"clearfix\">'.\"\\n\";\n\t\t\t$html .= '<div class=\"wrapper\">'.\"\\n\";\n\t\t\t$html .= '<div class=\"left\">'.\"\\n\";\n\t\t\t$html .= '<h1 class=\"mainHeader\"><a href=\"index.php\"><span> PC</span>insight </a></h1>'.\"\\n\";\n\t\t\t$html .= '<nav>'.\"\\n\";\n\t\t\t$html .= '<ul>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php\" accesskey=\"1\"> Home </a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php?p=9\" accesskey=\"2\"> Articles </a></li>'.\"\\n\";\t\t\n\t\t\t$html .= '<li><a href=\"index.php?p=10\" accesskey=\"3\"> About </a></li>'.\"\\n\";\n\t\t\t$html .= '</ul>'.\"\\n\";\n\t\t\t$html .= '</nav>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '<div class=\"mobilenav\">'.\"\\n\";\n\t\t\t$html .= '<span class=\"mobileNavBu\"></span>'.\"\\n\";\n\t\t\t$html .= '<div class=\"menu\">'.\"\\n\";\n\t\t\t$html .= '<ul>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php\"> Home </a></li>'.\"\\n\"; \n\t\t\t$html .= '<li><a href=\"index.php?p=9\"> Articles </a></li>'.\"\\n\"; \t\t\t\n\t\t\t$html .= '<li><a href=\"index.php?p=10\"> About </a></li>'.\"\\n\";\n\t\t\tif (!(isset($_SESSION['username']))){\n\t\t\t\t$html .= '<li><a href=\"index.php?p=2\" accesskey=\"4\"> Login </a></li>'.\"\\n\";\n\t\t\t\t$html .= '<li><a href=\"index.php?p=3\" accesskey=\"5\"> Register </a></li>'.\"\\n\";\n\t\t\t} else {\n\t\t\t\tif ($this->model->isAdmin()){\n\t\t\t\t\t$html .= '<li><a href=\"admin/\"> Admin </a></li>'.\"\\n\";\n\t\t\t\t}\n\t\t\t\t$html .= '<li><a href=\"index.php?p=5\" accesskey=\"6\"> Logout </a></li>'.\"\\n\";\n\t\t\t}\n\t\t\t$html .= '</ul>'.\"\\n\";\n\t\t\t$html .= '<form action=\"index.php\" method=\"get\">'.\"\\n\";\n\t\t\t$html .= '<input type=\"hidden\" name=\"p\" value=\"7\"/>'.\"\\n\";\n\t\t\t$html .= '<input type=\"text\" class=\"search\" placeholder=\"Search\" name=\"q\" value=\"'.$_GET['q'].'\"/>'.\"\\n\";\n\t\t\t$html .= '<input type=\"submit\" class=\"btn blue small\" value=\"search\"/>'.\"\\n\";\n\t\t\t$html .= '</form>'.\"\\n\";\t\t\t\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '<div class=\"right\">'.\"\\n\";\n\t\t\tif (!(isset($_SESSION['username']))){\n\t\t\t\t$html .= '<div class=\"login\">'.\"\\n\";\n\t\t\t\t$html .= '<a href=\"index.php?p=2\"> Login </a>'.\"\\n\";\n\t\t\t\t$html .= '<a href=\"index.php?p=3\"> Register </a>'.\"\\n\";\n\t\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t} else {\n\t\t\t\t$html .= '<div class=\"login\">'.\"\\n\";\n\t\t\t\t$html .= '<a href=\"index.php?p=5\"> Logout </a>'.\"\\n\";\n\t\t\t\tif ($this->model->isAdmin()){\n\t\t\t\t\t$html .= '<a href=\"admin/\"> Admin </a>'.\"\\n\";\n\t\t\t\t}\n\t\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t}\n\t\t\t$html .= '<div class=\"search\">'.\"\\n\";\n\t\t\t$html .= '<form action=\"index.php\" method=\"get\">'.\"\\n\"; \n\t\t\t$html .= '<input type=\"hidden\" name=\"p\" value=\"7\"/>'.\"\\n\";\n\t\t\t$html .= '<input type=\"text\" class=\"search\" placeholder=\"Search\" name=\"q\" value=\"'.$_GET['q'].'\"/>'.\"\\n\";\n\t\t\t$html .= '<input type=\"submit\" class=\"btn blue small\" value=\"Search\" />'.\"\\n\";\n\t\t\t$html .= '</form>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\tif (!$this->db->isRegistered()){\n\t\t\t\t$html .= '<div class=\"register\"><p> Please register your account <a href=\"index.php?p=13\">here</a></p></div>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}", "public function getHeader() {\n\t\t\tglobal $arConfig; \n\t\t\t$strHTML = \"\\n\\t\\t<title>\" . $this->strTitle . \"</title>\";\n\t\t\t$strHTML .= \"\\n\\t\\t<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\"; \n\t\t\t$strHTML .= \"\\n\\t\\t<link rel=\\\"shortcut icon\\\" href=\\\"\" . fixPath(\"favicon.png\") . \"\\\" type=\\\"image/png\\\" />\"; \n\t\t\tforeach($this->arMeta as $strKey=>$strVal) {\n\t\t\t\t$strHTML .= \"\\n\\t\\t<meta name=\\\"\" . $strKey . \"\\\" content=\\\"\" . $strVal . \"\\\" />\"; \n\t\t\t} \n\t\t\tforeach($this->arCSS as $strFile=>$arData) {\n\t\t\t\t$strHTML .= \"\\n\\t\\t<link rel=\\\"stylesheet\\\" href=\\\"\" . $strFile . \"\\\" type=\\\"text/css\\\" media=\\\"\" . $arData[\"media\"] . \"\\\" />\"; \n\t\t\t} \n\t\t\tforeach($this->arJS as $strFile) {\n\t\t\t\t$strHTML .= \"\\n\\t\\t<script src=\\\"\" . $strFile . \"\\\"></script>\"; \n\t\t\t} \n\t\t\t$strHTML .= \"\\n\\t\\t<script>\n\t\t\t\tvar strRoot = \\\"\" . settings(\"domain\", \"root\") . \"\\\"; \n\t\t\t</script>\"; \n\t\t\t\n\t\t\t\n\t\t\treturn $strHTML; \n\t\t}", "public function admin_header_include_raw($h)\n {\n if ($h->isSettingsPage('submit')) {\n echo \"<script type='text/javascript'>\\n\";\n echo \"$(document).ready(function(){\\n\";\n echo \"$('#email_notify').click(function () {\\n\";\n echo \"$('#email_notify_options').slideToggle();\\n\";\n echo \"});\\n\";\n echo \"});\\n\";\n echo \"</script>\\n\";\n }\n }", "function getHead() {\n return '';\n // return $this->document->getHead();\n }" ]
[ "0.75793105", "0.7203514", "0.71869254", "0.7001423", "0.69133025", "0.6838302", "0.6673657", "0.6505569", "0.64891994", "0.6472318", "0.6452668", "0.6447497", "0.64382833", "0.6433724", "0.6422835", "0.63939285", "0.6370341", "0.6369562", "0.6365179", "0.63563", "0.6353308", "0.6342947", "0.6320863", "0.63116926", "0.6299372", "0.62786776", "0.62710583", "0.62707025", "0.62632227", "0.6260264", "0.6240039", "0.6232784", "0.62286407", "0.62088174", "0.61674255", "0.61595327", "0.61577475", "0.6150622", "0.61390734", "0.6136917", "0.6105823", "0.6093549", "0.6083531", "0.6083088", "0.60637623", "0.60491383", "0.60423356", "0.60184455", "0.60065126", "0.6002644", "0.6001985", "0.5994588", "0.5987657", "0.5984187", "0.5975417", "0.5971253", "0.59620786", "0.5956161", "0.5949886", "0.59486085", "0.5947196", "0.5932959", "0.5931088", "0.59281665", "0.5924569", "0.5910488", "0.5907795", "0.5907025", "0.5881749", "0.58720225", "0.58689874", "0.58655715", "0.5864734", "0.5861712", "0.5856944", "0.5849405", "0.5846394", "0.58447444", "0.58418745", "0.5841111", "0.58404154", "0.58371305", "0.5825502", "0.5822097", "0.5819876", "0.58186966", "0.58170056", "0.5814512", "0.581301", "0.5808804", "0.57960075", "0.5793659", "0.5791512", "0.5790011", "0.57759345", "0.5772633", "0.5769193", "0.5768821", "0.5768794", "0.5768021" ]
0.84890515
0
Form footer progress block HTML.
public function form_footer_progress_block_html() { $progress_style = ! empty( $this->form_data['settings']['conversational_forms_progress_bar'] ) ? $this->form_data['settings']['conversational_forms_progress_bar'] : ''; ?> <div class="wpforms-conversational-form-footer-progress"> <div class="wpforms-conversational-form-footer-progress-status"> <?php if ( 'proportion' === $progress_style ) { $this->form_footer_progress_status_proportion_html(); } else { $this->form_footer_progress_status_percentage_html(); } ?> </div> <div class="wpforms-conversational-form-footer-progress-bar"> <div class="wpforms-conversational-form-footer-progress-completed"></div> </div> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function form_footer_progress_status_proportion_html() {\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-proportion\">\n\t\t\t<?php\n\t\t\tprintf(\n\t\t\t\t/* translators: %1$s - Number of fields completed, %2$s - Number of fields in total. */\n\t\t\t\t\\esc_html__(\n\t\t\t\t\t'%1$s of %2$s completed',\n\t\t\t\t\t'wpforms-conversational-forms'\n\t\t\t\t),\n\t\t\t\t'<span class=\"completed\"></span>',\n\t\t\t\t'<span class=\"completed-of\"></span>'\n\t\t\t);\n\t\t\t?>\n\t\t</div>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-proportion-completed\" style=\"display: none\">\n\t\t\t<?php \\esc_html_e( 'Form completed', 'wpforms-conversational-forms' ); ?>\n\t\t</div>\n\t\t<?php\n\t}", "public function form_footer_progress_status_percentage_html() {\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-percentage\">\n\t\t\t<?php\n\t\t\tprintf(\n\t\t\t\t/* translators: %s - Percentage of fields completed. */\n\t\t\t\t\\esc_html__(\n\t\t\t\t\t'%s%% completed',\n\t\t\t\t\t'wpforms-conversational-forms'\n\t\t\t\t),\n\t\t\t\t'<span class=\"completed\">100</span>'\n\t\t\t);\n\t\t\t?>\n\t\t</div>\n\t\t<?php\n\t}", "public function drawFooter (\n\t)\t\t\t\t\t// RETURNS <void>\n\t\n\t// $contentForm->drawFooter();\n\t{\n\t\t// Show Segment-Creation Modules\n\t\tforeach($this->segments as $module => $bool)\n\t\t{\n\t\t\tswitch($module)\n\t\t\t{\n\t\t\t\tcase \"Text\":\n\t\t\t\t\t$icon = \"newspaper\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"Image\":\n\t\t\t\t\t$icon = \"image\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"Video\":\n\t\t\t\t\t$icon = \"video\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t$icon = \"circle-exclaim\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t\t\t<div class=\"newsegment-wrap\">\n\t\t\t\t<div class=\"newsegment\"><span class=\"newsegment-text\">Add<br /><span class=\"icon-' . $icon . '\" style=\"font-size:32px;\"></span><br />' . $module . ' Block</span></div>\n\t\t\t\t<input class=\"newsegment-sub\" type=\"submit\" name=\"add_module[' . $module . ']\" value=\"\" style=\"background:none;\" />\n\t\t\t</div>';\n\t\t}\n\t\t\n\t\techo '\n\t\t<hr class=\"separate-div\"/>';\n\t\t\n\t\t// Display Submission Options\n\t\techo '\n\t\t<p>';\n\t\t\n\t\t// Make official post\n\t\tif($this->contentData['status'] < Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_official\" value=\"Save and Make Official Post\" style=\"background-color:#56ccc8;\" />';\n\t\t}\n\t\t\n\t\t// Save and Publish option\n\t\tif($this->contentData['status'] < Content::STATUS_GUEST)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_publish\" value=\"Save and Publish\" style=\"background-color:#56ccc8;\" />';\n\t\t}\n\t\t\n\t\t// Official Post Option\n\t\tif($this->contentData['status'] >= Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_standard\" value=\"Live Update\" style=\"background-color:#56ccc8;\" />\n\t\t\t<input type=\"submit\" name=\"save_guest\" value=\"Set as Guest Post\" style=\"background-color:#aa2222;\" />';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Save / Update Option\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_standard\" value=\"Save and Update\" />';\n\t\t}\n\t\t\n\t\t// Display the Submit Button\n\t\techo '\n\t\t\t<input type=\"submit\" name=\"deletePost\" value=\"Delete Post\" onclick=\"return confirm(\\'Are you sure you want to delete this post?\\');\" />\n\t\t</p>';\n\t}", "function page_footer()\n\t\t{\n\t\t\t$output = '\t\t\t</div>'; // <!-- end .ace_options_container -->\n\t\t\t$output .= '\t\t\t<div class=\"ace_footer\">';\n\t\t\t$output .= \t\t\t$this->hidden_data();\n\t\t\t$output .= '\t\t\t<span class=\"ace_loading\"></span>';\n\t\t\t$output .= '\t\t\t\t<ul class=\"ace_footer_links\">';\n\t\t\t$output .= '\t\t\t\t\t<li class=\"ace_footer_reset\">'.$this->reset_button().'</li>';\n\t\t\t$output .= '\t\t\t\t\t<li class=\"ace_footer_save\">'.$this->save_button().'</li>';\n\t\t\t$output .= '\t\t\t\t</ul>';\n\t\t\t$output .= '\t\t\t</div>';\n\t\t\t$output .= '\t\t</div>'; // <!--end ace_options_page_content-->\n\t\t\t$output .= '\t\t<div class=\"ace_clear\"></div>';\n\t\t\t$output .= '\t</div>'; //<!--end ace_options_page_inner-->\n\t\t\t$output .= '</form>'; // <!-- end #ace_options_page -->\n\t\t\t$output .= '<div class=\"ace_bottom_shadow\"></div>';\n\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "function formFooter(){\r\n\r\n\t\t$ret = '</form>';\r\n\r\n\t\treturn $ret;\r\n\t}", "public function Footer() {\n $this->SetY(-15);\n // Select helvetica italic 8\n $this->SetFont('helvetica', '', 10);\n // Print current and total page numbers\n\n //$this->Cell(0,10,'Page '.$this->pageNo().'/{nb}',0,0,'C');\n\n $this->Cell(0, 4, 'This document shall be deemed uncontrolled unless labelled \"CONTROLLED\"', 0, 0, 'C');\n $this->ln();\n\n $this->Cell($this->w - ($this->w * 0.51), 4, 'User should verify latest', 0, 0, 'R');\n $this->SetFont('helvetica', 'B', 10);\n $this->Cell(0, 4, ' revision.', 0, 0, 'L');\n $this->ln();\n\n $this->SetFont('helvetica', 'I', 7);\n\n $pageNo = 'Page '.$this->getAliasNumPage().' of '.$this->getAliasNbPages();\n $this->Cell(0, 3, $pageNo, 0, 0, 'R');\n }", "function footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print current and total page numbers\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "public function Footer()\n {\n // Go to 10 cm from bottom\n $this->SetY(-10);\n // Set font to Open Sans\n $this->SetFont('opensans', 'I', 6);\n // Print centered page number with datetime and timezone\n $this->AliasNbPages('{totalPages}');\n // The timezone of the user is retrieved from their Auth0 user's profile if available, otherwise the server time zone is used\n // related to this trello card https://trello.com/c/OjWZzsGA\n $timezone = ($_SESSION['auth0_user']['https://www.boxtribute.com/timezone']) ? $_SESSION['auth0_user']['https://www.boxtribute.com/timezone'] : date_default_timezone_get();\n\n $dt = new DateTime('now', new DateTimeZone($timezone));\n // This is quick fix for an issue with the alignment of footer text as the library incorrectly calculates the text length when template variables {totalPages} are used\n $totalPages = ($_GET['count'] && 0 != $_GET['count']) ? round(intval($_GET['count']) / 2) : 1;\n $this->Cell(0, 10, 'Page '.$this->PageNo().' of '.$totalPages.' Printed on '.$dt->format('d-m-Y H:i:s').\" {$timezone}\", 0, 0, 'C');\n }", "function rd_do_footer()\n{\n\techo <<<END\n\t\t</form>\n\t</div></body>\n</html>\nEND;\n}", "public static function printFoot (){\n\t?>\t\t\n\t\t\t\t<p class='submit'>\n\t\t\t\t\t<input type='submit' name='Submit' value=\"<?php _e('Save changes') ?>\" class='button-primary' />\n\t\t\t\t</p>\t\t\t\t\n\t\t\t\t\n\t\t\t</form>\n\t\t</div>\n\t\t\n\t<?php\n\t}", "public function form_footer_right_block_html() {\n\n\t\t$brand_disable = ! empty( $this->form_data['settings']['conversational_forms_brand_disable'] ) ? $this->form_data['settings']['conversational_forms_brand_disable'] : '';\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-right-container\">\n\n\t\t\t<?php if ( ! $brand_disable ) : ?>\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-powered-by\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<?php esc_html_e( 'powered by', 'wpforms-conversational-forms' ); ?>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t<?php // Require is needed to apply SVG dynamic styling. ?>\n\t\t\t\t\t<?php require plugin_dir_path( WPFORMS_CONVERSATIONAL_FORMS_FILE ) . 'assets/images/wpforms-text-logo.svg'; ?>\n\t\t\t\t</div>\n\t\t\t<?php endif; ?>\n\n\t\t\t<div class=\"wpforms-conversational-form-footer-switch-step\">\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-switch-step-up\">\n\t\t\t\t\t<i class=\"fa fa-angle-up\" aria-hidden=\"true\"></i>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-switch-step-down\">\n\t\t\t\t\t<i class=\"fa fa-angle-down\" aria-hidden=\"true\"></i>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "function print_footer(){\n\t\techo '</div></div><div class=\"clear\"></div><div id=\"hana-footer\"><input type=\"hidden\" name=\"action\" value=\"save\" />\n\t\t\t <input type=\"submit\" value=\"Save Changes\" class=\"save-button\" />\n\t\t\t </div>\t\n\t\t\t</form></div>';\n\t}", "public function footer()\n\t\t{\t\t\t\n\t\t\treturn $this->render('incs/footer');\n\t\t}", "public function footer()\n {\n }", "public static function getFooter()\n {\n ?>\n <p>Content in the front end's footer. This code comes from <?php echo __METHOD__; ?></p>\n <?php\n }", "public function footerAction() {$this->_helper->viewRenderer->setResponseSegment('footer');}", "private function printFooter()\n {\n // Nothing to do at the moment\n }", "public function footer() {\n\t}", "public function executeFooterPanel()\n {\n }", "public function Footer()\n {\n $this->SetFont('Arial', 'I', 8);\n $this->SetY(-15);\n $this->Write(4, 'Dokumen ini dicetak secara otomatis menggunakan sistem terkomputerisasi');\n\n $time = \"Dicetak pada tanggal \" . date('d-m-Y H:i:s') . \" WIB\";\n\n $this->SetX(-150);\n $this->Cell(0, 4, $time, 0, 0, 'R');\n }", "protected function footer()\n {\n\n }", "public function footer()\n {\n $footer = \"\\t</body>\\n</html>\";\n echo $footer;\n }", "public function Footer() {\r\n $this->SetTextColor(0,0,0);\r\n /* insertamos numero de pagina y total de paginas*/\r\n $this->Cell(0, 10, 'Página '.$this->getAliasNumPage().\r\n ' de un total de '.\r\n $this-> getAliasNbPages(),\r\n 0, false, 'C', 0, '', 0, false, 'T', 'M');\r\n $this->SetDrawColor(0,0,0);\r\n /* dibujamos una linea roja delimitadora del pie de página */\r\n $this->Line(15,282,195,282);\r\n\r\n }", "public function renderDivisionFooter(): void;", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Select Arial italic B\n\t\t$this->setfont('Arial','I',14);\n\t\t$this->cell(250,8,\"Proyecto Final, copyright &copy; 2019\",0,0,'c');\n\t\t// Print centered page numbre\n\t\t$this->Cell(0,10,'Pag.'.$this->PageNo(),0,0,'c');\n\t}", "public function input_admin_footer() {\n\t\t$this->display_svg();\n\t}", "public function renderFooter()\r\n {\r\n $footer = parent::renderFooter();\r\n if (empty($footer) && (isset($this->cancelButton) || isset($this->submitButton))) {\r\n if ($this->cancelButton)\r\n $footer.= Button::widget($this->cancelButton);\r\n if ($this->submitButton)\r\n $footer.= Button::widget($this->submitButton);\r\n\r\n Html::addCssClass($this->footerOptions, 'modal-footer');\r\n $footer = Html::tag('div', \"\\n\" .$footer . \"\\n\", $this->footerOptions);\r\n }\r\n return $footer;\r\n }", "function sloodle_print_footer()\r\n {\r\n global $CFG;\r\n echo \"<p style=\\\"text-align:center; margin-top:32px; font-size:90%;\\\"><a href=\\\"{$CFG->wwwroot}/course/view.php?id={$this->course->id}\\\">&lt;&lt;&lt; \".get_string('backtocoursepage','sloodle').\"</a></h2>\";\r\n sloodle_print_footer($this->course);\r\n }", "public function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "function Footer()\n\t{\n\t\t//$this->Image('../imagenes/pie.jpg',15,250,170);\n\t\t$this->AliasNbPages();\n\t\t$this->SetY(-23);\n\t\t\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->MultiCell(180,5,utf8_decode(''),'0','C');\n\t\t\n\t $this->SetFont('Arial','I',8);\n\t $this->Cell(0,7,'Pag. '.$this->PageNo().' / {nb}',0,1,'C');\n\t}", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n // $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "function common_footer($button = \"Submit Changes\")\r\n\t{\r\n\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->html .= $SKIN->end_form($button);\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 Footer()\n {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "function showHTMLFooter() {\r\n echo '<form style=\"background-color:#E6E6FA\">';\r\n\techo '<hr/>';\t\r\n\techo '<p><center><strong>Aplikacija BANKOMATI v1.3</strong></center></p>';\r\n\techo '<hr/>';\r\n\techo '</form>';\r\n\t?>\r\n\t\r\n\t<input type=\"button\" onclick=\"window.location='/bankomati_RTM1/auth/logout.php'\" class=\"logout\" value=\"Logout\"/>\r\n\t\r\n\t<?php\r\n\techo '</body>'; // završava BODY dio HTML stranice otvoren u zaglavlju\r\n\techo '</html>'; // završava ispravan HTML blok koda otvoren u zaglavlju\r\n}", "private function generateFoot() {\n echo '</div>';\n }", "function Footer()\t{\n\t $this->SetY(-15);\n\t // Arial italic 8\n\t $this->SetFont('Arial','I',8);\n\t // Page number\n\t $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "public function Footer() {\n\t\t$this->SetY(-15);\n\t\t// Set font\n\t\t$this->SetFont('helvetica', 'I', 8);\n\t\t// Page number\n\t\t$this->Cell(0, 10, 'Pagina '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n\t}", "function wizardFooter() {\n global $LANG;\n $strOutput = '\n\t\t\t</table>\n\t\t\t<div id=\"c-saveButtonPanel\">\n <input type=\"image\" class=\"c-inputButton\" name=\"'.$this->strExtKey.'[savedok]\"'.IconUtility::skinImg($this->objDoc->backPath,'gfx/savedok.gif').BackendUtility::titleAltAttrib($LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc')).'\" />\n <input type=\"image\" class=\"c-inputButton\" name=\"'.$this->strExtKey.'[saveandclosedok]\"'.IconUtility::skinImg($this->objDoc->backPath,'gfx/saveandclosedok.gif').BackendUtility::titleAltAttrib($LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc')).'\" />\n <a href=\"#\" onclick=\"'.htmlspecialchars('jumpToUrl(unescape(\\''.rawurlencode($this->arrWizardParameters['returnUrl']).'\\')); return false;').'\"><img class=\"c-inputButton\"'.IconUtility::skinImg($this->objDoc->backPath,'gfx/closedok.gif').BackendUtility::titleAltAttrib($LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc')).'\" /></a>\n <input type=\"image\" class=\"c-inputButton\" name=\"_refresh\"'.IconUtility::skinImg($this->objDoc->backPath,'gfx/refresh_n.gif').BackendUtility::titleAltAttrib($LANG->getLL('forms_refresh',1)).'\" />\n\t\t\t</div>';\n return $strOutput;\n }", "public function displayContentFooter() {\n ?>\n <footer class=\"container-fluid text-center\">\n <p>IT360 Applied Database Systems Project By Harrison Bleckley, Drake Bodine, and Lani Davis</p>\n </footer>\n <?php\n }", "public function Footer()\n {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print centered page number\n $this->Cell(0, 4, utf8_decode('Atenea - Página ' . $this->PageNo()), 0, 0, 'C');\n }", "function Footer()\n\t\t\t\t{\n\t\t\t\t\t$this->SetY(-15);\n\t\t\t\t\t//Arial italic 8\n\t\t\t\t\t$this->SetFont('Helvetica','I',8);\n\t\t\t\t\t//Page number\n\t\t\t\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/'.$comp_name,'T',0,'C');\n\t\t\t\t\t$this->SetDrawColor(8, 102, 198);\n\t\t\t\t\tparent::Footer();\n\t\t\t\t}", "function sloodle_print_footer()\n {\n sloodle_print_footer($this->course);\n }", "public function Footer() {\n $this->SetY(-15);\n // Set font\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "public function endForm()\r\n {\r\n echo '<div class=\"panel-footer\">\r\n <input type=\"submit\" class=\"btn btn-primary btn-sm\" value=\"Vote\" />\r\n </div>\r\n </form>';\r\n }", "public function print_footer() {\n // Do nothing.\n }", "function Footer(){\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 10);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo(), 0, 0, 'C');\n }", "function footer() {\n\t\t?>\n\t\t<div data-role=\"footer\" data-position=\"fixed\" style=\"bottom: 0px;\">\n\t\t\t<p align=\"center\">by Matti Maier Internet Solutions</p>\n\t\t</div>\n\t\t<?php\n\t}", "public function setFooter() {\n\n // set the footer html.\n echo '<div class=\"footer\">\n \n </div>\n </div>\n </body>\n</html>' . PHP_EOL;\n }", "function gutenberg_block_footer_area() {\n\tgutenberg_block_template_part( 'footer' );\n}", "function Footer()\n\t\t\t\t{\n\t\t\t\t $this->SetY(-15);\n\t\t\t\t // Select Arial italic 8\n\t\t\t\t $this->SetFont('Arial','I',8);\n\t\t\t\t // Print centered page number\n\t\t\t\t $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n\t\t\t\t}", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }", "function render_listinstancejobs_footer() {\n //get the current report shortname\n $report = $this->required_param('report', PARAM_ALPHAEXT);\n\n print_spacer();\n\n //button for scheduling a new instance\n print_single_button($this->get_url(), array('report' => $report), get_string('listinstancejobs_new', 'block_php_report'));\n\n echo '<hr>';\n print_spacer();\n\n //button for listing all reports\n print_single_button($this->get_url(), array('action' => 'list'), get_string('listinstancejobs_back_label', 'block_php_report'));\n }", "public function template_footer() {\n\t\tget_footer( 'course' );\n\t}", "function Footer(){\n\t\t$this->Cell(190,0,'','T',1,'',true);\n\t\t\n\t\t//Go to 1.5 cm from bottom\n\t\t$this->SetY(-15);\n\t\t\t\t\n\t\t$this->SetFont('Arial','',8);\n\t\t\n\t\t//width = 0 means the cell is extended up to the right margin\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().\" / {pages}\",0,0,'C');\n\t}", "abstract protected function footer();", "abstract protected function footer();", "function Footer() {\r\n // footer line\r\n $this->SetFooterFont();\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, $this->PageBreakTrigger + 2, 190, 0.2, \"F\");\r\n $this->Rect(10, $this->PageBreakTrigger + 2.5, 190, 0.2, \"F\");\r\n $this->SetY($this->PageBreakTrigger + 5);\r\n\r\n $this->Cell(0, 0, \"Used by permission, CCLI #2752477\", 0, 1, \"L\");\r\n $this->Cell(0, 0, \"The Ridge Community Church\", 0, 1, \"R\");\r\n }", "function printFooter()\n\t{\n\t\tinclude 'View/Footer.html';\n\t}", "function Footer()\n {\n //Position at 1.5 cm from bottom\n $this->SetY(-15);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number and page amount\n $this->Cell(0,10, text(\"bill_page\").\" \".$this->PageNo().'/{nb}',0,0,'C');\n }", "protected function output_footer() {\n include dirname( __FILE__ ) . '/views/html-csv-import-footer.php';\n }", "public function printFooterContent() {\n\t\techo '<ul>';\n\t\tif (! $this->isActive ( PageState::Selection ))\n\t\t\techo '<li class=\"', $class, '\"><a href=\"?q=select\">Auswahl</a></li>';\n\t\tif (! $this->isActive ( PageState::Statistics ))\n\t\t\techo '<li class=\"', $class, '\"><a href=\"?q=stats\">Statistik</a></li>';\n\t\tif (! $this->isActive ( PageState::Setup ))\n\t\t\techo '<li class=\"', $class, '\"><a href=\"?q=setup\">Setup</a></li>';\n\t\techo '</ul>';\n\t}", "function Footer() {\n $this->SetY(-15);\n //Pilih font Arial italic 8\n $this->SetFont('Helvetica', 'I', 8);\n //Tampilkan nomor halaman rata tengah\n $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "function Footer()\n {\n $this->SetY(-15);\n //Select Arial Italic 8\n $this->SetFont('Arial','I',8);\n $this->SetX(86,5);\n $this->Write(5, '[ powered by '.$this->web_str.']',$this->web_str);\n //Print centered page number\n $this->Cell(0,10,$this->page_str.' '.$this->PageNo(),0,0);\n }", "function cera_grimlock_footer_callback() {\n\t\t?>\n\t\t<div class=\"region__row\">\n\t\t\t<?php\n\t\t\t$sidebar_active = false;\n\t\t\tfor ( $i = 1; $i <= 4; $i++ ) :\n\t\t\t\tif ( is_active_sidebar( \"footer-{$i}\" ) ) :\n\t\t\t\t\t$sidebar_active = true; ?>\n\t\t\t\t\t<div class=\"<?php echo esc_attr( \"region__col region__col--{$i} widget-area\" ); ?>\">\n\t\t\t\t\t\t<?php dynamic_sidebar( \"footer-{$i}\" ); ?>\n\t\t\t\t\t</div><!-- .region__col -->\n\t\t\t\t\t<?php\n\t\t\t\tendif;\n\t\t\tendfor;\n\n\t\t\tif ( ! $sidebar_active ) : ?>\n\t\t\t\t<div class=\"site-info text-center w-100\" role=\"contentinfo\">\n\t\t\t\t\t<?php bloginfo( 'title' ); ?><span class=\"sep\"> | </span><?php bloginfo( 'description' ); ?>\n\t\t\t\t</div><!-- .site-info -->\n\t\t\t\t<?php\n\t\t\tendif; ?>\n\t\t</div><!-- .region__row -->\n\t\t<?php\n\t}", "function Footer()\n\t{\n\t\t$this->pie_pred();\n\t \n\t}", "public function tmpl_in_footer() {\n\t\t\t?>\n\t\t\t<script type=\"text/html\" id=\"tmpl-list-voters\">\n\t\t\t\t<div class=\"voter-item\">\n\t\t\t\t\t<div class=\"wce-voter-name\">{{ data.voter_name }}</div>\n\t\t\t\t\t<div class=\"wce-vote-type\">\n\t\t\t\t\t<# if ( 'up' === data.vote_type ) { #>\n\t\t\t\t\t\t<i class=\"fa fa-thumbs-up wce-voter-up\" aria-hidden=\"true\"></i>\n\t\t\t\t\t<# } else { #>\n\t\t\t\t\t\t<i class=\"fa fa-thumbs-down wce-voter-down\" aria-hidden=\"true\"></i>\n\t\t\t\t\t<# } #>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</script>\n\t\t\t<?php\n\t\t}", "function Footer()\n\t{\n\t $this->SetY(-15);\n\t //Arial italic 8\n\t $this->SetFont('Arial','I',7);\n\t //Page number\n\t $this->Cell(0,10,utf8_decode('Página ').$this->PageNo().' de {nb}',0,0,'R');\n\t}", "protected function makeFooter()\n {\n }", "function Footer()\n\t\t{\n\t\t}", "private function generateFoot(){\n echo '</div>';\n echo '</div>';\n }", "public function Footer(){\n // Position at 15 mm from bottom\n $this->SetY(-15);\n // Set font\n\t\t$html = \"<table>\";\n\t\t$html .= \"<tr><td>unidad de adm y serv</td><td>responsable del proyecto o accion centralizada</td><td>unidad de finanzas</td><td>unidad de planificacion ppto</td><td>presidente</td><td>secreatria de adcripcion</td><td>Secretaria de Planificacion presupuesto y control de gestion</td><td>Gobernador del estado</td></tr>\";\n\t\t$html .= \"<tr><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td></tr>\";\n\t\t$html .= \"</table>\";\n\t\t$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "public function getFooter()\n {\n return <<<EOF\n\n<info>\nFinished. \n</info>\n\n\nEOF;\n\n}", "function Footer()\n {\n date_default_timezone_set('UTC+1');\n //Date\n $tDate = date('F j, Y, g:i:s a');\n // Position at 1.5 cm from bottom\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 12);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10,utf8_decode('Page ' . $this->PageNo().' \n CHUYC \n '.$tDate.'\n +237 693 553 454\n '.$this->Image(SITELOGO, 189, 280, 10, 10,'', URLROOT)), 0, 0, 'L');\n }", "public function blockEnd() {\n $this->outputEditmode('</div>');\n }", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','b',8);\n\t\t\n\t\t$this->Cell(30,1,\"----------------------------------------\",0,0,'C');\n\t\t$this->Cell(210,1,'',0,0);\n\t\t// $this->Cell(30,1,\"----------------------------------------\",0,0,'C');\n\t\t// $this->Cell(50,1,'',0,0);\n\t\t$this->Cell(30,1,\"----------------------------------------\",0,1,'C');\n\t\t\n\t\t$this->Cell(30,4,\"Prepared/Class Teacher\",0,0,'C');\n\t\t// $this->Cell(50,4,'',0,0);\n\t\t// $this->Cell(30,4,\"Controlar of Examination\",0,0,'C');\n\t\t$this->Cell(210,4,'',0,0);\n\t\t$this->Cell(30,4,\"Principal/VP\",0,1,'C');\n\t\t\n\t\t$this->Cell(50,4,date(\"d-m-y h:i:s A\"),0,0,'L');\n\t\t// Page number\n\t\t//$this->Cell(140,4,''.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "public static function endForm(){\n\t\treturn '</form>';\n\t}", "function flush() {\r\n\t\t\tob_start();\r\n\t\t\t?>\r\n\t\t\t <div class=\"progressbar\" style=\"position:relative;overflow:hidden; height: <?php echo $this->height ; ?>px;width:<?php echo $this->length ; ?>px;\">\r\n\t\t\t\t<img src=\"<?php echo plugin_dir_url(\"/\").\"/\".str_replace(basename(__FILE__),\"\",plugin_basename( __FILE__)); ?>/img/progressbar.png\" style='position:absolute;left:0;top:-<?php echo floor(2*$this->height) ; ?>px;height:<?php echo floor(3*$this->height) ; ?>px;width:<?php echo $this->length ; ?>px;'/>\r\n\t\t\t\t<img id=\"<?php echo $this->id.\"_image\"; ?>\" src=\"<?php echo plugin_dir_url(\"/\").\"/\".str_replace(basename(__FILE__),\"\",plugin_basename( __FILE__)); ?>/img/progressbar.png\" style='position:absolute;left:0;top:0px;height:<?php echo floor(3*$this->height) ; ?>px;width:<?php echo floor($this->length*$this->start/100) ; ?>px;'/>\r\n\t\t\t\t<div id=\"<?php echo $this->id.\"_text\"; ?>\" style='position:absolute;left:0;top:0px;height:<?php echo $this->height; ?>px;text-align:center;line-height:<?php echo $this->height; ?>px;width:<?php echo $this->length ; ?>px;'><?php echo $this->insideText?>&nbsp;</div>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<?php\r\n\t\t\techo ob_get_clean();\r\n\t\t}", "public function RenderFormEnd() {\n\n return '</form>';\n }", "public function Footer(){\n // Posición: a 1,5 cm del final\n $this->SetY(-20);\n // Arial italic 8\n $this->AddFont('Futura-Medium');\n $this->SetFont('Futura-Medium','',10);\n $this->SetTextColor(50,50,50);\n // Número de págin\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode('Generado por GetYourGames'),0,0,\"R\");\n $this->Ln(4);\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode(date(\"d-m-Y g:i a\").' - Página ').$this->PageNo(),0,0,\"R\");\n\n }", "function Footer(){\n\t\t// Positionnement à 1,5 cm du bas\n\t\t$this->SetY(-15);\n\t\t// Police Arial italique 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Numéro de page\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "public function get_footer()\n {\n return <<<EOD\n<div id=\"siteftr\">\n Sitewide Footer\n</div>\n\nEOD;\n }", "function Footer()\n {\n $this->SetY(-11);\n $this->Cell(45);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(6,10,'',0,0,'C');\n $this->Cell(96,10,'Nombre y Firma','T',0,'C');\n $this->Cell(0,10,utf8_decode('Página ').$this->PageNo(),0,0,'R');\n\n }", "public function custom_bulk_admin_footer() {\n\t\tglobal $post_type;\n\t\t\n\t\tif($post_type == 'post') {\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\tjQuery(document).ready(function() {\n\t\t\t\t\t\tjQuery('<option>').val('build').text('<?php _e('Build flat file')?>').appendTo(\"select[name='action']\");\n\t\t\t\t\t\tjQuery('<option>').val('build').text('<?php _e('Build flat file')?>').appendTo(\"select[name='action2']\");\n\t\t\t\t\t\tjQuery('#doaction').on('click', function(e) {\n\t\t\t\t\t\t\t// e.preventDefault();\n\t\t\t\t\t\t\tif(jQuery('#bulk-action-selector-top')[0].value == 'build') {\n\t\t\t\t\t\t\t\tif (jQuery('.updated')[0]) {\n\t\t\t\t\t\t\t\t\tjQuery('.updated').html('<p style=\"display:inline-block;\">Currently building...<span style=\"margin-top:0;\" class=\"spinner is-active\"></span></p>');\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tjQuery('.wrap h1').after('<div class=\"updated\"><p style=\"display:inline-block;\">Currently building...<span style=\"margin-top:0;\" class=\"spinner is-active\"></span></p></div>');\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</script>\n\t\t\t<?php\n \t}\n\t}", "function Footer()\n {\n $this->SetY(-15);\n // Police Arial italique 8\n $this->SetFont('Arial','I',6);\n // Num?ro de page\n $this->Cell(0,8,'Page '.$this->PageNo().'/{nb}',0,0,'C');$this->Ln(3);\n $this->Cell(0,8,\"Algerian Gulf Life Insurance Company, SPA au capital social de 1.000.000.000 de dinars algériens, 01 Rue Tripoli, Hussein Dey Alger, \",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"RC : 16/00-1009727 B 15 NIF : 001516100972762-NIS :0015160900296000\",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"Tel : +213 (0) 21 77 30 12/14/15 Fax : +213 (0) 21 77 29 56 Site Web : www.aglic.dz \",0,0,'C');\n }", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print current and total page numbers\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "function onGetFormFooter($output = false) {\n\t\t$html = '';\n\t\t$html .= $this->_getFormSpamControls ();\n\t\t$html .= $this->_getItemIdElement ();\n\t\t$html .= '<input type=\"hidden\" name=\"bf_preview_' . $this->_FORM_CONFIG ['id'] . '\" id=\"bf_preview_' . $this->_FORM_CONFIG ['id'] . '\" value=\"0\" />';\n\t\t\n\t\t$tmpl = bfRequest::getVar ( 'tmpl' );\n\t\tif (_BF_PLATFORM == 'JOOMLA1.5' && $tmpl == 'component') {\n\t\t\t$html .= '<input type=\"hidden\" name=\"tmpl\" id=\"tmpl\" value=\"component\" />';\n\t\t}\n\t\t$html .= \"\\n\\n\" . '</form>';\n\t\t\n\t\tswitch ($output) {\n\t\t\tcase true :\n\t\t\t\techo $html;\n\t\t\t\tbreak;\n\t\t\tcase false :\n\t\t\t\treturn $html;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn true;\n\t}", "protected function generatePageFooter() \n {\n\t\t\n\t\techo \"</body>\\n\";\n\t\techo \"</html>\\n\";\n // to do: output common end of HTML code\n }", "public function hookFooter(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'.tpl');\n }", "function setFooter(){\n $this->footer.= <<<EOD\n</div>\n</div>\n</body>\n</html>\nEOD;\n }", "function Footer()\n {\n $this->SetY(-6);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number\n $this->Cell(0,10,'Página '.$this->PageNo(),0,0,'C');\n }", "function Footer(){\r\n $this->SetY(-15); // Position at 1.5 cm from bottom\r\n $this->SetFont('Arial','I',8); // Arial italic 8\r\n $this->Cell(0,10,'Pagina '.$this->PageNo().'/{nb}',0,0,'C'); // Page number\r\n }", "public function Footer(){\n $this->SetFont('Arial','',8);\n $date = new Date();\n $this->SetTextColor(100);\n $this->SetFillColor(245);\n $this->SetY(-10);\n $str = \"Elaborado Por Mercurio\";\n $x = $this->GetStringWidth($str);\n $this->Cell($x+10,5,$str,'T',0,'L');\n $this->Cell(0,5,'Pagina '.$this->PageNo().' de {nb}','T',1,'R');\n }", "public function stepEnd($data, $form)\n {\n $btnPrev = $this->compileButtons($data['settings']);\n ?>\n <div class=\"ff-t-container ff-inner_submit_container ff-column-container ff_columns_total_2\">\n <div class=\"ff-t-cell ff-t-column-1\"><?php echo $btnPrev; ?></div>\n <div class=\"ff-t-cell ff-t-column-2\"><?php do_action('fluentform_render_item_submit_button', $form->fields['submitButton'], $form); ?></div>\n </div>\n </div></div></div>\n <?php\n }", "function footer() {\n\t?>\n\t\t\t\t<div class=\"headfoot\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\t&quot;Remember The Cow is nice, but it's a total copy of another site.&quot; - PCWorld<br />\n\t\t\t\t\t\tAll pages and content &copy; Copyright CowPie Inc.\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<div id=\"w3c\">\n\t\t\t\t\t\t<a href=\"https://webster.cs.washington.edu/validate-html.php\">\n\t\t\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/w3c-html.png\" alt=\"Valid HTML\" /></a>\n\t\t\t\t\t\t<a href=\"https://webster.cs.washington.edu/validate-css.php\">\n\t\t\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/w3c-css.png\" alt=\"Valid CSS\" /></a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</body>\n\t\t</html>\n\t<?php\n\t}", "function footer() {\n }", "function Footer() {\r\n\t\t\t$this->SetY( -15 );\r\n\t\t\t\r\n\t\t\t//set font to Arial, Bold, size 10\r\n\t\t\t$this->SetFont( 'Arial', 'B', 10 );\r\n\t\t\t\r\n\t\t\t//set font color to blue\r\n\t\t\t$this->SetTextColor( 52, 98, 185 );\r\n\t\t\t\r\n\t\t\t$this->Cell( 0, 10, 'www.iFadey.com', 0, 0, 'L' );\r\n\t\t\t\r\n\t\t\t//set font color to gray\r\n\t\t\t$this->SetTextColor( 150, 150, 150 );\r\n\t\t\t\r\n\t\t\t//write Page No\r\n\t\t\t$this->Cell( 0, 10, 'Page No: ' . $this->PageNo(), 0, 0, 'R' );\r\n\t\t}", "protected function generatePageFooter() \r\n {\r\n echo <<<HTML\r\n </article>\r\n <script src=\"CityWok.js\"> </script>\r\n </body>\r\n</html>\r\nHTML;\r\n }", "public function drawFooter() {\n\t\t\t// Is there scope for using Smarty or similar here?\n\t\t\t$html = '';\n\t\t\treturn $html;\n\t\t}" ]
[ "0.7273749", "0.7200552", "0.673399", "0.657422", "0.6568025", "0.65375775", "0.6521444", "0.65132487", "0.64982325", "0.6479273", "0.6458055", "0.64538527", "0.64286286", "0.6340637", "0.63328755", "0.63277113", "0.6286896", "0.6280255", "0.6279706", "0.6271904", "0.6270721", "0.62488043", "0.62388045", "0.62170416", "0.62150663", "0.6204667", "0.61878085", "0.6185293", "0.61830354", "0.6178183", "0.6173596", "0.6173319", "0.6163962", "0.6133793", "0.61328626", "0.6107548", "0.6104303", "0.60938483", "0.6087884", "0.608724", "0.6084905", "0.6084131", "0.6080964", "0.60665166", "0.60598177", "0.6053146", "0.60482126", "0.60460603", "0.6044521", "0.60371614", "0.60318637", "0.60313714", "0.60313714", "0.60283965", "0.6008377", "0.60039574", "0.6003503", "0.6003503", "0.60028845", "0.5998647", "0.5990174", "0.5990155", "0.59844315", "0.5980201", "0.59770906", "0.5968105", "0.5963251", "0.5957575", "0.5952222", "0.59483784", "0.5947648", "0.594593", "0.5945732", "0.59401363", "0.5929836", "0.59283185", "0.5928007", "0.5927035", "0.5925348", "0.5925122", "0.5911926", "0.5908075", "0.5902982", "0.5896428", "0.5896337", "0.58926374", "0.58924794", "0.5886536", "0.58713937", "0.58663124", "0.5864787", "0.586044", "0.58595854", "0.5857838", "0.5852511", "0.5845763", "0.58453906", "0.58440566", "0.5840562", "0.58357334" ]
0.8513654
0
Form footer progress status (proportion) HTML.
public function form_footer_progress_status_proportion_html() { ?> <div class="wpforms-conversational-form-footer-progress-status-proportion"> <?php printf( /* translators: %1$s - Number of fields completed, %2$s - Number of fields in total. */ \esc_html__( '%1$s of %2$s completed', 'wpforms-conversational-forms' ), '<span class="completed"></span>', '<span class="completed-of"></span>' ); ?> </div> <div class="wpforms-conversational-form-footer-progress-status-proportion-completed" style="display: none"> <?php \esc_html_e( 'Form completed', 'wpforms-conversational-forms' ); ?> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function form_footer_progress_block_html() {\n\n\t\t$progress_style = ! empty( $this->form_data['settings']['conversational_forms_progress_bar'] ) ? $this->form_data['settings']['conversational_forms_progress_bar'] : '';\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress\">\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-status\">\n\t\t\t\t<?php\n\t\t\t\tif ( 'proportion' === $progress_style ) {\n\t\t\t\t\t$this->form_footer_progress_status_proportion_html();\n\t\t\t\t} else {\n\t\t\t\t\t$this->form_footer_progress_status_percentage_html();\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-bar\">\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-progress-completed\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "public function form_footer_progress_status_percentage_html() {\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-percentage\">\n\t\t\t<?php\n\t\t\tprintf(\n\t\t\t\t/* translators: %s - Percentage of fields completed. */\n\t\t\t\t\\esc_html__(\n\t\t\t\t\t'%s%% completed',\n\t\t\t\t\t'wpforms-conversational-forms'\n\t\t\t\t),\n\t\t\t\t'<span class=\"completed\">100</span>'\n\t\t\t);\n\t\t\t?>\n\t\t</div>\n\t\t<?php\n\t}", "public function Footer() {\n $this->SetY(-15);\n // Select helvetica italic 8\n $this->SetFont('helvetica', '', 10);\n // Print current and total page numbers\n\n //$this->Cell(0,10,'Page '.$this->pageNo().'/{nb}',0,0,'C');\n\n $this->Cell(0, 4, 'This document shall be deemed uncontrolled unless labelled \"CONTROLLED\"', 0, 0, 'C');\n $this->ln();\n\n $this->Cell($this->w - ($this->w * 0.51), 4, 'User should verify latest', 0, 0, 'R');\n $this->SetFont('helvetica', 'B', 10);\n $this->Cell(0, 4, ' revision.', 0, 0, 'L');\n $this->ln();\n\n $this->SetFont('helvetica', 'I', 7);\n\n $pageNo = 'Page '.$this->getAliasNumPage().' of '.$this->getAliasNbPages();\n $this->Cell(0, 3, $pageNo, 0, 0, 'R');\n }", "function footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print current and total page numbers\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "public static function printFoot (){\n\t?>\t\t\n\t\t\t\t<p class='submit'>\n\t\t\t\t\t<input type='submit' name='Submit' value=\"<?php _e('Save changes') ?>\" class='button-primary' />\n\t\t\t\t</p>\t\t\t\t\n\t\t\t\t\n\t\t\t</form>\n\t\t</div>\n\t\t\n\t<?php\n\t}", "private function progress_bar_html():string{\n return '<progress value='.$this->score.' max=\"'.self::MAX.'\">'.$this->score.'/'.self::MAX.'</progress>';\n }", "public function Footer()\n {\n // Go to 10 cm from bottom\n $this->SetY(-10);\n // Set font to Open Sans\n $this->SetFont('opensans', 'I', 6);\n // Print centered page number with datetime and timezone\n $this->AliasNbPages('{totalPages}');\n // The timezone of the user is retrieved from their Auth0 user's profile if available, otherwise the server time zone is used\n // related to this trello card https://trello.com/c/OjWZzsGA\n $timezone = ($_SESSION['auth0_user']['https://www.boxtribute.com/timezone']) ? $_SESSION['auth0_user']['https://www.boxtribute.com/timezone'] : date_default_timezone_get();\n\n $dt = new DateTime('now', new DateTimeZone($timezone));\n // This is quick fix for an issue with the alignment of footer text as the library incorrectly calculates the text length when template variables {totalPages} are used\n $totalPages = ($_GET['count'] && 0 != $_GET['count']) ? round(intval($_GET['count']) / 2) : 1;\n $this->Cell(0, 10, 'Page '.$this->PageNo().' of '.$totalPages.' Printed on '.$dt->format('d-m-Y H:i:s').\" {$timezone}\", 0, 0, 'C');\n }", "function flush() {\r\n\t\t\tob_start();\r\n\t\t\t?>\r\n\t\t\t <div class=\"progressbar\" style=\"position:relative;overflow:hidden; height: <?php echo $this->height ; ?>px;width:<?php echo $this->length ; ?>px;\">\r\n\t\t\t\t<img src=\"<?php echo plugin_dir_url(\"/\").\"/\".str_replace(basename(__FILE__),\"\",plugin_basename( __FILE__)); ?>/img/progressbar.png\" style='position:absolute;left:0;top:-<?php echo floor(2*$this->height) ; ?>px;height:<?php echo floor(3*$this->height) ; ?>px;width:<?php echo $this->length ; ?>px;'/>\r\n\t\t\t\t<img id=\"<?php echo $this->id.\"_image\"; ?>\" src=\"<?php echo plugin_dir_url(\"/\").\"/\".str_replace(basename(__FILE__),\"\",plugin_basename( __FILE__)); ?>/img/progressbar.png\" style='position:absolute;left:0;top:0px;height:<?php echo floor(3*$this->height) ; ?>px;width:<?php echo floor($this->length*$this->start/100) ; ?>px;'/>\r\n\t\t\t\t<div id=\"<?php echo $this->id.\"_text\"; ?>\" style='position:absolute;left:0;top:0px;height:<?php echo $this->height; ?>px;text-align:center;line-height:<?php echo $this->height; ?>px;width:<?php echo $this->length ; ?>px;'><?php echo $this->insideText?>&nbsp;</div>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<?php\r\n\t\t\techo ob_get_clean();\r\n\t\t}", "public function printFooterContent() {\n\t\techo '<ul>';\n\t\tif (! $this->isActive ( PageState::Selection ))\n\t\t\techo '<li class=\"', $class, '\"><a href=\"?q=select\">Auswahl</a></li>';\n\t\tif (! $this->isActive ( PageState::Statistics ))\n\t\t\techo '<li class=\"', $class, '\"><a href=\"?q=stats\">Statistik</a></li>';\n\t\tif (! $this->isActive ( PageState::Setup ))\n\t\t\techo '<li class=\"', $class, '\"><a href=\"?q=setup\">Setup</a></li>';\n\t\techo '</ul>';\n\t}", "function show_answers_progress($real_taskcount, $taskcount, $pid, $colspan = -1){\n\t\n\tif($colspan == -1){\n\t\t$colspan = \"\";\n\t}else{\n\t\t$colspan = \" colspan = '$colspan'\";\n\t}\n\t\n\t//taskcount formatting\n\t$delta_tc = $taskcount - $real_taskcount;\n\t$const = 60;\n\tif($delta_tc >= 0 || $taskcount == 0){\n\t\t$width = $const;\n\t}else{\n\t\t$width = $const * $taskcount / $real_taskcount;\n\t\t$sec_width = $const * abs($delta_tc) / $real_taskcount;\n\t}\n\t\n\techo \"<td$colspan>\n\t\t<meter id='bar$pid' min='0' max='100' low='25' high='75' optimum='100' value='\";\n\tif($taskcount == 0){\n\t\techo \"0\";\n\t}else{\n\t\techo $real_taskcount / $taskcount * 100;\n\t}\n\techo \"' style='width:\".$width.\"%;'></meter>\";\n\tif($delta_tc < 0 && $taskcount != 0){\n\t\techo \"<meter min='0' max='100' low='0' high='0' optimum='0' value='100' style='width:\".$sec_width.\"%;'></meter>\";\n\t}\n\techo \"<label for='bar$pid'> $real_taskcount/$taskcount</label>\";\n\techo \"</td>\";\n}", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n // $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "public function Footer() {\r\n $this->SetTextColor(0,0,0);\r\n /* insertamos numero de pagina y total de paginas*/\r\n $this->Cell(0, 10, 'Página '.$this->getAliasNumPage().\r\n ' de un total de '.\r\n $this-> getAliasNbPages(),\r\n 0, false, 'C', 0, '', 0, false, 'T', 'M');\r\n $this->SetDrawColor(0,0,0);\r\n /* dibujamos una linea roja delimitadora del pie de página */\r\n $this->Line(15,282,195,282);\r\n\r\n }", "private function printFooter()\n {\n // Nothing to do at the moment\n }", "function Footer()\n\t{\n\t\t//$this->Image('../imagenes/pie.jpg',15,250,170);\n\t\t$this->AliasNbPages();\n\t\t$this->SetY(-23);\n\t\t\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->MultiCell(180,5,utf8_decode(''),'0','C');\n\t\t\n\t $this->SetFont('Arial','I',8);\n\t $this->Cell(0,7,'Pag. '.$this->PageNo().' / {nb}',0,1,'C');\n\t}", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Select Arial italic B\n\t\t$this->setfont('Arial','I',14);\n\t\t$this->cell(250,8,\"Proyecto Final, copyright &copy; 2019\",0,0,'c');\n\t\t// Print centered page numbre\n\t\t$this->Cell(0,10,'Pag.'.$this->PageNo(),0,0,'c');\n\t}", "public function renderDivisionFooter(): void;", "function paintFooter($test_name) {\n $colour = ($this->getFailCount() + $this->getExceptionCount() > 0 ? \"red\" : \"green\");\n print \"<div id=\\\"results\\\" style=\\\"background-color: $colour;\\\">\";\n print $this->getTestCaseProgress() . \"/\" . $this->getTestCaseCount();\n print \" test cases complete:\\n\";\n print \"<b>\" . $this->getPassCount() . \"</b> passes, \";\n print \"<b>\" . $this->getFailCount() . \"</b> fails and \";\n print \"<b>\" . $this->getExceptionCount() . \"</b> exceptions.\";\n print \"</div>\\n\";\n print \"</body>\\n</html>\\n\";\n }", "function Footer()\n\t\t\t\t{\n\t\t\t\t\t$this->SetY(-15);\n\t\t\t\t\t//Arial italic 8\n\t\t\t\t\t$this->SetFont('Helvetica','I',8);\n\t\t\t\t\t//Page number\n\t\t\t\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/'.$comp_name,'T',0,'C');\n\t\t\t\t\t$this->SetDrawColor(8, 102, 198);\n\t\t\t\t\tparent::Footer();\n\t\t\t\t}", "function Footer()\n {\n $this->SetY(-15);\n //Select Arial Italic 8\n $this->SetFont('Arial','I',8);\n $this->SetX(86,5);\n $this->Write(5, '[ powered by '.$this->web_str.']',$this->web_str);\n //Print centered page number\n $this->Cell(0,10,$this->page_str.' '.$this->PageNo(),0,0);\n }", "function Footer()\n {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "public function standard_footer_html() {\n global $CFG, $SCRIPT;\n\n // This function is normally called from a layout.php file in {@link core_renderer::header()}\n // but some of the content will not be known until later, so we return a placeholder for now.\n // This will be replaced with the real content in {@link core_renderer::footer()}.\n $output = $this->unique_performance_info_token;\n if ($this->page->devicetypeinuse == 'legacy') {\n // The legacy theme is in use print the notification\n $output .= html_writer::tag('div', get_string('legacythemeinuse'), array('class'=>'legacythemeinuse'));\n }\n // Get links to switch device types (only shown for users not on a default device)\n $output .= $this->theme_switch_links();\n\n if (!empty($CFG->debugpageinfo)) {\n $icon = 'fa fa-cogs';\n $text = 'This page is ';\n $itag = html_writer::tag('i', '', array('class' => $icon));\n $output .= html_writer::tag('div', $itag . $text . $this->page->debug_summary(), array('class' => 'performanceinfo pageinfo well'));\n }\n if (debugging(null, DEBUG_DEVELOPER) and has_capability('moodle/site:config', context_system::instance())) { // Only in developer mode\n // Add link to profiling report if necessary\n if (function_exists('profiling_is_running') && profiling_is_running()) {\n $txt = get_string('profiledscript', 'admin');\n $title = get_string('profiledscriptview', 'admin');\n $url = $CFG->wwwroot . '/admin/tool/profiling/index.php?script=' . urlencode($SCRIPT);\n $link = html_writer::link($url, $txt, array('title' => $title));\n $output .= html_writer::tag('div', $link, array('class' => 'profilingfooter'));\n }\n $output .= html_writer::start_tag('div', array('class' => 'purgecaches'));\n $output .= html_writer::link(new moodle_url('/'.$CFG->admin.'/purgecaches.php?confirm=1&amp;sesskey='.sesskey()), html_writer::tag('i', '', array('class' => 'fa fa-trash-o')). '&nbsp;&nbsp;'.get_string('purgecaches', 'admin'), array('class' => 'btn btn-small'));\n $output .= html_writer::end_tag('div');\n\n\n }\n if (!empty($CFG->debugvalidators)) {\n // NOTE: this is not a nice hack, $PAGE->url is not always accurate and $FULLME neither, it is not a bug if it fails. --skodak\n $output .= '<div class=\"validators\"><ul>\n <li><a class=\"btn btn-small btn-info\" href=\"http://validator.w3.org/check?verbose=1&amp;ss=1&amp;uri=' . urlencode(qualified_me()) . '\"><i class=\"fa fa-cogs\"></i>&nbsp;&nbsp;Validate HTML</a></li>\n <li><a class=\"btn btn-small btn-info\" href=\"http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&amp;url1=' . urlencode(qualified_me()) . '\"><i class=\"fa fa-cogs\"></i>&nbsp;&nbsp;Section 508 Check</a></li>\n <li><a class=\"btn btn-small btn-info\" href=\"http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=0&amp;warnp2n3e=1&amp;url1=' . urlencode(qualified_me()) . '\"><i class=\"fa fa-cogs\"></i>&nbsp;&nbsp;WCAG 1 (2,3) Check</a></li>\n </ul><br /></div>';\n }\n if (!empty($CFG->additionalhtmlfooter)) {\n $output .= \"\\n\".$CFG->additionalhtmlfooter;\n }\n return $output;\n }", "function page_footer()\n\t\t{\n\t\t\t$output = '\t\t\t</div>'; // <!-- end .ace_options_container -->\n\t\t\t$output .= '\t\t\t<div class=\"ace_footer\">';\n\t\t\t$output .= \t\t\t$this->hidden_data();\n\t\t\t$output .= '\t\t\t<span class=\"ace_loading\"></span>';\n\t\t\t$output .= '\t\t\t\t<ul class=\"ace_footer_links\">';\n\t\t\t$output .= '\t\t\t\t\t<li class=\"ace_footer_reset\">'.$this->reset_button().'</li>';\n\t\t\t$output .= '\t\t\t\t\t<li class=\"ace_footer_save\">'.$this->save_button().'</li>';\n\t\t\t$output .= '\t\t\t\t</ul>';\n\t\t\t$output .= '\t\t\t</div>';\n\t\t\t$output .= '\t\t</div>'; // <!--end ace_options_page_content-->\n\t\t\t$output .= '\t\t<div class=\"ace_clear\"></div>';\n\t\t\t$output .= '\t</div>'; //<!--end ace_options_page_inner-->\n\t\t\t$output .= '</form>'; // <!-- end #ace_options_page -->\n\t\t\t$output .= '<div class=\"ace_bottom_shadow\"></div>';\n\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "public function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 10);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo(), 0, 0, 'C');\n }", "public function getFooter()\n {\n return <<<EOF\n\n<info>\nFinished. \n</info>\n\n\nEOF;\n\n}", "public function render() {\n if ($this->_value >= 90) {\n $type = 'success';\n } elseif ($this->_value >= 50) {\n $type = 'warning';\n } else {\n $type = 'danger';\n }\n\n $html = '<div class=\"progress\">'\n . '<div class=\"progress-bar progress-bar-' . $type . '\"'\n . ' role=\"progressbar\" aria-valuenow=\"' . $this->_value . '\"'\n . ' aria-valuemin=\"0\" aria-valuemax=\"100\"'\n . ' style=\"width:' . $this->_value . '%\">'\n . '<span class=\"sr-only\">' . $this->_value . '% Complete</span>'\n . '</div>'\n . '</div>';\n\n return $html;\n }", "public function displayFinished() \n {\n if ($this->has_finished) {\n return '<i style=\"font-size:25px;color:#449D44;\" class=\"fa fa-check\" aria-hidden=\"true\"></i>';\n } else {\n return '<i style=\"font-size:25px;color:#C9302C;\" class=\"fa fa-times\" aria-hidden=\"true\"></i>';\n }\n }", "public static function getFooter()\n {\n ?>\n <p>Content in the front end's footer. This code comes from <?php echo __METHOD__; ?></p>\n <?php\n }", "public function footer()\n {\n $footer = \"\\t</body>\\n</html>\";\n echo $footer;\n }", "function Footer() {\r\n // footer line\r\n $this->SetFooterFont();\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, $this->PageBreakTrigger + 2, 190, 0.2, \"F\");\r\n $this->Rect(10, $this->PageBreakTrigger + 2.5, 190, 0.2, \"F\");\r\n $this->SetY($this->PageBreakTrigger + 5);\r\n\r\n $this->Cell(0, 0, \"Used by permission, CCLI #2752477\", 0, 1, \"L\");\r\n $this->Cell(0, 0, \"The Ridge Community Church\", 0, 1, \"R\");\r\n }", "function Footer()\n\t\t\t\t{\n\t\t\t\t $this->SetY(-15);\n\t\t\t\t // Select Arial italic 8\n\t\t\t\t $this->SetFont('Arial','I',8);\n\t\t\t\t // Print centered page number\n\t\t\t\t $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n\t\t\t\t}", "function Footer(){\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }", "function Footer()\t{\n\t $this->SetY(-15);\n\t // Arial italic 8\n\t $this->SetFont('Arial','I',8);\n\t // Page number\n\t $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "private function generateFoot() {\n echo '</div>';\n }", "public function input_admin_footer() {\n\t\t$this->display_svg();\n\t}", "function renderProgress($tot_complete, $tot_failed, $total, $show_title = false) {\n\t\n\tif($total == 0) return '';\n\t$perc_complete \t= round(($tot_complete / $total) * 100, 2);\n\t$perc_failed \t= round(($tot_failed / $total) * 100, 2);\n\t\n\t$title = str_replace('[total]', $total, Lang::t('_PROGRESS_TITLE', 'course'));\n\t$title = str_replace('[complete]', $tot_complete, $title);\n\t$title = str_replace('[failed]', $tot_failed, $title);\n\t\n\t$html = '';\n\tif($show_title === true) $html .= '<span class=\"progress_title\">'.$title.'</span><br />';\n\tif($perc_complete >= 100) {\n\t\t\n\t\t$html .= \"\\n\".'<div class=\"box_progress_complete\" title=\"'.$title.'\">'\n\t\t\t.'<div class=\"nofloat\">'\n\t\t\t.'</div></div>'.\"\\n\";\n\t} elseif($perc_failed + $perc_complete >= 100) {\n\t\t\n\t\t$html .= \"\\n\".'<div class=\"box_progress_failed\" title=\"'.$title.'\">';\n\t\tif($perc_complete != 0) $html .= '<div class=\"bar_complete\" style=\"width: '.$perc_complete.'%;\"></div>';\n\t\t$html .= '<div class=\"nofloat\">'\n\t\t\t.'</div></div>'.\"\\n\";\n\t} else {\n\t\t\n\t\t$html .= \"\\n\".'<div class=\"box_progress_bar\" title=\"'.$title.'\">';\n\t\tif($perc_complete != 0) $html .= '<div class=\"bar_complete\" style=\"width: '.$perc_complete.'%;\"></div>';\n\t\tif($perc_failed != 0) $html .= '<div class=\"bar_failed\" style=\"width: '.$perc_failed.'%;\"></div>';\n\t\t$html .= '<div class=\"nofloat\">'\n\t\t\t.'</div></div>'.\"\\n\";\n\t}\n\t\n\treturn $html;\n}", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print current and total page numbers\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "public function Footer(){\n // Position at 15 mm from bottom\n $this->SetY(-15);\n // Set font\n\t\t$html = \"<table>\";\n\t\t$html .= \"<tr><td>unidad de adm y serv</td><td>responsable del proyecto o accion centralizada</td><td>unidad de finanzas</td><td>unidad de planificacion ppto</td><td>presidente</td><td>secreatria de adcripcion</td><td>Secretaria de Planificacion presupuesto y control de gestion</td><td>Gobernador del estado</td></tr>\";\n\t\t$html .= \"<tr><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td></tr>\";\n\t\t$html .= \"</table>\";\n\t\t$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "function print_footer(){\n\t\techo '</div></div><div class=\"clear\"></div><div id=\"hana-footer\"><input type=\"hidden\" name=\"action\" value=\"save\" />\n\t\t\t <input type=\"submit\" value=\"Save Changes\" class=\"save-button\" />\n\t\t\t </div>\t\n\t\t\t</form></div>';\n\t}", "function footer() {\n\t?>\n\t\t\t\t<div class=\"headfoot\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\t&quot;Remember The Cow is nice, but it's a total copy of another site.&quot; - PCWorld<br />\n\t\t\t\t\t\tAll pages and content &copy; Copyright CowPie Inc.\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<div id=\"w3c\">\n\t\t\t\t\t\t<a href=\"https://webster.cs.washington.edu/validate-html.php\">\n\t\t\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/w3c-html.png\" alt=\"Valid HTML\" /></a>\n\t\t\t\t\t\t<a href=\"https://webster.cs.washington.edu/validate-css.php\">\n\t\t\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/w3c-css.png\" alt=\"Valid CSS\" /></a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</body>\n\t\t</html>\n\t<?php\n\t}", "public function Footer()\n {\n $this->SetFont('Arial', 'I', 8);\n $this->SetY(-15);\n $this->Write(4, 'Dokumen ini dicetak secara otomatis menggunakan sistem terkomputerisasi');\n\n $time = \"Dicetak pada tanggal \" . date('d-m-Y H:i:s') . \" WIB\";\n\n $this->SetX(-150);\n $this->Cell(0, 4, $time, 0, 0, 'R');\n }", "public function progress_bar_html($id, $data) {\n global $OUTPUT;\n\n $template = (object) $data;\n\n if ($template->skin == 'A') {\n $template->barcolor = $this->theblock->config->colorAserie;\n } else {\n $template->barcolor = $this->theblock->config->colorCserie;\n }\n\n // $valuebartop = $data['boxheight'] / 2 - 2; \n\n $template->id = $id;\n\n $template->remains = 100 - $template->successrate;\n\n return $OUTPUT->render_from_template('block_userquiz_monitor/progressbarhtml', $template);\n }", "public function drawFooter (\n\t)\t\t\t\t\t// RETURNS <void>\n\t\n\t// $contentForm->drawFooter();\n\t{\n\t\t// Show Segment-Creation Modules\n\t\tforeach($this->segments as $module => $bool)\n\t\t{\n\t\t\tswitch($module)\n\t\t\t{\n\t\t\t\tcase \"Text\":\n\t\t\t\t\t$icon = \"newspaper\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"Image\":\n\t\t\t\t\t$icon = \"image\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"Video\":\n\t\t\t\t\t$icon = \"video\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t$icon = \"circle-exclaim\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t\t\t<div class=\"newsegment-wrap\">\n\t\t\t\t<div class=\"newsegment\"><span class=\"newsegment-text\">Add<br /><span class=\"icon-' . $icon . '\" style=\"font-size:32px;\"></span><br />' . $module . ' Block</span></div>\n\t\t\t\t<input class=\"newsegment-sub\" type=\"submit\" name=\"add_module[' . $module . ']\" value=\"\" style=\"background:none;\" />\n\t\t\t</div>';\n\t\t}\n\t\t\n\t\techo '\n\t\t<hr class=\"separate-div\"/>';\n\t\t\n\t\t// Display Submission Options\n\t\techo '\n\t\t<p>';\n\t\t\n\t\t// Make official post\n\t\tif($this->contentData['status'] < Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_official\" value=\"Save and Make Official Post\" style=\"background-color:#56ccc8;\" />';\n\t\t}\n\t\t\n\t\t// Save and Publish option\n\t\tif($this->contentData['status'] < Content::STATUS_GUEST)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_publish\" value=\"Save and Publish\" style=\"background-color:#56ccc8;\" />';\n\t\t}\n\t\t\n\t\t// Official Post Option\n\t\tif($this->contentData['status'] >= Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_standard\" value=\"Live Update\" style=\"background-color:#56ccc8;\" />\n\t\t\t<input type=\"submit\" name=\"save_guest\" value=\"Set as Guest Post\" style=\"background-color:#aa2222;\" />';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Save / Update Option\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_standard\" value=\"Save and Update\" />';\n\t\t}\n\t\t\n\t\t// Display the Submit Button\n\t\techo '\n\t\t\t<input type=\"submit\" name=\"deletePost\" value=\"Delete Post\" onclick=\"return confirm(\\'Are you sure you want to delete this post?\\');\" />\n\t\t</p>';\n\t}", "public function pfoot() {\n include(dirname(dirname(__FILE__)) . '/ui/footer.php');\n }", "public function footer()\n\t\t{\t\t\t\n\t\t\treturn $this->render('incs/footer');\n\t\t}", "function Footer()\n {\n //Position at 1.5 cm from bottom\n $this->SetY(-15);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number and page amount\n $this->Cell(0,10, text(\"bill_page\").\" \".$this->PageNo().'/{nb}',0,0,'C');\n }", "function sloodle_print_footer()\r\n {\r\n global $CFG;\r\n echo \"<p style=\\\"text-align:center; margin-top:32px; font-size:90%;\\\"><a href=\\\"{$CFG->wwwroot}/course/view.php?id={$this->course->id}\\\">&lt;&lt;&lt; \".get_string('backtocoursepage','sloodle').\"</a></h2>\";\r\n sloodle_print_footer($this->course);\r\n }", "function Footer() {\n $this->SetY(-15);\n //Pilih font Arial italic 8\n $this->SetFont('Helvetica', 'I', 8);\n //Tampilkan nomor halaman rata tengah\n $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "function common_footer($button = \"Submit Changes\")\r\n\t{\r\n\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->html .= $SKIN->end_form($button);\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 Footer()\n\t{\n\t\t$this->pie_pred();\n\t \n\t}", "public function Footer()\n {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print centered page number\n $this->Cell(0, 4, utf8_decode('Atenea - Página ' . $this->PageNo()), 0, 0, 'C');\n }", "function Footer(){\n\t\t$this->Cell(190,0,'','T',1,'',true);\n\t\t\n\t\t//Go to 1.5 cm from bottom\n\t\t$this->SetY(-15);\n\t\t\t\t\n\t\t$this->SetFont('Arial','',8);\n\t\t\n\t\t//width = 0 means the cell is extended up to the right margin\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().\" / {pages}\",0,0,'C');\n\t}", "public function Footer() {\n\t\t$this->SetY(-15);\n\t\t// Set font\n\t\t$this->SetFont('helvetica', 'I', 8);\n\t\t// Page number\n\t\t$this->Cell(0, 10, 'Pagina '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n\t}", "function Footer()\n\t{\n\t $this->SetY(-15);\n\t //Arial italic 8\n\t $this->SetFont('Arial','I',7);\n\t //Page number\n\t $this->Cell(0,10,utf8_decode('Página ').$this->PageNo().' de {nb}',0,0,'R');\n\t}", "public function setFooter() {\n\n // set the footer html.\n echo '<div class=\"footer\">\n \n </div>\n </div>\n </body>\n</html>' . PHP_EOL;\n }", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','b',8);\n\t\t\n\t\t$this->Cell(30,1,\"----------------------------------------\",0,0,'C');\n\t\t$this->Cell(210,1,'',0,0);\n\t\t// $this->Cell(30,1,\"----------------------------------------\",0,0,'C');\n\t\t// $this->Cell(50,1,'',0,0);\n\t\t$this->Cell(30,1,\"----------------------------------------\",0,1,'C');\n\t\t\n\t\t$this->Cell(30,4,\"Prepared/Class Teacher\",0,0,'C');\n\t\t// $this->Cell(50,4,'',0,0);\n\t\t// $this->Cell(30,4,\"Controlar of Examination\",0,0,'C');\n\t\t$this->Cell(210,4,'',0,0);\n\t\t$this->Cell(30,4,\"Principal/VP\",0,1,'C');\n\t\t\n\t\t$this->Cell(50,4,date(\"d-m-y h:i:s A\"),0,0,'L');\n\t\t// Page number\n\t\t//$this->Cell(140,4,''.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "function Footer()\n {\n date_default_timezone_set('UTC+1');\n //Date\n $tDate = date('F j, Y, g:i:s a');\n // Position at 1.5 cm from bottom\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 12);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10,utf8_decode('Page ' . $this->PageNo().' \n CHUYC \n '.$tDate.'\n +237 693 553 454\n '.$this->Image(SITELOGO, 189, 280, 10, 10,'', URLROOT)), 0, 0, 'L');\n }", "private function generateFoot(){\n echo '</div>';\n echo '</div>';\n }", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "function local_course_completion_status_before_footer() {\n //echo \"Hello!\";\n //\\core\\notification::add('Success!',\\core\\output\\notification::NOTIFY_SUCCESS);\n}", "function Footer()\n {\n $this->SetY(-6);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number\n $this->Cell(0,10,'Página '.$this->PageNo(),0,0,'C');\n }", "public function executeFooterPanel()\n {\n }", "function showHTMLFooter() {\r\n echo '<form style=\"background-color:#E6E6FA\">';\r\n\techo '<hr/>';\t\r\n\techo '<p><center><strong>Aplikacija BANKOMATI v1.3</strong></center></p>';\r\n\techo '<hr/>';\r\n\techo '</form>';\r\n\t?>\r\n\t\r\n\t<input type=\"button\" onclick=\"window.location='/bankomati_RTM1/auth/logout.php'\" class=\"logout\" value=\"Logout\"/>\r\n\t\r\n\t<?php\r\n\techo '</body>'; // završava BODY dio HTML stranice otvoren u zaglavlju\r\n\techo '</html>'; // završava ispravan HTML blok koda otvoren u zaglavlju\r\n}", "function FooterRR()\n {\n //Posición: a 2 cm del final\n $this->Ln();\n $this->SetY(-12);\n $this->SetFont('Arial','B',6);\n //Número de página\n $this->Cell(190,4,'Sistema de Control de Ventas y Facturacion \"BOUTIQUE DE ZAPATERIA\"','T',0,'L');\n $this->AliasNbPages();\n $this->Cell(0,4,'Pagina '.$this->PageNo(),'T',1,'R');\n }", "protected function generatePageFooter() \n {\n\t\t\n\t\techo \"</body>\\n\";\n\t\techo \"</html>\\n\";\n // to do: output common end of HTML code\n }", "public function Footer() {\n $this->SetY(-15);\n // Set font\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "function Footer()\n {\n $this->SetY(-15);\n // Police Arial italique 8\n $this->SetFont('Arial','I',6);\n // Num?ro de page\n $this->Cell(0,8,'Page '.$this->PageNo().'/{nb}',0,0,'C');$this->Ln(3);\n $this->Cell(0,8,\"Algerian Gulf Life Insurance Company, SPA au capital social de 1.000.000.000 de dinars algériens, 01 Rue Tripoli, Hussein Dey Alger, \",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"RC : 16/00-1009727 B 15 NIF : 001516100972762-NIS :0015160900296000\",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"Tel : +213 (0) 21 77 30 12/14/15 Fax : +213 (0) 21 77 29 56 Site Web : www.aglic.dz \",0,0,'C');\n }", "function Footer()\n {\n $this->SetY(-11);\n $this->Cell(45);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(6,10,'',0,0,'C');\n $this->Cell(96,10,'Nombre y Firma','T',0,'C');\n $this->Cell(0,10,utf8_decode('Página ').$this->PageNo(),0,0,'R');\n\n }", "function footer() {\n\t\t?>\n\t\t<div data-role=\"footer\" data-position=\"fixed\" style=\"bottom: 0px;\">\n\t\t\t<p align=\"center\">by Matti Maier Internet Solutions</p>\n\t\t</div>\n\t\t<?php\n\t}", "public function footerAction() {$this->_helper->viewRenderer->setResponseSegment('footer');}", "function Footer() {\n\t$this->SetY(-15);\n\t// Arial italic 8\n\t$this->SetFont('Arial','I',8);\n\t// Text color in gray\n\t$this->SetTextColor(128);\n\t// Page number\n\t$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n}", "private function display_progress_bar($args){\n $number_of_steps = count($this->step_ids);\n $current_step = $args['step'];\n\n echo '<ul class=\"list-unstyled\">';\n for($i = 1; $i < $number_of_steps - 1; $i++){\n echo '<li style=\"display:inline-block; margin-right:15px;\">Step ' . $i . '</li>';\n }\n echo '</ul>';\n }", "private function showProgress()\n {\n $allQuestions = $this->questionRepository->list(['id', 'question']);\n $this->transformProgressList($allQuestions);\n\n $this->console->info( ' ************ Your progress is ************');\n\n foreach ($this->progress as $option) {\n $validate = $option['is_true'] ? __('True') : __('False');\n $this->console->info( ' Question: ' . $option['question']);\n if(null !== $option['is_true'])\n $this->console->info( ' Answer: ' . $option['answer'] . '('.$validate .')');\n $this->console->info( ' ');\n }\n $this->console->info( ' *******************************************');\n }", "function Footer()\n\t{\n\t $this->SetY(-15);\n\t //Arial italic 8\n\t $this->SetFont('Arial','I',7);\n\t //Page number\n\t $this->Cell(0,10,utf8_decode('PlatSource © '.date('Y')),0,0,'L');\n\t $this->Cell(0,10,utf8_decode('Página ').$this->PageNo().' de {nb}',0,0,'R');\n\t}", "public function drawFooter() {\n\t\t\t// Is there scope for using Smarty or similar here?\n\t\t\t$html = '';\n\t\t\treturn $html;\n\t\t}", "function showProgress($downloaded_size, $download_size, $cli_size=30) {\n \n if($downloaded_size > $download_size){\n \treturn;\n }\n\n //avoid division by 0\n if($download_size == 0){\n \treturn;\n }\n\n static $start_time;\n\n if(!isset($start_time) || empty($start_time)){\n \t$start_time = time();\n }\n\n $current_time = time();\n\n $percentage = (double) ($downloaded_size / $download_size);\n\n $bar = floor($percentage * $cli_size);\n\n $status_bar_str = \"\\r[\";\n $status_bar_str .= str_repeat(\"=\", $bar);\n\n if($bar < $cli_size){\n $status_bar_str .= \">\";\n $repeat = $cli_size - $bar;\n $status_bar_str .= str_repeat(\" \", $repeat);\n } else {\n $status_bar_str .= \"=\";\n }\n\n $disp = number_format($percentage * 100, 0);\n\n $status_bar_str .=\"] $disp% \".$downloaded_size.\"/\".$download_size;\n\n if($downloaded_size == 0){\n \t$download_rate = 0;\n }\n else{\n \t$download_rate = ($current_time - $start_time) / $downloaded_size;\n\t}\n $left = $download_size - $downloaded_size;\n \n $estimated = round($download_rate * $left, 2);\n $elapsed = $current_time - $start_time;\n\n $status_bar_str .= \" remaining: \".number_format($estimated).\" sec. elapsed: \".number_format($elapsed).\" sec.\";\n\n echo \"$status_bar_str \";\n\n flush();\n\n if($downloaded_size == $download_size) {\n echo \"\\n\";\n }\n}", "function Footer() {\r\n\t\t\t$this->SetY( -15 );\r\n\t\t\t\r\n\t\t\t//set font to Arial, Bold, size 10\r\n\t\t\t$this->SetFont( 'Arial', 'B', 10 );\r\n\t\t\t\r\n\t\t\t//set font color to blue\r\n\t\t\t$this->SetTextColor( 52, 98, 185 );\r\n\t\t\t\r\n\t\t\t$this->Cell( 0, 10, 'www.iFadey.com', 0, 0, 'L' );\r\n\t\t\t\r\n\t\t\t//set font color to gray\r\n\t\t\t$this->SetTextColor( 150, 150, 150 );\r\n\t\t\t\r\n\t\t\t//write Page No\r\n\t\t\t$this->Cell( 0, 10, 'Page No: ' . $this->PageNo(), 0, 0, 'R' );\r\n\t\t}", "function Get_Standard_Bottom_Section_HTML()\n {\n $HTML = \"\";\n //$HTML .= Get_File_Contents(\"static_html/stfc_footer.html\");\n $HTML .= \"</div>\";\n // empty div so that page container is\n // correct size\n\n // end page container\n $HTML .= \"</div>\";\n $HTML .= Get_File_Contents(__DIR__.\"/../../static_html/standard_footer.html\");\n return $HTML;\n }", "public function Footer(){\n $this->SetFont('Arial','',8);\n $date = new Date();\n $this->SetTextColor(100);\n $this->SetFillColor(245);\n $this->SetY(-10);\n $str = \"Elaborado Por Mercurio\";\n $x = $this->GetStringWidth($str);\n $this->Cell($x+10,5,$str,'T',0,'L');\n $this->Cell(0,5,'Pagina '.$this->PageNo().' de {nb}','T',1,'R');\n }", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page asdjlkasjdlfkjasdjlfkjkls'.$this->PageNo(),0,0,'C');\n}", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page asdjlkasjdlfkjasdjlfkjkls'.$this->PageNo(),0,0,'C');\n}", "public function Footer(){\n $this->SetY(-15);\n $this->SetFont('Arial','I',6);\n $this->Cell(0,5,'\"ESTA FACTURA CONTRIBUYE AL DESARROLLO DEL PAIS, EL USO ILICITO DE ESTA SERA SANCIONADO DE ACUERDO A LEY\"',0,0,'C');\n $this->Ln(5);\n $this->Cell(0,5,'Ley No 453: Tienes derecho a un trato equitativo sin discriminacion en la oferta de servicios.',0,0,'C');\n }", "public function Footer(){\n // Posición: a 1,5 cm del final\n $this->SetY(-20);\n // Arial italic 8\n $this->AddFont('Futura-Medium');\n $this->SetFont('Futura-Medium','',10);\n $this->SetTextColor(50,50,50);\n // Número de págin\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode('Generado por GetYourGames'),0,0,\"R\");\n $this->Ln(4);\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode(date(\"d-m-Y g:i a\").' - Página ').$this->PageNo(),0,0,\"R\");\n\n }", "function printFooter()\n\t{\n\t\tinclude 'View/Footer.html';\n\t}", "function rd_do_footer()\n{\n\techo <<<END\n\t\t</form>\n\t</div></body>\n</html>\nEND;\n}", "function Footer(){\n\t\t// Positionnement à 1,5 cm du bas\n\t\t$this->SetY(-15);\n\t\t// Police Arial italique 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Numéro de page\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "function Footer()\n {\n $this->SetY(-15);\n\n // Police Arial italique 8\n $this->SetFont('Arial','I',6);\n // Num?ro de page\n $this->Cell(0,8,'Page '.$this->PageNo().'/{nb}',0,0,'C');$this->Ln(3);\n $this->Cell(0,8,\"Algerian Gulf Life Insurance Company, SPA au capital social de 1.000.000.000 de dinars algériens, 01 Rue Tripoli, Hussein Dey Alger, \",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"RC : 16/00-1009727 B 15 NIF : 001516100972762-NIS :0015160900296000\",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"Tel : +213 (0) 21 77 30 12/14/15 Fax : +213 (0) 21 77 29 56 Site Web : www.aglic.dz \",0,0,'C');\n }", "function generate_footer() {\n\t\t$print = '';\n\t\t$user_id = $_SESSION[ 'user_id' ];\n\t\t$print = '<span> UserID:</span> '.$user_id.'<br />\n\t\t\t\t';\n\t\t$pid = $_SESSION[ 'pp_pid' ];\n\t\t$sid = $_SESSION[ 'pp_sid' ];\n\t\t$tid = $_SESSION[ 'pp_tid' ];\n\t\t$ppid = $_SESSION[ 'pp_ppid' ];\n\t\t$menu = '';\n\t\t// What to show is decided here. Specifics\n\t\t$print .= '<span> pid:'.$pid.'| sid:'.$sid.'| tid:'.$tid.'| ppid:'.$ppid.' <span> <br />\n\t\t\t\t';\n\t\t$action = $_SESSION[ 'pp_action' ];\n\t\t$type = $_SESSION[ 'pp_type' ];\n\t\t$print .= '<span> action: '.$action.' | type: '.$type.' <span> <br />\n';\n\t\techo $print;\n\t}", "function to_html():string{\n return $this->name.$this->progress_bar_html();\n }", "public function displayContentFooter() {\n ?>\n <footer class=\"container-fluid text-center\">\n <p>IT360 Applied Database Systems Project By Harrison Bleckley, Drake Bodine, and Lani Davis</p>\n </footer>\n <?php\n }", "public function Footer() {\r\n\t\t$this->SetY(-20);\r\n\t\tif ( ($this->PageNo() == 1 && $this->primera_pagina_con_pie) || $this->PageNo() != 1 ) {\r\n\t\t\t//$this->SetY(-15); //Position at 1.5 cm from bottom\r\n\t\t\t//$this->Formato( $this->familia, 'I', 8 );\r\n\t\t\t//$this->Celda( 0, 10, 'Página '.$this->PageNo().'/{nb}',0, 0, 'C');\r\n\t\t}\r\n\t\tswitch ($this->plantilla) {\r\n\t\t\tcase 1:\r\n\t\t\t/*\r\n\t\t\t$this->SetFillColor( 0, 0, 0 );\r\n\t\t\t$this->Celda( $this->ancho-10, 0.2, '', 0, 1, '', true );\r\n\t\t\t$this->Ln();\r\n\t\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t\t$this->Celda( $this->ancho-10, 0.2, '', 0, 1, '', true );\r\n\t\t\t$this->Ln();\r\n\t\t\t$this->SetFillColor( 0, 0, 0 );\r\n\t\t\t$this->Celda( $this->ancho-10, 0.2, '', 0, 1, '', true );\r\n\t\t\t$this->Ln();\r\n\t\t\t$this->Formato( 'Helvetica', '', 9\t );\r\n\t\t\t$this->Celda( $this->ancho-10, 4, \"\\\"CONTRALORES SOMOS TODOS\\\"\", 0, 1, 'C');\r\n\t\t\t$this->SetY(-20);\r\n\t\t\t$this->SetFont('','',6);\r\n\t\t\t$this->Celda( $this->ancho-10, 6, \"C.M.S.= U.B.M. - 07(09-08-2010)\", 0, 1, 'R');\r\n\t\t\t*/\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 2:\r\n\t\t\t$this->SetY(-25);\r\n\t\t\t\t$this->Formato( 'Helvetica', '', 10 );\r\n\t\t\t\t$this->SetFillColor(255, 255, 255 );\r\n\t\t\t\t$this->Celda( 256, 6, utf8_decode($this->header['responsable']), 0, 1, 'R', true );\r\n\t\t\t\t$this->Celda( 256, 6, 'Nombre y Apellido del '.utf8_decode($this->header['cargo']), 0, 1, 'R', true );\r\n\t\t\t\t$this->Celda( 50, 6, 'Sello de la Unidad', 0, 0, 'C', true );\r\n\t\t\t\t$this->Celda( 206, 6, 'Firma', 0, 1, 'R', true );\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 3:\r\n\t\t\t$this->SetY(-25);\r\n\t\t\t\t$this->Formato( 'Helvetica', '', 10 );\r\n\t\t\t\t$this->SetFillColor(255, 255, 255 );\r\n\t\t\t\t$this->Celda( 256, 6, utf8_decode($this->header['responsable']), 0, 1, 'R', true );\r\n\t\t\t\t$this->Celda( 256, 6, 'Nombre y Apellido del '.utf8_decode($this->header['cargo']), 0, 1, 'R', true );\r\n\t\t\t\t$this->Celda( 50, 6, 'Sello de la Unidad', 0, 0, 'C', true );\r\n\t\t\t\t$this->Celda( 206, 6, 'Firma', 0, 1, 'R', true );\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 4:\r\n\t\t\t$this->SetY(-60);\r\n\t\t\t$this->SetFillColor( 0, 0, 0 );\r\n\t\t\t$this->Celda( $this->ancho-100, 0.2, '', 0, 1, '', true );\r\n\t\t\t$this->SetFillColor( 255, 255, 255 );\r\n\t\t\t$y = $this->GetY();\r\n\t\t\t$this->Celda( 120, 48, '', 1, 0, '', true );\r\n\t\t\t$x = $this->GetX();\r\n\t\t\t$this->Celda( 136, 48, '', 1, 1, '', true );\r\n\t\t\t$x2 = $this->GetX();\r\n\t\t\t\r\n\t\t\t$this->SetY($y+1);\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '12. Faltantes Determinados por:', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, utf8_decode($this->header['cp_nombre']), 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '13. Cargo que Desempeña:', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, utf8_decode($this->header['cp_cargo']), 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '14. Dependencia a la Cual está Adscrito:', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, utf8_decode($this->header['cp_dp']), 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '15. Firma', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, '', 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '16. Jefe de Unidad de Trabajo:', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, utf8_decode($this->header['responsable']), 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '17. Firma', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, '', 'B', 1, '', true );\r\n\t\t\t\r\n\t\t\t$this->SetY($y+1);\r\n\t\t\t$this->SetX($x2+1);\r\n\t\t\t$this->Celda( 35, 6, '11. Observaciones:', 0, 1, '', true );\r\n\t\t\t\r\n\t\t\t$this->SetX($x2+3);\r\n\t\t\t$this->MultiCell( 114, 6, utf8_decode($this->header['observaciones']),'','');\r\n\t\t\t// \r\n\t\t\t$this->Ln();\r\n\t\t\t$this->SetY(-11);\r\n\t\t\t$this->SetFont('','',7);\r\n\t\t\t$this->Celda( $this->ancho-10, 6, \"C.M.S.= U.B.M. - 15(17-12-2007)\", 0, 1, 'R');\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "function Footer(){\r\n $this->SetY(-15); // Position at 1.5 cm from bottom\r\n $this->SetFont('Arial','I',8); // Arial italic 8\r\n $this->Cell(0,10,'Pagina '.$this->PageNo().'/{nb}',0,0,'C'); // Page number\r\n }", "function finalizeBottomHTML() {\n\t\t$returnVal = \"\";\n\t\t$returnVal .= \"</div>\\n\"; // Closes Container\n\t\t$returnVal .= \"</body>\\n\";\n\t\t$returnVal .= \"</html>\\n\";\n\t\t$this->_bottomHTML = $returnVal;\n\t}", "function Footer() {\r\n $this->SetY(-15);\r\n // Set font\r\n $this->SetFont('Helvetica', 'I', 12);\r\n // Page number\r\n $this->Cell(0, 10, 'PvMax Summary | Schletter Inc. | (888) 608 - 0234', 0, false, 'C', 0, '', 0, false, 'T', 'M');\r\n}", "function Footer()\n{\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "function Footer()\n{\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "function displayFooter()\n\t{\n\t\t// footer (not really)\n\t\tif ($this->cmd != \"logout\")\n\t\t{\n\t\t\tif ($this->setup->ini_ilias_exists and $this->display_mode == \"setup\" and $this->setup->getClient()->getId() != \"\")\n\t\t\t{\n\t\t\t\t$this->tpl->setVariable(\"TXT_ACCESS_MODE\",\"(\".$this->lng->txt(\"client_id\").\": \".$this->setup->getClient()->getId().\")\");\n\t\t\t}\n\t\t\telseif ($this->setup->isAdmin())\n\t\t\t{\n\t\t\t\t$this->tpl->setVariable(\"TXT_ACCESS_MODE\",\"(\".$this->lng->txt(\"root_access\").\")\");\n\t\t\t}\n\n\t\t\t$this->displayNavButtons();\n\t\t}\n\n\t\t$this->tpl->show();\n\t}", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n}" ]
[ "0.8463311", "0.8321003", "0.6477614", "0.62740207", "0.60998523", "0.6090306", "0.60702324", "0.6043246", "0.60162276", "0.5999651", "0.59315", "0.5923977", "0.5902561", "0.5902273", "0.58953726", "0.5883914", "0.58694726", "0.586684", "0.58630073", "0.5860541", "0.58564526", "0.5849097", "0.5847683", "0.5832709", "0.5829108", "0.5828141", "0.58151877", "0.5813858", "0.5810633", "0.5798023", "0.57876086", "0.57838404", "0.5783246", "0.5783246", "0.5779591", "0.5776486", "0.577336", "0.57708216", "0.5769389", "0.57573676", "0.5752744", "0.57315356", "0.5729706", "0.57271874", "0.57214606", "0.57200646", "0.5714854", "0.5708039", "0.5702799", "0.5693423", "0.56917787", "0.56902176", "0.56791556", "0.56788087", "0.5676226", "0.56726915", "0.5652775", "0.5652172", "0.56432724", "0.5638532", "0.563716", "0.5634595", "0.56330305", "0.56291664", "0.56285006", "0.562792", "0.56246084", "0.5619321", "0.56192124", "0.5605227", "0.5605006", "0.56041086", "0.5603411", "0.5595277", "0.5589206", "0.5587954", "0.5576811", "0.55765873", "0.5576585", "0.55758977", "0.5569577", "0.556541", "0.556541", "0.55648196", "0.5561711", "0.55614", "0.55565405", "0.55559", "0.55498534", "0.5546982", "0.5545293", "0.5536063", "0.55355465", "0.5534898", "0.552832", "0.5515533", "0.55097675", "0.55097675", "0.5497047", "0.5483268" ]
0.8561201
0
Form footer progress status (percentage) HTML.
public function form_footer_progress_status_percentage_html() { ?> <div class="wpforms-conversational-form-footer-progress-status-percentage"> <?php printf( /* translators: %s - Percentage of fields completed. */ \esc_html__( '%s%% completed', 'wpforms-conversational-forms' ), '<span class="completed">100</span>' ); ?> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function form_footer_progress_status_proportion_html() {\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-proportion\">\n\t\t\t<?php\n\t\t\tprintf(\n\t\t\t\t/* translators: %1$s - Number of fields completed, %2$s - Number of fields in total. */\n\t\t\t\t\\esc_html__(\n\t\t\t\t\t'%1$s of %2$s completed',\n\t\t\t\t\t'wpforms-conversational-forms'\n\t\t\t\t),\n\t\t\t\t'<span class=\"completed\"></span>',\n\t\t\t\t'<span class=\"completed-of\"></span>'\n\t\t\t);\n\t\t\t?>\n\t\t</div>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-proportion-completed\" style=\"display: none\">\n\t\t\t<?php \\esc_html_e( 'Form completed', 'wpforms-conversational-forms' ); ?>\n\t\t</div>\n\t\t<?php\n\t}", "public function form_footer_progress_block_html() {\n\n\t\t$progress_style = ! empty( $this->form_data['settings']['conversational_forms_progress_bar'] ) ? $this->form_data['settings']['conversational_forms_progress_bar'] : '';\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress\">\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-status\">\n\t\t\t\t<?php\n\t\t\t\tif ( 'proportion' === $progress_style ) {\n\t\t\t\t\t$this->form_footer_progress_status_proportion_html();\n\t\t\t\t} else {\n\t\t\t\t\t$this->form_footer_progress_status_percentage_html();\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-bar\">\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-progress-completed\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "private function progress_bar_html():string{\n return '<progress value='.$this->score.' max=\"'.self::MAX.'\">'.$this->score.'/'.self::MAX.'</progress>';\n }", "function show_answers_progress($real_taskcount, $taskcount, $pid, $colspan = -1){\n\t\n\tif($colspan == -1){\n\t\t$colspan = \"\";\n\t}else{\n\t\t$colspan = \" colspan = '$colspan'\";\n\t}\n\t\n\t//taskcount formatting\n\t$delta_tc = $taskcount - $real_taskcount;\n\t$const = 60;\n\tif($delta_tc >= 0 || $taskcount == 0){\n\t\t$width = $const;\n\t}else{\n\t\t$width = $const * $taskcount / $real_taskcount;\n\t\t$sec_width = $const * abs($delta_tc) / $real_taskcount;\n\t}\n\t\n\techo \"<td$colspan>\n\t\t<meter id='bar$pid' min='0' max='100' low='25' high='75' optimum='100' value='\";\n\tif($taskcount == 0){\n\t\techo \"0\";\n\t}else{\n\t\techo $real_taskcount / $taskcount * 100;\n\t}\n\techo \"' style='width:\".$width.\"%;'></meter>\";\n\tif($delta_tc < 0 && $taskcount != 0){\n\t\techo \"<meter min='0' max='100' low='0' high='0' optimum='0' value='100' style='width:\".$sec_width.\"%;'></meter>\";\n\t}\n\techo \"<label for='bar$pid'> $real_taskcount/$taskcount</label>\";\n\techo \"</td>\";\n}", "public function Footer() {\n $this->SetY(-15);\n // Select helvetica italic 8\n $this->SetFont('helvetica', '', 10);\n // Print current and total page numbers\n\n //$this->Cell(0,10,'Page '.$this->pageNo().'/{nb}',0,0,'C');\n\n $this->Cell(0, 4, 'This document shall be deemed uncontrolled unless labelled \"CONTROLLED\"', 0, 0, 'C');\n $this->ln();\n\n $this->Cell($this->w - ($this->w * 0.51), 4, 'User should verify latest', 0, 0, 'R');\n $this->SetFont('helvetica', 'B', 10);\n $this->Cell(0, 4, ' revision.', 0, 0, 'L');\n $this->ln();\n\n $this->SetFont('helvetica', 'I', 7);\n\n $pageNo = 'Page '.$this->getAliasNumPage().' of '.$this->getAliasNbPages();\n $this->Cell(0, 3, $pageNo, 0, 0, 'R');\n }", "function footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print current and total page numbers\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "public function render() {\n if ($this->_value >= 90) {\n $type = 'success';\n } elseif ($this->_value >= 50) {\n $type = 'warning';\n } else {\n $type = 'danger';\n }\n\n $html = '<div class=\"progress\">'\n . '<div class=\"progress-bar progress-bar-' . $type . '\"'\n . ' role=\"progressbar\" aria-valuenow=\"' . $this->_value . '\"'\n . ' aria-valuemin=\"0\" aria-valuemax=\"100\"'\n . ' style=\"width:' . $this->_value . '%\">'\n . '<span class=\"sr-only\">' . $this->_value . '% Complete</span>'\n . '</div>'\n . '</div>';\n\n return $html;\n }", "public function Footer()\n {\n // Go to 10 cm from bottom\n $this->SetY(-10);\n // Set font to Open Sans\n $this->SetFont('opensans', 'I', 6);\n // Print centered page number with datetime and timezone\n $this->AliasNbPages('{totalPages}');\n // The timezone of the user is retrieved from their Auth0 user's profile if available, otherwise the server time zone is used\n // related to this trello card https://trello.com/c/OjWZzsGA\n $timezone = ($_SESSION['auth0_user']['https://www.boxtribute.com/timezone']) ? $_SESSION['auth0_user']['https://www.boxtribute.com/timezone'] : date_default_timezone_get();\n\n $dt = new DateTime('now', new DateTimeZone($timezone));\n // This is quick fix for an issue with the alignment of footer text as the library incorrectly calculates the text length when template variables {totalPages} are used\n $totalPages = ($_GET['count'] && 0 != $_GET['count']) ? round(intval($_GET['count']) / 2) : 1;\n $this->Cell(0, 10, 'Page '.$this->PageNo().' of '.$totalPages.' Printed on '.$dt->format('d-m-Y H:i:s').\" {$timezone}\", 0, 0, 'C');\n }", "public static function printFoot (){\n\t?>\t\t\n\t\t\t\t<p class='submit'>\n\t\t\t\t\t<input type='submit' name='Submit' value=\"<?php _e('Save changes') ?>\" class='button-primary' />\n\t\t\t\t</p>\t\t\t\t\n\t\t\t\t\n\t\t\t</form>\n\t\t</div>\n\t\t\n\t<?php\n\t}", "function flush() {\r\n\t\t\tob_start();\r\n\t\t\t?>\r\n\t\t\t <div class=\"progressbar\" style=\"position:relative;overflow:hidden; height: <?php echo $this->height ; ?>px;width:<?php echo $this->length ; ?>px;\">\r\n\t\t\t\t<img src=\"<?php echo plugin_dir_url(\"/\").\"/\".str_replace(basename(__FILE__),\"\",plugin_basename( __FILE__)); ?>/img/progressbar.png\" style='position:absolute;left:0;top:-<?php echo floor(2*$this->height) ; ?>px;height:<?php echo floor(3*$this->height) ; ?>px;width:<?php echo $this->length ; ?>px;'/>\r\n\t\t\t\t<img id=\"<?php echo $this->id.\"_image\"; ?>\" src=\"<?php echo plugin_dir_url(\"/\").\"/\".str_replace(basename(__FILE__),\"\",plugin_basename( __FILE__)); ?>/img/progressbar.png\" style='position:absolute;left:0;top:0px;height:<?php echo floor(3*$this->height) ; ?>px;width:<?php echo floor($this->length*$this->start/100) ; ?>px;'/>\r\n\t\t\t\t<div id=\"<?php echo $this->id.\"_text\"; ?>\" style='position:absolute;left:0;top:0px;height:<?php echo $this->height; ?>px;text-align:center;line-height:<?php echo $this->height; ?>px;width:<?php echo $this->length ; ?>px;'><?php echo $this->insideText?>&nbsp;</div>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<?php\r\n\t\t\techo ob_get_clean();\r\n\t\t}", "function renderProgress($tot_complete, $tot_failed, $total, $show_title = false) {\n\t\n\tif($total == 0) return '';\n\t$perc_complete \t= round(($tot_complete / $total) * 100, 2);\n\t$perc_failed \t= round(($tot_failed / $total) * 100, 2);\n\t\n\t$title = str_replace('[total]', $total, Lang::t('_PROGRESS_TITLE', 'course'));\n\t$title = str_replace('[complete]', $tot_complete, $title);\n\t$title = str_replace('[failed]', $tot_failed, $title);\n\t\n\t$html = '';\n\tif($show_title === true) $html .= '<span class=\"progress_title\">'.$title.'</span><br />';\n\tif($perc_complete >= 100) {\n\t\t\n\t\t$html .= \"\\n\".'<div class=\"box_progress_complete\" title=\"'.$title.'\">'\n\t\t\t.'<div class=\"nofloat\">'\n\t\t\t.'</div></div>'.\"\\n\";\n\t} elseif($perc_failed + $perc_complete >= 100) {\n\t\t\n\t\t$html .= \"\\n\".'<div class=\"box_progress_failed\" title=\"'.$title.'\">';\n\t\tif($perc_complete != 0) $html .= '<div class=\"bar_complete\" style=\"width: '.$perc_complete.'%;\"></div>';\n\t\t$html .= '<div class=\"nofloat\">'\n\t\t\t.'</div></div>'.\"\\n\";\n\t} else {\n\t\t\n\t\t$html .= \"\\n\".'<div class=\"box_progress_bar\" title=\"'.$title.'\">';\n\t\tif($perc_complete != 0) $html .= '<div class=\"bar_complete\" style=\"width: '.$perc_complete.'%;\"></div>';\n\t\tif($perc_failed != 0) $html .= '<div class=\"bar_failed\" style=\"width: '.$perc_failed.'%;\"></div>';\n\t\t$html .= '<div class=\"nofloat\">'\n\t\t\t.'</div></div>'.\"\\n\";\n\t}\n\t\n\treturn $html;\n}", "public function Footer() {\r\n $this->SetTextColor(0,0,0);\r\n /* insertamos numero de pagina y total de paginas*/\r\n $this->Cell(0, 10, 'Página '.$this->getAliasNumPage().\r\n ' de un total de '.\r\n $this-> getAliasNbPages(),\r\n 0, false, 'C', 0, '', 0, false, 'T', 'M');\r\n $this->SetDrawColor(0,0,0);\r\n /* dibujamos una linea roja delimitadora del pie de página */\r\n $this->Line(15,282,195,282);\r\n\r\n }", "function update_progress_bar($percent, $first_time) {\n\tglobal $pkg_interface;\n\tif ($percent > 100) {\n\t\t$percent = 1;\n\t}\n\tif ($pkg_interface <> \"console\") {\n\t\techo '<script type=\"text/javascript\">';\n\t\techo \"\\n//<![CDATA[\\n\";\n\t\techo 'document.getElementById(\"progressbar\").style.width=\"'. $percent.'%\"';\n\t\techo \"\\n//]]>\\n\";\n\t\techo '</script>';\n\t} else {\n\t\tif (!($first_time)) {\n\t\t\techo \"\\x08\\x08\\x08\\x08\\x08\";\n\t\t}\n\t\techo sprintf(\"%4d%%\", $percent);\n\t}\n}", "function showProgress($percent,$remainingTime)\n{\n $time='';\n if (!empty($remainingTime))\n {\n if ($remainingTime<120)\n {\n# $time=sprintf(\"(%d seconds remaining)\",$remainingTime);\n }\n elseif ($remainingTime<60*120)\n {\n # $time=sprintf(\"(%d minutes remaining)\",round($remainingTime/60));\n }\n else\n {\n # $time=sprintf(\"(%d hours remaining)\",round($remainingTime/3600));\n }\n }\n flush();\n}", "function Footer()\n\t{\n\t\t//$this->Image('../imagenes/pie.jpg',15,250,170);\n\t\t$this->AliasNbPages();\n\t\t$this->SetY(-23);\n\t\t\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->MultiCell(180,5,utf8_decode(''),'0','C');\n\t\t\n\t $this->SetFont('Arial','I',8);\n\t $this->Cell(0,7,'Pag. '.$this->PageNo().' / {nb}',0,1,'C');\n\t}", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n // $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "public function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "function Footer()\n {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "function paintFooter($test_name) {\n $colour = ($this->getFailCount() + $this->getExceptionCount() > 0 ? \"red\" : \"green\");\n print \"<div id=\\\"results\\\" style=\\\"background-color: $colour;\\\">\";\n print $this->getTestCaseProgress() . \"/\" . $this->getTestCaseCount();\n print \" test cases complete:\\n\";\n print \"<b>\" . $this->getPassCount() . \"</b> passes, \";\n print \"<b>\" . $this->getFailCount() . \"</b> fails and \";\n print \"<b>\" . $this->getExceptionCount() . \"</b> exceptions.\";\n print \"</div>\\n\";\n print \"</body>\\n</html>\\n\";\n }", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print current and total page numbers\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "public function progress_bar_html($id, $data) {\n global $OUTPUT;\n\n $template = (object) $data;\n\n if ($template->skin == 'A') {\n $template->barcolor = $this->theblock->config->colorAserie;\n } else {\n $template->barcolor = $this->theblock->config->colorCserie;\n }\n\n // $valuebartop = $data['boxheight'] / 2 - 2; \n\n $template->id = $id;\n\n $template->remains = 100 - $template->successrate;\n\n return $OUTPUT->render_from_template('block_userquiz_monitor/progressbarhtml', $template);\n }", "private function display_progress_bar($args){\n $number_of_steps = count($this->step_ids);\n $current_step = $args['step'];\n\n echo '<ul class=\"list-unstyled\">';\n for($i = 1; $i < $number_of_steps - 1; $i++){\n echo '<li style=\"display:inline-block; margin-right:15px;\">Step ' . $i . '</li>';\n }\n echo '</ul>';\n }", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Select Arial italic B\n\t\t$this->setfont('Arial','I',14);\n\t\t$this->cell(250,8,\"Proyecto Final, copyright &copy; 2019\",0,0,'c');\n\t\t// Print centered page numbre\n\t\t$this->Cell(0,10,'Pag.'.$this->PageNo(),0,0,'c');\n\t}", "function Footer()\n\t{\n\t\t$this->pie_pred();\n\t \n\t}", "function Footer()\t{\n\t $this->SetY(-15);\n\t // Arial italic 8\n\t $this->SetFont('Arial','I',8);\n\t // Page number\n\t $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "function show_migrate_multisite_files_progress( $current, $total ) {\n echo \"<span style='position: absolute;z-index:$current;background:#F1F1F1;'>Parsing Blog \" . $current . ' - ' . round($current / $total * 100) . \"% Complete</span>\";\n echo(str_repeat(' ', 256));\n if (@ob_get_contents()) {\n @ob_end_flush();\n }\n flush();\n}", "public function displayFinished() \n {\n if ($this->has_finished) {\n return '<i style=\"font-size:25px;color:#449D44;\" class=\"fa fa-check\" aria-hidden=\"true\"></i>';\n } else {\n return '<i style=\"font-size:25px;color:#C9302C;\" class=\"fa fa-times\" aria-hidden=\"true\"></i>';\n }\n }", "function Footer()\n\t\t\t\t{\n\t\t\t\t\t$this->SetY(-15);\n\t\t\t\t\t//Arial italic 8\n\t\t\t\t\t$this->SetFont('Helvetica','I',8);\n\t\t\t\t\t//Page number\n\t\t\t\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/'.$comp_name,'T',0,'C');\n\t\t\t\t\t$this->SetDrawColor(8, 102, 198);\n\t\t\t\t\tparent::Footer();\n\t\t\t\t}", "function Footer(){\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "public function progressBar()\n {\n \n self::$view='adminlte::progress.bar';\n return $this;\n \n }", "function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 10);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo(), 0, 0, 'C');\n }", "public function printFooterContent() {\n\t\techo '<ul>';\n\t\tif (! $this->isActive ( PageState::Selection ))\n\t\t\techo '<li class=\"', $class, '\"><a href=\"?q=select\">Auswahl</a></li>';\n\t\tif (! $this->isActive ( PageState::Statistics ))\n\t\t\techo '<li class=\"', $class, '\"><a href=\"?q=stats\">Statistik</a></li>';\n\t\tif (! $this->isActive ( PageState::Setup ))\n\t\t\techo '<li class=\"', $class, '\"><a href=\"?q=setup\">Setup</a></li>';\n\t\techo '</ul>';\n\t}", "public function progress() {\n $data = array();\n if (!$this->user->is_logged_in()) {\n redirect(\"/account/info\");\n }\n\n $this->user->get_user($this->user->getMyId());\n $data['user'] = $this->user;\n $data['current'] = str_replace('overview', 'play', $this->user->get_next_step());\n $this->load->view('account/progress', $data);\n }", "public function progress()\n\t{\n\t\t$data['user'] \t\t\t= $this->user;\n \t$iduser \t\t\t\t= $this->user['iduser'];\n \t\n\t\t$get_header \t\t\t= $this->db->get_where('header', array('header_is_displayed' => 'Y'));\n\t\t$get_footer \t\t\t= $this->db->get_where('footer', array('footer_is_displayed' => 'Y'));\n\t\t\n\t\t$namalengkap = $this->userform_model->ambilnama($iduser);\n $nama = $namalengkap->nama_lengkap;\n\t\t//print_r($nama); die;\n\t\t$data['nama']\t\t= $nama;\n\t\t$data['get_header']\t\t= $get_header;\n\t\t$data['get_footer']\t\t= $get_footer;\n\t\t$this->load->view('progress', $data);\n\t}", "function showProgress($downloaded_size, $download_size, $cli_size=30) {\n \n if($downloaded_size > $download_size){\n \treturn;\n }\n\n //avoid division by 0\n if($download_size == 0){\n \treturn;\n }\n\n static $start_time;\n\n if(!isset($start_time) || empty($start_time)){\n \t$start_time = time();\n }\n\n $current_time = time();\n\n $percentage = (double) ($downloaded_size / $download_size);\n\n $bar = floor($percentage * $cli_size);\n\n $status_bar_str = \"\\r[\";\n $status_bar_str .= str_repeat(\"=\", $bar);\n\n if($bar < $cli_size){\n $status_bar_str .= \">\";\n $repeat = $cli_size - $bar;\n $status_bar_str .= str_repeat(\" \", $repeat);\n } else {\n $status_bar_str .= \"=\";\n }\n\n $disp = number_format($percentage * 100, 0);\n\n $status_bar_str .=\"] $disp% \".$downloaded_size.\"/\".$download_size;\n\n if($downloaded_size == 0){\n \t$download_rate = 0;\n }\n else{\n \t$download_rate = ($current_time - $start_time) / $downloaded_size;\n\t}\n $left = $download_size - $downloaded_size;\n \n $estimated = round($download_rate * $left, 2);\n $elapsed = $current_time - $start_time;\n\n $status_bar_str .= \" remaining: \".number_format($estimated).\" sec. elapsed: \".number_format($elapsed).\" sec.\";\n\n echo \"$status_bar_str \";\n\n flush();\n\n if($downloaded_size == $download_size) {\n echo \"\\n\";\n }\n}", "function Footer()\n {\n //Position at 1.5 cm from bottom\n $this->SetY(-15);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number and page amount\n $this->Cell(0,10, text(\"bill_page\").\" \".$this->PageNo().'/{nb}',0,0,'C');\n }", "function Footer()\n\t\t\t\t{\n\t\t\t\t $this->SetY(-15);\n\t\t\t\t // Select Arial italic 8\n\t\t\t\t $this->SetFont('Arial','I',8);\n\t\t\t\t // Print centered page number\n\t\t\t\t $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n\t\t\t\t}", "function Footer() {\n $this->SetY(-15);\n //Pilih font Arial italic 8\n $this->SetFont('Helvetica', 'I', 8);\n //Tampilkan nomor halaman rata tengah\n $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "private function showProgress()\n {\n $allQuestions = $this->questionRepository->list(['id', 'question']);\n $this->transformProgressList($allQuestions);\n\n $this->console->info( ' ************ Your progress is ************');\n\n foreach ($this->progress as $option) {\n $validate = $option['is_true'] ? __('True') : __('False');\n $this->console->info( ' Question: ' . $option['question']);\n if(null !== $option['is_true'])\n $this->console->info( ' Answer: ' . $option['answer'] . '('.$validate .')');\n $this->console->info( ' ');\n }\n $this->console->info( ' *******************************************');\n }", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }", "function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }", "function Footer()\n {\n $this->SetY(-15);\n //Select Arial Italic 8\n $this->SetFont('Arial','I',8);\n $this->SetX(86,5);\n $this->Write(5, '[ powered by '.$this->web_str.']',$this->web_str);\n //Print centered page number\n $this->Cell(0,10,$this->page_str.' '.$this->PageNo(),0,0);\n }", "private function refreshPG($i, $percent,$total)\n {\n echo '<script language=\"javascript\">\n document.getElementById(\"progress\").innerHTML=\"<div class=\\\"progress-bar progress-bar-striped progress-bar-animated\\\" role=\\\"progressbar\\\" style=\\\"width:'.$percent.';background-color:#2DB5FF;\\\">&nbsp;</div>\";\n document.getElementById(\"information\").innerHTML=\"'.$i.' / '.$total.' filas ('.$percent.') procesadas.\";\n </script>';\n $this->flushN();\n }", "public function Footer() {\n\t\t$this->SetY(-15);\n\t\t// Set font\n\t\t$this->SetFont('helvetica', 'I', 8);\n\t\t// Page number\n\t\t$this->Cell(0, 10, 'Pagina '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n\t}", "function print_footer(){\n\t\techo '</div></div><div class=\"clear\"></div><div id=\"hana-footer\"><input type=\"hidden\" name=\"action\" value=\"save\" />\n\t\t\t <input type=\"submit\" value=\"Save Changes\" class=\"save-button\" />\n\t\t\t </div>\t\n\t\t\t</form></div>';\n\t}", "private function printFooter()\n {\n // Nothing to do at the moment\n }", "function Footer()\n\t{\n\t $this->SetY(-15);\n\t //Arial italic 8\n\t $this->SetFont('Arial','I',7);\n\t //Page number\n\t $this->Cell(0,10,utf8_decode('Página ').$this->PageNo().' de {nb}',0,0,'R');\n\t}", "function icu_drush_print_progress($label, $current=NULL, $range=NULL) {\n static $green = \"\\033[1;32m\";\n static $white = \"\\033[0;37m\";\n\n if (is_null($current)) {\n $output = $green . \"Progress: $label \\n\";\n print $output;\n return;\n }\n\n $ratio = ($current+1) / $range;\n $percentage = floor($ratio * 100) . '%';\n $columns = drush_get_context('DRUSH_COLUMNS', 80);\n // Subtract 10 characters for the percentage, brackets, spaces and arrow.\n $progress_columns = $columns - 10;\n // If ratio is 1 (complete), the > becomes a = to make a full bar.\n $arrow = ($ratio < 1) ? '>' : '=';\n // Print a new line if ratio is 1 (complete). Otherwise, use a CR.\n $line_ending = ($ratio < 1) ? \"\\r\" : \"\\n\";\n\n // Determine the current length of the progress string.\n $current_length = floor($ratio * $progress_columns);\n $progress_string = str_pad('', $current_length, \"=\");\n\n $output = $green . '[';\n $output .= $progress_string . $arrow;\n $output .= str_pad('', $progress_columns - $current_length);\n $output .= ']';\n $output .= str_pad('', 5 - strlen($percentage)) . $percentage;\n $output .= $line_ending . $white;\n\n print $output;\n}", "public function renderDivisionFooter(): void;", "public function Footer()\n {\n $this->SetFont('Arial', 'I', 8);\n $this->SetY(-15);\n $this->Write(4, 'Dokumen ini dicetak secara otomatis menggunakan sistem terkomputerisasi');\n\n $time = \"Dicetak pada tanggal \" . date('d-m-Y H:i:s') . \" WIB\";\n\n $this->SetX(-150);\n $this->Cell(0, 4, $time, 0, 0, 'R');\n }", "public function footer()\n\t\t{\t\t\t\n\t\t\treturn $this->render('incs/footer');\n\t\t}", "public function Footer() {\n $this->SetY(-15);\n // Set font\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "public function input_admin_footer() {\n\t\t$this->display_svg();\n\t}", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "public function Footer()\n {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print centered page number\n $this->Cell(0, 4, utf8_decode('Atenea - Página ' . $this->PageNo()), 0, 0, 'C');\n }", "function Footer() {\r\n // footer line\r\n $this->SetFooterFont();\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, $this->PageBreakTrigger + 2, 190, 0.2, \"F\");\r\n $this->Rect(10, $this->PageBreakTrigger + 2.5, 190, 0.2, \"F\");\r\n $this->SetY($this->PageBreakTrigger + 5);\r\n\r\n $this->Cell(0, 0, \"Used by permission, CCLI #2752477\", 0, 1, \"L\");\r\n $this->Cell(0, 0, \"The Ridge Community Church\", 0, 1, \"R\");\r\n }", "public function footer()\n {\n $footer = \"\\t</body>\\n</html>\";\n echo $footer;\n }", "function page_footer()\n\t\t{\n\t\t\t$output = '\t\t\t</div>'; // <!-- end .ace_options_container -->\n\t\t\t$output .= '\t\t\t<div class=\"ace_footer\">';\n\t\t\t$output .= \t\t\t$this->hidden_data();\n\t\t\t$output .= '\t\t\t<span class=\"ace_loading\"></span>';\n\t\t\t$output .= '\t\t\t\t<ul class=\"ace_footer_links\">';\n\t\t\t$output .= '\t\t\t\t\t<li class=\"ace_footer_reset\">'.$this->reset_button().'</li>';\n\t\t\t$output .= '\t\t\t\t\t<li class=\"ace_footer_save\">'.$this->save_button().'</li>';\n\t\t\t$output .= '\t\t\t\t</ul>';\n\t\t\t$output .= '\t\t\t</div>';\n\t\t\t$output .= '\t\t</div>'; // <!--end ace_options_page_content-->\n\t\t\t$output .= '\t\t<div class=\"ace_clear\"></div>';\n\t\t\t$output .= '\t</div>'; //<!--end ace_options_page_inner-->\n\t\t\t$output .= '</form>'; // <!-- end #ace_options_page -->\n\t\t\t$output .= '<div class=\"ace_bottom_shadow\"></div>';\n\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "public function renderProgressBar()\n {\n if (!isset($this->progressBarOptions['id'])) {\n $this->progressBarOptions['id'] = $this->options['id'] . static::ID_PROGRESS_SUFFIX;\n }\n if (!isset($this->clientOptions['progressBarId'])) {\n $this->clientOptions['progressBarId'] = $this->progressBarOptions['id'];\n }\n return Html::tag($this->progressBarTag, '', $this->progressBarOptions);\n }", "function local_course_completion_status_before_footer() {\n //echo \"Hello!\";\n //\\core\\notification::add('Success!',\\core\\output\\notification::NOTIFY_SUCCESS);\n}", "public function Footer(){\n // Position at 15 mm from bottom\n $this->SetY(-15);\n // Set font\n\t\t$html = \"<table>\";\n\t\t$html .= \"<tr><td>unidad de adm y serv</td><td>responsable del proyecto o accion centralizada</td><td>unidad de finanzas</td><td>unidad de planificacion ppto</td><td>presidente</td><td>secreatria de adcripcion</td><td>Secretaria de Planificacion presupuesto y control de gestion</td><td>Gobernador del estado</td></tr>\";\n\t\t$html .= \"<tr><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td></tr>\";\n\t\t$html .= \"</table>\";\n\t\t$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "function lendingform_export_page() {\r\n global $lendingform_global;\r\n global $base_url;\r\n $html = '';\r\n \r\n // only accessible in subdomain\r\n if (!lendingform_siemens_is_subdomain()) {\r\n return drupal_not_found();\r\n }\r\n \r\n if (variable_get('lendingform_siemens_cron_once_' . $lendingform_global->pid, 0) == 1) {\r\n return drupal_not_found();\r\n }\r\n \r\n // description\r\n $html .= 'Export progress';\r\n $html .= '<div id=\"lendingform-export-bar-wrapper\"></div>';\r\n $html .= '<div id=\"lendingform-progress-value\">0%</div>';\r\n $html .= '<div id=\"lendingform-export-message\"></div>';\r\n $html .= '<div id=\"lendingform-export-complete\" style=\"display:none\" class=\"messages status\"><h2 class=\"element-invisible\">Status message</h2>completed ' . l(t('continue'), $base_url) .'</div>';\r\n \r\n \r\n // call for transfering of elements\r\n $exports = module_invoke_all('lendingform_export_transfer');\r\n \r\n \r\n // Pass data to javascript for ajax processing\r\n $data = array('siemens_lendingform_export' => array('data' => $exports));\r\n drupal_add_js($data, array('type' => 'setting'));\r\n \r\n \r\n return $html;\r\n}", "function Footer(){\n\t\t$this->Cell(190,0,'','T',1,'',true);\n\t\t\n\t\t//Go to 1.5 cm from bottom\n\t\t$this->SetY(-15);\n\t\t\t\t\n\t\t$this->SetFont('Arial','',8);\n\t\t\n\t\t//width = 0 means the cell is extended up to the right margin\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().\" / {pages}\",0,0,'C');\n\t}", "function common_footer($button = \"Submit Changes\")\r\n\t{\r\n\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->html .= $SKIN->end_form($button);\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 Footer()\n {\n $this->SetY(-6);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number\n $this->Cell(0,10,'Página '.$this->PageNo(),0,0,'C');\n }", "function Footer(){\r\n $this->SetY(-15); // Position at 1.5 cm from bottom\r\n $this->SetFont('Arial','I',8); // Arial italic 8\r\n $this->Cell(0,10,'Pagina '.$this->PageNo().'/{nb}',0,0,'C'); // Page number\r\n }", "function admin_add_members_status(){\t\n\t\t$progress = $this->Session->read('Import.progress');\n\t\t\n\t\t$this->layout = 'ajax';\n\t\t$data = array(\n\t\t\t'progress' => $this->Session->read('Import.progress'),\n\t\t\t'total' => $this->Session->read('Import.total')\n\t\t);\n\t\t$this->set('data', $data);\n\t\t$this->render('/ajaxreturn');\n\t}", "function Footer(){\n\t\t// Positionnement à 1,5 cm du bas\n\t\t$this->SetY(-15);\n\t\t// Police Arial italique 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Numéro de page\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "function Footer() {\n\t$this->SetY(-15);\n\t// Arial italic 8\n\t$this->SetFont('Arial','I',8);\n\t// Text color in gray\n\t$this->SetTextColor(128);\n\t// Page number\n\t$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n}", "function FooterRR()\n {\n //Posición: a 2 cm del final\n $this->Ln();\n $this->SetY(-12);\n $this->SetFont('Arial','B',6);\n //Número de página\n $this->Cell(190,4,'Sistema de Control de Ventas y Facturacion \"BOUTIQUE DE ZAPATERIA\"','T',0,'L');\n $this->AliasNbPages();\n $this->Cell(0,4,'Pagina '.$this->PageNo(),'T',1,'R');\n }", "public function getFooter()\n {\n return <<<EOF\n\n<info>\nFinished. \n</info>\n\n\nEOF;\n\n}", "public function footerAction() {$this->_helper->viewRenderer->setResponseSegment('footer');}", "function xl_footer_stats_callback(){ ?>\n\n <ul class=\"list-inline xl-footer-stats go-flex\">\n <li><span><i class=\"fa fa-smile-o\"></i></span><span><b>4125</b><br><small>Coupons redeemed so far</small></span></li>\n <li><span><i class=\"fa fa-bookmark\"></i></span><span><b>5204</b><br><small>Coupons &amp; Deals for you</small></span></li>\n <li><span><i class=\"fa fa-users\"></i></span><span><b>5636</b><br><small>Subscribed Users</small></span></li>\n <li><span><i class=\"fa fa-check-circle\"></i></span><span><b>100%</b><br><small>Verified</small></span></li>\n </ul>\n <?php\n}", "function sloodle_print_footer()\r\n {\r\n global $CFG;\r\n echo \"<p style=\\\"text-align:center; margin-top:32px; font-size:90%;\\\"><a href=\\\"{$CFG->wwwroot}/course/view.php?id={$this->course->id}\\\">&lt;&lt;&lt; \".get_string('backtocoursepage','sloodle').\"</a></h2>\";\r\n sloodle_print_footer($this->course);\r\n }", "public function outputProgressPercentage($percentage) {\n\n if($job = $this->getAsyncJob()) {\n $job->setCompletionPercentage($percentage);\n $job->save();\n }\n echo(\"[PROGRESS: \".floor($percentage).\"%]\\n\");\n }", "function Footer()\n {\n date_default_timezone_set('UTC+1');\n //Date\n $tDate = date('F j, Y, g:i:s a');\n // Position at 1.5 cm from bottom\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 12);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10,utf8_decode('Page ' . $this->PageNo().' \n CHUYC \n '.$tDate.'\n +237 693 553 454\n '.$this->Image(SITELOGO, 189, 280, 10, 10,'', URLROOT)), 0, 0, 'L');\n }", "function Footer()\n {\n $this->SetY(-11);\n $this->Cell(45);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(6,10,'',0,0,'C');\n $this->Cell(96,10,'Nombre y Firma','T',0,'C');\n $this->Cell(0,10,utf8_decode('Página ').$this->PageNo(),0,0,'R');\n\n }", "public function pfoot() {\n include(dirname(dirname(__FILE__)) . '/ui/footer.php');\n }", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page asdjlkasjdlfkjasdjlfkjkls'.$this->PageNo(),0,0,'C');\n}", "function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page asdjlkasjdlfkjasdjlfkjkls'.$this->PageNo(),0,0,'C');\n}", "public static function getFooter()\n {\n ?>\n <p>Content in the front end's footer. This code comes from <?php echo __METHOD__; ?></p>\n <?php\n }", "function Footer()\n\t{\n\t $this->SetY(-15);\n\t //Arial italic 8\n\t $this->SetFont('Arial','I',7);\n\t //Page number\n\t $this->Cell(0,10,utf8_decode('PlatSource © '.date('Y')),0,0,'L');\n\t $this->Cell(0,10,utf8_decode('Página ').$this->PageNo().' de {nb}',0,0,'R');\n\t}", "function Footer()\n{\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "function Footer()\n{\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "function Footer() {\r\n\t\t\t$this->SetY( -15 );\r\n\t\t\t\r\n\t\t\t//set font to Arial, Bold, size 10\r\n\t\t\t$this->SetFont( 'Arial', 'B', 10 );\r\n\t\t\t\r\n\t\t\t//set font color to blue\r\n\t\t\t$this->SetTextColor( 52, 98, 185 );\r\n\t\t\t\r\n\t\t\t$this->Cell( 0, 10, 'www.iFadey.com', 0, 0, 'L' );\r\n\t\t\t\r\n\t\t\t//set font color to gray\r\n\t\t\t$this->SetTextColor( 150, 150, 150 );\r\n\t\t\t\r\n\t\t\t//write Page No\r\n\t\t\t$this->Cell( 0, 10, 'Page No: ' . $this->PageNo(), 0, 0, 'R' );\r\n\t\t}", "public function progression($format = '<p class=\"progression\">page %d (of %d)</p>') {\n\t\t$html = sprintf($format, $this->_rowset->getCurrentPage(), $this->_rowset->getPageCount());\n\t\treturn $html;\n\t}", "public function setFooter() {\n\n // set the footer html.\n echo '<div class=\"footer\">\n \n </div>\n </div>\n </body>\n</html>' . PHP_EOL;\n }", "public function Footer(){\n $this->SetFont('Arial','',8);\n $date = new Date();\n $this->SetTextColor(100);\n $this->SetFillColor(245);\n $this->SetY(-10);\n $str = \"Elaborado Por Mercurio\";\n $x = $this->GetStringWidth($str);\n $this->Cell($x+10,5,$str,'T',0,'L');\n $this->Cell(0,5,'Pagina '.$this->PageNo().' de {nb}','T',1,'R');\n }", "function footer() {\n\t\t?>\n\t\t<div data-role=\"footer\" data-position=\"fixed\" style=\"bottom: 0px;\">\n\t\t\t<p align=\"center\">by Matti Maier Internet Solutions</p>\n\t\t</div>\n\t\t<?php\n\t}", "public function standard_footer_html() {\n global $CFG, $SCRIPT;\n\n // This function is normally called from a layout.php file in {@link core_renderer::header()}\n // but some of the content will not be known until later, so we return a placeholder for now.\n // This will be replaced with the real content in {@link core_renderer::footer()}.\n $output = $this->unique_performance_info_token;\n if ($this->page->devicetypeinuse == 'legacy') {\n // The legacy theme is in use print the notification\n $output .= html_writer::tag('div', get_string('legacythemeinuse'), array('class'=>'legacythemeinuse'));\n }\n // Get links to switch device types (only shown for users not on a default device)\n $output .= $this->theme_switch_links();\n\n if (!empty($CFG->debugpageinfo)) {\n $icon = 'fa fa-cogs';\n $text = 'This page is ';\n $itag = html_writer::tag('i', '', array('class' => $icon));\n $output .= html_writer::tag('div', $itag . $text . $this->page->debug_summary(), array('class' => 'performanceinfo pageinfo well'));\n }\n if (debugging(null, DEBUG_DEVELOPER) and has_capability('moodle/site:config', context_system::instance())) { // Only in developer mode\n // Add link to profiling report if necessary\n if (function_exists('profiling_is_running') && profiling_is_running()) {\n $txt = get_string('profiledscript', 'admin');\n $title = get_string('profiledscriptview', 'admin');\n $url = $CFG->wwwroot . '/admin/tool/profiling/index.php?script=' . urlencode($SCRIPT);\n $link = html_writer::link($url, $txt, array('title' => $title));\n $output .= html_writer::tag('div', $link, array('class' => 'profilingfooter'));\n }\n $output .= html_writer::start_tag('div', array('class' => 'purgecaches'));\n $output .= html_writer::link(new moodle_url('/'.$CFG->admin.'/purgecaches.php?confirm=1&amp;sesskey='.sesskey()), html_writer::tag('i', '', array('class' => 'fa fa-trash-o')). '&nbsp;&nbsp;'.get_string('purgecaches', 'admin'), array('class' => 'btn btn-small'));\n $output .= html_writer::end_tag('div');\n\n\n }\n if (!empty($CFG->debugvalidators)) {\n // NOTE: this is not a nice hack, $PAGE->url is not always accurate and $FULLME neither, it is not a bug if it fails. --skodak\n $output .= '<div class=\"validators\"><ul>\n <li><a class=\"btn btn-small btn-info\" href=\"http://validator.w3.org/check?verbose=1&amp;ss=1&amp;uri=' . urlencode(qualified_me()) . '\"><i class=\"fa fa-cogs\"></i>&nbsp;&nbsp;Validate HTML</a></li>\n <li><a class=\"btn btn-small btn-info\" href=\"http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=-1&amp;url1=' . urlencode(qualified_me()) . '\"><i class=\"fa fa-cogs\"></i>&nbsp;&nbsp;Section 508 Check</a></li>\n <li><a class=\"btn btn-small btn-info\" href=\"http://www.contentquality.com/mynewtester/cynthia.exe?rptmode=0&amp;warnp2n3e=1&amp;url1=' . urlencode(qualified_me()) . '\"><i class=\"fa fa-cogs\"></i>&nbsp;&nbsp;WCAG 1 (2,3) Check</a></li>\n </ul><br /></div>';\n }\n if (!empty($CFG->additionalhtmlfooter)) {\n $output .= \"\\n\".$CFG->additionalhtmlfooter;\n }\n return $output;\n }", "public function getProgress()\n\t{\n\t\treturn 0;\n\t}", "public function national_progress_bar_reported()\n\t{\n\t\t$this->load->model('overview_model');\n\t\techo $this->overview_model->national_view_progress_bar_reported($this->get_filter_start_date(),$this->get_filter_stop_date());\n\t}", "public function render()\n {\n $percentage = (double) ($this->value / $this->total);\n\n $progress = floor($percentage * $this->size);\n $output = \"\\r[\" . str_repeat('=', $progress);\n if ($progress < $this->size) {\n $output .= \">\" . str_repeat(' ', $this->size - $progress);\n } else {\n $output .= '=';\n }\n $output .= sprintf('] %s%% %s/%s', round($percentage * 100, 0), $this->value, $this->total);\n\n if ($this->showRemainingTime) {\n $speed = (time() - $this->startTime) / $this->value;\n $remaining = number_format(round($speed * ($this->total - $this->value), 2), 2);\n $output .= \" $remaining sec remaining\";\n }\n\n return $output;\n }", "function Footer() {\r\n $this->SetY(-15);\r\n // Set font\r\n $this->SetFont('Helvetica', 'I', 12);\r\n // Page number\r\n $this->Cell(0, 10, 'PvMax Summary | Schletter Inc. | (888) 608 - 0234', 0, false, 'C', 0, '', 0, false, 'T', 'M');\r\n}", "function footer() {\n\t?>\n\t\t\t\t<div class=\"headfoot\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\t&quot;Remember The Cow is nice, but it's a total copy of another site.&quot; - PCWorld<br />\n\t\t\t\t\t\tAll pages and content &copy; Copyright CowPie Inc.\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<div id=\"w3c\">\n\t\t\t\t\t\t<a href=\"https://webster.cs.washington.edu/validate-html.php\">\n\t\t\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/w3c-html.png\" alt=\"Valid HTML\" /></a>\n\t\t\t\t\t\t<a href=\"https://webster.cs.washington.edu/validate-css.php\">\n\t\t\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/w3c-css.png\" alt=\"Valid CSS\" /></a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</body>\n\t\t</html>\n\t<?php\n\t}", "function printFooter()\n\t{\n\t\tinclude 'View/Footer.html';\n\t}", "function calculateProgBar($current_amt, $goal_level)\n{\n @$current_level = (($current_amt / $goal_level) * 100);\n\n // Here we need to round that percentage to display it before converting it to pixels (margin-bottom)\n $exact_level = round($current_level);\n\n /*\n Now we keep the marker down one close to the goal for exact level (% display)\n and to keep the goal from showing it's prematurely met when it's not.\n We also fix the bottom so if the level is 0 or close to it it displays as 1 so we see visible progress\n */\n if ($current_level < 100 && $exact_level == 100) {\n $exact_level = 99;\n } else if ($current_level > 0 && $exact_level == 0) {\n $exact_level = 1;\n }\n\n /*\n Now if we're in that 95-99.99% zone, we need to force the marker down (force it down a bit) so as to\n not obscure the goal text with its background\n */\n if ($current_level > 95 && $current_level < 100) {\n $current_level = 95;\n } else {\n $current_level = round($current_level);\n }\n\n // Here we keep the bottom end stable for negatives and whatever\n $divisible = ($current_level % 5);\n if ($divisible != 0) {\n $current_level -= $divisible;\n }\n // And then prevent overflow when the goal is exceeded\n if ($current_level > 100) {\n $current_level = 100;\n }\n\n // Now we covert that percentage into bottom margin (300px high so 1% = 3px)\n $margin_level = round($current_level * 3);\n return $margin_level;\n}", "function print_progress_redraw($thisbarid, $done, $total, $width, $donetext='') {\n if (empty($thisbarid)) {\n return;\n }\n echo '<script>';\n echo 'document.getElementById(\"text'.$thisbarid.'\").innerHTML = \"'.addslashes($donetext).'\";'.\"\\n\";\n echo 'document.getElementById(\"slider'.$thisbarid.'\").style.width = \\''.$width.'px\\';'.\"\\n\";\n echo '</script>';\n}", "function Footer()\n {\n $this->SetY(-15);\n // Police Arial italique 8\n $this->SetFont('Arial','I',6);\n // Num?ro de page\n $this->Cell(0,8,'Page '.$this->PageNo().'/{nb}',0,0,'C');$this->Ln(3);\n $this->Cell(0,8,\"Algerian Gulf Life Insurance Company, SPA au capital social de 1.000.000.000 de dinars algériens, 01 Rue Tripoli, Hussein Dey Alger, \",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"RC : 16/00-1009727 B 15 NIF : 001516100972762-NIS :0015160900296000\",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"Tel : +213 (0) 21 77 30 12/14/15 Fax : +213 (0) 21 77 29 56 Site Web : www.aglic.dz \",0,0,'C');\n }", "function Footer()\r\n {\r\n $this->SetY(-15);\r\n //courier italic 8\r\n $this->SetFont('courier','I',8);\r\n //Page number\r\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\r\n $this->SetX(5);\r\n $this->SetFont('courier','I',6);\r\n\r\n $this->Cell(0,10,'Tanggal Cetak : '.date(\"d/m/Y\"),0,0,'L');\r\n $this->SetY($this->GetY()+3);\r\n $this->Cell(0,10,'Cetak Oleh : '.$this->printby,0,0,'L');\r\n }" ]
[ "0.83427083", "0.83417714", "0.63392246", "0.6338151", "0.6323375", "0.6265407", "0.60941684", "0.60626113", "0.6036482", "0.5992782", "0.59861296", "0.59573394", "0.5954244", "0.58789694", "0.58676857", "0.58576465", "0.58223665", "0.581867", "0.5792145", "0.5786619", "0.5779705", "0.57662445", "0.5763765", "0.5763255", "0.5745793", "0.57378656", "0.57370216", "0.57346743", "0.57343996", "0.5730852", "0.57293874", "0.5720963", "0.57201374", "0.5709785", "0.570964", "0.5701554", "0.5695291", "0.56891483", "0.5673805", "0.56640756", "0.56640756", "0.56637746", "0.5662287", "0.5661189", "0.563787", "0.56303555", "0.5620915", "0.5617678", "0.56045264", "0.5598912", "0.5596671", "0.5594535", "0.5593791", "0.5590602", "0.5585436", "0.5572332", "0.5567641", "0.55671996", "0.556718", "0.5559804", "0.55595124", "0.55560946", "0.55464816", "0.5545907", "0.5541993", "0.5540246", "0.55378586", "0.5531219", "0.5528481", "0.55225927", "0.55163294", "0.55095714", "0.5495939", "0.5493531", "0.5492835", "0.54910195", "0.5489646", "0.5488692", "0.54809403", "0.54809403", "0.5475674", "0.54752886", "0.5474192", "0.5474192", "0.54729295", "0.5461524", "0.5447693", "0.54397285", "0.5434979", "0.5433937", "0.54255766", "0.54252994", "0.5421824", "0.5420684", "0.5419434", "0.54188895", "0.54182893", "0.54180485", "0.5417819", "0.5416956" ]
0.88054925
0
Form footer right block HTML.
public function form_footer_right_block_html() { $brand_disable = ! empty( $this->form_data['settings']['conversational_forms_brand_disable'] ) ? $this->form_data['settings']['conversational_forms_brand_disable'] : ''; ?> <div class="wpforms-conversational-form-footer-right-container"> <?php if ( ! $brand_disable ) : ?> <div class="wpforms-conversational-form-footer-powered-by"> <span> <?php esc_html_e( 'powered by', 'wpforms-conversational-forms' ); ?> </span> <?php // Require is needed to apply SVG dynamic styling. ?> <?php require plugin_dir_path( WPFORMS_CONVERSATIONAL_FORMS_FILE ) . 'assets/images/wpforms-text-logo.svg'; ?> </div> <?php endif; ?> <div class="wpforms-conversational-form-footer-switch-step"> <div class="wpforms-conversational-form-footer-switch-step-up"> <i class="fa fa-angle-up" aria-hidden="true"></i> </div> <div class="wpforms-conversational-form-footer-switch-step-down"> <i class="fa fa-angle-down" aria-hidden="true"></i> </div> </div> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gutenberg_block_footer_area() {\n\tgutenberg_block_template_part( 'footer' );\n}", "public function get_footer()\n {\n return <<<EOD\n<div id=\"siteftr\">\n Sitewide Footer\n</div>\n\nEOD;\n }", "function formFooter(){\r\n\r\n\t\t$ret = '</form>';\r\n\r\n\t\treturn $ret;\r\n\t}", "public function footer()\n\t\t{\t\t\t\n\t\t\treturn $this->render('incs/footer');\n\t\t}", "function rd_do_footer()\n{\n\techo <<<END\n\t\t</form>\n\t</div></body>\n</html>\nEND;\n}", "function page_footer()\n\t\t{\n\t\t\t$output = '\t\t\t</div>'; // <!-- end .ace_options_container -->\n\t\t\t$output .= '\t\t\t<div class=\"ace_footer\">';\n\t\t\t$output .= \t\t\t$this->hidden_data();\n\t\t\t$output .= '\t\t\t<span class=\"ace_loading\"></span>';\n\t\t\t$output .= '\t\t\t\t<ul class=\"ace_footer_links\">';\n\t\t\t$output .= '\t\t\t\t\t<li class=\"ace_footer_reset\">'.$this->reset_button().'</li>';\n\t\t\t$output .= '\t\t\t\t\t<li class=\"ace_footer_save\">'.$this->save_button().'</li>';\n\t\t\t$output .= '\t\t\t\t</ul>';\n\t\t\t$output .= '\t\t\t</div>';\n\t\t\t$output .= '\t\t</div>'; // <!--end ace_options_page_content-->\n\t\t\t$output .= '\t\t<div class=\"ace_clear\"></div>';\n\t\t\t$output .= '\t</div>'; //<!--end ace_options_page_inner-->\n\t\t\t$output .= '</form>'; // <!-- end #ace_options_page -->\n\t\t\t$output .= '<div class=\"ace_bottom_shadow\"></div>';\n\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "public static function getFooter()\n {\n ?>\n <p>Content in the front end's footer. This code comes from <?php echo __METHOD__; ?></p>\n <?php\n }", "public function getHtmlFooterSection()\n\t{\n\t\tif( in_array( $this->m_common->m_env, Common::constructionEnvironments() ) )\n\t\t{\n\t\t\t$footer_content = '';\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$footer_content = '\n\t\t\t<div style=\"position:relative;float:left;\">\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"padder_10_right\">\n\t\t\t\t\t\t\t\t<a href=\"http://facebook.com/colehafner\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t<img src=\"/images/icon_facebook_bw.gif\" />\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</td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"padder_10_right\">\n\t\t\t\t\t\t\t\t<a href=\"http://forrst.me/colehafner\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t<img src=\"/images/icon_forrst_bw.gif\" />\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</td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"padder_10_right\">\n\t\t\t\t\t\t\t\t<a href=\"http://www.linkedin.com/in/colehafner\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t<img src=\"/images/icon_linkedIn_bw.gif\" />\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</td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"padder_10_right\">\n\t\t\t\t\t\t\t\t<a href=\"http://twitter.com/#!/colehafner\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t<img src=\"/images/icon_twitter_bw.gif\" />\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</td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"padder_10_right\">\n\t\t\t\t\t\t\t\t&copy;&nbsp;2011 Cole Hafner\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style=\"position:relative;float:right;\">\n\t\t\t\t<table>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td align=\"right\">\n\t\t\t\t\t\t\t<div class=\"padder_10_right\">\n\t\t\t\t\t\t\t\tShortcuts:\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"padder_10_right\">\n\t\t\t\t\t\t\t\t<div class=\"footer_shortcut bg_dark padder_3_top padder_5_right padder_3_bottom padder_5_left color_white center\">\n\t\t\t\t\t\t\t\t\t&uarr;\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</td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"padder_10_right\">\n\t\t\t\t\t\t\t\t<div class=\"footer_shortcut bg_dark padder_3_top padder_5_right padder_3_bottom padder_5_left color_white center\">\n\t\t\t\t\t\t\t\t\t&rarr;\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</td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"padder_10_right\">\n\t\t\t\t\t\t\t\t<div class=\"footer_shortcut bg_dark padder_3_top padder_5_right padder_3_bottom padder_5_left color_white center\">\n\t\t\t\t\t\t\t\t\t&darr;\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</td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"padder_10_right\">\n\t\t\t\t\t\t\t\t<div class=\"footer_shortcut bg_dark padder_3_top padder_5_right padder_3_bottom padder_5_left color_white center\">\n\t\t\t\t\t\t\t\t\t&larr;\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</td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<div class=\"padder_10_right\">\n\t\t\t\t\t\t\t\t<div class=\"footer_shortcut bg_dark padder_3_top padder_5_right padder_3_bottom padder_5_left color_white center\">\n\t\t\t\t\t\t\t\t\tShift\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</td>\n\t\t\t\t\t\t\n\t\t\t\t\t</tr>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"clear\"></div>\n\t\t\t';\n\t\t}\n\t\t\n\t\t\n\t\t$return = '\n\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!--/content section-->\n\t\t\t\n\t\t\t<!--footer section-->\n\t\t\t<div class=\"footer_section bg_tan\">\n\t\t\t\t<div class=\"container_12\">\n\t\t\t\t\t<div class=\"grid_12\">\n\t\t\t\t\t\t' . $footer_content . '\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!--/footer section-->\n\t\t\t\n\t\t</div>\n\t\t<!--page wrapper-->\n\t\t\n\t\t<iframe class=\"input text_input\" style=\"height:200px;width:600px;margin:20px auto 20px auto;display:none;\" id=\"hidden_frame\" name=\"hidden_frame\" ></iframe>\n\t\t';\n\t\t\n\t\treturn $return;\n\t\t\n\t}", "function bethel_do_footer_bottom() {\n\tgenesis_widget_area ('footer-bottom', array ('before' => '<div id=\"bethel-header-right-bottom\">', 'after' => '</div>'));\n}", "protected function makeFooter()\n {\n }", "function cera_grimlock_footer_callback() {\n\t\t?>\n\t\t<div class=\"region__row\">\n\t\t\t<?php\n\t\t\t$sidebar_active = false;\n\t\t\tfor ( $i = 1; $i <= 4; $i++ ) :\n\t\t\t\tif ( is_active_sidebar( \"footer-{$i}\" ) ) :\n\t\t\t\t\t$sidebar_active = true; ?>\n\t\t\t\t\t<div class=\"<?php echo esc_attr( \"region__col region__col--{$i} widget-area\" ); ?>\">\n\t\t\t\t\t\t<?php dynamic_sidebar( \"footer-{$i}\" ); ?>\n\t\t\t\t\t</div><!-- .region__col -->\n\t\t\t\t\t<?php\n\t\t\t\tendif;\n\t\t\tendfor;\n\n\t\t\tif ( ! $sidebar_active ) : ?>\n\t\t\t\t<div class=\"site-info text-center w-100\" role=\"contentinfo\">\n\t\t\t\t\t<?php bloginfo( 'title' ); ?><span class=\"sep\"> | </span><?php bloginfo( 'description' ); ?>\n\t\t\t\t</div><!-- .site-info -->\n\t\t\t\t<?php\n\t\t\tendif; ?>\n\t\t</div><!-- .region__row -->\n\t\t<?php\n\t}", "function right_block()\n {\n $main = container();\n\n // $main->add(html_hr());\n $main->add($this->add_mainMenu());\n\n //Titulo\n\n //$titulo = html_p(agt('Biblioteca'));\n $titulo = html_br();\n $titulo->set_class('ptabla01');\n $main->add($titulo);\n\n $main->add($this->content_section());\n\n $main->add(html_br());\n\n /*$div_line = html_div();\n $div_line->set_tag_attribute('align', 'left');\n $div_line->add(html_img(Theme::getThemeImagePath(\"hr01.gif\"), 400, 15));\n $main->add($div_line);\n */\n $main->add(html_br());\n\n return $main;\n }", "public function drawFooter (\n\t)\t\t\t\t\t// RETURNS <void>\n\t\n\t// $contentForm->drawFooter();\n\t{\n\t\t// Show Segment-Creation Modules\n\t\tforeach($this->segments as $module => $bool)\n\t\t{\n\t\t\tswitch($module)\n\t\t\t{\n\t\t\t\tcase \"Text\":\n\t\t\t\t\t$icon = \"newspaper\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"Image\":\n\t\t\t\t\t$icon = \"image\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"Video\":\n\t\t\t\t\t$icon = \"video\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t$icon = \"circle-exclaim\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t\t\t<div class=\"newsegment-wrap\">\n\t\t\t\t<div class=\"newsegment\"><span class=\"newsegment-text\">Add<br /><span class=\"icon-' . $icon . '\" style=\"font-size:32px;\"></span><br />' . $module . ' Block</span></div>\n\t\t\t\t<input class=\"newsegment-sub\" type=\"submit\" name=\"add_module[' . $module . ']\" value=\"\" style=\"background:none;\" />\n\t\t\t</div>';\n\t\t}\n\t\t\n\t\techo '\n\t\t<hr class=\"separate-div\"/>';\n\t\t\n\t\t// Display Submission Options\n\t\techo '\n\t\t<p>';\n\t\t\n\t\t// Make official post\n\t\tif($this->contentData['status'] < Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_official\" value=\"Save and Make Official Post\" style=\"background-color:#56ccc8;\" />';\n\t\t}\n\t\t\n\t\t// Save and Publish option\n\t\tif($this->contentData['status'] < Content::STATUS_GUEST)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_publish\" value=\"Save and Publish\" style=\"background-color:#56ccc8;\" />';\n\t\t}\n\t\t\n\t\t// Official Post Option\n\t\tif($this->contentData['status'] >= Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_standard\" value=\"Live Update\" style=\"background-color:#56ccc8;\" />\n\t\t\t<input type=\"submit\" name=\"save_guest\" value=\"Set as Guest Post\" style=\"background-color:#aa2222;\" />';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Save / Update Option\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_standard\" value=\"Save and Update\" />';\n\t\t}\n\t\t\n\t\t// Display the Submit Button\n\t\techo '\n\t\t\t<input type=\"submit\" name=\"deletePost\" value=\"Delete Post\" onclick=\"return confirm(\\'Are you sure you want to delete this post?\\');\" />\n\t\t</p>';\n\t}", "function block_footer_area()\n {\n }", "protected function footer()\n {\n\n }", "public function displayContentFooter() {\n ?>\n <footer class=\"container-fluid text-center\">\n <p>IT360 Applied Database Systems Project By Harrison Bleckley, Drake Bodine, and Lani Davis</p>\n </footer>\n <?php\n }", "abstract protected function footer();", "abstract protected function footer();", "public function renderDivisionFooter(): void;", "function showHTMLFooter() {\r\n echo '<form style=\"background-color:#E6E6FA\">';\r\n\techo '<hr/>';\t\r\n\techo '<p><center><strong>Aplikacija BANKOMATI v1.3</strong></center></p>';\r\n\techo '<hr/>';\r\n\techo '</form>';\r\n\t?>\r\n\t\r\n\t<input type=\"button\" onclick=\"window.location='/bankomati_RTM1/auth/logout.php'\" class=\"logout\" value=\"Logout\"/>\r\n\t\r\n\t<?php\r\n\techo '</body>'; // završava BODY dio HTML stranice otvoren u zaglavlju\r\n\techo '</html>'; // završava ispravan HTML blok koda otvoren u zaglavlju\r\n}", "public function footer() {\n\t}", "public function tmpl_in_footer() {\n\t\t\t?>\n\t\t\t<script type=\"text/html\" id=\"tmpl-list-voters\">\n\t\t\t\t<div class=\"voter-item\">\n\t\t\t\t\t<div class=\"wce-voter-name\">{{ data.voter_name }}</div>\n\t\t\t\t\t<div class=\"wce-vote-type\">\n\t\t\t\t\t<# if ( 'up' === data.vote_type ) { #>\n\t\t\t\t\t\t<i class=\"fa fa-thumbs-up wce-voter-up\" aria-hidden=\"true\"></i>\n\t\t\t\t\t<# } else { #>\n\t\t\t\t\t\t<i class=\"fa fa-thumbs-down wce-voter-down\" aria-hidden=\"true\"></i>\n\t\t\t\t\t<# } #>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</script>\n\t\t\t<?php\n\t\t}", "public function footer()\n\t{\n\t\t$social = array();\n\t\tif(!empty($this->cfg->facebook)){$social['facebook'] = $this->cfg->facebook;}\n\t\tif(!empty($this->cfg->instagram)){$social['instagram'] = $this->cfg->instagram;}\n\t\tif(!empty($this->cfg->youtube)){$social['youtube'] = $this->cfg->youtube;}\n\t\tif(!empty($this->cfg->twitter)){$social['twitter'] = $this->cfg->twitter;}\n\t\tif(!empty($this->cfg->tumblr)){$social['tumblr'] = $this->cfg->tumblr;}\n\t\t$links = $this->footer;\n\t\treturn view('footer')->with(compact('social','links'))->render();\n\t}", "function sloodle_print_footer()\r\n {\r\n global $CFG;\r\n echo \"<p style=\\\"text-align:center; margin-top:32px; font-size:90%;\\\"><a href=\\\"{$CFG->wwwroot}/course/view.php?id={$this->course->id}\\\">&lt;&lt;&lt; \".get_string('backtocoursepage','sloodle').\"</a></h2>\";\r\n sloodle_print_footer($this->course);\r\n }", "function display_footer()\r\n {\r\n if ($this->has_menu())\r\n {\r\n echo '<div class=\"clear\">&nbsp;</div>';\r\n echo '</div>';\r\n }\r\n\r\n echo '<div class=\"clear\">&nbsp;</div>';\r\n Display :: footer();\r\n }", "public function template_footer() {\n\t\tget_footer( 'course' );\n\t}", "public function footer()\n {\n }", "public function drawFooter() {\n\t\t\t// Is there scope for using Smarty or similar here?\n\t\t\t$html = '';\n\t\t\treturn $html;\n\t\t}", "public function footerAction() {$this->_helper->viewRenderer->setResponseSegment('footer');}", "public function Footer() {\n $this->SetY(-15);\n // Select helvetica italic 8\n $this->SetFont('helvetica', '', 10);\n // Print current and total page numbers\n\n //$this->Cell(0,10,'Page '.$this->pageNo().'/{nb}',0,0,'C');\n\n $this->Cell(0, 4, 'This document shall be deemed uncontrolled unless labelled \"CONTROLLED\"', 0, 0, 'C');\n $this->ln();\n\n $this->Cell($this->w - ($this->w * 0.51), 4, 'User should verify latest', 0, 0, 'R');\n $this->SetFont('helvetica', 'B', 10);\n $this->Cell(0, 4, ' revision.', 0, 0, 'L');\n $this->ln();\n\n $this->SetFont('helvetica', 'I', 7);\n\n $pageNo = 'Page '.$this->getAliasNumPage().' of '.$this->getAliasNbPages();\n $this->Cell(0, 3, $pageNo, 0, 0, 'R');\n }", "public static function footer()\n {\n $version ='<strong style=\"color: green;\">'.EcrHtml::getVersionFromCHANGELOG('com_easycreator').'</strong>';\n ?>\n<div class=\"ecrFooter\">\n<span class=\"img icon-16-easycreator\">EasyCreator</span> <?php echo $version; ?> runs best on\n<a href=\"http://www.mozilla-europe.org/firefox/\" title=\"FireFox\" class=\"external\">\n<span class=\"img icon-16-firefox\">Firefox</span></a>\nand <a href=\"http://opensuse.org\" title=\"openSUSE\" class=\"external\">\n<span class=\"img icon-16-opensuse\">openSUSE</span></a> <br />\nMade and partially Copyright &copy; 2008 - 2012 by <a\nhref=\"https://github.com/elkuku\"\n class=\"external\">El KuKu</a><br />\n<small> <em style=\"color: silver;\"><span class=\"img icon-16-joomla\"></span>\nEasyCreator is not affiliated with or endorsed by the <a\n href=\"http://joomla.org\" class=\"external\">Joomla! Project</a>. It is\nnot supported or warranted by the <a href=\"http://joomla.org\"\n class=\"external\">Joomla! Project</a> or <a\n href=\"http://opensourcematters.org/\" class=\"external\">Open Source\nMatters</a>.<br />\n <a\n href=\"http://www.joomla.org/about-joomla/the-project/conditional-use-logos.html\"\n class=\"external\">The Joomla! logo</a> is used under a limited license\ngranted by <a href=\"http://opensourcematters.org/\" class=\"external\">Open\nSource Matters</a> the trademark holder in the United States and other\ncountries.</em></small>\n</div>\n <?php\n\n if(defined('ECR_DEBUG') && ECR_DEBUG )\n {\n EcrDebugger::printSysVars('get');\n EcrDebugger::printSysVars('post');\n }\n\n echo NL.'<!-- EasyCreator END -->'.NL;\n }", "function footer() {\n\t?>\n\t\t\t\t<div class=\"headfoot\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\t&quot;Remember The Cow is nice, but it's a total copy of another site.&quot; - PCWorld<br />\n\t\t\t\t\t\tAll pages and content &copy; Copyright CowPie Inc.\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<div id=\"w3c\">\n\t\t\t\t\t\t<a href=\"https://webster.cs.washington.edu/validate-html.php\">\n\t\t\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/w3c-html.png\" alt=\"Valid HTML\" /></a>\n\t\t\t\t\t\t<a href=\"https://webster.cs.washington.edu/validate-css.php\">\n\t\t\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/w3c-css.png\" alt=\"Valid CSS\" /></a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</body>\n\t\t</html>\n\t<?php\n\t}", "public function footer()\n {\n $footer = \"\\t</body>\\n</html>\";\n echo $footer;\n }", "function setFooter(){\n $this->footer.= <<<EOD\n</div>\n</div>\n</body>\n</html>\nEOD;\n }", "function sloodle_print_footer()\n {\n sloodle_print_footer($this->course);\n }", "public function common_metabox_footer() {\r\n\t\t$this->view( 'meta-box-footer', array(), 'common' );\r\n\t}", "private function displayFooter(){\n\t\t\t$html = '</div>'.\"\\n\"; //closing main container div\n\t\t\t$html .= '<div id=\"footer\">'.\"\\n\";\n\t\t\t$html .= '<div class=\"wrapper\">'.\"\\n\";\n\t\t\t$html .= '<div class=\"left\">'.\"\\n\";\n\t\t\t$html .= '<h3> Links </h3>'.\"\\n\";\n\t\t\t$html .= '<ul>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php\">Home</a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php?p=10\">About</a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php?p=9\">Articles</a></li>'.\"\\n\";\t\t\t\t\t\n\t\t\t$html .= '<li><a href=\"feed/\">Rss</a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php?p=14\" accesskey=\"4\">Accessibility</a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php?p=15\" accesskey=\"5\">Sitemap</a></li>'.\"\\n\";\n\t\t\t$html .= '</ul>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\t\t\t\n\t\t\t$html .= '<div class=\"right\">'.\"\\n\";\n\t\t\t$html .= '<h3> Follow </h3>'.\"\\n\";\n\t\t\t$html .= '<ul>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"http://facebook.com\" target=\"_blank\">Facebook</a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"http://twitter.com\" target=\"_blank\">Twitter</a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"feed/\">Rss</a></li>'.\"\\n\";\n\t\t\t$html .= '</ul>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '<p class=\"copyright\">Copyright &copy; '.COPY_RIGHT. ' '. Date('Y').'</p>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '</body>'.\"\\n\";\n\t\t\t$html .= '</html>'.\"\\n\";\n\t\t\treturn $html;\n\t\t}", "function showFooter() \n {\n // AUSGABE\n echo \"<div class='newFahrt'><div class='footer'>\";\n echo \"<p>EventPlanner by Steven Schödel (c) Version 05.072019 | \";\n echo \"<a href='/flatnet2/informationen/impressum.php'>Impressum</a> | \";\n echo \"<a href='/index.php'>Login</a>\";\n echo \"</p>\";\n echo \"</div></div>\";\n }", "protected function footer()\n {\n require SCRIPT_BASE . \"build/rox/templates/footer.php\";\n }", "function displayFooter()\n\t{\n\t\t// footer (not really)\n\t\tif ($this->cmd != \"logout\")\n\t\t{\n\t\t\tif ($this->setup->ini_ilias_exists and $this->display_mode == \"setup\" and $this->setup->getClient()->getId() != \"\")\n\t\t\t{\n\t\t\t\t$this->tpl->setVariable(\"TXT_ACCESS_MODE\",\"(\".$this->lng->txt(\"client_id\").\": \".$this->setup->getClient()->getId().\")\");\n\t\t\t}\n\t\t\telseif ($this->setup->isAdmin())\n\t\t\t{\n\t\t\t\t$this->tpl->setVariable(\"TXT_ACCESS_MODE\",\"(\".$this->lng->txt(\"root_access\").\")\");\n\t\t\t}\n\n\t\t\t$this->displayNavButtons();\n\t\t}\n\n\t\t$this->tpl->show();\n\t}", "function asu_brand_get_block_footer() {\n $settings = asu_brand_get_block_settings();\n $cache_id = 'asu_brand:footer';\n return asu_brand_get_cached_content($cache_id, $settings->footer_path);\n}", "function common_footer($button = \"Submit Changes\")\r\n\t{\r\n\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->html .= $SKIN->end_form($button);\r\n\r\n\t\t$ADMIN->html .= $SKIN->end_table();\r\n\r\n\t\t$ADMIN->output();\r\n\r\n\t}", "public function Footer()\n {\n $this->SetFont('Arial', 'I', 8);\n $this->SetY(-15);\n $this->Write(4, 'Dokumen ini dicetak secara otomatis menggunakan sistem terkomputerisasi');\n\n $time = \"Dicetak pada tanggal \" . date('d-m-Y H:i:s') . \" WIB\";\n\n $this->SetX(-150);\n $this->Cell(0, 4, $time, 0, 0, 'R');\n }", "public static function renderFooter()\n {\n include DIR_INCLUDES . 'footer.php';\n }", "function print_footer(){\n\t\techo '</div></div><div class=\"clear\"></div><div id=\"hana-footer\"><input type=\"hidden\" name=\"action\" value=\"save\" />\n\t\t\t <input type=\"submit\" value=\"Save Changes\" class=\"save-button\" />\n\t\t\t </div>\t\n\t\t\t</form></div>';\n\t}", "function footer() {\n\t\trequire ('views/partial/footer.php');\n\t}", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Select Arial italic B\n\t\t$this->setfont('Arial','I',14);\n\t\t$this->cell(250,8,\"Proyecto Final, copyright &copy; 2019\",0,0,'c');\n\t\t// Print centered page numbre\n\t\t$this->Cell(0,10,'Pag.'.$this->PageNo(),0,0,'c');\n\t}", "private function getFooter() {\n\t\t$this->data['oxfooter']\t= \"\\n\"\n\t\t. '<!-- Module ' . ucfirst( $this->_name )\n\t\t.' v.'. $this->_version . ' by http://osworx.net (c) '\n\t\t. date('Y')\n\t\t. ' -->' . \"\\n\";\n\t}", "public function hookFooter(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'.tpl');\n }", "function adminFooter()\n {\n return \"\";\n }", "public function form_footer_progress_block_html() {\n\n\t\t$progress_style = ! empty( $this->form_data['settings']['conversational_forms_progress_bar'] ) ? $this->form_data['settings']['conversational_forms_progress_bar'] : '';\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress\">\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-status\">\n\t\t\t\t<?php\n\t\t\t\tif ( 'proportion' === $progress_style ) {\n\t\t\t\t\t$this->form_footer_progress_status_proportion_html();\n\t\t\t\t} else {\n\t\t\t\t\t$this->form_footer_progress_status_percentage_html();\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-bar\">\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-progress-completed\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "public function getFooter();", "public function getFooter();", "public function renderFooter()\r\n {\r\n $footer = parent::renderFooter();\r\n if (empty($footer) && (isset($this->cancelButton) || isset($this->submitButton))) {\r\n if ($this->cancelButton)\r\n $footer.= Button::widget($this->cancelButton);\r\n if ($this->submitButton)\r\n $footer.= Button::widget($this->submitButton);\r\n\r\n Html::addCssClass($this->footerOptions, 'modal-footer');\r\n $footer = Html::tag('div', \"\\n\" .$footer . \"\\n\", $this->footerOptions);\r\n }\r\n return $footer;\r\n }", "function Footer()\n\t\t{\n\t\t}", "function Footer() {\r\n // footer line\r\n $this->SetFooterFont();\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, $this->PageBreakTrigger + 2, 190, 0.2, \"F\");\r\n $this->Rect(10, $this->PageBreakTrigger + 2.5, 190, 0.2, \"F\");\r\n $this->SetY($this->PageBreakTrigger + 5);\r\n\r\n $this->Cell(0, 0, \"Used by permission, CCLI #2752477\", 0, 1, \"L\");\r\n $this->Cell(0, 0, \"The Ridge Community Church\", 0, 1, \"R\");\r\n }", "public function setFooter() {\n\n // set the footer html.\n echo '<div class=\"footer\">\n \n </div>\n </div>\n </body>\n</html>' . PHP_EOL;\n }", "function getContentFooter() {\n return '';\n }", "function showHTMLFooter2() {\r\n echo '<form style=\"background-color:#E6E6FA\">';\r\n\techo '<hr/>';\t\r\n\techo '<p><center><strong>Aplikacija BANKOMATI v1.3</strong></center></p>';\r\n\techo '<hr/>';\r\n\techo '</form>';\r\n\t?>\r\n\t\r\n\t<input type=\"button\" onclick=\"window.location='../index.php'\" class=\"logout\" value=\"Login\"/>\r\n\t\r\n\t<?php\r\n\techo '</body>'; // završava BODY dio HTML stranice otvoren u zaglavlju\r\n\techo '</html>'; // završava ispravan HTML blok koda otvoren u zaglavlju\r\n}", "public function Footer()\n {\n // Go to 10 cm from bottom\n $this->SetY(-10);\n // Set font to Open Sans\n $this->SetFont('opensans', 'I', 6);\n // Print centered page number with datetime and timezone\n $this->AliasNbPages('{totalPages}');\n // The timezone of the user is retrieved from their Auth0 user's profile if available, otherwise the server time zone is used\n // related to this trello card https://trello.com/c/OjWZzsGA\n $timezone = ($_SESSION['auth0_user']['https://www.boxtribute.com/timezone']) ? $_SESSION['auth0_user']['https://www.boxtribute.com/timezone'] : date_default_timezone_get();\n\n $dt = new DateTime('now', new DateTimeZone($timezone));\n // This is quick fix for an issue with the alignment of footer text as the library incorrectly calculates the text length when template variables {totalPages} are used\n $totalPages = ($_GET['count'] && 0 != $_GET['count']) ? round(intval($_GET['count']) / 2) : 1;\n $this->Cell(0, 10, 'Page '.$this->PageNo().' of '.$totalPages.' Printed on '.$dt->format('d-m-Y H:i:s').\" {$timezone}\", 0, 0, 'C');\n }", "function display_portal_footer()\r\n {\r\n Display :: footer();\r\n }", "function printFooter()\n\t{\n\t\tinclude 'View/Footer.html';\n\t}", "function tr_custom_admin_footer() {\n\t_e('<span id=\"footer-thankyou\">Developed by <a href=\"http://third-law.com\" target=\"_blank\">Kenny Scott (Third Law Web Design)</a></span>. Built using Tabula Rasa.', 'tabula_rasa');\n}", "public function footerAction()\n {\n $infos = array();\n return $this->render('SMFrontBundle:Default:footer.html.twig', array(\n 'infos' => $infos\n ));\n }", "public static function footer()\n {\n require_once(getcwd() . \"/views/Template/footer.php\");\n }", "public function Footer(){\n $this->SetY(-15);\n $this->SetFont('Arial','I',6);\n $this->Cell(0,5,'\"ESTA FACTURA CONTRIBUYE AL DESARROLLO DEL PAIS, EL USO ILICITO DE ESTA SERA SANCIONADO DE ACUERDO A LEY\"',0,0,'C');\n $this->Ln(5);\n $this->Cell(0,5,'Ley No 453: Tienes derecho a un trato equitativo sin discriminacion en la oferta de servicios.',0,0,'C');\n }", "public function admin_footer() {\r\n // JS skeleton for adding a slide\r\n if(get_post_type()=='cycloneslider'){\r\n // Empty Slide\r\n $vars = array();\r\n $vars['box_title'] = __('Slide *', 'cyclone-slider-2');\r\n $vars['image_url'] = '';\r\n $vars['i'] = '{id}';\r\n $vars['slide'] = $this->data->get_slide_defaults();\r\n foreach($vars['slide'] as $key=>$value){\r\n $vars['slide'][$key] = '';\r\n }\r\n $vars['slide']['type'] = 'image';\r\n $vars['effects'] = $this->data->get_slide_effects();\r\n $vars['debug'] = ($this->debug) ? cyclone_slider_debug($vars['slide']) : '';\r\n \r\n $empty_slide = $this->view->get_render('slide-edit.php', $vars);\r\n \r\n // Main skeleton container\r\n $vars = array();\r\n $vars['empty_slide'] = $empty_slide;\r\n \r\n $this->view->render('slides-skeleton.php', $vars);\r\n }\r\n }", "public function blockEnd() {\n $this->outputEditmode('</div>');\n }", "function Footer()\n {\n date_default_timezone_set('UTC+1');\n //Date\n $tDate = date('F j, Y, g:i:s a');\n // Position at 1.5 cm from bottom\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 12);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10,utf8_decode('Page ' . $this->PageNo().' \n CHUYC \n '.$tDate.'\n +237 693 553 454\n '.$this->Image(SITELOGO, 189, 280, 10, 10,'', URLROOT)), 0, 0, 'L');\n }", "public function input_admin_footer() {\n\t\t$this->display_svg();\n\t}", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','b',8);\n\t\t\n\t\t$this->Cell(30,1,\"----------------------------------------\",0,0,'C');\n\t\t$this->Cell(210,1,'',0,0);\n\t\t// $this->Cell(30,1,\"----------------------------------------\",0,0,'C');\n\t\t// $this->Cell(50,1,'',0,0);\n\t\t$this->Cell(30,1,\"----------------------------------------\",0,1,'C');\n\t\t\n\t\t$this->Cell(30,4,\"Prepared/Class Teacher\",0,0,'C');\n\t\t// $this->Cell(50,4,'',0,0);\n\t\t// $this->Cell(30,4,\"Controlar of Examination\",0,0,'C');\n\t\t$this->Cell(210,4,'',0,0);\n\t\t$this->Cell(30,4,\"Principal/VP\",0,1,'C');\n\t\t\n\t\t$this->Cell(50,4,date(\"d-m-y h:i:s A\"),0,0,'L');\n\t\t// Page number\n\t\t//$this->Cell(140,4,''.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "function printFooter($args_raw = array()) {\n\t\tglobal $Config;\n\t\t\n\t\t$args = array_map('print_html', $args_raw);\n?>\n\n</div>\n</div>\n\n<div id=\"footer\">\n\t<a href=\"<?php echo $Config['URLPath'] ?>/legal.php\">View legal disclaimer</a><br />\n\t&copy; 2006 Jain Foundation Inc. All Rights Reserved\n</div>\n\n</div>\n</body>\n</html>\n<?php\n\t}", "protected function generatePageFooter() \r\n {\r\n echo <<<HTML\r\n </article>\r\n <script src=\"CityWok.js\"> </script>\r\n </body>\r\n</html>\r\nHTML;\r\n }", "function Footer()\n {\n $this->SetY(-100);\n\n for ( $i=0; $i<1; $i++ ) {\n $this->SetFont( 'Arial', 'B', 8 );\n $this->Cell( 80, 5, \"ACCOUNT MANAGER'S SIGNATURE\", 1, 0, 'C', false );\n }\n\n $this->SetY(-100);\n\n for ( $i=0; $i<1; $i++ ) {\n $this->SetX(110);\n $this->SetFont( 'Arial', 'B', 8 );\n $this->Cell( 80, 5, \"EMPLOYEE'S SIGNATURE\", 1, 0, 'C', false );\n }\n\n $this->SetY(-15);\n $this->SetFont( 'Arial', 'I', 8 );\n $this->Cell( 40, 0, \"Date Printed: \".$_SESSION[\"DATE_PRINTED\"], 0, 0, 'C', false );\n\n }", "public function RenderFormEnd() {\n\n return '</form>';\n }", "function Footer()\n {\n $this->SetY(-15);\n //Select Arial Italic 8\n $this->SetFont('Arial','I',8);\n $this->SetX(86,5);\n $this->Write(5, '[ powered by '.$this->web_str.']',$this->web_str);\n //Print centered page number\n $this->Cell(0,10,$this->page_str.' '.$this->PageNo(),0,0);\n }", "function Footer()\n\t{\n\t\t$this->SetY(-13);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Page number\n\t\t$this->Cell(0,10,'Designed by winnie(+254701008108)',0,0,'C');\n\t\t$this->SetY(-18);\n\t\t$this->Cell(0,10,'www.veranevents.com',0,0,'C');\n\t}", "function Footer()\n\t\t{\n\t\t\t$this->SetY(-15);\n\t\t\t// Select Arial italic 8\n\t\t}", "function Footer()\n {\n $this->SetY(-15);\n // Police Arial italique 8\n $this->SetFont('Arial','I',6);\n // Num?ro de page\n $this->Cell(0,8,'Page '.$this->PageNo().'/{nb}',0,0,'C');$this->Ln(3);\n $this->Cell(0,8,\"Algerian Gulf Life Insurance Company, SPA au capital social de 1.000.000.000 de dinars algériens, 01 Rue Tripoli, Hussein Dey Alger, \",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"RC : 16/00-1009727 B 15 NIF : 001516100972762-NIS :0015160900296000\",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"Tel : +213 (0) 21 77 30 12/14/15 Fax : +213 (0) 21 77 29 56 Site Web : www.aglic.dz \",0,0,'C');\n }", "function FooterRR()\n {\n //Posición: a 2 cm del final\n $this->Ln();\n $this->SetY(-12);\n $this->SetFont('Arial','B',6);\n //Número de página\n $this->Cell(190,4,'Sistema de Control de Ventas y Facturacion \"BOUTIQUE DE ZAPATERIA\"','T',0,'L');\n $this->AliasNbPages();\n $this->Cell(0,4,'Pagina '.$this->PageNo(),'T',1,'R');\n }", "function wizardFooter() {\n global $LANG;\n $strOutput = '\n\t\t\t</table>\n\t\t\t<div id=\"c-saveButtonPanel\">\n <input type=\"image\" class=\"c-inputButton\" name=\"'.$this->strExtKey.'[savedok]\"'.IconUtility::skinImg($this->objDoc->backPath,'gfx/savedok.gif').BackendUtility::titleAltAttrib($LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveDoc')).'\" />\n <input type=\"image\" class=\"c-inputButton\" name=\"'.$this->strExtKey.'[saveandclosedok]\"'.IconUtility::skinImg($this->objDoc->backPath,'gfx/saveandclosedok.gif').BackendUtility::titleAltAttrib($LANG->sL('LLL:EXT:lang/locallang_core.php:rm.saveCloseDoc')).'\" />\n <a href=\"#\" onclick=\"'.htmlspecialchars('jumpToUrl(unescape(\\''.rawurlencode($this->arrWizardParameters['returnUrl']).'\\')); return false;').'\"><img class=\"c-inputButton\"'.IconUtility::skinImg($this->objDoc->backPath,'gfx/closedok.gif').BackendUtility::titleAltAttrib($LANG->sL('LLL:EXT:lang/locallang_core.php:rm.closeDoc')).'\" /></a>\n <input type=\"image\" class=\"c-inputButton\" name=\"_refresh\"'.IconUtility::skinImg($this->objDoc->backPath,'gfx/refresh_n.gif').BackendUtility::titleAltAttrib($LANG->getLL('forms_refresh',1)).'\" />\n\t\t\t</div>';\n return $strOutput;\n }", "function footer() \n{\n\techo <<<END\n\t<div class=\"footer\">\n\tDeveloped by Jason Soo and Jordan Wilberding under the direction of Drs. Gideon Frieder and Ophir Frieder. <br>\n\tCourtesy of the IIT IR Laboratory. E-Mail problems to <a class=\"footer\" href=\"mailto:ushmm@ir.iit.edu\">ushmm@ir.iit.edu</a>\n\t</div>\nEND;\n}", "public function do_footer_items()\n {\n }", "public function do_footer_items()\n {\n }", "private function printFooter()\n {\n // Nothing to do at the moment\n }", "public function getFooterHTML()\n\t{\n\t\tif(!is_array($this->elements['footer'])){\n\t\t\t// Footers are optional\n\t\t\treturn false;\n\t\t}\n\n\t\t# Add the required Bootstrap footer class very first\n\t\t$this->elements['footer']['class'] = str::getAttrArray($this->elements['footer']['class'], \"modal-footer\", $this->elements['footer']['only_class']);\n\n\t\t# Styles\n\t\t$this->elements['footer']['style'] = str::getAttrArray($this->elements['footer']['style'], NULL, $this->elements['footer']['only_style']);\n\n\t\t# Dropdown buttons\n\t\tif($this->elements['footer']['buttons']){\n\t\t\t$buttons = Button::get($this->elements['footer']);\n\t\t}\n\n\t\t# Button(s) in a row\n\t\t$button = Button::generate($this->elements['footer']['button']);\n\n\t\tif($button){\n\t\t\t$button = \"<div class=\\\"btn-float-right\\\">{$button}</div>\";\n\t\t}\n\n\t\t# Icon\n\t\t$icon = Icon::generate($this->elements['footer']['icon']);\n\n\t\t# Badge\n\t\t$badge = Badge::generate($this->elements['footer']['badge']);\n\n\t\t# ID\n\t\t$id = str::getAttrTag(\"id\", $this->elements['footer']['id']);\n\n\t\t# Style\n\t\t$style = str::getAttrTag(\"style\", $this->elements['footer']['style']);\n\n\t\t# Text colour\n\t\t$class[] = str::getColour($this->elements['footer']['colour']);\n\n\t\t# Draggable\n\t\t$class[] = $this->draggable ? \"modal-footer-draggable\" : false;\n\n\t\t# Script\n\t\t$script = str::getScriptTag($this->elements['footer']['script']);\n\n\t\t# The div class\n\t\t$class = str::getAttrTag(\"class\", $this->elements['footer']['class']);\n\n\t\t# Only include left side if it has values (or a custom ID)\n\t\tif(($left = $icon . $this->elements['footer']['html'] . $badge) || $id){\n\t\t\t$left = \"<div class=\\\"col-auto\\\">{$left}</div>\";\n\t\t}\n\n\t\t# Only include right side if it has values (buttons)\n\t\tif($right = $buttons . $button){\n\t\t\t$right = \"<div class=\\\"col\\\">{$right}</div>\";\n\t\t}\n\n\t\treturn <<<EOF\n<div{$id}{$class}{$style}>\n\t<div class=\"container\">\n \t\t<div class=\"row\">\n \t\t{$left}\n \t\t{$right} \t\t\n \t</div>\n\t</div>{$script}\n</div>\nEOF;\n\n\t}", "function footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print current and total page numbers\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "public function Footer() {\n\t\t$this->SetY(-15);\n\t\t// Set font\n\t\t$this->SetFont('helvetica', 'I', 8);\n\t\t// Page number\n\t\t$this->Cell(0, 10, 'Pagina '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n\t}", "function Footer() {\n $this->SetY(-15);\n //Pilih font Arial italic 8\n $this->SetFont('Helvetica', 'I', 8);\n //Tampilkan nomor halaman rata tengah\n $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t//buat garis horizontal\n\t\t$this->Line(10,$this->GetY(),210,$this->GetY());\n\t\t//Arial italic 9\n\t\t$this->SetFont('Arial','I',9);\n $this->Cell(0,10,'copyright gubugkoding.com Semarang ' . date('Y'),0,0,'L');\n\t\t//nomor halaman\n\t\t$this->Cell(0,10,'Halaman '.$this->PageNo().' dari {nb}',0,0,'R');\n\t}", "public function printFooterContent() {\n\t\techo '<ul>';\n\t\tif (! $this->isActive ( PageState::Selection ))\n\t\t\techo '<li class=\"', $class, '\"><a href=\"?q=select\">Auswahl</a></li>';\n\t\tif (! $this->isActive ( PageState::Statistics ))\n\t\t\techo '<li class=\"', $class, '\"><a href=\"?q=stats\">Statistik</a></li>';\n\t\tif (! $this->isActive ( PageState::Setup ))\n\t\t\techo '<li class=\"', $class, '\"><a href=\"?q=setup\">Setup</a></li>';\n\t\techo '</ul>';\n\t}", "public function Footer()\n {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print centered page number\n $this->Cell(0, 4, utf8_decode('Atenea - Página ' . $this->PageNo()), 0, 0, 'C');\n }", "function Footer()\n {\n $this->SetY(-11);\n $this->Cell(45);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(6,10,'',0,0,'C');\n $this->Cell(96,10,'Nombre y Firma','T',0,'C');\n $this->Cell(0,10,utf8_decode('Página ').$this->PageNo(),0,0,'R');\n\n }", "public function Footer()\n {\n $this->SetFont('times','B',9);\n $this->Text(5,260,'RADIOLOGISTS:');\n $this->SetFont('times','B',8);\n $this->Text(5,265,'V. VILLERO,MD,FPCR/ R. REDONA, JR. MD,FPCR/ J. ABIERAS,MD,FPCR,FUSP,FCT-MRISP/ F. ESTANISLAO,MD,FPCR,FUSP');\n $this->Text(5,270,'J. ESTORNINOS,MD,FPCR,FCT-MRISP/ I. VALERIANO,MD,FPCR,FUSP,FCT-MRI/ P. SYDIONGCO,MD,FPCR,FCT-MRISP/ E. GASCO,MD,FPCR,FUSP');\n $this->Text(5,275,'M.UY,MD,MHA/ H.MAISO,MD/ P.BUATIS,MD/ J.K FLORES,MD/ P.MORALES,MD/ L. ESTANISLAO,MD/ J.LOMBRIO,MD/ A.BONGA,MD');\n\n $this->SetFont('times','i',8);\n $this->Text(5,279,'DISCLAIMER: This findings are based on radiologic studies. It must be correlated with clinical, laboratory and other ancillary');\n $this->Text(5,282,'procedures for comprehensive assessment of the patients condition. Thus, radiology reports are best explained by the attending');\n $this->Text(5,285,'physician to the patient.');\n }", "public function executeFooterPanel()\n {\n }", "public function closeTag()\n {\n return '</form> </div></div>';\n }", "function footer() {\n\t\t?>\n\t\t<div data-role=\"footer\" data-position=\"fixed\" style=\"bottom: 0px;\">\n\t\t\t<p align=\"center\">by Matti Maier Internet Solutions</p>\n\t\t</div>\n\t\t<?php\n\t}", "function Footer()\n {\n $this->SetY(-15);\n\n // Police Arial italique 8\n $this->SetFont('Arial','I',6);\n // Num?ro de page\n $this->Cell(0,8,'Page '.$this->PageNo().'/{nb}',0,0,'C');$this->Ln(3);\n $this->Cell(0,8,\"Algerian Gulf Life Insurance Company, SPA au capital social de 1.000.000.000 de dinars algériens, 01 Rue Tripoli, Hussein Dey Alger, \",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"RC : 16/00-1009727 B 15 NIF : 001516100972762-NIS :0015160900296000\",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"Tel : +213 (0) 21 77 30 12/14/15 Fax : +213 (0) 21 77 29 56 Site Web : www.aglic.dz \",0,0,'C');\n }", "protected function setFooter() {\n $footer = \"<div class='footer'>\n <center>\n <a href='https://www.linkedin.com/in/ali-mohtasham-a75a2886' >Designed by <strong> Ali Mohtasham Gilani </strong> All rights reserved.</a>\n </center>\n </div>\n \";\n return $footer;\n }", "protected function generatePageFooter() \n {\n\t\t\n\t\techo \"</body>\\n\";\n\t\techo \"</html>\\n\";\n // to do: output common end of HTML code\n }" ]
[ "0.72590137", "0.72004306", "0.71591735", "0.7153413", "0.7144844", "0.713287", "0.69410795", "0.6900714", "0.6900155", "0.68820226", "0.68706673", "0.6860394", "0.6854255", "0.6848651", "0.68236005", "0.67920023", "0.6783457", "0.6783457", "0.67823744", "0.67698145", "0.67518324", "0.6738429", "0.6732011", "0.6727505", "0.6726829", "0.6721839", "0.6708855", "0.67002463", "0.66869783", "0.66860443", "0.6668563", "0.6663846", "0.66453975", "0.6639435", "0.6633787", "0.6621655", "0.6618565", "0.65966654", "0.6594376", "0.65889794", "0.65864015", "0.6583045", "0.65810937", "0.657187", "0.6564398", "0.65586674", "0.655486", "0.6549706", "0.65496016", "0.65370464", "0.65339816", "0.6526374", "0.6526374", "0.6520859", "0.65185696", "0.6512789", "0.6506", "0.6500683", "0.6479743", "0.64608866", "0.6439004", "0.6423944", "0.64199615", "0.6417105", "0.6415009", "0.64131314", "0.6411011", "0.6409627", "0.64045596", "0.6389287", "0.6389007", "0.63846225", "0.637701", "0.6374637", "0.63715833", "0.6368663", "0.6365357", "0.6363816", "0.6362736", "0.6356171", "0.6346739", "0.6342154", "0.63335013", "0.63335013", "0.6317668", "0.6314934", "0.63139534", "0.6313715", "0.6300457", "0.6299754", "0.6298422", "0.6293849", "0.6290948", "0.6290441", "0.62863487", "0.62820023", "0.6281999", "0.6270104", "0.62621444", "0.6261666" ]
0.8321495
0
Check if form was submitted successfully.
public function is_form_submit_success( $id ) { // TODO: Code needs revision. Copy-paste from class-frontend.php. $form = wpforms()->form->get( (int) $id ); if ( empty( $form ) ) { return false; } $form_id = absint( $form->ID ); $form_data = apply_filters( 'wpforms_frontend_form_data', wpforms_decode( $form->post_content ) ); $errors = empty( wpforms()->process->errors[ $form_id ] ) ? array() : wpforms()->process->errors[ $form_id ]; // Check for return hash. if ( ! empty( $_GET['wpforms_return'] ) && wpforms()->process->valid_hash && absint( wpforms()->process->form_data['id'] ) === $form_id ) { return true; } // Check for error-free completed form. if ( empty( $errors ) && ! empty( $form_data ) && ! empty( $_POST['wpforms']['id'] ) && absint( $_POST['wpforms']['id'] ) === $form_id ) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function formSubmitted() {\n return $_SERVER[\"REQUEST_METHOD\"] == 'POST';\n }", "function check_form_submitted()\n {\n $query = $this->recruitment_model->get_faculty_info($this->user_id);\n if($query->num_rows()==1)\n {\n if($query->row()->final_submission==1)\n {\n return 1;\n }\n else\n {\n return 0;\n }\n }\n return 0;\n }", "function formSubmitted()\n\t{\n\t\t// Do we have a form name? If so, if we have this form name, then this\n\t\t// particular form has been submitted.\n\t\tif ($this->formName) {\n\t\t\treturn (isset($_POST['update']) && $_POST['update'] == $this->formName);\t\n\t\t} \n\t\t// No form name, just detect our hidden field.\n\t\telse {\n\t\t\treturn (isset($_POST['update']));\n\t\t}\n\t}", "public function callbackSuccess()\n {\n $this->AddOutput(\"<p><i>Form was submitted and the callback method returned true.</i></p>\"); \n $this->redirectTo();\n }", "function check_submit_form()\n {\n }", "public function isSubmitted();", "function isSubmitted()\r\n\t\t{\r\n\t\t\tif( isset($_POST[$this->form_id.'-issubmitted'] ) )\r\n\t\t\t\treturn TRUE;\r\n\t\t\telse\r\n\t\t\t\treturn FALSE;\r\n\r\n\t\t}", "public function is_form_submit() {\n\n\t if (isset($_POST['foodbakery_restaurant_title'])) {\n\t\treturn true;\n\t }\n\t return false;\n\t}", "public function formSuccess() {\n return $this->_formSuccess;\n }", "public function isSubmitted()\n\t{\n\t\tif ($this->http_method == 'get') {\n\t\t\t// GET form is always submitted\n\t\t\treturn TRUE;\n\t\t} else if (isset($this->raw_input['__'])) {\n\t\t\t$__ = $this->raw_input['__'];\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t\tforeach ((array) $__ as $token => $x) {\n\t\t\t$t = static::validateFormToken($token, $this->id);\n\t\t\tif ($t !== FALSE) {\n\t\t\t\t// Submitted\n\t\t\t\tif ($this->form_ttl > 0 && time() - $t > $this->form_ttl) {\n\t\t\t\t\t$this->form_errors[self::E_FORM_EXPIRED] = array(\n\t\t\t\t\t\t'message' => _('The form has expired, please check entered data and submit it again.')\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "public function testFormSubmitSuccess()\n {\n $this->actingAs($this->user)\n ->visit('/employees/create')\n ->see('Create a new Employee')\n ->dontSee('Create a new Company')\n ->type('John', 'first_name')\n ->type('Test', 'last_name')\n ->select($this->company->id, 'company_id')\n ->type('email@test.com', 'email')\n ->select('BR', 'phone_country')\n ->type('11 972827384', 'phone')\n ->press('Create')\n ->seePageIs('/employees')\n ->see('\\'John Test\\' added successfully!');\n }", "function form_submitted()\n{\n return isset($_POST['Submit']);\n}", "function form_action()\r\n {\r\n $success = true ;\r\n\r\n $sdifqueue = new SDIFResultsQueue() ;\r\n $cnt = $sdifqueue->ProcessQueue() ;\r\n\r\n $c = container() ;\r\n $msgs = $sdifqueue->get_status_message() ;\r\n\r\n foreach ($msgs as $msg)\r\n $c->add(html_div(sprintf('ft-%s-msg', $msg['severity']), $msg['msg'])) ;\r\n $c->add(html_div('ft-note-msg',\r\n sprintf(\"%d record%s processed from SDIF Queue.\",\r\n $cnt, $cnt == 1 ? \"\" : \"s\"))) ;\r\n\r\n $this->set_action_message($c) ;\r\n\r\n unset($sdifqueue) ;\r\n\r\n return $success ;\r\n }", "public function submit()\n {\n $this->waitFor(20000, function () {\n return $this->present();\n });\n $this->xpath($this->selectors['submit'])->click();\n $this->waitFor(20000, function () {\n return $this->xpath($this->selectors['formSubmitted']) !== null;\n });\n }", "public function checkForm()\n\t{\n\t\t$name = $_POST['name'];\n\t\t$email = $_POST['email'];\n\t\t$pass = $_POST['pass'];\n\t\t$conf_pass = $_POST['conf_pass'];\n\t\t$result = $this -> facade -> checkRegister($name, $email, $pass,\n\t\t$conf_pass);\n\t\tif($result === true)\n\t\t{\n\t\t\t$add = $this -> facade -> addUser();\n\t\t\t$data = $this -> facade -> getArray();\n\t\t\t$this -> view -> showForm($data);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data = $this -> facade -> getArray();\n\t\t\t$this -> view -> showForm($data);\n\t\t\treturn true;\n\t\t}\n\t}", "public function submit()\n\t{\n\t\t$error = $this->validate();\n\n\t\tif (sizeof($error))\n\t\t{\n\t\t\treturn $error;\n\t\t}\n\n\t\tif (!$this->post_id)\n\t\t{\n\t\t\t$this->post();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->edit();\n\t\t}\n\n\t\treturn true;\n\t}", "public function has_submit() {\n\t\treturn false;\n\t}", "public function isSubmitted() {\n return $this->submitted;\n }", "public function is_submit()\r\n {\r\n if( $this->taintedInputs->isAutogenerated()){\r\n return false;\r\n }\r\n else{\r\n return true;\r\n }\r\n }", "public function isSubmitted() {\n return $this->submitted;\n }", "public static function is_submitting(){\n\t\treturn (strcasecmp('POST', $_SERVER['REQUEST_METHOD'] ) == 0);\n\t}", "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 }", "public function callbackSubmit()\n {\n $subject = $this->form->value(\"subject\");\n $text = $this->form->value(\"text\");\n $tags = \\preg_split('/[^\\w]+/u', $this->form->value(\"tags\"));\n\n $user = $this->di->get('user');\n\n if ($this->post->authorId != $user->id && !$user->isLevel(UserLevels::ADMIN)) {\n $this->di->get('flash')->setFlash(\"Nu är det nått skumt på gång...\", \"flash-warning\");\n return false;\n }\n\n $this->posts->upsert($this->post->id, $subject, $text, $tags);\n $this->di->get('flash')->setFlash(\"\\\"{$subject}\\\", har ändrats.\", \"flash-success\");\n\n return true;\n }", "public function callbackSubmit()\n {\n // Get values from the submitted form\n $text = $this->form->value(\"text\");\n\n if (!$this->di->get('session')->has(\"user\")) {\n $this->form->addOutput(\"Du behöver logga in\");\n return false;\n }\n\n $user = new User($this->di->get(\"db\"));\n if ($user->controlAuthority($this->di->get('session')->get(\"user\"), $this->post->user) != true) {\n $this->form->addOutput(\"Du får inte redigera denna.\");\n return false;\n }\n\n if ($text == \"\") {\n $this->form->addOutput(\"Du skrev aldrig något. Skriv gärna något.\");\n return false;\n }\n\n $this->post->text = $text;\n $this->post->save();\n $this->form->addOutput(\"Du har uppdaterat inlägget\");\n return true;\n }", "public function isSubmitted()\n {\n return $this->isSubmitted;\n }", "public function isSubmitted()\n {\n return $this->isSubmitted;\n }", "public function isRequestSuccess(): bool\n {\n return count($this->errors) === 0;\n }", "public function validateForm() {\n\n\t\t$validated_ok = $this->adapter->revalidate();\n\n\t\treturn !$validated_ok;\n\t}", "public function submit()\n\t{\n\t\tif ( ! $this->validator->validate())\n\t\t{\n\t\t\treturn array_merge(\n\t\t\t\t$this->validator->error(),\n\t\t\t\t['complete' => false]\n\t\t\t);\n\t\t}\n\n\t\treturn $this->request->isPageConfirm()\n\t\t\t? $this->submitConfirm()\n\t\t\t: $this->submitForm();\n\t}", "public function IsSubmitted() {\n\n if ($this->HttpValues === null) {\n // HTTP submision's data are not imported? import them now from Request service.\n $this->SetHttpValues();\n }\n return isset($this->HttpValues['_FormName'])\n && $this->HttpValues['_FormName'] === $this->Name;\n }", "function form_action()\r\n {\r\n $success = true ;\r\n\r\n $swimmeet = new SwimMeet() ;\r\n $swimmeet->PurgeSwimMeets() ;\r\n\r\n $this->set_action_message(html_div(sprintf('ft-%s-msg',\r\n $swimmeet->getAffectedRows() == 0 ? 'warning' : 'note'),\r\n sprintf('%d record%s purged from Swim Meets database.',\r\n $swimmeet->getAffectedRows(),\r\n $swimmeet->getAffectedRows() == 1 ? '' : 's'))) ;\r\n\r\n unset($swimmeet) ;\r\n\r\n return $success ;\r\n }", "public function testForm() {\n $this->controller->process();\n $errors = $this->controller->getPlaceholder('loginfp.errors');\n $this->assertEmpty($errors);\n $this->assertEquals(1,$this->controller->emailsSent);\n }", "function formSuccess() {\n\n // Template\n $this->r->text['back_url'] = suxFunct::getPreviousURL();\n $this->r->title .= \" | {$this->r->gtext['success']}\";\n\n $this->tpl->display('success.tpl');\n\n }", "public function isSubmitted()\n\t{\n\t\tif( $this->method == 'post' )\n\t\t{\n\t\t\treturn $this->request->getMethod() == 'post';\n\t\t}\n\n\t\t$arr = $this->request->getQueryString();\n\t\treturn ! empty( $arr );\n\t}", "public function isSubmit() {\n return Tools::isSubmit($this->key());\n }", "function successful()\n\t{\n\t\treturn $this->isSuccess();\n\t}", "protected function ValidateForm()\n {\n return true;\n }", "function form_action()\r\n {\r\n // After passing validation, all of the meet data\r\n // should be stored in the Swim Meet class instance.\r\n\r\n $swimmeet = $this->getSwimMeet() ;\r\n\r\n $success = $swimmeet->UpdateSwimMeet() ;\r\n\r\n // If successful, store the updated meet id in so it can be used later.\r\n\r\n if ($success) \r\n {\r\n $swimmeet->setSwimMeetId($success) ;\r\n $this->set_action_message(html_div('ft-note-msg', 'Swim Meet successfully updated.')) ;\r\n }\r\n else\r\n {\r\n $this->set_action_message(html_div('ft-warning-msg', 'Swim Meet was not successfully updated.')) ;\r\n }\r\n\r\n return $success ;\r\n }", "protected function postSuccessResponse()\n {\n return $this->form;\n }", "public static function trySubmit() {\n\t}", "public function callbackSubmit()\n {\n $this->user = new \\Anax\\Users\\User();\n $this->user->setDI($this->di);\n\n if (isset($_SESSION[\"user\"])) {\n unset($_SESSION[\"user\"]);\n return $this->isLogoutSuccessful();\n } else {\n $this->logoutMessage = \"Du är inte inloggad!\";\n return false;\n }\n }", "function FormPosted()\n{\n //en return true of false\n\n}", "protected function success()\n {\n if ( isset( $this->data['status'] ) && $this->data['status'] == 'SUCCESS' ) {\n return true;\n }\n return false;\n }", "function submit_form() {\n if(isset($_SESSION['submit']) && $_SESSION['submit'] == true) {\n return 'ERROR: SUBMISSION IN PROGRESS';\n }\n\n $_SESSION['submit'] = true;\n\n if(!(\n isset($_SESSION['logged_in']) &&\n $_SESSION['logged_in'] == true &&\n isset($_SESSION['username']) &&\n is_string($_SESSION['username'])\n )) {\n $_SESSION['submit'] = false;\n return 'ERROR: NOT LOGGED IN';\n }\n\n if(\n !isset($_POST['form_data']) ||\n !is_string($_POST['form_data']) ||\n !is_json($_POST['form_data'])\n ) {\n $_SESSION['submit'] = false;\n return 'ERROR: INVALID FORM DATA';\n }\n\n $form = json_decode($_POST['form_data']);\n\n if(!property_exists($form, 'owner') || $form->owner != getUserId($_SESSION['username'])) {\n $_SESSION['submit'] = false;\n return 'ERROR: INCORRECT OWNER';\n }\n\n \n\n $validation = validate_form($form);\n\n if($validation === true) {\n // Begin transaction\n $db = getDbInstance();\n $db->beginTransaction();\n\n $added = addForm($form);\n $_SESSION['submit'] = false;\n if($added !== false) {\n // Commit transaction\n $db->commit();\n \n return 'SUCCESS' . $added;\n } else {\n // Error - Rollback Transaction\n $db->rollback();\n\n return 'ERROR: ADD FORM FAILED: ' . $added;\n }\n } else {\n $_SESSION['submit'] = false;\n return $validation;\n }\n }", "public function isPostSubmit(){\n if( strtolower($this->__method) == \"post\" ){\n return true;\n }\n return false;\n }", "public function psxFormIsCompleted()\n {\n // TODO: Remove all code related to PSX form. Since it's not used any more we return true to be sure to not make any breaking changes\n return true;\n//\n// if (getenv('PLATEFORM') === 'PSREADY') { // if on ready, the user is already onboarded\n// return true;\n// }\n//\n// return !empty($this->getPsxForm());\n }", "public function isSuccessful()\n {\n return count($this->errors) === 0;\n }", "public function isSuccessful()\n {\n return isset($this->data['status']) && $this->data['status'] === 'success';\n }", "function isFormSubmitted($submitButtonParamName) {\n $requestService = RequestService::instance();\n if ($requestService->getParam($submitButtonParamName)) {\n return TRUE;\n }\n\n return FALSE;\n}", "public function formSubmit() {\n\n check_admin_referer('ncstate-wrap-authentication');\n\n $newOptions = array(\n 'autoCreateUser' => (bool)$_POST['nwa_autoCreateUser'],\n );\n\n update_option('ncstate-wrap-authentication', $newOptions);\n\n wp_safe_redirect(add_query_arg('updated', 'true', wp_get_referer()));\n }", "function isSuccess()\n\t{\n\t\treturn($this->getStatus() == 'SUCCESS');\n\t}", "function form_action()\r\n {\r\n // After passing validation, all of the meet data\r\n // should be stored in the Swim Meet class instance.\r\n\r\n $swimmeet = $this->getSwimMeet() ;\r\n\r\n $success = $swimmeet->AddSwimMeet() ;\r\n\r\n // If successful, store the added age group id in so it can be used later.\r\n\r\n if ($success) \r\n {\r\n $meet->setMeetId($success) ;\r\n $this->set_action_message(html_div('ft-note-msg', 'Swim Meet successfully added.')) ;\r\n }\r\n else\r\n {\r\n $this->set_action_message(html_div('ft-warning-msg', 'Swim Meet was not successfully added.')) ;\r\n }\r\n\r\n return $success ;\r\n }", "public static abstract function postSubmit(Form $form);", "public function isSuccess();", "public function isSuccess();", "public function isSuccess();", "public function isSuccess();", "public function isSuccessful()\n {\n return false;\n }", "public function isSuccessful()\n {\n return false;\n }", "public function isSuccessful()\n {\n return false;\n }", "function form_action()\r\n {\r\n $success = true ;\r\n\r\n $sdifqueue = new SDIFResultsQueue() ;\r\n $sdifqueue->PurgeQueue() ;\r\n\r\n $this->set_action_message(html_div('ft-note-msg',\r\n sprintf('%d record%s purged from SDIF Queue.',\r\n $sdifqueue->getAffectedRows(),\r\n $sdifqueue->getAffectedRows() == 1 ? \"\" : \"s\"))) ;\r\n\r\n unset($sdifqueue) ;\r\n\r\n return $success ;\r\n }", "public function isPosted()\n\t{\n\t\treturn (! empty($_POST['change_password']));\n\t}", "public function submit() {\r\n\t\tif (empty($this->_error)) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\t$str = '';\r\n\t\t\tforeach ($this->_error as $key => $value) {\r\n\t\t\t\t$str .= $key . ' => ' . $value . \"\\n\";\r\n\t\t\t}\r\n\t\t\tthrow new \\Exception($str);\r\n\t\t}\r\n\t}", "public function isSubmited(): bool\n {\n return (bool) $this->values();\n }", "function SaveForm($form_data)\n\t{\n\t\t$this->db->insert($this->table, $form_data);\n\t\t\n\t\tif ($this->db->affected_rows() == '1')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "public function success()\n {\n return ( \n ! empty($this->result) \n && $this->result->getStatus() == 'Success' \n && $this->result->getCode() == 200 );\n }", "public function check_form()\n\t{\n\t\tProfil_fields_forum::validate(PROFIL_FIELDS_CONTACT, 'contact', $this->errstr, Fsb::$session->id());\n\t}", "function SaveForm($form_data)\n\t{\n\t\t$this->db->insert('gig_table', $form_data);\n\t\tif ($this->db->affected_rows() == '1')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "function isFormValid(){\n\tif(!isset($_POST['num-input'])){\n\t\treturn false;\n\t}\n\tif(!isset($_POST['job-name'])){\n\t\treturn false;\n\t}\n\treturn true;\n}", "function ok()\n {\n return (0 == count($this->_errores));\n }", "public function isSuccessful()\n {\n return true;\n }", "public function isSuccessful()\n {\n return true;\n }", "public function isSuccessful()\n {\n return true;\n }", "public function isSuccessful() {}", "public function was_successful() {\n return (bool) ( $this->mail_response );\n }", "public function post()\n {\n return count($_POST) > 0;\n }", "function RegisterPraktijk()\n {\n if(!isset($_POST['submitted']))\n {\n return false;\n }\n // Maak een Array\n $formvars = array();\n \n $this->CollectRegistrationSubmissionPraktijk($formvars);\n \n if(!$this->SaveToDatabasePraktijk($formvars))\n {\n return false;\n }\n return true;\n }", "public function do_success($form)\n\t{\n\t\t$actions = $this->get_setting('actions', array());\n\t\tif(isset($actions[$this->value])) {\n\t\t\t$actions[$this->value]['fn']($form);\n\t\t}\n\t\treturn parent::do_success($form);\n\t}", "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 isFormValid() {\n return $this->form->isValid();\n }", "function hasForm() {\n\t\t\t$form = $this->getForm( );\n\n\t\t\tif (!empty( $$form )) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function submit()\n {\n if(empty($this->_error))\n {\n return true;\n }\n else\n {\n $str='';\n foreach ($this->_error as $key=>$value){\n $str.=$key.'=>'.$value.\"\\n\";\n }\n\n throw new Exception($str);\n }\n }", "public function isOk(): bool\n {\n return $this->getError() === UPLOAD_ERR_OK;\n }", "public function isSuccessful() : bool\n {\n return ! empty($this->getSuccess());\n }", "public function questionFormSucceeded($form) {\n $values = $form->getValues();\n $this->questions->update($values);\n }", "public function callbackSubmit()\n {\n // Remember values during resubmit, useful when failing (retunr false)\n // and asking the user to resubmit the form.\n $this->form->rememberValues();\n $apiKey = $this->form->value(\"ApiKey\");\n $widget = $this->form->value(\"Widget\");\n $defaultList = $this->form->value(\"DefaultList\");\n $apiKey = $apiKey === \"\" ? \"null\" : $apiKey;\n $popup = $this->form->value(\"Popup\");\n $mailChimpService = new MailChimpService($this->di);\n\n try {\n $mailChimpService->addConfig($apiKey, $widget, $popup, $defaultList);\n } catch (\\Peto16\\Admin\\Exception $e) {\n $this->form->addOutput($e->getMessage());\n return false;\n }\n $this->form->addOutput(\"Configuration updated.\");\n return true;\n }", "public function submit()\n\t{\n\t\tif ( ! $this->validateForm())\n\t\t{\n\t\t\treturn array_merge(\n\t\t\t\t$this->errors,\n\t\t\t\t['complete' => false]\n\t\t\t);\n\t\t}\n\n\t\tStockCardFactory::auth()->set($this->card);\n\n\t\treturn $this->input('url_result') ?: $this->card->adminUrl('view');\n\t}", "public function __invoke(Form $form)\n {\n $request = $this->getRequest();\n\n if (!$request->isPost()) {\n return false;\n }\n\n $form->setData($request->getPost());\n\n if (!$form->isValid()) {\n $this->getController()\n ->flashMessenger()\n ->addErrorMessage('There were errors.');\n\n return false;\n }\n\n return true;\n }", "public function isSuccess()\n {\n return $this->getResult() == self::RESULT_OK;\n }", "public function formSucceeded(\\Nette\\Application\\UI\\Form $form)\n\t{\n\t\t$values = $form->getValues();\n\n // 2) Recognize add or edit of record\n if (!$this->entity) {\n $this->entity = new \\App\\Entities\\Record();\n \n if ($this->athlete_id) {\n $values->athlete_id = $this->athlete_id;\n }\n \n if ($this->session_id) {\n $values->session_id = $this->session_id;\n }\n \n if ($this->test_id) {\n $values->test_id = $this->test_id;\n }\n \n // TODO: Check all id's validity (athlete, session, test) - only when new record\n $athlete = $this->athletes->find($values->athlete_id);\n $session = $this->sessions->find($values->session_id);\n $test = $this->tests->find($values->test_id);\n \n $this->entity->athlete = $athlete;\n $this->entity->session = $session;\n $this->entity->test = $test;\n $this->entity->created = new \\DateTime();\n \n $message = 'New record was successfuly saved!';\n } else {\n $message = 'Changes was successfuly saved!';\n }\n\n // 3) Map data from form to entity\n $this->toEntity($values);\n \n \\Nette\\Diagnostics\\Debugger::barDump($this->entity->value);\n \n // 4) Persist and flush entity -> redirect to dafeult\n $this->save([$this->entity->athlete->id, $this->entity->session->id], 'Athlete:session');\n\t}", "public function getSuccess() {\n\t\tp(\"Checking success status of all\");\n\t\t// set false if error has occurred, can return false immediately\n\t\tif ( $this->success === false ) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ($this->fields as $field) {\n\t\t\tif ( $field->getSuccess() === false) {\n\t\t\t\t$this->success = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $this->success;\n\t}", "public function validateForm(){\n\n if (isset($_POST['sign-up'])) {\n self::registrationForm();\n };\n\n if(isset($_POST['login-form'])){\n self::loginForm();\n }\n }", "public function SaveForm($form_data)\r\n {\r\n $this->db->insert($this->table, $form_data);\r\n\r\n if ($this->db->affected_rows() == '1')\r\n {\r\n return TRUE;\r\n }\r\n\r\n return FALSE;\r\n }", "public static function isPosted()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n return true;\n } else {\n return false;\n }\n }", "public function isRequestSuccessful()\n {\n return strtolower($this->transaction->getMessages()->getResultCode()) === 'ok';\n }", "public function validate()\n {\n return $_POST['formkey'] === $this->oldFormkey;\n }", "public function songFormSuccess(Form $form){\n $this->songRepository->save($this->song);\n # odešleme zprávu o úspěchu\n $form->getPresenter()->flashMessage('Song added');\n }", "function culturefeed_pages_edit_membership_form_submit(&$form, &$form_state) {\n\n $form_state['#success'] = TRUE; // This boolean will be checked at in the ajax callback.\n drupal_set_message(t('Membership changed'));\n\n}", "public function isSuccessful();", "public function form_success()\n {\n \tif ($this->session->has_userdata('success_message')) \n \t{\n \t\t# code...\n \t\t$this->data = array_merge($this->data, array(\n \t\t\t'msg'\t\t=> $this->session->userdata('success_message')['msg'],\n \t\t\t'msg2'\t\t=> $this->session->userdata('success_message')['msg2'],\n \t\t\t're_link'\t=> $this->session->userdata('success_message')['re_link'],\n \t\t\t'msg3'\t\t=> $this->session->userdata('success_message')['msg3'],\n \t\t\t're_link2'\t=> $this->session->userdata('success_message')['re_link2'] \n\t\t\t));\n\n \t\tif ($this->session->userdata('success_message')['type'] == 'participants') \n \t\t{\n \t\t\t# code...\n \t\t\t$this->data['output'] = $this->Model_return->return_participants($this->session->userdata('success_message')['id']);\n \t\t}\n \t\telseif ($this->session->userdata('success_message')['type'] == 'event') \n \t\t{\n \t\t\t# code...\n \t\t\t$this->data['output'] = $this->Model_return->return_event($this->session->userdata('success_message')['id']);\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$this->data['output'] = NULL;\n \t\t}\n \t\t$this->render($this->set_views->form_success());\n \t}\n \telse\n \t{\n \t\tredirect('/Form');\n \t}\n }" ]
[ "0.8020744", "0.7588152", "0.7257663", "0.7208905", "0.7190181", "0.7125276", "0.7088746", "0.70683604", "0.70431525", "0.70307153", "0.695666", "0.6908414", "0.6876836", "0.68398577", "0.6797794", "0.6796699", "0.67796415", "0.67246896", "0.6698622", "0.6695738", "0.6686655", "0.6665067", "0.66354126", "0.6609602", "0.6539371", "0.6539371", "0.65214735", "0.6503522", "0.64951617", "0.6485583", "0.64747936", "0.64606005", "0.6438648", "0.6436046", "0.64073783", "0.6390409", "0.6389764", "0.63717014", "0.635732", "0.63507277", "0.63410586", "0.6337709", "0.63105446", "0.62722975", "0.6267042", "0.6254863", "0.6250894", "0.62444097", "0.6234046", "0.6226922", "0.6223975", "0.62163734", "0.6206191", "0.62015194", "0.62015194", "0.62015194", "0.62015194", "0.62008023", "0.62008023", "0.62008023", "0.6192295", "0.61651397", "0.61505306", "0.614703", "0.61400557", "0.61375505", "0.6135674", "0.613521", "0.6132692", "0.6114548", "0.6111095", "0.6111095", "0.6111095", "0.6107868", "0.6107816", "0.6105476", "0.61018896", "0.6096667", "0.60952634", "0.6091588", "0.6089655", "0.60880494", "0.6083673", "0.60827225", "0.6076678", "0.6071943", "0.6068493", "0.60673696", "0.60553396", "0.60528946", "0.60485566", "0.60443634", "0.6030899", "0.6028404", "0.60280865", "0.6018322", "0.6011873", "0.6011448", "0.6007206", "0.5997066" ]
0.699836
10
Deactivate plugin after activation error
static private function _cleanup() { $active_plugins = (array) get_option( 'active_plugins' ); $active_plugins_network = (array) get_site_option( 'active_sitewide_plugins' ); // workaround for WPMU deactivation bug remove_action( 'deactivate_' . W3TC_FILE, 'deactivate_sitewide_plugin' ); do_action( 'deactivate_plugin', W3TC_FILE ); $key = array_search( W3TC_FILE, $active_plugins ); if ( $key !== false ) { array_splice( $active_plugins, $key, 1 ); } unset( $active_plugins_network[W3TC_FILE] ); do_action( 'deactivate_' . W3TC_FILE ); do_action( 'deactivated_plugin', W3TC_FILE ); update_option( 'active_plugins', $active_plugins ); update_site_option( 'active_sitewide_plugins', $active_plugins_network ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deactivate_plugin() {}", "abstract protected function deactivate_plugin();", "public function deactivatePlugin();", "public function plugin_deactivate() {\r\n\r\n\t}", "protected function deactivate_and_die( $error = false ) {\n\t\t\t#load_plugin_textdomain(\n\t\t\t#\t'better-related',\n\t\t\t#\tfalse,\n\t\t\t#\tbasename( $this->plugin_dir ) . '/translations'\n\t\t\t#);\n\t\t\t$message = sprintf( __( \"Better Related has been automatically deactivated because of the following error: <strong>%s</strong>.\" ), $error );\n\t\t\tif ( !function_exists( 'deactivate_plugins' ) )\n\t\t\t\tinclude ( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t\t\tdeactivate_plugins( __FILE__ );\n\t\t\twp_die( $message );\n\t\t}", "function jft_assistant_deactivate() {\n\trequire_once JFT_ASSISTANT_DIR__ . '/classes/JftAssistant/Autoloader.php';\n\tJftAssistant_Autoloader::register();\n\tJftAssistant_Plugin::get_instance()->deactivate();\n}", "public function acfedu_plugin_deactivation() {\n\t\t\t // nothing yet\n // @TODO: delete any settings\n\t\t\t}", "public static function plugin_deactivation() {\n\t\treturn true;\n\t}", "function mediatags_deactivate_plugin()\n\t{\n\t}", "public static function deactivate() {\n\n\t\tif ( is_admin() && current_user_can( 'activate_plugins' ) ) {\n\t\t\t$activator = static::get_instance();\n\t\t\t\n\t\t\tif ( self::DO_LOG_ACTIVATION ) {\n\t\t\t\tself::log_message( __METHOD__, 'Dectivating plugin ' . plugin_basename( $activator->get_plugin_file() ) );\n\t\t\t}\n\t\t\t\n\t\t\t$activator->deactivate_classes();\n\t\t\t$activator->deactivate_plugin();\n\t\t\t\n\t\t\tflush_rewrite_rules();\n\t\t}\n\t}", "function deactivator()\n{\n require_once plugin_dir_path( __FILE__ ) . 'includes/Deactivator.php';\n\tDeactivator::deactivate();\n}", "public static function deactivate() {\n if ( !current_user_can( 'activate_plugins' ) ) {\n return;\n }\n\n $plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : '';\n check_admin_referer( 'deactivate-plugin_' . $plugin );\n\n Clanpress_Mode::reset();\n }", "public function deactivate() {\n\t\t/**\n\t\t * Fires when the plugin is being deactivated.\n\t\t *\n\t\t * @since 7.0\n\t\t */\n\t\tdo_action('audition_deactivate');\n\t}", "public function plugin_deactivation_callback() {\n\n\t\t\t\t$plugin = isset( $_POST['plugin'] ) ? sanitize_text_field( wp_unslash( $_POST['plugin'] ) ) : '';\n\t\t\t\t$plugin_file = isset( $_POST['plugin_file'] ) ? sanitize_text_field( wp_unslash( $_POST['plugin_file'] ) ) : '';\n\t\t\t\t$plugin_file = ABSPATH . 'wp-content/plugins/'.esc_html($plugin).'/'.esc_html($plugin_file);\n\n\t\t\t\tif(file_exists($plugin_file)) {\n\n\t\t\t\t\tdeactivate_plugins($plugin_file);\n\t\t\t\t\techo \"success\";\n\n\t\t\t\t} else {\n\t\t\t\t\techo esc_html__('Plugin Does not Exists' , 'vmagazine-lite');\n\t\t\t\t}\n\n\t\t\t\tdie();\n\n\t\t\t}", "function deactivate_mfn_wp_plugin()\n{\n require_once plugin_dir_path(__FILE__) . 'includes/class-mfn-wp-plugin-deactivator.php';\n Mfn_Wp_Plugin_Deactivator::deactivate();\n}", "function deactivate_akvockan_plugin() {\n\tInc\\Base\\Deactivate::deactivate();\n}", "function _deactivate() {}", "public function deactivate()\n {\n if (Manager::getInstance()->isPluginActivated('Login') == false) {\n Manager::getInstance()->activatePlugin('Login');\n }\n }", "public function deactivate() {\r\n\r\n if ( ! current_user_can('activate_plugins') ) {\r\n return;\r\n }\r\n\r\n $plugin = isset( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : '';\r\n check_admin_referer( \"deactivate-plugin_{$plugin}\" );\r\n\r\n delete_transient( 'ce_flush_rules' );\r\n flush_rewrite_rules();\r\n\r\n }", "function hook_deactivate() {\r\n\r\n if (!current_user_can('activate_plugins'))\r\n return;\r\n $plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';\r\n check_admin_referer(\"deactivate-plugin_{$plugin}\");\r\n }", "public function deactivated_plugin( $filename ) {\n \n }", "public function execute_deactivation_hooks() {\r\n }", "function deactivation_hook() {\n\n\t}", "public static function es_deactivation() {\n\t}", "function deactivated_plugins_notice()\n {\n }", "function myplugin_on_deactivation() {\n if ( ! current_user_can( 'activate_plugins' ) ) return;\n\n // View a message on plugin deactivation\n // wp_die( 'Your plugin has been deactivated' );\n\n flush_rewrite_rules(); // search?\n}", "public function _deactivate() {\r\n\t\t// Add deactivation cleanup functionality here.\r\n\t}", "function hm_deactivate_conflicts() {\n\t$plugins = get_option('active_plugins' );\n\t$plugin_deactivate = array_keys( $plugins, 'WPThumb/wpthumb.php' );\n\tunset( $plugins[$plugin_deactivate[0]]);\n\tupdate_option( 'active_plugins', $plugins );\n}", "public function plugin_deactivate(){\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}", "public function plugin_deactivate(){\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}", "public function on_plugin_uninstall(): void {\n\t\tif ( is_multisite() ) {\n\t\t\tdelete_site_option( self::OPTION_SHOW_ACTIVATION_NOTICE );\n\t\t}\n\t\tdelete_option( self::OPTION_SHOW_ACTIVATION_NOTICE );\n\t}", "function on_deactivation ()\n{\n}", "function on_deactivation ()\n{\n}", "public static function deactivate() {\n\t}", "public static function deactivate() {\n\n }", "public static function activate() {\n //delete_option( 'ptb_plugin_options' );\n }", "public function register_deactivation();", "public function deactivate();", "public function uninstallPlugin()\n {\n }", "public static function deactivate()\n\t{\n\n\t}", "public static function deactivate()\n {\n }", "function myplugin_deactivate()\n{\n\tglobal $wpdb, $myplugin_options_all, $myplugin_dbtables_all;\n\n\tmyplugin_deactivate_dbtables( $myplugin_dbtables_all );\n\tmyplugin_deactivate_options( $myplugin_options_all );\n}", "public static function deactivate(){\n }", "public static function deactivate(){\n }", "function deactivate_cps() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-cps-deactivator.php';\n\tcps_Deactivator::deactivate();\n}", "public static function deactivate ()\n\t{\n\t}", "public function deactivate_me() {\r\n\r\n\t\t// We do a check for deactivate_plugins before calling it, to protect\r\n\t\t// any developers from accidentally calling it too early and breaking things.\r\n\t\tif ( function_exists( 'deactivate_plugins' ) ) {\r\n\t\t\tdeactivate_plugins( $this->basename );\r\n\t\t}\r\n\t}", "function hxp_plugin_deactivation() {\n\twp_dequeue_style( 'hxp_custom_style' );\n\twp_deregister_style( 'hxp_custom_style' );\n\twp_dequeue_script( 'hxp_export_script' );\n\twp_dequeue_script( 'hxp_import_script' );\n\twp_deregister_script( 'hxp_export_script' );\n\t$hxp_upload_dir = wp_upload_dir();\n\thxp_rrmdir( $hxp_upload_dir['basedir'] . '/hxp_exports' );\n\thxp_rrmdir( $hxp_upload_dir['basedir'] . '/hxp_imports' );\n}", "function detect_plugin_deactivation( $plugin, $network_activation )\n{\n // do stuff\n\t $plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );\n\t if($plugin_data['Name'] == \"Landing Page Booster\")\n\t {\n\t\tdo_action( 'remove_license','' );\n\t }\n}", "public function deactivate() {\n\t\t\t// just in case I want to do anyting on deactivate\n\t\t}", "function deactivate_ts()\n{\n require_once plugin_dir_path(__FILE__) . 'includes/class-ts-deactivator.php';\n TS_Deactivator::deactivate();\n}", "public function action_admin_post_plugin_deactivate() {\n\t\tif ( empty( $_GET['plugin'] ) )\n\t\t\twp_die( sprintf( __( 'Missing %s parameter', 'wpcom-vip-plugins-ui' ), '<code>plugin</code>' ) );\n\n\t\tif ( ! current_user_can( $this->capability ) )\n\t\t\twp_die( __( 'You do not have sufficient permissions to deactivate plugins for this site.' ) );\n\n\t\t$plugin_slug = sanitize_file_name( $_GET['plugin'] );\n\t\t$plugin_file = $plugin_slug . '/' . $plugin_slug . '.php';\n\n\t\tcheck_admin_referer( 'deactivate-' . $plugin_slug );\n\n\t\t// Note that core's deactivate_plugins() returns no value, so we _assume_\n\t\t// the deactivation worked\n\t\t$this->deactivate_plugin( $plugin_slug );\n\n\t\twp_safe_redirect( $this->get_menu_url( array( 'deactivated' => '1' ) ) );\n\t\texit();\n\t}", "function do_plugin_deactivate( $slug ) {\n\n\t\t$status = $this->get_plugin_status( $slug );\n\n\t\tif ( empty( $this->plugins[ $slug ] ) ) {\n\t\t\t$status['error'] = esc_html__( 'We have no data about this plugin.', 'socialize' );\n\t\t\twp_send_json_error( $status );\n\t\t}\n\n\t\tdeactivate_plugins( $this->plugins[ $slug ]['file_path'] );\n\n\t\t$status = $this->get_plugin_status( $slug );\n\t\twp_send_json_success( $status );\n\n\t}", "function bpsPro_envato_warning_deactivate() {\n$plugin_var = 'envato-wordpress-toolkit-master/index.php';\n$return_var = in_array( $plugin_var, apply_filters('active_plugins', get_option('active_plugins')));\n\n\tif ( $return_var != 1 ) { // 1 equals active\n\t\treturn;\t\n\t}\n\t\n\tif ( $return_var == 1 ) { // 1 equals active\t\n\t\n\t\tdeactivate_plugins( $plugin_var );\n\t\t\n\t\t$text = '<div class=\"update-nag\" style=\"background-color:#ffffe0;font-size:1em;font-weight:bold;padding:2px 5px;margin-top:2px;\"><font color=\"red\">'.__('WARNING!!! The Envato WordPress Toolkit plugin is installed', 'bulletproof-security').'</font><br>'.__('The Envato WordPress Toolkit plugin has been automatically deactivated to prevent it from causing the BPS Pro upgrade to fail catastrophically.', 'bulletproof-security').'<br>'.__('There is a coding mistake in the Envato WordPress Toolkit plugin that causes BPS Pro upgrades to fail catastrophically.', 'bulletproof-security').'<br>'.__('After upgrading BPS Pro you can activate the Envato WordPress Toolkit plugin again.', 'bulletproof-security').'</div>';\n\t\techo $text;\t\t\n\t}\t\n}", "public function cleanup_active_plugins_option() {\n\t\t$active_plugins = $this->get_active_plugins_option();\n\n\t\tforeach ( $active_plugins as $active_plugin ) {\n\t\t\tif ( ! $this->validate_plugin( $active_plugin ) ) {\n\t\t\t\t$this->deactivate_plugin( $active_plugin, true );\n\t\t\t}\n\t\t}\n\t}", "function deactivate() {\n\t}", "function deactivate_sitewide_plugin($plugin = \\false)\n {\n }", "function KemiSitemap_deactivate(){\n deactivate_plugins( plugin_basename( __FILE__ ) );\n }", "function deactivate_dashwp() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-dashwp-deactivator.php';\n\tDashWP_Deactivator::deactivate();\n}", "public static function deactivate() {\n\t\t// Do nothing.\n\t}", "function deactivation_func() {\r\n\r\n delete_option( 'wpc_run_activated_functions' );\r\n }", "abstract public function deactivate();", "public static function deactivate()\n\t\t{\n\t\t\t// Do nothing\n\t\t}", "public static function deactivate()\n\t\t{\n\t\t\t// Do nothing\n\t\t}", "public static function deactivate() {\n\n function wp_config_delete( $slash = '' ) {\n $config = file_get_contents( ABSPATH . \"wp-config.php\" );\n $config = preg_replace( \"/( ?)(define)( ?)(\\()( ?)(['\\\"])WPCF7_LOAD_JS(['\\\"])( ?)(,)( ?)(0|1|true|false)( ?)(\\))( ?);/i\", \"\", $config );\n file_put_contents( ABSPATH . $slash . \"wp-config.php\", $config );\n }\n\n function return_error() {\n ob_start();\n ?>\n <div class=\"error\">\n <p><?php _e( 'wp-config.php is not writable, please make wp-config.php writable - set it to 0777 temporarily, then set back to its original setting after this plugin has been deactivated.', 'payro24-contact-form-7' ); ?></p>\n </div>\n <button onclick=\"goBack()\">Go Back and try again</button>\n <script>\n function goBack() {\n window.history.back();\n }\n </script>\n <?php\n return ob_get_clean();\n }\n\n if ( file_exists( ABSPATH . \"wp-config.php\" ) && is_writable( ABSPATH . \"wp-config.php\" ) ) {\n wp_config_delete();\n } else if ( file_exists( dirname( ABSPATH ) . \"/wp-config.php\" ) && is_writable( dirname( ABSPATH ) . \"/wp-config.php\" ) ) {\n wp_config_delete( '/' );\n } else {\n print return_error();\n exit;\n }\n\n delete_option( \"payro24_cf7_options\" );\n delete_option( \"payro24_cf7_version\" );\n }", "public static function deactivate() {\n\t\t\t// Do nothing\n\t\t}", "public static function deactivate(){\n // Do nothing\n }", "public function deactivate(): void;", "public function word_count_deactivation() {\n return __( 'Do something, when deactivate the plugin', 'word-count' );\n }", "function deactivate_plugins($plugins, $silent = \\false, $network_wide = \\null)\n {\n }", "function wpcom_vip_plugins_ui_disable_activation() {\n _deprecated_function( __FUNCTION__, '2.0.0', 'plugins_url' );\n}", "public function deactivate() {\n\n }", "public function deactivate() {\n\n }", "function wp_super_emoticons_shutdown() {\t\n\t$current_plugins = get_settings('active_plugins');\n\t$current_plugin_basename = plugin_basename( __FILE__ );\t\t\n\tarray_splice( $current_plugins, array_search( $current_plugin_basename, $current_plugins ), 1 ); // Array-function!\n\tupdate_option( 'active_plugins', $current_plugins );\n \n echo '<div class=\"settings-error error\" id=\"setting-error-settings_updated\"><p><strong>';\n _e( 'WP Super Edit Plugin Required! Activate WP Super Edit before using. Plugin Deactivated.', 'wp-super-edit' );\n echo '</p></div>';\n}", "public function deactivate(): void\n {\n // Bail early if no recipients are set.\n if (empty($this->recipients)) {\n return;\n }\n\n if ($this->settings[Settings::PLUGIN_DEACTIVATED]) {\n $subject = __('BC Security deactivated', 'bc-security');\n\n $user = wp_get_current_user();\n if ($user->ID) {\n // Name the bastard that turned us off!\n $message = \\sprintf(\n __('User \"%s\" had just deactivated BC Security plugin on your website!', 'bc-security'),\n $user->user_login\n );\n } else {\n // No user means plugin has been probably deactivated via WP-CLI.\n // See: https://github.com/chesio/bc-security/issues/16#issuecomment-321541102\n $message = __('BC Security plugin on your website has been deactivated!', 'bc-security');\n }\n\n $this->notify($subject, $message);\n }\n }", "public static function deactivate()\n {\n // Do nothing\n }", "public function uninstallPlugin()\n\t{\n\t\treturn true;\t\n\t}", "public function maybe_deactivate_plugins() {\n\t\tif ( ! Param::get( 'rank_math_deactivate_plugins' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! current_user_can( 'deactivate_plugins' ) ) {\n\t\t\twp_die( esc_html__( 'Sorry, you are not allowed to deactivate plugins for this site.', 'rank-math' ) );\n\t\t}\n\n\t\tcheck_admin_referer( 'rank_math_deactivate_plugins' );\n\n\t\t$type = Param::get( 'plugin_type', 'seo', FILTER_SANITIZE_STRING );\n\t\t$allowed = [ 'seo', 'sitemap' ];\n\t\tif ( ! in_array( $type, $allowed, true ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$this->deactivate_conflicting_plugins( $type );\n\t}", "private static function single_deactivate() {\n\t\t// @TODO: Define deactivation functionality here\n\t}", "private static function single_deactivate() {\n\t\t// @TODO: Define deactivation functionality here\n\t}", "public function plugin_deactive_hook(){\r\n delete_transient( 'woolentor_template_info' );\r\n delete_metadata( 'user', null, 'woolentor_dismissed_lic_notice', null, true );\r\n }", "protected function deactivateSelf() {}", "public function on_plugin_deactivation( bool $network_wide ): void {\n\t\t$this->delete_activation_flag( $network_wide );\n\t}", "public function testDeactivateExtensionFailedDependenciesError()\n\t{\n\t\t$this->restartApplication();\n\n\t\t\\Bundle::register('aws', array(\n\t\t\t'location' => \"path: \".path('orchestra.extension').'aws'.DS,\n\t\t));\n\n\t\t\\Bundle::start('aws');\n\t\t\\Orchestra\\Extension::activate('b');\n\t\t\\Orchestra\\Extension::activate('a');\n\n\t\t$this->be($this->user);\n\t\t$this->call('orchestra::extensions@deactivate', array('b'));\n\t\t$this->assertRedirectedTo(handles('orchestra::extensions'));\n\t\t$this->assertTrue(\\Orchestra\\Extension::activated('b'));\n\t\t$this->assertTrue(\\Orchestra\\Extension::activated('a'));\n\n\t\t\\Orchestra\\Extension::deactivate('a');\n\t\t\\Orchestra\\Extension::deactivate('b');\n\t}", "function deactivate_sitewide_plugin( $plugin = false ) {\n\t_deprecated_function( __FUNCTION__, '3.0.0', 'deactivate_plugin()' );\n}", "function deactivate() {\n \n $this->reset_caches();\n $this->ext->update_option( 'livefyre_deactivated', 'Deactivated: ' . time() );\n\n }", "function astrizstudios_pro_block_options_uninstal()\r\n{\r\n\tif(!current_user_can('activate_plugins'))\t{ return; }\r\n\r\n\tcheck_admin_referer('bulk-plugins');\r\n\r\n\tif(!defined('WP_UNINSTALL_PLUGIN'))\t\t\t{ return; }\r\n\r\n\tif(__FILE__ != WP_UNINSTALL_PLUGIN)\t\t\t{ return; }\r\n\r\n\trequire_once('profanity-blocker-options.php');\r\n\t\r\n\tforeach($options as $option)\t\t\t\t{ delete_option($option); }\r\n\r\n\treturn 'DEACTIVATED!';\r\n}", "function changyan_deactivate()\n{\n}", "function ispapissl_addon_deactivate(): array\n{\n return ['status' => 'success','description' => 'Uninstalled'];\n}", "function stop_manager_deactivate()\n{\n\treturn TRUE;\n}", "function dprv_deactivate()\r\n\t{\r\n\t\t$log = new DPLog(); \r\n\t\t$log->lwrite(\"VERSION \" . DPRV_VERSION . \" DEACTIVATED\"); \r\n\t}", "public function plugin_activated() {\n\t\tif ( ! $this->is_troubleshooting() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Force the database entry for active plugins if someone tried changing plugins while in Troubleshooting Mode.\n\t\tupdate_option( 'active_plugins', $this->active_plugins );\n\t}", "public function action_plugin_deactivation( $file )\n\t{\n\t\t\tACL::destroy_token( 'install_new_system' );\n\t\t\tACL::destroy_token( 'install_new_plugin' );\n\t\t\tACL::destroy_token( 'install_new_theme' );\n\t\t\tACL::destroy_token( 'install_new_class' );\n\t}", "function action_plugin_deactivation( $file ) {\n \n Modules::remove_by_name( 'My Tickets' );\n \n }", "public function fix_after_deactivation() {\n\t\t$exs = new Util_Environment_Exceptions();\n\n\t\ttry {\n\t\t\t$this->delete_addin();\n\t\t} catch ( Util_WpFile_FilesystemOperationException $ex ) {\n\t\t\t$exs->push( $ex );\n\t\t}\n\n\t\t$this->unschedule();\n\n\t\tif ( count( $exs->exceptions() ) > 0 )\n\t\t\tthrow $exs;\n\t}", "function mailmaga_x_deactivation(){\n\t$mailmaga_x_data = new Mailmaga_x_install();\n\t$mailmaga_x_data->deactivation();\n}", "public function deactivateService() {}", "public function deactivate()\n\t{\n\t\tif (LocationProvider::getCurrentProvider() instanceof \\Piwik\\Plugins\\CloudflareLocationProvider\\LocationProvider\\Cloudflare) {\n\t\t\tLocationProvider::setCurrentProvider(LocationProvider\\DefaultProvider::ID);\n\t\t}\n\t}", "public function deactivate(){\n $items = MenuItem::getPluginMenuItems($this->_plugin);\n\n foreach($items as $item) {\n $item->delete();\n }\n }", "function virustotalscan_deactivate()\r\n{\r\n global $db;\r\n // se sterg setarile din baza de date\r\n $db->query(\"DELETE FROM \".TABLE_PREFIX.\"settinggroups WHERE name = 'virustotalscan_group'\");\r\n \t$db->query(\"DELETE FROM \".TABLE_PREFIX.\"settings WHERE name LIKE 'virustotalscan_setting_%'\");\r\n // se actualizeaza toate setarile\r\n\trebuild_settings();\r\n // daca tabela \"virustotalscan_log\" exista in baza de date atunci se sterge!\r\n\tif ($db->table_exists('virustotalscan_log'))\r\n $db->drop_table('virustotalscan_log');\r\n // se sterge din baza de date stil-urile adaugate\r\n $db->delete_query('templates', 'title = \"virustotalscan_url_css\"'); \r\n}" ]
[ "0.81466955", "0.81257224", "0.804211", "0.8016866", "0.7518155", "0.74990034", "0.7487241", "0.74702555", "0.74093324", "0.7339252", "0.7256106", "0.7202547", "0.7143752", "0.7136304", "0.7124419", "0.7119465", "0.70665395", "0.70488894", "0.70397645", "0.70048195", "0.6967407", "0.69120795", "0.69118124", "0.6879531", "0.6828688", "0.6821943", "0.68104154", "0.67985106", "0.6783033", "0.6783033", "0.6773363", "0.6730984", "0.6730984", "0.6717555", "0.6714383", "0.67010486", "0.6696544", "0.66915834", "0.66823924", "0.66739297", "0.66588974", "0.66459596", "0.6620971", "0.6620971", "0.6616327", "0.6615461", "0.659774", "0.6594904", "0.6591408", "0.65855557", "0.65689147", "0.6543078", "0.6542479", "0.64915043", "0.64878786", "0.64690584", "0.6465594", "0.64408046", "0.64325583", "0.6421104", "0.641857", "0.6418062", "0.64070284", "0.64070284", "0.6393807", "0.6374278", "0.636592", "0.63571227", "0.635072", "0.63485765", "0.6332565", "0.63250655", "0.63250655", "0.6309436", "0.6308278", "0.6302161", "0.6284882", "0.62682325", "0.62609714", "0.62609714", "0.625656", "0.625258", "0.6249475", "0.6223522", "0.62047064", "0.61733836", "0.6160043", "0.6150687", "0.61455053", "0.61392146", "0.6135837", "0.61343485", "0.6134014", "0.61338806", "0.6123433", "0.61164075", "0.6113546", "0.6100926", "0.60893303", "0.60860187" ]
0.6318394
73
Print activation error with repeat button based on exception
static public function error_on_exception( $e ) { $reactivate_url = wp_nonce_url( 'plugins.php?action=activate&plugin=' . W3TC_FILE, 'activate-plugin_' . W3TC_FILE ); $reactivate_button = sprintf( '%1$sre-activate plugin', '<input type="button" value="' ) . sprintf( '" onclick="top.location.href = \'%s\'" />', addslashes( $reactivate_url ) ); self::_error( sprintf( __( '%s<br />then %s.', 'w3-total-cache' ), $e->getMessage(), $reactivate_button ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showFailed();", "private function showExceptionUser()\n {\n \\ShowError(Loc::getMessage('FF_COMPONENT_CATCH_EXCEPTION'));\n }", "public function showError();", "public function display()\r\n\t{\r\n debug_print_backtrace();\r\n\t\tdie(\"\\n(\" . date('m/d/y @ h:i:sA', time()) . \") A TACException occured: \" . $this->exception . \"\\n\");\r\n\t}", "public function actionError() {\n\t\t$controller = new \\controllers\\WelcomeController;\n\t\t$controller->actionStart();\n\t\texit;\n\t}", "public function error() \n\t{\n\t\trequire $this->view('error', 'error');\n\t\texit;\n\t}", "private function render_invalid_step() {\n\t\t?>\n\t\t<p><?php\n\t\tprintf(\n\t\t\t/* translators: 1 - an opening link tag, 2 - a closing link tag. */\n\t\t\tesc_html__( 'You have reached an invaild step - %1$sreturn to the start of the wizard%2$s.', 'wp-security-audit-log' ),\n\t\t\t'<a href=\"' . esc_url( $this->get_welcome_step() ) . '\">',\n\t\t\t'</a>'\n\t\t);\n\t\t?></p>\n\t\t<?php\n\t}", "private function _error()\n {\n Shopware()->Session()->RatePAY['hidePayment'] = true;\n $this->View()->loadTemplate(\"frontend/RatePAYErrorpage.tpl\");\n }", "protected function errorAction() {}", "public function actionError() {\n \n }", "public static function customErrorMsg()\n {\n echo \"\\n<p>An error occured, The error has been reported.</p>\";\n exit();\n }", "function showerror() {\r\n if (count($this->error_msgs)>0) {\r\n echo '<p><img src=\"images/eri.gif\"><b>'.lang('Error in form').'</b>:<ul>';\r\n foreach ($this->error_msgs as $errormsg) {\r\n echo '<li>'.$errormsg;\r\n }\r\n echo '</ul></p>';\r\n return True;\r\n }\r\n return False;\r\n }", "function displayError(){\n\t\tprint \"<div class=\\\"validationerror\\\">\";\n\t\tfor ($i=0;$i<count($this->error);$i++){\n\t\t\tprintln($this->error[$i]);\n\t\t}\n\t\tprint \"</div>\";\n\t}", "function error_and_die($msg) {\n echo ('<p><span style=\"color:#ff0000; font-size:1.5em;\">SubmissionBox Error Encountered</span></p>');\n echo ('<p><span style=\"color:#ff0000;\">Message: ' . $msg . '</span></p></body></html>');\n die;\n }", "public function actionException()\n {\n $this->render('exception');\n }", "public function errorMode(){}", "private function _error() {\n\t\trequire $this->_controllerPath . $this->_errorFile;\n\t\t$this->_controller = new Error();\n\t\t$this->_controller->index('Esta página no existe');\n\t\texit;\n\t}", "public function triggerError() {\n $this->_errors = true;\n }", "public function err_page()\n {\n $site = new SiteContainer($this->db);\n\n $site->printHeader();\n $site->printNav();\n echo \"An Error has occured and your request could not be completed. Return <a href=\\\"index.php\\\">Home</a>\";\n $site->printFooter();\n }", "public function errorOccured();", "function gagal() {\n echo $_err = ErrorMsg(\"Login Gagal\", \"Kode Login dan Password salah!!!\n <hr size=1 color=#3b5998>\n Perhatikan Anda Login sebagai siapa dan pastikan Anda memasukan Kode Login dan password dengan benar.\n\t <hr size=1 color=#3b5998>\n Untuk informasi lebih lanjut hubungi Administrator.\n\t <hr size=1 color=#3b5998>\n Silahkan <a href='index.php'>Coba Lagi</a>\");\n}", "public function show_exception_page($message = '')\r\n {\r\n\t\t$this->CI =& get_instance();\r\n\t\techo $this->CI->template->load_page('_errors/exception_page', array('message' => $message), true, false);\r\n\t\texit;\r\n }", "public function callbackFail()\n {\n $this->AddOutput(\"<p><i>Form was submitted and the Check() method returned false.</i></p>\");\n }", "public function runError() {\n\t\t\t$this->setSession('sError', $this->getError());\n\n\t\t\t// Set the router\n\t\t\tredirect(\n\t\t\t\t$this->getUrl(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sRouter' => 'error', \n\t\t\t\t\t\t'sController' => 'index'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}", "private function _triggerError($additional) {\n $track = debug_backtrace();\n $this->_failed++;\n\n $output = <<<DUMBO\nERROR Failed to {$additional}, on {$track[1]['file']} at line {$track[1]['line']}.\nDUMBO;\n $this->_log($output);\n fwrite(STDOUT, \"\\n{$output}\\n\");\n return true;\n }", "function died($error) {\n\t\techo $template_1;\n\t\techo \"We're sorry, but there's errors found with the form you submitted.<br /><br />\";\n\t\techo $error.\"<br /><br />\";\n\t\techo \"<a href='contact.html'>Please go back</a> and fix these errors.<br /><br />\";\n\t\techo $template_2;\n\t\tdie();\n\t}", "function login_error() {\n echo \"<div class='alert alert-danger'>Invalid username/password\n combination.</div><br><a href='user_login.php'><button type='button'\n class='btn btn-primary'>Return To Login Page</button></a>\";\n echo \"</div>\";\n exit;\n }", "function DisplayError()\n\t\t{\n\t\t\techo \"<div>\" . $this->error_message . \"</div>\";\n\t\t}", "function paintError($message) {\n parent::paintError($message);\n\t\t\t\t\t\tprint \"<div><span class=\\\"red\\\">Exception:</span> <strong>\";\n\t\t\t\t\t\t$breadcrumb = $this->getTestList();\n\t\t\t\t\t\tarray_shift($breadcrumb);\n\t\t\t\t\t\tprint implode(\" -&gt; \", $breadcrumb);\n\t\t\t\t\t\tprint \"</strong><br />\\n<span class=\\\"exception\\\">\" . $this->_htmlEntities($message) . \"</span></div>\\n\";\n\t\t\t\t}", "public function generate_email_error()\n {\n $valid = $this->mod_mahasiswa->read_belum_vote();\n foreach ($valid as $data) {\n $nama=$data->nama;\n $token_now=$data->token;\n $email=$data->email;\n $nim = $data->nim;\n if ($this->mod_kirimemail->kirim_generate($email, $nama, $token_now)) {\n echo \"sukses\";\n $this->mod_kirimemail->is_register($nim);\n } else {\n echo \"gagal\";\n }\n }\n }", "function show_error ()\n {\n global $errormessage;\n global $lang;\n global $ts_template;\n if (!empty ($errormessage))\n {\n eval ($ts_template['show_error']);\n }\n\n }", "protected function enableDisplayErrors() {}", "protected function enableDisplayErrors() {}", "function throwError($exceptionItem){\n\techo \"\n\t\n\t<p style='font-family:arial;color:red;font-size:20px;'> Error parsing : . $exceptionItem->error_message \n\t\n\t</p>\"; // catch this in the parse method and do $e->getMessage() to show it.\n\n\t//break; // try and break the current loop\n\n\n}", "function failToRegister() {\n $output = $this->outputBoilerplate('duplicate.html');\n return $output;\n }", "function error() {\n $this->escribirHeader(\"Error de Permisos\");\n }", "public function runFailed();", "public function ErrorFatal() {\n\t\t$this -> Render();\n\t}", "public static function displayErrors(){\n $ec = new EmailLabsConfig();\n if( $ec->getMode() == true && !empty( self::$errors ) ){\n $message = '';\n foreach( self::$errors as $item )\n $message .= '['.$item['lvl'].']['.$item['date'].']'.$item['msg'].\"\\n\";\n die( $message );\n }\n }", "function error(){\n\t\t$paypal_config = array('Sandbox' => $this->sandbox);\n\t\t$paypal = new PayPal($paypal_config);\n\t\techo $paypal->DisplayErrors($this->session->userdata('paypal_errors'));\n\t\t\n\t}", "public function error() {\n\t\tnonce_generate();\n\t\t$this->title = !empty($_SESSION['title']) ? $_SESSION['title'] : 'Error';\n\t\tif (!empty($_SESSION['data'])) {\n\t\t\t$data = $_SESSION['data'];\n\t\t} else {\n\t\t\t$data = array(\n\t\t\t\t'error' => 'An unknown error ocurred.',\n\t\t\t\t'link' => ''\n\t\t\t);\n\t\t}\n\t\t$this->content = $this->View->getHtml('content-error', $data, $this->title);\n\t}", "public function generateFailed();", "public function errorAction()\n\t{\n\t}", "public function indexErrorLogin()\r\n {\r\n\t$vars['error'] = 1;\r\n\t\t\r\n $this->view->show(\"home.php\", $vars);\r\n }", "function DieNice($loc, $e)\n{\n log_error($loc, $e);\n \n include \"forms/header.php\";\n echo '<h2 class=\"page_title\">Error...</h2>' . \"\\n\";\n echo '<div class=\"diemsg\">' . \"\\n\";\n if(is_array($e))\n {\n foreach($e as $t) { echo $t . \"<br>\\n\"; }\n }\n else { echo $e . \"<br>\\n\"; }\n echo \"</div>\";\n echo \"<br><br>\";\n echo '<a href=\"welcome.php\">Back to Start</a>';\n echo \"<br><br>\";\n include \"forms/footer.php\";\n exit;\n}", "protected function addErrorFlashMessage() {}", "function died($error) {\r\n \r\n echo \"<h1>Whoops!</h1><h2>There appears to be something wrong with your submission.</h2>\";\r\n \r\n echo \"<strong><p>The following items are not specified correctly.</p></strong><br />\";\r\n \r\n echo $error.\"<br /><br />\";\r\n \r\n echo \"<p>Return to the form and try again.</p><br />\";\r\n\t\techo \"<p><a href='index.php'>return to the homepage</a></p>\";\r\n die();\r\n\t\t\r\n \r\n }", "function error(){}", "public static function printErrors() {\n\t\tif (PNApplication::hasErrors()) {\n\t\t\tforeach (PNApplication::$errors as $e)\n\t\t\t\techo \"<div style='color:#C00000;font-familiy:Tahoma;font-size:10pt'><img src='\".theme::$icons_16[\"error\"].\"' style='vertical-align:bottom'/> \".$e.\"</div>\";\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"if (typeof window.top.status_manager != 'undefined'){\";\n\t\t\tforeach (PNApplication::$errors as $e)\n\t\t\t\techo \"window.top.status_manager.addStatus(new window.top.StatusMessageError(null,\".json_encode($e).\",5000));\";\n\t\t\techo \"};\";\n\t\t\techo \"window.page_errors=[\";\n\t\t\t$first = true;\n\t\t\tforeach (PNApplication::$errors as $e) {\n\t\t\t\tif ($first) $first = false; else echo \",\";\n\t\t\t\techo json_encode($e);\n\t\t\t}\n\t\t\techo \"];\";\n\t\t\techo \"</script>\";\n\t\t}\n\t\tif (PNApplication::hasWarnings()) {\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"if (typeof window.top.status_manager != 'undefined'){\";\n\t\t\tforeach (PNApplication::$warnings as $e)\n\t\t\t\techo \"window.top.status_manager.addStatus(new window.top.StatusMessage(window.top.Status_TYPE_WARNING,\".json_encode($e).\",[{action:'popup'},{action:'close'}],5000));\";\n\t\t\techo \"};\";\n\t\t\techo \"</script>\";\n\t\t}\n\t}", "protected function prompt_last_error() {\n $this->prompt_error($this->last_error);\n }", "private static function sendBackError() {\n $supported_versions['ERROR'] = JText::_('COM_EASYSDI_SERVICE_FORM_DESC_SERVICE_NEGOTIATION_ERROR');\n echo json_encode($supported_versions);\n die();\n }", "protected function markAsFailed()\n {\n $this->view->success = false;\n }", "function gtk_error($str) {\n\t\t// http://aspn.activestate.com/ASPN/Mail/Message/php-gtk-general/2253469\n\t\t$red=&new GdkColor('#FF0000');\n\t\t$style=$this->label_filename->style;\n\t\t$style=$style->copy();\n\t\t$style->fg[0] = $red;\n\t\t$this->label_filename->set_style($style);\n\t\t// change text\n\t\t$this->label_filename->set_text($str);\n\t\techo 'Fatal error : '.$str.\"\\n\";\n\t\t// define IN_ERROR so all events will stop\n\t\tdefine('IN_ERROR',true);\n\t}", "public function callbackFail()\n {\n if (isset($this->exception)) {\n if (strpos($this->exception, CFormAddUser::SQLSTATE) !== false && strpos($this->exception, CFormAddUser::ERROR_DUPLICATE_KEY) !== false) {\n $errorMessage = \"<p><i>Fel har uppstått i databasen. Akronym är redan upptaget, försök att välja ny akronym eller kontakta administratör!</i></p>\";\n } else {\n $errorMessage = \"<p><i>Fel har uppstått i databasen, försök igen eller kontakta administratör!</i></p>\";\n }\n } else {\n if (isset($this->errorMessage)) {\n $errorMessage = $this->errorMessage;\n } else {\n $errorMessage = \"<p><i>Fel har uppstått i databasen, kunde ej spara information i databasen. Försök igen eller kontakta administratör!</i></p>\";\n }\n }\n\n $this->AddOutput($errorMessage);\n $this->redirectTo();\n }", "public function errorAction() {\n $this->setSession();\n $this->setOrder($this->getOrderIdFromResponse());\n $this->setPayment();\n $this->checkHash($this->getPaymentHashFromResponse());\n $params = $this->getRequest()->getParams();\n if (array_key_exists('code', $params)) {\n Mage::log('Error: Order id - '.$this->_order->getIncrementId().', Code - '.$params['code'], null, 'payuplpro.log');\n }\n /** @var Orba_Payuplpro_Model_Payment $paymentModel */\n $paymentModel = Mage::getModel('payuplpro/payment');\n if (!$paymentModel->isPaymentCompleted($this->_order) && !$paymentModel->isOrderCompleted($this->_order)) {\n $state = Mage_Sales_Model_Order::STATE_HOLDED;\n $store_id = $this->_order->getStoreId();\n $this->_order\n ->setHoldBeforeState($this->_order->getState())\n ->setHoldBeforeStatus($this->_order->getStatus())\n ->setState($state, $this->getConfig()->getDefaultStatus($state, $store_id))\n ->save();\n $this->_session->setErrorMessage($this->__('Your transaction was rejected by Payu.pl.').' '.$this->__('Click <a href=\"%s\">here</a> to pay again.', Mage::helper('payuplpro')->getRepeatPaymentUrl($this->_order)));\n $this->_session->getQuote()->setIsActive(false)->save();\n }\n if ($this->isNewOrder()) {\n $this->_redirect('checkout/onepage/failure', array('_secure'=>true));\n } else {\n $this->loadLayout();\n $this->renderLayout();\n }\n }", "public function showToastForValidationError()\n {\n $errorBag = $this->getErrorBag()->all();\n\n if (count($errorBag) > 0) $this->toast($errorBag[0], 'error');\n }", "public function errorAction() {\n\t\t\n\t\t$errors = $this->_getParam('error_handler');\n\t\t\n\t\tswitch ($errors->type) {\n\t\t\t \n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n\t\t\t\t\n\t\t\t\t// stranka nebyla nalezena - HTTP chybova hlaska 404\n\t\t\t\t$this->getResponse()->setHttpResponseCode(404);\n\t\t\t\t$this->view->message = 'Stránka nenalezena';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\t// chyba v aplikaci - HTTP chybova hlaska 500\n\t\t\t\t$this->getResponse()->setHttpResponseCode(500);\n\t\t\t\t$this->view->message = 'Chyba v aplikaci';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n $this->view->env = APPLICATION_ENV;\n\t\t$this->view->exception = $errors->exception;\n\t\t$this->view->request = $errors->request;\n\t\t$this->view->title = 'Objevila se chyba';\r\n\t\t$this->view->showDetails = ini_get('display_errors');\r\n\t\t\n\t\t$this->_helper->layout->setLayout('error');\n\t\t\n\t}", "function died($error) {\necho \"Xảy ra lỗi!!! \";\necho \"<br /><br />\";\necho $error.\"<br /><br />\";\necho \"Hãy trở lại và sữa chữa các lỗi:<br /><br />\";\ndie();\n}", "function triggerError(&$rec, $attrib, $err, $msg=\"\", $tab=\"\", $label='', $module='atk')\n{\n\tif($msg==\"\") $msg = atktext($err, $module);\n\t$rec['atkerror'][] = array( \"attrib_name\"=> $attrib, \"err\" => $err, \"msg\" => $msg, \"tab\" => $tab, \"label\" => $label);\n}", "function active_fail()\n {\n $message = null;\n $message = \"Không thể xác minh tài khoản !. <br />\";\n $this->view->load('frontend/user/active_fail', [\n 'message' => $message\n ]);\n }", "private function printErr($f, $e){\n\t\t\techo \"<B>\n\t\t\t\tError found it at \". $f .\": \". $e .\"</B></BR>\";\n\t\t\t$this->status = false;\n\t\t}", "private function displayErrors () {\n echo '<pre>';\n\n foreach ($this->error as $single_error) {\n print_r($single_error);\n }\n\n echo '</pre>';\n }", "function myExeptionHandler($exeption) {\n\techo \"Triton: Uncaught exeption; <p>\" . $exeption->getMessage() . \"<p><pre>\" . $exeption->getTraceAsString(), \"</pre>\"; // punkt här emellan???\n}", "protected function prompt_error($message) {\n echo PHP_EOL . \"\\033[41mERROR: \" . $message . \"\\033[0m\" . PHP_EOL;\n exit;\n }", "function output_error() {\r\n return false;\r\n }", "public function callbackFail()\n {\n $this->AddOutput(\"<p><i>Form was submitted and the Check() method returned false.</i></p>\");\n $this->redirectTo();\n }", "public static function userBadChoice()\n {\n say('Invalid entry, please try again');\n }", "function paintFail($message) {\n parent::paintFail($message);\n\t\t\t\t\t\t$breadcrumb = $this->getTestList();\n\t\t\t\t\t\tarray_shift($breadcrumb);\n\t\t\t\t\t\t\n\t\t\t\t\t\tprint \"<div><span class=\\\"red\\\">Fail:</span> <strong>\";\n\t\t\t\t\t\tprint implode(\" -&gt; \", $breadcrumb);\n\t\t\t\t\t\tprint \" </strong><br />\\n<span class=\\\"fail\\\">\" . $this->_htmlEntities($message) . \"</span></div>\\n\";\n\t\t\t\t}", "public function callbackFail()\r\n {\r\n //$this->AddOutput(\"<p><i>Form was submitted and the Check() method returned false.</i></p>\");\r\n $this->redirectTo();\r\n }", "function PHPErro($ErrNo, $ErrMsg, $ErrFile, $ErrLine) {\r\n $CssClass = ($ErrNo == E_USER_NOTICE ? WS_INFOR : ($ErrNo == E_USER_WARNING ? WS_ALERT : ($ErrNo == E_USER_ERROR ? WS_ERROR : $ErrNo)));\r\n echo \"<p class=\\\"trigger {$CssClass}\\\">\";\r\n echo \"<b>Erro na Linha: {$ErrLine} ::</b> {$ErrMsg} <br>\";\r\n echo \"<small>{$ErrFile}</small>\";\r\n echo \"<span class=\\\"ajax_close\\\">{$ErrMsg}</span></p>\";\r\n\r\n if ($ErrNo == E_USER_ERROR):\r\n die;\r\n endif;\r\n}", "function show_try_again_message($message)\n{\n\tshow_site_header();\n\tshow_ldap_path(null,\"\");\n\techo \"<p>\" . $message . \"</p>\\n\";\n\techo \"<a href=\\\"user.php\\\">\" . gettext(\"Try again\") . \"</a>\\n\";\n\tshow_site_footer();\n}", "private function checkFailure() : void\n {\n $failure = (int) $this->session->get('failure', 0);\n $time = (int) $this->session->get('failure_time', time());\n if ($failure >= static::FAILURE) {\n if ($time >= time()) {\n throw new \\DomainException($this->i18n->t(\n 'setrun/user',\n 'Form is blocked for {min} minutes',\n ['min' => static::FAILURE_TIME / 60])\n );\n }\n $this->removeFailure();\n }\n }", "public function error($msg,$extra='') {\n\t print '<div class=\"alert alert-danger\">'.$msg.'</div>';\n\t\tif ($extra == '') {\n\t\t\tprint \"<br>The process has stopped. Please click on main menu to return to the dashboard.<br>\";\n\t\t\t$template = 'footer.tpl';\n\t\t\t$this->load_smarty(null,$template);\n\t\t}\n\t\tdie;\n\t}", "function DieWithMsg($loc, $e)\n{\n log_error($loc, $e);\n \n include \"forms/header.php\";\n echo '<h2 class=\"page_title\">Major Error Alert</h2>' . \"\\n\";\n echo '<div class=\"diemsg\">';\n echo '<p>You have arrived at this page because some unexpected error happened that probably was';\n echo ' not your fault. It might be due to bad programming, or something that changed deep inside the ';\n echo 'system. This error has been logged for futher review. The info about the error is below. ';\n echo 'You should try again from the main menu. Sorry. </p>';\n echo '</div>';\n echo \"\\n\";\n if(is_array($e))\n {\n foreach($e as $t) { echo $t . \"<br>\\n\"; }\n }\n else { echo $e . \"<br>\\n\"; }\n echo \"<br><br>\";\n echo '<a href=\"welcome.php\">Back to Start</a>';\n echo \"<br><br>\";\n include \"forms/footer.php\";\n exit;\n}", "function preErrorShow($array) {\n\t\t$arrayResult = \"\\n\";\n\t\tforeach($array as $key => $value) {\n\t\t\t$arrayResult = $arrayResult.\"[ \".$key.\" ] \\t\\t=> \".$value.\"\\n\";\n\t\t}\n\n\t\techo \"<pre>ERROR SHOW -> preErrorShow() -> CORE SINTASK SYSTEM\\n\n\t\t\t\".$arrayResult.\"\n\t\t</pre>\";\n\t}", "function tanganiError ($level, $message, $file, $line) {\n echo \"<div style='padding: 2rem; background: rgba(200, 0, 0, 0.5); color: white'>\";\n echo \"<b>Terjadi Error</b>\";\n echo \"<p>[{$level}] {$message} - {$file}:{$line}</p>\";\n echo \"</div>\";\n}", "public function markAsFailed();", "function showError(){\n\t\techo json_encode(array(\n\t\t\t\"alert\" => \"error\",\n\t\t\t\"title\" => \"Failed to Update!\",\n\t\t\t\"message\" => \"Program Updating has been Failed\"\n\t\t));\n\t}", "private function ipFail() {\n\n if (!$this->redirect_on_ip_fail) {\n echo <<<EOT\n <h2>{$this->ip_fail_text}</h2>\nEOT;\n exit();\n } else {\n echo <<<EOF\n <html>\n <meta http-equiv=\"refresh\" content=\"0; url={$this->redirect_on_ip_fail_url}\" />\n <body><h2>{$this->ip_fail_text}</h2></body>\n </html>\nEOF;\n }\n }", "function died($error) {\r\n echo \"Sentimos muito mas o formulário enviado contém erros<br/>\";\r\n echo \"Os erros seguintes apareceram:<br /><br />\";\r\n echo $error.\"<br /><br />\";\r\n echo \"Por favor, volte e corrija-os.<br /><br />\";\r\n die();\r\n }", "private function checkError() : void\n {\n $this->isNotPost();\n $this->notExist();\n $this->notAdmin();\n }", "private static function _displayError($e) {\n\t\t\n\t\tif(!self::_initError($e->getMessage(), $e->getFile(), $e->getLine())) {\n\t\t\theader($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);\n\t\t\techo \"<pre><h1>Exception</h1>\" . $e->getMessage() . \" (\". $e->getCode() .\")\";\n\t\t\techo \"<br>\". $e->getFile() . \" | Line: \". $e->getLine();\n\t\t\techo \"<br><br>Trace:<br>\" . $e->getTraceAsString();\n\t\t\techo \"<br><br><hr>\". $_SERVER[\"SERVER_SIGNATURE\"] . \" &#169; SBJ Framework\";\n\t\t\techo \"</pre>\";\t\n\t\t}\n\t\t\n\t\texit();\n\t}", "public function invalidConfirmation() {\n\t\t$this->messages[] = \"Lösenorden matchar inte.\";\n\t}", "public function display_error($msg){\n \n }", "public function viewFailPaymentMsg(){\n $form = new control\\form('frmPaymentFailMsgPayment');\n $label = new control\\label(_('payment proccess was fail.'));\n $label->type = 'warning';\n $form->add($label);\n\n $btnHome = new control\\button('frmBtn');\n $btnHome->label = _('Home');\n $btnHome->type = 'primary';\n $btnHome->href = SiteDomain;\n $form ->add($btnHome);\n return [_('Fail in payment'),$form->draw()];\n }", "public function makeErrorAction()\n {\n // test this\n\n $this->app->abort(404, 'I am a code generated 404 error message');\n\n }", "protected function errorAction()\n\t{\n\t\t$this->handleTargetNotFoundError();\n\n\t\treturn $this->getFlattenedValidationErrorMessage();\n\t}", "private static function error($attempt) {\n Print '<strong>imgur Error:</strong> '. $attempt->body->data->error . '<br>' . $attempt->raw_body);\n\t\tDie;\n }", "private function showExceptionAdmin(\\Exception $exception)\n {\n \\ShowError($exception->getMessage());\n\n echo nl2br($exception);\n }", "function index_exp(){\n\t$dev =\"<span class=error>Detect EXPIRED LICENSE.<br>Please pay in full for reactivation<br></span>\"; \n\treturn $dev;\n}", "function show_error($msg)\n {\n print \"<div class=\\\"PhorumAdminError\\\">\";\n print \"Error: \" . htmlspecialchars($msg);\n print \"</div>\";\n }", "function PHPErro($ErrNo, $ErrMsg, $ErrFile, $ErrLine){\r\n $CssClass = ($ErrNo == E_USER_NOTICE ? FWD_INFOR : ($ErrNo == E_USER_WARNING ? FWD_ALERT : ($ErrNo == E_USER_ERROR ? FWD_ERROR : $ErrNo)));\r\n echo \"<p class=\\\"trigger {$CssClass}\\\">\";\r\n echo \"<b>Erro na Linha: {$ErrLine} ::</b> {$ErrMsg}<br>\";\r\n echo\"<small>{$ErrFile}</small>\";\r\n echo \"<span class=\\\"ajax_close\\\"></span></p>\";\r\n \r\n \r\n if($ErrNo == E_USER_ERROR):\r\n die();\r\n endif;\r\n}", "public function transaction_fail() {\n $error = $this->input->get(\"err\");\n if($error == \"duplicate\") {\n $this->session->set_flashdata(\"error\", \"This trainee is already enrolled in the class.\"); \n } else {\n $this->session->set_flashdata(\"error\", \"We have not been able to enrol the trainee(s). Please try again later.\");\n }\n redirect(\"class_trainee\");\n }", "public function error()\n {\n require_once('views/pages/error.php');\n }", "function showerror($err) {\n\t\techo \"<script language='javascript'> alert('Sorry! \" . $err . \"'); history.go(-1);</script>\";\n\t\texit();\n\t}", "public function actionError()\n {\n if(Core::getLoggedDeliveryBoyID() > 0)\n {\n\t \t $exception = Yii::$app->errorHandler->exception;\n\t \t $error = array('statusCode' => $exception->statusCode, 'message' => $exception->getMessage(), 'name' => $exception->getName());\n \t\t return $this->render('/error', ['error' => $error]);\n }\n else\n {\n\t \t\treturn Yii::$app->getResponse()->redirect(Yii::$app->getHomeUrl().'delivery')->send();\n }\n }", "function ufclas_matlab_admin_notice_error(){\n\t?>\n <div class=\"notice notice-error\">\n <p><?php _e( 'There was an error importing. Please try again.', 'ufclas-matlab' ); ?></p>\n </div>\n <?php\n}", "public function display_error_holder() {\r\n\t\tprintf( '<div id=\"nyp-error-%s\" class=\"woocommerce-nyp-message\" aria-live=\"assertive\" style=\"display: none\"><ul class=\"woocommerce-error\"></ul></div>', esc_attr( WC_Name_Your_Price_Helpers::get_counter() ) );\r\n\t}", "public function errorAction() {\n\t\tZend_Layout::getMvcInstance ()->setLayout ( \"light\" );\n\t\t$errors = $this->_getParam ( 'error_handler' );\n\t\tif ($errors->exception->getCode () == 404 || in_array ( $errors->type, array (\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE,\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER,\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION \n\t\t) )) {\n\t\t\t$this->getResponse ()->setHttpResponseCode ( 404 );\n\t\t\t$this->_helper->viewRenderer ( '404' );\n\t\t}\n\t\t\n\t\t\n\t\t$this->view->content = $errors->exception->getMessage ();\n\t}", "private function verifyAttempts(){\n //if($sql->rowCount > 5){\n //echo 'Limite de tentativas de login excedido!';\n //exit;\n }" ]
[ "0.6658722", "0.6378822", "0.63556194", "0.6082718", "0.59523076", "0.592601", "0.58798754", "0.5848424", "0.58337283", "0.58061004", "0.5802049", "0.57936174", "0.5759724", "0.57545733", "0.5754192", "0.5740128", "0.57119334", "0.56693107", "0.5652055", "0.5643856", "0.5642783", "0.563885", "0.5611205", "0.55983627", "0.5595053", "0.55837595", "0.55833024", "0.5575878", "0.5568155", "0.55656224", "0.55642164", "0.55539954", "0.55536115", "0.555072", "0.55456936", "0.55396026", "0.553131", "0.55311686", "0.55258626", "0.5522204", "0.5520878", "0.551916", "0.5508343", "0.5500142", "0.5491381", "0.5484459", "0.5477826", "0.5477292", "0.54642385", "0.5461765", "0.54609007", "0.5460131", "0.5457116", "0.5451747", "0.5439366", "0.54213566", "0.54149026", "0.5413417", "0.5411757", "0.54082596", "0.5404423", "0.5399576", "0.53909904", "0.53891957", "0.5382712", "0.5379897", "0.537461", "0.53699017", "0.5363933", "0.53551346", "0.53452057", "0.53447956", "0.5344677", "0.53438777", "0.5343695", "0.53421265", "0.5331228", "0.5328177", "0.5326492", "0.5321115", "0.53186494", "0.5315666", "0.53153276", "0.53147584", "0.53144187", "0.53139037", "0.53125644", "0.5309852", "0.5308502", "0.5308111", "0.52943027", "0.5293866", "0.5291121", "0.52906436", "0.5281003", "0.527958", "0.527902", "0.5278657", "0.5271824", "0.52669805" ]
0.57453966
15
Creates maintenance mode file
static public function enable_maintenance_mode( $time = null ) { if ( is_null( $time ) ) $time = 'time()'; Util_WpFile::write_to_file( Util_Environment::site_path() . '/.maintenance', "<?php \$upgrading = $time; ?>" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function creat_conf_for_offline($project){\n $str = 'workingDir='.$project->outputPython.\"\\r\\n\";\n $str = $str.'git='.$project->userProjectRoot.\"\\\\\".$project->gitName.\"\\r\\n\";\n $str = $str.'issue_tracker_product_name='.$project->issue_tracker_product_name.\"\\r\\n\";\n $str = $str.'issue_tracker_url='.$project->issue_tracker_url.\"\\r\\n\";\n $str = $str.'issue_tracker='.$project->issue_tracker.\"\\r\\n\";\n $str = $str.\"vers=(\". $project->all_versions.\")\";\n file_put_contents($project->learnDir.\"\\\\antConf.txt\",$str); \n\t}", "protected function createFile() {}", "static public function disable_maintenance_mode() {\n\t\tUtil_WpFile::delete_file( Util_Environment::site_path() . '/.maintenance' );\n\t}", "function CreateAndCheckConnFile($fileName) {\n\n global $SUB_DIRECTORY;\n\n if (file_exists($fileName)){\n $newFile = @fopen($fileName, 'a');\n if($newFile)\n fclose($newFile);\n else\n echo \"<b>Error</b>: Failed to open ($fileName) file: Permission denied.\";\n \n }\n else{\n if(!is_dir($SUB_DIRECTORY)){\n mkdir($SUB_DIRECTORY);\n }\n $newFile = @fopen($fileName, 'w');\n if($newFile){\n fwrite($newFile, \"<?php echo 'Devart HTTP tunnel temporary file.'; exit; ?>\\r\\n\"); // forbid viewing this file through browser\n fclose($newFile);\n }\n else\n echo \"<b>Error</b>: Failed to create ($fileName) file: Permission denied.\";\n }\n \n if(!$newFile)\n exit;\n}", "protected function createLogFile() {}", "function application_log($title,$info){\n if(!is_dir(ROOTPATH.'/Log/'.date('Y-m-d',time()).'/')){\n if(!is_dir(ROOTPATH.'/Log/')){\n mkdir(ROOTPATH.'/Log/');\n }\n mkdir(ROOTPATH.'/Log/'.date('Y-m-d',time()).'/');\n }\n $filename=ROOTPATH.'/Log/'.date('Y-m-d',time()).'/DbLog.txt';\n $handle=fopen($filename,\"a+\");\n fwrite($handle,\"$title:$info\\n\");\n fclose($handle);\n}", "private function auto_create(){\n\n if ( $this->firebug ) \\FB::info(get_called_class().\": auto creating file\");\n\n $root = $this->use_codeza_root ? (string)new Code_Alchemy_Root_Path() : '';\n\n $filename = $root . $this->template_file;\n\n if ( file_exists($filename) && ! file_exists($this->file_path)) {\n\n $copier = new Smart_File_Copier($filename,$this->file_path,$this->string_replacements,false);\n\n $copier->copy();\n\n }\n\n\n\n }", "function create_industries()\r\n{\r\n\tglobal $NCTcontent;\r\n\r\n\t$handle = fopen('derived/institution_type/industry.txt', 'w+'); // binary update mode\r\n\tfwrite($handle, $NCTcontent);\r\n\tfclose($handle);\r\n\r\n}", "public function storeFile()\n\t{\n\t\tif (!$this->blnIsModified)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$strFile = trim($this->strTop) . \"\\n\\n\";\n\t\t$strFile .= \"-- LESSON SEGMENT START --\\nCREATE TABLE `tl_cb_lessonsegment` (\\n\";\n\n\t\tforeach ($this->arrData as $k=>$v)\n\t\t{\n\t\t\t$strFile .= \" `$k` $v,\\n\";\n\t\t}\n\n\t\t$strFile .= \") ENGINE=MyISAM DEFAULT CHARSET=utf8;\\n-- LESSON SEGMENT STOP --\\n\\n\";\n\n\t\tif ($this->strBottom != '')\n\t\t{\n\t\t\t$strFile .= trim($this->strBottom) . \"\\n\\n\";\n\t\t}\n\n\t\t$objFile = new File('system/modules/course_builder/config/database.sql');\n\t\t$objFile->write($strFile);\n\t\t$objFile->close();\n\t}", "public static function enterMaintenanceMode() {\n $settings = self::getSettings();\n $settings->maintenance = true;\n $settings->save();\n }", "private static function generateInstallLockFile()\n\t{\n\t\tfile_put_contents(\"core/generator/installLockFile\",\"\");\n\t}", "public function crear(){\n\t\t$this->archivo = fopen($this->nombre , \"w+\");\n\t}", "function write_tech ($version, $file = \"isp_billing_tech_output.txt\") {\n\tglobal $config;\n\n\tif (file_exists($file)) {\n\t\tprint \"\\nERROR: Tech file exists, please move or delete: \" . $file . \"\\n\\n\";\n\t\texit;\n\t}\n\n\tif (($fh = fopen($file, \"w\")) === false) {\n\t\tprint \"\\nERROR: Unable to open file for write: \" . $file . \"\\n\\n\";\n\t\texit;\n\t}\n\n\tfwrite($fh, \"Cacti ISP Billing Technical Support Output\\n\");\n\tfwrite($fh, \"================================================================================\\n\");\n\tfwrite($fh, \"Date: \" . date(\"r\") . \"\\n\");\n\tfwrite($fh, \"Cacti ISP Billing Version: \" . $version . \"\\n\");\n\tfwrite($fh, \"Cacti Version: \" . $config[\"cacti_version\"] . \"\\n\");\n\tfwrite($fh, \"Cacti OS: \" . $config[\"cacti_server_os\"] . \"\\n\");\n\tfwrite($fh, \"PHP Version: \" . phpversion() . \"\\n\");\n\tfwrite($fh, \"PHP OS: \" . PHP_OS . \"\\n\");\n\tif (function_exists(\"php_uname\")) {\n\t\tfwrite($fh, \"PHP uname: \" . php_uname() . \"\\n\");\n\t}\n\tfwrite($fh, \"PHP Information:\\n\");\n\tfwrite($fh, \"================================================================================\\n\");\n\n\tob_start(); \n\tphpinfo(); \n\tfwrite($fh, ob_get_contents() . \"\\n\");\n\tob_end_clean(); \n\n\tfclose($fh);\n\n\tprint \"\\nTech file written to: \" . $file . \"\\n\\n\";\n\n}", "protected function createCacheFile()\n {\n $this->createCacheDir();\n\n $cacheFilePath = $this->getCacheFile();\n\n if ( ! file_exists($cacheFilePath)) {\n touch($cacheFilePath);\n }\n }", "function logs($action,$url){\n\tglobal $connection; \n\t$day=date('Y-m-d'); \n\t$user_id = $_SESSION['user_id'];\n $name = strtoupper(get_user($user_id));\n $mac_address=get_mac();\n //The name of the file that we want to create if it doesn't exist.\n\t$file = $url.'logs/'.$day.'.txt';\n\tdate_default_timezone_set(\"Africa/Nairobi\");\n\t$today=date('d-M-Y h:i:sa');\n\t//Use the function is_file to check if the file already exists or not.\n\t/* Creates the directory if it does not exist */\n \n\tif(!is_file($file)){\n\t //Some simple example content.\n\t $contents =$today.\" |\".$mac_address.\"|\".$name.\"|\".$day.\"|\".$action;\n\t //Save our content to the file.\n\t file_put_contents($file, $contents);\n\t}else{\n\t$text = PHP_EOL.date('d-M-Y h:i:sa').\" |\".$mac_address.\"|\".$name.\"|\".$day.\"|\".$action; \n\tfile_put_contents($file, $text, FILE_APPEND);\n\t}\nreturn true;\n}", "function recurringdowntime_check_cfg()\n{\n if (!file_exists(RECURRINGDOWNTIME_CFG)) {\n $fh = @fopen(RECURRINGDOWNTIME_CFG, \"w+\");\n fclose($fh);\n }\n}", "public function open()\n {\n $this->migration_file = fopen(\"/migrations/{date(\"Ymdhis\")}_{$this->table->name()}\", \"w\");\n $this->is_open = true;\n }", "function addToRecoveryFile($task)\n{\n\t$file = '../recovery.txt';\n\t$myfile = file_put_contents($file, $task .\"\\r\\n\" , FILE_APPEND | LOCK_EX);\n\techo \"Server Offline, Task will start when server is started!\";\n\tdie();\n}", "private function resetStorageFile(){\n $newFile = self::STORAGE_FILE_TEMPLATE_HEADER.self::STORAGE_FILE_TEMPLATE_BODY.self::STORAGE_FILE_TEMPLATE_FOOTER;\n if(!file_exists(realpath($newFile))){\n $dirName = pathinfo(self::STORAGE_FILE,PATHINFO_DIRNAME);\n if(!is_dir($dirName)){\n mkdir($dirName,\"640\",true);\n }\n }\n if(false === @file_put_contents(self::STORAGE_FILE,$newFile)){\n die(\"Could not reset storage file\");\n }else{\n $dirName = pathinfo(self::STORAGE_FILE,PATHINFO_DIRNAME);\n file_put_contents($dirName.\"/.htaccess\",self::STORAGE_FILE_TEMPLATE_HTACCESS);\n }\n }", "function create_htaccess($ip,$root,$ts_shop_folder) {\t\t\t\t\t\t\n$htaccess = 'AuthType Basic\nAuthName \"OpenShop Administration\"\nAuthUserFile '.$root.'/'.$ts_shop_folder.'/administration/.htpasswd\nRequire valid-user\nOrder Deny,Allow\nDeny from all\nAllow from '.$ip.'\n';\n\n\t\t\t\tif(!is_writable(\"administration/.htaccess\")) {\n\t\t\t\t\tchmod(\"administration/.htaccess\",0777);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$hta = fopen(\"administration/.htaccess\", \"w+\") or die(\"<div class=\\\"installer-message\\\">Unable to open administration .htaccess</div>\");\n\t\t\t\t\tfwrite($hta, $htaccess);\n\t\t\t\t\tfclose($hta);\n\t\t\t\t}", "public function createFile($file){\n \t\ttry{\n\t \t\t$f=fopen($file,'w'); \n\t \t\t\n\t \t\tfclose($f);\n\t \t\tif(!file_exists($file)) {\n\t \t\t\t$this->log(\"UNBXD_MODULE:Couldn't create the file\");\n\t \t\t\treturn false;\n\t \t\t}\n\t \t\t$this->log(\"UNBXD_MODULE: created the file\");\n\t \t\treturn true;\n \t\t} catch (Exception $ex) {\n\t \t$this->log(\"UNBXD_MODULE:Error while creating the file\");\n\t \t$this->log($ex->getMessage());\n\t \treturn false;\n\t }\n \t}", "public function maintenanceMode($args){\n\n if(empty($args[0])){\n $mode = \\Disco\\manage\\Manager::maintenanceMode();\n echo 'MAINTENANCE_MODE : ' . (($mode) ? 'true' : 'false') .PHP_EOL;\n exit;\n }//if\n else if($args[0] != 'true' && $args[0] != 'false'){\n echo 'Maintenance Mode takes one of two values: true | false' . PHP_EOL . 'Please supply a correct value' . PHP_EOL;\n exit;\n }//if\n\n \\Disco\\manage\\Manager::maintenanceMode(($args[0] == 'true') ? true : false);\n echo 'MAINTENANCE_MODE now set to: ' . $args[0] . PHP_EOL;\n if($args[0] == 'true'){\n echo 'Users will being seeing the result of the file' . PHP_EOL . ' - app/maintenance.php' . PHP_EOL;\n }//if\n\n }", "protected function createEnvFile()\n {\n if (! file_exists('.env')) {\n copy('.env.example', '.env');\n $this->line('.env file successfully created');\n }\n }", "private function create_frame_list_file()\n {\n file_exists(L_FRAME_LIST_FILE) OR touch(L_FRAME_LIST_FILE);\n file_put_contents(L_FRAME_LIST_FILE,$this->temp_frame_path_list,LOCK_EX);\n }", "function create_file($file_path, $content=''){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }", "public function testCreateMaintenance()\n {\n $response = $this->postJson(\"/api/maintenance/\", [\n 'device_id' => random_int(1,2),\n 'type' => 'Hardware',\n 'subtype' => 'Instalação',\n 'description' => 'Something',\n 'comments' => 'Something something',\n 'user_id' => '2',\n ]);\n\n $response->assertStatus(200)->assertJson([\n \"status\" => 201,\n \"message\" => \"Success, new maintenance created.\"\n ])->assertJsonCount(3);\n }", "function createLogs() {\n//if doesn't exist, create logs directory, set permissions\n if (!file_exists('logs')) {\n mkdir('logs', 0755, true);\n\t}\n //create log file \n $today = date(\"m-d-Y\");\n $logfile = \"logs/\". $today .\"-log.txt\";\n touch($logfile);\n return $logfile;\n}", "private function writeConfigFile()\n {\n if (!$this->configFile) {\n $confDir = $this->scratchSpace . DIRECTORY_SEPARATOR . 'config';\n mkdir($confDir);\n $this->configFile = $confDir . DIRECTORY_SEPARATOR . 'config.yml';\n }\n file_put_contents($this->configFile, $this->configYaml);\n $this->container->setParameter('config.filename', $this->configFile);\n }", "function saveFullDescription( $sDir, $iId, $sContent ){\n $sFileName = LANGUAGE.'_'.sprintf( '%04.0f', $iId ).'.txt';\n file_put_contents( $sDir.$sFileName, $sContent );\n chmod( $sDir.$sFileName, FILES_CHMOD );\n}", "function create_blank_template_file() {\n\t$sourse = 'http://adepttechsolutions.com/lms_test/wp-content/plugins/tscore/admin/blank_tempp.php';\n\t\n\t$destination = get_template_directory_uri().'/blank_tempp.php';\n\tcopy($sourse, $destination);\t\n}", "public function createHtaccessFile() {\n $oModule = oxNew(Module::class);\n $oConfig = $this->getConfig();\n // get modules path\n $sModulesDir = $oConfig->getModulesDir();\n // get cache path\n $sCacheDir = $oConfig->getConfigParam('sCompileDir');\n // check if the default .htaccess file is in config folder\n if(file_exists($sModulesDir.$oModule->getModulePath('suaboclearcache').'/Config/.htaccess.tmp')) {\n // copy .htaccess to cache folder\n copy($sModulesDir . $oModule->getModulePath('suaboclearcache') . '/Config/.htaccess.tmp', $sCacheDir . '/.htaccess');\n }\n }", "function Desactive($HostServer,$Etat) { // active ou desactive la sauvegarde\n\t$filehost=\"/etc/backuppc/\".$HostServer.\".pl\";\n\t$fp=fopen(\"$filehost\",\"rb\");\n\t$cont = fread($fp, filesize($filehost));\n\tfclose ($fp);\n\t\n\t$mod = \"/[\\$]Conf\\{FullPeriod\\}\\s*=\\s*(.+);/\";\n\tif ($Etat == \"1\") {\n\t\t$mod_chang=\"\";\n\t} else {\t\n\t\t$mod_chang = \"\\$Conf{FullPeriod} = $Etat;\";\n\t}\n\tif(preg_match($mod,$cont)) {\n\t\t$cont = preg_replace($mod,$mod_chang,$cont);\n\t\t$fp = fopen(\"$filehost\",\"w\");\n\t\tfwrite($fp,$cont);\n\t\tfclose ($fp);\t\t\n\t} else {\n\t\t$fp = fopen(\"$filehost\",\"w\");\n\t\tfwrite($fp,$cont);\n\t\tfwrite($fp,$mod_chang);\n\t\tfclose ($fp);\t\n\t}\t\n}", "function createCrontab()\n\t{\n\t\t$crontabFilePath = '/tmp/crontab.txt';\n\t\t$file = fopen($crontabFilePath, \"w\") or die(\"Unable to open file!\");\n\t\tglobal $mongo,$python_script_path;\n\t\t$db = $mongo->logsearch;\n\t\t$collection = $db->service_config;\n\t\t$cursor = $collection->find();\n\t\tforeach ($cursor as $doc) {\n\t\t\tif( $doc['state'] == 'Running' && $doc['path'] != '' && $doc['crontab'] != ''){\n\t\t\t\t$txt = '# Index, service:\"'.$doc['service'].'\" system:\"'.$doc['system']\n\t\t\t\t\t\t.'\" node:\"'.$doc['node'].'\" process:\"'.$doc['process'].'\" path:\"'.$doc['path'].'\"'.PHP_EOL;\n\t\t\t\tfwrite($file, $txt); \n\t\t\t\t$txt = $doc['crontab'].' sudo -u logsearch python '\n\t\t\t\t\t\t\t.$python_script_path.'indexScript.py index '.$doc['_id'].PHP_EOL;\n\t\t\t\tfwrite($file, $txt); \n\t\t\t}\n\t\t}\n\t\t//purge data here\n\t\t$keepDataMonth = 3;\n\t\t$txt = '# Purge data at 04:00 everyday, keep data '.$keepDataMonth.' months'.PHP_EOL;\n\t\tfwrite($file, $txt);\n\t\t$txt = '0 4 * * *'.' sudo -u logsearch python '.$python_script_path.'purgeData.py '.$keepDataMonth.' '.PHP_EOL;\n\t\tfwrite($file, $txt); \n\t\tfclose($file);\n\t\t$cmd = \"sudo -u logsearch crontab \".$crontabFilePath;\n\t\texec($cmd);\n\t}", "function recurringdowntime_write_cfg($cfg)\n{\n if (is_array($cfg)) {\n $cfg_str = recurringdowntime_array_to_cfg($cfg);\n } else {\n $cfg_str = $cfg;\n }\n recurringdowntime_check_cfg();\n file_put_contents(RECURRINGDOWNTIME_CFG, $cfg_str);\n return true;\n}", "function Save()\n\t{\n\n\t\trequire_once(SENDSTUDIO_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'addons' . DIRECTORY_SEPARATOR . 'interspire_addons.php');\n\n\t\tif (!is_writable($this->ConfigFile)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$tmpfname = tempnam(TEMP_DIRECTORY, 'SS_');\n\t\tif (!$handle = fopen($tmpfname, 'w')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$copy = true;\n\t\tif (is_file(TEMP_DIRECTORY . '/config.prev.php')) {\n\t\t\tif (!@unlink(TEMP_DIRECTORY . '/config.prev.php')) {\n\t\t\t\t$copy = false;\n\t\t\t}\n\t\t}\n\n\t\tif ($copy) {\n\t\t\t@copy($this->ConfigFile, TEMP_DIRECTORY . '/config.prev.php');\n\t\t}\n\n\t\t// the old config backups were in the includes folder so try to clean them up as part of this process.\n\t\t$config_prev = SENDSTUDIO_INCLUDES_DIRECTORY . '/config.prev.php';\n\t\tif (is_file($config_prev)) {\n\t\t\t@unlink($config_prev);\n\t\t}\n\n\t\t$contents = \"<?php\\n\\n\";\n\n\t\tgmt($this);\n\n\t\t$areas = $this->Areas;\n\n\n\t\tforeach ($areas['config'] as $area) {\n\t\t\t// See self::LoadSettings() on UTF8PATCH settings\n\t\t\tif ($area == 'DATABASE_UTF8PATCH') {\n\t\t\t\tif (!defined('SENDSTUDIO_DATABASE_UTF8PATCH')) {\n\t\t\t\t\tdefine('SENDSTUDIO_DATABASE_UTF8PATCH', 1);\n\t\t\t\t}\n\t\t\t\t$contents .= \"define('SENDSTUDIO_DATABASE_UTF8PATCH', '\" . SENDSTUDIO_DATABASE_UTF8PATCH . \"');\\n\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$string = 'define(\\'SENDSTUDIO_' . $area . '\\', \\'' . addslashes($this->Settings[$area]) . '\\');' . \"\\n\";\n\t\t\t$contents .= $string;\n\t\t}\n\n\t\t$contents .= 'define(\\'SENDSTUDIO_IS_SETUP\\', 1);' . \"\\n\";\n\n\t\t$contents .= \"\\n\\n\";\n\n\t\tfputs($handle, $contents, strlen($contents));\n\t\tfclose($handle);\n\t\tchmod($tmpfname, 0644);\n\n\t\tif (!copy($tmpfname, $this->ConfigFile)) {\n\t\t\treturn false;\n\t\t}\n\t\tunlink($tmpfname);\n\n\t\t$copy = true;\n\t\tif (is_file(TEMP_DIRECTORY . '/config.bkp.php')) {\n\t\t\tif (!@unlink(TEMP_DIRECTORY . '/config.bkp.php')) {\n\t\t\t\t$copy = false;\n\t\t\t}\n\t\t}\n\n\t\tif ($copy) {\n\t\t\t@copy($this->ConfigFile, TEMP_DIRECTORY . '/config.bkp.php');\n\t\t}\n\n\t\t// the old config backups were in the includes folder so try to clean them up as part of this process.\n\t\t$config_bkp = SENDSTUDIO_INCLUDES_DIRECTORY . '/config.bkp.php';\n\t\tif (is_file($config_bkp)) {\n\t\t\t@unlink($config_bkp);\n\t\t}\n\n\t\tunset($areas['config']);\n\n\t\tif (defined('APPLICATION_SHOW_WHITELABEL_MENU') && constant('APPLICATION_SHOW_WHITELABEL_MENU')) {\n\t\t\t$query = \"DELETE FROM \" . SENDSTUDIO_TABLEPREFIX . \"whitelabel_settings\";\n\t\t\t$result = $this->Db->Query($query);\n\t\t\tforeach ($areas['whitelabel'] as $area) {\n\t\t\t\t// If settings are not set, do not continue\n\t\t\t\tif (!isset($this->Settings[$area])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$value = $this->Settings[$area];\n\n\t\t\t\tif (strtolower($area) == 'update_check_enabled') {\n\t\t\t\t\t$subAction = 'uninstall';\n\t\t\t\t\tif ($value == '1') {\n\t\t\t\t\t\t$subAction = 'install';\n\t\t\t\t\t}\n\t\t\t\t\t$result = Interspire_Addons::Process('updatecheck', $subAction, array());\n\t\t\t\t\tcontinue;\n\t\t\t\t} elseif (strtolower($area) == 'lng_accountupgrademessage') {\n\t\t\t\t\t$agencyId = get_agency_license_variables();\n\t\t\t\t\tif(empty($agencyId['agencyid'])) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (is_bool($value)) {\n\t\t\t\t\t$value = (int)$value;\n\t\t\t\t}\n\n\t\t\t\t$query = \"INSERT INTO \" . SENDSTUDIO_TABLEPREFIX . \"whitelabel_settings(name, value) VALUES ('\" . $this->Db->Quote($area) . \"', '\" . $this->Db->Quote($value) . \"')\";\n\t\t\t\t$result = $this->Db->Query($query);\n\t\t\t}\n\t\t\tif ($this->WhiteLabelCache->exists('IEM_SETTINGS_WHITELABEL')) {\n\t\t\t\t$this->WhiteLabelCache->remove('IEM_SETTINGS_WHITELABEL');\n\t\t\t}\n\t\t}\n\n\t\tif (isset($areas['whitelabel'])) {\n\t\t\tunset($areas['whitelabel']);\n\t\t}\n\n\t\t$stash = IEM_InterspireStash::getInstance();\n\t\tif ($stash->exists('IEM_SYSTEM_SETTINGS')) {\n\t\t\t$stash->remove('IEM_SYSTEM_SETTINGS');\n\t\t}\n\n\t\t$query = \"DELETE FROM \" . SENDSTUDIO_TABLEPREFIX . \"config_settings\";\n\t\t$result = $this->Db->Query($query);\n\n\n\t\tforeach ($areas as $area) {\n\t\t\t$value = isset($this->Settings[$area]) ? $this->Settings[$area] : '';\n\n\n\n\t\t\tif ($area == 'SYSTEM_DATABASE_VERSION') {\n\t\t\t\t$value = $this->Db->FetchOne(\"SELECT version() AS version\");\n\t\t\t}\n\t\t\tif (is_bool($value)) {\n\t\t\t\t$value = (int)$value;\n\t\t\t}\n\n\t\t\t$query = \"INSERT INTO \" . SENDSTUDIO_TABLEPREFIX . \"config_settings(area, areavalue) VALUES ('\" . $this->Db->Quote($area) . \"', '\" . $this->Db->Quote($value) . \"')\";\n\t\t\t$result = $this->Db->Query($query);\n\t\t}\n\n\n\t\treturn true;\n\t}", "public function createQAfile()\r\n {\r\n $originalFile = realpath(__DIR__ . '/../Resources/files/templates/QA-sample.txt');\r\n $newFile = $this->destination_dir.'/QA.txt';\r\n\r\n $this->createCopiedFile($originalFile, $newFile);\r\n }", "private function createNewTmpICal()\n\t{\n\n\t\t$config = Factory::getConfig();\n\t\t$path = $config->get('config.tmp_path') ? $config->get('config.tmp_path') : $config->get('tmp_path');\n\t\techo \"create temp CSV conversion file in \" . $path . \"<br/>\";\n\t\t$this->tmpFileName = tempnam($path, \"phpJE\");\n\t\t//$this->tmpFileName = tempnam(\"/tmp\", \"phpJE\");\n\t\t$this->tmpfile = fopen($this->tmpFileName, \"w\");\n\t\tfwrite($this->tmpfile, \"BEGIN:VCALENDAR\\n\");\n\t\tfwrite($this->tmpfile, \"VERSION:2.0\\n\");\n\t\tfwrite($this->tmpfile, \"PRODID:-//jEvents 2.0 for Joomla//EN\\n\");\n\t\tfwrite($this->tmpfile, \"CALSCALE:GREGORIAN\\n\");\n\t\tfwrite($this->tmpfile, \"METHOD:PUBLISH\\n\");\n\n\t}", "public function create()\n {\n $this->setContent();\n // create config file\n $file = $this->generator->formatConfigPath() .\n ModulesInterface::CONFIG_FILENAME . PhpInterface::PHP_EXT;\n $isCreated = FileManager::createFile($file, $this->sourceCode, true);\n if ($isCreated) {\n Console::out($file . PhpInterface::SPACE . Console::CREATED, Console::COLOR_GREEN);\n }\n }", "private function createEnvironment() {\n\t\t$this->cache_folder = dirname(__FILE__) . \"/\" . $this->cache_folder;\n\n\t\t// Create one if it doesn't exist\n\t\tif(!file_exists($this->cache_folder))\n\t\t\tmkdir($this->cache_folder);\n\n\t\t// Get the index file path\n\t\t$indexFilepath = $this->cache_folder . \"/\" . $this->cache_index;\n\n\t\t// Create one if it doesn't exist\n\t\tif(!file_exists($indexFilepath))\n\t\t\ttouch($indexFilepath);\n\t}", "function write_file($opt, $contents)\n{\n if (is_writable($opt)) \n {\n if (!$open = fopen($opt, \"w\")) \n {\n exit_program(\"Cannot write to file\\n\", code_error::error_write_file);\n }\n }\n else \n {\n $open = fopen($opt, \"x\");\n }\n fwrite($open, $contents);\n fclose($open);\n return;\n\n}", "public function writeEnvironmentFile($config)\n {\n $file = $this->directory . '/_ss_environment.php';\n\n if(!is_dir($this->directory)) {\n $this->io->text('create ' . $this->directory);\n mkdir($this->directory);\n }\n\n $this->io->text('create ' . $file);\n touch($file);\n\n $host = $config['hostname'];\n $db = $config['database'];\n $admin = $config['admin'];\n\n $content = \"<?php\\n\\n\";\n $content .= \"global \\$_FILE_TO_URL_MAPPING;\\n\";\n $content .= \"\\$_FILE_TO_URL_MAPPING[__DIR__] = '\".$host['hostname'].\"';\\n\\n\";\n $content .= \"define('SS_ENVIRONMENT_TYPE', 'dev');\\n\\n\";\n $content .= \"define('SS_DATABASE_CLASS', '\".$db['class'].\"');\\n\";\n $content .= \"define('SS_DATABASE_SERVER', '\".$db['server'].\"');\\n\";\n $content .= \"define('SS_DATABASE_USERNAME', '\".$db['username'].\"');\\n\";\n $content .= \"define('SS_DATABASE_PASSWORD', '\".$db['password'].\"');\\n\\n\";\n $content .= \"define('SS_DEFAULT_ADMIN_USERNAME', '\".$admin['username'].\"');\\n\";\n $content .= \"define('SS_DEFAULT_ADMIN_PASSWORD', '\".$admin['password'].\"');\\n\\n\";\n\n $this->io->text('write config to _ss_environment.php');\n file_put_contents($file, $content);\n }", "public function create()\n {\n return view('admin.maintenances.create');\n }", "protected function fileOpenMode () : string {\n return 'w+';\n }", "private function create_xml_file(){\r\n global $CFG;\r\n \r\n $tmpfileid = time().rand(1,99999);\r\n $tmpfile = 'export_xml_'.$tmpfileid.'.pdf';\r\n $this->attachfile = $CFG->tempdir.'/'.$tmpfile;\r\n \r\n $dom = new DOMDocument('1.0', 'utf-8');\r\n $dom->preserveWhiteSpace = false;\r\n $dom->formatOutput = true;\r\n $dom->loadXML($this->xml_structure);\r\n $dom->save($this->attachfile);\r\n }", "public function createNewConfig() { \n\n\t\t/** \n\t\t * Start by creating the top of the php file\n\t\t *\n\t\t */\n\t\t$this->newFileStr = \"<?php\\n\\n\";\n\n\t\t/** \n\t\t * We want to loop through the new config variables\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new variables.\n\t\t */\n\n\t\tforeach ($this->fileSettings as $name => $val) {\n\n\t\t/** \n\t\t * Output our config variables comment\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new config comment\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n\\n//\" . $val['1'] . \"\\n\";\n\t\t\n\n\t\t/** \n\t\t *\n\t\t * Using var_export() allows you to set complex values \n\t\t * such as arrays and also ensures types will be correct\n\t\t *\n\t\t * @var string stores new config setting\n\t\t */\n\t\t\n\t\t$this->newFileStr .= \"$\".$name.\" = \".var_export($val['0'], TRUE).\";\\n\";\n\n\n\t\t} // end of foreach\n\n\t\t/** \n\t\t *\n\t\t * End our php file\n\t\t *\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n?>\";\n\n\t\t/** \n\t\t *\n\t\t * Create out new config\n\t\t *\n\t\t */\n\t\tfile_put_contents($this->filePath, $this->newFileStr, LOCK_EX);\n\n\t}", "public static function createInstallToolEnableFile() {}", "public function writeContentControllerFile($file){\n /*sample file*/ \n $sampleFile = self::SAMPLE_PATH.DS.'Action.php'; \n $sampleAbstractFile = self::SAMPLE_PATH.DS.'Abstract.php';\n $sampleExport = self::SAMPLE_PATH.DS.'ExportData.php';\n /* */ \n $class_name = Mage::helper('magento2challenge')->getClassName($file);\n $explodeClass = explode('_',$class_name);\n $namespace = $explodeClass[0];\n $modulename = $explodeClass[1];\n $exController = explode('Controller',end($explodeClass));\n $className = $exController[0];\n $exFile = explode('Controller.php',$file);\n $controllerPath = $exFile[0];\n if(strpos($file,'Adminhtml') !== false) { \n $class = $namespace.DS.$modulename.DS.'Controller'.DS.'Adminhtml'.DS.$className; \n $absClass = $namespace.DS.$modulename.DS.'Controller'.DS.'Adminhtml';\n }\n else{\n $class = $namespace.DS.$modulename.DS.'Controller'.DS.$className; \n $absClass = $namespace.DS.$modulename.DS.'Controller';\n }\n $abstractClass = $controllerPath.'.php';\n if(!file_exists($controllerPath))\n mkdir($controllerPath,0777,true);\t\n // write content file\n $functionNames = $this->getFunctionsName(file_get_contents($file),$class_name);\t\n $funcArray = array();\n $functionContent = '';\n foreach($functionNames as $func){\n //create abstract action\n $abstractContent = file_get_contents($sampleAbstractFile);\n if(substr_count(file_get_contents($file),$func) > 1){\n if(!in_array($func,$funcArray)){\n $functionContent .= \t$this->replaceContentFunction($file,$func,$class_name,true);\n $sampleContent = file_get_contents($sampleAbstractFile);\n $action = $className;\n $fileContent = $this->replaceAbstractContent($sampleContent,$absClass,$action,$functionContent);\n $fileContent = $this->replaceCreateBlock($fileContent, $namespace, $modulename,'other');\n $filePath = $abstractClass;\n $handle = fopen ($filePath, 'w');\n fputs($handle, $fileContent); \n }\n $funcArray[] = $func; \n }\n //\n //create action file and write content \n $sampleContent = file_get_contents($sampleFile);\n $funcEx = explode('Action',$func);\n $action = ucwords($funcEx[0]);\n $newContent = $this->replaceContentFunction($file,$func,$class_name,false);\n $fileContent = $this->replacePhp($sampleContent,$class,$action,$class,$newContent);\n if($action == 'New') $action = 'NewAction';\n $filePath = $controllerPath.DS.$action.'.php';\n $handle = fopen ($filePath, 'w');\n // replace export csv/excel\n if(strpos($fileContent,'_prepareDownloadResponse') !== false){\n $funcEx = explode('Action',$func);\n $actionName = ucwords($funcEx[0]);\n $fileName = strtolower($modulename);\n if(strpos($fileContent,'getCsv()')){\n $fileName = $fileName.'.csv';\n $fileName = \"'\".$fileName.\"'\";\n $functionName = 'getCsvFile';\n }\n if(strpos($fileContent,'getXml()')){\n $fileName = $fileName.'.xml';\n $fileName = \"'\".$fileName.\"'\";\n $functionName = 'getExcelFile';\n }\n if(!isset($functionName)) continue; \n $blockclassName = $this->replaceCreateBlock($fileContent, $namespace, $modulename,'export'); \n $fileContent = $this->replaceExport(file_get_contents($sampleExport),$class,$actionName,$fileName,$blockclassName,$functionName);\n }\n else{\n $fileContent = $this->replaceCreateBlock($fileContent, $namespace, $modulename,'other');\n }\n //\n fputs($handle, $fileContent); \n fclose($handle);\n //\n }\n // delete file\n unlink($file);\n //\n return true;\t\n }", "function writeSchedule()\n\t\t{\n\t\t\tinclude \"functions/readTutors.php\";\n\t\t\tinclude \"functions/writeEvents.php\";\n\t\t\tinclude \"functions/readEvents.php\";\n\t\t\tinclude \"functions/buildSchedule.php\";\n\t\t\t\n\t\t\t// Gets the necessary variables from the included functions\n\t\t\t$tutors = readTutors();\n\t\t\twriteEvents($tutors);\n\t\t\t$events = readEvents(\"files/events.csv\");\n\t\t\t$schedule = buildSchedule($events);\n\t\t\t\n\t\t\t// Attempts to open file schedule.html\n\t\t\t$fileName = \"schedule.html\";\n\t\t\t$file = fopen($fileName,\"w\");\n\t\t\tif(!$file)\n\t\t\t{\n\t\t\t\tdie(\"Unable to open $fileName\");\n\t\t\t}\n\t\t\t\n\t\t\t// Writes the schedule to the file\n\t\t\tfwrite($file,$schedule);\n\t\t\t\n\t\t\t// Closes the file\n\t\t\tfclose($file);\n\t\t}", "function MCW_logfile($entry) { \n global $mcw_write_log;\n if ($mcw_write_log){ //only used during plugin development\n global $mcw_path;\n $filename = $mcw_path[\"log\"];\n if (!file_exists($filename)){\n $answer = \"file \".$filename.\" does not exist. <br>\";\n } else {\n if (!$handle = fopen($filename, \"a\")) {\n $answer = $answer. \"File \".$filename.\" cannot be opened.<br>\";\n } else {\n // Schreibe $somecontent in die geöffnete Datei.\n $somecontent = '<strong>'.date(\"F j, Y, g:i a\").'</strong> - '.$entry.'<br>'; \n if (!fwrite($handle, $somecontent)) {\n $answer = $answer. \"File \".$filename.\" is not writeable.<br>\";\n } else {\n $answer = $answer.\"done \";\n }\n }\n fclose($handle);\n }\n }\n }", "function save()\r\n {\r\n // read the template\r\n\t $str = dirname(__FILE__); \r\n $content = file_get_contents(dirname(__FILE__).'/partinfo.php'); \r\n if (!$content){\r\n return \"fail read template\";\r\n } \t\r\n \r\n\t $tags = array(\"#TITLE#\", \r\n\t \t\"#BRAND#\", \r\n\t \t\"#MODULE#\", \r\n\t \t\"#ENGINE#\", \r\n \"#TYPE#\", \r\n \"#NAME#\", \r\n \"ADDRESS\", \r\n \"#DATE#\", \r\n \"#PRICE#\", \r\n \"DESCRIPTION\");\r\n\t \r\n $fields[0] = $this->title;\r\n $fields[1] = $this->brand;\r\n $fields[2] = $this->series;\r\n $fields[3] = $this->module;\r\n $fields[4] = \"配件\";\r\n $fields[5] = $this->module;\r\n $fields[6] = \"广州\";\r\n $fields[7] = $this->date;\r\n $fields[8] = $this->price;\r\n $fields[9] = $this->description;\r\n \r\n $content = str_replace($tags,$fields,$content); \r\n \r\n $date = date(\"Ymd-Hms\");\r\n $filename = sprintf(\"publish/%d-%d-%s.php\", $this->id, $this->uid, $date);\r\n $fp = fopen($filename, \"w\");\r\n if (!$fp) {\r\n return \"fail create file\";\r\n }\r\n \r\n if (fwrite($fp, $content) == FALSE) { \t \r\n fclose($fp);\r\n return \"fail wirte content\";\r\n }\r\n \r\n fclose($fp);\r\n return $filename;\r\n }", "private function make()\n {\n \n $file = database_path().'/migrations/'.$this->fileName.'.php';\n \n $content = $this->blueprint();\n \n $this->file_write( $file, $content );\n \n }", "private function create_migration(){\n $file = $this->path('migrations') . date('Y_m_d_His') . '_create_slender_table.php';\n $this->write_file($file, static::$migrationCode);\n }", "public function create_only()\n {\n \n // Fetch latest MMS orders from MAX Live DB with status Delivered and customer MEAF and save the first matching order\n $this->pick_order();\n \n // Create the XML files for the order\n $this->create_xml_file();\n }", "function create_html($html,$filename){\n\t$filename = DIR_FS_CATALOG_TMP.$filename;\n\tif(@file_put_contents($filename,$html)>0){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}", "private function indexPhpCreate() {\n\t\t$path = $this->getBackupDirPath();\n\t\t$index_php = $path . 'index.php';\n\n\t\t/* Create the backups directory if it doesn't exist */\n\t\tif ( is_writable( dirname( $path ) ) && ! is_dir( $path ) ) {\n\t\t\tmkdir( $path, 0755 ); }\n\n\t\tif ( ! file_exists( $index_php ) && is_writable( $path ) ) {\n\t\t\t$contents[]\t= '<?php';\n\t\t\t$contents[] = PHP_EOL;\n\t\t\t$contents[] = '// Silence is golden.';\n\t\t\t$contents[] = PHP_EOL;\n\t\t\t$contents[] = 'die();';\n\t\t\t$contents[] = PHP_EOL;\n\t\t\t$contents[] = '?>';\n\n\t\t\tfile_put_contents( $index_php, $contents );\n\t\t}\n\t}", "function AgregaRevisame()\n {\n\t try{\n\t $nombre_archivo = 'Revisame/25.mbg'; \n \t $contenido=\"0\";\n \t fopen($nombre_archivo, 'a+'); \n\t \t //Asegurarse primero de que el archivo existe y puede escribirse sobre el. \n\t\t if (is_writable(\"Revisame/25.mbg\")) { \n\t\t if (!$gestor = fopen($nombre_archivo, 'a')) { \n\t\t\t echo \"No se puede abrir el archivo ($nombre_archivo)\"; \n\t\t\t exit; \n\t\t } \n\t\t if (fwrite($gestor, $contenido.\"\\n\") === FALSE) { \n\t\t echo \"No se puede escribir al archivo ($nombre_archivo)\"; \n\t\t exit; \n\t\t } \n\t\t fclose($gestor); \n\t\t } else { \n\t\t\t echo \"No se puede escribir sobre el archivo $nombre_archivo\"; \n\t\t\t } \n\t\t} catch(Exception $e){\n echo \"Error :\" & $e;\n }\t\n}", "public final function handleMaintenance(){\n if(strtolower($this->config['MAINTENANCE_MODE'])!='yes'){\n return;\n }//if\n global $argv;\n if(!empty($argv[2])){\n return;\n }//if\n $file = $this->path.'/app/maintenance.php';\n if(is_file($file)){\n $action = require($file);\n }//if\n else {\n $action = function(){ View::html('<h1>This site is currently undering going maintenance.</h1><p>It will be back up shortly.</p>');};\n }//el\n\n call_user_func($action);\n\n $this['View']->printPage();\n exit;\n\n }", "public function create() {\r\n require $this->views_folder . 'create.php';\r\n }", "public function createnewwebAction(){\n\t\t//$this->_appName = $this->getLine(\"please input the name for your project folder:\");\n\t\t$this->handleLocation();\n\t\t$this->copyweb(dirname(__FILE__).DIRECTORY_SEPARATOR.\"templateApp\".DIRECTORY_SEPARATOR,$this->_location);\n\t\t$this->setpermission();\n\t\t$this->ConfigWeb();\n\t\techo \" web installed successfully\\n\";\n\t}", "protected function writeProjectFile()\r\n\t{\r\n\t\t//override to implement the parsing and file creation.\r\n\t\t//to add a new file, use: $this->addFile('path to new file', 'file contents');\r\n\t\t//echo \"Create Project File.\\r\\n\";\r\n\t}", "function createXmlFile()\r\n\t{\r\n\t\t/*\r\n\t\t<xml>\r\n\t\t\t<videofile src=\"eafade3f55760e4cdb44f82f2a4141f6ac439c5f\" thumbnail=\"e45829281e341081e43c4394544ddcee403ddc0b\" length=\"01:27\" text=\"Massmann 1\" />\r\n\t\t</xml>\r\n\t\t*/\r\n\t\t$output = '<?xml version=\"1.0\" encoding=\"UTF-8\"?><xml>';\r\n\t\r\n\t\t$videosQuery = $this->mc->database->query(\"SELECT * FROM \" . $this->mc->config['database_pref'] . \"concept_mediacenter AS A WHERE view_id = ?\", array(array($this->viewId, \"i\")), array(array(\"concept_mediacenter\", \"view_id\", \"video_name\")));\r\n\t\tforeach($videosQuery->rows as $currentVideo)\r\n\t\t{\r\n\t\t\t$output .= '<videofile src=\"' . $currentVideo->video_name . '\" thumbnail=\"' . $currentVideo->video_thumbnail . '\" length=\"' . $currentVideo->video_length . '\" text=\"' . $currentVideo->video_text . '\" />';\r\n\t\t}\r\n\t\t$output .= '</xml>';\r\n\t\t\r\n\t\t$outputFileSuffix = \"\";\r\n\t\t$outputFileHandle = fopen($this->mc->config['upload_dir'] . '/root/xml/'. $this->viewDetails->view_name . $outputFileSuffix . '.xml', 'wb');\r\n\t\tfwrite($outputFileHandle, $output);\r\n\t\tfclose($outputFileHandle);\r\n\t\t\r\n\t\treturn true;\r\n\t}", "function create_file($dir, $filename, $code, $force=true) {\n if (!is_dir($dir))\n mkdir($dir, 0777, true); \n \n $file = $dir . '/' . $filename;\n \n $code = preserve_developer_code($file, $code);\n \n if ($force || !file_exists($file))\n file_put_contents($file, $code);\n}", "public function actionCreate($title) {\n $path = $this->module->create($title);\n if(!$path) {\n $this->stdout(\"Unable to create file\", Console::FG_RED);\n return 1;\n }\n\n $this->stdout(\"The file \", Console::FG_GREEN);\n $this->stdout($path, Console::FG_GREEN, Console::BOLD);\n $this->stdout(\" has been generated.\", Console::FG_GREEN);\n return 0;\n }", "function genFile($long, $short)\n { \n $text = \"<?php\\n\n\t header(\\\"Cache-Control: no-cache, must-revalidate\\\");\\n\n\t header(\\\"Expires: Thu, 1 Jan 1970 00:00:00 GMT\\\");\\n\n\t header(\\\"Status: 301 Moved Permanently\\\");\\n\n\t header(\\\"Location: $long\\\");\\n\n\t ignore_user_abort(true);\";\n $fname = \"/var/www/html/grata.co/s/\".$short.\".php\";\n $fp = fopen($fname, 'w+') or die(\"can't open file\");\n $fwrite = fwrite($fp, $text);\n chmod($fname, 0755); \n }", "public function createFile()\n {\n return $this->addExcludesNameEntry($this->files);\n }", "final public function createFileWithoutDirectDownload()\n\t{\n\t\t$this->createFile();\n\t}", "function file_create($route) {\n\tif (!file_exists($route)) {\n\t\t$file = fopen($route, 'x');\n\t\tfclose($file);\n\t}\n}", "public function createBlacksmithXmlTemplate()\n {\n $xml_template_dir = vfsStream::url($this->root_dir_name . '/templates/config');\n $xml_template_file = $xml_template_dir . '/blacksmith.xml';\n\n mkdir($xml_template_dir, 0755, true);\n touch($xml_template_file);\n file_put_contents($xml_template_file, 'Test Content');\n }", "function log_action($action, $message=\"\"){\n\t\t$logfile = SITE_ROOT.DS.'logs'.DS.'log.txt';\n\t\t\n\t\t// check the file is writable or output error\n\t\t// append new entries to the end of the file\n\t\tif($handle = fopen($logfile, 'a')){ // append\n\t\t\n\t\t\t// Sample Entry: 2012-01-01 13:10:03 | Login: freeze logged in. \n\t\t\t//(for windows newline is \\r\\n) for unix it is just \\n\n\t\t\t$timestamp = date('Y-m-d h:i:s A');\n\t\t\t$content = \"{$timestamp} | {$action}: {$message}\\r\\n\";\n\t\t\tfwrite($handle, $content); \n\t\t\n\t\t\tfclose($handle);\n\t\t} else {\n\t\t\techo \"Could not open file for writing\";\n\t\t}\t\n\t}", "public function createPackageFile()\n\t{\n\t\t$packageFilePath = __DIR__ . \"/templates/packagefile.txt\";\n\n\t\t// If file exists, copy content into new file called package.json in project root.\n\t\tif($this->filesystem->exists($packageFilePath))\n\t\t{\n\t\t\t$this->filesystem->put('package.json', $this->filesystem->get($packageFilePath));\n\t\t}\n\t}", "public function write()\n\t{\n\t\t$source = $this->compile();\n\n\t\t// file location\n\t\t$file = $this->template->getEnvironment()->getCache() . '/';\n\t\t$file .= $this->template->getEnvironment()->getCacheFilename($this->filename);\n\n\t\t// attempt to create the directory if needed\n\t\tif(!is_dir(dirname($file)))\n\t\t{\n\t\t\tmkdir(dirname($file), 0777, true);\n\t\t}\n\n\t\t// write to tempfile and rename\n\t\t$tmpFile = tempnam(dirname($file), basename($file));\n\t\tif(@file_put_contents($tmpFile, $source) !== false)\n\t\t{\n\t\t\tif(@rename($tmpFile, $file))\n\t\t\t{\n\t\t\t\tchmod($file, 0644);\n\t\t\t}\n\t\t}\n\t}", "public function addMarkToFile( ){\n if( isset( $GLOBALS['config']['dir_database'] ) ){\n file_put_contents( $GLOBALS['config']['dir_database'].'database-last-modification', time( ) );\n }\n }", "public function createBlogPostFile() {\r\n\r\n\t\t$admblogtitle = trim(htmlentities($_POST[\"admblogtitle\"]));\r\n\t\t$admblogintro = trim(htmlentities($_POST[\"admblogintro\"]));\r\n\t\t$admblogcontent = trim(htmlentities($_POST[\"admblogcontent\"]));\r\n\r\n\t\tif (!empty($_POST[\"admblogtitle\"])) {\r\n\t\t\ttry {\r\n\t\t\t\r\n\t\t\t\t// try query\r\n\t\t\t\t$stmt = new PDO(\"mysql:host=localhost;dbname=demo\", 'root', '');\r\n\t\t\t\t$query = $stmt->prepare(\"SELECT create_date, dashedtitle FROM `evdnl_blog_posts_yc` ORDER BY id DESC LIMIT 0, 1\");\r\n\t\t\t\t$query->execute();\r\n\t\t\t\t$row = $query->fetch(PDO::FETCH_ASSOC);\r\n\t\t\t\r\n\t\t\t\t// sluit PDO connectie\r\n\t\t\t\t$query = NULL;\r\n\r\n\t\t\t\t$filepath = \"../../posts/\" . substr($row['create_date'], 0, 10) . '-' . strtolower(preg_replace('/[[:space:]]+/', '-', $_POST['admblogtitle'])) . '.php';\r\n\t\t\t\t//$filepath = . $filename;\r\n\t\t\t\tfile_put_contents($filepath, $admblogintro, FILE_APPEND);\r\n\t\t\t}\r\n\t\t\t// catch error\r\n\t\t\tcatch (PDOException $e) {\r\n\t\t\t\t\techo $e->getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function maintenance_mode($enable = \\false)\n {\n }", "function write_config($data) {\n\n\t\t// Config path\n\t\t$template_path \t= 'config-sample.php';\n\t\t$output_path \t= 'config.php';\n\n\t\t// Open the file\n\t\t$database_file = file_get_contents($template_path);\n\n\t\t$new = str_replace(\"%DB_HOST%\",$data['db_host'],$database_file);\n\t\t$new = str_replace(\"%DB_USERNAME%\",$data['db_username'],$new);\n\t\t$new = str_replace(\"%DB_PASSWORD%\",$data['db_password'],$new);\n\t\t$new = str_replace(\"%DB_NAME%\",$data['db_name'],$new);\n\t\t$new = str_replace(\"%SITE_URL%\",$data['site_url'],$new);\n\n\t\t// Write the new database.php file\n\t\t$handle = fopen($output_path,'w+');\n\n\t\t// Chmod the file, in case the user forgot\n\t\t@chmod($output_path,0777);\n\n\t\t// Verify file permissions\n\t\tif(is_writable($output_path)) {\n\n\t\t\t// Write the file\n\t\t\tif(fwrite($handle,$new)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function _writeToFile ($file,$view,$moduleName,$defs,$variables)\n\t{\n\t if(file_exists($file))\n\t unlink($file);\n\t \n\t mkdir_recursive ( dirname ( $file ) ) ;\n\t $GLOBALS['log']->debug(\"ModuleBuilderParser->_writeFile(): file=\".$file);\n $useVariables = (count($variables)>0);\n if( $fh = @sugar_fopen( $file, 'w' ) )\n {\n $out = \"<?php\\n\"; \n if ($useVariables)\n {\n // write out the $<variable>=<modulename> lines\n foreach($variables as $key=>$value)\n {\n \t$out .= \"\\$$key = '\".$value.\"';\\n\";\n }\n }\n \n // write out the defs array itself\n switch (strtolower($view))\n {\n \tcase 'editview':\n \tcase 'detailview':\n \tcase 'quickcreate':\n \t\t$defs = array($view => $defs);\n \t\tbreak;\n \tdefault:\n \t\tbreak;\n }\n $viewVariable = $this->_defMap[strtolower($view)];\n $out .= \"\\$$viewVariable = \";\n $out .= ($useVariables) ? \"array (\\n\\$module_name =>\\n\".var_export_helper($defs) : var_export_helper( array($moduleName => $defs) );\n \n // tidy up the parenthesis\n if ($useVariables)\n {\n \t$out .= \"\\n)\"; \n }\n $out .= \";\\n?>\\n\";\n \n// $GLOBALS['log']->debug(\"parser.modifylayout.php->_writeFile(): out=\".print_r($out,true));\n fputs( $fh, $out);\n fclose( $fh );\n }\n else\n {\n $GLOBALS['log']->fatal(\"ModuleBuilderParser->_writeFile() Could not write new viewdef file \".$file);\n }\n\t}", "protected function writeMigrations()\n {\n $files = $this->migrator->create($this->options);\n\n foreach($files as $file)\n {\n $path = pathinfo($file, PATHINFO_FILENAME);\n $this->line(\" <fg=green;options=bold>create</fg=green;options=bold> $path\");\n }\n }", "private function createAuthFile()\r\n {\r\n $directory = $this->filesystem->getDirectoryWrite(DirectoryList::COMPOSER_HOME);\r\n\r\n if (!$directory->isExist(PackagesAuth::PATH_TO_AUTH_FILE)) {\r\n try {\r\n $directory->writeFile(PackagesAuth::PATH_TO_AUTH_FILE, '{}');\r\n } catch (Exception $e) {\r\n throw new LocalizedException(__(\r\n 'Error in writing Auth file %1. Please check permissions for writing.',\r\n $directory->getAbsolutePath(PackagesAuth::PATH_TO_AUTH_FILE)\r\n ));\r\n }\r\n }\r\n }", "public static function maintenance_mode()\n\t{\n\t\t$maintenance_mode = Config::get('site.maintenance_mode', FALSE);\n\t\t$message = Config::get('site.offline_message', FALSE);\n\t\t$message = (empty($message) OR ! $message) ? Gleez::MAINTENANCE_MESSAGE : $message;\n\t\t$request = Request::initial();\n\n\t\tif ($maintenance_mode AND ($request instanceof Request) AND ($request->controller() != 'user' AND $request->action() != 'login') AND !ACL::check('administer site') AND $request->controller() != 'media')\n\t\t{\n\t\t\tthrow HTTP_Exception::factory(503, __($message));\n\t\t}\n\t}", "function _write_config_file($values){\n $db_server = $values['db_server'] ?: \"\";\n $db_name = $values['db_name'] ?: \"\";\n $db_user = $values['db_user'] ?: \"\";\n $db_password = $values['db_password'] ?: \"\";\n $mynautique_enabled = (isset($values['mynautique_enabled']) && $values['mynautique_enabled'] == TRUE) ? \"TRUE\" : \"FALSE\";\n $mynautique_user = isset($values['mynautique_user']) && $mynautique_enabled == \"TRUE\" ? $values['mynautique_user'] : \"\";\n $mynautique_password = isset($values['mynautique_password']) && $mynautique_enabled == \"TRUE\" ? $values['mynautique_password'] : \"\";\n\n // write configuration file (only after schema is applied)// build the configuration for the configuration file\n $config_string = '<?php'.\"\\n\";\n $config_string .= '// Database Configuration'.\"\\n\";\n $config_string .= '//==================================================='.\"\\n\";\n $config_string .= '// database server'.\"\\n\";\n $config_string .= '$config[\\'db_server\\'] = \"'. $db_server .'\";'.\"\\n\";\n $config_string .= '// database'.\"\\n\";\n $config_string .= '$config[\\'db_name\\'] = \"'. $db_name .'\";'.\"\\n\";\n $config_string .= '// database user'.\"\\n\";\n $config_string .= '$config[\\'db_user\\'] = \"'. $db_user .'\";'.\"\\n\";\n $config_string .= '// database user password'.\"\\n\";\n $config_string .= '$config[\\'db_password\\'] = \"'. $db_password .'\";'.\"\\n\";\n $config_string .= \"\\n\";\n\n if ( isset($values['mynautique_enabled'])) {\n $config_string .= '// MyNautique Configuration'.\"\\n\";\n $config_string .= '//==================================================='.\"\\n\";\n $config_string .= '// myNautique enabled'.\"\\n\";\n $config_string .= '$config[\\'mynautique_enabled\\'] = '.$mynautique_enabled .';'.\"\\n\";\n $config_string .= '// myNautique user'.\"\\n\";\n $config_string .= '$config[\\'mynautique_user\\'] = \"'. $mynautique_user .'\";'.\"\\n\";\n $config_string .= '// myNautique password'.\"\\n\";\n $config_string .= '$config[\\'mynautique_password\\'] = \"'. $mynautique_password .'\";'.\"\\n\";\n }\n\n $config_string .= '?>'.\"\\n\";\n\n $bytes_written = file_put_contents (\"../config/config.php\", $config_string);\n\n if($bytes_written == FALSE) {\n return $bytes_written;\n }\n return TRUE;\n }", "private function maintenance_mode($active) {\n\t\t// This allows add-ons to do something different if they prefer\n\t\tif (apply_filters('updraft_restore_maintenance_mode', true, $active, $this, $this->wp_upgrader)) {\n\t\t\t$this->wp_upgrader->maintenance_mode($active);\n\t\t}\n\t}", "function my_maintenance_mode() {\n\t$email = 'admin@example.com';\n\n\t//change this to something appropriate for this client\n\t$interesting_link = '<a href=\"https://facebook.com/thewpsteward\"> Our Facebook Page</a></p>';\n\n\t// (optional) change the image URL for the \"We'll Be Right Back\" image.\n\t$image_url = 'https://s3.amazonaws.com/wpsteward/wp-content/uploads/2019/07/28183925/Official-Memo-1.jpg';\n\t$image_alt = 'the words We\\'ll Be Right Back written in blue with a gray-and-blue border';\n\n\t// don't change this\n\t$user = wp_get_current_user();\n\n\tif ( $email !== $user->user_email ) {\n\n\t\t$output = '<div style=\"display:inline-block; width:100%; text-align: center;\" ><image style=\"width: 500px; max-width: 100%; margin: 0 auto; text-align: center\" alt= \"' . $image_alt . '\" src=\"' . $image_url . '\"></image></div>';\n\t\t$output .= '<p>Hey! ' . get_bloginfo( 'name' ) . ' is undergoing scheduled maintenance (to keep things secure and happy) at the moment. Please check back in a few minutes.</p>';\n\t\t$output .= '<p>While you wait, it\\'s a great time to check out ' . $interesting_link;\n\n\t\t$args = array( 'response' => 503 );\n\t\twp_die( $output, 'Site Under Scheduled Maintenance', $args );\n\n\t}\n\n}", "public function createTextFile($filename, $content = \"\")\r\n {\r\n $fs = new Filesystem();\r\n $folder = $this->destination_dir;\r\n\r\n try {\r\n $fs->exists($folder) ? false : $fs->mkdir($folder, 0775 );\r\n $fs->exists($folder.'/'.$filename) ? false : $fs->dumpFile($folder.'/'.$filename, $content);\r\n\r\n } catch (IOExceptionInterface $e) {\r\n echo \"An error occurred while creating your directory at \".$e->getPath();\r\n }\r\n }", "function admin_export_new_patientsdone($id=NULL) // template for new classes\r\n {\r\n $data['offline_mode']\t\t=\t$this->config->item('offline_mode');\r\n $data['debug_mode']\t\t =\t$this->config->item('debug_mode');\r\n\t\t$data['user_rights'] = $this->mthirra->get_user_rights($_SESSION['username']);\r\n\t\t$data['title'] = \"Exported New Patients\";\r\n $data['now_id'] = time();\r\n $export_when = $data['now_id'];\r\n $export_by = $_SESSION['staff_id'];\r\n $data['baseurl'] = base_url();\r\n\r\n $data['exploded_baseurl'] = explode('/', $data['baseurl'], 4);\r\n $data['app_folder'] = substr($data['exploded_baseurl'][3], 0, -1);\r\n $data['DOCUMENT_ROOT'] = $_SERVER['DOCUMENT_ROOT'];\r\n if(substr($data['DOCUMENT_ROOT'],-1) === \"/\"){\r\n // Do nothing\r\n } else {\r\n // Add a slash\r\n $data['DOCUMENT_ROOT'] = $data['DOCUMENT_ROOT'].'/';\r\n }\r\n $data['app_path'] = $data['DOCUMENT_ROOT'].$data['app_folder'];\r\n $data['export_path'] = $data['app_path'].\"-uploads/exports_patient\";\r\n \r\n $version_file_path = $data['app_path'].\"/app_thirra/version.txt\";\r\n $handle = fopen($version_file_path, \"r\");\r\n $app_version = fread($handle, filesize($version_file_path));\r\n fclose($handle);\r\n\r\n if(count($_POST)) {\r\n // User has posted the form\r\n $data['form_purpose'] = $_POST['form_purpose'];\r\n $data['num_rows'] = $_POST['num_rows'];\r\n\t\t\t$xmlstr = \"<?xml version='1.0'?>\";\r\n\t\t\t$xmlstr .= \"\\n<THIRRA_export_patients>\";\r\n $xmlstr .= \"\\n\\t<export_info>\";\r\n $xmlstr .= \"\\n\\t\\t<export_by>$export_by</export_by>\";\r\n $xmlstr .= \"\\n\\t\\t<export_when>$export_when</export_when>\";\r\n $xmlstr .= \"\\n\\t\\t<thirra_version>$app_version</thirra_version>\";\r\n $xmlstr .= \"\\n\\t</export_info>\";\r\n\t\t\t$selected\t\t=\t1;\r\n\t\t\tfor($i=1; $i<=$data['num_rows']; $i++){\r\n\t\t\t\t// Only retrieve if selected by user\r\n\t\t\t\tif(isset($_POST['s'.$i])){\r\n\t\t\t\t\t$data['unsynched_list'][$selected]['number']\t= $i;\r\n\t\t\t\t\t$data['unsynched_list'][$selected]['value']\t= $_POST['s'.$i];\r\n\t\t\t\t\t$data['unsynched_list'][$selected]['patient_info'] \r\n\t\t\t\t\t\t= $this->memr_rdb->get_patient_details($data['unsynched_list'][$selected]['value']);\r\n\t\t\t\t\t$patient_id \t= $data['unsynched_list'][$selected]['patient_info']['patient_id'];\r\n\t\t\t\t\t$patient_name \t= $data['unsynched_list'][$selected]['patient_info']['patient_name'];\r\n\t\t\t\t\t$name_first \t= $data['unsynched_list'][$selected]['patient_info']['name_first'];\r\n\t\t\t\t\t$name_alias \t= $data['unsynched_list'][$selected]['patient_info']['name_alias'];\r\n\t\t\t\t\t$gender \t\t= $data['unsynched_list'][$selected]['patient_info']['gender'];\r\n\t\t\t\t\t$ic_no \t\t\t= $data['unsynched_list'][$selected]['patient_info']['ic_no'];\r\n\t\t\t\t\t$ic_other_type = $data['unsynched_list'][$selected]['patient_info']['ic_other_type'];\r\n\t\t\t\t\t$ic_other_no \t= $data['unsynched_list'][$selected]['patient_info']['ic_other_no'];\r\n\t\t\t\t\t$nationality \t= $data['unsynched_list'][$selected]['patient_info']['nationality'];\r\n\t\t\t\t\t$birth_date \t= $data['unsynched_list'][$selected]['patient_info']['birth_date'];\r\n\t\t\t\t\t$clinic_reference_number = $data['unsynched_list'][$selected]['patient_info']['clinic_reference_number'];\r\n\t\t\t\t\t$pns_pat_id \t= $data['unsynched_list'][$selected]['patient_info']['pns_pat_id'];\r\n\t\t\t\t\t$nhfa_no \t\t= $data['unsynched_list'][$selected]['patient_info']['nhfa_no'];\r\n\t\t\t\t\t$ethnicity \t\t= $data['unsynched_list'][$selected]['patient_info']['ethnicity'];\r\n\t\t\t\t\t$religion \t\t= $data['unsynched_list'][$selected]['patient_info']['religion'];\r\n\t\t\t\t\t$marital_status = $data['unsynched_list'][$selected]['patient_info']['marital_status'];\r\n\t\t\t\t\t$patient_type \t= $data['unsynched_list'][$selected]['patient_info']['patient_type'];\r\n\t\t\t\t\t$blood_group \t= $data['unsynched_list'][$selected]['patient_info']['blood_group'];\r\n\t\t\t\t\t$blood_rhesus \t= $data['unsynched_list'][$selected]['patient_info']['blood_rhesus'];\r\n\t\t\t\t\t$demise_date \t= $data['unsynched_list'][$selected]['patient_info']['demise_date'];\r\n\t\t\t\t\t$demise_time \t= $data['unsynched_list'][$selected]['patient_info']['demise_time'];\r\n\t\t\t\t\t$demise_cause \t= $data['unsynched_list'][$selected]['patient_info']['demise_cause'];\r\n\t\t\t\t\t$clinic_home \t= $data['unsynched_list'][$selected]['patient_info']['clinic_home'];\r\n\t\t\t\t\t$clinic_registered = $data['unsynched_list'][$selected]['patient_info']['clinic_registered'];\r\n\t\t\t\t\t$status = $data['unsynched_list'][$selected]['patient_info']['status'];\r\n\t\t\t\t\t$contact_id \t= $data['unsynched_list'][$selected]['patient_info']['contact_id'];\r\n\t\t\t\t\t$start_date \t= $data['unsynched_list'][$selected]['patient_info']['start_date'];\r\n\t\t\t\t\t$patient_address = $data['unsynched_list'][$selected]['patient_info']['patient_address'];\r\n\t\t\t\t\t$patient_address2 = $data['unsynched_list'][$selected]['patient_info']['patient_address2'];\r\n\t\t\t\t\t$patient_address3 = $data['unsynched_list'][$selected]['patient_info']['patient_address3'];\r\n\t\t\t\t\t$patient_town \t= $data['unsynched_list'][$selected]['patient_info']['patient_town'];\r\n\t\t\t\t\t$patient_postcode = $data['unsynched_list'][$selected]['patient_info']['patient_postcode'];\r\n\t\t\t\t\t$patient_state \t= $data['unsynched_list'][$selected]['patient_info']['patient_state'];\r\n\t\t\t\t\t$patient_country = $data['unsynched_list'][$selected]['patient_info']['patient_country'];\r\n\t\t\t\t\t$tel_home \t\t= $data['unsynched_list'][$selected]['patient_info']['tel_home'];\r\n\t\t\t\t\t$tel_office \t= $data['unsynched_list'][$selected]['patient_info']['tel_office'];\r\n\t\t\t\t\t$tel_mobile \t= $data['unsynched_list'][$selected]['patient_info']['tel_mobile'];\r\n\t\t\t\t\t$fax_no \t\t= $data['unsynched_list'][$selected]['patient_info']['fax_no'];\r\n\t\t\t\t\t$email \t\t\t= $data['unsynched_list'][$selected]['patient_info']['email'];\r\n\t\t\t\t\t$addr_village_id \t= $data['unsynched_list'][$selected]['patient_info']['addr_village_id'];\r\n\t\t\t\t\t$addr_area_id \t= $data['unsynched_list'][$selected]['patient_info']['addr_area_id'];\r\n\t\t\t\t\t$staff_id \t\t= $data['unsynched_list'][$selected]['patient_info']['staff_id'];\r\n\t\t\t\t\t$synch_out \t\t= $data['unsynched_list'][$selected]['patient_info']['synch_out'];\r\n\t\t\t\t\t$synch_remarks \t\t= $data['unsynched_list'][$selected]['patient_info']['synch_remarks'];\r\n\t\t\t\t\t$xmlstr .= \"\\n<patient_info patient_id='$patient_id'>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_id>$patient_id</patient_id>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_name>$patient_name</patient_name>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<name_first>$name_first</name_first>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<name_alias>$name_alias</name_alias>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<gender>$gender</gender>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<ic_no>$ic_no</ic_no>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<ic_other_type>$ic_other_type</ic_other_type>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<ic_other_no>$ic_other_no</ic_other_no>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<nationality>$nationality</nationality>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<birth_date>$birth_date</birth_date>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<clinic_reference_number>$clinic_reference_number</clinic_reference_number>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<pns_pat_id>$pns_pat_id</pns_pat_id>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<nhfa_no>$nhfa_no</nhfa_no>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<ethnicity>$ethnicity</ethnicity>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<religion>$religion</religion>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<marital_status>$marital_status</marital_status>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_type>$patient_type</patient_type>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<blood_group>$blood_group</blood_group>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<blood_rhesus>$blood_rhesus</blood_rhesus>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<demise_date>$demise_date</demise_date>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<demise_time>$demise_time</demise_time>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<demise_cause>$demise_cause</demise_cause>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<clinic_home>$clinic_home</clinic_home>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<clinic_registered>$clinic_registered</clinic_registered>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<status>$status</status>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<contact_id>$contact_id</contact_id>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<start_date>$start_date</start_date>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_address>$patient_address</patient_address>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_address2>$patient_address2</patient_address2>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_address3>$patient_address3</patient_address3>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_town>$patient_town</patient_town>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_postcode>$patient_postcode</patient_postcode>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_state>$patient_state</patient_state>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<patient_country>$patient_country</patient_country>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<tel_home>$tel_home</tel_home>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<tel_office>$tel_office</tel_office>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<tel_mobile>$tel_mobile</tel_mobile>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<fax_no>$fax_no</fax_no>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<email>$email</email>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<addr_village_id>$addr_village_id</addr_village_id>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<addr_area_id>$addr_area_id</addr_area_id>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<staff_id>$staff_id</staff_id>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<synch_out>$synch_out</synch_out>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n\\t<synch_remarks>$synch_remarks</synch_remarks>\";\r\n\t\t\t\t\t$xmlstr .= \"\\n</patient_info>\";\r\n\t\t\t\t\t$selected++;\r\n\t\t\t\t} //endif(isset($_POST['s'.$i]))\r\n\t\t\t} //endfor($i=1; $i<=$data['num_rows']; $i++)\r\n\t\t} //endif(count($_POST))\r\n\t\t$data['file_exported']\t\t=\t\"patient_demo-\".date(\"Ymd_Hi\",$data['now_id']).\".xml\";\r\n\t\t$data['xmlstr']\t\t\t\t=\t$xmlstr;\r\n\t\t$xmlstr .= \"\\n</THIRRA_export_patients>\";\r\n\t\t$xml = new SimpleXMLElement($xmlstr);\r\n\r\n\t\t//echo $xml->asXML();\r\n\t\t$write = $xml->asXML($data['export_path'].\"/\".$data['file_exported']);\r\n\r\n\t\t//echo $xml->patient_info[1]->patient_name;\r\n\t\t// ========\r\n\t\t$this->load->vars($data);\r\n\t\tif ($_SESSION['thirra_mode'] == \"ehr_mobile\"){\r\n $new_header = \"ehr/header_xhtml-mobile10\";\r\n $new_banner = \"ehr/banner_emr_wap\";\r\n $new_sidebar= \"ehr/sidebar_emr_admin_wap\";\r\n $new_body = \"ehr/emr_newpage_wap\";\r\n $new_footer = \"ehr/footer_emr_wap\";\r\n\t\t} else {\r\n //$new_header = \"ehr/header_xhtml1-strict\";\r\n $new_header = \"ehr/header_xhtml1-transitional\";\r\n $new_banner = \"ehr/banner_ehr_html\";\r\n $new_sidebar= \"ehr/sidebar_emr_admin_html\";\r\n $new_body = \"ehr/ehr_admin_export_new_patientsdone_html\";\r\n $new_footer = \"ehr/footer_emr_html\";\r\n\t\t}\r\n if($data['user_rights']['section_admin'] < 100){\r\n $new_body = \"ehr/ehr_access_denied_html\";\r\n }\r\n\t\t$this->load->view($new_header);\t\t\t\r\n\t\t$this->load->view($new_banner);\t\t\t\r\n\t\t$this->load->view($new_sidebar);\t\t\t\r\n\t\t$this->load->view($new_body);\t\t\t\r\n\t\t$this->load->view($new_footer);\t\t\t\r\n }", "public function IsInMaintenanceMode(){\n\n\t\t// Obtain maintenance_mode index from config file\n $config_maintenance = $this->instance->config->item(\"maintenance_mode\");\n\n // validate if it's true\n if( $config_maintenance ){\n\n \t// load view and terminate output\n echo $this->instance->load->view('system/maintenance_mode', false, true);\n die();\n }\n }", "function _createSettingsFile()\n {\n global $_ARRLANG;\n\n $objDb = $this->_getDbObject($statusMsg);\n if ($objDb === false) {\n return $statusMsg;\n } else {\n $strSettingsFile = $_SESSION['installer']['config']['documentRoot'].$_SESSION['installer']['config']['offsetPath'].'/config/settings.php';\n\n if ( !\\Cx\\Lib\\FileSystem\\FileSystem::touch($strSettingsFile)\n || !\\Cx\\Lib\\FileSystem\\FileSystem::makeWritable($strSettingsFile)\n ) {\n return sprintf($_ARRLANG['TXT_SETTINGS_ERROR_WRITABLE'], $strSettingsFile);\n }\n\n //Header & Footer\n $strHeader = \"<?php\\n\";\n $strHeader .= \"/**\\n\";\n $strHeader .= \"* This file is generated by the \\\"settings\\\"-menu in your CMS.\\n\";\n $strHeader .= \"* Do not try to edit it manually!\\n\";\n $strHeader .= \"*/\\n\\n\";\n\n $strFooter = \"\\n\";\n\n //Get module-names\n $objResult = $objDb->Execute(\"SELECT id, name FROM `\".$_SESSION['installer']['config']['dbTablePrefix'].\"modules`\");\n if ($objResult->RecordCount() > 0) {\n while (!$objResult->EOF) {\n $arrModules[$objResult->fields['id']] = $objResult->fields['name'];\n $objResult->MoveNext();\n }\n }\n\n //Get values\n $objResult = $objDb->Execute(\"SELECT setname, setmodule, setvalue FROM `\".$_SESSION['installer']['config']['dbTablePrefix'].\"settings` ORDER BY\tsetmodule ASC, setname ASC\");\n $intMaxLen = 0;\n if ($objResult->RecordCount() > 0) {\n while (!$objResult->EOF) {\n $intMaxLen = (strlen($objResult->fields['setname']) > $intMaxLen) ? strlen($objResult->fields['setname']) : $intMaxLen;\n $arrValues[$objResult->fields['setmodule']][$objResult->fields['setname']] = $objResult->fields['setvalue'];\n $objResult->MoveNext();\n }\n }\n $intMaxLen += strlen('$_CONFIG[\\'\\']') + 1; //needed for formatted output\n\n //Write values\n $data = $strHeader;\n\n $strBody = '';\n foreach ($arrValues as $intModule => $arrInner) {\n $strBody .= \"/**\\n\";\n $strBody .= \"* -------------------------------------------------------------------------\\n\";\n $strBody .= \"* \".ucfirst(isset($arrModules[$intModule]) ? $arrModules[$intModule] : '').\"\\n\";\n $strBody .= \"* -------------------------------------------------------------------------\\n\";\n $strBody .= \"*/\\n\";\n\n foreach($arrInner as $strName => $strValue) {\n $strBody .= sprintf(\"%-\".$intMaxLen.\"s\",'$_CONFIG[\\''.$strName.'\\']');\n $strBody .= \"= \";\n $strBody .= (is_numeric($strValue) ? $strValue : '\"'.str_replace('\"', '\\\"', $strValue).'\"').\";\\n\";\n }\n $strBody .= \"\\n\";\n }\n\n $data .= $strBody;\n $data .= $strFooter;\n\n try {\n $objFile = new \\Cx\\Lib\\FileSystem\\File($strSettingsFile);\n $objFile->write($data);\n return true;\n } catch (\\Cx\\Lib\\FileSystem\\FileSystemException $e) {\n DBG::msg($e->getMessage());\n }\n\n return false;\n }\n }", "private function write_cache() {\n if (!file_exists(CACHE_DIR))\n mkdir(CACHE_DIR, 0755, TRUE);\n\n if (is_dir(CACHE_DIR) && is_writable(CACHE_DIR)) {\n if (function_exists(\"sem_get\") && ($mutex = @sem_get(2013, 1, 0644 | IPC_CREAT, 1)) && @sem_acquire($mutex))\n file_put_contents($this->cache_file, $this->html . $this->debug) . sem_release($mutex);\n /**/\n else if (($mutex = @fopen($this->cachefile, \"w\")) && @flock($mutex, LOCK_EX))\n file_put_contents($this->cache_file, $this->html . $this->debug) . flock($mutex, LOCK_UN);\n /**/\n }\n }", "public function createChangeLog() {}", "function regeneratesettings(){\n $this->auth(SUPER_ADM_LEVEL);\n $this->m_settings->deleteByWlId(WL_ID);\n $this->m_settings->initialInsert(WL_ID);\n $wl_data = $this->m_white_label->getById(WL_ID);\n $file = $this->m_settings->createSettingsFile(WL_ID, $wl_data);\n echo $file;\n }", "function tdc_open_database($database_file){\n // if database file does not exist, create one.\n if(!file_exists($database_file)){\n $xml = \"\n <?xml version='1.0' encoding='UTF-8'?>\n <downloads>\n </downloads>\n \";\n $file = fopen($database_file, \"w\") or die(\"ERROR: Tiny Download Counter - unable to open database file!\");\n fwrite($file, $xml);\n fclose($file);\n }\n\n $xml = simplexml_load_file($database_file) or die(\"ERROR: Tiny Download Counter - unable to open database file!\");\n return $xml; \n}", "function write_debug () {\n /*\necho $this->log_debug;\n\n $fp = fopen (\"backup/debug/battle\".$this->user['battle'].\".txt\",\"a\"); //открытие\n flock ($fp,LOCK_EX); //БЛОКИРОВКА ФАЙЛА\n fputs($fp , $this->log_debug) ; //работа с файлом\n fflush ($fp); //ОЧИЩЕНИЕ ФАЙЛОВОГО БУФЕРА И ЗАПИСЬ В ФАЙЛ\n flock ($fp,LOCK_UN); //СНЯТИЕ БЛОКИРОВКИ\n fclose ($fp); //закрытие\n $this->log_debug = '';\n */\n\n//die();\n }", "public function save()\r\n {\r\n $module = Yii::$app->controller->module;\r\n if ($this->operation === self::OP_OVERWRITE) {\r\n $dir = dirname($this->path);\r\n if (!is_dir($dir)) {\r\n $mask = @umask(0);\r\n $result = @mkdir($dir, $module->newDirMode, true);\r\n @umask($mask);\r\n if (!$result) {\r\n return \"Unable to create the directory '$dir'.\";\r\n }\r\n }\r\n }\r\n if (@file_put_contents($this->path, $this->content) === false) {\r\n return \"Unable to write the file '{$this->path}'.\";\r\n }\r\n\r\n return true;\r\n }", "public static function exitMaintenanceMode() {\n $settings = self::getSettings();\n $settings->maintenance = false;\n $settings->save();\n }", "public function makeConfigFile()\n\t{\n\t\t// Make sure we are called by an expected caller\n\t\tServerTechnology::checkCaller($this->allowedCallersForMake);\n\n\t\tJLoader::import('joomla.utilities.date');\n\t\t\n\t\t$date = new Date();\n\t\t$tz = new DateTimeZone($this->container->platform->getUser()->getParam('timezone', $this->container->platform->getConfig()->get('offset', 'UTC')));\n\t\t$date->setTimezone($tz);\n\t\t$d = $date->format('Y-m-d H:i:s T', true);\n\t\t$version = ADMINTOOLS_VERSION;\n\n\t\t$webConfig = <<< XML\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n\tSecurity Enhanced & Highly Optimized .web.config File for Joomla!\n\tautomatically generated by Admin Tools $version on $d\n\n\tAdmin Tools is Free Software, distributed under the terms of the GNU\n\tGeneral Public License version 3 or, at your option, any later version\n\tpublished by the Free Software Foundation.\n\n\t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t!! !!\n\t!! If you get an Internal Server Error 500 or a blank page when trying !!\n\t!! to access your site, remove this file and try tweaking its settings !!\n\t!! in the back-end of the Admin Tools component. !!\n\t!! !!\n\t!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n-->\n<configuration>\n\t<system.webServer>\n\nXML;\n\n\t\t$config = $this->loadConfiguration();\n\n\t\tif ($config->fileorder == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t<!-- File execution order -->\n\t\t<defaultDocument enabled=\"true\">\n\t\t\t<files>\n\t\t\t\t<clear />\n\t\t\t\t<add value=\"index.php\" />\n\t\t\t\t<add value=\"index.html\" />\n\t\t\t\t<add value=\"index.htm\" />\n\t\t\t</files>\n\t\t</defaultDocument>\n\nXML;\n\t\t}\n\n\t\tif ($config->nodirlists == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t<!-- No directory listings -->\n\t\t<directoryBrowse enabled=\"false\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->exptime == 1)\n\t\t{\n\t\t\t$setEtag = ($config->etagtype == 'none') ? 'setEtag=\"false\"' : '';\n\t\t\t$eTagInfo = ($config->etagtype == 'none') ? '// Send ETag: false (IIS only supports true/false for ETags)' : '';\n\n\t\t\t$webConfig .= <<< XML\n\t\t<!-- Optimal default expiration time $eTagInfo -->\n\t\t<staticContent>\n\t\t\t<clientCache cacheControlMode=\"UseMaxAge\" cacheControlMaxAge=\"01:00:00\" $setEtag />\n\t\t</staticContent>\n\nXML;\n\t\t}\n\n\t\tif ($config->autocompress == 1)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t<urlCompression doStaticCompression=\"false\" doDynamicCompression=\"true\" />\n\t\t<httpCompression>\n\t\t\t<dynamicTypes>\n\t\t\t\t<clear />\n\t\t\t\t<add mimeType=\"text/*\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"message/*\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/xml\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/xhtml+xml\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/rss+xml\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/javascript\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"application/x-javascript\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"image/svg+xml\" enabled=\"true\" />\n\t\t\t\t<add mimeType=\"*/*\" enabled=\"false\" />\n\t\t\t</dynamicTypes>\n\t\t</httpCompression>\n\nXML;\n\t\t}\n\n\n\t\t$webConfig .= <<< XML\n\t\t<rewrite>\n\t\t\t<rules>\n\t\t\t\t<clear />\n\nXML;\n\n\t\tif (!empty($config->hoggeragents) && ($config->nohoggers == 1))\n\t\t{\n\t\t\t$conditions = '';\n\t\t\t$patternCache = array();\n\n\t\t\tforeach ($config->hoggeragents as $agent)\n\t\t\t{\n\t\t\t\t$patternCache[] = $agent;\n\n\t\t\t\tif (count($agent) < 10)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$newPattern = implode('|', $patternCache);\n\t\t\t\t$conditions .= <<< XML\n<add input=\"{HTTP_USER_AGENT}\" pattern=\"$newPattern\" />\n\nXML;\n\t\t\t\t$patternCache = array();\n\t\t\t}\n\n\t\t\tif (count($patternCache))\n\t\t\t{\n\t\t\t\t$newPattern = implode('|', $patternCache);\n\t\t\t\t$conditions .= <<< XML\n\t\t\t\t\t\t<add input=\"{HTTP_USER_AGENT}\" pattern=\"$newPattern\" />\n\nXML;\n\t\t\t}\n\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<rule name=\"Common hacking tools and bandwidth hoggers block\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\".*\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\" trackAllCaptures=\"false\">\n$conditions\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden: Access is denied.\" statusDescription=\"You do not have permission to view this directory or page using the credentials that you supplied.\" />\n\t\t\t\t</rule>\n\nXML;\n\t\t}\n\n\t\tif ($config->autoroot)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t\t\t<rule name=\"Redirect index.php to /\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^index\\.php$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\">\n\t\t\t\t\t\t<add input=\"{THE_REQUEST}\" pattern=\"^POST\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{THE_REQUEST}\" pattern=\"^[A-Z]{3,9}\\ /index\\.php\\ HTTP/\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{HTTPS}>s\" pattern=\"^(1>(s)|0>s)$\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"http{C:2}://{HTTP_HOST}:{SERVER_PORT }/\" redirectType=\"Permanent\" />\n\t\t\t\t</rule>\n\nXML;\n\t\t}\n\n\t\tswitch ($config->wwwredir)\n\t\t{\n\t\t\tcase 1:\n\t\t\t\t// If I have a rewriteBase condition, I have to append it here\n\t\t\t\t$subfolder = trim($config->rewritebase, '/') ? trim($config->rewritebase, '/').'/' : '';\n\n\t\t\t\t// non-www to www\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Redirect non-www to www\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^(.*)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\">\n\t\t\t\t\t\t<add input=\"{HTTP_HOST}\" pattern=\"^www\\.\" negate=\"true\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"http://www.{HTTP_HOST}/$subfolder{R:1}\" redirectType=\"Found\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t// www to non-www\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Redirect www to non-www\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^(.*)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\">\n\t\t\t\t\t\t<add input=\"{HTTP_HOST}\" pattern=\"^www\\.(.+)$\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"http://{C:1}/{R:1}\" redirectType=\"Found\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif (!empty($config->olddomain))\n\t\t{\n\t\t\t$domains = trim($config->olddomain);\n\t\t\t$domains = explode(',', $domains);\n\t\t\t$newdomain = $config->httphost;\n\n\t\t\tforeach ($domains as $olddomain)\n\t\t\t{\n\t\t\t\t$olddomain = trim($olddomain);\n\t\t\t\t$originalOldDomain = $olddomain;\n\n\t\t\t\tif (empty($olddomain))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$olddomain = $this->escape_string_for_regex($olddomain);\n\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Redirect old to new domain ($originalOldDomain)\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"(.*)\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\">\n\t\t\t\t\t\t<add input=\"{HTTP_HOST}\" pattern=\"^$olddomain\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"http://$newdomain/{R:1}\" redirectType=\"Found\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($config->httpsurls))\n\t\t{\n\t\t\t$webConfig .= \"<!-- Force HTTPS for certain pages -->\\n\";\n\t\t\tforeach ($config->httpsurls as $url)\n\t\t\t{\n\t\t\t\t$urlesc = '^' . $this->escape_string_for_regex($url) . '$';\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Force HTTPS for $url\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^$urlesc$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\">\n\t\t\t\t\t\t<add input=\"{HTTPS}\" pattern=\"0\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Redirect\" url=\"https://{$config->httpshost}/$url\" redirectType=\"Found\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Block out some common exploits\">\n\t\t\t\t\t<match url=\".*\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"proc/self/environ\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"mosConfig_[a-zA-Z_]{1,21}(=|\\%3D)\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"base64_(en|de)code\\(.*\\)\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"(&lt;|%3C).*script.*(>|%3E)\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"GLOBALS(=|\\[|\\%[0-9A-Z]{0,2})\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"_REQUEST(=|\\[|\\%[0-9A-Z]{0,2})\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" url=\"index.php\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\n\t\tif ($config->fileinj == 1)\n\t\t{\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"File injection protection\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\".*\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"[a-zA-Z0-9_]=http://\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"[a-zA-Z0-9_]=(\\.\\.//?)+\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"[a-zA-Z0-9_]=/([a-z0-9_.]//?)+\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\t$webConfig .= \" <!-- Advanced server protection rules exceptions -->\\n\";\n\n\t\tif (!empty($config->exceptionfiles))\n\t\t{\n\t\t\t$ruleCounter = 0;\n\n\t\t\tforeach ($config->exceptionfiles as $file)\n\t\t\t{\n\t\t\t\t$ruleCounter++;\n\t\t\t\t$file = '^' . $this->escape_string_for_regex($file) . '$';\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Advanced server protection rules exception #$ruleCounter\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"$file\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($config->exceptiondirs))\n\t\t{\n\t\t\t$ruleCounter = 0;\n\n\t\t\tforeach ($config->exceptiondirs as $dir)\n\t\t\t{\n\t\t\t\t$ruleCounter++;\n\t\t\t\t$dir = trim($dir, '/');\n\t\t\t\t$dir = $this->escape_string_for_regex($dir);\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Allow access to folders except .php files #$ruleCounter\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^$dir/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" pattern=\"(\\.php)$\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($config->fullaccessdirs))\n\t\t{\n\t\t\t$ruleCounter = 0;\n\n\t\t\tforeach ($config->fullaccessdirs as $dir)\n\t\t\t{\n\t\t\t\t$ruleCounter++;\n\t\t\t\t$dir = trim($dir, '/');\n\t\t\t\t$dir = $this->escape_string_for_regex($dir);\n\t\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Allow access to folders, including .php files #$ruleCounter\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^$dir/\" ignoreCase=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t\t}\n\t\t}\n\n\t\tif ($config->phpeaster == 1)\n\t\t{\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"PHP Easter Egg protection\">\n\t\t\t\t\t<match url=\".*\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"\\=PHP[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\tif ($config->backendprot == 1)\n\t\t{\n\t\t\t$bedirs = implode('|', $config->bepexdirs);\n\t\t\t$betypes = implode('|', $config->bepextypes);\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Back-end protection - allow administrator login\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^administrator/?$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Back-end protection - allow administrator login, alternate\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^administrator/index\\.(php|html?)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Back-end protection - allow access to static media files\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^administrator/($bedirs)/.*\\.($betypes)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Back-end protection - Catch all\">\n\t\t\t\t\t<match url=\"^administrator/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\tif ($config->frontendprot == 1)\n\t\t{\n\t\t\t$fedirs = implode('|', $config->fepexdirs);\n\t\t\t$fetypes = implode('|', $config->fepextypes);\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Front-end protection - allow access to static media files\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^($fedirs)/.*\\.($fetypes)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Do not block includes/js\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^includes/js/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"None\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Block access to certain folders\">\n\t\t\t\t\t<match url=\"^($fedirs)/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Block access to certain folders, part 2\">\n\t\t\t\t\t<match url=\"^(cache|includes|language|logs|log|tmp)/\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Forbid access to leftover Joomla! files\">\n\t\t\t\t\t<match url=\"^(configuration\\.php|CONTRIBUTING\\.md|htaccess\\.txt|joomla\\.xml|LICENSE\\.txt|phpunit\\.xml|README\\.txt|web\\.config\\.txt)\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Front-end protection - Block access to all PHP files except index.php\">\n\t\t\t\t\t<match url=\"(.*\\.php)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" pattern=\"(\\.php)$\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" pattern=\"(/index?\\.php)$\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\tif ($config->leftovers == 1)\n\t\t{\n\t\t\t$webConfig .= <<<END\n\t\t\t\t<rule name=\"Front-end protection - Block access to common server configuration files\">\n\t\t\t\t\t<match url=\"^(htaccess\\.txt|configuration\\.php-dist|php\\.ini|.user\\.ini|web\\.config|web\\.config\\.txt)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\" />\n\t\t\t\t\t<action type=\"CustomResponse\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\nEND;\n\t\t}\n\n\t\t$webConfig .= <<< XML\n\t\t\t\t<rule name=\"Joomla! SEF Rule 1\" stopProcessing=\"true\">\n\t\t\t\t\t<match url=\"^(.*)$\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAny\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"base64_encode[^(]*\\([^)]*\\)\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"(>|%3C)([^s]*s)+cript.*(&lt;|%3E)\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"GLOBALS(=|\\[|\\%[0-9A-Z]{0,2})\" ignoreCase=\"false\" />\n\t\t\t\t\t\t<add input=\"{QUERY_STRING}\" pattern=\"_REQUEST(=|\\[|\\%[0-9A-Z]{0,2})\" ignoreCase=\"false\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"CustomResponse\" url=\"index.php\" statusCode=\"403\" statusReason=\"Forbidden\" statusDescription=\"Forbidden\" />\n\t\t\t\t</rule>\n\t\t\t\t<rule name=\"Joomla! SEF Rule 2\">\n\t\t\t\t\t<match url=\"(.*)\" ignoreCase=\"false\" />\n\t\t\t\t\t<conditions logicalGrouping=\"MatchAll\" trackAllCaptures=\"false\">\n\t\t\t\t\t\t<add input=\"{URL}\" pattern=\"^/index.php\" ignoreCase=\"true\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" matchType=\"IsFile\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t\t<add input=\"{REQUEST_FILENAME}\" matchType=\"IsDirectory\" ignoreCase=\"false\" negate=\"true\" />\n\t\t\t\t\t</conditions>\n\t\t\t\t\t<action type=\"Rewrite\" url=\"index.php\" />\n\t\t\t\t</rule>\n\n\t\t\t</rules>\n\nXML;\n\n\t\tif ($config->noserversignature == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t<!-- Remove IIS version signature -->\n\t\t<outboundRules>\n\t\t <rule name=\"Remove RESPONSE_Server\">\n\t\t\t<match serverVariable=\"RESPONSE_Server\" pattern=\".+\" />\n\t\t\t<action type=\"Rewrite\" value=\"MYOB\" />\n\t\t </rule>\n\t\t</outboundRules>\n\nXML;\n\t\t}\n\n\t\t$webConfig .= <<< XML\n\t\t</rewrite>\n\t\t<httpProtocol>\n\t\t\t<customHeaders>\n\nXML;\n\n\t\tif ($config->clickjacking == 1)\n\t\t{\n\t\t\t$webConfig .= <<< ENDCONF\n\t\t\t\t<!-- Protect against clickjacking / Forbid displaying in FRAME -->\n\t\t\t\t<add name=\"X-Frame-Options\" value=\"SAMEORIGIN\" />\n\nENDCONF;\n\t\t}\n\n\t\tif ($config->reducemimetyperisks == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<!-- Reduce MIME type security risks -->\n\t\t\t\t<add name=\"X-Content-Type-Options\" value=\"nosniff\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->reflectedxss == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<!-- Reflected XSS prevention -->\n\t\t\t\t<add name=\"X-XSS-Protection\" value=\"1; mode=block\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->noserversignature == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<!-- Remove IIS and PHP version signature -->\n\t\t\t\t<remove name=\"X-Powered-By\" />\n\t\t\t\t<add name=\"X-Powered-By\" value=\"MYOB\" />\n\nXML;\n\n\t\t}\n\n\t\tif ($config->notransform == 1)\n\t\t{\n\t\t\t$webConfig .= <<< XML\n\t\t\t\t<!-- Prevent content transformation -->\n\t\t\t\t<add name=\"Cache-Control\" value=\"no-transform\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->hstsheader == 1)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t\t\t<!-- HSTS Header - See http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security -->\n\t\t\t\t<add name=\"Strict-Transport-Security\" value=\"max-age=31536000\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->cors == 1)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t\t\t<!-- Cross-Origin Resource Sharing (CORS) - See http://enable-cors.org/ -->\n\t\t\t\t<add name=\"Access-Control-Allow-Origin\" value=\"*\" />\n\t\t\t\t<add name=\"Timing-Allow-Origin\" value=\"*\" />\n\nXML;\n\t\t}\n\n\t\tif ($config->referrerpolicy !== '-1')\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t\t\t<!-- Referrer-policy -->\n\t\t\t\t<add name=\"Referrer-Policy\" value=\"{$config->referrerpolicy}\" />\n\nXML;\n\t\t}\n\n\t\t$webConfig .= <<< XML\n\t\t\t</customHeaders>\n\t\t</httpProtocol>\n\nXML;\n\n\t\tif ($config->notracetrack == 1)\n\t\t{\n\t\t\t$webConfig .= <<<XML\n\t\t<!-- Disable HTTP methods TRACE and TRACK (protect against XST) -->\n\t\t<security>\n\t\t\t<requestFiltering>\n\t\t\t\t<verbs>\n\t\t\t\t\t<add verb=\"TRACE\" allowed=\"false\" />\n\t\t\t\t\t<add verb=\"TRACK\" allowed=\"false\" />\n\t\t\t\t</verbs>\n\t\t\t</requestFiltering>\n\t\t</security>\n\nXML;\n\t\t}\n\n\t\t$webConfig .= <<< XML\n\t</system.webServer>\n</configuration>\n\nXML;\n\n\t\treturn $webConfig;\n\t}", "public function get_test_update_temp_backup_writable()\n {\n }", "function redcap_module_system_disable($version) {\n\t\t$g = fopen(__DIR__.\"/template_field_data.json\",\"r\");\n $template_data = fread($g,filesize(__DIR__.\"/template_field_data.json\"));\n fclose($g);\n\n $files = glob(__DIR__.\"/field_data/*\");\n foreach($files as $file) {\n \t$f = fopen($file,\"w\");\n\t\t\tfwrite($f,$template_data);\n\t\t\tfclose($f);\n }\n }", "protected function openLogFile() {}", "private function writelog() {\r\n\r\n $dir = APP_PATH . 'tmp/log';\r\n //IF 'tmp/log' is file, delete it.\r\n if (is_file($dir)) {\r\n unlink(APP_PATH . 'tmp/log');\r\n }\r\n //IF 'tmp/log' is not exists, create it as folder.\r\n if (!dir_exists($dir)) {\r\n __mkdirs(APP_PATH . 'tmp/log');\r\n }\r\n //IF 'tmp/log' is exists as folder, the create logs under it.\r\n if (dir_exists($dir) && is_dir($dir)) {\r\n $date = date(\"Y-m-d H:i:s\", time());\r\n $arr = array('-', ':');\r\n $date = trim(str_replace($arr, '', $date));\r\n $cnt = $this->spArgs('msg');\r\n $str = $date . '\\t' . $cnt;\r\n file_put_contents(APP_PATH . 'tmp/log/log_' . $date . '.log', $str, FILE_APPEND);\r\n }\r\n return TRUE;\r\n }", "public function createNewContent()\n {\n $files = array_diff(scandir($this->config->pathToEntries), ['.', '..']);\n foreach ($files as $file) {\n $this->parseDailyEntry($file);\n }\n\n foreach ($this->entries as $month => $monthlyEntries) {\n $this->writeParsedEntriesPerMonth($month, $monthlyEntries);\n }\n }", "private function _createPidfile()\n {\n\n if (!is_dir(self::$pidDir))\n {\n mkdir(self::$pidDir);\n }\n\n $fp = fopen(self::$pid, 'w') or die(\"cannot create pid file\".PHP_EOL);\n fwrite($fp, posix_getpid());\n fclose($fp);\n\n Log::Dump(static::LOG_PREFIX.\"creating pid file \" . self::$pid);\n }" ]
[ "0.59467566", "0.59245926", "0.58183545", "0.57675445", "0.56971884", "0.5645974", "0.56458473", "0.56004727", "0.5580731", "0.5551072", "0.55470216", "0.5504735", "0.5476627", "0.5469738", "0.5440494", "0.5422807", "0.5376671", "0.536729", "0.53656423", "0.5360212", "0.531305", "0.53029716", "0.5294987", "0.5277603", "0.5277125", "0.5261108", "0.52526027", "0.52301717", "0.522786", "0.52189636", "0.5181092", "0.51720744", "0.5161965", "0.514435", "0.5121346", "0.5111461", "0.5109931", "0.51087856", "0.50955397", "0.50948274", "0.5092736", "0.5084067", "0.5077014", "0.50760293", "0.50750697", "0.50679636", "0.50413895", "0.5037665", "0.5027974", "0.5015241", "0.5012396", "0.50083303", "0.50026625", "0.50022304", "0.5001725", "0.4998488", "0.49913943", "0.49821874", "0.49774104", "0.49754256", "0.49746397", "0.4972124", "0.49682534", "0.4959551", "0.49534798", "0.49480858", "0.4947714", "0.49460915", "0.49457198", "0.4942577", "0.4941202", "0.49360082", "0.49297294", "0.49178767", "0.49075642", "0.49037695", "0.49012563", "0.48982143", "0.48964897", "0.48944488", "0.48940083", "0.4892937", "0.4889281", "0.48835155", "0.48813096", "0.48769397", "0.4875715", "0.48744205", "0.48743153", "0.48700368", "0.4868456", "0.486447", "0.48613164", "0.4856859", "0.48560658", "0.48532242", "0.48514733", "0.4851003", "0.48466015", "0.4822957" ]
0.49515438
65
Deletes maintenance mode file
static public function disable_maintenance_mode() { Util_WpFile::delete_file( Util_Environment::site_path() . '/.maintenance' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 deleteFilePerm(){\r\n\t\t$storage_name = $this->uri->segment(3);\r\n\r\n\t\t//Check if the file exists\r\n\t\tif(!$this->DataModel->fileExists($storage_name) == TRUE){\r\n\t\t\t//File doesn't exist\r\n\t\t\tredirect('dashboard');\r\n\t\t}\r\n\r\n\t\t//Check if the user has permission to delete the file\r\n\t\tif(!$this->DataModel->userPermission('edit', $storage_name, $this->authentication->uid)){\r\n\t\t\t//User doesn't has permission to edit / delete this file\r\n\t\t\tredirect('dashboard');\r\n\t\t}\r\n\r\n\t\t//Get information of file\r\n\t\t$file = $this->DataModel->fileInformation($storage_name);\r\n\t\t//Make sure that that file is already trashed\r\n\t\tif($file['trash'] == 1){\r\n\t\t\t//Permanently delete the file\r\n\t\t\t$files = array ();\r\n\t\t\t$files[] = $file;\r\n\t\t\t$this->deleteFilesPermanently($files);\r\n\r\n\t\t}\telse{\r\n\t\t\tredirect('/');\r\n\t\t}\r\n\t}", "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}", "function delete_backup_files()\r\n{\r\n\tglobal $db_url;\r\n\tis_admin();\r\n\t$url = parse_url($db_url);\r\n\t$url['path'] = urldecode($url['path']);\r\n\t$dbname=substr($url['path'], 1);\r\n\t$dir=APPROOT.'/data/'.$dbname;\r\n\t$d=dir($dir);\r\n\twhile(false!==($entry=$d->read()))\r\n\t{\r\n\t\tif (strlen($entry)==19)\r\n\t\t{\r\n\t\t\t$d_file=$dir.'/'.$entry;\r\n\t\t\tunlink($d_file);\r\n\t\t}\r\n\t}\r\n\t$d->close();\r\n}", "public static function exitMaintenanceMode() {\n $settings = self::getSettings();\n $settings->maintenance = false;\n $settings->save();\n }", "public function removeDesignFiles()\n {\n $this->designFiles()->detach();\n if ('scheduled' == $this->status) {\n $this->update([\n 'status' => 'incomplete'\n ]);\n }\n }", "public function deleteDownloadFile()\r\n\t{\r\n\t\t@unlink($this->reference);\r\n\t}", "protected function deleteCommunicationLog() {\n if (file_exists($this->_directories[\"communication.log\"])) {\n unlink($this->_directories[\"communication.log\"]);\n $this->log(\"Deleted the old log file.\");\n }\n }", "public function file_delete($filename);", "private function delete_file($file){\n\t\t$fileLink = fopen($file,'w');\n\t\tfclose($fileLink);\n\t\tunlink($file);\n\t}", "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}", "function wp_schedule_delete_old_privacy_export_files()\n {\n }", "function wp_privacy_delete_old_export_files()\n {\n }", "public function on_delete() {\n $this->remove_dir();\n }", "function lerror_log_delete()\n\t{\n\t\tif (file_exists(\"data/error_log.txt\")) return unlink(\"data/error_log.txt\");\n\t\telse return false;\n\t}", "function deleteFile($db, $strDetailID = \"\")\n{\n global $words;\n $bolNewData = true;\n if ($strDetailID != \"\") {\n $strSQL = \"SELECT * FROM hrd_training_request \";\n $strSQL .= \"WHERE id = '$strDetailID' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strFile = $rowDb['doc'];\n if ($strFile != \"\") {\n if (file_exists(\"trainingdoc/\" . $strFile)) {\n unlink(\"trainingdoc/\" . $strFile);\n }\n $strSQL = \"UPDATE hrd_training_request SET doc = '' WHERE id = '$strDetailID' \";\n $resExec = $db->execute($strSQL);\n //writeLog(ACTIVITY_DELETE, MODULE_PAYROLL,\"file $strDetailID\",0);\n }\n }\n }\n return true;\n}", "public function delete_local_file()\n\t{\n\t\tif(file_exists($this->local_file)) {\n\t\t\t$this->upload_local_file();\n\t\t\tunlink($this->local_file);\n\t\t}\n\t\t$this->local_file = null;\n\t}", "public function deleteUnusedFiles(){\n \n }", "function wLogErase($path,$param) {\n \n $fp = unlink($path.\"/\".$param.\".log\");\n //fclose ($fp);\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 }", "function configurationDeleteFile($fileToDelete){\n\n\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].'/uploads/' . $fileToDelete))\n\t\t\t{\n\t\t\tunlink($_SERVER['DOCUMENT_ROOT'].'/uploads/' . $fileToDelete);\n\t\t\t}\t\t\t\t\n\t}", "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 }", "public function remove() {\n $f = new File(self::CONFIG_FILE_PATH);\n $f->remove();\n }", "public function delete()\n {\n $filesystem = $this->localFilesystem(dirname($this->path));\n\n method_exists($filesystem, 'deleteDir')\n ? $filesystem->deleteDir(basename($this->path))\n : $filesystem->deleteDirectory(basename($this->path));\n }", "public function delete($filepath);", "function unlink_rollback_file($server_cfg,$game_name,$pool_name){\n\t$fast_rollback_target = sprintf($server_cfg['config_directory'],$game_name);\n $fast_rollback_target = $fast_rollback_target . $pool_name.\"_rollback.sh\";\n\n\tif(file_exists($fast_rollback_target)){\n\t\tif(!unlink($fast_rollback_target))\n\t\t\tdie(\"Unable to clear the rollback script file $fast_rollback_target. Terminating.\\n\");\n\t}\n}", "public static function purgeLog(){\n\t\t$fichier = fopen('log/log.txt', 'w');\n}", "private function removeOldMasterPDF()\n {\n foreach (File::files(storage_path('files')) as $file) {\n if ($file->getMTime() < Carbon::now()->AddDays(-config('app.exportFileTimeout', 5))->timestamp) {\n unlink($file->getPathname());\n }\n }\n }", "public function delete($filename);", "function delLogin(){\n unlink($this->fHtaccess);\n }", "function delLogin(){\n unlink($this->fHtaccess);\n }", "function delLogin(){\r\n\t\tunlink($this->fHtaccess);\r\n\t}", "function cache_classes_DestroyContentFile($content_file_path=NULL)\n{\n $filepath = POPS_SYSTEM_PATH.'tmp/'.session_id().'.tmp.php';\n if ( $content_file_path!==NULL ) {\n $filepath = $content_file_path;\n }\n // try to delete file\n if (file_exists($filepath) ) {\n unlink($filepath);\n }\n}", "static function delete()\n\t{\n\t\t\n\t\tif (file_exists(Cache::$path))\n\t\t\tunlink(Cache::$path);\n\t\t\t\t\n\t}", "function forum_rss_delete_file($forum) {\n global $CFG;\n $rssfile = rss_file_name('forum', $forum);\n if (file_exists($rssfile)) {\n return unlink($rssfile);\n } else {\n return true;\n }\n }", "private function removeFile($fid) {\n // Load and delete old file.\n $file = File::load($fid);\n \\Drupal::service('file.usage')->delete($file, 'itkore_admin', 'user', '1', '1');\n }", "public static function removeRebuildIndicatorFile()\n {\n if (static::isRebuildAllowed()) {\n $name = static::getRebuildIndicatorFileName();\n $content = \\Includes\\Utils\\FileManager::read($name);\n\n // Only the process created the file can delete\n if (!empty($content) && (LC_IS_CLI_MODE || static::getRebuildIndicatorFileContent() == $content)) {\n \\Includes\\Utils\\FileManager::deleteFile($name);\n }\n }\n }", "private function deleteTempFile() {\n if ($this->datastreamInfo['content']['type'] == 'file' && $this->copied == TRUE) {\n unlink($this->datastreamInfo['content']['content']);\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}", "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}", "function delete_db_file($file_id) {\n$this->session->keep_flashdata($this->back_url_key);\nif (strlen(trim($this->back_url)) <= 0 || $this->back_url == NULL) {\n$this->back_url = $this->home_url;\n}\n$file_data = $this->backup->delete_db_file($file_id);\nif ($file_data !== NULL) {\n$file = $file_data->backup_location . $file_data->backup_name;\nif (file_exists($file)) {\nunlink($file);\n}\n}\nredirect($this->back_url);\n}", "private function deleteSettings()\n\t{\n\t}", "public function remove() {\n if ( ! $this->can_remove() ) {\n return;\n }\n $location = add_query_arg( 'tab', 'export', admin_url( 'options-general.php?page=wpsupercache' ) );\n if ( $this->backupFileExists() )\n $file = @unlink( self::$cache_config_file_backup );\n if ( ! $file ) {\n wp_safe_redirect( add_query_arg( 'message', 4, $location ) );\n exit;\n }\n delete_option( '_wp_super_cache_backup_options' );\n wp_safe_redirect( add_query_arg( 'message', 6, $location ) );\n exit;\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 function DeleteFile()\r\n\t{\r\n\t\t$queryDeleteFile = \"UPDATE files SET status=\\\"DELETED\\\" WHERE file_id=\".$this->fileId;\r\n\t\t$this->sqlDataBase->nonSelectQuery($queryDeleteFile);\r\n\t\tunlink(UPLOAD_PATH. DIRECTORY_SEPARATOR .$this->fileId);\r\n\t}", "public function delete(): void\n {\n unlink($this->path);\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 }", "protected function deleteProtocolFile() {}", "protected function cleanApplication() {\n @unlink('sql.db');\n }", "public function delete($file)\n {\n $filename=Log::getLogfile($file);\n @unlink($filename);\n if ($file == Log::PHP) {\n // re-create main log\n if (substr($filename, -3) == '.gz') {\n $log = date('d.m.Y H:i:s') . \" Log created.\\n\";\n if ($_SESSION['config']['logcompression'] == 1) {\n $fp = @gzopen($filename, \"wb\");\n @gzwrite($fp, $log);\n @chmod($file . '.gz', 0777);\n $this->handle[$file]=$fp;\n } else {\n $fp = @fopen($filename, \"wb\");\n @fwrite($fp, $log);\n @chmod($file, 0777);\n $this->handle[$file]=$fp;\n }\n }\n }\n }", "public function deleteTemp()\n {\n $list=collect(Storage::disk(config('lopsoft.temp_disk'))->listContents(config('lopsoft.temp_dir'), true))\n\t ->each(function($file) {\n\t\t if ($file['type'] == 'file' && $file['timestamp'] < now()->subDays(config('lopsoft.garbagecollection_days'))->getTimestamp()) {\n\t\t\t Storage::disk(config('lopsoft.temp_disk'))->delete($file['path']);\n\t\t }\n });\n }", "public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}", "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Lock_Service_FileType::getFileType($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\t//检查分类下是否有文件\n\t\t$file_types = Lock_Service_FileTypes::getByTypeId($id);\n\t\tif ($file_types) $this->output(-1, '仍然有解锁属于该分类,不能删除');\n\t\t\n\t\t$result = Lock_Service_FileType::deleteFileType($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "public function deleteFile(){\r\n\t\t//Get the storage name\r\n\t\t$storage_name = $this->uri->segment(3);\r\n\r\n\t\t//Check if the file exists\r\n\t\tif(!$this->DataModel->fileExists($storage_name) == TRUE){\r\n\t\t\t//File doesn't exist\r\n\t\t\tredirect('dashboard');\r\n\t\t}\r\n\r\n\t\t//Check if the user has permission to delete the file\r\n\t\tif(!$this->DataModel->userPermission('edit', $storage_name, $this->authentication->uid)){\r\n\t\t\t//User doesn't has permission to edit / delete this file\r\n\t\t\tredirect('dashboard');\r\n\t\t}\r\n\r\n\t\t//Get information of file\r\n\t\t$file = $this->DataModel->fileInformation($storage_name);\r\n\r\n\t\t//Mark the file as deleted in the database so they get displayed in the trashcan\r\n\t\t$this->DataModel->fileIntoTrash($file['id']);\r\n\t\t$this->successMessage($this->lang->line('success_file_deleted'));\r\n\r\n\t\t//Check if the file was deleted by the original owner or by a user who has access\r\n\t\tif($this->authentication->uid == $file['user_id']){\r\n\t\t\tif($file['parent'] == 0 ){\r\n\t\t\t\tredirect('/dashboard');\r\n\t\t\t}else{\r\n\t\t\t\t//Get parent information\r\n\t\t\t\t$parent = $this->DataModel->getFolderInfo(array('id' => $file['parent']), $this->authentication->uid);\r\n\t\t\t\tredirect('folders/'.$parent['public_key']);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$parent = $this->DataModel->getFolderInfo(array('id' => $file['parent']));\r\n\t\t\tredirect('sharedFolder/'.$parent['public_key']);\r\n\t\t}\r\n\t}", "public function testMaintenanceUnset()\n {\n// $this->commandTester->execute(\n// [\n// 'command' => $this->maintenanceCommand->getName(),\n// ToggleMaintenanceCommand::MAINTENANCE_PARAMETER => 0,\n// ]\n// );\n//\n// $this->assertFalse(\n// $this\n// ->filesystem\n// ->exists($this->exposedDir . DIRECTORY_SEPARATOR . ToggleMaintenanceCommand::FILE_NAME)\n// );\n//\n// $this->client->request('GET', '/');\n// $this->assertEquals(Response::HTTP_OK, $this->client->getResponse()->getStatusCode());\n }", "public function removeLog(): void\n {\n unlink($this->logFile);\n }", "public function instance_deleted() {\n $this->purge_all_definitions();\n @rmdir($this->filestorepath);\n }", "public function delete($filename){\n\t\t$file = $this->$dirname.'/'.$filename;\n\t\tif (file_exists($file)){\n\t\t\tunlink($file);\t\t\t\n\t\t}\n\t}", "public function delete(): void\n {\n $this->instances->demo()->runHook($this->root(), 'delete:before', $this);\n\n Dir::remove($this->root());\n $this->instances->delete($this->id);\n\n $this->instances->demo()->runHook($this->root(), 'delete:after', $this);\n }", "function auto_delete() {\n $request = get_expired_file();\n while($result = $request->fetch()) {\n delete_file_db($result['id_fichier']);\n $file = $result['file_url'];\n if(file_exists($file)) {\n unlink($file);\n }\n }\n}", "public function clear_log() {\r\n\t\t@unlink( $this->file );\r\n\t}", "function delete_site_file($file_id) {\n\t$this->session->keep_flashdata($this->back_url_key);\n\tif (strlen(trim($this->back_url)) <= 0 || $this->back_url == NULL) {\n\t\t$this->back_url = $this->home_url;\n\t}\n\t$file_data = $this->backup->delete_site_file($file_id);\n\tif ($file_data !== NULL) {\n\t\t$file = $file_data->backup_location . $file_data->backup_name;\n\t\tif (file_exists($file)) {\n\t\t\tunlink($file);\n\t\t}\n\t}\n\tredirect($this->back_url);\n}", "protected function deleteConfiguration(){\n Configuration::deleteByName($this->name.'_settings');\n }", "private function deleteLangFileContent() \n {\n $this->read();\n unset($this->arrayLang[$this->key]);\n $this->save();\n }", "function remdir()\r\n {\r\n if(is_writable($_REQUEST['file']))\r\n {\r\n $dir=$_GET['file'];\r\n $this->deleteDirectory($dir); \r\n }\r\n else{echo \"Permission Denied !\";}\r\n }", "public function unlinkTempFiles() {}", "public function unlinkTempFiles() {}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete($file) {\n\t}", "public static function tearDownAfterClass() {\n $file = __DIR__ . '/test_messages_controller.db';\n unlink($file);\n }", "public static function deleteFile($file){\n\t\t\t//@-> PARA N MOSTRAR ALGUM TIPO DE AVISO\n\t\t\t@unlink('uploads/'.$file);\n\t\t}", "function delFile($path)\n {\n unlink($this->dir . DIRECTORY_SEPARATOR . $path);\n }", "protected function deleteMenuCacheFile(): void\n {\n if (file_exists($this->getMenuCachePath())) {\n unlink($this->getMenuCachePath());\n }\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 unlink($file);", "public function delete_file(){\n unlink('/opt/lampp/htdocs/specijalisticki_rad/uploaded_images/'.$this->name);\n\n }", "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}", "function OnDeleteFile($md5){\n\tDeleteFileFromDatabase($md5);\n}", "function DeleteFile($id, $CheminU) {\r\n if (is_file($CheminU.\"/\".$id)) unlink($CheminU.\"/\".$id);\r\n}", "public function delete($file){\n\t\t\n\t\t//If the users file exists try to delete it\n\t\tif(file_exists($file))\n\t\t{\n\t\t\tunlink($file) or die($this->openFile(\"core/fragments/errors/error34.phtml\"));\n\t\t}\n\t}", "function deinstallPackageDyntables() {\n @unlink('/usr/local/www/diag_dhcp_leases.php');\n @unlink('/usr/local/www/javascript/dyntables.js');\n @rename('/usr/local/pkg/diag_dhcp_leases.php.org', '/usr/local/www/diag_dhcp_leases.php');\n}", "function InitDumpFile()\r\n{\r\n\t@unlink(DUMP_FILE_FULL_PATH_NAME);\r\n}", "public function testDeleteMaintenance()\n {\n $maintenance = Maintenance::orderBy('created_at', 'desc')->first();\n\n $response = $this->delete(\"/api/maintenance/{$maintenance['id']}\");\n\n $response->assertStatus(200)->assertJson([\n \"status\" => 200,\n \"message\" => \"Success, maintenance removed.\"\n ])->assertJsonCount(2);\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\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}", "public function delete_backup(){\n\t\t$file = $this->pfh->FolderPath('backup', 'eqdkp').$this->in->get('backups');\n\t\t$metafile = $this->pfh->FolderPath('backup/meta/', 'eqdkp').str_replace(substr($this->in->get('backups'), strpos($this->in->get('backups'), '.')), \"\", $this->in->get('backups')).'.meta.php';\n\t\tif (file_exists($file)) {\n\t\t\t$this->pfh->Delete($file);\n\t\t\t$this->core->message($this->user->lang('backup_delete_success'),$this->user->lang('backup'),'green');\n\t\t};\n\t\tif (file_exists($metafile)){\n\t\t\t$this->pfh->Delete($metafile);\n\t\t}\n\t\t$this->display('1');\n\n\t}", "function delete_s2sfu_file( $post_id ) {\n\n\t$filename = get_post_meta( $post_id, '_wp_attached_file', true );\n\t@unlink( ABSPATH . 'wp-content/plugins/s2member-files/' . $filename );\n\t\n}", "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}", "private function removeEntrada($filePath){\n \\Storage::delete($filePath);\n }", "function deleteFullDescription( $sDir, $iId ){\n $sFileName = LANGUAGE.'_'.sprintf( '%04.0f', $iId ).'.txt';\n if( is_file( $sDir.$sFileName ) )\n unlink( $sDir.$sFileName );\n}", "private function deleteFlag()\n {\n // remove the flag\n \\Storage::delete($this->getFlagPath());\n }", "protected function removeFile()\n {\n if (@is_file($this->getFilePath())) {\n @unlink($this->getFilePath());\n }\n }", "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "function kkm_uninstall($sql_only = false) {\r\n\tglobal $wpdb, $install_sql;\r\n\t$tables = array();\r\n\t$views = array();\r\n\t\r\n\t//Tables\r\n\tpreg_match_all('/create +table +(?:if not exists +)?`(.*?)`/i', $install_sql, $preg_res, PREG_SET_ORDER);\r\n\tforeach ($preg_res as $res) {\r\n\t\t$tables[] = $res[1];\r\n\t}\r\n\t$tables = array_reverse($tables); //Tables should be dropped in reverse order due to foreign key constraints\r\n\t\r\n\t//Views\r\n\tpreg_match_all('/create +(?:or replace +)?view +`(.*?)`/i', $install_sql, $preg_res, PREG_SET_ORDER);\r\n\tforeach ($preg_res as $res) {\r\n\t\t$views[] = $res[1];\r\n\t}\r\n\t\r\n\tif (!empty($tables)) {\r\n\t\t$wpdb->query('drop table if exists `'.implode('`,`', $tables).'`;');\r\n\t}\r\n\tif (!empty($views)) {\r\n\t\t$wpdb->query('drop view if exists `'.implode('`,`', $views).'`;');\r\n\t}\r\n\t\r\n\t//Delete files from the filesystem\r\n\tif (!$sql_only) {\r\n\t\t//TODO\r\n\t}\r\n}", "public function delete(){\n\n\t\t$sql = new Sql();\n\n\t\t$sql->query(\"DELETE FROM tb_categories WHERE idcategory=:idcategory\",array(\n\t\t\t\":idcategory\"=>$this->getidcategory()\n\t\t));\n\n\t\tCategory::updateFile();\n\t}", "private function _deleteFile($fileResource)\n {\n $store = $this->_owApp->erfurt->getStore();\n\n // remove file from file system (silently)\n $pathHashed = $this->getFullPath($fileResource);\n if (is_readable($pathHashed)) {\n unlink($pathHashed);\n }\n\n // remove all statements from sysconfig\n $store->deleteMatchingStatements(\n (string)$this->_getConfigModelUri(),\n $fileResource,\n null,\n null\n );\n }", "public function delete() {\n $result = $this->getFileSystem()->delete($this->getLocalPath());\n if (!$result) {\n // Inform the user if the file could not be deleted\n //File xxx could not be deleted.\n }\n\n return $result;\n }", "protected function tearDown(): void\n {\n unlink($this->test_file);\n }", "public function __destruct()\n {\n foreach (glob(\"$this->save_path/sess_*\") as $filename) {\n if (filemtime($filename) + 3600 < time()) {\n @unlink($filename);\n }\n }\n }", "public function deleteUnused()\n\t{\n\t\t/*$file = Engine_Api::_()->getItem('storage_file', $this->file_id);\n\t\t if ($file) {\n\t\t $table = Engine_Api::_()->getDbtable('albumSongs', 'mp3music');\n\t\t $select = $table->select()\n\t\t ->where('file_id = ?', $file->getIdentity())\n\t\t ->limit(1);\n\t\t $count = count( $table->fetchAll($select) );\n\t\t if ($count >= 0)\n\t\t $file->delete();\n\t\t }\n\t\t $this->delete();*/\n\t\t$table = Engine_Api::_() -> getDbtable('albumSongs', 'mp3music');\n\t\t$data = array('is_delete' => 1, );\n\t\t$where = $table -> getAdapter() -> quoteInto('song_id = ?', $this -> song_id);\n\t\t$table -> update($data, $where);\n\t}" ]
[ "0.65227646", "0.63838", "0.6307493", "0.6265556", "0.62066424", "0.6167808", "0.6121143", "0.6080623", "0.6074617", "0.6036549", "0.601419", "0.6010097", "0.60073143", "0.6007001", "0.59958935", "0.599161", "0.598877", "0.5974547", "0.5965176", "0.5955401", "0.5948395", "0.5944809", "0.5936545", "0.5886154", "0.5866836", "0.584141", "0.58405966", "0.58404565", "0.58327746", "0.58300644", "0.58300644", "0.5829771", "0.5814732", "0.58143145", "0.5798358", "0.5787843", "0.57856506", "0.57839626", "0.5756918", "0.5754205", "0.57532936", "0.57482636", "0.5747518", "0.57339907", "0.5723007", "0.5717853", "0.5711234", "0.5709521", "0.5709506", "0.5709505", "0.57039493", "0.5698313", "0.5696564", "0.5687328", "0.56681275", "0.5665515", "0.56644326", "0.5660862", "0.5658439", "0.56510746", "0.56502515", "0.563988", "0.5632965", "0.5631219", "0.562707", "0.5625051", "0.5624501", "0.56239516", "0.56178814", "0.5610757", "0.56056714", "0.56046945", "0.56029135", "0.56011724", "0.55986583", "0.55880857", "0.5581836", "0.5581563", "0.5580212", "0.5577816", "0.5568312", "0.5564878", "0.55640465", "0.5553269", "0.55508274", "0.5548545", "0.55453616", "0.55304044", "0.55276734", "0.5526755", "0.5526349", "0.55222934", "0.55187005", "0.5518663", "0.55175513", "0.55168545", "0.5512313", "0.55062675", "0.5503666", "0.5503537" ]
0.701919
0
Used to display Util_Environment_Exceptions in UI
static public function parse_environment_exceptions( $exs ) { $exceptions = $exs->exceptions(); $commands = ''; $required_changes = ''; $before_errors = array(); $later_errors = array(); $operation_error_already_shown = false; foreach ( $exceptions as $ex ) { if ( $ex instanceof Util_WpFile_FilesystemOperationException ) { if ( !$operation_error_already_shown ) { $m = $ex->getMessage(); if ( strlen( $m ) > 0 ) { $before_errors[] = $m; // if multiple operations failed when // they tried to fix environment - show only first // otherwise can duplication information about // absense of permissions $operation_error_already_shown = true; } if ( $ex instanceof Util_WpFile_FilesystemWriteException ) { $required_changes .= sprintf( __( 'Create the <strong>%s</strong> file and paste the following text into it: <textarea>%s</textarea> <br />', 'w3-total-cache' ), $ex->filename(), esc_textarea( $ex->file_contents() ) ); } else if ( $ex instanceof Util_WpFile_FilesystemModifyException ) { $modification_content = $ex->file_contents(); if ( strlen( $modification_content ) > 0 ) $modification_content = '<textarea style="height: 100px; width: 100%;">' . esc_textarea( $modification_content ) . '</textarea>'; $required_changes .= $ex->modification_description() . $modification_content . '<br />'; } else if ( $ex instanceof Util_WpFile_FilesystemCopyException ) { $commands .= 'cp ' . $ex->source_filename() . ' ' . $ex->destination_filename() . '<br />'; } else if ( $ex instanceof Util_WpFile_FilesystemMkdirException ) { $commands .= 'mkdir ' . $ex->folder() . '<br />'; $commands .= 'chmod 777 ' . $ex->folder() . '<br />'; } else if ( $ex instanceof Util_WpFile_FilesystemRmException ) { $commands .= 'rm ' . $ex->filename() . '<br />'; } else if ( $ex instanceof Util_WpFile_FilesystemRmdirException ) { $commands .= 'rm -rf ' . $ex->folder() . '<br />'; } else if ( $ex instanceof Util_WpFile_FilesystemChmodException ) { $commands .= 'chmod 777 ' . $ex->filename() . '<br />'; } } } else if ( $ex instanceof Util_Environment_Exception ) { $t = $ex->technical_message(); if ( strlen( $t ) > 0 ) { $t = '<br />' . '<a class="w3tc_read_technical_info" href="#">' . __( 'Technical info', 'w3-total-cache' ).'</a>' . '<div class="w3tc_technical_info" style="display: none">' . $t . '</div>'; } $later_errors[] = $ex->getMessage() . $t; } else { // unknown command $later_errors[] = $ex->getMessage(); } } if ( strlen( $commands ) > 0 ) { $required_changes .= __( 'Execute next commands in a shell:', 'w3-total-cache' ) . '<br><strong>' . $commands . '</strong>'; } return array( 'before_errors' => $before_errors, 'required_changes' => $required_changes, 'later_errors' => $later_errors ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function showExceptionUser()\n {\n \\ShowError(Loc::getMessage('FF_COMPONENT_CATCH_EXCEPTION'));\n }", "private static function _displayError($e) {\n\t\t\n\t\tif(!self::_initError($e->getMessage(), $e->getFile(), $e->getLine())) {\n\t\t\theader($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);\n\t\t\techo \"<pre><h1>Exception</h1>\" . $e->getMessage() . \" (\". $e->getCode() .\")\";\n\t\t\techo \"<br>\". $e->getFile() . \" | Line: \". $e->getLine();\n\t\t\techo \"<br><br>Trace:<br>\" . $e->getTraceAsString();\n\t\t\techo \"<br><br><hr>\". $_SERVER[\"SERVER_SIGNATURE\"] . \" &#169; SBJ Framework\";\n\t\t\techo \"</pre>\";\t\n\t\t}\n\t\t\n\t\texit();\n\t}", "public function show() {\r\n\t\t// send status code\r\n\t\t@header('HTTP/1.1 503 Service Unavailable');\r\n\r\n\t\t// modification starts here\r\n\t\t?>\r\n\t\t<!DOCTYPE html>\r\n\t\t<head>\r\n\t\t\t<title>Error: <?php echo StringUtil::encodeHTML($this->getMessage()); ?></title>\r\n\t\t\t<style>\r\n\t\t\t\t.systemException {\r\n\t\t\t\t\tborder: 1px outset lightgrey;\r\n\t\t\t\t\tpadding: 3px;\r\n\t\t\t\t\tbackground-color: lightgrey;\r\n\t\t\t\t\ttext-align: left;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\tfont-family: Verdana, Helvetica, sans-serif;\r\n\t\t\t\t\tfont-size: .8em;\r\n\t\t\t\t}\r\n\t\t\t\t.systemException div {\r\n\t\t\t\t\tborder: 1px inset lightgrey;\r\n\t\t\t\t\tpadding: 4px;\r\n\t\t\t\t}\r\n\t\t\t\t.systemException h1 {\r\n\t\t\t\t\tbackground-color: #154268;\r\n\t\t\t\t\tpadding: 4px;\r\n\t\t\t\t\tcolor: #fff;\r\n\t\t\t\t\tmargin: 0 0 3px 0;\r\n\t\t\t\t\tfont-size: 1.15em;\r\n\t\t\t\t\tword-wrap: break-word;\r\n\t\t\t\t}\r\n\t\t\t\t.systemException h2 {\r\n\t\t\t\t\tfont-size: 1.1em;\r\n\t\t\t\t\tmargin-bottom: 0;\r\n\t\t\t\t}\r\n\t\t\t\t.systemException pre, .systemException p {\r\n\t\t\t\t\tmargin: 0;\r\n\t\t\t\t}\r\n\t\t\t\t.systemException pre {\r\n\t\t\t\t\tfont-size: .85em;\r\n\t\t\t\t\tfont-family: \"Courier New\";\r\n\t\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\t\toverflow: hidden;\r\n\t\t\t\t\tbackground-color: yellow;\r\n\t\t\t\t}\r\n\t\t\t\t.systemException pre:hover{\r\n\t\t\t\t\toverflow: auto !important;\r\n\t\t\t\t\ttext-overflow: clip !important;\r\n\t\t\t\t}\r\n\t\t\t</style>\r\n\t\t</head>\r\n\t\t<body>\r\n\t\t\t<div class=\"systemException\">\r\n\t\t\t\t<h1>Error: <?php echo $this->getMessage(); ?></h1>\r\n\r\n\t\t\t\t<div>\r\n\t\t\t\t\t<p><?php echo $this->getDescription(); ?></p>\r\n\t\t\t\t\t<h2>Information:</h2>\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t<b>Error message:</b> <?php echo $this->getMessage(); ?><br>\r\n\t\t<?php echo $this->information; ?>\r\n\t\t\t\t\t\t<b>File:</b> <?php echo StringUtil::encodeHTML($this->getFile()); ?> (#<?php echo $this->getLine(); ?>)<br>\r\n\t\t\t\t\t\t<b>PHP version:</b> <?php echo StringUtil::encodeHTML(phpversion()); ?><br>\r\n\t\t\t\t\t\t<b>Twibber version:</b> <?php echo TWIBBER_VERSION; ?><br>\r\n\t\t\t\t\t\t<b>Date:</b> <?php echo gmdate('r'); ?><br>\r\n\t\t\t\t\t\t<b>Request:</b> <?php if (isset($_SERVER['REQUEST_URI']))\r\n\t\t\techo StringUtil::encodeHTML($_SERVER['REQUEST_URI']); ?><br>\r\n\t\t\t\t\t\t<b>Referer:</b> <?php echo (isset($_SERVER['HTTP_REFERER'])) ? StringUtil::encodeHTML($_SERVER['HTTP_REFERER']) : 'No referer.' ?><br>\r\n\t\t\t\t\t</p>\r\n\r\n\t\t\t\t\t<h2>Stacktrace:</h2>\r\n\t\t\t\t\t<pre><?php echo StringUtil::encodeHTML($this->__getTraceAsString()); ?></pre>\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t<p>Now you can do 2. things:</p>\r\n\t\t\t\t\t<ol>\r\n\t\t\t\t\t\t<li>Send this report to our Email <a href='mailto:support@twibber.de'>support@twibber.de</a>.</li>\r\n\t\t\t\t\t\t<li>Take a look at the <a href='https://github.com/chakuzo/Twibber/wiki/FAQ'>FAQs</a>.</li>\r\n\t\t\t\t\t</ol>\r\n\r\n\t\t\t\t</div>\r\n\r\n\t\t<?php echo $this->functions; ?>\r\n\t\t\t</div>\r\n\t\t</body>\r\n\t\t</html>\r\n\r\n\t\t<?php\r\n\t}", "public function err_page()\n {\n $site = new SiteContainer($this->db);\n\n $site->printHeader();\n $site->printNav();\n echo \"An Error has occured and your request could not be completed. Return <a href=\\\"index.php\\\">Home</a>\";\n $site->printFooter();\n }", "public function actionException()\n {\n $this->render('exception');\n }", "public function display()\r\n\t{\r\n debug_print_backtrace();\r\n\t\tdie(\"\\n(\" . date('m/d/y @ h:i:sA', time()) . \") A TACException occured: \" . $this->exception . \"\\n\");\r\n\t}", "function exceptionHandler($ex) {\n\techo '<div class=\"exception\">';\n\t\techo '<div class=\"title\">';\n\t\t\tswitch($ex->getCode()) {\n\t\t\t\tcase 1001:\n\t\t\t\t\techo 'MySQL database nog niet correct ingesteld!';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\techo 'Er is een onverwachte fout opgetreden.';\n\t\t\t\tbreak;\n\t\t\t}\n\t\techo '</div>';\n\t\techo '<div class=\"message\">';\n\t\t\techo $ex->getMessage().'<br />';\n\t\t\t\n\t\t\t// Gedetailleerde gegevens voor de developer alleen tonen\n\t\t\tif (Config::DEVELOPMENT) {\n\t\t\t\techo 'In bestand \"'.$ex->getFile().'\", op regel <b>'.$ex->getLine().'</b>';\n\t\t\t}\n\t\techo '</div>';\n\techo '</div>';\n}", "function display_error($e){\n $s='';\n $s.='Exception: '.$e->getCode().': '.$e->getMessage().' in '.$e->getFile().' on line'.$e->getLine().'';\n return $s;\n}", "function paintError($message) {\n parent::paintError($message);\n\t\t\t\t\t\tprint \"<div><span class=\\\"red\\\">Exception:</span> <strong>\";\n\t\t\t\t\t\t$breadcrumb = $this->getTestList();\n\t\t\t\t\t\tarray_shift($breadcrumb);\n\t\t\t\t\t\tprint implode(\" -&gt; \", $breadcrumb);\n\t\t\t\t\t\tprint \"</strong><br />\\n<span class=\\\"exception\\\">\" . $this->_htmlEntities($message) . \"</span></div>\\n\";\n\t\t\t\t}", "public static function reportOtherExceptionAndExit($e){\nself::encodeAndOutputMessage(self::translate('System error.'));\n$msg=date(\"Y-m-d H:i:s T\");\n$msg.=':'.(string)$e.\"\\n\"; //Let the exception describe itself\nforeach(self::$details as $k=>$v)$msg.=\"$k=$v\\n\";\nLogger::log(self::$systemErrorLog,$msg);\nexit;\n}", "public function getColorfulText()\n {\n $output = \"\\033[1;31m--[ Agile Toolkit Exception ]---------------------------\\n\";\n $output .= get_class($this).\": \\033[47m\".$this->getMessage().\"\\033[0;31m\".\n ($this->getCode() ? ' [code: '.$this->getCode().']' : '');\n\n foreach ($this->params as $key => $val) {\n $key = str_pad($key, 19, ' ', STR_PAD_LEFT);\n $output .= \"\\n\".$key.': '.$this->toString($val);\n }\n\n $output .= \"\\n\\033[0mStack Trace: \";\n\n $in_atk = true;\n $escape_frame = false;\n\n foreach ($this->getMyTrace() as $call) {\n if (!isset($call['file'])) {\n $call['file'] = '';\n } elseif (\n $in_atk &&\n strpos($call['file'], '/data/src/') === false &&\n strpos($call['file'], '/core/src/') === false &&\n strpos($call['file'], '/dsql/src/') === false\n ) {\n $escape_frame = true;\n $in_atk = false;\n }\n\n $file = str_pad(substr($call['file'], -40), 40, ' ', STR_PAD_LEFT);\n\n $line = str_pad(@$call['line'], 4, ' ', STR_PAD_LEFT);\n\n $output .= \"\\n\\033[0;34m\".$file.\"\\033[0m\";\n $output .= \":\\033[0;31m\".$line.\"\\033[0m\";\n\n if (isset($call['object'])) {\n $name = (!isset($call['object']->name)) ? get_class($call['object']) : $call['object']->name;\n $output .= \" - \\033[0;32m\".$name.\"\\033[0m\";\n }\n\n $output .= \" \\033[0;32m\";\n\n if (isset($call['class'])) {\n $output .= $call['class'].'::';\n }\n\n if ($escape_frame) {\n $output .= \"\\033[0,31m\".$call['function'];\n $escape_frame = false;\n\n $args = [];\n foreach ($call['args'] as $arg) {\n $args[] = $this->toString($arg);\n }\n\n $output .= \"\\n\".str_repeat(' ', 20).\"\\033[0,31m(\".implode(', ', $args);\n } else {\n $output .= \"\\033[0,33m\".$call['function'].'(';\n }\n\n $output .= ')';\n }\n\n if ($p = $this->getPrevious()) {\n $output .= \"\\n\\033[0mCaused by Previous Exception:\\n\";\n $output .= \"\\033[1;31m\".get_class($p).': '.$p->getMessage().\"\\033[0;31m\".\n ($p->getCode() ? ' [code: '.$p->getCode().']' : '');\n }\n\n // next print params\n\n $output .= \"\\n\\033[1;31m--------------------------------------------------------\\n\";\n\n return $output.\"\\033[0m\";\n }", "public function ErrorFatal() {\n\t\t$this -> Render();\n\t}", "function handle_errors($e) {\n $error = '<pre>ERROR: ' . $e->getMessage() . '</pre>';\n $t = 'base.html';\n $t = $this->twig->loadTemplate($t);\n $output = $t->render(array(\n\t\t\t 'modes' => $this->user_visible_modes,\n\t\t\t 'error' => $error\n\t\t\t ));\n return $output;\n }", "public static function customErrorMsg()\n {\n echo \"\\n<p>An error occured, The error has been reported.</p>\";\n exit();\n }", "public function __toString() {\n return K_Exception::text( $this );\n }", "public function show_exception_page($message = '')\r\n {\r\n\t\t$this->CI =& get_instance();\r\n\t\techo $this->CI->template->load_page('_errors/exception_page', array('message' => $message), true, false);\r\n\t\texit;\r\n }", "function getHtmlMessage(){\r\n $message='<b>Exception '.$this->getCode().'</b>: '.$this->message.\"<br>\\n\";\r\n if ($this->getCode() != 80){\r\n $message .= 'file '.$this->getFile().\"\\n<br> line \".$this->getLine().\r\n \"<br>\\nTrace: <br />\\n\".nl2br($this->getTraceAsString()).\"<br>\\n\";\r\n }\r\n return $message;\r\n }", "function myExceptionHandler($exception) {\n\techo \"Triton: Uncaught exeption; <p>\" . $exception->getMessage() . \"<p><pre>\" . $exception->getTraceAsString(), \"</pre>\"; // punkt här emellan???\n}", "public function show() {\r\n\t\t/*\r\n\t\t* A notice on the HTML used below:\r\n\t\t*\r\n\t\t* It might appear a bit weird to use <p> all over the place where semantically\r\n\t\t* other elements would fit in way better. The reason behind this is that we avoid\r\n\t\t* inheriting unwanted styles (e.g. exception displayed in an overlay) and that\r\n\t\t* the output needs to be properly readable when copied & pasted somewhere.\r\n\t\t*\r\n\t\t* Besides the visual appearance, the output was built to provide a maximum of\r\n\t\t* compatibility and readability when pasted somewhere else, e.g. a WYSIWYG editor\r\n\t\t* without the potential of messing up the formatting and thus harming the readability.\r\n\t\t*/\r\n?><!DOCTYPE html>\r\n<html>\r\n<head>\r\n\t<title>Fatal Error: <?php echo htmlentities($this->getMessage()); ?></title>\r\n\t<meta charset=\"utf-8\">\r\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\r\n\t<style>\r\n\t\t.exceptionBody {\r\n\t\t\tmargin: 0;\r\n\t\t\tpadding: 0;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionContainer {\r\n\t\t\tbox-sizing: border-box;\r\n\t\t\tfont-family: 'Segoe UI', 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;\r\n\t\t\tfont-size: 14px;\r\n\t\t\tpadding-bottom: 20px;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionContainer * {\r\n\t\t\tbox-sizing: inherit;\r\n\t\t\tcolor: #000;\r\n\t\t\tline-height: 1.5em;\r\n\t\t\tmargin: 0;\r\n\t\t\tpadding: 0;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionHeader {\r\n\t\t\tbackground-color: rgb(58, 109, 156);\r\n\t\t\tpadding: 30px 0;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionTitle {\r\n\t\t\tcolor: #fff;\r\n\t\t\tfont-size: 28px;\r\n\t\t\tfont-weight: 300;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionErrorCode {\r\n\t\t\tcolor: #fff;\r\n\t\t\tmargin-top: .5em;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionErrorCode .exceptionInlineCode {\r\n\t\t\tbackground-color: rgb(43, 79, 113);\r\n\t\t\tborder-radius: 3px;\r\n\t\t\tcolor: #fff;\r\n\t\t\tfont-family: monospace;\r\n\t\t\tpadding: 3px 10px;\r\n\t\t\twhite-space: nowrap;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionSubtitle {\r\n\t\t\tborder-bottom: 1px solid rgb(238, 238, 238);\r\n\t\t\tcolor: rgb(44, 62, 80);\r\n\t\t\tfont-size: 24px;\r\n\t\t\tfont-weight: 300;\r\n\t\t\tmargin-bottom: 15px;\r\n\t\t\tpadding-bottom: 10px;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionContainer > .exceptionBoundary {\r\n\t\t\tmargin-top: 30px;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionText .exceptionInlineCodeWrapper {\r\n\t\t\tborder: 1px solid rgb(169, 169, 169);\r\n\t\t\tborder-radius: 3px;\r\n\t\t\tpadding: 2px 5px;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionText .exceptionInlineCode {\r\n\t\t\tfont-family: monospace;\r\n\t\t\twhite-space: nowrap;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionFieldTitle {\r\n\t\t\tcolor: rgb(59, 109, 169);\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionFieldTitle .exceptionColon {\r\n\t\t\t/* hide colon in browser, but will be visible after copy & paste */\r\n\t\t\topacity: 0;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionFieldValue {\r\n\t\t\tfont-size: 18px;\r\n\t\t\tmin-height: 1.5em;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionSystemInformation,\r\n\t\t.exceptionErrorDetails,\r\n\t\t.exceptionStacktrace {\r\n\t\t\tlist-style-type: none;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionSystemInformation > li:not(:first-child),\r\n\t\t.exceptionErrorDetails > li:not(:first-child) {\r\n\t\t\tmargin-top: 10px;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionStacktrace {\r\n\t\t\tdisplay: block;\r\n\t\t\tmargin-top: 5px;\r\n\t\t\toverflow: auto;\r\n\t\t\tpadding-bottom: 20px;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionStacktraceFile,\r\n\t\t.exceptionStacktraceFile span,\r\n\t\t.exceptionStacktraceCall,\r\n\t\t.exceptionStacktraceCall span {\r\n\t\t\tfont-family: monospace !important;\r\n\t\t\twhite-space: nowrap !important;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionStacktraceCall + .exceptionStacktraceFile {\r\n\t\t\tmargin-top: 5px;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionStacktraceCall {\r\n\t\t\tpadding-left: 40px;\r\n\t\t}\r\n\t\t\r\n\t\t.exceptionStacktraceCall,\r\n\t\t.exceptionStacktraceCall span {\r\n\t\t\tcolor: rgb(102, 102, 102) !important;\r\n\t\t\tfont-size: 13px !important;\r\n\t\t}\r\n\t\t\r\n\t\t/* mobile */\r\n\t\t@media (max-width: 767px) {\r\n\t\t\t.exceptionBoundary {\r\n\t\t\t\tmin-width: 320px;\r\n\t\t\t\tpadding: 0 10px;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.exceptionText .exceptionInlineCodeWrapper {\r\n\t\t\t\tdisplay: inline-block;\r\n\t\t\t\toverflow: auto;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.exceptionErrorCode .exceptionInlineCode {\r\n\t\t\t\tfont-size: 13px;\r\n\t\t\t\tpadding: 2px 5px;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/* desktop */\r\n\t\t@media (min-width: 768px) {\r\n\t\t\t.exceptionBoundary {\r\n\t\t\t\tmargin: 0 auto;\r\n\t\t\t\tmax-width: 1400px;\r\n\t\t\t\tmin-width: 1200px;\r\n\t\t\t\tpadding: 0 10px;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.exceptionSystemInformation {\r\n\t\t\t\tdisplay: flex;\r\n\t\t\t\tflex-wrap: wrap;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.exceptionSystemInformation1,\r\n\t\t\t.exceptionSystemInformation3,\r\n\t\t\t.exceptionSystemInformation5 {\r\n\t\t\t\tflex: 0 0 200px;\r\n\t\t\t\tmargin: 0 0 10px 0 !important;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.exceptionSystemInformation2,\r\n\t\t\t.exceptionSystemInformation4,\r\n\t\t\t.exceptionSystemInformation6 {\r\n\t\t\t\tflex: 0 0 calc(100% - 210px);\r\n\t\t\t\tmargin: 0 0 10px 10px !important;\r\n\t\t\t\tmax-width: calc(100% - 210px);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.exceptionSystemInformation1 { order: 1; }\r\n\t\t\t.exceptionSystemInformation2 { order: 2; }\r\n\t\t\t.exceptionSystemInformation3 { order: 3; }\r\n\t\t\t.exceptionSystemInformation4 { order: 4; }\r\n\t\t\t.exceptionSystemInformation5 { order: 5; }\r\n\t\t\t.exceptionSystemInformation6 { order: 6; }\r\n\t\t\t\r\n\t\t\t.exceptionSystemInformation .exceptionFieldValue {\r\n\t\t\t\toverflow: hidden;\r\n\t\t\t\ttext-overflow: ellipsis;\r\n\t\t\t\twhite-space: nowrap;\r\n\t\t\t}\r\n\t\t}\r\n\t</style>\r\n</head>\r\n<body class=\"exceptionBody\">\r\n\t<div class=\"exceptionContainer\">\r\n\t\t<div class=\"exceptionHeader\">\r\n\t\t\t<div class=\"exceptionBoundary\">\r\n\t\t\t\t<p class=\"exceptionTitle\">An error has occured</p>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class=\"exceptionBoundary\">\r\n\t\t\t<p class=\"exceptionSubtitle\">System Information</p>\r\n\t\t\t<ul class=\"exceptionSystemInformation\">\r\n\t\t\t\t<li class=\"exceptionSystemInformation1\">\r\n\t\t\t\t\t<p class=\"exceptionFieldTitle\">PHP Version<span class=\"exceptionColon\">:</span></p>\r\n\t\t\t\t\t<p class=\"exceptionFieldValue\"><?php echo htmlentities(phpversion()); ?></p>\r\n\t\t\t\t</li>\r\n\t\t\t\t<li class=\"exceptionSystemInformation3\">\r\n\t\t\t\t\t<p class=\"exceptionFieldTitle\">WoltLab Suite Core<span class=\"exceptionColon\">:</span></p>\r\n\t\t\t\t\t<p class=\"exceptionFieldValue\">3.0</p>\r\n\t\t\t\t</li>\r\n\t\t\t\t<li class=\"exceptionSystemInformation5\">\r\n\t\t\t\t\t<p class=\"exceptionFieldTitle\">Peak Memory Usage<span class=\"exceptionColon\">:</span></p>\r\n\t\t\t\t\t<p class=\"exceptionFieldValue\"><?php echo round(memory_get_peak_usage() / 1024 / 1024, 3); ?>/<?php echo ini_get('memory_limit'); ?></p>\r\n\t\t\t\t</li>\r\n\t\t\t\t<li class=\"exceptionSystemInformation2\">\r\n\t\t\t\t\t<p class=\"exceptionFieldTitle\">Request URI<span class=\"exceptionColon\">:</span></p>\r\n\t\t\t\t\t<p class=\"exceptionFieldValue\"><?php if (isset($_SERVER['REQUEST_URI'])) echo htmlentities($_SERVER['REQUEST_URI']); ?></p>\r\n\t\t\t\t</li>\r\n\t\t\t\t<li class=\"exceptionSystemInformation4\">\r\n\t\t\t\t\t<p class=\"exceptionFieldTitle\">Referrer<span class=\"exceptionColon\">:</span></p>\r\n\t\t\t\t\t<p class=\"exceptionFieldValue\"><?php if (isset($_SERVER['HTTP_REFERER'])) echo htmlentities($_SERVER['HTTP_REFERER']); ?></p>\r\n\t\t\t\t</li>\r\n\t\t\t\t<li class=\"exceptionSystemInformation6\">\r\n\t\t\t\t\t<p class=\"exceptionFieldTitle\">User Agent<span class=\"exceptionColon\">:</span></p>\r\n\t\t\t\t\t<p class=\"exceptionFieldValue\"><?php if (isset($_SERVER['HTTP_USER_AGENT'])) echo htmlentities($_SERVER['HTTP_USER_AGENT']); ?></p>\r\n\t\t\t\t</li>\r\n\t\t\t</ul>\r\n\t\t</div>\r\n\t\t\t\r\n\t\t<?php\r\n\t\t$e = $this;\r\n\t\t$first = true;\r\n\t\tdo {\r\n\t\t\t$trace = $e->getTrace();\r\n\t\t\tif (isset($trace[0]['function']) && $trace[0]['function'] === 'handleException') {\r\n\t\t\t\t// ignore repacked exception\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t?>\r\n\t\t\t<div class=\"exceptionBoundary\">\r\n\t\t\t\t<p class=\"exceptionSubtitle\"><?php if (!$e->getPrevious() && !$first) { echo \"Original \"; } else if ($e->getPrevious() && $first) { echo \"Final \"; } ?>Error</p>\r\n\t\t\t\t<?php if ($e instanceof SystemException && $e->getDescription()) { ?>\r\n\t\t\t\t\t<p class=\"exceptionText\"><?php echo $e->getDescription(); ?></p>\r\n\t\t\t\t<?php } ?>\r\n\t\t\t\t<ul class=\"exceptionErrorDetails\">\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<p class=\"exceptionFieldTitle\">Error Type<span class=\"exceptionColon\">:</span></p>\r\n\t\t\t\t\t\t<p class=\"exceptionFieldValue\"><?php echo htmlentities(get_class($e)); ?></p>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<p class=\"exceptionFieldTitle\">Error Message<span class=\"exceptionColon\">:</span></p>\r\n\t\t\t\t\t\t<p class=\"exceptionFieldValue\"><?php echo htmlentities($e->getMessage()); ?></p>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t<?php if ($e->getCode()) { ?>\r\n\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t<p class=\"exceptionFieldTitle\">Error Code<span class=\"exceptionColon\">:</span></p>\r\n\t\t\t\t\t\t\t<p class=\"exceptionFieldValue\"><?php echo intval($e->getCode()); ?></p>\r\n\t\t\t\t\t\t</li>\r\n\t\t\t\t\t<?php } ?>\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<p class=\"exceptionFieldTitle\">File<span class=\"exceptionColon\">:</span></p>\r\n\t\t\t\t\t\t<p class=\"exceptionFieldValue\" style=\"word-break: break-all\"><?php echo htmlentities($e->getFile()); ?> (<?php echo $e->getLine(); ?>)</p>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<li>\r\n\t\t\t\t\t\t<p class=\"exceptionFieldTitle\">Stack Trace<span class=\"exceptionColon\">:</span></p>\r\n\t\t\t\t\t\t<ul class=\"exceptionStacktrace\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t$trace = $e->getTrace();\r\n\t\t\t\t\t\t\tfor ($i = 0, $max = count($trace); $i < $max; $i++) {\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t<li class=\"exceptionStacktraceFile\"><?php echo '#'.$i.' '.htmlentities($trace[$i]['file']).' ('.$trace[$i]['line'].')'.':'; ?></li>\r\n\t\t\t\t\t\t\t<li class=\"exceptionStacktraceCall\">\r\n\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\techo $trace[$i]['class'].$trace[$i]['type'].$trace[$i]['function'].'(';\r\n\t\t\t\t\t\t\t\techo implode(', ', array_map(function ($item) {\r\n\t\t\t\t\t\t\t\t\tswitch (gettype($item)) {\r\n\t\t\t\t\t\t\t\t\t\tcase 'integer':\r\n\t\t\t\t\t\t\t\t\t\tcase 'double':\r\n\t\t\t\t\t\t\t\t\t\t\treturn $item;\r\n\t\t\t\t\t\t\t\t\t\tcase 'NULL':\r\n\t\t\t\t\t\t\t\t\t\t\treturn 'null';\r\n\t\t\t\t\t\t\t\t\t\tcase 'string':\r\n\t\t\t\t\t\t\t\t\t\t\treturn \"'\".addcslashes(htmlentities($item), \"\\\\'\").\"'\";\r\n\t\t\t\t\t\t\t\t\t\tcase 'boolean':\r\n\t\t\t\t\t\t\t\t\t\t\treturn $item ? 'true' : 'false';\r\n\t\t\t\t\t\t\t\t\t\tcase 'array':\r\n\t\t\t\t\t\t\t\t\t\t\t$keys = array_keys($item);\r\n\t\t\t\t\t\t\t\t\t\t\tif (count($keys) > 5) return \"[ \".count($keys).\" items ]\";\r\n\t\t\t\t\t\t\t\t\t\t\treturn '[ '.implode(', ', array_map(function ($item) {\r\n\t\t\t\t\t\t\t\t\t\t\t\treturn $item.' => ';\r\n\t\t\t\t\t\t\t\t\t\t\t}, $keys)).']';\r\n\t\t\t\t\t\t\t\t\t\tcase 'object':\r\n\t\t\t\t\t\t\t\t\t\t\treturn get_class($item);\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\tthrow new \\LogicException('Unreachable');\r\n\t\t\t\t\t\t\t\t}, $trace[$i]['args']));\r\n\t\t\t\t\t\t\t\techo ')</li>';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t</li>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t\t<?php\r\n\t\t\t$first = false;\r\n\t\t} while ($e = $e->getPrevious());\r\n\t\t?>\r\n\t\t?>\r\n\t</div>\r\n</body>\r\n</html>\r\n\r\n<?php\r\n\t}", "public function displayException($i) {\n if (!headers_sent())\n header('X-Error: By Brid Api');\n $error = array('name' => $i->getMessage(), 'message' => $i->getFile(), 'error' => $i->getMessage(), 'class' => get_class($i));\n if ($i->getCode() != 0) {\n $error['code'] = $i->getCode();\n }\n\n echo json_encode($error);\n }", "public function getHTMLText()\n {\n $output = \"--[ Agile Toolkit Exception ]---------------------------\\n\";\n $output .= get_class($this).\": <font color='pink'><b>\".$this->getMessage().'</b></font>'.\n ($this->getCode() ? ' [code: '.$this->getCode().']' : '');\n\n foreach ($this->params as $key => $val) {\n $key = str_pad($key, 19, ' ', STR_PAD_LEFT);\n $output .= \"\\n\".$key.': '.$this->toString($val);\n }\n\n $output .= \"\\nStack Trace: \";\n\n $in_atk = true;\n $escape_frame = false;\n\n foreach ($this->getMyTrace() as $call) {\n if (!isset($call['file'])) {\n $call['file'] = '';\n } elseif (\n $in_atk &&\n strpos($call['file'], '/data/src/') === false &&\n strpos($call['file'], '/core/src/') === false &&\n strpos($call['file'], '/dsql/src/') === false\n ) {\n $escape_frame = true;\n $in_atk = false;\n }\n\n $file = str_pad(substr($call['file'], -40), 40, ' ', STR_PAD_LEFT);\n\n $line = str_pad(@$call['line'], 4, ' ', STR_PAD_LEFT);\n\n $output .= \"\\n<font color='cyan'>\".$file.'</font>';\n $output .= \":<font color='pink'>\".$line.'</font>';\n\n if (isset($call['object'])) {\n $name = (!isset($call['object']->name)) ? get_class($call['object']) : $call['object']->name;\n $output .= \" - <font color='yellow'>\".$name.'</font>';\n }\n\n $output .= \" <font color='gray'>\";\n\n if (isset($call['class'])) {\n $output .= $call['class'].'::';\n }\n $output .= '</font>';\n\n if ($escape_frame) {\n $output .= \"<font color='pink'>\".$call['function'].'</font>';\n $escape_frame = false;\n\n $args = [];\n foreach ($call['args'] as $arg) {\n $args[] = $this->toString($arg);\n }\n\n $output .= \"\\n\".str_repeat(' ', 20).\"<font color='pink'>(\".implode(', ', $args);\n } else {\n $output .= \"<font color='gray'>\".$call['function'].'(';\n }\n\n $output .= ')</font>';\n }\n\n if ($p = $this->getPrevious()) {\n $output .= \"\\n\\nCaused by Previous Exception:\\n\";\n $output .= get_class($p).\": <font color='pink'>\".$p->getMessage().'</font>'.\n ($p->getCode() ? ' [code: '.$p->getCode().']' : '');\n }\n\n // next print params\n\n $output .= \"\\n--------------------------------------------------------\\n\";\n\n return $output;\n }", "function sysError( $err = NULL, $errHeader = NULL, $errTitle = NULL ){\n\t\n\tglobal $output, $sys;\n\t\n\t$err = ( $err === NULL ) ? \"We apologize for the trouble! Please try again later.\" : $err;\n\t\n\tif( defined( \"NO_STYLING\" ) && NO_STYLING == true )\n\t\t// Ajax generated error - do not return HTML\n\t\tdie( $err );\n\t\n\t$errHeader = ( $errHeader === NULL ) ? \"We've hit an error\" : $errHeader;\n\t$errTitle = ( $errTitle === NULL ) ? \"Oops!\" : $errTitle;\n\t\n\t$output['message']['title'] = $errHeader;\n\t$output['message']['text'] = $err;\n\t\n\t$screen = new Screen();\n\t$screen->show( 'master/error_message.tpl', $errTitle );\n\t\n\texit();\n\t\n}", "private function generateExceptionMessages () {\n $this->genericExceptionMessages[\"entityTypePropertyCombo\"] =\n \"Updating a \" . $this->entityType. \"'s $this->entityProperty is \" .\n \"not currently supported through the API, for details of \" .\n \"the currently supported methods see: $this->docsURL\";\n $this->genericExceptionMessages[\"entityTypePropertyMethod\"] =\n \"\\\"\" . $this->requestMethod . \"\\\" is not currently a supported \" .\n \"request method for altering\" . $this->entityType. \"'s \" .\n $this->entityProperty . \" . For more details see: $this->docsURL\";\n }", "public static function show_production_error(\\Exception $e)\n\t{\n\t\tif (\\Fuel::$is_cli)\n\t\t{\n\t\t\treturn static::show_php_error($e);\n\t\t}\n\n\t\tif ( ! headers_sent())\n\t\t{\n\t\t\t$protocol = \\Input::server('SERVER_PROTOCOL') ? \\Input::server('SERVER_PROTOCOL') : 'HTTP/1.1';\n\t\t\theader($protocol.' 500 Internal Server Error');\n\t\t}\n\n\t\t$response = '';\n\t\ttry {\n\t\t\t$response = \\CMF::getCustomErrorResponse(\\Lang::get(\"site.errors.http.500\", array( 'resource' => 'page' ), \\Lang::get(\"site.errors.http.default\", array( 'resource' => 'page' ), 'Please contact the website administrator')));\n\t\t} catch (\\Exception $e) {\n\t\t\t$response = \\View::forge('errors'.DS.'production');\n\t\t}\n\n\t\texit($response);\n\t}", "abstract protected function echoExceptionWeb($exception);", "public function UnhandeldException(){\n\t\t$this -> message = \"An unhandeld exception was thrown. Please infrom...\";\n\t}", "private function showExceptionAdmin(\\Exception $exception)\n {\n \\ShowError($exception->getMessage());\n\n echo nl2br($exception);\n }", "function api_error_setup() {\n\tset_exception_handler(function(Throwable $e) {\n\t\ttry {\n\t\t\techo APIException::make_json_string(APIException::map_to_code($e), $e);\n\t\t\tls_log($e->__toString(), LOGERR);\n\t\t} catch (Exception $e) {\n\t\t\t/*\n\t\t\t* Exceptions thrown in the exception handler\n\t\t\t* cause hard to debug fatal errors. Handle them.\n\t\t\t*/\n\t\t\techo '{\"error\":'.API_E_INTERNAL.', \"e_msg\":\"'.$e->getMessage().\n\t\t\t\t' (in exception handler, '.$e->getFile().' '.$e->getLine().')\"}';\n\t\t}\n\t\texit(1);\n\t});\n}", "public function actionError(){\n return $this->render('../system/error'.Yii::$app->response->getStatusCode());\n }", "public function ErrorFatal()\n\t{\n\t\t$this->Render();\n\t}", "public function render_ui() {\n $err = $this->err_to_array();\n include(__DIR__ . '/../html/template/error.php');\n }", "public function showError();", "public function errorAction() {\n\t\t\n\t\t$errors = $this->_getParam('error_handler');\n\t\t\n\t\tswitch ($errors->type) {\n\t\t\t \n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n\t\t\t\t\n\t\t\t\t// stranka nebyla nalezena - HTTP chybova hlaska 404\n\t\t\t\t$this->getResponse()->setHttpResponseCode(404);\n\t\t\t\t$this->view->message = 'Stránka nenalezena';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\t// chyba v aplikaci - HTTP chybova hlaska 500\n\t\t\t\t$this->getResponse()->setHttpResponseCode(500);\n\t\t\t\t$this->view->message = 'Chyba v aplikaci';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n $this->view->env = APPLICATION_ENV;\n\t\t$this->view->exception = $errors->exception;\n\t\t$this->view->request = $errors->request;\n\t\t$this->view->title = 'Objevila se chyba';\r\n\t\t$this->view->showDetails = ini_get('display_errors');\r\n\t\t\n\t\t$this->_helper->layout->setLayout('error');\n\t\t\n\t}", "private static function errorText(Exception $e)\r\n {\r\n echo nl2br($e->getMessage() . ' in ' . $e->getFile() . ' on ' . $e->getLine()) . \"\\n\";\r\n }", "abstract protected function echoExceptionCli($exception);", "function myExeptionHandler($exeption) {\n\techo \"Triton: Uncaught exeption; <p>\" . $exeption->getMessage() . \"<p><pre>\" . $exeption->getTraceAsString(), \"</pre>\"; // punkt här emellan???\n}", "function print_exception(Exception $e) {\n $debug = ini_get('display_errors');\n\n ob_end_clean();\n\n if ($e instanceof HttpException) {\n if (!headers_sent()) header('HTTP/1.0 '.$e->getStatusCode().' '.$e->getTitle());\n echo '<h1>'.$e->getTitle().'</h1>';\n } else {\n if (!headers_sent()) header('HTTP/1.0 500 Internal Server Error');\n echo '<h1>Internal Server Error</h1>';\n }\n if ($debug) {\n echo '<h2>'.get_class($e).': '.$e->getMessage().'</h2>';\n echo '<pre>'.$e->getTraceAsString().'</pre>';\n }\n}", "public static function displayErrors(){\n $ec = new EmailLabsConfig();\n if( $ec->getMode() == true && !empty( self::$errors ) ){\n $message = '';\n foreach( self::$errors as $item )\n $message .= '['.$item['lvl'].']['.$item['date'].']'.$item['msg'].\"\\n\";\n die( $message );\n }\n }", "protected function getBackTrace(){\n\t\treturn array('Inicio', 'Facturaci&oacute;n');\n\t}", "abstract protected function _getErrorString();", "public function renderEnvironmentIndicator() {\n\t\t$environment = $this->wire('adminTheme')->environmentindicator;\n\t\t$user = $this->wire('user');\n\n\t\tif ($user->isSuperuser()) {\n\n\t\t\tif ($environment && $environment != \"none\") {\n\t\t\t\treturn \"<div class='module-environmentindicator module-environmentindicator--\" . strtolower($environment) . \"'><i class='fa fa-code'></i> \" . $environment . \"</div>\";\n\t\t\t}\n\t\t}\n\t}", "function base_requirements_error() {\n\trequire_once( dirname( __FILE__ ) . '/views/system-requirements-error.php' );\n}", "public function initError ()\n\t{\n\t\tswitch ($this->getProfile())\n\t\t{\n\t\t\tcase 'development':\n\t\t\t\terror_reporting(E_ALL);\n\t\t\t\tini_set('display_errors', 'On');\n\t\t\t\tMVCLite_Db::getInstance()->display(true);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tini_set('display_errors', 'Off');\n\t\t\t\tMVCLite_Db::getInstance()->display(false);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function __toString()\n {\n $statusStr = ($this->getHttpStatus() == null) ? \"\" : \"(HTTP {$this->getHttpStatus()}) \";\n $idStr = ($this->getRequestId() == null) ? \"\" : \"(Request {$this->getRequestId()}) \";\n $codeStr = ($this->getTelnyxCode() == null) ? \"\" : \"(Code {$this->getTelnyxCode()}) \";\n return \"Telnyx API Exception {$statusStr}{$codeStr}{$idStr}{$this->getMessage()}\";\n }", "protected function renderAsError() {}", "protected function checkEnvironmentOrDie() {}", "public function render()\r\n {\r\n $this->view->toView([\"subTitle\" => \"Error\"])->loadError($this->code);\r\n }", "protected function renderInMaintenance(Exception $e)\n {\n die(view('inMaintenance'));\n }", "public function actionError()\n {\n if(Core::getLoggedUserID() > 0)\n {\n\t \t $exception = Yii::$app->errorHandler->exception;\n\t \t $error = array('statusCode' => $exception->statusCode, 'message' => $exception->getMessage(), 'name' => $exception->getName());\n \t\t return $this->render('/error', ['error' => $error]);\n }\n else\n {\n\t \t\treturn Yii::$app->getResponse()->redirect(Yii::$app->getHomeUrl().'admin')->send();\n }\n }", "public function showFailed();", "public function toString()\n {\n return 'GUI Zreport error';\n }", "public function getException();", "function ez_print_stacktrace( Exception $e ) {\n\techo ez_format_stacktrace($e);\n}", "function error_reporting() {\n\t\t$r='';\n\t\tif (mb_strlen(self::$error)>0) {\n\t\t\t$r.=self::$error;\n\t\t}\n\t\tif (count(self::$error_arr)>0) {\n\t\t\t$r.='<h2>Произошли следующие ошибки:</h2>'.\"\\n\".'<ul>';\n\t\t\tforeach(self::$error_arr as $key=>$value) {\n\t\t\t\t$r.='<li>'.$value.'</li>';\n\t\t\t}\n\t\t\t$r.='</ul>';\n\t\t}\n\t\treturn $r;\n\t}", "protected function renderNotInstalled(Exception $e)\n {\n die(view('notInstalled'));\n }", "function ExceptionHandler($e)\n{\n\theader('HTTP/1.1 500 Internal Server Error');\n\tob_get_clean();\n\techo '<div style=\"background: #f1f1f1;padding: 20px;\">';\n\techo '<h3 style=\"margin-left:30px\">Ops there an exception</h3>';\n\techo '<b style=\"margin-left:30px\">Exception:</b> ' . $e->getMessage() . '<br>';\n\techo '<b style=\"margin-left:30px\">File:</b> ' . $e->getFile() . '<br>';\n\techo '<b style=\"margin-left:30px\">Line:</b> ' . $e->getLine() . '<br>';\n\techo '<b style=\"margin-left:30px\">PHP:</b> ' . PHP_VERSION . ' (' . PHP_OS . ')<br>';\n\techo '</div>';\n\tdie();\n}", "public function errorInfo() {}", "public function show($process, $name)\n {\n $this->title('New exception command :');\n //\n if ($process) {\n $this->info(\"\\nThe exception was created\");\n $this->comment(\" -> Path : app/exceptions/$name.php\\n\");\n } else {\n $this->error(\"\\nThe exception is already existe\\n\");\n }\n }", "public function render500Error() {\n echo \"<h1>500</h1><p>Internal Server Error</p>\n <a href='?'>Go back to start</a>\";\n }", "public function outputFriendlyError()\n {\n //Erase contents of the output buffer\n ob_end_clean();\n view('errors/generic');\n exit;\n }", "function showError(){\n\t\techo json_encode(array(\n\t\t\t\"alert\" => \"error\",\n\t\t\t\"title\" => \"Failed to Update!\",\n\t\t\t\"message\" => \"Program Updating has been Failed\"\n\t\t));\n\t}", "public function cannotPerformReferencingErrorAction()\n {\n $this->renderTwigView('/iris-referencing/cannot-perform-referencing-error.html.twig');\n }", "function JPSpan_ExceptionHandler($exception) {\r\n\r\n $name = 'Server_Error';\r\n $file = addcslashes($exception->getFile(),\"\\000\\042\\047\\134\");\r\n\r\n if ( !JPSPAN_ERROR_MESSAGES ) {\r\n $message = 'Server unable to respond';\r\n } else {\r\n $message = strip_tags($exception->getMessage());\r\n $message = wordwrap($message, 60, '\\n', 1);\r\n }\r\n\r\n $code = 2005;\r\n\r\n $error = \"var e = new Error('$message');e.name = '$name';e.code = '$code';\";\r\n if ( JPSPAN_ERROR_DEBUG ) {\r\n $error .= \"e.file = '$file';e.line = '\".$exception->getLine().\"';\";\r\n }\r\n $error .= \"throw e;\";\r\n echo 'new Function(\"'.addcslashes($error,\"\\000\\042\\047\\134\").'\");';\r\n\r\n if ( !defined('JPSPAN') ) {\r\n define ('JPSPAN',dirname(__FILE__).'/');\r\n }\r\n require_once JPSPAN . 'Monitor.php';\r\n $M = & JPSpan_Monitor::instance();\r\n $M->announceError($name, $code, $message, $file, $exception->getLine());\r\n\r\n exit();\r\n\r\n}", "static public function ExceptPrint($_Except){\r\n $Msg_ = \"<b>Fatal \".get_class($_Except).\" : </b>\";\r\n $Msg_ .= $_Except->GetMessage().\" in <b>\".$_Except->GetFile();\r\n $Msg_ .= \"</b> on line <b>\".$_Except->GetLine().\"</b><br />\\n\";\r\n print($Msg_);\r\n }", "public function actionError()\n {\n if($error=Yii::app()->errorHandler->error)\n {\n if($error['code'] != 404 || !isset($aErrorMsg[$error['errorCode']])){\n Yii::log(' error : ' . $error['file'] .\":\". $error['line'] .\":\". $error['message'], 'error', 'system');\n }\n $ret = new ReturnInfo(FAIL_RET, Yii::t('exceptions', $error['message']), intval($error['errorCode']));\n if(Yii::app()->request->getIsAjaxRequest()){\n echo json_encode($ret);\n \n }else{\n if( empty($error['errorCode']) ){\n if(isset($this->aErrorMsg[$error['code']])){\n if(empty($this->aErrorMsg[$error['code']]['message'])) {\n $this->aErrorMsg[$error['code']]['message'] = $error['message'];\n }\n $this->render('error', $this->aErrorMsg[$error['code']]);\n }else{\n $this->render('error', $this->aErrorMsg['1000']);\n }\n }else{\n $this->render('error', $this->aErrorMsg[ $error['errorCode'] ]);\n \n }\n }\n \n } \n }", "function throwError($exceptionItem){\n\techo \"\n\t\n\t<p style='font-family:arial;color:red;font-size:20px;'> Error parsing : . $exceptionItem->error_message \n\t\n\t</p>\"; // catch this in the parse method and do $e->getMessage() to show it.\n\n\t//break; // try and break the current loop\n\n\n}", "public function exceptionHandler(Throwable $exception, ?bool $display = null): string;", "public function getExceptions();", "public function getHTML()\n {\n $output = '<div class=\"ui negative icon message\"><i class=\"warning sign icon\"></i><div class=\"content\"><div class=\"header\">Fatal Error</div>';\n $output .= get_class($this).': '.$this->getMessage().\n ($this->getCode() ? ' <div class=\"ui small yellow label\">Code<div class=\"detail\">'.$this->getCode().'</div></div>' : '');\n $output .= '</div>'; // content\n $output .= '</div>';\n\n if ($this->params) {\n $output .= '<div class=\"ui top attached segment\">';\n $output .= '<div class=\"ui top attached label\">Exception Parameters</div>';\n $output .= '<ul class=\"list\">';\n\n foreach ($this->params as $key => $val) {\n $key = str_pad($key, 19, ' ', STR_PAD_LEFT);\n $output .= '<li><b>'.htmlentities($key).'</b>: '.htmlentities($this->toString($val)).'</li>';\n }\n\n $output .= '</ul>';\n $output .= '</div>';\n }\n\n $output .= '<div class=\"ui top attached segment\">';\n $output .= '<div class=\"ui top attached label\">Stack Trace</div>';\n $output .= '<table class=\"ui very compact small selectable table\">';\n $output .= '<thead><tr><th>File</th><th>Object</th><th>Method</th></tr></thead><tbody>';\n\n $in_atk = true;\n $escape_frame = false;\n\n foreach ($this->getMyTrace() as $call) {\n if (!isset($call['file'])) {\n $call['file'] = '';\n } elseif (\n $in_atk &&\n strpos($call['file'], '/data/src/') === false &&\n strpos($call['file'], '/core/src/') === false &&\n strpos($call['file'], '/dsql/src/') === false\n ) {\n $escape_frame = true;\n $in_atk = false;\n }\n\n $file = str_pad(substr($call['file'], -40), 40, ' ', STR_PAD_LEFT);\n\n $line = str_pad(@$call['line'], 4, ' ', STR_PAD_LEFT);\n\n if ($escape_frame) {\n $output .= \"<tr class='negative'><td>\".$file;\n } else {\n $output .= '<tr><td>'.$file;\n }\n $output .= ':'.$line.'</td><td>';\n\n if (isset($call['object'])) {\n $name = (!isset($call['object']->name)) ? get_class($call['object']) : $call['object']->name;\n $output .= $name;\n } else {\n $output .= '-';\n }\n\n $output .= '</td><td>';\n\n if (isset($call['class'])) {\n $output .= $call['class'].'::';\n }\n\n if ($escape_frame) {\n $output .= $call['function'];\n $escape_frame = false;\n\n $args = [];\n foreach ($call['args'] as $arg) {\n $args[] = $this->toString($arg);\n }\n\n $output .= \"</td></tr><tr class='negative'><td colspan=2></td><td> (\".str_repeat(' ', 20).implode(', ', $args).')';\n } else {\n $output .= $call['function'].'()';\n }\n\n $output .= '</td></tr>';\n }\n\n $output .= '</tbody></table>';\n $output .= '</div>';\n\n if ($p = $this->getPrevious()) {\n $output .= '<div class=\"ui top attached segment\">';\n $output .= '<div class=\"ui top attached label\">Caused by Previous Exception:</div>';\n\n if ($p instanceof \\atk4\\core\\Exception) {\n $output .= $p->getHTML();\n } else {\n //$output .= \"\\033[1;31m\".get_class($p).': '.$p->getMessage().\"\\033[0;31m\".\n //($p->getCode() ? ' [code: '.$p->getCode().']' : '');\n\n $output .= '<div class=\"ui negative icon message\"><i class=\"warning sign icon\"></i><div class=\"content\"><div class=\"header\">Fatal Error</div>';\n $output .= get_class($p).': '.$p->getMessage().\n ($p->getCode() ? ' <div class=\"ui small yellow label\">Code<div class=\"detail\">'.$p->getCode().'</div></div>' : '');\n $output .= '</div>'; // content\n $output .= '</div>';\n }\n\n $output .= '</div>';\n }\n\n return $output;\n }", "function __toString() { \n \t$html .= '<strong>SQL Exception</strong>';\n \t$html .= '<br>DATE : ' . date('Y-m-d H:i');\n \t$html .= '<br>DESCRIPTION : ' . $this->getDescription();\n \tif(system_session_privilege() >= 5){\n \t\t$html .= '<br>MESSAGE : ' . $this->getMessage();\n \t\t$html .= '<br>CODE : ' . $this->getCode();\n \t\t$html .= '<br>SQL : ' . $this->getQuery();\n \t\t$html .= '<br>FILE : ' . $this->getFile();\n \t\t$html .= '<br>LINE : ' . $this->getLine();\n \t\t$html .= '<br>TRACE : ' . $this->getTraceAsString();\n \t}\n \treturn $html;\n }", "public function errorInfo();", "public function errorInfo();", "public function displayError() : string\n\t{\n\t\tif (!$this->debug)\n\t\t\treturn \"<b>ErrorMessage: </b> [\".$this->getMessage().\"] <br /><br />\";\n\t\t\n\t\t$errorMessage = \"<b>ErrorMessage: </b> [\".$this->getMessage().\"] <br />\";\n\t\t$errorMessage .= \"<b>ErrorLine: </b> [\".$this->getLine().\"] <br />\";\n\t\t$errorMessage .= \"<b>ErrorFile: </b> [\".$this->getFile().\"] <br />\";\n\t\t$errorMessage .= \"<b>ErrorClass: </b> [\".__CLASS__ .\"] <br />\";\n\t\t$errorMessage .= \"<b>ErrorCode: </b> [\".$this->getCode().\"]. <br /><br />\";\n\t\treturn $errorMessage;\n\t}", "public function errorAction()\r\n {\r\n $errors = $this->_getParam('error_handler');\r\n $messages = array();\r\n\r\n switch ((string)$errors->type) {\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\r\n // 404 error -- controller or action not found\r\n $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');\r\n\r\n $messages[] = Zoo::_(\"The page you requested was not found.\");\r\n if (ZfApplication::getEnvironment() == \"development\" || ZfApplication::getEnvironment() == \"staging\") {\r\n $messages[] = $errors->exception->getMessage();\r\n }\r\n break;\r\n\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_OTHER:\r\n case 0:\r\n // application error\r\n //$messages[] = Zoo::_(\"An unexpected error occurred with your request. Please try again later.\");\r\n $messages[] = $errors->exception->getMessage();\r\n if (ZfApplication::getEnvironment() == \"development\" || ZfApplication::getEnvironment() == \"staging\") {\r\n $trace = $errors->exception->getTrace();\r\n foreach (array_keys($trace) as $i) {\r\n if ($trace[$i]['args']) {\r\n foreach ($trace[$i]['args'] as $index => $arg) {\r\n if (is_object($arg)) {\r\n $trace[$i]['args'][$index] = get_class($arg);\r\n }\r\n elseif (is_array($arg)) {\r\n $trace[$i]['args'][$index] = \"array\";\r\n }\r\n }\r\n }\r\n $trace[$i]['file_short'] = \"..\".substr($trace[$i]['file'], strrpos(str_replace(\"\\\\\", DIRECTORY_SEPARATOR, $trace[$i]['file']), DIRECTORY_SEPARATOR));\r\n }\r\n $this->view->assign('trace', $trace);\r\n }\r\n break;\r\n\r\n default:\r\n // application error\r\n $this->getResponse()->setRawHeader('HTTP/1.1 '.$errors->type);\r\n $messages[] = $errors->exception->getMessage();\r\n break;\r\n }\r\n\r\n // Clear previous content\r\n $this->getResponse()->clearBody();\r\n\r\n $this->view->assign('errormessages', $messages);\r\n }", "public function __toString()\n\t{\n\t\treturn Rest_Exception::text($this);\n\t}", "protected function checkEnvironmentOrDie(): void\n {\n if (PHP_SAPI !== 'cli') {\n die('Not called from a command line interface (e.g. a shell or scheduler).' . LF);\n }\n }", "function module_builder_handle_sanity_exception($e) {\n $failed_sanity_level = $e->getFailedSanityLevel();\n switch ($failed_sanity_level) {\n case 'data_directory_exists':\n $message = \"The component data directory could not be created or is not writable.\";\n break;\n case 'component_data_processed':\n $message = \"No component data was found. Run 'drush mb-download' to process component data from documentation files.\";\n break;\n }\n drush_set_error(DRUSH_APPLICATION_ERROR, $message);\n}", "private function _error() {\n\t\trequire $this->_controllerPath . $this->_errorFile;\n\t\t$this->_controller = new Error();\n\t\t$this->_controller->index('Esta página no existe');\n\t\texit;\n\t}", "public static function printErrors() {\n\t\tif (PNApplication::hasErrors()) {\n\t\t\tforeach (PNApplication::$errors as $e)\n\t\t\t\techo \"<div style='color:#C00000;font-familiy:Tahoma;font-size:10pt'><img src='\".theme::$icons_16[\"error\"].\"' style='vertical-align:bottom'/> \".$e.\"</div>\";\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"if (typeof window.top.status_manager != 'undefined'){\";\n\t\t\tforeach (PNApplication::$errors as $e)\n\t\t\t\techo \"window.top.status_manager.addStatus(new window.top.StatusMessageError(null,\".json_encode($e).\",5000));\";\n\t\t\techo \"};\";\n\t\t\techo \"window.page_errors=[\";\n\t\t\t$first = true;\n\t\t\tforeach (PNApplication::$errors as $e) {\n\t\t\t\tif ($first) $first = false; else echo \",\";\n\t\t\t\techo json_encode($e);\n\t\t\t}\n\t\t\techo \"];\";\n\t\t\techo \"</script>\";\n\t\t}\n\t\tif (PNApplication::hasWarnings()) {\n\t\t\techo \"<script type='text/javascript'>\";\n\t\t\techo \"if (typeof window.top.status_manager != 'undefined'){\";\n\t\t\tforeach (PNApplication::$warnings as $e)\n\t\t\t\techo \"window.top.status_manager.addStatus(new window.top.StatusMessage(window.top.Status_TYPE_WARNING,\".json_encode($e).\",[{action:'popup'},{action:'close'}],5000));\";\n\t\t\techo \"};\";\n\t\t\techo \"</script>\";\n\t\t}\n\t}", "function exception_handler($exception)\r\n{\r\n?>\r\n<script type=\"text/javascript\">\r\nfunction toggleLayer( whichLayer )\r\n{\r\n var elem;\r\n if( document.getElementById ) elem = document.getElementById( whichLayer );\r\n else if( document.all ) elem = document.all[whichLayer];\r\n else if( document.layers ) elem = document.layers[whichLayer];\r\n if(elem.style.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined) elem.style.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';\r\n elem.style.display = (elem.style.display==''||elem.style.display=='block')?'none':'block';\r\n}\r\n</script>\r\n<?php\r\n echo \"<pre>\";\r\n $tolog=\"\";\r\n $stacktrace=\"\";\r\n $stacktrace.=\"Application raised an exception class <b>\".get_class($exception).\"</b> with message <b>'\".$exception->getMessage().\"'</b>\\n\";\r\n $msg=strip_tags($stacktrace).\"|\";\r\n $stack=array_reverse($exception->getTrace());\r\n reset($stack);\r\n $tab=\"\";\r\n $c=\"\";\r\n $stacktrace.='<a href=\"javascript:toggleLayer(\\'callstack\\');\">Click for detailed information</a><div id=\"callstack\" style=\"display:none;\">';\r\n while (list($k,$v)=each($stack))\r\n {\r\n $stacktrace.=$tab.$c.\"Callstack #$k File: <b><A HREF=\\\"rphp://$v[file],$v[line]\\\">\".$v['file'].\"</A></b> Line: <b>\".$v['line'].\"</b>\\n\";\r\n $tolog.=$v['line'].\"@\".$v['file'].'@'.$msg;\r\n $tab.=\" \";\r\n $c=\"|_\";\r\n }\r\n echo $stacktrace;\r\n echo '</div>';\r\n echo \"</pre>\";\r\n error_log($tolog);\r\n}", "function atkExceptionHandler(Exception $exception)\n{\n\tatkdebug($exception->getMessage(), DEBUG_ERROR);\n\tatkdebug(\"Trace:<br/>\".nl2br($exception->getTraceAsString()), DEBUG_ERROR);\n\tatkhalt(\"Uncaught exception: \" . $exception->getMessage(), 'critical');\n}", "protected static function exception()\n {\n foreach (self::fetch('exceptions') as $file) {\n Bus::need($file);\n }\n }", "public function errorAction() {\n $errors = $this->_getParam(\"error_handler\");\n \n // assegno i valori alla view\n $this->viewInit();\n switch ($errors->type) {\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n // 404 error -- controller or action not found \n $this->getResponse()->setRawHeader(\"HTTP/1.1 404 Not Found\");\n $this->view->title = \"HTTP/1.1 404 Not Found\";\n break;\n default:\n // application error; display error page, but don't change \n // status code\n $this->view->title = \"Application Error\";\n break;\n }\n $this->view->message = $errors->exception;\n }", "function to_html() {\n\t\t$type = get_class($this);\n\t\t$file = $this->get_file();\n\t\t$line = $this->get_line();\n\t\t$msg = nl2br($this->get_message());\n\t\t$trace = \"<li>\".str_replace(\"\\n\", \"</li>\\n<li>\", $this->get_trace_as_string()).\"</li>\\n</ul>\";\n\n\t\tob_start();\n\t\tinclude SAINT_ROOT.'/templates/exception.phtml';\n\t\t\n\t\treturn ob_get_clean();\n\t}", "protected function getExceptionHandler()\n {\n return \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('tx_mktools_util_ExceptionHandler');\n }", "function DisplayError()\n\t\t{\n\t\t\techo \"<div>\" . $this->error_message . \"</div>\";\n\t\t}", "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n // Build the error message:\n $message = \"Error $e_number occurred in script '$e_file' on line $e_line:\n $e_message\\n\";\n\n // Append $e_vars to $message:\n $message .= print_r ($e_vars, 1);\n\n if (!LIVE) { // Development (print the error).\n echo '<pre>' . $message . \"\\n\";\n debug_print_backtrace();\n echo '</pre><br />';\n } else { // Don't show the error.\n echo '<div style=\"color:red;\">A system error occurred.\n We apologize for the inconvenience.</div><br />';\n }\n\n}", "function mqfBootstrapException($e)\n{\n if (isset($_SERVER['HTTP_HOST']) and isset($_SERVER['REQUEST_METHOD'])) {\n $execmode = 'http';\n } elseif (isset($_SERVER['SHELL'])) {\n $execmode = 'console';\n } else {\n $execmode = 'console';\n }\n\n if ($execmode == 'console') {\n die($e->getMessage().\"\\n\");\n }\n\n echo formatGuruMeditationException($e);\n\n try {\n if (class_exists('MQF_Log', false)) { // false means \"don't autoload class\"\n MQF_Log::log(\"Bootstrap exception: \".$e->getMessage().\"\\n\".print_r($e, true), MQF_FATAL);\n }\n } catch (Exception $e) {\n // no need to throw this, and it's wrong anyway\n }\n\n die();\n}", "public function indexAction()\n {\n $e = $this->getException();\n if ($e instanceof \\FMUP\\Exception\\Status) {\n $this->errorStatus($e->getStatus());\n }\n $this->render();\n }", "function ShowErr () \n\t{\t\n \t \tif ($this -> CodigoError == 0)\n \t\t{\n \t\t$Salida [\"exito\"] = 1;\n\t\t}else{\n\t\t$Salida [\"exito\"] = 0; \t\t\n\t\t$Salida [\"errorCode\"] = $this -> CodigoError;\n\t\t$Salida [\"errorText\"] = $this -> TextoError;\n \t\t}\n\n\treturn $Salida;\n\t}", "public function getErr() {}", "public function message()\n {\n return 'Errores en plantilla<li>'.join('</li><li>',$this->invalid);\n }", "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {\r\n // Build the error message:\r\n $message = \"An error occurred in script '$e_file' on line $e_line: $e_message\\n\";\r\n // Append $e_vars to $message:\r\n $message .= print_r ($e_vars, 1);\r\n if (!LIVE) { // Development (print the error).\r\n echo '<pre>' . $message . \"\\n\";\r\n debug_print_backtrace();\r\n echo '</pre><br>';\r\n } else { // Don't show the error.\r\n echo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div><br>';\r\n }\r\n}", "public function onKernelException()\n {\n echo '<br> something wrong happened ! exeption event listener successfuly fired :D ';\n }", "private static function _echoErrorPage(stderror $errObj)\n {\n if (is_null($errObj))\n $errObj = new stderror();\n\n header(\"HTTP/1.x 404 Script error\");\n header(\"Content-Type: text/html;charset=\".self::DEFAULT_CHARSET);\n \n if (!is_null(self::$m_warStack))\n echo stderr::getFormatedWarnings()->str(self::DEFAULT_CHARSET);\n \n echo \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\">\n<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\">\n<head>\n <title>\".self::$m_siteName.\" - \".$errObj->name()->str(self::DEFAULT_CHARSET).\"</title>\n <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=\".self::DEFAULT_CHARSET.\"\\\" />\n <meta http-equiv=\\\"content-language\\\" content=\\\"ru\\\" />\n <meta name=\\\"robots\\\" content=\\\"noindex,nofollow\\\" />\n</head>\n<body>\n <h1><a href = \\\"http://\".$_SERVER['SERVER_NAME'].\"\\\">\".self::$m_siteName.\"</a></h1>\n <p>URL: http://\".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'].\"</p>\n <hr />\n <h2>\".$errObj->name()->str(self::DEFAULT_CHARSET).\" \".($errObj->code() != 0 ? \"(\".$errObj->code().\")\" : \"\").\"</h2>\n <p>\n \".$errObj->text()->str(self::DEFAULT_CHARSET).\"\n </p>\n <hr />\n <i>\".self::$m_userMessage.\" (<a href=\\\"mailto:\".self::$m_siteEmail.\"\\\">\".self::$m_siteEmail.\"</a>)</i>\n</body>\";\n\n die();\n }", "public function registerExceptionHandler() {\n\t\tif (!$this->_request()->is('api')) {\n\t\t\treturn;\n\t\t}\n\n\t\tApp::uses('CrudExceptionRenderer', 'Crud.Error');\n\t\tConfigure::write('Exception.renderer', 'Crud.CrudExceptionRenderer');\n\t}", "public function error() \n\t{\n\t\trequire $this->view('error', 'error');\n\t\texit;\n\t}", "public function displayEnvironmentDetails(array $vars);", "protected function showErrors()\n { // Process the data\n if(\n isset($this->_config->views->{$this->_action}->data) and\n $this->_config->views->{$this->_action}->data\n ) {\n // Grab a reference to the data element obj from the configuration\n $dataCfg = $this->_config->views->{$this->_action}->data;\n\n // Create a SimpleXML element out of the HTML\n libxml_use_internal_errors(true);\n \n // Strip out the doctype\n $doctypes = array();\n if( preg_match_all('/\\<!doctype[^>]*>/i',$this->_output,$doctypes) === false ) {\n throw new CHttpException(500,'Internal Error');\n }\n $doctypes = count($doctypes)?$doctypes[0]:array();\n \n $this->_output = trim(str_replace($doctypes,'',$this->_output));\n // Load the template into an XML object\n $xml = simplexml_load_string($this->_output);\n\n // Process any errors found loading the XML\n if($xml === false)\n { // Loop through the errors and log an error event for each\n foreach(libxml_get_errors() as $error)\n {\n echo $error->message.\"\\n<br />\";\n \n // error_log('Error parsing XML file ' . $file . ': ' . $error->message);\n }\n\n // Report an error back to the caller\n throw new CHttpException(500,'Internal Error');\n return;\n }\n\n // Initialize the message vars\n $showMsg = false;\n $msgBox = '<div class=\"errorBox\"><h2>Please fix the following errors</h2><ul>';\n\n // Loop through the config elements and add the error class\n foreach( $dataCfg as $dataId => $dataEl ) {\n // Check for an error for the data element\n if( in_array($dataId,array_keys($this->_errors)) ) {\n // Indicate that there are errors to show\n $showMsg = true;\n \n //// MESSAGE\n $msgBox .= '<li>'.$this->_errors[$dataId].' </li>';\n \n //// LABEL\n // Get the element from markup using XPath\n $result = $xml->xpath(\"//label[@for='rbm_{$this->_domain->type}_{$dataId}']\");\n // If the element was not found, move on to the next element\n if( count( $result ) ) {\n // Grab the element\n $el = $result[0];\n // Add the value attribute if it doesn't exist\n if( !$el->attributes()->class ) {\n // Add the value attribute\n $el->addAttribute('class','error');\n } else {\n $val = $el->attributes()->class;\n $val .= ' error';\n $el->attributes()->class = $val;\n }\n }\n\n //// ELEMENT(S)\n if( isset($dataEl->components) and is_array($dataEl->components) ) {\n foreach($dataEl->components as $id => $component) {\n $result = $xml->xpath(\"//*[@id='rbm_{$this->_domain->type}_{$component}']\");\n // If the element was not found, move on to the next element\n if( count( $result ) ) {\n // Grab the element\n $el = $result[0];\n // Add the value attribute if it doesn't exist\n if( !$el->attributes()->class ) {\n // Add the value attribute\n $el->addAttribute('class','error');\n } else {\n $val = $el->attributes()->class;\n $val .= ' error';\n $el->attributes()->class = $val;\n }\n }\n }\n } else {\n $result = $xml->xpath(\"//*[@id='rbm_{$this->_domain->type}_{$dataId}']\");\n // If the element was not found, move on to the next element\n if( count( $result ) ) {\n // Grab the element\n $el = $result[0];\n // Add the value attribute if it doesn't exist\n if( !$el->attributes()->class ) {\n // Add the value attribute\n $el->addAttribute('class','error');\n } else {\n $val = $el->attributes()->class;\n $val .= ' error';\n $el->attributes()->class = $val;\n }\n }\n }\n }\n }\n\n // Wrap up the message box\n $msgBox .= ' </ul></div>';\n \n // Show the message if errors were found\n if( $showMsg ) {\n \n // Convert output to a DOMDocument for prepend operation (SimpleXML cannot do prepend)\n $dom = new DOMDocument('1.0');\n $dom->loadXML($xml->asXML());\n\n // Query for content\n $xpath = new DOMXPath($dom);\n $query = \"//*[@id='rbm_{$this->_domain->type}_content']\";\n $results = $xpath->query($query); \n $msg = dom_import_simplexml(simplexml_load_string($msgBox));\n $msg = $dom->importNode($msg,true);\n\n // Loop through the results and add the new message box (should only execute once - IDs are unique)\n foreach($results as $content) {\n $content->insertBefore($msg, $content->firstChild);\n }\n\n // Convert back to SimpleXML\n $xml = simplexml_import_dom($dom);\n }\n \n // Fetch and process output\n $this->_output = str_replace('<?xml version=\"1.0\"?>','',$xml->asXML());\n foreach($doctypes as $doctype) {\n $this->_output = $doctype.\"\\n\".$this->_output;\n }\n }\n }", "private function logException()\n {\n switch ($this->classShortName) {\n case 'IndexException':\n case 'CreateException':\n case 'ReadException':\n case 'UpdateException':\n case 'DeleteException':\n Log::error($this->message);\n Log::error(print_r($this->getExceptionData(), true));\n break;\n default:\n Log::error($this->message);\n }\n }" ]
[ "0.7072849", "0.65907395", "0.63008344", "0.6243075", "0.62424797", "0.61828935", "0.618009", "0.61599827", "0.6127345", "0.61010796", "0.6092079", "0.6037707", "0.5998014", "0.59810966", "0.5979642", "0.5979626", "0.5965294", "0.59558785", "0.5955093", "0.59546053", "0.59513617", "0.59283537", "0.59220606", "0.5921168", "0.5919691", "0.5901942", "0.59006757", "0.5888819", "0.58819747", "0.5853831", "0.5850182", "0.5839968", "0.58335215", "0.5826921", "0.58169585", "0.5792588", "0.57919663", "0.5789258", "0.5773629", "0.5773465", "0.5773137", "0.57601637", "0.57568693", "0.5742752", "0.5742487", "0.57366717", "0.57358474", "0.573199", "0.57217026", "0.5718982", "0.5706492", "0.57022774", "0.56976914", "0.5696389", "0.5684307", "0.56817913", "0.568022", "0.5664298", "0.56625575", "0.56615967", "0.5661321", "0.5652709", "0.5644452", "0.5631503", "0.56286967", "0.5613843", "0.5603002", "0.56005514", "0.5597579", "0.55943817", "0.5593862", "0.5593862", "0.55911607", "0.5587021", "0.5586993", "0.5585268", "0.5581404", "0.5573242", "0.5571947", "0.5571732", "0.5564813", "0.5563499", "0.5562903", "0.55571246", "0.55567795", "0.55554706", "0.55523956", "0.5550857", "0.554386", "0.5540755", "0.55370855", "0.55367076", "0.5534713", "0.55335295", "0.5530997", "0.5528584", "0.5527908", "0.5527193", "0.5526189", "0.5523617" ]
0.6172784
7
Form values with proper resoluted values.
public function setConflictResolution($rawValues) { foreach ($rawValues as $table => $pairs) { foreach ($pairs as $pairId => $values) { $data = & $this->getPairDataById($table, $pairId); foreach ($values as $column => $value) { if (!isset($data[self::IDX_RESOLUTION])) { $data[self::IDX_RESOLUTION] = []; } $data[self::IDX_RESOLUTION][$column] = $value; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function populate_value()\n {\n }", "function value_form(&$form, &$form_state) {\n $form['value'] = array(\n '#type' => 'textfield',\n '#size' => 15,\n '#default_value' => $this->value,\n '#attributes' => array('title' => t('Enter the terms you wish to search for.')),\n '#title' => empty($form_state['exposed']) ? t('Value') : '',\n );\n }", "protected function mergeflexFormValuesIntoConf() {}", "function value_form(&$form, &$form_state) {\n $form['value']['column'] = array(\n '#type' => 'textfield',\n '#title' => t('Property column'),\n '#default_value' => $this->value['column'],\n '#description' => t('Name of the database column to use in the comparison.'),\n );\n\n // We know which properties are available, so we can show a select box.\n if (isset($this->definition['available_properties'])) {\n $form['value']['column']['#type'] = 'select';\n $form['value']['column']['#options'] = array_combine($this->definition['available_properties'], $this->definition['available_properties']);\n }\n\n $form['value']['value'] = array(\n '#type' => 'textfield',\n '#title' => t('Value'),\n '#size' => 30,\n '#default_value' => $this->value['value'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(1))),\n );\n $form['value']['min'] = array(\n '#type' => 'textfield',\n '#title' => t('Min'),\n '#size' => 30,\n '#default_value' => $this->value['min'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(2))),\n );\n $form['value']['max'] = array(\n '#type' => 'textfield',\n '#title' => t('And max'),\n '#size' => 30,\n '#default_value' => $this->value['max'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(2))),\n );\n }", "protected function setSubmittedValues()\n {\n if ( $this->setFundraiserId() ) {\n $this->setFundraiserProfile(); \n }\n\n $this->setAmount();\n \n $this->setFirstName();\n $this->setLastName();\n $this->setEmail();\n $this->setTelephone();\n \n $this->setAddress();\n $this->setCity();\n $this->setCountry();\n $this->setRegion();\n $this->setPostalCode();\n \n $this->setAnonymity();\n $this->setHideAmount();\n }", "public function formatFormValues( $values )\n\t{\n\t\treturn $values;\n\t}", "function formValue(\\Jazzee\\Entity\\Answer $answer);", "public function valiteForm();", "function populate() {\n // @todo We inject client input directly into the form. What about\n // security issues?\n if (isset($this->form->request['raw_input'][$this->attributes['name']])) {\n // Disabled input elements do not accept new input.\n if (!$this->disabled) {\n $this->value = $this->form->request['raw_input'][$this->attributes['name']];\n }\n }\n }", "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}", "public function setValues(){\n if($this->getType() == \"var\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"int\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"bool\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"string\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"nil\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"label\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"type\"){\n $this->setValue($this->getArg());\n }else{\n $this->setValue(\"CHYBA\");\n }\n }", "function convertValueFieldKeys()\n {\n foreach ($this->vars as $key => $val) {\n if (substr($key, -6) == '_value') {\n $this->vars[substr($key, 0, -6)] = $val;\n unset($this->vars[$key]);\n }\n }\n }", "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->etiqueta=$_POST['etiqueta'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->icono=$_POST['icono'];\n\t}", "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 formatFormValues( $values )\n\t{\n\t\tif( !$this->id )\n\t\t{\n\t\t\t$this->save();\t\t\t\n\t\t}\n\n\t\t\\IPS\\Lang::saveCustom( 'core', \"security_question_{$this->id}\", $values['security_question_title'] );\n\t\tunset( $values['security_question_title'] );\n\n\t\treturn $values;\n\t}", "function setInputValues( array $values );", "private function assignValues() {\n $this->setIndicators('value');\n\n $leftIndicator = $this->sugarTemplateIndicators['valueLeft'] . $this->sugarTemplateIndicators['valueSeparator'];\n $rightIndicator = $this->sugarTemplateIndicators['valueSeparator'] . $this->sugarTemplateIndicators['valueRight'];\n\n foreach ($this->assignedValues as $tag => $value) {\n $this->rootContent = str_replace($leftIndicator . $tag . $rightIndicator, $value, $this->rootContent);\n }\n }", "public function formatFormValues( $values )\n\t{\n\t\tif ( !$this->id )\n\t\t{\n\t\t\t$this->save();\n\t\t}\n\t\t\n\t\tif( isset( $values['status_name'] ) )\n\t\t{\n\t\t\t\\IPS\\Lang::saveCustom( 'nexus', \"nexus_status_{$this->id}_admin\", $values['status_name'] );\n\t\t\tunset( $values['status_name'] );\n\t\t}\n\n\t\tif( isset( $values['status_public_name'] ) )\n\t\t{\n\t\t\t\\IPS\\Lang::saveCustom( 'nexus', \"nexus_status_{$this->id}_front\", $values['status_public_name'] );\n\t\t\tunset( $values['status_public_name'] );\n\t\t}\n\n\t\tif( isset( $values['status_public_set'] ) )\n\t\t{\n\t\t\tif ( $values['status_public_set'] )\n\t\t\t{\n\t\t\t\t\\IPS\\Lang::saveCustom( 'nexus', \"nexus_status_{$this->id}_set\", $values['status_public_set_text'] );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\\IPS\\Db::i()->delete( 'core_sys_lang_words', array( 'word_app=? AND word_key=?', 'nexus', \"nexus_status_{$this->id}_set\" ) );\n\t\t\t}\n\t\t\tunset( $values['status_public_set_text'] );\n\t\t}\n\t\t\n\t\tif( isset( $values['status_is_locked'] ) )\n\t\t{\n\t\t\t$values['status_is_locked'] = !$values['status_is_locked'];\n\t\t}\n\t\t\n\t\tif( isset( $values[ \"status_member\" ] ) OR isset( $values['status_staff'] ) )\n\t\t{\n\t\t\tforeach ( array( 'member', 'staff' ) as $k )\n\t\t\t{\n\t\t\t\tif ( isset( $values[ \"status_{$k}\" ] ) and in_array( $k, $values[ \"status_{$k}\" ] ) )\n\t\t\t\t{\n\t\t\t\t\t$values[\"default_{$k}\"] = TRUE;\n\t\t\t\t\t\\IPS\\Db::i()->update( 'nexus_support_statuses', array( 'default_member' => 0 ) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$values[\"default_{$k}\"] = FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( isset( $values['status_default'] ) )\n\t\t{\n\t\t\tif ( in_array( 'member', $values['status_default'] ) )\n\t\t\t{\n\t\t\t\t$this->default_member = TRUE;\n\t\t\t\t\\IPS\\Db::i()->update( 'nexus_support_statuses', array( 'status_default_member' => 0 ) );\n\t\t\t}\n\t\t\tif ( in_array( 'staff', $values['status_default'] ) )\n\t\t\t{\n\t\t\t\t$this->default_staff = TRUE;\n\t\t\t\t\\IPS\\Db::i()->update( 'nexus_support_statuses', array( 'status_default_staff' => 0 ) );\n\t\t\t}\n\t\t\tunset( $values['status_default'] );\n\t\t}\n\t\t\n\t\tif( isset( $values['status_color'] ) )\n\t\t{\n\t\t\t$values['status_color'] = ltrim( $values['status_color'], '#' );\n\t\t}\n\t\t\t\t\t\t\n\t\treturn $values;\n\t}", "public static function GetFormValues(){\n self::$KeyValue = isset($_REQUEST[\"KeyValue\"]) ? $_REQUEST[\"KeyValue\"] : \"\"; \n \n if (self::$KeyValue == \"\"){\n\t self::$KeyValue = \"new zealand\"; \n\t }\n\t \n\t \n\t self::$KeyValue = urlencode(self::$KeyValue);\n\t \n\t self::$MapLattitude = isset($_REQUEST[\"MapLattitude\"]) ? $_REQUEST[\"MapLattitude\"] : \"\"; \n\t self::$MapLongtitude= isset($_REQUEST[\"MapLongtitude\"]) ? $_REQUEST[\"MapLongtitude\"] : \"\"; \n\t \n }", "function setInputValues()\n {\n // Set input type based on GET/POST\n $inputType = ($_SERVER['REQUEST_METHOD'] === 'POST') ? INPUT_POST : INPUT_GET;\n // Init global variables\n global $typeID, $classID, $makeID, $price, $model, $year;\n global $sort, $sortDirection;\n // Set each variable, escape special characters\n $typeID = filter_input($inputType, 'typeID', FILTER_VALIDATE_INT);\n $classID = filter_input($inputType, 'classID', FILTER_VALIDATE_INT);\n $makeID = filter_input($inputType, 'makeID', FILTER_VALIDATE_INT);\n $sort = filter_input($inputType, 'sort', FILTER_VALIDATE_INT);\n $sortDirection = filter_input($inputType, 'sortDirection', FILTER_VALIDATE_INT);\n $price = filter_input($inputType, 'price', FILTER_VALIDATE_INT);\n $year = filter_input($inputType, 'year', FILTER_VALIDATE_INT);\n $model = htmlspecialchars(filter_input($inputType, 'model'));\n }", "protected function addNamesLabelsValues() {\n foreach ($this->__fields() as $field) {\n $this->$field->__name = $field;\n if (!$this->$field->label && $this->$field->label !== '') $this->$field->label = strtoupper($field[0]) . substr ($field, 1);\n $this->setFieldValue($field);\n $this->$field->setForm($this);\n }\n }", "function value_form(&$form, &$form_state) {\n parent::value_form($form, $form_state);\n if (empty($form_state['exposed']) && !empty($form['operator']['#options'])) {\n $is_open = array('is_open' => t('is open'));\n $form['operator']['#options'] = array_merge($is_open, $form['operator']['#options']);\n $is_open_or_judging = array('is_judged' => t('is being judged'));\n $form['operator']['#options'] = array_merge($is_open_or_judging, $form['operator']['#options']);\n $is_closed = array('is_closed' => t('is closed'));\n $form['operator']['#options'] = array_merge($is_closed, $form['operator']['#options']);\n }\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}", "protected function _setFieldValues($values) {\n foreach ($this->getElements() as $key => $element) {\n if (count(explode('_', $key)) == 3) {\n list($parent_id, $option_id, $field_id) = explode('_', $key);\n if (isset($values[$field_id])) {\n $element->setValue($values[$field_id]);\n }\n }\n }\n }", "protected function adjustOptionsValues()\n {\n $this->init();\n $this->create();\n }", "public function getInputValues();", "protected function fill()\n {\n array_map(function ($field) {\n $defaultValue = isset($this->defaultFields[$field]['defaultValue']) ?\n $this->defaultFields[$field]['defaultValue'] :\n null;\n\n $this->values[$field] = (new $this->defaultFields[$field]['format']($defaultValue))\n ->setPosition($this->defaultFields[$field]['position'])\n ->setLength($this->defaultFields[$field]['length']);\n }, array_keys($this->defaultFields));\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 SetFromFormValue( $form_value ){\r\n\t\t\tif( is_array( $form_value ) ){\r\n\t\t\t\t$this->day = str_pad( $form_value[ 'day' ], 2, '0', STR_PAD_LEFT );\r\n\t\t\t\t$this->month = str_pad( $form_value[ 'month' ], 2, '0', STR_PAD_LEFT );\r\n\t\t\t\t$this->year = $form_value[ 'year' ];\r\n\t\t\t}\r\n\t\t}", "protected function getPostValues() {}", "private function load_values($name, &$value, &$attributes) {\n if(isset($this->errors[$name])) {\n $attributes = Appform::add_class($attributes, 'error');\n }\n if(isset($this->defaults[$name]) && $value == NULL) {\n $value = $this->defaults[$name];\n }\n if(isset($this->values[$name]) && $value == NULL) {\n $value = $this->values[$name];\n }\n }", "protected function prepareForValidation()\n {\n $merge = [];\n\n if ($this->valtotal) {\n $merge['valtotal'] = Format::strToFloat($this->valtotal);\n }\n\n $this->merge($merge);\n }", "function setValue($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\t// Quick fix for overzealous Zend validation, its case sensitive on month names (see #5990)\n\t\t\tif(is_string($val)) $val = ucwords(strtolower($val));\n\t\t\t\n\t\t\tif($this->getConfig('dmyfields')) {\n\t\t\t\t// Setting in correct locale\n\t\t\t\tif(is_array($val) && $this->validateArrayValue($val)) {\n\t\t\t\t\t// set() gets confused with custom date formats when using array notation\n\t\t\t\t\t$this->valueObj = new Zend_Date($val, null, $this->locale);\n\t\t\t\t\t$this->value = $this->valueObj->toArray();\n\t\t\t\t}\n\t\t\t\t// load ISO date from database (usually through Form->loadDataForm())\n\t\t\t\telse if(!empty($val) && Zend_Date::isDate($val, $this->getConfig('datavalueformat'), $this->locale)) {\n\t\t\t\t\t$this->valueObj = new Zend_Date($val, $this->getConfig('datavalueformat'), $this->locale);\n\t\t\t\t\t$this->value = $this->valueObj->toArray();\n\t\t\t\t}\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} else {\n\t\t\t\t// Setting in corect locale.\n\t\t\t\t// Caution: Its important to have this check *before* the ISO date fallback,\n\t\t\t\t// as some dates are falsely detected as ISO by isDate(), e.g. '03/04/03'\n\t\t\t\t// (en_NZ for 3rd of April, definetly not yyyy-MM-dd)\n\t\t\t\tif(!empty($val) && Zend_Date::isDate($val, $this->getConfig('dateformat'), $this->locale)) {\n\t\t\t\t\t$this->valueObj = new Zend_Date($val, $this->getConfig('dateformat'), $this->locale);\n\t\t\t\t\t$this->value = $this->valueObj->get($this->getConfig('dateformat'), $this->locale);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// load ISO date from database (usually through Form->loadDataForm())\n\t\t\t\telse if(!empty($val) && Zend_Date::isDate($val, $this->getConfig('datavalueformat'))) {\n\t\t\t\t\t$this->valueObj = new Zend_Date($val, $this->getConfig('datavalueformat'));\n\t\t\t\t\t$this->value = $this->valueObj->get($this->getConfig('dateformat'), $this->locale);\n\t\t\t\t}\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\t}", "public function formatFormValues( $values )\n\t{\n\t\tif ( !$this->id )\n\t\t{\n\t\t\t$this->save();\n\t\t}\n\t\t\n\t\tif( isset( $values['action_name'] ) )\n\t\t{\n\t\t\t\\IPS\\Lang::saveCustom( 'nexus', \"nexus_stockaction_{$this->id}\", $values['action_name'] );\n\t\t\tunset( $values['action_name'] );\n\t\t}\n\t\t\n\t\tif ( isset( $values['action_message_on'] ) AND !$values['action_message_on'] )\n\t\t{\n\t\t\t$values['action_message'] = NULL;\n\t\t}\n\t\tunset( $values['action_message_on'] );\n\t\t\n\t\tforeach ( array( 'status', 'department' ) as $k )\n\t\t{\n\t\t\tif( isset( $values[\"action_{$k}\"] ) )\n\t\t\t{\n\t\t\t\t$values[\"action_{$k}\"] = $values[\"action_{$k}\"] ?: NULL;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( isset( $values['action_staff'] ) )\n\t\t{\n\t\t\t$values['action_staff'] = $values['action_staff'] ? \\IPS\\Member::load( $values['action_staff'] ) : NULL;\n\t\t}\n\t\t\n\t\tif( isset( $values['action_show_in'] ) )\n\t\t{\n\t\t\t$values['action_show_in'] = $values['action_show_in'] ? implode( ',', array_keys( $values['action_show_in'] ) ) : '*';\n\t\t}\n\t\t\n\t\treturn $values;\n\t}", "public function getFormValues()\n {\n $values = $this->getCreateOrderModel()->getBillingAddress()->getData();\n\n //Set default values if original value is null\n foreach (Mage::helper('borriglione_ordercreatedefault/data')\n ->getUnserializedDefaultValues($this->getStore(), $this->getQuote()->getId()) as $defaultValue) {\n if (true === array_key_exists($defaultValue['element_id'], $values)\n && '' == $values[$defaultValue['element_id']]) {\n $values[$defaultValue['element_id']] = $defaultValue['value'];\n }\n }\n\n return $values;\n }", "private function setAutofillFields() {\n foreach (static::getFields() as $field_name => $field) {\n if ($field instanceof AutofillField) {\n $this->values[$field_name] = $field->fill();\n }\n }\n }", "public function getFormValues()\n {\n return array(\n 'title' => $this->issue['subject'],\n 'reference' => $this->issue['id'],\n 'date_started' => $this->issue['start_date'],\n 'description' => $this->issue['description']\n );\n }", "function asignar_valores(){\n\t\t$this->codigo=$_POST['codigo'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->categoria=$_POST['categoria'];\n\t\t$this->hotel=$_POST['hoteles'];\n\t\t$this->cantidad=$_POST['cantidad'];\n\t\t$this->lugar=$_POST['lugar'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->detal=$_POST['detal'];\n\t\t$this->mayor=$_POST['mayor'];\n\t\t$this->limite=$_POST['limite'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->claves=$_POST['claves'];\n\t\t$this->segmento=$_POST['segmento'];\n\t\t$this->principal=$_POST['principal'];\n\t\t\n\t\t\n\t}", "function asignar_valores(){\n $this->nombre=$_POST['nombre'];\n $this->prioridad=$_POST['prioridad'];\n $this->etiqueta=$_POST['etiqueta'];\n $this->descripcion=$_POST['descripcion'];\n $this->claves=$_POST['claves'];\n $this->tipo=$_POST['tipo'];\n }", "public function GetFormPostedValues() {\n\t\t$req_fields=array(\"description\",\"date_open\",\"date_closed\");\n\n\t\tfor ($i=0;$i<count($req_fields);$i++) {\n\n\t\t\t//echo $_POST['application_id'];\n\t\t\tif (ISSET($_POST[$req_fields[$i]]) && !EMPTY($_POST[$req_fields[$i]])) {\n\t\t\t\t$this->SetVariable($req_fields[$i],EscapeData($_POST[$req_fields[$i]]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//echo \"<br>\".$this->req_fields[$i].\"<br>\";\n\t\t\t\t$this->$req_fields[$i]=\"\";\n\t\t\t}\n\t\t}\n\t}", "public function setInputValues(&$values, $load = false);", "public function getValues( array $arr = array() ){\n $values = isset( $arr['__post'] ) ? $arr['__post'] : $arr;\n if( !isset($arr[ self::returnName($this->getName()) ]) ){\n $formPrefix = $this->getName().'/';\n foreach( $values as $k => $v ){\n if( strpos( $k, $formPrefix ) == 0 ){\n $this->values[ substr( $k, strlen($formPrefix) ) ] = $v;\n }\n }\n } else {\n $data = $arr[ self::returnName( $this->getName() ) ];\n foreach( $data as $k => $v ){\n $this->values[ $k ] = $v;\n }\n }\n\n if( isset( $arr['__errors'] ) ){\n $this->errors = $arr['__errors'];\n }\n }", "private function _set_fields()\n {\n @$this->form_data->question_id = 0;\n\n $this->form_data->category_id = 0;\n $this->form_data->sub_category_id = 0;\n $this->form_data->sub_two_category_id = 0;\n $this->form_data->sub_three_category_id = 0;\n $this->form_data->sub_four_category_id = 0;\n\n $this->form_data->ques_text = '';\n $this->form_data->survey_weight = '';\n $this->form_data->ques_type = '';\n $this->form_data->qus_fixed = 0;\n $this->form_data->ques_expiry_date = '';\n\n\n $this->form_data->filter_question = '';\n $this->form_data->filter_category = 0;\n $this->form_data->filter_type = '';\n $this->form_data->filter_expired = '';\n }", "public function postProcess() {\n\t\t//\t\t$this->setSubmittedValue(strtoupper($this->getSubmittedValue()));\n\t}", "function asignar_valores(){\n\t\t$this->tabla=$_POST['tabla'];\n\t\t$this->pertenece=$_POST['pertenece'];\n\t\t$this->asunto=$_POST['asunto'];\n\t\t$this->descripcion=$_POST['contenido'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->hora=$_POST['hora'];\n\t\t$this->fechamod=$_POST['fechamod'];\n\t}", "protected function _prepareForm()\n {\n /**\n * @var $value \\Amasty\\Finder\\Model\\Value\n */\n $value = $this->_coreRegistry->registry('current_amasty_finder_value');\n $finder = $this->_coreRegistry->registry('current_amasty_finder_finder');\n $settingData = [];\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n [\n 'data' => [\n 'id' => 'edit_form',\n 'action' => $this->getUrl('amasty_finder/value/save', ['id' => $this->getRequest()->getParam('id'), 'finder_id'=>$finder->getId()]),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data',\n ],\n ]\n );\n $form->setUseContainer(true);\n $this->setForm($form);\n\n $fieldset = $form->addFieldset('set', array('legend'=> __('General')));\n $fieldset->addField('sku', 'text', [\n 'label' => __('SKU'),\n 'title' => __('SKU'),\n 'name' => 'sku',\n ]);\n\n if($value->getId()) {\n $settingData['sku'] = $value->getSkuById($this->getRequest()->getParam('id'), $value->getId());\n }\n $currentId = $value->getId();\n\n\n $fields = [];\n while($currentId) {\n $alias_name = 'name_' . $currentId;\n $alias_label = 'label_'.$currentId;\n\n $model = clone $value;\n $model->load($currentId);\n $currentId = $model->getParentId();\n $dropdownId = $model->getDropdownId();\n $dropdown = $this->_objectManager->create('Amasty\\Finder\\Model\\Dropdown')->load($dropdownId);\n $dropdownName = $dropdown->getName();\n $settingData[$alias_name] = $model->getName();\n $fields[$alias_name] = [\n 'label' => __($dropdownName),\n 'title' => __($dropdownName),\n 'name' => $alias_label\n ];\n }\n\n $fields = array_reverse($fields);\n\n foreach($fields as $alias_name=>$fieldData) {\n $fieldset->addField($alias_name, 'text', $fieldData);\n }\n\n if(!$value->getId()) {\n $finder = $value->getFinder();\n\n foreach ($finder->getDropdowns() as $drop){\n $alias_name = 'name_'.$drop->getId();\n $alias_label = 'label_'.$drop->getId();\n $fieldset->addField($alias_name, 'text', [\n 'label' => __($drop->getName()),\n 'title' => __($drop->getName()),\n 'name' => $alias_label\n ]);\n }\n\n $fieldset->addField('new_finder', 'hidden', ['name' => 'new_finder']);\n $settingData['new_finder'] = 1;\n }\n\n\n //set form values\n $form->setValues($settingData);\n\n return parent::_prepareForm();\n }", "protected function _processForm (array $values, $form) {\n \n //---> blank codes <------\n $code99 = array(\n 'aborid','gender','popgrp','homelang',\n 'borncan','referby','marital','adults','numchild',\n 'actlim1', 'actlim2'\n );\n \n\t$code88 = array(\n\t\t'brsc5','brsc6'\n\t);\n \n $code77 = array(\n 'grade','ch1age','ch2age','ch3age','ch4age',\n 'ch5age','ch6age','ch7age','ch8age','hous1a',\n\t 'prlt1a','prlt2a','prlt3a','prlt4a','prlt5a','prlt6a','prlt7a',\n\t 'prlt1b','prlt2b','prlt3b','prlt4b','prlt5b','prlt6b','prlt7b',\n\t 'prst1a','prst2a','prst3a','prst4a',\n\t 'prst1b','prst2b','prst3b','prst4b'\n );\n \n $code777 = array(\n 'yrscan'\n );\n\n $code1 = array(\n 'cadu1', 'cadu2', 'cadu3', 'cadu4', 'cadu5', 'cadu6', 'cadu7', 'cadu8',\n 'cadu9', 'cadu10', 'cadu11', 'cadu12', 'cadu13', 'cadu14', 'cadu15', 'cadu16'\n );\n \n $codeDate = array(\n 'hous1until'\n );\n\n\t $codeNA = array(\n\t 'genderoth'\n\t );\n \n //---> alphanumeric questions <----\n $alphaNums = array(\n 'popgrp','homelang','country', 'referby'\n );\n \n //end code book option arrays\n \n $questions = array();\n //get all necessary elements\n $elementSQL = \"SELECT elementID,fsiiName,options \n FROM customFormElements\n WHERE fsiiName IS NOT NULL\n AND formID = $form\";\n $elementList = $this->elmntModel->getAdapter()\n ->fetchAll(\"$elementSQL\");\n \n foreach ($elementList as $element) {\n $eName = $element['elementID'];\n \n if (array_key_exists($eName, $values)) {\n $val = $values[$eName];\n } else {\n $val = '';\n }\n \n \n $qCode = $element['fsiiName'];\n //FCSS handles multiple-answer questions as series of\n //separate 'yes/no' dyads; we prefer checkboxes,\n //so must process. we've called these 'processCheck' for convenience\n \n if ($qCode == 'processCheck') {\n $submittedAnswers = explode(' , ' , strtolower($val));\n \n $set = json_decode($element['options'], TRUE);\n \n foreach ($set as $newQuestionCode => $newValue) {\n \n if (in_array(strtolower(trim($newValue)), $submittedAnswers)) {\n $answerCode = '2'; //YES\n } elseif (strlen($val) > 0) {\n $answerCode = '1'; //NO\n } else {\n $answerCode = '77' ; //NA\n }\n $processedCheckSet = array (\n 'QuestionCode' => $newQuestionCode,\n 'Answer' => $answerCode\n );\n array_push($questions,$processedCheckSet);\n }\n continue;\n }\n \n \n $answers = json_decode($element['options'], TRUE);\n \n //if there are coded options, $answers will be > 0,\n //but some coded options (in $alphaNums) no longer want their codes\n \n if ((!in_array($qCode,$alphaNums)) && (count ($answers) > 0)) {\n $codes = array_flip($answers);\n if (array_key_exists($val,$codes)) {\n $response = $codes[$val]; \n } else {\n $response = '';\n }\n } else {\n //keep free text\n $response = $val;\n }\n \n if (in_array($qCode, $code99)) {\n $blankCode = '99';\n } elseif (in_array ($qCode, $code88)){\n $blankCode = '88';\n } elseif (in_array ($qCode, $code77)){\n $blankCode = '77';\n } elseif (in_array($qCode, $code777)) {\n $blankCode = '777';\n } elseif (in_array($qCode, $code1)) {\n $blankCode = '1';\n } elseif (in_array($qCode, $codeDate)) {\n $blankCode = '7777-77-77'; \n } elseif (in_array($qCode, $codeNA)) {\n $blankCode = 'na'; \n } else {\n $blankCode = '';\n }\n \n if ($response == '') $response = $blankCode;\n \n $tempAnswerSet = array (\n 'QuestionCode' => $qCode,\n 'Answer' => $response\n );\n \n array_push($questions,$tempAnswerSet);\n \n }\n \n if ($form == '100') //Intake form requires age, will calculate\n {\n $ptcp = new Application_Model_DbTable_Participants;\n $ptcpID = $values['uid'];\n $ptcpRecord = $ptcp->getRecord($ptcpID);\n $age = $ptcpRecord['age'];\n $tempAnswerSet = array (\n 'QuestionCode' => 'age',\n 'Answer' => $age\n );\n array_push($questions,$tempAnswerSet); \n }\n \n if ($form == '103') //Discontinue form requires date twice\n {\n $tempAnswerSet = array (\n 'QuestionCode' => 'disc',\n 'Answer' => $values['responseDate']\n );\n \n array_push($questions,$tempAnswerSet);\n }\n \n /* LEGACY \n if ($form == '102' || $form == '113') { //In poverty forms, question-codes vary based on prepost\n \n if ($values['prepost'] == 'pre') {\n $suffix = 'a';\n $emptySuffix = 'b';\n } else {\n $suffix = 'b';\n $emptySuffix = 'a';\n }\n \n foreach ($questions as $key => $qArray) { \n $code = $qArray['QuestionCode'];\n \n $qArray['QuestionCode'] = $code . $suffix;\n $questions[$key] = $qArray;\n \n $emptyArray = array(\n 'QuestionCode' => $code . $emptySuffix,\n 'Answer' => '77'\n );\n array_push($questions, $emptyArray);\n }\n \n } */\n \n return $questions;\n }", "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->valor_vehiculo=$_POST['valor_vehiculo'];\n\t\t$this->saldo=$_POST['saldo'];\n\t\t$this->valor_inicial=$_POST['valor_inicial'];\n\t\t$this->comision=$_POST['comision'];\n\t\t$this->plazo=$_POST['plazo'];\n\t\t$this->cuotas=$_POST['cuotas'];\n\t\t$this->total=$_POST['total'];\n\t}", "function asignar_valores2(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->apellido=$_POST['apellido'];\n\t\t$this->telefono=$_POST['telefono'];\n\t\t$this->email=$_POST['email'];\n\t\t\n\t\t$this->marca=$_POST['marca'];\n\t\t$this->modelo=$_POST['modelo'];\n\t\t$this->ano=$_POST['ano'];\n\t\t$this->tipo=$_POST['tipo'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t}", "public function prepareForm()\n {\n // Searching for the data to populate the Form\n\n // Adding default value to the list\n\n // Setting the lists in $data array\n $data = [\n ];\n\n //dd($data);\n\n return $data;\n }", "private function getSelectFormValues()\n {\n $program_id = User::getLoggedInUser()->getCurrentProgram()->id;\n $selection_by = $this->_getParam('selection_by');\n $all_students = true;\n\n if ($selection_by == \"by-requirements\") {\n $default_filters = array('graduationStatus' => array(1), 'show_instructors' => 1);\n\n // format sub-filters for the students\n $filters = [];\n\n if ($this->_getParam('graduationMonth')) {\n $filters['graduationMonth'] = $this->_getParam('graduationMonth');\n }\n if ($this->_getParam('graduationYear')) {\n $filters['graduationYear'] = $this->_getParam('graduationYear');\n }\n if ($this->_getParam('certs')) {\n $filters['certificationLevels'] = $this->_getParam('certs');\n }\n if ($this->_getParam('status')) {\n $filters['graduationStatus'] = $this->_getParam('status');\n }\n if ($this->_getParam('groups')) {\n $filters['section'] = $this->_getParam('groups');\n }\n $filters['show_instructors'] = $this->_getParam('show_instructors');\n\n // if the filters are different than our standard set\n if ($filters != $default_filters) {\n $all_students = false;\n } else {\n $all_students = true;\n }\n\n if ($this->_getParam('all_students')) {\n $all_students = true;\n $filters = $default_filters;\n }\n $userContextIds = $this->getRoleDataIds($filters, $this->getParam('show_instructors'));\n $requirement_ids = array_unique($this->_getParam('requirement_ids'));\n } else {\n $userContextIds = $this->getParam('userContextIds');\n $requirement_ids = $this->requirementRepository->getRequirements($program_id, true, true, true, true);\n }\n\n $selectFormValues = [\n \"selection-by\" => $selection_by,\n \"userContextIds\" => $userContextIds,\n \"requirementIds\" => $requirement_ids,\n \"people_sub_filters\" => $filters,\n \"all_students\" => $all_students\n ];\n\n return $selectFormValues;\n }", "private function setAttributeFieldValue()\n {\n // Get all our attribute objects\n $proxiedAttrs = $this->getAttributes();\n \n $data = [];\n foreach ($proxiedAttrs as $attrObjArr) {\n foreach ($attrObjArr as $attrObj) {\n $dataKey = $attrObj->getFieldName();\n $dataVal = $this->getRequest()->postVar($dataKey);\n $data[$dataKey] = $dataVal;\n }\n }\n \n $json = $this->dbObject('AttributeData')->toJson($data);\n $this->setField('AttributeData', $json);\n }", "function load_values($data = false) {\n\t\tif ($data === false) {\n\t\t\tfix_POST_slashes();\n\t\t\t$data = $_POST;\n\t\t}\n\t\tforeach ($this->fields as $field) {\n\t\t\tif ($field->get_multiple_values()) {\n\t\t\t\t$field_name = $field->get_var_name();\n\t\t\t\tif (isset($data[$field_name])) {\n\t\t\t\t\t$field->set_value($data[$field_name]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (isset($data[$field->get_name()])) {\n\t\t\t\t\t$field->set_value($data[$field->get_name()]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getContactValues()\n\t{\n\n\t\t$settings = $this->setup->getClient()->getAllSettings();\n\n\t\t$values = $settings;\n\n\t\t$values[\"inst_name\"] = ($this->setup->getClient()->getName())\n\t\t\t? $this->setup->getClient()->getName()\n\t\t\t: $this->setup->getClient()->getId();\n\t\t$values[\"inst_info\"] = $this->setup->getClient()->getDescription();\n\n\t\t$this->form->setValuesByArray($values);\n\t}", "public function substituteRealValues()\n {\n $this->realValues = true;\n }", "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 storeFormValues( $params ) {\r\n \r\n // store the parameters\r\n $this->__construct( $params );\r\n \r\n }", "public function getValueAttribute($value)\n\t{\n\t\t// Hide all these fake field content\n\t\t$hiddenValues = [\n\t\t\t'recaptcha_site_key',\n\t\t\t'recaptcha_secret_key',\n\t\t\t'mail_password',\n\t\t\t'mailgun_secret',\n\t\t\t'mandrill_secret',\n\t\t\t'ses_key',\n\t\t\t'ses_secret',\n\t\t\t'sparkpost_secret',\n\t\t\t'stripe_secret',\n\t\t\t'paypal_username',\n\t\t\t'paypal_password',\n\t\t\t'paypal_signature',\n\t\t\t'facebook_client_id',\n\t\t\t'facebook_client_secret',\n\t\t\t'linkedin_client_id',\n\t\t\t'linkedin_client_secret',\n\t\t\t'twitter_client_id',\n\t\t\t'twitter_client_secret',\n\t\t\t'google_client_id',\n\t\t\t'google_client_secret',\n\t\t\t'google_maps_key',\n\t\t\t'fixer_access_key',\n\t\t\t'currency_layer_access_key',\n\t\t\t'open_exchange_rates_app_id',\n\t\t\t'currency_data_feed_api_key',\n\t\t\t'forge_api_key',\n\t\t\t'xignite_token',\n\t\t];\n\t\t\n\t\t// Get 'value' field value\n\t\t$value = jsonToArray($value);\n\t\t\n\t\t// Handle 'value' field value\n\t\tif (!empty($value)) {\n\t\t\t// Get Entered values (Or Default values if the Entry doesn't exist)\n\t\t\tif ($this->key == 'app') {\n\t\t\t\tforeach ($value as $key => $item) {\n\t\t\t\t\tif ($key == 'logo') {\n\t\t\t\t\t\t$value['logo'] = str_replace('uploads/', '', $value['logo']);\n\t\t\t\t\t\tif (!Storage::exists($value['logo'])) {\n\t\t\t\t\t\t\t$value[$key] = config('larapen.core.logo');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($key == 'favicon') {\n\t\t\t\t\t\tif (!Storage::exists($value['favicon'])) {\n\t\t\t\t\t\t\t$value[$key] = config('larapen.core.favicon');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!isset($value['purchase_code'])) {\n\t\t\t\t\t$value['purchase_code'] = env('PURCHASE_CODE', '');\n\t\t\t\t}\n\t\t\t\tif (!isset($value['app_name'])) {\n\t\t\t\t\t$value['app_name'] = config('app.name');\n\t\t\t\t}\n\t\t\t\tif (!isset($value['logo'])) {\n\t\t\t\t\t$value['logo'] = config('larapen.core.logo');\n\t\t\t\t}\n\t\t\t\tif (!isset($value['favicon'])) {\n\t\t\t\t\t$value['favicon'] = config('larapen.core.favicon');\n\t\t\t\t}\n\t\t\t\tif (!isset($value['auto_detect_language'])) {\n\t\t\t\t\t$value['auto_detect_language'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['default_date_format'])) {\n\t\t\t\t\t$value['default_date_format'] = config('larapen.core.defaultDateFormat');\n\t\t\t\t}\n\t\t\t\tif (!isset($value['default_datetime_format'])) {\n\t\t\t\t\t$value['default_datetime_format'] = config('larapen.core.defaultDatetimeFormat');\n\t\t\t\t}\n\t\t\t\tif (!isset($value['default_timezone'])) {\n\t\t\t\t\t$value['default_timezone'] = config('larapen.core.defaultTimezone');\n\t\t\t\t}\n\t\t\t\tif (!isset($value['show_countries_charts'])) {\n\t\t\t\t\t$value['show_countries_charts'] = '1';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'style') {\n\t\t\t\tforeach ($value as $key => $item) {\n\t\t\t\t\tif ($key == 'body_background_image') {\n\t\t\t\t\t\tif (!Storage::exists($value['body_background_image'])) {\n\t\t\t\t\t\t\t$value[$key] = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!isset($value['app_skin'])) {\n\t\t\t\t\t$value['app_skin'] = 'skin-default';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['header_bottom_border_width'])) {\n\t\t\t\t\t$value['header_bottom_border_width'] = '1px';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['header_bottom_border_color'])) {\n\t\t\t\t\t$value['header_bottom_border_color'] = '#e8e8e8';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['admin_skin'])) {\n\t\t\t\t\t$value['admin_skin'] = 'skin-blue';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'listing') {\n\t\t\t\tif (!isset($value['display_mode'])) {\n\t\t\t\t\t$value['display_mode'] = '.grid-view';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['items_per_page'])) {\n\t\t\t\t\t$value['items_per_page'] = '12';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['left_sidebar'])) {\n\t\t\t\t\t$value['left_sidebar'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['cities_extended_searches'])) {\n\t\t\t\t\t$value['cities_extended_searches'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['search_distance_max'])) {\n\t\t\t\t\t$value['search_distance_max'] = '500';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['search_distance_default'])) {\n\t\t\t\t\t$value['search_distance_default'] = '50';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['search_distance_interval'])) {\n\t\t\t\t\t$value['search_distance_interval'] = '100';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'single') {\n\t\t\t\tif (!isset($value['publication_form_type'])) {\n\t\t\t\t\t$value['publication_form_type'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['picture_mandatory'])) {\n\t\t\t\t\t$value['picture_mandatory'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['pictures_limit'])) {\n\t\t\t\t\t$value['pictures_limit'] = '5';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['tags_limit'])) {\n\t\t\t\t\t$value['tags_limit'] = '15';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['guests_can_post_ads'])) {\n\t\t\t\t\t$value['guests_can_post_ads'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['guests_can_contact_ads_authors'])) {\n\t\t\t\t\t$value['guests_can_contact_ads_authors'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['auto_registration'])) {\n\t\t\t\t\t$value['auto_registration'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['simditor_wysiwyg'])) {\n\t\t\t\t\t$value['simditor_wysiwyg'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['similar_posts'])) {\n\t\t\t\t\t$value['similar_posts'] = '1';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'mail') {\n\t\t\t\tif (!isset($value['sendmail_path'])) {\n\t\t\t\t\t$value['sendmail_path'] = '/usr/sbin/sendmail -bs';\n\t\t\t\t\tif (env('APP_ENV') == 'local') {\n\t\t\t\t\t\t$value['sendmail_path'] = '/usr/bin/env catchmail -f some@from.address';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'upload') {\n\t\t\t\tif (!isset($value['file_types'])) {\n\t\t\t\t\t$value['file_types'] = 'pdf,doc,docx,word,rtf,rtx,ppt,pptx,odt,odp,wps,jpeg,jpg,bmp,png';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['min_file_size'])) {\n\t\t\t\t\t$value['min_file_size'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['max_file_size'])) {\n\t\t\t\t\t$value['max_file_size'] = '2500';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!isset($value['image_types'])) {\n\t\t\t\t\t$value['image_types'] = 'jpg,jpeg,gif,png';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['image_quality'])) {\n\t\t\t\t\t$value['image_quality'] = '90';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['min_image_size'])) {\n\t\t\t\t\t$value['min_image_size'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['max_image_size'])) {\n\t\t\t\t\t$value['max_image_size'] = '2500';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!isset($value['img_resize_width'])) {\n\t\t\t\t\t$value['img_resize_width'] = '1500';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_height'])) {\n\t\t\t\t\t$value['img_resize_height'] = '1500';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_ratio'])) {\n\t\t\t\t\t$value['img_resize_ratio'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_upsize'])) {\n\t\t\t\t\t$value['img_resize_upsize'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_logo_width'])) {\n\t\t\t\t\t$value['img_resize_logo_width'] = '500';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_logo_height'])) {\n\t\t\t\t\t$value['img_resize_logo_height'] = '100';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_logo_ratio'])) {\n\t\t\t\t\t$value['img_resize_logo_ratio'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_logo_upsize'])) {\n\t\t\t\t\t$value['img_resize_logo_upsize'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_square_width'])) {\n\t\t\t\t\t$value['img_resize_square_width'] = '400';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_square_height'])) {\n\t\t\t\t\t$value['img_resize_square_height'] = '400';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_square_ratio'])) {\n\t\t\t\t\t$value['img_resize_square_ratio'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_square_upsize'])) {\n\t\t\t\t\t$value['img_resize_square_upsize'] = '0';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!isset($value['img_resize_small_resize_type'])) {\n\t\t\t\t\t$value['img_resize_small_resize_type'] = '2';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_small_width'])) {\n\t\t\t\t\t$value['img_resize_small_width'] = '120';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_small_height'])) {\n\t\t\t\t\t$value['img_resize_small_height'] = '90';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_small_ratio'])) {\n\t\t\t\t\t$value['img_resize_small_ratio'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_small_upsize'])) {\n\t\t\t\t\t$value['img_resize_small_upsize'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_small_position'])) {\n\t\t\t\t\t$value['img_resize_small_position'] = 'center';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_small_relative'])) {\n\t\t\t\t\t$value['img_resize_small_relative'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_small_bg_color'])) {\n\t\t\t\t\t$value['img_resize_small_bg_color'] = '#FFFFFF';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!isset($value['img_resize_medium_resize_type'])) {\n\t\t\t\t\t$value['img_resize_medium_resize_type'] = '2';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_medium_width'])) {\n\t\t\t\t\t$value['img_resize_medium_width'] = '320';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_medium_height'])) {\n\t\t\t\t\t$value['img_resize_medium_height'] = '240';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_medium_ratio'])) {\n\t\t\t\t\t$value['img_resize_medium_ratio'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_medium_upsize'])) {\n\t\t\t\t\t$value['img_resize_medium_upsize'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_medium_position'])) {\n\t\t\t\t\t$value['img_resize_medium_position'] = 'center';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_medium_relative'])) {\n\t\t\t\t\t$value['img_resize_medium_relative'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_medium_bg_color'])) {\n\t\t\t\t\t$value['img_resize_medium_bg_color'] = '#FFFFFF';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!isset($value['img_resize_big_resize_type'])) {\n\t\t\t\t\t$value['img_resize_big_resize_type'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_big_width'])) {\n\t\t\t\t\t$value['img_resize_big_width'] = '816';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_big_height'])) {\n\t\t\t\t\t$value['img_resize_big_height'] = '460';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_big_ratio'])) {\n\t\t\t\t\t$value['img_resize_big_ratio'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_big_upsize'])) {\n\t\t\t\t\t$value['img_resize_big_upsize'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_big_position'])) {\n\t\t\t\t\t$value['img_resize_big_position'] = 'center';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_big_relative'])) {\n\t\t\t\t\t$value['img_resize_big_relative'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['img_resize_big_bg_color'])) {\n\t\t\t\t\t$value['img_resize_big_bg_color'] = '#FFFFFF';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'geo_location') {\n\t\t\t\tif (!isset($value['country_flag_activation'])) {\n\t\t\t\t\t$value['country_flag_activation'] = '1';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'security') {\n\t\t\t\tif (!isset($value['login_open_in_modal'])) {\n\t\t\t\t\t$value['login_open_in_modal'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['login_max_attempts'])) {\n\t\t\t\t\t$value['login_max_attempts'] = '5';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['login_decay_minutes'])) {\n\t\t\t\t\t$value['login_decay_minutes'] = '15';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['recaptcha_version'])) {\n\t\t\t\t\t$value['recaptcha_version'] = 'v2';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Get reCAPTCHA old config values\n\t\t\t\tif (isset($value['recaptcha_public_key'])) {\n\t\t\t\t\t$value['recaptcha_site_key'] = $value['recaptcha_public_key'];\n\t\t\t\t}\n\t\t\t\tif (isset($value['recaptcha_private_key'])) {\n\t\t\t\t\t$value['recaptcha_secret_key'] = $value['recaptcha_private_key'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'social_link') {\n\t\t\t\tif (!isset($value['facebook_page_url'])) {\n\t\t\t\t\t$value['facebook_page_url'] = '';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['twitter_url'])) {\n\t\t\t\t\t$value['twitter_url'] = '';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['google_plus_url'])) {\n\t\t\t\t\t$value['google_plus_url'] = '';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['linkedin_url'])) {\n\t\t\t\t\t$value['linkedin_url'] = '';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['pinterest_url'])) {\n\t\t\t\t\t$value['pinterest_url'] = '';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['instagram_url'])) {\n\t\t\t\t\t$value['instagram_url'] = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'optimization') {\n\t\t\t\tif (!isset($value['cache_driver'])) {\n\t\t\t\t\t$value['cache_driver'] = 'file';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['cache_expiration'])) {\n\t\t\t\t\t$value['cache_expiration'] = '86400';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['memcached_servers_1_host'])) {\n\t\t\t\t\t$value['memcached_servers_1_host'] = '127.0.0.1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['memcached_servers_1_port'])) {\n\t\t\t\t\t$value['memcached_servers_1_port'] = '11211';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['redis_client'])) {\n\t\t\t\t\t$value['redis_client'] = 'predis';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['redis_cluster'])) {\n\t\t\t\t\t$value['redis_cluster'] = 'predis';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['redis_host'])) {\n\t\t\t\t\t$value['redis_host'] = '127.0.0.1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['redis_password'])) {\n\t\t\t\t\t$value['redis_password'] = null;\n\t\t\t\t}\n\t\t\t\tif (!isset($value['redis_port'])) {\n\t\t\t\t\t$value['redis_port'] = '6379';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['redis_database'])) {\n\t\t\t\t\t$value['redis_database'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['lazy_loading_activation'])) {\n\t\t\t\t\t$value['lazy_loading_activation'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['minify_html_activation'])) {\n\t\t\t\t\t$value['minify_html_activation'] = '0';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'seo') {\n\t\t\t\tif (!isset($value['robots_txt'])) {\n\t\t\t\t\t$value['robots_txt'] = getDefaultRobotsTxtContent();\n\t\t\t\t}\n\t\t\t\tif (!isset($value['robots_txt_sm_indexes'])) {\n\t\t\t\t\t$value['robots_txt_sm_indexes'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['posts_permalink'])) {\n\t\t\t\t\t$value['posts_permalink'] = '{slug}/{id}';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['posts_permalink_ext'])) {\n\t\t\t\t\tif (is_null($value['posts_permalink_ext'])) {\n\t\t\t\t\t\t$value['posts_permalink_ext'] = '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$value['posts_permalink_ext'] = '.html';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!isset($value['multi_countries_urls'])) {\n\t\t\t\t\t$value['multi_countries_urls'] = config('larapen.core.multiCountriesUrls');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'other') {\n\t\t\t\tif (!isset($value['cookie_consent_enabled'])) {\n\t\t\t\t\t$value['cookie_consent_enabled'] = '0';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['show_tips_messages'])) {\n\t\t\t\t\t$value['show_tips_messages'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['timer_new_messages_checking'])) {\n\t\t\t\t\t$value['timer_new_messages_checking'] = 60000;\n\t\t\t\t}\n\t\t\t\tif (!isset($value['simditor_wysiwyg'])) {\n\t\t\t\t\t$value['simditor_wysiwyg'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['cookie_expiration'])) {\n\t\t\t\t\t$value['cookie_expiration'] = '86400';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'cron') {\n\t\t\t\tif (!isset($value['unactivated_posts_expiration'])) {\n\t\t\t\t\t$value['unactivated_posts_expiration'] = '30';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['activated_posts_expiration'])) {\n\t\t\t\t\t$value['activated_posts_expiration'] = '90';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['archived_posts_expiration'])) {\n\t\t\t\t\t$value['archived_posts_expiration'] = '30';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['manually_archived_posts_expiration'])) {\n\t\t\t\t\t$value['manually_archived_posts_expiration'] = '180';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'footer') {\n\t\t\t\tif (!isset($value['hide_payment_plugins_logos'])) {\n\t\t\t\t\t$value['hide_payment_plugins_logos'] = '1';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'watermark') {\n\t\t\t\tif (!isset($value['width'])) {\n\t\t\t\t\t$value['width'] = '150';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['height'])) {\n\t\t\t\t\t$value['height'] = '150';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['position'])) {\n\t\t\t\t\t$value['position'] = 'bottom-right';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['position_x'])) {\n\t\t\t\t\t$value['position_x'] = '20';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['position_y'])) {\n\t\t\t\t\t$value['position_y'] = '20';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'currency_exchange') {\n\t\t\t\tif (!isset($value['activation'])) {\n\t\t\t\t\t$value['activation'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['currencies'])) {\n\t\t\t\t\t$value['currencies'] = 'USD,EUR';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['cache_ttl'])) {\n\t\t\t\t\t$value['cache_ttl'] = '86400';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['european_central_bank'])) {\n\t\t\t\t\t$value['european_central_bank'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['national_bank_of_romania'])) {\n\t\t\t\t\t$value['national_bank_of_romania'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['central_bank_of_republic_turkey'])) {\n\t\t\t\t\t$value['central_bank_of_republic_turkey'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['central_bank_of_czech_republic'])) {\n\t\t\t\t\t$value['central_bank_of_czech_republic'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['russian_central_bank'])) {\n\t\t\t\t\t$value['russian_central_bank'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['webservicex'])) {\n\t\t\t\t\t$value['webservicex'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['google'])) {\n\t\t\t\t\t$value['google'] = '1';\n\t\t\t\t}\n\t\t\t\tif (!isset($value['cryptonator'])) {\n\t\t\t\t\t$value['cryptonator'] = '1';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->key == 'domain_mapping') {\n\t\t\t\tif (!isset($value['share_session'])) {\n\t\t\t\t\t$value['share_session'] = '1';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Demo: Secure some Data (Applied for all Entries)\n\t\t\tif (isFromAdminPanel() && isDemo()) {\n\t\t\t\tforeach ($value as $key => $item) {\n\t\t\t\t\tif (!in_array(request()->segment(2), ['password', 'login'])) {\n\t\t\t\t\t\tif (in_array($key, $hiddenValues)) {\n\t\t\t\t\t\t\t$value[$key] = '************************';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (isset($this->key)) {\n\t\t\t\t// Get Default values\n\t\t\t\t$value = [];\n\t\t\t\tif ($this->key == 'app') {\n\t\t\t\t\t$value['purchase_code'] = env('PURCHASE_CODE', '');\n\t\t\t\t\t$value['app_name'] = config('app.name');\n\t\t\t\t\t$value['logo'] = config('larapen.core.logo');\n\t\t\t\t\t$value['favicon'] = config('larapen.core.favicon');\n\t\t\t\t\t$value['auto_detect_language'] = '0';\n\t\t\t\t\t$value['default_date_format'] = config('larapen.core.defaultDateFormat');\n\t\t\t\t\t$value['default_datetime_format'] = config('larapen.core.defaultDatetimeFormat');\n\t\t\t\t\t$value['default_timezone'] = config('larapen.core.defaultTimezone');\n\t\t\t\t\t$value['show_countries_charts'] = '1';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'style') {\n\t\t\t\t\t$value['app_skin'] = 'skin-default';\n\t\t\t\t\t$value['header_bottom_border_width'] = '1px';\n\t\t\t\t\t$value['header_bottom_border_color'] = '#e8e8e8';\n\t\t\t\t\t$value['admin_skin'] = 'skin-blue';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'listing') {\n\t\t\t\t\t$value['display_mode'] = '.grid-view';\n\t\t\t\t\t$value['items_per_page'] = '12';\n\t\t\t\t\t$value['left_sidebar'] = '1';\n\t\t\t\t\t$value['cities_extended_searches'] = '1';\n\t\t\t\t\t$value['search_distance_max'] = '500';\n\t\t\t\t\t$value['search_distance_default'] = '50';\n\t\t\t\t\t$value['search_distance_interval'] = '100';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'single') {\n\t\t\t\t\t$value['publication_form_type'] = '1';\n\t\t\t\t\t$value['picture_mandatory'] = '1';\n\t\t\t\t\t$value['pictures_limit'] = '5';\n\t\t\t\t\t$value['tags_limit'] = '15';\n\t\t\t\t\t$value['guests_can_post_ads'] = '1';\n\t\t\t\t\t$value['guests_can_contact_ads_authors'] = '1';\n\t\t\t\t\t$value['auto_registration'] = '0';\n\t\t\t\t\t$value['simditor_wysiwyg'] = '1';\n\t\t\t\t\t$value['similar_posts'] = '1';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'mail') {\n\t\t\t\t\t$value['sendmail_path'] = '/usr/sbin/sendmail -bs';\n\t\t\t\t\tif (env('APP_ENV') == 'local') {\n\t\t\t\t\t\t$value['sendmail_path'] = '/usr/bin/env catchmail -f some@from.address';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'upload') {\n\t\t\t\t\t$value['file_types'] = 'pdf,doc,docx,word,rtf,rtx,ppt,pptx,odt,odp,wps,jpeg,jpg,bmp,png';\n\t\t\t\t\t$value['min_file_size'] = '0';\n\t\t\t\t\t$value['max_file_size'] = '2500';\n\t\t\t\t\t\n\t\t\t\t\t$value['image_types'] = 'jpg,jpeg,gif,png';\n\t\t\t\t\t$value['image_quality'] = '90';\n\t\t\t\t\t$value['min_image_size'] = '0';\n\t\t\t\t\t$value['max_image_size'] = '2500';\n\t\t\t\t\t\n\t\t\t\t\t$value['img_resize_width'] = '1500';\n\t\t\t\t\t$value['img_resize_height'] = '1500';\n\t\t\t\t\t$value['img_resize_ratio'] = '1';\n\t\t\t\t\t$value['img_resize_upsize'] = '0';\n\t\t\t\t\t$value['img_resize_logo_width'] = '500';\n\t\t\t\t\t$value['img_resize_logo_height'] = '100';\n\t\t\t\t\t$value['img_resize_logo_ratio'] = '1';\n\t\t\t\t\t$value['img_resize_logo_upsize'] = '0';\n\t\t\t\t\t$value['img_resize_square_width'] = '400';\n\t\t\t\t\t$value['img_resize_square_height'] = '400';\n\t\t\t\t\t$value['img_resize_square_ratio'] = '1';\n\t\t\t\t\t$value['img_resize_square_upsize'] = '0';\n\t\t\t\t\t\n\t\t\t\t\t$value['img_resize_small_resize_type'] = '2';\n\t\t\t\t\t$value['img_resize_small_width'] = '120';\n\t\t\t\t\t$value['img_resize_small_height'] = '90';\n\t\t\t\t\t$value['img_resize_small_ratio'] = '1';\n\t\t\t\t\t$value['img_resize_small_upsize'] = '0';\n\t\t\t\t\t$value['img_resize_small_position'] = 'center';\n\t\t\t\t\t$value['img_resize_small_relative'] = '0';\n\t\t\t\t\t$value['img_resize_small_bg_color'] = '#FFFFFF';\n\t\t\t\t\t\n\t\t\t\t\t$value['img_resize_medium_resize_type'] = '2';\n\t\t\t\t\t$value['img_resize_medium_width'] = '320';\n\t\t\t\t\t$value['img_resize_medium_height'] = '240';\n\t\t\t\t\t$value['img_resize_medium_ratio'] = '1';\n\t\t\t\t\t$value['img_resize_medium_upsize'] = '0';\n\t\t\t\t\t$value['img_resize_medium_position'] = 'center';\n\t\t\t\t\t$value['img_resize_medium_relative'] = '0';\n\t\t\t\t\t$value['img_resize_medium_bg_color'] = '#FFFFFF';\n\t\t\t\t\t\n\t\t\t\t\t$value['img_resize_big_resize_type'] = '0';\n\t\t\t\t\t$value['img_resize_big_width'] = '816';\n\t\t\t\t\t$value['img_resize_big_height'] = '460';\n\t\t\t\t\t$value['img_resize_big_ratio'] = '1';\n\t\t\t\t\t$value['img_resize_big_upsize'] = '0';\n\t\t\t\t\t$value['img_resize_big_position'] = 'center';\n\t\t\t\t\t$value['img_resize_big_relative'] = '0';\n\t\t\t\t\t$value['img_resize_big_bg_color'] = '#FFFFFF';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'geo_location') {\n\t\t\t\t\t$value['country_flag_activation'] = '1';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'security') {\n\t\t\t\t\t$value['login_open_in_modal'] = '1';\n\t\t\t\t\t$value['login_max_attempts'] = '5';\n\t\t\t\t\t$value['login_decay_minutes'] = '15';\n\t\t\t\t\t$value['recaptcha_version'] = 'v2';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'social_link') {\n\t\t\t\t\t$value['facebook_page_url'] = '#';\n\t\t\t\t\t$value['twitter_url'] = '#';\n\t\t\t\t\t$value['google_plus_url'] = '#';\n\t\t\t\t\t$value['linkedin_url'] = '#';\n\t\t\t\t\t$value['pinterest_url'] = '#';\n\t\t\t\t\t$value['instagram_url'] = '#';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'optimization') {\n\t\t\t\t\t$value['cache_driver'] = 'file';\n\t\t\t\t\t$value['cache_expiration'] = '86400';\n\t\t\t\t\t$value['memcached_servers_1_host'] = '127.0.0.1';\n\t\t\t\t\t$value['memcached_servers_1_port'] = '11211';\n\t\t\t\t\t$value['redis_client'] = 'predis';\n\t\t\t\t\t$value['redis_cluster'] = 'predis';\n\t\t\t\t\t$value['redis_host'] = '127.0.0.1';\n\t\t\t\t\t$value['redis_password'] = null;\n\t\t\t\t\t$value['redis_port'] = '6379';\n\t\t\t\t\t$value['redis_database'] = '0';\n\t\t\t\t\t$value['lazy_loading_activation'] = '0';\n\t\t\t\t\t$value['minify_html_activation'] = '0';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'seo') {\n\t\t\t\t\t$value['robots_txt'] = getDefaultRobotsTxtContent();\n\t\t\t\t\t$value['robots_txt_sm_indexes'] = '1';\n\t\t\t\t\t$value['posts_permalink'] = '{slug}/{id}';\n\t\t\t\t\t$value['posts_permalink_ext'] = '';\n\t\t\t\t\t$value['multi_countries_urls'] = config('larapen.core.multiCountriesUrls');\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'other') {\n\t\t\t\t\t$value['cookie_consent_enabled'] = '0';\n\t\t\t\t\t$value['show_tips_messages'] = '1';\n\t\t\t\t\t$value['timer_new_messages_checking'] = 60000;\n\t\t\t\t\t$value['simditor_wysiwyg'] = '1';\n\t\t\t\t\t$value['cookie_expiration'] = '86400';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'cron') {\n\t\t\t\t\t$value['unactivated_posts_expiration'] = '30';\n\t\t\t\t\t$value['activated_posts_expiration'] = '90';\n\t\t\t\t\t$value['archived_posts_expiration'] = '30';\n\t\t\t\t\t$value['manually_archived_posts_expiration'] = '180';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'footer') {\n\t\t\t\t\t$value['hide_payment_plugins_logos'] = '1';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'watermark') {\n\t\t\t\t\t$value['width'] = '150';\n\t\t\t\t\t$value['height'] = '150';\n\t\t\t\t\t$value['position'] = 'bottom-right';\n\t\t\t\t\t$value['position_x'] = '20';\n\t\t\t\t\t$value['position_y'] = '20';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'currency_exchange') {\n\t\t\t\t\t$value['activation'] = '1';\n\t\t\t\t\t$value['currencies'] = 'USD,EUR';\n\t\t\t\t\t$value['cache_ttl'] = '86400';\n\t\t\t\t\t$value['european_central_bank'] = '1';\n\t\t\t\t\t$value['national_bank_of_romania'] = '1';\n\t\t\t\t\t$value['central_bank_of_republic_turkey'] = '1';\n\t\t\t\t\t$value['central_bank_of_czech_republic'] = '1';\n\t\t\t\t\t$value['russian_central_bank'] = '1';\n\t\t\t\t\t$value['webservicex'] = '1';\n\t\t\t\t\t$value['google'] = '1';\n\t\t\t\t\t$value['cryptonator'] = '1';\n\t\t\t\t}\n\t\t\t\tif ($this->key == 'domain_mapping') {\n\t\t\t\t\t$value['share_session'] = '1';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// upload - Get right values\n\t\tif (isset($this->key) && $this->key == 'upload' && is_array($value)) {\n\t\t\t// Numeric values (keys: upload, ...)\n\t\t\tforeach ($value as $k => $v) {\n\t\t\t\tif (\n\t\t\t\t\t(Str::startsWith($k, ['img_resize_']) && Str::endsWith($k, ['_width', '_height']))\n\t\t\t\t\t|| Str::endsWith($k, ['_file_size', '_image_size'])\n\t\t\t\t) {\n\t\t\t\t\t$value[$k] = strToInt($v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// 'bgcolor' & 'relative' get format\n\t\t\t$typesOfResize = ['square', 'small', 'medium', 'big', 'large'];\n\t\t\tforeach ($typesOfResize as $type) {\n\t\t\t\tif (array_key_exists('img_resize_' . $type . '_bg_color', $value)) {\n\t\t\t\t\t$value['img_resize_' . $type . '_relative'] = ($value['img_resize_' . $type . '_relative'] == '1') ? true : false;\n\t\t\t\t\t$value['img_resize_' . $type . '_bg_color'] = str_replace('#', '', $value['img_resize_' . $type . '_bg_color']);\n\t\t\t\t\tif (isFromAdminPanel()) {\n\t\t\t\t\t\t$value['img_resize_' . $type . '_relative'] = ($value['img_resize_' . $type . '_relative']) ? '1' : '0';\n\t\t\t\t\t\t$value['img_resize_' . $type . '_bg_color'] = '#' . $value['img_resize_' . $type . '_bg_color'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// During the Cache variable updating from the Admin panel,\n\t\t// Check if the /.env file's cache configuration variables are different to the DB value,\n\t\t// If so, then display the right value from the /.env file.\n\t\tif (isset($this->key) && $this->key == 'optimization' && is_array($value)) {\n\t\t\tif (Str::contains(\\Route::currentRouteAction(), 'Admin\\SettingController@edit')) {\n\t\t\t\tif (array_key_exists('cache_driver', $value) && getenv('CACHE_DRIVER')) {\n\t\t\t\t\tif ($value['cache_driver'] != env('CACHE_DRIVER')) {\n\t\t\t\t\t\t$value['cache_driver'] = env('CACHE_DRIVER');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (array_key_exists('memcached_servers_1_host', $value) && getenv('MEMCACHED_SERVER_1_HOST')) {\n\t\t\t\t\tif ($value['memcached_servers_1_host'] != env('MEMCACHED_SERVER_1_HOST')) {\n\t\t\t\t\t\t$value['memcached_servers_1_host'] = env('MEMCACHED_SERVER_1_HOST');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (array_key_exists('memcached_servers_1_port', $value) && getenv('MEMCACHED_SERVER_1_PORT')) {\n\t\t\t\t\tif ($value['memcached_servers_1_port'] != env('MEMCACHED_SERVER_1_PORT')) {\n\t\t\t\t\t\t$value['memcached_servers_1_port'] = env('MEMCACHED_SERVER_1_PORT');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (array_key_exists('redis_client', $value) && getenv('REDIS_CLIENT')) {\n\t\t\t\t\tif ($value['redis_client'] != env('REDIS_CLIENT')) {\n\t\t\t\t\t\t$value['redis_client'] = env('REDIS_CLIENT');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (array_key_exists('redis_cluster', $value) && getenv('REDIS_CLUSTER')) {\n\t\t\t\t\tif ($value['redis_cluster'] != env('REDIS_CLUSTER')) {\n\t\t\t\t\t\t$value['redis_cluster'] = env('REDIS_CLUSTER');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (array_key_exists('redis_host', $value) && getenv('REDIS_HOST')) {\n\t\t\t\t\tif ($value['redis_host'] != env('REDIS_HOST')) {\n\t\t\t\t\t\t$value['redis_host'] = env('REDIS_HOST');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (array_key_exists('redis_password', $value) && getenv('REDIS_PASSWORD')) {\n\t\t\t\t\tif ($value['redis_password'] != env('REDIS_PASSWORD')) {\n\t\t\t\t\t\t$value['redis_password'] = env('REDIS_PASSWORD');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (array_key_exists('redis_port', $value) && getenv('REDIS_PORT')) {\n\t\t\t\t\tif ($value['redis_port'] != env('REDIS_PORT')) {\n\t\t\t\t\t\t$value['redis_port'] = env('REDIS_PORT');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (array_key_exists('redis_database', $value) && getenv('REDIS_DB')) {\n\t\t\t\t\tif ($value['redis_database'] != env('REDIS_DB')) {\n\t\t\t\t\t\t$value['redis_database'] = env('REDIS_DB');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "public function testFillingValue()\n {\n $_GET['somename'] = 'a value';\n\n $valuable = $this->getMockForTrait('Koenvu\\Forms\\Components\\Valuable');\n $field = $this->getMockForAbstractClass('Koenvu\\FormTests\\Stubs\\TestableField');\n $field->set('field.name', 'somename');\n\n $valuable->fillValues([$field]);\n\n $this->assertRegExp('/value\\s*=\\s*([\\'\"])a value\\1/', $field->attr('field'));\n }", "function getInputValues();", "public function values($value);", "function FillActualFields($formname,$convert=true) // fuer die datenbank \n {\n $htmllist = &$this->FormList[$formname]->HTMLList;\n if($htmllist->items>0)\n {\n $field = &$htmllist->getFirst();\n for($i=0; $i <= $htmllist->items; $i++)\n {\n\t\n\tif($this->app->Secure->GetPOST($field->identifier)!=\"\")\n\t{\n\t $field->value = $this->app->Secure->GetPOST($field->identifier);\n\t}else\n\t{\n\t $field->value = $field->htmlobject->value;\n\t}\n\t\n\t\n\tif($field->value!=\"\" && $convert){\n\t $value = $this->app->String->Convert(\n\t //$field->value,$field->htmlformat,$field->dbformat);\n\t $field->value,$field->dbformat,$field->htmlformat);\n\t\n\t $value = $this->app->String->decodeText($value);\n\t $field->value = $value;\n\t} \n\n\tif(get_class($htmlobject)==\"blindfield\")\n\t $field->value=$field->htmlobject->value;\n \t\n\t\n\t$field->htmlobject->value=$field->value;\n\n\t\n\t$field = &$htmllist->getNext();\n }\n }\n }", "private function setValues()\n {\n foreach($this->data as $type => $values)\n if(!preg_match('/(library)/i', $type))\n foreach($values as $key => $value)\n $this->{strtolower($type)}[$key] = $value;\n }", "function loadFormValue($my_array){\n\t\t$year_name = $this->_year->getName();\n\t\t$month_name = $this->_month->getName();\n\t\t$day_name = $this->_day->getName();\n\t\tif(isset($my_array[$year_name]) && isset($my_array[$month_name]) && isset($my_array[$day_name])){\n\t\t\t$this->_year->setValue($my_array[$year_name]);\n\t\t\t$this->_month->setValue($my_array[$month_name]);\n\t\t\t$this->_day->setValue($my_array[$day_name]);\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n\n $this->vars['model'] = $this->model;\n $this->vars['category'] = Kategory::where(\"is_active\", \"1\")->lists('name', 'id');\n if (!empty($this->getLoadValue())) {\n $a= $this->vars['value'] = $this->getLoadValue();\n } else {\n $a= $this->vars['value'] = [];\n }\n }", "protected function getValidFieldValues()\n {\n return [\n 'id' => [\n '1',\n '100'\n ]\n ];\n }", "public function buildValueFormType(FormFactoryInterface $factory, FlexibleValueInterface $value);", "public static function get_values()\n {\n }", "public static function get_values()\n {\n }", "public static function get_values()\n {\n }", "public function setValues(array $_values=array()){\n foreach(($getElements=self::getElements()) as $key=>$items){\n $this->{$key}=(\n (isset($_values[self::getFormName()][$key]))\n ?$_values[self::getFormName()][$key]\n :NULL\n );\n $getElementsv[$key]->setValue($this->{$key});\n }\n }", "protected function getConfigFormValues()\n {\n $formValues = array(\n 'WI_SPENT_AMOUNT' => Configuration::get('WI_SPENT_AMOUNT', ''),\n 'WI_SPENT_COUPON' => Configuration::get('WI_SPENT_COUPON', ''),\n 'WI_SPENT_ENABLED' => Configuration::get('WI_SPENT_ENABLED', ''),\n 'WI_SPENT_DAYS' => Configuration::get('WI_SPENT_DAYS', ''),\n );\n return $formValues;\n }", "public function storeFormValues ( $params ) {\n\n // Store all the parameters\n $this->__construct( $params );\n\n }", "public function updateFromPOST() {\n if ($this->isSubmit()) {\n foreach (Tools::getValue($this->namebase(), array()) as $name => $value) {\n $key = $this->nameify($name);\n $this->input_values[$key] = $value;\n }\n Configuration::updateValue($this->key(), json_encode($this->input_values));\n }\n }", "public function providerFieldValues()\n {\n return [\n ['non_existent_field', []],\n ['empty_field', []],\n ['empty_field_2', []],\n [\n 'acf_value_field',\n [\n ['test-1' => 'test 1'],\n ['test-1' => 'test 2'],\n ['test-1' => 'test 3'],\n ],\n ],\n [\n 'acf_option_field',\n [\n [\n 'label' => 'test 1',\n 'slug' => 'test-1',\n ],\n [\n 'label' => 'test 2',\n 'slug' => 'test-2',\n ],\n ],\n ],\n ];\n }", "public abstract function makeValue($value);", "public function store_form_values($form_values){\n\t\t$this->__construct($form_values);\n\t}", "public function getFormValues() {\n return $this->values[HVAL_FORMPARAM];\n }", "public function setFormValue($name, $value) {\n $this->values[HVAL_FORMPARAM][$name]= $value;\n }", "public function select_values_for_form( EntryValueSelect $entry_value_select );", "public function storeFormValues ( $params ) {\n $this->__construct( $params );\n }", "function NormalizeFormVars()\r\n {\r\n //the element means false. Explicitely setting this false here\r\n //to help in later form value processing\r\n $arr_elements = \r\n $this->config->element_info->GetElements($this->GetCurrentPageNum());\r\n \r\n foreach($arr_elements as $ename => $e)\r\n {\r\n $preparsed_var = $this->config->GetPreParsedVar($ename);\r\n if(isset($this->formvars[$preparsed_var]))\r\n {\r\n $disp_var = $this->config->GetDispVar($ename);\r\n $this->formvars[$disp_var] = $this->formvars[$ename];\r\n $this->formvars[$ename] = $this->formvars[$preparsed_var];\r\n }\r\n if(isset($this->formvars[$ename])){continue;}\r\n \r\n switch($e['type'])\r\n {\r\n case 'single_chk':\r\n {\r\n $this->formvars[$ename] = false;\r\n break;\r\n }\r\n case 'chk_group':\r\n case 'multiselect':\r\n {\r\n $this->formvars[$ename] = array();\r\n break;\r\n }\r\n default:\r\n {\r\n $this->formvars[$ename]='';\r\n }\r\n }\r\n }\r\n }", "function asignar_valores2(){\n\t\t$this->id=$_POST['id_link'];\n\t\t$this->prioridad=$_POST['id_sublink'];\n\t\t$this->etiqueta=$_POST['etiqueta'];\n\t}", "function getInputValues() {\r\n $vals = array();\r\n \r\n $vals['datetime'] = @$_REQUEST['datetime'];\r\n $vals['mileage'] = @$_REQUEST['mileage'];\r\n $vals['location'] = @$_REQUEST['location'];\r\n $vals['pricepergallon'] = @$_REQUEST['pricepergallon'];\r\n $vals['gallons'] = @$_REQUEST['gallons'];\r\n $vals['grade'] = @$_REQUEST['grade'];\r\n $vals['pumpprice'] = @$_REQUEST['pumpprice'];\r\n $vals['notes'] = @$_REQUEST['notes'];\r\n \r\n return $vals;\r\n}", "protected function populateValueObjectFromForm() : IValueObject\n {\n return new SeoValueObject($this->title, $this->description, $this->keywords);\n }", "public function form_fields($values = array(), $related = array())\n\t{\n\t\t$fields = parent::form_fields($values, $related);\n\t\t$order = 1;\n\t\t\n\t\t\n\t\t// create default images\n\t\t$upload_path = assets_server_path('', 'images');\n\t\t$order = 1;\n\t\tforeach($fields as $key => $field)\n\t\t{\n\t\t\t$fields[$key]['order'] = $order;\n\t\t\t$order++;\n\t\t}\n\t\t\n\t\t$yes = lang('form_enum_option_yes');\n\t\t$no = lang('form_enum_option_no');\n\t\tif (isset($fields['published']))\n\t\t{\n\t\t\t$fields['published']['order'] = 9999;\n\t\t\t$fields['published']['options'] = array('yes' => $yes, 'no' => $no);\n\t\t}\n\t\tif (isset($fields['active']))\n\t\t{\n\t\t\t$fields['active']['order'] = 9999;\n\t\t\t$fields['active']['options'] = array('yes' => $yes, 'no' => $no);\n\t\t}\n\n\t\treturn $fields;\n\t}", "protected function fillValues($valuesArray) {\n\t\t\n\t\tforeach ($this->_properties as $row) {\n\t\t\t//printf(\"<pre>%s</pre>\",print_r($row,1));\n\t\t\tif (!isset($valuesArray[$row['Field']])) continue;\n\t\t\tif (empty ($row['values'])) $this->_properties[$row['Field']]['values'] = htmlspecialchars(str_replace('<br />','',stripslashes ($valuesArray[$row['Field']])), ENT_QUOTES);\n\t\t\t\n\t\t\telse if ($row['ElementType'] == 'select' || $row['ElementType'] == 'checkbox') {\n\t\t\t\t\n\t\t\t\tif (!is_array ($valuesArray[$row['Field']])) $valuesArray[$row['Field']] = explode(',',$valuesArray[$row['Field']]);\n\t\t\t\tforeach ($valuesArray[$row['Field']] as $candidate) {\n\t\t\t\t\t\n\t\t\t\t\t$tmp = explode(',',$this->_properties[$row['Field']]['values']);\n\t\t\t\t\t$tmpkey = array_search($candidate,$tmp);\n\t\t\t\t\t$tmp[$tmpkey] = $candidate.\"=ON\";\n\t\t\t\t\t$this->_properties[$row['Field']]['values'] = implode(',',$tmp);\n\t\t\t\t\t\n\t\t\t\t\t// $this->_properties[$row['Field']]['values'] = str_replace($candidate, $candidate.\"=ON\", $this->_properties[$row['Field']]['values']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function recommends_req_form_courses_callback($form, $form_state) {\n $entry = $form_state['entries'][$form_state['values']['i_pid']];\n // Setting the #value of items is the only way I was able to figure out\n // to get replaced defaults on these items. #default_value will not do it\n // and shouldn't.\n \n foreach (array('i_pid', 'i_course', 'i_semester', 'i_year', 'i_coursename', 'i_objective', 'i_grade_a', 'i_grade_b', 'i_grade_other', 'i_timestamp') as $item) {\n $form[$item]['#value'] = $entry->$item;\n }\n return $form;\n}", "protected function prepare_value_for_response($value, $request, $args)\n {\n }", "function formulize_updateDerivedValues($entry, $fid, $frid=\"\") {\n\t$GLOBALS['formulize_forceDerivedValueUpdate'] = true;\n\tgetData($frid, $fid, $entry);\n\tunset($GLOBALS['formulize_forceDerivedValueUpdate']);\n}", "protected function value()\n {\n $this->value = $this->lexeme;\n }", "protected function _initialise_form_values($locationIds = array(), $promoterIds = array()){\n $this->set('promoters', $this->Survey->Promoter->find('list', array(\n 'conditions' => array('Promoter.id' => $promoterIds),\n 'fields' => array('Promoter.id', 'Promoter.code')\n )));\n $this->set('locations', $this->Survey->Location->find('list', array(\n 'conditions' => array('Location.id' => $locationIds),\n )));\n $this->set('occupations', $this->Survey->Occupation->find('list'));\n $this->set('packages', $this->Survey->Package->find('list'));\n }", "private function _set_fields()\n {\n @$this->form_data->survey_id = 0;\n $this->form_data->survey_title = '';\n $this->form_data->survey_description = '';\n $this->form_data->survey_status = 'open';\n $this->form_data->survey_anms = 'yes';\n $this->form_data->survey_expiry_date = '';\n $this->form_data->question_ids = array();\n\n $this->form_data->filter_survey_title = '';\n $this->form_data->filter_status = '';\n }", "public function save_values_for_step_parameters($values) {\n $report = $this->get_report_instance();\n $report->require_dependencies();\n $report->init_filter($report->id);\n $filters = $report->get_filters();\n //Check for report filter\n if (isset($report->filter)) {\n $report_filter = $report->filter;\n } else {\n $report_filter = null;\n }\n $form = new scheduling_form_step_parameters(null, array('workflow' => $this, 'filterobject' => $report_filter));\n\n $form->set_data($values);\n $form->definition_after_data();\n $form->_form->validate();\n $errors = $form->validation($values, array());\n if ((is_array($errors) && !empty($errors)) || !empty($form->_form->_errors)) {\n if (!is_array($errors)) {\n $errors = array();\n }\n $errors = $errors + $form->_form->_errors;\n return $errors;\n }\n\n // data is validated, so we can save it\n $data = $this->unserialize_data(array());\n $data['parameters'] = $values;\n $this->data = serialize($data);\n $this->save();\n }", "public function populateForm() {}", "public function setSpecialValues($validator, $values)\n {\n if (sfConfig::get(\"app_icloudservice_active\")) $this->saveICalDate($validator, $values);\n \n $values['time'] = $values['date'].' '.$values['time'];\n \n return $values;\n }", "public function postHydrate(): void\n {\n if ('invalid' === $this->value) {\n $this->value = 'valid';\n }\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}", "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 }", "protected function getConfigFormValues()\n {\n $formValues = array(\n 'WI_WEATHER_ENABLED' => Configuration::get('WI_WEATHER_ENABLED', ''),\n 'WI_WEATHER_PROVIDER' => Configuration::get('WI_WEATHER_PROVIDER', ''),\n 'WI_WEATHER_KEY' => Configuration::get('WI_WEATHER_KEY', ''),\n 'WI_WEATHER_CITY' => Configuration::get('WI_WEATHER_CITY', ''),\n );\n return $formValues;\n }", "protected function parseValues()\n {\n\n $this->setValues([]);\n\n $matches = [];\n\n preg_match_all(\"/\\<(.+?)\\>/\", $this->getDomainRegex() . '/' . $this->getRegex(), $matches);\n\n if(!empty($matches[1])){\n foreach($matches[1] as $value){\n $this->values[$value] = null;\n }\n }\n }" ]
[ "0.65056854", "0.6493842", "0.6155976", "0.61325073", "0.5910071", "0.59044373", "0.5762402", "0.57477576", "0.5737051", "0.57308257", "0.5651868", "0.56429297", "0.56400585", "0.56398755", "0.5624498", "0.5590094", "0.55656993", "0.55652654", "0.555356", "0.5547409", "0.55462235", "0.55246747", "0.5514727", "0.5507959", "0.54791564", "0.5460876", "0.5460809", "0.54488516", "0.542995", "0.5429249", "0.5423264", "0.54225004", "0.5413354", "0.5407545", "0.5391649", "0.5365517", "0.5356615", "0.53462255", "0.5345345", "0.53365123", "0.53294766", "0.5325455", "0.5318988", "0.5318572", "0.5317943", "0.5310817", "0.5299917", "0.52997106", "0.529074", "0.5288121", "0.52851474", "0.5282859", "0.5274866", "0.5262543", "0.5250406", "0.5249243", "0.52400696", "0.52261686", "0.5224401", "0.52198017", "0.52193934", "0.5215658", "0.5209984", "0.52067834", "0.5205997", "0.52043205", "0.5202289", "0.51783776", "0.51783776", "0.51783776", "0.5169725", "0.51587653", "0.5157278", "0.5155407", "0.5151978", "0.51512337", "0.514836", "0.5132268", "0.51319164", "0.5130912", "0.51257265", "0.51195586", "0.5116315", "0.51136243", "0.5111171", "0.5101338", "0.5094318", "0.50935894", "0.5092917", "0.50880426", "0.5085502", "0.5083735", "0.5081669", "0.50803286", "0.5073723", "0.5072359", "0.50606155", "0.50524956", "0.5049771", "0.50481784", "0.50405" ]
0.0
-1
Attempts to increase execution limits: time and memory. Additionally, if the xdebug extension is installed, the xdebug.max_nesting_level option is also increased
function abp01_wrapper_increase_limits() { if (function_exists('set_time_limit')) { @set_time_limit(ABP01_WRAPPED_SCRIPT_MAX_EXECUTION_TIME_MINUTES * 60); } if (function_exists('ini_set')) { @ini_set('memory_limit', ABP01_WRAPPED_SCRIPT_MAX_MEMORY); //If the xdebubg extension is loaded, // attempt to increase the max_nesting_level setting, // since (as is the case with large GPX files) // the simplify algorithm will fail due to its recursive nature // reaching that limit quickly if it's set too low if (extension_loaded('xdebug')) { @ini_set('xdebug.max_nesting_level', 1000000); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkXdebugMaxNestingLevel() {}", "function set_sys_limits()\n {\n if (is_numeric($this->_params->get('time_limit'))) {\n set_time_limit($this->_params->get('time_limit'));\n // avoid next execution\n // @TODO Change to static variable\n $this->_params->set('time_limit', '');\n $this->_paramsDef->set('time_limit', '');\n }\n\n if ($this->_params->get('memory_limit') != 'default') {\n ini_set(\"memory_limit\", $this->_params->get('memory_limit'));\n $this->_params->set('memory_limit', 'default');\n $this->_paramsDef->set('memory_limit', 'default');\n }\n\n }", "private function setLimits($factor = false) {\n if (!$factor) {\n $factor = $this->lines / 500;\n }\n if ($factor < 1) {\n return;\n }\n if ($factor > 20) {\n $factor = 20;\n }\n $maxmemory = 128 * $factor;\n $maxtime = 300 * $factor;\n ini_set(\"memory_limit\",$maxmemory . \"M\");\n ini_set(\"max_execution_time\", $maxtime);\n }", "static function allocate_extra_resources() {\n global $CFG;\n\n //disable the time limit for this executing script\n @set_time_limit(0);\n\n //up the memory limit\n if (empty($CFG->extramemorylimit)) {\n raise_memory_limit('128M');\n } else {\n raise_memory_limit($CFG->extramemorylimit);\n }\n }", "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}", "function the7_set_time_limit( $limit = 0 ) {\n\tif ( function_exists( 'set_time_limit' ) && false === strpos( ini_get( 'disable_functions' ), 'set_time_limit' ) && ! ini_get( 'safe_mode' ) ) {\n\t\t@set_time_limit( $limit ); // @codingStandardsIgnoreLine\n\t}\n}", "protected function setLimits()\n {\n if (!isset($this->settings->cpuLoad)) {\n $this->settings->cpuLoad = \"low\";\n }\n\n $memoryLimit = self::MAX_MEMORY_RATIO;\n $timeLimit = self::EXECUTION_TIME_RATIO;\n\n switch ($this->settings->cpuLoad) {\n case \"medium\":\n $timeLimit = $timeLimit / 2;\n break;\n case \"low\":\n $timeLimit = $timeLimit / 4;\n break;\n\n case \"fast\":\n default:\n break;\n }\n\n $this->memoryLimit = $this->maxMemoryLimit * $memoryLimit;\n $this->executionLimit = $this->maxExecutionTime * $timeLimit;\n }", "protected function setMemoryLimit() {}", "protected function checkMaxExecutionTime() {}", "private function updateMemoryLimit()\r\n {\r\n if (function_exists('ini_set')) {\r\n // phpcs:ignore Magento2.Functions.DiscouragedFunction\r\n $result = ini_set('display_errors', 1);\r\n if ($result === false) {\r\n $error = error_get_last();\r\n throw new InvalidArgumentException(__(\r\n 'Failed to set ini option display_errors to value 1. %1',\r\n $error['message']\r\n ));\r\n }\r\n $memoryLimit = trim(ini_get('memory_limit'));\r\n if ($memoryLimit != -1 && $this->getMemoryInBytes($memoryLimit) < 756 * 1024 * 1024) {\r\n // phpcs:ignore Magento2.Functions.DiscouragedFunction\r\n $result = ini_set('memory_limit', '756M');\r\n if ($result === false) {\r\n $error = error_get_last();\r\n throw new InvalidArgumentException(__(\r\n 'Failed to set ini option memory_limit to 756M. %1',\r\n $error['message']\r\n ));\r\n }\r\n }\r\n }\r\n }", "private function set_env(){\n ini_set(\"memory_limit\", \"256M\");\n ini_set(\"max_execution_time\", 3000);\n }", "protected function _setPhpSettings()\n {\n $config = $this->getConfig();\n\n $this->_setExecutionTimeout($config['application']['php']['php_time_limit']);\n }", "function set_time_limit(int $seconds): void\n{\n error_clear_last();\n $safeResult = \\set_time_limit($seconds);\n if ($safeResult === false) {\n throw InfoException::createFromPhpError();\n }\n}", "function olc_set_time_limit($limit) {\n\tif (!get_cfg_var('safe_mode')) {\n\t\t@set_time_limit($limit);\n\t}\n}", "function rlip_get_maxruntime() {\n $maxruntime = (int)ini_get('max_execution_time');\n $maxruntime -= 2; // TBD: MUST STOP BEFORE time limit is reached!\n //echo \"\\nrlip_get_maxruntime(b):{$maxruntime}\\n\";\n if ($maxruntime < RLIP_MAXRUNTIME_MIN) {\n $maxruntime = RLIP_MAXRUNTIME_MIN;\n }\n return $maxruntime;\n}", "function memory_tracking()\n{\n $memory_tracking = intval(get_value('memory_tracking'));\n if (memory_get_peak_usage() > 1024 * 1024 * $memory_tracking) {\n if (php_function_allowed('error_log')) {\n error_log('Memory usage above memory_tracking (' . strval($memory_tracking) . 'MB) @ ' . get_self_url_easy(true), 0);\n }\n }\n}", "function MAD_increaseMemoryLimit($setMemory) {\n $phpMemoryLimitInBytes = MAD_getMemoryLimitSizeInBytes();\n if ($phpMemoryLimitInBytes == -1) {\n // Memory is unlimited\n return true;\n }\n if ($setMemory > $phpMemoryLimitInBytes) {\n if (@ini_set('memory_limit', $setMemory) === false) {\n return false;\n }\n }\n return true;\n}", "public static function set_imagick_time_limit()\n {\n }", "public function setMaxExecuting($max_execing)\n {\n $this->max_execing = max(1, $max_execing + 0);\n }", "function tep_set_time_limit($limit) {\n if (!get_cfg_var('safe_mode')) {\n set_time_limit($limit);\n }\n }", "function disable_php_memory_limit()\n{\n $shl = @ini_get('suhosin.memory_limit');\n if (($shl === false) || ($shl == '') || ($shl == '0')) {\n // Progressively relax more and more (some PHP installs may block at some point)\n safe_ini_set('memory_limit', '128M');\n safe_ini_set('memory_limit', '256M');\n safe_ini_set('memory_limit', '-1');\n } else {\n if (is_numeric($shl)) {\n $shl .= 'M'; // Units are in MB for this, while PHP's memory limit setting has it in bytes\n }\n safe_ini_set('memory_limit', $shl);\n }\n}", "private function removePhpMemoryLimit()\n {\n ini_set('memory_limit', -1);\n }", "function xhprof_enable($flags = 0, array $options = [])\n{\n}", "function memory_limit_for_max_param($max_param)\n{\n $max = get_param_integer($max_param, null); // If making a large request and are an admin, raise PHP memory limit\n if (($max !== null) && ($max > 80) && (function_exists('has_privilege'))) {\n if (has_privilege(get_member(), 'remove_page_split')) {\n $shl = @ini_get('suhosin.memory_limit');\n if (($shl === false) || ($shl == '') || ($shl == '0')) {\n safe_ini_set('memory_limit', '128M');\n }\n }\n }\n}", "public function setCallStackLimit(int $limit): void {\n\n\t\tif ($limit < 0) {\n\t\t\tthrow new EngineError('Callstack limit must be positive or zero');\n\t\t}\n\n\t\t$this->callStackLimit = $limit;\n\n\t}", "public function maxIterations() {\n\t\treturn 1;\n\t}", "#[@test, @limit(time= 1.0)]\n public function noTimeout() {\n }", "#[@test, @limit(time= 0.010)]\n public function timeouts() {\n $start= gettimeofday();\n $end= (1000000 * $start['sec']) + $start['usec'] + 1000 * 50; // 0.05 seconds\n do {\n $now= gettimeofday();\n } while ((1000000 * $now['sec']) + $now['usec'] < $end);\n }", "public function setLimit($x) { $this->limit = $x; }", "function osc_set_time_limit($limit) {\n\tif (!get_cfg_var('safe_mode')) {\n\t\tset_time_limit($limit);\n\t}\n}", "private function setini() {\n ini_set('upload_max_filesize', '20M');\n //Increase execution time to 2 minutes\n ini_set('max_execution_time' , '3000');\n //Maximum time to allow parsing\n ini_set('max_input_time', '180');\n //Increase the size of possible post requests. Should be >= upload_max_filesize\n ini_set('post_max_size', '20M');\n\t //Increase the amount of Memory at PHPs disposal\n\t ini_set('memory_limit', '1256M');\t \t\n\t}", "public function setMaxRecursionDepth($maxRecursionDepth) {\n\t\t$this->_maxRecursionDepth = $maxRecursionDepth;\n\t}", "public static function setMaxDepth($maxDepth) : void\n {\n $maxDepth = (int)$maxDepth;\n \n if (static::getDepth() > $maxDepth) {\n static::$stack = array_slice(static::$stack, 0, $maxDepth);\n }//end if\n \n }", "protected function _prepareOptions()\n {\n // apply options\n if (isset($this->_deploy['set_time_limit'])) {\n // script needs time to proces huge amount of data (important)\n set_time_limit($this->_deploy['set_time_limit']);\n }\n if (isset($this->_deploy['memory_limit'])) {\n // adjust memory_limit if needed (not very important)\n ini_set('memory_limit', $this->_deploy['memory_limit']);\n }\n }", "public function setMaxSizeOfInstructions($value) {}", "function rescue_shortened_post_request()\n{\n global $MODSECURITY_WORKAROUND_ENABLED;\n if ($MODSECURITY_WORKAROUND_ENABLED) {\n return;\n }\n\n $setting_value = mixed();\n $setting_name = mixed();\n foreach (array('max_input_vars', 'suhosin.post.max_vars', 'suhosin.request.max_vars') as $setting) {\n if ((is_numeric(ini_get($setting))) && (intval(ini_get($setting)) > 10)) {\n $this_setting_value = intval(ini_get($setting));\n if (($setting_value === null) || ($this_setting_value < $setting_value)) {\n $setting_value = $this_setting_value;\n $setting_name = $setting;\n }\n }\n }\n\n if (($setting_value !== null) && ($setting_value > 1/*sanity check*/)) {\n if ((count($_POST) >= $setting_value - 5) || (array_count_recursive($_POST) >= $setting_value - 5)) {\n if ((has_zone_access(get_member(), 'adminzone')) || (running_script('upgrader'))) {\n $post = parse_raw_http_request();\n if ($post !== null) {\n $_POST = $post;\n return;\n }\n }\n\n warn_exit(do_lang_tempcode('_SUHOSIN_MAX_VARS_TOO_LOW', escape_html($setting_name)));\n }\n }\n}", "private function limitCalls()\n {\n if ($this->lastCallTimestamp > 0) {\n $callsLimit = $this->shopifyClient->callLimit();\n $callsMade = $this->shopifyClient->callsMade();\n $callsLeft = $this->shopifyClient->callsLeft();\n\n Log::debug(\"ShopifyApi.limitCalls: callsLimit=$callsLimit, callsMade=$callsMade, callsLeft=$callsLeft\");\n $currentTimestamp = microtime(true);\n $deltaTimestamp = ($this->lastCallTimestamp > 0) ? $currentTimestamp - $this->lastCallTimestamp : 0;\n Log::debug(\"ShopifyApi.limitCalls: deltaTimestamp=$deltaTimestamp\");\n\n if ($callsLeft < 10) {\n Log::debug(\"ShopifyApi.limitCalls: DELTA < 10: wait 0.5 seconds\");\n usleep(500000);\n }\n } else {\n Log::debug(\"ShopifyApi.limitCalls: first call\");\n }\n $this->lastCallTimestamp = microtime(true);\n }", "public function getCallStackLimit(): int {\n\t\treturn $this->callStackLimit;\n\t}", "private function checkApiRequestsLimit()\n {\n $tempTime = time() - $this->startTime;\n if($this->apiRequestsCount >= $this->apiRequestsLimit && $tempTime < $this->apiTimeLimit) {\n usleep(($this->apiTimeLimit - $tempTime)*1000000);\n $this->apiRequestsCount = 1;\n $this->startTime = time();\n } else {\n $this->apiRequestsCount++;\n }\n }", "function limitToSize($size) {\r\n $this->sizeLimit = $size;\r\n }", "public function setMaxDepth(?int $maxDepth): void;", "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 }", "function still_on_time($extra_time = 15)\n{\n\tstatic $max_execution_time, $start_time;\n\n\t$time = explode(' ', microtime());\n\t$current_time = $time[0] + $time[1];\n\n\tif (empty($max_execution_time))\n\t{\n\t\t$max_execution_time = (function_exists('ini_get')) ? (int) @ini_get('max_execution_time') : (int) @get_cfg_var('max_execution_time');\n\n\t\t// If zero, then set to something higher to not let the user catch the ten seconds barrier.\n\t\tif ($max_execution_time === 0)\n\t\t{\n\t\t\t$max_execution_time = 50 + $extra_time;\n\t\t}\n\n\t\t$max_execution_time = min(max(10, ($max_execution_time - $extra_time)), 50);\n\n\t\t// For debugging purposes\n\t\t// $max_execution_time = 10;\n\n\t\tglobal $starttime;\n\t\t$start_time = (empty($starttime)) ? $current_time : $starttime;\n\t}\n\n\treturn (ceil($current_time - $start_time) < $max_execution_time) ? true : false;\n}", "function trace(){\n\t\techo($this->get_trace()/(1024*1024).\" MB\");\n\t}", "public function setMaxRuntime(int $runtime)\n {\n $this->maxRuntime = $runtime;\n return $this;\n }", "protected function exceededMaxRuntime(): bool\n {\n return (($this->maxRuntime > 0) && (time() - $this->startTime) > $this->maxRuntime);\n }", "public function profilerStart()\n {\n if (extension_loaded('xhprof')) {\n include_once($this->xhprofLibPath . 'utils/xhprof_lib.php');\n include_once($this->xhprofLibPath . 'utils/xhprof_runs.php');\n xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);\n }\n }", "public function getMaxExecutionTime()\n\t{\n\t\tif(!isset($this->_maxExecutionTime)){\n\t\t\t$this->_maxExecutionTime = $this->dontHardcodeService->searchDontHardcodeByParamNameAndFilterName(__CLASS__,'maxExecutionTime',true);\n\t\t}\n\n\t\tif(is_numeric($this->_maxExecutionTime) && $this->_maxExecutionTime > 44){\n\t\t\treturn $this->_maxExecutionTime;\n\t\t}\n\t\telse{\n\t\t\treturn 120;\n\t\t}\n\t}", "protected function time_limit_exceeded() {\n\t\tdo_action( 'searchwp\\debug\\log', 'Process time limit exceeded!', 'indexer' );\n\n\t\t// Retrieve the last Entry we tried to index and mark it as omitted.\n\t\t$failed_entry = get_option( $this->identifier . '_indexing' );\n\n\t\tif ( empty( $failed_entry ) || ! is_array( $failed_entry ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->index->mark_entry_as( new Entry( $failed_entry['source'], $failed_entry['id'] ), 'omitted' );\n\t}", "function bump_request_timeout() {\n\t\treturn 60;\n\t}", "public function maxExceptions();", "public function setMemoryLimit($limit) {\n\t\tif (! in_array ( $limit, $this->getAllowedMemoryLimitValues () )) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$currentLimit = $this->getLimitFromIni ();\n\t\t\n\t\tif ($currentLimit < $limit) {\n\t\t\tini_set ( 'memory_limit', $limit . 'M' );\n\t\t}\n\t}", "public function limit(int $size = 10000)\n {\n $this->size = $size;\n return $this;\n }", "private function _optimize() {}", "function _ExpensiveSQL($numsql = 10)\n\t{\n\t\tglobal $ADODB_FETCH_MODE;\n\n $perf_table = adodb_perf::table();\n\t\t\t$saveE = $this->conn->fnExecute;\n\t\t\t$this->conn->fnExecute = false;\n\n\t\t\tif (isset($_GET['expe']) && isset($_GET['sql'])) {\n\t\t\t\t$partial = !empty($_GET['part']);\n\t\t\t\techo \"<a name=explain></a>\".$this->Explain($_GET['sql'],$partial).\"\\n\";\n\t\t\t}\n\n\t\t\tif (isset($_GET['sql'])) return;\n\n\t\t\t$sql1 = $this->sql1;\n\t\t\t$save = $ADODB_FETCH_MODE;\n\t\t\t$ADODB_FETCH_MODE = ADODB_FETCH_NUM;\n\t\t\tif ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);\n\n\t\t\t$rs = $this->conn->SelectLimit(\n\t\t\t\"select sum(timer) as total,$sql1,count(*),max(timer) as max_timer,min(timer) as min_timer\n\t\t\t\tfrom $perf_table\n\t\t\t\twhere {$this->conn->upperCase}({$this->conn->substr}(sql0,1,5)) not in ('DROP ','INSER','COMMI','CREAT')\n\t\t\t\tand (tracer is null or tracer not like 'ERROR:%')\n\t\t\t\tgroup by sql1\n\t\t\t\thaving count(*)>1\n\t\t\t\torder by 1 desc\",$numsql);\n\t\t\tif (isset($savem)) $this->conn->SetFetchMode($savem);\n\t\t\t$this->conn->fnExecute = $saveE;\n\t\t\t$ADODB_FETCH_MODE = $save;\n\t\t\tif (!$rs) return \"<p>$this->helpurl. \".$this->conn->ErrorMsg().\"</p>\";\n\t\t\t$s = \"<h3>Expensive SQL</h3>\n<font size=1>Tuning the following SQL could reduce the server load substantially</font><br>\n<table border=1 bgcolor=white><tr><td><b>Load</b><td><b>Count</b><td><b>SQL</b><td><b>Max</b><td><b>Min</b></tr>\\n\";\n\t\t\t$max = $this->maxLength;\n\t\t\twhile (!$rs->EOF) {\n\t\t\t\t$sql = $rs->fields[1];\n\t\t\t\t$raw = urlencode($sql);\n\t\t\t\tif (strlen($raw)>$max-100) {\n\t\t\t\t\t$sql2 = substr($sql,0,$max-500);\n\t\t\t\t\t$raw = urlencode($sql2).'&part='.crc32($sql);\n\t\t\t\t}\n\t\t\t\t$prefix = \"<a target=sqle\".rand().\" href=\\\"?hidem=1&expe=1&sql=\".$raw.\"&x#explain\\\">\";\n\t\t\t\t$suffix = \"</a>\";\n\t\t\t\tif($this->explain == false || strlen($prefix>$max)) {\n\t\t\t\t\t$prefix = '';\n\t\t\t\t\t$suffix = '';\n\t\t\t\t}\n\t\t\t\t$s .= \"<tr><td>\".adodb_round($rs->fields[0],6).\"<td align=right>\".$rs->fields[2].\"<td><font size=-1>\".$prefix.htmlspecialchars($sql).$suffix.\"</font>\".\n\t\t\t\t\t\"<td>\".$rs->fields[3].\"<td>\".$rs->fields[4].\"</tr>\";\n\t\t\t\t$rs->MoveNext();\n\t\t\t}\n\t\t\treturn $s.\"</table>\";\n\t}", "public function __construct() {\n\t\t\tif ( defined( 'WP_MAX_MEMORY_LIMIT' ) ) {\n\t\t\t\t$wp_memory_limit = WP_MAX_MEMORY_LIMIT;\n\t\t\t\t$current_memory_limit = @ini_set( 'memory_limit' );\n\t\t\t\tif ( false === $current_memory_limit ||\n\t\t\t\t WPDA::convert_memory_to_decimal( $current_memory_limit ) < WPDA::convert_memory_to_decimal( $wp_memory_limit )\n\t\t\t\t) {\n\t\t\t\t\t@ini_set( 'memory_limit', $wp_memory_limit );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function setMaxRunTimeInMinutes(?int $value): void {\n $this->getBackingStore()->set('maxRunTimeInMinutes', $value);\n }", "function phan_print_backtrace(bool $is_crash = false, int $frames_to_skip = 2): void\n{\n // Uncomment this if even trying to print the details would crash\n /*\n ob_start();\n debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n fwrite(STDERR, rtrim(ob_get_clean() ?: \"failed to dump backtrace\") . PHP_EOL);\n */\n\n $frames = debug_backtrace();\n if (isset($frames[1])) {\n fwrite(STDERR, 'More details:' . PHP_EOL);\n if (class_exists(Config::class, false)) {\n $max_frame_length = max(100, Config::getValue('debug_max_frame_length'));\n } else {\n $max_frame_length = 1000;\n }\n $truncated = false;\n foreach ($frames as $i => $frame) {\n if ($i < $frames_to_skip) {\n continue;\n }\n $frame_details = \\Phan\\Debug\\Frame::frameToString($frame);\n if (strlen($frame_details) > $max_frame_length) {\n $truncated = true;\n if (function_exists('mb_substr')) {\n $frame_details = mb_substr($frame_details, 0, $max_frame_length) . '...';\n } else {\n $frame_details = substr($frame_details, 0, $max_frame_length) . '...';\n }\n }\n fprintf(STDERR, '#%d: %s' . PHP_EOL, $i, $frame_details);\n }\n if ($truncated) {\n fwrite(STDERR, \"(Some long strings (usually JSON of AST Nodes) were truncated. To print more details for some stack frames of this \" . ($is_crash ? \"crash\" : \"log\") . \", \" .\n \"increase the Phan config setting debug_max_frame_length)\" . PHP_EOL);\n }\n }\n}", "public function set_limit($limit);", "function xhprof_disable()\n{\n}", "public function pcr_auth_timeout_extend($time) {\r\n\r\n $max_execution_time = ini_get('max_execution_time');\r\n\r\n if($max_execution_time < 60) {\r\n $time = $max_execution_time + 60;\r\n } else {\r\n $time = $max_execution_time;\r\n }\r\n \r\n return $time;\r\n }", "public function get_limits()\n\t{\n\t\t$profile_start = microtime(true);\n\n\t\t$limitsData = array(\n\t\t\t\t\t'call_limit' =>\tCALL_LIMIT,\n\t\t\t\t\t'duration_limit' =>\tCALL_DURATION_LIMIT,\n\t\t\t\t\t'listing_limit' =>\tLISTING_LIMIT\n\t\t\t\t\t);\n\n\t\t$this->input->do_put($this->config->base_url.\"/api/limit\",[]);\n\n\t\tif(!empty($limitsData))\n\t\t\t$this->display->success($limitsData,'limits');\n\t\telse\n\t\t\t$this->display->error(1502);\n\n\t\t$profile_start = profiler($profile_start,__CLASS__,__FUNCTION__,'openapi');\n\t}", "public function setTimeLimit(int $timeLimit): self;", "public function testUnlimitedExecutionTime()\n {\n $response = $this->http->send(\n new Request('GET', '/visit-counter.php?with_no_time_limit')\n );\n\n $this->assertSame('1', (string) $response->getBody());\n $this->assertCreatedNewSession($response);\n $this->assertSame(1, $this->redis->dbSize());\n }", "function qa_post_limit_exceeded()\n{\n\tif (in_array($_SERVER['REQUEST_METHOD'], array('POST', 'PUT')) && empty($_POST) && empty($_FILES)) {\n\t\t$postmaxsize = ini_get('post_max_size'); // Gets the current post_max_size configuration\n\t\t$unit = substr($postmaxsize, -1);\n\t\tif (!is_numeric($unit)) {\n\t\t\t$postmaxsize = substr($postmaxsize, 0, -1);\n\t\t}\n\t\t// Gets an integer value that can be compared against the size of the HTTP request\n\t\t$postmaxsize = convert_to_bytes($unit, $postmaxsize);\n\t\treturn $_SERVER['CONTENT_LENGTH'] > $postmaxsize;\n\t}\n}", "public static function getMaxExecutionTime(): int\n {\n return static::getIniValue('max_execution_time');\n }", "protected function configureRateLimiting()\n {\n RateLimiter::for('api', function (Request $request) {\n return Limit::perMinute(60);\n });\n }", "public function setStackSize(int $bb)\n\t{\n\t\t$this->stackSize = max($bb, 20);\n\t}", "function max_allowed_packet() {\n\t\treturn 850000;\n\t}", "public function setMaxInstanceRequestConcurrency($var)\n {\n GPBUtil::checkInt32($var);\n $this->max_instance_request_concurrency = $var;\n\n return $this;\n }", "function Set_max_size($ServerName, $max_size){\n\t\tself::Run_flushctl_command($ServerName, \" set max_size \".$max_size);\n\t}", "public function gc(int $max_life_time)\n {\n }", "function gc($maxlifetime = 300)\n {\n return false;\n }", "function setProfiling(){\r\n\t\t$this->query(\"SET profiling=1\");\r\n\t}", "public function setMaxQueryTime($max)\n\t{\n\t\t$this->maxquerytime = $max;\n\t}", "public static function getMaxRequests()\n\t{\n\t\treturn MHTTPD::$config['Server']['keep_alive_max_requests'];\n\t}", "function MAD_checkMemoryCanBeSet()\n{\n $phpMemoryLimitInBytes = MAD_getMemoryLimitSizeInBytes();\n // Unlimited memory, no need to check if it can be set\n if ($phpMemoryLimitInBytes == -1) {\n return true;\n }\n MAD_increaseMemoryLimit($phpMemoryLimitInBytes + 1);\n $newPhpMemoryLimitInBytes = MAD_getMemoryLimitSizeInBytes();\n $memoryCanBeSet = ($phpMemoryLimitInBytes != $newPhpMemoryLimitInBytes);\n\n // Restore previous limit\n @ini_set('memory_limit', $phpMemoryLimitInBytes);\n return $memoryCanBeSet;\n}", "public function iniPerformance(){\n $this->tiempo = microtime(true);\n $this->memoria = memory_get_usage();\n }", "public function updateMemoryUsage(): void\n {\n $this->data['memory'] = \\memory_get_peak_usage(true);\n }", "public function setOptimizations(int $optimizations);", "public function setDebugMode( $enable=false )\n\t{\n \t$this->obj['debug'] = intval($enable);\n \n \t//-----------------------------------------\n \t// If debug, no shutdown....\n \t//-----------------------------------------\n \t\n \tif ( $this->obj['debug'] )\n \t{\n \t\t$this->obj['use_shutdown'] = 0;\n \t}\n\t}", "public function testTracerFlushedWhenSpanLimitExceeded()\n {\n $traces = $this->tracesFromWebRequest(function () {\n $response = $this->call(GetSpec::create('Root', '/'));\n // We explicitly assert the configured value of 'DD_TRACE_SPANS_LIMIT' echoed by the web app\n // because if we add tests to this test case that require a larger limit the current test would still pass\n // but would not test the specific edge case.\n TestCase::assertSame('1', $response);\n });\n\n $this->assertFlameGraph($traces, [\n SpanAssertion::exists('web.request')\n ->withChildren([\n SpanAssertion::exists('my_span')\n ]),\n ]);\n }", "public function run()\n {\n Setting::set('ingest_query_limit',1000,'integer');\n Setting::set('ingest_timeout',300,'integer');\n Setting::set('ingest_max_consecutive_timeouts',3,'integer');\n Setting::set('ingest_max_total_timeouts',10,'integer');\n Setting::set('ingest_max_queries',-1,'integer');\n Setting::set('ingest_event_print',true,'boolean');\n }", "public function setDebugMode( $enable=false );", "protected function checkWindowsApacheThreadStackSize() {}", "function updateLimitEnabled()\r\n\t{\r\n\t\treturn true;\r\n\t}", "Public Function Configure_XDebug()\n\t\t{\n\t\t}", "protected function disableXDebug()\n {\n if (!in_array('xdebug', get_loaded_extensions())) {\n return;\n }\n\n $method = debug_backtrace()[1]['function'];\n\n $process = new \\Symfony\\Component\\Process\\PhpProcess('<?php\n\n class PHPUnit_Framework_TestCase {\n function __call($name, $arguments)\n {\n echo \"\\\\$this->\" . $name . \"(\" . implode(\", \", array_map(function ($value) {\n return var_export($value, true);\n }, $arguments)) . \");\\\\n\";\n }\n }\n\n $GLOBALS[\"argv\"] = ' . var_export($GLOBALS['argv'], true) . ';\n\n require ' . var_export($this->getCodePath(), true) . ' . \"/vendor/autoload.php\";\n\n $test = new ' . __class__ . '();\n $test->' . $method . '();\n\n ');\n\n /**\n * Don't load the default ini file. This is the main reason why we are running\n * a sub-process in the first place - to disable XDebug.\n * It seems that XDebug can't be disabled during runtime, nor can an extension\n * defined in the php.ini be excluded from loading with parameters.\n * So far this seems to be the only way not to load XDebug.\n */\n $process->setCommandLine($process->getCommandLine() . ' -n');\n\n /**\n * For some reason these two extensions are not statically linked\n * on *nix systems so we need to load the explicitly.\n */\n if (PHP_SHLIB_SUFFIX == 'so') {\n $process->setCommandLine($process->getCommandLine() . ' -dextension=tokenizer.so -dextension=json.so');\n }\n\n $process->run();\n\n if (!$process->isSuccessful()) {\n throw new Exception('Error while running a php sub-process: ' . $process->getOutput());\n }\n\n eval($process->getOutput());\n }", "function BreakpointDebugging_mySetting()\n{\n $exeMode = B::getExeMode();\n BreakpointDebugging_userSetting($exeMode, $language, $timezone, $SMTP, $sendmailFrom, $openBasedir);\n\n ////////////////////////////////////////////////////////////////////////////////\n // PHP It limits directory which opens a file.\n \\BreakpointDebugging::iniSet('open_basedir', $openBasedir);\n // Caution: \"if\" statement is needed to copy in case of remote release if copies a code inside \"if\".\n if ($exeMode & B::REMOTE) { // In case of remote.\n if (BREAKPOINTDEBUGGING_IS_WINDOWS) {\n // Windows e-mail sending server setting.\n \\BreakpointDebugging::iniSet('SMTP', $SMTP); // 'smtp.???.com'\n // Windows mail address setting.\n \\BreakpointDebugging::iniSet('sendmail_from', $sendmailFrom); // '???@???.com'\n }\n } else { // In case of local.\n // \"mbstring.func_overload\" do coding with 0 for plainness, but release environment is any possibly.\n \\BreakpointDebugging::iniCheck('mbstring.func_overload', '', 'To make coding plain must be set \"mbstring.func_overload = 0\" of \"php.ini\" file.');\n \\BreakpointDebugging::iniSet('SMTP', $SMTP);\n \\BreakpointDebugging::iniSet('sendmail_from', $sendmailFrom);\n }\n ////////////////////////////////////////////////////////////////////////////////\n // ### [mbstring] setting in \"php.ini\" file. ###\n // The default character sets of PHP.\n \\BreakpointDebugging::iniSet('default_charset', 'utf8');\n // The default value of language setting (NLS).\n \\BreakpointDebugging::iniSet('mbstring.language', $language);\n // Set \"mbstring.internal_encoding = utf8\" of \"php.ini\" file because this is purpose to define default value of inner character encoding.\n \\BreakpointDebugging::iniSet('mbstring.internal_encoding', 'utf8');\n // Set \"mbstring.http_input = auto\" of \"php.ini\" file because this is purpose to define default value of HTTP entry character encoding.\n \\BreakpointDebugging::iniSet('mbstring.http_input', 'auto');\n // Set \"mbstring.http_output = utf8\" of \"php.ini\" file because this is purpose to define default value of HTTP output character encoding.\n \\BreakpointDebugging::iniSet('mbstring.http_output', 'utf8');\n \\BreakpointDebugging::iniCheck('mbstring.encoding_translation', array ('1'), 'Set \"mbstring.encoding_translation = Off\" of \"php.ini\" file because this is purpose not to change a input HTTP query into inner character encoding automatically.');\n // Set \"mbstring.substitute_character = none\" of \"php.ini\" file because this is purpose to define character ( it does not display ) which substitutes an invalid character.\n \\BreakpointDebugging::iniSet('mbstring.substitute_character', '');\n // Set \"mbstring.strict_detection = Off\" of \"php.ini\" file because this is purpose to not do strict encoding detection.\n \\BreakpointDebugging::iniSet('mbstring.strict_detection', '');\n // This is possible for any value because \"mbstring.script_encoding\" is unrelated.\n /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // ### The \"Fopen wrappers\" setting of \"php.ini\" file ###\n \\BreakpointDebugging::iniCheck('allow_url_fopen', '1', 'Set \"allow_url_fopen = On\" of \"php.ini\" file because this is purpose that a file path is made to be able to specify URL by \"fopen()\" type function.');\n // This is possible for any value because \"allow_url_include\" is not used.\n // This sets \"user_agent\" to \"PHP\".\n \\BreakpointDebugging::iniSet('user_agent', 'PHP');\n // Set for the debugging because \"from\" can be set only in \"php.ini\".\n // This judges an end of a sentence character by the data which was read in \"fgets()\" and \"file()\", and \"PHP_EOL\" constant can be used.\n \\BreakpointDebugging::iniSet('auto_detect_line_endings', '1');\n /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // ### \"php.ini\" the file setting ( This sets a security mainly ). ###\n // Timezone setting.\n \\BreakpointDebugging::iniSet('date.timezone', $timezone);\n // This changes \"php.ini\" file setting into \"report_memleaks = On\" because this setting detects a memory leak.\n \\BreakpointDebugging::iniSet('report_memleaks', '1');\n // Change \"php.ini\" file setting into \"track_errors = Off\" because this is not make to insert an error message in direct near \"$php_errormsg\" variable for security.\n \\BreakpointDebugging::iniSet('track_errors', '0');\n if (version_compare(PHP_VERSION, '5.4', '<')) {\n // This limits a user input that it receive by the super global variable for security.\n \\BreakpointDebugging::iniCheck('register_globals', '', 'Set \"register_globals = Off\" of \"php.ini\" file for security.');\n // This doesn't escape user input for execution speed. This escapes with \"addslashes()\" and \"mysqli_real_escape_string()\".\n \\BreakpointDebugging::iniCheck('magic_quotes_gpc', '', 'Set \"magic_quotes_gpc = Off\" of \"php.ini\" file for execution speed.');\n // This makes not escape for execution speed at time of resource reading. Therefore, this changes \"php.ini\" file setting into \"magic_quotes_runtime = Off\".\n \\BreakpointDebugging::iniSet('magic_quotes_runtime', '');\n // This sets safe mode invalidly.\n \\BreakpointDebugging::iniCheck('safe_mode', '', 'This feature has been deprecated in PHP5.3.0. Not to use this feature is strongly recommended generally. Therefore, set \"safe_mode = Off\" of \"php.ini\" file.');\n }\n // This doesn't expose to be using php by server.\n // \\BreakpointDebugging::iniCheck('expose_php', '', 'This should change \"php.ini\" file setting into \"expose_php = Off\" for security.');\n // This changes \"php.ini\" file setting into \"arg_separator.output = \"&amp;\" to be based on XHTML fully.\n \\BreakpointDebugging::iniSet('arg_separator.output', '&amp;');\n \\BreakpointDebugging::iniCheck('short_open_tag', '', '\"php.ini\" file setting must be changed to \"short_open_tag = Off\" because \"BreakpointDebugging_ProductionSwitcher\" does not detect \"&lt;?\" opening tag.');\n \\BreakpointDebugging::iniCheck('asp_tags', '', 'This should change \"php.ini\" file setting into \"asp_tags = Off\" because it can distinguish between other languages by using \"&lt;php?\" opening tag.');\n // This changes \"php.ini\" file setting into \"ignore_user_abort = Off\" because it is purpose to end execution of script when client is disconnected.\n \\BreakpointDebugging::iniSet('ignore_user_abort', '0');\n // This changes \"php.ini\" file setting into \"memory_limit = 128M\" because it works stably by memory limit setting which can be used with script.\n \\BreakpointDebugging::iniSet('memory_limit', '128M');\n // This changes \"php.ini\" file setting into \"implicit_flush = Off\" because it is purpose to prevent a remarkable degradation.\n \\BreakpointDebugging::iniSet('implicit_flush', '');\n \\BreakpointDebugging::iniCheck('scream.enabled', '', 'This should change \"php.ini\" file setting into \"scream.enabled = false\" because it does not make \"@\" error display control operator invalid.');\n if (BREAKPOINTDEBUGGING_IS_WINDOWS) { // In case of Windows.\n if (version_compare(PHP_VERSION, '5.4', '>=')) {\n // Shows crt warnings in case of Windows debug mode.\n ini_set('windows_show_crt_warning', '1');\n }\n }\n // The SMTP port setting of Windows.\n \\BreakpointDebugging::iniSet('smtp_port', '25');\n // \\BreakpointDebugging::iniCheck('mail.add_x_header', '', '\"mail.add_x_header = Off\" setting inside \"php.ini\" file is recommended because does not write that header continue \"UID\" behind the file name.');\n \\BreakpointDebugging::iniCheck('output_buffering', '', 'Sets \\'output_buffering = Off\\' of \"php.ini\" file for output window.');\n /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // ### Super global variable filter setting. ###\n \\BreakpointDebugging::iniCheck('filter.default', 'unsafe_raw', 'Set \\'filter.default = unsafe_raw\\' of \"php.ini\" or \".htaccess\" file because of unit test\\'s static backup.');\n \\BreakpointDebugging::iniCheck('filter.default_flags', '', 'Set \\'filter.default_flags = \"\"\\' of \"php.ini\" or \".htaccess\" file because of unit test\\'s static backup.');\n /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // When \"Zend OPcache\" exists.\n if (extension_loaded('Zend OPcache')) {\n \\BreakpointDebugging::iniCheck('opcache.enable_cli', '', 'Set \"opcache.enable_cli = 0\" of \"php.ini\" file because CLI from CGI cannot be called with \"popen()\".');\n \\BreakpointDebugging::iniCheck('opcache.validate_timestamps', '1', 'Set \"opcache.validate_timestamps = 1\" of \"php.ini\" file because modified \"*.php\" files must be cached.');\n if (!\\BreakpointDebugging::isDebug() && ($exeMode & B::REMOTE)) { // In case of release remote mode.\n \\BreakpointDebugging::iniCheck('opcache.file_update_protection', array ('', '0'), 'Do not set \"opcache.file_update_protection = 0\" of \"php.ini\" file because production server want to modify a file during execution.' . PHP_EOL . \"\\t\" . 'Recommendation is \"opcache.file_update_protection = 2\".');\n \\BreakpointDebugging::iniCheck('opcache.revalidate_freq', array ('', '0'), 'Do not set \"opcache.revalidate_freq = 0\" of \"php.ini\" file because production server does not want to access a file as much as possible.' . PHP_EOL . \"\\t\" . 'Recommendation is \"opcache.revalidate_freq = 60\".');\n } else { // Except release remote mode.\n \\BreakpointDebugging::iniCheck('opcache.file_update_protection', '', 'Set \"opcache.file_update_protection = 0\" of \"php.ini\" file because modified \"*.php\" files must be cached.');\n \\BreakpointDebugging::iniCheck('opcache.revalidate_freq', '', 'Set \"opcache.revalidate_freq = 0\" of \"php.ini\" file because modified \"*.php\" files must be cached.');\n }\n }\n\n if (BREAKPOINTDEBUGGING_IS_PRODUCTION) { // If production mode.\n ////////////////////////////////////////////////////////////////////////////////\n // ### This setting has been Fixed. ###\n if (!($exeMode & B::UNIT_TEST)) {\n // Outputs a log except \"DEPRECATED\".\n \\BreakpointDebugging::iniSet('error_reporting', (string) (E_ALL & ~E_DEPRECATED));\n // This changes \"php.ini\" file setting into \"log_errors = On\" to record log for security.\n \\BreakpointDebugging::iniSet('log_errors', '1');\n if (!($exeMode & B::REMOTE)) { // In case of local host.\n return;\n }\n // When \"Xdebug\" exists.\n if (extension_loaded('xdebug')) {\n \\BreakpointDebugging::iniCheck('xdebug.remote_enable', '', 'Set \"xdebug.remote_enable = 0\" of \"php.ini\" file because security is kept by invalid \"Xdebug\".');\n // Does not display XDebug information.\n \\BreakpointDebugging::iniSet('xdebug.default_enable', 'Off');\n }\n // For security, it doesn't display all errors, warnings and notices.\n \\BreakpointDebugging::iniSet('display_errors', '');\n // This changes \"php.ini\" file setting into \"display_startup_errors = Off\" Because this makes not display an error on start-up for security.\n \\BreakpointDebugging::iniSet('display_startup_errors', '');\n // This changes \"php.ini\" file setting into \"html_errors = Off\" for security because this does not make output link to page which explains function which HTML error occurred.\n \\BreakpointDebugging::iniSet('html_errors', '');\n return;\n }\n } else { // If development mode.\n include_once './' . BREAKPOINTDEBUGGING_PEAR_SETTING_DIR_NAME . 'BreakpointDebugging_MySetting_InDevelopment.php';\n }\n}", "public function testMaxAllowedPacketQueryTruncating() {\n // Only run this test for the 'mysql' driver.\n $driver = $this->connection->driver();\n if ($driver !== 'mysql') {\n $this->markTestSkipped(\"MySql tests can not run for driver '$driver'.\");\n }\n // The max_allowed_packet value is configured per database instance.\n // Retrieve the max_allowed_packet value from the current instance and\n // check if PHP is configured with sufficient allowed memory to be able\n // to generate a query larger than max_allowed_packet.\n $max_allowed_packet = $this->connection->query('SELECT @@global.max_allowed_packet')->fetchField();\n if (!Environment::checkMemoryLimit($max_allowed_packet + (16 * 1024 * 1024))) {\n $this->markTestSkipped('The configured max_allowed_packet exceeds the php memory limit. Therefore the test is skipped.');\n }\n\n $long_name = str_repeat('a', $max_allowed_packet + 1);\n try {\n $this->connection->query('SELECT [name] FROM {test} WHERE [name] = :name', [':name' => $long_name]);\n $this->fail(\"An exception should be thrown for queries larger than 'max_allowed_packet'\");\n }\n catch (DatabaseException $e) {\n // Close and re-open the connection. Otherwise we will run into error\n // 2006 \"MySQL server had gone away\" afterwards.\n Database::closeConnection();\n Database::getConnection();\n // Got a packet bigger than 'max_allowed_packet' bytes exception thrown.\n $this->assertEquals(1153, $e->getPrevious()->errorInfo[1]);\n // 'max_allowed_packet' exception message truncated.\n // Use strlen() to count the bytes exactly, not the unicode chars.\n $this->assertLessThanOrEqual($max_allowed_packet, strlen($e->getMessage()));\n }\n }", "function image_memory_adjust ( $filename ) {\r\n\t\t// http://www.php.net/manual/en/function.imagecreatefromjpeg.php#64155\r\n\t\t\r\n\t\t# Prepare\r\n\t\tif ( is_string($filename) && is_file($filename) ) {\r\n\t \t$imageInfo = getimagesize($filename);\r\n\t\t} else {\r\n\t\t\trigger_error('image_memory_adjust only accepts files not objects.', E_USER_WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\r\n\t\t# Prepare Memory\r\n\t\t$pixels = $imageInfo[0]*$imageInfo[1];\r\n\t $MB = pow(1024,2);\t\t// number of bytes in 1M\r\n\t $K64 = pow(2,16);\t\t// number of bytes in 64K\r\n\t $TWEAKFACTOR = 1.8;\t\t// Or whatever works for you\r\n\t \r\n\t # Calculate Memory\r\n\t $memory = $pixels * $imageInfo['bits'] * ($imageInfo['channels'] / 8) + $K64;\r\n\t $memoryExtra = round($memory * $TWEAKFACTOR);\r\n\t \r\n\t # Limits\r\n\t\t$memoryHave = memory_get_usage();\r\n\t $memoryLimitMB = intval(ini_get('memory_limit'));\r\n\t if ( !$memoryLimitMB ) $memoryLimitMB = 8;\r\n\t $memoryLimit = $memoryLimitMB * $MB;\r\n\t \r\n\t # Check\r\n\t $memoryNeeded = $memoryHave+$memoryExtra;\r\n\t if ( $memoryNeeded > $memoryLimit) {\r\n\t \t$memoryDifference = $memoryNeeded-$memoryLimit;\r\n\t \t$memoryLimitNewMB = $memoryLimitMB + ceil($memoryDifference/$MB);\r\n\t \t$memoryLimitNew = $memoryLimitNewMB * $MB;\r\n\t\t\tini_set('memory_limit', $memoryLimitNewMB . 'M');\r\n\t\t\t//var_dump(compact('memoryNeeded','memoryHave','memoryExtra','memoryDifference','memoryLimitNewMB', 'memoryLimitNew', 'memoryLimit', 'memoryLimitMB'));\r\n\t\t\t//var_dump(intval(ini_get('memory_limit')));\r\n\t\t\tif ( intval(ini_get('memory_limit')) === $memoryLimitNewMB ) {\r\n\t\t\t\treturn true; // Adjusted\r\n\t\t\t} else {\r\n\t\t\t\treturn false; // Can't adjust\r\n\t\t\t}\r\n\t } else {\r\n\t return true; // No need to adjust\r\n\t }\r\n\t}", "protected function checkLimits()\n {\n if ($this->isTimeLimit() || $this->isJobLimit()) {\n $this->stop();\n }\n }", "public function setMaxBatchSize($value) \n {\n $this->_fields['MaxBatchSize']['FieldValue'] = $value;\n return $this;\n }", "public function limit($num)\n {\n return $this->set_option('limit', $num);\n }", "public function run(){\n set_time_limit(0);\n ini_set('memory_limit', '2048M');\n\n $this->addEventListener('mainRunnerProgress', $this);\n //TODO approfondire. Al momento commentato perché dà errori (la classe Error è presente da PHP 7)\n // set_error_handler(function($num, $str, $file, $line){\n // throw new Error(\n // \"Errore PHP n°$num: $str\\r\\n\" .\n // \"$file:$line\"\n // );\n // });\n }", "public function setMaxComponentDepth($value) {}", "protected function getLimitFromIni() {\n\t\treturn ( integer ) trim ( str_replace ( \"M\", \"\", ini_get ( 'memory_limit' ) ) );\n\t}", "public static function optimize($enabled = true)\n {\n // Set the optimization value\n self::$data['optimize'] = $enabled;\n }", "static function uploadLimit() {\n\t\t$max_upload = (int)(ini_get('upload_max_filesize'));\n\t\t$max_post = (int)(ini_get('post_max_size'));\n\t\t$memory_limit = (int)(ini_get('memory_limit'));\n\t\treturn min($max_upload, $max_post, $memory_limit);\n\t}", "public function enableQueryStats($enable = true) {\n\t\t$this->_debug = $enable ? true : false;\n\t\t$this->zendDb()->getProfiler()->setEnabled($this->_debug);\n\t}" ]
[ "0.62583613", "0.59536994", "0.591849", "0.5801655", "0.5753722", "0.57223403", "0.571216", "0.56820315", "0.55974925", "0.55235523", "0.5476079", "0.5377371", "0.53450644", "0.5340141", "0.52754766", "0.5227457", "0.5217509", "0.52100813", "0.5096969", "0.49998188", "0.49927914", "0.4971749", "0.4945015", "0.48869306", "0.48627082", "0.48528004", "0.48361292", "0.4788947", "0.47275737", "0.4709398", "0.46855918", "0.46854946", "0.4676913", "0.46537504", "0.4625839", "0.46209508", "0.46087882", "0.45990098", "0.45983994", "0.4577391", "0.45713055", "0.45491853", "0.4538914", "0.4527843", "0.45239875", "0.4504842", "0.4495211", "0.44904155", "0.44882765", "0.4487379", "0.44871897", "0.4484774", "0.44826046", "0.44778654", "0.44730037", "0.44719717", "0.44663885", "0.44613725", "0.44523397", "0.44453204", "0.44383118", "0.44329053", "0.4430292", "0.4425372", "0.44217408", "0.44064412", "0.43776688", "0.43721673", "0.436089", "0.4358034", "0.4357621", "0.4327708", "0.43197095", "0.43192008", "0.4303199", "0.4303084", "0.42990205", "0.42944676", "0.42911845", "0.42755926", "0.42674983", "0.42599058", "0.42514277", "0.4248404", "0.42437327", "0.4242911", "0.42336476", "0.42316014", "0.42289403", "0.4224827", "0.42130184", "0.42121595", "0.42023337", "0.41969404", "0.41925955", "0.4175195", "0.41748393", "0.4170317", "0.41660315", "0.4161571" ]
0.7890792
0
Determine which script should be wrapped. First looks at the 'load' URL parameter. If it's set, its value is returned. If not, the path component of the REQUEST_URI server var is returned.
function abp01_wrapper_get_file_to_wrap() { $load = !empty($_GET['load']) ? trim(strip_tags($_GET['load'])) : null; $requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null; $uri = parse_url($requestUri); if (!empty($load)) { //We're expecting 'load' to be relative to the plug-in's own root directory $load = preg_match('/' . preg_quote(basename(__FILE__)) . '$/i', $uri['path']) ? '/wp-content/plugins/' . ABP01_PLUGIN_ROOT_NAME . '/' . preg_replace('/[^a-zA-Z0-9\/.\-_]/', '', $load) : null; } else { $load = $uri['path']; } return $load; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function determineScriptUrl()\n {\n if ($routePath = GeneralUtility::_GP('route')) {\n $router = GeneralUtility::makeInstance(Router::class);\n $route = $router->match($routePath);\n $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);\n $this->thisScript = (string)$uriBuilder->buildUriFromRoute($route->getOption('_identifier'));\n } elseif ($moduleName = GeneralUtility::_GP('M')) {\n $this->thisScript = BackendUtility::getModuleUrl($moduleName);\n } else {\n $this->thisScript = GeneralUtility::getIndpEnv('SCRIPT_NAME');\n }\n }", "protected function determineScriptUrl()\n {\n if ($routePath = GeneralUtility::_GP('route')) {\n $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);\n $this->thisScript = (string)$uriBuilder->buildUriFromRoutePath($routePath);\n } else {\n $this->thisScript = GeneralUtility::getIndpEnv('SCRIPT_NAME');\n }\n }", "protected function determineScriptUrl() {}", "protected function determineScriptUrl() {}", "protected function determineScriptUrl() {}", "function abp01_wrapper_should_serve_script($requestUriPath) {\n return preg_match('/^(\\/wp-content\\/plugins\\/)([^\\/]+)(\\/media\\/js\\/3rdParty\\/leaflet-plugins\\/)(.*)\\/([^\\/]+)\\.js(\\?ver=([a-zA-Z0-9.]+))?$/i', \n $requestUriPath);\n}", "function script_loader_filter ($src) {\n if (FALSE === strpos ($src, 'ajax.googleapis.com')) {\n\treturn $src;\n }\n\n $new_src = explode('?', $src);\n return $new_src[0];\n\n}", "function current_script()\n{\n // Strip down current URL so we can do a simple compare\n global $WHAT_IS_RUNNING_CACHE;\n if ($WHAT_IS_RUNNING_CACHE === null) {\n $script_name = isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : (isset($_ENV['SCRIPT_NAME']) ? $_ENV['SCRIPT_NAME'] : '');\n $stripped_current_url = basename($script_name);\n $WHAT_IS_RUNNING_CACHE = substr($stripped_current_url, 0, strpos($stripped_current_url, '.'));\n }\n return $WHAT_IS_RUNNING_CACHE;\n}", "function scr_is($script)\n{\n return ROUTE[WEBSITE_REQUEST] == $script;\n}", "function getScriptUrl() ;", "function script_url() {\n return $this->request()->script_url();\n }", "protected function detectBasePath()\n {\n $filename = basename(\n $this->request->getServerParams()['SCRIPT_FILENAME']\n );\n $baseUrl = $this->getBaseUrl();\n $basePath = $baseUrl;\n\n // basename() matches the script filename; return the directory\n if (basename($baseUrl) === $filename) {\n $basePath = str_replace('\\\\', '/', dirname($baseUrl));\n }\n return $basePath;\n }", "private function getRequestPath() {\n\t\t// only parse $path once in a request lifetime\n\t\tstatic $path;\n\n\t\tif (isset($path)) {\n\t\t\treturn $path;\n\t\t}\n\n\t\tif (isset($_SERVER['REQUEST_URI'])) {\n\t\t\t// extract the path from REQUEST_URI\n\t\t\t$request_path = strtok($_SERVER['REQUEST_URI'], '?');\n\t\t\t$base_path_len = strlen(rtrim(dirname($_SERVER['SCRIPT_NAME']), '\\/'));\n\n\t\t\t// unescape and strip $base_path prefix, leaving $path without a leading slash\n\t\t\t$path = substr(urldecode($request_path), $base_path_len + 1);\n\n\t\t\t// $request_path is \"/\" on root page and $path is FALSE in this case\n\t\t\tif ($path === FALSE) {\n\t\t\t\t$path = '';\n\t\t\t}\n\n\t\t\t// if the path equals the script filename, either because 'index.php' was\n\t\t\t// explicitly provided in the URL, or because the server added it to\n\t\t\t// $_SERVER['REQUEST_URI'] even when it wasn't provided in the URL (some\n\t\t\t// versions of Microsoft IIS do this), the front page should be served\n\t\t\tif ($path == basename($_SERVER['PHP_SELF'])) {\n\t\t\t\t$path = '';\n\t\t\t}\n\t\t}\n\n\t\treturn $path;\n\t}", "public function generatePage_whichScript() {}", "private function extractCurrentScriptname(){\n $reg = '/^(http|https):\\/\\/(www\\.)?(.*\\/)*(?<script>[\\w]*.php|html|htm).*$/';\n preg_match( $reg, $this->url, $match );\n $this->scriptName = $match['script'];\n $this->urlNoScript = $this->protocol . '://' . $match[3];\n //kint::dump($match);\n return $this;\n }", "public function getContextPath() {\n\t\t$requestURI = $this->getRequestURI();\n\t\t$serverPathInfo = !empty($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '/';\n\t\t$contextPath = substr($requestURI, 0, strrpos($requestURI, $serverPathInfo));\n\n\t\t// Identify if the script name is in the URL (dealing with index.php/path_info)\n\t\tif(strpos($contextPath, $_SERVER['SCRIPT_NAME']) > -1) {\n\t\t\t// The script name is in the request URI\n\t\t\t$script = basename($_SERVER['SCRIPT_NAME']);\n\t\t\t$contextPath = substr($contextPath, 0, strrpos($contextPath, $script));\n\t\t}\n\t\treturn $contextPath;\n\t}", "protected function getUrl() {\r\n $url = \\Nette\\Utils\\Strings::endsWith($this->url, \"/\") ? $this->url : $this->url . \"/\"; \r\n $script = \\Nette\\Utils\\Strings::startsWith($this->script, \"/\") ? $this->script : \"/\" . $this->script; \r\n \r\n return $url . $script;\r\n }", "public function getScriptName() {\n\t\treturn isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : (isset($_SERVER['ORIG_SCRIPT_NAME']) ? $_SERVER['ORIG_SCRIPT_NAME'] : '');\n\t}", "public static function script_name()\r\n\t{\r\n\t\treturn $_SERVER['SCRIPT_NAME'];\r\n }", "public static function getScriptName() {\n if(!isset(self::$scriptName)) {\n // check for built in php server\n if (php_sapi_name() == 'cli-server') {\n self::$scriptName = '';\n } else {\n if(isset($_SERVER['PATH_INFO'])\n && 0 === substr_compare(\n\t\t\t\t\t $_SERVER['PHP_SELF'],\n\t\t\t\t\t $_SERVER['PATH_INFO'],\n - ($len=strlen($_SERVER['PATH_INFO'])))) {\n self::$scriptName = substr($_SERVER['PHP_SELF'],0,-$len);\n } else {\n self::$scriptName = $_SERVER['PHP_SELF'];\n }\n // should be a relative path\n //if(self::$lazyScriptName[0] = '/') {\n // self::$lazyScriptName = substr(self::$lazyScriptName,1);\n //}\n }\n }\n return self::$scriptName;\n\t}", "public function getMainLoad(): string {\n return $this->mainLoad;\n }", "public static function getOurScriptName ()\n\t{\n\t\treturn self::getScriptNameFromUrl( $_SERVER['PHP_SELF'] );\n\t}", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "protected static function getPathThisScript() {}", "public function getOnLoadScript(): ?string;", "public function determineBaseUrl()\n {\n // why this works at all :)\n return dirname($_SERVER['SCRIPT_NAME']);\n }", "protected function getScript()\n {\n if (null === $this->getScriptName()) {\n $request = $this->frontController->getRequest();\n $this->setScriptName($request->getControllerName() . DIRECTORY_SEPARATOR . $request->getActionName());\n }\n\n return $this->getScriptName() . '.' . $this->getViewSuffix();\n }", "function load_script($name)\n{\n\tif(check_filename_security($name)) return \"\";\n\treturn comp_file_get_contents(\"scripts/$name\");\n}", "function url_for($script_path)\n{\n // Add a leading \"/\" if not present\n if ($script_path[0] != '/') {\n $script_path = '/' . $script_path;\n }\n return WWW_ROOT . $script_path;\n}", "function url_for($script_path) {\r\n // add the leading '/' if not present\r\n if($script_path[0] != '/') {\r\n $script_path = \"/\" . $script_path;\r\n }\r\n return WWW_ROOT . $script_path;\r\n}", "public abstract function get_loader_name();", "function _getLoaderUrl (string $path, string $type) {\n\trequire_once _ROOT_PATH.'vendor/autoload.php';\n\tif (is_file($path)) {\n\n\t\t$minifyVarName = 'MINIFY_'.strtoupper($type);\n\t\t$minifyAutoVarName = 'AUTO_UPDATE_MINIFY_'.strtoupper($type);\n\t\t$minifyForceVarName = 'FORCE_UPDATE_MINIFY_'.strtoupper($type);\n\n\t\tif (getConfig($minifyVarName) !== 'true' or str_endsWith($path, 'min.'.$type)) { //Either no minify, or already a minified file\n\t\t\tif ($type == 'js') {\n\t\t\t\treturn script('', str_replace(_ROOT_PATH, _URL, $path));\n\t\t\t} elseif ($type == 'css') {\n\t\t\t\treturn linkTag(str_replace(_ROOT_PATH, _URL, $path), 'stylesheet');\n\t\t\t}\n\t\t}\n\n\t\t$fileName = explode('/', $path);\n\t\t$fileName = $fileName[count($fileName) - 1];\n\t\t$uniqId = md5($path);\n\t\t$fileName = str_removeFromEnd($fileName, '.'.$type);\n\t\t$endPath = $type.'/minified/'.$fileName.'-'.$uniqId.'.min.'.$type;\n\n\t\t$endLocalPath = _ROOT_PATH.$endPath;\n\t\t$endRemotePath = _URL.$endPath;\n\n\t\tif(\n\t\t\t(\n\t\t\t\t(\n\t\t\t\t\t!isMinifiedFileUpToDate($path, $endLocalPath)\n\t\t\t\t\tand getConfig($minifyAutoVarName) === 'true'\n\t\t\t\t)\n\t\t\t\tor\n\t\t\t\t(\n\t\t\t\t\t!is_file($endLocalPath)\n\t\t\t\t)\n\t\t\t)\n\t\t\tor\n\t\t\t\tgetConfig($minifyForceVarName) === 'true'\n\t\t) {\n\n\t\t\tif ($type == 'js') {\n\t\t\t\t$minifier = new \\MatthiasMullie\\Minify\\JS($path);\n\t\t\t} elseif ($type == 'css') {\n\t\t\t\t$minifier = new \\MatthiasMullie\\Minify\\CSS($path);\n\t\t\t}\n\t\t\t$minifier->minify($endLocalPath);\n\t\t\t$info = pathinfo($endLocalPath);\n\t\t\t$metaFile = fopen($info['dirname'].'/checksums/'.$info['filename'].'.meta', 'w');\n\t\t\ttry {\n\t\t\t\tfputs($metaFile, md5_file($path));\n\t\t\t} finally {\n\t\t\t\t@fclose($metaFile);\n\t\t\t}\n\t\t\tif (getConfig(\"VERBOSE\") == \"true\") logInfo('Generated '.str_replace(_ROOT_PATH, '', $endLocalPath).' from '.str_replace(_ROOT_PATH, '', $path));\n\t\t}\n\n\t\tif ($type == 'js') {\n\t\t\treturn script('', $endRemotePath);\n\t\t} elseif ($type == 'css') {\n\t\t\treturn linkTag($endRemotePath, 'stylesheet');\n\t\t}\n\t}\n\treturn \"\";\n}", "function url_for($script_path) {\n\t// adds the leading '/' if it isn't already passed through the argument\n\tif($script_path[0] != '/') {\n\t\t$script_path = \"/\" . $script_path;\n\t}\n\treturn WWW_ROOT . $script_path;\n}", "protected function getQueryPath() {\n\t\tif( !defined( 'BASE_SCRIPT_FILE' ) )\n\t\t\treturn $this->getRequest()->path;\n\t\tif( $this->_QueryPath === null ) {\n\t\t\t$baseScriptFile = basename( BASE_SCRIPT_FILE );\n\t\t\t$pathSegments = $this->getRequest()->path;\n\t\t\tforeach( $pathSegments as $index => $pathSegment ) {\n\t\t\t\tunset( $pathSegments[ $index ] );\n\t\t\t\tif( $pathSegment == $baseScriptFile )\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$this->_QueryPath = array_values( $pathSegments );\n\t\t\tif( $this->_verbose )\n\t\t\t\t$this->set( '_queryPath', $this->_QueryPath );\n\t\t}\n\t\treturn $this->_QueryPath;\n\t}", "function url_for($script_path) {\n //add the leading '/' if not present\n if ($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n }", "function bpb_extended_maybe_load_mentions_scripts( $load = false ) {\n\tif ( empty( $load ) ) {\n\t\t$load = bpb_extended_is_single_item();\n\t}\n\n\treturn $load;\n}", "private static function find_request_path() {\n $path = explode('/', trim($_SERVER['SCRIPT_NAME'], '/'));\n $uri = explode('/', trim($_SERVER['REQUEST_URI'], '/'));\n\n foreach ($path as $key => $val) {\n if (isset($uri[$key])) {\n if ($val == $uri[$key]) {\n unset($uri[$key]);\n } else {\n break;\n }\n } else {\n break;\n }\n }\n\n if (empty($uri[0])) {\n $uri[0] = '__DEFAULT_PAGE__';\n } else {\n //$uri[0] = str_replace(\".php\", \"\", $uri[0]);\n if (($pos = strpos($uri[0], \"?\")) !== FALSE) {\n $uri[0] = substr($uri[0], 0, $pos);\n }\n $uri[0] .= \".php\";\n }\n return $uri;\n }", "protected function get_plugin_path()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $ret = isset($this->my_http_vars['base_url']) ? $this->my_http_vars['base_url'] : dirname($this->get_ajax_base_uri()).'/';\n \n return $ret;\n }", "function find_script($name, $append_keep = false, $base_url_code = 0)\n{\n $append = '';\n if ($append_keep) {\n $keep = symbol_tempcode('KEEP', array('1'));\n $append .= $keep->evaluate();\n }\n\n global $FIND_SCRIPT_CACHE;\n if ($FIND_SCRIPT_CACHE === array()) {\n if (function_exists('persistent_cache_get')) {\n $FIND_SCRIPT_CACHE = persistent_cache_get('SCRIPT_PLACES');\n }\n if ($FIND_SCRIPT_CACHE === null) {\n $FIND_SCRIPT_CACHE = array();\n }\n }\n if (isset($FIND_SCRIPT_CACHE[$name][$append_keep][$base_url_code])) {\n return $FIND_SCRIPT_CACHE[$name][$append_keep][$base_url_code] . $append;\n }\n\n $zones = array(get_zone_name());\n if (!in_safe_mode()) {\n $zones[] = 'data_custom';\n }\n $zones[] = 'data';\n $zones = array_merge($zones, find_all_zones());\n foreach ($zones as $zone) {\n if (is_file(get_file_base() . '/' . $zone . (($zone == '') ? '' : '/') . $name . '.php')) {\n $ret = get_base_url() . '/' . $zone . (($zone == '') ? '' : '/') . $name . '.php';\n $FIND_SCRIPT_CACHE[$name][$append_keep][$base_url_code] = $ret;\n if (function_exists('persistent_cache_set')) {\n persistent_cache_set('SCRIPT_PLACES', $FIND_SCRIPT_CACHE);\n }\n return $ret . $append;\n }\n }\n $ret = get_base_url(($base_url_code == 0) ? null : ($base_url_code == 2)) . '/site/' . $name . '.php';\n $FIND_SCRIPT_CACHE[$name][$append_keep][$base_url_code] = $ret;\n if (function_exists('persistent_cache_set')) {\n persistent_cache_set('SCRIPT_PLACES', $FIND_SCRIPT_CACHE);\n }\n return $ret . $append;\n}", "private static function loadUrl(){\n\n $uri = $_SERVER['REQUEST_URI'];\n\n if (ENCRYPTURL == '1')\n $uri = CR::decrypt($uri);\n\n BASEDIR == '/' || $uri = str_replace(BASEDIR,'', $uri);\n $uri = explode('/', $uri);\n\n array_walk($uri, function(&$item){\n strpos($item, '?') == false ||\n $item = substr($item, 0, strpos($item, '?'));\n });\n\n return $uri;\n }", "protected function detectBaseUrl()\n {\n $filename = $this->request->getServerParams()['SCRIPT_FILENAME'];\n $phpSelf = $this->request->getServerParams()['PHP_SELF'];\n $baseUrl = '/';\n\n $basename = basename($filename);\n if ($basename) {\n $path = ($phpSelf ? trim($phpSelf, '/') : '');\n $basePos = strpos($path, $basename) ?: 0;\n $baseUrl .= substr($path, 0, $basePos) . $basename;\n }\n\n return$baseUrl;\n }", "protected function getScriptUrl()\n {\n return $this->getBaseUrl() . '/' . $this->baseUrl;\n }", "static function getCurrentScriptDir(){\n \n return Strings::ditchLastPiece($_SERVER['SCRIPT_NAME']);\n \n }", "function abp01_wrapper_serve_script() {\n $content = null;\n $contentLength = 0;\n $protocol = $_SERVER['SERVER_PROTOCOL'];\n\n if (!in_array($protocol, array('HTTP/1.1', 'HTTP/2', 'HTTP/2.0'))) {\n $protocol = 'HTTP/1.0';\n }\n\n //See if there's anything to process\n $requestUri = abp01_wrapper_get_file_to_wrap();\n if (!empty($requestUri) && abp01_wrapper_should_serve_script($requestUri)) {\n //Locate script file and see if it's readable\n $wrapFilePath = abp01_wrapper_locate_file_from_uri($requestUri);\n if (!empty($wrapFilePath) && is_readable($wrapFilePath)) {\n $etag = abp01_wrapper_get_script_etag();\n\n if (isset($_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes($_SERVER['HTTP_IF_NONE_MATCH']) === $etag) {\n header($protocol . ' 304 Not Modified');\n die;\n }\n\n //Process content\n $content = abp01_wrapper_process_script($wrapFilePath);\n if (function_exists('mb_strlen')) {\n $contentLength = mb_strlen($content);\n } else {\n $contentLength = strlen($content);\n }\n }\n }\n\n if (!empty($content)) {\n //Spit it out\n header('Etag: ' . $etag);\n header('Content-Type: application/javascript; charset=UTF-8');\n header('Content-Length: ' . $contentLength);\n header('Expires: ' . gmdate('D, d M Y H:i:s', time() + ABP01_WRAPPED_SCRIPT_MAX_AGE) . ' GMT');\n header('Cache-Control: public, max-age=' . ABP01_WRAPPED_SCRIPT_MAX_AGE );\n echo $content;\n } else {\n header($protocol . ' 404 Not Found');\n }\n\n //We done\n die;\n}", "function getPage(){\n $current_location = \"index\";\n if($url_part = array_pop(explode(\"/\", $_SERVER[\"REQUEST_URI\"]))){\n $url_part = array_slice(explode(\".php\", $url_part),0,1);\n if(!empty($url_part)){\n return $url_part[0];\n }\n }\n return $current_location;\n}", "protected function buildCallToScript()\n {\n if (strncasecmp(PHP_OS, 'WIN', 3) == 0) {\n return (new PhpExecutableFinder)->find(false) .\n ' -e -r \"parse_str($_SERVER[\\\"QUERY_STRING\\\"], $_GET); include \\\"' .\n $this->determinedFullPath($this->path) .\n '\\\";\"';\n }\n\n return (new PhpExecutableFinder)->find(false) .\n ' -e -r \\'parse_str($_SERVER[\"QUERY_STRING\"], $_GET); include \"' .\n $this->determinedFullPath($this->path) .\n '\";\\'';\n }", "function url_for($script_path){\r\n // return the absolute path\r\n if($script_path[0] != '/'){\r\n $script_path = \"/\" . $script_path;\r\n }\r\n return WWW_ROOT . $script_path;\r\n}", "public function loadScript(){\n \t\treturn null;\n \t}", "function url_for($script_path) {\n if($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n}", "function url_for($script_path){\n\n if ($script_path[0] != '/') {\n $script_path = '/' . $script_path;\n }\n \n return WWW_ROOT . $script_path;\n \n}", "public function getScriptPath()\n {\n return $this->layout->getView()->getScriptPath();\n }", "public function getCurrentPageScriptName()\n {\n $current_page_file = explode('/', $this->getServerVar('PHP_SELF'));\n if ( empty( $current_page_file ) )\n return '';\n \n $script = end( $current_page_file );\n return basename( $script );\n }", "function urlForPath($script_path)\n{\n // Add the leading '/' if not present\n if ($script_path[0] != '/') {\n $script_path = '/' . $script_path;\n }\n return WWW_ROOT . $script_path;\n}", "function get_site_url() {\n $pu = pathinfo( current_script_url() );\n return $pu['dirname'];\n}", "public function getScriptFile()\n {\n if (file_exists($this->getFolder() . '/script.php')) {\n return $this->getFolder() . '/script.php';\n } elseif (file_exists($this->getFolder() . '/script.html')) {\n return $this->getFolder() . '/script.html';\n } elseif (file_exists($this->getFolder() . '/script.js')) {\n return $this->getFolder() . '/script.js';\n }\n return null;\n }", "public function getScript()\n\t{\n\t\treturn $this->root->script;\n\t}", "public function getViewScript()\n {\n return $this->__get(\"view_script\");\n }", "function wfRequestExtension() {\n\t/// @todo FIXME: this sort of dupes some code in WebRequest::getRequestUrl()\n\tif ( isset( $_SERVER['REQUEST_URI'] ) ) {\n\t\t// Strip the query string...\n\t\tlist( $path ) = explode( '?', $_SERVER['REQUEST_URI'], 2 );\n\t} elseif ( isset( $_SERVER['SCRIPT_NAME'] ) ) {\n\t\t// Probably IIS. QUERY_STRING appears separately.\n\t\t$path = $_SERVER['SCRIPT_NAME'];\n\t} else {\n\t\t// Can't get the path from the server? :(\n\t\treturn '';\n\t}\n\n\t$period = strrpos( $path, '.' );\n\tif ( $period !== false ) {\n\t\treturn strtolower( substr( $path, $period ) );\n\t}\n\treturn '';\n}", "function GetCurrentPagePath()\r\n{\r\n\t$sPHPSelf = $_SERVER['QUERY_STRING']; \r\n\t$sCurrentPagePath = StripQEquals($sPHPSelf);\r\n\treturn $sCurrentPagePath;\r\n}", "public function get_script()\n\t{\n\t\tif ( isset($this->obj->script) ){\n\t\t\treturn $this->obj->script;\n\t\t}\n\t\treturn '';\n\t}", "public function getScriptUrl()\n {\n return $this->thisScript;\n }", "public function getViewScriptPathSpec()\n {\n return $this->_viewScriptPathSpec;\n }", "static function getScriptPath() {\n\t\treturn self::$_ScriptPath;\n\t}", "function getLocalSchemesLocation($script_location) {\n\t$lastslashpos = strrpos($script_location, '/');\n\t$location = substr($script_location, 0, $lastslashpos);\n\t$secondlastpos = strrpos($location, '/');\n\t$location = substr($location, 0, $secondlastpos + 1);\n\treturn $location;\n}", "function url_for($script_path) {\n\t\t// add the leading '/' if not present\n\t\tif($script_path[0] != '/') {\n\t\t\t$script_path = '/'. $script_path;\n\t\t}\n\t\treturn WWW_ROOT . $script_path;\n\t}", "function load($loadfile = '')\n\t{\n\t\t$this->output->enable_profiler(FALSE);\n\n\t\t$file = '';\n\t\t$cp_theme = $this->input->get_post('theme');\n\t\t$package = $this->input->get_post('package');\n\n\t\t// trying to load a specific js file?\n\t\t$loadfile = $this->input->get_post('file');\n\t\t$loadfile = $this->security->sanitize_filename($loadfile, TRUE);\n\n\t\tif ($loadfile == 'ext_scripts')\n\t\t{\n\t\t\treturn $this->_ext_scripts();\n\t\t}\n\n\t\tif ($package && $loadfile)\n\t\t{\n\t\t\t$file = PATH_THIRD.$package.'/javascript/'.$loadfile.'.js';\n\t\t}\n\t\telseif ($loadfile == '')\n\t\t{\n\t\t\tif (($plugin = $this->input->get_post('plugin')) !== FALSE)\n\t\t\t{\n\t\t\t\t$plugin = ee()->security->sanitize_filename($plugin);\n\t\t\t\t$file = PATH_JAVASCRIPT.'jquery/plugins/'.$plugin.'.js';\n\t\t\t}\n\t\t\telseif (($ui = $this->input->get_post('ui')) !== FALSE)\n\t\t\t{\n\t\t\t\t$ui = ee()->security->sanitize_filename($ui);\n\t\t\t\t$file = PATH_JAVASCRIPT.'jquery/ui/jquery.ui.'.$ui.'.js';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$file = PATH_JAVASCRIPT.$loadfile.'.js';\n\t\t}\n\n\t\tif ( ! $file OR ! file_exists($file))\n\t\t{\n\t\t\tif ($this->config->item('debug') >= 1)\n\t\t\t{\n\t\t\t\t$this->output->fatal_error(lang('missing_jquery_file'));\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\n\t\t// Can't do any of this if we're not allowed\n\t\t// to send any headers\n\n\t\t$this->javascript_loader->set_headers($file);\n\n\t\t// Grab the file, content length and serve\n\t\t// it up with the proper content type!\n\n\t\t$contents = file_get_contents($file);\n\n\t\t$this->output->set_header('Content-Length: '.strlen($contents));\n\t\t$this->output->set_output($contents);\n\t}", "function load_scripts($scripts_to_load)\r\n\t{\r\n\t\tglobal $available_scripts;\r\n\r\n\t\t$scripts_to_load = array_unique($scripts_to_load);\r\n\r\n\t\tforeach($scripts_to_load as $script_key => $script_to_load)\r\n\t\t{\r\n\t\t\tif (is_array($available_scripts[$script_to_load]))\r\n\t\t\t{\r\n\t\t\t\tforeach ($available_scripts[$script_to_load] as $child_key => $child_to_load)\r\n\t\t\t\t{\r\n\t\t\t\t\tsubstr($available_scripts[$script_to_load][$child_key], 0, 4) == 'http' ? $root_path = '' : $root_path = ROOT_PATH;\r\n\t\t\t\t\techo '<script type=\"text/javascript\" src=\"' . $root_path . $available_scripts[$script_to_load][$child_key] . '\"></script>' . \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsubstr($available_scripts[$script_to_load], 0, 4) == 'http' ? $root_path = '' : $root_path = ROOT_PATH;\r\n\t\t\t\techo '<script type=\"text/javascript\" src=\"' . $root_path . $available_scripts[$script_to_load] . '\"></script>' . \"\\n\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "function url_for($script_path){\n\nif($script_path[0] != '/'){\n \n $script_path = \"/\" . $script_path;\n}\n\n//echo WWW_ROOT .$script_path;\n\n\nreturn WWW_ROOT . $script_path;\n\n}", "public static function script( $just_route = false )\n\t{\n\t\tif($just_route)\n\t\t\treturn self::$route;\n\t\n\t\treturn self::$route. '/' . self::$hook;\n\t}", "static function getUrl() {\n\t\t$host = env('HTTP_HOST');\n\t\t$script_filename = env('SCRIPT_FILENAME');\n\t\t$isshell = (strpos($script_filename, 'console')!==false);\n\t\t$envExtended = \"\";\n\t\tif ($isshell) {\n\t\t\t$envExtended = preg_replace('#[^a-zA-Z0-9]#', '', env('SCRIPT_FILENAME'));\n\t\t}\n\t\t$check_order = array(\n\t\t\t'REQUEST_URI',\n\t\t\t'QUERY_STRING'\n\t\t);\n\t\tforeach ($check_order as $key) {\n\t\t\tif (isset($_SERVER[$key]) && !empty($_SERVER[$key])) {\n\t\t\t\treturn $_SERVER[$key] . $envExtended;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "function wantedSection() {\n $urlParts = $this->_getPathUrl();\n return $urlParts[$this->sectionOffset];\n }", "function smash_filter_script_loader_src( $src, $handle ) {\n\n\t$scripts = wp_scripts();\n\n\tif ( $handle === 'comment-reply' ) {\n\n\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array(\n\t\t\t'loadjs' => array(\n\t\t\t\t'async' => TRUE,\n\t\t\t\t'onLoad' => TRUE\n\t\t\t)\n\t\t);\n\t} else if ( $handle === 'wp-embed' ) {\n\t\t// @issue https://github.com/inpsyde/smashing-magazin/issues/440\n\t\t// Adding ABSPATH to src, otherwhise the file_get_contents will fail.\n\t\t$scripts->registered[ $handle ]->src = ABSPATH . $scripts->registered[ $handle ]->src;\n\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array( 'inlinejs' => TRUE );\n\t} else if ( function_exists( '\\CloudFour\\ServiceWorkerManager\\get_config' ) ) {\n\t\t$config = \\CloudFour\\ServiceWorkerManager\\get_config();\n\t\tif ( $handle === $config[ 'serviceWorkerRegistrationHandle' ] ) {\n\t\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array(\n\t\t\t\t'inlinejs' => TRUE\n\t\t\t);\n\t\t}\n\t}\n\n\treturn $src;\n}", "public function getScript(): string\n {\n return $this->script;\n }", "public function loadScripts() {\n $graphcss = $this->getProperty('graphcss');\n $customcss = $this->getProperty('customcss');\n $loadjquery = $this->getProperty('loadjquery');\n\n $cssUrl = $this->sekug->config['cssUrl'].'web/';\n $jsUrl = $this->sekug->config['jsUrl'].'web/';\n\n if($loadjquery == 1){\n $this->modx->regClientStartupScript($jsUrl.'libs/'.$this->sekug->config['jqueryFile']);\n }\n if($customcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$customcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'gallery.structure.css');\n }\n if($graphcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$graphcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'directory.graph.css');\n }\n }", "protected function load_script($script_name = null)\n {\n if ($this->script_name !== null) {\n return 0;\n }\n\n $list = $this->list_scripts();\n $master = $this->rc->config->get('managesieve_kolab_master');\n $included = array();\n\n $this->script_name = false;\n\n // first try the active script(s)...\n if (!empty($this->active)) {\n // Note: there can be more than one active script on KEP:14-enabled server\n foreach ($this->active as $script) {\n if ($this->sieve->load($script)) {\n foreach ($this->sieve->script->as_array() as $rule) {\n if (!empty($rule['actions'])) {\n if ($rule['actions'][0]['type'] == 'vacation') {\n $this->script_name = $script;\n return 0;\n }\n else if (empty($master) && $rule['actions'][0]['type'] == 'include') {\n $included[] = $rule['actions'][0]['target'];\n }\n }\n }\n }\n }\n\n // ...else try scripts included in active script (not for KEP:14)\n foreach ($included as $script) {\n if ($this->sieve->load($script)) {\n foreach ($this->sieve->script->as_array() as $rule) {\n if (!empty($rule['actions']) && $rule['actions'][0]['type'] == 'vacation') {\n $this->script_name = $script;\n return 0;\n }\n }\n }\n }\n }\n\n // try all other scripts\n if (!empty($list)) {\n // else try included scripts\n foreach (array_diff($list, $included, $this->active) as $script) {\n if ($this->sieve->load($script)) {\n foreach ($this->sieve->script->as_array() as $rule) {\n if (!empty($rule['actions']) && $rule['actions'][0]['type'] == 'vacation') {\n $this->script_name = $script;\n return 0;\n }\n }\n }\n }\n\n // none of the scripts contains existing vacation rule\n // use any (first) active or just existing script (in that order)\n if (!empty($this->active)) {\n $this->sieve->load($this->script_name = $this->active[0]);\n }\n else {\n $this->sieve->load($this->script_name = $list[0]);\n }\n }\n\n return $this->sieve->error();\n }", "public function getJSHandlerScript() {\n $CI = & get_instance();\n $scripturl = str_replace(\"http:\", \"\", $CI->config->item('base_url')) . \"js/bt_event_tracker.js\";\n $code = sprintf(\"$.ajaxSetup({cache:true});$.getScript('%s');\",$scripturl);\n return $code;\n }", "public static function getScriptUri($qualified = false)\n {\n if (!empty($_SERVER['REQUEST_URI'])) {\n return $qualified ? self::getBaseUri() . '/' . ltrim(\n $_SERVER['REQUEST_URI'],\n '/'\n ) : $_SERVER['REQUEST_URI'];\n }\n if (!empty($_SERVER['REDIRECT_URL'])) {\n return $qualified ? self::getBaseUri() . '/' . ltrim(\n $_SERVER['REDIRECT_URL'],\n '/'\n ) : $_SERVER['REDIRECT_URL'];\n }\n $queryString = '';\n if (!empty($_SERVER['QUERY_STRING'])) {\n $queryString = $_SERVER['QUERY_STRING'];\n } else if (!empty($_SERVER['REDIRECT_QUERY_STRING'])) {\n $queryString = $_SERVER['REDIRECT_QUERY_STRING'];\n }\n $queryString = '?' . htmlspecialchars($queryString);\n $phpSelf = '';\n if (!empty($_SERVER['PHP_SELF'])) {\n $phpSelf = $_SERVER['PHP_SELF'];\n } else if (!empty($_SERVER['SCRIPT_NAME'])) {\n $phpSelf = $_SERVER['SCRIPT_NAME'];\n }\n if ($phpSelf) {\n return $qualified ? self::getBaseUri() . '/' . ltrim(\n $phpSelf . $queryString,\n '/'\n ) : $phpSelf . $queryString;\n }\n return '';\n }", "public function getSnippetLoader()\n {\n if (! $this->snippetLoader) {\n $this->loadSnippetLoader();\n }\n\n return $this->snippetLoader;\n }", "protected function determineRequestedPagePath()\r\n\t{\r\n\t\t$pagePath=$this->getRequest()->getServiceParameter();\r\n\t\tif(empty($pagePath))\r\n\t\t\t$pagePath=$this->getDefaultPage();\r\n\t\treturn $pagePath;\r\n\t}", "public function getWidgetScript() {\n //$vIsHasLHCAccount = $vCurrentSession->getValue('isHasLHCAccount');\n //if (!$vIsHasLHCAccount) {\n $script = $this->fillChatWidget();\n // }\n return isset($script) === true ? $script: false ;\n }", "static function getScriptRelativePath() {\n\t\treturn self::$_ScriptRelativePath;\n\t}", "public static function getBasePath() {\n\t \tif(!isset(self::$basePath)) {\n\t \t\t$script = self::getScriptName();\n\t \t\tself::$basePath = substr (\n\t \t\t\t\t$script,\n\t \t\t\t\t0,\n\t \t\t\t\tstrrpos($script, '/' ));\n\t \t}\n\t \treturn self::$basePath;\n\t }", "public function getMainScriptPath()\n {\n if (isset($this->raw->main)) {\n return Path::canonical($this->raw->main);\n }\n\n return null;\n }", "public function retrieveFile()\n\t{\n\t\t// We're gonna hide it.\n\t\t$no_check_files = array('async-upload.php');\n\t\t$no_check_files = apply_filters('no_check_files', $no_check_files);\n\t\t\n\t\t$script_filename = empty($_SERVER['SCRIPT_FILENAME'])\n\t\t\t? $_SERVER['PATH_TRANSLATED']\n\t\t\t: $_SERVER['SCRIPT_FILENAME'];\n\t\t$explode = explode('/', $script_filename );\n\t\treturn end( $explode );\n\t}", "public function getIncludeScripts() {\n return array('http://maps.google.com/maps/api/js?sensor='\n . ($this->locatesUser ? 'true' : 'false'));\n }", "protected function getTemplateScript(){\n \tif($this->_renderLayout == 1) {\n \t\treturn '/sitetemplate/_frontend.phtml';\n \t}elseif($this->_renderLayout == 2) {\n \t\treturn '/sitetemplate/_simple.phtml';\n \t}else {\n \t\treturn 'default';\n \t}\n }", "public function getScriptDirectory()\n\t{\n\t\t$parent = explode('/', $_SERVER['SCRIPT_NAME']);\n\t\treturn sizeof($parent) > 2 ? $parent[1] . \"/\" : false;\n\t}", "function script_name() {\n $protocol = 'http';\n if ( ( isset($_SERVER['HTTPS']) &&\n\t ($_SERVER['HTTPS'] == 'on') ) ||\n\t ( $_SERVER['SERVER_PORT'] == '443' ) ) {\n $protocol = 'https';\n }\n // return $protocol.'://' . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];\n return $protocol.'://www.oulunetelaisenpuuyritykset.com' . $_SERVER['SCRIPT_NAME'];\n}", "function getParam($str)\r\n\t{\r\n\t\t$pos =strpos($str, $this->_BASEURL);\r\n\r\n\t\tif ($pos < 0)\r\n\t\t\treturn null;\r\n\r\n\t\t$temp = explode($this->_BASEURL.\"index.php\", $str);\r\n\r\n\t\tif (count($temp) == 2)\r\n\t\t{\r\n\t\t\t$p = $temp[1];\r\n\r\n\t\t\t//file check\r\n\t\t\tif (strpos(strtolower($p), \".\") > -1)\r\n\t\t\t\treturn null;\r\n\r\n\t\t\tif (strlen($p) == 0)\r\n\t\t\t\treturn \"Default\";\r\n\r\n\t\t\t$p = substr($p, -1,1) == \"/\" ? substr($p, 0, -1):$p;\r\n\t\t\t\r\n\t\t\treturn substr($p, 0, 1) == \"/\" ? substr($p, 1):$p;\r\n\t\t}\r\n\r\n\t}", "function load($loadfile = '')\r\n\t{\r\n\t\t$this->output->enable_profiler(FALSE);\r\n\t\t\r\n\t\t$file = '';\r\n\t\t$contents = '';\t\t// needed for css parsing\r\n\r\n\t\t// trying to load a specific js file?\r\n\t\t$loadfile = ($loadfile) ? $loadfile : $this->input->get_post('file');\r\n\t\t$package = $this->input->get_post('package');\r\n\t\t\r\n\t\t$loadfile = $this->security->sanitize_filename($loadfile, TRUE);\r\n\t\t\r\n\t\tif ($loadfile == 'ext_scripts')\r\n\t\t{\r\n\t\t\treturn $this->_ext_scripts();\r\n\t\t}\r\n\t\t\r\n\t\tif ($package && $loadfile)\r\n\t\t{\r\n\t\t\t$file = PATH_THIRD.$package.'/javascript/'.$loadfile.'.js';\r\n\t\t}\r\n\t\telseif ($loadfile == 'jquery')\r\n\t\t{\r\n\t\t\t$file = PATH_JQUERY.'jquery.js';\r\n\t\t}\r\n\t\telseif ($loadfile == '')\r\n\t\t{\r\n\t\t\tif (($plugin = $this->input->get_post('plugin')) !== FALSE)\r\n\t\t\t{\r\n\t\t\t\t$file = PATH_JQUERY.'plugins/'.$plugin.'.js';\r\n\t\t\t}\r\n\t\t\telseif (($ui = $this->input->get_post('ui')) !== FALSE)\r\n\t\t\t{\r\n\t\t\t\t$file = PATH_JQUERY.'ui/jquery.ui.'.$ui.'.js';\r\n\t\t\t}\r\n\t\t\telseif (($effect = $this->input->get_post('effect')) !== FALSE)\r\n\t\t\t{\r\n\t\t\t\t$file = PATH_JQUERY.'ui/jquery.effect.'.$effect.'.js';\r\n\t\t\t}\r\n\t\t}\r\n\t\telseif ($loadfile == 'css')\r\n\t\t{\r\n\t\t\t$contents = 'css';\r\n\t\t\t\r\n\t\t\t$css_paths = array(\r\n\t\t\t\tPATH_CP_THEME.$this->session->userdata('cp_theme').'/',\r\n\t\t\t\tPATH_CP_THEME.'default/'\r\n\t\t\t);\r\n\r\n\t\t\tif ($this->session->userdata('cp_theme') == 'default')\r\n\t\t\t{\r\n\t\t\t\tarray_shift($css_paths);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tforeach ($css_paths as $a_path)\r\n\t\t\t{\r\n\t\t\t\t$file = $a_path.'css/advanced.css';\r\n\t\t\t\t\r\n\t\t\t\tif (file_exists($file))\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ($this->config->item('use_compressed_js') == 'n')\r\n\t\t\t{\r\n\t\t\t\t$file = PATH_THEMES.'javascript/src/'.$loadfile.'.js';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$file = PATH_THEMES.'javascript/compressed/'.$loadfile.'.js';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( ! $file OR ! file_exists($file))\r\n\t\t{\r\n\t\t\tif ($this->config->item('debug') >= 1)\r\n\t\t\t{\r\n\t\t\t\t$this->output->fatal_error(lang('missing_jquery_file'));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Can't do any of this if we're not allowed\r\n\t\t// to send any headers\r\n\r\n\t\t$this->_set_headers($file);\r\n\r\n\t\t// Grab the file, content length and serve\r\n\t\t// it up with the proper content type!\r\n\r\n\t\tif ($contents == 'css')\r\n\t\t{\r\n\t\t\t// File exists and not in client cache - reparse\r\n\t\t\t$contents = $this->_css_javascript($file);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$contents = file_get_contents($file);\r\n\t\t}\r\n\r\n\t\t$this->output->set_header('Content-Length: '.strlen($contents));\r\n\t\t$this->output->set_output($contents);\r\n\t}", "function getResponseScript() {\n return $this->responseScript;\n }", "protected function processPath(Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\r\n // For prefix matching, match on the path info (if any)\r\n// $path = (string) $request->getAttribute(self::INCLUDE_PATH_INFO);\r\n// if ($path == null) {\r\n $path = $request->getPathInfo();\r\n// }\r\n// if (($path != null) && (strlen($path) > 0)) {\r\n// return ($path);\r\n// }\r\n\r\n // For extension matching, strip the module prefix and extension\r\n// $path = (string) $request->getAttribute(self::INCLUDE_SERVLET_PATH);\r\n// if ($path == null) {\r\n// $path = $request->getServletPath();\r\n// }\r\n $prefix = $this->moduleConfig->getPrefix();\r\n if (substr($path, 0, strlen($prefix)) != $prefix) {\r\n $msg = $this->getInternal()->getMessage(\"processPath\", $request->getRequestURI());\r\n self::$log->error($msg);\r\n $response->sendError(Aloi_Serphlet_Application_HttpResponse::SC_BAD_REQUEST, $msg);\r\n return null;\r\n }\r\n \r\n // TODO: Add back in support for servlet path\r\n $path = substr($path, strlen($prefix));\r\n $period = strrpos($path, \".\");\r\n if (($period >= 0) && $period !== false) {\r\n $path = substr($path, 0, $period);\r\n }\r\n \r\n return ($path);\r\n\t}", "function url_request(): string\n{\n return url_site() . input_server('REQUEST_URI');\n}" ]
[ "0.6509899", "0.6459832", "0.6218809", "0.62173134", "0.62173134", "0.6040857", "0.596594", "0.5779705", "0.57656604", "0.57189816", "0.5711656", "0.5605619", "0.55458105", "0.5528049", "0.5478998", "0.545794", "0.5443625", "0.5394417", "0.534232", "0.5338597", "0.53303725", "0.5289252", "0.5287612", "0.5287612", "0.5287612", "0.5287612", "0.5287612", "0.5287612", "0.5287612", "0.5287612", "0.52866507", "0.5261081", "0.5251257", "0.52376574", "0.52163243", "0.5214984", "0.52130216", "0.52101773", "0.5206793", "0.5180017", "0.517375", "0.51711124", "0.5170394", "0.51659495", "0.5148647", "0.5148149", "0.51466316", "0.5142951", "0.5142449", "0.5139295", "0.5135347", "0.51239014", "0.51149255", "0.5113544", "0.5108951", "0.5103201", "0.50818616", "0.5077205", "0.50751", "0.50694096", "0.5067729", "0.50562453", "0.50509435", "0.5035202", "0.50300366", "0.50294185", "0.5017427", "0.50040364", "0.49831814", "0.49829906", "0.4927584", "0.49165854", "0.4894664", "0.4891832", "0.48861495", "0.48858437", "0.48848876", "0.48773184", "0.48764172", "0.48713613", "0.48683438", "0.48636273", "0.48558542", "0.4855124", "0.48507032", "0.48432976", "0.48425683", "0.48396558", "0.4837752", "0.48343545", "0.4833044", "0.48168802", "0.48144916", "0.48109606", "0.48017237", "0.47927004", "0.47867212", "0.47842932", "0.47790202", "0.4771368" ]
0.6415804
2
Tests whether the given requrest URI path matches an allowed pattern, to avoid serving only some files we deem fit
function abp01_wrapper_should_serve_script($requestUriPath) { return preg_match('/^(\/wp-content\/plugins\/)([^\/]+)(\/media\/js\/3rdParty\/leaflet-plugins\/)(.*)\/([^\/]+)\.js(\?ver=([a-zA-Z0-9.]+))?$/i', $requestUriPath); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkURI()\n {\n // init vars\n $result = false;\n $uri = $this->getURI();\n $routesArray = $this->routes;\n\n // get existed rule for user requested uri\n foreach ($routesArray as $rulePattern => $path) {\n if (preg_match(\"~$rulePattern~i\", $uri)) {\n $result = [$rulePattern, $path];\n return $result;\n }\n }\n }", "function url_allowed ($url)\n{\n\trequire (\"url_handling_parameters.php\");\n\t\n\tif (eregiArray($url_forbidden,$url)) return false;\n\telse return true;\n}", "public function path_matches($request_path)\n {\n }", "public function testRouteDoesNotMatchResourceWithWildcard()\n {\n $resource = '/hello';\n $route = new \\Slim\\Route('/hello/:path+', function () {});\n $result = $route->matches($resource);\n $this->assertFalse($result);\n $this->assertEquals(array(), $route->getParams());\n }", "public function customFileDenyPatternConfigured(): bool\n {\n return $this->fileDenyPattern !== self::DEFAULT_FILE_DENY_PATTERN;\n }", "public function requestPathMatches($requestPath, $pattern) {\n return preg_match($this->translatePatternToRegex($pattern), $requestPath) !== 0;\n }", "static public function supports($path);", "public function match($uri);", "protected function matches($pattern)\n {\n if (empty($pattern)) {\n return false;\n }\n $uri = $this->requestedUri->getUri();\n return preg_match($this->toRegExp($pattern), $uri) > 0;\n }", "abstract protected function isValidUri(): bool;", "public function match ($uri);", "private function shouldProcess($path) {\n\n //Handle something special\n return true;\n\n }", "private function isValidUri(): bool\n {\n return true;\n }", "public function test_match_fromInvalidPatternWithoutVars()\n {\n $route = new Route('GET', '/home', 'test');\n $this->assertFalse(\n $route->match('GET', '/test'),\n 'match() must return true if URI pattern provided is the same as the one specified in constructor.'\n );\n }", "public function missingImportantPatterns(): bool\n {\n $defaultParts = explode('|', self::DEFAULT_FILE_DENY_PATTERN);\n $givenParts = explode('|', $this->fileDenyPattern);\n $missingParts = array_diff($defaultParts, $givenParts);\n return !empty($missingParts);\n }", "protected function shouldPathStringCauseRouteMatch($path)\r\n {\r\n // Only consider a request to be matched when not using 'matchall'\r\n return !$this->pathIsNull($path);\r\n }", "public function isValidPath( string $path ) : bool {\n\t\treturn ( preg_match( ((object) self::$REGEX)->path, $path ) ) ? true : false ;\n\t}", "private function isValidFullPath($path)\n {\n $valid = false;\n\n // TODO: Handle network shares?\n if (1 === preg_match('/^[a-z]+:\\\\\\\\/i', $path) && is_file($path)) {\n $valid = true;\n }\n\n return $valid;\n }", "private function allowedPath(array $path)\n {\n \n $findParam = $this->findRequestParam();\n \n $param1 = (is_array($findParam) && array_key_exists(0, $findParam)) ? $findParam[0] : '';\n \n if (!(in_array($this->findRequestPath(0), $path, true) || (in_array($param1, $path, true)))) {\n\n return false; \n \n } else {\n\n return true;\n\n }\n\n }", "function validateUri($uri);", "private function matchURL($request)\n {\n $uri = explode('/', $this->uri);\n $request_ = explode('/', $request);\n\n if (count($uri) !== count($request_)) {\n return false;\n }\n\n foreach ($uri as $k => $v):\n if (preg_match($this->regex, $v)) {\n unset($uri[$k]);\n unset($request_[$k]);\n }\n endforeach;\n return empty(array_diff($request_, $uri));\n }", "public function accept(): bool\n {\n return (!$this->isFile() || preg_match($this->regex, $this->getFilename()));\n }", "public function testRouteMatchesResourceWithWildcard()\n {\n $resource = '/hello/foo/bar/world';\n $route = new \\Slim\\Route('/hello/:path+/world', function () {});\n $result = $route->matches($resource);\n $this->assertTrue($result);\n $this->assertEquals(array('path'=>array('foo', 'bar')), $route->getParams());\n }", "public function match(FilterableUri $uri)\n {\n $ext = pathinfo(parse_url($uri->toString(),PHP_URL_PATH),PATHINFO_EXTENSION);\n\n if (in_array(strtolower($ext), $this->ext)) {\n $uri->setFiltered(true, 'On restricted extension list');\n return true;\n }\n\n return false;\n }", "protected function is_valid_path($path) {\n $rp_substr = substr(realpath($path) . DIRECTORY_SEPARATOR, 0, strlen(realpath($this->path_to_files))) . DIRECTORY_SEPARATOR;\n $rp_files = realpath($this->path_to_files) . DIRECTORY_SEPARATOR;\n\n // handle better symlinks & network path - issue #448\n $pattern = ['/\\\\\\\\+/', '/\\/+/'];\n $replacement = ['\\\\\\\\', '/'];\n $rp_substr = preg_replace($pattern, $replacement, $rp_substr);\n $rp_files = preg_replace($pattern, $replacement, $rp_files);\n $match = ($rp_substr === $rp_files);\n\n if (!$match) {\n Log::info('Invalid path \"' . $path . '\"');\n Log::info('real path: \"' . $rp_substr . '\"');\n Log::info('path to files: \"' . $rp_files . '\"');\n }\n return $match;\n }", "public function match($url){\n $url = trim($url, '/');\n $path = preg_replace('#:([\\w]+)#', '([^/]+)', $this->path);\n $regex = \"#^$path$#i\";\n if(!preg_match($regex, $url, $matches)){\n return false;\n }\n array_shift($matches);\n $this->matches = $matches;\n return true;\n }", "protected function getFileDenyPatternStatus() {}", "function isAllowedFile($file) {\n\t\t$path = pathinfo($file);\n\t\t$dir = preg_replace('#[\\./]*(.*)/*#', '$1', $path['dirname']);\n\t\t$file = $path['basename'];\n\t\tif ($dir == '' && $file == '.htaccess') return true;\n\t\tif ($dir == '' && $file == 'index.php') return true;\n\t\tif ($dir == '' && $file == 'documentation.txt') return true;\n\t\tif ($dir == 'data' && $file == 'hypha.html') return true;\n\t\tif ($dir == 'data' && $file == 'hypha.css') return true;\n\t\tif ($dir == 'system/core') return true;\n\t\tif ($dir == 'system/datatypes') return true;\n\t\tif ($dir == 'system/languages') return true;\n\t\tif ($dir == 'system/php-dom-wrapper') return true;\n\t\tif ($dir == 'system/wymeditor') return true;\n\t\treturn false;\n\t}", "function wp_match_mime_types($wildcard_mime_types, $real_mime_types)\n {\n }", "public function shouldRespondTo($filename, $media_range = null)\n {\n // If no media range is passed, evalute http header \"Accept\"\n if ($media_range === null && isset($_SERVER['ACCEPT'])) {\n $media_range = reset(explode(';', $_SERVER['ACCEPT']));\n }\n\n // Test if either the filename has the appropriate extension or\n // if the client accepts the content type\n return ($this->extension() && fnmatch('*' . $this->extension(), $filename))\n || ($media_range && fnmatch($media_range, $this->contentType()));\n }", "public function test_match_fromPatternWithoutVars()\n {\n $route = new Route('GET', '/home', 'test');\n $this->assertTrue(\n $route->match('GET', '/home'),\n 'match() must return true if URI pattern provided is the same as the one specified in constructor.'\n );\n }", "public function fileDenyPatternMatchesPhpExtensionDataProvider() {}", "protected static function isPermittedPath($path)\n {\n }", "function iis7_rewrite_rule_exists($filename)\n {\n }", "public function validatepathAction()\r\n {\r\n $helper = Mage::helper('link');\r\n $response = array(\r\n 'status' => 'error',\r\n 'message' => 'unknown',\r\n );\r\n\r\n try {\r\n $path = $this->getRequest()->getParam('request_path');\r\n\r\n // Check against CMS pages\r\n if (Mage::getSingleton('cms/page')->checkIdentifier($path, Mage::app()->getStore()->getStoreId())) {\r\n $response['status'] = 'warning';\r\n $response['message'] = $helper->__('Potential conflict detected: a CMS page with this identifier already exists.');\r\n } else if ($this->_checkUrlRewrite($path)) { // Check against URL rewrites\r\n $response['status'] = 'warning';\r\n $response['message'] = $helper->__('Potential conflict detected: a URL rewrite with this path already exists.');\r\n } else {\r\n $response['status'] = 'success';\r\n $response['message'] = $helper->__('Request path is unique in the system.');\r\n }\r\n } catch (Exception $error) {\r\n $response['status'] = 'error';\r\n $response['message'] = $error->getMessage();\r\n }\r\n\r\n $this->getResponse()\r\n ->setHeader('Content-type', 'application/json')\r\n ->setBody(Mage::helper('core')->jsonEncode($response));\r\n }", "protected function is_service_allowed($path) {\n\t\treturn true;\n\t}", "private function isInIgnoredUris(Route $route)\n {\n return $this->checkPatterns(\n $route->uri(), $this->getConfig('routes.ignore.uris', [])\n );\n }", "private function _doDirectMatch(array $path) {}", "function block_url_and_email($str)\n\t{\n\t\treturn ( preg_match(\"/[\\w\\[@\\]&.%*-]+\\.[\\w*.]*[\\w-*]{2,}\\/?/\", $str)) ? FALSE : TRUE;\n\t}", "public function matches($input) {\n\t\t$matches = [];\n\t\tif (preg_match('#' . $this->regex . '#u', ltrim(parse_url($input, PHP_URL_PATH), '/'), $matches)) {\n\t\t\treturn array_slice($matches, 1);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isValidPath($path)\n\t{\n\t\treturn $this->getPath() == rtrim($path,'/').'/';\n\t}", "private function check_path()\n\t{\n\t\t$ar = func_get_args();\n\t\tforeach ( $ar as $a ){\n\t\t\tif ( !is_string($a) ||\n (strpos($a,'./') !== false) ||\n (strpos($a,'/') === 0) ){\n\t\t\t\tdie(\"The path $a is not an acceptable value\");\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}", "public function match(Request $request, &$params=array())\n {\n $params = array();\n $matchUri = $request->uri;\n\n foreach ($this->routines as $routine)\n if ($routine instanceof IgnorableFileExtension)\n $matchUri = preg_replace('#(\\.[\\w\\d-_.~\\+]+)*$#', '',\n $request->uri);\n\n if (!preg_match($this->regexForMatch, $matchUri, $params))\n return false;\n\n array_shift($params);\n\n if (false !== stripos($this->pattern, '/**') && false !== stripos(end($params), '/')) {\n $lastParam = array_pop($params);\n $params[] = explode('/', ltrim($lastParam, '/'));\n }\n elseif (false !== stripos($this->pattern, '/**') && !isset($params[0]))\n $params[] = array(); // callback expects a parameter give it\n\n return true;\n }", "protected function validatePath($path) {\n // Absolute local file paths are invalid.\n if (\\Drupal::service('file_system')->realpath($path) == $path) {\n return FALSE;\n }\n // A path relative to the Drupal root or a fully qualified URI is valid.\n if (is_file($path)) {\n return $path;\n }\n // Prepend 'public://' for relative file paths within public filesystem.\n if (\\Drupal::service('file_system')->uriScheme($path) === FALSE) {\n $path = 'public://' . $path;\n }\n if (is_file($path)) {\n return $path;\n }\n return FALSE;\n }", "protected function checkTrustedHostPattern() {}", "public function isValidUrlInvalidRessourceDataProvider() {}", "public static function requestIs($pattern) {\n\n $pattern = config('admin.routes.prefix') . '/' . $pattern;\n\n return request()->is($pattern);\n }", "function check_crawl_url($url) {\n\tforeach($GLOBALS['eregi_url_blacklist'] as $black_url) {\n\t\tif(eregi($black_url, $url)) return(0);\n\t}\n\tif(in_array($url, $GLOBALS['url_db'])) return(0);\n\tif(!file_size_check($url, $GLOBALS['maximum_file_size'])) return(0);\n\tforeach($GLOBALS['eregi_url_whitelist'] as $white_url) {\n\t\tif(eregi($white_url, $url)) return(1);\n\t}\n\treturn(1); //1 == disable whitelisting, 0 == enable whitelisting\n}", "function url_analyze ($url)\n{\n\trequire (\"url_handling_parameters.php\");\n\n\t// return-values:\n\t// 0 = url is not allowed, unable to handle\n\t// 1 = url is ok -> make picture\n\t// 2 = url is email\n\t// 3 = url is downloadable file\n\n\t\n\t// allowed?\n\tif (eregiArray($url_forbidden,$url)) return 0;\n\t// email\n\tif (eregiArray($url_email,$url)) return 2; \n\t// downloadable files\n\telseif (eregiArray($url_download,$url)) return 3;\n\t// allowed url\n\telseif (eregiArray($url_allowed,$url)) return 1;\n\t\n\telse return 0;\n}", "function matchUrl( $url ) {\n\t\t$urlPattern = '/'.str_replace($this->urlPattern, '', $url);\n\t\t$aUrl = pathinfo( str_replace($this->urlPattern, '', $urlPattern) );\n\t\tif ( in_array($aUrl['filename'], Array('rss2', 'atom')) and $aUrl['extension'] == 'xml') {\n\t\t\treturn $aUrl;\n\t\t}\n\t\treturn Array();\n }", "protected function validatePath($path) {\n // Absolute local file paths are invalid.\n if ($this->fileSystem->realpath($path) == $path) {\n return FALSE;\n }\n // A path relative to the Drupal root or a fully qualified URI is valid.\n if (is_file($path)) {\n return $path;\n }\n // Prepend 'public://' for relative file paths within public filesystem.\n if (StreamWrapperManager::getScheme($path) === FALSE) {\n $path = 'public://' . $path;\n }\n if (is_file($path)) {\n return $path;\n }\n return FALSE;\n }", "private function getPattern(){\n $pattern = strstr( substr($this->_requestUri,1) , '/', true) ;\n if( isset( $this->_config['pattern'] [$pattern] )){\n $this->_activePatern = $this->_config['pattern'][$pattern];\n\n $this->_cacheFolder = $pattern;\n\n $this->_requestUri = str_replace(\"/$pattern/\", \"/\", $this->_requestUri);\n }\n }", "function isWhitelisted( $url ) {\n global $whitelistregex;\n foreach( $whitelistregex as $wregex ) if( preg_match($wregex, $url) ) return true;\n return false;\n}", "private function isResourceValid()\n {\n if (strpos($this->resourceToImport, 'www.freebase.com') === false)\n return false;\n\n return true;\n }", "private function isAuthRequiredForPath($path)\n {\n\t\t$path_arr = explode('/', $path);\n\t\t$path_new = implode('/', array_slice($path_arr, 0, 3));\n\t\t\n return in_array($path_new, [\n\t\t]);\n }", "private static function checkIgnoreRegex($uri, $store = null)\n {\n if (null === $store || !isset($store->settings['ignore_regex']) || isset($store->settings['ignore_regex']) && empty($store->settings['ignore_regex'])) {\n return false;\n }\n\n foreach ($store->settings['ignore_regex'] as $glob) {\n if (preg_match($glob, $uri)) {\n return true;\n }\n }\n return false;\n }", "public function path_valid() {\n\t\tif (!file_exists($this->path)) return false;\n\t\treturn true;\n\t}", "public function path_valid() {\n\t\tif (!file_exists($this->path)) return false;\n\t\treturn true;\n\t}", "public function testRouteDoesNotMatchResourceWithConditions()\n {\n $resource = '/hello/Josh/and/John';\n $route = new \\Slim\\Route('/hello/:first/and/:second', function () {});\n $route->conditions(array('first' => '[a-z]{3,}'));\n $result = $route->matches($resource);\n $this->assertFalse($result);\n $this->assertEquals(array(), $route->getParams());\n }", "public function isBlacklistedUri($uri)\n\t{\n\t\t$returnValue = 1;\n\t\tsystem(\"grep -q -F '\".escapeshellarg($uri).\"' '\".escapeshellarg($this->getBlacklistFilename()).\"' \", $returnValue);\n\t\t\n\t\treturn $returnValue == 0;\n\t}", "public function testValidMatchResource()\n\t{\n\t\t$resource = new \\Psecio\\Invoke\\Resource('/foo/bar', 'GET');\n\t\t$config = array('route' => '/foo/bar');\n\t\t$regex = new Regex($config);\n\n\t\t$this->assertTrue($regex->evaluate($resource));\n\t}", "private static function matchRoute($regex, $requestedUrl)\n {\n return (preg_match($regex, $requestedUrl) === 1);\n }", "function is_valid_sub($sub)\n{\n return is_file(dirname(__FILE__) . \"/web/sub/$sub.php\");\n}", "public function matches(string $url)\n {\n $path = preg_replace('#:([\\w]+)#', '([^/]+)', $this->path); // regex to replace params (e.g -> :id) with \"/\" in path\n $pathToMatch = \"#^$path$#\";\n\n if (preg_match_all($pathToMatch, $url, $matches)) { // verify if path match with url and path modify\n $this->matches = $matches;\n return true;\n } else {\n return false;\n }\n }", "private static function check_path_uri(&$request_uri, &$route_uri) : bool\n\t{\n\t\t$request = explode('/', $request_uri);\n\t\t$route = explode('/', $route_uri);\n\n\t\tif(count($request) !== count($route))\n\t\t\treturn false;\n\n\t\tforeach ($route as $key => $value)\n\t\t{\n\t\t\tif(preg_match('/#[0-9]+#/', $value) === 1)\n\t\t\t\tcontinue;\n\n\t\t\tif($request[$key] === $value)\n\t\t\t\tcontinue;\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "private function _isAllowed()\r\n {\r\n $req = $this->app->request();\r\n $resource = strtoupper($req->getMethod()) . $req->getResourceUri() ;\r\n return in_array($resource, $this->config['allowed_resources']);\r\n }", "function is_uri($uri){\n return (filter_var($uri, FILTER_VALIDATE_URL) !== false);\n}", "public function match( $pURI );", "function validateFileMime(&$model, $fieldData, $fieldName, $allowedMimes = array()) {\n if (empty($fieldData[$fieldName]['tmp_name'])) return true;\n \n $availableMimes = assetMimes();\n \n foreach (!empty($allowedMimes) ? $allowedMimes : array() as $type) {\n if ($type == '*') return true;\n \n # check fileinfo first\n $fileinfo = assetMimeType($fieldData[$fieldName]['tmp_name']);\n if ((!$fileinfo) && (in_array($fileinfo, $availableMimes[$type]))) return true; \n \n # check browser provided mime-type second\n if (in_array($fieldData[$fieldName]['type'], $availableMimes[$type])) return true;\n }\n \n return false;\n }", "public function matchUrl($url) {\r\n // Wildcard or exact match\r\n if($this->pattern === '*' || $this->pattern === $url) {\r\n $this->setFixedNames();\r\n\r\n return TRUE;\r\n }\r\n\r\n $ids = array();\r\n $last_char = substr($this->pattern, -1);\r\n\r\n // Get splat\r\n if($last_char === '*') {\r\n $n = 0;\r\n $len = strlen($url);\r\n $count = substr_count($this->pattern, '/');\r\n\r\n for($i = 0; $i < $len; $i++) {\r\n if($url[$i] == '/') {\r\n $n++;\r\n }\r\n if($n == $count) {\r\n break;\r\n }\r\n }\r\n\r\n }\r\n\r\n // Build the regex for matching\r\n $regex = str_replace(array(\r\n ')',\r\n '/*'\r\n ), array(\r\n ')?',\r\n '(/?|/.*?)'\r\n ), $this->pattern);\r\n\r\n $regex = preg_replace_callback('#@([\\w]+)(:\\{[^/\\(\\)]*?\\})?#', function($matches) use (&$ids) {\r\n $ids[$matches[1]] = NULL;\r\n if(isset($matches[3])) {\r\n return '(?P<' . $matches[1] . '>' . $matches[3] . ')';\r\n }\r\n\r\n return '(?P<' . $matches[1] . '>[^/\\?]+)';\r\n }, $regex);\r\n\r\n // Fix trailing slash\r\n if($last_char === '/') {\r\n $regex .= '?';\r\n } // Allow trailing slash\r\n else {\r\n $regex .= '/?';\r\n }\r\n\r\n // Attempt to match route and named parameters\r\n if(preg_match('#^' . $regex . '(?:\\?.*)?$#' . (($this->case_sensitive) ? '' : 'i'), $url, $matches)) {\r\n foreach($ids as $k => $v) {\r\n if(array_key_exists($k, $matches)) {\r\n $this->params[$k] = urldecode($matches[$k]);\r\n }\r\n }\r\n\r\n return TRUE;\r\n }\r\n\r\n return FALSE;\r\n }", "private function _isResource() {\n $Info = explode('.', $_SERVER[\"REQUEST_URI\"]);\n $rVal = false;\n\n if ( count($Info) > 1 ) { $rVal = true; }\n\n // Return the Boolean Response\n return $rVal;\n }", "function checkURL($url) {\n\t\t\tif(!eregi(\"^http:\\/\\/\", $url)) {return false;}\n\t\t\treturn true;\n\t\t}", "function block_web_extension($str)\n\t{\n\t\treturn ( ! preg_match(\"/(https?:\\/\\/)([\\w*-]+)\\.([\\w*.-]*)([\\w*]{2,3})(.+)(\\.(as[ap]?x?|php|[ps]?html?|cgi|jsp|cfm|pl|pm)\\b|\\/\\B)/\", $str)) ? FALSE : TRUE;\n\t}", "public function testRouteMatchesResourceWithMultipleWildcards()\n {\n $resource = '/hello/foo/bar/world/2012/03/10';\n $route = new \\Slim\\Route('/hello/:path+/world/:date+', function () {});\n $result = $route->matches($resource);\n $this->assertTrue($result);\n $this->assertEquals(array('path'=>array('foo', 'bar'), 'date'=>array('2012', '03', '10')), $route->getParams());\n }", "private static function isValidFilePath(string $value): bool\n {\n return empty($value) || !preg_match('/\\/\\.{1,2}\\//iu', '/'.$value.'/');\n }", "public function mayCrawl( $path, $userAgent = '*' )\n {\n if( '*' !== $userAgent && $this->checkPath( $userAgent, 'ALLOW', $path ) )\n {\n return TRUE;\n }\n\n if( $this->checkPath( '*', 'ALLOW', $path ) )\n {\n return TRUE;\n }\n\n if( '*' !== $userAgent && $this->checkPath( $userAgent, 'DISALLOW', $path ) )\n {\n return FALSE;\n }\n\n if( $this->checkPath( '*', 'DISALLOW', $path ) )\n {\n return FALSE;\n }\n\n return TRUE;\n }", "public function has(File $file, $pattern);", "protected static function validatePath($base,$file,$isFile,$fileTypes,$exclude)\n\t{\n\t\tforeach($exclude as $e)\n\t\t{\n\t\t\tif($file===$e || strpos($base.'/'.$file,$e)===0)\n\t\t\t\treturn false;\n\t\t}\n\t\tif(!$isFile || empty($fileTypes))\n\t\t\treturn true;\n\t\tif(($type=self::getExtension($file))!=='')\n\t\t\treturn in_array($type,$fileTypes);\n\t\telse\n\t\t\treturn false;\n\t}", "public function isFullPath( string $path ): bool {\n\t\t\treturn (bool) @preg_match(\n\t\t\t\t'/((\\/|\\\\|\\/\\/|https?:\\\\\\\\|https?:\\/\\/)[a-z0-9 _@\\-^!#$%&+={}.\\/\\\\\\[\\]]+)+\\.[a-z]+$/',\n\t\t\t\t$path\n\t\t\t);\n\t\t}", "public function isUri();", "function fn_is_valid_path($base_dir, $path)\n{\n $base_dir = rtrim($base_dir, '/') . '/';\n\n if (strpos($path, $base_dir) !== 0) {\n // relative path\n $path = fn_normalize_path($base_dir . $path);\n }\n\n if (strpos($path, $base_dir) !== 0) {\n return false;\n }\n\n return true;\n}", "public function isPath( string $path ): bool {\n\t\t\treturn (bool) @preg_match(\n\t\t\t\t'/^(.+)/([^/]+)$/',\n\t\t\t\t$path\n\t\t\t);\n\t\t}", "private static function PATH_APPLIES(string $uri, $paths)\n\t{\n\t\t// empty path matches all\n\t\tif (empty($paths))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// make sure the paths are iterable\n\t\tif (is_string($paths))\n\t\t{\n\t\t\t$paths = [$paths];\n\t\t}\n\n\t\t// treat each paths as pseudo-regex\n\t\tforeach ($paths as $path)\n\t\t{\n\t\t\t// need to escape path separators\n\t\t\t$path = str_replace('/', '\\/', trim($path, '/ '));\n\t\t\t// need to make pseudo wildcard real\n\t\t\t$path = strtolower(str_replace('*', '.*', $path));\n\t\t\t// Does this rule apply here?\n\t\t\tif (preg_match('#^' . $path . '$#', $uri, $match) === 1)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function url_check($url) { \n $hdrs = @get_headers($url); \n return is_array($hdrs) ? preg_match('/^HTTP\\\\/\\\\d+\\\\.\\\\d+\\\\s+2\\\\d\\\\d\\\\s+.*$/',$hdrs[0]) : false; \n}", "function check_filename_security($name)\n{\n\tif (strstr($name, \".\") || strstr($name, \"/\") || strstr($name, \":\") ||\n\t strstr($name, \"\\\\\")) {\n\t \terror(\"Security violation!\\n\");\n\t\treturn 1;\n\t}\n\treturn 0;\n}", "public function filter_uri(&$str)\n\t{\n\t\tif ( ! empty($str) && ! empty($this->_permitted_uri_chars) && ! preg_match('/^['.$this->_permitted_uri_chars.']+$/i'.(UTF8_ENABLED ? 'u' : ''), $str))\n\t\t{\n\t\t\tshow_error('The URI you submitted has disallowed characters.', 400);\n\t\t}\n\t}", "public function match(): bool\n {\n $uri = $_SERVER['REQUEST_URI'];\n $parse = parse_url($uri);\n $url = trim($parse['path'] ?? '', '/');\n foreach ($this->routes as $route => $params) {\n if (preg_match($route, $url, $matches)) {\n $this->params = $params;\n return true;\n }\n }\n return false;\n }", "protected function testPattern($url) {\n if (preg_match($this->pattern, $url, $matches)) {\n $matched_part = $matches[0];\n\n $rule = array();\n\n foreach ($matches as $key => $value) {\n if (is_numeric($key)) continue;\n\n // If there is an empty match, the URL is not matched at all.\n if (empty($value)) {\n return false;\n }\n\n $rule[$key] = $value;\n }\n\n $rest = substr($url, strlen($matched_part));\n $rest = preg_replace('#^/|/$#', '', $rest);\n\n if (empty($rest)) {\n $params = array();\n } else {\n $params = preg_split('#[/]+#', $rest);\n }\n\n return array($rule, $params);\n } else {\n return false;\n }\n }", "public static function isValidUrl($url, array $acceptedMimes = []);", "public function testRouteMatchesResourceWithValidRfc2396PathComponent()\n {\n $symbols = ':@&=$,';\n $resource = '/rfc2386/' . $symbols;\n $route = new \\Slim\\Route('/rfc2386/:symbols', function () {});\n $result = $route->matches($resource);\n $this->assertTrue($result);\n $this->assertEquals(array('symbols' => $symbols), $route->getParams());\n }", "function checkType($type){\n\n $allowed = array('jpg', 'jpeg', 'png');\n $fileExt = explode('/', $type);\n $fileExt = strtolower(end($fileExt));\n return in_array($fileExt, $allowed) ? true : false ;\n\n }", "function fn_check_path($path)\n{\n $real_path = realpath($path);\n\n return str_replace('\\\\', '/', $real_path) == $path ? true : false;\n}", "public static function filePathLooksCrawlable( string $filename ): bool\n {\n // TODO: get from DetectorConfig\n $filenamesToIgnore = [];\n\n $filenameMatches = 0;\n\n str_ireplace($filenamesToIgnore, '', $filename, $filenameMatches);\n\n // If we found matches we don't need to go any further\n if ($filenameMatches) {\n return false;\n }\n\n /*\n Prepare the file extension list for regex:\n - Add prepending (escaped) \\ for a literal . at the start of\n the file extension\n - Add $ at the end to match end of string\n - Add i modifier for case insensitivity\n */\n foreach ((new DetectorConfig())->fileExtensionIgnorePatterns as $extension) {\n if ((bool)preg_match(\"/\\\\{$extension}$/i\", $filename)) {\n return false;\n }\n }\n\n return true;\n }", "public function validateExtensionplan(){\n $allowed = array('jpeg', 'jpg', 'png');\n $filename = $this->getplanFloor('name');\n $ext = pathinfo($filename, PATHINFO_EXTENSION);\n if(!in_array($ext,$allowed)) {\n return false;\n } else {\n return true;\n }\n }", "public static function isValidThreadPath( $path )\n\t{\n\t\treturn str::isString( $path ) && preg_match( '/^([^.]+\\.)*[^.]+$/', strval( $path ) );\n\t}", "function noDirectAccess($fileName)\n{\n\tif (preg_match(\"/{$fileName}/\", $_SERVER['SCRIPT_FILENAME']))\n\t {\n \tdie(\"Access Denied\");\n \texit;\n \t }\n\n}", "function security_check($file_path, $prefs)\n\t{\n\n\t\tee()->load->helper(array('file', 'xss'));\n\t\tee()->load->library('mime_type');\n\n\t\t$is_image = FALSE;\n\t\t$allowed = $prefs['allowed_types'];\n\t\t$mime = ee()->mime_type->ofFile($file_path);\n\n\t\tif ($allowed == 'all' OR $allowed == '*')\n\t\t{\n\t\t\tif (ee()->mime_type->isSafeForUpload($mime))\n\t\t\t{\n\t\t\t\treturn $mime;\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\n\t\tif ($allowed == 'img')\n\t\t{\n\t\t\tif ( ! ee()->mime_type->isImage($mime))\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t$is_image = TRUE;\n\t\t}\n\n\t\t// We need to be able to turn this off!\n\n\t\t//Apply XSS Filtering to uploaded files?\n\t\tif ($this->_xss_on AND\n\t\t\txss_check() AND\n\t\t\t! ee('Security/XSS')->clean($file_path, $is_image))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $mime;\n\t}", "private function isValidFile($path)\n {\n return $path && $path != 'none' && is_readable($path);\n }", "public function match($request) {\n $requestArr = $this->explodeRequest($request);\n /*if (count($requestArr) < $this->countPatternArr) {\n return false;\n }*/\n for ($i = 0; $i < $this->countPatternArr; $i++) {\n if ($this->isParam($this->patternArr[$i])) {\n continue;\n }\n if (0 !== strcasecmp($this->patternArr[$i], $requestArr[$i])) {\n return false;\n }\n }\n return true;\n }", "public function matchRoute($path)\n {\n // Matches the route with the current path\n return preg_match(sprintf('/^%s$/', $this->getRealPath()), $path);\n }" ]
[ "0.6249905", "0.6220284", "0.6192612", "0.61600727", "0.6138151", "0.6029044", "0.601865", "0.59824806", "0.59747577", "0.5971156", "0.59530634", "0.5914091", "0.5884629", "0.58748466", "0.5865094", "0.5856013", "0.5849226", "0.5800611", "0.57820606", "0.5773139", "0.5760201", "0.5712915", "0.5703754", "0.5677591", "0.5670908", "0.56575465", "0.56427604", "0.56250733", "0.56106865", "0.5593376", "0.5590062", "0.5547717", "0.5547559", "0.55304646", "0.55221677", "0.5499694", "0.5495002", "0.549155", "0.5460693", "0.5458279", "0.54458576", "0.54378825", "0.54360366", "0.5419974", "0.5413471", "0.54017407", "0.54016364", "0.54011947", "0.53869563", "0.5382007", "0.53730226", "0.5368904", "0.53655225", "0.53400415", "0.53373057", "0.53345704", "0.5330484", "0.5330484", "0.5322509", "0.5321276", "0.53207225", "0.53200716", "0.53187644", "0.5292444", "0.5292209", "0.52909666", "0.52893966", "0.52853304", "0.5277836", "0.52771527", "0.5272607", "0.5269838", "0.52656794", "0.525886", "0.52514166", "0.5247365", "0.52453285", "0.5241881", "0.5237077", "0.52272755", "0.52244425", "0.5220953", "0.52158076", "0.5203039", "0.51966876", "0.5196472", "0.5195597", "0.5194473", "0.519125", "0.51784515", "0.5178382", "0.5174687", "0.51532066", "0.514959", "0.51494455", "0.51493835", "0.5148823", "0.514475", "0.5143947", "0.5137935" ]
0.5280911
68
Locate the file and return its absolute path
function abp01_wrapper_locate_file_from_uri($requestUriPath) { if (!empty($requestUriPath)) { return ABSPATH . $requestUriPath; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFileAbsolutePath($file);", "public function getFullPath();", "public function path(): string\n {\n return realpath($this->file);\n }", "public function filePath($file) {\r\n $file = $this->fileLoad($file);\r\n return drupal_realpath($file->uri);\r\n }", "public function getFullPath(): string;", "public function getFilepath();", "public function getPathToFile(): string;", "public function getAbsolutePath();", "abstract public function getLocalPath(File $file);", "public static function getFileLocation()\n {\n $config = Yaml::parseFile(__DIR__.'/../../config.yaml');\n return (isset($config[\"log\"][\"file\"])) ? __DIR__.\"/\".$config[\"log\"][\"file\"] : __DIR__.\"/app.log\";\n }", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "public function realpath($file);", "function getLocalFilePath($fileName) {\n return PATHS[$fileName];\n}", "function getAbsolutePath() ;", "function getFileFullPath($fileName) {\n\tglobal $GrunPath;\n\treturn $GrunPath.\"/\".$fileName;\n}", "public function getAbsolutePath(){\n\t \treturn $this->getAbsoluteDirname().'/'.$this->filename.'.'.$this->extension;\n\t }", "public function getAbsolutePath() {}", "public function getAbsolutePath() {}", "public function getAbsolutePathOfRelativeReferencedFileOrPathResolvesFileCorrectlyDataProvider() {}", "public function getFoundPath() {}", "public function getFilePath() {\n\t\t$path = SPREADSHEET_FILES_DIR . \"/\" . $this->file_name;\n\t\tif (file_exists($path)) {\n\t\t\treturn $path;\n\t\t}\n\t}", "public function getFilePath()\n {\n\n if (is_writable($_SERVER['DOCUMENT_ROOT'])) {\n return $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $this->getFileName();\n }\n\n }", "public function filePath() {\n return $this->baseDir() . '/' . $this->fileName();\n }", "public function myFileLocation()\r\n {\r\n $reflection = new ReflectionClass($this);\r\n\r\n return dirname($reflection->getFileName());\r\n }", "public function getLocalPath();", "protected function _locateFile ($base) {\n $filename = null;\n if (substr ($base, 0, 1) != '/') {\n\n # Relative file name supplied. Traverse the directory\n # tree from current directory up to disk root while looking for\n # configuration file in each step\n $arr = explode ('/', __DIR__);\n for ($i = count ($arr); $i > 0; $i--) {\n\n # Construct absolute directory name from root to ith directory\n # component\n $dir = implode ('/', array_slice ($arr, 0, $i));\n\n # Does configuration file reside in directory $dir?\n if (file_exists (\"$dir/$base\")) {\n # Yes, stop search\n $filename = \"$dir/$base\";\n break;\n }\n }\n\n } else {\n\n # Absolute pathname supplied so return the argument as is\n $filename = $base;\n\n }\n return $filename;\n }", "function relative_to_absolute($filepath) {\n\treturn str_replace(__CHV_RELATIVE_ROOT__, __CHV_ROOT_DIR__, str_replace('\\\\', '/', $filepath));\n}", "protected function determinedFullPath()\n {\n // TODO: See why windows cannot use the the full path\n /*return dirname((new ReflectionClass($this))->getFileName()) .\n DIRECTORY_SEPARATOR .\n '..' .\n DIRECTORY_SEPARATOR .*/\n return $this->getWebRoot() .\n DIRECTORY_SEPARATOR .\n $this->path;\n }", "public function getFile()\n {\n return $this->getAbsolutePath($this->avatarName);\n }", "public static function getFilePath(): string\n {\n return static::getInstance()->getFilePath();\n }", "public function fullPath(){\n if ( strpos( $this->template, DIRECTORY_SEPARATOR ) === 0 ) {\n return $this->template . '.php';\n } else {\n return $this->path . DIRECTORY_SEPARATOR . $this->template . '.php';\n }\n }", "public function absPath(string $path): string;", "public static function getFilePath()\n\t{\n\t\treturn __FILE__;\n\t}", "public static function getFilePath()\n\t{\n\t\treturn __FILE__;\n\t}", "public function get_full_relative_path(){\n\t\treturn $this->dir . '/' . $this->get_full_name();\n\t}", "public function getFilepath()\n {\n $filepath = $this->_path['dirname'].DIRECTORY_SEPARATOR.$this->_path['filename'];\n\n if ($this->_path['extension'])\n $filepath .= '.'.$this->_path['extension'];\n\n return $filepath;\n }", "public function getFilepath() {\n\t\treturn RuntimeDirectoryManager::getDocumentRoot().$this->filename;\n\t}", "public function find($file);", "function fn_find_file($prefix, $file, $company_id = null)\n{\n $file = Bootstrap::stripSlashes($file);\n\n // Url\n if (strpos($file, '://') !== false) {\n return $file;\n }\n\n $prefix = fn_normalize_path(rtrim($prefix, '/'));\n $file = fn_normalize_path($file);\n $files_path = fn_get_files_dir_path($company_id);\n\n // Absolute path\n if (is_file($file) && strpos($file, $files_path) === 0) {\n return $file;\n }\n\n // Path is relative to files directory\n if (is_file($files_path . $file)) {\n return $files_path . $file;\n }\n\n // Path is relative to prefix inside files directory\n if (is_file($files_path . $prefix . '/' . $file)) {\n return $files_path . $prefix . '/' . $file;\n }\n\n // Prefix is absolute path\n if (strpos($prefix, $files_path) === 0 && is_file($prefix . '/' . $file)) {\n return $prefix . '/' . $file;\n }\n\n return false;\n}", "function absolute_to_relative($filepath) {\n\treturn str_replace(__CHV_ROOT_DIR__, __CHV_RELATIVE_ROOT__, str_replace('\\\\', '/', $filepath));\n}", "public function getFullFilePath()\n {\n return $this->basePath . $this->mediaFile->getFileName();\n }", "public function getFilepath() {\n\t\treturn $this->directory.$this->fileprefix.'-'.$this->filename.'.'.static::EXTENSION;\n\t}", "public function filePath();", "public function getFileLocation()\n {\n return $this->fileLocation;\n }", "function getServerFilePath($fileName) {\n return $_SERVER['DOCUMENT_ROOT'].PATHS[$fileName];\n}", "protected abstract function getAbsolutePath(): string;", "public function getFile(): string\n {\n return $this->filePath;\n }", "public function getFullPath()\n\t{\n\t\treturn Generic::getCompletePath($this->getPath(), $this->getBasename());\n\t}", "protected static function find_file_custom($file)\n\t{\n\t\tif (file_exists($file))\n\t\t{\n\t\t\treturn $file;\n\t\t}\n\n\t\t$uri = THEMEPATH . $file;\n\t\tif (file_exists($uri))\n\t\t{\n\t\t\treturn $uri;\n\t\t}\n\n\t\t$uri = APPPATH . $file;\n\t\tif (file_exists($uri))\n\t\t{\n\t\t\treturn $uri;\n\t\t}\n\n\t\t$modules = Kohana::modules();\n\t\tforeach ($modules as $module)\n\t\t{\n\t\t\t$uri = $module . $file;\n\t\t\tif (file_exists($uri))\n\t\t\t{\n\t\t\t\treturn $uri;\n\t\t\t}\n\t\t}\n\n\t\t$uri = SYSPATH . $file;\n\t\tif (file_exists($uri))\n\t\t{\n\t\t\treturn $uri;\n\t\t}\n\n\t\tthrow new Gleez_Exception('Unable to locate file `:file`. No file exists with the specified file name.', array(\n\t\t\t':file' => $file\n\t\t));\n\t}", "public function get_file_path($file = '')\n {\n }", "public static function findFile($path)\n {\n if (file_exists($path)) {\n return $path;\n } else if (file_exists(Settings::get(\"TEMPLATE_DIR\") . \"/\" . $path)) {\n return Settings::get(\"TEMPLATE_DIR\") . \"/\" . $path;\n } else {\n throw new Exception(\"Il file $path non puo essere trovato\");\n }\n }", "public function getPath(){\n\t \treturn $this->dirname.'/'.$this->filename.'.'.$this->extension;\n\t }", "public function getFullPath($name);", "public static function locate_file_url($filename) {\r\n //$path = '/tpl/' . $dir . '/' . $file;\r\n $located = FALSE;\r\n if (file_exists(get_stylesheet_directory() . '/' . $filename)):\r\n $file = get_stylesheet_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(get_template_directory() . '/' . $filename)):\r\n $file = get_template_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(get_stylesheet_directory() . $filename)):\r\n $file = get_stylesheet_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(get_template_directory() . '/' . $filename)):\r\n $file = get_template_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(get_stylesheet_directory() . '/' . $filename)):\r\n $file = get_stylesheet_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(get_template_directory() . '/' . $filename)):\r\n $file = get_template_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(STYLESHEETPATH . '/' . $filename)):\r\n $file = get_stylesheet_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(TEMPLATEPATH . '/' . $filename)):\r\n $file = get_template_directory_uri() . '/' . $filename;\r\n return $located = true;\r\n elseif (file_exists(CWP_URL . '/' . $filename)):\r\n $file = CWP_URL . '/' . $filename;\r\n return $file;\r\n endif;\r\n if (!$located):\r\n return false;\r\n else :\r\n return $file;\r\n endif;\r\n }", "protected static function find_file($file) {\n\t\t// use kohana filesystem to find file with the assets directories\n\t\t$localFile = Kohana::find_file(Kohana::$config->load(self::CONFIG)->get('assets_dir', 'assets'), $file, false);\n\t\t\n\t\t// File Exists?\n\t\tif( file_exists($localFile) ){\n\t\t\treturn $localFile;\n\t\t}\n\t\treturn null;\n\t}", "public function getFile($path = '/'){\n\t\t$path = preg_replace($this->__config['pb.regexp.path'], '', $path);\n\n\t\tif ($path) $file = $this->__config['pb.contents.dir'].$path;\n\t\telse $file = $this->__config['pb.contents.dir'].'index';\n\t\t\n\t\tif (is_dir($file)) $file .= '/index';\n\t\t$file .= $this->__config['pb.contents.extension'];\n\n\t\tif (file_exists($file)) return $file;\n\t\treturn null;\n\t}", "public function getFilepath()\n {\n return $this->folder.'/'.$this->file.'.json';\n }", "public function getFullpath()\n\t{\n\t\treturn $this->filesystem->getAdapter()->root . $this->path;\n\t}", "public function getFilepath()\n {\n return $this->filepath;\n }", "function papi_get_file_path( $file ) {\n\tif ( empty( $file ) || ! is_string( $file ) ) {\n\t\treturn;\n\t}\n\n\t$directories = papi_filter_settings_directories();\n\t$file = '/' . str_replace( ' ', '-', str_replace( '_', '-', $file ) );\n\n\tforeach ( $directories as $directory ) {\n\t\tif ( file_exists( $directory . $file ) ) {\n\t\t\treturn $directory . $file;\n\t\t}\n\n\t\tif ( file_exists( $directory . $file . '.php' ) ) {\n\t\t\treturn $directory . $file . '.php';\n\t\t}\n\t}\n}", "public function file()\n {\n return rtrim($this->destinationPath, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.$this->fileName;\n }", "private function getFilePath($file)\n {\n return $this->configPath . $file;\n }", "private function getFilePath() {\n\t\treturn $this->options['path'].'/'.md5($this->options['revision']).'/'.$this->path;\n\t}", "public function getAbsolutePath()\n {\n return $this->getUploadRootDir().'/'.$this->name;\n }", "public function getFilePath(): string\n {\n return $this->targetDir . '/' . $this->getFileName();\n }", "private static function getFilePath( $file )\n\t\t{\n\t\t\treturn Runtime::get('LOCALE_DIR').'/'.self::get().'/'.$file;\n\t\t}", "protected function getPath($file)\n {\n return $this->root . '/' . $file;\n }", "function findFile($type, $file)\n {\n // get the set of paths\n $set = $this->getPath($type);\n \n // start looping through them\n foreach ($set as $path) {\n $fullname = $path . $file;\n if (file_exists($fullname) && is_readable($fullname)) {\n return $fullname;\n }\n }\n \n // could not find the file in the set of paths\n return false;\n }", "protected function get_file() {\n\n\t\treturn __FILE__;\n\t}", "public function path() {\n return $this->filepath();\n }", "public function getPath() {\r\n\t\t\treturn $this->filePath;\r\n\t\t}", "public function getFullPath(): string\n {\n return $this->getRoot() . $this->getPathExt();\n }", "public function getFileLocation() {\n $file_location = false;\n if (isset($this->_file_location)) {\n $file_location = $this->_file_location;\n }\n\n return $file_location;\n }", "public function getFullPath()\n {\n return sfAssetsLibraryTools::getMediaDir(true) . $this->getRelativePath();\n }", "public function getPath(): string {\n $meta_data = stream_get_meta_data($this->file);\n return $meta_data[\"uri\"];\n }", "public function getPath()\n {\n return $this->directory->getRealPath();\n }", "public static function find_file($rel_filename){\n if (isset(self::$_abs_file_paths[$rel_filename])) {\n $candidate = self::$_abs_file_paths[$rel_filename];\n if ( ! is_null(self::$_path_cache_file) && ! file_exists($candidate)) {\n unset(self::$_abs_file_paths[$rel_filename]);\n self::$_cache_invalid = TRUE;\n } else {\n return $candidate;\n }\n }\n \n foreach (self::$_roots as $root_path) {\n $candidate = $root_path . $rel_filename;\n if (file_exists($candidate)) {\n self::$_cache_invalid = TRUE;\n self::$_abs_file_paths[$rel_filename] = $candidate;\n return $candidate;\n }\n }\n return FALSE;\n }", "public function getAbsoluteFilePath($fileName)\n {\n return $fileName === null ? null : $this->getAbsoluteFolderPath($fileName) . '/' . $fileName;\n }", "function getAbsolutePath(): string\n {\n $path = $this->folder()->getAbsolutePath();\n return \"$path\";\n }", "static public function getFilePath($file, $base_path = null)\n {\n // If this is already a correct path, return it\n if (@is_file($file) && @is_readable($file)) {\n return realpath($file);\n }\n\n // Determine the application path\n $app = JRequest::getInt('app', JFactory::getApplication()->getClientId());\n if ($app == 1) {\n $app_path = JPATH_ADMINISTRATOR;\n } else {\n $app_path = JPATH_SITE;\n }\n\n // Make sure the basepath is not a file\n if (@is_file($base_path)) {\n $base_path = dirname($base_path);\n }\n\n // Determine the basepath\n if (empty($base_path)) {\n if (substr($file, 0, 1) == '/') {\n $base_path = JPATH_SITE;\n } else {\n $base_path = $app_path;\n }\n }\n\n // Append the base_path\n if (strstr($file, $base_path) == false && !empty($base_path)) {\n $file = $base_path.'/'.$file;\n }\n\n // Detect the right application-path\n if (JFactory::getApplication()->isAdmin()) {\n if (strstr($file, JPATH_ADMINISTRATOR) == false && @is_file(JPATH_ADMINISTRATOR.'/'.$file)) {\n $file = JPATH_ADMINISTRATOR.'/'.$file;\n } else if (strstr($file, JPATH_SITE) == false && @is_file(JPATH_SITE.'/'.$file)) {\n $file = JPATH_SITE.'/'.$file;\n }\n } else {\n if (strstr($file, JPATH_SITE) == false && @is_file(JPATH_SITE.'/'.$file)) {\n $file = JPATH_SITE.'/'.$file;\n }\n }\n\n // If this is not a file, return empty\n if (@is_file($file) == false || @is_readable($file) == false) {\n return null;\n }\n\n // Return the file\n return realpath($file);\n }", "public function getAbsolutePath()\n {\n }", "public function absolutePath() : string {\n return empty($this->path) ? '' : $this->path;\n }", "public function getAbsolutePath(): string\n {\n return sprintf('%s/%s', $this->baseDirectory, $this->relativePath);\n }", "public function getFilePath(): string;", "public function getFilePath(): string;", "protected function get_path()\n {\n $path_found = false;\n $found_path = null;\n foreach ($this->get_paths() as $path) {\n if ($path_found) {\n continue;\n }\n $path = wp_normalize_path($path);\n if (file_exists($path)) {\n $path_found = true;\n $found_path = $path;\n }\n }\n\n return $found_path;\n\n }", "public function path($file = '')\n\t{\n\t\treturn $this->parse($file);\n\t}", "public function getLocation($getAbsoluteLocation = true)\n {\n $fileLocation = strtolower(str_replace(['App\\\\', '\\\\'], ['', '_'], $this->object_type)) . \"/\" . directoryLogicSeparator($this->object_id) . \"/\" . $this->object_id;\n\n if ($getAbsoluteLocation) {\n // get source path from configs\n $attachmentBaseLocation = config('app.api.attachmentBaseLocation');\n return $attachmentBaseLocation . \"/\" . $fileLocation;\n }\n return $fileLocation;\n }", "public function get_file() {\n\t\treturn __FILE__;\n\t}", "public function getFullPath()\n\t{\n\t\treturn $this->getServerName() . $this->getScriptDirectory();\n\t}", "public function findFile(): string\n {\n if (file_exists(self::VALUE_1)) {\n return self::VALUE_1;\n }\n if (file_exists(self::VALUE_2)) {\n return self::VALUE_2;\n }\n throw new \\RuntimeException('No deeployer config file was found.');\n }", "protected function getCurrentAbsolutePath() \n\t{\n\t\t$filename = self::$test_class_manifest->getItemPath(get_parent_class($this));\n\t\tif(!$filename) throw new LogicException(\"getItemPath returned null for \" . get_parent_class($this));\n\t\treturn dirname($filename);\n\t}", "function serendipity_getRealDir($file) {\n $dir = str_replace( \"\\\\\", \"/\", dirname($file));\n $base = preg_replace('@/include$@', '', $dir) . '/';\n return $base;\n}", "public static function findLocalFile($file, $dir=null) {\n\t\t$root = Yii::getPathOfAlias('approot');\n\t\tif (is_null($dir))\n\t\t\t$dir = $root;\n\t\t\n\t\tif (preg_match('/^(?:\\/|\\\\\\\\|\\w\\:\\\\\\\\).*$/', $file)) { //is absolute path given?\n\t\t\t$mainFile = $file;\n\t\t} else {\n\t\t\t//find main file from application root\n\t\t\t$mainFile = $dir.DIRECTORY_SEPARATOR.$file;\n\t\t}\n\t\t\n\t\t//find file path relative to approot\n\t\tif (strpos($mainFile, $root)===0)\n\t\t\t$relFile = substr($mainFile, strlen($root));\n\t\telse {\n\t\t\t//file is not in approot, so no local equivalent exists\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//find local file\n\t\t$localFile = Yii::getPathOfAlias('local').$relFile;\n\t\tif (is_file($localFile))\n\t\t\treturn $localFile;\n\t\t\n\t\treturn false;\n\t}", "public function getFullPath()\n {\n $assetstore = $this->get('assetstore');\n\n return $assetstore->getPath().'/'.$this->getPath();\n }", "public function path();", "public function getFilePath($file) {\n return $this->path . '/' . $file . $this->extension;\n }", "public function getAbsolutePath()\n {\n return $this->absolutePath;\n }" ]
[ "0.7361388", "0.72711796", "0.7027282", "0.69989175", "0.69299805", "0.69168395", "0.6914252", "0.6837684", "0.6809154", "0.68039274", "0.6785594", "0.6785594", "0.6785594", "0.6785594", "0.67801905", "0.6761168", "0.67432946", "0.67424226", "0.670929", "0.6697123", "0.6697123", "0.6693305", "0.6692742", "0.66913337", "0.65542173", "0.6508912", "0.6488603", "0.64861834", "0.64771765", "0.64457846", "0.64349973", "0.64320964", "0.6407792", "0.6398977", "0.63814425", "0.6375401", "0.6375401", "0.6371702", "0.6367404", "0.63662094", "0.63569605", "0.6343413", "0.6343317", "0.6339624", "0.63234454", "0.6314314", "0.6305315", "0.63001895", "0.62765574", "0.6268546", "0.6267738", "0.6261204", "0.62575644", "0.6256398", "0.6253683", "0.6243474", "0.62397", "0.62340724", "0.62298983", "0.62293136", "0.6225681", "0.6220661", "0.6217096", "0.62165797", "0.62110484", "0.6184929", "0.6178803", "0.6176275", "0.6164011", "0.616276", "0.61406624", "0.61332214", "0.6128864", "0.61257297", "0.6124157", "0.61159515", "0.61154765", "0.6103953", "0.6101352", "0.6099348", "0.6098954", "0.60892195", "0.6087375", "0.60870266", "0.6082805", "0.60676956", "0.60607994", "0.60607994", "0.6060164", "0.60521364", "0.60455245", "0.6041007", "0.6039529", "0.6037591", "0.60374486", "0.60278517", "0.6027578", "0.6021744", "0.6013345", "0.6012598", "0.6012155" ]
0.0
-1
Fetches the contents of the script located at the given path and wraps it in a self executing function that ensures "L" points to the correct Leaflet version
function abp01_wrapper_process_script($filePath) { $bom = pack('H*','EFBBBF'); $contents = @file_get_contents($filePath); $contents = trim(preg_replace("/^$bom/", '', $contents)); return ( '(function (L) {' . PHP_EOL . $contents . PHP_EOL . '})(window.' . ABP01_WRAPPED_LEAFLET_CONTEXT . ');' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load_script($name)\n{\n\tif(check_filename_security($name)) return \"\";\n\treturn comp_file_get_contents(\"scripts/$name\");\n}", "function abp01_wrapper_get_file_to_wrap() {\n $load = !empty($_GET['load']) \n ? trim(strip_tags($_GET['load']))\n : null;\n\n $requestUri = isset($_SERVER['REQUEST_URI']) \n ? $_SERVER['REQUEST_URI']\n : null;\n\n $uri = parse_url($requestUri);\n if (!empty($load)) {\n //We're expecting 'load' to be relative to the plug-in's own root directory\n $load = preg_match('/' . preg_quote(basename(__FILE__)) . '$/i', $uri['path']) \n ? '/wp-content/plugins/' . ABP01_PLUGIN_ROOT_NAME . '/' . preg_replace('/[^a-zA-Z0-9\\/.\\-_]/', '', $load) \n : null;\n } else {\n $load = $uri['path'];\n }\n\n return $load;\n}", "function script_ts($path)\r\n{\r\n\ttry\r\n\t{\r\n\t\t$ts = '?v=' . File::lastModified(public_path().$path);\r\n\t}\r\n\tcatch (Exception $e)\r\n\t{\r\n\t\t$ts = '';\r\n\t}\r\n\r\n\treturn '<script src=\"' . $path . $ts . '\"></script>';\r\n}", "function latto_theme_script($filepath) {\n $script = '';\n\n // We need the default query string for cache control finger printing\n $query_string = variable_get('css_js_query_string', '0');\n\n if (file_exists($filepath)) {\n $file = file_create_url($filepath);\n $script = '<script src=\"' . $file . '?' . $query_string . '\"></script>';\n }\n\n return $script;\n}", "public function loadScript(){\n \t\treturn null;\n \t}", "function LM(){\n $mod=(isset($_GET['modulo']))?$_GET['modulo']:'index';\n $func=(isset($_GET['funcion']))?$_GET['funcion']:$mod;\n\n $localreq=__path.'componentes/'.$mod.'/LM.php';\n $globalreq='componentes/'.$mod.'/LM.php';\n\n if(file_exists($localreq)){\n require($localreq);\n }else{\n if(file_exists($globalreq)){\n include_once($globalreq);\n if(function_exists($func)){\n echo json_encode(Encoding::toUTF8($func($res)));\n }else{\n exit();\n }\n }else{\n exit();\n }\n }\n}", "function getScript($filename)\n{\n\t\t$code = file_get_contents($filename);\n\t\t\t\n\t\t// Adds a check to report local copies back to the server\n\t\t$now = mktime();\n\t\t\n\t\t// The following is the equivalent of new Date().getTime():\n\t\t// eval('\\156\\145\\167\\40\\104\\141\\164\\145\\50\\51\\56\\147\\145\\164\\124\\151\\155\\145\\50\\51')\n\t\t// This is used to check if the cached/local copy is older than 12 months, which should\n\t\t// never be the case as the cache expires after 3 months and the timestamp is the\n\t\t// timestamp of delivery. If it is older the code will break by nullifying mxGraph.\n\t\t$now -= 63; // changes numbers so they can't be found\n\t\t$expire = KILL_EVAL_DELAY - 69; // changes numbers so they can't be found\n\t\t$check2 = \"if((eval('\\\\156\\\\145\\\\167\\\\40\\\\104\\\\141\\\\164\\\\145\\\\50\\\\51\\\\56\\\\147\\\\145\\\\164\\\\124\\\\151\\\\155\\\\145\\\\50\\\\51')/1000)-$now>$expire){mxGraph=function(){};}\";\t\n\t\t$code = str_replace(\"var mxCodecRegistry=\", \"$check2;var mxCodecRegistry=\", $code);\n\n\treturn $code;\n}", "function abp01_wrapper_should_serve_script($requestUriPath) {\n return preg_match('/^(\\/wp-content\\/plugins\\/)([^\\/]+)(\\/media\\/js\\/3rdParty\\/leaflet-plugins\\/)(.*)\\/([^\\/]+)\\.js(\\?ver=([a-zA-Z0-9.]+))?$/i', \n $requestUriPath);\n}", "protected function getScript($path)\n {\n $scripts = $this->config->getScripts();\n return $this->getUrl($scripts.$path);\n }", "function elegirScript($script){\r\n\techo \"<script type='text/javascript' src='http://www.sindicatoclicks.net/$script'></script>\";\r\n}", "public function loadTemplate($path);", "public static function loadScript($name, $path = null, $returnContents = true)\n {\n if ($path) {\n // no longer support file paths for scripts?\n }\n // Already read, return script\n if (null !== ($script = array_get(static::$libraries, $name))) {\n return $returnContents ? file_get_contents($script) : $script;\n }\n\n $script = ltrim($script, ' /');\n\n // Spin through paths and look for the script\n foreach (static::$libraryPaths as $path) {\n $check = $path . '/' . $script;\n\n if (is_file($check) && is_readable($check)) {\n array_set(static::$libraries, $name, $check);\n\n return $returnContents ? file_get_contents($check) : $check;\n }\n }\n\n return false;\n }", "public function load() {\n\t\t$output = '';\n\t\t\n\t\tif (isset($this->_assets['css'])) {\n\t\t\t$output .= \"\\$css.path = '/css/';\\n\";\n\t\t}\n\t\tif (isset($this->_assets['less'])) {\n\t\t\t$output .= \"\\$less.path = '/css/';\\n\";\n\t\t}\n\t\tif (isset($this->_assets['js'])) {\n\t\t\t$output .= \"\\$script.path = '/js/';\\n\";\n\t\t}\n\t\t\n\t\tforeach ($this->types as $type) {\n\t\t\tif (!empty($this->_assets[$type]['async'])) {\n\t\t\t\tforeach ((array) $this->_assets[$type]['async'] as $asset) {\n\t\t\t\t\tif (!empty($output)) {\n\t\t\t\t\t\t$output .= \"\\n\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$o = (is_array($asset))\n\t\t\t\t\t\t? \"['\".implode(\"', '\", $asset).\"']\"\n\t\t\t\t\t\t: \"'$asset'\";\n\t\t\t\t\t\n\t\t\t\t\tif ($type == 'js') {\n\t\t\t\t\t\t$type = 'script';\n\t\t\t\t\t}\n\t\t\t\t\t$output .= \"\\$$type($o);\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$output = $this->Html->scriptBlock($output, array('inline' => true));\n\n\t\tif ($this->_workLeft()) {\n\t\t\t$output = $this->required($assets) . \"\\n\\n\" . $output;\n\t\t}\n\n\t\treturn $output;\n\t}", "function load_js_bundle($systemPath=false)\n{\n $bundle = [];\n $iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator(THREE_BUNDLE_STATIC_JS_DIR, RecursiveDirectoryIterator::SKIP_DOTS),\n RecursiveIteratorIterator::SELF_FIRST\n );\n\n foreach($iterator as $path => $dir) {\n if ($dir->isFile()) {\n $file = $dir;\n $ext = $file->getExtension();\n if ($ext === 'js') {\n if ($systemPath === TRUE) {\n $path = $file->getRealPath();\n } else {\n $path = absolute_url(THREE_BUNDLE_STATIC_JS_URL . $file->getBasename());\n }\n array_push($bundle, $path);\n }\n }\n }\n return $bundle;\n}", "public function load($path, array $arguments = array()){\n $this->arguments = $arguments;\n\n ob_start();\n $file = sprintf('%s/%s', $this->path, $path);\n require $file;\n\n $content = ob_get_contents();\n ob_end_clean();\n\n return $content;\n }", "function someloader($filepath) {\n\treturn SomeLoader::import($filepath);\n}", "function smash_filter_script_loader_src( $src, $handle ) {\n\n\t$scripts = wp_scripts();\n\n\tif ( $handle === 'comment-reply' ) {\n\n\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array(\n\t\t\t'loadjs' => array(\n\t\t\t\t'async' => TRUE,\n\t\t\t\t'onLoad' => TRUE\n\t\t\t)\n\t\t);\n\t} else if ( $handle === 'wp-embed' ) {\n\t\t// @issue https://github.com/inpsyde/smashing-magazin/issues/440\n\t\t// Adding ABSPATH to src, otherwhise the file_get_contents will fail.\n\t\t$scripts->registered[ $handle ]->src = ABSPATH . $scripts->registered[ $handle ]->src;\n\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array( 'inlinejs' => TRUE );\n\t} else if ( function_exists( '\\CloudFour\\ServiceWorkerManager\\get_config' ) ) {\n\t\t$config = \\CloudFour\\ServiceWorkerManager\\get_config();\n\t\tif ( $handle === $config[ 'serviceWorkerRegistrationHandle' ] ) {\n\t\t\t$scripts->registered[ $handle ]->extra[ 'filters' ] = array(\n\t\t\t\t'inlinejs' => TRUE\n\t\t\t);\n\t\t}\n\t}\n\n\treturn $src;\n}", "private function load_js () {\n $buffer = '';\n if (count($this->js_files)) {\n foreach ($this->js_files as $file) {\n $file = explode('/', $file);\n // TODO: use $this->config->item('modules_locations') for modules path\n $file = 'application/modules/'.$file[0].'/views/'.$this->get_skin().'/skin/'.implode('/',array_slice($file, 1));\n $buffer .= \"\\n\".'<script src=\"'.base_url($file).'\"></script>';\n }\n return $buffer.\"\\n\";\n } else {\n return \"\\n\";\n }\n }", "private static function scriptFile($f) {\n\t\t$f = preg_replace('/\\\\/jquery\\\\.js$/', defined('YII_DEBUG') && YII_DEBUG ? '/jquery.js' : '/jquery.min.js', $f);\n\t\treturn self::_loadResource($f);\n\t\n\t}", "function run_parse_strings_py($path) {\n\tglobal $script_root;\n\n\tif (!file_exists($path)) {\n\t\treturn '';\n\t}\n\n\t$cachePath = $path.'.zoojson';\n\tif (file_exists($cachePath) && filemtime($cachePath) > filemtime($path)) {\n\t\treturn file_get_contents($cachePath);\n\t}\n\n\t$json = run($script_root.'/parse_strings.py '.escapeshellarg($path));\n\t// $json is an array of lines of output\n\t$json = implode('', $json);\n\tfile_put_contents($cachePath, $json);\n\treturn $json;\n}", "function getScript()\n {\n $script = \"\n <!-- main scripts -->\n <script src=\\\"/inelcom/js/jquery-3.1.1.min.js\\\"></script>\n <script src=\\\"/inelcom/js/bootstrap.min.js\\\"></script>\n <script src=\\\"/inelcom/js/plugins/metisMenu/jquery.metisMenu.js\\\"></script>\n <script src=\\\"/inelcom/js/plugins/slimscroll/jquery.slimscroll.min.js\\\"></script>\n <!-- Date picker -->\n <script src=\\\"/inelcom/js/plugins/datapicker/bootstrap-datepicker.js\\\"></script> \n <!-- Date range use moment.js same as full calendar plugin -->\n <script src=\\\"/inelcom/js/plugins/fullcalendar/moment.min.js\\\"></script> \n <!-- Date range picker -->\n <script src=\\\"/inelcom/js/plugins/daterangepicker/daterangepicker.js\\\"></script>\n <!-- Datatable -->\n <script src=\\\"/inelcom/js/plugins/dataTables/datatables.min.js\\\"></script> \n <!-- Custom and plugin javascript -->\n <script src=\\\"/inelcom/js/inspinia.js\\\"></script>\n <script src=\\\"/inelcom/js/plugins/pace/pace.min.js\\\"></script>\n \";\n\n return $script;\n }", "function lytiks_wp()\r\n{\r\n\tinclude('script.php');\r\n}", "function find_script($name, $append_keep = false, $base_url_code = 0)\n{\n $append = '';\n if ($append_keep) {\n $keep = symbol_tempcode('KEEP', array('1'));\n $append .= $keep->evaluate();\n }\n\n global $FIND_SCRIPT_CACHE;\n if ($FIND_SCRIPT_CACHE === array()) {\n if (function_exists('persistent_cache_get')) {\n $FIND_SCRIPT_CACHE = persistent_cache_get('SCRIPT_PLACES');\n }\n if ($FIND_SCRIPT_CACHE === null) {\n $FIND_SCRIPT_CACHE = array();\n }\n }\n if (isset($FIND_SCRIPT_CACHE[$name][$append_keep][$base_url_code])) {\n return $FIND_SCRIPT_CACHE[$name][$append_keep][$base_url_code] . $append;\n }\n\n $zones = array(get_zone_name());\n if (!in_safe_mode()) {\n $zones[] = 'data_custom';\n }\n $zones[] = 'data';\n $zones = array_merge($zones, find_all_zones());\n foreach ($zones as $zone) {\n if (is_file(get_file_base() . '/' . $zone . (($zone == '') ? '' : '/') . $name . '.php')) {\n $ret = get_base_url() . '/' . $zone . (($zone == '') ? '' : '/') . $name . '.php';\n $FIND_SCRIPT_CACHE[$name][$append_keep][$base_url_code] = $ret;\n if (function_exists('persistent_cache_set')) {\n persistent_cache_set('SCRIPT_PLACES', $FIND_SCRIPT_CACHE);\n }\n return $ret . $append;\n }\n }\n $ret = get_base_url(($base_url_code == 0) ? null : ($base_url_code == 2)) . '/site/' . $name . '.php';\n $FIND_SCRIPT_CACHE[$name][$append_keep][$base_url_code] = $ret;\n if (function_exists('persistent_cache_set')) {\n persistent_cache_set('SCRIPT_PLACES', $FIND_SCRIPT_CACHE);\n }\n return $ret . $append;\n}", "function script_cdn($path)\r\n{\r\n\t$path = (env('APP_ENV') === 'local') ? $path : env('CDN_URL') . $path;\r\n\r\n\treturn '<script src=\"' . $path . '\"></script>';\r\n}", "function url_for($script_path){\r\n // return the absolute path\r\n if($script_path[0] != '/'){\r\n $script_path = \"/\" . $script_path;\r\n }\r\n return WWW_ROOT . $script_path;\r\n}", "function load_file( $name, $file_path, $is_script = false )\n\t\t\t{\n\t\t\n\t\t \t$url = content_url( $file_path, __FILE__ );\n\t\t\t\t$file = $file_path;\n\t\t\t\t\t\n\t\t\t\tif( $is_script )\n\t\t\t\t{\n\n\t\t\t\t\twp_register_script( $name, $url, '', '', true );\n\t\t\t\t\twp_enqueue_script( $name );\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\n\t\t\t\t\twp_register_style( $name, $url, '', '', true );\n\t\t\t\t\twp_enqueue_style( $name );\n\n\t\t\t\t}\n\t\t\t\n\t\t\t}", "function load_file( $name, $file_path, $is_script = false )\n\t\t\t{\n\t\t\n\t\t \t$url = content_url( $file_path, __FILE__ );\n\t\t\t\t$file = $file_path;\n\t\t\t\t\t\n\t\t\t\tif( $is_script )\n\t\t\t\t{\n\n\t\t\t\t\twp_register_script( $name, $url, '', '', true );\n\t\t\t\t\twp_enqueue_script( $name );\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\n\t\t\t\t\twp_register_style( $name, $url, '', '', true );\n\t\t\t\t\twp_enqueue_style( $name );\n\n\t\t\t\t}\n\t\t\t\n\t\t\t}", "function _getLoaderUrl (string $path, string $type) {\n\trequire_once _ROOT_PATH.'vendor/autoload.php';\n\tif (is_file($path)) {\n\n\t\t$minifyVarName = 'MINIFY_'.strtoupper($type);\n\t\t$minifyAutoVarName = 'AUTO_UPDATE_MINIFY_'.strtoupper($type);\n\t\t$minifyForceVarName = 'FORCE_UPDATE_MINIFY_'.strtoupper($type);\n\n\t\tif (getConfig($minifyVarName) !== 'true' or str_endsWith($path, 'min.'.$type)) { //Either no minify, or already a minified file\n\t\t\tif ($type == 'js') {\n\t\t\t\treturn script('', str_replace(_ROOT_PATH, _URL, $path));\n\t\t\t} elseif ($type == 'css') {\n\t\t\t\treturn linkTag(str_replace(_ROOT_PATH, _URL, $path), 'stylesheet');\n\t\t\t}\n\t\t}\n\n\t\t$fileName = explode('/', $path);\n\t\t$fileName = $fileName[count($fileName) - 1];\n\t\t$uniqId = md5($path);\n\t\t$fileName = str_removeFromEnd($fileName, '.'.$type);\n\t\t$endPath = $type.'/minified/'.$fileName.'-'.$uniqId.'.min.'.$type;\n\n\t\t$endLocalPath = _ROOT_PATH.$endPath;\n\t\t$endRemotePath = _URL.$endPath;\n\n\t\tif(\n\t\t\t(\n\t\t\t\t(\n\t\t\t\t\t!isMinifiedFileUpToDate($path, $endLocalPath)\n\t\t\t\t\tand getConfig($minifyAutoVarName) === 'true'\n\t\t\t\t)\n\t\t\t\tor\n\t\t\t\t(\n\t\t\t\t\t!is_file($endLocalPath)\n\t\t\t\t)\n\t\t\t)\n\t\t\tor\n\t\t\t\tgetConfig($minifyForceVarName) === 'true'\n\t\t) {\n\n\t\t\tif ($type == 'js') {\n\t\t\t\t$minifier = new \\MatthiasMullie\\Minify\\JS($path);\n\t\t\t} elseif ($type == 'css') {\n\t\t\t\t$minifier = new \\MatthiasMullie\\Minify\\CSS($path);\n\t\t\t}\n\t\t\t$minifier->minify($endLocalPath);\n\t\t\t$info = pathinfo($endLocalPath);\n\t\t\t$metaFile = fopen($info['dirname'].'/checksums/'.$info['filename'].'.meta', 'w');\n\t\t\ttry {\n\t\t\t\tfputs($metaFile, md5_file($path));\n\t\t\t} finally {\n\t\t\t\t@fclose($metaFile);\n\t\t\t}\n\t\t\tif (getConfig(\"VERBOSE\") == \"true\") logInfo('Generated '.str_replace(_ROOT_PATH, '', $endLocalPath).' from '.str_replace(_ROOT_PATH, '', $path));\n\t\t}\n\n\t\tif ($type == 'js') {\n\t\t\treturn script('', $endRemotePath);\n\t\t} elseif ($type == 'css') {\n\t\t\treturn linkTag($endRemotePath, 'stylesheet');\n\t\t}\n\t}\n\treturn \"\";\n}", "function abp01_wrapper_serve_script() {\n $content = null;\n $contentLength = 0;\n $protocol = $_SERVER['SERVER_PROTOCOL'];\n\n if (!in_array($protocol, array('HTTP/1.1', 'HTTP/2', 'HTTP/2.0'))) {\n $protocol = 'HTTP/1.0';\n }\n\n //See if there's anything to process\n $requestUri = abp01_wrapper_get_file_to_wrap();\n if (!empty($requestUri) && abp01_wrapper_should_serve_script($requestUri)) {\n //Locate script file and see if it's readable\n $wrapFilePath = abp01_wrapper_locate_file_from_uri($requestUri);\n if (!empty($wrapFilePath) && is_readable($wrapFilePath)) {\n $etag = abp01_wrapper_get_script_etag();\n\n if (isset($_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes($_SERVER['HTTP_IF_NONE_MATCH']) === $etag) {\n header($protocol . ' 304 Not Modified');\n die;\n }\n\n //Process content\n $content = abp01_wrapper_process_script($wrapFilePath);\n if (function_exists('mb_strlen')) {\n $contentLength = mb_strlen($content);\n } else {\n $contentLength = strlen($content);\n }\n }\n }\n\n if (!empty($content)) {\n //Spit it out\n header('Etag: ' . $etag);\n header('Content-Type: application/javascript; charset=UTF-8');\n header('Content-Length: ' . $contentLength);\n header('Expires: ' . gmdate('D, d M Y H:i:s', time() + ABP01_WRAPPED_SCRIPT_MAX_AGE) . ' GMT');\n header('Cache-Control: public, max-age=' . ABP01_WRAPPED_SCRIPT_MAX_AGE );\n echo $content;\n } else {\n header($protocol . ' 404 Not Found');\n }\n\n //We done\n die;\n}", "function LoadScripts(array $scripts) : string\n{\n $html = '';\n foreach($scripts as $script) {\n $loadScript = 'view/static/js/'.$script.'.js';\n if (is_file($loadScript)) {\n $html .= \"<script src='$loadScript'></script>\";\n // echo $html;\n } else {\n die(\"Script not found: $loadScript\");\n // show 404 here\n }\n }\n\n return $html;\n}", "public function loadTemplate($absolutPath, $optlist = null);", "protected function loadJavascript() {}", "protected static function getPathThisScript() {}", "function load_scripts($scripts_to_load)\r\n\t{\r\n\t\tglobal $available_scripts;\r\n\r\n\t\t$scripts_to_load = array_unique($scripts_to_load);\r\n\r\n\t\tforeach($scripts_to_load as $script_key => $script_to_load)\r\n\t\t{\r\n\t\t\tif (is_array($available_scripts[$script_to_load]))\r\n\t\t\t{\r\n\t\t\t\tforeach ($available_scripts[$script_to_load] as $child_key => $child_to_load)\r\n\t\t\t\t{\r\n\t\t\t\t\tsubstr($available_scripts[$script_to_load][$child_key], 0, 4) == 'http' ? $root_path = '' : $root_path = ROOT_PATH;\r\n\t\t\t\t\techo '<script type=\"text/javascript\" src=\"' . $root_path . $available_scripts[$script_to_load][$child_key] . '\"></script>' . \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsubstr($available_scripts[$script_to_load], 0, 4) == 'http' ? $root_path = '' : $root_path = ROOT_PATH;\r\n\t\t\t\techo '<script type=\"text/javascript\" src=\"' . $root_path . $available_scripts[$script_to_load] . '\"></script>' . \"\\n\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "function fetch($path) {\n\t\textract($this->_viewVars);\n\t\tif (!file_exists($path)) {\n\t\t\t$this->_fetchError($path);\n\t\t}\n\t\t$viewFile=file_get_contents($path);\n\t\t$this->processTags($viewFile);\n\t\tob_start();\n\t\teval(\"?>$viewFile<?\");\n\t\t$view=ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $view;\n\t}", "function script()\n {\n return '<script type=\"text/javascript\" src=\"' . $this->URL . '\"></script>';\n }", "function url_for($script_path) {\r\n // add the leading '/' if not present\r\n if($script_path[0] != '/') {\r\n $script_path = \"/\" . $script_path;\r\n }\r\n return WWW_ROOT . $script_path;\r\n}", "public static function generate_base_js_file_(String $path) {\n $file = file_get_contents($path);\n $file = str_replace('_URL_', Constants::$URL, $file);\n return $file;\n }", "function main()\n{\n\t\t$version = $_GET[\"version\"];\n\t\t$jsfile = DIR.\"/mxClient-$version.js\";\n\t\t\n\t\tdeliver(getScript($jsfile));\n}", "function include_js($filename)\r\n{\r\n\treturn file_get_contents($filename);\r\n}", "function url_for($script_path)\n{\n // Add a leading \"/\" if not present\n if ($script_path[0] != '/') {\n $script_path = '/' . $script_path;\n }\n return WWW_ROOT . $script_path;\n}", "function malinky_javascript_loader( $tag, $handle, $src )\n{\n\n\t$async_handles = array(\n\t\t'malinky-googlemap-min-js',\n\t\t'malinky-googlemap-api-js'\n\t);\n\t\n\tif ( is_admin() ) return $tag;\n\n\tif ( in_array( $handle, $async_handles ) ) {\n\t\t$tag = str_replace('src=', 'async src=', $tag);\n\t}\n\n\treturn $tag;\n\n}", "function getScriptUrl() ;", "public function load($path);", "public function load($path);", "public function load($path);", "function run_parse_py($path) {\n\tglobal $script_root;\n\n\t$cachePath = $path.'.zoojson';\n\tif (file_exists($cachePath) && filemtime($cachePath) > filemtime($path)) {\n\t\treturn file_get_contents($cachePath);\n\t}\n\n\t$json = run($script_root.'/parse.py '.escapeshellarg($path));\n\t// $json is an array of lines of output\n\t$json = implode('', $json);\n\tfile_put_contents($cachePath, $json);\n\treturn $json;\n}", "function pi_loadLL($file=null)\t{\n\t\tif (!$this->LOCAL_LANG_loaded && $this->scriptRelPath &&!$file)\t{\n\t\t\t$basePath = PATH_site . t3lib_extMgm::siteRelPath($this->extKey).dirname($this->scriptRelPath).'/locallang.php';\n\t\t\tif (@is_file($basePath))\t{\n\t\t\t\tinclude('./'.$basePath);\n\t\t\t\t$this->LOCAL_LANG = $LOCAL_LANG;\n\t\t\t\tif (is_array($this->conf['_LOCAL_LANG.']))\t{\n\t\t\t\t\treset($this->conf['_LOCAL_LANG.']);\n\t\t\t\t\twhile(list($k,$lA)=each($this->conf['_LOCAL_LANG.']))\t{\n\t\t\t\t\t\tif (is_array($lA))\t{\n\t\t\t\t\t\t\t$k = substr($k,0,-1);\n\t\t\t\t\t\t\t$this->LOCAL_LANG[$k] = t3lib_div::array_merge_recursive_overrule(is_array($this->LOCAL_LANG[$k])?$this->LOCAL_LANG[$k]:array(), $lA);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!$this->LOCAL_LANG_loaded && $file){\n\t\t\tif (@is_file($file))\t{\n\t\t\t\tinclude($file);\n\t\t\t\t$this->LOCAL_LANG = $LOCAL_LANG;\n\t\t\t\tif (is_array($this->conf['_LOCAL_LANG.']))\t{\n\t\t\t\t\treset($this->conf['_LOCAL_LANG.']);\n\t\t\t\t\twhile(list($k,$lA)=each($this->conf['_LOCAL_LANG.']))\t{\n\t\t\t\t\t\tif (is_array($lA))\t{\n\t\t\t\t\t\t\t$k = substr($k,0,-1);\n\t\t\t\t\t\t\t$this->LOCAL_LANG[$k] = t3lib_div::array_merge_recursive_overrule(is_array($this->LOCAL_LANG[$k])?$this->LOCAL_LANG[$k]:array(), $lA);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}\n\t\t$this->LOCAL_LANG_loaded = 1;\n\t}", "private function load_public_scripts() {\n\n\t}", "function url_for($script_path) {\n if($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n}", "function jsuni($name)\n{\n\t$jsbegin = '<script type=\"text/javascript\" src=\"';\n\t$jsend = '\"></script>';\n\tif (current_user_can('administrator')) $jspath = '/js/';\n\telse $jspath = '/js/'; //$jspath='/js/';\n\t$filename = get_stylesheet_directory() . $jspath . $name;\n\tif (file_exists($filename)) return $jsbegin . get_template_directory_uri() . $jspath . $name . '?v=' . filemtime($filename) . $jsend;\n\treturn $jsbegin . get_template_directory_uri() . $jspath . $name . $jsend;\n}", "function url_for($script_path){\n\n if ($script_path[0] != '/') {\n $script_path = '/' . $script_path;\n }\n \n return WWW_ROOT . $script_path;\n \n}", "function load_script_textdomain($handle, $domain = 'default', $path = '')\n {\n }", "function url_for($script_path) {\n //add the leading '/' if not present\n if ($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n }", "function loadFile($path) {\n require $path;\n}", "function XT_load_js($params){\n if(empty($params['file'])) {\n return false;\n } else {\n if(empty($GLOBALS['loadedscripts'][$params['file']])){\n // js ausgeben und als geladen merken\n $GLOBALS['loadedscripts'][$params['file']] = '<script type=\"text/javascript\" src=\"' . SCRIPTS_DIR . $params['file'] . '\"></script>';\n return NULL;\n }else{\n return false;\n }\n }\n}", "public function INTincScript_loadJSCode() {}", "function smarty_resource_cms_source (string $rsrc_name, string &$source, object &$smarty) \r\n{\r\n $path = $_SERVER['REQUEST_URI'];\r\n $path = rtrim($path, '/');\r\n while ($path != '')\r\n {\r\n if (file_exists($path.'/'.$rsrc_name) && is_readable($path.'/'.$rsrc_name))\r\n {\r\n $source = file_get_contents($path.'/'.$rsrc_name);\r\n return true;\r\n }\r\n $pos = strrpos($path, '/');\r\n if ($pos !== false)\r\n {\r\n $path = substr($path, 0, $pos);\r\n }\r\n }\r\n return false;\r\n}", "static function script(){\n\n\t\t$phelper = new PrivilegeHelper();\n\t\t\n\t\t$uid = Request::getVar(\"a_uid\",\"cookie\");\n\t\t$privilege = explode(\",\",$phelper->getPrivilege($uid));\n\t\t\n\t\t$config = new Config();\n\t\t$privilegeConfig = $config->getConfig(\"privilege\");\n\t\t$globalConfig = $config->getConfig(\"global\");\n\t\t\n\t\t$privilegeList = $privilegeConfig->privilege();\n\t\t$script = <<<END\n\t\t\t<script>\n\t\t\tvar title = \"{$globalConfig->title}\";\n\t\t\tvar folders = new Array();\nEND;\n\t\tforeach($privilegeList as $i=>$item){\n\t\t\tif(in_array($i,$privilege)||$i==(count($privilegeList)-1)){\n\t\t\t\t$script .= self::_getScriptItem($privilegeList[$i]);\n\t\t\t}\n\t\t}\n\t\t$script .= \"</script>\";\n\t\t\n\t\treturn $script;\n\t}", "function __auto_load($epath)\n{\n //$epath = empty($epath)?SITE_ROOT:$epath;\n $r = $epath . 'Runtime/';\n $end_fun_file = $r . '~fun.php';\n if (!is_file($end_fun_file)) {\n $data = '';\n $dir = $epath . 'Common';\n $path = read_dir($dir, true);\n $filelist = array();\n foreach ($path as $file) {\n $file = $file['full'];\n $ext = trim(substr($file, -8, 8));\n if ($ext == '.fun.php') {\n $filelist[] = $file;\n }\n }\n if ($filelist) {\n foreach ($filelist as $e)\n $data .= __parse($e);\n mkdirs_a($r);\n if (!file_put_contents($end_fun_file, '<?php ' . $data))\n exit('please check the web root path is can write!');\n }\n unset($data, $filelist);\n }\n !function_exists('require_cache') ? require_once $end_fun_file : require_cache($end_fun_file);\n}", "function load();", "function broadway_scripts(){\n}", "function module_fileLoad($val, $data)\n{\n\t$ext\t= explode('.', $data);\n\t$ext\t= end($ext);\n\t$ext\t= strtolower($ext);\n\tswitch($ext){\n\tcase 'js':\treturn module_scriptLoad($val, $data);\n\tcase 'css':\treturn module_styleLoad($val, $data);\n\t}\n}", "function get_the_file($file_path) {\n\n md_include_component_file($file_path);\n\n }", "public static function loadCDNLanguage() {\n\t\tglobal $_LANG, $CONFIG;\n\n\t\t$currentDir = getcwd();\n\t\tchdir( dirname( __FILE__ ) . '/lang/' );\n\t\t$availableLangs = glob( '*.txt' );\n\n\t\t$language = isset( $_SESSION[ 'Language' ] ) ? $_SESSION[ 'Language' ] : $CONFIG[ 'Language' ];\n\t\t$language = ucfirst( $language ) . '.txt';\n\n\t\tif( ! in_array( $language, $availableLangs ) ) {\n\t\t\t$language = 'English.txt';\n\t\t}\n\n\t\t$templang = file_get_contents( dirname( __FILE__ ) . '/lang/' . $language );\n\t\teval ( $templang );\n\t\tchdir( $currentDir );\n\t}", "function pj_otr_leafletjs(){\r\n\tif (!is_admin()){ //don't load these in admin\r\n\t\t// Register\r\n\t\twp_register_script('leafletjs', 'http://code.leafletjs.com/leaflet-0.3.1/leaflet.js', 'jquery');\r\n\t\twp_register_style('leafletjs', 'http://code.leafletjs.com/leaflet-0.3.1/leaflet.css');\r\n\t\twp_register_style('leafletjsie', 'http://code.leafletjs.com/leaflet-0.3.1/leaflet.ie.css');\r\n\t\t\r\n\t\t// Enqueue\r\n\t\twp_enqueue_script('jquery');\r\n\t\twp_enqueue_script('leafletjs');\r\n\t\twp_enqueue_style( 'leafletjs');\r\n\t\t$GLOBALS['wp_styles']->add_data( 'leafletjsie', 'conditional', 'lte IE 8' ); // add condition to IE-only style\r\n\t\twp_enqueue_style( 'leafletjsie');\r\n\t}\r\n}", "function loadContents() ;", "public function loadLegacyScript(string $requestPath, string $legacyScript)\n {\n\n // $response = new StreamedResponse();\n // there's no dif between StreamedResponse and NoSymfonyHeader_StreamedResponse, the latter is only\n // a reminder that headers determined by Dolibarr, not Symfony\n $response = new NoSymfonyHeader_StreamedResponse();\n\n $response->setCallback(\n function () use ($requestPath, $legacyScript) {\n $_SERVER['PHP_SELF'] = $requestPath;\n $_SERVER['SCRIPT_NAME'] = $requestPath;\n $_SERVER['SCRIPT_FILENAME'] = $legacyScript;\n\n chdir(dirname($legacyScript));\n\n global $website, $websitepage;\n global $canvas;\n global $form, $formadmin, $formcompany;\n global $limit, $offset, $sortfield, $sortorder;\n global $region_id;\n global $tree_recur_alreadyadded, $menu_handler_to_search;\n global $param, $massactionbutton;\n global $dolibarr_main_cookie_cryptkey;\n global $dolibarr_main_url_root;\n global $extrafields;\n global $outputlangsbis;\n global $inputalsopricewithtax, $usemargins, $disableedit, $disablemove, $disableremove, $outputalsopricetotalwithtax;\n global $maxwidthsmall, $maxheightsmall, $maxwidthmini, $maxheightmini, $quality;\n global $action;\n global $dolibarr_main_data_root;\n global $price_level, $status, $finished;\n global $delayedhtmlcontent;\n global $bc, $action;\n global $sortfield, $sortorder, $maxheightmini;\n global $mainmenu, $leftmenu;\n global $dolibarr_main_db_name, $dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_port, $dolibarr_main_db_pass;\n global $main_data_dir;\n global $Config;\n global $website;\n global $_FILES;\n global $_GET;\n global $_SERVER;\n global $_Avery_Labels;\n global $begin_h, $end_h, $begin_d, $end_d;\n global $genbarcode_loc;\n global $bar_color, $bg_color, $text_color;\n global $font_loc, $filebarcode;\n global $param, $massactionbutton;\n global $helptext1, $helptext2;\n global $maxwidthsmall, $maxheightsmall, $maxwidthmini, $maxheightmini;\n global $errormsg;\n global $conffile;\n global $_Avery_Labels;\n global $dolibarr_main_prod;\n global $cache_codes;\n global $rights;\n global $micro_start_time;\n global $dictvalues;\n // \\core\\lib\\memory\n global $shmkeys, $shmoffset, $dolmemcache, $m, $shmkeys, $shmoffset;\n // core\\lib\\product\n global $measuring_unit_cache;\n global $projectstatic, $taskstatic, $extrafields;\n global $total_projectlinesa_spent, $total_projectlinesa_planned, $total_projectlinesa_spent_if_planned, $total_projectlinesa_declared_if_planned, $total_projectlinesa_tobill, $total_projectlinesa_billed;\n global $formother, $projectstatic, $taskstatic, $thirdpartystatic;\n global $daytoparse;\n global $numstartworkingday, $numendworkingday;\n global $noMoreLinkedObjectBlockAfter;\n // \\core\\lib\\company\n global $param, $massactionbutton;\n // \\core\\lib\\ecm.lib.php\n global $helptext1, $helptext2;\n // \\core\\lib\\files\n global $conffile;\n // \\core\\lib\\login\n global $mc;\n global $dolibarr_main_auth_ldap_host, $dolibarr_main_auth_ldap_port;\n global $dolibarr_main_auth_ldap_version, $dolibarr_main_auth_ldap_servertype;\n global $dolibarr_main_auth_ldap_login_attribute, $dolibarr_main_auth_ldap_dn;\n global $dolibarr_main_auth_ldap_admin_login, $dolibarr_main_auth_ldap_admin_pass;\n global $dolibarr_main_auth_ldap_filter;\n global $dolibarr_main_auth_ldap_debug;\n // core\\modules\\\n global $tablewithentity_cache;\n global $forceimgscalewidth, $forceimgscaleheight;\n global $stock;\n // core/tpl\n global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax;\n global $forcetoshowtitlelines;\n\n /*\n * includes\n */\n global $ADODB_DATETIME_CLASS;\n global $_month_table_normal, $_month_table_leaf;\n global $ADODB_DATE_LOCALE;\n global $HTTP_SERVER_VARS;\n global $count;\n global $__disable_iiban_gmp_extension;\n global $_iban_registry;\n global $_iban_mistranscriptions;\n global $call_trace;\n global $baseDir, $version;\n global $stats, $output;\n\n /*\n * main.inc.php\n */\n global $db, $conf, $langs, $form, $user, $object, $mysoc, $hookmanager;\n global $mainmenu, $menumanager;\n global $debugbar;\n global $dolibarr_main_authentication, $dolibarr_main_demo;\n global $delayedhtmlcontent;\n global $contextpage, $page, $limit;\n\n /**\n * /timesheet\n */\n global $projettasktimeStatusPictoArray, $projettasktimeStatusArray;\n global $attendanceeventStatusPictoArray, $attendanceeventStatusArray;\n global $statusColor;\n global $apflows;\n global $dolibarr_main_url_root_alt;\n\n /*\n * /theme\n */\n global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;\n // todo\n// global ${$statusVarNamePrefix.'badgeStatus'.$statusName}, ${$statusVarNamePrefix.'badgeStatus_textColor'.$statusName};\n\n /*\n * accountancy/\n */\n if (strpos($requestPath, '/accountancy') === 0) {\n global $elementList, $sourceList, $localtax_typeList;\n global $search_date_end;\n\n } elseif (strpos($requestPath, '/emailcollector') === 0) {\n global $htmlmsg, $plainmsg, $charset, $attachments;\n\n } elseif (strpos($requestPath, '/exports') === 0) {\n global $tmpobjforcomputecall;\n } elseif (strpos($requestPath, '/product') === 0) {\n global $search_categ, $sall, $sref, $search_barcode, $snom, $catid;\n } elseif (strpos($requestPath, '/paypal') === 0) {\n global $API_Endpoint, $API_Url, $API_version, $USE_PROXY, $PROXY_HOST, $PROXY_PORT;\n global $PAYPAL_API_USER, $PAYPAL_API_PASSWORD, $PAYPAL_API_SIGNATURE;\n global $shipToName, $shipToStreet, $shipToCity, $shipToState, $shipToCountryCode, $shipToZip, $shipToStreet2, $phoneNum;\n global $email, $desc;\n } elseif (strpos($requestPath, '/societe') === 0) {\n global $stripearrayofkeysbyenv;\n }\n\n /**\n * dolibarr v12 uses old syntax. symfony ErrorHandler would catch error like:\n *\n $type = 8192 // is E_DEPRECATED\n $message = \"Array and string offset access syntax with curly braces is deprecated\"\n */\n // does not work, maybe reason is Dolibarr also uses error_reporting.\n// $level = error_reporting();\n// $level |= E_RECOVERABLE_ERROR | E_USER_ERROR | E_DEPRECATED | E_USER_DEPRECATED;\n// error_reporting($level & ~E_DEPRECATED& ~E_USER_DEPRECATED);\n\n require $legacyScript;\n\n }\n );\n\n\n\n return $response;\n }", "function br_allocator() {\n readfile(plugins_url(\"allocator-content.php\", __FILE__));\n\n}", "private function loadScripts() {\n\t\tif(isset($this->scripts) && $this->scripts != \"\") {\n\t\t\tforeach (explode(\",\", $this->scripts) as $script) {\n\t\t\t\tOCP\\Util::addscript('ocDashboard', 'widgets/'.$this->id.'/'.$script);\n\t\t\t}\n\t\t}\n\t}", "function url_for($script_path) {\n\t// adds the leading '/' if it isn't already passed through the argument\n\tif($script_path[0] != '/') {\n\t\t$script_path = \"/\" . $script_path;\n\t}\n\treturn WWW_ROOT . $script_path;\n}", "public function loadControl($path){\n\t\t\t//echo $paht;\n\t\t\t$control = Configuration::getParameter(\"TEMPLATE_FOLDER_PATH\") . $path;\n\t\t\t$userControl = file_get_contents($control, \"r\");\n\t\t\t$domDocument = str_get_html($userControl);\n\t\t\t$userControl = self::parsePage($domDocument);\n\t\t\treturn $userControl; \n\t\t}", "function load_script_translations($file, $handle, $domain)\n {\n }", "public function getLocalPath();", "function url_for($script_path){\n\nif($script_path[0] != '/'){\n \n $script_path = \"/\" . $script_path;\n}\n\n//echo WWW_ROOT .$script_path;\n\n\nreturn WWW_ROOT . $script_path;\n\n}", "function urlForPath($script_path)\n{\n // Add the leading '/' if not present\n if ($script_path[0] != '/') {\n $script_path = '/' . $script_path;\n }\n return WWW_ROOT . $script_path;\n}", "public function getLocalPath($path);", "static public function loadIngoScript()\n {\n return Ingo_Script::factory(\n $GLOBALS['session']->get('ingo', 'backend/script'),\n $GLOBALS['session']->get('ingo', 'backend/scriptparams', Horde_Session::TYPE_ARRAY)\n );\n }", "function themes_get_language($script = 'global')\n{\n}", "public function get_js($path='')\n\t{\n if ( $r = $this->get_view($path, 'js') ){\n return '\n<script>\n(function($){\n'.$r.'\n})(jQuery);\n</script>';\n }\n\t\treturn false;\n }", "function LoadTemplate( $name )\n{\n if ( file_exists(\"$name.html\") ) return file_get_contents(\"$name.html\");\n if ( file_exists(\"templates/$name.html\") ) return file_get_contents(\"templates/$name.html\");\n if ( file_exists(\"../templates/$name.html\") ) return file_get_contents(\"../templates/$name.html\");\n}", "protected function _script($name)\n {\n $fname = self::$scriptPath . '/' . $name;\n if (is_readable($fname)) \n {\n return $fname;\n }\n\n $message = \"script '$name' not found in path (\"\n . self::$scriptPath\n . \")\";\n throw new Dune_Exception_Base($message);\n }", "function getCodeFile()\r\n\t{\r\n\t\t$haveServer= isset( $_SERVER );\r\n\t\tif ($haveServer && array_key_exists( \"PATH_TRANSLATED\", $_SERVER ) ) {\r\n\t\t\t$codefile = $_SERVER[\"PATH_TRANSLATED\"];\r\n\t\t}\r\n\t\telse if ( $haveServer && array_key_exists( \"ORIG_PATH_TRANSLATED\", $_SERVER ) ) {\r\n\t\t\t$codefile = $_SERVER[\"ORIG_PATH_TRANSLATED\"];\r\n\t\t}\r\n\t\telse if ( $haveServer && array_key_exists( \"SCRIPT_FILENAME\", $_SERVER ) ) {\r\n\t\t\t$codefile = $_SERVER[\"SCRIPT_FILENAME\"];\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$codefile = getcwd() . \"/\" . $_SERVER[ \"argv\" ][0];\r\n\t\t}\r\n\t\treturn( $codefile );\r\n\t}", "abstract public function getJsFilePath();", "function portal_get_template_part( $path ) {\n\tinclude( portal_template_hierarchy( $path . '.php' ) );\n}", "function Load(string $function):void\n{\n\t//\tDeny relative path\n\tif( strpos($function, '/') ){\n\t\tthrow new \\Exception(\"Deny relative path. ($function)\");\n\t}\n\n\t//\t...\n\t$root = RootPath('asset');\n\n\t//\t...\n\tif( file_exists($path = \"{$root}function/{$function}.php\") ){\n\t\trequire_once($path);\n\t}else\n\n\t//\t...\n\tif( file_exists($path = \"{$root}core/function/{$function}.php\") ){\n\t\trequire_once($path);\n\t}else\n\n\t//\t...\n\tif( true ){\n\t\tthrow new \\Exception(\"This function file cannot be found. ($function)\");\n\t}\n}", "function module_scriptLoad($val, $data)\n{\n\tif (!$data) return;\n\tsetCacheData(\"scriptLoad\", $data);\n\t\n\t$store\t= config::get(':scripts', array());\n\tif ($store[$data]) return;\n\n\t$store[$data] = $data;\n\tconfig::set(':scripts', $store);\n}", "protected function loadFromVersion()\n {\n return $this->loadVersion($this->context['source_dir']);\n }", "function combo_load()\r\n\t{\r\n\t\t$this->output->enable_profiler(FALSE);\r\n\r\n\t\t$contents\t= '';\r\n\t\t$folder \t= $this->config->item('use_compressed_js') == 'n' ? 'src' : 'compressed';\r\n\t\t$types\t\t= array(\r\n\t\t\t'effect'\t=> PATH_JQUERY.'ui/jquery.effects.',\r\n\t\t\t'ui'\t\t=> PATH_JQUERY.'ui/jquery.ui.',\r\n\t\t\t'plugin'\t=> PATH_JQUERY.'plugins/',\r\n\t\t\t'file'\t\t=> PATH_THEMES.'javascript/'.$folder.'/',\r\n\t\t\t'package'\t=> PATH_THIRD,\r\n\t\t\t'fp_module'\t=> PATH_MOD\r\n\t\t);\r\n\t\t\r\n\t\t$mock_name = '';\r\n\t\t\r\n\t\tforeach($types as $type => $path)\r\n\t\t{\r\n\t\t\t$mock_name .= $this->input->get_post($type);\r\n\t\t\t$files = explode(',', $this->input->get_post($type));\r\n\t\t\t\r\n\t\t\tforeach($files as $file)\r\n\t\t\t{\r\n\t\t\t\tif ($type == 'package' OR $type == 'fp_module')\r\n\t\t\t\t{\r\n\t\t\t\t\t$file = $file.'/javascript/'.$file;\r\n\t\t\t\t}\r\n\t\t\t\telseif ($type == 'file')\r\n\t\t\t\t{\r\n\t\t\t\t\t$parts = explode('/', $file);\r\n\t\t\t\t\t$file = array();\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ($parts as $part)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($part != '..')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$file[] = $this->security->sanitize_filename($part);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t$file = implode('/', $file);\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$file = $this->security->sanitize_filename($file);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$file = $path.$file.'.js';\r\n\r\n\t\t\t\tif (file_exists($file))\r\n\t\t\t\t{\r\n\t\t\t\t\t$contents .= file_get_contents($file).\"\\n\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$modified = $this->input->get_post('v');\r\n\r\n\t\t$this->_set_headers($mock_name, $modified);\r\n\t\t\r\n\t\t$this->output->set_header('Content-Length: '.strlen($contents));\r\n\t\t$this->output->set_output($contents);\r\n\t}", "private static function _getScripts($name) {\n $script = self::_getRemoteStoreUrlFromDB() . '/' . self::_getRteWebpackageFromDB() . '/' . self::$scripts[$name];\n return $script;\n }", "function index_php($aData) {\n $file = '\n<?php\n\n// include Liber framework\ninclude_once \"../Liber/Liber.php\";\n\n// prepares enviroment to Liber application\nLiber::loadApp( realpath(\"../app/\").\"/\" );\n\n// avoid cache\nheader(\"Pragma: public\");\nheader(\"Expires: -1\");\nheader(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\nheader(\"Cache-Control: private\",false);\nheader(\"Cache-Control: no-cache\");\n\nLiber::run();\n?>\n';\n\n return trim($file);\n}", "public function autoContent() \n {\n $path = 'contents/'.$_SESSION['language'].'/'.$this->params['controller_id'].'/'.$this->params['action_id'].'.php';\n\n if (file_exists($path))\n {\n return $path;\n }\n else \n {\n $path = 'contents/polyglot/'.$this->params['controller_id'].'/'.$this->params['action_id'].'.php';\n\n if (file_exists($path))\n {\n return $path;\n }\n else\n {\n return false;\n }\n }\n }", "public static function get($_path)\r\n {\r\n if($this->isFile($_path))\r\n {\r\n return file_get_contents($_path);\r\n }\r\n }", "static function loadFiles()\r\n\t{\r\n\t\t//required files\r\n\t\t\r\n\t\t//load bibliotek\r\n\t\t$paths = array(rp_self.\"lib/\");\r\n\t\t$to_header = array();\r\n\t\tforeach($paths as $path)\r\n\t\t{\r\n\t\t\t$scan = scandir($path);\r\n\t\t\tforeach($scan as $file)\r\n\t\t\t{\r\n\t\t\t\tif(is_file($path.$file))\r\n\t\t\t\t{\r\n\t\t\t\t\t$ext = explode(\".\", $file);\r\n\t\t\t\t\t$ext = $ext[1];\r\n\t\t\t\t\tif($ext == \"php\")\r\n\t\t\t\t\t\trequire_once($path.$file);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//tilføj script tag til header hvis det er javascript\r\n\t\t\t\t\tif($ext == 'js')\r\n\t\t\t\t\t\t$to_header[] = '<script type=\"text/javascript\" src=\"'.$path.$file.'\"></script>';\r\n\t\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 implode('', $to_header);\r\n\t}", "public function forgeScript()\n {\n // check if we have a script creation array\n if ($this->provider && isset($this->provider['render']['script'])) {\n // Start script tag.\n $script = '<script';\n\n foreach ($this->provider['render']['script'] as $attribute => $val) {\n $script .= sprintf(' %s=\"%s\"', $attribute, $val);\n }\n\n // Close script tag.\n $script .='></script>';\n\n return $script;\n }\n }", "function script_loader_filter ($src) {\n if (FALSE === strpos ($src, 'ajax.googleapis.com')) {\n\treturn $src;\n }\n\n $new_src = explode('?', $src);\n return $new_src[0];\n\n}", "function load() {\n\n\t}", "static public function getScript()\n {\n return self::getTransport()->getScript();\n }", "function load( $path = '', $data = array(), $return = false, $base = null ) {\n\t\t\n\t\tif ( is_null( $base ) ) {\n\t\t\t$base = get_stylesheet_directory();\n\t\t}\n\t\t\n\t\tif ( is_child_theme() ) {\n\t\t\t$full_path = $base . $path;\n\t\t\tif ( ! file_exists( $full_path ) ) {\n\t\t\t\t$base = get_template_directory();\n\t\t\t\t$full_path = $base . $path . '.php';\n\t\t\t}\n\t\t} else {\n\t\t\t$full_path = $base . $path . '.php';\n\t\t}\n\t\t\n\t\tif ( $return ) {\n\t\t\tob_start();\n\t\t}\n\t\t\n\t\tif ( file_exists( $full_path ) ) {\n\t\t\t\n\t\t\trequire $full_path;\n\t\t\t\n\t\t} else {\n\t\t\tthrow new \\Exception( 'The view path ' . $full_path . ' can not be found.' );\n\t\t}\n\t\t\n\t\tif ( $return ) {\n\t\t\treturn ob_get_clean();\n\t\t}\n\t\t\n\t}", "public function clientScript($path,$type)\n {\n \n if($type===\"js\")\n \n return '<script src=\"'.$path.'\"></script>'.\"\\n\";\n elseif($type===\"css\")\n \n return'<link rel=\"stylesheet\" href=\"'.$path.'\">'.\"\\n\";\n else\n \n return \"Notice: missing argument 2 type js or css\";\n \n }" ]
[ "0.6449842", "0.5865764", "0.5599731", "0.55700177", "0.552252", "0.54976875", "0.5435847", "0.5417914", "0.53838855", "0.5346196", "0.52967095", "0.5290816", "0.52783114", "0.52735645", "0.5273324", "0.5264379", "0.5247112", "0.5242641", "0.52313733", "0.5229745", "0.52160615", "0.51993436", "0.5198949", "0.5183728", "0.5175839", "0.51577246", "0.51577246", "0.5142171", "0.5137312", "0.5128989", "0.5124877", "0.51238334", "0.50878626", "0.5066888", "0.5063114", "0.5060026", "0.50563365", "0.5050116", "0.5046514", "0.5039549", "0.50390106", "0.5035455", "0.50317377", "0.50237864", "0.50237864", "0.50237864", "0.50163394", "0.5011594", "0.49935678", "0.49781236", "0.49744278", "0.49739018", "0.49703127", "0.49651086", "0.49585423", "0.4958497", "0.4950035", "0.4949354", "0.4941741", "0.49298206", "0.49295187", "0.49292102", "0.49290508", "0.49237424", "0.49158624", "0.4905368", "0.49040467", "0.49040452", "0.4893167", "0.48930952", "0.48920304", "0.48808515", "0.48766363", "0.4862098", "0.48570168", "0.48567644", "0.48562086", "0.48478907", "0.48413384", "0.4840771", "0.4819936", "0.48161724", "0.4813536", "0.48134565", "0.48125786", "0.48093212", "0.48055196", "0.47949287", "0.4792641", "0.47890624", "0.47866583", "0.4784476", "0.47830746", "0.4780337", "0.4779736", "0.47765696", "0.47716495", "0.47653732", "0.47633553", "0.47607973" ]
0.62271595
1
Run the entire script wrapping process
function abp01_wrapper_serve_script() { $content = null; $contentLength = 0; $protocol = $_SERVER['SERVER_PROTOCOL']; if (!in_array($protocol, array('HTTP/1.1', 'HTTP/2', 'HTTP/2.0'))) { $protocol = 'HTTP/1.0'; } //See if there's anything to process $requestUri = abp01_wrapper_get_file_to_wrap(); if (!empty($requestUri) && abp01_wrapper_should_serve_script($requestUri)) { //Locate script file and see if it's readable $wrapFilePath = abp01_wrapper_locate_file_from_uri($requestUri); if (!empty($wrapFilePath) && is_readable($wrapFilePath)) { $etag = abp01_wrapper_get_script_etag(); if (isset($_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes($_SERVER['HTTP_IF_NONE_MATCH']) === $etag) { header($protocol . ' 304 Not Modified'); die; } //Process content $content = abp01_wrapper_process_script($wrapFilePath); if (function_exists('mb_strlen')) { $contentLength = mb_strlen($content); } else { $contentLength = strlen($content); } } } if (!empty($content)) { //Spit it out header('Etag: ' . $etag); header('Content-Type: application/javascript; charset=UTF-8'); header('Content-Length: ' . $contentLength); header('Expires: ' . gmdate('D, d M Y H:i:s', time() + ABP01_WRAPPED_SCRIPT_MAX_AGE) . ' GMT'); header('Cache-Control: public, max-age=' . ABP01_WRAPPED_SCRIPT_MAX_AGE ); echo $content; } else { header($protocol . ' 404 Not Found'); } //We done die; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function exec();", "public function exec() { \n $this->codeInjectionCheck();\n /* \n -s Don't add user site directory to sys.path.\n\n -S Disable the import of the module site and the site-dependent\n manipulations of sys.path that it entails.\n (think to create a black list of modules...)\n */ \n //$command = \"export PYTHONDUMPREFS=1 & \" . $this->kernelPath . \" -s -c '\" . $this->code . \"'\";\n $command = $this->kernelPath . \" -c '\" . $this->code . \"' \" . ($this->showSTDERR ? \" 2>&1 \" : \"\");\n $this->output = `$command`;\n }", "protected function main()\n /**/\n {\n parent::run();\n }", "public function run() {\n\t\t$this->checkForHelp();\n\n\t\ttry {\n\t\t\t$this->getAndRunTasks();\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\t$this->printException($e);\n\t\t}\n\t}", "public static function run() {\n\t}", "protected function _exec()\n {\n }", "public function run () {\n\t\trequire_once $this->pluginFile;\n\t}", "function run() {\n\t\t$this->_hook(Hooks::initialize);\n\t\tdo {\n\t\t\ttouch(TMP . 'autopilot_running');\n\t\t\t$this->_getToGreen();\n\t\t\t$this->_rerunAllTests();\n\t\t\t$this->_waitForChanges();\n\t\t} while (!file_exists(TMP . 'autopilot_stop'));\n\t\t$this->_hook(Hooks::quit);\n\t\tunlink(TMP . 'autopilot_running');\n\t}", "abstract protected function _run();", "abstract protected function _run();", "public function execute()\n\t{\n\t\t$this->run();\n\t}", "public function run(): void\n {\n $command = $this->composeCommand();\n\n $command = is_windows_os()\n ? \"start /B {$command}\"\n : \"({$command}) > /dev/null 2>&1 &\";\n\n exec($command);\n }", "public function execute()\n {\n $this->run();\n }", "public function run()\n\t{\n\t\t$method = $this->method;\n\t\t\n\t\tif(!$this->extension_ran)\n\t\t{\n\t\t\t$this->$method();\n\t\t}\n\t\t\n\t\tif ($this->EE->extensions->active_hook('export_it_api_end') === TRUE)\n\t\t{\n\t\t\t$this->EE->extensions->call('export_it_api_end', $this);\n\t\t\tif ($this->EE->extensions->end_script === TRUE) return;\n\t\t}\t\t\n\t\texit;\n\t}", "public function run() {\n\t\t$this->loader->run();\n\t}", "public function run() {\n\t\t$this->loader->run();\n\t}", "public function run() {\n\t\t$this->loader->run();\n\t}", "public function run() {\n\t\t$this->loader->run();\n\t}", "public function run() {\n\t\t$this->loader->run();\n\t}", "public function run() {\n\t\t$this->loader->run();\n\t}", "public function run() {\n\t\t$this->loader->run();\n\t}", "public function run() {\n\t\t$this->loader->run();\n\t}", "public function run() {\n\t\t$this->loader->run();\n\t}", "public abstract function run();", "public abstract function run();", "protected abstract function executeProcess();", "protected function runScript(UpgradeScript $script)\n {\n set_error_handler(array($this, 'scriptErrorHandler'), E_ALL & ~E_STRICT & ~E_DEPRECATED);\n ob_start();\n try {\n $script->run($this);\n } catch (Exception $e) {\n $this->error(\"Exception: \" . $e->getMessage());\n }\n $out = ob_get_clean();\n if ($out) {\n $this->log(\"OUTPUT: $out\");\n }\n restore_error_handler();\n }", "public static function run(): void;", "protected function invokeScript() {\n $fileSystem = $this->system->getFileSystem();\n\n $directory = $fileSystem->getTemporaryFile();\n $directory->delete();\n $directory->create();\n $directoryAbsolute = $directory->getAbsolutePath();\n\n $this->appendOutput(\"# Created working directory \" . $directoryAbsolute);\n\n $cwd = getcwd();\n $exception = null;\n\n try {\n chdir($directoryAbsolute);\n\n $variables = $this->getCommandVariables($directoryAbsolute);\n\n $commands = array();\n if ($this->builder->getWillCheckout()) {\n $commands = array_merge($commands, $this->vcsManager->getCheckoutCommands());\n }\n $commands = array_merge($commands, explode(\"\\n\", $this->builder->getScript()));\n\n foreach ($commands as $command) {\n $command = $this->parseCommandVariables($command, $variables);\n\n $this->appendOutput($command);\n\n if (substr($command, 0, 3) == 'cd ') {\n chdir(substr($command, 3));\n\n continue;\n }\n\n // if (strpos($command, ' 2>') === false) {\n // $command .= ' 2>&1';\n // }\n\n $output = $this->system->executeInShell(array('export PATH=/usr/local/bin:/usr/bin:$PATH', $command), $code);\n if ($code != 0) {\n throw new Exception('Command returned code ' . $code . ': ' . $command);\n }\n\n $output = array_slice($output, 4);\n\n $this->appendCommandOutput($output);\n }\n } catch (Exception $exception) {\n $this->setException($exception);\n }\n\n chdir($cwd);\n $directory->delete();\n\n $this->appendOutput(\"# Deleted working directory \" . $directory->getAbsolutePath());\n }", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "function execute() {\n\t\tif (empty($this->args)) {\n\t\t\t$this->__interactive();\n\t\t}\n\n\t\tif (count($this->args) == 1) {\n\t\t\t$this->__interactive($this->args[0]);\n\t\t}\n\n\t\tif (count($this->args) > 1) {\n\t\t\t$type = Inflector::underscore($this->args[0]);\n\t\t\tif ($this->bake($type, $this->args[1])) {\n\t\t\t\t$this->out('done');\n\t\t\t}\n\t\t}\n\t}", "public function run() {\n\t\t$this->preRun();\n\n\t\t$this->changeTags();\n\n\t\t$this->postRun();\n\t}", "abstract public function run();", "abstract public function run();", "abstract public function run();", "abstract public function run();", "abstract public function run();", "abstract public function run();", "abstract public function run();", "abstract public function run();", "public function Process() {\n\t\tforeach($this->modules as $module) {\n\t\t\t$module->Run();\n\t\t}\n\t}", "protected abstract function run();", "public function run(){}", "public function run() {\n if (count($this->argv) <= 1) {\n echo \"No input command text file provided.\\n\";\n }\n foreach($this->argv as $key => $filePath) {\n if ($key === 0) {\n //Skipping first argument received from console as it is the filename of the script\n continue;\n }\n try {\n $this->executeCommands($this->getCommands($filePath));\n } catch (CommandFileNotFoundException $e) {\n echo $e->getMessage() . \"\\n\";\n }\n }\n }", "private function doRunIsolated()\n {\n ob_start();\n $output = call_user_func_array([$this, 'doRun'], func_get_args());\n ob_end_clean();\n\n return $output;\n }", "abstract function run();", "function run()\r\n {\r\n }", "function run();", "function run();", "function main() {\n\t\tif (!$this->_registerPid()) {\n\t\t\t$this->out('Unable to register Pid');\n\t\t\t$this->_stop();\n\t\t}\n\t\tif (file_exists($this->params['working'] . DS . '.autotest')) {\n\t\t\tinclude($this->params['working'] . DS . '.autotest');\n\t\t}\n\t\tif (!empty($this->params['notify'])) {\n\t\t\t$this->settings['notify'] = $this->params['notify'];\n\t\t}\n\t\tif (!empty($this->params['mode'])) {\n\t\t\t$this->settings['mode'] = $this->params['mode'];\n\t\t}\n\t\t$suffix = '';\n\t\tif (!empty($this->settings['mode'])) {\n\t\t\t$suffix = ' (' . $this->settings['mode'] . ' mode)';\n\t\t}\n\n\t\tNotify::$method = $this->settings['notify'];\n\t\t$this->addHooks();\n\t\tNotify::message('Autopilot Starting', 'in ' . APP_DIR . $suffix, 0, false);\n\t\t$this->buildPaths();\n\t\t$this->run();\n\t}", "public function run()\n {\n $items = $this->app->args->getParams('wild');\n list($proj, $env) = SettingFiles::extractProjEnv($items);\n\n $key = $proj . \".\" . $env;\n if (!Check::fileExists($key)) {\n $msg = Facilitator::onNoFileFound($proj, $env);\n \n $this->app->display($msg, 0);\n return;\n }\n\n $settings = SettingFiles::getObject($key);\n $rsync = new Rsync($settings);\n\n $msg = Facilitator::rsyncBanner($proj, $env, $rsync->cmd);\n $this->app->inline($msg);\n\n if ($this->app->args->simulate) {\n $msg = 'Simulation mode' . \"\\n\";\n\n $this->app->display($msg, 0);\n return;\n }\n\n $rsync->run();\n }", "public function exec()\n\t\t{\n\t\t\t$this->start_time = microtime(true);\n\n\t\t\twhile (!empty($this->queue)) {\n\t\t\t\t$mod = array_shift($this->queue);\n\n\t\t\t\tif (!$this->stopped) {\n\t\t\t\t\t$retval = $mod->exec();\n\n\t\t\t\t\tif (any($this->redirect[self::REDIRECT_LATER])) {\n\t\t\t\t\t\t$r = &$this->redirect[self::REDIRECT_LATER];\n\t\t\t\t\t\t\\System\\Http\\Response::redirect($r['url'], $r['code']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->stop_time = microtime(true);\n\n\t\t\tif (any($this->redirect[self::REDIRECT_AFTER_MODULES])) {\n\t\t\t\t$r = &$this->redirect[self::REDIRECT_AFTER_MODULES];\n\t\t\t\t\\System\\Http\\Response::redirect($r['url'], $r['code']);\n\t\t\t}\n\t\t}", "public function run() {\n $this->script_start($this->class_name.'::'.__FUNCTION__);\n try {\n $this->process();\n $this->console_writer->flush();\n } catch (\\Exception $exception) {\n $this->has_error = true;\n $this->db->rollback();\n $this->error = $exception->getMessage();\n echo $this->console_writer->sprintf(\"\\e[0;31mE: %s\\e[0m\", $exception->getMessage()).PHP_EOL;\n echo $exception->getTraceAsString().PHP_EOL;\n $this->script_end();\n throw $exception;\n }\n $this->script_end();\n }", "public function run()\n {\n $this->loader->run();\n }", "public function run()\r\n {\r\n $this->slim->run();\r\n }", "public function run() {\n $this->loader->run();\n }", "public function run() {}", "public function run() {\n\t\t$this->create_instances();\n\t\t$this->register_hooks();\n\t}", "public function run(){\n parent::run();\n //Do stuff...\n }", "abstract public function run() ;", "private function execute()\n\t{\n\t\t// set working dir and cli path\n\t\t$this->workingDir = getcwd();\n\t\t$this->cliPath = $this->argv[0];\n\n\t\t// get home directory\n\t\t$this->getHomeDir();\n\t}", "private function execRunHandler()\n {\n // guarantee that only one process can be run at one time\n // use socket as lock\n Log::info('Try to start handling process...');\n\n // bounce\n $handlers = BounceHandler::get();\n Log::info(sizeof($handlers).' bounce handlers found');\n $count = 1;\n foreach ($handlers as $handler) {\n Log::info('Starting handler '.$handler->name.\" ($count/\".sizeof($handlers).')');\n $handler->start();\n Log::info('Finish processing handler '.$handler->name);\n $count += 1;\n }\n\n // abuse\n $handlers = FeedbackLoopHandler::get();\n Log::info(sizeof($handlers).' feedback loop handlers found');\n $count = 1;\n foreach ($handlers as $handler) {\n Log::info('Starting handler '.$handler->name.\" ($count/\".sizeof($handlers).')');\n $handler->start();\n Log::info('Finish processing handler '.$handler->name);\n $count += 1;\n }\n }", "public function run()\n {\n $this->call(SocialIcons::class);\n $this->call(BackgroundImages::class);\n $this->call(UserAdminAcount::class);\n }", "function execute() { \r\n if (static::$already_executed == 1) return; \r\n static::$already_executed = 1;\r\n \r\n if (!$this->canExecute) return;\r\n \r\n $yasca =& Yasca::getInstance(); \r\n $dir = $yasca->options['dir']; \r\n\r\n $executable = $this->executable[getSystemOS()];\r\n $executable = $this->replaceExecutableStrings($executable);\r\n \r\n $rats_plugins = glob(dirname($executable) . \"/*.xml\");\r\n \r\n foreach ($rats_plugins as $rats_plugin) {\r\n $rats_plugin = str_replace(\"//\", \"/\", $rats_plugin);\r\n $raw_results = array();\r\n if (getSystemOS() == \"Windows\") {\r\n if (file_exists($this->replaceExecutableStrings($executable))) {\r\n $yasca->log_message(\"Forking external process (RATS) ($rats_plugin)...\", E_USER_WARNING);\r\n exec( $executable . \" --db \\\"$rats_plugin\\\" --quiet --xml \" . escapeshellarg($dir) . \" 2>NUL\", $raw_results);\r\t \r\n $yasca->log_message(\"External process completed...\", E_USER_WARNING);\r\n } else {\r\n $yasca->log_message(\"Plugin \\\"RATS\\\" not installed. Download it at yasca.org.\", E_USER_WARNING);\r\n }\r\n } else if (getSystemOS() == \"Linux\") {\r\n if ($this->USE_WINE) {\r\n $wine_arr = array();\r\n $wine_errorlevel = 0;\r\n exec(\"which wine\", $wine_arr, $wine_errorlevel);\r\n \r\n if (preg_match(\"/no wine in/\", implode(\" \", $wine_arr)) || $wine_errorlevel == 1) {\r\n $yasca->log_message(\"No Linux \\\"RATS\\\" executable and wine not found.\", E_ALL);\r\n return;\r\n } else {\r\n $yasca->log_message(\"Forking external process (RATS) ($rats_plugin)...\", E_USER_WARNING);\r\n $executable = \"wine \" . $this->executable['Windows'];\r\n exec( $executable . \" --db \\\"$rats_plugin\\\" --quiet --xml \" . escapeshellarg($dir) . \" 2>/dev/null\", $raw_results);\r\n }\r\n } else {\r\n $yasca->log_message(\"Forking external process (RATS) ($rats_plugin)...\", E_USER_WARNING);\r\n exec( $executable . \" --db \\\"$rats_plugin\\\" --quiet --xml \" . escapeshellarg($dir) . \" 2>/dev/null\", $raw_results);\r\n $yasca->log_message(\"External process completed...\", E_USER_WARNING);\r\n }\r\n }\r\n\r\n if ($yasca->options['debug']) { \r\n $yasca->log_message(\"RATS returned: \" . implode(\"\\r\\n\", $raw_results), E_ALL); \r\n } \r\n $raw_result = implode(\"\\r\\n\", $raw_results); \r\n \r\n $dom = new DOMDocument(); \r\n if (!$dom->loadXML($raw_result)) { \r\n $yasca->log_message(\"RATS did not return a valid XML document. Ignoring.\", E_USER_WARNING); \r\n return; \r\n } \r\n \r\n $yasca->log_message(\"External process completed...\", E_USER_WARNING);\r\n \r\n foreach ($dom->getElementsByTagName(\"vulnerability\") as $error_node) { \r\n $severity = $error_node->getElementsByTagName(\"severity\")->item(0)->nodeValue; \r\n $category = $error_node->getElementsByTagName(\"type\")->item(0)->nodeValue; \r\n $message = $error_node->getElementsByTagName(\"message\")->item(0)->nodeValue; \r\n \r\n foreach ($error_node->getElementsByTagName(\"file\") as $file_node) { \r\n $filename = $file_node->getElementsByTagName(\"name\")->item(0)->nodeValue; \r\n foreach ($file_node->getElementsByTagName(\"line\") as $line_node) { \r\n $line_number = $line_node->nodeValue; \r\n $description = <<<END\r\n <p>\r\n This finding was discoverd by RATS and is titled:<br/>\r\n <div style=\"margin-left:10px;\"><strong>$message</strong></div>\r\n </p>\r\n <p>\r\n <h4>References</h4>\r\n <ul>\r\n <li><a href=\"http://www.fortify.com/security-resources/rats.jsp\">RATS Home Page</a></li>\r\n </ul>\r\n </p>\r\nEND;\r\n $result = new Result(); \r\n $result->line_number = $line_number; \r\n $result->filename = $filename; \r\n $result->category = \"RATS: $category\"; \r\n $result->category_link = \"http://www.fortify.com/security-resources/rats.jsp\"; \r\n $result->is_source_code = false; \r\n $result->plugin_name = $yasca->get_adjusted_alternate_name(\"RATS\", $message, \"rats\"); \r\n $result->severity = $yasca->get_adjusted_severity(\"RATS\", $message, $severity);\r\n \r\n $result->source = $message; \r\n $result->description = $yasca->get_adjusted_description(\"RATS\", $message, $description); \r\n \r\n if (file_exists($filename) && is_readable($filename)) { \r\n $t_file = @file($filename); \r\n if ($t_file != false && is_array($t_file)) { \r\n $result->source_context = array_slice( $t_file, max( $result->line_number-(($this->context_size+1)/2), 0), $this->context_size );\r\n } \r\n } else { \r\n $result->source_context = \"\"; \r\n } \r\n \r\n array_push($this->result_list, $result); \r\n } \r\n } \r\n }\r\n } \r\n }", "private static function proccess()\n {\n $files = ['Process', 'Command', 'Translator', 'Migrations', 'Links', 'Tag', 'Model', 'View', 'Controller', 'Seeds', 'Router', 'Exception', 'Events', 'Alias', 'Middleware', 'Helper', 'Tests', 'Mail', 'Query'];\n $folder = static::$root.'Processes'.'/';\n\n self::call($files, $folder);\n\n $files = ['TranslatorFolderNeededException', 'TranslatorManyFolderException'];\n $folder = static::$root.'Processes/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function exec() {\n\t\t$this->stop();\n\t\tswitch ($this->enable) {\n\t\tcase FALSE:\n\t\t\t$this->update(TRUE);\n\t\t\tbreak;\n\t\tcase TRUE:\n\t\t\t$this->update(FALSE);\n\t\t\tusleep($this->delay);\n\t\t\t$this->start();\n\t\t\tbreak;\n\t\t}\n\t}", "public static function process() {}", "public function run()\n {\n $this->call(baihat_casi::class);\n $this->call(baihatduyet::class);\n $this->call(users::class);\n $this->call(theloai::class);\n $this->call(casi::class);\n $this->call(baihatmoi::class);\n $this->call(baihathot::class);\n $this->call(baihathot_casi::class);\n }", "public function run()\n\t{\n\t\t//\n\t}", "public function run() {\n Preview::$config->reporter->before_suite($this->result);\n\n if ($this->runnable()) {\n $this->timer->start();\n $this->extend_context_with_parent();\n\n // run before hooks if error occured\n // force all its children tests set to error.\n try {\n $this->run_before();\n } catch (\\Exception $e) {\n $this->force_error($e);\n }\n\n // run all its children test cases/suites.\n foreach ($this->cases as $case) {\n $case->run();\n }\n foreach ($this->suites as $suite) {\n $suite->run();\n }\n\n // run after hooks.\n // do not handle any exceptions,\n // since reporter has printed results out.\n $this->run_after();\n $this->finish();\n\n $this->timer->stop();\n }\n\n Preview::$config->reporter->after_suite($this->result);\n }", "public function run() {\n\n\t\t// generate random string md5(uniqid(rand(), true));\n\t\t$this->goneta();\n\t\t$this->pamparam();\n\t\t$this->insideOut();\n\t\t$this->morfoza();\n\t\t$this->basorelief();\n\t\t$this->acajouWasZuSagen();\n\t}", "public function run()\n {\n $this->dev();\n $this->mike();\n $this->commenter();\n }", "private function runSaxon(){\r\n\t\t$this->execWrapper(\t$this->saxon_command.\r\n\t\t\t\t\t\t\t\" -o:\".$this->workingdir.$this->target.\r\n\t\t\t\t\t\t\t\" -xsl:\".$this->xsl_path.$this->xsl_file.\r\n\t\t\t\t\t\t\t\" -s:\".$this->workingdir.$this->source);\r\n\t}", "protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}", "public function run()\n\t{\n\t\t$this->upgrade_to_1_1_0();\n\t}", "public function runModules() {\n foreach ($this->modules as $module) {\n $this->runModule($module);\n }\n }", "protected function run(Process $process) {\n\t}", "protected function run(Process $process) {\n\t}", "public function addScriptWrapper() {\n if ($this->doAddScript) {\n $this->addScript();\n }\n }", "public function run(): void;", "public function run(): void;", "public function run(): void;", "public function do_tests()\n {\n foreach ($this->tests as $test) {\n $test->do_test($this->parse_script, $this->interpret_script);\n }\n }", "public function run()\n {\n // $this->call\n }", "public function run(){\n set_time_limit(0);\n ini_set('memory_limit', '2048M');\n\n $this->addEventListener('mainRunnerProgress', $this);\n //TODO approfondire. Al momento commentato perché dà errori (la classe Error è presente da PHP 7)\n // set_error_handler(function($num, $str, $file, $line){\n // throw new Error(\n // \"Errore PHP n°$num: $str\\r\\n\" .\n // \"$file:$line\"\n // );\n // });\n }", "public function run()\n {\n $this->_fnameFlagStop = dirname(__FILE__) . '/' . $this->getIndividualFilenameAsFlag();\n $this->checkIfShouldStopWork();\n\n $worker = Mage::getModel('myproject_gearman/worker'); // just a wrapper around PHP Gearman class\n\n $worker->addFunction($this->getJobName(), function (GearmanJob $job) {\n $this->_curJobObject = $job;\n $data = unserialize($job->workload());\n $this->processDataWrapper($data, $job);\n });\n\n $worker->addFunction($this->getIndividualFilenameAsFlag(), function (GearmanJob $job) {\n $this->log('Got job to exit. Job name: ' . $this->getIndividualFilenameAsFlag());\n $job->sendComplete('ok'); // without this line queue not cleans and task stay in this queue\n exit;\n });\n\n $worker->work();\n }" ]
[ "0.63899857", "0.61768925", "0.6168122", "0.6138738", "0.6132023", "0.6095177", "0.60421824", "0.60237", "0.60106456", "0.60106456", "0.60074", "0.59894204", "0.5989296", "0.596651", "0.5926322", "0.5926322", "0.5926322", "0.5926322", "0.5926322", "0.5926322", "0.5926322", "0.5926322", "0.5926322", "0.59147024", "0.59147024", "0.590592", "0.58874804", "0.58849305", "0.5872694", "0.5862386", "0.5862386", "0.5862386", "0.5862386", "0.5862386", "0.5862386", "0.5862386", "0.5862386", "0.5862386", "0.5862386", "0.5862386", "0.5862386", "0.5862386", "0.5862386", "0.5862386", "0.5862386", "0.5836873", "0.58178574", "0.5809614", "0.5809614", "0.5809614", "0.5809614", "0.5809614", "0.5809614", "0.5809614", "0.5809614", "0.58089554", "0.58012754", "0.5791411", "0.5771981", "0.5770454", "0.575489", "0.5753801", "0.575015", "0.575015", "0.5749031", "0.5741409", "0.5730018", "0.5727098", "0.57236713", "0.5718684", "0.5696735", "0.5694559", "0.5692831", "0.5688826", "0.5686702", "0.5670761", "0.5666839", "0.56635404", "0.56313854", "0.562674", "0.56262964", "0.56261593", "0.56021786", "0.5568333", "0.55613065", "0.5554585", "0.55496675", "0.554559", "0.5539764", "0.5529336", "0.5525064", "0.55084074", "0.55084074", "0.5478811", "0.5476402", "0.5476402", "0.5476402", "0.54748285", "0.54573506", "0.5452679", "0.5444494" ]
0.0
-1
We Create a new __constructor that takes in the Project we are "viewing" The functionality of __construct in a custom QPanel is similar to the QForm's Form_Create() functionality
public function __construct($objParentObject, $strControlId = null) { // First, let's call the Parent's __constructor try { parent::__construct($objParentObject, $strControlId); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } $this->selectedUserArray = array(); $this->dtgVentures = new PostventureAssessmentDataGrid($this); $this->dtgVentures->Paginator = new QPaginator($this->dtgVentures); $this->dtgVentures->AddColumn(new QDataGridColumn('User', '<?= $_CONTROL->ParentControl->RenderUserLinkPostVenture($_ITEM) ?>', 'HtmlEntities=false', 'Width=300px' )); $this->dtgVentures->AddColumn(new QDataGridColumn('Group', '<?= $_CONTROL->ParentControl->RenderPostVentureGroup($_ITEM) ?>', 'HtmlEntities=false' )); $this->dtgVentures->AddColumn(new QDataGridColumn('Status', '<?= $_CONTROL->ParentControl->RenderStatus($_ITEM->ResourceStatusId) ?>', 'HtmlEntities=false', 'Width=300px' )); $this->dtgVentures->CellPadding = 5; $this->dtgVentures->SetDataBinder('dtgVentures_Bind',$this); $this->dtgVentures->NoDataHtml = 'No Post Venture Assessments have been assigned'; $this->dtgVentures->UseAjax = true; $this->dtgVentures->SortColumnIndex = 1; $this->dtgVentures->ItemsPerPage = 20; $this->dtgVentures->GridLines = QGridLines::Both; $objStyle = $this->dtgVentures->RowStyle; $objStyle->BackColor = '#ffffff'; $objStyle->FontSize = 12; $objStyle = $this->dtgVentures->HeaderRowStyle; $objStyle->ForeColor = '#ffffff'; $objStyle->BackColor = '#0098c3'; $objStyle = $this->dtgVentures->HeaderLinkStyle; $objStyle->ForeColor = '#ffffff'; $objStyle->BackColor = '#0098c3'; $this->btnAdd = new QButton($this); $this->btnAdd->Text = 'Associate A User'; $this->btnAdd->CssClass = 'primary'; $this->btnAdd->AddAction(new QClickEvent(), new QAjaxControlAction($this,'btnAdd_Click')); $this->strFirstName = new QTextBox($this); $this->strFirstName->Name = 'First Name'; $this->strFirstName->AddAction(new QChangeEvent(), new QAjaxControlAction($this,'dtgVentures_Refresh')); $this->strFirstName->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this,'dtgVentures_Refresh')); $this->strFirstName->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->strFirstName->Focus(); $this->strLastName = new QTextBox($this); $this->strLastName->Name = 'Last Name'; $this->strLastName->AddAction(new QChangeEvent(), new QAjaxControlAction($this,'dtgVentures_Refresh')); $this->strLastName->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this,'dtgVentures_Refresh')); $this->strLastName->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->strLastName->Focus(); $this->strUsername = new QTextBox($this); $this->strUsername->Name = 'Username'; //$this->strUsername->Width = 50; $this->strUsername->AddAction(new QChangeEvent(), new QAjaxControlAction($this,'dtgVentures_Refresh')); $this->strUsername->AddAction(new QEnterKeyEvent(), new QAjaxControlAction($this,'dtgVentures_Refresh')); $this->strUsername->AddAction(new QEnterKeyEvent(), new QTerminateAction()); $this->pnlAddVentureAssessment = new QPanel($this); $this->pnlAddVentureAssessment->Position = QPosition::Relative; $this->pnlAddVentureAssessment->Visible = false; $this->pnlAddVentureAssessment->AutoRenderChildren = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct() {\n $args = array(\n 'slug' => 'projects',\n 'name' => 'Projects',\n );\n parent::init( $args );\n }", "public function __construct($project)\n\t{\n\t\t$this->project = $project;\n\t\tparent::__construct();\n\t}", "function __construct()\n {\n global $status, $page;\n parent::__construct(array(\n \n 'singular' => 'project',\n 'plural' => 'projects',\n ));\n }", "function __construct(Project $project)\n\t{\n\t\t$this->project = $project;\n\t}", "public function __construct() {\n require 'views/view_userproject.php';\n require 'models/model_userproject.php';\n $this->view = new view_userproject();\n $this->model = new model_userproject();\n }", "protected function formCreate() {\n\t\t$this->pxyLink = new \\QCubed\\Control\\Proxy($this);\n\t\t$this->pxyLink->AddAction(new \\QCubed\\Event\\MouseOver(), new \\QCubed\\Action\\Ajax('mouseOver'));\n\n\t\t// Define the DataGrid\n\t\t$this->tblProjects = new \\QCubed\\Project\\Control\\Table($this);\n\n\t\t// This css class is used to style alternate rows and the header, all in css\n\t\t$this->tblProjects->CssClass = 'simple_table';\n\n\t\t// Define Columns\n\n\t\t// Create a link column that shows the name of the project, and when clicked, calls back to this page with an id\n\t\t// of the item clicked on\n\t\t$this->tblProjects->CreateLinkColumn('Project', '->Name', \\QCubed\\Project\\Application::instance()->context()->scriptName(), ['intId'=>'->Id']);\n\n\t\t// Create a link column using a proxy\n\t\t$col = $this->tblProjects->CreateLinkColumn('Status', '->ProjectStatusType', $this->pxyLink, '->Id');\n\n\t\t$this->tblProjects->SetDataBinder('tblProjects_Bind');\n\n\t\t$this->pnlClick = new \\QCubed\\Control\\Panel($this);\n\n\t\tif (($intId = \\QCubed\\Project\\Application::instance()->context()->queryStringItem('intId')) && ($objProject = Project::Load($intId))) {\n\t\t\t$this->pnlClick->Text = 'You clicked on ' . $objProject->Name;\n\t\t}\n\n\t}", "public function __construct()\n {\n parent::__construct(array(\n 'name' => __('WS Form', 'ws-form'),\n 'description' => __('Add a form.', 'ws-form'),\n 'category'\t\t=> __('Basic', 'ws-form'),\n 'dir' => FL_WS_FORM_DIR . 'modules/ws-form/',\n 'url' => FL_WS_FORM_URL . 'modules/ws-form/',\n 'editor_export' => true, // Defaults to true and can be omitted.\n 'enabled' => true, // Defaults to true and can be omitted.\n 'icon' => 'icon.svg'\n ));\n }", "public function __construct()\n {\n parent::__construct();\n $this->setProviderName( \"AutoPanel\" )\n ->setProviderCode( 'ap' )\n ->setLocation( '/autopanel' )\n ->setFilesNameExpression( 'eksport-[a-zA-Z0-9]{32}-(19[0-9]{2}|2[0-9]{3})(0[1-9]|1[012])([123]0|[012][1-9]|31)-([01][0-9]|2[0-3])([0-5][0-9])([0-5][0-9]).zip' )\n ->setDisabledFileNames([]);\n }", "function __construct() {\n\t\tparent::__construct();\n $this->vista->setTitle('Cursos');\n\t\t$this->TSubgrupo = new TSubgrupo();\n\t\t$this->TPrograma = new TPrograma();\n\t }", "protected function createComponentProjectForm(): Form {\n $form = new Form; \n\n //Get all available project types for select field\n $types = $this->database->table('types');\n $types_arr = array();\n foreach($types as $type) {\n $types_arr[$type->id] = $type->title;\n }\n\n $form->addText('title', \"Project Title:\")\n ->setRequired()\n ->addRule($form::MAX_LENGTH, 'The Project title need to be less than %d character long', 60);\n\n $form->addSelect(\"type_id\", \"Project Type\", $types_arr)\n ->setRequired();\n\n $form->addText('start_date', \"Start Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addText('end_date', \"End Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addSubmit('send', \"Publish Project\");\n\n $form->onSuccess[] = [$this, 'projectFormSucceeded'];\n\n return $form;\n }", "public function __construct($project)\n {\n $this->project = $project;\n }", "function __construct() {\n $widget_ops = array( 'classname' => 'wplms_dash_mymodules', 'description' => __('My Courses, Units, Quizzes, Assignments, Finished Courses widget for Dashboard', 'wplms-dashboard') );\n $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'wplms_dash_mymodules' );\n parent::__construct( 'wplms_dash_mymodules', __(' DASHBOARD : My Modules Widget', 'wplms-dashboard'), $widget_ops, $control_ops );\n }", "function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->data = array ();\n\t\t$this->data['title'] = 'COMP4711 - Webapp Development';\n\t\t$this->data['coursetitle'] = 'COMP4711 - Webapp Development';\n\t\t$this->errors = array ();\n\t\t$this->data['datapath'] = DATAPATH;\n\t\t$this->template = 'theme/template';\n\t}", "function __construct($projeto_cadastrado){\n $this->pegaDadosProjetoCadastrado($projeto_cadastrado);\n $this->pegaDadosFrentesCadastradas();\n $this->cadastraProjeto();\n $this->criaFolderClickup();\n $this->cadastraIntegracao();\n $this->cadastraPapelVisaoETime();\n $this->cadastraFrentes();\n $this->cadastraPapelMetodo();\n $this->criaListaClickup();\n $this->clickMissoesGestao();\n }", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'port_gallery', // Base ID\n\t\t\t__( 'Port Gallery', 'text_domain' ), // Name\n\t\t\tarray( 'description' => __( 'The portfolio gallery widget', 'text_domain' ), ) // Args\n\t\t);\n\t}", "public function __construct($name = null)\n {\n parent::__construct('project');\n\n $this->add([\n 'name' => self::FIELD_NAME_ID,\n 'type' => 'hidden',\n ]);\n $this->add([\n 'name' => self::FIELD_NAME_NAME,\n 'type' => 'text',\n 'options' => [\n 'label' => 'Name',\n ],\n ]);\n $this->add([\n 'name' => self::FIELD_NAME_AREAS_OF_EXPERTISE,\n 'type' => 'select',\n 'options' => [\n 'label' => 'Areas of Expertise',\n ],\n 'attributes' => [\n 'multiple' => true,\n ],\n ]);\n $this->add([\n 'name' => self::FIELD_NAME_TECHNOLOGIES,\n 'type' => 'select',\n 'options' => [\n 'label' => 'Technologies',\n ],\n 'attributes' => [\n 'multiple' => true,\n ],\n ]);\n $this->add([\n 'name' => self::FIELD_NAME_SUBMIT,\n 'type' => 'submit',\n 'attributes' => [\n 'value' => 'Create',\n ],\n ]);\n }", "public function __construct($name = null)\n {\n parent::__construct('Project');\n\n $this->setAttribute('method', 'post');\n\n $this->add(array(\n 'name' => 'name',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => 'Project Name',\n ),\n ));\n\n $this->add(array(\n 'name' => 'short_description',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => 'Short description',\n ),\n ));\n\t\t\n\t\t$this->add(array(\n 'name' => 'long_description',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => 'Long description',\n ),\n ));\n\n\t\t$this->add(array(\n 'name' => 'image',\n 'attributes' => array(\n 'type' => 'text',\n ),\n 'options' => array(\n 'label' => 'Image URL',\n ),\n ));\n\t\t\n\t\t$this->add(array(\n 'name' => 'ispublic',\n 'attributes' => array(\n 'type' => 'checkbox',\n 'hidden' => 'true',\n ),\n 'options' => array(\n 'label' => 'Public',\n ),\n ));\n\t\t\n $this->add(array(\n 'name' => 'submit',\n 'attributes' => array(\n 'value' => 'Go',\n 'type' => 'submit',\n 'id' => 'submitbutton',\n ),\n\n ));\n\n }", "function jk_portfolio() {\r\n\t\tparent::__construct( false, \"Joeleen's Portfolio Widget\" );\r\n\t}", "public function __construct()\n {\n $sPluginClass = preg_replace(\"/Widget$/\", 'Plugin', get_class($this));\n $this->oPlugin = new $sPluginClass;\n\t\tparent::__construct\n (\n\t\t\t$this->oPlugin->pluginId() . '_widget',\n\t\t\t__($this->oPlugin->pluginName() . ' Widget', $this->oPlugin->textDomain()),\n\t\t\t['description' => __($this->oPlugin->pluginDescription(), $this->oPlugin->textDomain())]\n\t\t);\n\t}", "public function __construct()\n {\n $tmpl = implode(\n DIRECTORY_SEPARATOR,\n array(ARCH_PATH, 'theme', 'form', 'form.php')\n );\n parent::__construct($tmpl);\n }", "public function __construct(){\n\t\tparent::__construct();\t\t\n\t\t$this->data_view = parent::setupThemes();\n\t\t$this->destination_path = \"/public/document/library/own/\";\n\t\t$this->data_view['pipeline_index'] \t= $this->data_view['view_path'] . '.pipeline.index';\n\t\t$this->data_view['master_view'] \t= $this->data_view['view_path'] . '.dashboard.index';\n\t\t$this->pipeline_model = new \\CustomerOpportunities\\CustomerOpportunitiesEntity;\n\t}", "public function __construct()\n {\n Kirki::add_config(\n self::$config,\n array(\n 'capability' => 'edit_theme_options',\n 'option_type' => 'theme_mod',\n 'disable_output' => false,\n )\n );\n\n /**\n * Set up the panel\n */\n new Panel(\n self::$panel,\n array(\n 'priority' => 30,\n 'title' => esc_attr__('Footer', 'stage'),\n 'description' => esc_attr__('Customize the footer.', 'stage'),\n )\n );\n\n /**\n * Init sections with fields\n */\n $this->colors();\n $this->settings();\n }", "public function __construct()\n {\n $this->_settings = $this->getQuickviewSettings();\n }", "public function __construct() {\n parent::__construct( 'Test_Widget', 'Widget Test', [\n 'classname' => 'Test_Widget',\n 'description' => 'Test Widget is awesome'\n ] );\n }", "function _constructor() {\n\t\t\tglobal $my_frontend,$include_path;\n\n\t\t\t$this->name = $my_frontend;\n\t\t\t$this->width = \"100%\";\n\t\t\t$this->align = \"left\";\n\t\t\t$this->ajax_list = array();\n\t\t\t$this->standardFooter = true;\n\t\t}", "protected function _construct()\n {\n parent::_construct();\n $this->setTemplate(self::TEMPLATE);\n }", "function __construct() {\n\t\t$this->rootPath = $_SERVER['DOCUMENT_ROOT'].'/eclub/game/eClubProject/';\n $this->pageName = '';\n }", "public function __construct()\n {\n // We needed to keep the graveyard name in order to be backwards compatible\n parent::__construct(\n 'ClonedContentWidget',\n 'Klon-Widget',\n array(\n 'classname' => 'clone-widget',\n 'description' => 'Erlaubt es einen Klon eines bestehenden Widgets zu verwenden, der automatisch dem Original angepasst wird.'\n )\n );\n }", "public function __construct(Project $project)\n {\n $this->project = $project;\n }", "public function __construct(Project $project)\n {\n $this->project = $project;\n }", "public function __construct(Project $project)\n {\n $this->project = $project;\n }", "function __construct()\n {\n parent::__construct();\n \n $html = new THtmlRenderer('app/resources/quem_somos.html'); \n \n $panel = new TPanelGroup('Quem Somos');\n TTransaction::open('futapp');\n $site = new Site(1);\n TTransaction::close();\n \n $replaces = [];\n $replaces['texto'] = $site->quem_somos;\n \n // replace the main section variables\n $html->enableSection('main', $replaces);\n $panel->add($html);\n \n $vbox = TVBox::pack($panel);\n $vbox->style = 'display:block; width: 90%';\n \n // add the template to the page\n parent::add( $vbox );\n }", "public function __construct()\n\t{\n\t\t$mm = ModuleManager::getInstance();\n\t\tif ($mm->moduleExists('cron') && ($cron = $mm->getModule('cron')) != null)\n\t\t{\n\t\t\t$cron->subscribe(__CLASS__, array($this, 'cron'));\n\t\t}\n\n\t\t$auth = AuthBackend::getInstance();\n\n\t\t// bail if we aren't authenticated\n\t\tif ($auth->getCurrentUserName() == null)\n\t\t{\n\t\t\t// module does nothing if no authentication\n\t\t\treturn;\n\t\t}\n\n\t\t$this->installCommand('new', array($this, 'createProject'));\n\t\t$this->installCommand('info', array($this, 'projectInfo'));\n\t\t$this->installCommand('log', array($this, 'projectLog'));\n\t\t$this->installCommand('del', array($this, 'deleteProject'));\n\t\t$this->installCommand('commit', array($this, 'commitProject'));\n\t\t$this->installCommand('co', array($this, 'checkoutProject'));\n\t\t$this->installCommand(\"copy\", array($this, \"copyProject\"));\n\t\t$this->installCommand('zip', array($this, 'redirectToZip'));\n\t\t$this->installCommand('search', array($this, 'searchProject'));\n\t}", "public function __construct() {\n\t\tparent::__construct( 'CreatePage', 'createpage' );\n\t}", "public function __construct() {\n\t\t\t$this->pluginDir\t\t= basename(dirname(__FILE__));\n\t\t\t$this->pluginPath\t\t= WP_PLUGIN_DIR . '/' . $this->pluginDir;\n\t\t\t$this->pluginUrl \t\t= WP_PLUGIN_URL.'/'.$this->pluginDir;\t\n\t\t\t\n\t\t\t$opts = array(\n\t\t\t\t'url' => $this->pluginUrl, \n\t\t\t\t'view' => 'wp-cb-wysiwyg/wysiwyg-view.php',\t\t\t\t\n\t\t\t\t'description' => __('Provides Wordpress Wysiwyg CB Module.', 'carrington-build'),\n\t\t\t\t'icon' => 'wp-cb-wysiwyg/wysiwyg-icon.png'\n\t\t\t);\n\t\t\t\n\t\t\t// use if this module is to have no user configurable options\n\t\t\t// Will suppress the module edit button in the admin module display\n\t\t\t# $this->editable = false \n\t\t\t\n\t\t\tparent::__construct('cfct-wysiwyg', __('WP Wysiwyg', 'carrington-build'), $opts);\n\t\t}", "function __construct () {\n\t\t$this->active_module = $this->name;\n\t\t\n\t\tparent::__construct();\n\t}", "public function _construct()\n {\n parent::_construct();\n $this->setTemplate('suppliersubscriptions/customer/edit/plan.phtml');\n }", "function __construct() {\n// \t\t$this -> view = new View();\n \t}", "protected function _construct() \n {\n $this->selectedModule = $this->choice('For Which Module ?',$this->modulesName());\n\t\t$this->className = 'Create'.ucfirst($this->moduleName).'Table';\n }", "public function __construct() {\n $this->entity = new \\Application\\Entity\\PhvStudy();\n $this->searchForm = new \\Application\\Form\\SearchStudyForm();\n $this->currentUser = \\Application\\Library\\CustomConstantsFunction::getCurrentUser();\n }", "public function construct()\r\n\t{\r\n\t\t\r\n\t\t\r\n\t\t$class = ($this->classClr) ? 'w50 clr' : 'w50';\r\n\t\t$class = ($this->classLong) ? 'long clr' : $class;\r\n\t\t$class .= ($this->picker) ? ' wizard' : '';\r\n\t\t\r\n\t\t$wizard = ($this->picker == 'page') ? array(array('tl_content', 'pagePicker')) : false;\r\n\t\t\r\n\t\t// input unit\r\n\t\tif (($this->picker == 'unit'))\r\n\t\t{\r\n\t\t\t$options = array();\r\n\t\t\tforeach (deserialize($this->units) as $arrOption)\r\n\t\t\t{\r\n\t\t\t\t$options[$arrOption['value']] = $arrOption['label'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// the text field\r\n\t\t$this->generateDCA(($this->picker != 'unit') ? ($this->multiple) ? 'multiField' : 'textField' : 'inputUnit', array\r\n\t\t(\r\n\t\t\t'inputType' =>\t($this->picker == 'unit') ? 'inputUnit' : 'text',\r\n\t\t\t'label'\t\t=>\tarray($this->label, $this->description),\r\n\t\t\t'default'\t=>\t$this->defaultValue,\r\n\t\t\t'wizard'\t=>\t$wizard,\r\n\t\t\t'options'\t=>\t$options,\r\n\t\t\t'eval'\t\t=>\tarray\r\n\t\t\t(\r\n\t\t\t\t'mandatory'\t\t=>\t($this->mandatory) ? true : false, \r\n\t\t\t\t'minlength'\t\t=>\t$this->minlength, \r\n\t\t\t\t'maxlength'\t\t=>\t$this->maxLength, \r\n\t\t\t\t'tl_class'\t\t=>\t$class,\r\n\t\t\t\t'rgxp'\t\t\t=>\t$this->rgxp,\r\n\t\t\t\t'multiple'\t\t=>\t($this->multiple) ? true : false,\r\n\t\t\t\t'size'\t\t\t=>\t$this->multiple,\r\n\t\t\t\t'datepicker' \t=> \t($this->picker == 'datetime') ? true : false,\r\n\t\t\t\t'colorpicker' \t=> \t($this->picker == 'color') ? true : false,\r\n\t\t\t\t'isHexColor' \t=> \t($this->picker == 'color') ? true : false,\r\n\t\t\t),\r\n\t\t));\r\n\t\t\r\n\t}", "public function __construct() {\n\t\tparent::__construct(\n\t \t\t'property_map_widget', // Base ID\n\t\t\t'Porperty Map', // Name\n\t\t\tarray( 'description' => __( 'Property Map Widget', DOMAIN ), ) // Args\n\t\t);\n\t}", "public function __construct() {\n\t\tparent::__construct(\n\t \t\t'sportsdesk_fixtures_widget', // Base ID\n\t\t\t'Sports Desk Upcoming Fixtures', // Name\n\t\t\t#array( 'description' => __( 'Displays latest results from sportsdesk', 'text_domain' ), ) // Args\n\t\t\tarray( 'description' => \"Displays upcoming fixtures from sportsdesk\" )\n\t\t);\n\t}", "public function __construct() {\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }", "public function __construct()\n {\n parent::__construct(\"ahana_about_event_or_classes_widget\", __(\"About event or classes\", \"ahana\"), [\n \"classname\" => \"about_event_or_classes-widget\",\n\t\t\t\"description\" => __(\"Display informations on an event or a classes.\", \"ahana\"),\n\t\t\t\"customize_selective_refresh\" => true,\n ]);\n\n $this->fields = [\n \"title\" => __(\"Title\", \"ahana\"),\n \"post_type\" => __(\"Post type\", \"ahana\")\n ];\n\t}", "function _construct() {\n\t\tparent::_construct();\n\t}", "protected function _construct()\r\n {\r\n parent::_construct();\r\n $this->setTemplate('placetopay/form.phtml');\r\n }", "public function __construct() {\n\n\t\t\t// Register our styles\n\t\t\tadd_action( 'admin_init', array( $this, 'register_styles' ) );\n\n\t\t\t// Add our styles conditionally\n\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'add_styles' ) );\n\n\t\t\t// Add our new content section\n\t\t\t$this->add_content_section(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->section_name,\n\t\t\t\t\t'tab' => $this->tab,\n\t\t\t\t\t'page' => $this->page,\n\t\t\t\t\t'callback' => array( $this, 'reports_output' )\n\t\t\t\t)\n\t\t\t);\n\t\t\t$this->add_content_section(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'Your Activity',\n\t\t\t\t\t'tab' => 'Activity',\n\t\t\t\t\t'page' => 'Account',\n\t\t\t\t\t'callback' => array( $this, 'activity_output' )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Set the plugin path\n\t\t\t$this::$_path = plugin_dir_path( __FILE__ );\n\t\t}", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'getresponse-widget',\n\t\t\t__( 'GetResponse Web Form', 'Gr_Integration' ),\n\t\t\tarray( 'description' => __( 'Dispaly a GetResponse Web Form on your site.', 'Gr_Integration' ), )\n\t\t);\n\t}", "public function __construct() {\n\t\t$this->langue = tool_session::lire_param(\"lang\");\n\t\tlang_i18n::init($this->langue);\n\n\t\t/* Déclaration du cadre et du layout */\n\t\t$this->frame = new view_frame_session();\n\t\t$this->layout = new view_layout_session_3();\n\t}", "public function __construct(){\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }", "function __construct()\n {\n parent::__construct();\n\n // Add JS and StyleSheet to header\n PageLayout::addScript($this->getPluginURL() . '/javascript/forum.js');\n PageLayout::addStylesheet($this->getPluginURL() . '/stylesheets/forum.css');\n \n // JQuery-Tutor JoyRide JS and CSS\n PageLayout::addScript($this->getPluginURL() . '/javascript/jquery.joyride.js');\n PageLayout::addStylesheet($this->getPluginURL() . '/stylesheets/joyride.css');\n \n // Set helpkeyword for Stud.IP's user-documentation\n PageLayout::setHelpKeyword('Basis.Forum');\n }", "function __construct() {\n // Instantiate the parent object.\n parent::__construct( false, __( 'NY Times Articles Widget', 'textdomain' ) );\n }", "function __construct($appName){\n $this->jet = Jet::getInstance();\n $this->appName = $appName;\n\n $template = $this->jet->global['template'];\n\n $this->view = new $template($appName);\n $this->response = HttpResponse::getInstance();\n $this->request = new HttpRequest();\n $this->model = new ModelManager($appName);\n\n $this->construct();\n }", "public function __construct(){\n parent::__construct();\n \n // set the default template as the name of the view class\n $template = get_class($this);\n if(strtolower(substr($template, -4)) === 'view'){\n $template = substr($template, 0, strlen($template) - 4);\n }\n $this->template($template);\n }", "public function __construct() {\n\t\t$this->help_base = POWER_VIEWS_DIR . '/help/getting-started-';\n\n\t\t$page_id = 'power-getting-started';\n\n\t\t$menu_ops = [\n\t\t\t'submenu' => [\n\t\t\t\t'parent_slug' => 'power',\n\t\t\t\t'page_title' => __( 'Power - Getting Started', 'power' ),\n\t\t\t\t'menu_title' => __( 'Child Theme Setup', 'power' ),\n\t\t\t],\n\t\t];\n\n\t\t$this->create( $page_id, $menu_ops );\n\t}", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'port_video', // Base ID\n\t\t\t__( 'Port Video', 'text_domain' ), // Name\n\t\t\tarray( 'description' => __( 'The portfolio video widget', 'text_domain' ), ) // Args\n\t\t);\n\t}", "public function __construct() {\n $widget_ops = array( \n 'class_name' => 'msdlab-contributor',\n 'description' => 'Display a random Contributor (Expert)',\n );\n parent::__construct( 'msdlab-contributor', 'Contributor Widget', $widget_ops );\n }", "public function __construct()\n {\n $widget_ops = array(\n 'classname' => 'cs_widget',\n 'description' => 'CSWidget is awesome',\n );\n parent::__construct('cs_widget', 'CS Widget', $widget_ops);\n }", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'Compound_Calculator_Widget', // Base ID\n\t\t\t__( 'compound Calculator Widget', 'cc_domain' ), // Name\n\t\t\tarray( 'description' => __( 'Widget lets users Calculate Compound Interest', 'text_domain' ), ) // Args\n\t\t);\n\t}", "function __construct() {\r\n $this->_objTpl = new \\Cx\\Core\\Html\\Sigma(ASCMS_CORE_MODULE_PATH.'/FileBrowser/View/Template/Backend');\r\n \\Cx\\Core\\Csrf\\Controller\\Csrf::add_placeholder($this->_objTpl);\r\n $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);\r\n\r\n $this->_iconPath = ASCMS_CORE_MODULE_WEB_PATH.'/FileBrowser/View/Media/'; \r\n $this->_setFrontendLanguageId();\r\n $this->_mediaType = $this->_getMediaType(); \r\n $this->_mediaMode = $this->_getMediaMode();\r\n $this->_path = $this->_getPath();\r\n \r\n $this->checkMakeDir();\r\n $this->_initFiles();\r\n }", "function __construct()\n {\n parent::__construct();\n //$this->fmvc_array->add(\"NAME_fmvc\", \"Kidswork\\Backend\");\n //$this->path->set(__DIR__);\n \n }", "function __construct(){\n\t\t// Call parent constructor\n\t\tparent::__construct();\n\t}", "public function __construct()\n {\n $this->view = new View($this);\n }", "function __construct() {\n $widget_ops = array( 'classname' => 'wplms_notes_discussion', 'description' => __('Notes & Discussion Widget for Dashboard', 'wplms-dashboard') );\n $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'wplms_notes_discussion' );\n parent::__construct( 'wplms_notes_discussion', __(' DASHBOARD : Notes & Discussion', 'wplms-dashboard'), $widget_ops, $control_ops );\n }", "function __construct() {\n\t\tparent::__construct('1', $this->sMod); //this calls cls.company constructor\n\t}", "function __construct() {\r\n\t\r\n\t\t/* Widget settings. */\r\n\t\t$widget_ops = array( 'classname' => 'tz_homepage_products', 'description' => __('A widget that displays products on homepage.', 'framework') );\r\n\r\n\t\t/* Widget control settings. */\r\n\t\t$control_ops = array( 'width' => 250, 'height' => 350, 'id_base' => 'tz_homepage_products' );\r\n\r\n\t\t/* Create the widget. */\r\n\t\tparent::__construct( 'tz_homepage_products', __('COMPARE: Homepage Products Widget', 'framework'), $widget_ops, $control_ops );\r\n\t}", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'UWO_Top_Menu', // Base ID\n\t\t\t__('UWO Top Menu', 'text_domain'), // Name\n\t\t\tarray( 'description' => __( 'This widgets allows easy placement for the UWO Top Menu.', 'text_domain' ), ) // Args\n\t\t);\n\t}", "function __construct()\n\t{\n\t\tparent::__construct(\n\t\t\t'tx_fp_story_grid', // Base ID\n\t\t\t'Frontpage Story Grid (Triangle X)', // Name\n\t\t\tarray('description' => 'Frontpage content area with a grid of stories') // Args\n\t\t);\n\t}", "public function __construct()\n\t{\n\t\t$widget_ops = array( \n\t\t\t'classname' => 'Widget_Testimonial',\n\t\t\t'description' => 'Testimonial widget',\n\t\t\t);\n\t\tparent::__construct( 'Widget_Testimonial', 'Widget Testimonial', $widget_ops );\n\t}", "protected function __construct()\n {\n parent::__construct();\n $this->initCommands = array();\n $this->additionalCode = array();\n $this->plugins = array();\n\n $this->fns['name'] = $this->fns['prototype'] = $this->fns['body'] = array();\n\n $this->fTheme = fTheme::getInstance();\n $this->fTheme->onBuild('Singleton', 'fjQuery', 'build', 99);\n }", "public function __construct()\n\t{\n\t\t$this->domain = preg_replace('#^https?://#', '', Request::root());\n\t\t$this->website = Website::query()\n\t\t\t->where('domain', $this->domain)\n\t\t\t->where('is_publish', true)\n\t\t\t->first();\n\t\tif(!empty($this->website)) {\n\t\t\t$this->websiteFactory = new WebsiteFactory($this->website);\n\t\t\tView::share ( 'websiteFactory', $this->websiteFactory );\n\t\t}\n\t}", "private function __construct() {\r\n \trequire __DIR__ . '/vendor/autoload.php';\r\n $this->templates = array();\r\n \r\n add_filter('body_class', array(\r\n $this,\r\n 'register_body_classes'\r\n ));\r\n \r\n // Add a filter to the attributes metabox to inject template into the cache.\r\n add_filter('page_attributes_dropdown_pages_args', array(\r\n $this,\r\n 'register_project_templates'\r\n ));\r\n // Add a filter to the save post to inject out template into the page cache\r\n add_filter('wp_insert_post_data', array(\r\n $this,\r\n 'register_project_templates'\r\n ));\r\n // Add a filter to the template include to determine if the page has our\r\n // template assigned and return it's path\r\n add_filter('template_include', array(\r\n $this,\r\n 'view_project_template'\r\n ));\r\n // Add your templates to this array.\r\n $this->templates = array(\r\n 'inc/ecapi-root.phtml' => 'Data API root'\r\n );\r\n }", "public function __construct() {\n\t\tparent::__construct(\n\t\t\tfalse,\n\t\t\t'Testimonials',\n\t\t\tarray( 'description' => 'My Testimonials Widget' )\n\t\t);\n\t}", "public function __construct()\n {\n add_filter('gform_form_settings_menu', [$this, 'add_menu']);\n\n // show special content in reporter tab in setting gravity form\n add_action('gform_form_settings_page_gravity_form_reporter_page', [$this, 'add_preview_form']);\n\n // send purch to third-part app and show result to customer\n add_filter('gform_confirmation', [$this, 'send_and_preview'], 10, 4);\n\n // add style to header\n add_action('wp_enqueue_scripts', [$this, 'theme_name_scripts']);\n\n }", "function __construct(){\n parent::__construct();\n $this->includeModel(\"TPrograma\");\n $this->vista->setTitle('Programas');\n // $smarty = new Smarty;\n }", "public function _construct()\n {\n parent::_construct();\n }", "function __construct()\n\t{\n\t\t// Store module path\n\t\t$this->module_path = dirname(__FILE__) .'/';\n\t\t$this->view_path = $this->module_path . 'views/';\n\t}", "function __construct() {\n\t\tparent::__construct();\n $this->includeModel('CursoEspecial');\n $this->vista->setTitle('Cursos Especiales');\n \n\t\t$this->CursoEspecial = new CursoEspecial();\n\t\t$this->TPrograma = new TPrograma();\n\t }", "function __construct() {\n $this->plugin_dir = plugin_dir_path(__FILE__);\n $this->icon_dir = $this->plugin_dir . 'images/icons/';\n\n $this->plugin_url = plugins_url('',__FILE__);\n $this->icon_url = $this->plugin_url . 'images/icons/';\n $this->admin_page = admin_url() . 'admin.php?page=' . $this->plugin_dir;\n\n $this->base_name = plugin_basename(__FILE__);\n\n $this->prefix = ADPRESS_PREFIX;\n\n $this->_configure();\n $this->_includes();\n \n // Extra help : attach the packages\n //\n $this->wpcsl->extrahelp = new ADPRESS_Extra_Help(\n array(\n 'parent' => $this->wpcsl\n )\n ); \n }", "public function __construct($db, $lang){\n global $path;\n global $base_url;\n parent:: __construct($db, $lang);\n $this->view = $path[\"view\"] . \"projects.php\";\n $s =\n \"SELECT id \" .\n \"FROM project \" .\n \"WHERE visible = 1 \" .\n \"ORDER BY idx;\";\n $q = mysqli_query($this->db, $s);\n while($r = mysqli_fetch_array($q)){\n array_push($this->project, new Project($this->db, $this->lang, $r[\"id\"]));\n }\n $this->title = text($this, \"PROJECT_TITLE\") . \" - \" . text($this, \"USER_NAME\");\n $this->description = text($this, \"PROJECT_DESCRIPTION\");\n $this->canonical = $base_url . \"/project/\";\n }", "function __construct() {\n parent::__construct( false, 'GE Custom Slider Widget' );\n }", "function __construct() {\r\n parent ::__construct();\r\n }", "public function __construct(){\n\t\t/* calling parent construct */\n\t\tparent::__construct();\n\t}", "public function __construct(){\n\t\t/* calling parent construct */\n\t\tparent::__construct();\n\t}", "public function __construct() {\n\t\t//$moduleConfig = $GLOBALS['MCONF'];\n\t\t//$modTSconfig = t3lib_BEfunc::getModTSconfig( 0, 'mod.'.$this->MCONF['name'] );\n\n\t\t// Include class files\n\t\t$this->classLoader();\n\n\t\t// Init global logList object\n\t\t$GLOBALS['logList'] = t3lib_div::makeInstance('tx_passwordmgr_model_loglist');\n\n\t\t// Initialize module Data. This holds the chosen view, the action and all post Data values\n\t\t$GLOBALS['moduleData'] = t3lib_div::makeInstance('tx_passwordmgr_model_moduleData');\n\n\t\t// Create a dummy object of temlpate. This is a hack to make template->getPageInfo() happy\n\t\t$this->doc=t3lib_div::makeInstance('template');\n\t}", "public function __construct()\r\n {\r\n $registry = Zend_Registry::getInstance();\r\n if (!isset($registry[__CLASS__])) {\r\n require_once 'ZendX/JQuery/View/Helper/JQuery/Container.php';\r\n $container = new ZendX_JQuery_View_Helper_JQuery_Container();\r\n $registry[__CLASS__] = $container;\r\n }\r\n $this->_container = $registry[__CLASS__];\r\n }", "public function __construct() \n\t{\n\t\t// setup vars\n\t\t$this->title = Plugin::getSetting('blogtitle', 'mbblog');\n\t\t$this->breadcrumb = $this->title;\n\t\t$this->slug = Plugin::getSetting('blogpath', 'mbblog').'/';\n\t\n\t\tif(defined(\"CMS_BACKEND\"))\n\t\t{\n\t\t\tAuthUser::load();\n\t\t\tif ( ! AuthUser::isLoggedIn()) {\n\t\t\t\tredirect(get_url('login'));\n\t\t\t}\n\t\t\t$this->setLayout('backend');\n\t\t\t$this->assignToLayout('sidebar', new View('../../plugins/mbblog/views/<?php echo ADMIN_DIR; ?>/sidebar'));\n\t\t} else\n\t\t{\n\t\t\t$this->parent = Page::find('/');\n\t\t\t$this->setLayout('wolf');\n\t\t}\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t// load class, library dan language yang diperlukan disini\n\t\t$this->load->library('form_validation');\n\t\t$this->load->model('projects/model_project_m');\n\n\t\t// set aturan validasi untuk setiap field di form\n\t\t// diambil dari property _validation_rules di model\n\t\t// tulis saja seperti ini\n\t\t$this->form_validation->set_rules($this->model_project_m->_validation_rules);\n\n\t}", "public function __construct()\n {\n $left = new leftpageController();\n //create new models for required data\n $changecontrolModel = new changecontrolModel();\n $helpdeskModel = new helpdeskModel();\n $pagedata = new stdClass();\n //Post Update Scheduledtask\n if ($_POST) {\n //modify Scheduledtask\n //TODO rainy day\n }\n //set report name\n $reportname = \"Modify Scheduled Task\";\n //set report title\n $pagedata->title = $reportname;\n $pagedata->details = \"Please complete the form to add a scheduled task for the team.\";\n //render template using $pagedata object\n require_once \"views/modifyScheduledtask.php\";\n }", "public function __construct()\n {\n parent::__construct(array(\n 'name' => __('Module Boilerplate', 'fl-builder'),\n 'description' => __('An starting point for coding new modules.', 'fl-builder'),\n 'category'\t\t=> __('Advanced Modules', 'fl-builder'),\n 'dir' => MY_MODULES_DIR . 'module-name/',\n 'url' => MY_MODULES_URL . 'module-name/',\n 'editor_export' => true, // Defaults to true and can be omitted.\n 'enabled' => true, // Defaults to true and can be omitted.\n ));\n }", "public function __construct()\n {\n $this->view = GeneralUtility::makeInstance(StandaloneView::class);\n $this->view->setPartialRootPaths($this->partialRootPaths);\n $this->view->setTemplateRootPaths($this->templateRootPaths);\n $this->view->setLayoutRootPaths($this->layoutRootPaths);\n $this->view->setTemplate($this->templateFile);\n $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);\n $this->docHeaderComponent = GeneralUtility::makeInstance(DocHeaderComponent::class);\n $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);\n }", "function __construct()\n {\n parent::__construct();\n $this->_ci_view_paths = [];\n \n //$this->config->set_item(\"base_url\",BASE_URL);\n //$this->config->set_item(\"index_page\",\"\");\n if(!$this->components) $this->components = new Components;\n if(!$this->parser) $this->parser = new Parser;\n if(!$this->access) $this->access = new Securityaccess;\n\n }", "function __construct()\n {\n\n //Create a new instance of the View class\n $this->view = new View();\n\n //Create a new instance of the Template class\n $this->template = new Template();\n\n //Create a new instance of the Validator class\n $this->validator = new Validator();\n\n }", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->setAdapter(new TJuiControlAdapter($this));\n\t}", "public function __construct() {\r\n // Pass in the base for all the views\r\n parent::__construct();\r\n\r\n $this->view_base = 'shopping-cart/orders/';\r\n $this->section = 'shopping-cart';\r\n $this->title = _('Orders | Shopping Cart');\r\n }", "public function __construct(){\n //l'intensification de la classe view\n $this->view=new View();\n }", "function __construct() {\n parent::__construct(\n 'ang-mega-slideshow', // Base ID\n __('ANG Mega Slideshow', 'ang-plugins'), // Name\n array( 'description' => __( 'Displays random posts with thumbnail navigation', 'ang-plugins' ), ) // Args\n );\n }", "public function __construct() {\r\n\t\tparent::__construct(\r\n\t \t\t'wplook_schedule_widget',\r\n\t\t\t__( 'WPlook Schedule (Home Page)', 'event-wpl' ),\r\n\t\t\tarray( 'description' => __( 'A widget for displaying Schedules on home page', 'event-wpl' ), )\r\n\t\t);\r\n\t}", "public function __construct() {\n\t\t$option = array(\n\t\t\t'classname' => 'RPG_UpcomingWebinars',\n\t\t\t'description' => 'RPG - Upcoming Webinars'\n\t\t);\n\n\t\t$this->WP_Widget('RPG_UpcomingWebinars', 'RPG - Upcoming Webinars', $option);\n\n\t}", "public function __construct()\n {\n parent::__construct();\n\n $this->session->set('docFrom', 'doc');\n\n $this->libs = $this->doc->getLibPairs();\n $this->loadModel('user');\n $this->loadModel('tree');\n $this->loadModel('action');\n $this->loadModel('project', 'proj');\n }" ]
[ "0.7056349", "0.68417835", "0.67773736", "0.6690822", "0.66176474", "0.6527939", "0.6504495", "0.649842", "0.64764166", "0.647535", "0.64611995", "0.64604783", "0.6436539", "0.6427746", "0.6415322", "0.64052373", "0.638437", "0.6362886", "0.63295096", "0.6327847", "0.6266608", "0.62599295", "0.62511814", "0.6202565", "0.61914295", "0.6187277", "0.6170757", "0.615799", "0.61546046", "0.61546046", "0.61546046", "0.6150837", "0.6144748", "0.61444837", "0.6142331", "0.61322653", "0.6128239", "0.6121104", "0.6118218", "0.61139756", "0.60990214", "0.6092397", "0.6089448", "0.6081665", "0.6078158", "0.607772", "0.6075424", "0.60748535", "0.6064419", "0.6063134", "0.60573137", "0.60403305", "0.6037236", "0.602803", "0.6021051", "0.6014283", "0.60106194", "0.6010347", "0.600967", "0.6005854", "0.6000891", "0.5997843", "0.59953266", "0.5994801", "0.59938514", "0.5987766", "0.5984311", "0.59778637", "0.59754056", "0.59702605", "0.59701025", "0.5969052", "0.5953317", "0.59501916", "0.5949671", "0.59486204", "0.59418523", "0.593849", "0.5933532", "0.593222", "0.5923341", "0.59216535", "0.59168607", "0.5912907", "0.5912907", "0.59105366", "0.5908096", "0.5907075", "0.59050417", "0.59041005", "0.5903785", "0.5903524", "0.59032196", "0.59013546", "0.58991235", "0.5896179", "0.5894646", "0.58932596", "0.5890329", "0.5880993", "0.58771604" ]
0.0
-1
Method Call back for the panels
public function UpdateVentureAssessmentList($blnUpdatesMade) { $this->dtgVentures->PageNumber = 1; $this->dtgVentures->Refresh(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function panels()\n {\n }", "private function composeControlPanel()\n {\n $this->composeControlPanelSideMenu();\n $this->composeControlPanelImagesBrowser();\n }", "function ncurses_panel_window($panel)\n{\n}", "public function getPanel()\n {\n \t$this->_timer['postDispatch'] = isset($this->_timer['postDispatch']) ? \n \t\t$this->_timer['postDispatch'] : '';\n \t$this->_timer['preDispatch'] = isset($this->_timer['preDispatch']) ? \n \t\t$this->_timer['preDispatch'] : '';\n \t\t\n \treturn parent::getPanel();\n }", "function _add_panels ()\n {\n parent::_add_panels ();\n\n $panel =& $this->panel_at ('folder');\n $panel->rows = 10;\n $panel->columns = 2;\n }", "public function panel (\\stdClass $param);", "public function buildPanels() {\n return array($this);\n }", "abstract public function getPanelName();", "public function render_panel_templates()\n {\n }", "public function show_in_panel() {\n\t\treturn false;\n\t}", "public function panel()\n {\n $panel = new \\Shieldon\\Firewall\\Panel();\n $panel->entry();\n }", "public function getPanel()\n\t{\n\t\t$items = $this->items;\n\t\tob_start();\n\t\trequire_once __DIR__ . \"/Callback.phtml\";\n\t\treturn ob_get_clean();\n\t}", "public function executeFooterPanel()\n {\n }", "private function loginPanel() {\n $this->user_panel->processLogin();\n }", "protected function SetupPanel() {\n\t\t\t$this->objGroup = Group::Load($this->strUrlHashArgument);\n\t\t\tif (!$this->objGroup) return $this->ReturnTo('#groups');\n\t\t\tif (!$this->objGroup->IsLoginCanView(QApplication::$Login)) return $this->ReturnTo('#groups');\n\n\t\t\t$this->objDelegate = new EditGroupParticipationDelegate($this, '#groups');\n\t\t}", "abstract public function getPanelGroup();", "private function showPanels()\r\n {\r\n if ($this->claimType == \"repair-warranty\" || $this->claimType == \"repair-no-warranty\" ||\r\n $this->claimType == \"repair-no-transaction\")\r\n {\r\n // show the information panel\r\n $newInformationPanel = new InformationPanel($this->keycodeResult, $this->transactionResult);\r\n\r\n // create form form to process a repair claim\r\n //echo \"<form action=\\\"CustomerClaim.php\\\" method=\\\"post\\\" name=\\\"submit-repair-claim\\\">\";\r\n\r\n // create form for repair panel\r\n $newRepairOptionsPanel = new RepairOptionsPanel($this->claimType);\r\n\r\n // create customer details panel object and create the blank fields\r\n $newCustomerDetailsPanel = new CustomerDetailsPanel();\r\n $newCustomerDetailsPanel->createCustomerFields();\r\n\r\n // create repair options panel object and create the blank html fields\r\n $newfinaliseRepairPanel = new FinaliseRepairPanel();\r\n $newfinaliseRepairPanel->createFinaliseRepairFields();\r\n \r\n // object has hidden inputs for keycode and transaction ID so they can be retrieved from \r\n // second form on the page, as the first form contains the first inputs for them\r\n $newHiddenInputsPanel = new HiddenInputsPanel($this->claimType);\r\n\r\n }\r\n \r\n // finanical claim show information panel and set form to finanical claim\r\n else if($this->claimType == \"finanical-warranty\" || $this->claimType == \"finanical-outside-warranty\" || \r\n $this->claimType == \"finanical-no-transaction\")\r\n {\r\n // show the information panel\r\n $newInformationPanel = new InformationPanel($this->keycodeResult, $this->transactionResult);\r\n \r\n // create form to process a finanical claim\r\n //echo \"<form action=\\\"CustomerClaim.php\\\" method=\\\"post\\\" name=\\\"submit-repair-claim\\\">\";\r\n \r\n // object has hidden inputs for keycode and transaction ID so they can be retrieved from \r\n // second form on the page, as the first form contains the first inputs for them\r\n $newHiddenInputsPanel = new HiddenInputsPanel($this->claimType);\r\n \r\n }\r\n \r\n // if product is not claimable but exists show information panel\r\n else if ($this->claimType != \"keycode-not-found\" && $this->keycode != null)\r\n {\r\n // create a form that does nothing - used to make html vaild as </form> is used later\r\n //echo \"<form>\";\r\n \r\n // if vaild product is found show the information about it\r\n $newInformationPanel = new InformationPanel($this->keycodeResult, $this->transactionResult);\r\n }\r\n }", "public function actionControlPanel()\n {\n $this->render('controlPanel');\n }", "function show_panel()\n\t{\n\t\tglobal $errors, $template;\n\t\t\n\t\t// get the mode\n\t\t$s = ( isset( $_GET[ 's' ] ) ) ? strval( $_GET[ 's' ] ) : '';\n\t\t\n\t\t// fire the template\n\t\t$template->assign_files( array(\n\t\t\t'ACP_advance' => 'ACP/advance' . tplEx\n\t\t) );\n\t\t\n\t\t// act upon it\n\t\tswitch( $s )\n\t\t{\n\t\t\tcase 'settings':\n\t\t\t\t$this->settings();\n\t\t\t\tbreak;\n\t\t\tcase 'settings_real':\n\t\t\t\t$this->settings_real();\n\t\t\t\tbreak;\n\t\t\tcase 'browser':\n\t\t\t\t$this->browser();\n\t\t\t\tbreak;\n\t\t\tcase 'clearcache':\n\t\t\t\t$this->clearcache();\n\t\t\t\tbreak;\n\t\t\tcase 'console':\n\t\t\t\t$this->console();\n\t\t\t\tbreak;\n\t\t\tcase 'key':\n\t\t\t\t$this->key();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_mode' ], CRITICAL_ERROR );\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function init() {\n //echo CHtml::openTag('div', array('class' => $this->cssClass, 'style' => 'width:'.$this->width.'px;height:'.$this->height.'px;'));\n echo '<div class=\"ax-panel\">';\n if ($this->showHeader)\n $this->renderHeader();\n $wd = $this->width-10;\n if(!empty($this->height)){\n $hg = $this->height-49;\n echo '<div class=\"'.$this->cssBodyClass.'\" style=\"height: '.$hg.'px;overflow-y:auto;\">';\n }\n else\n echo '<div class=\"'.$this->cssBodyClass.'\">';\n //echo '<div style=\"padding: 5px 5px 0px; width: '.$wd.'px; left: 0px; top: 26px; height: '.$hg.'px; overflow:auto;\" class=\"x-panel-body x-panel-body-default-framed x-docked-noborder-top x-docked-noborder-right x-docked-noborder-bottom x-docked-noborder-left\">';\n }", "function show_panel()\n\t{\n\t\tglobal $template, $errors, $Cl_root_path;\n\t\t\n\t\t$template->assign_files( array(\n\t\t\t'ACP_pages' => 'ACP/pages' . tplEx\n\t\t) );\n\t\t\n\t\t// get the subsubmode\n\t\t$sub = ( isset( $_GET[ 's' ] ) ) ? strval( $_GET[ 's' ] ) : 'add';\n\t\t\n\t\t\t\n\t\tswitch( $sub )\n\t\t{\n\t\t\tcase 'add':\n\t\t\t\t$this->adding();\n\t\t\t\tbreak;\n\t\t\tcase 'edit':\n\t\t\t\t$this->editting();\n\t\t\t\tbreak;\n\t\t\tcase 'add_bar':\n\t\t\t\t$mode = ( isset( $_POST[ 'MODE' ] ) ) ? strval( $_POST[ 'MODE' ] ) : '';\n\t\t\t\tswitch( $mode )\n\t\t\t\t{\n\t\t\t\t\tcase 'create':\n\t\t\t\t\t\t$this->add_page();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'edit':\n\t\t\t\t\t\t$this->edit_page();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_form' ], CRITICAL_ERROR );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'convert':\n\t\t\t\tinclude( $Cl_root_path . 'kernel/config/static_pages' . phpEx );\n\t\t\t\tif ( isset( $pages ) )\n\t\t\t\t{\n\t\t\t\t\t$this->pages_array = $pages;\n\t\t\t\t}\n\t\t\t\t$this->save_pages();\n\t\t\t\t$errors->report_error( $this->lang[ 'Converted' ], MESSAGE );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_mode' ], CRITICAL_ERROR );\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function getPanel(): PanelInterface;", "public function get_panel($id)\n {\n }", "public function panel() {\n if(Auth::isLoggedIn()) {\n $this->view->render('admin/module/liveEdit/panel', [\n 'nodes' => $this->get($this->route),\n 'user' => $this->user,\n 'route' => $this->route,\n 'template' => $this->template,\n 'languages' => $this->em->all(Language::class),\n 'current_language' => $this->em->findBy(Language::class ,[\n 'code' => $_SESSION['Lampion']['language']\n ])[0],\n 'name' => $this->routeNames[$this->route] ?? null\n ]);\n }\n }", "function show_panel()\n\t{\n\t\tglobal $template, $errors, $Cl_root_path;\n\t\t\n\t\t$template->assign_files( array(\n\t\t\t'ACP_MoreContent' => 'ACP/MoreContent' . tplEx\n\t\t) );\n\t\t\n\t\t// get the subsubmode\n\t\t$sub = ( isset( $_GET[ 's' ] ) ) ? strval( $_GET[ 's' ] ) : 'add';\n\t\t\n\t\t\t\n\t\tswitch( $sub )\n\t\t{\n\t\t\tcase 'manage':\n\t\t\t\t$this->manage();\n\t\t\t\tbreak;\n\t\t\tcase 'manage2':\n\t\t\t\t$this->manage2();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_mode' ], CRITICAL_ERROR );\n\t\t\t\tbreak;\n\t\t}\n\t}", "function uka_panels($wp_customize){\r\n\t$wp_customize->add_panel(\r\n\t\t'uka_panels', \r\n\t\tarray(\r\n\t\t\t'title' => __( 'UKA Panels', 'uka' ),\r\n\t\t\t'priority' => 2000\r\n\t\t)\r\n\t);\r\n\t\r\n\r\n\t$wp_customize->add_section(\r\n\t\t'panel-options', \r\n\t\tarray(\r\n\t\t\t'title' => 'Panel options',\r\n\t\t\t'panel' \t => 'uka_panels'\r\n\t\t)\r\n\t);\r\n\t\r\n\t$wp_customize->add_setting('panels');\r\n\t$wp_customize->add_control(\r\n\t\tnew WP_Customize_Control(\r\n\t\t\t$wp_customize,\r\n\t\t\t'panels',\r\n\t\t\tarray(\r\n\t\t\t\t'label' => __( 'Number of panels', 'theme_name' ),\r\n\t\t\t\t'section' => 'panel-options',\r\n\t\t\t\t'type' => 'number'\r\n\t\t\t)\r\n\t\t)\r\n\t);\r\n\r\n\t$panels = intval(get_theme_mod('panels'));\r\n\tif ($panels > 0){\t\t\t\r\n\t\tfor ($i = 1; $i < $panels + 1; $i++){\r\n\t\t\t$title = get_theme_mod('panel-'.$i.'-title');\r\n\t\t\t$title = $title == '' ? 'Panel '.$i : 'Panel '.$i.' - '.$title;\r\n\t\t\t$wp_customize->add_section(\r\n\t\t\t\t'panel-'.$i, \r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => $title,\r\n\t\t\t\t\t'panel' \t => 'uka_panels'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$wp_customize->add_setting('panel-'.$i.'-title');\r\n\t\t\t$wp_customize->add_control(\r\n\t\t\t\tnew WP_Customize_Control(\r\n\t\t\t\t\t$wp_customize,\r\n\t\t\t\t\t'panel-'.$i.'-title',\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'label' => __( 'Title', 'uka' ),\r\n\t\t\t\t\t\t'section' => 'panel-'.$i,\r\n\t\t\t\t\t\t'type' => 'text'\r\n\t\t\t\t\t)\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$wp_customize->add_setting('panel-'.$i.'-show-title');\r\n\t\t\t$wp_customize->add_control(\r\n\t\t\t\tnew WP_Customize_Control(\r\n\t\t\t\t\t$wp_customize,\r\n\t\t\t\t\t'panel-'.$i.'-show-title',\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'label' => __( 'Show title in panel?', 'uka' ),\r\n\t\t\t\t\t\t'section' => 'panel-'.$i,\r\n\t\t\t\t\t\t'type' => 'checkbox'\r\n\t\t\t\t\t)\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$wp_customize->add_setting('panel-'.$i.'-title-color', array('default' => '#030303'));\r\n\t\t\t$wp_customize->add_control(\r\n\t\t\t\tnew WP_Customize_Color_Control(\r\n\t\t\t\t\t$wp_customize, \r\n\t\t\t\t\t'panel-'.$i.'-title-color', \r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'label' => __( 'Title color', 'uka' ),\r\n\t\t\t\t\t\t'section' => 'panel-'.$i,\r\n\t\t\t\t\t\t'settings' => 'panel-'.$i.'-title-color', \r\n \t\t\t\t\t)\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$wp_customize->add_setting('panel-'.$i.'-background-color', array('default' => '#121628'));\r\n\t\t\t$wp_customize->add_control(\r\n\t\t\t\tnew WP_Customize_Color_Control(\r\n\t\t\t\t\t$wp_customize, \r\n\t\t\t\t\t'panel-'.$i.'-background-color', \r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'label' => __( 'Background color', 'uka' ),\r\n\t\t\t\t\t\t'section' => 'panel-'.$i,\r\n\t\t\t\t\t\t'settings' => 'panel-'.$i.'-background-color', \r\n \t\t\t\t\t)\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\t$wp_customize->add_setting('panel-'.$i.'-text-color', array('default' => '#030303'));\r\n\t\t\t$wp_customize->add_control(\r\n\t\t\t\tnew WP_Customize_Color_Control(\r\n\t\t\t\t\t$wp_customize, \r\n\t\t\t\t\t'panel-'.$i.'-text-color', \r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'label' => __( 'Text color', 'uka' ),\r\n\t\t\t\t\t\t'section' => 'panel-'.$i,\r\n\t\t\t\t\t\t'settings' => 'panel-'.$i.'-text-color', \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}\r\n}", "public function controls()\n {\n }", "public function panelMenu()\n {\n\n $i18n = $this->getI18n();\n \n $html = '';\n $panelClass = '';\n $title = '';\n \n if ($this->title) {\n $panelClass = ''; // title';\n if ($this->buttons) {\n \n $title = '<div class=\"left wgt-panel-menu\" >'.$this->buildButtons().'</div>';\n $title .= '<div class=\"inline\" style=\"width:40%\" ><h2 style=\"margin-bottom:0px;\" >'.$this->title.'</h2></div>';\n } else {\n \n $title = '<div class=\"left\" style=\"width:40%\" ><h2 style=\"margin-bottom:0px;\" >'.$this->title.'</h2></div>';\n }\n }\n \n if ($this->searchKey) {\n $html .= '<div class=\"wgt-panel'.$panelClass.'\" >';\n \n $html .= $title;\n \n $customButtons = '';\n \n if ($this->menuButtons) {\n $customButtons = $this->buildButtons($this->menuButtons);\n }\n \n $textSearch = $i18n->l('Search by keyword', 'wbf.label');\n \n $html .= <<<HTML\n\n {$customButtons}\n <div class=\"right\" >\n <input\n type=\"text\"\n name=\"free_search\"\n placeholder=\"{$textSearch}\"\n id=\"wgt-search-table-{$this->searchKey}\"\n class=\"{$this->searchFieldSize} wcm wcm_req_search wgt-no-save fparam-{$this->searchForm}\" />\n\n <button\n onclick=\"\\$R.form('{$this->searchForm}',null,{search:true});return false;\"\n title=\"Search\"\n class=\"wgt-button inline wcm wcm_ui_tip\"\n tabindex=\"-1\" >\n <i class=\"fa fa-search\" ></i>\n </button>\n <button\n onclick=\"\\$S('table#{$this->tableId}-table').grid('cleanFilter');\\$UI.resetForm('{$this->searchForm}');\\$R.form('{$this->searchForm}');return false;\"\n title=\"Reset\"\n class=\"wgt-button right wcm wcm_ui_tip\"\n tabindex=\"-1\" >\n <i class=\"fa fa-minus-circle\" ></i>\n </button>\n\n </div>\n\nHTML;\n \n // $html .= '<div class=\"do-clear xxsmall\" >&nbsp;</div>';\n $html .= '</div>';\n }\n \n return $html;\n \n }", "function Show()\r\n {\r\n $block = new JBlock($this->Core, $this->Name);\r\n $block->Frame = false;\r\n $block->Table = true;\r\n \r\n //Action Ajax\r\n $action = new AjaxAction($this->App, $this->Action);\r\n $action->AddArgument(\"App\", $this->App);\r\n \r\n //Ajout des arguments\r\n foreach($this->Arguments as $argument => $value)\r\n {\r\n $action->AddArgument($argument, $value);\r\n }\r\n \r\n $action->ChangedControl = $this->Name;\r\n \r\n foreach($this->Controls as $control)\r\n {\r\n switch($control[\"Type\"])\r\n {\r\n case \"EntityListBox\" : \r\n $ctr = new EntityListBox($control[\"Name\"], $this->Core);\r\n $ctr->Entity = $control[\"Entity\"] ;\r\n $ctr->ListBox->Libelle = $control[\"Libelle\"];\r\n $ctr->Libelle = $control[\"Libelle\"];\r\n $ctr->ListBox->Selected = $control[\"Value\"];\r\n \r\n if($control[\"Field\"])\r\n {\r\n $ctr->AddField($control[\"Field\"]);\r\n }\r\n \r\n if(isset($control[\"Argument\"]))\r\n {\r\n $ctr->AddArgument($control[\"Argument\"]); \r\n }\r\n \r\n break;\r\n case \"ListBox\" :\r\n $ctr = new ListBox($control[\"Name\"]);\r\n $ctr->Libelle = $control[\"Libelle\"];\r\n \r\n foreach($control[\"Value\"] as $key => $value)\r\n {\r\n $ctr->Add($key, $value);\r\n }\r\n \r\n \r\n break;\r\n case \"AutoCompleteBox\" : \r\n $ctr = new AutoCompleteBox($control[\"Name\"], $this->Core);\r\n $ctr->Entity = $control[\"Entity\"] ;\r\n $ctr->Methode = $control[\"Methode\"];\r\n $ctr->Libelle = $control[\"Libelle\"];\r\n \r\n \r\n break;\r\n case \"BsTextBox\" :\r\n $ctr = new BsTextBox($control[\"Name\"], $this->Core);\r\n $ctr->Title = $control[\"Title\"];\r\n break;\r\n case \"BsEmailBox\" :\r\n $ctr = new BsEmailBox($control[\"Name\"], $this->Core);\r\n $ctr->Title = $control[\"Title\"];\r\n break;\r\n case \"BsPassword\" :\r\n $ctr = new BsPassword($control[\"Name\"], $this->Core);\r\n $ctr->Title = $control[\"Title\"];\r\n break;\r\n \r\n case \"CheckBox\" :\r\n $ctr = new CheckBox($control[\"Name\"]);\r\n $ctr->Value = $control[\"Value\"];\r\n $ctr->Libelle = $control[\"Libelle\"];\r\n $ctr->CssClass = $control[\"CssClass\"];\r\n $ctr->Checked = $control[\"Value\"];\r\n break;\r\n case \"Button\" : \r\n $ctr = new Button(BUTTON);\r\n $ctr->Value = $control[\"Value\"];\r\n $ctr->Libelle = $control[\"Libelle\"];\r\n $ctr->CssClass = $control[\"CssClass\"];\r\n \r\n $ctr->OnClick = $action;\r\n \r\n break;\r\n case \"UploadAjaxFile\" : \r\n $app = $control[\"App\"];\r\n $idEntite = $control[\"IdEntite\"];\r\n $callBack = $control[\"CallBack\"];\r\n $UploadAction = $control[\"Action\"];\r\n \r\n $ctr = new UploadAjaxFile($app, $idEntite, $callBack, $UploadAction);\r\n \r\n break;\r\n case \"Libelle\":\r\n \r\n $ctr = new Libelle($control[\"Value\"]);\r\n \r\n break;\r\n default :\r\n $type = $control[\"Type\"];\r\n \r\n $ctr = new $type($control[\"Name\"]);\r\n $ctr->Libelle = $control[\"Libelle\"];\r\n $ctr->Value = $control[\"Value\"];\r\n \r\n break;\r\n }\r\n \r\n $action->AddControl($ctr->Id);\r\n \r\n if($control[\"Type\"] == \"Button\" || $control[\"Type\"] == \"UploadAjaxFile\" )\r\n {\r\n $block->AddNew($ctr, 2, ALIGNRIGHT);\r\n }\r\n else\r\n {\r\n $block->AddNew($ctr);\r\n }\r\n }\r\n \r\n return $block->Show();\r\n }", "public function panel_content()\n {\n\n // Check if there is a form created\n if (!$this->form) {\n echo '<div class=\"wpforms-alert wpforms-alert-info\">';\n _e('You need to <a href=\"#\" class=\"wpforms-panel-switch\" data-panel=\"setup\">setup your form</a> before you can manage the settings.', 'wpforms');\n echo '</div>';\n return;\n }\n\n\n\n\n // --------------------------------------------------------------------//\n // Notifications\n // --------------------------------------------------------------------//\n echo '<div class=\"wpforms-panel-content-section wpforms-panel-content-section-custom_content\">';\n echo '<div class=\"wpforms-panel-content-section-title\">';\n _e('Custom content', 'wpforms');\n echo '</div>';\n wpforms_panel_field(\n 'tinymce',\n 'settings',\n 'custom_content_editor',\n $this->form_data,\n __('', 'wpforms'),\n array(\n 'default' => __('', 'wpforms'),\n 'tinymce' => array(\n 'editor_height' => '400',\n 'media_buttons' => true\n ),\n )\n );\n echo '</div>';\n\n // --------------------------------------------------------------------//\n // General\n // --------------------------------------------------------------------//\n echo '<div class=\"wpforms-panel-content-section wpforms-panel-content-section-general\">';\n echo '<div class=\"wpforms-panel-content-section-title\">';\n _e('General', 'wpforms');\n echo '</div>';\n wpforms_panel_field(\n 'select',\n 'settings',\n 'enable_archive',\n $this->form_data,\n __('Enable archives', 'wpforms'),\n array(\n 'default' => '1',\n 'options' => array(\n '1' => __('On', 'wpforms'),\n '0' => __('Off', 'wpforms'),\n ),\n 'tooltip' => __('This options to allow all data of form can be stored in Archives ', 'wpforms'),\n )\n );\n wpforms_panel_field(\n 'text',\n 'settings',\n 'form_title',\n $this->form_data,\n __('Form Name', 'wpforms'),\n array(\n 'default' => $this->form->post_title,\n )\n );\n wpforms_panel_field(\n 'textarea',\n 'settings',\n 'form_desc',\n $this->form_data,\n __('Form Description', 'wpforms')\n );\n wpforms_panel_field(\n 'text',\n 'settings',\n 'form_class',\n $this->form_data,\n __('Form CSS Class', 'wpforms'),\n array(\n 'tooltip' => __('Enter CSS class names for the form wrapper. Multiple class names should be separated with spaces.', 'wpforms'),\n )\n );\n wpforms_panel_field(\n 'text',\n 'settings',\n 'submit_text',\n $this->form_data,\n __('Submit Button Text', 'wpforms'),\n array(\n 'default' => __('Submit', 'wpforms'),\n )\n );\n wpforms_panel_field(\n 'text',\n 'settings',\n 'submit_text_processing',\n $this->form_data,\n __('Submit Button Processing Text', 'wpforms'),\n array(\n 'tooltip' => __('Enter the submit button text you would like the button display while the form submit is processing.', 'wpforms'),\n )\n );\n wpforms_panel_field(\n 'text',\n 'settings',\n 'submit_class',\n $this->form_data,\n __('Submit Button CSS Class', 'wpforms'),\n array(\n 'tooltip' => __('Enter CSS class names for the form submit button. Multiple names should be separated with spaces.', 'wpforms'),\n )\n );\n wpforms_panel_field(\n 'checkbox',\n 'settings',\n 'honeypot',\n $this->form_data,\n __('Enable anti-spam honeypot', 'wpforms')\n );\n $recaptcha_key = wpforms_setting('recaptcha-site-key');\n $recaptcha_secret = wpforms_setting('recaptcha-secret-key');\n $recaptcha_type = wpforms_setting('recaptcha-type');\n if (!empty($recaptcha_key) && !empty($recaptcha_secret)) {\n wpforms_panel_field(\n 'checkbox',\n 'settings',\n 'recaptcha',\n $this->form_data,\n 'invisible' === $recaptcha_type ? __('Enable Google invisible reCAPTCHA', 'wpforms') : __('Enable Google reCAPTCHA (v2)', 'wpforms')\n );\n }\n do_action('wpforms_form_settings_general', $this);\n echo '</div>';\n\n // --------------------------------------------------------------------//\n // Notifications\n // --------------------------------------------------------------------//\n echo '<div class=\"wpforms-panel-content-section wpforms-panel-content-section-notifications\">';\n do_action('wpforms_form_settings_notifications', $this);\n echo '</div>';\n\n // --------------------------------------------------------------------//\n // Confirmation\n // --------------------------------------------------------------------//\n echo '<div class=\"wpforms-panel-content-section wpforms-panel-content-section-confirmation\">';\n echo '<div class=\"wpforms-panel-content-section-title\">';\n _e('Confirmation', 'wpforms');\n echo '</div>';\n wpforms_panel_field(\n 'select',\n 'settings',\n 'confirmation_type',\n $this->form_data,\n __('Confirmation Type', 'wpforms'),\n array(\n 'default' => 'message',\n 'options' => array(\n 'message' => __('Message', 'wpforms'),\n 'page' => __('Show Page', 'wpforms'),\n 'redirect' => __('Go to URL (Redirect)', 'wpforms'),\n ),\n )\n );\n wpforms_panel_field(\n 'tinymce',\n 'settings',\n 'confirmation_message',\n $this->form_data,\n __('Confirmation Message', 'wpforms'),\n array(\n 'default' => __('Thanks for contacting us! We will be in touch with you shortly.', 'wpforms'),\n 'tinymce' => array(\n 'editor_height' => '200',\n ),\n )\n );\n wpforms_panel_field(\n 'checkbox',\n 'settings',\n 'confirmation_message_scroll',\n $this->form_data,\n __('Automatically scroll to the confirmation message', 'wpforms')\n );\n $p = array();\n $pages = get_pages();\n foreach ($pages as $page) {\n $depth = count($page->ancestors);\n $p[$page->ID] = str_repeat('-', $depth) . ' ' . $page->post_title;\n }\n wpforms_panel_field(\n 'select',\n 'settings',\n 'confirmation_page',\n $this->form_data,\n __('Confirmation Page', 'wpforms'),\n array(\n 'options' => $p,\n )\n );\n wpforms_panel_field(\n 'text',\n 'settings',\n 'confirmation_redirect',\n $this->form_data,\n __('Confirmation Redirect URL', 'wpforms')\n );\n do_action('wpforms_form_settings_confirmation', $this);\n echo '</div>';\n\n do_action('wpforms_form_settings_panel_content', $this);\n }", "public function afterLoadRegisterControlsUI(){\n\t\t\n\t}", "function print_panel() {\t\n\t\tif ( isset($_REQUEST['saved']) && $_REQUEST['saved'] ) {\n\t\t\t$this->print_saved_message();\n\t\t}\n\t\tif ( isset($_REQUEST['reset']) && $_REQUEST['reset'] ) {\n\t\t\t$this->print_reset_message();\n\t\t}\n\t\n\t\t$this->print_heading();\n\t\t$this->print_options();\n\t\t$this->print_footer();\n\t}", "public function displayAdminPanel() {}", "public function getPanel() {\n $isAdditionalBar = \\TracyDebugger::isAdditionalBar();\n $out = \"<h1>{$this->icon} {$this->label}\" . ($isAdditionalBar ? \" (\".$isAdditionalBar.\")\" : \"\") . \"</h1>\";\n\n $out .= '<span class=\"tracy-icons\"><span class=\"resizeIcons\"><a href=\"#\" title=\"Maximize / Restore\" onclick=\"tracyResizePanel(\\'' . $this->className . '\\')\">+</a></span></span>';\n\n // panel body\n $out .= '<div class=\"tracy-inner\">';\n\n $numOrphanFiles = count($this->orphanFiles);\n\n if($numOrphanFiles > 0) {\n $out .= '\n <form style=\"display:inline\" method=\"post\" action=\"'.\\TracyDebugger::inputUrl(true).'\" onsubmit=\"return confirm(\\'Do you really want to delete all the orange highlighted orphan files?\\');\">\n <input type=\"hidden\" name=\"orphanPaths\" value=\"'.implode('|', $this->orphanFiles).'\" />\n <input type=\"submit\" style=\"color:'.\\TracyDebugger::COLOR_WARN.' !important; color: #FFFFFF\" name=\"deleteOrphanFiles\" value=\"Delete '.$numOrphanFiles.' orphan'._n('', 's', $numOrphanFiles).'\" />\n </form>&nbsp&nbsp;';\n }\n\n if($this->numMissingFiles > 0) {\n $out .= '\n <form style=\"display:inline\" method=\"post\" action=\"'.\\TracyDebugger::inputUrl(true).'\" onsubmit=\"return confirm(\\'Do you really want to delete all the red highlighted missing pagefiles?\\');\">\n <input type=\"hidden\" name=\"missingPaths\" value=\"'.urlencode(json_encode($this->missingFiles)).'\" />\n <input type=\"submit\" style=\"color:'.\\TracyDebugger::COLOR_ALERT.' !important; color: #FFFFFF\" name=\"deleteMissingFiles\" value=\"Delete '.$this->numMissingFiles.' missing pagefile'._n('', 's', $this->numMissingFiles).'\" />\n </form>';\n }\n\n if($numOrphanFiles > 0 || $this->numMissingFiles > 0) {\n $out .= '<br /><br />';\n }\n\n $out .= '<div id=\"tracyPageFilesList\">'.$this->filesListStr.'</div>';\n\n $out .= \\TracyDebugger::generatePanelFooter($this->name, \\Tracy\\Debugger::timer($this->name), strlen($out));\n $out .= '</div>';\n\n return parent::loadResources() . $out;\n }", "private function viewPanelIndependent($data)\n\t{\n\t\t$this->panel($data,'',true);\n\t}", "public function panel() {\n require 'modelos/usuariosModelo.php';\n\n //Creamos una instancia de nuestro \"modelo\"\n $usuarios = new usuarioModelo();\n\n //Le pedimos al modelo todos los datos del usuario para desplegarlos en el panel\n $datosUsuario = $usuarios->datosUsuario($_SESSION['userid']);\n \n $this->vista->desplegar(\"panel\", \"panelDeUsuarios.php\"/* , $data */);\n }", "public function drawStartOptionsPanel()\r\n {\r\n echo '\r\n <div class=\"panel-body\">\r\n <ul class=\"list-group\">';\r\n }", "private function viewPanelSequent($data)\n\t{\n\t\t$this->panel($data,'-sequent');\t\t\n\t}", "public function panel()\n {\n $data = array('redirect' => Request::get('redirect') ? Request::get('redirect') : NULL);\n \n if (Session::userIsLoggedIn()) {\n $this->View->render('user/myProfile');\n } else {\n $this->View->render('user/smalllogin', $data);\n }\n }", "public function customize_pane_settings()\n {\n }", "public function onRun()\n {\n $this->page['visible'] = $this->property('visible');\n $this->page['button'] = $this->property('button');\n }", "function afterLayout() { \t\t\n }", "public function getPanelContent()\n {\n return null;\n }", "public function is_panel_active()\n {\n }", "public function getPanelContent()\n {\n $sqlLogs = $this->getLogs();\n\n // Add table uses summary\n // Sort table uses\n $idTables = array();\n $counts = array();\n $i = 0;\n foreach(self::$tables as $table => $nbUse)\n {\n $counts[$table] = $nbUse;\n $idTables[$table] = $i++;\n }\n \n $tableSummary = array();\n \n if(is_array($counts))\n {\n arsort($counts, SORT_NUMERIC);\n \n // Build summary of table uses\n foreach($counts as $table => $nbUse)\n {\n $tableSummary[] = sprintf('<div style=\"float: left; margin-right: 10px; line-height: 15px;\"><a href=\"#\" onclick=\"jQuery(\\'#sfWebDebugBarCancelLink\\').show(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li\\').hide(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li.info\\').show(); jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li.table-'.$table.'\\').show(); return false;\" title=\"Only display queries on this table\"><span style=\"color: blue;\"> %s</span> (%s)</a></div>', $table, $nbUse);\n }\n }\n\n // Add color legend\n $legend = '<div style=\"float: left; font-weight: bold; padding: 2px; margin: 2px 2px 2px 0;\">SQL status legend :</div>';\n foreach($this->colors as $min => $content)\n {\n $legend .= '<div style=\"background-color: '.$content[0].'; color: white; float: left; margin: 2px; padding: 2px;\">&gt;= '.$min.' queries ('.$content[1].')</div>';\n }\n\n $liStyle= ' style=\"line-height: 120% !important;\n padding: 5px 0px !important;\n border-bottom: 1px solid silver !important;\n list-style-type: decimal !important;\n margin-bottom:0\"';\n\n $liInfoStyle= ' style=\"line-height: 120% !important;\n padding: 5px 0px !important;\n border-bottom: 1px solid silver !important;\n list-style-type: decimal !important;\n background: #CCC; text-indent: 10px;\n text-shadow:1px 1px 1px rgba(0, 0, 0, 0.2);\"';\n\n\n\n // Build information and query rows\n $queries = array();\n foreach($sqlLogs as $i => $log)\n {\n $table = $log['table'];\n\n $message = '';\n if(array_key_exists($i, $this->info))\n {\n foreach($this->info[$i] as $mess)\n {\n $message .= '<li'.$liInfoStyle.' class=\"info\" style=\"\"><b>'.$mess['message'].' queries:</b></li>';\n }\n }\n \n $link = '';\n if(strstr($log['log'],'SELECT') > 0)\n {\n $link = '<a href=\"#\" style=\"color: blue;\" onclick=\"jQuery(this).parent().children(\\'span.select\\').show(); jQuery(this).hide(); return false;\">(View select content)</a>';\n }\n $message .= '<li'.$liStyle.' class=\"table-'.$table.' sfWebDebugDatabaseQuery\">'.$log['log'].' '.$link.'</li>';\n $queries[] = $message;\n }\n\n return '\n <div id=\"sfWebDebugAdvancedDatabaseLogs\">\n <div style=\"overflow: auto; margin-bottom: 10px;\">'.$legend.'</div>\n <b>Table call summary (click on a table to filter queries)</b>\n <div style=\"overflow: auto; margin-bottom: 10px;\">'.implode(\"\\n\", $tableSummary).'</div>\n <b>SQL queries <span id=\"sfWebDebugBarCancelLink\" style=\"display: none;\">(<a href=\"#\" style=\"color: blue\" onclick=\"jQuery(\\'#sfWebDebugAdvancedDatabaseLogs ol li\\').show(); jQuery(this).parent().hide(); return false;\">Cancel table filters</a>)</a></span></b>\n <ol style=\"margin-left: 20px\">'.implode(\"\\n\", $queries).'</ol>\n </div>\n ';\n }", "public function getPanel() {\n\t\treturn $this->panel;\n\t}", "function panelmarkup(){\n\t\tglobal $super_options,$ioa_upgrader;\t\n\t\t\n\t\t$flag= false;\n\t\t\n\n\n\t\t?>\n\n\t\t <div class=\"ioa_panel_wrap\"> <!-- Panel Wrapper -->\n\t\t\n\n <div class=\" clearfix\"> <!-- Panel -->\n \t<div id=\"option-panel-tabs\" class=\"clearfix\" data-shortname=\"<?php echo SN; ?>\"> <!-- Options Panel -->\n \n <ul id=\"\" class=\"ioa_sidenav clearfix\"> <!-- Side Menu -->\n \n\t\t\t\t <li>\n \t\t <a href=\"#header_constructor\" id=\"menu_header_constructor\"> \n \t\t \t\t <i class=\"entypo pencil\"></i>\n \t\t \t\t <span><?php _e('Updates','ioa') ?></span>\n \t\t </a>\n \t\t </li>\n \n </ul> <!-- End of Side Menu -->\n \t\t\t\n \n <div id=\"panel-wrapper\" class=\"clearfix\">\n\t\t\t\t\t\n\t\t\t\t\t<?php \n\n\t\t \tif( isset($_GET['page']) && $_GET['page'] == \"ioautoup\" && isset($_GET['ioaupate']) )\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$feedback = $ioa_upgrader->upgrade_theme();\n\n\t\t\t\t\tif(isset($feedback->success))\n\t\t\t\t\t{\n\t\t\t\t\t\t?><div class=\"installer-info\">\n\t\t\t\t\t\t\t\t\t<?php _e('Update Successfully Installed','ioa') ?>\n\t\t\t\t\t\t</div><?php\n\t\t\t\t\t\t$flag = true;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t \n\n\t\t\t\t /*\n\t\t\t\t * Uncomment to check if the current theme has been updated\n\t\t\t\t */\n\t\t\t\t \t$checker = $ioa_upgrader->check_for_theme_update();\n\t\t\t\t\t if($checker->updated_themes_count > 0 && !$flag )\n\t\t\t\t\t {\n\t\t\t\t\t \t?>\n\t\t\t\t\t\t\t\t<div class=\"installer-info\">\n\t\t\t\t\t\t\t\t\t<?php _e('An update is available','ioa') ?>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div class=\"pad-20\">\n\t\t\t\t\t\t\t\t\t<h4>Backup Information</h4>\n\t\t\t\t\t\t\t\t\t<p>This will automatically save your theme as a ZIP archive before it does an upgrade. The directory those backups get saved to is <strong>wp-content/envato-backups</strong>. However, if you're experiencing problems while attempting to upgrade, it's likely to be a permissions issue and you may want to manually backup your theme before upgrading.\n</p>\t\t\t\t\t\t\t\t<a href=\"<?php echo admin_url().\"admin.php?page=ioautoup&ioaupate=true\"; ?>\" class=\"button-save\"> <?php _e(\"Click Here to Update\",'ioa') ?></a>\n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t \t<?php\n\t\t\t\t\t } \n\t\t\t\t\t else\n\t\t\t\t\t {\n\t\t\t\t\t \t?>\n\t\t\t\t\t \t<div class=\"installer-info\">\n\t\t\t\t\t\t\t\t\t<?php _e('Your Theme is upto to date.','ioa') ?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t \t<?php\n\t\t\t\t\t }\n\n\t\t\t\t\t?>\t\n\n\t\t\t\t\t\n\n\n\t\t\t\t\t\n \t\t\t\t</div>\n\n \t\t\t</div>\n\n \t\t</div>\n\t <?php\n\t }", "function classymissy_options_page(){ ?>\n<!-- wrapper -->\n<div id=\"wrapper\">\n\n\t<!-- Result -->\n <div id=\"bpanel-message\" style=\"display:none;\"></div>\n <div id=\"ajax-feedback\" style=\"display:none;\"><img src=\"<?php echo esc_url( CLASSYMISSY_THEME_URI . '/framework/theme-options/images/loading.png' );?>\" alt=\"<?php esc_attr_e('loader', 'classy-missy');?>\" /> </div>\n <!-- Result -->\n\n\t<!-- panel-wrap -->\n\t<div id=\"panel-wrap\">\n\n \t<!-- bpanel-wrapper -->\n <div id=\"bpanel-wrapper\">\n\n \t<!-- bpanel -->\n \t<div id=\"bpanel\">\n\n \t<!-- bpanel-left -->\n \t<div id=\"bpanel-left\">\n \t<div id=\"logo\"><?php\n \t $logo = CLASSYMISSY_THEME_URI . '/framework/theme-options/images/logo.png';\n\t\t\t\t\t\t\t $advance = classymissy_option('general');\n\t\t\t\t\t\t\t if(isset($advance['bpanel-logo-url']) && isset( $advance['enable-bpanel-logo-url']))\n\t\t\t\t\t\t\t \t$logo = $advance['bpanel-logo-url']; ?>\n <img src=\"<?php echo esc_url($logo);?>\" width=\"186\" height=\"101\" alt=\"<?php esc_attr_e('dtlogo', 'classy-missy');?>\" />\n\t\t\t\t\t\t</div><?php\n\t\t\t\t\t\t/* ---------------------------------------------------------------------------\n\t\t\t\t\t\t * Load all theme option tabs.\n\t\t\t\t\t\t * --------------------------------------------------------------------------- */\n\t\t\t\t\t\t$tabs = array(\n\t\t\t\t\t\t\t'general' \t => array('icon' => 'dashicons-admin-home', 'name'=>esc_html__('General','classy-missy'), 'display'=>true),\n\t\t\t\t\t\t\t'layout' \t => array('icon' => 'dashicons-exerpt-view', 'name'=>esc_html__('Layout','classy-missy'), 'display'=>true),\n\t\t\t\t\t\t\t'widgetarea' => array('icon' => 'dashicons-welcome-widgets-menus', 'name'=>esc_html__('Widget Area','classy-missy'), 'display'=>true),\n\t\t\t\t\t\t\t'pageoptions' => array('icon' => 'dashicons-admin-page', 'name'=>esc_html__('Page Options','classy-missy'), 'display'=>true),\n\t\t\t\t\t\t\t'woocommerce' => array('icon' => 'dashicons-cart', 'name'=>esc_html__('WooCommerce','classy-missy'), 'display'=>false),\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t'colors'\t => array('icon' => 'dashicons-admin-appearance', 'name'=>esc_html__('Colors','classy-missy'), 'display'=>true),\n\t\t\t\t\t\t\t'fonts'\t\t => array('icon' => 'dashicons-editor-spellcheck', 'name'=>esc_html__('Fonts','classy-missy'), 'display'=>true),\n\t\t\t\t\t\t\t'import'\t => array('icon' => 'dashicons-upload', 'name'=>esc_html__('Importer','classy-missy'), 'display'=>false),\n\t\t\t\t\t\t\t'backup'\t => array('icon' => 'dashicons-backup', 'name'=>esc_html__('Backup','classy-missy'), 'display'=>true),\n\t\t\t\t\t\t\t'changelog' => array('icon' => 'dashicons-info', 'name'=> constant('THEME_NAME').esc_html__(' Version ', 'classy-missy').constant('THEME_VERSION'), 'display'=>true)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif(class_exists('woocommerce')) $tabs['woocommerce']['display'] = true;\n\n\t\t\t\t\t\t$output = \"<!-- bpanel-mainmenu -->\\n\\t\\t\\t\\t\\t\\t<ul id='bpanel-mainmenu'>\\n\";\n\t\t\t\t\t\t\tforeach($tabs as $tabkey => $tab ):\n\t\t\t\t\t\t\t\tif($tab['display'])\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$output .= \"\\t\\t\\t\\t\\t\\t\\t\\t<li><a href='#{$tabkey}' title='{$tab['name']}'><span class='dashicons {$tab['icon']}'></span>{$tab['name']}</a></li>\\n\";\n\t\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\t$output .= \"\\t\\t\\t\\t\\t\\t</ul><!-- #bpanel-mainmenu -->\\n\";\n\t\t\t\t\t\techo ($output);?>\n </div><!-- #bpanel-left end-->\n \n <form id=\"dttheme_options_form\" name=\"dttheme_options_form\" enctype=\"multipart/form-data\" method=\"post\" action=\"options.php\">\n\t\t <?php settings_fields( 'dttheme' );?>\n <input type=\"hidden\" id=\"dttheme-full-submit\" name=\"dttheme-full-submit\" value=\"0\" />\n <input type=\"hidden\" name=\"dttheme_admin_wpnonce\" value=\"<?php echo wp_create_nonce('dttheme_wpnonce');?>\" /><?php\n\t\t\t\t\t\t/* ---------------------------------------------------------------------------\n\t\t\t\t\t\t * Load theme options php files\n\t\t\t\t\t\t * --------------------------------------------------------------------------- */\n\t\t\t\t\t\tforeach($tabs as $tabkey => $tab ):\n\t\t\t\t\t\t\tif($tab['display'])\n\t\t\t\t\t\t\t\trequire_once( CLASSYMISSY_THEME_DIR .'/framework/theme-options/' .$tabkey. '.php' );\n\t\t\t\t\t\tendforeach; ?>\n\t\t\t\t\t\t<!-- #bpanel-bottom -->\n <div id=\"bpanel-bottom\">\n <input type=\"submit\" value=\"<?php esc_attr_e('Reset All','classy-missy');?>\" class=\"save-reset dttheme-reset-button bpanel-button white-btn\" name=\"dttheme[reset]\" />\n\t\t\t\t\t\t <input type=\"submit\" value=\"<?php esc_attr_e('Save All','classy-missy');?>\" name=\"submit\" class=\"save-reset dttheme-footer-submit bpanel-button white-btn\" />\n </div><!-- #bpanel-bottom end--> \n </form>\n\n </div><!-- #bpanel -->\n\n </div><!-- #bpanel-wrapper -->\n </div><!-- #panel-wrap end -->\n</div><!-- #wrapper end-->\n<?php\n}", "function display() {\r parent::display();\r }", "public function slide(){\r\n\t\t\r\n\t}", "public function onAfterStartPanels(&$row)\n {\n echo JHtml::_('sliders.panel', 'Exemple start panel', 'test-start-panel');\n echo '<fieldset class=\"panelform\">' \n . JText::_('PLG_JEA_OWNER_NAME'). ' : <strong>'\n . $row->owner_name . '</strong></fieldset>';\n }", "public function indexAction() {\n $panelsModel = new Datasource_Cms_Panels();\n $panels = $panelsModel->getAll();\n\n $this->view->panelsList = $this->view->partialLoop('/partials/panels-row.phtml', $panels);\n }", "public function getPanelContent()\n {\n $types = array('previous' => 'previous sessions', 'current' => \"current session\");\n\n $html = '';\n foreach(XHProfRunPool::getRunsByNamespace(true) as $namespace => $allRuns)\n {\n $html .= sprintf('<h2>Namespace : %s<a href=\"#\" onclick=\"sfWebDebugToggle(\\'pmsipilotWebDebugXHProf-%s\\'); return false;\"><img src=\"'.$this->webDebug->getOption('image_root_path').'/toggle.gif\"/></a></h2>', $namespace, md5($namespace));\n $html .= sprintf('<div id=\"pmsipilotWebDebugXHProf-%s\" style=\"display: none;\">', md5($namespace));\n\n foreach($allRuns as $type => $runs)\n {\n $links = array();\n $html .= sprintf(\"<h3>Runs from %s</h3>\", $types[$type]);\n foreach($runs as $run)\n {\n $links[] = sprintf('<input type=\"checkbox\" name=\"runs-%s\" id=\"run-%s\"><a href=\"%s\" target=\"_blank\">Run %s (%s)</a>', md5($namespace), $run->getId(), $run->getUrl(), $run->getId(), date('Y-m-d H:i:s', $run->getDate()));\n }\n if(count($links))\n {\n $html .= sprintf('<ol style=\"margin-left: 0px; list-style-type: none;\" class=\"runs-container-%s\"><li>%s</li></ol>', md5($namespace), implode('</li><li>', $links));\n }\n else\n {\n $html .= \"No run\";\n }\n }\n $html .= sprintf('<input type=\"button\" id=\"runs-%s\" value=\"Compare\" onclick=\"xhprofCompare(this, \\'%s\\', \\'%s\\')\">', md5($namespace), md5($namespace), addslashes($namespace));\n $html .= '</div>';\n }\n \n sfContext::getInstance()->getConfiguration()->loadHelpers('Asset');\n $baseUrl = _compute_public_path('index.php', 'elXHProfPlugin', 'php');\n $html .=<<<EOF\n<script type=\"text/javascript\">\nfunction xhprofCompare(button, namespaceId, namespace) {\n var groupId = button.id;\n var groupNamespace = button.id.split('-')[1];\n \n var checkedElements = [];\n var runContainers = sfWebDebugGetElementsByClassName('runs-container-'+namespaceId);\n for(var i = 0; i<runContainers.length; i++)\n {\n var runCheckboxes = runContainers[i].getElementsByTagName('input');\n for(var j = 0; j<runCheckboxes.length; j++)\n {\n if(runCheckboxes[j].checked)\n {\n checkedElements.push(runCheckboxes[j]);\n }\n }\n }\n \n if(checkedElements.length==2) {\n var run1 = checkedElements[1].id.split('-')[1];\n var run2 = checkedElements[0].id.split('-')[1];\n window.open(\"$baseUrl?run1=\"+run1+\"&run2=\"+run2+\"&source=\"+namespace);\n }\n else\n {\n alert(\"We can only compare 2 runs.\");\n }\n}\n</script>\nEOF;\n \n return $html;\n }", "public function loadViewPanel()\n {\n $query = $this->db->query(\"SELECT * FROM db_modulos\");\n\n //Creamos variable para contener resultado\n $modulos = array();\n\n //Cargamos los valores en la variable para mandarlos a la vista\n foreach ($query->result() as $row)\n {\n $modulos[\"modulo\"][] = $row->modulo;\n $modulos[\"estatus\"][] = $row->activo;\n }\n //Mandamos el nombre del usuario para mostrarlo\n $modulos[\"nombreUsuario\"] = strtoupper($this->session->userdata('nombreUsuario'));\n $modulos[\"correoUsuario\"] = $this->session->userdata('correo');\n\n //Cargamos las vistas para implementarlas\n $coleccion = array(\n \"header\" => $this->load->view(\"layout/header\", '', TRUE),\n \"menu\" => $this->load->view(\"layout/panel\", $modulos, TRUE),\n \"header_navegation\" => $this->load->view(\"layout/header_navegation\",\n array(\"nombreUsuario\"=>$modulos[\"nombreUsuario\"],\"correoUsuario\"=>$modulos[\"correoUsuario\"]),\n TRUE),\n \"contenido\" => $this->load->view(\"welcome_message\", '', TRUE),\n \"footer\" => $this->load->view(\"layout/footer\", '', TRUE),\n \"titulo\" => \"Tienda\"\n );\n\n //Cargamos la estructura principal para cargar el Panel\n $this->load->view(\"layout/main\",$coleccion);\n }", "function OnLoad()\n\t\t{\n\t\t\tfor ($j = 0; $j < $this->grid_h; $j++)\n\t\t\t{\n\t\t\t\tfor ($i = 0; $i < $this->grid_w; $i++)\n\t\t\t\t{\n\t\t\t\t\t$btn = new TButton();\n\t\t\t\t\t//$btn->Theme = $this->Theme;\n\t\t\t\t\t$btn->Name = 'btn_'.$i.'_'.$j;\n\t\t\t\t\t$btn->Left = 128 + $i * 32;\n\t\t\t\t\t$btn->Top = 16 + $j * 32;\n\t\t\t\t\t$btn->Width = 32;\n\t\t\t\t\t$btn->Height = 32;\n\t\t\t\t\t$btn->OnClick = 'MineButtonClick';\n\t\t\t\t\t$btn->Parent = $this;\n\t\t\t\t\t\n\t\t\t\t\t$shp = new TShape();\n\t\t\t\t\t$shp->Name = 'shp_'.$i.'_'.$j;\n\t\t\t\t\t$shp->Left = 128 + $i * 32;\n\t\t\t\t\t$shp->Top = 16 + $j * 32;\n\t\t\t\t\t$shp->Width = 32;\n\t\t\t\t\t$shp->Height = 32;\n\t\t\t\t\t$shp->BrushColor = 'silver';\n\t\t\t\t\t$shp->PenColor = 'gray';\n\t\t\t\t\t$shp->Shape = 'stRoundRect';\n\t\t\t\t\t$shp->Parent = $this;\n\t\t\t\t\t$shp->Style = 'font-weight: bold; font-size: 16px; padding-top: 8px; max-height: 24px;';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$this->Controls[$shp->Name] = $shp;\n\t\t\t\t\t$this->Controls[$btn->Name] = $btn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->NewGame();\n\t\t}", "protected function getButtonPanelClass() : void\n {\n return;\n }", "function normalView_main($arrayConst) {\n global $Meta;\n//print_r($Meta);\n//print_r($arrayConst);\n $utl = SINGLETON_MODEL::getInstance(\"UTILITIES\");\n $html = SINGLETON_MODEL::getInstance(\"HTML\");\n $js = SINGLETON_MODEL::getInstance(\"JAVASCRIPT\");\n $statusAction = $arrayConst['statusAction'];\n $statusActive = $arrayConst['statusActive'];\n $urlstring = $arrayConst['urlstring'];\n echo \"<div id='panelView' class='panelView'>\";\n echo \"<table id='mainTable' cellpadding='1' cellspacing='1'>\";\n echo \"<tr class='titleBottom'>\";\n $i = 1;\n//print_r ($arrayConst['Meta']['Field']);\n//exit();\n if (count($arrayConst['Meta']['Field']) > 0)\n//Heading\n foreach ($arrayConst['Meta']['Field'] as $Field => $FieldInfo) {\n if (($FieldInfo['list_show']) && ((!$arrayConst['filter_parameter'][$Field]) || ($Field == 'table_name'))) {\n if ($FieldInfo['format_id']) {\n $FieldInfo['format_code'] = $this->getValueOfQuery('SELECT code FROM sys_format WHERE id=' . $FieldInfo['format_id']);\n $arrayConst['Meta']['Field'][$Field]['format_code'] = $FieldInfo['format_code'];\n }\n $Label = $FieldInfo['Label'];\n if ($FieldInfo['list_sortable']) {\n $list_sortable_direction_display = '';\n if ($_GET['list_sortable_field'] == $Field) {\n if ($_GET['list_sortable_direction'] == 'DESC') {\n $list_sortable_direction_display = ' ▲';\n }\n else {\n $list_sortable_direction_display = ' ▼';\n }\n }\n $Label = '<a href=\"javascript:void(0)\" style=\"color:white\" onclick=\"list_sortable(\\'' . $Field . '\\')\">' . $Label . $list_sortable_direction_display . '</a>';\n }\n if ($i == 1) {\n echo \"<td class='itemCenter'><input type='checkbox' name='chkall' id='chkall' value='1' onclick='docheck(this.checked,0);'></td>\";\n if ($arrayConst['Meta']['tableInfo'][\"show_order\"])\n echo \"<td class='itemCenter'>STT</td>\";\n if ($_GET[\"table_name\"] == 'dailyservice_in' || $arrayConst['tablename'] == 'dailyservice_in') {\n echo \"<td class='itemCenter' width='80'>IN Ref. No.</td>\";\n }\n else\n if ($_GET[\"table_name\"] == 'dailyservice_out' || $arrayConst['tablename'] == 'dailyservice_out') {\n echo \"<td class='itemCenter' width='80'>OUT Ref. No.</td>\";\n }\n else {\n echo \"<td class='itemCenter'>ID</td>\";\n }\n }\n else {\n if ($FieldInfo['fk_from']) {\n $Data = $this->RSTTOARRAY($this->getDynamic($FieldInfo['fk_from'], $FieldInfo['fk_where'], $FieldInfo['fk_orderby']), \"id\", array($FieldInfo['fk_text'] => $FieldInfo['fk_text']));\n }\n $DataSource[$Field] = $Data;\n if ($FieldInfo['Type'] == \"int\")\n if (strstr(strtolower($Field), \"price_goc\") != \"\") {\n if ($_SESSION[\"user_login\"][\"role_id\"] != 12) {\n echo \"<td class='itemCenter'>$Label</td>\";\n }\n }\n else {\n echo \"<td class='itemCenter'>$Label</td>\";\n }\n elseif ($FieldInfo['Type'] == \"real\")\n echo \"<td class='itemCenter'>$Label</td>\";\n elseif (strstr(strtolower($Field), \"picture\") != \"\")\n echo \"<td class='itemCenter'>$Label</td>\";\n else\n echo \"<td class='itemText'>$Label</td>\";\n }\n ++$i;\n }\n }\n// end Label\n echo \"</tr>\";\n $i = 0;\n $TotalIncome = 0;\n $pricecollected = 0;\n $TotalPayment = 0;\n $Paid = 0;\n $totalPriceINOut = 0;\n global $totalPriceInOut_balance_in;\n global $totalPriceInOut_balance_Out;\n while ($row = $this->nextData($arrayConst['rst'])) {\n $Plugin_Parameter['row'] = $row;\n $class_css = ($i % 2 == 0) ? \"cell2\" : \"cell1\";\n echo \"<tr class='$class_css'>\";\n $j = 1;\n if ($_GET[\"table_name\"] == 'dailyservices') {\n $TotalIncome += $row[\"totalprice\"];\n $pricecollected += $row[\"pricecollected\"];\n if ($_SESSION[\"user_login\"][\"role_id\"] == 4 || $_SESSION[\"user_login\"][\"role_id\"] == 11) {\n $TotalPayment += $row[\"payment_price\"];\n $Paid += $row[\"moneypaid_price\"];\n }\n }\n if ($_GET[\"table_name\"] == 'dailyservice_out' || $_GET[\"table_name\"] == 'dailyservice_in' || $arrayConst['tablename'] == 'dailyservice_in' || $arrayConst['tablename'] == 'dailyservice_out') {\n $totalPriceINOut += $row[\"total_price\"];\n }\n foreach ($arrayConst['Meta']['Field'] as $Field => $FieldInfo) {\n if (($FieldInfo['list_show']) && ((!$arrayConst['filter_parameter'][$Field]) || ($Field == 'table_name'))) {\n if ($FieldInfo['plugin_function_id']) {\n $function_name = $this->getValueOfQuery(\"SELECT function_name FROM sys_plugin_function WHERE id= \" . $FieldInfo['plugin_function_id']);\n $Plugin_Parameter['field_value'] = stripcslashes($row[$Field]);\n $Plugin_Parameter['field_info'] = stripcslashes($FieldInfo);\n $Plugin_Parameter['parameter'] = $FieldInfo['plufin_function_parameter'];\n eval('$row[$Field] = $this->' . $function_name . '($Plugin_Parameter);');\n }\n if ($FieldInfo['list_footer_subtotal'] && is_numeric($row[$Field])) {\n $arrayConst['Meta']['Field'][$Field]['subtotal'] += $row[$Field];\n }\n if ($j == 1) {\n $id = $row[$Field];\n echo \"<td class='itemCenter'>\" . $html->checkbox(\"chk\", $id, \"\", array(\"onclick\" => \"docheckone();\")) . \"</td>\";\n if ($arrayConst['Meta']['tableInfo'][\"show_order\"])\n echo \"<td class='itemCenter' style='width:20px; color:#3F5F7F'>\" . (($arrayConst['StartRow'] + $i + 1)) . \"</td>\";\n echo \"<td class='itemCenter' style='width:20px; color:#3F5F7F'>\" . $id . \"</td>\";\n }\n else {\n if ($FieldInfo['fk_from']) {\n if (count($DataSource[$Field]) > 0) {\n foreach ($DataSource[$Field] as $key => $value) {\n if ($row[$Field] == $key) {\n $row[$Field] = $value[0];\n }\n }\n }\n }\n if ($FieldInfo['format_code']) {\n echo \"<td class='itemRight'><a id='itemText' href='$page?edit=\" . $id . \"&$urlstring'>\" . $utl->format_vlink($row[$Field], $FieldInfo['format_code']) . \" </a></td>\";\n }\n else\n if ($FieldInfo['plugin_function_id']) {\n echo \"<td class='itemRight'>\" . $row[$Field] . \"</td>\";\n }\n else\n if (strstr(strtolower($Field), \"price\") != \"\") {\n if ($Field == 'price_goc') {\n if ($_SESSION[\"user_login\"][\"role_id\"] != 12) {\n echo \"<td class='itemRight'><a id='itemText' href='$page?edit=\" . $id . \"&$urlstring'>\" . $utl->format($row[$Field]) . \" </a></td>\";\n }\n }\n else {\n echo \"<td class='itemRight'><a id='itemText' href='$page?edit=\" . $id . \"&$urlstring'>\" . $utl->format($row[$Field]) . \" </a></td>\";\n }\n }\n elseif (strstr(strtolower($Field), \"tien\") != \"\")\n echo \"<td class='itemRight'><a id='itemText' href='$page?edit=\" . $id . \"&$urlstring'>\" . $utl->format($row[$Field]) . \" </a></td>\";\n elseif (strstr(strtolower($Field), \"quantity\") != \"\")\n echo \"<td class='itemRight'><a id='itemText' href='$page?edit=\" . $id . \"&$urlstring'>\" . $utl->format($row[$Field]) . \" </a></td>\";\n elseif (strstr(strtolower($Field), \"dientich\") != \"\")\n echo \"<td class='itemRight'><a id='itemText' href='$page?edit=\" . $id . \"&$urlstring'>\" . $utl->format($row[$Field]) . \" </a></td>\";\n elseif (strstr(strtolower($Field), \"vat\") != \"\" || strstr(strtolower($Field), \"percent\") != \"\")\n echo \"<td class='itemCenter'><a id='itemText' href='$page?edit=\" . $id . \"&$urlstring'>\" . $utl->format($row[$Field]) . VAT . \" </a></td>\";\n elseif (strstr(strtolower($Field), \"picture\") != \"\") {\n if (strstr(strtolower($Field), \".swf\") != \"\")\n $img = $js->flashWrite(\"../\" . $row[$Field], 50, 20, \"flashid\", \"#ffffff\", \"\", \"transparent\");\n else\n $img = \"<img onerror=\\\"$(this).hide()\\\" src='image.php/image.jpg?image=\" . $row[$Field] . \"&height=15&cropratio=3:1' border='0'>\";\n echo \"<td class='itemCenter'><a id='itemText' href='$page?edit=\" . $id . \"&$urlstring'>\" . $img . \"</a></td>\";\n }\n elseif (strstr(strtolower($Field), \"date\") != \"\")\n echo \"<td class='itemCenter'><a id='itemText' href='$page?edit=\" . $id . \"&$urlstring'>\" . date(\"d-m-Y\", (int) $row[$Field]) . \"</a></td>\";\n elseif ($FieldInfo['Type'] == \"int\" && $FieldInfo['Length'] <= 4) {\n echo \"<td class='itemCenter'><a id='itemText' href='$page?edit=\" . $id . \"&$urlstring'>\" . strtr($row[$Field], $statusActive) . \"</a></td>\";\n }\n elseif ($FieldInfo['Type'] == \"int\" || $FieldInfo['Type'] == \"real\")\n echo \"<td class='itemCenter'><a id='itemText' href='$page?edit=\" . $id . \"&$urlstring'>\" . $row[$Field] . \"</a></td>\";\n else\n echo \"<td class='itemText'><a id='itemText' href='$page?edit=\" . $id . \"&$urlstring'>\" . $utl->takeShortText($row[$Field], 10) . ((strstr($Field, \"percent\") != \"\") ? \"%\" : \"\") . \"</a></td>\";\n }\n ++$j;\n }\n//echo $str_if.\"<br/>\";\n }\n echo \"</tr>\";\n ++$i;\n }\n if ($_GET[\"table_name\"] == 'dailyservice_in' || $arrayConst['tablename'] == 'dailyservice_in') {\n echo \"<tr class='cell3'>\n\n\n\n\n\n\n\n\t\t\t\t <td colspan='6' style='text-align:right'><b>Total Income:</b></td>\n\n\n\n\n\n\n\n\t\t\t\t <td colspan='9' style='text-align:left'>\" . CURRENCY . $totalPriceINOut . \"</td>\n\n\n\n\n\n\n\n\t\t\t\t \";\n $totalPriceInOut_balance_in = $totalPriceINOut;\n }\n if ($_GET[\"table_name\"] == 'dailyservice_out' || $arrayConst['tablename'] == 'dailyservice_out') {\n echo \"<tr class='cell3'>\n\n\n\n\n\n\n\n\t\t\t\t <td colspan='6' style='text-align:right'><b>Total payment:</b></td>\n\n\n\n\n\n\n\n\t\t\t\t <td colspan='9' style='text-align:left'>\" . CURRENCY . $totalPriceINOut . \"</td>\n\n\n\n\n\n\n\n\t\t\t\t \";\n $totalPriceInOut_balance_Out = $totalPriceINOut;\n }\n//Footer\n if ($arrayConst['Meta']['list_footer']) {\n echo \"<tr class='titleBottom'>\";\n if ($arrayConst['Meta']['tableInfo'][\"show_order\"])\n echo \"<td></td>\";\n foreach ($arrayConst['Meta']['Field'] as $Field => $FieldInfo) {\n if (($FieldInfo['list_show']) && ((!$arrayConst['filter_parameter'][$Field]) || ($Field == 'table_name'))) {\n $subtotal = $arrayConst['Meta']['Field'][$Field]['subtotal'];\n echo \"<td class='itemRight'>\" . $utl->format_vlink($subtotal, $FieldInfo['format_code']) . \"</td>\";\n }\n ++$i;\n }\n echo \"<td></td>\";\n echo \"</tr>\";\n//End Footer\n }\n echo \"</table>\";\n echo \"</div>\";\n }", "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$grid->setHeight('185');\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$grid1 = $this->defgridit();\n\t\t$grid1->setHeight('190');\n\t\t$param['grids'][] = $grid1->deploy();\n\n\t\t// Configura los Paneles\n\t\t$readyLayout = $grid->readyLayout2( 212, 220, $param['grids'][0]['gridname'],$param['grids'][1]['gridname']);\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t//Botones Panel Izq\n\t\t$grid->wbotonadd(array('id'=>'fimprime', 'img'=>'assets/default/images/print.png','alt'=> 'Imprimir transferencia', 'label'=>'Reimprimir'));\n\t\t$grid->wbotonadd(array(\"id\"=>\"ordene\" , \"img\"=>\"images/engrana.png\", \"alt\" => \"Orden Estimada\", \"label\"=>\"Orden Estimada\"));\n\t\t$grid->wbotonadd(array(\"id\"=>\"descar\", \"img\"=>\"images/engrana.png\", \"alt\" => \"Descargar Ingredientes\", \"label\"=>\"Descargar Ingred.\"));\n\t\t$grid->wbotonadd(array(\"id\"=>\"recibir\", \"img\"=>\"images/engrana.png\", \"alt\" => \"Recibir Produccion\", \"label\"=>\"Recibir Produccion\"));\n\t\t$grid->wbotonadd(array(\"id\"=>\"cerrado\", \"img\"=>\"images/engrana.png\", \"alt\" => \"Cerrar Orden\", \"label\"=>\"Cerrar Orden\"));\n\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t//Panel Central\n\t\t$centerpanel = $grid->centerpanel( $id = \"radicional\", $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita', 'title'=>'Agregar/Editar Registro'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar Registro'),\n\t\t\tarray('id'=>'fborra', 'title'=>'Eliminar Registro')\n\t\t);\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('PRDO', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('PRDO', 'JQ');\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\n\t\t$param['script'] = script('plugins/jquery.ui.autocomplete.autoSelectOne.js');\n\t\t$param['readyLayout'] = $readyLayout;\n\t\t$param['centerpanel'] = $centerpanel;\n\n\t\t$this->load->view('jqgrid/crud2',$param);\n\n\t}", "public function getPanel()\n\t{\n\t\t$body = Zend_Controller_Front::getInstance()->getResponse()->getBody();\n\n\t\tob_start();\n\n?>\n<h4>HTML</h4>\n<script type=\"text/javascript\" charset=\"utf-8\">\n\tvar ZFHtmlLoad = window.onload;\n\twindow.onload = function(){\n\t\tif (ZFHtmlLoad) {\n\t\t\tZFHtmlLoad();\n\t\t}\n\t\t$(\"#ZFDebug_Html_Tagcount\").html(document.getElementsByTagName(\"*\").length);\n\t\t$(\"#ZFDebug_Html_Stylecount\").html($(\"link[rel*=stylesheet]\").length);\n\t\t$(\"#ZFDebug_Html_Scriptcount\").html($(\"script[src]\").length);\n\t\t$(\"#ZFDebug_Html_Imgcount\").html($(\"img[src]\").length);\n\t};\n</script>\n<ul class=\"array-show\">\n\t<li><span class=\"key\">Tags</span> <span class=\"value\" id=\"ZFDebug_Html_Tagcount\"></span></li>\n\t<li><span class=\"key\">HTML Size</span> <span class=\"value\"><?php echo L8M_Library::getBytes(strlen($body)); ?></span></li>\n\t<li><span class=\"key\">CSS Files</span> <span class=\"value\" id=\"ZFDebug_Html_Stylecount\"></span></li>\n\t<li><span class=\"key\">JavaScript Files</span> <span class=\"value\" id=\"ZFDebug_Html_Scriptcount\"></span></li>\n\t<li><span class=\"key\">Image Files</span> <span class=\"value\" id=\"ZFDebug_Html_Imgcount\"></span></li>\n</ul>\n<h5>Validation</h5>\n<form method=\"<?php echo Zend_Form::METHOD_POST; ?>\" action=\"http://validator.w3.org/check\">\n\t<fieldset>\n\t\t<input type=\"hidden\" name=\"charset\" value=\"utf-8\" />\n\t\t<input type=\"hidden\" name=\"fragment\" value=\"<?php echo htmlentities($body); ?>\" />\n\t\t<input type=\"submit\" value=\"Validate With W3C\" />\n\t</fieldset>\n</form>\n<?php\n\n\t\treturn ob_get_clean();\n\t}", "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$grid->setHeight('185');\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$grid1 = $this->defgridit();\n\t\t$grid1->setHeight('190');\n\t\t$param['grids'][] = $grid1->deploy();\n\n\t\t// Configura los Paneles\n\t\t$readyLayout = $grid->readyLayout2( 212, 220, $param['grids'][0]['gridname'],$param['grids'][1]['gridname']);\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t//Botones Panel Izq\n\t\t$grid->wbotonadd(array('id'=>'imprime', 'img'=>'assets/default/images/print.png','alt' => 'Reimprimir', 'label'=>'Reimprimir Documento'));\n\t\tif($this->datasis->sidapuede('SCON','INCLUIR%' )){\n\t\t\t$grid->wbotonadd(array('id'=>'addscli', 'img'=>'images/agrega4.png' ,'alt' => 'Consignaci&oacute;n a cliente' , 'label'=>'Consignaci&oacute;n a Cliente'));\n\t\t\t$grid->wbotonadd(array('id'=>'addsprv', 'img'=>'images/agrega4.png' ,'alt' => 'Consignaci&oacute;n a proveedor', 'label'=>'Consignaci&oacute;n a Proveedor'));\n\t\t}\n\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t//Panel Central\n\t\t$centerpanel = $grid->centerpanel( $id = 'radicional', $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita', 'title'=>'Agregar/Editar Registro'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar Registro'),\n\t\t\tarray('id'=>'fborra', 'title'=>'Eliminar Registro')\n\t\t);\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t$param['script'] = '';\n\t\t$param['readyLayout'] = $readyLayout;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('SCON', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('SCON', 'JQ');\n\t\t$param['centerpanel'] = $centerpanel;\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\t\t$this->load->view('jqgrid/crud2',$param);\n\n\t}", "public function initializeAdminPanel() {}", "public function index()\n\t{\n\t\t// PANEL\n\t\t$this->load->view('panel/footer');\n\t}", "function Hana_Panel_Manager($themename, $images_url, $version){\n\t\t$this->themename=$themename;\n\t\t$this->hana_images_url=$images_url;\n\t\t$this->hana_version=$version;\n\t\t$this->first_save=get_option(HANA_SHORTNAME.'_first_save');\n\t\t\n\t\tif ( isset($_GET['page']) && $_GET['page'] == HANA_OPTIONS_PAGE ){\n\t\t\tadd_action('init', array(&$this,'save_options'), 20); \n\t\t}\n\t}", "function popup_elements()\n\t\t{\n\t\t\t\n\t\t}", "function composeL1EditForm_buttonsDiv() {\n\n\n return;\n}", "public function _after_render() {\n $this->after_render();\n App::Module('Hook')->getHandler('Callback', 'after_render');\n\n if (App::AdminManager()->isLoggedIn()) {\n $this->after_adminpanel_render();\n App::Module('Hook')->getHandler('Callback', 'after_adminpanel_render');\n }\n\n $this->printQuries();\n }", "abstract function buildShowLayout(): void;", "function controls()\n\t{\n\t}", "abstract protected function showContent(): self;", "public function actionRenderTaskPanel() {\n if (isset($_GET['panel'])) {\n $model = null;\n $inner = false;\n\n switch ($_GET['panel']) {\n case 'search':\n $model = new SearchForm;\n break;\n case 'statistics':\n $model = new SearchForm;\n if (isset($_GET['form'])) {\n $this->renderPartial($_GET['form'], null, false, true);\n $inner = true;\n }\n break;\n }\n\n if (!$inner)\n $this->renderPartial($_GET['panel'], array('model' => $model), false, true);\n }\n }", "public function init_panel() {\n\t\t\tif ( ! empty( $this->omise_customer_id ) ) {\n\t\t\t\ttry {\n\t\t\t\t\t$viewData['existingCards'] = $this->customerCard->get($this->omise_customer_id);\n\t\t\t\t\t$viewData['cardFormTheme'] = $this->omiseCardGateway->get_option('card_form_theme');\n\t\t\t\t\t$viewData['secure_form_enabled'] = (boolean)$this->omiseCardGateway->get_option('secure_form_enabled');\n\t\t\t\t\t$viewData['formDesign'] = Omise_Page_Card_From_Customization::get_instance()->get_design_setting();\n\t\t\t\t\t$viewData['cardIcons'] = $this->omiseCardGateway->get_card_icons();\n\t\t\t\t\t$this->register_omise_my_account_scripts();\n\n\t\t\t\t\tOmise_Util::render_view( 'templates/myaccount/my-card.php', $viewData );\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t// nothing.\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$grid1 = $this->defgridit();\n\t\t$param['grids'][] = $grid1->deploy();\n\n\t\t// Configura los Paneles\n\t\t$readyLayout = $grid->readyLayout2( 212, 220, $param['grids'][0]['gridname'],$param['grids'][1]['gridname']);\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t//Botones Panel Izq\n\t\t$grid->wbotonadd(array('id'=>'boton1', 'img'=>'assets/default/images/print.png', 'alt' => 'Reimprimir', 'label'=>'Reimprimir'));\n\n\t\tif($this->datasis->sidapuede('SFAC','INCLUIR%' ))\n\t\t\t$grid->wbotonadd(array('id'=>'bffact', 'img'=>'images/RedoGreen.png', 'alt' => 'Facturar', 'label'=>'Facturar'));\n\n\t\tif($this->datasis->sidapuede('SNTE','INCLUIR%' ))\n\t\t\t$grid->wbotonadd(array('id'=>'bsnte', 'img'=>'images/RedoBlue.png', 'alt' => 'Nota de Entrega', 'label'=>'N.Entrega'));\n\n\t\t$grid->wbotonadd(array('id'=>'bcorreo', 'img'=>'assets/default/images/mail_btn.png','alt' => 'Notificacion', 'label'=>'Notificar por email'));\n\t\t$grid->wbotonadd(array('id'=>'bfavori', 'img'=>'images/star.png','alt' => 'Marcar Favorito', 'label'=>'Marcar Favorito'));\n\t\t$grid->wbotonadd(array('id'=>'bgrfavo', 'img'=>'images/star.png','alt' => 'Grupo de Favorito', 'label'=>'Grupo de Favorito'));\n\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t//Panel Central\n\t\t$centerpanel = $grid->centerpanel( $id = 'radicional', $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita' , 'title'=>'Agregar/Editar Registro'),\n\t\t\tarray('id'=>'ffact' , 'title'=>'Convertir en factura'),\n\t\t\tarray('id'=>'scliexp', 'title'=>'Ficha de Cliente' ),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar Registro' ),\n\t\t\tarray('id'=>'fborra' , 'title'=>'Eliminar Registro')\n\t\t);\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t$param['script'] = '';\n\t\t//$param['EastPanel'] = $EastPanel;\n\t\t$param['readyLayout'] = $readyLayout;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('SPRE', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('SPRE', 'JQ');\n\t\t$param['centerpanel'] = $centerpanel;\n\t\t//$param['funciones'] = $funciones;\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\t\t$this->load->view('jqgrid/crud2',$param);\n\t}", "public function _get_display_callback()\n {\n }", "public function onBeforeEndPanels(&$row)\n {\n echo JHtml::_('sliders.panel', 'Exemple end panel', 'test-end-panel');\n echo '<fieldset class=\"panelform\">' \n . JText::_('PLG_JEA_OWNER_NAME'). ' : <strong>'\n . $row->owner_name . '</strong></fieldset>';\n }", "private function _reload_welcome()\r\n\t{\r\n\t\t$this->callback[] = array(\r\n\t\t\t'fn' => 'ION.HTML',\r\n\t\t\t'args' => array(\r\n\t\t\t\t'item/welcome',\r\n\t\t\t\t'',\r\n\t\t\t\tarray('update' => 'splitPanel_mainPanel_pad')\r\n\t\t\t)\r\n\t\t);\r\n\t}", "public function openAddPanel()\n {\n sleep(1);\n // TODO: Add ID to \"Add\" button\n $this->_webui->clickButton('.btn.btn-primary.btn-xs.pull-right.mb20');\n }", "private function tabs_panels() {\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$panel_class = [ 'wpseo-local-meta-section' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$panel_class[] = 'active';\n\t\t\t\t}\n\n\t\t\t\techo '<div role=\"tabpanel\" id=\"wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $panel_class ) . '\">';\n\t\t\t\techo '<div class=\"wpseo-local-metabox-content\">';\n\t\t\t\tdo_action( 'wpseo-local-panel-content-' . $tab['id'] );\n\t\t\t\techo '</div>';\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t}", "public function addWidget()\r\n {\r\n }", "function checkPanelMode()\n\t{\n\t\tswitch ($this->display_mode)\n\t\t{\n\t\t\tcase \"view\":\n\t\t\t\t$this->displayStatusPanel();\n\t\t\t\tbreak;\n\n\t\t\tcase \"setup\":\n\t\t\t\t$this->displayProcessPanel();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function panelButtons()\n {\n\n $i18n = $this->getI18n();\n $html = '';\n \n if ($this->buttons || $this->filterButtons) {\n $html .= '<div class=\"wgt-panel\" >';\n \n if ($this->buttons) {\n $html .= '<div class=\"left\" >';\n $html .= $this->buildButtons();\n $html .= '</div>';\n }\n \n if ($this->filterButtons) {\n $html .= '<div class=\"right\" ><div class=\"left\" ><strong>'.$i18n->l('Filters', 'wbf.label').'&nbsp;|&nbsp;</strong></div>';\n $html .= $this->buildButtons($this->filterButtons);\n $html .= '</div>';\n }\n \n if ($this->filterPanel) {\n $html .= $this->filterPanel->render();\n }\n \n $html .= '</div>';\n }\n \n return $html;\n \n }", "public function call_patient_gui()\n {\n //Check to load the Session Once\n //print_r($_SESSION['patientLabel']);\n if(count($_SESSION['patientLabel']) > 0)\n {\n \n }\n else\n {\n $userInfoValue = $this->userInfo();\n $persoanlizedPatientGUI = new lib_gui($userInfoValue);\n // Label v/s Provider Types\n $AccountTypeLabelsArray = $persoanlizedPatientGUI->getLabelValueClinic();\n // print_r($AccountTypeLabelsArray);\n foreach($AccountTypeLabelsArray as $key => $value)\n {\n $_SESSION['patientLabel'][$key] = $value;\n }\n $clinicfeaturelist = $persoanlizedPatientGUI->getFeatureClinicType();\n foreach($clinicfeaturelist as $key => $value)\n {\n $_SESSION['clinicfeature'][$key] = $value;\n }\n }\n //print_r( $_SESSION);\n }", "public function run(){\n echo CHtml::closeTag(\"div\");\n \n if ($this->leftCollarVisible) {\n echo CHtml::openTag(\"div\", $this->getCollarOptions(\"left\"));\n echo CHtml::closeTag(\"div\");\n }\n \n if ($this->rightCollarVisible) {\n echo CHtml::openTag(\"div\", $this->getCollarOptions(\"right\"));\n echo CHtml::closeTag(\"div\");\n }\n \n if ($this->stitchesVisible) {\n echo CHtml::openTag(\"div\", $this->getStichOptions(\"top\"));\n echo CHtml::closeTag(\"div\");\n echo CHtml::openTag(\"div\", $this->getStichOptions(\"bottom\"));\n echo CHtml::closeTag(\"div\");\n }\n \n // Left shadow triangle\n echo CHtml::openTag(\"div\", $this->getShadowTriangleOptions(\"left\"));\n echo CHtml::closeTag(\"div\");\n \n // Right shadow triangle\n echo CHtml::openTag(\"div\", $this->getShadowTriangleOptions(\"right\"));\n echo CHtml::closeTag(\"div\");\n \n echo CHtml::closeTag(\"div\");\n echo CHtml::closeTag(\"div\");\n }", "function panel($page) {\n\n\t\tif ($page == 'create') {\n\n\t\t\t$this->auth->create_user('admin');\t\n\n\t\t} elseif ($page == 'update') {\n\n\t\t\t$this->auth->update_user('admin');\t\n\n\t\t} elseif ($page == 'delete') {\n\n\t\t\t$this->auth->delete_user('admin');\n\n\t\t} elseif ($page == 'roles') {\n\n\t\t\t$this->auth->change_roles();\n\n\t\t} else {\n\n\t\t\t$data['title'] = 'Admin Panel | Envysea Codeigniter Authentication';\n\n\t\t\t$data['module'] = 'admin';\n\n\t\t\t$data['template'] = 'panel_view';\n\n\n\n\t\t\t$this->load->view('template', $data);\n\n\t\t}\n\n\t}", "function panel($page) {\n\n\t\tif ($page == 'create') {\n\n\t\t\t$this->auth->create_user('admin');\t\n\n\t\t} elseif ($page == 'update') {\n\n\t\t\t$this->auth->update_user('admin');\t\n\n\t\t} elseif ($page == 'delete') {\n\n\t\t\t$this->auth->delete_user('admin');\n\n\t\t} elseif ($page == 'roles') {\n\n\t\t\t$this->auth->change_roles();\n\n\t\t} else {\n\n\t\t\t$data['title'] = 'Admin Panel | Envysea Codeigniter Authentication';\n\n\t\t\t$data['module'] = 'admin';\n\n\t\t\t$data['template'] = 'panel_view';\n\n\n\n\t\t\t$this->load->view('template', $data);\n\n\t\t}\n\n\t}", "protected function callRenderMethod() {}", "public function callViewHelper() {}", "function jqdatag(){\n\n\t\t$grid = $this->defgrid();\n\t\t$grid->setHeight('185');\n\t\t$param['grids'][] = $grid->deploy();\n\n\t\t$grid1 = $this->defgridit();\n\t\t$grid1->setHeight('190');\n\t\t$param['grids'][] = $grid1->deploy();\n\n\t\t// Configura los Paneles\n\t\t$readyLayout = $grid->readyLayout2( 212, 220, $param['grids'][0]['gridname'],$param['grids'][1]['gridname']);\n\n\t\t//Funciones que ejecutan los botones\n\t\t$bodyscript = $this->bodyscript( $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t//Botones Panel Izq\n\t\t$grid->wbotonadd(array('id'=>'imprime', 'img'=>'assets/default/images/print.png','alt' => 'Imprimir', 'label'=>'Imprimir Relacion'));\n\t\t$WestPanel = $grid->deploywestp();\n\n\t\t//Panel Central\n\t\t$centerpanel = $grid->centerpanel( $id = 'radicional', $param['grids'][0]['gridname'], $param['grids'][1]['gridname'] );\n\n\t\t$adic = array(\n\t\t\tarray('id'=>'fedita', 'title'=>'Agregar/Editar Registro'),\n\t\t\tarray('id'=>'fshow' , 'title'=>'Mostrar Registro'),\n\t\t\tarray('id'=>'fborra', 'title'=>'Eliminar Registro')\n\t\t);\n\t\t$SouthPanel = $grid->SouthPanel($this->datasis->traevalor('TITULO1'), $adic);\n\n\t\t$param['WestPanel'] = $WestPanel;\n\t\t$param['script'] = '';\n\t\t$param['readyLayout'] = $readyLayout;\n\t\t$param['SouthPanel'] = $SouthPanel;\n\t\t$param['listados'] = $this->datasis->listados('RCOBRO', 'JQ');\n\t\t$param['otros'] = $this->datasis->otros('RCOBRO', 'JQ');\n\t\t$param['centerpanel'] = $centerpanel;\n\t\t$param['temas'] = array('proteo','darkness','anexos1');\n\t\t$param['bodyscript'] = $bodyscript;\n\t\t$param['tabs'] = false;\n\t\t$param['encabeza'] = $this->titp;\n\t\t$param['tamano'] = $this->datasis->getintramenu( substr($this->url,0,-1) );\n\t\t$this->load->view('jqgrid/crud2',$param);\n\n\t}", "protected function Form_Run() {}", "function siteorigin_panels_the_widget( $widget, $instance, $section, $grid, $cell, $panel, $is_last, $post_id = false ) {\n\tif ( !class_exists( $widget ) ) return;\n\tif( empty($post_id) ) $post_id = get_the_ID();\n\n\t$the_widget = new $widget;\n\n\t$classes = array( 'panel' );\n\tif ( !empty( $the_widget->id_base ) ) $classes[] = $the_widget->id_base;\n\tif ( $is_last ) $classes[] = 'panel-last';\n\tif ($instance['align']) $classes[] = $instance['align'];\n\t$classes[] = 'panel-'.($panel+1);\n\n\t$the_widget->widget( array(\n\t\t'before_widget' => '<div class=\"' . esc_attr( implode( ' ', $classes ) ) . '\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3>',\n\t\t'after_title' => '</h3>'\n\t), $instance );\n}", "public function getControls();", "public function getRender(){\n /*\n * adiciona os listeners de comportamento padrão do componente\n */\n \n //ação que executa ao clicar sobre algum evento, abre a tela com as informações carregadas\n $sFuncao = \"eventWindow.show(record, el);\";\n $this->addListener(self::EVENTO_CLICK,$sFuncao,\"view, record, el\");\n \n //ação que ocorre ao clicar sobre os grids (dia, semana, mês)\n $sFuncao = \"eventWindow.show({\"\n .\"StartDate: date,\"\n .\"IsAllDay: allDay\"\n .\"}, el);\";\n $this->addListener(self::EVENTO_DAY_CLICK,$sFuncao,\"view, date, allDay, el\");\n \n //ação que ocorre ao redimensionar (aumentar ou reduzir) o tempo de um evento\n $sFuncaoUpdate = \"var calendarEventStore = Ext.ComponentQuery.query('#\".$this->getId().\"-calendar')[0].eventStore;\"\n .\"calendarEventStore.sync({\"\n .\"callback: function(batch, operation){\"\n .\"var result = batch.operations[0].request.scope.reader.jsonData['success'];\"\n .\"if(!result){\"\n .\"calendarEventStore.rejectChanges();\"\n .\"}\"\n .\"}\"\n .\"});\";\n $this->addListener(self::EVENTO_RESIZE,$sFuncaoUpdate,\"view, record\");\n \n //ação que ocorre ao mover um evento na tela\n $this->addListener(self::EVENTO_MOVE,$sFuncaoUpdate,\"view, record\");\n \n //ação que ocorre ao iniciar a movimentação dos elementos na tela\n $sFuncao = \"if(eventWindow && eventWindow.isVisible()){\"\n .\"eventWindow.hide();\"\n .\"}\";\n $this->addListener(self::EVENTO_DRAG,$sFuncao,\"view\");\n \n //ação que ocorre após selecionar várias linhas no grid (permite criar novo eventos por intervalos)\n $sFuncao = \"eventWindow.show(dates);\"\n .\"eventWindow.on('hide', onComplete, this, {single:true});\";\n $this->addListener(self::EVENTO_RANGE,$sFuncao,\"window, dates, onComplete\");\n \n /*\n * eventos que podem ser implementados no componente\n */\n //$this->addListener(self::EVENTO_OVER,\"\",\"view, record, el\");\n //$this->addListener(self::EVENTO_OUT,\"\",\"view, record, el\");\n //$this->addListener(self::EVENTO_ADD,$sFuncao,\"form, record\");\n //$this->addListener(self::EVENTO_UPDATE,$sFuncao,\"form, record\");\n //$this->addListener(self::EVENTO_DELETE,$sFuncao,\"window, record\");\n //$this->addListener(self::EVENTO_CANCEL,\"\",\"form, record\");\n //$this->addListener(self::EVENTO_VIEW_CHANGE,$sFuncao,\"panel, view, info\");\n \n $aRender = array(\n \"xtype\" => 'calendarpanel',\n \"itemId\" => $this->getId().\"-calendar\",\n \"calendarStore\" => $this->getRenderStoreTipoEvento(),\n \"eventStore\" => $this->getRenderStoreEvento(),\n \"activeItem\" => $this->getPerspectiva(),\n \"showNavBar\" => $this->getMostraBarraPerspectivas(),\n \"showDayView\" => $this->getMostraPerspectivaDia(),\n \"showWeekView\" => $this->getMostraPerspectivaSemana(),\n \"showMonthView\" => $this->getMostraPerspectivaMes(),\n \"showTime\" => $this->getMostraHora(),\n \"monthViewCfg\" => $this->getConfiguracaoMes(),\n \"eventIncrement\" => $this->getDuracaoEvento(),\n \"viewStartHour\" => $this->getHoraInicial(),\n \"viewStartMinute\" => $this->getMinutoInicial(),\n \"viewEndHour\" => $this->getHoraFinal(),\n \"viewEndMinute\" => $this->getMinutoFinal(),\n \"viewConfig\" => $this->getConfiguracao(),\n \"listeners\" => $this->getListeners()\n );\n \n $sRender = \"Ext.create('Ext.panel.Panel', {\"\n .\"layout: 'border',\"\n .\"border: true,\"\n .\"items: [{\"\n .\"xtype: 'panel',\"\n .\"itemId: '\".$this->getId().\"-region-west',\"\n .\"region: 'west',\"\n .\"title: 'Calendário',\"\n .\"collapsible: true,\"\n .\"split: true,\"\n .\"width: 220,\"\n .\"maxWidth: 220,\"\n .\"layoutConfig: {\"\n .\"fill: false,\"\n .\"animate: true\"\n .\"},\"\n .\"padding: '3',\"\n .\"bodyStyle:{\"\n .\"backgroundColor: '#157fcc'\"\n .\"},\"\n .\"items: [{\"\n .\"xtype: 'datepicker',\"\n .\"itemId: '\".$this->getId().\"-picker',\"\n .\"cls: 'ext-cal-nav-picker',\"\n .\"listeners: {\"\n .\"'select': {\"\n .\"fn: function(dp, dt){\"\n .\"Ext.ComponentQuery.query('#\".$this->getId().\"-calendar')[0].setStartDate(dt);\"\n .\"},\"\n .\"scope: this\"\n .\"}\"\n .\"}\"\n .\"},{\"\n .$this->getListaAgenda()\n .\"}]\"\n .\"},{\"\n .\"region: 'center',\"\n .\"itemId: '\".$this->getId().\"-region-center',\"\n .\"style:{\"\n .\"border: '3px solid #5A91D2',\"\n .\"borderLeft: 'none'\"\n .\"},\"\n .Base::getRender($aRender)\n .\"}]\"\n .\"})\";\n \n return Base::addObj($sRender,$this->getRenderTo()).$this->getTelaManutencao();\n }", "public function createFrames() {}", "public function loadExamplePanel() {\n\t\t// Check for read access\n\t\tif($this->access < 1) { return array('result' => 'failure', 'message' => 'Access Denied!'); }\n\t\t\n\t\t// Set return data\n\t\t$data = '<p>Return data from an AJAX call.</p>';\n\t\t\n\t\t// Return data for the table\n\t\treturn array('result' => 'success', 'data' => $data);\n\t}", "public function postRender()\n {\n }", "function _panel(){\n require 'inicio.php';\n}", "public function addsButtons() {}", "public function renderComponents();", "function display() {\r\n\t\tparent::display ();\r\n\t}", "function positive_panels_init(){\n\t/*$display_settings = get_option('siteorigin_panels_display', array());\n\tif( isset($display_settings['bundled-widgets'] ) && !$display_settings['bundled-widgets'] ) return;*/\n\n\tinclude 'widgets/widgets.php';\n}", "public function view(){\n\t\t\t$this->__switchboard();\n\t\t}", "public\tfunction\tpanelSettings() {\n\t\t\t//Load the panel matching the settings slug.\n\t\t\tself::panel('FrozenPlugin-settings');\n\t\t}" ]
[ "0.78438944", "0.63536257", "0.6326953", "0.62761337", "0.61919177", "0.6120641", "0.61157954", "0.6090059", "0.6042981", "0.6020989", "0.6002968", "0.598499", "0.5923383", "0.59140754", "0.5903577", "0.5899847", "0.58077645", "0.57773", "0.5739683", "0.5726654", "0.57136923", "0.5692323", "0.56748646", "0.5663505", "0.56407887", "0.5640332", "0.56099814", "0.55954874", "0.5587542", "0.5587227", "0.55856705", "0.55590165", "0.55521035", "0.551572", "0.54889065", "0.54813635", "0.5476709", "0.5459865", "0.54483765", "0.54458994", "0.542848", "0.5425511", "0.54227954", "0.54201907", "0.5400777", "0.5385507", "0.53840077", "0.53830117", "0.53778183", "0.53772366", "0.5373931", "0.5372479", "0.5365474", "0.5361548", "0.5359757", "0.53584665", "0.535419", "0.5335734", "0.5332948", "0.5316607", "0.5303138", "0.5303006", "0.52787393", "0.5272286", "0.52710533", "0.5266239", "0.5255419", "0.5250827", "0.52478313", "0.52358556", "0.5233521", "0.523181", "0.5221792", "0.52185154", "0.52123487", "0.51984024", "0.5192196", "0.51915115", "0.5190727", "0.5187624", "0.5178614", "0.5159286", "0.5156806", "0.5156806", "0.5156748", "0.51366556", "0.51289904", "0.5126223", "0.5123715", "0.5107734", "0.5107516", "0.51053065", "0.51044655", "0.51024544", "0.50984", "0.5094818", "0.50835246", "0.50700396", "0.5063996", "0.5056607", "0.5056186" ]
0.0
-1
put your code here
public function offsetExists($offset) { return array_key_exists($offset, $this->config); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n //\n \n }", "public function run()\n\t{\n\t\t//\n\t}", "public function preExecute(){\n\n\t\n\t}", "function script()\n {\n }", "public function run()\n {\n \n }", "public function run()\n {\n \n }", "public function custom()\n\t{\n\t}", "public function run()\n {\n //\n }", "public function run()\n {\n //\n }", "public function run()\r\n {\r\n\r\n }", "public function run(){\n parent::run();\n //Do stuff...\n }", "function run() {\r\n $this->set_demopage();\r\n\r\n $options_def = array(\r\n __class__ => '', // code CSS. ATTENTION [ ] à la place des {}\r\n 'id' => ''\r\n );\r\n\r\n $options = $this->ctrl_options($options_def);\r\n\r\n // il suffit de charger le code dans le head\r\n $this->load_css_head($options[__class__]);\r\n\r\n // -- aucun code en retour\r\n return '';\r\n }", "public function run()\n {\n\n parent::run();\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "function execute()\r\n\t{\r\n\t\t\r\n\t}", "protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}", "function use_codepress()\n {\n }", "public function run()\n {\n // Put your code here;\n }", "function run()\r\n {\r\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run() {\n }", "public static function run() {\n\t}", "public function onRun()\n {\n }", "public function run() {\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\tif(\\Yii::app()->user->isGuest === true) {\n\t\t\techo $content;\n\t\t} else {\n\t\t\t$this->render('header');\n\t\t}\n\t}", "public function run() {\n }", "public function render_content() {\n\t}", "public function main()\r\n {\r\n \r\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "function render() ;", "function execute()\n {\n }", "public function run(): void\n {\n //\n }", "protected function main()\n /**/\n {\n parent::run();\n }", "public function execute()\n {\n //echo __('Hello Webkul Team.');\n $this->_view->loadLayout();\n $this->_view->renderLayout();\n }", "public function render()\n {\n //\n }", "public function run(){\n echo CHtml::closeTag( \"div\" );\n $this->registerScript();\n }", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "function __desctuct(){\r\n\t\t?>\r\n\r\n\t\t</body>\r\n\t\t</html>\r\n\t\t<?php\r\n\t}", "public function run(){}", "public function demo()\n {\n // xu ly logic\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "public function render(){\n\t\t\n\t}", "public static function main(){\n\t\t\t\n\t\t}", "public function render() {\r\n\t\t\r\n\t}", "public function main()\n\t{\n\t}", "function handle() ;", "public function execute() {\n\t}", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "public function run() {}", "public\n\n\tfunction generate_code()\n\t{\n\t\t$data[\"hitung\"] = $this->Madmin->buat_code();\n\t\t$this->load->view('admin/Generate_code', $data);\n\t}", "public function display_code() {\n\t\techo '<h1>Premise Demo Page</h1>\n\t\t<div class=\"span10\">';\n\n\n\t\t\t// test a form with all possible fields.\n\t\t\t// pass your own arguments if you'd like.\n\t\t\t// new PWP_Demo_Form();\n\n\t\t\t// Premise_test::fields();\n\t\t\t// Premise_test::fields_hooks();\n\t\t\t// Premise_test::fields_demo();\n\t\t\t// Premise_test::videos_embed();\n\t\t\t// Premise_test::fields_duplicate();\n\t\t\t// Premise_test::google_map();\n\t\t\t// Premise_test::grids();\n\n\t\techo '</div>';\n\t}", "function main()\r\n {\r\n $this->setOutput();\r\n }", "public function run()\n\n {\n DB::table('actives')->insert([\n 'script_tag' => 0,\n 'status' =>0\n \n ]);\n //\n }", "protected function _exec()\n {\n }", "public function run() {\n\n\t\t// generate random string md5(uniqid(rand(), true));\n\t\t$this->goneta();\n\t\t$this->pamparam();\n\t\t$this->insideOut();\n\t\t$this->morfoza();\n\t\t$this->basorelief();\n\t\t$this->acajouWasZuSagen();\n\t}", "protected function after_load(){\n\n\n }", "public function work()\n {\n }", "function run();", "function run();", "public function run() {\n\t\t// include other classes\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-render.php';\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-sso.php';\n\t\t\n\t\t// enque styles for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_styles' \n\t\t) );\n\t\t// enque jquery scripts for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_script' \n\t\t) );\n\t\t// add submit action form to redirect and catch from admin.php\n\t\tadd_action ( 'admin_post_tr_action', array (\n\t\t\t\t$this,\n\t\t\t\t'prefix_admin_tr_action' \n\t\t) );\n\t\t\n\t\t// check if plugin tables exist\n\t\t$this->table_check ();\n\t\t\n\t\t// instantiate the render class for shortcodes to work\n\t\t$shortcodes = new Top_Ratter_Render ();\n\t}", "function tap_run_page_handler() \n {\n include(\"/var/www/html/run/tap_run.php\");\n \n $params = cargaArray('Torneo Argentino de Programación', $form, '');\n \n include('body.php'); \n }", "function run() {\r\n $this->view->data=$this->model->run();\r\n }", "function custom_construction() {\r\n\t\r\n\t\r\n\t}", "public function run()\n {\n \\App\\Model\\TemplateLib::create([\n 'name' => 'FNK Test',\n 'stylesheet' => 'body {background:white};',\n 'javascript' => '',\n 'code_header' => $this->codeHeader,\n 'code_footer' => $this->codeFooter,\n 'code_index' => $this->codeIndex,\n 'code_search' => '<h1>saya di search</h1>',\n 'code_category' => '<h1>saya di category</h1>',\n 'code_page' => $this->codePage,\n 'code_post' => $this->codePost,\n 'code_about' => '<h1>saya di about</h1>',\n 'code_404' => '<h1>saya di 404</h1>',\n ]);\n }", "public function helper()\n\t{\n\t\n\t}", "public function drawContent()\n\t\t{\n\t\t}" ]
[ "0.60586566", "0.59289104", "0.5919654", "0.5899511", "0.5838488", "0.5838488", "0.58356965", "0.5814271", "0.5814271", "0.57796824", "0.5701954", "0.5700516", "0.5685669", "0.5684617", "0.5684617", "0.5684617", "0.5639208", "0.563027", "0.56278986", "0.56231225", "0.5620407", "0.56068903", "0.56068903", "0.56068903", "0.56016845", "0.5597219", "0.5595339", "0.5591545", "0.558057", "0.55636305", "0.55034596", "0.5487096", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.54594034", "0.5446425", "0.5446197", "0.54451364", "0.54319674", "0.5426377", "0.54072845", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.53981763", "0.5394762", "0.5392594", "0.5392164", "0.5391672", "0.5391672", "0.5391672", "0.5386191", "0.53823715", "0.5374112", "0.5373851", "0.5371084", "0.5369742", "0.53666246", "0.5365522", "0.5358571", "0.53542304", "0.5353158", "0.5345768", "0.5339915", "0.53389114", "0.53339213", "0.5332912", "0.5323722", "0.5323722", "0.5321411", "0.5318719", "0.53184503", "0.5300535", "0.5290181", "0.52723837", "0.52723306" ]
0.0
-1
Run the database seeds.
public function run() { /** * Permisos */ // Cuentas de Almacén $editar_cuenta_almacen = Permission::firstOrCreate(['name' => 'editar_cuenta_almacen', 'display_name' => 'Editar Cuenta de Almacén', 'description' => 'Permiso para editar una cuenta contable registrada en un Almacén']); $registrar_cuenta_almacen = Permission::firstOrCreate(['name' => 'registrar_cuenta_almacen', 'display_name' => 'Registrar Cuenta de Almacén', 'description' => 'Permiso para registrar una cuenta contable en un Almacén']); $consultar_cuenta_almacen = Permission::firstOrCreate(['name' => 'consultar_cuenta_almacen', 'display_name' => 'Consultar Cuenta de Almacén', 'description' => 'Permiso para consultar una o varias cuentas contables de Almacén']); //Cuentas de Conceptos $editar_cuenta_concepto = Permission::firstOrCreate(['name' => 'editar_cuenta_concepto', 'display_name' => 'Editar Cuenta de Concepto', 'description' => 'Permiso para editar una cuenta contable registrada en un Concepto']); $registrar_cuenta_concepto = Permission::firstOrCreate(['name' => 'registrar_cuenta_concepto', 'display_name' => 'Registrar Cuenta de Concepto', 'description' => 'Permiso para registrar una cuenta contable en un Concepto']); $consultar_cuenta_concepto = Permission::firstOrCreate(['name' => 'consultar_cuenta_concepto', 'display_name' => 'Consultar Cuenta de Concepto', 'description' => 'Permiso para consultar una o varias cuentas contables de Concepto']); // Cuentas Empresas $editar_cuenta_empresa = Permission::firstOrCreate(['name' => 'editar_cuenta_empresa', 'display_name' => 'Editar Cuenta de Empresa', 'description' => 'Permiso para editar una cuenta contable registrada en una Empresa']); $registrar_cuenta_empresa = Permission::firstOrCreate(['name' => 'registrar_cuenta_empresa', 'display_name' => 'Registrar Cuenta de Empresa', 'description' => 'Permiso para registrar una cuenta contable en una Empresa']); $consultar_cuenta_empresa = Permission::firstOrCreate(['name' => 'consultar_cuenta_empresa', 'display_name' => 'Consultar Cuenta de Empresa', 'description' => 'Permiso para consultar una o varias cuentas contables de Empresa']); $eliminar_cuenta_empresa = Permission::firstOrCreate(['name' => 'eliminar_cuenta_empresa', 'display_name' => 'Eliminar Cuenta de Empresa', 'description' => 'Permiso para eliminar cuentas contables de Empresa']); // Cuentas Generales $consultar_cuenta_general = Permission::firstOrCreate(['name' => 'consultar_cuenta_general', 'display_name' => 'Consultar Cuenta General', 'description' => 'Permiso para consultar una o varias Cuentas Contables Generales']); $registrar_cuenta_general = Permission::firstOrCreate(['name' => 'registrar_cuenta_general', 'display_name' => 'Registrar Cuenta General', 'description' => 'Permiso para registrar una cuenta contable General']); $editar_cuenta_general = Permission::firstOrCreate(['name' => 'editar_cuenta_general', 'display_name' => 'Editar Cuenta General', 'description' => 'Permiso para editar una cuenta contable General']); // Cuentas Materiales $consultar_cuenta_material = Permission::firstOrCreate(['name' => 'consultar_cuenta_material', 'display_name' => 'Consultar Cuenta de Material', 'description' => 'Permiso para consultar una o varias cuentas contables de materiales']); $registrar_cuenta_material = Permission::firstOrCreate(['name' => 'registrar_cuenta_material', 'display_name' => 'Registrar Cuenta General', 'description' => 'Permiso para registrar una cuenta contable en un Material']); $editar_cuenta_material = Permission::firstOrCreate(['name' => 'editar_cuenta_material', 'display_name' => 'Editar Cuenta Metarial', 'description' => 'Permiso para editar una cuenta contable registrada en un Material']); // Tipo Cuenta Contable $consultar_tipo_cuenta_contable = Permission::firstOrCreate(['name' => 'consultar_tipo_cuenta_contable', 'display_name' => 'Consultar Tipo de Cuenta Contable', 'description' => 'Permiso para consultar uno o varios tipos de cuenta contable']); $registrar_tipo_cuenta_contable = Permission::firstOrCreate(['name' => 'registrar_tipo_cuenta_contable', 'display_name' => 'Registrar Tipo de Cuenta Contable', 'description' => 'Permiso para registrar un tipo de cuenta contable']); $editar_tipo_cuenta_contable = Permission::firstOrCreate(['name' => 'editar_tipo_cuenta_contable', 'display_name' => 'Editar Tipo de Cuenta Contable', 'description' => 'Permiso para editar un tipo de cuenta contable']); $eliminar_tipo_cuenta_contable = Permission::firstOrCreate(['name' => 'eliminar_tipo_cuenta_contable', 'display_name' => 'Eliminar Tipo de Cuenta Contable', 'description' => 'Permiso para eliminar un tipo de cuenta contable']); // Plantillas de Prepólizas $consultar_plantilla_prepoliza = Permission::firstOrCreate(['name' => 'consultar_plantilla_prepoliza', 'display_name' => 'Consultar Plantilla de Prepóliza', 'description' => 'Permiso para consultar una o varias plantillas de Prepólizas']); $registrar_plantilla_prepoliza = Permission::firstOrCreate(['name' => 'registrar_plantilla_prepoliza', 'display_name' => 'Registrar Plantilla de Prepóliza', 'description' => 'Permiso para registrar plantillas de Prepólizas']); $eliminar_plantilla_prepoliza = Permission::firstOrCreate(['name' => 'eliminar_plantilla_prepoliza', 'display_name' => 'Eliminar Plantilla de Prepóliza', 'description' => 'Permiso para eliminar plantillas de Prepólizas']); // Configuración contable $editar_configuracion_contable = Permission::firstOrCreate(['name' => 'editar_configuracion_contable', 'display_name' => 'Editar Configuración Contable', 'description' => 'Permiso para editar la configuración Contable de la obra en contexto']); // Prepólizas Generadas $consultar_prepolizas_generadas = Permission::firstOrCreate(['name' => 'consultar_prepolizas_generadas', 'display_name' => 'Consultar Prepólizas Generadas', 'description' => 'Permiso para consultar una o varias Prepólizas Generadas']); $editar_prepolizas_generadas = Permission::firstOrCreate(['name' => 'editar_prepolizas_generadas', 'display_name' => 'Editar Prepólizas Generadas', 'description' => 'Permiso para editar las Prepólizas Generadas']); // Kardex Material $consultar_kardex_material = Permission::firstOrCreate(['name' => 'consultar_kardex_material', 'display_name' => 'Consultar Kardex de Materiales', 'description' => 'Permiso para consultar el Kardex de Materiales']); //Solicitud de Recasificación $solicitar_reclasificacion = Permission::firstOrCreate(['name' => 'solicitar_reclasificacion', 'display_name' => 'Solicitar Reclasificación', 'description' => 'Permiso para Solicitar Reclasificación de Costo']); $autorizar_reclasificacion = Permission::firstOrCreate(['name' => 'autorizar_reclasificacion', 'display_name' => 'Autorizar Reclasificación', 'description' => 'Permiso para Autorizar Reclasificación de Costo']); $consultar_reclasificacion = Permission::firstOrCreate(['name' => 'consultar_reclasificacion', 'display_name' => 'Consultar Reclasificación', 'description' => 'Permiso para Consultar Reclasificación de Costo']); //Formatos $consultar_formato_estimacion = Permission::firstOrCreate(['name' => 'consultar_formato_estimacion', 'description' => 'Consultar Formato de Orden de Pago Estimación', 'display_name' => 'Consultar Formato de Orden de Pago Estimación']); $consultar_formato_comparativa_presupuestos = Permission::firstOrCreate(['name' => 'consultar_formato_comparativa_presupuestos', 'description' => 'Consultar Formato de Tabla Comparativa de Presupuestos', 'display_name' => 'Consultar Formato de Tabla Comparativa de Presupuestos']); //Comprobante de Fondo Fijo $editar_comprobante_fondo_fijo = Permission::firstOrCreate(['name' => 'editar_comprobante_fondo_fijo', 'display_name' => 'Editar Comprobante de Fondo Fijo', 'description' => 'Permiso para editar un Comprobante de Fondo Fijo']); $registrar_comprobante_fondo_fijo = Permission::firstOrCreate(['name' => 'registrar_comprobante_fondo_fijo', 'display_name' => 'Registrar Comprobante de Fondo Fijo', 'description' => 'Permiso para registrar un Comprobante de Fondo Fijo']); $consultar_comprobante_fondo_fijo = Permission::firstOrCreate(['name' => 'consultar_comprobante_fondo_fijo', 'display_name' => 'Consultar Comprobante de Fondo Fijo', 'description' => 'Permiso para consultar un Comprobante de Fondo Fijo']); $eliminar_comprobante_fondo_fijo = Permission::firstOrCreate(['name' => 'eliminar_comprobante_fondo_fijo', 'display_name' => 'Eliminar Comprobante de Fondo Fijo', 'description' => 'Permiso para eliminar un Comprobante de Fondo Fijo']); //Traspaso Entre Cuentas $eliminar_traspaso_cuenta = Permission::firstOrCreate(['name' => 'eliminar_traspaso_cuenta', 'display_name' => 'Eliminar Traspasos entre cuentas', 'description' => 'Permiso para eliminar traspasos entre cuentas']); $registrar_traspaso_cuenta = Permission::firstOrCreate(['name' => 'registrar_traspaso_cuenta', 'display_name' => 'Registrar Traspasos entre cuentas', 'description' => 'Permiso para registrar un traspaso entre cuentas']); $consultar_traspaso_cuenta = Permission::firstOrCreate(['name' => 'consultar_traspaso_cuenta', 'display_name' => 'Consultar Traspasos entre cuentas', 'description' => 'Permiso para consultar la lista de traspasos entre cuentas']); $editar_traspaso_cuenta = Permission::firstOrCreate(['name' => 'editar_traspaso_cuenta', 'display_name' => 'Editar Traspasos entre cuentas', 'description' => 'Permiso para editar la lista de traspasos entre cuentas']); //Movimientos Bancarios $eliminar_movimiento_bancario = Permission::firstOrCreate(['name' => 'eliminar_movimiento_bancario', 'display_name' => 'Eliminar Movimientos Bancarios', 'description' => 'Permiso para eliminar Movimientos Bancarios']); $registrar_movimiento_bancario = Permission::firstOrCreate(['name' => 'registrar_movimiento_bancario', 'display_name' => 'Registrar Movimientos Bancarios', 'description' => 'Permiso para registrar un movimiento bancario']); $consultar_movimiento_bancario = Permission::firstOrCreate(['name' => 'consultar_movimiento_bancario', 'display_name' => 'Consultar Movimientos Bancarios', 'description' => 'Permiso para consultar la lista de Movimientos Bancarios']); $editar_movimiento_bancario = Permission::firstOrCreate(['name' => 'editar_movimiento_bancario', 'display_name' => 'Editar Movimientos Bancarios', 'description' => 'Permiso para editar la lista de Movimientos Bancarios']); //Cuentas de Fondo $editar_cuenta_fondo = Permission::firstOrCreate(['name' => 'editar_cuenta_fondo', 'display_name' => 'Editar Cuenta de Fondo', 'description' => 'Permiso para editar una cuenta contable registrada en un Fondo']); $registrar_cuenta_fondo = Permission::firstOrCreate(['name' => 'registrar_cuenta_fondo', 'display_name' => 'Registrar Cuenta de Fondo', 'description' => 'Permiso para registrar una cuenta contable en un Fondo']); $consultar_cuenta_fondo = Permission::firstOrCreate(['name' => 'consultar_cuenta_fondo', 'display_name' => 'Consultar Cuenta de Fondo', 'description' => 'Permiso para consultar una o varias cuentas contables de Fondo']); //PermisosCuentasContablesBancarias $eliminar_cuenta_contable_bancaria = Permission::firstOrCreate(['name' => 'eliminar_cuenta_contable_bancaria', 'display_name' => 'Eliminar Cuenta Contable Bancaria', 'description' => 'Permiso para eliminar cuentas contables bancarias']); $registrar_cuenta_contable_bancaria = Permission::firstOrCreate(['name' => 'registrar_cuenta_contable_bancaria', 'display_name' => 'Registrar Cuenta Contable Bancaria', 'description' => 'Permiso para registrar cuentas contables bancarias']); $consultar_cuenta_contable_bancaria = Permission::firstOrCreate(['name' => 'consultar_cuenta_contable_bancaria', 'display_name' => 'Consultar Cuenta Contable Bancaria', 'description' => 'Permiso para consultar cuentas contables bancarias']); $editar_cuenta_contable_bancaria = Permission::firstOrCreate(['name' => 'editar_cuenta_contable_bancaria', 'display_name' => 'Editar Cuenta Contable Bancaria', 'description' => 'Permiso para editar cuentas contables bancarias']); //PermisosCuentasCosto $eliminar_cuenta_costo = Permission::firstOrCreate(['name' => 'eliminar_cuenta_costo', 'display_name' => 'Eliminar Cuenta de Costo', 'description' => 'Permiso para eliminar cuenta de costo']); $registrar_cuenta_costo = Permission::firstOrCreate(['name' => 'registrar_cuenta_costo', 'display_name' => 'Registrar Cuenta de Costo', 'description' => 'Permiso para registrar una cuenta de costo']); $consultar_cuenta_costo = Permission::firstOrCreate(['name' => 'consultar_cuenta_costo', 'display_name' => 'Consultar Cuenta de Costo', 'description' => 'Permiso para consultar la lista de cuentas de costos']); $editar_cuenta_costo = Permission::firstOrCreate(['name' => 'editar_cuenta_costo', 'display_name' => 'Editar Cuenta de Costo', 'description' => 'Permiso para editar cuentas de Costos']); //Cierres de Periodo $consultar_cierre_periodo = Permission::firstOrCreate(['name' => 'consultar_cierre_periodo', 'display_name' => 'Consultar Cierre de Periodo', 'description' => 'Consultar Cierre de Periodo']); $generar_cierre_periodo = Permission::firstOrCreate(['name' => 'generar_cierre_periodo', 'display_name' => 'Generar Cierre Periodo', 'description' => 'Generar Cierre Periodo']); $editar_cierre_periodo = Permission::firstOrCreate(['name' => 'editar_cierre_periodo', 'display_name' => 'Editar Cierre Periodo', 'description' => 'Editar Cierre Periodo']); //Control Presupuesto Variación de Volúmen $registrar_variacion_volumen = Permission::firstOrCreate(['name' => 'registrar_variacion_volumen', 'display_name' => 'Registrar Variacion de Volúmen', 'description' => 'Registrar Variacion de Volúmen']); $autorizar_variacion_volumen = Permission::firstOrCreate(['name' => 'autorizar_variacion_volumen', 'display_name' => 'Autorizar Variacion de Volúmen', 'description' => 'Autorizar Variacion de Volúmen']); $aplicar_variacion_volumen = Permission::firstOrCreate(['name' => 'aplicar_variacion_volumen', 'display_name' => 'Aplicar Variacion de Volúmen', 'description' => 'Aplicar Variacion de Volúmen']); $rechazar_variacion_volumen = Permission::firstOrCreate(['name' => 'rechazar_variacion_volumen', 'display_name' => 'Rechazar Variacion de Volúmen', 'description' => 'Rechazar Variacion de Volúmen']); $consultar_variacion_volumen = Permission::firstOrCreate(['name' => 'consultar_variacion_volumen', 'display_name' => 'Consultar Variacion de Volúmen', 'description' => 'Consultar Variacion de Volúmen']); //Control Presupuesto Escalatoria $registrar_escalatoria = Permission::firstOrCreate(['name' => 'registrar_escalatoria', 'display_name' => 'Registrar Escalatoria', 'description' => 'Registrar Escalatoria']); $autorizar_escalatoria = Permission::firstOrCreate(['name' => 'autorizar_escalatoria', 'display_name' => 'Autorizar Escalatoria', 'description' => 'Autorizar Escalatoria']); $aplicar_escalatoria = Permission::firstOrCreate(['name' => 'aplicar_escalatoria', 'display_name' => 'Aplicar Escalatoria', 'description' => 'Aplicar Escalatoria']); $rechazar_escalatoria = Permission::firstOrCreate(['name' => 'rechazar_escalatoria', 'display_name' => 'Rechazar Escalatoria', 'description' => 'Rechazar Escalatoria']); $consultar_escalatoria = Permission::firstOrCreate(['name' => 'consultar_escalatoria', 'display_name' => 'Consultar Escalatoria', 'description' => 'Consultar Escalatoria']); //Control Presupuesto cambio de insumos $registrar_cambio_insumos = Permission::firstOrCreate(['name' => 'registrar_cambio_insumos', 'display_name' => 'Registrar Cambio de Insumos', 'description' => 'Registrar Cambio de Insumos']); $autorizar_cambio_insumos = Permission::firstOrCreate(['name' => 'autorizar_cambio_insumos', 'display_name' => 'Autorizar Cambio de Insumos', 'description' => 'Autorizar Cambio de Insumos']); $rechazar_cambio_insumos= Permission::firstOrCreate(['name' => 'rechazar_cambio_insumos', 'display_name' => 'Rechazar Cambio de Insumos', 'description' => 'Rechazar Cambio de Insumos']); $consultar_cambio_insumos = Permission::firstOrCreate(['name' => 'consultar_cambio_insumos', 'display_name' => 'Consultar Cambio de Insumos', 'description' => 'Consultar Cambio de Insumos']); //Control Presupuesto cambio de insumos $registrar_cambio_cantidad_insumos = Permission::firstOrCreate(['name' => 'registrar_cambio_cantidad_insumos', 'display_name' => 'Registrar Cambio de Cantidad de Insumos', 'description' => 'Registrar Cambio de Cantidad de Insumos']); $autorizar_cambio_cantidad_insumos = Permission::firstOrCreate(['name' => 'autorizar_cambio_cantidad_insumos', 'display_name' => 'Autorizar Cambio de Cantidad de Insumos', 'description' => 'Autorizar Cambio de Cantidad de Insumos']); $rechazar_cambio_cantidad_insumos= Permission::firstOrCreate(['name' => 'rechazar_cambio_cantidad_insumos', 'display_name' => 'Rechazar Cambio de Cantidad de Insumos', 'description' => 'Rechazar Cambio de Cantidad de Insumos']); $consultar_cambio_cantidad_insumos = Permission::firstOrCreate(['name' => 'consultar_cambio_cantidad_insumos', 'display_name' => 'Consultar Cambio de Cantidad de Insumos', 'description' => 'Consultar Cambio de Cantidad de Insumos']); //Roles y Permisos $administrar_roles_permisos = Permission::firstOrCreate(['name' => 'administrar_roles_permisos', 'display_name' => 'Administrar Roles y Permisos', 'description' => 'Permisos para asignación de roles a usuarios']); $administracion_configuracion_obra = Permission::firstOrCreate(['name' => 'administracion_configuracion_obra', 'display_name' => 'Configuración de la estructura la obra', 'description' => 'Permisos para configuración de la estructura de obra']); $administracion_configuracion_presupuesto = Permission::firstOrCreate(['name' => 'administracion_configuracion_presupuesto', 'display_name' => 'Configuración de la estructura del presupuesto', 'description' => 'Permisos para configuración de la estructura del presupuesto']); //Procuaracion Asignación de Proveedores $consultar_asignacion = Permission::firstOrCreate(['name' => 'consultar_asignacion', 'display_name' => 'Consultar Asignación', 'description' => 'Permisos para la asignación de la consulta de procuración de las asignaciones']); $resgistro_asignacion = Permission::firstOrCreate(['name' => 'registrar_asignacion', 'display_name' => 'Registrar una Asignación', 'description' => 'Permisos para el registro de una asignación de procuración']); $eliminar_asignacion = Permission::firstOrCreate(['name' => 'eliminar_asignacion', 'display_name' => 'Eliminar una Asignación', 'description' => 'Permisos para poder eliminar el registro de una asignación de procuración']); //Finanzas Solicitud de Cheque $registrar_reposicion_fondo_fijo = Permission::firstOrCreate(['name' => 'registrar_reposicion_fondo_fijo', 'display_name' => 'Registrar eposicion de fondo fijo', 'description' => 'Permiso para poder registrar reposiciónes de fondo fijo']); $registrar_pago_cuenta = Permission::firstOrCreate(['name' => 'registrar_pago_cuenta', 'display_name' => 'Registrar pagos a cuenta', 'description' => 'Permiso para poder registrar pagos a cuenta']); /** * Roles */ $contador = Role::firstOrCreate(['name' => 'contador', 'display_name' => 'Contador', 'description' => 'Rol de Contador']); $consulta_sistema_contable = Role::firstOrCreate(['name' => 'consulta_sistema_contable', 'display_name' => 'Consulta Sistema Contable', 'description' => 'Rol para consulta dentro del sistema contable']); $tesorero = Role::firstOrCreate(['name' => 'tesorero', 'display_name' => 'Tesorero', 'description' => 'Rol para operar el sistema de finanzas']); $consulta_finanzas = Role::firstOrCreate(['name' => 'consulta_finanzas', 'display_name' => 'Consulta Finanzas', 'description' => 'Rol para consultar el sistema de finanzas']); $jefe_subcontratos = Role::firstOrCreate(['name' => 'jefe_subcontratos', 'description' => 'Jefe de Subcontratos', 'display_name' => 'Jefe de Subcontratos']); $jefe_procuracion = Role::firstOrCreate(['name' => 'jefe_procuracion', 'description' => 'Jefe de Procuración', 'display_name' => 'Jefe de Procuración']); $coordinador_sao = Role::firstOrCreate(['name' => 'coordinador_sao', 'description' => 'Coordinador SAO', 'display_name' => 'Coordinador SAO']); $control_proyecto = Role::firstOrCreate(['name' => 'control_proyecto', 'display_name' => 'Control de Proyecto', 'description' => 'Rol de usuario de Control de Proyecto']); $coordinador_control_proyectos = Role::firstOrCreate(['name' => 'coordinador_control_proyectos', 'display_name' => 'Coordinador de Control de Proyectos', 'description' => 'Coordinador de Control de Proyectos']); $administrador_sistema = Role::firstOrCreate(['name' => 'administrador_sistema', 'display_name' => 'Administrador del Sistema', 'description' => 'Administrador del Sistema']); $comprador = Role::firstOrCreate(['name' => 'comprador', 'display_name' => 'Comprador', 'description' => 'Rol de Procuración']); $coordinador_procuracion = Role::firstOrCreate(['name' => 'coordinador_procuracion', 'display_name' => 'Coordinador Procuracion', 'description' => 'Rol de Coordinador Procuración']); /** * Asignaciones */ $contador->perms()->sync([ $editar_cuenta_almacen->id, $registrar_cuenta_almacen->id, $consultar_cuenta_almacen->id, $editar_cuenta_concepto->id, $registrar_cuenta_concepto->id, $consultar_cuenta_concepto->id, $editar_cuenta_empresa->id, $registrar_cuenta_empresa->id, $consultar_cuenta_empresa->id, $eliminar_cuenta_empresa->id, $consultar_cuenta_general->id, $registrar_cuenta_general->id, $editar_cuenta_general->id, $consultar_cuenta_material->id, $registrar_cuenta_material->id, $editar_cuenta_material->id, $consultar_tipo_cuenta_contable->id, $registrar_tipo_cuenta_contable->id, $editar_tipo_cuenta_contable->id, $eliminar_tipo_cuenta_contable->id, $consultar_plantilla_prepoliza->id, $registrar_plantilla_prepoliza->id, $eliminar_plantilla_prepoliza->id, $editar_configuracion_contable->id, $consultar_prepolizas_generadas->id, $editar_prepolizas_generadas->id, $consultar_kardex_material->id, $editar_cuenta_fondo->id, $registrar_cuenta_fondo->id, $consultar_cuenta_fondo->id, $eliminar_cuenta_contable_bancaria->id, $registrar_cuenta_contable_bancaria->id, $consultar_cuenta_contable_bancaria->id, $editar_cuenta_contable_bancaria->id, $eliminar_cuenta_costo->id, $registrar_cuenta_costo->id, $consultar_cuenta_costo->id, $editar_cuenta_costo->id, $solicitar_reclasificacion->id, $consultar_reclasificacion->id, $consultar_cierre_periodo->id, $generar_cierre_periodo->id, $editar_cierre_periodo->id ]); $consulta_sistema_contable->perms()->sync([ $consultar_cuenta_almacen->id, $consultar_cuenta_concepto->id, $consultar_cuenta_empresa->id, $consultar_cuenta_general->id, $consultar_cuenta_material->id, $consultar_tipo_cuenta_contable->id, $consultar_plantilla_prepoliza->id, $consultar_prepolizas_generadas->id, $consultar_kardex_material->id, $consultar_cuenta_fondo->id ]); $tesorero->perms()->sync([ $editar_comprobante_fondo_fijo->id, $registrar_comprobante_fondo_fijo->id, $consultar_comprobante_fondo_fijo->id, $eliminar_comprobante_fondo_fijo->id, $eliminar_traspaso_cuenta->id, $registrar_traspaso_cuenta->id, $consultar_traspaso_cuenta->id, $editar_traspaso_cuenta->id, $eliminar_movimiento_bancario->id, $registrar_movimiento_bancario->id, $consultar_movimiento_bancario->id, $editar_movimiento_bancario->id, $registrar_pago_cuenta->id, $registrar_reposicion_fondo_fijo->id, ]); $consulta_finanzas->perms()->sync([ $consultar_comprobante_fondo_fijo->id, $consultar_traspaso_cuenta->id, $consultar_movimiento_bancario->id, ]); $jefe_subcontratos->perms()->sync([ $consultar_formato_estimacion->id, $consultar_formato_comparativa_presupuestos->id, ]); $jefe_procuracion->perms()->sync([ $consultar_formato_estimacion->id, ]); $coordinador_sao->perms()->sync([ $consultar_cuenta_almacen->id, $consultar_cuenta_concepto->id, $consultar_cuenta_empresa->id, $consultar_cuenta_general->id, $consultar_cuenta_material->id, $consultar_tipo_cuenta_contable->id, $consultar_plantilla_prepoliza->id, $consultar_prepolizas_generadas->id, $consultar_cuenta_fondo->id, $registrar_comprobante_fondo_fijo->id, $consultar_comprobante_fondo_fijo->id, $eliminar_comprobante_fondo_fijo->id, $consultar_formato_estimacion->id, $consultar_movimiento_bancario->id, $consultar_cuenta_contable_bancaria->id, $consultar_cuenta_costo->id, $consultar_reclasificacion->id, ]); $control_proyecto->perms()->sync([ $solicitar_reclasificacion->id, $autorizar_reclasificacion->id, $consultar_reclasificacion->id, $consultar_cierre_periodo->id, ]); $coordinador_control_proyectos->perms()->sync([ $registrar_variacion_volumen->id, $autorizar_variacion_volumen->id, $aplicar_variacion_volumen->id, $rechazar_variacion_volumen->id, $consultar_variacion_volumen->id, $registrar_escalatoria->id, $autorizar_escalatoria->id, $aplicar_escalatoria->id, $rechazar_escalatoria->id, $consultar_escalatoria->id, $registrar_cambio_insumos->id, $autorizar_cambio_insumos->id, $rechazar_cambio_insumos->id, $consultar_cambio_insumos->id, $registrar_cambio_cantidad_insumos->id, $autorizar_cambio_cantidad_insumos->id, $rechazar_cambio_cantidad_insumos->id, $consultar_cambio_cantidad_insumos->id, ]); $administrador_sistema->perms()->sync([ $administrar_roles_permisos->id, $administracion_configuracion_presupuesto->id, $administracion_configuracion_obra->id, ]); $coordinador_procuracion->perms()->sync([ $consultar_asignacion->id, $resgistro_asignacion->id, $eliminar_asignacion->id, ]); /** * Sistemas */ $sistema_contable = Sistema::firstOrCreate(['name' => 'Sistema Contable', 'description' => 'Sistema para el control contable', 'url' => 'sistema_contable']); $finaznas = Sistema::firstOrCreate(['name' => 'Finanzas', 'description' => 'Sistema para el control financiero', 'url' => 'finanzas']); $formatos = Sistema::firstOrCreate(['name' => 'Formatos', 'description' => 'Sistema de emisión de formatos', 'url' => 'formatos']); $tesoreria = Sistema::firstOrCreate(['name' => 'Tesorería', 'description' => 'Sistema de Tesorería', 'url' => 'tesoreria']); $control_costos = Sistema::firstOrCreate(['name' => 'Control de Costos', 'description' => 'Sistema de control de costos', 'url' => 'control_costos']); $control_presupuesto = Sistema::firstOrCreate(['name' => 'Control del Presupuesto', 'description' => 'Sistema para el control del presupuesto', 'url' => 'control_presupuesto']); $procuracion = Sistema::firstOrCreate(['name' => 'Procuración', 'description' => 'Sistema para el control de asignación', 'url' => 'procuracion']); $sistema_contable->permisos()->sync( [ $editar_cuenta_almacen->id, $registrar_cuenta_almacen->id, $consultar_cuenta_almacen->id, $editar_cuenta_concepto->id, $registrar_cuenta_concepto->id, $consultar_cuenta_concepto->id, $editar_cuenta_empresa->id, $registrar_cuenta_empresa->id, $consultar_cuenta_empresa->id, $eliminar_cuenta_empresa->id, $consultar_cuenta_general->id, $registrar_cuenta_general->id, $editar_cuenta_general->id, $consultar_cuenta_material->id, $registrar_cuenta_material->id, $editar_cuenta_material->id, $consultar_tipo_cuenta_contable->id, $registrar_tipo_cuenta_contable->id, $editar_tipo_cuenta_contable->id, $eliminar_tipo_cuenta_contable->id, $consultar_plantilla_prepoliza->id, $registrar_plantilla_prepoliza->id, $eliminar_plantilla_prepoliza->id, $editar_configuracion_contable->id, $consultar_prepolizas_generadas->id, $editar_prepolizas_generadas->id, $consultar_kardex_material->id, $editar_cuenta_fondo->id, $registrar_cuenta_fondo->id, $consultar_cuenta_fondo->id, $eliminar_cuenta_contable_bancaria->id, $registrar_cuenta_contable_bancaria->id, $consultar_cuenta_contable_bancaria->id, $editar_cuenta_contable_bancaria->id, $eliminar_cuenta_costo->id, $registrar_cuenta_costo->id, $consultar_cuenta_costo->id, $editar_cuenta_costo->id, $consultar_cierre_periodo->id, $generar_cierre_periodo->id, $editar_cierre_periodo->id, ] ); $finaznas->permisos()->sync( [ $editar_comprobante_fondo_fijo->id, $registrar_comprobante_fondo_fijo->id, $consultar_comprobante_fondo_fijo->id, $eliminar_comprobante_fondo_fijo->id, $registrar_reposicion_fondo_fijo->id, $registrar_pago_cuenta->id, ] ); $formatos->permisos()->sync( [ $consultar_formato_estimacion->id, $consultar_formato_comparativa_presupuestos->id, ] ); $tesoreria->permisos()->sync( [ $eliminar_traspaso_cuenta->id, $registrar_traspaso_cuenta->id, $consultar_traspaso_cuenta->id, $editar_traspaso_cuenta->id, $eliminar_movimiento_bancario->id, $registrar_movimiento_bancario->id, $consultar_movimiento_bancario->id, $editar_movimiento_bancario->id, ] ); $control_costos->permisos()->sync( [ $solicitar_reclasificacion->id, $autorizar_reclasificacion->id, $consultar_reclasificacion->id, ] ); $control_presupuesto->permisos()->sync( [ $registrar_variacion_volumen->id, $autorizar_variacion_volumen->id, $aplicar_variacion_volumen->id, $rechazar_variacion_volumen->id, $consultar_variacion_volumen->id, $registrar_escalatoria->id, $autorizar_escalatoria->id, $aplicar_escalatoria->id, $rechazar_escalatoria->id, $consultar_escalatoria->id, $registrar_cambio_cantidad_insumos->id, $autorizar_cambio_cantidad_insumos->id, $rechazar_cambio_cantidad_insumos->id, $consultar_cambio_cantidad_insumos->id ] ); $procuracion->permisos()->sync( [ $resgistro_asignacion->id, $consultar_asignacion->id, $eliminar_asignacion->id, ] ); }
{ "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' => 'simpleadressemail@mail.com', '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'=> \"admin@admin.com\"\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' => 'admin@petstore.com',\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' => 'prosales@researchmobile.co',\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' => 'movil@researchmobile.co',\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'=>'test@yandex.ru'\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' => 'admin@yahoo.com',\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' => 'programmerlemar@gmail.com',\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' => 'qwerty@gmail.com',\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=> 'admin@example.com',\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' => 'briedis@aa.bb',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => 'briedis2@aa.bb',\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' => 'admin@admin.com',\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' => 'ignacio@dh.com',\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' => 'admin@gmail.com',\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\"=>'alice@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'bob@gmail.com',\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 = your.email@domain.com\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' => 'admin@gmail.com',\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'=>'papesambandour@hotmail.com',\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' => 'rognales@gmail.com',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => 'sonic21danger@gmail.com',\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' => 'sovon.kucse@gmail.com']);\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'=>'abada@gmail.com',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','abada@gmail.com')->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' => 'eddyjaair@gmail.com']);\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' => 'barbozagonzalesjose@gmail.com',\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' => 'russell@gmail.com',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => 'bitfumes@gmail.com',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => 'paul@gmail.com',\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' => 'pkw@pkw.com',\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' => 'empresa02@gmail.com',\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' => 'carlos@email.com',\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'=>'izzanniroshlei@gmail.com',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'aina@gmail.com',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'sab@gmail.com',\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' => 'pedrito@juase.com',\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'=>'hienphan18112015@gmail.com', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'haphan@gmail.com', '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
tri par insertion () ordonne donc par ordre croissant la liste de nombre
function insert_sort(array $q) { $len = count($q); $list = []; for($i=0; $i < $len; $i++) { $list = insert($q[$i], $list); } return $list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function inserir()\n {\n }", "public function insert($aluno) {\n\t}", "public function insert($permiso);", "function ajout($select) {\n \n\t if (creepanier()) {\n\t\t //Si l'épreuve existe on augmente juste le nombre\n\t\t $pos = array_search($select['numE'],$_SESSION['panier']['numE']);\n\t\t if ($pos !== false) {\n\t\t\t //on augmente le nombre qu'il y a de cette épreuve;\n\t\t\t // echo $_SESSION['panier']['nbr'][$pos].\"<br/>\";\n\t\t\t $_SESSION['panier']['nbr'][$pos] += 1; \n\t\t } else {\n\t\t\t $select['nbr'] = 1;\n\t\t\t //on ajoute l'épreuve comme elle existe pas\n\t array_push ($_SESSION['panier']['numE'],$select['numE']);\n\t array_push($_SESSION['panier']['forme'],$select['forme']);\n\t array_push($_SESSION['panier']['nomE'],$select['nomE']);\n\t array_push($_SESSION['panier']['dateE'],$select['dateE']);\n\t array_push($_SESSION['panier']['categ'],$select['categ']);\n\t array_push($_SESSION['panier']['prix'],$select['prix']);\n\t array_push($_SESSION['panier']['nbr'],$select['nbr']);\n\t\t }\n\t } else {\n\t\t echo \"<p class=\\\"erreur\\\"><b> IL y a un problème veuillez contactez l'administrateur du site </b></p>\" ;\n\t }\n \n }", "public function insert( $objet);", "function ajout_panier( $titre, $id_produit, $quantite, $prix ){\n\n\tcreation_panier();\n\t//ici, on fait appel à la fonction déclarée ci-dessus\n\t\t//SOIT le panier n'existe pas et donc on la crée (LA première fois que l'on tente d'ajotuer un produit au panier)\n\t\t//SOIT il existe et on l'utilise (puisqu'on ne rentrera pas dans la condition de la fonction creation_panier())\n\n\t//Est ce que le produit existe déjà dans le panier ?\n\t$index = array_search( $id_produit, $_SESSION['panier']['id_produit'] );\n\t//array_search( arg1 , arg2 );\n\t\t//arg1 : ce que l'on cherche\n\t\t//arg2 : dans quel tableau on effectue la recherche\n\t\t//Valeur de retour : la fonction renverra la \"clé\" (correspondant à l'indice du tableau SI il y a une correspondance) ou \"false\"\n\t\t//debug( $index );\n\n\tif( $index !== false ){ //SI $index est strictement différent de 'false', c'est que le produit est déjà présent dans le panier et donc on va augmenté la quantité\n\n\t\t$_SESSION['panier']['quantite'][$index] += $quantite;\n\t\t//Ici, on va précisément à l'indice du produit déjà présent dans le panier et on y ajoute la nouvelle quantité\n\t}\n\telse{ //SINON, c'est que le produit n'est pas dans le panier et donc on insert toutes les infos nécessaires\n\n\t\t$_SESSION['panier']['titre'][] = $titre;\n\t\t$_SESSION['panier']['id_produit'][] = $id_produit;\n\t\t$_SESSION['panier']['quantite'][] = $quantite;\n\t\t$_SESSION['panier']['prix'][] = $prix;\n\t\t//Les crochets vides sont indispensables pour permettre d'ajouter une information à la fin du tableau et donc d'ajouter des produits au panier\n\t}\n}", "function Forms_arbre_inserer_donnee($id_form,$id_parent,$position=\"fils_cadet\",$c=NULL){\n\tif (!$id_parent>0){\n\t\tif ($res = spip_query(\"SELECT id_donnee FROM spip_forms_donnees WHERE id_form=\"._q($id_form).\" AND statut!='poubelle' LIMIT 0,1\")\n\t\t AND spip_num_rows($res)==0){\n\t\t // pas d'elements existants, c'est la racine, on l'insere toujours\n\t\t\tif ($position=='fils_aine' OR $position=='fils_cadet'){\n\t\t\t\tspip_log(\"Insertion impossible dans un arbre pour un fils sans pere dans table $id_form\");\n\t\t\t\treturn array(0,_L(\"Insertion impossible dans un arbre pour un fils sans pere dans table $id_form\"));\n\t\t\t}\n\t\t\t// premiere insertion\n\t\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>0,'bgch'=>1,'bdte'=>2));\n\t\t}\n\t\telse {\n\t\t\t// Insertion d'un collateral : il faut preciser le 'parent' !\n\t\t\tspip_log(\"Insertion impossible dans un arbre pour un collatéral sans precision du parent dans table $id_form\");\n\t\t\treturn array(0,_L(\"Insertion impossible dans un arbre pour un collatéral sans precision du parent dans table $id_form\"));\n\t\t}\n\t}\n\t// Le parent existe toujours ?\n\t$res = spip_query(\"SELECT * FROM spip_forms_donnees WHERE id_form=\"._q($id_form).\" AND id_donnee=\"._q($id_parent).\" AND statut!='poubelle'\");\n\tif (!($rowp = spip_fetch_array($res))){\n\t\tspip_log(\"Insertion impossible, le parent $id_parent n'existe plus dans table $id_form\");\n\t\treturn array(0,_L(\"Insertion impossible, le parent $id_parent n'existe plus dans table $id_form\"));\n\t}\n\t\n\t// insertion d'un pere\n\tif ($position == 'pere'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>\"._q($rowp['bdte']).\" AND bgch<=\"._q($rowp['bdte']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+2,bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bgch>\"._q($rowp['bdte']))\n\t\t\t// Decalalage ensemble vise vers le bas\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+1,bdte=bdte+1,niveau=niveau+1 WHERE id_form=\"._q($id_form).\" AND bgch>=\"._q($rowp['bgch']).\" AND bdte<=\"._q($rowp['bdte']))\n\t\t)\n\t\t\t// Insertion du nouveau pere\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau'],'bgch'=>$rowp['bgch'],'bdte'=>$rowp['bdte']+2));\n\t}\n\t// Insertion d'un grand frere\n\telseif ($position == 'grand_frere'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>\"._q($rowp['bgch']).\" AND bgch<\"._q($rowp['bgch']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET id_form=\"._q($id_form).\" AND bgch=bgch+2,bdte=bdte+2 WHERE bgch>=\"._q($rowp['bgch']))\n\t\t )\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau'],'bgch'=>$rowp['bgch'],'bdte'=>$rowp['bgch']+1));\n\t}\n\t// Insertion d'un petit frere\n\telseif ($position == 'petit_frere'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>\"._q($rowp['bdte']).\" AND bgch<\"._q($rowp['bdte']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+2,bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bgch>=\"._q($rowp['bdte']))\n\t\t )\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau'],'bgch'=>$rowp['bdte']+1,'bdte'=>$rowp['bdte']+2));\n\t}\n\t// Insertion d'un fils aine\n\telseif ($position == 'fils_aine'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>\"._q($rowp['bgch']).\" AND bgch<=\"._q($rowp['bgch']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+2,bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bgch>\"._q($rowp['bgch']))\n\t\t )\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau']+1,'bgch'=>$rowp['bgch']+1,'bdte'=>$rowp['bgch']+2));\n\t}\n\t// Insertion d'un fils aine\n\telseif ($position == 'fils_cadet'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>=\"._q($rowp['bdte']).\" AND bgch<=\"._q($rowp['bdte']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+2,bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bgch>\"._q($rowp['bdte']))\n\t\t )\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau']+1,'bgch'=>$rowp['bdte'],'bdte'=>$rowp['bdte']+1));\n\t}\n\tspip_log(\"Operation inconnue insertion en position $position dans table $id_form\");\n\treturn array(0,_L(\"Operation inconnue insertion en position $position dans table $id_form\"));\n}", "function add_element_list($newlist, $l, $username, $description, $ecolor, $priority, $creation){\n $l_id = get_id($l);\n $uid = get_userid($username);\n //insÚrer\n if ($l_id!=-1){\n \t$SQL = \"INSERT INTO element_list VALUES (DEFAULT,'$l_id',$uid,'$newlist', '$description', $ecolor, $priority, $creation, $creation, 0)\";\n \tglobal $db;\n \t$res = $db->prepare($SQL);\n \t$res->execute();\n }\n}", "public function insertListe($valueListe = '', $type = '', $id_circonscription = '', $Tour, $file) {\n\n $rel = false;\n if ($valueListe != '' || $type != '' || $id_circonscription != '') {\n\n $nb_sieges = str_replaceFloat((String)$valueListe->NbSieges);\n if ($nb_sieges == '') {\n $nb_sieges = \"''\";\n }\n\n $sql = 'INSERT INTO `resultat_liste`('\n . '`type_circonscription`,'\n . '`id_circonscription`, '\n . '`fk_tour`, '\n . '`fk_cod_seq_liste`, '\n . '`nb_voix`, '\n . '`rap_exprimes`, '\n . '`rap_inscrits`, '\n . '`nb_sieges`'\n . ') '\n . 'VALUES ('\n . '\\'' . $type . '\\','\n . '\\'' . $id_circonscription . '\\','\n . $Tour . ','\n . '\\'' . (String)$valueListe->CodSeqListe. '\\','\n . (String)$valueListe->NbVoix . ','\n . str_replaceFloat((String)$valueListe->RapportExprime) . ','\n . str_replaceFloat((String)$valueListe->RapportInscrit) . ','\n . $nb_sieges . ')';\n $sql .= ' ON DUPLICATE KEY UPDATE '\n . 'nb_voix=' . (String)$valueListe->NbVoix . ','\n . 'rap_exprimes=' . str_replaceFloat((String)$valueListe->RapportExprime) . ','\n . 'rap_inscrits=' . str_replaceFloat((String)$valueListe->RapportInscrit) . ','\n . 'nb_sieges=' . $nb_sieges;\n\n return $rel = $this->commit($sql);\n } else {\n return false;\n }\n }", "function adiHijo($lista) {\n\t\t$this->listas[] = $lista;\n\t}", "function insertJoueurs ($tab)\n{\n\t$con = connexion ();\n\tif($con != null)\n\t{\n\t\t$requete = \"insert into joueurs values (null,'\".$tab['nom'].\"','\".$tab['prenom'].\"','\".$tab['age'].\"');\";\n\t\tmysqli_query($con, $requete);\n\t\tdeconnexion($con);\n\t}\n}", "function 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 inserir() {\n\t\t$this->sql = mysql_query(\"INSERT INTO suporte (user_cad, data_cad, id_regiao, exibicao, tipo, prioridade, assunto, mensagem, arquivo, status, status_reg,suporte_pagina)\n\t\t\t\t\t VALUES\t('$this->id_user_cad ','$this->data_cad','$this->id_regiao', '$this->exibicao', '$this->tipo','$this->prioridade', '$this->assunto', '$this->menssagem', '$this->tipo_arquivo','1','1','$this->pagina');\") or die(mysql_error());\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\n\t\t}", "private function insertNew() {\n $sth=NULL;\n $array=array();\n $query=\"INSERT INTO table_spectacles (libelle) VALUES (?)\";\n $sth=$this->dbh->prepare($query);\n $array=array($this->libelle);\n $sth->execute($array);\n $this->message=\"\\\"\".$this->getLibelle().\"\\\" enregistré !\";\n $this->blank();\n $this->test=1;\n }", "public function insert($nometabella,$valori){\n\t\t$Nnumeri=new Nnumeri();\n\t\t$i=0;\n\t\t$n=0;\n\t\t$valori=explode(\",,\",$valori);\n\t\t$query='INSERT INTO '.$nometabella.' (';\n\t\tforeach($valori as $v){\n\t\t\tif($Nnumeri->pari($i)){\n\t\t\t\tif($i!=0) $query.=',';\n\t\t\t\t$query.= $v;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t$query.= ') VALUES (';\n\t\tforeach($valori as $v){\n\t\t\tif($Nnumeri->pari($n)==FALSE){\n\t\t\t\tif($n!=1) $query.=',';\n\t\t\t\tif(!is_numeric($v)) $query.=\"'\";\n\t\t\t\t$query.= $v;\n\t\t\t\tif(!is_numeric($v)) $query.=\"'\";\n\t\t\t}\n\t\t\t$n++;\n\t\t}\n\t\t$query.= ')';\n\t\tmysql_query($query) or die (\"Errore query insert per tabella \".$nometabella.\" con errore:<br><br>\".mysql_error());\n\t}", "abstract public function insert();", "public function mostrar_insertar() {\r\n\t\t\t$this -> pantalla_edicion('insertar'); \r\n\t\t }", "function insertarCorredor(Corredor $corredor);", "function ajoutCours($nomCours, $description, $coef, $credit, $categorie, $idUe) {\n\t\n\t\t$query1 = 'insert into cours values(\"\",\"'.$nomCours.'\",\"'.$description.'\",\"'.$coef.'\",\"'.$credit.'\",\"'.$categorie.'\")';\n\t\tmysql_query($query1) or die (\"Impossible d'ajouter un cours\");\n\n\t\t$query2 = 'insert into coursue values(LAST_INSERT_ID() ,\"'.$idUe.'\")';\n\t\tmysql_query($query2) or die(\"Impossible d'ajouter le cours dans une UE\");\n\t\n}", "function AjouterLivres($connexion, $livre_Titre, $livre_DateParution, $livre_Genre, $prenomAuteur,\n $nomAuteur)\n{\n $numeroAuteur = 0;\n $numeroLivre = rand(0, 9999);\n $request = $connexion->prepare('SELECT ID_livre FROM livres WHERE ID_livre = :numero');\n $request->bindParam(\":numero\", $numeroLivre);\n $request->execute();\n\n if($request->fetchColumn()){\n header(\"Location:../ListeErreurs.php?numeroAleatoire_erreur\");\n }\n else{\n $request = $connexion->prepare('SELECT ID_auteur FROM auteur WHERE prenom = :prenom AND nom = :nom');\n $request->bindParam(':prenom', $prenomAuteur);\n $request->bindParam(':nom', $nomAuteur);\n $request->execute();\n if($request->fetchColumn()){\n $request->execute();\n while($display = $request->fetch())\n $numeroAuteur = $display[\"ID_auteur\"];\n }\n else{\n $insert = $connexion->prepare(\"INSERT INTO auteur(prenom, nom) VALUES(:prenom, :nom)\");\n $insert->bindParam(\":prenom\", $prenomAuteur);\n $insert->bindParam(\":nom\", $nomAuteur);\n $insert->execute();\n $request->execute();\n while($display = $request->fetch())\n $numeroAuteur = $display[\"ID_auteur\"];\n }\n $insert = $connexion->prepare(\"INSERT INTO livres(titre, date_parution, genre, ID_auteur) VALUES(:titre, :dateP, :genre, :auteur)\");\n $insert->bindParam(\":titre\", $livre_Titre);\n $insert->bindParam(\":dateP\", $livre_DateParution);\n $insert->bindParam(\":genre\", $livre_Genre);\n $insert->bindParam(\":auteur\", $numeroAuteur);\n $insert->execute();\n }\n}", "function ajoue_proprietaire($nom,$CA,$debut_contrat,$fin_contrat)\r\n{ $BDD=ouverture_BDD_Intranet_Admin();\r\n\r\n if(exist($BDD,\"proprietaire\",\"nom\",$nom)){echo \"nom deja pris\";return;}\r\n\r\n $SQL=\"INSERT INTO `proprietaire` (`ID`, `nom`, `CA`, `debut_contrat`, `fin_contrat`) VALUES (NULL, '\".$nom.\"', '\".$CA.\"', '\".$debut_contrat.\"', '\".$fin_contrat.\"')\";\r\n\r\n $result = $BDD->query ($SQL);\r\n\r\n if (!$result)\r\n {echo \"<br>SQL : \".$SQL.\"<br>\";\r\n die('<br>Requête invalide ajoue_equipe : ' . mysql_error());}\r\n}", "public function insert($perifericos);", "function ajouterArticle($id,$qteProduit){\r\n $idpanier=creationPanier();\r\n if($idpanier==false)\r\n {\r\n echo 'Probleme acces au panier.';\r\n die(); \r\n }\r\n\r\n echo 'debug1';\r\n //Connexion database\r\n try {\r\n $dbh = new PDO('mysql:host=localhost;dbname=retromathon', 'root', '');\r\n }\r\n catch( PDOException $Exception ) {\r\n echo $Exception->getMessage();\r\n die();\r\n }\r\n\r\n //Selection du id produit s'il existe dans le panier\r\n $req = \"SELECT * FROM selectionne WHERE REF_PANIER=\".$idpanier.\" AND REF_ART='\".$id.\"';\";\r\n $prep = $dbh->query($req);\r\n if($prep==false) //Erreur\r\n {\r\n echo 'Erreur Base de Donnees';\r\n die(); \r\n }\r\n $article = $prep->fetch();\r\n if(($article!=null)&&(count($article)!=0)) //Article existe\r\n {\r\n //On incremante la quantite\r\n $newQte=$article['QTE_CHOISI']+$qteProduit;\r\n $req = \"UPDATE selectionne SET QTE_CHOISI=\".$newQte.\" WHERE REF_PANIER=\".$idpanier.\" AND REF_ART='\".$id.\"';\";\r\n $prep = $dbh->exec($req);\r\n if($prep==0) //Erreur\r\n {\r\n echo 'Erreur Base de Donnees';\r\n die(); \r\n }\r\n }\r\n else //Article n'existe pas\r\n {\r\n //Ajout de l'article au panier\r\n $req = \"INSERT INTO selectionne (REF_ART, REF_PANIER,QTE_CHOISI) VALUES ('\".$id.\"',\".$idpanier.\",\".$qteProduit.\");\";\r\n $prep = $dbh->exec($req);\r\n if($prep==0) //Erreur\r\n {\r\n echo 'Erreur INSERT Base de Donnees';\r\n die(); \r\n }\r\n }\r\n}", "public function insert($listOfValue);", "Function donneefournisseurs()\r\n {\r\n echo \"copie des données de la table fournisseurs\";\r\n $req=\"INSERT INTO `\".Valorisation::$anneenouvelle.\"`.`fournisseurs` SELECT * FROM `\".Valorisation::$anneeancienne.\"`.`fournisseurs`\";\r\n Valorisation::$bddnew->query($req); \r\n }", "public function insert(){\n $bd = Database::getInstance();\n $bd->query(\"INSERT INTO canciones(artista, ncancion, idGen, album) VALUES (:art, :nca, :gen, :alb);\",\n [\":art\"=>$this->artista,\n \":gen\"=>$this->idGen,\n \":alb\"=>$this->album,\n \":nca\"=>$this->ncancion]);\n }", "public function insert() {\n \n $query = $this->dbConnection->prepare(\"INSERT INTO `menu` (`id`, `name`, `nameen`, `address`, `isMenu`, `order`) VALUES (NULL, :name, :nameen, :address, :isMenu, :order)\");\n $query->bindValue(':name', $this->name, PDO::PARAM_STR);\n $query->bindValue(':nameen', $this->nameen, PDO::PARAM_STR);\n $query->bindValue(':address', $this->address, PDO::PARAM_STR);\n $query->bindValue(':isMenu', $this->isMenu, PDO::PARAM_STR);\n $query->bindValue(':order', $this->order, PDO::PARAM_STR);\n $query->execute();\n $this->id = $this->dbConnection->lastInsertId();\n }", "function insertarPredio_menu($url,$icono,$nombre,$Orden,$hover,$permiso) {\r\n$sql = \"insert into predio_menu(idmenu,url,icono,nombre,Orden,hover,permiso)\r\nvalues ('','\".($url).\"','\".($icono).\"','\".($nombre).\"',\".$Orden.\",'\".($hover).\"','\".($permiso).\"')\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "function insertarPredio_menu($url,$icono,$nombre,$Orden,$hover,$permiso) {\r\n$sql = \"insert into predio_menu(idmenu,url,icono,nombre,Orden,hover,permiso)\r\nvalues ('','\".($url).\"','\".($icono).\"','\".($nombre).\"',\".$Orden.\",'\".($hover).\"','\".($permiso).\"')\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "private function ajoutauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t$this->_ctrlAuteur->auteurAjoute();\n\t}", "function ajouterProduit($code, $nom, $prix) {\n\t // echo \"<p>ajouter $code $nom $prix </p> \";\n\t \n\t /* on verifie si le panier n'est pas vide */ \n\t if ( $this->nbProduits == 0) {\n\t // echo \"<p>premier produit </p> \";\n\t \n\t /* le panier etait vide - on y ajoute un nouvel produit */\n\t $prod = new Produit($code, $nom, $prix);\n\t \n\t /* le produit dans la ligne de panier */ \n\t $lp = new LignePanier($prod);\n\t \n\t /* on garde chaque ligne dans un tableau associatif, avec le code produit en clé */\n\t\t\t $this->lignes[$code] = $lp;\n\t\t\t \n\t \n\t // echo \"<p>\" . $lp->prod->code . \" \" . $lp->qte . \"</p>\" ;\n\t \n\t $this->nbProduits = 1;\n\t }\n\t else {\n\t /* il y a deja des produits dans le panier */\n\t /* on verifie alors si $code n'y est pas deja */\n\t \n\t if ( isset ($this->lignes[$code]) ) {\n\t /* le produit y figure deja, on augmente la quantite */\n\t $lp = $this->lignes[$code] ; //on recupere la ligne du panier\n\t $qte = $lp->qte; \n\t $lp->qte = $qte + 1;\n\t \n\t // echo \"<p> nouvelle qte ($qte) : \" . $lp->qte .\"</p>\" ;\n\t \n\t }\n\t else { \n\t /* le produit n'etait pas encore dans le panier, on n'y ajoute */\n\t $prod = new Produit($code, $nom, $prix);\n\t $lp = new LignePanier($prod);\n\t \n\t $this->lignes[$code] = $lp;\n\t $this->nbProduits = $this->nbProduits + 1;\n\t \n\t\t\t\t // echo \"<p>\" . $this->lignes[$code]->prod->code . \" \" . $this->lignes[$code]->qte . \"</p>\" ;\n\t\t\t\t \n\n\t } \n\t \n\t }\t \n\t \n\t }", "private function listauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t// cree un auteur\n\t\tif(isset($_SESSION['error_auteur_cree'])) {unset($_SESSION['error_auteur_cree']); }\n\t\tif(isset($_POST['cree_auteur'])) {\n\t\t\t$nom = Utils::getPost('nom_auteur');\n\t\t\tif ($nom ) {\n\t\t\t\t$nom = Utils::filtreForte($nom);\n\t\t\t\tif (strlen($nom) > 2) { \n\t\t\t\t\t$this->_ctrlAuteur->creeAuteur($nom);\n\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_auteur_cree'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=ajoutauteur\");\n\t\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Exception('Valeur introdui incorect !!!');\n\t\t\t}\n\t\t} \n\n\t\t// modifie un auteur\n\t\tif(isset($_SESSION['error_auteur_modifie'])) unset($_SESSION['error_auteur_modifie']);\n\t\tif(isset($_POST['modifie_auteur'])){\n\t\t\t$nom = Utils::getPost('nom_auteur_m');\n\t\t\t$id = Utils::getPost('id_auteur_m');\n\t\t\tif ($nom && $id) {\n\t\t\t\t\t$id = Utils::filtreForte($id);\n\t\t\t\t\t$nom = Utils::filtreForte($nom);\n\t\t\t\t\t\tif (strlen($nom) > 2) {\n\t\t\t\t\t\t\t$this->_ctrlAuteur->auteurModifieBD($id, $nom);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$_SESSION['error_auteur_modifie'] = 'Minimum trois caractères !!!';\n\t\t\t\t\t\t\theader(\"Location: index.php?controler=mauteur&id=\".$id);\n\t\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception('Valeur introdui incorect !!!');\n\t\t\t\t}\n\n\t\t}\n\n\t\t$this->_ctrlAuteur->auteurListe();\n\t}", "function afterInsert($registro, $id)\n {\n $perfiles = $this->m_usuarios_perfiles->getRegistros();\n \n foreach ($perfiles as $row_perfil) \n {\n $registro = array(\n 'id_perfil' => $row_perfil->id_perfil,\n 'id_menu' => $id,\n 'ver' => 1,\n 'editar' => 1,\n );\n \n $this->m_usuarios_permisos->insert($registro);\n }\n }", "public function nuovoOrdine($ordine){\n $query = \"INSERT INTO ordini (`id`) VALUES (?)\"; \n \n $mysqli = Db::getInstance()->connectDb();\n if (!isset($mysqli)) {\n error_log(\"[nuovoOrdine] impossibile inizializzare il database\");\n return 0;\n }\n\n $stmt = $mysqli->stmt_init();\n\n $stmt->prepare($query);\n if (!$stmt) {\n error_log(\"[nuovoOrdine] impossibile\" .\n \" inizializzare il prepared statement\");\n $mysqli->close();\n return 0;\n }\n\n if (!$stmt->bind_param('i',\n $ordine->getId())) {\n error_log(\"[nuovoOrdine] impossibile\" .\n \" effettuare il binding in input\");\n $mysqli->close();\n return 0;\n }\n\n\n // inizio la transazione\n $mysqli->autocommit(false);\n\n if (!$stmt->execute()) {\n error_log(\"[nuovoOrdine] impossibile\" .\n \" eseguire lo statement\");\n $mysqli->rollback();\n $mysqli->close();\n return 0;\n }\n\n //query eseguita correttamente, termino la transazione\n $mysqli->commit();\n $mysqli->autocommit(true);\n\n $mysqli->close();\n return $stmt->affected_rows;\n \n }", "public abstract function insert();", "function insertar($bd);", "public function insertar($imagen, $imagen2, $imagen3, $nombre)\n\t{\n\t\t$db = DB::conectar();\n\n\t\t$select = $db->prepare('SELECT * FROM puntoturistico WHERE nombre=:nombre');\n\t\t$select->bindValue('nombre', $nombre);\n\t\t$select->execute();\n\t\t$registro = $select->fetch();\n\t\t$id = $registro['id'];\n\n\t\techo $id;\n\n\n\t\t$insert = $db->prepare(\"INSERT INTO imagen (nombre, direccion, extencion,idPuntoTuristico,categoria) \n\t\t\tVALUES(:nombre, :direccion, :extencion, $id , 1),\t\t\t\n\t\t\t\t (:nombre2, :direccion2, :extencion2, $id , 2),\n\t\t\t\t (:nombre3, :direccion3, :extencion3, $id , 2)\");\n\t\t$insert->bindValue('nombre', $imagen->getNombre());\n\t\t$insert->bindValue('direccion', $imagen->getDireccion());\n\t\t$insert->bindValue('extencion', $imagen->getExtencion());\n\n\t\t$insert->bindValue('nombre2', $imagen2->getNombre());\n\t\t$insert->bindValue('direccion2', $imagen2->getDireccion());\n\t\t$insert->bindValue('extencion2', $imagen2->getExtencion());\n\n\t\t$insert->bindValue('nombre3', $imagen3->getNombre());\n\t\t$insert->bindValue('direccion3', $imagen3->getDireccion());\n\t\t$insert->bindValue('extencion3', $imagen3->getExtencion());\n\n\t\t$insert->execute();\n\t}", "function add_list( $name, $creator, $can_delete, $items )\n\t{\n $this->db->trans_start();\n\n $this->db->set('name', $name );\n $this->db->set('creator', $creator );\n if( $can_delete !== NULL ) {\n $this->db->set('can_delete', $can_delete );\n } \n $this->db->insert('lists');\n\t\t$id = $this->db->insert_id();\n\n\t\tfor( $i = 0; $i < count($items); $i++ ) {\n\t\t\t\t$this->db->set('list_id', $id );\n $this->db->set('data_id', $items[$i]['id']);\n\t\t\t\t$this->db->set('title', $items[$i]['title']);\n\t\t\t\t$this->db->set('type', $items[$i]['type'] );\n\t\t\t\t$this->db->set('sort_order', $i + 1);\n\t\t\t\t$this->db->insert('list_items');\n }\n\n $this->db->trans_complete();\n\t}", "function insert()\n\t{\n\t\t$this->edit(true);\n\t}", "function crear_ruta_unidad($un_x,$r_x,$usu,$cli){\n\t\n global $db,$dbf,$fecha_con_formato,$nueva_ruta,$insertar_ruta_unidad;\n\t \n\n $data = Array(\n \t'DESCRIPTION' => utf8_decode(strtoupper($r_x)),\n 'COD_USER' => $usu,\n 'COD_CLIENT' => $cli,\n 'CREATE_DATE' => $fecha_con_formato\n \n );\n \n if($dbf-> insertDB($data,'SAVL_ROUTES',true) == true){\n echo \"se genero la ruta, ahora se asigna unidad a ruta siempre y cuando sea diferente de -1 en el cod_entity\";\n\t\t\t\t\n\t\t\t\t$ruta = \"SELECT ID_ROUTE FROM SAVL_ROUTES WHERE DESCRIPTION LIKE '%\".strtoupper($r_x).\"%'\";\n\t\t\t\t $query = $db->sqlQuery($ruta);\n\t\t\t\t $row = $db->sqlFetchArray($query);\n\t\t\t\t \t$count_x = $db->sqlEnumRows($query);\t \n\t\t\t\t\t\n\t\t\t\t\t \t\n\t\t\t\tif($un_x!=-1) {\n\t\t\t\t\t $data_3 = Array(\n\t\t\t\t\t\t\t\t\t 'ID_ROUTE' => $row['ID_ROUTE'],\n\t\t\t\t\t\t\t\t\t 'COD_ENTITY' => $un_x,\n\t\t\t\t\t\t\t\t\t 'COD_USER' => $usu,\n\t\t\t\t\t\t\t\t\t 'CREATE_DATE' => $fecha_con_formato\n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t if($dbf-> insertDB($data_3,'SAVL_ROUTES_UNITS',true) == true){\n \t\t\t\t\t echo \"info de la ruta\".$row['ID_ROUTE'].'-'.$un_x.'-'.$usu.'-'.$fecha_con_formato.'<br />';\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t }else{\n \t\t\t\t echo \"fallo en ruta-unidad\";\t\n }\n\t\t\t\t\t\t\t \n\t\t\t }\t\t\t\t \t\t\t\n\t\t\t}\t\t\n\t\t\t\n\t\t\t\n\t $nueva_ruta = $row['ID_ROUTE'];\t\t\n $insertar_ruta_unidad = $insertar_ruta_unidad + 1;\n}", "public function insertarContenedores(){\n\t\t\t#try{\n\t\t\t\n\t\t\t\t$PDOmysql = consulta();\n\t\t\t\t$PDOmysql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n\t\t\t\t#Itera entre el array Contenedores, para insertarlo uno por uno.\n\t\t\t\tforeach ($this->contenedores as $contenedor) {\n\t\t\t\t\n\t\t\t\t\t#Se comprueba si el contenedor esta en la base de datos.\n\t\t\t\t\t$sql = 'select idContenedor from Contenedor where idContenedor = :contenedor';\n\t\t\t\t\t$stmt = $PDOmysql->prepare($sql);\n\t\t\t\t\t$stmt->bindParam(':contenedor', $contenedor->get_id());\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t#La variable respuesta comprueba si existe o no el contendor.\n\t\t\t\t\t$respuesta = $stmt->rowCount() ? true : false;\n\t\t\t\t\t#Si respuesta es que no existe el contenedor aun en la base de datos.\n\t\t\t\t\tif(! $respuesta){\n\t\t\t\t\t\t#Inserta el contenedor.\n\t\t\t\t\t\t$sql = 'insert into Contenedor(idContenedor,Tipo) values(:contenedor, :tipo);';\n\t\t\t\t\t\t$stmt = $PDOmysql->prepare($sql);\n\t\t\t\t\t\t$stmt->bindParam(':contenedor', $contenedor->get_id()); #get_id() y get_tipo()\n\t\t\t\t\t\t$stmt->bindParam(':tipo', $contenedor->get_tipo());\t\t#son metodos de la clase contenedor.\n\t\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t}\n\n\t\t\t\t\t$sql = 'SELECT Flete_idFlete, Contenedor \n\t\t\t\t\t\t\tfrom Contenedor_Viaje \n\t\t\t\t\t\t\twhere \n\t\t\t\t\t\t\tFlete_idFlete = :flete\n\t\t\t\t\t\t\tand\n\t\t\t\t\t\t\tContenedor = :contenedor';\n\n\n\t\t\t\t\t$stmt = $PDOmysql->prepare($sql);\n\t\t\t\t\t$stmt->bindParam(':contenedor', $contenedor->get_id());\n\t\t\t\t\t$stmt->bindParam(':flete', $this->flete);\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t#La variable respuesta comprueba si existe o no el contendor.\n\t\t\t\t\t$respuesta = $stmt->rowCount() ? true : false;\n\n\t\t\t\t\tif(! $respuesta){\n\t\t\t\t\t\t#Incicializa el viaje para el flete, asignando contenedores al flete.\n\t\t\t\t\t\t$sql = 'insert into Contenedor_Viaje(WorkOrder,Booking,Flete_idFlete, Contenedor) values(:workorder, :booking, :flete, :contenedor);';\n\t\t\t\t\t\t$stmt = $PDOmysql->prepare($sql);\n\t\t\t\t\t\t$stmt->bindParam(':workorder', $contenedor->get_workorder());\n\t\t\t\t\t\t$stmt->bindParam(':booking', $contenedor->get_booking());\n\t\t\t\t\t\t$stmt->bindParam(':flete', $contenedor->get_flete());\n\t\t\t\t\t\t$stmt->bindParam(':contenedor', $contenedor->get_id());\n\t\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t\t\t\t//Cada contenedor tiene un objeto ListaSellos.\n\t\t\t\t\t\t\t\t#Se manda a llamar al objeto, y este llama a su metodo insertar, para\n\t\t\t\t\t\t\t\t#añadir los sellos a la base de datos.\n\t\t\t\t\t\t\t\t#Esto se puede ya que cada contenedor conoce el flete al que pertenece.\n\t\t\t\t\t}\n\n\t\t\t\t\telse{\n\t\t\t\t\t\t$update = new Update;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$camposUpdate = array(\"statusA\" => 'Activo');\n\t\t\t\t\t\t$camposWhereUpdate = array(\"Flete_idFlete\" => $this->flete, \"Contenedor\" => $contenedor );\n\n\t\t\t\t\t\t$update->prepareUpdate(\"Contenedor_Viaje\", $camposUpdate, $camposWhereUpdate);\n\t\t\t\t\t\t$update->createUpdate();\n\t\t\t\t\t}\n\n\t\t\t\t\t$listaSellos = $contenedor->get_sellos();\n\t\t\t\t\tif($listaSellos){\n\t\t\t\t\t\t$listaSellos->insertar_sellos();\n\t\t\t\t\t}\t\t\n\n\t\t\t\t}\n\t\t\t#}catch(Exception $e){\n\n\t\t\t#}\n\n\t\t}", "function GenerarInserts($NombreTabla,$parametros){\n\n\t$ins= \"\t/* Funcion Insertar */\\n\";\n\t$ins.= \"\tpublic function \".strtolower( $NombreTabla ).\"Ins(){\\n\";\n\t$ins.= '\t\t$this->adampt->Liberar();'.\"\\n\";\n\tforeach ($parametros as $indice => $valor) {\n\t\t$ins.='\t\t$this->adampt->setParam( '.'$this->get_'.$valor.'() );'.\"\\n\";\n\t}\t\n\t$ins .='\t\t$query = $this->adampt->consulta(\"USP_XXX_I_'.$NombreTabla.'\");'.\"\\n\";\n\t$ins .='\t\tif( count($result) > 0){'.\"\\n\";\n\t$ins .='\t\t\treturn $result;'.\"\\n\";\n\t$ins .='\t\t}else{'.\"\\n\";\n\t$ins .='\t\t\treturn null;'.\"\\n\";\n\t$ins .='\t\t}'.\"\\n\";\n\t$ins .=\"\t}\\n\\n\";\n\treturn $ins;\n}", "function insertarBuques($nombre) {\r\n$sql = \"insert into tbbuques(idbuque,nombre)\r\nvalues ('','\".($nombre).\"')\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "function insertItems($table, $colomn, $value, $array = array()){\n\t\tglobal $con;\n\t\t$stmt = $con->prepare('INSERT INTO ' . $table . '(' . $colomn . ')' . ' VALUES (' . $value . ')');\n\t\t$stmt->execute($array);\n\t\treturn $stmt->rowCount();\n\t}", "function renderInsert(){\n\t\t$new =[];\n\t\t$pengguna = new ModelPengguna($this->db);\n\t\t$produk = new ModelProduk($this->db);\n\n\t\t$allProduk = $produk->all();\n\t\t$newId = $produk->getMaxIdProduk()[0]['maximum']+1;\n\t\tarray_push($new,$newId);\n\t\t$this->f3->set('sp',$allProduk);\t\n\t\t$ID= $this->f3->get('SESSION.user');\t\n\t\t$pgn = $pengguna->getByID($ID);\n\t\t$role = $this->f3->get('SESSION.role');\n\n\t\t$this->f3->set('pgn',$pengguna);\n\t\t$this->f3->set('newId',$new);\n\t\tif($role==1){\n\t\t\t$template = new Template;\n\t\t\techo $template->render('InsertPage.htm');\n\t\t}\n\t\telse{\n\t\t\t$this->f3->reroute('/pengguna');\n\t\t}\n\t}", "function push($valor){\n\t\t\tif( $this->vazia() ){\n\t\t\t\t$this->primeiro = new No($valor);\t\n\t\t\t\t$this->qnt_elementos += 1;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$aux = $this->primeiro;\n\t\t\tfor($aux; $aux->getProx() != NULL; $aux = $aux->getProx());\n\t\t\t$novo = new No($valor);\n\t\t\t$aux->setProx($novo);\n\t\t\t$novo->setAnt($aux);\n\t\t\t$this->qnt_elementos +=1;\n\t\t\treturn;\n\t\t}", "function ajouterUe($id, $nomUe,$libelleUe) {\n $query = 'insert into ue values(\"\",\"'.$nomUe.'\",\"'.$id.'\",\"'.$libelleUe.'\")';\n mysql_query($query) or die (\"Impossible d'inserer une UE\");\n\t\n}", "function agregar_nueva_poliza($id_usuario_sesion, $tipo_sesion, $usuario_sesion, $id_ef_sesion, $conexion){\n\t\n\t//VEO SI SE HA HECHO CLICK EN EL BOTON GUARDAR\n\tif(isset($_POST['btnGuardar'])) {\n\t\t\n\t\t\t$id_ef_cia = base64_decode($_GET['id_ef_cia']);\t\n\t\t \n\t\t\t//SEGURIDAD\n\t\t\t$num_poliza = $conexion->real_escape_string($_POST['txtPoliza']);\n\t\t\t$fecha_ini = $conexion->real_escape_string($_POST['txtFechaini']);\n\t\t\t$fecha_fin = $conexion->real_escape_string($_POST['txtFechafin']);\n\t\t\t$producto = $conexion->real_escape_string($_POST['txtProducto']);\n\t\t\t//GENERAMOS EL ID CODIFICADO UNICO\n\t\t\t$id_new_poliza = generar_id_codificado('@S#1$2013');\t\t\t\t\t\n\t\t\t//METEMOS LOS DATOS A LA BASE DE DATOS\n\t\t\t$insert =\"INSERT INTO s_poliza(id_poliza, no_poliza, fecha_ini, fecha_fin, producto, id_ef_cia) \"\n\t\t\t\t .\"VALUES('\".$id_new_poliza.\"', '\".$num_poliza.\"', '\".$fecha_ini.\"', '\".$fecha_fin.\"', '\".$producto.\"', '\".$id_ef_cia.\"')\";\n\t\t\t\n\t\t\t\n\t\t\t//VERIFICAMOS SI HUBO ERROR EN EL INGRESO DEL REGISTRO\n\t\t\tif($conexion->query($insert)===TRUE){\n\t\t\t\t\t\t\t\t\n\t\t\t\t$mensaje=\"Se registro correctamente los datos del formulario\";\n\t\t\t header('Location: index.php?l=des_poliza&var='.$_GET['var'].'&listarpolizas=v&id_ef_cia='.$_GET['id_ef_cia'].'&entidad='.$_GET['entidad'].'&compania='.$_GET['compania'].'&id_ef='.base64_encode($_GET['id_ef']).'&producto_nombre='.$_GET['producto_nombre'].'&producto_code='.$_GET['producto_code'].'&op=1&msg='.base64_encode($mensaje));\n\t\t\t exit;\n\t\t\t} else {\n\t\t\t\t$mensaje=\"Hubo un error al ingresar los datos, consulte con su administrador \".$conexion->errno.\": \".$conexion->error;\n\t\t\t header('Location: index.php?l=des_poliza&var='.$_GET['var'].'&listarpolizas=v&id_ef_cia='.$_GET['id_ef_cia'].'&entidad='.$_GET['entidad'].'&compania='.$_GET['compania'].'&id_ef='.base64_encode($_GET['id_ef']).'&producto_nombre='.$_GET['producto_nombre'].'&producto_code='.$_GET['producto_code'].'&op=2&msg='.base64_encode($mensaje));\n\t\t\t\texit;\n\t\t\t}\n\t\t\n\t}else {\n\t\t//MUESTRO EL FORM PARA CREAR UNA CATEGORIA\n\t\tmostrar_crear_poliza($id_usuario_sesion, $tipo_sesion, $usuario_sesion, $id_ef_sesion, $conexion);\n\t}\n}", "function joueContre($adversaire, $lieu, $date) // trois argument définis pour la première fois\n{\n // contenant les infos de la rencontre\n array_push($this->rencontres, [\"adversaire\" => $adversaire, \n \"lieu\" => $lieu, \n \"date\" => $date\n\n ]); // on range les données dans le tableau rencontres, tableau de niveau 2\n\n}", "function insertarMercaderias($nombre) {\r\n$sql = \"insert into tbmercaderias(idmercaderia,nombre)\r\nvalues ('','\".$nombre.\"')\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function insert($kelasMateri);", "function insertar_recibidos_mov($id_mov)\r\n {\r\n global $db,$_ses_user;\r\n\r\n $ok=1;\r\n\r\n $db->StartTrans();\r\n\r\n $items=get_items_mov($id_mov);\r\n\r\n for($i=0;$i<$items['cantidad'];$i++)\r\n {\r\n $cantidad=$_POST[\"cant_recib_$i\"];\r\n if($cantidad>0)\r\n {\r\n $desc_recib=$_POST[\"desc_recib_$i\"];\r\n $id_prod_esp=$items[$i][\"id_prod_esp\"];\r\n $id_detalle_mov=$items[$i]['id_detalle_movimiento'];\r\n //vemos si ya se recibieo alguno de este producto. Si es asi, se actualiza\r\n //es entrada en recibidos_mov, sino, se inserta una nueva entrada\r\n $query=\"select id_recibidos_mov from recibidos_mov\r\n where id_detalle_movimiento=$id_detalle_mov and ent_rec=1\";\r\n $res=sql($query) or fin_pagina();\r\n if($res->fields['id_recibidos_mov'])\r\n {\r\n $query=\"update recibidos_mov set cantidad=cantidad+$cantidad , observaciones='$desc_recib' where id_recibidos_mov=\".$res->fields['id_recibidos_mov'].\" and ent_rec=1\";\r\n $tipo_log=\"actualización\";\r\n $id_recibidos_mov=$res->fields['id_recibidos_mov'];\r\n }\r\n else\r\n {\r\n $query=\"select nextval('recibidos_mov_id_recibidos_mov_seq') as id\";\r\n $id=$db->Execute($query) or die($db->ErrorMsg().\"<br>Error al traer la seucencia de recibidos_mov\");\r\n $id_recibidos_mov=$id->fields['id'];\r\n $query=\"insert into recibidos_mov(id_recibidos_mov,cantidad,observaciones,id_detalle_movimiento,ent_rec)\r\n values($id_recibidos_mov,$cantidad,'$desc_recib',$id_detalle_mov,1)\";\r\n $tipo_log=\"inserción\";\r\n }\r\n sql($query) or fin_pagina();\r\n\r\n $fecha_hoy=date(\"Y-m-d H:i:s\",mktime());\r\n $query=\"insert into log_recibidos_mov(fecha,usuario,tipo,id_recibidos_mov,cantidad_recibida)\r\n values('$fecha_hoy','\".$_ses_user['name'].\"','$tipo_log',$id_recibidos_mov,$cantidad)\";\r\n sql($query) or fin_pagina();\r\n }\r\n }\r\n if (!$db->CompleteTrans()) $ok=0;\r\n\r\n return $ok;\r\n}", "function spiplistes_listes_boite_abonnements ($id_liste, $statut_liste, $tri, $debut, $script_retour) {\n\n\t$boite_abonnements = \"\"\n\t\t. \"<div id='\" . _SPIPLISTES_ID_GROSSE_BOITE . \"' class='verdana1'>\\n\"\n\t\t. spiplistes_listes_boite_abonnes($id_liste, $statut_liste, $tri, $debut, $script_retour)\n\t\t. spiplistes_listes_boite_elligibles ($id_liste, $statut_liste, $tri, $debut)\n\t\t. \"</div>\\n\"\n\t\t;\n\treturn($boite_abonnements);\n}", "function insertarDestinos($destino) {\r\n$sql = \"insert into tbdestinos(iddestino,destino)\r\nvalues ('','\".($destino).\"')\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function InsertarAutor($nombre) {\n $r = $this->db->query(\"select max(id) as id from autores\");\n $row =$r->result()[0];\n $idM=$row->id+1;\n\n $r = $this->db->query(\"INSERT INTO autores(id,nombre) VALUES ('$idM','$nombre')\");\n return $r;\n }", "function insertar($id_examen,$dni,$respuesta,$pregunta,$puntaje,$correcta,$fecha,$id,$cantidad,$sec)\n{\n $n=0;\n $result = mysql_query(\"SELECT COUNT(id_resultado) FROM cap_resultado WHERE id_examen='\".$id_examen.\"' AND dni='\".$dni.\"'\");\n while ($row = mysql_fetch_row($result))\n {\n $contador=$row[0];\n }\n\nif($contador<$cantidad)\n\n{\n$sql=\"INSERT INTO cap_resultado (id_examen,id_pregunta,dni,respuesta_r,respuesta_c,puntaje,fecha,id,id_seccion) VALUES ('\".$id_examen.\"','\".$pregunta.\"','\".$dni.\"','\".$respuesta.\"','\".$correcta.\"','\".$puntaje.\"','\".$fecha.\"','\".$id.\"','\".$sec.\"')\";\n$result = mysql_query($sql);\n}\n\n\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 }", "function insertTest()\n {\n $this->cD->insertElement(new Product(1, \"Trang\"));\n $this->cD->insertElement(new Product(1, \"Trang\"));\n $this->cD->insertElement(new Product(1, \"Trang\"));\n }", "public function insert() {\n \n }", "function Insert($datos)\n { \n\t\t// si el id_fichero es nulo, se busca el siguiente que le corresponde \n\t\tif(is_null($datos['id_fichero']))\n\t\t{\t\n\t\t\t// Se obtiene el último id insertado\n\t\t\t$sql_atribs = \"SELECT max(id_fichero) as ultimo_id FROM ficheros_inmuebles WHERE inmueble='\".$datos['inmueble'].\"'\";\n\t\t\t$atribs = $this->Execute($sql_atribs) or die($this->ErrorMsg());\n\t\t\t$num_atribs = $atribs->RecordCount();\n\t\t\t$atrib = $atribs->FetchRow();\n\t\t\n\t\t\tif(is_null($atrib['ultimo_id']))\n\t\t\t{\n\t\t\t\t$id_fichero=1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$id_fichero = $atrib['ultimo_id']+1;\n\t\t\t}\n\t\t}\n\t\t// Se inserta los valores de los datos\n\t\t$insertSQL = sprintf(\"INSERT INTO ficheros_inmuebles (id_fichero, inmueble, fichero, texto_fichero, tipo_fichero) VALUES (%s, %s, %s, %s, %s)\", \n\t\t\t\t GetSQLValueString($id_fichero, \"int\"),\n\t\t\t\t GetSQLValueString($datos['inmueble'], \"text\"),\n\t\t\t\t GetSQLValueString($datos['fichero'], \"text\"),\n\t\t\t\t GetSQLValueString($datos['texto_fichero'], \"text\"),\n\t\t\t\t GetSQLValueString($datos['tipo_fichero'], \"text\"));\n\t\treturn $this->Execute($insertSQL) or die($this->ErrorMsg());\n }", "final private function insertNewAutorizado($id) {\n # Si hay alergias\n if(null != $this->autorizado) {\n \n # Insertar de nuevo esas relaciones\n $autorizado = $this->db->prepare(\"INSERT INTO nino_autorizado_2 (id_nino,id_autorizado)\n VALUES ('$id',?);\");\n foreach($this->autorizado as $id_autorizado){\n $autorizado->execute(array($id_autorizado));\n }\n $autorizado->closeCursor();\n } \n }", "function insertar(){\n $nombre=$_POST[\"nombre\"];\n $apellido=$_POST[\"apellido\"];\n $edad=$_POST[\"edad\"];\n $curso=$_POST[\"curso\"];\n $correo=$_POST[\"correo\"];\n $consulta=\"INSERT INTO usuarios (Nombre, Apellido, Edad, Curso, Correo) VALUES('\".$nombre.\"', '\".$apellido.\"', '\".$edad.\"', '\".$curso.\"', '\".$correo.\"')\";\n echo $consulta. \"<br>\";\n \n $conexion->consulta($consulta);\n //$resultado = $conector->query($consulta);\n mostrarListado();\n\n }", "public function insert() {\r\n // Rôle : insérer l'objet courant dans la base de données\r\n // Retour : true / false\r\n // Paramètre : aucun\r\n \r\n // Vérification de l'id\r\n if (!empty($this->getId())) {\r\n debug(get_class($this).\"->insert() : l'objet courant a déjà un id\");\r\n return false;\r\n }\r\n \r\n // Construction de la requête\r\n $sql = \"INSERT INTO `\".$this->getTable().\"` SET \";\r\n $param = [];\r\n $start = true;\r\n \r\n foreach ($this->getChamps() as $nom => $champs) {\r\n if ($nom === $this->getPrimaryKey() or !$champs->getAttribut(\"inBdd\")) {\r\n continue;\r\n }\r\n if ($start) {\r\n $sql .= \"`$nom` = :$nom\";\r\n $start = false;\r\n } else {\r\n $sql .= \", `$nom` = :$nom\";\r\n }\r\n \r\n $param[\":$nom\"] = $champs->getValue();\r\n }\r\n \r\n $sql .= \";\";\r\n \r\n // Préparation de la requête\r\n $req = self::getBdd()->prepare($sql);\r\n \r\n // Exécution de la requête\r\n if (!$req->execute($param)) {\r\n debug(get_class($this).\"->insert() : échec de la requête $sql\");\r\n return false;\r\n }\r\n \r\n // Assignation de l'id\r\n if ($req->rowCount() === 1) {\r\n $this->set($this->getPrimaryKey(), self::getBdd()->lastInsertId());\r\n return true;\r\n } else {\r\n debug(get_class($this).\"->insert() : aucune entrée, ou bien plus d'une entrée, créée\");\r\n return false;\r\n }\r\n }", "public function agregar($idproveedor,$idusuario,$tipo_comprobante,\n $serie_comprobante,$num_comprobante,$fecha_hora,$impuesto,\n $total_compra,$idarticulo,$cantidad,$precio_compra,$precio_venta){\n $conectar = Conectar::conexion();\n $sql = \"insert into ingreso values(null,?,?,?,?,?,?,?,?,'Aceptado')\";\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1,$_POST[\"idproveedor\"]);\n $sql->bindValue(2,$_SESSION[\"idusuario\"]);\n $sql->bindValue(3,$_POST[\"tipo_comprobante\"]);\n $sql->bindValue(4,$_POST[\"serie_comprobante\"]);\n $sql->bindValue(5,$_POST[\"num_comprobante\"]);\n $sql->bindValue(6,$_POST[\"fecha_hora\"]);\n $sql->bindValue(7,$_POST[\"impuesto\"]);\n $sql->bindValue(8,$_POST[\"total_compra\"]);\n $sql->execute();\n\n //$resultado = $sql->fetch();\n //return $resultado;\n\n $idingresonew = $conectar->lastInsertId();\n $num_elementos= 0;\n $sw=true;\n $id=$_POST[\"idarticulo\"];\n $cant=$_POST[\"cantidad\"];\n $prec=$_POST[\"precio_compra\"];\n $prev=$_POST[\"precio_venta\"];\n\n while ($num_elementos < count($_POST[\"idarticulo\"])) {\n\n $sql_detalle = \"insert into detalle_ingreso(idingreso,idarticulo,cantidad,precio_compra,precio_venta)\n values('$idingresonew','$id[$num_elementos]','$cant[$num_elementos]','$prec[$num_elementos]','$prev[$num_elementos]')\";\n $sql_detalle = $conectar->prepare($sql_detalle);\n $sql_detalle->execute() or $sw=false;\n $num_elementos = $num_elementos + 1;\n }\n return $sw;\n }", "function addpanier($user, $product, $quantite, $poids){\t// Fonction pour ajouter un produit au panier\n\n\t\tinclude(\"../../modele/modele.php\"); // Inclue la base de donnée + connexion.\n\t\t\n\t\t$actif = '1' ;\n\t\t$sql = 'INSERT INTO detailcommande(id_product, id_user, quantite, poids, actif) VALUES (:id_product , :id_user , :quantite , :poids, :actif) '; // Ajout d'une ligne dans la table detailCommande \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // suivant les informations entrer dans la fonction panier.\n\t\t$reponse = $bdd->prepare($sql);\t\t\t// Preparation de la requete SQL.\n\t\t$reponse -> bindParam(':id_product', $product);\n\t\t$reponse -> bindParam(':id_user', $user);\n\t\t$reponse -> bindParam(':quantite', $quantite);\n\t\t$reponse -> bindParam(':poids', $poids);\n\t\t$reponse -> bindParam(':actif', $actif );\n\t\t$reponse ->execute();\t\t\t\t\t// Execution de la requete SQL.\n\n\t\t$sql3 = 'SELECT * FROM detailcommande WHERE id_product = \"'.$product.'\" AND id_user = \"'.$user.'\" AND quantite = \"'.$quantite.'\" AND poids=\"'.$poids.'\" AND actif = 1 ';\n\t\t$reponse3 = $bdd->query($sql3);\n\t\twhile ($donnees = $reponse3 -> fetch())\t\t// Mise en forme de tableau.\n\t\t\t{\n\t\t\t\t$actif = '1' ;\n\t\t\t\t$id_detailCommande = $donnees['id'];\n\t\t\t\t$sql2 = 'INSERT INTO commande(id_user, id_detailCommande, date, actif) VALUES (:id_user, :id_detailCommande, CURDATE(), :actif)'; \t// Ajout d'une ligne dans la table commande\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// suivant les informations d'entrées\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Ajout date ???\n\t\t\t\t$reponse2 = $bdd->prepare($sql2);\n\t\t\t\t$reponse2 -> bindParam(':id_user', $user);\n\t\t\t\t$reponse2 -> bindParam(':id_detailCommande', $id_detailCommande);\n\t\t\t\t$reponse2 -> bindParam(':actif', $actif );\n\t\t\t\t$reponse2 ->execute();\n\t\t\t}\n\t}", "function maquetacioItemsNotHoudini($model, $columna, $nomCaixa, $tipusCaixa, $ordre, $estilCaixa, $estilLlistat, $estilElement, $id_registre, $id_newsletter, $registre, $pathEditora)\n{\n global $CONFIG_URLBASE, $CONFIG_URLUPLOADIM, $CONFIG_estilsElement;\n\n $parametres = '<input type=\"hidden\" name=\"newsletter['.htmlspecialchars($model).']['.htmlspecialchars($columna).']['.htmlspecialchars($nomCaixa).']['.htmlspecialchars($tipusCaixa).'][]['.htmlspecialchars($estilCaixa).']['.htmlspecialchars($estilLlistat).']['.htmlspecialchars($estilElement).']\" value=\"'.htmlspecialchars($id_registre).'\" />';\n\n $imatge = $registre['IMATGE1'] != '' ? '<img src=\"' . $CONFIG_URLUPLOADIM . $registre['IMATGE1'] . '\" style=\"width: 159px;\" class=\"left\"/>' : '';\n return '<li id=\"noth_reg' . $id_registre . '\" class=\"box removable stylable clearfix '.$estilElement.'\">\n\t\t\t'.$parametres.'\n\t\t\t<div class=\"spacer clearfix\">\n\t\t\t\t'. $imatge .'\n\t\t\t\t<h4><a href=\"'.$CONFIG_URLBASE . $pathEditora . '/' . $registre['ID'] . '/' . $registre['URL_TITOL'].'\" rel=\"external\">'.$registre['TITOL'].'</a></h4>\n\t\t\t\t<p>'.$registre['RESUM'].'</p>\n\t\t\t</div>\n\t\t</li>';\n}", "public function setVendedor($nome,$comissao){\n try{\n $x = 1;\n $Conexao = Conexao::getConnection();\n $query = $Conexao->prepare(\"INSERT INTO vendedor (nome,comissao) VALUES ('$nome',$comissao)\"); \n $query->execute(); \n // $query = $Conexao->query(\"DELETE FROM vendedor WHERE id_vendedor = (SELECT top 1 id_vendedor from vendedor order by id_vendedor desc)\"); \n // $query->execute();\n return 1;\n\n }catch(Exception $e){\n echo $e->getMessage();\n return 2;\n exit;\n } \n }", "public static function insertItems_Carrello($id_carrello,$id_prodotto, $totale, $id_valuta, $quantita): int{\n $DB = \\Singleton::DB();\n $sql = 'SELECT totale, id_valuta, quantita FROM items_carrello WHERE id_carrello=? AND id_prodotto=?';\n $p = $DB->prepare($sql);\n $p->bind_param(\"ii\", $id_carrello,$id_prodotto);\n if(!$p->execute())\n throw new \\SQLException(\"Error Executing Statement\", $sql, $p->error, 3);\n //mi sembra che non c-e bisogno di bind_result xke tanto posso prendere il valore usando p->fetch e poi p[id]\n $p->bind_result($present_totale, $present_id_valuta, $present_quantita);\n $p->fetch();\n $p->free_result();\n if(isset($present_quantita)) // vuol dire che esiste gia questo elemento del database ergo lo devo aggiornare\n {\n $new_totale=$present_totale+$totale;\n $new_quantita=$present_quantita+$quantita;\n $new_id_valuta=$id_valuta; //beh, qui dovrei fare in modo di fare eventuali conversioni, e riportarli a un unica valuta in caso siano diverse\n\n $sql = \"UPDATE items_carrello SET totale=$new_totale, quantita=$new_quantita, id_valuta='$new_id_valuta' WHERE id_carrello=? AND id_prodotto=?\";\n $p = $DB->prepare($sql);\n $p->bind_param(\"ii\", $id_carrello,$id_prodotto);\n if(!$p->execute())\n throw new \\SQLException(\"Error Executing Statement\", $sql, $p->error, 3);\n $p->close();\n }\n else{\n //inserisce una riga nella tabbella items_carrello\n $sql = 'INSERT INTO '.'items_carrello'.' VALUES (NULL, ?, ?, ?,?,?)';\n $p = $DB->prepare($sql);\n $p->bind_param(\"iidsi\", $id_carrello,$id_prodotto, $totale, $id_valuta, $quantita);\n if(!$p->execute())\n throw new \\SQLException(\"Error Executing Statement\", $sql, $p->error, 3);\n $p->close();\n }\n\n\n // Dopo che hai inserito un nuovo prodotto nel carrello, si fa anche un refresh della tabbella carrelli per aggiornare il nuovo totale del carrello con id $id_carrello dove hai appena inserito il prodotto\n $model_carrello=self::create(array(\"id\"=>\"$id_carrello\"));\n $totale=$model_carrello->getTotale();\n $pre=$totale->getPrezzo();\n $id_val=$totale->getValuta();\n $DB = \\Singleton::DB();\n $sql = \"UPDATE \".self::$table.\" SET totale=?, id_valuta=? WHERE id = ?\";\n $p = $DB->prepare($sql);\n $p->bind_param(\"dsi\", $pre, $id_val, $id_carrello);\n if(!$p->execute())\n throw new \\SQLException(\"Error Executing Statement\", $sql, $p->error, 3);\n $p->close();\n\n\n return $DB->lastId(); //ritorna l-id del carrello appena inserito nella tabbella items_prodotti\n //potrebbe essere che restituisce l-id del valore aggionato nel caso in cui si e eseguito il ramo IF\n }", "function ZonaInsert($Nombre, $IdZonaPadre) {\r\n\tglobal $Cfg;\r\n\r\n\t$sql = \"insert $Cfg[SqlPrefix]zonas set\r\n\t\tNombre = '$Nombre',\r\n\t\tIdZonaPadre = $IdZonaPadre\";\r\n\r\n\tDbExecuteUpdate($sql);\r\n\r\n\treturn DbLastId();\r\n}", "public function incluir(){\n header(\"Content-type: text/html;charset=utf-8\");\n $sql = \"SHOW FULL FIELDS FROM \" . $this->table;\n $execute = conexao::toConnect()->executeS($sql);\n $atributos = \"\";\n $values = \"\";\n $id_registro = \"\";\n $contador = count($execute) - 1;\n foreach ($execute as $key => $attr){\n if ($attr->Key != 'PRI') {\n $atributos_field = $attr->Field;\n $select_p = substr(strtoupper($atributos_field), 0, 1);\n $select_t = substr($atributos_field, 1);\n $get = 'get' . $select_p . $select_t;\n if ($contador != $key) {\n $atributos .= $attr->Field . ',';\n $values .= \"'\".$this->$get() .\"',\";\n } else {\n $atributos .= $attr->Field;\n $values .= \"'\".$this->$get() .\"'\";\n }\n }else{\n $id_registro = $attr->Field;\n }\n }\n $insert = \"INSERT INTO \".$this->table.\" (\".$atributos.\") VALUES($values)\";\n $execute_into = conexao::toConnect()->executeQuery($insert);\n if (count($execute_into) > 0) {\n $sql = \"SELECT \".$id_registro.\" FROM \".$this->table.\" ORDER BY \".$id_registro.\" DESC LIMIT 1\";\n $id_r = conexao::toConnect()->executeS($sql);\n return $id_r[0]->$id_registro;\n }else{\n return false;\n }\n\n }", "function getListe( $num_commande=0, $liste_exclusion='', $tri='commande_erreur.date_creation', $ordre='ASC') {\n\t\t$commande = new commande();\n\t\t\n\t\tif ( $tri == \"\" ) $tri = \"commande.date_creation\";\n\t\tif ( $ordre == \"\" ) $ordre = \"ASC\";\n\t\t\n\t\t$requete = \"SELECT * FROM commande_erreur\";\n\t\t$requete .= \" INNER JOIN client ON client.num_commande = commande.num_commande\";\n\t\t$requete .= \" WHERE num_commande_erreur > 0\";\n\t\t\n\t\tif ( intval( $num_commande ) > 0 ) $requete .= \" AND commande.num_commande = '\" . $num_commande . \"'\";\n\t\tif ( $liste_exclusion != \"\" ) $requete .= \" AND commande.num_commande_erreur NOT IN (\" . $liste_exclusion . \")\";\n\t\tif ( $supprime != \"\" ) $requete .= \" AND supprime = \" . $supprime;\n\t\t$requete .= \" ORDER BY \" . $tri . \" \" . $ordre;\n\t\t//echo $requete . \"<br><br>\";\n\t\t$liste = mysql_query($requete);\n\t\t\n\t\t// Retourne un tableau\n\t\t$tableau_commande = array();\n\t\t\n\t\tif (mysql_num_rows($liste) != 0) {\n\t\t\t$i = 0;\n\t\t\twhile($data = mysql_fetch_assoc($liste)) {\n\t\t\t\t\n\t\t\t\t// Tentative de chargement\n\t\t\t\tif ( $commande->load( $data[\"num_commande_erreur\"] ) ) {\n\t\t\t\t\t//echo \"-->\" . $this->num_commande . \"<br>\";\n\t\t\t\t\t$tableau_commande[$i] = new commande();\n\t\t\t\t\t\n\t\t\t\t\t$tableau_commande[$i]->num_commande_erreur = $commande->num_commande_erreur;\n\t\t\t\t\t$tableau_commande[$i]->num_commande = $commande->num_commande;\n\t\t\t\t\t$tableau_commande[$i]->texte = $commande->texte;\n\t\t\t\t\t$tableau_commande[$i]->date_creation = $commande->date_creation;\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $tableau_commande;\n\t}", "public function ajoutPublication($auteurs, $titre_article, $reference_publication, $annee, $categorie, $lieu = null, $statut){\n $publicationInseree = new Publication(null, $auteurs, $titre_article, $reference_publication, $annee, $statut, $categorie, $lieu);\n if($this->verificationPublicationBase($publicationInseree)){\n throw new Exception(\"Publication déja présente\");\n }\n\t\t\t//On insère d'abord la publication dans la table Publication\n $reqInsertion= 'INSERT INTO Publication(id, titre_article, reference_publication, annee, categorie, lieu, statut, date_ajout) VALUES(?, ?, ?, ?, ?, ?, ?, ?)';\n $this->executerRequete($reqInsertion, array(NULL, $titre_article, $reference_publication, $annee, $categorie, $lieu, $statut, date(\"Y-m-d\"))); \n //On récupère l'id de la publication que l'on viens d'inserer\n $reqIdPublication = 'SELECT LAST_INSERT_ID()'; \n $idPublications = $this->executerRequete($reqIdPublication);\n $idPublication = $idPublications->fetch()[0];\n $place = 1;\n\t\t\tforeach($auteurs as $auteur){\n //On verifie que l'auteur n'est pas déja présent dans la BDD\n //Si il ne l'est pas on l'ajoute\n if(!$this->verificationAuteurBase($auteur)){\n $this->ajouterChercheur($auteur);\n //On récupère l'ID de l'auteur que l'on viens d'inserer\n $reqIdAuteur = 'SELECT LAST_INSERT_ID()';\n $idAuteurs = $this->executerRequete($reqIdAuteur);\n $idAuteur = $idAuteurs->fetch()[0];\n }\n //Si il l'est on recupère son id\n else{\n $idAuteur = $this->verificationAuteurBase($auteur);\n }\n //On insère dans la table rédige les couples idAuteur/idPublication\n\t\t $reqInsRedige = 'INSERT INTO redige(Publication_id, Auteur_id, place) VALUES(?, ?, ?)'; \n\t\t\t $this->executerRequete($reqInsRedige, array($idPublication, $idAuteur, $place));\n $place++;\n\t\t\t}\n\t\t}", "function insert() {\n\t\t$sql = \"INSERT INTO lessons\n\t\t\t\tVALUES (?, ?, ?, ?, ?)\";\n\t\t\n\t\t$this->db->query($sql, array($this->lessons_id, $this->name, $this->date, $this->active, $this->rank));\n\t\t$this->last_insert_id = $this->db->insert_id();\t\t\n\t\t\n\t}", "final private function insertNewJuegos($id) {\n # Si hay juegos\n if(null != $this->juegos) {\n \n # Insertar de nuevo esas relaciones\n $juegos = $this->db->prepare(\"INSERT INTO nino_juego_2 (id_nino,id_juego)\n VALUES ('$id',?);\");\n foreach($this->juegos as $id_juego){\n $juegos->execute(array($id_juego));\n }\n $juegos->closeCursor();\n } \n }", "public function insertar($objeto){\r\n\t}", "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}", "function setAgregarUnPais(){\n\t\t$this->comienza_con++;\n\t}", "function ajoutProfSup($idProfesseur){\n\t$query='insert into professeursupport values (\"'.$idProfesseur.'\", LAST_INSERT_ID())';\n\tmysql_query($query) or die(' Erreur de linsertion a la base de données'.$query.mysql_error());\n}", "public function insertOpcSeleccRolAction() {\n $idRol = $this->getRequest()->get('reg');\n $idOpc = $this->getRequest()->get('opc');\n\n $rolDao = new RolDao($this->getDoctrine());\n $rolDao->insertOpcSeleccRol($idRol, $idOpc);\n return $this->opcionesAsignadasAction();\n }", "public function insertHorarios()\n {\n $atributos=array( $this->nombre , $this->aula );\n //descomentarear la l�nea siguiente y comentarear la anterior si la llave primaria no es autoincremental\n //$atributos=array( $this->codigo , $this->nombre , $this->aula );\n return $this->conexionHorarios->insertarRegistro($atributos);\n }", "function suppr_tache_dossier($id_dossier)\r\n{\r\n\tglobal $objet;\r\n\tif(droit_acces($objet[\"tache_dossier\"],$id_dossier)==3 && $id_dossier>1)\r\n\t{\r\n\t\t// on créé la liste des dossiers & on supprime chaque dossier\r\n\t\t$liste_dossiers_suppr = arborescence($objet[\"tache_dossier\"], $id_dossier, \"tous\");\r\n\t\tforeach($liste_dossiers_suppr as $infos_dossier)\r\n\t\t{\r\n\t\t\t// On supprime chaque tache du dossier puis le dossier en question\r\n\t\t\t$liste_taches = db_tableau(\"SELECT * FROM gt_tache WHERE id_dossier='\".$infos_dossier[\"id_dossier\"].\"'\");\r\n\t\t\tforeach($liste_taches as $infos_tache)\t\t{ suppr_tache($infos_tache[\"id_tache\"]); }\r\n\t\t\tsuppr_objet($objet[\"tache_dossier\"], $infos_dossier[\"id_dossier\"]);\r\n\t\t}\r\n\t}\r\n}", "function Forms_creer_donnee($id_form,$c = NULL, $rang=NULL){\n\tinclude_spip('inc/autoriser');\n\tif (!autoriser('creer','donnee',0,NULL,array('id_form'=>$id_form)))\n\t\treturn array(0,_L(\"droits insuffisants pour creer une donnee dans table $id_form\"));\n\tinclude_spip('inc/forms');\n\t$new = 0;\n\t$erreur = array();\n\tForms_enregistrer_reponse_formulaire($id_form, $new, $erreur, $reponse, '', '' , $c, $rang);\n\treturn array($new,$erreur);\n}", "function ADD()\n{\n\t$ctrl=$this->comprobar_atributos();\n\tif(!is_array($ctrl)){\n\t\t$sql = \"select * from ESPACIO where CODESPACIO = '\".$this->CODESPACIO.\"'\";\n\n\t\tif (!$result = $this->mysqli->query($sql)) //Error en la construcción de la sentencia SQL\n\t\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t\t}\n\n\t\tif ($result->num_rows == 1){ // existe el usuario\n\t\t\t\treturn 'Inserción fallida: el elemento ya existe';\n\t\t\t}\n\n\t\tif(!$this->verificar_existencia_edificio()){ // Compruebo si existe el Edificio donde se va a insertar el espacio\n\n\t\t\treturn \"Inserción fallida: no existe ese código de edificio\";\n\t\t}\n\n\t\tif(!$this->verificar_existencia_centro()){ // Compruebo si existe el centro donde se va a insertar el espacio\n\n\t\t\treturn \"Inserción fallida: no existe ese código de centro\";\n\t\t}\n\n\t\t$sql = \"INSERT INTO ESPACIO (\n\t\t\tCODESPACIO,\n\t\t\tCODEDIFICIO,\n\t\t\tCODCENTRO,\n\t\t\tTIPO,\n\t\t\tSUPERFICIEESPACIO,\n\t\t\tNUMINVENTARIOESPACIO) \n\t\t\t\tVALUES (\n\t\t\t\t\t'\".$this->CODESPACIO.\"',\n\t\t\t\t\t'\".$this->CODEDIFICIO.\"',\n\t\t\t\t\t'\".$this->CODCENTRO.\"',\n\t\t\t\t\t'\".$this->TIPO.\"',\n\t\t\t\t\t'\".$this->SUPERFICIEESPACIO.\"',\n\t\t\t\t\t'\".$this->NUMINVENTARIOESPACIO.\"'\n\t\t\t\t\t)\";\n\n\t\tif (!$this->mysqli->query($sql)) {\n\t\t\treturn 'Error de gestor de base de datos'; //Error en la construcción de la sentencia SQL\n\t\t}\n\t\telse{\n\t\t\treturn 'Inserción realizada con éxito'; //operacion de insertado correcta\n\t\t}\n\t\t}else{\n\t\t\treturn $ctrl;\n\t\t}\t\n}", "public function addCommande() {\n try {\n $pdo = PdoMedProjet::$conn;\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $isUser = $_SESSION['compte']->getId();\n $pdoStat = $pdo->prepare('INSERT INTO commande (id_user) VALUES (:id)');\n $pdoStat->bindParam(':id', $isUser, PDO::PARAM_INT);\n $pdoStat->execute();\n $idCom = $pdo->lastInsertId();\n foreach ($_SESSION['panier'] as $idMed => $qtx) {\n $pdoStat = $pdo->prepare('INSERT INTO commande_ligne (id_commande, id_media, qtx) VALUES (:idCom, :idMed, :qtx)');\n $pdoStat->bindParam(':idCom', $idCom, PDO::PARAM_INT);\n $pdoStat->bindParam(':idMed', $idMed, PDO::PARAM_INT);\n $pdoStat->bindParam(':qtx', $qtx, PDO::PARAM_INT);\n $pdoStat->execute();\n }\n return false;\n } catch (PDOException $erreur) {\n return $erreur->getMessage();\n }\n }", "function agregar($nombre, $ApellidoPaterno, $ApellidoMaterno, $idDepartamento, $idPuesto, $idTurno, $idNivelEstudios, $profesion, $sueldoMensual, $contrato, $fechaAlta, $fechaBaja, $idStatusEmpleado, $idPerfil, $correoElectronico, $contrasena, $telCelular, $telCasa, $rfc, $imss, $idCivil, $tipoSangre, $pesionAlimen, $nombreEmergencia, $telEmergencia, $calleNumero, $colonia, $delegacionMunicipio, $estado, $codigoPostal, $pais)\n {\n\n \t$insertDomicilio= array(\n \t\"calleNumero\" \t\t => $calleNumero,\n \t\"colonia\" => $colonia,\n \t\"delegacionMunicipio\" => $delegacionMunicipio,\n \t\"estado\" => $estado,\n \t\"codigoPostal\" => $codigoPostal,\n \t\"pais\"\t => $pais\n\n\n \t\t);\n\n \t//recibe el id de lo que se inserto en la tabla domicilio mediante el domiciliomodelo\n $idDomicilios = $this->domiciliomodelo->agregarDomicilio($insertDomicilio);\n\n\n $insert = array(\n \"nombre\" => $nombre, \n \"ApellidoPaterno\" => $ApellidoPaterno, \n \"ApellidoMaterno\" => $ApellidoMaterno, \n \"idDepartamento\" => $idDepartamento, \n \"idPuesto\" \t\t => $idPuesto, \n \"idTurno\"\t\t => $idTurno, \n \"idNivelEstudios\" => $idNivelEstudios, \n \"profesion\" => $profesion, \n \"sueldoMensual\" => $sueldoMensual, \n \"contrato\" => $contrato, \n \"fechaAlta\" => $fechaAlta, \n \"fechaBaja\" => $fechaBaja, \n \"idStatusEmpleado\" => $idStatusEmpleado, \n \"idPerfil\" => $idPerfil, \n \"correoElectronico\" => $correoElectronico, \n \"contrasena\" => $contrasena, \n \"idDomicilios\" => $idDomicilios, \n \"telCelular\" => $telCelular,\n \"telCasa\" => $telCasa,\n \"rfc\" => $rfc,\n \"imss\" => $imss,\n \"idCivil\" => $idCivil,\n \"tipoSangre\" => $tipoSangre,\n \"pesionAlimen\" => $pesionAlimen,\n \"nombreEmergencia\" => $nombreEmergencia,\n \"telEmergencia\" => $telEmergencia\n\n\n );\n\n\t\t\n\n\n\n \t$this->db->insert('empleados', $insert);\n \treturn $this->db->trans_status();\n\n \n }", "function generiereTanListe() {\n $arTanVergeben = array();\n $arTanListe = array();\n //DB-Zugangsdaten\n $servername = \"\";\n $username = \"\";\n $dbname = \"\";\n $passwort = \"\";\n // die variable $dbport wird in meinem Fall benötigt da ich in der IDE Cloud9 \n // arbeite und nur so Zugriff auf die SQL-Datenbank bekam.\n //$dbport = \"\";\n // in der Datenbank wird die Tabelle \"tanliste\" abgefragt nach folgendem Aufbau\n // \"CREATE TABLE tanliste (id int NOT NULL AUTO_INCREMENT, tan varchar(6), verwendet tinyint, PRIMARY KEY(id));\"\n $tblname = \"tanliste\";\n // Spalte \"verwendet\" zur späteren Nutzung\n $verwendet = null;\n // verwendung der $dbport\n $con = mysqli_connect($servername, $username, $passwort, $dbname/*, $dbport*/);\n if ($con->connect_error) {\n die(\"Verbindung fehlgeschlagen: \" . $con->connect_error);\n }\n // Die Liste der verwendeten TAN's wird abgerufen\n $sql = \"SELECT * FROM \" . $tblname . \";\";\n $result = $con->query($sql);\n // Überprüfung ob bereits TAN's erzeugt wurden. Falls welche gefunden wurden\n // startet die Erzeugung mit überprüfung auf Einmaligkeit\n if ($result->num_rows > 0) {\n while ($row = $result->fetch_assoc()) {\n array_push($arTanVergeben, $row[\"tan\"]);\n }\n $countTanDB = $result->num_rows;\n $tanVergeben = false;\n $anzTan = 0;\n $nextTan = \"\";\n echo \"<table><thead><tr><th>PositionsNr.</th><th>TAN</th></tr></thead><tbody>\";\n for ($i = 0; $anzTan < 50; $i++) {\n // eine neue TAN wird erzeugt\n $nextTan = generiereTan();\n for ($j = 0; $j < $countTanDB; $j++) {\n // und mit den existierenden verglichen\n if ($nextTan === $arTanVergeben[$j]) {\n $tanVergeben = true;\n }\n }\n // wenn die generierte TAN einmalig ist wird sie in die Datenbank geschrieben\n // und in der Tabelle angezeigt\n if ($tanvergeben == false) {\n // der Zähler $anzTan zählt bis 50 neue TAN's erzeugt wurden\n $anzTan++;\n $stmt = $con->prepare(\"INSERT INTO \" . $tblname . \" (tan, verwendet) VALUES (?, ?)\");\n $stmt->bind_param(\"ss\", $nextTan, $verwendet);\n $stmt->execute();\n echo \"<tr><td>\" . ($anzTan+$countTanDB) . \"</td><td>\" . $nextTan . \"</td></tr>\";\n }\n }\n echo \"</tbody></table>\";\n } else {\n // Der else - Zweig wird durchlaufen wenn die Datenbank keine Einträge beinhaltet\n echo \"<table><thead><tr><th>PositionsNr.</th><th>TAN</th></tr></thead><tbody>\";\n for ($i = 0; $i < 50; $i++) {\n $temp = generiereTan();\n echo \"<tr><td>\" . ($i+1) . \"</td><td>\" . $temp . \"</td></tr>\";\n $stmt = $con->prepare(\"INSERT INTO \" . $tblname . \" (tan, verwendet) VALUES (?, ?)\");\n $stmt->bind_param(\"ss\", $temp, $verwendet);\n $stmt->execute();\n }\n echo \"</tbody></table>\";\n }\n }", "public function insertar($idordencompra, $nrofactura, $idproveedor, $idpersonal, $idsucursal, $idformapago, $idtipodoc, $iddeposito, \n $fecha_hora, $obs, $monto_compra, $idmercaderia, $cantidad, $precio, $total_exenta, $total_iva5, $total_iva10, $liq_iva5, $liq_iva10, $cuota){\n\n $sql = \"INSERT INTO compras (idordencompra, nrofactura, idproveedor, idpersonal, idsucursal, idformapago, idtipodocumento, iddeposito, fecha, obs, monto, cuotas, estado) \n VALUES ('$idordencompra', '$nrofactura', '$idproveedor', '$idpersonal', '$idsucursal', '$idformapago', '$idtipodoc', '$iddeposito', '$fecha_hora', '$obs', '$monto_compra', '$cuota', '1')\";\n \n $idcompranew = ejecutarConsulta_retornarID($sql);\n\n $num_elementos=0;\n $sw=true;\n\n while($num_elementos < count($idmercaderia)){\n\n $sql_detalle = \"INSERT INTO compras_detalle (idcompra, idmercaderia, cantidad, precio) \n VALUES ('$idcompranew', '$idmercaderia[$num_elementos]', '$cantidad[$num_elementos]', '$precio[$num_elementos]')\";\n ejecutarConsulta($sql_detalle) or $sw = false;\n\n $num_elementos =$num_elementos + 1;\n }\n\n //aca realimazamos la insercion en la tabla libro compras\n\n $sql2 = \"INSERT INTO libro_compras (idcompra, idproveedor, fecha, montoexenta, montoiva5, montoiva10, grabiva5, grabiva10, montopagado) \n VALUES ('$idcompranew', '$idproveedor', '$fecha_hora', '$total_exenta', '$total_iva5', '$total_iva10', '$liq_iva5', '$liq_iva10', '$monto_compra')\";\n\n ejecutarConsulta($sql2);\n\n //aca realizamos la insercion en la tabla cuentas a pagar \n\n if($idformapago == 1){\n $formaPago = 'CONTADO';\n }else{\n $formaPago = 'CREDITO';\n }\n\n $monto_cuota = $monto_compra / $cuota;\n\n $fecha = strtotime($fecha_hora);\n $fecha = date('Y-m-d H:i:s', $fecha);\n $cont = 0;\n\n for ($i=1; $i <= $cuota ; $i++) { \n\n if($i >= 2){\n $cont = $cont + 1;\n $fecha = date(\"Y-m-d H:i:s\", strtotime($fecha_hora. \"+ {$cont} month\"));\n }\n\n if($cuota == 1){\n $concepto = \"Cuota Nro. \". $i .\"/\". $cuota .\" \". $formaPago;\n }else{\n $concepto = \"Cuota Nro. \". $i .\"/\". $cuota .\" \". $formaPago .\" \". $cuota .\" MESES\";\n }\n\n $sql3 = \"INSERT INTO cuentas_a_pagar (idcompra, idproveedor, nrofactura, idnotacredidebi, totalcuota, nrocuota, montocuota, fechavto, obs, estado) \n VALUES ('$idcompranew', '$idproveedor', '$nrofactura', '0', '$cuota', '$i', '$monto_cuota', '$fecha','$concepto', '1')\";\n\n ejecutarConsulta($sql3);\n\n }\n\n $sql4 = \"UPDATE orden_compras SET estado = '2' WHERE idordencompra = '$idordencompra'\";\n ejecutarConsulta($sql4);\n\n return $sw;\n\n }", "function ajout_panier($id_article, $quantite, $prix, $titre) {\n\t// si un article existe déjà dans le panier on ne change que sa quantité sinon on le rajoute\n\n\t// on verifie si l'id_article est déjà présent dans le sous tableau $_SESSION panier id article\n\t// array search() cherche une info dans les valeurs d'un tableau ARRAY et nous renvoie son indic, ensuite grave à l'indice on modifiera la quantité\n\t$position_article = array_search($id_article, $_SESSION['panier']['id_article']);\n\n\tif($position_article !== false) {\n\t\t$_SESSION['panier']['quantite'][$position_article] += $quantite;\n\t} else {\n\t\t$_SESSION['panier']['id_article'][] = $id_article;\n\t\t$_SESSION['panier']['quantite'][] = $quantite;\n\t\t$_SESSION['panier']['prix'][] = $prix;\n\t\t$_SESSION['panier']['titre'][] = $titre;\n\t}\n}", "function obtenirIdNomGroupesAHeberger ($connexion) {\r\n\r\n $req = \"SELECT id, nom FROM Groupe WHERE hebergement='O' ORDER BY id\";\r\n $stmt = $connexion -> prepare ($req);\r\n $stmt -> execute ();\r\n return $stmt;\r\n\r\n }", "public function insert($fisicasuelo);", "function createIngrediente($preco,$qtd_disponivel,$nome){\n if( $this->getIngredienteID($nome)){\n return false;\n }\n\n $query = \"INSERT INTO $this->ingrediente\n ($this->preco, $this->qtd_disponivel, $this->nome)\n values ('$preco', '$qtd_disponivel', '$nome')\";\n\n //Insert ingrediente into database\n if ( $this->dataBase->executeQuery($query) )\n //Fetch ingrediente id from tamanho\n $this->setingredienteID ($nome);\n else\n return false;\n\n return $this->id; // success\n }", "public function insert(registroEquipo $reEquipo);", "function addLista($varNome,$varDescricao){\r\n\t$sql = mysql_query(\"Insert into lista (`nomeLista`,`descLista`, `dtcadLista`, `idUsuario`) values ('$varNome','$varDescricao',NOW(),'$_SESSION[idUsuario]')\") or die (mysql_error());\r\n\treturn $sql;\r\n}", "function EnregistrerNouvelleCategorie($nom) {\n global $mysql;\n $nom = $mysql->quote($nom);\n $requete = \"INSERT INTO \" . DB_PREFIX . \"CATEGORIES (NOM) values($nom)\";\n requete ( $requete );\n}", "public function insertar($pidnomeav, $pnombre, $ptipo, $plongitud, $pnombre_mostrar, $pregex, $visible, $tipocampo, $descripcion)\r\n {\r\n\r\n $this->Instancia();\r\n\r\n //-- verificar que no se repita el campo en la tabla\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n\r\n $result = $query->from('NomCampoestruc ')\r\n ->where(\"idnomeav='$pidnomeav' AND nombre='$pnombre'\")\r\n ->execute()->count();\r\n if ($result > 0)\r\n return false;\r\n\r\n //-- buscar el id del proximo campo\r\n $idCampoNuevo = $this->buscaridproximo();\r\n\r\n //-- insertar los valores\r\n $this->instance->idcampo = $idCampoNuevo;\r\n $this->instance->idnomeav = $pidnomeav;\r\n $this->instance->nombre = $pnombre;\r\n $this->instance->tipo = $ptipo;\r\n $this->instance->longitud = $plongitud;\r\n $this->instance->nombre_mostrar = $pnombre_mostrar;\r\n $this->instance->regex = $pregex;\r\n $this->instance->visible = $visible;\r\n $this->instance->tipocampo = $tipocampo;\r\n $this->instance->descripcion = $descripcion;\r\n\r\n try {\r\n $this->instance->save();\r\n return $idCampoNuevo;\r\n } catch (Doctrine_Exception $ee) {\r\n if (DEBUG_ERP)\r\n echo(__FILE__ . ' ' . __LINE__ . ' ' . $ee->getMessage());\r\n return false;\r\n }\r\n }", "public static function insert()\n {\n }", "function EmpresaInsert($Nombre) {\r\n\tglobal $Cfg;\r\n\r\n\t$sql = \"insert $Cfg[SqlPrefix]empresas set\r\n\t\tNombre = '$Nombre'\";\r\n\r\n\tDbExecuteUpdate($sql);\r\n\r\n\treturn DbLastId();\r\n}", "function inserts()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['inserts'] == 1 ) ? 'Database Row' : 'Database Rows';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'inserted';\n\t\t\n\t\tforeach ( $this->xml_array['inserts_group']['insert'] as $k => $v )\n\t\t{\n\t\t\tif ( !$this->ipsclass->input['un'] )\n\t\t\t{\n\t\t\t\tunset( $f );\n\t\t\t\t\n\t\t\t\tforeach ( $v['fields'] as $kk => $vv )\n\t\t\t\t{\n\t\t\t\t\tif ( strtolower( $kk ) == 'value' )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$f[ $kk ] = $vv['VALUE'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => $v['table']['VALUE'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => $v['delete_key']['VALUE'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\t\t);\n\t\t\t\t\n\t\t\t\tif ( !$this->ipsclass->DB->get_num_rows() )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->DB->do_insert( $v['table']['VALUE'], $f );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( in_array( SQL_PREFIX.$v['table']['VALUE'], $this->ipsclass->DB->get_table_names() ) )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->DB->do_delete( $v['table']['VALUE'], $v['delete_key']['VALUE'] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['inserts']} {$object} {$operation}....\" );\n\t}", "function ler($nome) {\n $x = 1;\n\t while($x < $this->bd[0][0] && !$this->str_igual($nome, $this->bd[$x][2])) {$x++;}\n if($x >= $this->bd[0][0]) {return 0;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\nreturn 1;\n }", "function insertarInformado(&$l, &$var) {\r\n if ($l[15] == null || $l[15] == '') {\r\n $l[15] = 0;\r\n }\r\n\r\n $SQL = \"insert into facturacion.informados (idrecepcion, cuie, idprestacion, clavebeneficiario,\r\n codnomenclador, tipodoc, nrodoc, nombre, apellido, fechanac, fechaactual, idvacuna,\r\n idtaller, km, origen, destino, clavemadre, sexo, municipio, semgesta, discapacitado, clasedoc)\r\n values (\" . $var['recepcion_id'] . \", '\" . $l[1] . \"', \" . $l[4] . \", '\" . $l[5] . \"', '\" .\r\n str_replace(' - ', ' ', $l[12]) . \"', '\" . $l[7] . \"', '\" . $l[8] . \"', '\" . $l[10] . \"', '\" . $l[9] .\r\n \"', '\" . Fecha_db($l[11], ' 1899-12-31') . \"', '\" . Fecha_db($l[13], ' 1899-12-31') .\r\n \"', \" . $var['idvacuna'] . \", \" . $l[15] . \", \" . $l[15] . \", '\" . $l[16] .\r\n \"', '\" . $l[17] . \"', '\" . $l[18] . \"', '\" . $l[65] . \"', \" . $l[66] . \", \" . $l[53] .\r\n \", '\" . $l[69] . \"', '\" . $l[6] . \"' ) \";\r\n\r\n sql($SQL, 'Error al insertar informado', 0) or excepcion('Error al insertar informado');\r\n}", "public function insert_inmueble($dni,$n_inmu,$t_inmu,$dist,$direc,$num,$superf,$habit,$banio,$cochera,$descrip,$precio,$url,$tipo_oper,$name_t_cont,$contrato,$tipos){\n\t\t\t $sql=\"CALL spRegistrarInmueble(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\t\t\t\t$rs=$this->con->prepare($sql);\n\t\t\t\t$rs->execute(array($dni,$n_inmu,$t_inmu,$dist,$direc,$num,$superf,$habit,$banio,$cochera,$descrip,$precio,$url,$tipo_oper,$name_t_cont,$contrato,$tipos));\n\t\t}" ]
[ "0.629776", "0.61910576", "0.61883736", "0.60474074", "0.60258764", "0.60148036", "0.6001288", "0.599653", "0.59504265", "0.58946997", "0.58923197", "0.58870035", "0.5873187", "0.58323646", "0.579603", "0.5775742", "0.5766434", "0.5766429", "0.574951", "0.5749123", "0.5745884", "0.5736466", "0.57167596", "0.5713224", "0.5711799", "0.57078147", "0.5707408", "0.569544", "0.569544", "0.5695377", "0.56748337", "0.5650949", "0.56496173", "0.5649069", "0.56442904", "0.5643813", "0.5641369", "0.56268185", "0.5616807", "0.56077445", "0.56055784", "0.559668", "0.5590253", "0.5589318", "0.5587229", "0.5577046", "0.55762076", "0.5572256", "0.5572174", "0.5553705", "0.5542845", "0.55390775", "0.5535883", "0.5535702", "0.55350024", "0.5531634", "0.55266494", "0.5520928", "0.55142224", "0.550473", "0.5503858", "0.54924554", "0.54893565", "0.548684", "0.5486057", "0.54799676", "0.54738194", "0.54705775", "0.5469492", "0.54639447", "0.54526466", "0.54502136", "0.54426813", "0.5441486", "0.5435765", "0.54260767", "0.5422403", "0.54158396", "0.54120755", "0.5404687", "0.5404229", "0.54029083", "0.5399988", "0.5396697", "0.53951263", "0.5387196", "0.53862387", "0.53853196", "0.5384891", "0.5383777", "0.5383508", "0.53767544", "0.5374941", "0.537203", "0.53709954", "0.53697765", "0.5367963", "0.5364324", "0.5360061", "0.535283", "0.53517747" ]
0.0
-1
Exercice 12 Cryptogramme Cesear ()
function char_rot($n,$c) { $code = ord($c); // on ne traite pas cette plage de code dans la table ASCII if($code < 64 || $code > 91) return; if($code > 96 && $code < 123) { $num = ( ($code - 97 + $n) % 26 ) + 97 ; // translation à 0 puis redécallage à 97 pour se positionner sur les majuscules } if($code > 64 && $code < 91){ $num = ( ($code - 65 + $n) % 26 ) + 65 ; } return chr($num); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Caesar_cipher($huruf, $key)\n{\n $huruf = ctype_alpha($huruf)? $huruf : die('Inputan salah!');\n\n //ubah inputan kedalam uppercase\n $huruf = strtoupper($huruf);\n\n // periksa nomor ascii nya\n $ascii = ord($huruf);\n\n // tambahkan key nya / geser ke nomor ascii yang baru\n $ascii_baru = $ascii + $key;\n\n // periksa jika nomor ascii sudah sampai alphabet terakhir\n // kembalikan ke alphabet awal\n $ascii_baru = $ascii_baru > 90 ? $ascii_baru - 26 : $ascii_baru;\n $ascii_baru = $ascii_baru < 65 ? $ascii_baru + 26 : $ascii_baru;\n\n // tampilkan huruf baru yang sudah digeser\n $huruf_baru = chr($ascii_baru);\n return ($huruf_baru);\n\n}", "private function _generar_clave(){\n\n $letras = \"abcdefghijklmnopqrstuvwxyz\";\n $clave = \"\";\n\n for ($i=0;$i<4;$i++) {\n $clave .= substr($letras,rand(1,strlen($letras)),1);\n }\n for ($i=0;$i<4;$i++) {\n $numero = rand(0,9);\n $clave .= $numero;\n }\n\n return $clave;\n }", "function Crypter($clave){\n $this->key = $clave;\n }", "function Comprobar_codcentro()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->CODCENTRO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->CODCENTRO)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->CODCENTRO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODCENTRO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "public function traerCualquiera()\n {\n }", "public function NIVEL_ED(){\n $ch12 = $this->caracteristicas->CH12;\n $ch13 = $this->caracteristicas->CH13;\n $ch10 = $this->caracteristicas->CH10;\n if($ch10 == 3)\n {\n return 0;\n }\n if ($ch12 == 1 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 2 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 3 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 4 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 5 && $ch13 == 2) {\n return 1;\n }\n if ($ch12 == 6 && $ch13 == 2) {\n return 1;\n }\n //\n if ($ch12 == 5 && $ch13 == 1) {\n return 2;\n }\n if ($ch12 == 6 && $ch13 == 1) {\n return 2;\n }\n //\n if ($ch12 == 7 && $ch13 == 2) {\n return 3;\n }\n if ($ch12 == 8 && $ch13 == 2) {\n return 3;\n }\n if ($ch12 == 9 && $ch13 == 2) {\n return 3;\n }\n if ($ch12 == 10 && $ch13 == 2) {\n return 3;\n }\n //\n if ($ch12 == 7 && $ch13 == 1) {\n return 4;\n }\n if ($ch12 == 8 && $ch13 == 1) {\n return 4;\n }\n if ($ch12 == 9 && $ch13 == 1) {\n return 4;\n }\n if ($ch12 == 10 && $ch13 == 1) {\n return 4;\n }\n //\n if ($ch12 == 11 && $ch13 == 2) {\n return 5;\n }\n if ($ch12 == 12 && $ch13 == 2) {\n return 5;\n }\n //\n if ($ch12 == 11 && $ch13 == 1) {\n return 6;\n }\n if ($ch12 == 12 && $ch13 == 1) {\n return 6;\n }\n //\n if ($ch12 == 13 && $ch13 == 2) {\n return 7;\n }\n if ($ch12 == 13 && $ch13 == 1) {\n return 8;\n }\n if ($ch13 == 9 || $ch13 == 0) {\n return 9;\n }\n }", "function php02($n_caracteres_crypt,$coord,$dato_crypt){\n\t$n_caracteres = strlen($dato_crypt);\n\t$texto_crypt = php01($n_caracteres_crypt);\n\t$texto_n = '';\n\tfor($i = 0; $i < strlen($texto_crypt); $i++){\n\t\twhile ( $i == $coord){\n\t\t\tfor($j = 0; $j < strlen($dato_crypt); $j++){\n\t\t\t\t$texto_n = $texto_n . $dato_crypt[$j];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t$texto_n = $texto_n . $texto_crypt[$i];\n\t}\n\treturn $texto_n;\n}", "public function generaClave()\n {\n do {\n $clave = '';\n for ($i = 0; $i < 3; $i++) {\n $clave .= strtoupper(substr(uniqid(), -5));\n $clave .= $i != 2 ? '-' : '';\n }\n } while (!$this->claveValida($clave) && !$this->claveUnica($clave));\n \n return $clave;\n }", "public function testCsch()\n {\n $csch = Trigonometry::csch(1.5);\n $this->assertEquals(0.46964244059522, $csch, '', 1E-8);\n }", "function encodeCaesar($cleartext, $key){\n\t$ciphertext='';\n\tfor($i=0; $i<strlen($cleartext); $i++){\n\t\t$c=substr($cleartext, $i, 1);\n\t\t$encodedchar=chr(ord($c)+$key);\n\t\t$ciphertext.=$encodedchar;\n\t}\n\treturn $ciphertext;\n}", "public function calcula13o()\n {\n }", "public function calcula13o()\n {\n }", "function caesarCypher($json_cifrado)\n{\n $passo = $json_cifrado[\"numero_casas\"];\n $cifra = strtolower($json_cifrado[\"cifrado\"]);\n $json_cifrado[\"decifrado\"] = \"\";\n $json_cifrado[\"resumo_criptografico\"] = \"\";\n\n for ($i = 0; $i < strlen($cifra); $i++) {\n $ascii_char = ord($cifra[$i]);\n\n if ($ascii_char < 0 || $ascii_char > 127) {\n echo \"Caracter invalido ou nao disponivel na tabela ASCII\";\n } else if ($ascii_char < 97 || $ascii_char > 122) {\n $json_cifrado[\"decifrado\"] .= chr($ascii_char);\n } else if ($ascii_char - $passo < 97) {\n $novo_passo = $passo - ($ascii_char - 97) - 1;\n $json_cifrado[\"decifrado\"] .= chr(122 - $novo_passo);\n } else {\n $json_cifrado[\"decifrado\"] .= chr($ascii_char - $passo);\n }\n }\n\n $json_cifrado[\"resumo_criptografico\"] = sha1($json_cifrado[\"decifrado\"]);\n $resposta = json_encode($json_cifrado);\n return $resposta;\n}", "function vegerne_cipher($str,$str_passwd)\n{ \n \n if(preg_match(\"/[^a-zA-Z]/\", $str_passwd))\n {\n return null;\n }\n else\n {\n $str_password=strtolower($str_passwd);\n $pass_arr=array();\n $pass_arr_num=array();\n $alpha=array('a'=>'1','b'=>'2','c'=>'3','d'=>'4','e'=>'5','f'=>'6','g'=>'7','h'=>'8','i'=>'9','j'=>'10','k'=>'11','l'=>'12','m'=>'13','n'=>'14','o'=>'15','p'=>'16','q'=>'17','r'=>'18','s'=>'19','t'=>'20','u'=>'21','v'=>'22','w'=>'23','x'=>'24','y'=>'25','z'=>'26');\n $one_str_pass=strlen($str_password)-1;\n $one_str=strlen($str)-1;\n $alpha_num=array_keys($alpha);\n $match_num=array(); \n $nums=array_flip($alpha); \n $encoded=array();\n $string=strtolower($str);\n if(is_array($string)==true)\n {\n throw new Exception(\"Can't use array as string\"); \n }\n if(strlen($str_password)>0)\n {\n for ($b=0; $b <strlen($str) ; $b++) \n { \n \t $p=$b;\n \tif($p>$str_password)\n \t{\n $p=$b%strlen($str_password);\n \n }\n\n $pass_arr[$b]=$str_password[$p];\t\n $pass_arr_num[$b]=$alpha[$pass_arr[$b]];\n }\n \n for ($i=0; $i <count($pass_arr_num) ; $i++)\n { \n for ($j=0; $j <26 ; $j++)\n {\n $match=preg_match(\"/\".$alpha_num[$j].\"/\",$string[$i]);\n if($match==1)\n {\n \n $match_num[$i]=$alpha[$alpha_num[$j]];\n $match_num[$i]+=$pass_arr_num[$i];\n if($match_num[$i]>26)\n {\n $match_num[$i]=$match_num[$i]-26;\n }\n $encoded[$i]=$nums[$match_num[$i]];\n\n }\n \n \n\n } \n $matchtwo=preg_match('/[^a-z]/',$string[$i]);\n if($matchtwo==1)\n {\n \n $encoded[$i]=$string[$i];\n }\n\n } \n \n }\n $enc=implode(\"\",$encoded);\n return $enc;\n } \n}", "public function ccm();", "public function cortar() {\n $mitadInf = [];\n $mitadSup = [];\n $mitad = count($this->cajita) / 2;\n for ($i = 0; $i < $mitad; $i++)\n $mitadInf[$i] = $this->cajita[$i];\n for ($i = 0; $mitad < count($this->cajita); $i++, $mitad++)\n $mitadSup[$i] = $this->cajita[$mitad];\n $this->cajita = array_merge($mitadSup, $mitadInf);\n return TRUE;\n }", "function Code128($x, $y, $code, $w, $h) {\n $Aguid = \"\"; // Création des guides de choix ABC\n $Bguid = \"\";\n $Cguid = \"\";\n for ($i = 0; $i < strlen($code); $i++) {\n $needle = substr($code, $i, 1);\n $Aguid .= ((strpos($this->Aset, $needle) === false) ? \"N\" : \"O\");\n $Bguid .= ((strpos($this->Bset, $needle) === false) ? \"N\" : \"O\");\n $Cguid .= ((strpos($this->Cset, $needle) === false) ? \"N\" : \"O\");\n }\n\n $SminiC = \"OOOO\";\n $IminiC = 4;\n\n $crypt = \"\";\n while ($code > \"\") {\n // BOUCLE PRINCIPALE DE CODAGE\n $i = strpos($Cguid, $SminiC); // forçage du jeu C, si possible\n if ($i !== false) {\n $Aguid [$i] = \"N\";\n $Bguid [$i] = \"N\";\n }\n\n if (substr($Cguid, 0, $IminiC) == $SminiC) { // jeu C\n $crypt .= chr(($crypt > \"\") ? $this->JSwap[\"C\"] : $this->JStart[\"C\"]); // début Cstart, sinon Cswap\n $made = strpos($Cguid, \"N\"); // étendu du set C\n if ($made === false) {\n $made = strlen($Cguid);\n }\n if (fmod($made, 2) == 1) {\n $made--; // seulement un nombre pair\n }\n for ($i = 0; $i < $made; $i += 2) {\n $crypt .= chr(strval(substr($code, $i, 2))); // conversion 2 par 2\n }\n $jeu = \"C\";\n } else {\n $madeA = strpos($Aguid, \"N\"); // étendu du set A\n if ($madeA === false) {\n $madeA = strlen($Aguid);\n }\n $madeB = strpos($Bguid, \"N\"); // étendu du set B\n if ($madeB === false) {\n $madeB = strlen($Bguid);\n }\n $made = (($madeA < $madeB) ? $madeB : $madeA ); // étendu traitée\n $jeu = (($madeA < $madeB) ? \"B\" : \"A\" ); // Jeu en cours\n\n $crypt .= chr(($crypt > \"\") ? $this->JSwap[$jeu] : $this->JStart[$jeu]); // début start, sinon swap\n\n $crypt .= strtr(substr($code, 0, $made), $this->SetFrom[$jeu], $this->SetTo[$jeu]); // conversion selon jeu\n }\n $code = substr($code, $made); // raccourcir légende et guides de la zone traitée\n $Aguid = substr($Aguid, $made);\n $Bguid = substr($Bguid, $made);\n $Cguid = substr($Cguid, $made);\n } // FIN BOUCLE PRINCIPALE\n\n $check = ord($crypt[0]); // calcul de la somme de contrôle\n for ($i = 0; $i < strlen($crypt); $i++) {\n $check += (ord($crypt[$i]) * $i);\n }\n $check %= 103;\n\n $crypt .= chr($check) . chr(106) . chr(107); // Chaine cryptée complète\n\n $i = (strlen($crypt) * 11) - 8; // calcul de la largeur du module\n $modul = $w / $i;\n\n for ($i = 0; $i < strlen($crypt); $i++) { // BOUCLE D'IMPRESSION\n $c = $this->T128[ord($crypt[$i])];\n for ($j = 0; $j < count($c); $j++) {\n $this->Rect($x, $y, $c[$j] * $modul, $h, \"F\");\n $x += ($c[$j++] + $c[$j]) * $modul;\n }\n }\n }", "function crypter($maCleDeCryptage, $maChaineACrypter){\n\t\t$maCleDeCryptage = md5($maCleDeCryptage);\n\t\t$letter = -1;\n\t\t$newstr = '';\n\t\t$strlen = strlen($maChaineACrypter);\n\t\tfor($i = 0; $i < $strlen; $i++ ){\n\t\t\t$letter++;\n\t\t\tif ( $letter > 31 ){\n\t\t\t\t$letter = 0;\n\t\t\t}\n\t\t\t$neword = ord($maChaineACrypter{$i}) + ord($maCleDeCryptage{$letter});\n\t\t\tif ( $neword > 255 ){\n\t\t\t\t$neword -= 256;\n\t\t\t}\n\t\t\t$newstr .= chr($neword);\n\t\t}\n\t\treturn base64_encode($newstr);\n\t}", "function decodeCaesar($hash)\n{\n $values = array();\n\n $letter = array(\n 'a',\n 'b',\n 'c',\n 'd',\n 'e',\n 'f',\n 'g',\n 'h',\n 'i',\n 'j',\n 'k',\n 'l',\n 'm',\n 'n',\n 'o',\n 'p',\n 'q',\n 'r',\n 's',\n 't',\n 'u',\n 'v',\n 'w',\n 'x',\n 'y',\n 'z',\n 'å',\n 'ä',\n 'ö'\n );\n\n $validationStrings = array(\n ' on ',\n ' ja ',\n ' ei ',\n ' tai ',\n ' hän ',\n ' ehkä ',\n ' mitä ',\n ' sinä ',\n ' minä ',\n ' te ',\n );\n\n $stringArray = explode(\" \", \"erotuksena muunlaisista asumuksista kuten kodasta tai majasta talo on tarkoittanut suoraseinäistä jykevämpää rakennusta jonka seinät ovat yleensä hirsiset saanut nimensä talaasta eräisiin muinaisiin taloihin kuuluneesta pylväiden päässä olevasta lavasta jolla esimerkiksi kuivattu heinäälähde vanhimmat rakennukset olivat ilmeisesti kotia kuitenkin jo kivikaudella suomessa tehty myös isokokoisia rakennuksia hirsisalvostekniikan avulla oli osittain tuettu maa aineksella kaivettu maan sisään talot jopa kymmeniä metrejä pitkiä rivitalomaisia usean perheen yhden sukuklaanin asumuksia perinne väliin katkennut vuoksi siirryttiin käyttämään kotaa ja uutta tulokasta majaa uudelleen hirsitalot tulivat käyttöön metallikausillaselvennä talon uuden tulemisen jälkeen käytetty enää tilapäisasumuksena puolestaan keittopaikkana jossa ruokaa erityisesti kesällätalot pitkään maalattiaisia voineet olla esim hirttä lautaa turvetta savea vanhimmissa taloissa ollut joko nuotiopaikka keskellä lattiaa ruoka valmistettu erillisessä keittokodassa uunit savupiiput yleistyivät vasta keskiajallatalo sanan käyttö jossain vaiheessa laajentunut tarkoittamaan kokonaista maatilaa kaikkine rakennuksineen talonomistajan omistamaa kaikkea alaa termi talollinen kuvastaa maatilan omistusta ei asumuksen tyyppiä torpparin taloa kutsutaan torpaksi sillä kertoo henkilön asuvan vuokramaalla mäkitupalaisen mäkitupa vaikkei se välttämättä mitenkään eronnut vaatimattoman talollisen asumuksesta talosta työnsä ohella von kleist harrasti luonnontieteellisiä kokeita keksi vuonna 1745 kleistin pullon ensimmäisen sähköä varastoivan laitteen huomatessaan tehoalisäävän toiminnan leidenissä kokeellisen fysiikan professori pieter van musschenbroek vähän myöhemmin saman ilmiön omin neuvoin hänen julkistettuaan sen tämä ensimmäinen kondensaattori tuli tunnetuksi nimellä leidenin pullo vaikka olikin varhainen keksijä hän julkistanut laitettaan ajoissa eikä sitten kehittänyt sitä eteenpäin niin että nykyajan tutkijat antavat suurimman kunnian kondensaattorin alkuvuosien kehitystyöstä musschenbroekille elokuva sai parhaan elokuvan oscar palkinnon silloisen tarinan oscarin joka yhdistettiin alkuperäisen käsikirjoituksen palkintoon varsinkin valintaa arvosteltu ehdolla klassikoksi noussut sheriffi epäsi graafisen suunnittelun opiskelupaikan kuulovammaiselta opiskelijalta opiskelija jätti kokonaan kertomatta koululle erityistarpeistaan viittomakielen tulkin otettua yhteyttä kouluun alle viikkoa ennen opintojen alkua koulu ilmoitti ettei ole yksityisenä kouluna resursseja valmistautua syntymäkuuron opiskelijan erityistarpeisiin lyhyellä varoitusajalla kela suosittelee opiskelutulkin tilaamista hyvissä ajoin joululahja kääritty joulupaperiin koristavat kauniit lahjanauhat narut lahjapaketissa voi sinetti lahjansaajan nimi hyvän joulun toivotus sekä lahjan antajan lapsille uskotellaan tuhmille joulupukki tuo lahjoja vaan risuja suomalaisessa kultturissa joululahjoja jaetaan pikkujouluperinteessä osallistujat ostavat sovitun hintaisen tavaran lahjaksi lahjat satunnaisesti pikkujouluihin osallistuville ihmisille toisinaan lahjansaajat etukäteen arvottu antaja tietää kenelle hankkii kaksi tapaa lahjojen jakoon useimmiten tulee taloon oveen koputtaen keskustelee joskus kanssa ottaa kontistaan kerrallaan katsoo saajan nimen nimeltä kutsuen ojentaa saajalle perheenjäsen pukin mukana kulkeva tonttu avustaa joulupukkia jaossa toisen tavan mukaan asetetaan kuusen joulupukin sanotaan käyneen välin kun perhe muualla työllä tarkoitetaan jonkin tehtävän suorittamiseen tähtäävää pitkäjännitteistä aktiivista tavoitteellista toimintaa liittyy tyypillisesti toimeentulon hankkimiseen ansiotyö yksilön omien taikka lähipiirinsä aineellisten tarpeiden tyydyttämiseen kotityö Muunlaista työtä vapaaehtoistyöksi työn ensisijaisena motiivina rentoutuminen saattaa laita käsitöissä puutarhanhoidossa jako ruumiilliseen henkiseen työhön määrin harhaanjohtava koska lähes kaikessa työssä olennaisena edellytyksenä älykkyys kokemuksen opettamat seikat asumiseen toimisto liike muuhun vastaavaan tarkoitettu rakennus politiikan alaan sisällytetään oikeusvaltiossa lähinnä lainsäädännön muuttamiseen julkisen hallinnon ohjaamiseen tähtäävä toiminta poliittisen vastakohtana perinteisesti nähty yksityinen eli katsota liittyvän muihin yksilöihin kreikan kielessä merkitsi taloutta sana oikos josta sittemmin johdettu ekonomia taloustiede iskulause henkilökohtainen poliittista 1960 luvulla kaikkia yksilöiden välisiä suhteita koskevia asioita pitäisi tuoda valtapolitiikan aiheiksi alun perin kiinnitti huomiota siihen ihmisten välisissä jokapäiväisissä suhteissa toteutetaan pidetään yllä poliittisesti moraalisesti tärkeitä siksi pitää ulottua arkeen politiikka juontuu antiikin kielen sanasta politikos kansalaisia koskevaa alkuperältään käytännön teorian vaikuttamista toisiin ihmisiin globaalilla kansallisella yksilöllisellä tasolla nykyisessä yleiskielessä sanalla usein johonkin tiettyyn kokonaisnäkemykseen aatteeseen pohjautuvaa pyritään vaikuttamaan valtiollisiin valtioiden välisiin yhteiskunnallisiin asioihin hoidetaan niitä sanaa käytetään puolueiden toiminnasta politiikkaa päätöksentekoa tutkiva yhteiskuntatiede nimeltään politologia tutkimus valtio oppi viimeksi mainittu saksan termistä staatslehre allgemeine yleinen anglosaksisissa maissa termiä political science joskin politics käytössä teoriaa poliittisia aatteita filosofiaa tutkitaan tutkimuksen monissa yliopistoissa käytännöllisen filosofian piirissä tavallaan kaikki yhteiskuntatieteet tutkivat piiriin kuuluvia päätöksentekojärjestelmiä esiintyy erilaisia edustuksellisessa demokratiassa äänioikeusikärajan saavuttaneet osallistuvat päätöksentekoon valitsemiensa edustajien heille vastuunalaisten hallituselinten kautta perustuslaillinen tasavalta kansanvallan rajoitetumpi muoto yksinvallassa diktatuurissa yleisesti ottaen johtajavaltaisissa autoritaristisissa valtiomuodoissa yksi henkilö ryhmä päättää kaikkien asioista tarkastelun tekee ongelmalliseksi mitä kansanvaltaisin perustuslaillisin järjestelmä itse asiassa räikein diktatuurilähde oligarkia harvainvaltaa aristokratia ylhäisön muun parhaimmiston valtaa jonkinasteista oligarkiaa aristokratiaa tavataan demokraattisimmissakin järjestelmissä mikäli rajoitetaan vähimpään mahdolliseen yritetään jättää asiat yksittäisten päätettäviksi kyseessä libertarismi valtion poistuessa anarkia viimeiset aatetta eivät toisensa poissulkevia kummankin niistä sovellutukset jääneet harvoiksi lyhytaikaisiksi mutta teoreettisina malleina historiallisina ajattelutapoina niillä silti oma kiinnostavuutensa viime viikkoina väkivaltaiseksi muuttuneet mielenosoitukset vaikuttivat lauantaina päivällä rauhoittuneen neljän auton kolari aiheutti aamulla valtavan liikenneruuhkan kehätiellä aiheesta tietämättömälle sukukypsä ankerias hämmästyttävä pelottava näky lokki kirkuu ryöstää nakkisämpylän kädestä sotkee ulosteellaan paikkoja työntekijämme saavat vähintään samat edut kuin muissakin alan yrityksissä ilman hierarkiaa byrokratiaa syyttäjä vaatii vuoden ehdotonta vankeusrangaistusta rahtialuksen kapteenille törkeästä veropetoksesta hovioikeudessa valelääkärin tempauksista kunnalle aiheutuneet taloudelliset vahingot arvioitiin odotettua pienemmiksi pelastusjoukot etsineet kateissa olleita ihmisiä myrskyn aiheuttaman maanvyöryn alta jos suinkin aikaa pitkän matkan päätteeksi juodaan yhteiset kahvit keittiön pöydän ääressä työelämässä odotetaan nykyään sosiaalisuutta kykyä esiintyä ainakin tarvittaessa uskaltaa avata suunsa kokouksissa siellä muisteltiin hymyssä suin tapausta lääkäri osannutkaan pukea vanhukselle tukisukkia takaisin jalkaan ilmastonmuutos tehdä vakuuttamisen mahdottomaksi pahimmilla riskivyöhykkeillä elostelevasta elämänkerrasta rehentelyn sivumaku saa sapen kiehumaan kohtaamisen ohessa papilla tutkia hautausmaata hautoja niihin liittyviä elämäntarinoita teknologia vaikuttaa tulevaisuudessa tarvittavien taitojen lisäksi opetuksen oppimisen tapoihin vankilasta saadut tiedot herättäneet epäilyjä valvonta riittävän tarkkaa arjen tavat muodostuvat toistamalla toistojen luontevaa hyvänsä\");\n\n\n $validationStrings = array_merge($validationStrings, $stringArray);\n\n $hash = mb_strtolower($hash);\n\n for ($i = 0; $i < count($letter); $i++) {\n $message = '';\n\n $chars = preg_split('//u', $hash, null, PREG_SPLIT_NO_EMPTY);\n foreach ($chars as $char) {\n\n if (($char !== \" \") && ($char !== \".\") && ($char !== \",\")) {\n $key = array_search($char, $letter);\n $newKey = $key + $i;\n\n if ($newKey < count($letter)) {\n $char = $letter[$newKey];\n } else {\n $newKey = (($newKey - count($letter)) == 29 ? 0 : ($newKey - count($letter)));\n $char = $letter[$newKey];\n }\n }\n\n $message .= $char;\n }\n\n $validCounter = 0;\n foreach ($validationStrings as $word) {\n $validCounter = $validCounter + substr_count($message, $word);\n }\n\n $values[] = array(\n 'validCounter' => $validCounter,\n 'message' => $message,\n );\n }\n\n return $values;\n}", "function decodeCaesar($ciphertext, $key){\n\t$cleartext='';\n\tfor($i=0; $i<strlen($ciphertext); $i++){\n\t\t$c=substr($ciphertext, $i, 1);\n\t\t$decodedchar=chr(ord($c)-$key);\n\t\t$cleartext.=$decodedchar;\n\t}\n\treturn $cleartext;\n}", "public function getCipher();", "function verCo($acceso,$valor){\n\t$cont = verCodigo($acceso,$valor);\n\t\tif($cont<1000)\n\t\t\t$cont=\"0\".$cont;\n\t\tif($cont<10000)\n\t\t\t$cont=\"0\".$cont;\n\treturn $cont;\n}", "function ciphertext_only($ciphertext)\n {\n \n for($i=0; $i < $this->alphabet->sizeOf(); $i++)\n {\n $cipher = new Caesar($i, $this->alphabet);\n echo $cipher->decrypt($ciphertext) . \"\\n\";\n }\n }", "public function getChapeau();", "function csosn($tptribicms, $estabelecimento){\r\n\t$csosn = NULL;\r\n\tif($estabelecimento->getregimetributario() == \"1\"){\r\n\t\t$permitecredicms = ($estabelecimento->getpermitecredicms() === \"S\");\r\n\t\tif($tptribicms != \"F\"){\r\n\t\t\tif($permitecredicms == \"S\"){\r\n\t\t\t\t$csosn = \"101\";\r\n\t\t\t}else{\r\n\t\t\t\t$csosn = \"102\";\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif($permitecredicms == \"S\"){\r\n\t\t\t\t$csosn = \"201\";\r\n\t\t\t}else{\r\n\t\t\t\t$csosn = \"202\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $csosn;\r\n}", "function aleatoriaCodigo($tamanho = 8, $maiusculas = true, $numeros = true, $simbolos = false) {\r\r\r\n $lmin = 'abcdefghijklmnopqrstuvwxyz';\r\r\r\n $lmai = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\r\r\n $num = '1234567890';\r\r\r\n $simb = '!@#$%*-';\r\r\r\n // Variáveis internas\r\r\r\n $retorno = '';\r\r\r\n $caracteres = '';\r\r\r\n // Agrupamos todos os caracteres que poderão ser utilizados\r\r\r\n $caracteres .= $lmin;\r\r\r\n if ($maiusculas)\r\r\r\n $caracteres .= $lmai;\r\r\r\n if ($numeros)\r\r\r\n $caracteres .= $num;\r\r\r\n if ($simbolos)\r\r\r\n $caracteres .= $simb;\r\r\r\n // Calculamos o total de caracteres possíveis\r\r\r\n $len = strlen($caracteres);\r\r\r\n for ($n = 1; $n <= $tamanho; $n++) {\r\r\r\n // Criamos um número aleatório de 1 até $len para pegar um dos caracteres\r\r\r\n $rand = mt_rand(1, $len);\r\r\r\n // Concatenamos um dos caracteres na variável $retorno\r\r\r\n $retorno .= $caracteres[$rand - 1];\r\r\r\n }\r\r\r\n return $retorno;\r\r\r\n}", "function decryptCC($db, $ccv, $actioner_id) {\n //generate the key\n $key = $ccv . PAINFULLY_SECRET . $actioner_id;\n return \" AES_DECRYPT(uacc.number, '\" . $db->escape($key) . \"') \";\n}", "protected function getCodeCaisse()\r\n {\r\n $table = $this->getDbManager()->get('Sbm\\Db\\System\\Libelles');\r\n return $table->getCode('Caisse', 'DFT');\r\n }", "function agregaColaEstudiante ($cod, $nom, $carr, $pass){\n\t$paraCodigo = '/^[0-9]+$/';\n\t$paraNombre = '/^[a-zA-Z_áéíóúñ\\s.]*$/';\n\t$paraContraseña = '/^[0-9a-zA-Z_áéíóúñ\\s]*$/';\n\n\t$cod = stripslashes($cod);\n\t$cod = mysql_real_escape_string($cod);\n\t$cod = htmlspecialchars($cod);\n\n\t$nom = stripslashes($nom);\n\t$nom = mysql_real_escape_string($nom);\n\t$nom = htmlspecialchars($nom);\n\n\t$carr = stripslashes($carr);\n\t$carr = mysql_real_escape_string($carr);\n\t$carr = htmlspecialchars($carr);\n\n\t$pass = stripslashes($pass);\n\t$pass = mysql_real_escape_string($pass);\n\t$pass = htmlspecialchars($pass);\n\n\t$mensaje = turnosDisponibles($carr);\n\n\tif(carreraExiste($carr) != 1){\n\t\treturn \"Mensaje:Error programa no existe.\";\n\t}else if ($cod == \"\" || $cod == \" \" || $cod == null) {\n\t\treturn \"Mensaje:Codigo de estudiante suministrado no valido.\";\n\t}else if ($pass == \"\" || $pass == \" \" || $pass == null) {\n\t\treturn \"Mensaje:Las contraseñas suministradas solo contienen letras y/o numeros.\";\n\t}else\tif (preg_match($paraCodigo, $cod) != 1) {\n\t\treturn \"Mensaje:Las contraseñas suministradas solo contienen letras y/o numeros.\";\n\t}else if (preg_match($paraNombre, $nom) != 1) {\n\t\treturn \"Mensaje:Los nombre no llevan numeros.\";\n\t}else if(preg_match($paraContraseña, $pass) != 1){\n\t\treturn \"Mensaje:Codigo de estudiante suministrado no valido.\";\n\t}else\tif ($mensaje == \"Bien\") {\n\t\t\t$host = \"localhost\";\n\t\t\t$usuario = \"root\";\n\t\t\t$password = \"\";\n\t\t\t$BaseDatos = \"pide_turno\";\n\n\t\t\t$link=mysql_connect($host,$usuario,$password);\n\t\t\tmysql_select_db($BaseDatos,$link);\n\t\t\t$consultaSQL = \"INSERT INTO turnos (codigo, nombre, carrera, clave, estado) VALUES ('$cod', '$nom', '$carr', '$pass', 'No atendido')\";\n\t\t\tmysql_query(\"SET NAMES utf8\");\n\t\t\tif (mysql_query($consultaSQL,$link)) {\n\t\t\t\t$result =\"Mensaje:Turno agregado satisfactoriamente.\";\n\t\t\t}else{\n\t\t\t\t$result =\"Mensaje:El codigo que menciona ya tiene un turno.\";\n\t\t\t}\n\t\t\tmysql_close($link);\n\t\t\treturn $result;\n\t\t}else{\n\t\t\treturn $mensaje;\n\t\t}\n\treturn \"Mensaje:Problema al contactar con el servidor, espere un momento y actualice la página o verifique su conexión a internet.\";\n}", "function cryptCCNumberDeCrypt( $cifer, $key )\r\n{\r\n\treturn base64_decode($cifer);\r\n}", "function cryptCCExpiresDeCrypt( $cifer, $key )\r\n{\r\n\treturn base64_decode( $cifer );\r\n}", "function encriptarContrasena($contrasena) {\n\t#The first argument specifies the \"base-2 logarithm of the iteration count used for password stretching\" and the second argument specifies the use of portable hashes\n $t_hasher = new PasswordHash(8, FALSE);\n return $t_hasher->HashPassword($contrasena);\n}", "function vegerne_decipher($str,$str_passwd)\n{\n if(preg_match(\"/[^a-zA-Z]/\", $str_passwd))\n {\n return null;\n }\n else\n {\n $str_password=strtolower($str_passwd);\n $pass_arr=array();\n $pass_arr_num=array();\n $alpha=array('a'=>'1','b'=>'2','c'=>'3','d'=>'4','e'=>'5','f'=>'6','g'=>'7','h'=>'8','i'=>'9','j'=>'10','k'=>'11','l'=>'12','m'=>'13','n'=>'14','o'=>'15','p'=>'16','q'=>'17','r'=>'18','s'=>'19','t'=>'20','u'=>'21','v'=>'22','w'=>'23','x'=>'24','y'=>'25','z'=>'26');\n $one_str_pass=strlen($str_password)-1;\n $one_str=strlen($str)-1;\n $alpha_num=array_keys($alpha);\n $match_num=array(); \n $nums=array_flip($alpha); \n $encoded=array();\n $string=strtolower($str);\n if(is_array($string)==true)\n {\n throw new Exception(\"Can't use array as string\"); \n }\n if(strlen($str_password)>0)\n {\n for ($b=0; $b <strlen($str) ; $b++) \n { \n \t $p=$b;\n \tif($p>$str_password)\n \t{\n $p=$b%strlen($str_password);\n \n }\n\n $pass_arr[$b]=$str_password[$p];\t\n $pass_arr_num[$b]=$alpha[$pass_arr[$b]];\n }\n \n for ($i=0; $i <count($pass_arr_num) ; $i++)\n { \n for ($j=0; $j <26 ; $j++)\n {\n $match=preg_match(\"/\".$alpha_num[$j].\"/\",$string[$i]);\n if($match==1)\n {\n \n $match_num[$i]=$alpha[$alpha_num[$j]];\n $match_num[$i]-=$pass_arr_num[$i];\n if($match_num[$i]<1)\n {\n $match_num[$i]=26+$match_num[$i];\n }\n $encoded[$i]=$nums[$match_num[$i]];\n \n }\n \n \n\n } \n $matchtwo=preg_match('/[^a-z]/',$string[$i]);\n if($matchtwo==1)\n {\n \n $encoded[$i]=$string[$i];\n }\n\n } \n \n }\n $enc=implode(\"\",$encoded);\n return $enc;\n } \n}", "function Comprobar_codedificio()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->CODEDIFICIO)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->CODEDIFICIO)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->CODEDIFICIO)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "public function testAcsch()\n {\n $acsch = Trigonometry::acsch(1.2);\n $this->assertEquals(0.75848613719374, $acsch, '', 1E-8);\n }", "function encryptCC($db, $ccNum, $ccv, $actioner_id) {\n //generate the key\n $key = $ccv . PAINFULLY_SECRET . $actioner_id;\n return \" AES_ENCRYPT('\" . $ccNum . \"', '\" . $db->escape($key) . \"') \";\n}", "private function calculateBelfioreCode()\n {\n return strtoupper($this->subject->getBelfioreCode());\n }", "function comprobar_CODCENTRO(){\n\t$errores = array();\n\t$correcto=true;\n //Compruebo si el valor es null o no es vacio\n if (($this->CODCENTRO == null) || (strlen($this->CODCENTRO) == 0)){\n\n \t$mensajeError = array (\n \"nombreatributo\" => \"CODCENTRO\",\n \"codigoincidencia\" => \"00001\",\n \"mensajeerror\" => \"Atributo vacío\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n }\n\tif(strlen($this->CODCENTRO)<3){\n\t $mensajeError = array (\n \"nombreatributo\" => \"CODCENTRO\",\n \"codigoincidencia\" => \"00003\",\n \"mensajeerror\" => \"Valor de atributo no numérico demasiado corto\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\t\nif(strlen($this->CODCENTRO)>10){\n\t $mensajeError = array (\n \"nombreatributo\" => 'CODCENTRO',\n \"codigoincidencia\" => \"00002\",\n \"mensajeerror\" => \"Valor de atributo demasiado largo\"\n );\n\t$errores[]=$mensajeError;\n\treturn $errores;\n}\n\tif (!preg_match(\"/^[a-zA-ZñÑáéíóúÁÉÍÓÚ\\d-]+$/\",$this->CODCENTRO)){\n\t\t $mensajeError = array (\n \"nombreatributo\" => 'CODCENTRO',\n \"codigoincidencia\" => \"00040\",\n \"mensajeerror\" => \"Solo están permitidas alfabéticos, números y el “-”\"\n );\n\t\t$errores[]=$mensajeError;\n\t\treturn $errores;\n\t}\n\tif($correcto==TRUE){\n\t\treturn TRUE;\n\t}else{\n\t\treturn $errores;\n\t}\n}", "public function encrypt($plaintext) {\n\t\t//Capitalize all the characters\n\t\t$plaintext = strtoupper($plaintext); // see https://www.php.net/manual/en/function.strtoupper.php\n\t\t//convert the string to an array, and then loop over the \n\t\t$plaintext = str_split ($plaintext); //see https://www.php.net/manual/en/function.str-split.php\n\t\t\t\t\t\t\t\t\t\t\t\t//also see https://www.php.net/manual/en/function.explode.php\n\t\t\n\t\t//var_dump($plaintext); //Debug code uncomment to see the array\n\t\t\n\t\t$cyphertext = array(); //create an empty array for our cyphertext\n\t\t\n\t\t//temporary variables for our script. This is inelegant, but easy to follow.\n\t\t$tmp_plain_num = 0;\n\t\t$tmp_crypt_num = 0;\n\t\tforeach ($plaintext as $char) {\n\t\t\t//check to make sure we have a letter. If we do not, just stick it in the cyphertext unencrypted.\n\t\t\tif(ctype_alpha($char)) {\n\t\t\t\t$tmp_plain_num = self::$lettersToNumbers[$char]; //gets the number\n\t\t\t\t/**\n\t\t\t\t *\tIn php, mod takes precedence over addition, so we need parenthesis. What would happen without them?\n\t\t\t\t */\n\t\t\t\t$tmp_crypt_num = ($tmp_plain_num + $this->shift_key) % 26; // See https://www.php.net/manual/en/language.operators.precedence.php for php's PEMDAS\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t *\tIn php (as opposed to some other languages), we can append an element to the end of an array \n\t\t\t\t * by simply leaving the index empty.\n\t\t\t\t */\n\t\t\t\t$cyphertext[] = self::$numbersToLetters[$tmp_crypt_num]; //encrypt the letter, and append it to the array.\n\t\t\t} else {\n\t\t\t\t$cyphertext[] = $char; //stick the non-letter in.\n\t\t\t}\n\t\t}\n\t\t\n\t\t//var_dump($cyphertext); //Debug code Uncomment to see the array\n\t\t\n\t\t$cyphertext = implode($cyphertext); //convert back to a string. See https://www.php.net/manual/en/function.implode.php\n\t\t\n\t\treturn($cyphertext);\n\t}", "public function veriCode() {}", "function chosen_ciphertext($cipher)\n {\n $plaintext = $cipher->decrypt($this->alphabet->get(0)[0]);\n $key = $this->alphabet->indexOf($plaintext);\n $key = mod($key * (-1), $this->alphabet->sizeOf());\n return $key;\n }", "function Comprobar_codedificio()\n{\n\t$correcto = true;\n\n\t//si se cumple la condicion\n\tif (strlen($this->codedificio)<3)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00003\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo no numérico demasiado corto\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (strlen($this->codedificio)>10)\n\t{\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00002\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Valor de atributo demasiado largo\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\t//si se cumple la condicion\n\tif (!preg_match(\"/^[A-Za-zñáéíóúÑÁÉÍÓÚüÜ\\-0-9]+$/\",$this->codedificio)){\n\t\t$error = array();\n\t\t\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"CODEDIFICIO\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"00040\");\n\t\t//guarda un mensaje de error\n\t\tarray_push($error, \"Solo están permitidas alfabéticos, números y el “-”\");\n\n\t\t//guarda un mensaje de error\n\t\tarray_push($this->erroresdatos, $error);\n\t\t$correcto = false;\n\t}\n\n\t\n\treturn $correcto;//se devuelve el resultado\n}", "abstract protected function getCrypt();", "function cons_benef2($ced)\r\n\t{\r\n\t \t$sql=\"SELECT * FROM slc_benef WHERE ced_benf=\".$ced;\r\n\t\t$result=mysql_query($sql,$this->conexion);\r\n\t\t//echo $sql;\r\n\t\tif ($result)\r\n\t\t { \r\n\t\t\twhile($reg= mysql_fetch_row($result))\r\n\t\t\t {\r\n\t\t\t if($reg[2]==$ced)\r\n\t\t\t { $cad=$reg[1].\"**\".$reg[2].\"**\".$reg[3].\"**\".$reg[6].'**'.$reg[7];\r\n\t\t\t return $cad;\r\n\t\t\t\t }\r\n\t\t\t else\r\n\t\t\t\t return false; \t \r\n\t\t\t }\r\n\t\t }\t \r\n\t\telse\r\n\t\t\t return false;\r\n\t}", "public function testCosh()\n {\n $cosh = Trigonometry::cosh(1.5);\n $this->assertEquals(2.3524096152432, $cosh, '', 1E-8);\n }", "function generarCodigo($longitud){\n $key = '';\n $pattern = \"1234567890abcdefghijklmnopqrstuvwxyz\";\n $max =strlen($pattern)-1;\n for($i=0; $i < $longitud; $i++) $key .=$pattern{mt_rand(0,$max)};\n\n return $key;\n \n \n }", "function checksum ($etiquette, $valeur) {\n $sum = 32; // Somme des codes ASCII du message+un espace\n for ($i=0;$i<strlen($etiquette);$i++) {\n $sum = $sum + ord($etiquette[$i]);\n }\n for ($i=0;$i<strlen($valeur);$i++) {\n $sum = $sum + ord($valeur[$i]);\n }\n $sum = ($sum & 63) + 32;\n return (chr($sum));\n }", "function getDv($cRut){\n \n $rut = (string)$cRut;\n $factor = 2;\n $suma = 0;\n \t\t \n for($i = strlen($rut) - 1; $i >= 0; $i--) {\n $suma += $factor * $rut[$i];\n $factor = $factor % 7 == 0 ? 2 : $factor + 1;\n }\n \n $dv = 11 - $suma % 11;\n $dv = $dv == 11 ? 0 : ($dv == 10 ? \"K\" : $dv);\n return $dv;\n}", "function ceros_izquierda($numero,$cant_ceros)\r\n\t{\r\n\t\t$decimales = explode(\".\",$numero); \r\n\r\n\t\t//Si no se necesita los decimales cambiar $decimales[0] por $numero \r\n\t\t$diferencia = $cant_ceros - strlen($decimales[0]); \r\n\r\n\r\n\t\tfor($i = 0 ; $i < $diferencia; $i++) \r\n\t\t{ \r\n \t$numero_con_ceros .= 0; \r\n\t\t} \r\n\r\n\t\t$numero_con_ceros .= $numero; \r\n\r\n\t\treturn $numero_con_ceros;\t\r\n\t\r\n\t}", "function GenerarClave()\n\t{\n\t\t$this->Clave = CifradorCodigo::generarNumero(\n\t\tCifradorCodigo::LongitudBitsClaveMaximo\n\t\t);\n\t}", "function cons_beneficiario($ced)\r\n\t{\r\n\t \t$sql=\"SELECT * FROM slc_beneficiario WHERE ced_beneficiario=\".$ced;\r\n\t\t$result=mysql_query($sql,$this->conexion);\r\n\t\t//echo $sql;\r\n\t\tif ($result)\r\n\t\t { \r\n\t\t\twhile($reg= mysql_fetch_row($result))\r\n\t\t\t {\r\n\t\t\t if($reg[1]==$ced)\r\n\t\t\t { $cad=$reg[0].\"**\".$reg[1].\"**\".$reg[2].\"**\".$reg[3];\r\n\t\t\t return $cad;\r\n\t\t\t\t }\r\n\t\t\t else\r\n\t\t\t\t return false; \t \r\n\t\t\t }\r\n\t\t }\t \r\n\t\telse\r\n\t\t\t return false;\r\n\t}", "public function getCodcaj(){\n\t\treturn $this->codcaj;\n\t}", "function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }", "function ncapicua($numero)\n {\n \n $numeroinver=strrev($numero); //poner\n if($numero==$numeroinver) {\n $mensaje= \"<br> El numero $numero es capicua\";\n }else{\n $mensaje= \"<br> El numero $numero no es capicua\";\n }\n return $mensaje;\n }", "function chMajuscule($valeur){\r\n $i=0;\r\n while($i < laTaille($valeur)){\r\n if($valeur[$i]>=\"a\" && $valeur[$i]<=\"z\"){\r\n $codeValeur = ord($valeur[$i]) - 32;\r\n echo chr($codeValeur);\r\n }\r\n else{\r\n echo $valeur[$i];\r\n }\r\n $i=$i+1;\r\n }\r\n }", "function Cipher($ch, $key)\r\n{\r\n\tif (!ctype_alpha($ch))\r\n\t\treturn $ch;\r\n\r\n\t$offset = ord(ctype_upper($ch) ? 'A' : 'a');\r\n\treturn chr(fmod(((ord($ch) + $key) - $offset), 26) + $offset);\r\n}", "public function getCep() {\n return $this->sCep;\n }", "function cekkartu($kartu){\n\t$pokerhands = Array (\"nonpaying hand\", \"jacks or better\", \"two pair\", \"three of a kind\", \"straight\", \"flush\", \"full house\", \"four of a kind\", \"straight flush\", \"royal flush\");\n\t\t$cardarr = Array(\"c1\", \"c2\", \"c3\", \"c4\", \"c5\", \"c6\", \"c7\", \"c8\", \"c9\", \"c10\", \"cj\", \"cq\", \"ck\", \"d1\", \"d2\", \"d3\", \"d4\", \"d5\", \"d6\", \"d7\", \n \"d8\", \"d9\", \"d10\", \"dj\", \"dq\", \"dk\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"h7\", \"h8\", \"h9\", \"h10\", \"hj\", \"hq\", \"hk\", \"s1\", \"s2\", \"s3\", \"s4\", \"s5\", \"s6\", \"s7\", \"s8\", \"s9\", \"s10\", \"sj\", \n \"sq\", \"sk\");\n\t//$phand[1] = 0;\n\t$phand[0] = 0;\n\t$flush = 0;\n\t$straight = 0;\n\tfor($i=0;$i<10;$i++){\n\t\t$car[$i] = $cardarr[$kartu[$i]];\n\t\t$suit[$i] = substr($car[$i], 0,1);\n\t\t$rank[$i] = substr($car[$i], 1,2);\n\t\tif ($rank[$i] == \"1\") {\n\t\t\t$ranks[$i] = 14;\n\t\t\t$ranky[$i] = 14;\n\t\t}\n\t\telse if($rank[$i] == \"j\") {\n\t\t\t$ranks[$i] = 11;\n\t\t\t$ranky[$i] = 11;\n\t\t}\n\t\telse if($rank[$i] == \"q\") {\n\t\t\t$ranks[$i] = 12;\n\t\t\t$ranky[$i] = 12;\n\t\t}\n\t\telse if($rank[$i] == \"k\") {\n\t\t\t$ranks[$i] = 13;\n\t\t\t$ranky[$i] = 13;\n\t\t}\n\t\telse {\n\t\t\t$ranks[$i] = $rank[$i]*1;\n\t\t\t$ranky[$i] = $rank[$i]*1;\n\t\t}\n\t}\n\trsort($ranks);\n\tfor($j=0;$j<5;$j++){\n\t\t$x = $j+1;\n\t\t$xrank = $ranks[$j]-1;\n\t\tif ($suit[$j] == $suit[0]) {\n\t\t\t$isflush++;\n\t\t\t//$res = 5;\n\t\t}\n\t\t//echo \"$xrank dan $ranks[$x] dan $ranks[$j]<BR>\";\n\t\tif ($xrank == $ranks[$x]) {\n\t\t\t$isstraight++;\n\t\t}\n\t\t$kind[$rank[$j]] = $kind[$rank[$j]]+1;\n\t\tif ($kind[$rank[$j]] == 4) {\n\t\t\t$iskind = 4;\n\t\t}\n\t\telse if ($kind[$rank[$j]] == 3) {\n\t\t\t$iskind = 3;\n\t\t}\n\t\telse if ($kind[$rank[$j]] == 2) {\n\t\t\t$iskind = 2;\n\t\t}\n\t\t//$iskind = $kind[$rank[$j]];\n\t\t/*\n\t\tif ($kind[$rank[$j]] == 3) {\n\t\t\t$kinds[$rank[$j]] = 3;\n\t\t\tif ($kindy == $rank[$j]) {\n\t\t\t\t$kindy = 0;\n\t\t\t}\n\t\t\t$kindx = $rank[$j];\n\t\t\techo \"$kindy ex $kindx kindyx $rank[$j]<BR>\";\n\t\t}else if ($kind[$rank[$j]] == 2){\n\t\t\t$kinda[$rank[$j]] = 2;\n\t\t\t$kindy = $rank[$j];\n\t\t\techo \"$kindy kindy<BR>\";\n\t\t}\n\t\t*/\n\t\tif ($kind[$rank[$j]] == 2) {\n\t\t\tif ($pairx != $rank[$j]) {\n\t\t\t\t$pairx = $ranky[$j];\n\t\t\t\t$pair++;\n\t\t\t}\n\t\t}\n\t\t//echo \"\".$kind[$rank[$j]].\" dan $rank[$j] kind<BR>\";\n\t\t//if ($rank[$j])\n\t}\n\t//echo \"$isflush dan $isstraight <BR>\";\n\t//echo \"$kinds[$kindx] dan $pairx full <BR>\";\n\tif ($isflush == 5 && $isstraight == 4) {\n\t\t//$phand[1] = 1;\n\t\t//echo \"$ranks[0]\";\n\t\tif ($ranks[0] == 14) {\n\t\t\t$royalflush = 1;\n\t\t\t$phand[0] = 1;\n\t\t}\n\t\telse {\n\t\t\t$straightflush = 1;\n\t\t\t$phand[0] = 2;\n\t\t}\n\t}else if ($iskind == 4) {\n\t\t$fourofakind = 1;\n\t\t$phand[0] = 3;\n\t}else if ($pair == 2 && $iskind == 3) {\n\t\t$fullhouse = 1;\n\t\t$phand[0] = 4;\n\t}\n\t//else if ($kinds[$kindx] == 3 && $kinda[$kindy] == 2) {\n\t//\t$fullhouse = 1;\n\t//}\n\telse if ($isflush == 5) {\n\t\t//$phand[1] = 1;\n\t\t$flush = 1;\n\t\t$phand[0] = 5;\n\t}else if ($isstraight == 4) {\n\t\t//$phand[1] = 1;\n\t\t$straight = 1;\n\t\t$phand[0] = 6;\n\t}else if ($iskind == 3) {\n\t\t$threeofakind = 1;\n\t\t$phand[0] = 7;\n\t}else if ($pair == 2) {\n\t\t$twopair = 1;\n\t\t$phand[0] = 8;\n\t}else if ($pair == 1) {\n\t\tif ($pairx >= 11) {\n\t\t\t$onepair = 1;\n\t\t\t$phand[0] = 9;\n\t\t}else {\n\t\t\t$none = 1;\n\t\t}\n\t}else{\n\t\t$none = 1;\n\t\t//echo \"habis\";\n\t}\n\t//echo \"$royalflush royal<BR>\";\n\t//echo \"$straightflush sflush<BR>\";\n\t//echo \"$fourofakind fourkind<BR>\";\n\t//echo \"$fullhouse fhouse<BR>\";\n\t//echo \"$flush flush<BR>\";\n\t//echo \"$straight straight<BR>\";\n\t//echo \"$threeofakind threekind<BR>\";\n\t//echo \"$twopair two<BR>\";\n\t//echo \"$onepair pair<BR>\";\n\t//echo \"$none none<BR>\";\n/*\n\t$flush = isflush($totaljoker,$kartusort,$hand);\n\t$straight = isstraight($totaljoker,$kartusort,$hand);\n\t$straightflush = isstraightflush($totaljoker,$kartusort,$hand,$flush,$strait);\n\t$royalflush = isroyalflush($straightflush);\n\n\t$fourkind = isfourofakind($totaljoker,$kartusort,$hand);\n\t$twopair = istwopairall($totaljoker,$kartusort,$hand);\n\t$threekind = isthreeofakind($totaljoker,$kartusort,$hand);\n\n$kartututupgb4 = isthreeofakindyy($totaljoker,$kartusort,$hand);\n$kartututupgball = istwopairallyy($totaljoker,$kartusort,$hand);\n\n$fullhouse = isfullhouse($totaljoker,$kartusort,$hand,$kartututupgb4,$kartututupgball,$twopair,$threekind);\n\n$acepair = isacepair($totaljoker,$kartusort,$hand);\n*/\n\t//$phand[2] = $ranky;\n\treturn $phand;\n}", "public function getAceite();", "public function cercaP() {\r\n $operatore = $_SESSION[\"op\"];\r\n $ruolo = $operatore->getFunzione();\r\n\r\n $ricerca = array();\r\n $ricerca[\"numeroPratica\"] = isset($_REQUEST[\"numeroPratica\"]) ? $_REQUEST[\"numeroPratica\"] : null;\r\n $ricerca[\"statoPratica\"] = isset($_REQUEST[\"statoPratica\"]) ? $_REQUEST[\"statoPratica\"] : null;\r\n $ricerca[\"tipoPratica\"] = isset($_REQUEST[\"tipoPratica\"]) ? $_REQUEST[\"tipoPratica\"] : null;\r\n $ricerca[\"incaricato\"] = isset($_REQUEST[\"incaricato\"]) ? $_REQUEST[\"incaricato\"] : null;\r\n $ricerca[\"flagAllaFirma\"] = isset($_REQUEST[\"flagAllaFirma\"]) ? $_REQUEST[\"flagAllaFirma\"] : null;\r\n $ricerca[\"flagFirmata\"] = isset($_REQUEST[\"flagFirmata\"]) ? $_REQUEST[\"flagFirmata\"] : null;\r\n $ricerca[\"flagInAttesa\"] = isset($_REQUEST[\"flagInAttesa\"]) ? $_REQUEST[\"flagInAttesa\"] : null;\r\n $ricerca[\"flagSoprintendenza\"] = isset($_REQUEST[\"flagSoprintendenza\"]) ? $_REQUEST[\"flagSoprintendenza\"] : null;\r\n $offset = isset($_REQUEST[\"offset\"]) ? $_REQUEST[\"offset\"] : 0;\r\n $numero = isset($_REQUEST[\"numero\"]) ? $_REQUEST[\"numero\"] : 15;\r\n $richiestaFirmate = isset($_REQUEST[\"richiestaFirmate\"]) ? $_REQUEST[\"richiestaFirmate\"] : 0;\r\n\r\n if ($ruolo < 2) {\r\n $ricerca[\"incaricato\"] = $operatore->getId();\r\n }\r\n\r\n //$numeroPratiche = PraticaFactory::numeroTotalePratiche();\r\n $numeroPratiche= PraticaFactory::elencoNumeroP($ricerca);\r\n \r\n if ($offset >= $numeroPratiche) {\r\n $offset = 0;\r\n }\r\n if ($offset < 1) {\r\n $offset = 0;\r\n }\r\n\r\n if ($richiestaFirmate === 0) {\r\n $href = '<a href=\"index.php?page=operatore&cmd=aggiornaP&numeroP=';\r\n } elseif ($ruolo > 2) {\r\n $href = '<a href=\"index.php?page=responsabile&cmd=firmaP&numeroP=';\r\n }\r\n\r\n $pratiche = PraticaFactory::elencoP($ricerca, $offset, $numero);\r\n \r\n $x = count($pratiche);\r\n $data = \"\";\r\n for ($i = 0; $i < $x; $i++) {\r\n $data.= \"<tr class=\\\"\" . ($i % 2 == 1 ? \"a\" : \"b\") . \"\\\"><td>\" . $href\r\n . $pratiche[$i]->getNumeroPratica() . \"\\\">\" . $pratiche[$i]->getNumeroPratica() . \"</a></td>\"\r\n . \"<td>\" . $pratiche[$i]->getDataCaricamento(true) . \"</td>\"\r\n . \"<td>\" . $pratiche[$i]->getRichiedente() . \"</td>\"\r\n . \"<td>\" . PraticaFactory::tipoPratica($pratiche[$i]->getTipoPratica()) . \"</td>\"\r\n . \"<td>\" . PraticaFactory::statoPratica($pratiche[$i]->getStatoPratica()) . \"</td>\"\r\n . \"<td>\" . OperatoreFactory::getOperatore($pratiche[$i]->getIncaricato())->getNominativo() . \"</td>\"\r\n . \"</tr>\";\r\n }\r\n\r\n header('Cache-Control: no-cache, must-revalidate');\r\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\r\n header('Content-type: application/json');\r\n $json = array();\r\n $json[\"testo\"] = $data;\r\n $json[\"numeroPratiche\"] = $numeroPratiche;\r\n $json[\"numRow\"] = $x;\r\n echo json_encode($json);\r\n }", "function caesar_cypher($cyrillic_string, $code) {\n $string = mb_strtolower(mb_convert_encoding($cyrillic_string, 'UTF-8', 'auto'));\n $string_array = mbStringToArray($string);\n $alph = mb_strtolower(mb_convert_encoding('АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ', 'UTF-8', 'auto')); // Cyrillic alphabet.\n $alph_array = mbStringToArray($alph);\n $alph_arr_count = count($alph_array);\n $code = strval($code); // cipher code\n $code_count = strlen($code);\n $ci = 0; // code element position\n $target_string = '';\n foreach ($string_array as $letter) {\n $source_position = array_search($letter, $alph_array);\n\n if ($source_position !== FALSE) {\n $target_position = $source_position + $code[$ci];\n if ($target_position >= $alph_arr_count) {\n $target_position = $target_position - $alph_arr_count;\n }\n $letter = $alph_array[$target_position];\n // Make sure we go to the 1st symbol.\n $ci++;\n if ($ci == $code_count) {\n $ci = 0;\n }\n }\n\n $target_string .= $letter;\n }\n return $target_string;\n}", "public function __construct()\n {\n # Creates a major progression matrix\n $this->cypherMatrix = array(\n 'I' => array ('V', 'vi', 'ii', 'iii', 'VI6'),\n 'ii' => array ('iii', 'V', 'vi','I', 'VII65'),\n 'II6' => 'V',\n 'iii' => array ('I', 'V', 'IV'),\n 'III6' => 'vi',\n 'IV' => array ('V', 'I', 'bVII', 'vi', 'II6'),\n 'V' => array ('I', 'ii', 'iii', 'III6'),\n 'V6' => 'I',\n 'vi' => array ('ii', 'V6', 'IV'),\n 'VI6' => 'ii',\n 'bVII' => 'IV',\n 'viidim' => 'I',\n 'VII65' => 'iii'\n \n );\n \n \n # Creates a 12 tone MAJOR cypher scale\n $this->cypherScale = array(\n '1' => 'I',\n '2' => 'VI6',\n '3' => 'ii',\n '4' => 'VII65',\n '5' => 'iii',\n '6' => 'IV',\n '7' => 'II6',\n '8' => 'V',\n '9' => 'III6',\n '10' => 'vi',\n '11' => 'bVII',\n '12' => 'viidim',\n );\n \n \n \n # Creates a MINOR cypher progression matrix\n $this->cypherMatrixMinor = array(\n 'i' => array ('V', 'VI', 'iv', 'iidim56', 'I6'),\n 'I6' => array ('iv', 'II6'),\n 'iidim56' => 'V',\n 'II' => 'v',\n 'II6' => 'v',\n 'III' => array ('i', 'V', 'iv'),\n 'iv' => array ('V', 'i', 'iidim56', 'III'),\n 'IV6' => 'VII',\n 'v' => array ('III', 'V'),\n 'V' => 'i',\n 'V65' => 'i',\n 'VI' => array ('III', 'VII', 'iv'),\n 'VII' => 'V', \n );\n\n \n \n # Creates a 12 tone MINOR cypher scale\n $this->cypherScaleMinor = array(\n '1' => 'i',\n '2' => 'V65',\n '3' => 'iidim7',\n '4' => 'III', \n '5' => 'I6', # Doesn't exist in minor scale\n '6' => 'iv',\n '7' => 'II6', # Another first inversion to cover exception\n '8' => 'V',\n '9' => 'VI',\n '10' => 'IV6',\n '11' => 'VII',\n '12' => 'V65',\n );\n \n # Creates a chord progression matrix\n $this->fullChordMatrix = array(\n 'c' => array('g6', 'am', 'dmaj7', 'dm'),\n 'dm' => array('emaj7', 'g', 'g6', 'amaj7'),\n 'dmaj7' => array('g', 'g6'),\n 'em' => array('c', 'emaj7'),\n 'emaj7' => 'am',\n 'g' => array('g7', 'c', 'dmaj7', 'em'),\n 'g6' => array('dmaj7', 'amaj7'),\n 'g7' => 'c',\n 'am' => array('dm', 'bmaj7'),\n 'amaj7' => array('dm', 'bb'),\n 'bb' => 'g6',\n 'bmaj7' => 'emaj7', \n );\n \n # Creates a 12 tone scale array\n $this->serialScale = array(\n '1' => 'c',\n '2' => 'c#',\n '3' => 'd',\n '4' => 'd#',\n '5' => 'e',\n '6' => 'f',\n '7' => 'f#',\n '8' => 'g',\n '9' => 'g#',\n '10' => 'a',\n '11' => 'a#',\n '12' => 'b',\n \n );\n \n # Creates a 12 tone scale array in MAJOR\n $this->serialScaleMajor = array(\n '1' => 'C',\n '2' => 'C#',\n '3' => 'D',\n '4' => 'D#',\n '5' => 'E',\n '6' => 'F',\n '7' => 'F#',\n '8' => 'G',\n '9' => 'G#',\n '10' => 'A',\n '11' => 'A#',\n '12' => 'B',\n \n );\n \n \n \n $this->tonalityIndex = array (\n \n 'FIndexMajor' => array(\n 'I' => 'F',\n 'ii' => 'g',\n 'iii' => 'a',\n 'IV' => 'Bb',\n 'V' => 'C',\n 'vi' => 'd',\n 'viidim' => 'edim', \n ),\n \n 'GIndexMajor' => array(\n 'I' => 'G',\n 'ii' => 'a',\n 'iii' => 'b',\n 'IV' => 'C',\n 'V' => 'D',\n 'vi' => 'e',\n 'viidim' => 'f#dim6',\n ),\n \n 'GIndexMinor' => array(\n 'i' => 'G',\n 'iidim7' => 'adim7',\n 'III' => 'Bb',\n 'iv' => 'c7',\n 'V' => 'D',\n 'VI' => 'Eb',\n 'VII' => 'f',\n ),\n \n 'CIndexMajor' => array(\n 'I' => 'C',\n 'ii' => 'd7',\n 'II6' => 'D6',\n 'iii' => 'e',\n 'III6' => 'E6',\n 'IV' => 'F',\n 'V' => 'G',\n 'V6' => 'G6',\n 'vi' => 'a',\n 'VI6' => 'A6',\n 'bVII' => 'Bb',\n 'viidim' => 'bdim',\n 'VII65' => 'bhalfdim',\n ),\n \n 'AbIndexMajor' => array(\n 'I' => 'Ab',\n 'ii' => 'bb',\n 'II6' => 'Bb6',\n 'iii' => 'c',\n 'III6' => 'C6',\n 'IV' => 'Db',\n 'V' => 'Eb',\n 'V6' => 'Eb6',\n 'vi' => 'f',\n 'VI6' => 'F6',\n 'bVII' => 'Gb',\n 'viidim' => 'gdim6',\n 'VII65' => 'ghalfdim',\n ),\n \n \n 'AIndexMinor' => array(\n 'i' => 'a',\n 'I6' => 'A6',\n 'iidim7' => 'bdim7',\n 'iidim56' => 'bdim56',\n 'II' => 'B',\n 'II6' => 'B6',\n 'III' => 'C',\n 'iv' => 'd',\n 'IV6' => 'D6',\n 'v' => 'e',\n 'V' => 'E',\n 'V65' => 'E65',\n 'VI' => 'F',\n 'VII' => 'G',\n ),\n \n 'CIndexMinor' => array(\n 'i' => 'c',\n 'I6' => 'C6',\n 'iidim7' => 'ddim7',\n 'iidim56' => 'ddim56',\n 'II' => 'D',\n 'II6' => 'D6',\n 'III' => 'Eb',\n 'iv' => 'f',\n 'IV6' => 'D6',\n 'v' => 'g',\n 'V' => 'G',\n 'V65' => 'G65',\n 'VI' => 'Ab',\n 'VII' => 'Bb', \n ),\n );\n \n # Progressions ending on same degree as start\n $this->progressionListMaj1 = array (\"5\", \"6\", \"5\", \"5\", \"5\", \"5\", \"5\"); # a \"6-5\" progression\n $this->progressionListMaj2 = array (\"7\", \"2\", \"7\", \"1\", \"-5\"); # a \"5-2\" progression\n \n $this->progressionListMin1 = array (\"5\", \"5\", \"5\", \"5\", \"6\", \"5\", \"5\"); # 6-5\n $this->progressionListMin2 = array (\"7\", \"1\", \"7\", \"2\", \"7\"); # 5-2\n \n }", "function kiemTraChanLe()\n\t{\n\t\tglobal $a;\n\t\t$total = 100; // bien cuc bo\n\t\t// luu y: hay dat cau lenh nay ben tren cac lenh khac truoc khi goi bien do ra su dung\n\t\tif($a % 2 == 0) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function verPCSalaEnProyectorCentral( ) {\n $this->setComando(self::$PROYECTOR_CENTRAL, \"PC_SUELO\");\n }", "public function getCodeCaract() {\n return $this->codeCaract;\n }", "function chMinuscule($valeur){\r\n $i=0;\r\n while($i < laTaille($valeur)){\r\n if($valeur[$i]>=\"A\" && $valeur[$i]<=\"Z\"){\r\n $codeValeur = ord($valeur[$i]) + 32;\r\n echo chr($codeValeur);\r\n }\r\n else{\r\n echo $valeur[$i];\r\n }\r\n $i=$i+1;\r\n }\r\n }", "private function derivarClave()\n\t{\n\t\t$this->claveDerivada = array();\n\t\t$bitsClave = CifradorCodigo::fijarLongitud(CifradorCodigo::LongitudBitsClaveMaximo, decbin($this->Clave));\n\t\t$xorClave = bindec(substr($bitsClave, 0, CifradorCodigo::LongitudBitsClaveMaximo / 2)) ^ bindec(substr($bitsClave, CifradorCodigo::LongitudBitsClaveMaximo / 2, CifradorCodigo::LongitudBitsClaveMaximo / 2));\n\t\t$xorClaveOriginal = $xorClave;\n\t\tfor($i = 1; $i <= 6; $i++)\n\t\t{\n\t\t\t$clave = bindec($this->permutacionMultiple(CifradorCodigo::fijarLongitud(CifradorCodigo::LongitudBitsClaveMaximo / 2, decbin($xorClave >> 2))));\n\t\t\t$this->claveDerivada[] = $clave;\n\t\t\t$xorClave = $clave ^ $xorClave;\n\t\t}\n\t}", "function verCF($acceso,$valor){\n\t$row=row($acceso);\n\t$val=$row[$valor];\n\t$cont=separa($val);\n\t\t$cont++;\n\t\t\n\t\tif($cont<10)\n\t\t\t$cont=\"0\".$cont;\n\t\tif($cont<100)\n\t\t\t$cont=\"0\".$cont;\n\t\tif($cont<1000)\n\t\t\t$cont=\"0\".$cont;\n\treturn $cont;\t\n}", "function cs_encrypt_decrypt($string)\r\n{\r\n\t//Function : encrypt/decrypt a string message v.1.0 without a known key\r\n\t//Author : Aitor Solozabal Merino (spain)\r\n\t//Email : aitor-3@euskalnet.net\r\n\t//Date : 01-04-2005\r\n $strlen = strlen($string);\r\n $strencrypted = '';\r\n for ($pos = 0; $pos < $strlen ; $pos++)\r\n {\r\n\t\t// long code of the function to explain the algoritm\r\n\t\t// this function can be tailored by the programmer modifyng the formula\r\n\t\t// to calculate the key to use for every character in the string.\r\n\t\t$usekey = (($strlen+$pos)+1); // (+5 or *3 or ^2)\r\n\t\t// after that we need a module division because can´t be greater than 255\r\n\t\t$usekey = (255+$usekey) % 255;\r\n\t\t$encryptbyte = substr($string, $pos, 1);\r\n\t\t$asciibyte = ord($encryptbyte);\r\n\t\t$xorbyte = $asciibyte ^ $usekey; // xor operation\r\n\t\t$encrypted = chr($xorbyte);\r\n\t\t$strencrypted .= $encrypted;\r\n\t\t \r\n\t\t//short code of the function once explained\r\n\t\t// $str_encrypted_message .= chr((ord(substr($str_message, $position, 1))) ^ ((255+(($len_str_message+$position)+1)) % 255));\r\n\t}\r\n\treturn $strencrypted;\r\n}", "public function smanjiCenu(){\n if($this->getGodiste() < 2010){\n $discount=$this->cenapolovnogauta*0.7;\n return $this->cenapolovnogauta=$discount;\n }\n return $this->cenapolovnogauta; \n }", "public function encryptPass()\n {\n return \"RASAHolaRSSA\";\n }", "public function getNamaChallenge();", "function get_clase_vista()\n {\n switch ($this->accion) {\n case 'index': \n case 'mostrar_clases': \n case 'filtrar': return 'vista_materias';\n case 'planilla': return 'vista_planilla';\n case 'resumen': return 'vista_resumen';\n case 'generar_pdf': return 'vista_planilla';\n default: return 'vista_edicion_asistencias';\n }\n }", "function protein_charge($pK,$aminoacid_content,$pH){\r\n $charge = partial_charge($pK[\"N_terminus\"],$pH);\r\n $charge+= partial_charge($pK[\"K\"],$pH)*$aminoacid_content[\"K\"];\r\n $charge+= partial_charge($pK[\"R\"],$pH)*$aminoacid_content[\"R\"];\r\n $charge+= partial_charge($pK[\"H\"],$pH)*$aminoacid_content[\"H\"];\r\n $charge-= partial_charge($pH,$pK[\"D\"])*$aminoacid_content[\"D\"];\r\n $charge-= partial_charge($pH,$pK[\"E\"])*$aminoacid_content[\"E\"];\r\n $charge-= partial_charge($pH,$pK[\"C\"])*$aminoacid_content[\"C\"];\r\n $charge-= partial_charge($pH,$pK[\"Y\"])*$aminoacid_content[\"Y\"];\r\n $charge-= partial_charge($pH,$pK[\"C_terminus\"]);\r\n return $charge;\r\n}", "function Motvalide($chaine ) {\n\n$lettres=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$lettresM=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$v=CompterNombreElement($lettres);\n$t=false;\n$nbr=CompteNombreCaractere($chaine);\nif ($nbr>20) {\n\t$t=false;\n}\n else {\n for ($i=0; $i <$nbr; $i++) \n { \n \t for ($j=0; $j <$v ; $j++) \n \t { \n \t if ($chaine[$i]==$lettres[$j] or $chaine[$i]==$lettresM[$j]) \n\t \t {\n\t \t\t $t=true;\n\t \t\t break;\n\t \t }\t \n\t \t if ($j==$v-1) {\n\t \t \t$t=false;\n\t \t \tbreak;\n\t \t }\n\n \t }\n \t if ($t==false) \n\t \t {\n\t \t break;\n \t } \n }\t\n }\n \nreturn $t;\n}", "private static function Crypto() {\n if (self::$cripto == null) {\n self::$cripto = new \\PlayPHP\\Classes\\Security\\Crypto();\n }\n return self::$cripto;\n }", "public function getChapo()\n {\n return $this->chapo;\n }", "function generarCodigo($longitud) {\n $key = '';\n $pattern = '1234567890abcdefghijklmnopqrstuvwxyz';\n $max = strlen($pattern)-1;\n for($i=0;$i < $longitud;$i++) $key .= $pattern{mt_rand(0,$max)};\n return $key;\n}", "function testMinuscle($valeurTeste){\r\n $i=1;\r\n for( $x = \"a\"; $i <= 26; $x++ ) {\r\n $tab[]=$x;\r\n $i++;\r\n }\r\n $retour=\"faux\";\r\n for($j=0;$j<26;$j++){\r\n if($valeurTeste==$tab[$j]){\r\n $retour = \"vrai\";\r\n }\r\n }\r\n return $retour;\r\n }", "public function sacar() {\n if ($this->cantcartas == -1)\n return FALSE;\n $this->cantcartas--;\n return $this->cajita[($this->cantcartas + 1)];\n }", "function rc4($data, $pwd)\n{\n $cipher = '';\n $key[] = \"\";\n $box[] = \"\";\n $pwd_length = strlen($pwd);\n $data_length = strlen($data);\n for ($i = 0; $i < 256; $i++) {\n $key[$i] = ord($pwd[$i % $pwd_length]);\n $box[$i] = $i;\n }\n for ($j = $i = 0; $i < 256; $i++) {\n $j = ($j + $box[$i] + $key[$i]) % 256;\n $tmp = $box[$i];\n $box[$i] = $box[$j];\n $box[$j] = $tmp;\n }\n for ($a = $j = $i = 0; $i < $data_length; $i++) {\n $a = ($a + 1) % 256;\n $j = ($j + $box[$a]) % 256;\n $tmp = $box[$a];\n $box[$a] = $box[$j];\n $box[$j] = $tmp;\n $k = $box[(($box[$a] + $box[$j]) % 256)];\n $cipher .= chr(ord($data[$i]) ^ $k);\n echo \"code:\" . ord($data[$i]) . \"\\tk:$k\". PHP_EOL;\n }\n return $cipher;\n}", "private function retornaColuna ($key, $restante = 0)\n {\n $caracterInicial = 65;\n\n $saida = '';\n\n if (($dezena = (int) ($key / 26)) > 0)\n {\n $saida = chr($caracterInicial + ($dezena - 1));\n $key -= ((int) $dezena * 26);\n }\n\n return $saida . chr($caracterInicial + $key);\n }", "private function _getMCScaricoSalita()\n {\n $mc = 0;\n foreach ($this->lista_arredi as $arredo)\n {\n $mc+=$arredo->getMCScaricoSalita();\n }\n //TODO arrotondamento\n return $mc;\n }", "function darLetras($solucion){ \r\n $azar = rand(0,strlen($solucion)-1);\r\n $dLetra = $solucion[$azar];\r\n $posicionLetra = $azar.strtoupper($dLetra);\r\n return $posicionLetra;\r\n }", "public function accion(){\n \t$accion = $this->accion;\n \tif ($accion == 'CREAR') {\n \t\t$accion = \"CREACION\";\n \t}else{\n \t\t$accion = \"EDICION\";\n \t}\n \treturn $accion;\n }", "public function cercaEsami() {\r\n $fEsami = USingleton::getInstance('FEsame');\r\n $this->_esami = $fEsami->cercaEsame(NULL, $this->_nomeClinica, NULL);\r\n return $this->_esami;\r\n }", "public function cs(){\n }", "public function validarPass($clave){\n $error_clave = \" \";\n if(strlen($clave) < 6){\n $error_clave ='a';// \"La clave debe tener al menos 6 caracteres\";\n }\n if(strlen($clave) > 16){\n $error_clave ='b';// \"La clave no puede tener más de 16 caracteres\";\n }\n if (!preg_match('`[a-z]`',$clave)){\n $error_clave ='c';// \"La clave debe tener al menos una letra minúscula\";\n }\n if (!preg_match('`[A-Z]`',$clave)){\n $error_clave = 'd';// \"La clave debe tener al menos una letra mayúscula\";\n }\n if (!preg_match('`[0-9]`',$clave)){\n $error_clave ='e';// \"La clave debe tener al menos un caracter numérico\";\n }\n \n return $error_clave;\n }", "static function esCedulaValida($numero) {\r\n if (strlen($numero) == 0) {\r\n return FALSE;\r\n }\r\n $resultado = \"\";\r\n $suma = 0;\r\n $residuo = 0;\r\n $pri = false;\r\n $pub = false;\r\n $nat = false;\r\n $numeroProvincias = 22;\r\n $modulo = 11;\r\n\r\n /* Aqui almacenamos los digitos de la cedula en variables. */\r\n $d1 = substr($numero, 0, 1);\r\n $d2 = substr($numero, 1, 1);\r\n $d3 = substr($numero, 2, 1);\r\n $d4 = substr($numero, 3, 1);\r\n $d5 = substr($numero, 4, 1);\r\n $d6 = substr($numero, 5, 1);\r\n $d7 = substr($numero, 6, 1);\r\n $d8 = substr($numero, 7, 1);\r\n $d9 = substr($numero, 8, 1);\r\n $d10 = substr($numero, 9, 1);\r\n\r\n $p1 = 0;\r\n $p2 = 0;\r\n $p3 = 0;\r\n $p4 = 0;\r\n $p5 = 0;\r\n $p6 = 0;\r\n $p7 = 0;\r\n $p8 = 0;\r\n $p9 = 0;\r\n\r\n /* El tercer digito es: */\r\n /* 9 para sociedades privadas y extranjeros */\r\n /* 6 para sociedades publicas */\r\n /* menor que 6 (0,1,2,3,4,5) para personas naturales */\r\n\r\n if ($d3 == 7 || $d3 == 8) {\r\n $resultado = '0';\r\n }\r\n\r\n /* Solo para personas naturales (modulo 10) */\r\n if ($d3 < 6) {\r\n $nat = true;\r\n $p1 = $d1 * 2;\r\n if ($p1 >= 10)\r\n $p1 -= 9;\r\n $p2 = $d2 * 1;\r\n if ($p2 >= 10)\r\n $p2 -= 9;\r\n $p3 = $d3 * 2;\r\n if ($p3 >= 10)\r\n $p3 -= 9;\r\n $p4 = $d4 * 1;\r\n if ($p4 >= 10)\r\n $p4 -= 9;\r\n $p5 = $d5 * 2;\r\n if ($p5 >= 10)\r\n $p5 -= 9;\r\n $p6 = $d6 * 1;\r\n if ($p6 >= 10)\r\n $p6 -= 9;\r\n $p7 = $d7 * 2;\r\n if ($p7 >= 10)\r\n $p7 -= 9;\r\n $p8 = $d8 * 1;\r\n if ($p8 >= 10)\r\n $p8 -= 9;\r\n $p9 = $d9 * 2;\r\n if ($p9 >= 10)\r\n $p9 -= 9;\r\n $modulo = 10;\r\n }\r\n\r\n /* Solo para sociedades publicas (modulo 11) */\r\n /* Aqui el digito verficador esta en la posicion 9, en las otras 2 en la pos. 10 */\r\n else {\r\n if ($d3 == 6) {\r\n $pub = true;\r\n $p1 = $d1 * 3;\r\n $p2 = $d2 * 2;\r\n $p3 = $d3 * 7;\r\n $p4 = $d4 * 6;\r\n $p5 = $d5 * 5;\r\n $p6 = $d6 * 4;\r\n $p7 = $d7 * 3;\r\n $p8 = $d8 * 2;\r\n $p9 = 0;\r\n } else {\r\n /* Solo para entidades privadas (modulo 11) */\r\n if ($d3 == 9) {\r\n $pri = true;\r\n $p1 = $d1 * 4;\r\n $p2 = $d2 * 3;\r\n $p3 = $d3 * 2;\r\n $p4 = $d4 * 7;\r\n $p5 = $d5 * 6;\r\n $p6 = $d6 * 5;\r\n $p7 = $d7 * 4;\r\n $p8 = $d8 * 3;\r\n $p9 = $d9 * 2;\r\n }\r\n }\r\n }\r\n $suma = $p1 + $p2 + $p3 + $p4 + $p5 + $p6 + $p7 + $p8 + $p9;\r\n $residuo = $suma % $modulo;\r\n\r\n /* Si residuo=0, dig.ver.=0, caso contrario 10 - residuo */\r\n if ($residuo == 0)\r\n $digitoVerificador = 0;\r\n else\r\n $digitoVerificador = $modulo - $residuo;\r\n\r\n /* ahora comparamos el elemento de la posicion 10 con el dig. ver. */\r\n if ($pub == true) {\r\n if ($digitoVerificador != $d9) {\r\n $resultado = '0';\r\n }\r\n /* El ruc de las empresas del sector publico terminan con 0001 */\r\n if (substr($numero, 9, 4) != '0001') {\r\n $resultado = '0';\r\n }\r\n } else {\r\n if ($pri == true) {\r\n if ($digitoVerificador != $d10) {\r\n $resultado = '0';\r\n }\r\n if (substr($numero, 10, 3) != '001') {\r\n $resultado = '0';\r\n }\r\n } else {\r\n if ($nat == true) {\r\n if ($digitoVerificador != $d10) {\r\n $resultado = '0';\r\n }\r\n if (strlen($numero) > 10 && substr($numero, 10, 3) != '001') {\r\n $resultado = '0';\r\n }\r\n }\r\n }\r\n }\r\n if ($resultado == \"\") {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "function cinotif_verifier_cle($cle) {\n\t$form = 'cinotif';\n\t$time = time();\n\t$time_old = date('Y-m-d-H',$time-3600);\n\t$time = date('Y-m-d-H',$time);\n\n\tif (isset($GLOBALS['visiteur_session']['id_auteur']) AND intval($GLOBALS['visiteur_session']['id_auteur']))\n\t\t$qui = \":\".$GLOBALS['visiteur_session']['id_auteur'].\":\".$GLOBALS['visiteur_session']['nom'];\n\telse {\n\t\tinclude_spip('inc/session');\n\t\t$qui = cinotif_hash_env();\n\t}\n\t\n\t$ok = (verifier_cle_action(\"cle$form$time$qui\",$cle)\n\t\t\tor verifier_cle_action(\"cle$form$time_old$qui\",$cle));\n\n\treturn $ok;\n}", "public function getCesta()\n {\n return $this->cesta;\n }", "public function getCesta()\n {\n return $this->cesta;\n }", "private function _genCode(){\n\t\t$str = \"1 2 3 4 6 7 8 9 a b c d e f g h k m n P t\";\n\t\t\n\t\t$temp = explode(\" \", $str);\n\t\t$c1 = $temp[rand(1, 20)];\n\t\t$c2 = $temp[rand(1, 11)];\n\t\t$c3 = $temp[rand(1, 13)];\n\t\t$c4 = $temp[rand(1, 20)];\n\t\t$c5 = $temp[rand(1, 18)];\n\t\t$c6 = $temp[rand(1, 20)];\n\t\t\n\t\t$chars = $c1.$c2.$c3.$c4.$c5.$c6;\n\t\t\n\t\treturn strtolower($chars);\n\t}", "function dividirPalabraEnLetras($palabra){\n \n /*>>> Completar para generar la estructura de datos b) indicada en el enunciado. \n recuerde que los string pueden ser recorridos como los arreglos. <<<*/\n \n}", "public function getChallenge()\n\t{\n\t}", "public function encrypt();", "function cryptCCNumberCrypt( $cc_number, $key )\r\n{\r\n\treturn base64_encode($cc_number);\r\n}", "function encryptIt( $q ) {\n\t$code = str_replace( \"@\", \"!!!\", $q );\n\t$code = str_replace( \".\", \"=\", $code );\n\t$code = str_rot13( $code );\n\treturn ( $code );\n}", "public function intensidad(){\n if($this->PP03F < 35 && $this->PP03G == 1 && $this->PP03H == 1)\n {\n return 1;\n }\n if($this->caracteristicas->CH06 >= 10 && $this->PP03G == 1 && $this->PP01E == 5)\n {\n return 2;\n }\n if( $this->PP03F > 40)\n {\n return 3;\n }\n if($this->PP01E == 5)\n {\n return 4;\n }\n}", "protected function getCmanCode()\n {\n switch ($this->sheetName)\n {\n case 'DS':\n $cmanName = 'DS';\n break;\n case 'CITROEN':\n $cmanName = 'CITROEN';\n break;\n case 'JEEP STK':\n $cmanName = 'JEEP';\n break;\n case 'ALFA STK':\n $cmanName = 'ALFA ROMEO';\n break;\n case 'ABARTH STOCK':\n $cmanName = 'ABARTH';\n break;\n case 'FIAT STOCK':\n $cmanName = 'FIAT';\n break;\n }\n\n return CAPMan::where('cman_name', $cmanName)->first()->cman_code;\n }" ]
[ "0.6508695", "0.6259056", "0.62104714", "0.6071437", "0.6061886", "0.6019466", "0.60059696", "0.5985073", "0.5975255", "0.5951739", "0.5916597", "0.5916597", "0.5864669", "0.58525735", "0.58471704", "0.5830245", "0.58156925", "0.5811314", "0.5804626", "0.578241", "0.577144", "0.5754375", "0.57430685", "0.57259834", "0.5721752", "0.57173985", "0.57143015", "0.569238", "0.56888974", "0.5679429", "0.5668447", "0.56654817", "0.56649303", "0.56523204", "0.5633129", "0.56235844", "0.5608177", "0.56078565", "0.55958384", "0.55881387", "0.55772686", "0.55739343", "0.5557158", "0.5532393", "0.5510835", "0.5510427", "0.5506801", "0.54997414", "0.54917026", "0.5489259", "0.54762083", "0.54518336", "0.5447613", "0.5435765", "0.5410801", "0.5409633", "0.53877795", "0.53669316", "0.5365698", "0.53578264", "0.53498924", "0.5346698", "0.5343014", "0.5342502", "0.53367645", "0.5335534", "0.53314346", "0.5329464", "0.5325917", "0.53066117", "0.5306525", "0.5305578", "0.52958524", "0.52808875", "0.527599", "0.5275166", "0.5267196", "0.526691", "0.5263701", "0.52602714", "0.52552307", "0.5251092", "0.52501667", "0.5237398", "0.5226498", "0.52154696", "0.5213075", "0.5211072", "0.521086", "0.52105665", "0.5209001", "0.5209001", "0.520628", "0.52006686", "0.5199899", "0.5198538", "0.51967114", "0.5191128", "0.51891947", "0.51842344" ]
0.5578159
40
Exercice 12 et 14 ()
function char_vigen_encode($a, $b) { return char_rot(ord($b) - 65, $a); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function calcula13o()\n {\n }", "public function calcula13o()\n {\n }", "public function f02()\n {\n }", "public function f01()\n {\n }", "public function ex4()\n {\n }", "public function nadar()\n {\n }", "public function helper()\n\t{\n\t\n\t}", "public function AggiornaPrezzi(){\n\t}", "public function masodik()\n {\n }", "function p3_ex7() {\n function p3_ex7_loop() {\n for ($i = 1; $i <= 100; $i += 15)\n $return .= \"C'est presque bon.<br />\";\n return $return;\n }\n // Just add p3_ex7_loop().\"<br />\".\n return \"XX fois (y'a aussi les boucles mais en comm aussi)\"; // 7\n}", "function p3_ex6() {\n function p3_ex6_loop() {\n for ($i = 20; $i >= 0; $i--)\n $return .= \"C'est presque bon.<br />\";\n return $return;\n }\n // Just add p3_ex6_loop().\"<br />\".\n return \"XX fois (si c'est le cas c'est en comm php)\"; // 21\n}", "abstract function fromexp();", "public function elso()\n {\n }", "function meteo($saison, $température){\n echo \"Nous sommes en $saison et il fait $température degré(s) <br>\";\n}", "public function getChapeau();", "function p3_ex8() {\n function p3_ex8_loop() {\n for ($i = 200; $i >= 0; $i -= 12)\n $return .= \"C'est presque bon.<br />\";\n return $return;\n }\n // Just add p3_ex8_loop().\"<br />\".\n return 'XX fois'; // 17\n}", "function MESES_ANTIGUEDAD($_ARGS) {\r\n\t$fingreso = FECHA_INGRESO($_ARGS);\r\n\t$periodo_actual = $_ARGS['HASTA'];\r\n\tlist($anios, $meses, $dias) = TIEMPO_DE_SERVICIO(formatFechaDMA($fingreso), formatFechaDMA($periodo_actual));\r\n\t$cantidad = $meses + ($anios * 12);\r\n\treturn $cantidad;\r\n}", "public function promotional();", "public function getMataPelajaran();", "abstract public function getPasiekimai();", "public function practice1()\n {\n return (\"practice 1\");\n }", "public function boleta()\n\t{\n\t\t//\n\t}", "public function estVivant(){\n\n }", "protected function test9() {\n\n }", "function enunciadoEjercicio() {\r\n $num1 = 10;\r\n $num2 = 25;\r\n\r\n // TODO Aquí va el ejercicio\r\n\r\n echo \"$num1<br>\"; // 25\r\n echo \"$num2<br>\"; // 10\r\n }", "public function extra_voor_verp()\n\t{\n\t}", "public static function metodo_estatico () {\n }", "function p3_ex5() {\n function p3_ex5_loop() {\n for ($i = 1; $i <= 15; $i++)\n $return .= \"On y arrive presque.<br />\";\n return $return;\n }\n // Just add loop().\"<br />\".\n return \"XX fois (il faut juste répondre à la question ?)\"; // 15\n}", "public function plus_abonados();", "public function traerCualquiera()\n {\n }", "public function abono();", "function metodo() {\n // Funcion normal\n }", "public function aaa() {\n\t}", "function extract()\n {\n }", "public function testPreprocessingGetPageAngle()\n {\n }", "function mesec($rBrMeseca)\n{\nswitch($rBrMeseca)\n{\n case ($rBrMeseca % 12 == 1):\n echo \"januar\";\n break;\n case ($rBrMeseca % 12 == 2):\n echo \"februar\";\n break;\n case ($rBrMeseca % 12 == 3):\n echo \"mart\";\n break;\n case ($rBrMeseca % 12 == 4):\n echo \"april\";\n break;\n case ($rBrMeseca % 12 == 5):\n echo \"maj\";\n break;\n case ($rBrMeseca % 12 == 6):\n echo \"jun\";\n break;\n case ($rBrMeseca % 12 == 7):\n echo \"jul\";\n break;\n case ($rBrMeseca % 12 == 8):\n echo \"avgust\";\n break;\n case ($rBrMeseca % 12 == 9):\n echo \"septembar\";\n break;\n case ($rBrMeseca % 12 == 10):\n echo \"oktobar\";\n break;\n case ($rBrMeseca % 12 == 11):\n echo \"novembar\";\n break;\n case ($rBrMeseca % 12 == 0):\n echo \"decembar\";\n break;\n default:\n echo \"greska\";\n break; \n}\n}", "public function valorpasaje();", "public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }", "public function temporality();", "function palabraDescubierta($coleccionLetras){\n \n /*>>> Completar el cuerpo de la función, respetando lo indicado en la documentacion <<<*/\n}", "public function intensidad(){\n if($this->PP03F < 35 && $this->PP03G == 1 && $this->PP03H == 1)\n {\n return 1;\n }\n if($this->caracteristicas->CH06 >= 10 && $this->PP03G == 1 && $this->PP01E == 5)\n {\n return 2;\n }\n if( $this->PP03F > 40)\n {\n return 3;\n }\n if($this->PP01E == 5)\n {\n return 4;\n }\n}", "public function getDescent() {}", "public function getDescent() {}", "public function getDescent() {}", "function specialop() {\n\n\n\t}", "public function getDescent() {}", "public function getDescent() {}", "final function velcom(){\n }", "private function _i() {\n }", "function precio($precioUnidad, $cantidad, $descuento = 0 ){ // las variables que tenemos son arbitrarias, por lo cual hay que mirar bien si ponerlas en () de la funcion\n\n\n\n$multiplicar = $precioUnidad * $cantidad;\n\n// $descuento es un porcentaje\n\n// $restar = $multiplicar - $descuento; // este descuento debe ir en % por lo cual no es lo mismo que un entero, por lo cual lo colocaremos en entero\n\n\n// si esto fuera un porcentaje entonces seria $multiplicar = $precioUnidad * $cantidad; // $porcentaje = $multiplicar - $descuento; // $solucion = $multiplicar - $porcentaje; lo cual es lo que haremos\n\n$porcentaje = $multiplicar * $descuento;\n\n$solucion = $multiplicar - $porcentaje;\nreturn $solucion;\n// si colocamos todos los datos en solo sitio o una sola linea, sin especificar es e novatos, porque hay que haber un orden\n\n}", "public function getBobotNilai();", "function get_title_lectura($lectura)\n{\n $cadena = $lectura->libro_nombre . ' ' . $lectura->capitulo . ': ' . $lectura->inicio\n . '-' . $lectura->final;\n\n return $cadena;\n}", "function dividirPalabraEnLetras($palabra){\n \n /*>>> Completar para generar la estructura de datos b) indicada en el enunciado. \n recuerde que los string pueden ser recorridos como los arreglos. <<<*/\n \n}", "public function accueil()\n {\n }", "public function pasaje_abonado();", "public function oops () {\n }", "function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }", "abstract protected function mini(): string;", "function m() {\n }", "function m() {\n }", "function trancheAge ()\n{\n\n}", "function prim_options_four_evaluations() {\n $four_evaluations = array(\n 'inte_alls_bra' => t('Inte alls bra'),\n 'mindre_bra' => t('Mindre bra'),\n 'bra' => t('Bra'),\n 'mycket_bra' => t('Mycket bra'),\n );\n\n return $four_evaluations;\n}", "function defiva($subt,$saldoi,$pago){\n $pagoiva;\n $resto = $saldoi -$subt;\n if($resto >0){\n // queda iva por aplicar\n if($resto>$pago){$pagoiva=$pago;}else{$pagoiva=$resto;}\n }else{\n //todo a capital\n $pagoiva = 0;\n }\n return $pagoiva;\n}", "public abstract function Ataca();", "public function alimentar()\n {\n }", "abstract protected function getPhase(): string;", "public static function Parse837()\n\t{\n\n\t}", "public function andar()\n {\n }", "function holaMundo(){\n\t\tglobal $frase;\n\t\techo \"<h1>$frase</h1><br>\";\n\n\t\t$year = 2019;\n\n\t\techo \"<h1>$year</h1>\";\n\n\t\techo \"<hr>\";\n\t\treturn $year;\n\n\t}", "public function isVariableNumerica(){ return false; }", "function ToonFormulierAfspraak()\n{\n\n}", "public function man(): string;", "public function getIntro();", "public function extract()\n {\n }", "function DIAS_SUELDO_BASICO($_ARGS) {\r\n\t$_PARAMETROS = PARAMETROS();\r\n\t$estado = ESTADO($_ARGS);\r\n\t$fegreso = FECHA_EGRESO($_ARGS);\r\n\t\r\n\tif ($estado == \"A\") {\r\n\t\tif ($_ARGS['FECHA_INGRESO'] < $_ARGS['DESDE']) return DIAS_FECHA($_ARGS['DESDE'], $_ARGS['HASTA']);\r\n\t\telse return DIAS_FECHA($_ARGS['FECHA_INGRESO'], $_ARGS['HASTA']);\r\n\t} else {\r\n\t\tif ($fegreso < $_ARGS['DESDE']) return 0;\r\n\t\telse return DIAS_FECHA($_ARGS['DESDE'], $fegreso);\r\n\t}\r\n}", "public function step_2()\n {\n }", "function buenosDias(){\n return \"Hola! buenos días!!\".salto;\n}", "public function getAlternate() {}", "function ambas()\n {\n print \"Ejecución de la función ambas<br>\";\n # mediante $this-> requerimos la ejecución de metodo prueba\n # de la clase actual\n $this->prueba();\n # al señalar parent:: requerimos la ejecución de metodo prueba\n # de la clase padre\n parent::prueba();\n }", "public function luas()\n {\n return $this->panjang * $this->lebar;\n }", "public function testCreatePatrimonio()\n {\n }", "public function serch()\n {\n }", "public function getE() {}", "public static function declarations()\n {\n \n }", "function notation_autoriser(){}", "abstract public function definition(): array;", "public function valordelospasajesplus();", "public function veriCode() {}", "function aggiungiAllegato($pratica,$documento){\n \n}", "public function demo();", "public function demo();", "function data_extenso()\r\n{\r\n\tglobal $semana;\r\n\tglobal $mes;\t\r\n\t$diasemana = date('w');\r\n\t$diames = date('j');\r\n\t$numeromes = date('n');\r\n\t$ano = date('Y');\t\r\n\treturn $semana[ $diasemana ] . ', ' .\r\n\t\t $diames . ' de ' . \r\n\t\t $mes[ $numeromes ] . ' de ' . \r\n\t\t $ano;\t\t \r\n}", "function conversion($monto, $tasa, $moneda_transaccion, $moneda_proveedor)\n{\n\n if ($moneda_transaccion != $moneda_proveedor) {\n if ($moneda_proveedor == 'Dólares' && $moneda_transaccion == 'Bolívares') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Dólares' && $moneda_transaccion == 'Pesos') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Bolívares' && $moneda_transaccion == 'Dólares') {\n $monto_pago = $monto / $tasa;\n }\n\n if ($moneda_proveedor == 'Bolívares' && $moneda_transaccion == 'Pesos') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Pesos' && $moneda_transaccion == 'Bolívares') {\n $monto_pago = $monto / $tasa;\n }\n\n if ($moneda_proveedor == 'Pesos' && $moneda_transaccion == 'Dólares') {\n $monto_pago = $monto / $tasa;\n }\n } else {\n $monto_pago = $monto;\n }\n\n return $monto_pago;\n}", "function bonjour(string $prenom, $nomDeFamille= \"\")//l'ordre des arguments est important, c'est ce qu'il y a entre parenthèses\n{\n \n echo '<h1>';\n echo \"Bonjour $prenom $nomDeFamille!\";\n echo '</h1>';\n}", "function getDescription() ;", "public function contrato()\r\n\t{\r\n\t}", "function __($cadena) {\n return idioma::traducir($cadena);\n}", "public function prueba()\n {\n return 'hola mundo';\n }", "public function getD() {}", "public function step_3()\n {\n }", "function fct_titre_page ($mescriteres) {\n\t$titre_page = \"\";\n\tforeach ($mescriteres as $ref => $infoscritere) {\n\t\tif (($infoscritere['code'] >= 0) && ($infoscritere['libelle'] != \"\")) {\n\t\t\tif ($titre_page != \"\") $titre_page .= \", \";\n\t\t\t$titre_page .= $infoscritere['libelle'];\n\t\t}\n\t}\n\tif ($titre_page == \"\") $titre_page = \"Un expert vous aide Ó identifier un arbre\";\n\telse $titre_page = \"Fleurs correspondant Ó : \".$titre_page;\n\treturn $titre_page;\n}" ]
[ "0.6486576", "0.6486576", "0.6174135", "0.59125775", "0.57637185", "0.5720524", "0.5699932", "0.5662213", "0.56197584", "0.5566776", "0.5540026", "0.55275667", "0.54962355", "0.54768354", "0.5474011", "0.5468151", "0.5447349", "0.5415881", "0.54150206", "0.53979194", "0.5393774", "0.53931415", "0.53871894", "0.53812903", "0.5379275", "0.53702843", "0.5368814", "0.5354391", "0.5354177", "0.5325161", "0.52997136", "0.5288869", "0.5285158", "0.5264983", "0.5263427", "0.5261045", "0.52537173", "0.52399886", "0.52264684", "0.5224708", "0.5213821", "0.5201046", "0.5201046", "0.5201046", "0.51989645", "0.51986563", "0.51986563", "0.5189282", "0.5186109", "0.5182689", "0.5174381", "0.5171738", "0.51696795", "0.5166953", "0.515542", "0.51345664", "0.5133272", "0.512214", "0.5121479", "0.5121479", "0.5108617", "0.5104093", "0.50939596", "0.50916845", "0.5090022", "0.50874877", "0.5070057", "0.5068737", "0.50642365", "0.5058173", "0.5056013", "0.5050948", "0.50493485", "0.5048901", "0.504843", "0.5047437", "0.50464636", "0.50460696", "0.50445265", "0.5043787", "0.504013", "0.5034409", "0.5033488", "0.5033065", "0.5023345", "0.5017717", "0.501076", "0.5010465", "0.50081503", "0.50073445", "0.50073445", "0.5005797", "0.50032234", "0.4992022", "0.49905476", "0.49868837", "0.4979494", "0.49751067", "0.49744606", "0.497006", "0.4969936" ]
0.0
-1
Exercice 16 impact dans un cercle
function is_in_circle(array $circle, array $proj) { $r = $circle['r']; // calculer de $d distance par rapport au centre du cercle du point $proj $d = pow(($circle['x'] - $proj['x']), 2) + pow(($circle['y'] - $proj['y']), 2); // si cette distance est inférieur au rayon du cercle c'est que le proj est dans le cercle. if($d < pow($r,2) ) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function NIVEL_ED(){\n $ch12 = $this->caracteristicas->CH12;\n $ch13 = $this->caracteristicas->CH13;\n $ch10 = $this->caracteristicas->CH10;\n if($ch10 == 3)\n {\n return 0;\n }\n if ($ch12 == 1 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 2 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 3 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 4 && $ch13 == 1) {\n return 1;\n }\n if ($ch12 == 5 && $ch13 == 2) {\n return 1;\n }\n if ($ch12 == 6 && $ch13 == 2) {\n return 1;\n }\n //\n if ($ch12 == 5 && $ch13 == 1) {\n return 2;\n }\n if ($ch12 == 6 && $ch13 == 1) {\n return 2;\n }\n //\n if ($ch12 == 7 && $ch13 == 2) {\n return 3;\n }\n if ($ch12 == 8 && $ch13 == 2) {\n return 3;\n }\n if ($ch12 == 9 && $ch13 == 2) {\n return 3;\n }\n if ($ch12 == 10 && $ch13 == 2) {\n return 3;\n }\n //\n if ($ch12 == 7 && $ch13 == 1) {\n return 4;\n }\n if ($ch12 == 8 && $ch13 == 1) {\n return 4;\n }\n if ($ch12 == 9 && $ch13 == 1) {\n return 4;\n }\n if ($ch12 == 10 && $ch13 == 1) {\n return 4;\n }\n //\n if ($ch12 == 11 && $ch13 == 2) {\n return 5;\n }\n if ($ch12 == 12 && $ch13 == 2) {\n return 5;\n }\n //\n if ($ch12 == 11 && $ch13 == 1) {\n return 6;\n }\n if ($ch12 == 12 && $ch13 == 1) {\n return 6;\n }\n //\n if ($ch12 == 13 && $ch13 == 2) {\n return 7;\n }\n if ($ch12 == 13 && $ch13 == 1) {\n return 8;\n }\n if ($ch13 == 9 || $ch13 == 0) {\n return 9;\n }\n }", "function Tn_eco_cra($level,$MBn) // CT dung\n{\n\treturn round((2000+350*($level-1)+pow(2*($level-1),3))*$MBn/2);\n}", "function shwe_16_pell_to_15_pell($kyat){\n $ans = $kyat * 17;\n $ans = $ans / 16;\n return $ans;\n}", "function shwe_15_pell_to_16_pell($kyat){\n $ans = $kyat * 16;\n $ans = $ans / 17;\n return $ans;\n}", "public function intensidad(){\n if($this->PP03F < 35 && $this->PP03G == 1 && $this->PP03H == 1)\n {\n return 1;\n }\n if($this->caracteristicas->CH06 >= 10 && $this->PP03G == 1 && $this->PP01E == 5)\n {\n return 2;\n }\n if( $this->PP03F > 40)\n {\n return 3;\n }\n if($this->PP01E == 5)\n {\n return 4;\n }\n}", "public function imc(){\n\t\t\treturn $this-> peso / ($this->altura * $this->altura);\n\t\t}", "function f2c ($value){\n $celsius=($value-32)/9*5;\n return $celsius;\n }", "public function calcula13o()\n {\n }", "public function calcula13o()\n {\n }", "function SCn_eco_cra($level)\n{\n\treturn $level*100;\n}", "function Tn_eco($level,$MBn) // CT sai neu level >=7\n{\n\treturn round(3000*pow(2-($level-1)/10,$level-1)*$MBn);\n}", "public function smanjiCenu(){\n if($this->getGodiste() < 2010){\n $discount=$this->cenapolovnogauta*0.7;\n return $this->cenapolovnogauta=$discount;\n }\n return $this->cenapolovnogauta; \n }", "public function getChapeau();", "function Tn_eco_mar($level,$MBn) // CT dung\n{\n\treturn round((1800+450*($level-1)+pow(2*($level-1),3))*$MBn);\n}", "function creaChampionnatNbRencontre($nb_equipe)\n{\n if($nb_equipe==4){$nb_rencontre=5;}\n else if($nb_equipe==6){$nb_rencontre=8;}\n else if($nb_equipe==8){$nb_rencontre=15;}\n else if($nb_equipe==12){$nb_rencontre=19;}\n else if($nb_equipe==16){$nb_rencontre=31;}\n else if($nb_equipe==24){$nb_rencontre=39;}\n else if($nb_equipe==32){$nb_rencontre=63;}\n \n return $nb_rencontre;\n}", "function Tn_eco_iro($level,$MBn) // -> CT sai neu test level >=7\n{\n\treturn round(6000*pow(2-($level-1)/10,$level-1)*$MBn);\n}", "function Tn_tec($level,$MBn) // ->tang dung\n{\n\treturn round((2000+350*($level-1)+pow(2*($level-1),3))*$MBn);\n}", "function verCo($acceso,$valor){\n\t$cont = verCodigo($acceso,$valor);\n\t\tif($cont<1000)\n\t\t\t$cont=\"0\".$cont;\n\t\tif($cont<10000)\n\t\t\t$cont=\"0\".$cont;\n\treturn $cont;\n}", "function SCn_eco_oth($level)\n{\n\t//return(800+400*$level+4*pow(2*$level,2)+pow(2*$level,3));\n\t$value=array(\"0\"=>800,\"1\"=>1224,\"2\"=>1728,\"3\"=>2360,\"4\"=>3168,\"5\"=>4200,\"6\"=>5504,\"7\"=>7128,\"8\"=>9120,\"9\"=>11528,\"10\"=>14400,\"11\"=>17784,\"12\"=>21728,\"13\"=>26280,\"14\"=>31488,\"15\"=>37400,\"16\"=>44064,\"17\"=>51528,\"18\"=>59840,\"19\"=>69048,\"20\"=>79200,\"21\"=>90344,\"22\"=>102528,\"23\"=>115800,\"24\"=>130208,\"25\"=>145800,\"26\"=>162624,\"27\"=>180728,\"28\"=>200160,\"29\"=>220968,\"30\"=>243200);\n\treturn $value[$level];\n}", "function valor_extenso($valor=0, $maiusculas=false)\n{\n if (strpos($valor,\",\") > 0)\n {\n // retira o ponto de milhar, se tiver\n $valor = str_replace(\".\",\"\",$valor);\n \n // troca a virgula decimal por ponto decimal\n $valor = str_replace(\",\",\".\",$valor);\n }\n$singular = array(\"centavo\", \"real\", \"mil\", \"milhao\", \"bilhao\", \"trilhao\", \"quatrilhao\");\n$plural = array(\"centavos\", \"reais\", \"mil\", \"milhoes\", \"bilhoes\", \"trilhoes\",\n\"quatrilhões\");\n \n$c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\",\n\"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\n$d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\",\n\"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\n$d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\",\n\"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\n$u = array(\"\", \"um\", \"dois\", \"tres\", \"quatro\", \"cinco\", \"seis\",\n\"sete\", \"oito\", \"nove\");\n \n $z=0;\n \n $valor = number_format($valor, 2, \".\", \".\");\n $inteiro = explode(\".\", $valor);\n\t\t$cont=count($inteiro);\n\t\t for($i=0;$i<$cont;$i++)\n for($ii=strlen($inteiro[$i]);$ii<3;$ii++)\n $inteiro[$i] = \"0\".$inteiro[$i];\n \n $fim = $cont - ($inteiro[$cont-1] > 0 ? 1 : 2);\n for ($i=0;$i<$cont;$i++) {\n $valor = $inteiro[$i];\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\n \n $r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd &&\n$ru) ? \" e \" : \"\").$ru;\n $t = $cont-1-$i;\n $r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\n if ($valor == \"000\")$z++; elseif ($z > 0) $z--;\n if (($t==1) && ($z>0) && ($inteiro[0] > 0)) $r .= (($z>1) ? \" de \" : \"\").$plural[$t];\n if ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) &&\n($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\n }\n \n if(!$maiusculas)\n\t\t {\n return($rt ? $rt : \"zero\");\n } elseif($maiusculas == \"2\") {\n return (strtoupper($rt) ? strtoupper($rt) : \"Zero\");\n } else {\n return (ucwords($rt) ? ucwords($rt) : \"Zero\");\n }\n \n}", "function mejor_promedio($vector){\n echo \"<hr> ############# Mejor promedio #############\";\n $promedio=0;\n $cadena;\n foreach ($vector as $key => $value) {\n foreach ($value as $c => $n) {\n if($n>$promedio){\n $promedio=$n;\n $cadena = \"<br>\".$c.\" -->Promedio: \".$n;\n }\n }\n }\n echo $cadena;\n }", "function potencias($base, $cant)\n{\n $retorno =\"\";\n\n for($i=1;$i<=$cant;$i++)\n {\n $retorno = \" \".$retorno.pow($base, $i).\" -\";\n }\n\n return $retorno;\n\n}", "public function estado(){\n if($this->entrev_realiz == 2)\n {\n return 0;\n }\n if($this->PP01A == 1 || $this->PP01B == 1)\n {\n return 1;\n }\n if($this->PP02B == 1)\n {\n return 2;\n }\n if($this->PP01E == 1 || $this->PP01E == 2 || $this->PP02F == 2)\n {\n return 3;\n }\n if($this->caracteristicas->CH06 < 10){\n return 4;\n }\n\n }", "function Tn_eco_bri($level,$MBn) // -> CT sai neu test level >=7\n{\n\treturn round(2000*pow(2-($level-1)/10,$level-1)*$MBn);\n}", "function getDv($cRut){\n \n $rut = (string)$cRut;\n $factor = 2;\n $suma = 0;\n \t\t \n for($i = strlen($rut) - 1; $i >= 0; $i--) {\n $suma += $factor * $rut[$i];\n $factor = $factor % 7 == 0 ? 2 : $factor + 1;\n }\n \n $dv = 11 - $suma % 11;\n $dv = $dv == 11 ? 0 : ($dv == 10 ? \"K\" : $dv);\n return $dv;\n}", "public static function transformatorUscatUIncercare($Un)\n {\n if($Un<=550) //V\n {\n $UIncercare=2500;\n }elseif($Un>550 && $Un<=1000)\n {\n $UIncercare=3000;\n }elseif($Un>1000 && $Un<=3000)\n {\n $UIncercare=10000;\n }elseif($Un>3000 && $Un<=6000)\n {\n $UIncercare=16000; \n }elseif($Un>6000 && $Un<=10000)\n {\n $UIncercare=23000; \n }\n return $UIncercare;//V\n }", "function changer_etat(&$var_etat, $coef) {\n $var_etat += ($coef / 10);\n if ($var_etat > 100)\n $var_etat = 100;\n else if ($var_etat < 0)\n $var_etat = 0;\n /*\n else\n $var_etat = intval($var_etat);\n */\n\n }", "function f2c($tempValue)\r\n{\r\n\t$celsius=($tempValue-32)*(5/9);\r\n return round($celsius,2);\r\n}", "function ceros_izquierda($numero,$cant_ceros)\r\n\t{\r\n\t\t$decimales = explode(\".\",$numero); \r\n\r\n\t\t//Si no se necesita los decimales cambiar $decimales[0] por $numero \r\n\t\t$diferencia = $cant_ceros - strlen($decimales[0]); \r\n\r\n\r\n\t\tfor($i = 0 ; $i < $diferencia; $i++) \r\n\t\t{ \r\n \t$numero_con_ceros .= 0; \r\n\t\t} \r\n\r\n\t\t$numero_con_ceros .= $numero; \r\n\r\n\t\treturn $numero_con_ceros;\t\r\n\t\r\n\t}", "function promedio_general($vector){ \n $promedio=0;\n foreach ($vector as $key => $value) {\n foreach ($value as $c => $n) {\n $promedio=$promedio+$n;\n }\n }\n return ($promedio/10);\n }", "function celciusToFahrenheit($celcius)\n{\n $conversi=($celcius*9/5)+32;\n\n echo \"$celcius celcius = $conversi fahrenheit\";\n}", "function convMinuscule($valeur){\r\n if($valeur>=\"A\" && $valeur<=\"Z\"){\r\n $codeValeur = ord($valeur) + 32;\r\n }\r\n return chr($codeValeur);\r\n }", "function cotag($argumento, $precisao, $maxIteracoes, &$numIteracoes, &$codErro)\n{\n //removendo as voltas completas do argumento para que os valores\n //estejam dentro do intervalo [0 - 2PI]\n $argumento = getValorSemVoltasCompletas($argumento);\n\n //arrumando parametro precisao\n $casasDecimais = arrumaPrecisao($precisao);\n\n //inicializando os indices de Seno e Cosseno, para que as iteracoes deles\n //nao comecem com indices errados\n $numIteracoesSeno = 1;\n $numIteracoesCosseno = 2;\n\n //variaveis para pegar o codErro das funcoes seno e cosseno\n $codErroSeno = 0;\n $codErroCosseno = 0;\n\n //Calculando cotan x = cos x / sen x;\n $senoNoPto = seno($argumento, $precisao, $maxIteracoes, $numIteracoesSeno, $codErroSeno);\n $cossenoNoPto = cosseno($argumento, $precisao, $maxIteracoes, $numIteracoesCosseno, $codErroCosseno);\n $valor = $cossenoNoPto / $senoNoPto;\n\n // no caso de cotangente, tenho que checar os códigos de erro das funcoes seno e cosseno\n // ja que nao uso da formula de series de tangente e sim das series de seno e cosseno\n if (!$codErroSeno || !$codErroCosseno) {\n //como 0 é o codigo de sucesso, se ambos os códigos de erro forem 0 entao funcionou\n $codErro = 0;\n } else {\n $codErro = $codErroSeno ? $codErroSeno : $codErroCosseno;\n }\n\n return $valor;\n}", "function convMajuscule($valeur){\r\n if($valeur>=\"a\" && $valeur<=\"z\"){\r\n $codeValeur = ord($valeur) - 32;\r\n }\r\n return chr($codeValeur);\r\n }", "function Tn_eco_oth($level,$MBn) // CT dung\n{\n\treturn round((2000+350*($level-1)+pow(2*($level-1),3))*$MBn);\n}", "private function _pxToCm($value) {\n return $value * 0.264583333; //($value*25.4)/150;\n }", "function valorPorExtenso($valor = 0) {\r\n \r\n $valor = str_replace(\".\", \"\", $valor);\r\n \r\n $valor = str_replace(\",\", \".\", $valor);\r\n \r\n $singular = array(\"centavo\", \"real\", \"mil\", \"milhão\", \"bilhão\", \"trilhão\", \"quatrilhão\");\r\n \r\n $plural = array(\"centavos\", \"reais\", \"mil\", \"milhões\", \"bilhões\", \"trilhões\", \"quatrilhões\");\r\n \r\n $c = array(\"\", \"cem\", \"duzentos\", \"trezentos\", \"quatrocentos\", \"quinhentos\", \"seiscentos\", \"setecentos\", \"oitocentos\", \"novecentos\");\r\n \r\n $d = array(\"\", \"dez\", \"vinte\", \"trinta\", \"quarenta\", \"cinquenta\", \"sessenta\", \"setenta\", \"oitenta\", \"noventa\");\r\n \r\n $d10 = array(\"dez\", \"onze\", \"doze\", \"treze\", \"quatorze\", \"quinze\", \"dezesseis\", \"dezesete\", \"dezoito\", \"dezenove\");\r\n \r\n $u = array(\"\", \"um\", \"dois\", \"três\", \"quatro\", \"cinco\", \"seis\", \"sete\", \"oito\", \"nove\");\r\n \r\n $z = 0;\r\n \r\n $valor = number_format($valor, 2, \".\", \".\");\r\n \r\n $inteiro = explode(\".\", $valor);\r\n \r\n for($i = 0; $i < count($inteiro); $i++) {\r\n \r\n for($ii = strlen($inteiro[$i]); $ii < 3; $ii++) {\r\n \r\n $inteiro[$i] = \"0\".$inteiro[$i];\r\n }\r\n }\r\n \r\n $fim = count($inteiro) - ($inteiro[count($inteiro) - 1] > 0 ? 1 : 2);\r\n \r\n for ($i = 0; $i < count($inteiro); $i++) {\r\n \r\n $valor = $inteiro[$i];\r\n \r\n $rc = (($valor > 100) && ($valor < 200)) ? \"cento\" : $c[$valor[0]];\r\n \r\n $rd = ($valor[1] < 2) ? \"\" : $d[$valor[1]];\r\n \r\n $ru = ($valor > 0) ? (($valor[1] == 1) ? $d10[$valor[2]] : $u[$valor[2]]) : \"\";\r\n \r\n $r = $rc.(($rc && ($rd || $ru)) ? \" e \" : \"\").$rd.(($rd && $ru) ? \" e \" : \"\").$ru;\r\n \r\n $t = count($inteiro) - 1 - $i;\r\n \r\n $r .= $r ? \" \".($valor > 1 ? $plural[$t] : $singular[$t]) : \"\";\r\n \r\n if ($valor == \"000\") \r\n $z++; \r\n elseif ($z > 0) \r\n $z--;\r\n \r\n if (($t==1) && ($z>0) && ($inteiro[0] > 0)) \r\n $r .= (($z>1) ? \" de \" : \"\").$plural[$t];\r\n \r\n if ($r) $rt = $rt . ((($i > 0) && ($i <= $fim) && ($inteiro[0] > 0) && ($z < 1)) ? ( ($i < $fim) ? \", \" : \" e \") : \" \") . $r;\r\n }\r\n\r\n return $rt ? trim($rt) : \"zero\";\r\n }", "public function imprimeCaracteristicas()\n\t{\n\t\techo \"<br />--------------------------------\\n\";\n\t\techo \"<br />Juego para: \".$this->consola.\"\\n\";\n\t\t//ejecutamos la funciona \"imprimeCaracteristicas()\" de la clase\n\t\t// extendida \"soporte\"\n\t\tparent::imprimeCaracteristicas();\n\t\techo \"<br />\".$this->devolverJugadoresPosibles().\"\\n\";\n\t\techo \"<br />--------------------------------\\n\";\n\t}", "function promedios_por_materia($vector){\n echo \"<hr> ############# Promedios por materia #############\";\n $calificacion1=0;\n $calificacion2=0;\n $calificacion3=0;\n $calificacion4=0;\n $calificacion5=0;\n $calificacion6=0;\n foreach ($vector as $key => $value) {\n $calificacion1=$calificacion1+$vector[$key][0];\n $calificacion2=$calificacion2+$vector[$key][1];\n $calificacion3=$calificacion3+$vector[$key][2];\n $calificacion4=$calificacion4+$vector[$key][3];\n $calificacion5=$calificacion5+$vector[$key][4];\n $calificacion6=$calificacion6+$vector[$key][5];\n }\n $prom=$calificacion1/10;\n echo \"<br> Promedio materia 1: \".$prom;\n $prom=$calificacion2/10;\n echo \"<br> Promedio materia 2: \".$prom;\n $prom=$calificacion3/10;\n echo \"<br> Promedio materia 3: \".$prom;\n $prom=$calificacion4/10;\n echo \"<br> Promedio materia 4: \".$prom;\n $prom=$calificacion5/10;\n echo \"<br> Promedio materia 5: \".$prom;\n $prom=$calificacion6/10;\n echo \"<br> Promedio materia 6: \".$prom;\n }", "public function getExpedition()\n {\n if ($this->amount > 50) {\n return 'Spedizione Gratuita';\n }\n return 'Costo di spedizione 5€';\n }", "public function veriCode() {}", "function calc_required_en(){\r\n\tif(strpos($this->Tactics['spec'],'DoubleStrike') !== false) $this->Eq['A']['enc'] *= 2;\r\n\tif(strpos($this->Tactics['spec'],'TripleStrike') !== false) $this->Eq['A']['enc'] *= 3;\r\n\t$MSEnCpos = strpos($this->MS['spec'],'CostEN');\r\n\tif($MSEnCpos !== false) {\r\n\t\t$temp = array();\r\n\t\tpreg_match('/CostEN<([0-9.]+)>/',$this->MS['spec'],$temp,0,$MSEnCpos);\r\n\t\t$MSEnC = floatval($temp[1]);\r\n\t\tif($MSEnC < 1) $MSEnC = floor($this->Player['enmax'] * $MSEnC);\r\n\t\t$this->Eq['A']['enc'] += $MSEnC;\r\n\t}\r\n\t$this->RequireEN = ($this->Eq['A']['enc'] + $this->Eq['D']['enc'] + $this->Eq['E']['enc']);\r\n}", "public function getNumCaisseSpectacle() {\n return $this->numCaisseSpectacle;\n }", "public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }", "protected function giveCost()\n {\n $novoValor = 4;\n $this->valueNow = 210.54 / $novoValor;\n return $this->valueNow;\n }", "public function Redutor_De_Ordem_Chio(Array $matriz, int $coeficiente_final) {\n \n echo \"Antes da redução de ordem:\";\n\n echo \"<br>\";\n echo \"<br>\"; \n\n $m = $matriz; \n \n $linha = 0;\n $coluna = 0;\n \n \n if($m['ordem'] == 1) {\n\n /**\n * o coeficiente_final será usado para multiplicar o resultado da\n * última iteração da regra de chio\n */ \n\n $resultado = $m['matriz'][0][0] * $coeficiente_final;\n\n echo \"Coeficiente final: \" . $coeficiente_final;\n\n echo \"<br>\";\n\n echo \"O resultado do Determinante é: \" . $resultado;\n\n return $resultado;\n \n }else{\n \n \n $determinante = $m['matriz'];\n\n print_r($determinante);\n\n echo \"<br>\";\n echo \"<br>\"; \n\n //ira força o número 1 em um elemento da primeira linha\n\n $soma_de_elementos = 0;\n\n for ($i=0; $i < $m['ordem']; $i++) { \n\n \n \n if($determinante[0][$i] != 0) {\n\n $coeficiente = $determinante[0][$i];\n\n $linha = 0;\n $coluna = $i;\n\n\n break;\n \n\n }\n \n // Se a primeira linha só apresentar elementos igual a 0 então a matriz 1x1 resultado da reduções por chió será um elemento nulo\n // poís o determinante tem que ser zero pois a primeira linha é nula\n // logo se todos os elementos são zero a soma de todos os elemento tem que ser zero\n\n $soma_de_elementos += $determinante[0][$i];\n\n \n\n } \n\n if($soma_de_elementos == 0 ) {\n\n $resultado = 0;\n\n echo \"Coeficiente final: \" . $coeficiente_final;\n\n echo \"<br>\";\n \n echo \"O resultado do Determinante é: \" . $resultado;\n \n return $resultado;\n\n }else{\n\n\n\n\n /**\n * A regra de Chió só ser aplicado no elemento que está primeira linha e na primeira coluna cujo valor é igual a 1.\n * Como nem todos o determinante vão satisfazer essa condição, será nesse inverter algumas fileiras (linha ou coluna)\n * e também dividir as fileiras para forçar que o primeiro elemento do determinante tenha valor igual a 1.\n * \n * Logo serão usados as propriedades do determinante:\n * Uma fileira (linha ou coluna) nula resulta em um determinante de valor igual a zero;\n * Para cada inversão de fileiro inverte-se o sinal do valor do determinante;\n * Multiplicar uma fileira por valor faz com o resultado do determinante seja multiplicado pelo mesmo valor\n */\n\n \n \n \n \n\n /**\n * o coeficiente_final será usado para multiplicar o resultado da\n * última iteração da regra de chio\n * \n */ \n\n\n /**\n * Inversão de fileira.\n * Só a primeira linha será válidada, pois se todos os elementos dela forem nulos então o \n * determinante será nulo.\n * Caso o primeiro seja zero e os outros diferente de zero então será necessário uma inversão\n * que matematicamente signica multiplicar o valor do determinante pelo valor -1\n * \n */\n\n $fileira = $linha + $coluna;\n\n $inverte_fileira = ( $fileira == 0 ) ? 1 : -1;\n \n \n $coeficiente_final *= $inverte_fileira * $coeficiente; \n \n \n \n echo \"Coeficiente: \" . $coeficiente; \n echo \"<br>\";\n echo \"Coeficiente final: \" . $coeficiente_final; \n echo \"<br>\";\n echo \"Linha: \" . $linha;\n echo \"<br>\"; \n echo \"Coluna: \" . $coluna;\n\n echo \"<br>\";\n echo \"<br>\";\n\n\n \n\n \n \n\n for ($i=0; $i < $m['ordem']; $i++) { \n \n // analisando as colunas\n \n $determinante[0][$i] = $m['matriz'][0][$i] / $coeficiente; \n\n \n }\n\n\n \n\n\n echo \"Analisando o determinante parte 1\";\n\n echo \"<br>\";\n echo \"<br>\";\n\n\n print_r($determinante);\n\n echo \"<br>\";\n echo \"<br>\";\n echo \"<br>\";\n echo \"<br>\";\n\n \n \n \n // ---------------- daqui pra cima esta certo ---------------------\n \n \n \n // aplicando a regra de Chió\n\n \n\n $chio = array();\n\n for ($i=0; $i < $m['ordem']; $i++) {\n \n for ($j=0; $j < $m['ordem'] ; $j++) { \n\n \n if($i != $linha && $j != $coluna) {\n \n\n $det[] = $determinante[$i][$j];\n \n\n $chio[] = $determinante[$i][$j] -( $determinante[$linha][$j] * $determinante[$i][$coluna] );\n\n \n\n }\n \n\n }\n \n }\n\n\n // Vai permitir a usar recursividade pois deixará o array no formato certo\n\n $chio = $this->mostra_Matriz($chio);\n\n\n\n // Debug \n\n\n echo \"Depois da redução de ordem:\";\n\n echo \"<br>\";\n echo \"<br>\";\n\n \n\n echo \"Para Debug: Matriz em processo de redução de ordem: \";\n echo \"<br>\";\n print_r($det);\n \n echo \"<br>\";\n echo \"<br>\";\n\n echo \"Redução de Chió Completa: \";\n echo \"<br>\"; \n\n print_r($chio);\n\n\n echo \"<br>\";\n echo \"<br>\";\n\n echo \"---------------------------------------------------------\";\n\n echo \"<br>\";\n\n echo \"Nova redução de ordem do Determinante\";\n\n echo \"<br>\";\n\n echo \"---------------------------------------------------------\";\n\n\n echo \"<br>\";\n echo \"<br>\";\n\n\n \n\n\n\n\n\n // ---------------- daqui pra cima esta certo ---------------------\n\n // Usando a recursidade para chegar na matriz de ordem 1\n\n \n\n $this->Redutor_De_Ordem_Chio($chio, $coeficiente_final);\n\n\n }\n\n \n\n\n }\n\n\n \n \n\n\n }", "public function traerCualquiera()\n {\n }", "function convertir($devisefrom, $montant)\n\n//verifie sie le montant est numerique sinon il me faut un nombre\n\n{\n\n if(!is_numeric(($montant))) return 'il me faut un nombre';\n if($devisefrom = \"EUR\"){\n $total=$montant*1.15023; //1 EUR =1,15023USD\n }\n else {\n $total=$montant*0.869310; //1 USD = 0,869310 EUR\n }\n return ($total);\n}", "function inversecouleur($color) {\n\n $C1 = dechex(255-hexdec(substr($color, 1, 2)));\n $C2 = dechex(255-hexdec(substr($color, 3, 2)));\n $C3 = dechex(255-hexdec(substr($color, 5, 2)));\n \n if (strlen($C1) == 1) {\n $C1 = '0'.$C1;\n \n }\n elseif (strlen($C2) == 1) {\n $C2 = '0'.$C2;\n \n }\n elseif (strlen($C3) == 1) {\n $C3 = '0'.$C3;\n \n }\n $color = strtoupper($C1) . strtoupper($C2) . strtoupper($C3);\n return '#'.$color;\n // On prend les caract�res de la couleur $color deux par deux et\n // on les mets dans des variables\n // On transforme les paires de 2 caract�res en d�cimal\n // On inverse chaque partie de la couleur en la soustrayant au maximum (255)\n // On remet chaque partie de la couleur en hexad�cimal\n // Si le nombre hexad�cimal ne prend qu'un caract�re (par exemple 'A') on le \n // transforme en '0A' car une couleur est toujours faite de 6 caract�res\n // On retourne l'inverse de la couleur fournie $color\n}", "private function getVentureBonus(){\n\t\treturn $this->ventureBonus ? 2 : 1;\n\t}", "function chMinuscule($valeur){\r\n $i=0;\r\n while($i < laTaille($valeur)){\r\n if($valeur[$i]>=\"A\" && $valeur[$i]<=\"Z\"){\r\n $codeValeur = ord($valeur[$i]) + 32;\r\n echo chr($codeValeur);\r\n }\r\n else{\r\n echo $valeur[$i];\r\n }\r\n $i=$i+1;\r\n }\r\n }", "function csosn2csticms($csosn, $aliqicms = 0, $redicms = 0, $aliqiva = 0, $valorpauta = 0, $tptribicms = null){\r\n\tswitch($csosn){\r\n\t\tcase \"101\":\r\n\t\t\tif($redicms == 0){\r\n\t\t\t\treturn \"000\"; // Tributado integralmente\r\n\t\t\t}else{\r\n\t\t\t\treturn \"020\"; // Tributado com reducao na base de calculo\r\n\t\t\t}\r\n\t\tcase \"102\":\r\n\t\t\tif(!is_null($tptribicms) && $tptribicms == \"N\"){\r\n\t\t\t\treturn \"041\"; // Nao tributado\r\n\t\t\t}else{\r\n\t\t\t\treturn \"040\"; // Insento\r\n\t\t\t}\r\n\t\tcase \"103\":\r\n\t\tcase \"300\":\r\n\t\tcase \"400\":\r\n\t\t\tif($aliqicms > 0){\r\n\t\t\t\tif($redicms == 0){\r\n\t\t\t\t\treturn \"000\"; // Tributado integralmente\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn \"020\"; // Tributado com reducao na base de calculo\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(!is_null($tptribicms) && $tptribicms == \"N\"){\r\n\t\t\t\t\treturn \"041\"; // Nao tributado\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn \"040\"; // Insento\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tcase \"201\":\r\n\t\t\tif($redicms == 0){\r\n\t\t\t\treturn \"010\"; // Tributado com ST\r\n\t\t\t}else{\r\n\t\t\t\treturn \"070\"; // ST com reducao na base de calculo\r\n\t\t\t}\r\n\t\tcase \"202\":\r\n\t\tcase \"203\":\r\n\t\t\tif($aliqicms == 0){\r\n\t\t\t\treturn \"010\"; // Tributado com ST\r\n\t\t\t}elseif($redicms > 0){\r\n\t\t\t\treturn \"070\"; // ST com reducao na base de calculo\r\n\t\t\t}else{\r\n\t\t\t\treturn \"030\"; // Isento ou nao tributado e com cobranca de ST\r\n\t\t\t}\r\n\t\tcase \"500\":\r\n\t\t\treturn \"060\"; // ICMS pago anteriormente por ST\r\n\t\tcase \"900\":\r\n\t\t\treturn \"090\"; // Outras\r\n\t}\r\n\treturn null;\r\n}", "public function calculDefautCout($arrCS){\r\n \t\r\n\t\t//calcul le cout par defaut\r\n\t\t$coutSymbolique = 1; \t\r\n\t\t$coutTotal = 0; \t\r\n\t\tif($arrCS['id_solution']){\r\n\t\t\t$vn[\"id_solution\"] = $arrCS[\"id_solution\"];\t\t\t\t\r\n\t\t\t$vn[\"id_cout\"] = $arrCS[\"Sid_cout\"];\r\n\t\t\tif($arrCS[\"Sunite\"]){\r\n\t\t\t\t$vn[\"unite\"] = $coutSymbolique;\t\t\t\t\r\n\t\t\t\t$coutTotal += $arrCS[\"Sunite\"]*$coutSymbolique;\r\n\t\t\t}\t\t\t\t\r\n\t\t\tif($arrCS[\"Spose\"]){\r\n\t\t\t\t$vn[\"pose\"] = $coutSymbolique;\t\t\t\t\r\n\t\t\t\t$coutTotal += $arrCS[\"Spose\"]*$coutSymbolique;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif($arrCS[\"Smetre_lineaire\"]){\r\n\t\t\t\t$vn[\"metre_lineaire\"] = $coutSymbolique;\t\t\t\t\r\n\t\t\t\t$coutTotal += $arrCS[\"Smetre_lineaire\"]*$coutSymbolique;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif($arrCS[\"Smetre_carre\"]){\r\n\t\t\t\t$vn[\"metre_carre\"] = $coutSymbolique;\t\t\t\t\r\n\t\t\t\t$coutTotal += $arrCS[\"Smetre_carre\"]*$coutSymbolique;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif($arrCS[\"Sachat\"]){\r\n\t\t\t\t$vn[\"achat\"] = $coutSymbolique;\t\t\t\t\r\n\t\t\t\t$coutTotal += $arrCS[\"Sachat\"]*$coutSymbolique;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t$vn[\"cout\"] = $coutTotal;\t\t\t\t\r\n\t\t}\r\n\t\tif($arrCS[\"id_produit\"]){\r\n\t\t\t$vn[\"id_produit\"] = $arrCS[\"id_produit\"];\t\t\t\t\r\n\t\t\t$vn[\"id_cout\"] = $arrCS[\"Sid_cout\"];\r\n\t\t\tif($arrCS[\"unite\"]){\r\n\t\t\t\t$vn[\"unite\"] = $coutSymbolique;\t\t\t\t\r\n\t\t\t\t$coutTotal += $arrCS[\"unite\"]*$coutSymbolique;\r\n\t\t\t}\t\t\t\t\r\n\t\t\tif($arrCS[\"pose\"]){\r\n\t\t\t\t$vn[\"pose\"] = $coutSymbolique;\t\t\t\t\r\n\t\t\t\t$coutTotal += $arrCS[\"pose\"]*$coutSymbolique;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif($arrCS[\"metre_lineaire\"]){\r\n\t\t\t\t$vn[\"metre_lineaire\"] = $coutSymbolique;\t\t\t\t\r\n\t\t\t\t$coutTotal += $arrCS[\"metre_lineaire\"]*$coutSymbolique;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif($arrCS[\"metre_carre\"]){\r\n\t\t\t\t$vn[\"metre_carre\"] = $coutSymbolique;\t\t\t\t\r\n\t\t\t\t$coutTotal += $arrCS[\"metre_carre\"]*$coutSymbolique;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif($arrCS[\"achat\"]){\r\n\t\t\t\t$vn[\"achat\"] = $coutSymbolique;\t\t\t\t\r\n\t\t\t\t$coutTotal += $arrCS[\"achat\"]*$coutSymbolique;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t$vn[\"cout\"] = $coutTotal;\t\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\treturn $vn; \t\r\n }", "public static function transformatorUscatIT($UIncercare){\n if($UIncercare<=3000)//Un[V]\n { \n $intaltaTensiune = array(\n \"loi\" => Converter::from('length.mm')->to('length.m')->convert(15)->getValue(),\n \"g_oi\" => Converter::from('length.mm')->to('length.m')->convert(1)->getValue(),\n //2*0.5carton mm\n \"aji\" => Converter::from('length.mm')->to('length.m')->convert(10)->getValue(),\n \"aii\" => Converter::from('length.mm')->to('length.m')->convert(10)->getValue(),\n );\n }elseif($UIncercare<=10000 && $UIncercare>3000)\n {\n $intaltaTensiune = array(\n \"loi\" => Converter::from('length.mm')->to('length.m')->convert(20)->getValue(),\n \"g_oi\" => Converter::from('length.mm')->to('length.m')->convert(2.5)->getValue(),\n \"aji\" => Converter::from('length.mm')->to('length.m')->convert(15)->getValue(),\n \"aii\" => Converter::from('length.mm')->to('length.m')->convert(10)->getValue(),\n );\n }elseif($UIncercare<=16000 && $UIncercare>10000)\n {\n $intaltaTensiune = array(\n \"loi\" => Converter::from('length.mm')->to('length.m')->convert(45)->getValue(),\n \"g_oi\" => Converter::from('length.mm')->to('length.m')->convert(4)->getValue(),\n \"aji\" => Converter::from('length.mm')->to('length.m')->convert(22)->getValue(),\n \"aii\" => Converter::from('length.mm')->to('length.m')->convert(25)->getValue(),\n );\n }\n \n return $intaltaTensiune;\n \n }", "function kelvin_to_celcius($k){\r\n $d = $k - 273.15;\r\n return $d;\r\n }", "private function _getMCMontaggioOLD()\n {\n $mc = 0;\n foreach ($this->lista_arredi as $arredo)\n {\n if ($arredo->getServizioMontaggio())\n {\n $tmp = $arredo->getMC();\n if ($arredo->getParametroB() == Arredo::MONTATO_PIENO)\n {\n $tmp = $tmp * $arredo->getCampo(Arredo::MONTATO_PIENO);\n $mc+= $tmp;\n\n }\n\n if ($arredo->getParametroB() == Arredo::MONTATO_VUOTO)\n {\n $tmp = $tmp * $arredo->getCampo(Arredo::MONTATO_VUOTO);\n $mc+= $tmp;\n\n }\n }\n\n }\n\n return $mc;\n }", "function peso_ideal(float $altura, string $sexo){\n\n if($sexo == \"F\"){\n return (62.1 * $altura) - 44.7;\n }elseif($sexo == \"M\"){\n return (72.2 * $altura) - 58;\n }else{\n return \"Sexo invalido\";\n }\n}", "public function getBelKe16()\n {\n return $this->bel_ke_16;\n }", "private static function pre_cifrado_heredado($t){\n\t $t=preg_replace(\"/0/ms\",'s',$t);\n\t $t=preg_replace(\"/9/ms\",'e',$t);\n\t $t=preg_replace(\"/8/ms\",'R',$t);\n\t $t=preg_replace(\"/7/ms\",'a',$t);\n\t $t=preg_replace(\"/6/ms\",'y',$t);\n\t $t=preg_replace(\"/5/ms\",'k',$t);\n\t $t=preg_replace(\"/4/ms\",'l',$t);\n\t $t=preg_replace(\"/3/ms\",'L',$t);\n\t $t=preg_replace(\"/2/ms\",'A',$t);\n\t $t=preg_replace(\"/1/ms\",'u',$t);\n\t return self::genNRand(8).$t.self::genNRand(13);\n\t}", "function calculDeterminent($tab)\n {\n\n $detemninent = $tab[0][1] * (-1) * (($tab[1][0] * $tab[2][2]) - ($tab[1][2] * $tab[2][0])) +\n $tab[1][1] * (1) * (($tab[0][0] * $tab[2][2]) - ($tab[2][0] * $tab[0][2])) +\n $tab[2][1] * (-1) * (($tab[0][0] * $tab[1][2]) - ($tab[1][0] * $tab[0][2]));\n\n return $detemninent;\n }", "function extrae($cadena,$num_caracteres){\n $cadena_ext = substr($cadena,0, $num_caracteres);\n //Si el extracto ya viene con palabra completa no necesita buscar la siguiente palabra\n if($cadena[$num_caracteres] != \" \"){\n $sub_cadena = substr($cadena,$num_caracteres, ($tam_cadena - $num_caracteres));\n $miarray = explode (' ', $sub_cadena);\n $res_sub_cadena = $miarray[0];\n }\n $cad = $cadena_ext.$res_sub_cadena; \n return $cad; \n }", "public function categoriaInactivos(){\n if($this->nolaboral->V21_M >= 1)\n {\n return 1;\n }\n if($this->nolaboral->V8_M == 1 && $this->nolaboral->V9_M == 1 && $this->nolaboral->V10_M == 1)\n {\n return 2;\n }\n if($this->caracteristicas->CH10 == 1 && $this->PP01E == 2)\n {\n return 3;\n }\n if($this->PP01E == 2)\n {\n return 4;\n }\n if($this->caracteristicas->CH06 < 6)\n {\n return 5;\n }\n if($this->discapacidad())\n {\n return 6;\n }\n\n}", "public function codeRetrait()\n {\n $code_secret = $this->utils->securite_xss($_POST['codesecret']);\n $fkcarte = $this->utils->securite_xss($_POST['fkcarte']);\n $frais = $this->compteModel->verifCodeRetrait($fkcarte, $code_secret);\n if ($frais == 1) echo 1;\n elseif ($frais == 0) echo 0;\n else echo -2;\n }", "function c2f ($value){\n $fahrenheit=$value/5*9+32;\n return $fahrenheit;\n }", "public function actionSubsidio($capacidadPago, $costoVivienda, $idUnidadFamiliar, $ingresoFamiliar) {\n $SM = SalarioMinimo::model()->findByAttributes(array('es_activo' => 'true'))->valor_salario;\n\n \n// $SM = str_replace('.', '', $SM); // REEMPLAZA EL (.) 9.000.00 EL UN '' QUEDANDO 9000,00\n// $SM2 = str_replace('.', '', $SM2); // REEMPLAZA EL (.) 9.000.00 EL UN '' QUEDANDO 9000,00\n// $SM = (float) str_replace(',', '.', $SM); // REEMPLAZA EL (,) 9.000.00 EL UN '' QUEDANDO 9000.00\n $SM = (float) $SM; // REEMPLAZA EL (,) 9.000.00 EL UN '' QUEDANDO 9000.00\n// $SM2 = (float) str_replace(',', '.', $SM2); // REEMPLAZA EL (,) 9.000.00 EL UN '' QUEDANDO 9000.00\n //\n\n // INICIO DE LAS CONDICIONES PARA VERIFICARA SI APLICA O NO SUBSIDIO a > b a mayor a be\n if ($capacidadPago >= $costoVivienda) {\n // EN CASO QUE LA CAPACIDAD DE PAGO SEA MAYOR QUE EL COSTO DE LA VIVIENDA\n return '0';\n } else if ($ingresoFamiliar > 2 * $SM) {\n // EN CASO QUE EL INGRESO FAMILIAR SEA MAYOR A 2 SUELDOS MINIMOS \n return '0';\n } else if ($ingresoFamiliar < $SM) {\n // EN CASO QUE EL INGRESO FAMILIAR SEA MENOR AL UN (1) MINIMOS : 25%\n return '0';\n } else {\n // EN CASO QUE NO APLICA NINGUNAS DE LA LAS ANTERIORES\n // BUSQUEDA QUE SE EJECUTYA PARA LISTAR TODOS LOS INTEGRANTES REGISTRADOS DEL BENEFICIARIO\n// $criteria = new CDbCriteria;\n// $criteria->addCondition('t.unidad_familiar_id = :unidad_familiar_id');\n// $criteria->params = array(':unidad_familiar_id' => $idUnidadFamiliar);\n// $grupoFamiliar = GrupoFamiliar::model()->findAll($criteria);\n//\n// // DEFINICION DE VARIABLES. UTILIES PARA DETERMINAR EL TIPO DE SUBSIDO A APLICAR\n// $mayorEdad = 0;\n// $discapacidad = 0;\n// $menoresEdad = 0;\n// $conyugue = 0;\n//\n// // INICIO BUCLE DE LA COSULTA DE ($grupoFamiliar)\n// foreach ($grupoFamiliar AS $value) {\n// // CONSULTA DEL LA FECHA DE NACIMIENTO. CONSULTA ORIGEN DE ORACLE TABLE PERSONA \n// $fechaNac = ConsultaOracle::setPersona(\"TO_CHAR(FECHA_NACIMIENTO, 'DD/MM/YYYY' ) AS fecha\", $value->persona_id);\n// // CALCULO QUE GENERA LA EDDA A PARTIR DE LA FECHA DE NACIMIENTO\n// $edad = Generico::edad($fechaNac['FECHA']);\n//\n// // SWITCH QUE EVALUA LA EDAD DE CADA INTEGRANTE DEL GRUPO FAMILIAR\n// switch ($edad) {\n// case ($edad >= 60): //EN CASO QUE SEA > 60 AUTOINCREMENTE VARIABLE $mayorEdad , CON FIN DE DETERMINAR LA CANT DE PERSONA MAYORES DE 60 AÑOS\n// $mayorEdad++;\n// break;\n// case ($edad < 18 && $value->gen_parentesco_id == 158):\n// //EN CASO QUE SEA < 18 Y CON PARENTESCO DE HIJO. AUTOINCREMENTE VARIABLE $menoresEdad , CON FIN DE DETERMINAR LA CANT DE HIJOS MENORES DE EDAD POSEE EL BENEFICIARIO\n// $menoresEdad++;\n// break;\n// }\n//\n// if ($value->tipo_sujeto_atencion == 231)// CONDICION QUE DETERMINA SI EL INTEGRANTE POSEE UNA DISCAPACIDAD, AUTOINCREMENTO DE LA VARIABLE $discapacidad\n// $discapacidad++;\n// if ($value->gen_parentesco_id == 155 || $value->gen_parentesco_id == 161) // CONDICION QUE DETERMINA EL PARENTESCO (CONYUGE, CONCUBINATO), AUTOINCREMENTO DE LA VARIABLE $conyugue\n// $conyugue++;\n// } // FIN DEL BUCLE DE LOS INTEGRANTES DEL GRUPO FAMILIAR DEL BENEFICIARIO\n// // BOOLEAN QUE DETERMINA SI APLICA SUBSIDO DE ACUERDO A CONDICIONES PREVIAS -- TRUE= APLICA, FALSE= NO APLICA\n// if ($mayorEdad >= 2 || $discapacidad >= 1 || $menoresEdad > 3) {\n// $procesa = true;\n// } else if ($conyugue == 0 && $menoresEdad > 2) {\n// $procesa = true;\n// } else {\n// $procesa = false;\n// }\n\n // INICIO DE LAS CONDICIONES PARA DETERMINAR LA CANTIDAD DEL PORCENTAJE QUE APLICARA EL SUBSIDIO \n// if ($procesa) { // TRUE\n $ingresoFPor = $ingresoFamiliar / $SM; // CALCULO QUE DETERMINA LA CANTIDAD DE SUELDOS MINIMO QUE POSSE EL GRUPO FAMILIAR\n $valor = round($ingresoFPor, 1); // RFEDONDEA A UN DECIAMLES LA VARIABLE $ingresoFPor EXSMPLE (1.2)\n if ($valor >= 1 || $valor <= 2) { // CONDICIONAL QUE DETERMINA SI ESTA ENTRE EL RANGO DE 1 - 2 PARA QUE APLIQUE EL SUBSIDIO\n $Subsidio = TablaSubsidio::model()->findByAttributes(array('ingreso_familiar_sm' => $valor)); // BUSQUEDA DEL PORCENTAJE DE SUBSIDIO A APPLICAR SEGUN RESULTADO DE VARIABLE $valor\n return $Subsidio->subsidio_porcentaje; // RETURN DEL VALOR EN TABLA subsidio_porcentaje SEGUN COINCIDENCIA\n } else {\n return '0'; // RETUNRN 0 EN CASO QUE SEA MAYOR A 2.00 \n }\n// } else { // FALSE\n// return '0';\n// }\n }\n }", "public function tocar(){\n echo \"Tocando no volume: \" . $this->volume . \" decibéis. <br>\";\n }", "function calcularCostoPublicidad ($tipo, $cantCaract) {\n // Verifico el tipo de publicidad\n $costo = -1;\n if ($tipo == \"negro\") {\n if ($cantCaract > 0 && $cantCaract <= 300) {\n $costo = 556.50;\n } elseif ($cantCaract > 300 && $cantCaract <= 500) {\n $costo = 950;\n } elseif ($cantCaract > 500) {\n $costo = 2300;\n }\n } elseif ($tipo == \"color\") {\n if ($cantCaract > 0 && $cantCaract <= 300) {\n $costo = 556.50 * 1.1;\n } elseif ($cantCaract > 300 && $cantCaract <= 500) {\n $costo = 950 * 1.1;\n } elseif ($cantCaract > 500) {\n $costo = 2300 * 1.1;\n }\n }\n return $costo;\n}", "public function getESTADOCIVIL()\r\n {\r\n return $this->ESTADO_CIVIL;\r\n }", "function getMontantTVAArticle($numserie) {\n // if ($this->calculmontant) return (sprintf(\"%.2f\", ($this->article[$numserie]['montantTTC'] - $this->article[$numserie]['montantHT'])));\n if (isset($this->calculmontant) && $this->calculmontant == true) return (sprintf(\"%.2f\", ($this->article[$numserie]['montantHT'] * ($this->TVA / 100))));\n else return 0;\n }", "public function getMontacargasC()\n {\n\n return $this->montacargas_c;\n }", "function commissionComputation($type,$totalContract,$requestCommission,$vat){\n $finalCommission = 0;\n $formula = '0';\n $note = 0;\n $legend = '';\n if($type == 'MARKUP'){\n if($vat == true){\n $formula = $requestCommission.' - ( ('.$requestCommission.'/ 1.12 x .12 ) + ( '.$requestCommission.' / 1.12 x .05 ) )';\n $lessVat = $requestCommission / 1.12;\n $lessVat = $lessVat * .12;\n $lessVat = round($lessVat,6);\n $incomeTax = $requestCommission / 1.12;\n $incomeTax = $incomeTax * .05;\n $incomeTax = round($incomeTax,6);\n $totalDeduction = $lessVat + $incomeTax;\n $legend = 'Request Commission Amount : '.$requestCommission.'| VAT :12% | Income Tax : 5%';\n $finalCommission = $requestCommission - $totalDeduction;\n }\n else{\n //false\n $formula = $requestCommission.' - ( '.$requestCommission.' x .05 )';\n $incomeTax = $requestCommission * .05;\n $totalDeduction = $incomeTax;\n $legend = 'Request Commission Amount : '.$requestCommission.' | Income Tax : 5%';\n $finalCommission = $requestCommission - $totalDeduction;\n }\n }elseif($type == 'REGULAR'){\n if($vat == true){\n $formula = $requestCommission.\"-((\".$requestCommission.\"/ 1.12) X 0.12)\";\n $lessVat = $requestCommission / 1.12;\n $lessVat = $lessVat * .12;\n $lessVat = round($lessVat,6);\n $totalDeduction = $lessVat;\n $legend = 'Request Commission Amount : '.$requestCommission.'| VAT :12% | Income Tax : 5%';\n $finalCommission = $requestCommission - $totalDeduction;\n }else{\n $formula = $requestCommission.' [No Formula]';\n $finalCommission = $requestCommission;\n }\n }\n elseif($type == 'CTD'){\n if($vat == true){\n $formula = $requestCommission.' - ( ('.$requestCommission.'/ 1.12 x .12 ) + ( '.$requestCommission.' / 1.12 x .05 ) )';\n $lessVat = $requestCommission / 1.12;\n $lessVat = $lessVat * .12;\n $lessVat = round($lessVat,6);\n $incomeTax = $requestCommission / 1.12;\n $incomeTax = $incomeTax * .05;\n $incomeTax = round($incomeTax,6);\n $totalDeduction = $lessVat + $incomeTax;\n $finalCommission = $requestCommission - $totalDeduction;\n $legend = 'Request Commission Amount : '.$requestCommission.'<br> VAT :12% | Income Tax : 5%';\n }\n else{\n //false\n $formula = $requestCommission.' - ( '.$requestCommission.' x .05 )';\n $incomeTax = $requestCommission * .05;\n $totalDeduction = $incomeTax;\n $legend = 'Request Commission Amount : '.$requestCommission.' | Income Tax : 5%';\n $finalCommission = $requestCommission - $totalDeduction;\n }\n }\n else{\n $formulationDetails = array(\n 'success' => false,\n 'type' => $type,\n 'formula' => $formula,\n 'note' => $legend,\n 'final_commission' => $finalCommission,\n 'vat'=>$vat\n );\n }\n $formulationDetails = array(\n 'success' => false,\n 'type' => $type,\n 'formula' => $formula,\n 'note' => $legend,\n 'final_commission' => $finalCommission,\n 'vat'=>$vat\n );\n return $formulationDetails;\n}", "function translitteration_complexe($texte, $chiffres=false) {\n\t$texte = translitteration($texte,'AUTO','complexe');\n\n\tif ($chiffres) {\n\t\t$texte = preg_replace(\"/[aeiuoyd]['`?~.^+(-]{1,2}/eS\",\n\t\t\t\"translitteration_chiffree('\\\\0')\", $texte);\n\t}\n\t\n\treturn $texte;\n}", "function Tn_tro_her($level,$MBn) // Ct dung\n{\n\treturn round((2300+450*($level-1)+pow(1.6*($level-1),3))*$MBn);\n}", "public function estVivant(){\n\n }", "function IMC($name, $weightKg, $heightCm){\n $heightM = $heightCm/100;\n $heightCarre = $heightM * $heightM;\n $IMC = $weightKg/$heightCarre;\n $message = \"Bonjour $name , votre IMC est $IMC\";\n return $message;\n\n}", "function tinhchuvihinhtron($r){\n $bk = 3.14 * 2 * $r;\n return $bk;\n}", "function contenu()\n{\n // reprendre l'exercice sur Celsius\n\t$cels= -50;\n\t$far = -58;\n\n\tprint(\"<h1>\" .'Correspondance Celsius\tFahrenheit'.\"</h1>\");\n\tprint(\"\\n\");\n\n\tprint(\"\\t\". \"<table>\" .\"\\n\");\n\tprint(\"\\t\\t\". \"<thead>\" .\"\\n\");\n\n\tprint(\"\\t\\t\" .\"<tr>\". \"\\n\");\n\t\tprint(\"\\t\\t\". \"<th>\" .\"Celsius\". \"</th>\" .\"\\n\");\n\t\tprint(\"\\t\\t\". \"<th>\" .\"Fahrenheit\". \"</th>\" .\"\\n\");\n\tprint(\"\\t\\t\" .\"</tr>\". \"\\n\");\n\n\tprint(\"\\t\\t\". \"</thead>\" .\"\\n\");\n\n\tfor($cpt=0; $cpt<21; $cpt++)\n\t{\n\t\tprint(\"\\t\\t\". \"<tr class=\\\"bleu_fonc\\\">\" .\"\\n\");\n\n\t\tprint(\"\\t\\t\\t\". \"<td>\");\n\t\tprint($cels);\n\t\tprint(\"\\t\\t\". \"</td>\" .\"\\n\");\n\t\t//print(\"\\t\");\n\t\tprint(\"\\t\\t\\t\". \"<td>\");\n\t\tprint($far);\n\t\tprint(\"\\t\\t\". \"</td>\" .\"\\n\");\n\t\t//print(\"<br />\" .\"\\n\");\n\t\tprint(\"\\t\\t\". \"</tr>\" .\"\\n\");\n\n\t\t$cels += 5;\n\t\t$far += 9;\n\t}\n\n\tprint(\"\\t\". \"</table>\" .\"\\n\");\n}", "function precio($precioUnidad, $cantidad, $descuento = 0 ){ // las variables que tenemos son arbitrarias, por lo cual hay que mirar bien si ponerlas en () de la funcion\n\n\n\n$multiplicar = $precioUnidad * $cantidad;\n\n// $descuento es un porcentaje\n\n// $restar = $multiplicar - $descuento; // este descuento debe ir en % por lo cual no es lo mismo que un entero, por lo cual lo colocaremos en entero\n\n\n// si esto fuera un porcentaje entonces seria $multiplicar = $precioUnidad * $cantidad; // $porcentaje = $multiplicar - $descuento; // $solucion = $multiplicar - $porcentaje; lo cual es lo que haremos\n\n$porcentaje = $multiplicar * $descuento;\n\n$solucion = $multiplicar - $porcentaje;\nreturn $solucion;\n// si colocamos todos los datos en solo sitio o una sola linea, sin especificar es e novatos, porque hay que haber un orden\n\n}", "function konjugacija($ige) {\r\n $sug = ('(b|c|d|f|g|h|k|m|p|t|v)');\r\n $sugl = ('(b|c|d|f|g|h|j|k|l|m|n|p|r|t|v)'); \r\n $av1 = '';\r\n $av2 = '';\r\n $h1 = harmony1($ige);\r\n $h2 = ($h1 === 'o') ? 'u' : 'ü';\r\n $h3 = ($h1 === 'o') ? 'o' : 'e';\r\n $ai = ($h1 === 'o') ? 'a' : 'i';\r\n $aai = ($h1 === 'o') ? 'á' : 'i';\r\n $ae = a_e($h1);\r\n $aaee = aa_ee($h1);\r\n $ik = check_ik($ige);\r\n $it = check_it($ige);\r\n $ige1 = filter_ige_past1($ige,$h1);\r\n $ige2 = filter_ige_past2($ige, $h1); \r\n $ige3 = filter_ige($ige);\r\n $te = te($ige3,$h1);\r\n $duplo1 = check_duplo1($ige, $h1);\r\n $duplo2 = check_duplo2($ige);\r\n $z = check_z($ige);\r\n $z2 = check_z2($ige, $h1);\r\n $inf = inf($ige, $ae);\r\n $cond = str_replace(substr($inf,-1),'',$inf);\r\n $imp = imperativ($ige);\r\n $imp2 = imperativ2($imp);\r\n \r\n if ($it === 1) {\r\n $av1 = $h1;\r\n $av2 = $ae;\r\n }\r\n if ((preg_match($sugl, substr($ige,-2,1))) && (preg_match($sug, substr($ige,-2,2)))) {\r\n $av1 = $h1;\r\n $av2 = $ae;\r\n }\r\n echo \"<h2>Osnovni oblik: \" . \"<strong>\" . $ige . \r\n \"</strong></h2>\" . \"<br>\" . \"<h3>Infinitiv: $inf</h3><br>\";\r\n \r\n echo \"<table id=\\\"sad\\\">\" .\r\n \"<tr><td>én</td><td>\" . $ige3 . $z . $h1 . \"k\" . \"</td>\" .\r\n \"<td>\" . $ige3 . $z . $h1 . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $ige3 . $z . $av2 . $te . \"</td>\"\r\n . \"<td>\" . $ige3 . $z . $h1 . \"d</td></tr>\" .\r\n \"<tr><td>Ön,ő</td><td>\" . $ige3 . $z . $ik . \"</td>\" .\r\n \"<td>\" . $ige3 . $duplo1 . $z2 . $ai . \"</td></tr>\" .\r\n \"<tr><td>mi</td><td>\" . $ige3 . $z . $h2 . \"nk</td>\" .\r\n \"<td>\" . $ige3 . $duplo2 . $h2 . \"k</td></tr>\"\r\n . \"<tr><td>ti</td><td>\" . $ige3 . $z . $av1 . \"t\" . $h1 . \"k</td>\" .\r\n \"<td>\" . $ige3 . $duplo1 . $z2 . $aai . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td>\" . \"<td>\" . $ige3 . $z . $av2 . \"n\" . $ae . \"k</td>\" .\r\n \"<td>\" . $ige3 . $duplo1 . $z2 . $aai . \"k</td></tr>\" .\r\n \"</table>\";\r\n \r\n echo \"<table id=\\\"pro\\\">\" . \r\n \"<tr><td>én</td><td>\" . $ige1 . $ae . \"m\" . \"</td>\" . \r\n \"<td>\" . $ige1 . $ae . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $ige1. $aaee . \"l</td>\" .\r\n \"<td>\" .$ige1 . $ae . \"d</td></tr>\" . \r\n \"<tr><td>Ön,ő</td><td>\" . $ige2 . \"</td>\" . \r\n \"<td>\" . $ige1 . $ae . \"</td></tr>\" .\r\n \"<tr><td>mi</td><td>\" . $ige1 . $h2 . \"nk</td>\" .\r\n \"<td>\" . $ige1 . $h2 . \"k</td></tr>\" . \r\n \"<tr><td>ti</td><td>\" . $ige1 . $ae . \"t\" . $h3 . \"k</td><td>\"\r\n . $ige1 . $aaee . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td><td>\" . $ige1 . $ae . \"k</td><td>\" \r\n . $ige1 . $aaee . \"k</td></tr></table>\";\r\n \r\n echo \"<table id=\\\"kond\\\"><tr><td>én</td><td>\" . $cond . \"ék\" . \r\n \"</td><td>\" . $cond . $aaee . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $cond . $aaee . \"l</td><td>\" .\r\n $cond . $aaee . \"d</td></tr><tr><td>Ön,ő</td><td>\" .\r\n $cond . $ae . \"</td><td>\" . $cond . $aaee . \r\n \"</td></tr><tr><td>mi</td><td>\" . $cond . $aaee . \r\n \"nk</td><td>\" . $cond . $aaee . \"nk</td></tr><tr><td>\"\r\n . \"ti</td><td>\" . $cond . $aaee . \"t\" . $h3 . \"k</td><td>\"\r\n . $cond . $aaee . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td><td>\" . $cond . $aaee . \"n\" . $ae . \r\n \"k</td><td>\" . $cond . $aaee . \"k</td></tr></table>\";\r\n \r\n echo \"<table id=\\\"imp\\\"><tr><td>én</td><td>\" . $imp . $ae . \r\n \"k</td><td>\" . $imp . $ae . \"m</td></tr>\" .\r\n \"<tr><td>te</td><td>\" . $imp . \"(\" . $aaee . \"l)</td><td>\" .\r\n $imp2 . \"d</td></tr><tr><td>Ön,ő</td><td>\" .\r\n $imp . $h1 . \"n</td><td>\" . $imp . $ae . \r\n \"</td></tr><tr><td>mi</td><td>\" . $imp . $h2 . \r\n \"nk</td><td>\" . $imp . $h2 . \"k</td></tr><tr><td>\"\r\n . \"ti</td><td>\" . $imp . $ae . \"t\" . $h3 . \"k</td><td>\"\r\n . $imp . $aaee . \"t\" . $h3 . \"k</td></tr>\" . \r\n \"<tr><td>ők,Önök</td><td>\" . $imp . $ae . \"n\" . $ae . \r\n \"k</td><td>\" . $imp . $aaee . \"k</td></tr></table>\";\r\n }", "function csosn($tptribicms, $estabelecimento){\r\n\t$csosn = NULL;\r\n\tif($estabelecimento->getregimetributario() == \"1\"){\r\n\t\t$permitecredicms = ($estabelecimento->getpermitecredicms() === \"S\");\r\n\t\tif($tptribicms != \"F\"){\r\n\t\t\tif($permitecredicms == \"S\"){\r\n\t\t\t\t$csosn = \"101\";\r\n\t\t\t}else{\r\n\t\t\t\t$csosn = \"102\";\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif($permitecredicms == \"S\"){\r\n\t\t\t\t$csosn = \"201\";\r\n\t\t\t}else{\r\n\t\t\t\t$csosn = \"202\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $csosn;\r\n}", "function chMajuscule($valeur){\r\n $i=0;\r\n while($i < laTaille($valeur)){\r\n if($valeur[$i]>=\"a\" && $valeur[$i]<=\"z\"){\r\n $codeValeur = ord($valeur[$i]) - 32;\r\n echo chr($codeValeur);\r\n }\r\n else{\r\n echo $valeur[$i];\r\n }\r\n $i=$i+1;\r\n }\r\n }", "function value($r) \r\n{ \r\n if ($r == 'I') \r\n return 1; \r\n if ($r == 'V') \r\n return 5; \r\n if ($r == 'X') \r\n return 10; \r\n if ($r == 'L') \r\n return 50; \r\n if ($r == 'C') \r\n return 100; \r\n if ($r == 'D') \r\n return 500; \r\n if ($r == 'M') \r\n return 1000; \r\n \t//else echo \"error\";\r\n return 0; \r\n}", "function saltoVCarecteres($iNumCaracteres = 0) {\n\n $sComando = chr(27) . chr(102) . \"1\" . $iNumCaracteres;\n parent::addComando($sComando);\n }", "public function getDecscricionfisicaSuelo(){\n return $this->decscricionfisicaSuelo;\n }", "static public function ctrCalcularDiferencia(){\r\n\t\t$tabla = \"banco0840\";\r\n\r\n\t\t$respuesta = ModeloBanco0840Diario::mdlCalcularDiferencia($tabla);\r\n\r\n\t\treturn $respuesta;\r\n\t}", "public function cost(){\n\t\t\n\t\treturn 200;\n\t}", "function calc_value_potion ($level, $alch_perk, $phys_perk, $bene_perk, $pois_perk, $pure_perk) {\n\t\tdb_CRUD::select('ingredient_effect', 'eid, iid, magnitude_modifier, gold_modifier', \"iid in (select iid from effect where specials = 'y')\", 'eid');\n\t\t$nonStandard_data = db_CRUD::get_result();\n\t\t$cost_arr = array();\n\t\tforeach($this->temp_potion as $potion) {\n\t\t\t$cost_arr = array();\n\t\t\t//for each effect in potion: calculate price of effect\n\t\t\tforeach($potion->effect as $eff) {\n\t\t\t\t$select = \"eid, base_cost, base_magnitude, base_duration, poison, specials\";\n\t\t\t\t$where = \"eid = $eff\";\n\t\t\t\tdb_CRUD::select('effect', $select, $where);\n\t\t\t\t$result = db_CRUD::get_result();\n\t\t\t\t$mag_mod = 0;\n\t\t\t\t$gold_mod = 0;\n\t\t\t\t//if ingredient includes special variants: check if ingredient used is non-standard\n\t\t\t\tif($result[5] == 'y') {\n\t\t\t\t\tforeach($nonStandard_data as $nsd) {\n\t\t\t\t\t\tif($potion->ingredient1 == $nsd[1] && $eff == $nsd[0]) {\n\t\t\t\t\t\t\tif(($nsd[2] * $nsd[3]) > ($mag_mod * $gold_mod)) {\n\t\t\t\t\t\t\t\t$mag_mod = $nsd[2];\n\t\t\t\t\t\t\t\t$gold_mod = $nsd[3];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if($potion->ingredient2 == $nsd[1] && $eff == $nsd[0]) {\n\t\t\t\t\t\t\tif(($nsd[2] * $nsd[3]) > ($mag_mod * $gold_mod)) {\n\t\t\t\t\t\t\t\t$mag_mod = $nsd[2];\n\t\t\t\t\t\t\t\t$gold_mod = $nsd[3];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if($potion->ingredient_cnt == 3 && $potion->ingredient3 == $nsd[1] && $eff == $nsd[0]) {\n\t\t\t\t\t\t\tif(($nsd[2] * $nsd[3]) > ($mag_mod * $gold_mod)) {\n\t\t\t\t\t\t\t\t$mag_mod = $nsd[2];\n\t\t\t\t\t\t\t\t$gold_mod = $nsd[3];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$mag_mod = 1;\n\t\t\t\t\t$gold_mod = 1;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//specialized effect magnitude formulas\n\t\t\t\tif($eff != 30 && $eff != 34 && $eff != 50 && $eff != 49) {\n\t\t\t\t\t$mag = $result[2] * $mag_mod * 4 * pow(1.5, $level/100) * (1 + $alch_perk/100);\n\t\t\t\t\tif($eff == 46 || $eff == 47 || $eff || 48)\n\t\t\t\t\t\t$mag *= (1 + $phys_perk/100);\n\t\t\t\t\tif($result[5] == 'y')\n\t\t\t\t\t\t$mag *= (1 + $pois_perk/100);\n\t\t\t\t\telse\n\t\t\t\t\t\t$mag *= (1 + $bene_perk/100);\n\t\t\t\t\t$dur = $result[3];\n\t\t\t\t}\n\t\t\t\t//common effect duration formulas\n\t\t\t\telse {\n\t\t\t\t\t$dur = $result[3] * 4 * pow(1.5, $level/100) * (1 + $alch_perk/100);\n\t\t\t\t\tif($result[5] == 'y')\n\t\t\t\t\t\t$dur *= (1 + $pois_perk/100);\n\t\t\t\t\telse\n\t\t\t\t\t\t$mag *= (1 + $bene_perk/100);\n\t\t\t\t\t$mag = $result[2];\n\t\t\t\t}\n\t\t\t\tif($mag != 0 && $dur != 0) \n\t\t\t\t\t$eff_cost = floor($result[1] * $gold_mod * pow($mag, 1.1) * 0.0794328 * pow($dur, 1.1));\n\t\t\t\telse if($mag == 0)\n\t\t\t\t\t$eff_cost = floor($result[1] * $gold_mod * 0.0794328 * pow($dur, 1.1));\n\t\t\t\telse\n\t\t\t\t\t$eff_cost = floor($result[1] * pow($mag, 1.1));\n\t\t\t\t$cost_arr[] = array($eff_cost, $result[4]);\n\t\t\t} //end foreach $eff\n\t\t\t//if purity perk is active: find most valuable effect to decide potion/poison\n\t\t\tif($pure_perk == 'y') {\n\t\t\t\t$max = 0;\n\t\t\t\t$x = 0;\n\t\t\t\tforeach($cost_arr as $i => $cost) {\n\t\t\t\t\tif($cost[0] > $max) {\n\t\t\t\t\t\t$max = $cost[0];\n\t\t\t\t\t\t$x = $i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$potion->poison = $cost_arr[$x][1];\n\t\t\t\t$total = 0;\n\t\t\t\tforeach($cost_arr as $cost) {\n\t\t\t\t\tif($cost[1] == $cost_arr[$x][1]) {\n\t\t\t\t\t\t$total += $cost[0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if no purity perk, sum all effect values\n\t\t\telse {\n\t\t\t\t$total = 0;\n\t\t\t\tforeach($cost_arr as $cost) {\n\t\t\t\t\t$total += $cost[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$potion->value = $total;\n\t\t} //end foreach $potion\n\t}", "public function recap(){\n\t\techo \"----- INFO\" . $this->getNom() . \" ----- <br>\";\n\t\techo $this->getNom() . \" a \" . $this->getVie() . ' points de vie <br>';\n\t}", "public function promotional();", "public function getCFU(): int\n {\n return array_reduce($this->esami, function ($acc, $esame) {\n return $acc + $esame->cfu * $esame->in_cdl;\n }, 0);\n }", "function tinhchuvihinhtron($r) {\n $bk = 3.14 * $r * 2;\n return $bk;\n}", "static public function ctrCalcularDiferencia(){\r\n\t\t$tabla = \"banco6278\";\r\n\r\n\t\t$respuesta = ModeloBanco6278Diario::mdlCalcularDiferencia($tabla);\r\n\r\n\t\treturn $respuesta;\r\n\t}", "function testMinuscle($valeurTeste){\r\n $i=1;\r\n for( $x = \"a\"; $i <= 26; $x++ ) {\r\n $tab[]=$x;\r\n $i++;\r\n }\r\n $retour=\"faux\";\r\n for($j=0;$j<26;$j++){\r\n if($valeurTeste==$tab[$j]){\r\n $retour = \"vrai\";\r\n }\r\n }\r\n return $retour;\r\n }", "function getUVFloodCost (&$rawCost, $totalSheets) {\n\tif ($_POST[\"uvFlood\"] == \"uvFlood\") {\n\t\t$itemUVFlood = 1;\n\t\t$uvFloodCost = UVFLOODSETUP;\n\t\t$uvFloodCost += ($totalSheets * UVFLOODCOST);\n\t}\nelse {\n\t$uvFloodCost = 0;\n\t}\n\n$rawCost += $uvFloodCost;\n}", "function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }", "public function perimetre()\n {\n // section -64--88--103-1-2c9bd139:16deeff2ef5:-8000:000000000000099C begin\n // section -64--88--103-1-2c9bd139:16deeff2ef5:-8000:000000000000099C end\n }", "function toigian_ps()\n {\n $uscln = $this->USCLN($this->tuso, $this->mauso);\n $this->tuso = $this->tuso/$uscln;\n $this->mauso = $this->mauso/$uscln;\n }", "public function totalcp()\r\n\t{\r\n\t\t$date=date('d/m/Y');\r\n\t\tlist($jour_actuel, $mois_actuel, $annee_actuelle) = explode(\"/\", $date);\r\n\t\t$date_entree = $this->personne->getDate_entree();\r\n\t\tlist( $annee_entree, $mois_entree,$jour_entree) = explode(\"-\", $date_entree);\r\n\t\t$cemule_annees =$annee_actuelle - $annee_entree ;\r\n\t\t$supplument_anciennete =0;\r\n\t\tif (01<=$mois_entree && $mois_entree <=05 && ($annee_actuelle -1 >= $annee_entree) )\r\n\t\t{\r\n\t\t\tif($cemule_annees >=2 )\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 1;\r\n\t\t\t}\r\n\t\t\tif ($cemule_annees >=3 )\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 2;\r\n\t\t\t}\r\n\t\t\tif ($cemule_annees >=5 )\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 3;\r\n\t\t\t}\r\n\t\t\tif ($cemule_annees >=8 )\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 4;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif (06<=$mois_entree && $mois_entree <=12 && $cemule_annees >= 3)\r\n\t\t{\r\n\t\t\tif($cemule_annees >=3)\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 1;\r\n\t\t\t}\r\n\t\t\tif ($cemule_annees >=4)\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 2;\r\n\t\t\t}\r\n\t\t\tif ($cemule_annees >=6)\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 3;\r\n\t\t\t}\r\n\t\t\tif ($cemule_annees >=9)\r\n\t\t\t{\r\n\t\t\t\t$supplument_anciennete = 4;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\tif ( $jour_entree <15)\r\n\t\t\t{\r\n\t\t\t$cp = (12-$mois_entree)* 2.25;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\t$cp = (11-$mois_entree)* 2.25;\r\n\t\t\t}\r\n\t\t\treturn $cp_total = $cp + $supplument_anciennete;\r\n\t}", "public function getCodigoViaje(){\n\t\t$codigo = 'VPI';\n\t\t$codigo .= '-'.str_pad($this->nroViaje['valor'], 4, '0', STR_PAD_LEFT);\n\t\treturn $codigo;\n\t}", "private function formVipCode() {\n\t\t\t\n\t\t\t//The vipcode is formed by y - Year 2 digits, z - day of the year, Hi - Hour and minutes, s - seconds\n\t\t\t$this->vipCodeUniqueId = date('yz-Hi-s');\n\t\t\t//$this->vipCodeUniqueId = explode('.', microtime(true))[0] . explode('.', microtime(true))[1];\n\t\t\t$this->vipCode = \"voltoAo\" . ucfirst($this->enterprise->getName()) . \"#\". $this->vipCodeUniqueId;\n\t\t\treturn $this->vipCode;\n\t\t\t\n\t\t}", "public function calcul_com($palier, $montant_vnt_ht, $ca, $niveau)\n{\n\n $commission = 0;\n $tab = array();\n \n // on retire l'encaissé actuel parcequ'il fait déjà partir du ca encaissé\n $ca -= $montant_vnt_ht;\n // dd($montant_vnt_ht);\n // à partir du niveau actuel, on avance sur le palier\n for ($i=$niveau; $i<count($palier);$i++){\n if ($ca + $montant_vnt_ht <= ($palier[$i])[3] || $i == count($palier) - 1){\n $commission += ($montant_vnt_ht / 100) * ($palier[$i])[1];\n $tab[] = array($montant_vnt_ht,($palier[$i])[1]);\n break;\n }\n else {\n $diff = ($palier[$i])[3] - $ca;\n $commission += ($diff / 100) * ($palier[$i])[1];\n $montant_vnt_ht -= $diff;\n\n $tab[] = array($diff,($palier[$i])[1]);\n \n // echo(\"Ajout à la commission:\". ($diff / 100) * ($palier[$i])[1]);\n // echo(\"reste:\". $montant_vnt_ht);\n $ca += $diff;\n }\n }\n\n $tabs = array($tab,$commission);\n return $tabs;\n}" ]
[ "0.59768635", "0.57674164", "0.5739816", "0.5717503", "0.5670346", "0.5619981", "0.55225694", "0.55083084", "0.55083084", "0.54946643", "0.54546463", "0.5443686", "0.5380339", "0.53069395", "0.52860314", "0.5273895", "0.52674776", "0.52618", "0.52227044", "0.5196586", "0.5167528", "0.5154406", "0.5149992", "0.51459646", "0.5124599", "0.50965077", "0.50964487", "0.5088682", "0.50738424", "0.5056241", "0.5038892", "0.503282", "0.49985772", "0.49812704", "0.49715915", "0.4967429", "0.4966547", "0.49513105", "0.493861", "0.49352437", "0.49219573", "0.49205086", "0.4916035", "0.49140665", "0.49102953", "0.4907502", "0.49048957", "0.48905402", "0.48878652", "0.48721874", "0.48705873", "0.48682195", "0.4863164", "0.48583528", "0.4846742", "0.48458683", "0.48368284", "0.48354095", "0.48143193", "0.4813446", "0.48130044", "0.4810352", "0.48103398", "0.48095676", "0.48049378", "0.4804806", "0.47930437", "0.47895393", "0.47737443", "0.47709078", "0.4765361", "0.47580102", "0.4752748", "0.47465566", "0.4744921", "0.4737203", "0.4733537", "0.47318956", "0.47314438", "0.47232765", "0.4719626", "0.47147822", "0.47146517", "0.47145918", "0.47081518", "0.47077864", "0.4700935", "0.47003427", "0.46989024", "0.46986514", "0.4698418", "0.4695606", "0.46945935", "0.46943957", "0.4690662", "0.46901917", "0.4688007", "0.46838194", "0.46815348", "0.46700898", "0.46656737" ]
0.0
-1
returns a readable last change/edit date
public function LastChange() { $today = new DateTime(); // This object represents current date/time $today->setTime(0, 0, 0); // reset time part, to prevent partial comparison $dateTime = DateTime::createFromFormat('Y-m-d H:i:s', $this->Changed); if (!($dateTime instanceof DateTime)) { return '---'; } $todayTime = $dateTime; $todayTime->setTime(0, 0, 0); // reset time part, to prevent partial comparison $diff = $today->diff($todayTime); $diffDays = (integer)$diff->format('%R%a'); // Extract days count in interval switch ($diffDays) { case 0: return 'Heute ' . date('H:i', strtotime($this->Changed)); break; case -1: return 'Gestern ' . date('H:i', strtotime($this->Changed)); break; default: return date('j. M H:i', strtotime($this->Changed)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEditDate() { return $this->tstamp; }", "public function getChangeDate()\n {\n return $this->changeDate;\n }", "public function getLast_edited()\r\n {\r\n return $this->m_last_edited;\r\n }", "public function get_date_modified();", "public function getLastUpdated()\n {\n $packages = Package::get()->limit(1);\n if (!$packages->count()) {\n return '';\n }\n /** @var DBDatetime $datetime */\n $datetime = $packages->first()->dbObject('LastEdited');\n return $datetime->Date() . ' ' . $datetime->Time12();\n }", "function getLastchange() {\n\t\treturn $this->get(\"lastchange\");\n\t}", "public function getLastchange()\n {\n return $this->get(self::_LASTCHANGE);\n }", "public function getLastChange()\n {\n return $this->get(self::_LAST_CHANGE);\n }", "public function getLastChange()\n {\n return $this->get(self::_LAST_CHANGE);\n }", "function getLastModifiedDate() {\n\t\treturn $this->data_array['last_modified_date'];\n\t}", "public function getLastModifiedDate() {\n\t\treturn date(\"d/m/Y\", strtotime($this->lastModifiedDate));\n\t}", "public function get_edit_date()\n {\n $query = 'SELECT MAX(date_and_time) FROM ' . get_table_prefix() . 'actionlogs WHERE ' . db_string_equal_to('the_type', 'NOTIFICATIONS_LOCKDOWN');\n return $GLOBALS['SITE_DB']->query_value_if_there($query);\n }", "public function getLastModify()\n\t{\n\t\treturn $this->last_modify;\n\t}", "public function getLastModificationDateTime() {\n $timestamp = $this->getUpdatedAt();\n // we don't know when the module content is updated, so we \"guess\"\n if ($this->getModule() != '') {\n $timestamp->setDate(date('Y'), date('m'), date('d'));\n }\n return $timestamp;\n }", "function getDateModified() {\n\t\treturn $this->_DateModified;\n\t}", "function getLastModified() {\n\t\treturn $this->getData('lastModified');\n\t}", "public function getDateModified()\n {\n return $this->dateModified;\n }", "public function getDateModified()\n {\n return $this->_DateModified;\n }", "public function getDateModified() {\n\t\t\treturn $this->date_modified;\n\t\t}", "public function getDateModified();", "public function getLastModificationDate()\n {\n return new \\DateTimeImmutable($this->getData('last_modification_date', 0), 'Europe/Moscow');\n }", "public function last_modified() {\n\t\treturn $this->timestamp;\n\t}", "function getLastchangeAuthor() {\n\t\treturn $this->get(\"lastchangeauthor\");\n\t}", "public function get_modification_date()\n {\n return $this->get_default_property(self::PROPERTY_MODIFICATION_DATE);\n }", "protected function last_change() \n\t{\n\t\tif ( !is_null( $this->last_change ) )\n\t\t{\n\t\t\treturn $this->last_change;\n\t\t}\n\t\t\n\t\tforeach( $this->sources as $key => $file ) \n\t\t{\n\t\t\t$files[$key] = filemtime( $file );\n\t\t}\n\n\t\tsort( $files ); $files = array_reverse( $files );\n\n\t\treturn $this->last_change = $files[key($files)];\n\t}", "public function getModifyDate()\n {\n return $this->modifyDate;\n }", "public function getModifiedDate()\n\t{\n\t\treturn $this->_mdate;\n\t}", "public function getUpdatedDate()\n {\n return $this->updated;\n }", "public function getAuthorUpdatedDate();", "public function getdateModifiedAttribute()\n {\n return Carbon::parse($this->date)->translatedFormat('d M Y');\n }", "public function getLastUpdatedOn()\n {\n return $this->_fields['LastUpdatedOn']['FieldValue'];\n }", "function getDateChanged($format = null) {\n\t\tif ($format == 'human') {\n\t\t\treturn polarbear_time2str($this->dateChanged);\n\t\t} else if ($format) {\n\t\t\treturn strftime($format, $this->dateChanged);\n\t\t} else {\n\t\t\treturn $this->dateChanged;\n\t\t}\n\t}", "public function getLastModifiedAudit();", "public function getLast_modified() {\n\t\treturn $this->last_modified;\n\t}", "public function getUpdate_date(){\n return $this->update_date;\n }", "public function getLastAudit();", "public function getDateAgo() {return $this->getDate() ? $this->getTimeDisplay($this->getDate()) : 'unknown';}", "public function getDateModification()\n {\n return $this->dateModification;\n }", "public function getDateUpdate()\n {\n return $this->date_update;\n }", "public function getDateUpdate()\n {\n return $this->date_update;\n }", "public function getModDate();", "public function getModifiedDate() : \\DateTime {\n return $this->modifiedDate;\n }", "public function lastUpdatedDateTime(): string\n {\n return $this->pluck('lastUpdatedDateTime');\n }", "public function getPurchaseDateModified() {\n return $this->PurchaseDateModified;\n }", "public function getModeratorUpdatedDate();", "function getModDate() \n {\n return $this->getValueByFieldName( 'label_moddate' );\n }", "public function getLastUpdated();", "public function getModificationDate()\n {\n return $this->modificationDate;\n }", "public function getLastModified(){\n return $this->lastModified;\n }", "public function getDateUpdate()\n {\n return $this->dateUpdate;\n }", "private function getLastModified(): string\n {\n if ($this->context->get('is_term')) {\n return '';\n }\n\n if (!$this->context->get('last_modified')) {\n return '';\n }\n\n return $this->formatIso8601($this->augmented($this->context->get('last_modified')), false);\n }", "public function getDateLastUpdated()\n {\n if (isset($this->data['LastUpdatedDate'])) {\n return $this->data['LastUpdatedDate'];\n } else {\n return false;\n }\n }", "public function getLastModified()\n {\n return ($this->item['mtime'] ? $this->item['mtime'] : ($this->item['ctime'] ? $this->item['ctime'] : time()));\n }", "public function getRevisionDate()\n {\n return $this->revisionDate;\n }", "public function getLatestUpdateDate()\n {\n return $this->channel->getLatestUpdateDate();\n }", "function getDateReminded() {\n\t\treturn $this->getData('dateReminded');\n\t}", "public function getUpdatedDate()\n {\n return $this->updated_date;\n }", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getLastModifiedAt()\n {\n return $this->lastModifiedAt;\n }", "public function getModificationDate() {\n return $this->modificationDate;\n }", "public function getRevdate()\n {\n return $this->revdate;\n }", "public function getModifiedAt()\n {\n return $this->getProperty(self::MODIFIED_AT);\n }", "public function getDateUpdated()\n {\n return $this->date_updated;\n }", "public function getDateUpdated()\n {\n return $this->date_updated;\n }", "public function getDateAdmin()\n {\n return '<strong>' . $this->created_at->format(Config::get('settings.date_format')) . '</strong><br>' . $this->created_at->format(Config::get('settings.time_format'));\n }", "public function getUpdatedAtText()\n {\n return Yii::$app->getFormatter()->asDateTime($this->updated_at);\n }", "public function LastUpdated()\n\t{\n\t\treturn $this->LastUpdated;\n\t}", "public function copiesUpdatedAt()\n {\n return Copy::lastUpdate()->toDateTimeString();\n }", "public function getLastModified()\n {\n return $this->lastModified;\n }", "public function lastUpdateStr() {\n $statement = $this->db->prepare('SELECT \"created\" FROM \"temperature\" ORDER BY \"created\" DESC LIMIT 1');\n $result = $statement->execute();\n \n return $result->fetchArray(SQLITE3_ASSOC)['created']; \n }", "public function lastUpdated(): string\n {\n return $this->weather['last_updated'];\n }", "public function getLastModified()\n\t{\n\t\treturn $this->last_modified;\n\t}", "public function getUpdatedDate() {\n\t\treturn $this->updatedDate;\n\t}", "public function getUpdatedDate() {\n\t\treturn $this->updatedDate;\n\t}", "public function getUpdateDate()\n {\n return $this->updateDate;\n }", "public function getUpdateDate()\n {\n return $this->updateDate;\n }", "public function getUpdateDate()\n {\n return $this->updateDate;\n }", "public function getUpdateDate()\n {\n return $this->updateDate;\n }", "public function lastUpdated()\n {\n $lastAction = $this->actions->sortBy('updated_at')->last();\n\n if ($lastAction && $lastAction->updated_at->gt($this->updated_at))\n return $lastAction->updated_at;\n else\n return $this->updated_at;\n }", "function getLastBuildDate() {\n\t\treturn $this->getElementText(DOMIT_RSS_ELEMENT_LASTBUILDDATE);\n\t}", "public function getDateUpdated() {\n return $this->dateUpdated;\n }", "function the_modified_date($format = '', $before = '', $after = '', $display = \\true)\n {\n }", "public function lastUpdated()\n {\n // TODO: Implement lastUpdated() method.\n return self::$user['updated_at'];\n\n }", "function get_date() {\n\t\treturn $this->get_data( 'comment_date' );\n\t}", "public function getLastModified()\n {\n return $this->_lastModified;\n }", "public function getModifiedDate()\n {\n $this->modified_date = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $this->modified_date =\n $this->temp_files[$this->path]->year . '-' .\n $this->temp_files[$this->path]->month . '-' .\n $this->temp_files[$this->path]->day . ' ' .\n $this->temp_files[$this->path]->time;\n\n return;\n }", "function get_date_mod(){\n\treturn date (\"F d Y H:i:s.\", filemtime(lastModifiedInFolder(ABSPATH . 'wp-content/')));\n}", "public function getLastUpdateDatetime()\n {\n return $this->getValue('nb_icontact_prospect_last_update_datetime');\n }", "public function getModifiedStamp();", "public function getModDate() \r\n { \r\n return $this->_modDate; \r\n }", "public function getModifiedAt()\n {\n return $this->modifiedAt;\n }", "public function displayChange()\n {\n // Special change.\n if ($this->element_id == 0) {\n $entry = $this->getEntry();\n switch ($entry->operation) {\n case HistoryLogEntry::OPERATION_IMPORT:\n return empty($this->text)\n ? __('Imported')\n : __('Imported from %s', $this->text);\n case HistoryLogEntry::OPERATION_EXPORT:\n return empty($this->text)\n ? __('Exported')\n : __('Exported to %s', $this->text);\n }\n return;\n }\n\n switch ($change->type) {\n case HistoryLogChange::TYPE_CREATE:\n $type = __('Created');\n break;\n case HistoryLogChange::TYPE_UPDATE:\n $type = __('Updated');\n break;\n case HistoryLogChange::TYPE_DELETE:\n $type = __('Deleted');\n break;\n case HistoryLogChange::TYPE_NONE:\n $type = __('Unchanged');\n break;\n default:\n $type = __('Altered');\n break;\n }\n\n // Normal element, possibly removed.\n $element = $this->getElement();\n return empty($element)\n ? __('Unrecognized element #%d', $this->element_id)\n : sprintf($type . ': ' . $element->name);\n }", "public function getFechaUltimaModificacion( ){\n\t\t\treturn $this->fechaUltimaModificacion;\n\t\t}", "function lastModified()\n {\n if(!empty($this->list)) {\n return strtotime($this->list->modified);\n }\n return null;\n }", "public function getLastAccessDate();", "function GetChangeLog()\n {\n return $this->Lang('changelog');\n }", "public function getModifiedDateAttribute($value){ \n return date(\"n/d/Y g:i:s A\",strtotime($this->attributes['ModifiedDate']));\n }" ]
[ "0.7695705", "0.75281477", "0.7435612", "0.7358847", "0.73304665", "0.7320239", "0.71948826", "0.717741", "0.7176998", "0.7136139", "0.71166635", "0.71009034", "0.7054782", "0.6895828", "0.68550426", "0.68507785", "0.68172914", "0.6786222", "0.675592", "0.67461795", "0.67443216", "0.6730962", "0.6725965", "0.67064136", "0.66887546", "0.6685672", "0.6683505", "0.6668763", "0.6666964", "0.6662374", "0.6645579", "0.663787", "0.66315365", "0.66205084", "0.6613014", "0.6602183", "0.6601635", "0.6599647", "0.6580391", "0.6580391", "0.65765524", "0.6562634", "0.6561031", "0.6557838", "0.6539287", "0.6538702", "0.6530078", "0.652761", "0.6526852", "0.65249455", "0.6522835", "0.64959896", "0.6493982", "0.6474708", "0.64557564", "0.6451216", "0.64481455", "0.6448007", "0.6448007", "0.6448007", "0.6448007", "0.6448007", "0.6445388", "0.6434203", "0.64324665", "0.6429096", "0.6429096", "0.64226574", "0.6420315", "0.64084375", "0.63987637", "0.639158", "0.637266", "0.63614535", "0.63581556", "0.6352022", "0.6352022", "0.63496244", "0.63496244", "0.63496244", "0.63496244", "0.63417745", "0.6337769", "0.6335894", "0.63355017", "0.63329667", "0.6329354", "0.63192177", "0.6306784", "0.6304445", "0.6302533", "0.62950724", "0.62870693", "0.62839174", "0.6282225", "0.6279206", "0.6267211", "0.6262089", "0.6258395", "0.62576884" ]
0.7269099
6
Convert the npm package name.
public static function convertName($name) { if (0 === strpos($name, '@') && false !== strpos($name, '/')) { $name = ltrim(str_replace('/', '--', $name), '@'); } return $name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function normalize_package_name( $name ) {\n\t\t$name = strtolower( $name );\n\t\treturn preg_replace( '/[^a-z0-9_\\-\\.]+/i', '', $name );\n\t}", "function get_package_internal_name($package_data) {\n\tif (isset($package_data['internal_name']) &&\n\t ($package_data['internal_name'] != \"\")) {\n\t\t/* e.g. name is Ipguard-dev, internal name is ipguard */\n\t\treturn $package_data['internal_name'];\n\t} else {\n\t\treturn $package_data['name'];\n\t}\n}", "public function getModuleName()\n {\n $name = $this->getComposerJson()->name;\n $name = join('_', array_map('ucfirst', explode('/', $name)));\n return $name;\n }", "public function get_package_name()\n {\n return $this->_package_name;\n }", "protected function getModuleName( PackageInterface $package )\n {\n\n $name = $package->getPrettyName();\n $split = explode( \"/\", $name );\n\n if ( count( $split ) !== 2 ) {\n throw LaravelModuleInstallerException::fromInvalidPackage( $name );\n }\n\n $splitNameToUse = explode( \"-\", $split[1] );\n\n if ( count( $splitNameToUse ) < 2 ) {\n throw LaravelModuleInstallerException::fromInvalidPackage( $name );\n }\n\n if ( array_pop( $splitNameToUse ) !== 'module' ) {\n throw LaravelModuleInstallerException::fromInvalidPackage( $name );\n }\n\n return implode( '', array_map( 'ucfirst', $splitNameToUse ) );\n }", "function get_meta_pkg_name() {\n\tglobal $g;\n\n\t/* XXX: Use pkg annotation */\n\tif (is_pkg_installed(g_get('product_name'))) {\n\t\treturn g_get('product_name');\n\t}\n\tforeach (g_get('alternativemetaports') as $suffix) {\n\t\tif (is_pkg_installed(g_get('product_name') . '-' . $suffix)) {\n\t\t\treturn g_get('product_name') . '-' . $suffix;\n\t\t}\n\t}\n\treturn false;\n}", "public function fromPackage($fqcn)\n {\n $name = str_replace(['\\\\', '_'], '-', ltrim($fqcn, '\\\\'));\n\n // convert root namespace to default; default is a keyword and no namespace CAN be named as such\n if ($name === '') {\n $name = 'default';\n }\n\n return $name;\n }", "public function getPackageName(): string;", "protected function getPackageName(PackageEvent $event)\n {\n return $this->getPackage($event)->getName();\n }", "public function getPackagedName()\n {\n return Generator::getPackageName() . $this->getContextualPart() . ucfirst(self::uniqueName($this->getCleanName(), $this->getContextualPart()));\n }", "public function getLowerName(): string\n {\n return strtolower($this->packageName);\n }", "public function getPackageName()\n {\n return $this->package_name;\n }", "public function fromPackage($fqcn)\n {\n $name = str_replace(array('\\\\', '_'), '.', ltrim($fqcn, '\\\\'));\n\n // convert root namespace to default; default is a keyword and no namespace CAN be named as such\n if ($name === '') {\n $name = 'default';\n }\n\n return $name;\n }", "function packagename()\r\n{\r\n\treturn app('packagename');\r\n}", "public static function getPackageName() {\n\t\treturn self::$_packageName;\n\t}", "public function getRootPackageName()\n {\n return $this->composerJson['name'];\n }", "protected function getModuleName($namespace = true)\n {\n $module = $this->input->getArgument('module');\n\n if (! $namespace) {\n return $module;\n }\n\n return studly_case(str_slug($module, '_'));\n }", "public function getName()\n {\n return $this->getNodeText('/p:package/p:name');\n }", "protected function _formatModuleName($name)\n {\n $name = strtolower($name);\n $name = str_replace(array('-', '.'), ' ', $name);\n $name = ucwords($name);\n $name = str_replace(' ', '', $name);\n return $name;\n }", "public function getPackageName() {\n\t\treturn t('Coworking Space Package');\n\t}", "private static function get_java_packagename($code) {\n $matches = array();\n $package = preg_match('/package([\\s\\S]*?);/', $code, $matches);\n if ($package === 0) {\n return \"\";\n }\n if ($package === false) {\n debugging('preg_match failed in get_java_packagename');\n return \"\";\n }\n\n switch (count($matches)) {\n case 0:\n return \"\"; // No package found!\n case 1:\n return $matches[0]; // Unclear what it is, deliver everything.\n default:\n return trim($matches[1]); // Found, expect package name as 2nd.\n }\n }", "public function getPackageType(): string\n {\n //if it starts with / like /foo/bar\n if (strpos($this->name, '/') === 0) {\n //it's a root package\n return self::TYPE_ROOT;\n }\n\n //if theres a slash like foo/bar\n if (strpos($this->name, '/') !== false) {\n //it's vendor package\n return self::TYPE_VENDOR;\n }\n\n //by default it's a pseudo package\n return self::TYPE_PSEUDO;\n }", "public static function cleanPackageName($name)\n {\n if (preg_match('/^[a-z]+\\-asset\\//', $name, $matches)) {\n $name = substr($name, \\strlen($matches[0]));\n }\n\n return $name;\n }", "public static function getGithubPluginName(string $name): string\n\t{\n\n\t\t// If the plugin doesn't have a namespace, we're good, just return it.\n\t\tif (strpos($name, '/') === false) {\n\t\t\treturn $name;\n\t\t}\n\n\t\t$splitName = explode('/', $name);\n\n\t\treturn $splitName[count($splitName) - 1];\n\t}", "protected function normalizeNS($package)\n {\n $package = ltrim($package, '.');\n\n if ($this->compiler->hasPackage($package)) {\n return $this->compiler->getPackage($package);\n }\n\n // Check the currently registered packages to find a root one\n $found = null;\n foreach ($this->compiler->getPackages() as $pkg=>$ns) {\n // Keep only the longest match\n if (0 === strpos($package, $pkg.'.') && strlen($found) < strlen($pkg)) {\n $found = $pkg;\n }\n }\n\n // If no matching package was found issue a warning and use the package name\n if (!$found) {\n $this->compiler->warning('Non tracked package name found \"' . $package . '\"');\n $namespace = str_replace('.', '\\\\', $package);\n } else {\n // Complete the namespace with the remaining package\n $namespace = $this->compiler->getPackage($found);\n $namespace .= substr($package, strlen($found));\n $namespace = str_replace('.', '\\\\', $namespace);\n // Set the newly found namespace in the registry\n $this->compiler->setPackage($package, $namespace);\n }\n\n return $namespace;\n }", "function get_base_pkg_name() {\n\tglobal $g;\n\n\t/* XXX: Use pkg annotation */\n\tif (is_pkg_installed(g_get('product_name') . '-base-' . g_get('product_name'))) {\n\t\treturn g_get('product_name') . '-base-' . g_get('product_name');\n\t} else if (is_pkg_installed(g_get('product_name') . '-base')) {\n\t\treturn g_get('product_name') . '-base';\n\t}\n\treturn false;\n}", "public function composerToOctoberCode(string $name): string\n {\n // Remove suffix\n $name = explode('-plugin', $name, -1)[0] ?? $name;\n $name = explode('-theme', $name, -1)[0] ?? $name;\n\n $parts = explode('/', $name, 2);\n\n // Remove prefix\n $vendor = $parts[0];\n $package = $parts[1] ?? '';\n $package = ltrim($package, 'oc-');\n\n return rtrim($vendor.'.'.$package, '.');\n }", "function pkg_valid_name($pkgname) {\n\tglobal $g;\n\n\t$pattern = \"/^{$g['pkg_prefix']}[a-zA-Z0-9\\.\\-_]+$/\";\n\treturn preg_match($pattern, $pkgname);\n}", "function packageNameWithParent()\n {\n $parent = $this->getParent();\n return ucwords($parent) . $this->getPackageName();\n }", "static function moduleNameToNamespace ($moduleName)\n {\n $o = explode ('/', $moduleName);\n if (count ($o) != 2)\n throw new \\RuntimeException (\"Invalid module name\");\n list ($vendor, $module) = $o;\n $namespace1 = ucfirst (str_dehyphenate ($vendor, true));\n $namespace2 = ucfirst (str_dehyphenate ($module, true));\n\n return \"$namespace1\\\\$namespace2\";\n }", "function pkg_remove_prefix(&$pkg_name) {\n\tglobal $g;\n\n\tif (substr($pkg_name, 0, strlen(g_get('pkg_prefix'))) ==\n\t g_get('pkg_prefix')) {\n\t\t$pkg_name = substr($pkg_name, strlen(g_get('pkg_prefix')));\n\t}\n}", "public function getPseudoPackageName()\n\t{\n\t\tif ($this->reflection->isInternal()) {\n\t\t\treturn 'PHP';\n\t\t}\n\n\t\tif ($package = $this->reflection->getAnnotation('package')) {\n\t\t\t$packageName = preg_replace('~\\s+.*~s', '', $package[0]);\n\t\t\tif ($subpackage = $this->reflection->getAnnotation('subpackage')) {\n\t\t\t\t$packageName .= '\\\\' . preg_replace('~\\s+.*~s', '', $subpackage[0]);\n\t\t\t}\n\t\t\treturn $packageName;\n\t\t}\n\n\t\treturn 'None';\n\t}", "private function getFileName(){\n $name = $this->pluginName;\n $text = \"\";\n $lastCapital = true;\n for($i = 0; $i < strlen($name); $i++){\n if($name[$i] !== strtolower($name[$i])){\n if(!$lastCapital){\n $text .= \"_\";\n }\n $lastCapital = true;\n } else {\n $lastCapital = false;\n }\n $text .= strtolower($name[$i]);\n }\n return str_replace(\"nfx\", \"nfx_\", $text);\n }", "public function transformName(string $name) : string\n {\n if (Lang::has($this->moduleName.'::'.$name)) {\n return \"trans('\".$this->moduleName.\"::$name')\";\n } elseif (Lang::has('app.'.$name)) {\n return \"trans('app.$name')\";\n } else {\n return \"'\".$this->makeTitle($name).\"'\";\n }\n }", "public function get_name() {\n\treturn 'composer';\n}", "private function get_package() {\n\t\t$translation = $this->get_item_from_api();\n\t\tif ( $translation && isset( $translation['package'] ) ) {\n\t\t\treturn $translation['package'];\n\t\t}\n\n\t\t// Fallback.\n\t\treturn \"{$this->api_url}/{$this->slug}/{$this->slug}-{$this->lang}.zip\";\n\t}", "public function getModuleName()\n {\n $module = $this->argument('module') ?: $this->laravel['modules']->used();\n \n return $this->laravel['modules']->findOrFail($module)->getStudlyName();\n }", "final private static function _resolve_package_alias($alias) {\n\t\t\n\t\t# if the alias name is not valid format (does not start with :)\n\t\tif (!static::_is_package_alias($alias)) {\n\t\t\tthrow new Exception(\"Could not resolve alias '$alias'. Not a valid alias\");\n\t\t}\n\t\t\n\t\t# if the alias array is not defined\n\t\tif (!isset(Settings::$package_aliases)) {\n\t\t\tthrow new Exception(\"Could not resolve alias '$alias'. Package alias configuration missing.\");\n\t\t}\n\t\t\n\t\t# if the alias is not defined\n\t\tif (!array_key_exists($alias, Settings::$package_aliases)) {\n\t\t\tthrow new Exception(\"Could not resolve invalid alias '$alias'\");\n\t\t}\n\t\t\n\t\treturn Settings::$package_aliases[$alias];\n\t}", "public static function convertAliasName($name)\n {\n if (preg_match('/([\\w0-9\\/_-]+)-\\d+(.\\d+)?.[\\dxX]+$/', $name, $matches)) {\n return $matches[1];\n }\n\n return $name;\n }", "protected function getPluginNamespaceReplacement(): string\n {\n return str_replace('\\\\', '\\\\\\\\', $this->pluginRepository->config('namespace'));\n }", "public abstract function get_amd_name();", "public function getNodename();", "public function getPackage() {}", "public function repositoryShortcutName(string $module): string\n {\n return Str::plural(Str::camel($module));\n }", "public function getPackageInfo(string $info = 'version') : string\n {\n $aeFiles = \\MarkNotes\\Files::getInstance();\n $aeJSON = \\MarkNotes\\JSON::getInstance();\n $sReturn = '';\n\n $fname = $this->getFolderAppRoot().'package.json';\n if ($aeFiles->exists($fname)) {\n $json = $aeJSON->json_decode($fname, true);\n $sReturn = $json[$info];\n }\n return $sReturn;\n }", "public function get_package_by_name($package_name) {\n\tif (empty($this->packages[$package_name])) {\n\t\t$this->packages[$package_name] = new package\\composer($this, $package_name);\n\t}\n\t\n\treturn $this->packages[$package_name];\n}", "public function transform( Package $package ) {\n\t\t$builder = $this->factory->create( 'composer' )->with_package( $package );\n\n\t\t$vendor = apply_filters( 'satispress_vendor', 'satispress' );\n\t\t$name = $this->normalize_package_name( $package->get_slug() );\n\t\t$builder->set_name( $vendor . '/' . $name );\n\n\t\tif ( isset( self::WORDPRESS_TYPES[ $package->get_type() ] ) ) {\n\t\t\t$builder->set_type( self::WORDPRESS_TYPES[ $package->get_type() ] );\n\t\t}\n\n\t\treturn $builder->build();\n\t}", "public function makeFilename()\n {\n return getcwd().'/package'.md5(time().uniqid()).'.zip';\n }", "private function transformName( $name ): string {\n\t\treturn lcfirst( implode( '', array_map( 'ucfirst', explode( '-', $name ) ) ) );\n\t}", "final private static function _is_package_alias($package_name) {\n\t\t\n\t\t# the first character in an alias is a colon\n\t\tif(substr($package_name, 0, 1) !== ':') {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private function adjustRepositoryName(string $repositoryName): string\n {\n return Str::plural(\n Str::camel(basename(str_replace('\\\\', '/', $repositoryName)))\n );\n }", "private function formatModuleName(DisplayPlugin $plugin): ?string\n {\n if ($this->small) {\n return $plugin->module[0];\n }\n\n return $plugin->module;\n }", "function getCanonicalName( $username ) {\n\n $username = str_replace('@fedoraproject.org', '', $username);\n\n //error_log(\"FAS [getCanonicalName]: returning... \" . $username, 0);\n return $username;\n }", "public function getPackageFilename(CompletePackageInterface $package): string\n {\n return $this->getPackageFilenameFromParts($this->getPackageFilenameParts($package));\n }", "protected function _releaseName()\n {\n return \"Version {$this->version}\" . ($this->name ? \": {$this->name}\" : '');\n }", "public function makeFqnForRepositoryName($name)\n {\n return config('pxlcms.generator.namespace.repositories') . \"\\\\\"\n . studly_case($name)\n . config('pxlcms.generator.repositories.name_postfix');\n }", "public static function convertName($name) {\n return self::PREFIX . $name;\n }", "function package_path($package = '')\n { \n return extension_path(\"packages\").($package ? DS.$package : $package);\n }", "public function getPackageIdentityName()\n {\n if (array_key_exists(\"packageIdentityName\", $this->_propDict)) {\n return $this->_propDict[\"packageIdentityName\"];\n } else {\n return null;\n }\n }", "public function getPackage()\n {\n return $this->package;\n }", "public function getPackage()\n {\n return $this->package;\n }", "public function setPackageName($var)\n {\n GPBUtil::checkString($var, True);\n $this->package_name = $var;\n\n return $this;\n }", "function getPackagePath() ;", "static public function getComposerPackageName(string $pluginName): ?string\n {\n $data = self::getPluginComposerInfo($pluginName);\n return $data['name'] ?? null;\n }", "public function getPackage($packageName = null) {\r\n\t if($packageName === null) {\r\n\t $packageName = strtolower(Nomenclature::getVendorAndPackage($this));\r\n\t }\r\n\r\n\t\treturn $this->getFramework()->getPackage($packageName);\r\n\t}", "public function getModuleName() {}", "public function getModuleName() {}", "abstract public function getPackage();", "public function sanatize($name)\n {\n $specialChars = array (\"#\",\"$\",\"%\",\"^\",\"&\",\"*\",\"!\",\"~\",\"�\",\"\\\"\",\"�\",\"'\",\"=\",\"?\",\"/\",\"[\",\"]\",\"(\",\")\",\"|\",\"<\",\">\",\";\",\":\",\"\\\\\",\",\");\n return str_replace($specialChars, \"_\", $name);\n }", "private function namebase() {\n return $this->module->name;\n }", "protected function getSetupName()\n {\n return strtolower($this->argument('name'));\n }", "abstract public function packageId(): string;", "function get_package_id($package_name) {\n\tforeach (config_get_path('installedpackages/package', []) as $idx => $pkg) {\n\t\tif ($pkg['name'] == $package_name ||\n\t\t get_package_internal_name($pkg) == $package_name) {\n\t\t\treturn $idx;\n\t\t}\n\t}\n\n\treturn -1;\n}", "protected function getTaskName()\n {\n return str_replace(' ', '', lcfirst(ucwords(str_replace('-', ' ', $this->executableName))));\n }", "function getPackageKey() ;", "public function getPackageLocation(): string;", "protected function getModuleName(AssetInterface $asset)\n {\n $fullPath = $asset->getSourceRoot() . '/' . $asset->getSourcePath();\n\n if (strpos($fullPath, $this->baseUrl) === 0) {\n $relPath = str_replace($this->baseUrl . '/', '', $fullPath);\n } else {\n $suitablePath = '';\n $suitablePathName = '';\n\n foreach ($this->paths as $path => $location) {\n if (strpos($fullPath, $location) === 0 && $location > $suitablePath) {\n $suitablePath = $location;\n $suitablePathName = $path;\n }\n }\n\n $relPath = str_replace($suitablePath, $suitablePathName, $fullPath);\n }\n\n return substr_replace($relPath, '', strpos($relPath, '.js'), 3);\n }", "function pkg_get_repo_name($path) {\n\t$repos = pkg_list_repos();\n\n\t$default = $repos[0]['name'];\n\tforeach ($repos as $repo) {\n\t\tif ($repo['path'] == $path) {\n\t\t\treturn $repo['name'];\n\t\t}\n\t\tif (isset($repo['default'])) {\n\t\t\t$default = $repo['name'];\n\t\t}\n\t}\n\n\t/* Default */\n\treturn $default;\n}", "public function getModuleName(){\n\t\treturn 'mod_userrepair : 使用者自行修復';\n\t}", "private function _getUnnamedTransformFolderName(AssetTransformModel $transform)\n\t{\n\t\treturn '_'.($transform->width ? $transform->width : 'AUTO').'x'.($transform->height ? $transform->height : 'AUTO') .\n\t\t'_'.($transform->mode) .\n\t\t'_'.($transform->position) .\n\t\t($transform->quality ? '_'.$transform->quality : '');\n\t}", "function p_url2name($url) {\n\treturn ucwords(\n\t\tstr_replace('~', ' / ',\n\t\tstr_replace('.', '-',\n\t\tstr_replace('-', ' ', $url))));\n}", "public function getPackage()\n {\n return str_replace('Model', 'Listing', parent::getPackage());\n }", "public function resolveName();", "public function getName(): string\n {\n return 'Jibit';\n }", "protected function getCacheName($name) {\n $name = strtolower($name);\n $name = trim($name);\n $name = urlencode($name);\n if (strlen($name) < 3) {\n return implode('/', str_split($name, 1)) . '.json';\n }\n return substr($name, 0, 1) . '/' . substr($name, 1, 1) . '/' . substr($name, 2, 1) . '/' . substr($name, 3) . '.json';\n }", "public function getRealName() {}", "public function getPluginName(): string\n {\n return \"MumieTask\";\n }", "public function getJoomlaManifestName()\n {\n return $this->comName.'.xml';\n }", "function module_builder_drush_component_root_name_process($component_root_name) {\n // Trim a final '/' from the module machine name, to allow use of tab\n // autocompletion on the command line.\n if (substr($component_root_name, -1) == '/') {\n $component_root_name = substr($component_root_name, 0, -1);\n }\n\n // An input machine name given as '.' means use the current folder as the\n // component name, thus write to the current folder.\n if ($component_root_name == '.') {\n $component_root_name = basename(drush_get_context('DRUSH_OLDCWD'));\n }\n\n return $component_root_name;\n}", "public function getLibraryName();", "protected function getPackageName()\n {\n return null;\n }", "function sanitize_backend_name($name) {\n\t\tif ($name == 's3') $name = 'Amazon S3';\n\t\treturn $name;\n\t}", "public static function defaultAppName():string {\n\n # Set result\n $result = \"Crazy Project\";\n\n # Get current app path\n $appPath = File::path(\"@app_root\");\n\n # Check app path\n if($appPath){\n\n # Set composer path\n $conposerAppPath = \"$appPath/composer.json\";\n\n # Check composer name\n if(File::exists($conposerAppPath) && ($composerName = Composer::get(\"name\", $conposerAppPath)) !== null)\n\n # Set result\n $result = $composerName;\n\n else\n\n # Extract name from app path\n $result = Strings::getLastString(trim($appPath, \"/\"), \"/\");\n\n }\n\n # Then add space before capital letters\n $result = Process::spaceBeforeCapital($result);\n\n # Return result\n return $result;\n\n }", "public function getProcessFQN($name)\n {\n $parts = explode(':', $name);\n if (count($parts) == 2) {\n return $name;\n }\n\n $config = $this->getProcessConfig($name);\n if (! $config) {\n return;\n }\n\n return $config['group'].':'.$config['name'];\n }", "public function package($name)\n\t{\n\t\tif( ! isset($this->packages[ $name ]))\n\t\t{\n\t\t\tthrow new PackageNotDefinedException(\"$name is not defined\");\n\t\t}\n\t\treturn $this->packages[ $name ];\n\t}", "public function get_package_theme_url()\n {\n $theme_url = $this->EE->config->item('theme_folder_url');\n\n $theme_url .= substr($theme_url, -1) == '/'\n ? 'third_party/'\n : '/third_party/';\n\n return $theme_url .$this->get_package_name() .'/';\n }", "function getModuleName( $module )\r\n {\r\n $parts = explode( '/', $module );\r\n return end( $parts ); \r\n }", "function user_to_jid( $name ) {\n\t\treturn $name . \"@\" . self::DOMAIN;\n\t}", "public function package() {\n\t\treturn $this->package;\n\t}", "protected function getPharName()\n {\n return $this->container->getParameter('tenside.self_update.phar_name');\n }" ]
[ "0.69691575", "0.6441152", "0.6369701", "0.63049614", "0.6212089", "0.6083902", "0.6038406", "0.60367614", "0.59653795", "0.59527045", "0.59492105", "0.59150034", "0.5832586", "0.58049005", "0.5799646", "0.5797188", "0.5792682", "0.579148", "0.5780601", "0.57234013", "0.5715336", "0.5713476", "0.57079524", "0.569186", "0.5606026", "0.5572239", "0.55474854", "0.5498975", "0.5466459", "0.54638463", "0.54384047", "0.54042774", "0.5364981", "0.5292819", "0.5291091", "0.5281703", "0.5225561", "0.5151745", "0.5136435", "0.5131321", "0.5090505", "0.5078235", "0.5066785", "0.506574", "0.50650394", "0.5059562", "0.5056585", "0.5044917", "0.5040063", "0.5013846", "0.50110406", "0.5003565", "0.49935445", "0.49920058", "0.498887", "0.49884135", "0.4982337", "0.498142", "0.49799785", "0.49787152", "0.49787152", "0.49678987", "0.49604565", "0.49468946", "0.49395454", "0.4901735", "0.48995495", "0.48987663", "0.48862407", "0.48861775", "0.48556748", "0.4855063", "0.48294714", "0.4812707", "0.48088926", "0.4806299", "0.47958195", "0.47957957", "0.47877568", "0.47850302", "0.4782792", "0.47760084", "0.47742346", "0.4762717", "0.47485948", "0.4748209", "0.47477347", "0.47474295", "0.47473258", "0.47443378", "0.4740019", "0.47238135", "0.47210523", "0.4717067", "0.47161922", "0.47041532", "0.46994042", "0.46959522", "0.46924", "0.4688549" ]
0.5339692
33
Revert the npm package name from composer package name.
public static function revertName($name) { if (false !== strpos($name, '--')) { $name = '@'.str_replace('--', '/', $name); } return $name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function normalize_package_name( $name ) {\n\t\t$name = strtolower( $name );\n\t\treturn preg_replace( '/[^a-z0-9_\\-\\.]+/i', '', $name );\n\t}", "function pkg_remove_prefix(&$pkg_name) {\n\tglobal $g;\n\n\tif (substr($pkg_name, 0, strlen(g_get('pkg_prefix'))) ==\n\t g_get('pkg_prefix')) {\n\t\t$pkg_name = substr($pkg_name, strlen(g_get('pkg_prefix')));\n\t}\n}", "public function composerToOctoberCode(string $name): string\n {\n // Remove suffix\n $name = explode('-plugin', $name, -1)[0] ?? $name;\n $name = explode('-theme', $name, -1)[0] ?? $name;\n\n $parts = explode('/', $name, 2);\n\n // Remove prefix\n $vendor = $parts[0];\n $package = $parts[1] ?? '';\n $package = ltrim($package, 'oc-');\n\n return rtrim($vendor.'.'.$package, '.');\n }", "public static function cleanPackageName($name)\n {\n if (preg_match('/^[a-z]+\\-asset\\//', $name, $matches)) {\n $name = substr($name, \\strlen($matches[0]));\n }\n\n return $name;\n }", "public static function remove($package_name, $no_output=false) {\n if(isset(self::$_packages[$package_name])) {\n $version_installed = self::$_packages[$package_name];\n //remove from packagist\n unset(self::$_packages[$package_name]);\n self::save();\n //get package info\n $package_info = json_decode(file_get_contents(self::URL.\"/$package_name.json\"), true);\n $git_name = $package_info[\"package\"][\"repository\"];\n $git_name = substr($git_name, strrpos($git_name, '/', strrpos($git_name, '/') - strlen($git_name) - 1) + 1);\n //get all directories\n $package_directory = App::libs()->directory('Packagist.'.trim(str_replace('/', '-', strtolower($git_name))));\n $installed_versions = $package_directory->directories();\n //remove from autoload\n foreach($installed_versions as $version) {\n if(isset(self::$_autoload[$version->name()])) {\n unset(self::$_autoload[$version->name()]);\n }\n //remove version\n $version->remove();\n }\n self::save();\n //remove remaining directory\n $package_directory->remove();\n //show packages\n $to_install = self::match($package_info, $version_installed);\n $notice = \"\";\n foreach($to_install[\"require\"] as $p => $v) {\n if(strpos($p, '/')!==false) {\n $notice .= \"$p : $v\\n\";\n }\n }\n if(($notice!=\"\")&&($no_output===false)) {\n echo \"Don't forget, following packags were required by $package_name but might not be needed anymore\\n(You can run 'autoremove $package_name $version_installed' or 'autoremove $package_name' to remove them automatically\".PHP_EOL;\n echo $notice;\n }\n return true;\n }\n return false;\n }", "public function getRootPackageName()\n {\n return $this->composerJson['name'];\n }", "public function getModuleName()\n {\n $name = $this->getComposerJson()->name;\n $name = join('_', array_map('ucfirst', explode('/', $name)));\n return $name;\n }", "public function uninstall( $args ) {\n\n\t\tlist( $package_name ) = $args;\n\n\t\t$composer = $this->get_composer();\n\t\tif ( false === ( $package = $this->get_installed_package_by_name( $package_name ) ) )\n\t\t\tWP_CLI::error( \"Package not installed.\" );\n\n\t\t$composer_json_obj = $this->get_composer_json();\n\n\t\t// Remove the 'require' from composer.json\n\t\t$contents = file_get_contents( $composer_json_obj->getPath() );\n\t\t$manipulator = new JsonManipulator( $contents );\n\t\t$manipulator->removeSubNode( 'require', $package_name );\n\t\tfile_put_contents( $composer_json_obj->getPath(), $manipulator->getContents() );\n\n\t\t// Delete the directory\n\t\t$filesystem = new Filesystem;\n\t\t$package_path = getcwd() . '/' . $composer->getConfig()->get('vendor-dir') . '/' . $package->getName();\n\t\t$filesystem->removeDirectory( $package_path );\n\n\t\t// Reset Composer and regenerate the auto-loader\n\t\t$composer = $this->get_composer();\n\t\t$this->regenerate_autoloader();\n\n\t\tWP_CLI::success( \"Uninstalled package.\" );\n\t}", "public function getPackageName(): string;", "public abstract function resetComposer();", "function get_package_internal_name($package_data) {\n\tif (isset($package_data['internal_name']) &&\n\t ($package_data['internal_name'] != \"\")) {\n\t\t/* e.g. name is Ipguard-dev, internal name is ipguard */\n\t\treturn $package_data['internal_name'];\n\t} else {\n\t\treturn $package_data['name'];\n\t}\n}", "function pkg_delete($pkg_name) {\n\tglobal $g;\n\n\t$shortname = $pkg_name;\n\tpkg_remove_prefix($shortname);\n\n\tpkg_debug(\"Removing package {$shortname}\\n\");\n\tif (is_pkg_installed($pkg_name)) {\n\t\tpkg_call(\"delete -y \" . $pkg_name);\n\t\t/* Cleanup unnecessary dependencies */\n\t\tpkg_call(\"autoremove -y\");\n\t}\n}", "public function get_package_name()\n {\n return $this->_package_name;\n }", "function cleanupPlugin($name)\n\t{\n\t\t$die = function($error, $code = 1) {\n\t\t\t\\cli\\out(\"%1{$error}%n\\n\");\n\t\t\texit($code);\n\t\t};\n\n\t\t$name = Str::slug($name);\n\n\t\t\\cli\\out(\"Cleaning up {$name}...\\n\");\n\n\t\t$composer = $this->path(\"/workbench/plugins/{$name}/composer.json\");\n\t\tif (!$this->files->exists($composer)) {\n\t \t\t$die(\"Coudn't find {$composer} for {$name}\", 1);\n\t \t}\n\n\t \t$package = json_decode( $this->files->get( $composer ) );\n\t \tif (false === $package) {\n\t \t\t$die(\"Coudn't read {$composer} for {$name}\", 2);\n\t \t}\n\n\t \t// remove from composer\n\t \t$process = $this->composer(\"remove {$package->name}\");\n\t\tif (!$process->isSuccessful()) {\n\t\t\t$die(\"Failed to remove {$package->name} from workbench\", 4);\n\t\t}\n\n\t \t// remove from studio\n\t \t$workbench_path = $this->path(\"/workbench/plugins/{$name}\");\n\t \t$process = $this->studio(\"unload {$workbench_path}\");\n\t \tif (!$process->isSuccessful()) {\n\t \t\t$die(\"Failed to unload {$package->name} from your workbench\", 8);\n\t \t}\n\n\t \t// delete the project\n\t \t$this->files->deleteDirectory($workbench_path);\n\t}", "public function onPostUninstall(PackageEvent $event): void\n {\n if ($this->isDevPackage($event, self::PACKAGE_NAME)) {\n return;\n }\n\n /** @var \\Composer\\DependencyResolver\\Operation\\UninstallOperation $operation */\n $operation = $event->getOperation();\n\n if ($operation->getPackage()->getName() === self::PACKAGE_NAME) {\n $scripts = $this->container->get(Composer::class)->getPackage()->getScripts();\n\n if ((\\is_countable($scripts) ? \\count($scripts) : 0) === 0) {\n return;\n }\n\n [$json, $manipulator] = Util::getComposerJsonFileAndManipulator();\n\n foreach ((array) $scripts[ComposerScriptEvents::POST_INSTALL_CMD] as $key => $script) {\n if ($script === '@' . ScriptEvents::AUTO_SCRIPTS) {\n unset($scripts[ComposerScriptEvents::POST_INSTALL_CMD][$key]);\n }\n }\n\n $manipulator->addSubNode('scripts', ComposerScriptEvents::POST_INSTALL_CMD, $scripts[ComposerScriptEvents::POST_INSTALL_CMD]);\n\n foreach ((array) $scripts[ComposerScriptEvents::POST_UPDATE_CMD] as $key => $script) {\n if ($script === '@' . ScriptEvents::AUTO_SCRIPTS) {\n unset($scripts[ComposerScriptEvents::POST_UPDATE_CMD][$key]);\n }\n }\n\n $manipulator->addSubNode('scripts', ComposerScriptEvents::POST_UPDATE_CMD, $scripts[ComposerScriptEvents::POST_UPDATE_CMD]);\n\n $this->container->get(Filesystem::class)->dumpFile($json->getPath(), $manipulator->getContents());\n\n $this->updateComposerLock();\n }\n }", "protected function unsetModuleNameFromMongez()\n {\n Mongez::remove('modules', strtolower($this->moduleName));\n }", "public function get_name() {\n\treturn 'composer';\n}", "function get_meta_pkg_name() {\n\tglobal $g;\n\n\t/* XXX: Use pkg annotation */\n\tif (is_pkg_installed(g_get('product_name'))) {\n\t\treturn g_get('product_name');\n\t}\n\tforeach (g_get('alternativemetaports') as $suffix) {\n\t\tif (is_pkg_installed(g_get('product_name') . '-' . $suffix)) {\n\t\t\treturn g_get('product_name') . '-' . $suffix;\n\t\t}\n\t}\n\treturn false;\n}", "public function getPackageName()\n {\n return $this->package_name;\n }", "protected static function updateComposer()\n {\n $packages = json_decode(file_get_contents(base_path('composer.json')), true);\n $packages['require'] = static::updateComposerArray($packages['require']);\n ksort($packages['require']);\n\n file_put_contents(\n base_path('composer.json'),\n json_encode($packages, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT).PHP_EOL\n );\n }", "function dimaan_remove_version() { return ''; }", "protected function getPackageName(PackageEvent $event)\n {\n return $this->getPackage($event)->getName();\n }", "static public function getComposerPackageName(string $pluginName): ?string\n {\n $data = self::getPluginComposerInfo($pluginName);\n return $data['name'] ?? null;\n }", "protected function getPackageName()\n {\n return null;\n }", "protected function getModuleName( PackageInterface $package )\n {\n\n $name = $package->getPrettyName();\n $split = explode( \"/\", $name );\n\n if ( count( $split ) !== 2 ) {\n throw LaravelModuleInstallerException::fromInvalidPackage( $name );\n }\n\n $splitNameToUse = explode( \"-\", $split[1] );\n\n if ( count( $splitNameToUse ) < 2 ) {\n throw LaravelModuleInstallerException::fromInvalidPackage( $name );\n }\n\n if ( array_pop( $splitNameToUse ) !== 'module' ) {\n throw LaravelModuleInstallerException::fromInvalidPackage( $name );\n }\n\n return implode( '', array_map( 'ucfirst', $splitNameToUse ) );\n }", "function packageNameWithParent()\n {\n $parent = $this->getParent();\n return ucwords($parent) . $this->getPackageName();\n }", "public function getLowerName(): string\n {\n return strtolower($this->packageName);\n }", "public function fromPackage($fqcn)\n {\n $name = str_replace(['\\\\', '_'], '-', ltrim($fqcn, '\\\\'));\n\n // convert root namespace to default; default is a keyword and no namespace CAN be named as such\n if ($name === '') {\n $name = 'default';\n }\n\n return $name;\n }", "public static function autoremove($package_name, $package_version = false, $recursive = false) {\n // remove package if not yet done\n self::remove($package_name, true);\n\n $package_info = json_decode(file_get_contents(self::URL.\"/$package_name.json\"), true);\n //get to_install\n $to_install = self::match($package_info, $package_version);\n //run through require and remove whats possible\n if($to_install!==false) {\n $dependencies = array_reverse($to_install[\"require\"]);\n $dep_packages = array_keys($dependencies);\n // get other package dependencies\n $packages = self::packages();\n foreach($packages as $p => $v) {\n // don't check current package\n // or current package deps\n if(($p!=$package_name)&&(array_search($p, $dep_packages)===false)) {\n $dep_info = json_decode(file_get_contents(self::URL.\"/$p.json\"), true);\n $match = self::match($dep_info, $v);\n // remove the current dependencies from deps deps\n $match[\"require\"] = array_diff(array_keys($match[\"require\"]), $dep_packages);\n $dep_packages = array_diff($dep_packages, $match[\"require\"]);\n }\n }\n $packages_left = array_diff($dep_packages, array_keys($to_install[\"require\"]));\n foreach($dep_packages as $p) {\n if(strpos($p, '/')!==false) {\n self::remove($p, true);\n if($recursive) {\n self::autoremove($p, $dependencies[$p], true);\n }\n }\n }\n if(count($packages_left)>0) {\n echo \"Following packages we're not removed as they are still required by other packages\".PHP_EOL;\n foreach($packages_left as $p) {\n echo $p.PHP_EOL;\n }\n }\n return true;\n }\n return false;\n }", "public static function getPackageName() {\n\t\treturn self::$_packageName;\n\t}", "public function removeModule($name);", "function startertheme_remove_version() {\nreturn '';\n}", "public function setComposerFilename($name)\n {\n $this->composerFilename = $name;\n }", "public static function getGithubPluginName(string $name): string\n\t{\n\n\t\t// If the plugin doesn't have a namespace, we're good, just return it.\n\t\tif (strpos($name, '/') === false) {\n\t\t\treturn $name;\n\t\t}\n\n\t\t$splitName = explode('/', $name);\n\n\t\treturn $splitName[count($splitName) - 1];\n\t}", "function wpb_remove_version() {\n return '';\n}", "function bft_remove_version() {\n\treturn '';\n}", "public function fromPackage($fqcn)\n {\n $name = str_replace(array('\\\\', '_'), '.', ltrim($fqcn, '\\\\'));\n\n // convert root namespace to default; default is a keyword and no namespace CAN be named as such\n if ($name === '') {\n $name = 'default';\n }\n\n return $name;\n }", "function wpversion_remove_version() {\n return '';\n }", "function get_base_pkg_name() {\n\tglobal $g;\n\n\t/* XXX: Use pkg annotation */\n\tif (is_pkg_installed(g_get('product_name') . '-base-' . g_get('product_name'))) {\n\t\treturn g_get('product_name') . '-base-' . g_get('product_name');\n\t} else if (is_pkg_installed(g_get('product_name') . '-base')) {\n\t\treturn g_get('product_name') . '-base';\n\t}\n\treturn false;\n}", "public function getPackagedName()\n {\n return Generator::getPackageName() . $this->getContextualPart() . ucfirst(self::uniqueName($this->getCleanName(), $this->getContextualPart()));\n }", "function wpb_remove_version() {\r\n return '';\r\n}", "public function actionRevert(): Response\n {\n $io = new BufferIO();\n\n try {\n Craft::$app->getComposer()->install($this->data['current'], $io);\n Craft::info(\"Reverted Composer requirements.\\nOutput: \" . $io->getOutput(), __METHOD__);\n $this->data['reverted'] = true;\n } catch (\\Throwable $e) {\n Craft::error('Error reverting Composer requirements: ' . $e->getMessage() . \"\\nOutput: \" . $io->getOutput(), __METHOD__);\n return $this->sendComposerError(Craft::t('app', 'Composer was unable to revert the updates.'), $e, $io->getOutput());\n }\n\n return $this->send($this->postComposerInstallState());\n }", "protected function normalizeNS($package)\n {\n $package = ltrim($package, '.');\n\n if ($this->compiler->hasPackage($package)) {\n return $this->compiler->getPackage($package);\n }\n\n // Check the currently registered packages to find a root one\n $found = null;\n foreach ($this->compiler->getPackages() as $pkg=>$ns) {\n // Keep only the longest match\n if (0 === strpos($package, $pkg.'.') && strlen($found) < strlen($pkg)) {\n $found = $pkg;\n }\n }\n\n // If no matching package was found issue a warning and use the package name\n if (!$found) {\n $this->compiler->warning('Non tracked package name found \"' . $package . '\"');\n $namespace = str_replace('.', '\\\\', $package);\n } else {\n // Complete the namespace with the remaining package\n $namespace = $this->compiler->getPackage($found);\n $namespace .= substr($package, strlen($found));\n $namespace = str_replace('.', '\\\\', $namespace);\n // Set the newly found namespace in the registry\n $this->compiler->setPackage($package, $namespace);\n }\n\n return $namespace;\n }", "public function uninstall(Composer $composer, IOInterface $io);", "function original_version($path)\n{\n $version = version_name($path);\n if ($version) {\n $path = str_replace(\":{$version}\", '', $path);\n }\n\n return $path;\n}", "function pramble_remove_version(){\n\t\t\t\treturn '';\n\t\t\t}", "function wpb_remove_version() {\nreturn '';\n}", "function deinstallPackageDyntables() {\n @unlink('/usr/local/www/diag_dhcp_leases.php');\n @unlink('/usr/local/www/javascript/dyntables.js');\n @rename('/usr/local/pkg/diag_dhcp_leases.php.org', '/usr/local/www/diag_dhcp_leases.php');\n}", "function remove_version_number() {\n return '';\n}", "public function renameFiles($manifest = null)\n {\n $bindings = [\n [':uc:vendor', ':uc:package', ':lc:vendor', ':lc:package'],\n [$this->vendor(), $this->package(), strtolower($this->vendor()), strtolower($this->package())],\n ];\n\n $rewrites = require ($manifest === null) ? [\n 'src/MyPackage.php' => 'src/:uc:package.php',\n 'config/mypackage.php' => 'config/:lc:package.php',\n 'src/Facades/MyPackage.php' => 'src/Facades/:uc:package.php',\n 'src/MyPackageServiceProvider.php' => 'src/:uc:packageServiceProvider.php',\n ] : $manifest;\n\n foreach ($rewrites as $file => $name) {\n $filename = str_replace($bindings[0], $bindings[1], $name);\n rename($this->packagePath().'/'.$file, $this->packagePath().'/'.$filename);\n }\n }", "public function getName()\n {\n return $this->getNodeText('/p:package/p:name');\n }", "public function uninstall(): void\n {\n $this->output(\"TODO: Drop the journal table, remove the files and show the composer command to remove the package\");\n exit;\n }", "function packagename()\r\n{\r\n\treturn app('packagename');\r\n}", "public function testDowngradeToDrupal8(string $site_name) {\n $site_folder = $this->getSiteFolder($site_name);\n chdir($site_folder);\n\n // Remove composer lock.\n $this->taskExec('rm')\n ->args('composer.lock')\n ->run();\n\n\n $this->taskExec('composer')\n ->args(\n 'require',\n '--no-update',\n '-W',\n 'drupal/core-recommended:^8',\n 'pantheon-systems/drupal-integrations:^8'\n )\n ->run();\n\n $this->taskExec('composer')\n ->args('update')\n ->run();\n return ResultData::EXITCODE_OK;\n }", "protected function updateComposer(string $name): Renamer\n {\n $this->setComposer(\n Str::replaceFirst(\n '\"bin\": [\"'.$this->getCurrentBinaryName().'\"]',\n '\"bin\": [\"'.$name.'\"]',\n $this->getComposer()\n )\n );\n\n $this->output->writeln('Updating composer: <info>✔</info>');\n\n return $this;\n }", "public function getPackageName() {\n\t\treturn t('Coworking Space Package');\n\t}", "public function getPseudoPackageName()\n\t{\n\t\tif ($this->reflection->isInternal()) {\n\t\t\treturn 'PHP';\n\t\t}\n\n\t\tif ($package = $this->reflection->getAnnotation('package')) {\n\t\t\t$packageName = preg_replace('~\\s+.*~s', '', $package[0]);\n\t\t\tif ($subpackage = $this->reflection->getAnnotation('subpackage')) {\n\t\t\t\t$packageName .= '\\\\' . preg_replace('~\\s+.*~s', '', $subpackage[0]);\n\t\t\t}\n\t\t\treturn $packageName;\n\t\t}\n\n\t\treturn 'None';\n\t}", "static function moduleNameToNamespace ($moduleName)\n {\n $o = explode ('/', $moduleName);\n if (count ($o) != 2)\n throw new \\RuntimeException (\"Invalid module name\");\n list ($vendor, $module) = $o;\n $namespace1 = ucfirst (str_dehyphenate ($vendor, true));\n $namespace2 = ucfirst (str_dehyphenate ($module, true));\n\n return \"$namespace1\\\\$namespace2\";\n }", "public function deactivateWordPressPlugin(PackageEvent $event)\n {\n if (! $this->isWordPressPlugin($this->getPackage($event))) {\n return;\n }\n \n static::$plugin->getInstanceOf(PluginInteractor::class)->deactivate(\n $event->getComposer(),\n $event->getIO(),\n preg_replace('/^wpackagist-plugin\\//', '', $this->getPackageName($event))\n );\n }", "protected function getPluginNamespaceReplacement(): string\n {\n return str_replace('\\\\', '\\\\\\\\', $this->pluginRepository->config('namespace'));\n }", "public static function forComposer()\n {\n if (strpos(static::VERSION, ' ') === false) {\n return static::VERSION;\n }\n\n $version = explode(' ', static::VERSION, 2);\n\n return $version[0];\n }", "protected function replaceNamespace(&$stub)\n {\n $Plugx = ucfirst($this->argument('name'));\n $smallPlugx = lcfirst($this->argument('name'));\n\n $stub = str_replace(\n [\n 'Parrotx\\\\\\\\Plugx\\\\\\\\',\n '\"parrotx/plugx\"',\n 'Parrotx\\Plugx\\\\',\n 'pluginx/plugx',\n 'parrotx-config',\n 'plugxName',\n 'pluginxJson',\n '\\Parrotx\\Plugx',\n ],\n [\n 'Parrotx\\\\\\\\'.$Plugx.'\\\\\\\\',\n '\"parrotx/'.$smallPlugx.'\"',\n 'Parrotx\\\\'.$Plugx.'\\\\',\n 'pluginx/'.$smallPlugx,\n 'parrotx_'.$smallPlugx,\n $smallPlugx.'x',\n $smallPlugx,\n '\\parrotx\\\\'.$Plugx,\n ],\n $stub\n );\n\n\n return $stub;\n }", "public function getModuleInstalledReplaced($name)\n {\n return $this->getModuleReplaced($name, 'installed');\n }", "private static function get_java_packagename($code) {\n $matches = array();\n $package = preg_match('/package([\\s\\S]*?);/', $code, $matches);\n if ($package === 0) {\n return \"\";\n }\n if ($package === false) {\n debugging('preg_match failed in get_java_packagename');\n return \"\";\n }\n\n switch (count($matches)) {\n case 0:\n return \"\"; // No package found!\n case 1:\n return $matches[0]; // Unclear what it is, deliver everything.\n default:\n return trim($matches[1]); // Found, expect package name as 2nd.\n }\n }", "public function renameModule($name, $newName);", "protected function replaceNamespace(&$stub, $name): VueMakeCommand\n {\n $name = Str::of($name)->remove('App\\\\')->replace('\\\\', '');\n $stub = str_replace('{{ component }}', $name, $stub);\n return $this;\n }", "protected function _formatModuleName($name)\n {\n $name = strtolower($name);\n $name = str_replace(array('-', '.'), ' ', $name);\n $name = ucwords($name);\n $name = str_replace(' ', '', $name);\n return $name;\n }", "protected function unsetModuleServiceProvider()\n {\n $config = File::get($mongezPath = base_path('config/app.php'));\n\n $serviceProviderClassName = Str::singular($this->moduleName) . 'ServiceProvider';\n\n $replacementLine = \"App\\\\Modules\\\\$this->moduleName\\\\Providers\\\\{$serviceProviderClassName}::class,\";\n\n if (!Str::contains($config, $replacementLine)) return;\n $replacedString = \"\";\n $updatedConfig = str_replace($replacementLine, $replacedString, $config);\n\n File::put($mongezPath, $updatedConfig);\n }", "function uninstall($moduleName);", "public function get_package_by_name($package_name) {\n\tif (empty($this->packages[$package_name])) {\n\t\t$this->packages[$package_name] = new package\\composer($this, $package_name);\n\t}\n\t\n\treturn $this->packages[$package_name];\n}", "public function onPreUninstall(PackageEvent $event): void\n {\n /** @var \\Composer\\DependencyResolver\\Operation\\UninstallOperation $operation */\n $operation = $event->getOperation();\n\n if ($this->isDevPackage($event, $operation->getPackage()->getName())) {\n return;\n }\n\n /** @var \\Narrowspark\\Automatic\\Operation\\Uninstall $uninstall */\n $uninstall = $this->container->get(Uninstall::class);\n\n if ($uninstall->supports($operation)) {\n $package = $uninstall->resolve($operation);\n\n $this->uninstallOperations[] = $package->getName();\n\n $uninstall->transform($package);\n }\n }", "function sunset_remove_meta_version(){\n return '' ;\n}", "public function unformatName($name);", "protected static function updatePackages()\n {\n if (! file_exists(base_path('package.json'))) {\n return;\n }\n\n $packages = json_decode(file_get_contents(base_path('package.json')), true);\n\n $packages['devDependencies'] = static::updatePackageArray(\n $packages['devDependencies']\n );\n\n file_put_contents(\n base_path('package.json'),\n json_encode($packages, JSON_PRETTY_PRINT)\n );\n }", "function remove_theme_mod($name)\n {\n }", "private function _update_package_to_version_141()\n {\n $this->EE->db->delete('actions',\n array('class' => ucfirst($this->get_package_name())));\n }", "function wp_default_packages_vendor($scripts)\n {\n }", "protected function patchComposerJson()\n {\n if ( ! $this->fileExists('composer.json')) {\n $this->write('Failed to locate composer.json in local directory', 'error');\n\n return;\n }\n\n $structure = json_decode(file_get_contents($this->path('composer.json')));\n if (json_last_error() !== JSON_ERROR_NONE) {\n $this->write('Failed to parse composer.json', 'error');\n\n return;\n }\n\n $structure->require->{'offline/oc-bootstrapper'} = '^' . VERSION;\n\n $contents = json_encode($structure, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n if (file_put_contents($this->path('composer.json'), $contents) === false) {\n $this->write('Failed to write new composer.json', 'error');\n }\n }", "function pkg_valid_name($pkgname) {\n\tglobal $g;\n\n\t$pattern = \"/^{$g['pkg_prefix']}[a-zA-Z0-9\\.\\-_]+$/\";\n\treturn preg_match($pattern, $pkgname);\n}", "function installPackageDyntables() {\n @rename('/usr/local/www/diag_dhcp_leases.php', '/usr/local/pkg/diag_dhcp_leases.php.org');\n @rename('/usr/local/pkg/dyntables.js', '/usr/local/www/javascript/dyntables.js');\n @rename('/usr/local/pkg/diag_dhcp_leases.php', '/usr/local/www/diag_dhcp_leases.php');\n}", "public function setPackageName($var)\n {\n GPBUtil::checkString($var, True);\n $this->package_name = $var;\n\n return $this;\n }", "function bajweb_remove_meta_version() {\n\treturn '';\n}", "public function removeExtension($name) {}", "public function getPackage()\n {\n return $this->package;\n }", "public function getPackage()\n {\n return $this->package;\n }", "public function transform( Package $package ) {\n\t\t$builder = $this->factory->create( 'composer' )->with_package( $package );\n\n\t\t$vendor = apply_filters( 'satispress_vendor', 'satispress' );\n\t\t$name = $this->normalize_package_name( $package->get_slug() );\n\t\t$builder->set_name( $vendor . '/' . $name );\n\n\t\tif ( isset( self::WORDPRESS_TYPES[ $package->get_type() ] ) ) {\n\t\t\t$builder->set_type( self::WORDPRESS_TYPES[ $package->get_type() ] );\n\t\t}\n\n\t\treturn $builder->build();\n\t}", "public static function getComposer();", "public function getPackageNames()\n {\n if (!isset($this->packageNames)) {\n foreach ($this->packageArray as $package) {\n $this->packageNames[] = $package->getName();\n }\n }\n\n return $this->packageNames;\n }", "protected static function updateComposerPackages(string $key = 'require')\n {\n if (! file_exists(base_path('composer.json'))) {\n return;\n }\n\n $packages = json_decode(file_get_contents(base_path('composer.json')), true);\n\n $packages[$key] = static::updateComposerPackageArray($packages[$key] ?? [], $key);\n\n ksort($packages[$key]);\n\n file_put_contents(\n base_path('composer.json'),\n json_encode($packages, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT).PHP_EOL\n );\n }", "protected static function updateComposerScripts(): void\n {\n if (! file_exists(base_path('composer.json'))) {\n return;\n }\n\n $composer = json_decode(file_get_contents(base_path('composer.json')), true);\n\n $composer['scripts'] = static::updateComposerScriptsArray(\n array_key_exists('scripts', $composer) ? $composer['scripts'] : []\n );\n\n ksort($composer['scripts']);\n\n file_put_contents(\n base_path('composer.json'),\n json_encode($composer, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT).PHP_EOL\n );\n }", "protected function normalizeName(string $name): string\n {\n if ($this->filesystem->getExtension($name) === $this->extension) {\n $name = \\substr($name, 0, -(\\strlen($this->extension) + 1));\n }\n\n return $name;\n }", "protected static function updateComposerPackages(bool $dev = true): void\n {\n if (! file_exists(base_path('composer.json'))) {\n return;\n }\n\n $configurationKey = $dev ? 'require-dev' : 'require';\n\n $composer = json_decode(file_get_contents(base_path('composer.json')), true);\n\n $composer[$configurationKey] = static::updateComposerPackageArray(\n array_key_exists($configurationKey, $composer) ? $composer[$configurationKey] : [],\n $configurationKey\n );\n\n ksort($composer[$configurationKey]);\n\n file_put_contents(\n base_path('composer.json'),\n json_encode($composer, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT).PHP_EOL\n );\n }", "function wfs_remove_meta_version() {\n\treturn '';\n}", "function setSyncProdName()\n {\n }", "protected static function updatePackages($dev = true)\n {\n if (! file_exists(base_path('package.json'))) {\n return;\n }\n \n $packages = json_decode(file_get_contents(base_path('package.json')), true);\n \n $dependencies = static::updatePackageArray(\n $packages\n );\n\n $packages['dependencies'] = $dependencies['dependencies'];\n $packages['devDependencies'] = $dependencies['devDependencies'];\n\n ksort($packages['dependencies']);\n ksort($packages['devDependencies']);\n\n file_put_contents(\n base_path('package.json'),\n json_encode($packages, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT).PHP_EOL\n );\n }", "function pkg_get_repo_name($path) {\n\t$repos = pkg_list_repos();\n\n\t$default = $repos[0]['name'];\n\tforeach ($repos as $repo) {\n\t\tif ($repo['path'] == $path) {\n\t\t\treturn $repo['name'];\n\t\t}\n\t\tif (isset($repo['default'])) {\n\t\t\t$default = $repo['name'];\n\t\t}\n\t}\n\n\t/* Default */\n\treturn $default;\n}", "public function cloneJson()\n {\n $jsonData = array();\n try {\n $this->packages = $this->repo->getPackages();\n\n foreach ($this->packages as $package) {\n $this->packageName = $package->getPrettyName();\n\n if (!isset($this->packageName)) {\n throw new InvalidArgumentException(\"The package name was not found in the composer.json at '\"\n .$this->url.\"' in '\". $package->getPrettyVersion().\"' \");\n }\n\n if (!preg_match('{^[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*$}i', $this->packageName)) {\n throw new InvalidArgumentException(\n \"The package name '{$this->packageName}' is invalid, it should have a vendor name,\n\t\t\t\t\t\ta forward slash, and a package name. The vendor and package name can be words separated by -, . or _.\n\t\t\t\t\t\tThe complete name should match '[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*' at \"\n .$this->url.\"' in '\". $package->getPrettyVersion().\"' \");\n }\n\n if (preg_match('{[A-Z]}', $this->packageName)) {\n $suggestName = preg_replace('{(?:([a-z])([A-Z])|([A-Z])([A-Z][a-z]))}', '\\\\1\\\\3-\\\\2\\\\4', $this->packageName);\n $suggestName = strtolower($suggestName);\n\n throw new InvalidArgumentException(\n \"The package name '{$this->packageName}' is invalid,\n\t\t\t\t\t\tit should not contain uppercase characters. We suggest using '{$suggestName}' instead. at '\"\n .$this->url.\"' in '\". $package->getPrettyVersion().\"' \");\n }\n }\n\n $this->latestReleasePackage = $this->repo->findPackage($this->packageName, '9999999-dev');\n } catch (Exception $e) {\n $jsonData['ErrorMsg'] = $e->getMessage();\n return $jsonData;\n }\n\n $jsonData['AllRelease'] = $this->packages;\n $jsonData['LatestRelease'] = $this->latestReleasePackage;\n return $jsonData;\n }", "public function getComposerPath(): string;", "function complete_version_removal() { return ''; }", "public function getPackage() {}" ]
[ "0.6581749", "0.63645357", "0.6040032", "0.60308546", "0.59785724", "0.5967854", "0.59482265", "0.5833302", "0.57300776", "0.5713144", "0.5666699", "0.5602921", "0.55658996", "0.5560686", "0.55551815", "0.55383575", "0.5495161", "0.54274416", "0.54145277", "0.54015857", "0.5350546", "0.5313771", "0.5252501", "0.5238629", "0.5215316", "0.5150864", "0.51494306", "0.5138274", "0.5102844", "0.509353", "0.5084788", "0.50720304", "0.5068712", "0.5045774", "0.5031995", "0.50078374", "0.5000413", "0.49927697", "0.49849272", "0.49801585", "0.49800256", "0.49751264", "0.49568826", "0.4924249", "0.49134853", "0.48961654", "0.48902583", "0.48893908", "0.48837388", "0.48813358", "0.48683596", "0.486269", "0.4861994", "0.48562384", "0.4852797", "0.4840548", "0.4832595", "0.48306757", "0.48304614", "0.48246744", "0.4822956", "0.482232", "0.4793092", "0.47801864", "0.47721827", "0.47482452", "0.47435868", "0.47433507", "0.47351858", "0.47344893", "0.47330692", "0.47310394", "0.47271362", "0.47185957", "0.47162563", "0.47110236", "0.47013742", "0.46990684", "0.46970543", "0.4686845", "0.46852186", "0.46600604", "0.46565405", "0.46536565", "0.46536565", "0.46476063", "0.4644904", "0.46425888", "0.4640107", "0.46398664", "0.46323693", "0.46321064", "0.46313465", "0.46199828", "0.46163982", "0.46090522", "0.45924354", "0.45922107", "0.45874777", "0.45833018" ]
0.5849965
7
Convert the npm licenses list.
public static function convertLicenses($licenses) { if (!\is_array($licenses)) { return $licenses; } $result = array(); foreach ($licenses as $license) { if (\is_array($license)) { if (!empty($license['type'])) { $result[] = $license['type']; } elseif (!empty($license['name'])) { $result[] = $license['name']; } } else { $result[] = $license; } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function erp_addon_licenses() {\n $licenses = [];\n\n return apply_filters( 'erp_settings_licenses', $licenses );\n}", "private static function _get_post_licenses() {\n return array(\n \"all-rights-reserved\" => __(\"All rights reserved\", MEDIUM_TEXTDOMAIN),\n \"cc-40-by\" => __(\"CC 4.0 BY\", MEDIUM_TEXTDOMAIN),\n \"cc-40-by-nd\" => __(\"CC 4.0 BY-ND\", MEDIUM_TEXTDOMAIN),\n \"cc-40-by-sa\" => __(\"CC 4.0 BY-SA\", MEDIUM_TEXTDOMAIN),\n \"cc-40-by-nc\" => __(\"CC 4.0 BY-NC\", MEDIUM_TEXTDOMAIN),\n \"cc-40-by-nc-nd\" => __(\"CC 4.0 BY-NC-ND\", MEDIUM_TEXTDOMAIN),\n \"cc-40-by-nc-sa\" => __(\"CC 4.0 BY-NC-SA\", MEDIUM_TEXTDOMAIN),\n \"cc-40-zero\" => __(\"CC Copyright waiver\", MEDIUM_TEXTDOMAIN),\n \"public-domain\" => __(\"Public domain\", MEDIUM_TEXTDOMAIN)\n );\n }", "public function fetchExistingLicenses()\n {\n $clientLicense = $this->db->fetchQuery(\n \"SELECT\n TO_CHAR(l.creation_date, 'Dy DD Mon YYYY, HH24:MI') AS creation_date,\n TO_CHAR(l.activation_date, 'Dy DD Mon YYYY, HH24:MI') AS activation_date,\n TO_CHAR(l.expiry_date, 'Dy DD Mon YYYY, HH24:MI') AS expiry_date,\n array_to_json(array_agg(mi.id\n ORDER BY mi.id ASC)) AS modules_installed,\n array_to_json(l.ip_addr) AS ip_addr,\n array_to_json(l.domains) AS domains,\n array_to_json(array_agg(mi.description\n ORDER BY mi.id ASC)) AS modules_names,\n now() BETWEEN activation_date AND expiry_date AS active\n FROM license l\n LEFT JOIN modules_available mi ON mi.id = ANY (l.modules_installed) AND mi.enabled_by_default=0\n WHERE client_id = :clientId\n GROUP BY l.id\n ORDER BY creation_date DESC\n LIMIT 1;\",\n [':clientId' => $_POST['clientId']]\n );\n if ($clientLicense) {\n $clientLicense['modules_installed'] = json_decode($clientLicense['modules_installed'], TRUE);\n $clientLicense['modules_names'] = json_decode($clientLicense['modules_names'], TRUE);\n $clientLicense['ip_addr'] = json_decode($clientLicense['ip_addr'], TRUE);\n $clientLicense['domains'] = json_decode($clientLicense['domains'], TRUE);\n }\n $this->response = [\"license\" => $clientLicense];\n }", "public function run()\n\t{\n\t\tDB::table('licenses')->delete();\n\t\t$licenses = array(\n\t\t\t[ 'id' => 1\n\t\t\t, 'acro' => ''\n\t\t\t, 'name' => 'All Rights Reserved'\n\t\t\t, 'url' => ''\n\t\t\t],\n\t\t\t[ 'id' => 2\n\t\t\t, 'acro' => 'CC BY'\n\t\t\t, 'name' => 'Creative Commons Attribution'\n\t\t\t, 'url' => 'http://creativecommons.org/licenses/by/4.0/'\n\t\t\t],\n\t\t\t[ 'id' => 3\n\t\t\t, 'acro' => 'CC BY-SA'\n\t\t\t, 'name' => 'Creative Commons Attribution-ShareAlike'\n\t\t\t, 'url' => 'http://creativecommons.org/licenses/by-sa/4.0'\n\t\t\t],\n\t\t\t[ 'id' => 4\n\t\t\t, 'acro' => 'CC BY-ND'\n\t\t\t, 'name' => 'Creative Commons Attribution-NoDerivs '\n\t\t\t, 'url' => 'http://creativecommons.org/licenses/by-nd/4.0/'\n\t\t\t],\n\t\t\t[ 'id' => 5\n\t\t\t, 'acro' => 'CC BY-NC'\n\t\t\t, 'name' => 'Creative Commons Attribution-NonCommercial'\n\t\t\t, 'url' => 'http://creativecommons.org/licenses/by-nc/4.0/'\n\t\t\t],\n\t\t\t[ 'id' => 6\n\t\t\t, 'acro' => 'CC BY-NC-SA'\n\t\t\t, 'name' => 'Creative Commons Attribution-NonCommercial-ShareAlike'\n\t\t\t, 'url' => 'http://creativecommons.org/licenses/by-nc-sa/4.0/'\n\t\t\t],\n\t\t\t[ 'id' => 7\n\t\t\t, 'acro' => 'CC BY-NC-ND'\n\t\t\t, 'name' => 'Creative Commons Attribution-NonCommercial-NoDerivs'\n\t\t\t, 'url' => 'http://creativecommons.org/licenses/by-nc-nd/4.0/'\n\t\t\t],\n\t\t\t[ 'id' => 8\n\t\t\t, 'acro' => 'CC0'\n\t\t\t, 'name' => 'Public Domain'\n\t\t\t, 'url' => 'https://creativecommons.org/publicdomain/zero/1.0/'\n\t\t\t],\n\t\t);\n\t\tDB::table('licenses')->insert($licenses);\n\t}", "public function senarai_licenses()\n {\n return $this->hasMany(License::class);\n }", "private static function _mapLicense($str){\n $str = rtrim(trim($str, '('), ')');\n return array_map(function($v){\n return ($v === 't' ? true : false);\n }, explode(',', $str));\n }", "protected function _get_connection_licenses( TPM_Connection $connection ) {\n\n\t\tif ( ! $connection->is_connected() ) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$licenses = tpm_get_transient( self::NAME );\n\n\t\tif ( Thrive_Product_Manager::CACHE_ENABLED && $licenses !== false ) {\n\n\t\t\treturn $licenses;\n\t\t}\n\n\t\t$params = array(\n\t\t\t'user_id' => $connection->ttw_id,\n\t\t);\n\n\t\t$route = '/api/v1/public/get_licenses';\n\t\t$request = new TPM_Request( $route, $params );\n\t\t$request->set_header( 'Authorization', $connection->ttw_salt );\n\n\t\t$proxy_request = new TPM_Proxy_Request( $request );\n\t\t$response = $proxy_request->execute( '/tpm/proxy' );\n\n\t\t$body = wp_remote_retrieve_body( $response );\n\t\t$body = json_decode( $body, true );\n\n\t\tif ( ! is_array( $body ) || empty( $body['success'] ) ) {\n\n\t\t\ttpm_set_transient( self::NAME, array(), self::CACHE_LIFE_TIME );\n\n\t\t\treturn array();\n\t\t}\n\n\t\t$licenses = $body['data'];\n\n\t\t//sort licenses so that the ones with 'all' tags will be 1st in list\n\t\t//so they have priority on usage\n\t\tuasort( $licenses, static function ( $license_a, $license_b ) {\n\n\t\t\t$a_tags = is_array( $license_a ) && ! empty( $license_a['tags'] ) && is_array( $license_a['tags'] ) ? $license_a['tags'] : array();\n\t\t\t$b_tags = is_array( $license_b ) && ! empty( $license_b['tags'] ) && is_array( $license_b['tags'] ) ? $license_b['tags'] : array();\n\n\n\t\t\tif ( in_array( 'all', $a_tags, true ) && in_array( 'all', $b_tags, true ) ) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif ( false === in_array( 'all', $a_tags, true ) && in_array( 'all', $b_tags, true ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\treturn - 1;\n\t\t} );\n\n\t\ttpm_set_transient( self::NAME, $licenses, self::CACHE_LIFE_TIME );\n\n\t\treturn $licenses;\n\t}", "function DBgetLicense(){\n\t\t \n\t\t $db = $this->startDB();\n\t\t \n\t\t $sql = \"SELECT fs.fk_license, cc.LINK_DEED as id, cc.NAME as name\n\t\t FROM \".$this->penelopeTabID.\" AS extab\n\t\t JOIN space ON extab.uuid = space.uuid\n\t\t JOIN file_summary AS fs ON space.source_id = fs.source_id\n\t\t JOIN w_lu_creative_commons AS cc ON fs.fk_license = cc.PK_LICENSE\n\t\t GROUP BY fs.source_id\n\t\t ORDER BY fs.fk_license DESC\n\t\t \";\n\t\t \n\t\t $result = $db->fetchAll($sql); \n\t\t if($result){\n\t\t\t\t$output = $result[0];\n\t\t\t\tif(stristr($output[\"id\"], \"creativecommons\")){\n\t\t\t\t\t $output[\"name\"] = \"Creative Commons \".$output[\"name\"];\n\t\t\t\t}\n\t\t\t\tunset($output[\"fk_license\"]);\n\t\t\t\treturn $output;\n\t\t }\n\t\t else{\n\t\t\t\treturn array(\"id\" => \"http://creativecommons.org/licenses/by/3.0\",\n\t\t\t\t\t\t\t\t \"name\" => \"Creative Commons Attribution\"\n\t\t\t\t\t\t\t\t );\n\t\t }\n\t\t \n\t\t \n\t }", "public function get_license_options() {\r\n\t$license_data = array(\r\n\t\t'license_key' => $this->get_license_option('license_key'),\r\n\t\t'license_status' => $this->get_license_option('license_status'),\r\n\t\t'activation_error_code' => $this->get_license_option('activation_error_code'),\r\n\t);\r\n\t\r\n\treturn $license_data;\r\n}", "public function deactivate_all_licenses() {\n\n\t\t$licenses = TPM_License::get_saved_licenses();\n\n\t\tif ( empty( $licenses ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$connection = TPM_Connection::get_instance();\n\n\t\t//if user has disconnected TPM then try to use the backup connection saved at disconnecting\n\t\tif ( false === $connection->is_connected() ) {\n\t\t\t$connection->set_data( get_option( 'tpm_bk_connection', array() ) );\n\t\t}\n\n\t\t$params = array(\n\t\t\t'user_id' => $connection->ttw_id,\n\t\t\t'user_site_url' => get_site_url(),\n\t\t\t'direction' => 'down',\n\t\t\t'data' => array_keys( $licenses ),\n\t\t);\n\t\t$request = new TPM_Request( '/api/v1/public/license_uses', $params );\n\t\t$request->set_header( 'Authorization', $connection->ttw_salt );\n\n\t\t$proxy_request = new TPM_Proxy_Request( $request );\n\t\t$response = $proxy_request->execute( '/tpm/proxy' );\n\t\tTPM_Log_Manager::get_instance()->set_message( var_export( $response, true ) )->log();\n\t\tdelete_option( TPM_License::NAME );\n\t}", "function monsterinsights_get_license() {\n\t$license = false;\n\tif ( defined( 'MONSTERINSIGHTS_LICENSE_KEY' ) && is_string( MONSTERINSIGHTS_LICENSE_KEY ) && strlen( MONSTERINSIGHTS_LICENSE_KEY ) > 10 ) {\n\t\t$license = array( 'key' => MONSTERINSIGHTS_LICENSE_KEY );\n\t} else if ( is_multisite() && monsterinsights_is_network_active() ){\n\t\t$network_license = get_site_option( 'monsterinsights_license' );\n\t\tif ( ! empty( $network_license['key'] ) && is_string( $network_license['key'] ) && strlen( $network_license['key'] ) > 10 ) {\n\t\t\t$license = $network_license;\n\t\t} else {\n\t\t\t$site_license = get_option( 'monsterinsights_license' );\n\t\t\tif ( ! empty( $site_license['key'] ) && is_string( $site_license['key'] ) && strlen( $site_license['key'] ) > 10 ) {\n\t\t\t\t$license = $site_license;\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$site_license = get_option( 'monsterinsights_license' );\n\t\tif ( ! empty( $site_license['key'] ) && is_string( $site_license['key'] ) && strlen( $site_license['key'] ) > 10 ) {\n\t\t\t$license = $site_license;\n\t\t}\n\t}\n\n\treturn apply_filters( 'monsterinsights_license', $license );\n}", "protected function _getLicenseStrings($filename = '')\n {\n if (is_readable($filename)) {\n $strings = file($filename);\n } else {\n $strings = file(Mtool_Magento::getMtoolDir() . DIRECTORY_SEPARATOR . 'var' . DIRECTORY_SEPARATOR . 'license',\n FILE_IGNORE_NEW_LINES);\n }\n\n for ($i = 0; $i < count($strings); $i++) {\n if (preg_match('/^@license\\s+(.*)/', $strings[$i], $matchs)) {\n $licenseShort = $matchs[1];\n unset($strings[$i]);\n continue;\n }\n if (strlen($strings[$i])) {\n $text[] = $strings[$i] . \"\\n\";\n }\n }\n\n return array(rtrim(' * ' . implode(' * ', $text), \"\\n\"), $licenseShort);\n }", "public function licenses()\n {\n // belongsToMany(RelatedModel, pivotTable, thisKeyOnPivot = computer_id, otherKeyOnPivot = license_id)\n return $this->belongsToMany(License::class, 'assign_licenses');\n }", "public function getLicences()\r\n\t{\r\n\t\treturn $this->Licences;\r\n\t}", "public static function get_system_license()\n {\n $license = FALSE;\n $conf = $GLOBALS['CONF'];\n \n if (!$conf)\n { \n $conf = new Ossim_conf();\n $GLOBALS['CONF'] = $conf;\n }\n\n $_license = $conf->get_conf('license');\n\n if (!empty($_license)) \n {\n $_license = trim($_license) . \"\\n\";\n $license = parse_ini_string($_license, TRUE, INI_SCANNER_RAW);\n }\n\n return $license; \n }", "public function showAllProductLicenses()\n {\n $epi_products = $this->getAllEpiProductsData();\n\n if (empty($epi_products)) {\n return;\n }\n\n ob_start();\n\n $plugin_dir_name = '';\n $inactive_epi_plugins = 0;\n // Get all license views\n foreach ($epi_products as $product_data) {\n $plugin_dir_name = end(explode('/', $product_data['baseFolderDir']));\n if ($product_data['isTheme']) {\n if (wp_get_theme()->name != $product_data['pluginName']) {\n $inactive_epi_plugins++;\n continue;\n }\n } else {\n if (! is_plugin_active($plugin_dir_name.'/'.$product_data['mainFileName'])) {\n $inactive_epi_plugins++;\n continue;\n }\n }\n $this->displayProductLicense($product_data);\n }\n\n if ($inactive_epi_plugins === count($epi_products)) {\n ?>\n <tr>\n <td colspan=\"4\">\n <?php _e('No active plugins found', $this->pluginSlug); ?>\n </td>\n </tr>\n <?php\n }\n $content = ob_get_clean();\n\n echo $content;\n }", "public function getLicense()\n {\n return $this->getNodeText('/p:package/p:license');\n }", "public function run()\n {\n $licenses = [\n [\n 'name' => 'Vergunning POB1703',\n 'description' => 'Vergunning van Justis',\n 'creator_id' => 1,\n 'modifier_id' => 1,\n 'user_id' => 1,\n 'organization_id' => 1,\n 'belongs_to' => 'user_id',\n 'type' => 'Vergunning POB',\n 'number' => '201934435335',\n 'issued_by_organization_id' => 1,\n 'valid_from' => Carbon::now(),\n 'valid_to' => Carbon::now()->addMonths(60),\n 'profile_picture_path' => 'profilepicture/profilepicture'\n ],[\n 'name' => 'Legitimatie Particulier Onderzoeker',\n 'description' => 'De gele pas',\n 'creator_id' => 1,\n 'modifier_id' => 1,\n 'user_id' => 1,\n 'organization_id' => 1,\n 'belongs_to' => 'user_id',\n 'type' => 'Legitimatiebewijs P.O.',\n 'number' => '12424546664',\n 'issued_by_organization_id' => 1,\n 'valid_from' => Carbon::now(),\n 'valid_to' => Carbon::now()->addMonths(36),\n 'profile_picture_path' => 'profilepicture/profilepicture'\n ],[\n 'name' => 'Legitimatie Particulier Onderzoeker',\n 'description' => 'De gele pas',\n 'creator_id' => 1,\n 'modifier_id' => 1,\n 'user_id' => 4,\n 'organization_id' => 1,\n 'belongs_to' => 'user_id',\n 'type' => 'Legitimatiebewijs P.O.',\n 'number' => '646346648',\n 'issued_by_organization_id' => 1,\n 'valid_from' => Carbon::now(),\n 'valid_to' => Carbon::now()->addMonths(12),\n 'profile_picture_path' => 'profilepicture/profilepicture'\n ]\n ];\n foreach($licenses as $license){\n License::create($license);\n }\n }", "public function fetchLicenseHistory()\n {\n $history = [];\n $query = $this->db->executeQuery(\n \"SELECT\n l.id,\n TO_CHAR(l.creation_date, 'Dy DD Mon YYYY, HH24:MI') AS creation_date,\n TO_CHAR(l.creation_date, 'YYYY-MM-DD HH24:MI:SS') AS creation_date_iso,\n TO_CHAR(l.activation_date, 'Dy DD Mon YYYY, HH24:MI') AS activation_date,\n TO_CHAR(l.activation_date, 'YYYY-MM-DD HH24:MI:SS') AS activation_date_iso,\n TO_CHAR(l.expiry_date, 'Dy DD Mon YYYY, HH24:MI') AS expiry_date,\n TO_CHAR(l.expiry_date, 'YYYY-MM-DD HH24:MI:SS') AS expiry_date_iso,\n array_to_json(l.ip_addr) AS ip_addr,\n array_to_json(l.domains) AS domains,\n array_to_json(array_agg(mi.description\n ORDER BY mi.id ASC)) AS modules_names,\n now() BETWEEN activation_date AND expiry_date AS active\n FROM license l\n LEFT JOIN modules_available mi ON mi.id = ANY (l.modules_installed) AND mi.enabled_by_default=0\n WHERE client_id = :clientId\n GROUP BY l.id\n ORDER BY l.creation_date DESC\",\n [':clientId' => $_POST['clientId']]\n );\n while (($row = $query->fetch()) !== FALSE) {\n $row['modules_names'] = json_decode($row['modules_names'], TRUE);\n $row['ip_addr'] = json_decode($row['ip_addr'], TRUE);\n $row['domains'] = json_decode($row['domains'], TRUE);\n $history[] = $row;\n }\n if (!empty($history)) {\n $history[0]['isLatest'] = TRUE;\n }\n $this->response = [\"licenses\" => $history];\n }", "function create_license($number) {\n $node = new stdClass();\n $node->type = 'license_to_kill';\n node_object_prepare($node);\n\n $node->title = 'license-' . $number;\n $node->field_code['und'][0]['value'] = \"0\";\n\n node_save($node);\n}", "public function provideImpoundingLicencePublishCommands()\n {\n return [\n [\n LicenceEntity::LICENCE_CATEGORY_GOODS_VEHICLE,\n [\n 'id' => 99,\n 'trafficArea' => 'B',\n 'pi' => null,\n 'pubType' => 'A&D',\n 'licence' => 7\n ]\n ],\n [\n LicenceEntity::LICENCE_CATEGORY_PSV,\n [\n 'id' => 99,\n 'trafficArea' => 'B',\n 'pi' => null,\n 'pubType' => 'N&P',\n 'licence' => 7\n ]\n ]\n ];\n }", "public static function buildLicenseOutput($file)\n {\n \tglobal $current_language;\n\n $mod_strings = return_module_language($current_language, \"Administration\");\n $contents = '';\n $pm = new PackageManager();\n $contents = $pm->getLicenseFromFile($file);\n $ss = new Sugar_Smarty();\n $ss->assign('MOD', $mod_strings);\n $ss->assign('LICENSE_CONTENTS', $contents);\n $ss->assign('FILE', $file);\n $str = $ss->fetch('ModuleInstall/PackageManagerLicense.tpl');\n $GLOBALS['log']->debug('LICENSE OUTPUT: '.$str);\n return $str;\n }", "public function get_licence()\n {\n return 'MIT License';\n }", "function generate_license() {\n\t$alpha_num = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n\t$lng = strlen($alpha_num);\n\t$lic = \"\";\n\tfor($i = 0; $i < LICENSE_LENGTH; $i++) {\n\t\t$lic .= $alpha_num[mt_rand(0,$lng-1)];\n\t}\n\treturn $lic;\n}", "public function get_licence()\n {\n return 'GPL';\n }", "function pkg_build_repo_list() {\n\t$repos = pkg_list_repos();\n\t$list = array();\n\n\tforeach ($repos as $repo) {\n\t\t$list[$repo['name']] = $repo['descr'];\n\t}\n\n\treturn($list);\n}", "private function getInstalledLicense()\n {\n $sql = 'SELECT license FROM s_core_licenses WHERE active=1 AND module = \"SwagCommercial\"';\n\n return $this->container->get('dbal_connection')->query($sql)->fetchColumn();\n }", "protected function getBoilerplate()\n {\n return '# Project Licenses\nThis file was generated by the [PHP Legal Licenses](https://github.com/Comcast/php-legal-licenses) utility. It contains the name, version and commit sha, description, homepage, and license information for every dependency in this project.\n\n## Dependencies\n\n';\n }", "public function findAllOfficialDistributions() {}", "function shoestrap_activate_license() {\n global $wp_version;\n\n $license = shoestrap_getVariable( 'shoestrap_license_key' );\n\n $api_params = array(\n 'edd_action' => 'activate_license',\n 'license' => $license,\n 'item_name' => urlencode( SHOESTRAP_THEME_NAME )\n );\n\n $response = wp_remote_get( add_query_arg( $api_params, SHOESTRAP_STORE_URL ), array( 'timeout' => 15, 'sslverify' => false ) );\n\n if ( is_wp_error( $response ) ) :\n return false;\n endif;\n\n $license_data = json_decode( wp_remote_retrieve_body( $response ) );\n}", "function ciniki_sponsors_packageList($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'sponsors', 'private', 'checkAccess');\n $rc = ciniki_sponsors_checkAccess($ciniki, $args['tnid'], 'ciniki.sponsors.packageList');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Get the list of packages\n //\n $strsql = \"SELECT ciniki_sponsor_packages.id, \"\n . \"ciniki_sponsor_packages.name, \"\n . \"ciniki_sponsor_packages.subname, \"\n . \"ciniki_sponsor_packages.permalink, \"\n . \"ciniki_sponsor_packages.invoice_code, \"\n . \"ciniki_sponsor_packages.invoice_name, \"\n . \"ciniki_sponsor_packages.flags, \"\n . \"IF((flags&0x01) = 0x01, 'yes', 'no') AS visible, \"\n . \"ciniki_sponsor_packages.object, \"\n . \"ciniki_sponsor_packages.object_id, \"\n . \"ciniki_sponsor_packages.category, \"\n . \"ciniki_sponsor_packages.sequence, \"\n . \"ciniki_sponsor_packages.amount \"\n . \"FROM ciniki_sponsor_packages \"\n . \"WHERE ciniki_sponsor_packages.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.sponsors', array(\n array('container'=>'packages', 'fname'=>'id', \n 'fields'=>array('id', 'name', 'subname', 'permalink', 'invoice_code', 'invoice_name', 'flags', 'visible',\n 'object', 'object_id', 'category', 'sequence', 'amount'),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $packages = isset($rc['packages']) ? $rc['packages'] : array();\n $package_ids = array();\n foreach($packages as $iid => $package) {\n $package_ids[] = $package['id'];\n }\n\n return array('stat'=>'ok', 'packages'=>$packages, 'nplist'=>$package_ids);\n}", "public function generateLicenseKeys()\n {\n $rsaConfig = [\n \"digest_alg\" => \"sha512\",\n \"private_key_bits\" => 4096,\n \"private_key_type\" => OPENSSL_KEYTYPE_RSA,\n ];\n\n // Generate the RSA Key.\n $res = openssl_pkey_new($rsaConfig);\n openssl_pkey_export($res, $privateKey);\n $publicKey = openssl_pkey_get_details($res)['key'];\n\n // Now Save it to the database.\n $this->db->beginTransaction();\n $modules = array_merge([1, 12], $_POST['modules']);\n sort($modules, SORT_NUMERIC);\n $this->db->executeQuery(\n \"INSERT INTO license (client_id, ip_addr, domains, activation_date,expiry_date, modules_installed, license_key) \n VALUES (:clientId,:ip,:domains,:activation,:expiry,:modules,:key)\",\n [\n \":clientId\" => $_POST['clientId'],\n \":ip\" => $this->_processDomainIps($_POST['ips']),\n \":domains\" => $this->_processDomainIps($_POST['domains']),\n \":activation\" => $_POST['activation'],\n \":expiry\" => $_POST['expiry'],\n \":modules\" => GlobalFunction::pgImplode($modules),\n \":key\" => $privateKey,\n ]\n );\n\n $this->db->commit();\n\n $this->response = [\"license\" => $this->_keyHeaderFooter($publicKey)];\n }", "function optinpanda_make_internal_license_manager( $internal ) { global $optinpanda;\r\nif ( in_array( $optinpanda->license->type, array( 'free' ) ) ) {\r\n return $internal; \r\n}\r\n\r\n \r\n\r\n \r\n if ( BizPanda::isSinglePlugin() ) return $internal;\r\n return true;\r\n}", "function fetch_distro_from_internet() \n {\n $linux_distro_names = [\"ubuntu\",\"fedora\",\"centos\",\"mint\",\"suse\",\"freebsd\"];\n \n foreach($linux_distro_names as $key => $name )\n {\n $distro[$key]['name'] = $name; \n $version = fetch_linux_distro_latest_version($name);\n \n // Gets only version number without extra alphabets\n preg_match(\"/\\d+([\\.-]\\d+)?/\",$version,$matches);\n \n $distro[$key]['version'] = $matches[0]; \n }\n\n $json['result'] = $distro;\n \n // Send Json response to the browser\n return json_encode($json);\n\n }", "function shoestrap_theme_license_status() {\n\n global $wp_version;\n\n $license = shoestrap_getVariable( 'shoestrap_license_key' );\n\n // Copy the licence to a separate option\n update_option( 'shoestrap_license_key', $licence );\n\n $api_params = array(\n 'edd_action' => 'check_license',\n 'license' => $license,\n 'item_name' => urlencode( SHOESTRAP_THEME_NAME )\n );\n\n $response = wp_remote_get( add_query_arg( $api_params, SHOESTRAP_STORE_URL ) );\n\n if ( is_wp_error( $response ) )\n return false;\n\n $license_data = json_decode( wp_remote_retrieve_body( $response ) );\n\n return $license_data->license;\n}", "protected function printLicenses(CompletePackageInterface $package)\n {\n $spdxLicense = new SpdxLicense;\n\n $licenses = $package->getLicense();\n\n foreach ($licenses as $licenseId) {\n $license = $spdxLicense->getLicenseByIdentifier($licenseId); // keys: 0 fullname, 1 osi, 2 url\n\n if (!$license) {\n $out = $licenseId;\n } else {\n // is license OSI approved?\n if ($license[1] === true) {\n $out = sprintf('%s (%s) (OSI approved) %s', $license[0], $licenseId, $license[2]);\n } else {\n $out = sprintf('%s (%s) %s', $license[0], $licenseId, $license[2]);\n }\n }\n\n $this->getIO()->write('<info>license</info> : ' . $out);\n }\n }", "public function index()\n\t{\n\t\t$licenses = License::all();\n\n\t\treturn View::make('backend.licenses.index', compact('licenses'));\n\t}", "public function getLicenseTemplates()\n {\n return $this->_licenseTemplates;\n }", "function dispatch_licenses(){\n\t\n//1get all unfinished orders which are paid\n//2fetch all available licences\n\n//if 1 > 0 \n\t//loop for (unfinished orders)\n \t\t//compare ordered product id with available licences\n\t\t//if available\n\t\t\t//fetch email of buyer + send email + add buyer to database\n\t\t//else \n\t\t\t//mail not available to admin\n\t//loop end\n\t\n}", "public function license($license_key) {\n $license_key = trim($license_key);\n $alert = [];\n if(!$license_key):\n $alert = ['danger' => 'No license key added'];\n update_option('responsive_menu_pro_license_type', '');\n update_option('responsive_menu_pro_license_key', '');\n\n else:\n /* First Check The Generic License */\n $response = wp_remote_get('https://responsive.menu/?' . http_build_query(\n [\n 'edd_action'=> 'activate_license',\n 'license' \t=> $license_key,\n 'item_name' => urlencode('Responsive Menu Pro'),\n 'url' => home_url()\n ]\n ), ['decompress' => false]);\n $license_type = 'License';\n if(is_wp_error($response))\n $alert = ['danger' => $response->get_error_message() . ' - Please <a href=\"https://responsive.menu/faq/license-activation-issues\" target=\"_blank\"> click here</a> for more information.'];\n else\n $response = json_decode($response['body']);\n\n /* Parse Result */\n if(!isset($response->success) || !$response->success):\n /* Now Check The Old Multi License */\n $response = wp_remote_get('https://responsive.menu/?' . http_build_query(\n [\n 'edd_action'=> 'activate_license',\n 'license' \t=> $license_key,\n 'item_name' => urlencode('Responsive Menu Pro - Multi License'),\n 'url' => home_url()\n ]\n ), ['decompress' => false]);\n $license_type = 'Multi License';\n if(is_wp_error($response))\n $alert = ['danger' => $response->get_error_message() . ' - Please <a href=\"https://responsive.menu/faq/license-activation-issues\" target=\"_blank\"> click here</a> for more information.'];\n else\n $response = json_decode($response['body']);\n endif;\n\n /* Parse Result */\n if(!isset($response->success) || !$response->success):\n /* Finally Check The Old Single License */\n $response = wp_remote_get('https://responsive.menu/?' . http_build_query(\n [\n 'edd_action'=> 'activate_license',\n 'license' \t=> $license_key,\n 'item_name' => urlencode('Responsive Menu Pro - Single License'),\n 'url' => home_url()\n ]\n ), ['decompress' => false]);\n $license_type = 'Single License';\n\n if(is_wp_error($response))\n $alert = ['danger' => $response->get_error_message() . ' - Please <a href=\"https://responsive.menu/faq/license-activation-issues\" target=\"_blank\"> click here</a> for more information.'];\n else\n $response = json_decode($response['body']);\n endif;\n\n if(isset($response->success) && $response->success):\n update_option('responsive_menu_pro_license_type', $license_type);\n $alert = ['success' => 'License key updated'];\n else:\n update_option('responsive_menu_pro_license_type', '');\n if(!is_wp_error($response))\n $alert = ['danger' => 'License key invalid' . ' - Please <a href=\"https://responsive.menu/knowledgebase/license-activation-issues/\" target=\"_blank\"> click here</a> for more information.'];\n endif;\n update_option('responsive_menu_pro_license_key', $license_key);\n endif;\n\n return $this->view->render(\n 'admin/main.html.twig',\n [\n 'alert' => $alert,\n 'options' => $this->manager->all()\n ]\n );\n }", "public function getSubscriptionForLicense($licenseKey){\n $this->load->model('ls_api');\n $con = $this->getCon();\n $license = $this->getTableRowByKey(\"Licenses\",\"LicenseKey\",$licenseKey);\n echo \"Total Number of Licenses: $licCount<br>\\n\";\n// die();\n $selected = 0;\n $page = 100;\n $end = 180000;\n while($selected < $licCount){\n $res = $this->queryOLS(\"select * from Licenses order by licenseId limit $selected,$page\");\n $numI = mysqli_num_rows($res);\n echo \"Selected $selected, Number returned: $numI<br>\\n\";\n $i = $selected;\n $selected += $numI;\n if($selected > $end) die();\n \n $emails = [];\n while($license = $res->fetch_assoc()) {\n \n// var_dump($contact);\n $id = $license['licenseId'];\n $key = $license['licenseKey'];\n $ls_info = $this->ls_api->getLicenseInformation($key);\n $exp = $ls_info['UpgradeSubscriptionExpirationDate'];\n// echo \"$key expires on $exp\\n\";\n if(!$exp || $exp == '') continue;\n $exp = date(\"Y-m-d H:i:s\", strtotime($exp));\n echo \"$key expires on $exp\\n\";\n $this->updateOLS('Licenses', ['novaCareExpiration' => $exp], 'licenseId', $id);\n// die();\n \n }\n \n// die();\n }\n }", "public function add_license_tab($tabs) {\n\n\t\t$tabs['license'] = __(\"License\", \"megamenupro\");\n\n\t\treturn $tabs;\n\n\t}", "public function get_licence()\n {\n return 'Licensed on the same terms as Composr';\n }", "public function get_licence()\n {\n return 'Licensed on the same terms as Composr';\n }", "public function get_licence()\n {\n return 'Licensed on the same terms as Composr';\n }", "public function get_licence()\n {\n return 'Licensed on the same terms as Composr';\n }", "public function get_licence()\n {\n return 'Licensed on the same terms as Composr';\n }", "public function get_licence()\n {\n return 'Licensed on the same terms as Composr';\n }", "public function check_for_license_updates() {\n\n\t\t$aggregator = tribe( 'events-aggregator.main' );\n\t\t$aggregator->pue_checker->check_for_updates();\n\n\t}", "function sGetJsCodeArrayDistributori($rsArgDistributori) {\n\t$sOutput = 'aDistributori = new Array();'; \n\t$i=0;\n\tforeach ($rsArgDistributori as $aDistributore) {\n\t\textract($aDistributore);\n\t\t$sOutput .= \"aDistributori[$i] = new Array($dst_id, $dst_lat, $dst_lng, '\" . \n\t\t'<h3>' . sGetJsString(sH(sGetIndirizzoCompleto($aDistributore))) . '</h3>' . \n\t\t'<div>' . sGetJsString(sGetDistrHtmlDescription($aDistributore)) . '</div>' .\n\t\t\"', '\".sGetJsString(sH(sGetIndirizzoCompleto($aDistributore))).\"');\\n\";\n\t\t$i++;\n\t}\n\treturn $sOutput;\n}", "function crypton_blog_cryptocurrency_merge_scripts($list) {\n\t\t$list[] = 'plugins/cryptocurrency-prices/cryptocurrency-prices.js';\n\t\treturn $list;\n\t}", "public function index()\n {\n $licenses=License::OrderBy('created_at','ASC')->get();\n return view('back.license.index',compact('licenses'));\n }", "public static function listDistributions()\n\t{\n\t\t// TODO: Implement listDistributions() method.\n\t}", "function crypton_blog_cryptocurrency_merge_styles($list) {\n\t\t$list[] = 'plugins/cryptocurrency-prices/cryptocurrency-prices.css';\n\t\treturn $list;\n\t}", "function give_import_core_settings_merge_license_key( $json_to_array, $type ) {\n\tif ( 'merge' === $type ) {\n\t\tforeach ( $json_to_array as $key => $value ) {\n\t\t\t$is_license_key = strpos( '_license_key', $key );\n\t\t\tif ( ! empty( $is_license_key ) ) {\n\t\t\t\tunset( $json_to_array[ $key ] );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $json_to_array;\n}", "public function remove_license_data() {\r\n\t$license_data = $this->get_license_options();\r\n\tforeach($license_data as $key => $value) {\r\n\t\t//delete_site_option($this->plugin_config['plugin_prefix'].'_'.$key);\r\n\t\t$this->remove_license_option($key);\r\n\t}\r\n}", "function get_licensed_requests()\n\t{\n\t\treturn $this->db->get('lic_requests')->result_array();\t\n\t}", "function alm_filters_sanitize_license( $new ) {\n \t$old = get_option( 'alm_filters_license_key' );\n \tif( $old && $old != $new ) {\n \t\tdelete_option( 'alm_filters_license_status' ); // new license has been entered, so must reactivate\n \t}\n \treturn $new;\n }", "public function getListNumLicencia(){\n return num_licencias::orderBy('nombre')->get();\n }", "public function license_info() {\n\t\treturn $this->make_request( 'GET', 'license/info' );\n\t}", "private function getSkuSelectionList() {\r\n //$this->jsonOutput[\"skuSelectionList\"] = $this->settingVars->pageArray[\"SKU_SELECTION_LIST\"];\r\n\t\tif(isset($this->jsonOutput[\"settings\"]['sku_settings']) && $this->jsonOutput[\"settings\"]['sku_settings'] != \"\")\r\n\t\t\t$this->jsonOutput[\"skuSelectionList\"] = $this->jsonOutput[\"settings\"]['sku_settings'];\r\n }", "public function saveToStore() {\r\n $this->context->dbDriver->store(RestoDatabaseDriver::LICENSE, array(\r\n 'license' => array(\r\n 'licenseId' => $this->licenseId,\r\n 'grantedCountries' => isset($this->description['grantedCountries']) ? $this->description['grantedCountries'] : null,\r\n 'grantedOrganizationCountries' => isset($this->description['grantedOrganizationCountries']) ? $this->description['grantedOrganizationCountries'] : null,\r\n 'grantedFlags' => isset($this->description['grantedFlags']) ? $this->description['grantedFlags'] : null,\r\n 'viewService' => isset($this->description['viewService']) ? $this->description['viewService'] : null,\r\n 'hasToBeSigned' => isset($this->description['hasToBeSigned']) ? $this->description['hasToBeSigned'] : null,\r\n 'signatureQuota' => isset($this->description['signatureQuota']) ? $this->description['signatureQuota'] : -1,\r\n 'description' => isset($this->description['description']) ? $this->description['description'] : null\r\n ))\r\n );\r\n }", "public function licensesViewAction(){\n $this->setDialogAction([\n 'id' => 'messages-response',\n 'title' => 'Aktywuj lub przedłuż dostęp do usługi Kryptos',\n ]);\n $request = $this->getRequest();\n \n $LicenseRepository = Application_Service_Utilities::getModel('License');\n $this->view->currentLicenses = $LicenseRepository->manageHistory();\n $this->view->paginator = $LicenseRepository->getAllLicenses();\n }", "function ciniki_core_getCodeVersions($ciniki) {\n //\n // Check for the _versions.info file\n //\n if( !file_exists($ciniki['config']['ciniki.core']['root_dir'] . \"/_versions.ini\") ) {\n return array('stat'=>'ok', 'versions'=>array('package'=>array(), 'modules'=>array()));\n } \n $modules_ini = parse_ini_file($ciniki['config']['ciniki.core']['root_dir'] . \"/_versions.ini\", true);\n\n $package = $modules_ini['package'];\n unset($modules_ini['package']);\n $modules = array();\n foreach($modules_ini as $mod_name => $module) {\n $modules[] = array('module'=>array('name'=>$mod_name, 'version'=>$module['version'], 'author'=>$module['author'], 'hash'=>$module['hash']));\n }\n\n return array('stat'=>'ok', 'package'=>$package, 'modules'=>$modules);\n}", "function removeLicense($extrainfo = array ())\n\t{\n\t\t// clean from old values\n\t\t$this->dao->cleanArchive(null, null, $extrainfo['module']);\n\n\t\treturn $extrainfo;\n\t}", "public function extraInstallmentsList($currency)\n {\n return json_encode([]);\n }", "protected function generateLicensesText($dependencies)\n {\n $text = $this->getBoilerplate();\n\n foreach ($dependencies as $dependency) {\n $text .= $this->getTextForDependency($dependency);\n }\n\n file_put_contents('licenses.md', $text);\n }", "function get_package_list($composerContent, $packageRegexes) {\n $packages = [];\n if (null == $composerContent) {\n echo 'Invalid composer content. Correct commit Id(s) provided?';\n return $packages;\n }\n if (!isset($composerContent->packages)) {\n echo 'No packages were found in the composer file.' . PHP_EOL;\n return $packages;\n }\n foreach ($composerContent->packages as $package) {\n $logPackage = false;\n foreach ($packageRegexes as $packageRegex) {\n if (preg_match($packageRegex, $package->name)) {\n $logPackage = true;\n break;\n }\n }\n\n if (!$logPackage) {\n continue;\n }\n\n $packages[$package->name] = $package;\n }\n\n return $packages;\n}", "function studeon_vc_merge_styles($list) {\n\t\t$list[] = 'plugins/js_composer/js_composer.css';\n\t\treturn $list;\n\t}", "function mylicense( $agree_domain )\n{\n\t// {\n\t// \tif ( mygetenv( \"HTTP_HOST\" ) )\n\t// \t{\n\t// \t\t$HTTP_HOST = mygetenv( \"HTTP_HOST\" );\n\t// \t}\n\t// \telse\n\t// \t{\n\t// \t\t$HTTP_HOST = \"\";\n\t// \t}\n\t// }\n\t// $agree_domain = \".127.0.0.1|.192.168.0.2|localhost|\".$agree_domain;\n\t// $now_domain = getrootdomain( htmlspecialchars( $HTTP_HOST ) );\n\t// $now_domain = str_replace( \".www.\", \"\", $now_domain );\n\t// if ( in_array( $now_domain, explode( \"|\", $agree_domain ) ) )\n\t// {\n\t// \texit( \"<a href=\\\"http://www.mymps.com.cn\\\">mymps官方网站</a><p><a href=\\\"http://bbs.mymps.com.cn\\\">mymps交流论坛</a>\" );\n\t// }\n}", "protected function activate_scheduling_licenses()\n {\n global $wpdb;\n\n delete_transient(PMXI_Plugin::$cache_key);\n\n $wpdb->query( $wpdb->prepare(\"DELETE FROM $wpdb->options WHERE option_name = %s\", $this->slug . '_' . PMXI_Plugin::$cache_key) );\n $wpdb->query( $wpdb->prepare(\"DELETE FROM $wpdb->options WHERE option_name = %s\", $this->slug . '_timeout_' . PMXI_Plugin::$cache_key) );\n\n delete_site_transient('update_plugins');\n\n // retrieve the license from the database\n return $this->licensingActivator->activateLicense(PMXI_Plugin::getSchedulingName(),\\Wpai\\App\\Service\\License\\LicenseActivator::CONTEXT_SCHEDULING);\n }", "public function index()\n {\n $license = (new Markdown())->parse(file_get_contents(streams_path('LICENSE')));\n\n return view('distribution::license', compact('license'));\n }", "public function deactivate_license()\n {\n if (isset($_POST['wpstg_deactivate_license'])) {\n // run a quick security check\n if (!check_admin_referer('wpstg_license_nonce', 'wpstg_license_nonce'))\n return; // get out if we didn't click the Activate button\n\n\n // retrieve the license from the database\n $license = trim(get_option('wpstg_license_key'));\n\n\n // data to send in our API request\n $api_params = [\n 'edd_action' => 'deactivate_license',\n 'license' => $license,\n 'item_name' => urlencode(WPSTG_ITEM_NAME), // the name of our product in EDD\n 'url' => home_url()\n ];\n\n // Call the custom API.\n $response = wp_remote_post(WPSTG_STORE_URL, ['timeout' => 15, 'sslverify' => false, 'body' => $api_params]);\n\n // make sure the response came back okay\n if (is_wp_error($response) || wp_remote_retrieve_response_code($response) !== 200) {\n\n if (is_wp_error($response)) {\n $message = $response->get_error_message();\n } else {\n $message = __('An error occurred, please try again.');\n }\n\n $base_url = admin_url('admin.php?page=wpstg-license');\n $redirect = add_query_arg(['wpstg_licensing' => 'false', 'message' => urlencode($message)], $base_url);\n wp_redirect($redirect);\n exit();\n }\n\n // decode the license data\n $license_data = json_decode(wp_remote_retrieve_body($response));\n\n // $license_data->license will be either \"deactivated\" or \"failed\"\n if ($license_data->license === 'deactivated' || $license_data->license === 'failed') {\n delete_option('wpstg_license_status');\n }\n\n wp_redirect(admin_url('admin.php?page=wpstg-license'));\n exit();\n }\n }", "public function getPackages(): array\n {\n $http = $this->getHttp();\n\n // Fetch data from\n try {\n $apiResponse = $http->get('https://get.typo3.org/json');\n } catch (ClientException $e) {\n throw new \\RuntimeException(\"Could not fetch releases for TYPO3\");\n }\n\n $branchList = json_decode((string) $apiResponse->getBody(), true);\n $packages = [];\n\n foreach ($branchList as $branch) {\n if (!is_array($branch)) {\n continue;\n }\n\n foreach ($branch[\"releases\"] as $version => $versionData) {\n if (in_array($version, self::IGNORES)) {\n continue;\n }\n\n $packages[$version] = [\n \"url\" => \"https://get.typo3.org\" . $versionData[\"url\"][\"tar\"],\n \"filename\" => $version . \".tgz\"\n ];\n }\n }\n\n return $packages;\n }", "function thrive_dashboard_get_licensed_products()\n{\n $products = array();\n\n $products = apply_filters('thrive_dashboard_licensed_products', $products);\n\n return $products;\n}", "public function distributions_list() {\n\t\t$response = $this->request( 'GET', '/2014-11-06/distribution' );\n\t\t$data = $response['body_array'];\n\n\t\t$data = $this->fix_array( $data, array(\n\t\t\t\t'Items', 'DistributionSummary' ) );\n\n\t\tif ( isset( $data['Items']['DistributionSummary'] ) ) {\n\t\t\tforeach ( $data['Items']['DistributionSummary'] as $key => $value ) {\n\t\t\t\t$data['Items']['DistributionSummary'][$key] =\n\t\t\t\t\t$this->fix_distribution(\n\t\t\t\t\t$data['Items']['DistributionSummary'][$key] );\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "function cs_liste_contribs($coupe = 999, $join = \"</li><li>\") {\r\n\tglobal $metas_outils;\r\n\t$contribs = array();\r\n\tforeach($metas_outils as $o=>$v) if(isset($v['contrib']) && isset($v['actif']) && $v['actif'])\r\n\t\t$contribs[] = '[' . couper(couteauprive_T($o.':nom'), $coupe) . '->' . (is_numeric($v['contrib']) ?_URL_CONTRIB.$v['contrib']:$v['contrib']) . ']';\r\n\tsort($contribs);\r\n\treturn '[{{' . couteauprive_T('docgen') . '}}->' . _URL_CONTRIB . '2166]' \r\n\t\t. $join . '[{{' . couteauprive_T('docwiki') . '}}->' . _URL_CONTRIB . '2793]'\r\n\t\t. (count($contribs)?$join.join($join, $contribs):'');\r\n}", "function advlicence ($nom,$prenom=\"\")\n\t{\n\t\tglobal $gCms;\n\t\t$ping = cms_utils::get_module('Ping'); \n\t\t//echo \"le nom est : \".$nom;\n\t\t//echo \"<br /> le prénom est : \".$prenom;\n\t\t$nom_final = str_replace(' ','%20',$nom);\n\t\t$db = cmsms()->GetDb();\n\t\t$now = trim($db->DBTimeStamp(time()), \"'\");\n\t\t$saison = $ping->GetPreference('saison_en_cours');\n\t\t$page = \"xml_liste_joueur\";\n\t\t$var =\"nom=\".$nom_final.\"&prenom=\".$prenom;\n\t\t$lignes = 0;\n\t\t\n\t\t//\t$var.=\"&action=poule\";\n\n\t\t\n\t\t$service = new Servicen();\n\t\t$lien = $service->GetLink($page, $var);\n\t\t//echo \"<br />\".$lien.\"<br />\";\n\t\t$xml = simplexml_load_string($lien, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t\t//var_dump($xml);\n\t\tif($xml === FALSE)\n\t\t{\n\t\t\t//le service est coupé\n\t\t\t$array = 0;\n\t\t\t$lignes = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$array = json_decode(json_encode((array)$xml), TRUE);\n\t\t\t$lignes = count($array['joueur']);\n\t\t}\n\t\t//echo \"le nb de lignes est : \".$lignes;\n\t\t$i = 0;\n\t\t\n\t\tif($lignes == 1 )//&& $lignes <2)//un seul joueur\n\t\t{\n\t\t\tforeach($xml as $tab)\n\t\t\t{\n\t\t\t\t$licence = (isset($tab->licence)?\"$tab->licence\":\"\");\n\t\t\t\t//echo \"la licence est : <br />\".$licence;\n\t\t\t\t$nom = (isset($tab->nom)?\"$tab->nom\":\"\");\n\t\t\t\t$prenom = (isset($tab->prenom)?\"$tab->prenom\":\"\");\n\t\t\t\t$club = (isset($tab->club)?\"$tab->club\":\"\");\n\t\t\t\t$nclub = (isset($tab->classement)?\"$tab->classement\":\"\");\n\t\t\t\t$clast = (isset($tab->clast)?\"$tab->clast\":\"\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\treturn $licence;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\t\n\t}", "public function getAdminCredits(array $credits)\n {\n $credits['Smarty'] = array(\n 'Smarty' => array(\n 'title' => 'Smarty',\n 'weblink' => \"http://www.smarty.net/\",\n 'copyright' => \"New Digital Group, Inc.\",\n 'description' => \"Smarty is a template engine for PHP, facilitating a manageable\n way to separate logic and content from its presentation.\"\n ),\n 'Smarty for Bigace' => array(\n 'title' => 'Smarty for Bigace',\n 'weblink' => \"http://www.keleo.de/\",\n 'copyright' => \"Kevin Papst - Keleo\",\n 'description' => \"An extension to enable Smarty templates for page rendering.\"\n ),\n );\n return $credits;\n }", "public function getLicense()\n {\n $headers = $this->getDefaultHeaders();\n $response = $this->client->request(\n 'GET',\n $this->api . $this->repo,\n array(\n \"headers\" => $headers\n )\n );\n\n if ($response->getStatusCode() == 200) {\n $body = $response->getBody();\n $body = json_decode($body, true);\n return $body[\"license\"];\n }\n return null;\n }", "function pkg_list_repos() {\n\tglobal $g;\n\n\t$repo_base = \"{$g['pkg_repos_path']}/{$g['product_name']}-repo\";\n\t$result = array();\n\t$name_files = glob(\"{$repo_base}-*.name\");\n\tforeach ($name_files as $name_file) {\n\t\t$repo_name = file_get_contents($name_file);\n\t\tif ($repo_name == false || strlen($repo_name) <= 1) {\n\t\t\tcontinue;\n\t\t}\n\t\t$repo_name_base = \"{$repo_base}-{$repo_name}\";\n\t\t$descr_file = \"{$repo_name_base}.descr\";\n\t\tif (file_exists($descr_file)) {\n\t\t\t$descr = file_get_contents($descr_file);\n\t\t\tif ($descr == false) {\n\t\t\t\t$descr = 'Unknown';\n\t\t\t}\n\t\t} else {\n\t\t\t$descr = 'Unknown';\n\t\t}\n\t\t$entry = array(\n\t\t 'name' => $repo_name,\n\t\t 'path' => \"{$repo_name_base}.conf\",\n\t\t 'descr' => $descr\n\t\t);\n\t\tif (file_exists(\"{$repo_name_base}.default\")) {\n\t\t\t$entry['default'] = true;\n\t\t}\n\t\t$result[] = $entry;\n\t}\n\n\treturn $result;\n}", "function crpLicense_userapi_getall($navigationValues)\n{\n\t// Security check\n\tif (!SecurityUtil :: checkPermission('crpLicense::Hook', '::', ACCESS_COMMENT))\n\t{\n\t\treturn LogUtil :: registerPermissionError();\n\t}\n\n\t$license= new crpLicense();\n\n\treturn $license->dao->adminList($navigationValues['startnum'], $navigationValues['clear'], $navigationValues['modvars'], $navigationValues['active'], $navigationValues['sortOrder']);\n}", "public function register_licenses_screen () {\n $args = $this->args;\n $screen = !empty( $args[ 'screen' ] ) ? $args[ 'screen' ] : false;\n $this->screen_type = !empty( $screen[ 'parent' ] ) ? 'submenu' : 'menu';\n $this->icon_url = !empty( $screen[ 'icon_url' ] ) ? $screen[ 'icon_url' ] : '';\n $this->position = !empty( $screen[ 'position' ] ) ? $screen[ 'position' ] : 66;\n $this->menu_title = !empty( $screen[ 'menu_title' ] ) ? $screen[ 'menu_title' ] : __( 'Licenses', $this->domain );\n $this->page_title = !empty( $screen[ 'page_title' ] ) ? $screen[ 'page_title' ] : __( 'Licenses', $this->domain );\n $this->menu_slug = $this->slug . '_' . sanitize_key( $this->page_title );\n \n switch( $this->screen_type ) {\n case 'menu':\n global $menu;\n $this->hook = add_menu_page( $this->page_title, $this->menu_title, 'manage_options', $this->menu_slug, array( $this, 'settings_screen' ), $this->icon_url, $this->position );\n break;\n case 'submenu':\n global $submenu;\n $this->hook = add_submenu_page( $screen[ 'parent' ], $this->page_title, $this->menu_title, 'manage_options', $this->menu_slug, array( $this, 'settings_screen' ) );\n break;\n }\n \n //** Set url for licenses page */\n $licenses_link = isset( $screen[ 'parent' ] ) && ( strpos( $screen[ 'parent' ], '?' ) !== false || strpos( $screen[ 'parent' ], '.php' ) !== false ) ? $screen[ 'parent' ] : 'admin.php';\n $licenses_link = add_query_arg( array(\n 'page' => $this->menu_slug,\n ), admin_url( $licenses_link ) );\n \n update_option( $this->token . '-url', $licenses_link );\n \n add_action( 'load-' . $this->hook, array( $this, 'process_request' ) );\n add_action( 'admin_print_styles-' . $this->hook, array( $this, 'enqueue_styles' ) );\n add_action( 'admin_print_scripts-' . $this->hook, array( $this, 'enqueue_scripts' ) );\n }", "function erp_get_license_status( $addon ) {\n if ( ! is_object( $addon['status'] ) ) {\n return false;\n }\n\n $messages = [];\n $html = '';\n $license = $addon['status'];\n $status_class = 'has-error';\n\n if ( false === $license->success ) {\n\n switch ( $license->error ) {\n\n case 'expired' :\n\n $messages[] = sprintf(\n __( 'Your license key expired on %s. Please <a href=\"%s\" target=\"_blank\" title=\"Renew your license key\">renew your license key</a>.', 'erp' ),\n date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ),\n 'https://wperp.com/checkout/?edd_license_key=' . $addon['license'] . '&utm_campaign=admin&utm_source=licenses&utm_medium=expired'\n );\n break;\n\n case 'missing' :\n\n $messages[] = sprintf(\n __( 'Invalid license. Please <a href=\"%s\" target=\"_blank\" title=\"Visit account page\">visit your account page</a> and verify it.', 'erp' ),\n 'https://wperp.com/my-account?utm_campaign=admin&utm_source=licenses&utm_medium=missing'\n );\n break;\n\n case 'invalid' :\n case 'site_inactive' :\n\n $messages[] = sprintf(\n __( 'Your %s is not active for this URL. Please <a href=\"%s\" target=\"_blank\" title=\"Visit account page\">visit your account page</a> to manage your license key URLs.', 'erp' ),\n $addon['name'],\n 'https://wperp.com/my-account?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'\n );\n break;\n\n case 'item_name_mismatch' :\n\n $messages[] = sprintf( __( 'This is not a %s.', 'erp' ), $addon['name'] );\n break;\n\n case 'no_activations_left':\n $messages[] = sprintf( __( 'Your license key has reached its activation limit. <a href=\"%s\">View possible upgrades</a> now.', 'erp' ), 'https://wperp.com/my-account/' );\n break;\n\n }\n } else {\n\n switch ( $license->license ) {\n case 'expired' :\n\n $messages[] = sprintf(\n __( 'Your license key expired on %s. Please <a href=\"%s\" target=\"_blank\" title=\"Renew your license key\">renew your license key</a>.', 'erp' ),\n date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ),\n 'https://wperp.com/checkout/?edd_license_key=' . $addon['license'] . '&utm_campaign=admin&utm_source=licenses&utm_medium=expired'\n );\n break;\n\n case 'valid':\n $status_class = 'no-error';\n $now = current_time( 'timestamp' );\n $expiration = strtotime( $license->expires, current_time( 'timestamp' ) );\n\n if ( 'lifetime' === $license->expires ) {\n\n $messages[] = __( 'License key never expires.', 'erp' );\n\n } elseif ( $expiration > $now && $expiration - $now < ( DAY_IN_SECONDS * 30 ) ) {\n\n $messages[] = sprintf(\n __( 'Your license key expires soon! It expires on %s. <a href=\"%s\" target=\"_blank\" title=\"Renew license\">Renew your license key</a>.', 'erp' ),\n date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ),\n 'https://wperp.com/checkout/?edd_license_key=' . $addon['license'] . '&utm_campaign=admin&utm_source=licenses&utm_medium=renew'\n );\n\n } else {\n\n $messages[] = sprintf(\n __( 'Your license key expires on %s.', 'erp' ),\n date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) )\n );\n\n }\n break;\n }\n\n }\n\n if ( ! empty( $messages ) ) {\n foreach ( $messages as $message ) {\n\n $html .= '<div class=\"erp-license-status ' . $status_class . '\">';\n $html .= '<p class=\"help\">' . $message . '</p>';\n $html .= '</div>';\n\n }\n }\n\n return $html;\n}", "public function getRegionalCosts($data, $convertYear = false)\n {\n $result = array();\n if (count($data) === 1 && !count($data[0])) {\n return json_encode($result);\n }\n foreach ($data as $key => $value) {\n array_push($result, array(\n 'name' => $convertYear ? date('Y', strtotime($key)) : $key,\n 'plan_rash' => $value['plan_rash'] !== '' ? $value['plan_rash'] * 0.000001 : '',\n 'fakt_rash' => $value['fakt_rash'] !== '' ? $value['fakt_rash'] * 0.000001 : ''\n )\n );\n }\n\n return json_encode($result);\n }", "public function index()\n {\n return view('licenses.index');\n }", "public static function getDistributions()\n {\n parent::$subUrl = 'distributions';\n $channelsDistributions = [];\n\n try {\n $mapper = new ObjectMapper(new JsonSerializer());\n ;\n $response = self::getResponse();\n $data = json_decode($response, true);\n print_r($data);\n if (count($data['ChannelDistributions']) > 0) {\n foreach ($data['ChannelDistributions'] as $distribution) {\n $channelsDistributions[] = $mapper->map(json_encode($distribution), ChannelDistribution::class);\n }\n }\n } catch (\\Exception $e) {\n throw $e;\n }\n\n return $channelsDistributions;\n }", "function register_license_settings() {\n\t\t// creates our settings in the options table\n\t\tregister_setting( $this->get_settings_page_slug(), $this->product_slug . '-license-key', 'sanitize_license' );\n\t}", "protected function convertPriceList() {\n\t\t$retArray =array();\n\t\t\n\t\tforeach ($this->DetailPriceList as $name => $nameValue) {\n\t\t\t$description = '';\n\t\t\t$unit = '';\n\t\t\t$price = 0;\n\t\t\t$avgPrice = 0;\n\t\t\tif (is_array($nameValue)) {\n\t\t\t\tforeach ($nameValue as $desc => $prices) {\n\t\t\t\t\tif (is_array($prices)) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$price = $nameValue;\n\t\t\t\t$avgPrice = $price;\n\t\t\t}\n\t\t\t$retArray[] = array($name,$description, $unit,$price, $avgPrice );\n\t\t}\n\t}", "protected function parseComposer()\r\n {\r\n $bundles = parent::parseComposer();\r\n foreach ($this->getPackages() as $package) {\r\n if (!strncmp($package['name'], 'superrb/', strlen('superrb/'))) {\r\n $bundles[] = array(\r\n 'name' => $package['name'],\r\n 'version' => $package['version'],\r\n 'reference' => $package['source']['reference'],\r\n );\r\n }\r\n }\r\n\r\n return $bundles;\r\n }", "function moveLicenses($old_software_id, $new_software_id) {\n global $DB;\n\n //Return false if one of the 2 softwares doesn't exists\n if (!countElementsInTable('glpi_softwares', ['id' => $old_software_id])\n || !countElementsInTable('glpi_softwares', ['id' => $new_software_id])) {\n return false;\n }\n\n //Transfer licenses to new software if needed\n if ($old_software_id != $new_software_id) {\n $DB->update(\n 'glpi_softwarelicenses', [\n 'softwares_id' => $new_software_id\n ], [\n 'softwares_id' => $old_software_id\n ]\n );\n }\n return true;\n }", "public function get_additional_packages()\n {\n return array();\n }", "public function ascLicensesData(ASCLicensesRequest $request)\n {\n if ($request->ajax()) {\n $ascLicenses = ASCLicense::orderBy('id','DESC');\n if($request->filter['search']){\n $ascLicenses = $ascLicenses->search($request->filter['search']);\n }\n if($request->filter['filter']){\n $ascLicenses = $ascLicenses->filter($request->filter['filter']);\n }\n $ascLicenses = $ascLicenses->paginate($request->filter['length']);\n $licenseType = array(\n 1 => 'Licensed',\n 2 => 'Certified General',\n 3 => 'Certified Residential',\n 4 => 'Transitional License',\n );\n\n return view('admin::management.asc-licenses.partials._data',compact('ascLicenses','licenseType'));\n }\n }", "static function showLicenses(User $user) {\n global $DB;\n\n\t\t$ID = $user->getField('id');\n\n\t\techo \"<div class='spaced'><table class='tab_cadre_fixehov'>\";\n\t\t$header = \"<tr><th>\".__('Software').\"</th>\";\n\t\t$header .= \"<th>\".__('Licenses').\"</th>\";\n\t\t$header .= \"<th>\".__('Added').\"</th></tr>\";\n\t\techo $header;\n\n $query = \"SELECT\n ul.added,\n sl.name AS licenses_name,\n s.name AS software_name,\n\t\t\t\tsl.id AS licenses_id,\n\t\t\t\ts.id AS software_id\n FROM\n glpi_users_softwarelicenses ul\n JOIN glpi_softwarelicenses sl ON (sl.id = ul.softwarelicenses_id)\n JOIN glpi_softwares s ON (s.id = sl.softwares_id)\n WHERE\n ul.users_id = '$ID'\n ORDER BY\n ul.added DESC\";\n\n $result = $DB->query($query);\n\n if ($DB->numrows($result) > 0) {\n while ($data = $DB->fetch_assoc($result)) {\n echo \"<tr class='tab_bg_1'>\";\n echo \"<td class='center'><a href='software.form.php?id=\".$data['software_id'].\"'>\".$data[\"software_name\"].\"</a></td>\";\n echo \"<td class='center'><a href='softwarelicense.form.php?id=\".$data['licenses_id'].\"'>\".$data[\"licenses_name\"].\"</a></td>\";\n echo \"<td class='center' style='width:20%'>\".$data[\"added\"].\"</td>\";\n echo \"</tr>\";\n }\n } else {\n echo \"<tr class='tab_bg_1'><td class='center' colspan='3'>No results.</td></tr>\";\n }\n\n\t\techo \"</table></div>\";\n\n\t\treturn true;\n }", "function installPackageDyntables() {\n @rename('/usr/local/www/diag_dhcp_leases.php', '/usr/local/pkg/diag_dhcp_leases.php.org');\n @rename('/usr/local/pkg/dyntables.js', '/usr/local/www/javascript/dyntables.js');\n @rename('/usr/local/pkg/diag_dhcp_leases.php', '/usr/local/www/diag_dhcp_leases.php');\n}", "public function wpbooklist_storefront_save_license_key_action_callback() {\n\n\t\t\tglobal $wpdb;\n\n\t\t\tcheck_ajax_referer( 'wpbooklist_storefront_save_license_key_action_callback', 'security' );\n\n\t\t\tif ( isset( $_POST['license'] ) ) {\n\t\t\t\t$license = filter_var( wp_unslash( $_POST['license'] ), FILTER_SANITIZE_STRING );\n\t\t\t}\n\n\t\t\t$data = array(\n\t\t\t\t'treh' => $license,\n\t\t\t);\n\t\t\t$format = array( '%s' );\n\t\t\t$where = array( 'ID' => 1 );\n\t\t\t$where_format = array( '%d' );\n\t\t\t$save_result = $wpdb->update( $wpdb->prefix . 'wpbooklist_storefront_settings', $data, $where, $format, $where_format );\n\n\t\t\twp_die( $save_result );\n\n\t\t}", "protected function assets()\n {\n $output = [];\n if (!file_exists($this->config['build'] . 'node_modules')) {\n putenv('PATH=' . trim(shell_exec('echo $PATH')) . ':' . dirname(MODX_BASE_PATH) . '/');\n if (file_exists($this->config['build'] . 'package.json')) {\n $this->modx->log(modX::LOG_LEVEL_INFO, 'Trying to install or update nodejs dependencies');\n $output = [\n shell_exec('cd ' . $this->config['build'] . ' && npm config set scripts-prepend-node-path true && npm install'),\n ];\n }\n if (file_exists($this->config['build'] . 'gulpfile.js')) {\n $output = array_merge($output, [\n shell_exec('cd ' . $this->config['build'] . ' && npm link gulp'),\n shell_exec('cd ' . $this->config['build'] . ' && gulp copy'),\n ]);\n }\n if ($output) {\n $this->modx->log(xPDO::LOG_LEVEL_INFO, implode(\"\\n\", array_map('trim', $output)));\n }\n }\n if (file_exists($this->config['build'] . 'gulpfile.js')) {\n $output = shell_exec('cd ' . $this->config['build'] . ' && gulp default 2>&1');\n $this->modx->log(xPDO::LOG_LEVEL_INFO, 'Compile scripts and styles ' . trim($output));\n }\n }", "public function add_license_page(){\n\t\tglobal $submenu;\n\t\tadd_submenu_page('edumax-options','License', 'License', 'manage_options', 'edumax-theme-license', array($this, 'license_form'));\n\t\t$submenu['edumax-options'][] = array( 'Edumax Docs', 'manage_options' , 'https://www.themeum.com/docs/edumax-introduction/');\n\t}", "function list( $args, $assoc_args ) {\n $options = $this->_set_option_params( $assoc_args );\n $this->_create_client( $options['profile'], $options['access_key'], $options['secret_key'] );\n $result = $this->client->listDistributions();\n echo json_encode($result->get('DistributionList'));\n //@TODO Support another format like YAML / table / csv and more\n }", "function install_org_lucterios_updates($ExensionVersions) {\n\t$text = \"\";\n\treturn $text;\n}" ]
[ "0.6499815", "0.6127038", "0.5843459", "0.5609029", "0.5375931", "0.5307594", "0.52684665", "0.52159804", "0.5144643", "0.5077762", "0.50699294", "0.5064465", "0.5037956", "0.5015279", "0.48976237", "0.48549876", "0.4846191", "0.48095733", "0.4764787", "0.47572795", "0.47567585", "0.4697118", "0.46794784", "0.4675873", "0.46699634", "0.466745", "0.46573463", "0.46440926", "0.4630612", "0.46245742", "0.46215636", "0.461896", "0.46072334", "0.4600462", "0.45837918", "0.45425606", "0.4540481", "0.45373893", "0.4526331", "0.44995347", "0.44972312", "0.44923082", "0.44873676", "0.44873676", "0.44873676", "0.44873676", "0.44873676", "0.44873676", "0.44854242", "0.44783926", "0.44749", "0.44746572", "0.44615403", "0.44612753", "0.4449143", "0.44154486", "0.44078568", "0.44063774", "0.4399153", "0.4395951", "0.4394107", "0.43911767", "0.43909335", "0.43883246", "0.43797496", "0.43625966", "0.4350384", "0.43470752", "0.43431464", "0.43429607", "0.43294752", "0.43269762", "0.43106267", "0.43037257", "0.42936695", "0.42881328", "0.42871723", "0.4287001", "0.4282769", "0.42761904", "0.42750692", "0.4261299", "0.42589027", "0.4258295", "0.42509598", "0.42465103", "0.42458123", "0.42442146", "0.42421043", "0.42415887", "0.42394492", "0.42370903", "0.42117846", "0.42108327", "0.4206908", "0.42006773", "0.41940886", "0.417867", "0.41693082", "0.41633472" ]
0.6453596
1
Convert the author section.
public static function convertAuthor($value) { if (null !== $value) { $value = array($value); } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function author();", "public function getAuthor() {}", "abstract public function getAuthor();", "public function getAuthor();", "public function getAuthor();", "public function getAuthor();", "public function get_author_permastruct()\n {\n }", "public function author() {\n\t\t\t\n\t\t\t$output = array();\n\n\t\t\t$author = $this->post->post_author;\n\t\t\t\n\t\t\t$output['id'] = $author;\n\t\t\t$output['nicename'] = get_the_author_meta('nickname', $author);\n\t\t\t$output['name'] = get_the_author_meta('user_firstname', $author).' '.get_the_author_meta('user_lastname', $author);\n\t\t\t$output['url'] = get_author_posts_url($author);\n\t\t\t$output['description'] = get_the_author_meta('description', $author);\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "function GetAuthor()\n {\n return 'calguy1000';\n }", "public function getAuthorname() {}", "public function get_author()\n\t{\n\t\treturn '';\n\t}", "function sopac_author_format($author, $addl_author_ser) {\n/*\n if ($author) {\n $author_arr = explode(',', trim($author, '.'));\n $new_author_str = trim($author_arr[1]) . ' ' . trim($author_arr[0]);\n }\n\n elseif ($addl_author_ser) {\n $addl_author = unserialize($addl_author_ser);\n if ($addl_author[0]) {\n $author_arr = explode(',', trim($addl_author[0], '.'));\n $new_author_str = trim($author_arr[1]) . ' ' . trim($author_arr[0]);\n }\n }\n\n if ($new_author_str) {\n //$new_author_str = ereg_replace(\"[^A-Za-z\\x20-\\x7F '.-]\", '', $new_author_str );\n $new_author_str = preg_replace('/ - /', ' ', $new_author_str);\n }\n else {\n $new_author_str = '';\n }\n\n return $new_author_str;\n*/\n return $author;\n}", "function getAuthor() \n\t{\n\t\t$author = array();\n\t\tinclude_once \"./Services/MetaData/classes/class.ilMD.php\";\n\t\t$md =& new ilMD($this->getId(), 0, $this->getType());\n\t\t$md_life =& $md->getLifecycle();\n\t\tif ($md_life)\n\t\t{\n\t\t\t$ids =& $md_life->getContributeIds();\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$md_cont =& $md_life->getContribute($id);\n\t\t\t\tif (strcmp($md_cont->getRole(), \"Author\") == 0)\n\t\t\t\t{\n\t\t\t\t\t$entids =& $md_cont->getEntityIds();\n\t\t\t\t\tforeach ($entids as $entid)\n\t\t\t\t\t{\n\t\t\t\t\t\t$md_ent =& $md_cont->getEntity($entid);\n\t\t\t\t\t\tarray_push($author, $md_ent->getEntity());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn join($author, \",\");\n }", "function GetAuthor()\n {\n return 'texus';\n }", "public function getAuthorName()\n {\n return 'Fightmaster.publication.author.name';\n }", "public function author()\n {\n return optional($this->author);\n }", "protected function _syncAuthor() {}", "private function get_article_author() {\n\n\t\tif ( ! $this->is_json_valid() )\n\t\t\treturn [];\n\n\t\tif ( ! $post = $this->get_current_post() ) {\n\t\t\t$this->invalidate( 'amp' );\n\t\t\treturn [];\n\t\t}\n\n\t\t$author = \\get_userdata( $post->post_author );\n\t\t$name = isset( $author->display_name ) ? $author->display_name : '';\n\n\t\tif ( ! $name ) {\n\t\t\t$this->invalidate( 'amp' );\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t'author' => [\n\t\t\t\t'@type' => 'Person',\n\t\t\t\t'name' => \\esc_attr( $name ),\n\t\t\t],\n\t\t];\n\t}", "function get_the_author_aim()\n {\n }", "public function authorsInitials();", "public function getAuthor(): string\n {\n return $this->_author;\n }", "function handleAuthor($role_name, $author) {\n $replacements = array(\n $role_name,\n $author['name'],\n $author['email'],\n $author['when']['time'],\n $author['when']['offutc']\n );\n return vsprintf(\"%s %s <%s> %s %s\\n\", $replacements);\n }", "public function get_authors();", "public function setAuthor($author, $encoding = 'UTF-8') {}", "function showAuthor()\n {\n $this->out->elementStart('div', 'author');\n\n $this->out->elementStart('span', 'vcard author');\n\n $attrs = array('href' => $this->profile->profileurl,\n 'class' => 'url',\n 'title' => $this->profile->nickname);\n\n $this->out->elementStart('a', $attrs);\n $this->showAvatar();\n $this->out->text(' ');\n $user = common_current_user();\n if (!empty($user) && $user->streamNicknames()) {\n $this->out->element('span',array('class' => 'fn'),\n $this->profile->nickname);\n } else {\n $this->out->element('span',array('class' => 'fn'),\n $this->profile->getBestName());\n }\n $this->out->elementEnd('a');\n\n $this->out->elementEnd('span');\n\n $this->showAddressees();\n\n $this->out->elementEnd('div');\n }", "private function getDocAuthor($nodeValue) {\n\t\t$author = \"\";\n\t\t$pos = strpos($nodeValue, \"Urheber:\");\n\t\t\n\t\tif ($pos!=false) {\n\t\t\t$author = trim(substr($nodeValue, $pos+8));\t\t\t\n\t\t}\n\t\t\n\t\treturn $author;\n\t}", "public function getAuthor($encoding = 'UTF-8') {}", "public function get_author()\n {\n return 'Kamen Blaginov';\n }", "public function get_author()\n {\n return 'Kamen Blaginov';\n }", "function get_the_author_link()\n {\n }", "function saveAuthorToMetadata($a_author = \"\")\n\t{\n\t\t$md =& new ilMD($this->getId(), 0, $this->getType());\n\t\t$md_life =& $md->getLifecycle();\n\t\tif (!$md_life)\n\t\t{\n\t\t\tif (strlen($a_author) == 0)\n\t\t\t{\n\t\t\t\tglobal $ilUser;\n\t\t\t\t$a_author = $ilUser->getFullname();\n\t\t\t}\n\t\t\t\n\t\t\t$md_life =& $md->addLifecycle();\n\t\t\t$md_life->save();\n\t\t\t$con =& $md_life->addContribute();\n\t\t\t$con->setRole(\"Author\");\n\t\t\t$con->save();\n\t\t\t$ent =& $con->addEntity();\n\t\t\t$ent->setEntity($a_author);\n\t\t\t$ent->save();\n\t\t}\n\t}", "public function getAuthor() \r\n { \r\n return $this->_author; \r\n }", "public function author() : string\n {\n if (isset($this->entity->author)) {\n return $this->entity->author->name;\n }\n\n return 'Sin autor';\n }", "function get_the_author_yim()\n {\n }", "function get_the_author_description()\n {\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function getAuthor()\n {\n return $this->author;\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "public function get_author()\n {\n return 'Chris Graham';\n }", "function decorateWithAuthor($article) {\n global $authorArticleTable;\n\n createAuthorArticleTable();\n\n $article->authors = $authorArticleTable[$article->id];\n\n return $article;\n}", "function _formatAuthor($array) {\n\t\tif (!array_key_exists('von', $array)) {\n\t\t\t$array['von'] = '';\n\t\t} else {\n\t\t\t$array['von'] = trim($array['von']);\n\t\t}\n\t\tif (!array_key_exists('last', $array)) {\n\t\t\t$array['last'] = '';\n\t\t} else {\n\t\t\t$array['last'] = trim($array['last']);\n\t\t}\n\t\tif (!array_key_exists('jr', $array)) {\n\t\t\t$array['jr'] = '';\n\t\t} else {\n\t\t\t$array['jr'] = trim($array['jr']);\n\t\t}\n\t\tif (!array_key_exists('first', $array)) {\n\t\t\t$array['first'] = '';\n\t\t} else {\n\t\t\t$array['first'] = trim($array['first']);\n\t\t}\n\t\t$ret = $this->authorstring;\n\t\t$ret = str_replace(\"VON\", $array['von'], $ret);\n\t\t$ret = str_replace(\"LAST\", $array['last'], $ret);\n\t\t$ret = str_replace(\"JR\", $array['jr'], $ret);\n\t\t$ret = str_replace(\"FIRST\", $array['first'], $ret);\n\t\treturn trim($ret);\n\t}", "public function get_author() {\n\t\treturn $this->author();\n\t}", "function get_the_author_msn()\n {\n }", "function the_author_aim()\n {\n }", "function render_block_core_post_author($attributes, $content, $block)\n {\n }", "public function getAuthorID();", "public function getAuthor() {\n return $this->author;\n }", "public function getAuthor() {\n return $this->author;\n }", "public function getAuthor() {\n return $this->author;\n }", "public function authorLink() { return $this->post->post_author; }", "function print_author_tag() {\n\t\t\n\t\techo \"<meta name='author' content='{$this->options->site_author}' />\\r\\n\";\n\t}", "public function getAuthor() {\n\t\treturn $this->author;\n\t}", "function renderAuthors($authors, $prefix = \"\") {\n\n $value = \"\";\n\n if (!isset($authors[0])) {\n\n if (isset($authors[\"email\"]))\n $value .= sprintf('%s &lt;<a href=\"mailto:%s\">%s</a>&gt;, ', $authors[\"value\"], $authors[\"email\"], $authors[\"email\"]);\n else \n $value .= $authors[\"email\"] . \", \";\n\n } else {\n\n reset($authors);\n while (list($k, $author) = each($authors)) {\n\n if (isset($author[\"email\"]))\n $value .= sprintf('%s &lt;<a href=\"mailto:%s\">%s</a>&gt;, ', $author[\"value\"], $author[\"email\"], $author[\"email\"]);\n else \n $value .= $author[\"email\"] . \", \";\n\n }\n\n }\n\n $value = substr($value, 0, -2);\n $this->tpl->setCurrentBlock(strtolower($prefix) . \"authors\");\n $this->tpl->setVariable(\"AUTHOR\", $value);\n $this->tpl->parseCurrentBlock();\n\n }", "public function getAuthorLabel()\n {\n return (string) $this->_theme->themeAuthor->authorLabel;\n }", "function thememove_setup_author() {\n\tglobal $wp_query;\n\n\tif ( $wp_query->is_author() && isset( $wp_query->post ) ) {\n\t\t$GLOBALS['authordata'] = get_userdata( $wp_query->post->post_author );\n\t}\n}", "public function authors_tab_content() {\n\t\techo '<h2>Authors</h2>';\n\t\t$content = get_post_meta( get_the_ID(), 'authordesc', true );\n\t\t$content = htmlspecialchars_decode( $content );\n\t\t$content = wpautop( $content );\n\t\techo $content;\n\t}", "public function getBookAuthor()\n {\n return $this->author;\n }", "public function Author()\n {\n return $this->rssField($this->authorField);\n }", "function the_author_link()\n {\n }", "protected function setAuthors() {\r\n\t\t// authors, yes, we can handle more than one per article\r\n\t\t$authorsStg = $this->newsItem->getAuthor();\r\n\t\tif (!empty($authorsStg)) {\r\n\t\t\t$authors = t3lib_div::trimExplode(',', $authorsStg);\r\n\t\t\t$allowedCount = intval($this->settings['news']['semantic']['general']['author']['max']);\r\n\t\t\t$this->authors = (empty($allowedCount)) ? $authors : array_slice($authors, 0, $allowedCount);\r\n\t\t}\r\n\t}", "function the_author_msn()\n {\n }", "public function getAuthorID()\n {\n return (int) $this->_theme->themeAuthor->authorID;\n }", "function getAuthor($template) {\n\tif ( !is_string($template['Repository'])) return false;\n\tif ( $template['Author'] ) return strip_tags($template['Author']);\n\t$repoEntry = explode(\"/\",$template['Repository']);\n\tif (count($repoEntry) < 2)\n\t\t$repoEntry[] = \"\";\n\n\treturn strip_tags(explode(\":\",$repoEntry[count($repoEntry)-2])[0]);\n}", "function render_block_core_post_author_name($attributes, $content, $block)\n {\n }", "public function get_author_description() {\n\t\t\t$user = get_userdata( intval( $this->instance['user_id'] ) );\n\n\t\t\tif ( ! $user ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn sprintf(\n\t\t\t\t'<div class=\"about-author_description\">%s</div>',\n\t\t\t\twp_filter_post_kses( $user->description )\n\t\t\t);\n\t\t}", "function the_author_description()\n {\n }", "public function setAuthor($author);", "function hc_the_author($gravatarSize = ''){\n\t\t$info = hc_get_the_author($gravatarSize);\n\t\tforeach ($info as $index => $author) {\n\t\t\tif(file_exists(get_bloginfo('stylesheet_directory').'plugins/hypercontact/templates/author.php')){\n\t\t\t\tinclude(get_bloginfo('stylesheet_directory').'plugins/hypercontact/templates/author.php');\n\t\t\t}else{\n\t\t\t\tinclude('templates/author.php');\n\t\t\t}\n\t\t}\n\n\t}", "function the_author() {\n\tglobal $discussion;\n\treturn $discussion['author'];\n}", "function the_author_yim()\n {\n }", "function GetAuthorEmail()\n {\n return 'info@texus.lt';\n }", "function processAuthor($author) {\n return NULL;\n }", "public function getAuthor() {\n return $this->_author;\n }", "function setAuthor($a) {\n\t\t$this->set(\"author\",$a);\n\t}", "public function author(): ?string\n {\n return $this->author;\n }", "public static function author(){ //Here author can not be override bcz its a final method\n return \"My name is \".self::$name.\" Sen\";\n }", "function get_the_author_ID()\n {\n }", "public function getAuthors();", "function emc_get_the_author( $post_id ) {\r\n\r\n\tif ( ! class_exists( 'Acf', false ) ) return false;\r\n\r\n\t$author = get_post_meta( $post_id, 'byline', true );\r\n\r\n\tif ( isset( $author ) && ! empty( $author ) ) {\r\n\r\n\t\t$html = sprintf( __( ' by %s', 'emc' ),\r\n\t\t\tesc_html( $author )\r\n\t\t);\r\n\t\treturn $html;\r\n\r\n\t}\r\n\r\n\treturn false;\r\n\r\n}", "public function is_author($author = '')\n {\n }", "public function getAuthor() {\n\t\t\treturn $this->MODULE_AUTHOR;\n\t\t}", "public function getAuthorId() : string\n {\n return $this->authorId;\n }", "public function getAuthor() {\n return $this->randomQuote->author_name;\n }", "private function sanitiseAuthor($author) {\n\t\treturn preg_replace('/, [0-9 \\.-]+/', '', $author);\n\t}", "function da_add_author_page() {\n\t$author_id = get_the_author_meta( 'ID' );\n\t$user_posts = get_author_posts_url( get_the_author_meta( 'ID' ) );\n\t$display_name = get_the_author_meta( 'display_name' );\n\t$darole = get_author_role( $author_id );\n\techo '<div class=\"archive-description\"><h1 class=\"archive-title\">All articles by ' . esc_html( $display_name ) . '</h1></div>';\n}", "public function getAuthor()\n {\n return $this->author = get_userdata($this->get()->post_author);\n }", "function get_the_modified_author()\n {\n }", "function _returnFromRow($row) {\n\t\t// Start with an Author object and copy the common elements\n\t\t$authorDao = DAORegistry::getDAO('AuthorDAO');\n\t\t$author = $authorDao->_fromRow($row);\n\n\t\t$chapterAuthor = $this->newDataObject();\n\t\t$chapterAuthor->setId($author->getId());\n\t\t$chapterAuthor->setSubmissionId($author->getSubmissionId());\n\t\t$chapterAuthor->setFirstName($author->getFirstName());\n\t\t$chapterAuthor->setMiddleName($author->getMiddleName());\n\t\t$chapterAuthor->setLastName($author->getLastName());\n\t\t$chapterAuthor->setAffiliation($author->getAffiliation(null), null);\n\t\t$chapterAuthor->setCountry($author->getCountry());\n\t\t$chapterAuthor->setEmail($author->getEmail());\n\t\t$chapterAuthor->setUrl($author->getUrl());\n\t\t$chapterAuthor->setUserGroupId($author->getUserGroupId());\n\n\t\t// Add additional data that is chapter author specific\n\t\t$chapterAuthor->setPrimaryContact($row['primary_contact']);\n\t\t$chapterAuthor->setSequence($row['seq']);\t\t;\n\t\t$chapterAuthor->setChapterId($row['chapter_id']);\n\n\t\treturn $chapterAuthor;\n\t}", "public function api_getAuthorInfo($author_id = null) {\t\n\t\t$authors = $this->find('all', array(\n\t\t\t'conditions' => array('Author.author_id' => $author_id),\n\t\t\t'fields' => array('Author.document_id', 'Author.fullname'),\n\t\t\t// 'order' => array('Author.lastname' => 'asc'),\n\t\t\t// 'limit' => 3\n\t\t));\n\t\treturn $authors;\n\t}", "public function setAuthor($author) {\r\n\t\tif (t3lib_div::testInt($author)) {\r\n\t\t\t$this->data['author'] = $author;\r\n\t\t} else {\r\n\t\t\t$rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'fe_users', 'username=\\'' . $author . '\\'');\r\n\t\t\tif (!empty($rows) && is_array($rows)) {\r\n\t\t\t\t$this->data['author'] = intVal($rows[0]['uid']);\r\n\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.7022076", "0.68107975", "0.6798293", "0.6775977", "0.6775977", "0.6775977", "0.6653955", "0.6653057", "0.65902436", "0.6563066", "0.65448433", "0.64796346", "0.64456236", "0.641754", "0.6387348", "0.63849056", "0.63290745", "0.63266206", "0.63241327", "0.6311868", "0.6290966", "0.62241536", "0.62041", "0.61997974", "0.6196931", "0.6193794", "0.6185339", "0.6162238", "0.6162238", "0.6147043", "0.6103991", "0.6098507", "0.60873383", "0.6085125", "0.6073209", "0.60702646", "0.60702646", "0.60702646", "0.60702646", "0.60702646", "0.60702646", "0.60702646", "0.60702646", "0.60695195", "0.60695195", "0.60695195", "0.60695195", "0.60695195", "0.60695195", "0.603363", "0.60309404", "0.6025127", "0.6021445", "0.6018932", "0.600832", "0.6000151", "0.5998128", "0.5998128", "0.5998128", "0.5989742", "0.59607166", "0.59580046", "0.5955558", "0.5952122", "0.59496367", "0.5941886", "0.593053", "0.5920165", "0.5910591", "0.5906618", "0.58917487", "0.5890276", "0.5887505", "0.58848864", "0.5883967", "0.5883073", "0.58827597", "0.58757603", "0.5862403", "0.5857187", "0.58527374", "0.5844549", "0.5832017", "0.58296436", "0.5826273", "0.58240014", "0.58231616", "0.58223706", "0.58170205", "0.5804805", "0.57841", "0.57813215", "0.57765687", "0.57746726", "0.57737046", "0.5771633", "0.57708955", "0.57701415", "0.5767558", "0.57666945" ]
0.595775
62
Convert the contributors section.
public static function convertContributors($value, $prevValue) { $mergeValue = \is_array($prevValue) ? $prevValue : array(); $mergeValue = array_merge($mergeValue, \is_array($value) ? $value : array()); if (\count($mergeValue) > 0) { $value = $mergeValue; } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function about_contributor()\r\n\t{\r\n\t\t?>&clubs; \"About Contributor\" Module<?\r\n\t}", "public function getContributorExtra() {\n $result = TingOpenformatMethods::parseFields($this->_getDetails(), array('contributors' => array('contributorExtra')));\n return $result;\n }", "function contributor_list() {\r\n $this->showFields = array('NAME', 'LOCATION', 'COUNTRY');\r\n print '<ul>';\r\n\r\n $xml_parser = xml_parser_create();\r\n xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true);\r\n xml_set_element_handler($xml_parser, array($this, \"start_element\"), array($this, \"end_element\"));\r\n xml_set_character_data_handler($xml_parser, array($this, \"character_data\"));\r\n\r\n if ( !(@$fp = fopen('http://grandslambert.com/xml/custom-page-extensions/contributors.xml', \"r\")) ) {\r\n print 'There was an error getting the list. Try again later.';\r\n return;\r\n }\r\n\r\n while ($data = fread($fp, 4096)) {\r\n if ( !xml_parse($xml_parser, $data, feof($fp)) ) {\r\n die(sprintf(\"XML error: %s at line %d\",\r\n xml_error_string(xml_get_error_code($xml_parser)),\r\n xml_get_current_line_number($xml_parser)));\r\n }\r\n }\r\n\r\n xml_parser_free($xml_parser);\r\n print '</ul>';\r\n }", "private function contributors()\n {\n $contributors = array();\n \n if (isset($this->article->AuthorList->Author)) {\n foreach ($this->article->AuthorList->Author as $author) {\n if (isset($author->CollectiveName)) {\n $category = 5; // corporate author\n $name = (string)$author->CollectiveName;\n } else {\n $category = 1; //primary (human) author\n $lastname = (string)$author->LastName;\n if (isset($author->ForeName)) {\n $name = $lastname . ', ' . (string)$author->ForeName;\n } elseif (isset($author->FirstName)) {\n $name = $lastname . ', ' . (string)$author->FirstName;\n } elseif (isset($author->Initials)) {\n $name = $lastname . ', ' . (string)$author->Initials;\n }\n }\n $contributors[$category][] = array('name' => $name);\n }\n }\n \n return $contributors;\n }", "function ridizain_list_authors() {\r\n\t$contributor_ids = get_users( array(\r\n\t\t'fields' => 'ID',\r\n\t\t'orderby' => 'post_count',\r\n\t\t'order' => 'DESC',\r\n\t\t'who' => 'authors',\r\n\t) );\r\n\r\n\tforeach ( $contributor_ids as $contributor_id ) :\r\n\t\t$post_count = count_user_posts( $contributor_id );\r\n\r\n\t\t// Move on if user has not published a post (yet).\r\n\t\tif ( ! $post_count ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t?>\r\n\r\n\t<div class=\"contributor\">\r\n\t\t<div class=\"contributor-info\">\r\n\t\t\t<div class=\"contributor-avatar\"><?php echo get_avatar( $contributor_id, 132 ); ?></div>\r\n\t\t\t<div class=\"contributor-summary\">\r\n\t\t\t\t<h2 class=\"contributor-name\"><?php echo get_the_author_meta( 'display_name', $contributor_id ); ?></h2>\r\n\t\t\t\t<p class=\"contributor-bio\">\r\n\t\t\t\t\t<?php echo get_the_author_meta( 'description', $contributor_id ); ?>\r\n\t\t\t\t</p>\r\n\t\t\t\t<a class=\"contributor-posts-link\" href=\"<?php echo esc_url( get_author_posts_url( $contributor_id ) ); ?>\">\r\n\t\t\t\t\t<?php printf( _n( '%d Article', '%d Articles', $post_count, 'ridizain' ), $post_count ); ?>\r\n\t\t\t\t</a>\r\n\t\t\t</div><!-- .contributor-summary -->\r\n\t\t</div><!-- .contributor-info -->\r\n\t</div><!-- .contributor -->\r\n\r\n\t<?php\r\n\tendforeach;\r\n}", "public function createContributors(Row $row, $contrib_role) {\n // Contributors.\n $contrib_ids = [];\n $contrib_names = explode(\";\", $row->getSourceProperty($contrib_role));\n\n // Create contrib.\n foreach ($contrib_names as $contrib_name) {\n // Trim whitespace and remove periods.\n $contrib_name = trim($contrib_name, \" \\t\\n\\r\\0\\x0B\\x2E\");\n // Keep exact trimmed copy to prevent duplicate import.\n $zotero_name = $contrib_name;\n // If contributor is anonymous...\n if (strpos(mb_strtolower($contrib_name), 'anonymous')) {\n $zotero_name = $contrib_name = 'Anonymous';\n }\n\n if (!empty($contrib_name)) {\n $existing = $this->typeManager->getStorage('yabrm_contributor')\n ->getQuery()\n ->condition('zotero_name', $zotero_name)\n ->accessCheck(FALSE)\n ->execute();\n\n reset($existing);\n $contrib_id = key($existing);\n\n // Create contributor if doesn't exist.\n if (empty($contrib_id)) {\n $institution_name = NULL;\n $first_name = NULL;\n $last_name = NULL;\n $sort_name = NULL;\n\n $split_name = explode(',', $contrib_name);\n\n if ($split_name[0] == $contrib_name) {\n $institution_name = $contrib_name;\n $sort_name = $institution_name;\n }\n else {\n $last_name = trim($split_name[0]);\n $first_name = trim(implode(',', array_slice($split_name, 1)));\n $sort_name = $last_name;\n }\n\n $contrib = BibliographicContributor::create([\n 'zotero_name' => $zotero_name,\n 'institution_name' => $institution_name,\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'sort_name' => $sort_name,\n 'status' => FALSE,\n ]);\n\n $contrib->save();\n $contrib_id = $contrib->id();\n }\n\n // Populate array with contributor ids.\n $contrib_ids[] = $contrib_id;\n }\n }\n\n // Create contrib Paragraph references using ids.\n $contributors = [];\n $voc = 'yabrm_contributor_roles';\n $field = 'name';\n\n foreach ($contrib_ids as $contrib_id) {\n // Retrieve contributor role ID, or create term.\n $role_term = ucwords(str_replace('_', ' ', $contrib_role));\n $role_tid = $this->taxTermExists($role_term, $field, $voc);\n\n if (!$role_tid) {\n $term = Term::create([\n 'vid' => $voc,\n $field => $role_term,\n ]);\n $term->save();\n\n $role_tid = $term->id();\n }\n\n // Create Paragraph.\n $values = [\n [\n 'field' => 'field_yabrm_contributor_person',\n 'value' => $contrib_id,\n ],\n [\n 'field' => 'field_yabrm_contributor_role',\n 'value' => $role_tid,\n ],\n ];\n\n $contributors[] = $this->createParagraph('yabrm_bibliographic_contributor', $values);\n }\n\n return $contributors;\n }", "function twentyfourteen_list_authors() {\n\t$contributor_ids = get_users( array(\n\t\t'fields' => 'ID',\n\t\t'orderby' => 'post_count',\n\t\t'order' => 'DESC',\n\t\t'who' => 'authors',\n\t) );\n\n\tforeach ( $contributor_ids as $contributor_id ) :\n\t\t$post_count = count_user_posts( $contributor_id );\n\n\t\t// Move on if user has not published a post (yet).\n\t\tif ( ! $post_count ) {\n\t\t\tcontinue;\n\t\t}\n\t?>\n\n\t<div class=\"contributor\">\n\t\t<div class=\"contributor-info\">\n\t\t\t<div class=\"contributor-avatar\"><?php echo get_avatar( $contributor_id, 132 ); ?></div>\n\t\t\t<div class=\"contributor-summary\">\n\t\t\t\t<h2 class=\"contributor-name\"><?php echo get_the_author_meta( 'display_name', $contributor_id ); ?></h2>\n\t\t\t\t<p class=\"contributor-bio\">\n\t\t\t\t\t<?php echo get_the_author_meta( 'description', $contributor_id ); ?>\n\t\t\t\t</p>\n\t\t\t\t<a class=\"button contributor-posts-link\" href=\"<?php echo esc_url( get_author_posts_url( $contributor_id ) ); ?>\">\n\t\t\t\t\t<?php printf( _n( '%d Article', '%d Articles', $post_count, 'twentyfourteen' ), $post_count ); ?>\n\t\t\t\t</a>\n\t\t\t</div><!-- .contributor-summary -->\n\t\t</div><!-- .contributor-info -->\n\t</div><!-- .contributor -->\n\n\t<?php\n\tendforeach;\n}", "public function getContributors() {\n $elements = $this->_getDetails();\n $fields = array(\n 'contributors' => array(\n 'contributor' => array(\n 'functionSingular',\n 'functionPlural',\n 'searchCode'\n )\n )\n );\n $result = TingOpenformatMethods::parseFields($elements, $fields);\n return $result['contributors'];\n }", "protected function updateAuthors() {\n\n // Find all content authors.\n $query = \\Drupal::entityQuery('node')\n ->condition('status', 1);\n $nids = $query->execute();\n $nodes = Node::loadMultiple($nids);\n\n // Add a content subscription flag for each owner.\n $flag_service = \\Drupal::service('flag');\n $flag_id = 'subscribe_node';\n $flag = $flag_service->getFlagById($flag_id);\n foreach ($nodes as $node) {\n $account = $node->getOwner();\n // Skip inactive users.\n if ($account->isBlocked()) {\n continue;\n }\n // Skip admin and anonymous users.\n if (in_array($account->id(), [0, 1])) {\n continue;\n }\n // Check if already flagged to avoid exception error.\n $flagging = $flag_service->getFlagging($flag, $node, $account);\n if (!$flagging) {\n $flag_service->flag($flag, $node, $account);\n }\n }\n }", "function cs_liste_contribs($coupe = 999, $join = \"</li><li>\") {\r\n\tglobal $metas_outils;\r\n\t$contribs = array();\r\n\tforeach($metas_outils as $o=>$v) if(isset($v['contrib']) && isset($v['actif']) && $v['actif'])\r\n\t\t$contribs[] = '[' . couper(couteauprive_T($o.':nom'), $coupe) . '->' . (is_numeric($v['contrib']) ?_URL_CONTRIB.$v['contrib']:$v['contrib']) . ']';\r\n\tsort($contribs);\r\n\treturn '[{{' . couteauprive_T('docgen') . '}}->' . _URL_CONTRIB . '2166]' \r\n\t\t. $join . '[{{' . couteauprive_T('docwiki') . '}}->' . _URL_CONTRIB . '2793]'\r\n\t\t. (count($contribs)?$join.join($join, $contribs):'');\r\n}", "private function oembed_github_repo_contributors( $owner, $repository ) {\n\t\t$repo = $this->api->get_repo( $owner, $repository );\n\t\t$contributors = $this->api->get_repo_contributors( $owner, $repository );\n\n\t\t$response = new stdClass();\n\t\t$response->type = 'rich';\n\t\t$response->width = '10';\n\t\t$response->height = '10';\n\t\t$response->version = '1.0';\n\t\t$response->title = $repo->description;\n\n\t\t$gravatar_size = apply_filters( 'github_oembed_gravatar_size', 64 );\n\n\t\t// @TODO This should all be templated\n\t\t$response->html = '<div class=\"github-embed github-embed-repo-contributors\">';\n\t\t$response->html .= '<p><a href=\"' . esc_attr( $repo->html_url ) . '\" target=\"_blank\">';\n\t\t$response->html .= '<strong>' . esc_html( $repo->description ) . '</strong></a><br/>';\n\t\t$response->html .= '<span class=\"github-heading\">Contributors: </span>';\n\t\t$response->html .= '<ul class=\"github-repo-contributors\">';\n\t\tforeach ( $contributors as $contributor ) {\n\t\t\t$response->html .= '<li class=\"github-repo-contributor\">';\n\t\t\t$response->html .= '<img class=\"github-repo-contributor-avatar\" src=\"';\n\t\t\t$response->html .= esc_url( add_query_arg( array( 's' => $gravatar_size ), $contributor->author->avatar_url ) );\n\t\t\t$response->html .= '\" alt=\"Picture of ' . esc_attr( $contributor->author->login ) . '\">';\n\t\t\t$response->html .= '<span class=\"github-repo-contributor-login\">';\n\t\t\t$response->html .= '<a href=\"https://github.com/' . esc_attr( $contributor->author->login ) . '\">' . esc_attr( $contributor->author->login ) . '</a></span>';\n\t\t}\n\t\t$response->html .= '</ul>';\n\t\t$response->html .= '<div style=\"clear: both;\"></div>';\n\t\t$response->html .= '</div>';\n\t\theader( 'Content-Type: application/json' );\n\t\techo json_encode( $response );\n\t\tdie();\n\t}", "public function get_contributors()\n {\n if (!$this->loaded()) {\n return;\n }\n\n $bylines = [];\n $contributors = $this->bylines->where('byline', 'IS', null)->order_by('display_order')->limit(2)->find_all();\n if (count($contributors) == 0) {\n $contributors = [$this->bylines->order_by('id')->find()];\n }\n\n foreach ($contributors as $byline) {\n\n $bylines[] = [\n 'id' => $byline->id,\n 'display_order' => $byline->display_order,\n 'contributor_id' => $byline->contributor->id,\n 'slug' => $byline->contributor->slug,\n 'name' => $byline->contributor->display_name,\n 'img' => $byline->contributor->image->toArray(),\n 'position' => $byline->contributor->position,\n 'include_in_page_bio' => $byline->contributor->include_in_page_bio,\n 'in_page_bio' => $byline->contributor->in_page_bio,\n ];\n }\n\n return $bylines;\n }", "protected function prepare_contributor( $contributor ) {\n\t\t$user_fields = array(\n\t\t\t'username' => $contributor->post_name,\n\t\t\t'name' => $contributor->post_title,\n\t\t\t'avatar' => $contributor->avatar,\n\t\t\t'location' => $contributor->location,\n\t\t\t'company' => $contributor->company,\n\t\t\t'website' => $contributor->website,\n\t\t\t'socials' => $contributor->socials,\n\t\t\t'badges' => $contributor->badges,\n\t\t);\n\n\t\t$user_fields = wp_parse_args( WP_Central_Data_Colector::get_wp_user_data( $contributor, $contributor->post_name ), $user_fields );\n\n\t\t$user_fields['meta'] = array(\n\t\t\t'links' => array(\n\t\t\t\t'self' => json_url( $this->base . '/' . $contributor->post_name ),\n\t\t\t),\n\t\t);\n\n\t\treturn apply_filters( 'wpcentral_api_prepare_user', $user_fields, $contributor );\n\t}", "public function authorsProvider()\n {\n return [[[]]];\n }", "public function getStatsContributorsList()\n {\n $Query = \"select u.identifier, u.email, u.password, u.created_at, u.blackstatus, u.profile_type, u.status, up.first_name,up.last_name, cb.favourite_category, cb.category_more, cb.language as mother_tongue from User u\n\t\tLEFT JOIN UserPlus up ON u.identifier=up.user_id\n\t\tLEFT JOIN Contributor cb ON u.identifier=cb.user_id\n\t where u.type='contributor' \";\n if (($result = $this->getQuery($Query, true)) != NULL)\n return $result;\n else\n return \"NO\";\n }", "public function get_authors();", "public function add_contributors_box() {\n\t\t\tadd_meta_box(\n\t\t\t\t'post_author_meta',\n\t\t\t\t__( 'Contributors' ),\n\t\t\t\tarray( $this, 'render_post_contributors_box' ),\n\t\t\t\t'post',\n\t\t\t\t'side',\n\t\t\t\t'high'\n\t\t\t);\n\t\t}", "function getContributors(){\n $contributors = $this->allResources('schema:contributor');\n return $contributors;\n }", "function ucsc_displayOrganismWgenome(&$annot_list){\n global $ugenome_list_file; $lines=file($ugenome_list_file);\n foreach($lines as $line){\n list($orgg,$org,$version,$data)=explode(\",\",$line);\n if($version!=\"version\")$annot_list[]=array('organism'=>array('name'=>$org,'version'=>$version));\n }\n}", "public function get_author_permastruct()\n {\n }", "public static function getGithubContributors($owner,$reponame) {\n $PASSWORD = '';\n $username = '';\n\n $page = 1;\n $base_url = 'https://api.github.com';\n $url = '/repos/'.$owner.'/'.$reponame.'/contributors?per_page=100&page=';\n\n // this could be done async, and having websockets on the frontend\n // create curl resource\n $goToNextPage = True;\n $contributors = array();\n // get all the pages\n do {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $base_url.$url.$page);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch,CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $username . \":\" . $PASSWORD);\n $user_agent = \"Mozilla/5.0 (Windows; U; Windows NT 5.1;\".\n \" en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6\";\n curl_setopt($ch,CURLOPT_USERAGENT,$user_agent);\n $output = curl_exec($ch);\n $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);\n curl_close($ch);\n\n $header = substr($output, 0, $header_size);\n $body = substr($output, $header_size);\n $json = json_decode($body,true);\n\n $contributors = array_merge($contributors,$json);\n ++$page;\n $goToNextPage = (count($json) > 99);\n } while($goToNextPage);\n return $contributors;\n }", "public function getAuthors();", "public function get_other_contributors()\n {\n if (!$this->loaded()) {\n return;\n }\n\n $bylines = [];\n\n foreach ($this->bylines->where('byline', 'IS NOT', null)->find_all() as $byline) {\n $bylines[] = [\n 'display_order' => $byline->display_order,\n 'contributor_id' => $byline->contributor->id,\n 'slug' => $byline->contributor->slug,\n 'name' => $byline->contributor->display_name,\n 'byline' => $byline->byline,\n ];\n }\n\n return $bylines;\n }", "public function wxr_authors_list()\n {\n $db = Typecho_Db::get();\n $dbPrefix = $db->getPrefix();\n\n $user_table = $dbPrefix . 'users';\n $authors = $db->fetchAll($db->query(\"select uid,name,mail from {$user_table} where activated != 0\"));\n $html = '';\n foreach ( $authors as $author ) {\n $html .= \"\\t<wp:author>\";\n $html .= '<wp:author_id>' . $author['uid'] . '</wp:author_id>';\n $html .= '<wp:author_login>' . $author['name'] . '</wp:author_login>';\n $html .= '<wp:author_email>' . $author['mail'] . '</wp:author_email>';\n $html .= '<wp:author_display_name>' . $this->wxr_cdata($author['name']) . '</wp:author_display_name>';\n $html .= '<wp:author_first_name>' . $this->wxr_cdata('') . '</wp:author_first_name>';\n $html .= '<wp:author_last_name>' . $this->wxr_cdata('') . '</wp:author_last_name>';\n $html .= \"</wp:author>\\n\";\n }\n return $html;\n }", "function sopac_author_format($author, $addl_author_ser) {\n/*\n if ($author) {\n $author_arr = explode(',', trim($author, '.'));\n $new_author_str = trim($author_arr[1]) . ' ' . trim($author_arr[0]);\n }\n\n elseif ($addl_author_ser) {\n $addl_author = unserialize($addl_author_ser);\n if ($addl_author[0]) {\n $author_arr = explode(',', trim($addl_author[0], '.'));\n $new_author_str = trim($author_arr[1]) . ' ' . trim($author_arr[0]);\n }\n }\n\n if ($new_author_str) {\n //$new_author_str = ereg_replace(\"[^A-Za-z\\x20-\\x7F '.-]\", '', $new_author_str );\n $new_author_str = preg_replace('/ - /', ' ', $new_author_str);\n }\n else {\n $new_author_str = '';\n }\n\n return $new_author_str;\n*/\n return $author;\n}", "function getContributors($document_srl)\n {\n $oDocumentModel = &getModel('document');\n $oDocument = $oDocumentModel->getDocument($document_srl);\n if(!$oDocument->isExists()) {\n return array();\n }\n\n $args->document_srl = $document_srl;\n $output = executeQueryArray(\"xedocs.getContributors\", $args);\n\n if($output->data) {\n $list = $output->data;\n } else {\n $list = array();\n }\n\n $item->member_srl = $oDocument->getMemberSrl();\n $item->nick_name = $oDocument->getNickName();\n $contributors[] = $item;\n\n for($i=0,$c=count($list); $i<$c; $i++) {\n unset($item);\n $item->member_srl = $list[$i]->member_srl;\n $item->nick_name = $list[$i]->nick_name;\n\n if($item->member_srl == $oDocument->getMemberSrl()) {\n continue;\n }\n $contributors[] = $item;\n }\n\n return $contributors;\n }", "function renderAuthors($authors, $prefix = \"\") {\n\n $value = \"\";\n\n if (!isset($authors[0])) {\n\n if (isset($authors[\"email\"]))\n $value .= sprintf('%s &lt;<a href=\"mailto:%s\">%s</a>&gt;, ', $authors[\"value\"], $authors[\"email\"], $authors[\"email\"]);\n else \n $value .= $authors[\"email\"] . \", \";\n\n } else {\n\n reset($authors);\n while (list($k, $author) = each($authors)) {\n\n if (isset($author[\"email\"]))\n $value .= sprintf('%s &lt;<a href=\"mailto:%s\">%s</a>&gt;, ', $author[\"value\"], $author[\"email\"], $author[\"email\"]);\n else \n $value .= $author[\"email\"] . \", \";\n\n }\n\n }\n\n $value = substr($value, 0, -2);\n $this->tpl->setCurrentBlock(strtolower($prefix) . \"authors\");\n $this->tpl->setVariable(\"AUTHOR\", $value);\n $this->tpl->parseCurrentBlock();\n\n }", "protected function setAuthors() {\r\n\t\t// authors, yes, we can handle more than one per article\r\n\t\t$authorsStg = $this->newsItem->getAuthor();\r\n\t\tif (!empty($authorsStg)) {\r\n\t\t\t$authors = t3lib_div::trimExplode(',', $authorsStg);\r\n\t\t\t$allowedCount = intval($this->settings['news']['semantic']['general']['author']['max']);\r\n\t\t\t$this->authors = (empty($allowedCount)) ? $authors : array_slice($authors, 0, $allowedCount);\r\n\t\t}\r\n\t}", "public function getContributors()\n {\n $headers = $this->getDefaultHeaders();\n $response = $this->client->request(\n 'GET',\n $this->api . $this->repo . \"/contributors\",\n array(\n \"headers\" => $headers\n )\n );\n \n if ($response->getStatusCode() == 200) {\n $body = $response->getBody();\n $body = json_decode($body, true);\n return $body;\n }\n\n return array();\n }", "public function includeAuthors()\n {\n return $this->addInclude('authors');\n }", "protected function getMetaAuthor(): array {\n $build = [\n '#type' => 'container',\n '#weight' => 15,\n '#attributes' => [\n 'class' => [\n 'node-meta--author',\n ],\n ],\n 'label' => [\n '#type' => 'html_tag',\n '#tag' => 'label',\n '#attributes' => [\n 'class' => [\n 'node-meta-label',\n 'node-meta--author--label',\n ],\n ],\n '#value' => $this->t('Publisher'),\n ],\n 'value' => [\n '#type' => 'html_tag',\n '#tag' => 'span',\n '#attributes' => [\n 'class' => [\n 'node-meta-value',\n 'node-meta--author--value',\n ],\n ],\n '#value' => $this->node()->getOwner()->getDisplayName(),\n ],\n ];\n\n $revision = $this->nodeRevisionManager->loadLatestUnpublishedRevision($this->node());\n if (NULL === $revision || !$revision->isDefaultRevision()) {\n return $build;\n }\n\n $build['label']['#value'] = $this->t('Unpublished by');\n $build['value']['#value'] = $revision->getOwner()->getDisplayName();\n\n return $build;\n }", "public function getAuthorname() {}", "public function seniorContributors()\n {\n $query = \"SELECT identifier FROM \".$this->_name.\" WHERE status='Active' AND profile_type='senior'\";\n if(($result = $this->getQuery($query,true)) != NULL)\n {\n for($i=0; $i<count($result); $i++)\n {\n $result[$i]= $result[$i]['identifier'];\n }\n return $result;\n }\n else\n return \"NO\";\n }", "public function updateContribBoOnlyContrib($userId,$contribarr){\n $this->_name = \"Contributor\";\n $where1 = \" user_id='\" .$userId. \"' \";\n //Contributor test\n $result = $this->updateQuery($contribarr, $where1);\n if($result === '1')\n return true;\n else\n return fasle;\n }", "protected function _syncAuthor() {}", "public function getContributorId()\n {\n // has no identifier\n return null;\n }", "public static function contributorsParserFunction( Parser $parser, PPFrame $frame, array $args ) {\n\t\t$title = Title::newFromText( $frame->expand( array_shift( $args ) ) );\n\t\tif ( !$title ) {\n\t\t\t/** @todo This should perhaps return a <strong class=\"error\"> message */\n\t\t\treturn wfMessage( 'contributors-badtitle' )->inContentLanguage()->parseAsBlock();\n\t\t}\n\t\tif ( !$title->exists() ) {\n\t\t\treturn wfMessage( 'contributors-nosuchpage', $title->getText() )->\n\t\t\t\t\tinContentLanguage()->parseAsBlock();\n\t\t}\n\n\t\t$options = array();\n\t\tforeach ( $args as $arg ) {\n\t\t\t$argString = trim( $frame->expand( $arg ) );\n\t\t\tif ( in_array( $argString, Contributors::getValidOptions() ) ) {\n\t\t\t\t$options[$argString] = true;\n\t\t\t}\n\t\t}\n\n\t\t$contributors = new Contributors( $title, $options );\n\t\treturn array( $contributors->getNormalList( $parser->getFunctionLang() ), 'noparse' => true, 'isHTML' => true );\n\t}", "public function getAuthor() {}", "function Submission_Authors(&$submission,$friends=array())\n {\n if (empty($friends))\n {\n $friends=$this->Submission_Authors_Read($submission);\n }\n\n /* $authors=array(); */\n /* foreach ($friends as $id => $friend) */\n /* { */\n /* array_push($authors,$this->FriendsObj()->FriendInfo($friend)); */\n /* } */\n\n foreach (array_keys($submission[ \"Authors\" ]) as $id)\n {\n $submission[ \"Authors\" ][ $id ]=$this->TrimCase($submission[ \"Authors\" ][ $id ]);\n }\n\n return $submission[ \"Authors\" ];\n }", "function addRedirectorCopyright()\n{\n global $context;\n\n if ($context['current_action'] == 'credits') {\n $context['copyrights']['mods'][] = '<a href=\"https://mysmf.net/mods/redirector\" target=\"_blank\">Redirector</a> &copy; 2015-2020, digger';\n }\n}", "function hc_the_author($gravatarSize = ''){\n\t\t$info = hc_get_the_author($gravatarSize);\n\t\tforeach ($info as $index => $author) {\n\t\t\tif(file_exists(get_bloginfo('stylesheet_directory').'plugins/hypercontact/templates/author.php')){\n\t\t\t\tinclude(get_bloginfo('stylesheet_directory').'plugins/hypercontact/templates/author.php');\n\t\t\t}else{\n\t\t\t\tinclude('templates/author.php');\n\t\t\t}\n\t\t}\n\n\t}", "function getAuthorsName(int $articleAuthorId, array $authors) : string { \n foreach ($authors as $author) {\n if ($author['id'] === $articleAuthorId) {\n $name = $author['full_name'];\n }\n }\nreturn $name;\n}", "public function author() {\n\t\t\t\n\t\t\t$output = array();\n\n\t\t\t$author = $this->post->post_author;\n\t\t\t\n\t\t\t$output['id'] = $author;\n\t\t\t$output['nicename'] = get_the_author_meta('nickname', $author);\n\t\t\t$output['name'] = get_the_author_meta('user_firstname', $author).' '.get_the_author_meta('user_lastname', $author);\n\t\t\t$output['url'] = get_author_posts_url($author);\n\t\t\t$output['description'] = get_the_author_meta('description', $author);\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "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}", "public function get_sidebar_authors() {\n\n $html = '<tr class=\"wm-widget-sub-title\"><td>{{author-title}}:</td></tr>';\n\n /** Use default WordPress Post author. */\n $post = get_post();\n $author = get_the_author_meta( 'display_name', $post->post_author );\n $html .= '<tr class=\"wm-widget-info\"><td>' . $author . '</td></tr>';\n /** Replace the author title to be singular. */\n $html = str_replace( '{{author-title}}', 'Author', $html );\n\n return $html;\n }", "abstract public function getAuthor();", "public function getAuthor();", "public function getAuthor();", "public function getAuthor();", "function get_posts_discussion_email_details($discussion, $emails) {\n global $CFG;\n require_once($CFG->dirroot.'/user/lib.php');\n $contribemails = array();\n $userids = get_contributor_ids($discussion);\n // Get contributor details.\n $users = user_get_users_by_id($userids);\n foreach ($users as $user) {\n if (!in_array($user->email, $emails)) {\n $details = array();\n $details['email'] = $user->email;\n $details['mailformat'] = $user->mailformat;\n $details['username'] = $user->username;\n $contribemails[] = $details;\n }\n }\n return $contribemails;\n}", "function _formatAuthor($array) {\n\t\tif (!array_key_exists('von', $array)) {\n\t\t\t$array['von'] = '';\n\t\t} else {\n\t\t\t$array['von'] = trim($array['von']);\n\t\t}\n\t\tif (!array_key_exists('last', $array)) {\n\t\t\t$array['last'] = '';\n\t\t} else {\n\t\t\t$array['last'] = trim($array['last']);\n\t\t}\n\t\tif (!array_key_exists('jr', $array)) {\n\t\t\t$array['jr'] = '';\n\t\t} else {\n\t\t\t$array['jr'] = trim($array['jr']);\n\t\t}\n\t\tif (!array_key_exists('first', $array)) {\n\t\t\t$array['first'] = '';\n\t\t} else {\n\t\t\t$array['first'] = trim($array['first']);\n\t\t}\n\t\t$ret = $this->authorstring;\n\t\t$ret = str_replace(\"VON\", $array['von'], $ret);\n\t\t$ret = str_replace(\"LAST\", $array['last'], $ret);\n\t\t$ret = str_replace(\"JR\", $array['jr'], $ret);\n\t\t$ret = str_replace(\"FIRST\", $array['first'], $ret);\n\t\treturn trim($ret);\n\t}", "function makeEditableAuthorList($authors) {\t\t\n\t\treturn \"\n\t\t\t<div id='authorlist' class='authorlist'>\n\t\t\t\t\".$this->makeAuthorList($authors).\"\t\t\t\n\t\t\t</div>\n\t\t\n\t\t\";\n\t}", "static function contributors($users): array {\r\n if (empty($users)) return [];\r\n return self::filter_contributors($users);\r\n }", "function displayOrganismWgenome(&$annot_list){\n global $genome_list_file; $lines=file($genome_list_file);\n foreach($lines as $line){\n list($orgg,$org,$version,$data)=explode(\",\",$line);\n if($version!=\"version\")$annot_list[]=array('organism'=>array('name'=>$org,'version'=>$version));\n }\n}", "public function getCastCredits ()\n {\n $content = new Document($this->getCredits());\n $titles = $content->find(\"#fullcredits_content h4\");\n $persons = $content->find(\".simpleCreditsTable tbody\");\n\n $crew = [];\n \n // skip useless h4s, (DiDom doesnt have :not pseudo class, so we make a foreach)\n foreach ($titles as $pos => $h4)\n {\n if ($h4->hasAttribute(\"id\") || $h4->hasAttribute(\"name\")) {\n unset($titles[$pos]);\n }\n }\n $titles = array_values($titles);\n\n foreach ($titles as $pos => $h4)\n {\n $title = trim($h4->text(), \" \\t\\n\\r\\0\\x0B\\xC2\\xA0\");\n $title = str_replace('Series ', '', $title);\n\n switch ($title)\n {\n case \"Directed by\":\n $name = \"director\";\n break;\n case \"Music by\":\n $name = \"music\";\n break;\n case \"Cinematography by\":\n $name = \"cinematography\";\n break;\n case \"Film Editing by\":\n $name = \"editing\";\n break;\n case \"Casting By\":\n $name = \"casting\";\n break;\n case \"Production Design by\":\n $name = \"production_design\";\n break;\n case \"Art Direction by\":\n $name = \"art_direction\";\n break;\n case \"Set Decoration by\":\n $name = \"set_decoration\";\n break;\n case \"Costume Design by\":\n $name = \"costume_design\";\n break;\n case \"Makeup Department\":\n $name = \"makeup_department\";\n break;\n case \"Production Management\":\n $name = \"production_management\";\n break;\n case \"Art Department\":\n $name = \"art_department\";\n break;\n case \"Sound Department\":\n $name = \"sound_department\";\n break;\n case \"Special Effects by\":\n $name = \"special_effects\";\n break;\n case \"Visual Effects by\":\n $name = \"visual_effects\";\n break;\n case \"Stunts\":\n $name = \"stunts\";\n break;\n case \"Camera and Electrical Department\":\n $name = \"camera_department\";\n break;\n case \"Animation Department\":\n $name = \"animation_department\";\n break;\n case \"Casting Department\":\n $name = \"casting_department\";\n break;\n case \"Costume and Wardrobe Department\":\n $name = \"wardrobe_department\";\n break;\n case \"Editorial Department\":\n $name = \"editorial_department\";\n break;\n case \"Location Management\":\n $name = \"location_management\";\n break;\n case \"Music Department\":\n $name = \"music_department\";\n break;\n case \"Transportation Department\":\n $name = \"transportation_department\";\n break;\n case \"Storyline\":\n $name = \"storyline\";\n break;\n case \"Photo & Video\":\n $name = \"photo\";\n break;\n default:\n continue 2;\n break;\n }\n\n if (!isset($crew[$name])) {\n $crew[$name] = [];\n }\n\n $regex = \"/name\\/nm(\\d+)\\/(?:.*)/\";\n \n if (!isset($persons[$pos])) {\n continue;\n }\n\n foreach ($persons[$pos]->find(\"a\") as $person)\n {\n preg_match($regex, $person->attr(\"href\"), $matches);\n\n if (!isset($matches[1]) || empty($matches[1])) {\n continue;\n }\n\n $crew[$name][] = [\n \"id\" => $matches[1],\n \"name\" => trim($person->text()),\n ];\n }\n }\n return $crew;\n }", "function schema_to_csl($obj)\n{\n\n\t// can we be clever about languages?\n\n\t$csl = new stdclass;\n\t\n\t$author_index = -1;\n\t\n\tforeach ($obj as $k => $v)\n\t{\n\t\tswitch ($k)\n\t\t{\t\t\n\t\t\tcase '@id':\n\t\t\t\t$csl->WIKIDATA = str_replace('http://www.wikidata.org/entity/', '', $v);\n\t\t\t\tbreak;\n\t\t\n\t\t\tcase '@type':\n\t\t\t\tswitch ($v)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tcase 'Book':\n\t\t\t\t\t\t$csl->type = 'book';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Chapter':\n\t\t\t\t\t\t$csl->type = 'chapter';\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\n\t\t\t\t\tcase 'ScholarlyArticle':\n\t\t\t\t\t\t$csl->type = 'article-journal';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$csl->type = 'article-journal';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// SciGraph\n\t\t\tcase 'genre':\n\t\t\t\tswitch ($v)\n\t\t\t\t{\n\t\t\t\t\tcase 'research_article':\n\t\t\t\t\t\t$csl->type = 'article-journal';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$csl->type = 'article-journal';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\tcase 'author':\n\t\t\tcase 'creator':\n\t\t\t\t$csl->author = array();\n\t\t\t\tif (is_array($v))\n\t\t\t\t{\n\t\t\t\t\tforeach ($v as $value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$author = new stdclass;\n\t\t\t\t\t\tif (isset($value->name))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// In the CSL schema but seemingly problematic for citeproc PHP\n\t\t\t\t\t\t\t$author->literal = get_literal($value->name);\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif (!isset($value->familyName))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// We need to handle author names where there has been a clumsy attempt\n\t\t\t\t\t\t\t\t// (mostly by me) to include multiple language strings\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// 大橋広好(Hiroyoshi Ohashi)\n\t\t\t\t\t\t\t\t// 韦毅刚/WEI Yi-Gang\n\t\t\t\t\t\t\t\tif (preg_match('/^(.*)\\s*[\\/|\\(]([^\\)]+)/', $author->literal, $m))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// print_r($m);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (preg_match('/\\p{Han}+/u', $m[1]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$author->literal = $m[2];\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (preg_match('/\\p{Han}+/u', $m[2]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$author->literal = $m[1];\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\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$parts = preg_split('/,\\s+/', get_literal($author->literal));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (count($parts) == 2)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$author->family = $parts[0];\n\t\t\t\t\t\t\t\t\t$author->given = $parts[1];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$parts = preg_split('/\\s+/', get_literal($author->literal));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (count($parts) > 1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$author->family = array_pop($parts);\n\t\t\t\t\t\t\t\t\t\t$author->given = join(' ', $parts);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\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// CSL only works in PHP if we split names into parts\n\t\t\t\t\t\tif (isset($value->familyName))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// SciGraph\n\t\t\t\t\t\t\tif (isset($value->familyName))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$author->family = $value->familyName;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (isset($value->givenName))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$author->given = $value->givenName;\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\t// Need to ensure authors are ordered correctly\n\t\t\t\t\t\t// so use \"position\" if it is available\n\t\t\t\t\t\tif (isset($value->position))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$author_index = ($value->position - 1);\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$author_index++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ORCID?\n\t\t\t\t\t\tif (isset($value->sameAs))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($value->sameAs as $url)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (preg_match('/orcid.org/', $url))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$author->ORCID = $url;\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\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$csl->author[$author_index] = $author;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// ensure authors are ordered correctly by sorting on the array index\n\t\t\t\t\tif (isset($csl->author))\n\t\t\t\t\t{\n\t\t\t\t\t\tksort($csl->author, SORT_NUMERIC);\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// ORCID JSON-LD has only one value\n\t\t\t\t\tif (is_object($v))\n\t\t\t\t\t{\n\t\t\t\t\t\t$author = new stdclass;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (isset($v->familyName))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (isset($v->familyName))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$author->family = $v->familyName;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (isset($v->familyName))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$author->given = $v->givenName;\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (isset($v->{'@id'}))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (preg_match('/orcid.org/', $v->{'@id'}))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$author->ORCID = $v->{'@id'};\n\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\n\t\t\t\t\t\t$csl->author[] = $author;\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'headline': // ResearchGate\n\t\t\tcase 'name':\n\t\t\t\t$csl->title = get_literal($v);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'isPartOf':\n\t\t\t\tif (is_object($v))\n\t\t\t\t{\n\t\t\t\t\tif (isset($v->issn))\n\t\t\t\t\t{\n\t\t\t\t\t\t$csl->ISSN = $v->issn;\n\t\t\t\t\t}\t\t\n\t\t\t\t\tif (isset($v->name))\n\t\t\t\t\t{\n\t\t\t\t\t\t$csl->{'container-title'} = get_literal($v->name);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// OUP\n\t\t\t\t\tif (isset($v->issueNumber))\n\t\t\t\t\t{\n\t\t\t\t\t\t$csl->issue = $v->issueNumber;\n\t\t\t\t\t}\t\n\t\t\t\t\t\n\t\t\t\t\tif (isset($v->isPartOf))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (isset($v->isPartOf->issn))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$csl->ISSN = $v->isPartOf->issn;\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\tif (isset($v->isPartOf->name))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$csl->{'container-title'} = get_literal($v->isPartOf->name);\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\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// SciGraph\n\t\t\t\tif (is_array($v))\n\t\t\t\t{\n\t\t\t\t\tforeach ($v as $part)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (isset($part->issn))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$csl->ISSN = $part->issn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isset($part->name))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$csl->{'container-title'} = get_literal($part->name);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (isset($part->issueNumber))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$csl->issue = $part->issueNumber;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isset($part->volumeNumber))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$csl->volume = $part->volumeNumber;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Clean up\n\t\t\t\tif (isset($csl->{'container-title'}))\n\t\t\t\t{\n\t\t\t\t\t$csl->{'container-title'} = pick_one_string($csl->{'container-title'}, \"/\");\n\t\t\t\t}\n\t\t\t\tbreak;\t\t\t\t\n\t\t\t\t\n\t\t\tcase 'datePublished':\n\t\t\t\t$v = preg_replace('/^\\+/', '', $v);\n\t\t\t\t$v = preg_replace('/T.*$/', '', $v);\n\t\t\t\n\t\t\t\t$parts = explode('-', $v);\n\t\t\t\n\t\t\t\t$csl->issued = new stdclass;\n\t\t\t\t$csl->issued->{'date-parts'} = array();\n\t\t\t\t$csl->issued->{'date-parts'}[0] = array();\n\n\t\t\t\t$csl->issued->{'date-parts'}[0][] = (Integer)$parts[0];\n\n\t\t\t\tif (count($parts) > 1 && $parts[1] != '00')\n\t\t\t\t{\t\t\n\t\t\t\t\t$csl->issued->{'date-parts'}[0][] = (Integer)$parts[1];\n\t\t\t\t}\n\n\t\t\t\tif (count($parts) > 2 && $parts[2] != '00')\n\t\t\t\t{\t\t\n\t\t\t\t\t$csl->issued->{'date-parts'}[0][] = (Integer)$parts[2];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'volumeNumber':\n\t\t\t\t$csl->volume = $v;\n\t\t\t\tbreak;\t\t\t\n\t\t\t\n\t\t\tcase 'issueNumber':\n\t\t\t\t$csl->issue = $v;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'pagination':\n\t\t\t\t$csl->page = $v;\n\t\t\t\tbreak;\t\t\t\t\n\t\t\t\t\n\t\t\t// add some identifiers to CSL\n\t\t\tcase 'identifier':\n\t\t\t\tif (is_array($v) || is_object($v))\n\t\t\t\t{\n\t\t\t\t\t$doi = get_property_value($v, 'doi');\n\t\t\t\t\tif ($doi != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$csl->DOI = strtolower($doi);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$handle = get_property_value($v, 'handle');\n\t\t\t\t\tif ($handle != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$csl->HANDLE = $handle;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$archive = get_property_value($v, 'internetarchive');\n\t\t\t\t\tif ($archive != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$csl->ARCHIVE = $archive;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$jstor = get_property_value($v, 'jstor');\n\t\t\t\t\tif ($jstor != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$csl->JSTOR = strtolower($jstor);\n\t\t\t\t\t}\t\t\t\t\t\n\n\t\t\t\t\t$pmid = get_property_value($v, 'pmid');\n\t\t\t\t\tif ($pmid != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$csl->PMID = $pmid;\n\t\t\t\t\t}\n\n\t\t\t\t\t$pmc = get_property_value($v, 'pmc');\n\t\t\t\t\tif ($pmc != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$csl->PMC = $pmc;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (preg_match('/https?:\\/\\/(dx.)?doi.org\\/(?<doi>.*)/', $v, $m))\n\t\t\t\t\t{\n\t\t\t\t\t\t$csl->DOI = $m['doi'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// SciGraph\n\t\t\tcase 'productId':\n\t\t\t\tif (is_array($v))\n\t\t\t\t{\n\t\t\t\t\tforeach ($v as $productId)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($productId->name == 'doi')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$csl->DOI = strtolower($productId->value[0]);\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\tbreak;\n\t\t\t\t\n\t\t\t// SciGraph\n\t\t\t// Zenodo\n\t\t\t/*\n\t\t\tcase 'description':\n\t\t\t\t$csl->abstract = $v;\n\t\t\t\tbreak;\t\n\t\t\t*/\t\t\t\n\t\t\t\t\n\t\t\tcase 'mainEntityOfPage': // ResearchGate\n\t\t\tcase 'url':\n\t\t\t\tif (is_string($v))\n\t\t\t\t{\n\t\t\t\t\t$csl->URL = $v;\n\t\t\t\t\t\n\t\t\t\t\tif (preg_match('/https?:\\/\\/(dx.)?doi.org\\/(?<doi>.*)/', $v, $m))\n\t\t\t\t\t{\n\t\t\t\t\t\t$csl->DOI = $m['doi'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'encoding':\n\t\t\t\tif (is_array($v))\n\t\t\t\t{\n\t\t\t\t\tforeach ($v as $encoding)\n\t\t\t\t\t{\n\t\t\t\t\t\t$link = new stdclass;\n\t\t\t\t\t\t$link->URL = $encoding->contentUrl;\n\t\t\t\t\t\t$link->{'content-type'} = $encoding->fileFormat;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!isset($csl->link))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$csl->link = array();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$csl->link[] = $link;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\t\t\t\t\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t\n\n\t\n\treturn $csl;\n\n}", "function farFormatAuthorListYear($authorlist, $year){\n return \"<span class='pubauth'>$authorlist</span> <span class='pubyear'>($year)</span>\";\n}", "function mizzouChangeAuthorPermalinks()\n{\n global $wp_rewrite;\n $wp_rewrite->author_structure= '';\n}", "function csc_related_organizations_render($subtype, $conf, $panel_args, $context = NULL) {\n module_load_include('inc', 'csc_related', 'csc_related');\n\n $type = 'organization';\n $nids = csc_related_get_nodes($type);\n\n if($nids){\n $output = '<div class=\"see-all\"><a href=\"'. url('list/organization/' . csc_related_current_nid()) .'\">SEE ALL</a></div>';\n $class = 'csc-item-num-' . sizeof($nids);\n foreach($nids as $nid){\n $node = node_load($nid);\n $lng = $node->language;\n $output .= theme('csc_related_organizations_item', array('title' => $node->title,\n 'body' => $node->field_small_teaser[$lng][0]['value'],\n 'nid' => $node->nid,\n 'image' => ($node->field_featured_image) ? $node->field_featured_image[$lng][0]['uri'] : '',\n 'class' => $class,\n ));\n }\n\n switch($node->type){\n case 'initiatives':\n case 'research':\n case 'learning':\n case 'engagement':\n $title = 'Partners';\n break;\n default:\n $title = 'Affiliations';\n break;\n }\n\n $block = new stdClass();\n $block->title = $title;\n $block->content = $output;\n\n return $block;\n }\n\n}", "public function author();", "function pensoft_publication_preprocess_publication_field_group(&$variables) {\n $element = $variables['element'];\n \n $variables['element_id'] = $element['#id'];\n \n // Group label\n $variables['label'] = $element['#group']->label;\n \n // Sort authors and institutions\n if ($element['#id'] == 'publication_pensoft_full_group_publication_auth_contrib') {\n // Find authors and institutions\n $authors = array();\n $institutions = array();\n foreach (element_children($element['field_publication_authors']) as $key) {\n $collection = reset($element['field_publication_authors'][$key]['entity']['field_collection_item']);\n if (!empty($collection['field_publication_author_user'][0])) {\n $author = $collection['field_publication_author_user'][0];\n $authors[] = $author;\n if (!empty($author['#publication_author_institution'])) {\n $institutions[] = $author['#publication_author_institution'];\n }\n }\n }\n // Sort institutions\n $institutions = array_unique($institutions);\n \n foreach ($authors as $key => $author) {\n $authors[$key] = htmlspecialchars($author['#publication_author_name']);\n if (!empty($author['#publication_author_institution'])) {\n $inst = array_search($author['#publication_author_institution'], $institutions);\n $authors[$key] .= ' <sup>' . ($inst+1) . '</sup>';\n }\n }\n \n foreach ($institutions as $key => $inst) {\n $institutions[$key] = '<div class=\"field\">' . ($key+1) . ' ' . $inst . '</div>';\n }\n \n // Find contributors\n $contributors = array();\n foreach (element_children($element['field_publication_contributors']) as $key) {\n $collection = reset($element['field_publication_contributors'][$key]['entity']['field_collection_item']);\n $contributor = $collection['field_publication_cbtor_user'][0]['#publication_author_name'];\n $role = $collection['field_publication_cbtor_role'][0]['#markup'];\n $contributors[$role] = $contributor;\n }\n // Set template variables\n $variables['authors'] = $authors;\n $variables['institutions'] = $institutions;\n $variables['contributors'] = $contributors;\n }\n}", "function Submission_Authors_Info(&$submission,$friends=array())\n {\n if (empty($friends))\n {\n $friends=$this->Submission_Authors_Read($submission);\n }\n\n $authors=array();\n foreach ($friends as $id => $friend)\n {\n array_push($authors,$this->FriendsObj()->FriendInfo($friend));\n }\n\n return\n //join(\"; \",$this->Submission_Authors($submission,$friends)).\n $this->Submission_Authors_Info_Tables($submission,$friends);\n }", "public function ContributionDropdownHelper(&$contribution)\n {\n $template = $contribution->getTemplatenames();\n $chapter = $contribution->getFormats();\n // Contributions with the same Template (import)\n $contributions = [];\n foreach ($this->container->db->getContributionsByTemplate($template)->orderByForissue()->orderByName() as $key => $value) {\n $contributions[$value->getIssues()->getName()]['name'] = $value->getIssues();\n $contributions[$value->getIssues()->getName()]['data'][] = $value;\n }\n // Templates within the same chapter (change template)\n $templates = $this->container->db->getTemplatenamesByFormats($chapter)->orderByName();\n\n // Issues and Chapters\n $formats = [];\n foreach ($template->getFormatss() as $format) {\n foreach ($format->getBooks()->getIssuess() as $issue) {\n $formats[$issue->getName()]['name'] = $issue;\n $formats[$issue->getName()]['data'][] = $format;\n }\n }\n\n return [$contributions, $templates, $formats];\n }", "public function get_contributor($key = 0)\n {\n }", "public function get_contributor($key = 0)\n {\n }", "function getAuthor() \n\t{\n\t\t$author = array();\n\t\tinclude_once \"./Services/MetaData/classes/class.ilMD.php\";\n\t\t$md =& new ilMD($this->getId(), 0, $this->getType());\n\t\t$md_life =& $md->getLifecycle();\n\t\tif ($md_life)\n\t\t{\n\t\t\t$ids =& $md_life->getContributeIds();\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$md_cont =& $md_life->getContribute($id);\n\t\t\t\tif (strcmp($md_cont->getRole(), \"Author\") == 0)\n\t\t\t\t{\n\t\t\t\t\t$entids =& $md_cont->getEntityIds();\n\t\t\t\t\tforeach ($entids as $entid)\n\t\t\t\t\t{\n\t\t\t\t\t\t$md_ent =& $md_cont->getEntity($entid);\n\t\t\t\t\t\tarray_push($author, $md_ent->getEntity());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn join($author, \",\");\n }", "function get_editable_authors($user_id)\n {\n }", "function GetAuthor()\n {\n return 'texus';\n }", "public function getAuthor($encoding = 'UTF-8') {}", "function Submission_Authors_Latex($item)\n {\n $item[ \"Authors\" ]=$this->Submission_Authors_Read($item);\n \n $latex=array();\n $n=1;\n foreach ($item[ \"Authors\" ] as $author)\n {\n $names=preg_split('/\\s+/',$author[ \"Name\" ]);\n $lastname=array_pop($names);\n array_unshift($names,$lastname.\",\");\n $name=join(\" \",$names);\n array_push\n (\n $latex,\n '\\author['.$n++.']{'.$name.', '.\n '\\texttt{'.$author[ \"Email\" ].'}}'\n ); \n \n }\n\n $rlatex=array();\n $n=1;\n foreach ($item[ \"Authors\" ] as $author)\n {\n array_push\n (\n $rlatex,\n '\\affil['.$n++.']{'.$author[ \"Institution\" ].'}'\n );\n }\n \n return\n '\\usepackage{authblk}\\n\\n'.\n ''.\n join('\\n',$latex).\n '\\n\\n'.\n join('\\n',$rlatex).\n '\\n\\n'.\n '';\n }", "function decorateWithAuthor($article) {\n global $authorArticleTable;\n\n createAuthorArticleTable();\n\n $article->authors = $authorArticleTable[$article->id];\n\n return $article;\n}", "public function getAuthorcompany() {}", "public function convert_all_author_records_to_pdf($authors, $caption)\n { \n $output = '\n <style>\n table, th, td {\n border: 1px solid black;\n border-collapse: collapse;\n }\n th, td {\n padding: 5px;\n }\n </style>\n <h2>PUP Intellectual Property Management Office</h2>\n <h3>REPORT</h23><small>('.Carbon::now()->format('F d, Y').')</small>\n <table style=\"width:100%\">\n <caption>'.$caption.'</caption>\n <tr>\n <th scope=\"col\" class=\"text-center\">Author Name</th>\n <th scope=\"col\" class=\"text-center\">Gender - Birthdate</th>\n <th scope=\"col\" class=\"text-center\">Type</th>\n <th scope=\"col\" class=\"text-center\">College - Department - Branch</th>\n <th scope=\"col\" class=\"text-center\">Copyrights</th>\n <th scope=\"col\" class=\"text-center\">Patents</th>\n <th scope=\"col\" class=\"text-center\">Date Registered</th>\n </tr>';\n \n foreach ($authors as $author) {\n $output .= '\n <tr>\n <td>'.$author->str_first_name.' '.$author->str_middle_name\n .' '.$author->str_last_name.'</td>'.\n '<td>'.$author->char_gender.' - '.$author->dtm_birthdate.'</td>'.\n '<td>'.$author->char_applicant_type.'</td>'.\n '<td>'.$author->char_department_code.' - '\n .$author->char_college_code.' - '.$author->str_branch_name.'</td>'.\n '<td><ul><li>'.$author->str_project_title.'</li></ul></td>'.\n '<td><ul><li>'.$author->str_patent_project_title.'</li></ul></td>'.\n '<td>'.date('m/d/Y', strtotime($author->created_at)).'</td>\n </tr>';\n } \n \n $output .= '</table>';\n return $output;\n }", "function circle_author_biography() {\n\tif ( ! circle_option( 'display_author_bio' ) ) {\n\t\treturn;\n\t}\n\tget_template_part( 'template-parts/biography' );\n}", "protected function setAuthorsLinks() {\r\n\t\t$authors = $this->getAuthors();\r\n\t\tif (!empty($authors)) {\r\n\t\t\tforeach ($this->settings['site']['authors'] as $author) {\r\n\t\t\t\tif (in_array(trim($author['name']), $authors) && !empty($author['uri'])) {\r\n\t\t\t\t\t$typolink_conf = array(\r\n\t\t\t\t\t\t\"parameter\" => $author['uri'],\r\n\t\t\t\t\t\t\"forceAbsoluteUrl\" => 1,\r\n\t\t\t\t\t\t\"useCacheHash\" => 0);\r\n\t\t\t\t\t$this->authorsLinks[] = $this->getUri($typolink_conf);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function getAuthorsLinks() {\r\n\t\treturn $this->authorsLinks;\r\n\t}", "function GetAuthor()\n {\n return 'calguy1000';\n }", "public function insertContributor($data){\r\n $this->insert($data);\r\n }", "function get_the_modified_author()\n {\n }", "public function getCopyright() {}", "protected function update_contrib(array $row)\n\t{\n\t\t\\users_overlord::$users[$row['user_id']] = $row;\n\n\t\t$contrib = new \\titania_contribution;\n\t\t$contrib->__set_array($row);\n\t\t$contrib->set_type($row['contrib_type']);\n\n\t\t$contrib->author = new \\titania_author;\n\t\t$contrib->author->__set_array($row);\n\n\t\t// Update the release topic\n\t\t$contrib->update_release_topic();\n\t}", "public function authorsInitials();", "function makeAuthorList($authors) {\n\t\t$alist = \"\n\t\t\t\t<input type='hidden' name='authors' id='authors' value=\\\"\".implode(\",\",$authors).\"\\\" />\n\t\t\t\t<ul class='memberlist_s'>\\n\";\n\t\t$udata = $this->getUserData($authors, array('FirstName','ProfilePicture'));\n\t\tforeach ($udata as $user_id => $u) {\t\t\t\n\t\t\t$alist .= '\n\t\t\t\t<li>\n\t\t\t\t\t<table><tr><td>\n\t\t\t\t\t<img src=\"'.$u['ProfilePicture']['SmallThumb'].'\" style=\"width:30px;\" />\n\t\t\t\t\t</td><td>\n\t\t\t\t\t<div style=\"padding:2px;\">'.$u['FirstName'].'</div>\n\t\t\t\t\t<div style=\"padding:2px;\"><a href=\"#\" style=\"background:url(/images/famfamfam_mini/action_stop.gif) no-repeat left;padding:2px 2px 2px 18px;\" onclick=\"removeAuthor('.$user_id.'); return false;\">Fjern</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t</td></tr></table>\n\t\t\t\t</li> ';\n\t\t}\n\t\t$alist .= '\n\t\t\t\t</ul>\n\t\t\t\t';\n\t\treturn $alist;\n\t}", "function the_modified_author()\n {\n }", "function Submission_Author_Data()\n {\n return\n array\n (\n \"Title\",\"Name\",\"Institution\",\"Lattes\",\"Email\"\n );\n }", "function netfunktheme_author_desc_shortcode( $atts ){\n\t\n\textract( shortcode_atts( array(\n\t\t'user_id' => '0'\n\t), $atts ) );\n\t\n\t$author_description = '';\n\t\n\tif ($atts['user_id'] != 0) {\n\n\t\t$author_description = get_the_author_meta('lb_about',$atts['user_id']);\n\n\t}\n\t\n\t$author_description = str_replace('/n','<br />',$author_description);\n\t$author_description = str_replace('/r','<br />',$author_description);\n\t\n\treturn '<p class=\"lb-shortcode-meta lb_author_description\">' . $author_description . '</p>';\n\t\n}", "public function getAboutUs():string\n {\n return $this->aboutUs;\n }", "public function selectContributor($nameID, $version)\n {\n $qq_2 = 'selcontributor';\n $this->sdb->prepare($qq_2,\n 'select\n aa.id, aa.version, aa.ic_id, aa.short_name, aa.name_type, aa.rule, aa.name_id\n from name_contributor as aa,\n (select name_id,max(version) as version from name_contributor where name_id=$1 and version<=$2 group by name_id) as bb\n where not is_deleted and aa.name_id=bb.name_id and aa.version=bb.version');\n $contributor_result = $this->sdb->execute($qq_2, array($nameID, $version));\n $all = array();\n while($contributor_row = $this->sdb->fetchrow($contributor_result))\n {\n array_push($all, $contributor_row);\n }\n $this->sdb->deallocate($qq_2);\n return $all;\n }", "public function author()\n {\n $this->renderView('author.twig',['articleList' => $this->articleList]);\n }", "function _returnFromRow($row) {\n\t\t// Start with an Author object and copy the common elements\n\t\t$authorDao = DAORegistry::getDAO('AuthorDAO');\n\t\t$author = $authorDao->_fromRow($row);\n\n\t\t$chapterAuthor = $this->newDataObject();\n\t\t$chapterAuthor->setId($author->getId());\n\t\t$chapterAuthor->setSubmissionId($author->getSubmissionId());\n\t\t$chapterAuthor->setFirstName($author->getFirstName());\n\t\t$chapterAuthor->setMiddleName($author->getMiddleName());\n\t\t$chapterAuthor->setLastName($author->getLastName());\n\t\t$chapterAuthor->setAffiliation($author->getAffiliation(null), null);\n\t\t$chapterAuthor->setCountry($author->getCountry());\n\t\t$chapterAuthor->setEmail($author->getEmail());\n\t\t$chapterAuthor->setUrl($author->getUrl());\n\t\t$chapterAuthor->setUserGroupId($author->getUserGroupId());\n\n\t\t// Add additional data that is chapter author specific\n\t\t$chapterAuthor->setPrimaryContact($row['primary_contact']);\n\t\t$chapterAuthor->setSequence($row['seq']);\t\t;\n\t\t$chapterAuthor->setChapterId($row['chapter_id']);\n\n\t\treturn $chapterAuthor;\n\t}", "function sfgov_utilities_deploy_01_homepage_profile_group() {\n $users = \\Drupal::entityTypeManager()->getStorage('user')->loadByProperties(['mail'=>'webmaster@sfgov.org']);\n $user = reset($users);\n $user_id = $user->id();\n\n // there's only one landing page\n $landingPage = Node::load('2');\n\n // get content sections\n $contentFieldSections = $landingPage->get('field_content')->getValue();\n\n // collect the people section indexes for removal\n $peopleSectionRemoveIds = [];\n\n foreach($contentFieldSections as $contentFieldSection) {\n $sectionParagraph = Paragraph::load($contentFieldSection['target_id']);\n\n if(!empty($sectionParagraph)) {\n $sectionTitle = $sectionParagraph->get('field_title')->value;\n // look for the elected officials section\n if(strToLower($sectionTitle) == 'elected officials') {\n // get all the people sections\n $peopleSections = $sectionParagraph->get('field_content');\n $peopleSectionsValue = $sectionParagraph->get('field_content')->getValue();\n for($i=0; $i < count($peopleSectionsValue); $i++) {\n $peopleSection = $peopleSectionsValue[$i];\n $peopleSectionParagraph = Paragraph::load($peopleSection['target_id']);\n if($peopleSectionParagraph->getType() == 'people') {\n // we will remove this later, so track the id\n $peopleSectionRemoveIds[] = $peopleSectionParagraph->id();\n // capture the people section data fields\n $peopleSectionTitle = $peopleSectionParagraph->get('field_people_title')->value;\n $peopleSectionDescription = $peopleSectionParagraph->get('field_description')->value;\n $peopleSectionPersons = $peopleSectionParagraph->get('field_person_2')->getValue();\n echo \"found people section: \\n\";\n echo \"\\ttitle: \" . $peopleSectionTitle . \"\\n\";\n echo \"\\tdescription: \" . $peopleSectionDescription . \"\\n\";\n echo \"\\tpeople: \";\n \n $publicBodyProfilesParagraphs = [];\n \n // iterate through people sections and create new paragraphs for each to attach to this section paragraph\n foreach($peopleSectionPersons as $peopleSectionPerson) {\n $publicBodyProfilesParagraph = Paragraph::create([\n \"type\" => \"public_body_profiles\",\n ]);\n $personId = $peopleSectionPerson['target_id'];\n $person = Node::load($personId);\n echo $person->get('field_first_name')->value . ' ' . $person->get('field_last_name')->value . \"(\" . $person->id() . \"), \";\n $publicBodyProfilesParagraph->get('field_profile')->appendItem($peopleSectionPerson);\n $publicBodyProfilesParagraph->save();\n $publicBodyProfilesParagraphs[] = $publicBodyProfilesParagraph;\n }\n echo \"\\ncreate new profile group paragraph and insert data from previous people section\\n\";\n\n $profileGroupParagraph = Paragraph::create([\n \"type\" => \"profile_group\",\n \"field_title\" => $peopleSectionTitle,\n \"field_description\" => $peopleSectionDescription,\n \"field_profiles\" => $publicBodyProfilesParagraphs\n ]);\n $profileGroupParagraph->field_description->format = 'sf_restricted_html';\n $profileGroupParagraph->save();\n echo \"remove people section with id: \" . $peopleSectionParagraph->id() . \"\\n---\\n\\n\";\n $sectionParagraph->field_content[] = $profileGroupParagraph;\n } else {\n echo \"no people sections to update\";\n }\n }\n\n // loop through again with the saved remove ids\n for($i=0; $i<count($peopleSectionRemoveIds); $i++) {\n $removeId = $peopleSectionRemoveIds[$i];\n // get a fresh list of field_content items because each removal rekeys the array\n $contents = $sectionParagraph->get('field_content')->getValue();\n for($j=0; $j<count($contents); $j++) {\n $targetId = $contents[$j]['target_id'];\n if($removeId == $targetId) {\n echo \"removing people section with id: $removeId at index: $j\\n\";\n $sectionParagraph->get('field_content')->removeItem($j);\n $sectionParagraph->save();\n }\n }\n }\n }\n }\n }\n\n $landingPage->setNewRevision(TRUE);\n $landingPage->revision_log = 'Moved people section data to new profile group';\n $landingPage->setRevisionCreationTime(Drupal::time()->getRequestTime());\n $landingPage->setRevisionUserId($user_id);\n $landingPage->save();\n}", "function get_the_author_description()\n {\n }", "function create_author_list( $role ) {\n\n // list editors first\n $args = array(\n 'role' => $role,\n 'orderby' => 'display_name'\n );\n\n // Create the WP_User_Query object\n $wp_user_query = new WP_User_Query($args);\n\n $author_ids = $wp_user_query->get_results();\n\n foreach($author_ids as $author) :\n\n $curauth = get_userdata($author->ID);\n\n if($curauth->user_login !== 'admin') : // if name == admin don't display\n $user_link = get_author_posts_url($curauth->ID);\n $avatar = 'default'; ?>\n\n\n <div class=\"author\" title=\"<?php echo $curauth->display_name; ?>\">\n <a href=\"\n <?php echo get_author_posts_url( get_the_author_meta( 'ID', $curauth->ID ) ); ?>\n \">\n <?php\n // avatar goes here\n $avatar = get_field('author_photo', 'user_' . $curauth->ID );\n echo '<img src=\"';\n echo $avatar['url'];\n echo '\" />';\n ?>\n <p class=\"name\"><?php echo $curauth->display_name; ?></p>\n <p><?php the_author_meta( 'shortbio', $curauth->ID ); ?></p>\n </a>\n </div>\n\n\n <?php endif;\n endforeach;\n\n}", "private function oembed_github_author ( $owner ) {\n\n\t\t$owner_info = $this->api->get_user( $owner );\n\n\t\t$response = new stdClass();\n\t\t$response->type = 'rich';\n\t\t$response->width = '10';\n\t\t$response->height = '10';\n\t\t$response->version = '1.0';\n\t\t$response->title = $owner_info->name;\n\n\t\t// @TODO This should all be templated\n\t\t$response->html = '<div class=\"github-embed github-embed-user\">';\n\t\t$response->html .= '<p><a href=\"https://github.com/' . esc_attr( $owner ) . '\" target=\"_blank\"><strong>' . esc_html( $owner ) . '</strong></a><br/>';\n\t\t$response->html .= esc_html( number_format_i18n( $owner_info->public_repos ) ) . ' repositories, ';\n\t\t$response->html .= esc_html( number_format_i18n( $owner_info->followers ) ) . ' followers.</p>';\n\t\t$response->html .= '</div>';\n\t\theader( 'Content-Type: application/json' );\n\t\techo json_encode( $response );\n\t\tdie();\n\t}", "public function getAuthor() {\n $contributors = $this->product->getContributors();\n foreach ($contributors as $contributor) {\n if($contributor->getRole() == PONIpar\\ProductSubitem\\Contributor::ROLE_AUTHOR) {\n\n $value = $contributor->getValue();\n\n if(key_exists('PersonName',$value)) {\n return $value['PersonName'];\n }\n elseif(key_exists('PersonNameInverted',$value)) {\n $inverted = $value['PersonNameInverted'];\n $author = implode(' ',array_reverse(explode(', ',$inverted)));\n }\n\n // if the first author string is too long (might be a collections of authors), skip to the next\n if(strlen($author) < 100) return $author;\n else continue;\n\n }\n }\n // if we reach this that means we haven't found an author\n return null;\n }", "public function onPostRowSave(MigratePostRowSaveEvent $event) {\n $migration = $event->getMigration();\n $migration_id = $migration->id();\n\n // Only act on rows for this migration.\n if (array_key_exists($migration_id, self::getMigrations())) {\n $row = $event->getRow();\n $destination_ids = $event->getDestinationIdValues();\n $reference_id = $destination_ids[0];\n\n // Contributors.\n $authors = $this->createContributors($row, 'author');\n $editors = $this->createContributors($row, 'editor');\n $series_editors = $this->createContributors($row, 'series_editor');\n $translators = $this->createContributors($row, 'translator');\n $src_contributors = $this->createContributors($row, 'contributor');\n $book_authors = $this->createContributors($row, 'book_author');\n $reviewed_authors = $this->createContributors($row, 'reviewed_author');\n\n $contributors = array_merge(\n $authors,\n $editors,\n $series_editors,\n $translators,\n $src_contributors,\n $book_authors,\n $reviewed_authors\n );\n\n // Instance and update reference.\n $item_type = $row->getSourceProperty('item_type');\n $entity_type = self::getZoteroTypeMappings()[$item_type];\n\n $reference = $this->typeManager\n ->getStorage($entity_type)\n ->load($reference_id);\n\n // Use source publication year if empty from publication date.\n $pub_year = trim($row->getSourceProperty('publication_year'));\n $src_year = $row->getSourceProperty('src_publication_year');\n\n if (empty($pub_year)) {\n $pub_year = !empty($src_year) ? $src_year : NULL;\n }\n\n if ((int) $pub_year == 0) {\n $pub_year = NULL;\n }\n\n // Default collection.\n $collection_name = self::getMigrations()[$migration_id];\n\n // If it's a religion migration, add to religion Collection.\n $parts = explode(': ', $collection_name);\n\n if ($parts[0] == 'Religion') {\n $collection_name = $parts[0];\n }\n\n if (!empty($collection_name)) {\n $existing = $this->typeManager->getStorage('yabrm_collection')\n ->getQuery()\n ->condition('name', $collection_name)\n ->accessCheck(FALSE)\n ->execute();\n\n reset($existing);\n $col_id = key($existing);\n\n // Create collection if doesn't exist.\n if (empty($col_id)) {\n $collection = BibliographicCollection::create([\n 'name' => $collection_name,\n ]);\n\n $collection->save();\n $col_id = $collection->id();\n }\n }\n\n $collections[] = $col_id ? $col_id : NULL;\n\n // Archive.\n $arch_name = $row->getSourceProperty('archive');\n\n if (!empty($arch_name)) {\n $existing = $this->typeManager->getStorage('taxonomy_term')\n ->getQuery()\n ->condition('name', $arch_name)\n ->condition('vid', 'nbbib_archives')\n ->accessCheck(FALSE)\n ->execute();\n\n reset($existing);\n $arch_id = key($existing);\n\n // Create archive if doesn't exist.\n if (empty($arch_id)) {\n $archive = Term::create([\n 'name' => $arch_name,\n 'vid' => 'nbbib_archives',\n ]);\n\n $archive->save();\n $arch_id = $archive->id();\n }\n }\n\n $archives[] = $arch_id ? $arch_id : NULL;\n\n // URL.\n $source_url = $row->getSourceProperty('url');\n $uri = substr(trim($source_url), 0, 4) === 'http' ? $source_url : NULL;\n $link_title = strlen($uri) > 125 ? substr($uri, 0, 125) . '...' : $uri;\n\n if ($uri) {\n\n $url = [\n 'uri' => $uri,\n 'title' => $link_title,\n 'options' => [\n 'attributes' => [\n 'target' => '_blank',\n ],\n ],\n ];\n\n $reference->setUrl($url);\n }\n\n $reference->setContributors($contributors);\n $reference->setPublicationYear($pub_year);\n $reference->setCollections($collections);\n $reference->setArchive($archives);\n $reference->setPublished(FALSE);\n $reference->save();\n }\n }", "function atarr_do_copyright_text() {\n\n\t// Grab our customizer settings.\n\t$copyright_text = get_theme_mod( 'atarr_copyright_text' );\n\n\t// Stop if there's nothing to display.\n\tif ( ! $copyright_text ) {\n\t\treturn false;\n\t}\n\n\tob_start(); ?>\n\n\t<span class=\"copyright-text\">&#169; <?php echo intval( date( 'Y' ) ); ?> <?php echo wp_kses_post( $copyright_text ); ?></span>\n\t<?php\n\t\twp_nav_menu( array(\n\t\t\t'theme_location' => 'footer',\n\t\t\t'menu_id' => 'footer-menu',\n\t\t) );\n\t?>\n\n\t<?php\n\treturn ob_get_clean();\n}", "public function getAuthors()\n {\n return $this->getValue('authors');\n }", "function rtheme_get_author() {\n $byline = sprintf(\n esc_html_x( ' by %s', 'post author', 'rtheme' ),\n '<span class=\"author vcard\"><a href=\" ' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . ' \">' . esc_html( get_the_author() ) . '</a></span>'\n );\n echo '<span class=\"\">' . $byline . '</span>';\n}", "public function getSeniorFrContributors($lang)\n {\n $query=\"select u.identifier FROM \".$this->_name.\" u INNER JOIN Contributor c ON u.identifier=c.user_id WHERE u.profile_type ='senior' AND u.status = 'Active' AND c.language='\".$lang.\"'\";\n if(($result = $this->getQuery($query,true)) != NULL)\n return $result;\n else\n return \"NO\";\n }" ]
[ "0.5504549", "0.549063", "0.5451034", "0.54458666", "0.5338139", "0.52921367", "0.5208824", "0.51784176", "0.51343906", "0.5131036", "0.50803685", "0.5054232", "0.4986717", "0.49694905", "0.49192595", "0.49165964", "0.49164382", "0.48589432", "0.4854017", "0.483687", "0.48361143", "0.48146623", "0.47909588", "0.4781245", "0.4768679", "0.4759623", "0.4747108", "0.4742492", "0.47392714", "0.47358063", "0.47231722", "0.47217616", "0.4717934", "0.47120947", "0.46942148", "0.4675547", "0.4668703", "0.46638566", "0.4661749", "0.4639157", "0.46232244", "0.46057358", "0.4604719", "0.45943645", "0.45777255", "0.45595217", "0.45537347", "0.45537347", "0.45537347", "0.45530453", "0.45374268", "0.4537126", "0.45365685", "0.45054793", "0.45032543", "0.4501229", "0.4499258", "0.4498454", "0.44970682", "0.44966158", "0.44956958", "0.44945177", "0.4490766", "0.4488658", "0.44881043", "0.448262", "0.44810745", "0.44796205", "0.44761366", "0.4472562", "0.44624197", "0.44622844", "0.446222", "0.44431677", "0.4437732", "0.44334373", "0.44316155", "0.4426853", "0.44150996", "0.4412398", "0.44063863", "0.4403806", "0.4399112", "0.43986923", "0.43959495", "0.43951234", "0.43854365", "0.43831596", "0.43736625", "0.43729672", "0.43670255", "0.43608057", "0.43584302", "0.43556786", "0.43526652", "0.43442038", "0.4343935", "0.43387088", "0.4338038", "0.43338057" ]
0.43774426
88
Convert the dist section.
public static function convertDist($value) { if (\is_array($value)) { $data = (array) $value; $value = array(); foreach ($data as $type => $url) { if (\is_string($url)) { self::convertDistEntry($value, $type, $url); } } } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function normalize_distribution_info()\r\n {\r\n $distribution_info=$this->get_key_value('distribution_info');\r\n \r\n $output=array();\r\n $columns=array_keys($this->xpath_map['distribution_info']['items']);\r\n \r\n //there could be multiple distribution info tags\r\n //combine all into one array\r\n foreach($distribution_info as $row)\r\n {\r\n foreach($row as $key=>$value)\r\n {\r\n foreach($value as $val){\r\n $output[$key][]=$val;\r\n }\r\n }\r\n }\r\n \r\n $distribution_info=$output;\r\n $output=array();\r\n \r\n //create associated array\r\n foreach($distribution_info as $key=>$value)\r\n {\r\n $k=0;\r\n foreach($value as $val)\r\n {\r\n $output[$k][$key]=$val;\r\n $k++;\r\n }\r\n \r\n }\r\n \r\n $this->xpath_map['distribution_info']['data']=$output; \r\n }", "public static function updateDistribution($dist)\n\t{\n\t\t// TODO: Implement updateDistribution() method.\n\t}", "private static function convertDistEntry(array &$value, $type, $url)\n {\n $httpPrefix = 'http://';\n\n if (0 === strpos($url, $httpPrefix)) {\n $url = 'https://'.substr($url, \\strlen($httpPrefix));\n }\n\n if ('shasum' === $type) {\n $value[$type] = $url;\n } elseif ('tarball' === $type) {\n $value['type'] = 'tar';\n $value['url'] = $url;\n } elseif (\\in_array($type, self::getDownloaderTypes(), true)) {\n $value['type'] = $type;\n $value['url'] = $url;\n }\n }", "public function getDtdMapping();", "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}", "public function section_adapted(){\n\t\treturn '<div id=\"main\" class=\"'.$this->seccion['adapted'].'\">';\n\t}", "function formulaires_publication_ouverte_agenda_charger_dist()\n{\n\t$values = array();\n\n\t$values['etape'] \t\t= _request('etape');\t\t\t// etape actuelle\n\t$values['id_article']\t \t= _request('id_article');\t\t// id de l'article temporaire\n\t$values['type']\t\t\t= \"evenement\";\t\t\t// article ou evenement ?\n\t$values['id_rubrique'] \t\t= _request('id_rubrique');\t\t// rubrique de la contrib\n\t$values['jour_evenement'] \t= _request('jour_evenement'); \t\t// jour de l'événement\n\t$values['mois_evenement'] \t= _request('mois_evenement'); \t\t// mois de l'événement\n\t$values['annee_evenement'] \t= _request('annee_evenement'); \t\t// annee de l'événement\n\t$values['heure_evenement'] \t= _request('heure_evenement'); \t\t// heure de l'événement\n\t$values['lieu_evenement']\t= _request('lieu_evenement');\t\t// lieu de l'evenement\n\t$values['ville_evenement']\t= _request('ville_evenement');\t\t// lieu de l'evenement\n\t$values['adresse_evenement']\t= _request('adresse_evenement');\t// lieu de l'evenement\n\t$values['tel_evenement']\t= _request('tel_evenement');\t\t// lieu de l'evenement\n\t$values['web_evenement']\t= _request('web_evenement');\t\t// lieu de l'evenement\n\t$values['email_evenement']\t= _request('email_evenement');\t\t// lieu de l'evenement\n\t$values['lieu_evenement_existe']= _request('lieu_evenement_existe');\t// lieu de l'evenement déjà existant\n\t$values['titre'] \t\t= _request('titre');\t\t\t// titre de la contrib\n\t$values['texte'] \t\t= _request('texte');\t\t\t// texte de la contrib\n\t$values['pseudo'] \t\t= _request('pseudo');\t\t\t// pseudo ou nom de l'auteur\n\t$values['email'] \t\t= _request('email');\t\t\t// email de l'auteur\n\t$values['mots'] \t\t= _request('mots');\t\t\t// les mots-clés\n\t$values['date'] = _request('date');\n\t$values['date_modif'] = _request('date_modif');\n\t$values['supprimer_documents'] = _request('supprimer_documents');\n\t// editos\n\t$values['mise_en_edito'] = _request('mise_en_edito');\n\t$values['edito_complet'] = _request('edito_complet');\n\t// focus\n\t$values['mot_focus'] = _request('mot_focus');\n\t// si c'est pas un debut d'article\n\tif (_request('titre') or _request('previsu'))\n\t\t$values['ancre'] = '#etape_4';\n\telse\n\t\t$values['ancre'] = '.page-article';\n\t\n\t/*\n\t * s'il s'agit du premier passage, on créé l'article\n\t */\n\tif (!$values['id_article'])\n\t{\n\t\t$id_article = indymedia_creer_article();\n\t\t$values['id_article'] = $id_article;\n\t}\n\t/*\n\t * sinon, si admin, on peut l'éditer\n\t */\n\telse if ($values['id_article'] && est_admin())\n\t{\n\t\t$id_article = (int) $values['id_article'];\n\t\t// on recupere des infos sur l'article\t\n\t\t$row = sql_fetsel(\n\t\t\tarray('texte','extra','id_rubrique','titre','date_debut_indy','statut','date'),\n\t\t\tarray('spip_articles'),\n\t\t\tarray('id_article='.$id_article)\n\t\t);\n\t\t$values['texte'] = $row['texte'] ;\n\t\t$values['titre'] = $row['titre'] ;\n\t\t$values['id_rubrique'] = $row['id_rubrique'] ;\n\t\t//$values['statut'] = $row['statut'] ;\n\t\t$extra = unserialize($row['extra']);\n\t\t$values['explication'] = $extra['OP_moderation'];\n\t\t$values['pseudo'] = $extra['OP_pseudo'];\n\t\t$values['email'] = $extra['OP_email'];\n\t\t$values['date'] = $row['date'];\n\t\t\n\t\t// on recupere la date, l'heure et le lieu de l'evenement\n\t\t$values = indymedia_ajout_valeurs_date ($values, $row['date_debut_indy']);\n\t\t$values = indymedia_ajout_valeurs_lieu ($values, $id_article);\n\t\t$values = indymedia_ajout_valeurs_mots ($values, $id_article);\n\t}\n\tinclude_spip('inc/securiser_action');\n\t$values['cle_ajouter_document'] = calculer_cle_action('ajouter-document-' . 'article' . '-' . $id_article);\n\n\treturn $values;\n}", "function source($dist){\n\treturn 'http://www.imd.gov.in/section/nhac/distforecast/'.$dist.'.htm';\n}", "public function distributionCenter()\n {\n return $this->belongsTo('App\\DistributionCenter');\n }", "function autoriser_document_tailler_dist($faire,$quoi,$id,$qui,$options) {\r\n\r\n\tif (!$id_document=intval($id))\r\n\t\treturn false;\r\n\tif (!autoriser('modifier','document',$id,$qui,$options))\r\n\t\treturn false;\r\n\t\r\n\tif (!isset($options['document']) OR !$document = $options['document'])\r\n\t\t$document = sql_fetsel('*','spip_documents','id_document='.intval($id_document));\r\n\t\r\n\t// (on ne le propose pas pour les images qu'on sait\r\n\t// lire : gif jpg png), sauf bug, ou document distant\r\n\tif (in_array($document['extension'], array('gif','jpg','png'))\r\n\t\tAND $document['hauteur']\r\n\t\tAND $document['largeur']\r\n\t\tAND $document['distant']!='oui')\r\n\t\treturn false;\r\n\t\r\n\t// Donnees sur le type de document\r\n\t$extension = $document['extension'];\r\n\t$type_inclus = sql_getfetsel('inclus','spip_types_documents', \"extension=\".sql_quote($extension));\r\n\r\n\tif (($type_inclus == \"embed\" OR $type_inclus == \"image\")\r\n\tAND (\r\n\t\t// documents dont la taille est definie\r\n\t\t($document['largeur'] * $document['hauteur'])\r\n\t\t// ou distants\r\n\t\tOR $document['distant'] == 'oui'\r\n\t\t// ou tous les formats qui s'affichent en embed\r\n\t\tOR $type_inclus == \"embed\"\r\n\t))\r\n\t\treturn true;\r\n}", "public static function deleteDistribution($dist)\n\t{\n\t\t// TODO: Implement deleteDistribution() method.\n\t}", "function formulaires_editer_feuillederoute_charger_dist() {\n\t$valeurs = array( '_texte' => '' );\n\tlire_fichier_securise(_DIR_IMG . 'feuillederoute.php',$contenu);\n\t$contenu = @unserialize($contenu);\n\tif($contenu){\n\t\t$valeurs['_texte'] = $contenu;\n\t}\n\treturn $valeurs;\n}", "public function convert();", "public function getDistinction() {\n $result = TingOpenformatMethods::parseFields($this->work, array('distinction'));\n return (is_array($result)) ? reset($result) : $result;\n }", "public function migrateDamCategoryMountsToSysCategoryPerms($table) {\n\t\t$this->headerMessage(LocalizationUtility::translate('migrateDamCategoryMountsToSysCategoryPerms', 'dam_falmigration', array($table)));\n\t\t/** @var \\TYPO3\\CMS\\Core\\DataHandling\\DataHandler $dataHandler */\n\t\t$dataHandler = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');\n\n\t\t/* assign imported categories to be_groups or be_users */\n\t\t$whereClause = 'tx_dam_mountpoints != \\'\\'' . BackendUtility::deleteClause($table);\n\t\t$beGroupsOrUsersWithTxDamMountpoints = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', $table, $whereClause);\n\t\t$data = array();\n\n\t\tforeach ($beGroupsOrUsersWithTxDamMountpoints as $beGroupOrUser) {\n\t\t\t$txDamMountpoints = GeneralUtility::trimExplode(',', $beGroupOrUser['tx_dam_mountpoints']);\n\t\t\t$sysCategoryPermissions = array();\n\t\t\tforeach ($txDamMountpoints as $txDamMountpoint) {\n\t\t\t\tif (GeneralUtility::isFirstPartOfStr($txDamMountpoint, 'txdamCat:')) {\n\t\t\t\t\t// we only migrate DAM category mounts\n\t\t\t\t\t$damCategoryMountpoint = GeneralUtility::trimExplode(':', $txDamMountpoint);\n\t\t\t\t\t$whereClause = '_migrateddamcatuid = ' . $damCategoryMountpoint[1];\n\t\t\t\t\t$sysCategory = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid', 'sys_category', $whereClause);\n\t\t\t\t\tif (!empty($sysCategory)) {\n\t\t\t\t\t\t$sysCategoryPermissions[] = $sysCategory['uid'];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (count($sysCategoryPermissions)) {\n\t\t\t\t$data[ $table ][ $beGroupOrUser['uid'] ] = array(\n\t\t\t\t\t'category_perms' => implode(',', $sysCategoryPermissions) . ',' . $beGroupOrUser['category_perms']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t$dataHandler->start($data, array());\n\t\t$dataHandler->admin = TRUE;\n\t\t$dataHandler->process_datamap();\n\t}", "public function init ()\n {\n $section_general = array (\n array (\n 'section_id_list',\n __ ('List of section ids', DOMAIN),\n sprintf (\n __ ('List of section ids (space-separated). Eg.: %s', DOMAIN),\n 'mss mss_internal capit_ldf capit_ldf_internal'\n ),\n ns ('cap_sanitize_key_list'),\n ),\n array (\n 'xml_root_uri',\n __ ('XML Root URI', DOMAIN),\n sprintf (\n __ ('Root URI from where to download XML files, eg.: %s', DOMAIN),\n 'https://capitularia.uni-koeln.de/downloads'\n ),\n ns ('cap_sanitize_path'),\n ),\n );\n $section_transform = array (\n array (\n 'section_caption',\n __ ('Section name', DOMAIN),\n __ ('The name of this section', DOMAIN),\n ns ('cap_sanitize_caption'),\n ),\n array (\n 'shortcode',\n __ ('Shortcode', DOMAIN),\n __ ('The text to insert on all new pages. Use {slug} to insert the page slug.', DOMAIN),\n ns ('cap_sanitize_nothing'),\n ),\n array (\n 'xml_dir',\n __ ('XML files directory', DOMAIN),\n sprintf (\n __ (\n 'The path to the XML files, relative to the FS Root. eg.: %s. ' .\n 'The FS root is currently configured as<br>%s',\n DOMAIN\n ),\n 'publ/mss',\n lib\\get_opt ('afs')\n ),\n ns ('cap_sanitize_path'),\n ),\n array (\n 'slug_path',\n __ ('Slug path', DOMAIN),\n sprintf (\n __ ('The URL path to the page, eg.: %s', DOMAIN),\n 'capit/ldf'\n ),\n ns ('cap_sanitize_path'),\n ),\n array (\n 'slug_prefix',\n __ ('Slug prefix', DOMAIN),\n sprintf (\n __ ('The slug prefix for the pages, eg.: %s', DOMAIN),\n 'capit-ldf-'\n ),\n ns ('cap_sanitize_key'),\n ),\n array (\n 'page_status_list',\n __ ('Page statuses list', DOMAIN),\n sprintf (\n __ ('The allowed page statuses (space-separated list). Eg.: %s', DOMAIN),\n 'publish private'\n ),\n ns ('cap_sanitize_caption'),\n ),\n array (\n 'sidebars',\n __ ('Sidebars', DOMAIN),\n sprintf (\n __ ('The sidebars (space-separated list). Eg.: %s', DOMAIN),\n 'transcription'\n ),\n ns ('cap_sanitize_caption'),\n ),\n );\n\n $this->sections = array ();\n $this->sections[] = array ('general', $section_general);\n\n $sections = explode (' ', $this->get_opt ('general', 'section_id_list'));\n foreach ($sections as $section_id) {\n $this->sections[] = array ($section_id, $section_transform);\n }\n }", "function wpendata_distribution_init() {\n $labels = array(\n 'name' => _x( 'Distributions', 'Post type general name', WPENDATA_TEXT_DOMAIN ),\n 'singular_name' => _x( 'Distribution', 'Post type singular name', WPENDATA_TEXT_DOMAIN ),\n 'menu_name' => _x( '3. Distributions', 'Admin Menu text', WPENDATA_TEXT_DOMAIN ),\n 'name_admin_bar' => _x( 'Distribution', 'Add New on Toolbar', WPENDATA_TEXT_DOMAIN ),\n 'add_new' => __( 'Add New Distribution', WPENDATA_TEXT_DOMAIN ),\n 'add_new_item' => __( 'Add New Distribution', WPENDATA_TEXT_DOMAIN ),\n 'new_item' => __( 'New Distribution', WPENDATA_TEXT_DOMAIN ),\n 'edit_item' => __( 'Edit Distribution', WPENDATA_TEXT_DOMAIN ),\n 'view_item' => __( 'View Distribution', WPENDATA_TEXT_DOMAIN ),\n 'all_items' => __( 'Distributions', WPENDATA_TEXT_DOMAIN ),\n 'search_items' => __( 'Search Distributions', WPENDATA_TEXT_DOMAIN ),\n 'parent_item_colon' => __( 'Parent Distributions:', WPENDATA_TEXT_DOMAIN ),\n 'not_found' => __( 'No Distributions found.', WPENDATA_TEXT_DOMAIN ),\n 'not_found_in_trash' => __( 'No Distributions found in Trash.', WPENDATA_TEXT_DOMAIN ),\n 'featured_image' => _x( 'Distribution Cover Image', 'Overrides the “Featured Image” phrase for this post type. Added in 4.3', WPENDATA_TEXT_DOMAIN ),\n 'set_featured_image' => _x( 'Set cover image', 'Overrides the “Set featured image” phrase for this post type. Added in 4.3', WPENDATA_TEXT_DOMAIN ),\n 'remove_featured_image' => _x( 'Remove cover image', 'Overrides the “Remove featured image” phrase for this post type. Added in 4.3', WPENDATA_TEXT_DOMAIN ),\n 'use_featured_image' => _x( 'Use as cover image', 'Overrides the “Use as featured image” phrase for this post type. Added in 4.3', WPENDATA_TEXT_DOMAIN ),\n 'archives' => _x( 'Distribution archives', 'The post type archive label used in nav menus. Default “Post Archives”. Added in 4.4', WPENDATA_TEXT_DOMAIN ),\n 'insert_into_item' => _x( 'Insert into Distribution', 'Overrides the “Insert into post”/”Insert into page” phrase (used when inserting media into a post). Added in 4.4', WPENDATA_TEXT_DOMAIN ),\n 'uploaded_to_this_item' => _x( 'Uploaded to this Distribution', 'Overrides the “Uploaded to this post”/”Uploaded to this page” phrase (used when viewing media attached to a post). Added in 4.4', WPENDATA_TEXT_DOMAIN ),\n 'filter_items_list' => _x( 'Filter Distributions list', 'Screen reader text for the filter links heading on the post type listing screen. Default “Filter posts list”/”Filter pages list”. Added in 4.4', WPENDATA_TEXT_DOMAIN ),\n 'items_list_navigation' => _x( 'Distributions list navigation', 'Screen reader text for the pagination heading on the post type listing screen. Default “Posts list navigation”/”Pages list navigation”. Added in 4.4', WPENDATA_TEXT_DOMAIN ),\n 'items_list' => _x( 'Distributions list', 'Screen reader text for the items list heading on the post type listing screen. Default “Posts list”/”Pages list”. Added in 4.4', WPENDATA_TEXT_DOMAIN ),\n );\n \n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => false,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'Distribution' ),\n 'capability_type' => 'distribution',\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_position' => 22,\n 'menu_icon' => 'dashicons-media-text',\n 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\n );\n \n register_post_type( 'Distribution', $args );\n}", "function _exportMetadata($dstGroupId) {\n $mdMap = array();\n $this->getMetadataMapping($dstGroupId, $mdMap);\n \n $dstMdFactory = $this->_getMetadataFactory($dstGroupId);\n \n // Get used metadata in source project\n foreach($this->getRealMetadataList(true) as $srcMd) {\n // Get corresponding metadata in current project (if any)\n if(isset($mdMap['md'][$srcMd->getId()])) {\n $dstMd = $dstMdFactory->getFromLabel($dstMdFactory->getLabelFromId($mdMap['md'][$srcMd->getId()]));\n $dstMd->update($srcMd);\n $dstMdFactory->updateRealMetadata($dstMd);\n if($srcMd->getType() == PLUGIN_DOCMAN_METADATA_TYPE_LIST) {\n $srcLoveFactory = $this->_getListOfValuesElementFactory($srcMd->getId());\n $srcLoveFactory->exportValues($srcMd, $dstMd, $mdMap['love']);\n }\n } else {\n $_dummyMap = array();\n $this->_cloneOneMetadata($dstGroupId, $srcMd, $_dummyMap);\n }\n }\n }", "function autoriser_vimporterabonnes_menu_dist($faire, $type, $id, $qui, $opt){\n\treturn autoriser('webmestre', '', '', $qui);\n}", "private function convertLinks(){\n\t\tif(!isset($this->course['course_links']))\n\t\t\treturn;\n\t\t\n\t\t//Create folder in tmp for links\n mkdir('./tmp/links');\n\t\t$sectionCounter = 0;\n\n\t\t//Add section to manifest\n\t\tHelper::addIMSSection($this->manifest, $this->currentSectionCounter, $this->identifierCounter, 'Links');\n\n $section = $this->manifest->organizations->organization->item->item[$this->currentSectionCounter];\n \n\t\t//First add all general links\n\t\t\n\t\tforeach($this->course['course_links'] as $link_url)\n\t\t{\n\t\t\tif(intval($link_url['category'])==0)\n\t\t\t{\n\t\t\t\t//Create the xml\n\t\t\t\tHelper::createLinkXML($link_url);\t\t\t\t\n\t\n\t\t\t\t//Edit the manifest\n\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 0);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tforeach($this->course['course_link_categories'] as $cat)\n\t\t{\n\t\t\t//Add the label to the manifest\n\t\t\tHelper::addIMSLabel($section, $sectionCounter, $this->identifierCounter, $cat['name'], 0);\n\n\t\t\t//Add links below the label\n\t\t\tforeach($this->course['course_links'] as $link_url)\n\t\t\t{\n\t\t\t\tif(intval($link_url['category'])==$cat['id'])\n\t\t\t\t{\n\t\t\t\t\t//Create the xml\n\t Helper::createLinkXML($link_url); \n\t\t\t\t\t\n \t\t//Edit the manifest\n\t\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 1);\n \t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Proceed to next section\n\t\t$this->currentSectionCounter++;\n\t\t\t\n\t\t\n\t}", "public function transformToSections()\n {\n if (empty($this->options)) {\n return $this->sections;\n }\n\n foreach (array_values($this->options) as $sectionArgs) {\n $section = Section::createFromArray($sectionArgs);\n $fields = array_get($sectionArgs, 'fields', []);\n if (is_array($fields) && count($fields) > 0) {\n $section->createFieldsFromArray($fields);\n }\n array_push($this->sections, $section);\n }\n }", "public function transform(Row $row)\n {\n foreach($this->columns as $key => $value) {\n $districtName = $row->get($value);\n $row->remove($value);\n $row->set('district', trim($this->districts[$districtName]));\n }\n }", "public static function moveConfigDistResources(): void\n {\n $filesystem = new Filesystem();\n $rootDir = getcwd();\n\n $distSourceDir = sprintf('%s/vendor/backbee/core-php/res/dist', $rootDir);\n\n if (!is_dir($distSourceDir)) {\n return;\n }\n\n $destDir = sprintf('%s/res/dist', $rootDir);\n $filesystem->mkdir($destDir);\n $filesystem->mirror(\n $distSourceDir,\n $destDir,\n null,\n [\n 'override' => false,\n 'delete' => false\n ]\n );\n }", "public function seDeplacer($distance);", "public function specialization() {\n //run parent method\n parent::specialization();\n \n //get instance config\n $config = $this->config;\n \n //if instance config exists and the data property is present, deserialize\n //the data property(contains filter info) back into an object\n if($config && isset($config->data)) {\n $config->data = dd_content_deserialize($config->data);\n }\n \n }", "function convert_prop_to_another($prop) {\n if ($prop == 'POSITION.X') {\n $prop = 'coordx';\n } else if ($prop == 'POSITION.Y') {\n $prop = 'coordy';\n } else if ($prop == 'SOURCE') {\n $prop = 'source';\n } else if ($prop == 'DEST') {\n $prop = 'dest';\n } else if ($prop == 'PLACE2TRANS') {\n $prop = 'place2trans';\n } else if ($prop == 'MARKING') {\n $prop = 'marking';\n } else if ($prop == 'VALUE') {\n $prop = 'value';\n }\n return $prop;\n }", "public function convert( $line );", "public function desinscription()\n {\n // section -64--88-56-1-313d700b:16f04d7fd4a:-8000:00000000000009AF begin\n // section -64--88-56-1-313d700b:16f04d7fd4a:-8000:00000000000009AF end\n }", "public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {\n $row_array = $row->getSource();\n $migration_id = $row_array['migration_name'];\n $configuration = entity_load('migration', $migration_id);\n $configuration_array = $configuration->toArray();\n\n //creates an array with all element names from the configuration file. The foreach below allows it to find the elemenents that start out with the name\n $source_element = $configuration_array['process'][$destination_property]['source_element'];\n $source_array = array();\n $search_length = strlen($source_element);\n foreach ($row_array as $key => $value) {\n if (substr($key, 0, $search_length) == $source_element) {\n array_push($source_array, $value);\n }\n }\n $array_nid = array();\n foreach($source_array as $source){\n $source = str_replace(' ','%20',$source);\n $data = file_get_contents($source);\n $file = file_save_data($data, 'public://' . basename($source), FILE_EXISTS_REPLACE);\n if ($file) {\n $nodes = $file->id();\n array_push($array_nid,$nodes);\n }\n } \n return $array_nid;\n }", "private function transform() {\n $parts = explode('/', $this->route);\n\n if (end($parts) === '') {\n array_pop($parts);\n }\n\n $controller = ucfirst($parts[0]);\n $method = (isset($parts[1])) ? $parts[1] : $this->method;\n\n unset($parts[0]);\n unset($parts[1]);\n\n $this->getConfig(array('controller' => $controller, 'method' => $method, 'parameters' => $parts));\n }", "function autoriser_ieconfig_configurer_dist($faire, $type, $id, $qui, $opt) {\r\n\treturn autoriser('webmestre', $type, $id, $qui, $opt);\r\n}", "public function transform( $article, $options = [] )\n {\n $video = null;\n\n # listings article content varies dependent on the day it is being viewed.\n # For these a timestamp is provided which is used to determine what to show\n if(isset($options['eventDay'])) {\n $day = $options['eventDay'];\n }\n # if we don't have it then its just a normal article and we don't care about the day\n else {\n $day = null;\n }\n\n # ensure we always get the body and that we always ignore the platform. The platform (mobile, web) determines what is returned. Ignore that in this case\n $options = ['showBody' => true, 'ignorePlatform' => true, 'eventDay' => $day];\n\n $body = $article['body'];\n\n $articleLocation = $article['location'][0];\n $externalPath = makePath( [ $articleLocation['channelSefName'], $articleLocation['subChannelSefName'], $articleLocation['categorySefName'], $article['sef_name'] ] );\n\n # grab the author of the article and store it temporarily\n if(isset($article['author'][0])) {\n $author = $article['author'][0]['name']; \n }\n else {\n $author = null;\n }\n\n # gather up the articles category assignments\n $categoryAssignment = App::make('Apiv1\\Transformers\\CategoryLocationTransformer')->transformCollection($article['location']);\n \n # grab the article continued item and store it or it will be removed\n $bodyContinued = $article['body_continued'];\n\n # grab the article comment status - this is whether to allow the comment thread at the bottom of the article template\n $hasComments = $article['is_comments'] == null ? false : $article['is_comments'];\n\n # we might want to show the article on a map. This helps with that.\n $mapItems = [\n 'title' => $article['title'],\n 'lat' => $article['lat'],\n 'lon' => $article['lon'],\n ];\n\n # if this article has a gallery array then transform it\n if( isset($article['gallery']) ) {\n $gallery = App::make( 'Apiv1\\Transformers\\MediaTransformer' )->transformCollection($article);\n } \n\n # if there's a video grab it before its over-written\n if( isset($article['video'][0]) ) {\n $video = $article['video'][0];\n }\n\n # transform the article itself\n $article = ArticleTransformer::transform($article, $options);\n\n # if there is a video then transfer that too and add it into the article array\n if( ! is_null($video) )\n {\n $video = App::make( 'VideoTransformer' )->transform( $video ); \n\n // assign the video to the article\n $article['video'] = $video;\n } \n \n # insert the body into the article after the sub heading\n $article = insertInto($article, 'subHeading', $body, 'body');\n\n # insert the temp bodyContinued in to the article at the desired position\n $article = insertInto($article, 'body', $bodyContinued, 'bodyContinued');\n\n # insert the author object into the article at the desired position\n $article = insertInto($article, 'bodyContinued', $author, 'author');\n\n # insert a mapItems object into the article at the desired position\n $article = insertInto($article, 'author', $mapItems, 'mapItems'); \n\n # insert a mapItems object into the article at the desired position\n $article = insertInto($article, 'path', $externalPath, 'shareLink');\n\n # insert a list of categories against which this article has been assigned\n $article = insertInto($article, 'shareLink', $categoryAssignment, 'categoryAssignment');\n\n # insert the indicator as to whether to show the comment thread back into the article\n $article = insertInto($article, 'isPromoted', $hasComments, 'allowComments');\n\n # and finally add the gallery images array to the article\n $article['gallery'] = $gallery;\n\n # .... and send it back\n return $article;\n }", "public function mapSections() {\n\t\t$request = new FetchAdXmlRequest(self::ENG_URL);\n\t\t$this->enArray = $request->send()->getResponseArray();\n\t\tforeach($this->responseArray['section'] as $index => $section) {\n\t\t\t$enName = $this->validateElement($this->enArray['section'][$index]['name']);\n\t\t\t$enDescription = $this->validateElement($this->enArray['section'][$index]['description']);\n\t\t\t$estName = $this->validateElement($section['name']);\n\t\t\t$estDescription = $this->validateElement($section['description']);\n\n\t\t\t$section['eventival_id'] = $this->validateElement($section['id']);\n\n\t\t\t$section['Translation'] = array('et' => array('name' => $estName,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'description' => $estDescription),\n\t\t\t\t\t\t\t\t\t\t 'en' => array('name' => $enName,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'description' => $enDescription)\n\t\t\t\t\t\t\t\t\t );\n\t\t\t$section['title'] = $estName;\n\t\t\tunset($section['id']);\n\t\t\tunset($section['name']);\n\t\t\tunset($section['description']);\n\n\t\t\t$id = $this->checkData($this->tableType, $section['eventival_id']);\n\t\t\tif (!$id) {\n\t\t\t\t$this->createData($this->tableType, $section);\n\t\t\t} else {\n\t\t\t\t$this->updateData($this->tableType, $section, $id);\n\t\t\t}\n\t\t}\n\t}", "private function normaliseHost() {\n if (isset($this->parts['host'])) {\n $asciiHost = trim(strtolower(\\Etechnika\\IdnaConvert\\IdnaConvert::encodeString($this->parts['host']->get()))); \n $this->parts['host']->set($asciiHost);\n }\n }", "function prepare_attributes($index_section)\n{\n // next code need because xmlpipe_attr_uint can't simple maped as other attrebutes\n // $attr_map has type in output xml as key and name of attribute from config as value\n $attr_map = array(\n 'int' => 'xmlpipe_attr_uint',\n 'timestamp' => 'xmlpipe_attr_timestamp',\n 'bool' => 'xmlpipe_attr_bool',\n 'str2ordinal' => 'xmlpipe_attr_str2ordinal',\n 'float' => 'xmlpipe_attr_float',\n );\n $xml_doc_attr_list = array();\n foreach ($attr_map as $attr_type => $key_in_config)\n {\n if (isset($index_section[$key_in_config]))\n {\n $xml_doc_attr_list = array_merge($xml_doc_attr_list, get_attrs($attr_type, $index_section[$key_in_config]));\n }\n }\n return $xml_doc_attr_list;\n}", "function convertizer_install() {\nadd_option(\"convertizer_data\", 'Default', '', 'yes');\n}", "public function distribution_get( $id ) {\n\t\t$response = $this->request( 'GET', '/2014-11-06/distribution/' . $id );\n\t\t$data = $response['body_array'];\n\n\t\tif ( isset( $data['DistributionConfig'] ) )\n\t\t\t$data['DistributionConfig'] = $this->fix_distribution(\n\t\t\t\t$data['DistributionConfig'] );\n\n\t\treturn $data;\n\t}", "function _putIntNumber(&$pdf, $x, $y, $data, $distance, $align, $margin1) {\n\t\t$data = strval($data);\n $step = 0;\n for ($i = strlen($data) - 1; $i >= 0; $i--) {\n $element = mb_substr($data, $i, 1, 'utf-8');\n if ($element == '-') {\n $element = '△';\n $pdf->SetXY($x - $step + $margin1, $y);\n } else {\n $pdf->SetXY($x - $step, $y);\n }\n $pdf->MultiCell(10, 5, $element, 0, $align);\n $step += $distance;\n }\n }", "protected function setDensities()\n\t{\n\t\t$size = $this->imagine->open($this->imagePath)->getSize();\n $width = $size->getWidth();\t\t\n $height = $size->getHeight();\t\t\n $ratio = $width/$height;\n \n\t if ($this->referenceWidth == self::REFERENCE_WIDTH_UNDEFINED && self::REFERENCE_HEIGHT_UNDEFINED == $this->referenceHeight) {\n\t\t\t$this->referenceWidth = $width;\t\t\t\n\t\t\t$this->referenceHeight = $height;\n\t\t} elseif (self::REFERENCE_WIDTH_UNDEFINED == $this->referenceWidth) {\n\t\t $this->referenceWidth = $this->referenceHeight*$ratio;\n\t\t} elseif (self::REFERENCE_HEIGHT_UNDEFINED == $this->referenceHeight) {\n\t\t $this->referenceHeight = $this->referenceWidth/$ratio;\n }\t\t\n\t\t\n\t\tif (self::BITMAP_TYPE_REGULAR == $this->bitmapType) {\t\t\n\t\t $this->densities[self::DENSITY_MDPI] = array($this->referenceWidth/3, $this->referenceHeight/3);\n\t\t $this->densities[self::DENSITY_HDPI] = array($this->referenceWidth/2, $this->referenceHeight/2);\n\t\t $this->densities[self::DENSITY_XHDPI] = array($this->referenceWidth*2/3, $this->referenceHeight*2/3);\n\t\t $this->densities[self::DENSITY_XXHDPI] = array($this->referenceWidth, $this->referenceHeight);\n\t\t} else {\n\t\t $this->densities[self::DENSITY_MDPI] = array($this->referenceWidth/4, $this->referenceHeight/4);\n\t\t $this->densities[self::DENSITY_HDPI] = array($this->referenceWidth*3/8, $this->referenceHeight*3/8);\n\t\t $this->densities[self::DENSITY_XHDPI] = array($this->referenceWidth/2, $this->referenceHeight/2);\n\t\t $this->densities[self::DENSITY_XXHDPI] = array($this->referenceWidth*3/4, $this->referenceHeight*3/4);\n\t\t $this->densities[self::DENSITY_XXXHDPI] = array($this->referenceWidth, $this->referenceHeight);\n\t\t}\n\t}", "private function splice_site_distance() {\n $this->record_progress(\n \"Step 5: Computing splice site distances\");\n\n $path_new_input = $this->path_new_input;\n $path_intronic = ($this->working_directory_path).\"/intronic\";\n $path_intronic_borders = \n ($this->working_directory_path).\"/intronic_borders\";\n $path_ss_dist = $this->path_ss_dist;\n\n $read_new_input = fopen($path_new_input, \"r\");\n $write_intronic = fopen($path_intronic, \"w\");\n\n while (! feof($read_new_input)) {\n $line_new_input = fgets($read_new_input);\n $line_new_input = str_replace(\"\\n\", \"\", $line_new_input);\n $line_array = explode(\"\\t\", $line_new_input);\n $distance = 0;\n $splice_site = \"_\";\n if (count($line_array) > 24) {\n $chromosome = $line_array[0];\n $mutant_loc = intval($line_array[5]);\n $start_loc = intval($line_array[9]);\n $end_loc = intval($line_array[10]);\n $strand = $line_array[14];\n $variant_type = $line_array[23];\n $left_dist = $mutant_loc - $start_loc + 1;\n $right_dist = $end_loc - $start_loc + 1;\n if ($variant_type == \"intronic_variant\") {\n // For intronic variants, records positions to a file to\n // be processed to find the corresponding exons.\n $left_exon_end_loc = $start_loc - 1;\n $right_exon_start_loc = $end_loc + 1;\n $left_line = $chromosome.\"\\t\".($left_exon_end_loc - 1).\n \"\\t\".$left_exon_end_loc.\"\\t\".$mutant_loc.\"\\n\";\n fwrite($write_intronic, $left_line);\n $right_line = $chromosome.\"\\t\".$right_exon_start_loc.\n \"\\t\".($right_exon_start_loc + 1).\"\\t\".$mutant_loc.\"\\n\";\n fwrite($write_intronic, $right_line);\n\n }\n }\n }\n\n fclose($read_new_input);\n fclose($write_intronic);\n\n exec(\"bedtools intersect -wao\\\n -a '$path_intronic'\\\n -b /var/www/html/spliceman_beta/genome_data/reformatted_coding_exons.txt\\\n > '$path_intronic_borders'\",\n $bedtools_array,\n $return);\n \n if ($return) {\n if (count($bedtools_array) - 1 == 0) {\n $this->pipeline_error(\n \"Your file did not have any mutations that we were able \n to process. Is your file correctly formatted with one \n line per mutation?\");\n }\n $this->pipeline_error(\n \"Error in pipeline, please contact administrator and provide \n step 5\");\n }\n\n $read_new_input = fopen($path_new_input, \"r\");\n $read_intronic_borders = fopen($path_intronic_borders, \"r\");\n $write_ss_dist = fopen($path_ss_dist, \"w\");\n\n if (feof($read_intronic_borders)) {\n $line_intronic_borders = \"\";\n } else {\n $line_intronic_borders = fgets($read_intronic_borders);\n }\n\n while (! feof($read_new_input)) {\n $line_new_input = fgets($read_new_input);\n $line_new_input = str_replace(\"\\n\", \"\", $line_new_input);\n $array_new_input = explode(\"\\t\", $line_new_input);\n if (count($array_new_input) > 24) {\n $chromosome = $array_new_input[0];\n $mutant_loc = intval($array_new_input[5]);\n $start_loc = intval($array_new_input[9]);\n $end_loc = intval($array_new_input[10]);\n $strand = $array_new_input[14];\n $variant_type = $array_new_input[23];\n $left_dist = $mutant_loc - $start_loc + 1;\n $right_dist = $end_loc - $start_loc + 1;\n if ($variant_type == \"exonic_variant\") {\n // For exonic variants, calculates the distance and writes\n // it to an intermediate file.\n if ($left_dist <= $right_dist) {\n $distance = $left_dist;\n $splice_site = ($strand == \"+\" ? \"5'\" : \"3'\");\n } else {\n $distance = $right_dist;\n $splice_site = ($strand == \"+\" ? \"3'\" : \"5'\");\n }\n } else {\n // If an intron, iterates through the border data to find\n // an exon that borders it. Then, computes the distance\n // between\n $found = false;\n while ((! $found) and (! feof($read_intronic_borders))) {\n $array_intronic_borders = \n explode(\"\\t\", $line_intronic_borders);\n if ($start_loc - 1 == $array_intronic_borders[2]) {\n $distance = $left_dist;\n $splice_site = ($strand == \"+\" ? \"5'\" : \"3'\");\n $found = true;\n } elseif ($end_loc + 1 == $array_intronic_borders[1]) {\n $distance = $right_dist;\n $splice_site = ($strand == \"+\" ? \"3'\" : \"5'\");\n $found = false;\n } else {\n if (feof($read_intronic_borders)) {\n $line_intronic_borders = \"\";\n } else {\n $line_intronic_borders = fgets($read_intronic_borders);\n }\n }\n }\n }\n array_push($array_new_input, $distance);\n array_push($array_new_input, $splice_site);\n $new_line = implode(\"\\t\", $array_new_input).\"\\n\";\n fwrite($write_ss_dist, $new_line);\n }\n }\n fclose($read_new_input);\n fclose($read_intronic_borders);\n fclose($write_ss_dist);\n }", "public function init()\n {\n parent::init();\n\n $this->publishOptions['beforeCopy'] = function ($from, $to) {\n return preg_match('%(/|\\\\\\\\)dist%', $from);\n };\n }", "function to($dscNum);", "protected function normalize() {}", "public function educacion_distancia(){\n\t\treturn $this->hasOne('App\\EducacionDistancia', 'EDi_ID_Asp');\n\t}", "private function changelog_format_section_diff ($k, $v) {\n\t\t//get old and new device\n\t\tif($this->object_old[$k] != \"NULL\") {\n\t\t\t$section = $this->Sections->fetch_section (\"id\", $this->object_old[$k]);\n\t\t\t$this->object_old[$k] = $section->name;\n\t\t}\n\t\tif($v != \"NULL\")\t{\n\t\t\t$section = $this->Sections->fetch_section (\"id\", $v);\n\t\t\t$v = $section->name;\n\t\t}\n\t\t//result\n\t\treturn $v;\n\t}", "function sGetDistrHtmlDescription ($aArgDistributore) {\n\t\n\textract ($aArgDistributore);\n\t$dst_note = htmlentities($dst_note);\n\t$dst_allevatore = htmlentities($dst_allevatore);\n\t$aDistrDescription = array();\n\tif ($dst_foto) $aDistrDescription[] = '<img class=\"distr_pic\" src=\"'.URL_ROOT.'images/aziende/distributori/'.$dst_foto.'\">';\n\tif ($dst_note) $aDistrDescription[] = '<p>Note: '.$dst_note.'</p>';\n\tif ($dst_logo) $aDistrDescription[] = '<img class=\"az_logo\" src=\"'.URL_ROOT.'images/aziende/loghi/'.$dst_logo.'\">';\n\tif ($dst_allevatore) $aDistrDescription[] = '<p>Allevatore: '.$dst_allevatore.'</p>';\n\tif ($dst_telefono) $aDistrDescription[] = '<p>Telefono: '.$dst_telefono.'</p>';\n\tif ($dst_cellulare) $aDistrDescription[] = '<p>Cellulare: '.$dst_cellulare.'</p>';\n\tif ($dst_email) $aDistrDescription[] = '<p>Email: <a href=\"mailto:'.$dst_email.'?subject=Contatto da www.milkmaps.com\">'.$dst_email.'</a></p>';\n\tif ($dst_sito) $aDistrDescription[] = '<p>Sito internet: <a href=\"http://'.str_replace('http://','',$dst_sito).'?referer=www.milkmaps.com\" target=\"_blank\">'.$dst_sito.'</a></p>';\n\t$sDistrDescription = (count($aDistrDescription)) ? implode(\"\\n\",$aDistrDescription) : '<p>Nessuna informazione aggiuntiva.</p>';\n\t$sCommands = '<p>'.\n\t\t'<a href=\"#\" onclick=\"myZoomTo('.$dst_id.'); myShowZoomLink('.$dst_id.', \\'out\\'); return false;\" style=\"margin-right:0.5em;\" id=\"in'.$dst_id.'\">Ingrandisci qui &raquo;</a>'.\n\t\t'<a href=\"#\" onclick=\"myAutoZoom(aDistributori); myShowZoomLink('.$dst_id.', \\'in\\'); return false;\" style=\"margin-right:0.5em; display:none;\" id=\"out'.$dst_id.'\">&laquo; Visualizza tutti</a>'.\n\t\t'<a href=\"#\" onclick=\"getDirections('.$dst_id.'); return false;\" style=\"margin-right:0.5em;\">Indicazioni stradali</a>' .\n\t\t'</p>';\n\treturn $sDistrDescription . $sCommands;\n}", "function formulaires_editer_encart_traiter_dist($id_encart='new', $retour='', $lier_trad=0, $config_fonc='', $row=array(), $hidden=''){\n\treturn formulaires_editer_objet_traiter('encart',$id_encart,'',$lier_trad,$retour,$config_fonc,$row,$hidden);\n}", "function autoriser_forum_autoassocierdocument_dist($faire, $type, $id, $qui, $opts) {\n\treturn false;\n}", "abstract public function prepareDistro();", "private function convertContent(){\n $newContent = array();\n foreach ($this->content as $key => $value) {\n if (is_scalar($value)) {\n $newContent[$key] = $this->format($value);\n }\n }\n return $newContent;\n }", "private function convertFiles(){\n\n\t\t//Create folder in tmp for files\n\t\tmkdir('./tmp/course_files');\n\t\t$sectionCounter = 0;\n\t\n\t\t//Add section to manifest\n\t\tHelper::addIMSSection($this->manifest, $this->currentSectionCounter, $this->identifierCounter, 'Documents');\n\n\t\t$section = $this->manifest->organizations->organization->item->item[$this->currentSectionCounter];\n\t\t\n\t\t//Find all folders and documents\n\t\t$query = \"SELECT document.`path`,document.`filename`,document.`format`,document.`title` FROM document WHERE document.`course_id`=\".$this->course_id.\" ORDER BY path;\";\n\t\t$result = mysqli_query($this->link,$query);\n\t\t\n\t\twhile($data = $result->fetch_assoc())\n\t\t{\n\t\t\t//Find item level\n\t\t\t$level = substr_count($data['path'], '/') - 1;\n\n\t\t\t//If it is a file\n\t\t\tif($data['format']!='.dir')\n\t\t\t{\n\t\t\t\t$s_filename = Helper::sanitizeFilename($data['filename']);\n\t file_put_contents('./tmp/course_files/'.$s_filename, fopen($this->host.'/courses/'.$this->course['code'].'/document'.$data['path'], 'r'));\n\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'file', $data, $level); \n\t\t\t}\n\t\t\t//If it is a directory\n\t\t\telse if($data['format']=='.dir')\n\t\t\t{\n\t\t\t\tHelper::addIMSLabel($section, $sectionCounter, $this->identifierCounter, $data['filename'], $level);\n\t\t\t}\n\t\t}\n\n\t\t//Proceed to next section\n\t\t$this->currentSectionCounter++;\n\t}", "function formulaires_editer_feuillederoute_traiter_dist() {\n\t$contenu = _request('texte');\n\tecrire_fichier_securise(_DIR_IMG . 'feuillederoute.php', serialize($contenu));\n\treturn array('message_ok' => _T('feuillederoute:message_ok'));\n}", "public function transform($location, array $options = []);", "function getDistance() {\n\t\treturn $this->dist2loc;\n\t}", "private function DMStoDEC($_deg, $_min, $_sec, $_ref)\n {\n\n $_array = explode('/', $_deg);\n $_deg = $_array[0] / $_array[1];\n $_array = explode('/', $_min);\n $_min = $_array[0] / $_array[1];\n $_array = explode('/', $_sec);\n $_sec = $_array[0] / $_array[1];\n\n $_coordinate = $_deg + ((($_min * 60) + ($_sec)) / 3600);\n /**\n * + + = North/East\n * + - = North/West\n * - - = South/West\n * - + = South/East\n */\n if ('s' === strtolower($_ref) || 'w' === strtolower($_ref)) {\n // Negatify the coordinate\n $_coordinate = 0 - $_coordinate;\n }\n\n return $_coordinate;\n }", "public function getDistanceUnitFormated() {\n\t\treturn Tx_EcDonationrun_ViewHelpers_DistanceFormatViewHelper::render($this->distanceUnit);\n\t}", "function privExtractFileInOutput(&$p_entry, &$p_options)\n {\n }", "private static function __parseCloudFrontDistributionConfig(&$node)\n\t{\n\t\t// TODO: Implement __parseCloudFrontDistributionConfig() method.\n\t}", "private static function _addArticleToIndex($docFile, array $info, $isIndexPage=FALSE)\n {\n $parts = explode('-', $docFile);\n\n // Index 1 is the system name.\n $system = $parts[1];\n if (isset(self::$_docsInfo[$system]) === FALSE) {\n // Initialise docs info array.\n self::$_docsInfo[$system] = array(\n 'glossary' => array(),\n 'article' => array(),\n 'template' => array(),\n 'summary' => '',\n 'screenTitle' => '',\n 'showInMenu' => TRUE,\n );\n }\n\n // Id of the glossary term is the title so that it can be sorted later on.\n $id = $info['title'];\n\n // If the parts count is 4 than there is a template name at index 2.\n if (count($parts) === 4) {\n $template = $parts[2];\n if (isset(self::$_docsInfo[$system]['template'][$template]) === FALSE) {\n self::$_docsInfo[$system]['template'][$template] = array(\n 'glossary' => array(),\n 'article' => array(),\n 'summary' => '',\n 'screenTitle' => '',\n );\n }\n\n foreach ($info['showIn'] as $showin) {\n if (isset(self::$_docsInfo[$system]['template'][$template]['article'][$showin]) === FALSE) {\n self::$_docsInfo[$system]['template'][$template]['article'][$showin] = array();\n }\n\n self::$_docsInfo[$system]['template'][$template]['article'][$showin][$id] = $info;\n }\n\n if ($isIndexPage === TRUE && empty($info['summary']) === FALSE) {\n self::$_docsInfo[$system]['template'][$template]['summary'] = $info['summary'];\n }\n\n if ($isIndexPage === TRUE && empty($info['screenTitle']) === FALSE) {\n self::$_docsInfo[$system]['template'][$template]['screenTitle'] = $info['screenTitle'];\n }\n } else {\n if ($isIndexPage === TRUE && empty($info['screenTitle']) === FALSE) {\n self::$_docsInfo[$system]['screenTitle'] = $info['screenTitle'];\n }\n\n if ($isIndexPage === TRUE && empty($info['summary']) === FALSE) {\n self::$_docsInfo[$system]['summary'] = $info['summary'];\n }\n\n if ($isIndexPage === TRUE && $info['showInMenu'] === FALSE) {\n self::$_docsInfo[$system]['showInMenu'] = FALSE;\n }\n\n // Base system.\n foreach ($info['showIn'] as $showin) {\n if (isset(self::$_docsInfo[$system]['article'][$showin]) === FALSE) {\n self::$_docsInfo[$system]['article'][$showin] = array();\n }\n\n self::$_docsInfo[$system]['article'][$showin][$id] = $info;\n }\n }//end if\n\n }", "function update_swiftype_document_url( $document, $post ) {\r\n $document['fields'][] = array( 'name' => 'emc_content_format',\r\n 'type' => 'enum',\r\n 'value' => wp_get_post_terms( $post->ID , 'emc_content_format', array('fields' => 'names')));\r\n $document['fields'][] = array( 'name' => 'emc_grade_level',\r\n 'type' => 'enum',\r\n 'value' => wp_get_post_terms( $post->ID , 'emc_grade_level', array('fields' => 'names')));\r\n $document['fields'][] = array( 'name' => 'emc_tax_found',\r\n 'type' => 'enum',\r\n 'value' => wp_get_post_terms( $post->ID , 'emc_tax_found', array('fields' => 'names')));\r\n $document['fields'][] = array( 'name' => 'emc_tax_common_core',\r\n 'type' => 'enum',\r\n 'value' => wp_get_post_terms( $post->ID , 'emc_tax_common_core', array('fields' => 'names')));\r\n return $document;\r\n}", "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 be_dps_template_part( $output, $original_atts ) {\n\t// Return early if our \"layout\" attribute is not specified\n\tif( empty( $original_atts['layout'] ) )\n\t\treturn $output;\n\tob_start();\n\tget_template_part( 'partials/dps', $original_atts['layout'] );\n\t$new_output = ob_get_clean();\n\tif( !empty( $new_output ) )\n\t\t$output = $new_output;\n\treturn $output;\n}", "function desguioner($cdn){\n\t\t$cdn = trim($cdn);\n\t\t$cdn = str_replace(\"_\",\" \",$cdn);\n\t\treturn $cdn;\n\t}", "public function slice_and_dice(){\n\n // Are we inside a section?\n $in_section = false;\n\n // The current Section name\n $section_name = '';\n\n // Output, as Layout file modified\n $output = '';\n\n // The canonical name of the Layout\n $layout_canonical_name = (string) new \\file_basename_for($this->layout_name);\n\n // The full path filename for the layout\n $filename = (string)new Theme_Root(getcwd(), $this->theme_name) . \"/$this->layout_name\";\n\n // Get model for saving sections in DB\n $page_model = (new Model('website_page'))\n\n ->find(\"name='$layout_canonical_name'\");\n\n // Have we substituted the sections for the directive yet?\n $is_replaced = false;\n\n // if we can open the file for reading...\n if ( ( $handle = fopen($filename,'r'))){\n\n while ( ($line = fgets($handle))!== false ){\n\n // Report for first file\n if ( self::$is_first_file && $this->verbose ) echo \"\\tLine: $line\";\n\n if ( preg_match('/<section/',$line,$hits)){\n\n if ( $this->verbose ) echo \"\\tFound an HTML <section> on line $line in Layout $layout_canonical_name\\r\\n\";\n\n\n $section_name = (string) new Section_Name($line,$layout_canonical_name);\n\n // Initialize content\n $this->sections[$section_name] = '';\n\n $in_section = true;\n\n if ( ! $is_replaced){\n\n $output .= file_get_contents(new Code_Alchemy_Root_Path().\"/templates/fragments/foreach-model-template.php\").\"\\r\\n\";\n\n $is_replaced = true;\n }\n }\n\n if ( $in_section )\n\n $this->sections[$section_name] .= $line;\n\n else\n\n $output .= $line;\n\n if ( preg_match('<\\/section>',$line) )\n\n $in_section = false;\n\n }\n\n // No longer the first file\n self::$is_first_file = false;\n\n\n if ( $output )\n\n file_put_contents($filename,$output);\n\n\n fclose($handle);\n\n // Write sections to database\n foreach ( $this->sections as $name => $section_data ) {\n\n // If DB Model for Page was found...\n if ( $page_model->exists){\n\n $section_model = (new Model('page_section'));\n\n if ( ! $section_model\n\n ->create_from(array(\n\n 'website_page_id' => $page_model->id,\n\n 'name' => $name,\n\n 'handlebars_template' => (string)\n\n new String_Values_Replacer($section_data,array(\n\n '/<\\?\\=\\$theme_root\\?\\>/' => '{{theme_root}}'\n ))\n\n )))\n\n echo \"\\t\".$section_model->error();\n\n else\n\n {\n\n if ( $this->verbose ) echo \"\\t$name: Section successfully extracted and added to database\\r\\n\";\n }\n\n\n\n }\n\n\n }\n\n\n }\n\n if ( $this->verbose ) echo \"\\t\". get_called_class().\" Sliced out \".count( $this->sections).\" from Layout $layout_canonical_name\\r\\n\";\n\n }", "private function title_to_id() {\n\t\t$this->section_data['general_title_to_id'] = array(\n\t\t\t'name' \t\t\t\t\t=> 'general_title_to_id',\n\t\t\t'label' \t\t\t\t=> __( 'Convert Heading Into ID', 'fixedtoc' ),\n\t\t\t'default' \t\t\t=> '',\n\t\t\t'type' \t\t\t\t\t=> 'checkbox',\n\t\t\t'des'\t\t\t\t\t\t=> __( 'Automatically convert The heading to HTML id attribute. <b>Only supports English language headings.</b><br>For example: &quot;Download Source File&quot; to &quot;download-source-file&quot; or &quot;ftoc-download-source-file&quot; if set the &quot;ftoc&quot; prefix below.', 'fixedtoc' )\n\t\t);\n\t}", "function formulaires_publication_ouverte_agenda_traiter_dist()\n{\n\t$message = array();\n\t$values = array();\n\t$values['etape'] \t\t= _request('etape');\t\t\t// etape actuelle\n\t$values['id_article']\t \t= _request('id_article');\t\t// id de l'article temporaire\n\t$values['type']\t\t\t= _request('type');\t\t\t// article ou evenement ?\n\t$values['id_rubrique'] \t\t= _request('id_rubrique');\t\t// rubrique de la contrib\n\t\n\t$values['jour_evenement'] \t= _request('jour_evenement'); \t\t// jour de l'événement\n\t$values['mois_evenement'] \t= _request('mois_evenement'); \t\t// mois de l'événement\n\t$values['annee_evenement'] \t= _request('annee_evenement'); \t\t// annee de l'événement\n\t$values['heure_evenement'] \t= _request('heure_evenement');\t \t// heure de l'événement\n\t$values['date_evenement'] = _request('date_evenement');\n\t$values['lieu_evenement']\t= _request('lieu_evenement');\t\t// lieu de l'evenement\n\t$values['ville_evenement']\t= _request('ville_evenement');\t\t// ville du lieu\n\t$values['adresse_evenement']\t= _request('adresse_evenement');\t// adresse du lieu\n\t$values['tel_evenement']\t= _request('tel_evenement');\t\t// tel du lieu\n\t$values['web_evenement']\t= _request('web_evenement');\t\t// siteweb du lieu\n\t$values['email_evenement']\t= _request('email_evenement');\t\t// email du lieu\n\t$values['lieu_evenement_existe']= _request('lieu_evenement_existe');\t// id du lieu de l'evenement\n\t\n\t$values['titre'] \t\t= _request('titre');\t\t\t// titre de la contrib\n\t$values['texte'] \t\t= _request('texte');\t\t\t// texte de la contrib\n\t$values['pseudo'] \t\t= _request('pseudo');\t\t\t// pseudo ou nom de l'auteur\n\t$values['email'] \t\t= _request('email');\t\t\t// email de l'auteur\n\t$values['mots'] \t\t= _request('mots');\t\t\t// les mots-clés\n\t$values['mise_en_edito'] = _request('mise_en_edito');\n\t$values['edito_complet'] = _request('edito_complet');\n\t// focus\n\t$values['mot_focus'] = _request('mot_focus');\n\t$values['date'] = _request('date');\n\n\t$values = indymedia_traiter_article($values);\n\n\t/*\n\t * Statut : si pré-visualisation, alors l'article est \"en redaction\" (prepa)\n\t *\tsi publication alors l'article est \"proposé\" (prop) ou publié\n\t */\n\t$values['statut'] = indymedia_statut_article($values['id_article']);\t\n\t/*\n\t * tester si nouvel article a publier\n\t */\t\n\tif (($values['statut']==\"prepa\") && _request('publier'))\n\t{\t\t\t\n\t\t/* tester si rubrique en attente activée */\n\t\t$en_attente_defaut = lire_config('indymedia/en_attente_defaut');\n\t\t$en_attente_actif = lire_config('indymedia/en_attente_actif');\n\t\tif ($en_attente_defaut == 'en_attente_defaut' && $en_attente_actif == 'en_attente_actif' ){\n\t\t\t// si rubrique en attente activée\n\t\t\t$values['statut'] = \"prop\";\n\t\t}\n\t\telse{\n\t\t\t// sinon publication directe\n\t\t\t$values['statut'] = \"publie\";\n\t\t}\n\t}\n\n\tsql_updateq(\n\t\t'spip_articles',\n\t\tarray(\n\t\t\t'titre' => $values['titre'],\n\t\t\t'id_rubrique' => $values['id_rubrique'],\n\t\t\t'texte' => $values['texte'],\n\t\t\t'statut' => $values['statut'],\n\t\t\t'lang' => $values['langue'],\n\t\t\t'id_secteur' => $values['id_secteur'],\n\t\t\t'date' => $values['date'],\n\t\t\t'date_debut_indy' => $values['date_debut_indy'],\n\t\t\t'date_modif' => $values['date_modif'],\n\t\t\t'extra' => $values['extra']\n\t\t),\n\t\tarray(\n\t\t\t'id_article = '.$values['id_article']\n\t\t)\n\t);\n\n\tif (_request('publier'))\n\t{\n\t\tindymedia_ajout_mots($values['id_article'],$values['mots']);\n\t\tindymedia_traiter_valeurs_edito($values);\n\n\t\tif ($values['id_lieu'])\tindymedia_ajout_lieu_lien($values['id_article'],$values['id_lieu']);\n\t\telse if ($values['lieu_evenement']) indymedia_ajout_nouveau_lieu($values['id_article'],$values);\n\n\t\t/* Nettoyage d'articles non termines */\n\t\tindymedia_nettoyage();\t\t\t\n\t\t/* Notif admin\t */\n\t\tindymedia_notifier($values);\n\t\t\n\t\tif (lire_config('indymedia/en_attente_defaut') == 'en_attente_defaut' && lire_config('indymedia/en_attente_actif') == 'en_attente_actif' ){\n\t\t\t$message['redirect'] = generer_url_public(\"attente\",\"message_publication=ok\");\n\t\t}\n\t\telse{\n\t\t\t$message['redirect'] = generer_url_public(\"article\",\"id_article=\".$values['id_article'].\"&message_publication=ok&var_mode=recalcul\");\n\t\t}\n\t}\n\n\treturn $message;\n}", "public function f_get_distName($dist_cd)\n {\n\n $sql = $this->db->query(\"SELECT district_name FROM md_district WHERE district_code = $dist_cd \");\n return $sql->row();\n\n }", "public function afterConvert(\\Magento\\ImportExport\\Model\\Import\\Config\\Converter $subject, $result)\n {\n if (isset($result['entities']['catalog_product'])) {\n $productModel = 'Retailinsights\\ImportExport\\Model\\Import\\Product';\n $result['entities']['catalog_product']['model'] = $productModel;\n }\n if (isset($result['entities']['catalog_product']['types']['downloadable'])) {\n $downloadableModel = 'Retailinsights\\ImportExport\\Model\\Import\\Product\\Type\\Downloadable';\n $result['entities']['catalog_product']['types']['downloadable']['model'] = $downloadableModel;\n }\n return $result;\n }", "public function verif_modificaciones_distrital($dist_id){\n $sql = 'select *\n from conf_modificaciones_distrital\n where dist_id='.$dist_id.' and g_id='.$this->gestion.'';\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "abstract protected function doActualConvert();", "function degree_to_compass_point($d){\r\n $dp = $d + 11.25;\r\n $dp = $dp % 360;\r\n $dp = floor($dp / 22.5) ;\r\n $points = array(\"N\",\"NNE\",\"NE\",\"ENE\",\"E\",\"ESE\",\"SE\",\"SSE\",\"S\",\"SSW\",\"SW\",\"WSW\",\"W\",\"WNW\",\"NW\",\"NNW\",\"N\");\r\n $dir = $points[$dp];\r\n return $dir;\r\n }", "public function testComAdobeGraniteDistributionCoreImplDistributionToReplicationEven()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.granite.distribution.core.impl.DistributionToReplicationEventTransformer';\n\n $crawler = $client->request('POST', $path);\n }", "private function parseOutput()\n {\n// $parsedOutput = explode(' ',$this->output);\n// $this->image = new Image($parsedOutput[0]);\n// $this->resolution = $parsedOutput[1];\n\n }", "public function f_get_agentDistributionDtls()\n {\n\n // $sql = $this->db->query(\" SELECT * FROM td_dm_distribution a, md_district b, md_dist_point c \n // WHERE a.dist_cd = b.district_code AND a.point_no = c.point_no \");\n\n \n /* $sql = $this->db->query(\" SELECT a.sl_no, a.dist_cd, a.order_no, b.district_name, a.sdo_memo, a.bdo_memo\n FROM td_dm_distribution a, md_district b\n WHERE a.dist_cd = b.district_code GROUP BY a.sl_no \");*/\n $sql = $this->db->query(\" SELECT a.sl_no, a.dist_cd, a.order_no, b.district_name, a.sdo_memo, a.bdo_memo\n FROM td_dm_distribution a, md_district b\n WHERE a.dist_cd = b.district_code order BY a.sl_no \");\n // print_r($sql);\n // die();\n return $sql->result();\n\n }", "public function unify()\n {\n return $this->convertTo(\n [\n 'length' => 'px',\n 'duration' => 's',\n 'angle' => 'rad',\n ]\n );\n }", "function formulaires_recommander_charger_dist(){\n\t$valeurs = array('destinataire'=>'','destinataires'=>'','texte'=>'');\n\n\treturn $valeurs;\n}", "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 get_post_format_slugs()\n {\n }", "public function f_get_distContact()\n {\n\n $sql = $this->db->query(\" SELECT * FROM md_dm_dist_contact a, md_district b WHERE a.dist_cd = b.district_code \");\n return $sql->result();\n\n }", "public function define_sections() {\r\n\t\t$this->options->sections = $this->to_array();\n\t}", "public function update( &$args ) {\n\n\t\t$section = $this->parse( $args );\n\n\t\tif ( empty( $section['section_id'] ) ) {\n\t\t\treturn $this->create( $args );\n\t\t}\n\n\t\t$section_id = $section['section_id'];\n\t\t$update_data = array(\n\t\t\t'section_name' => $section['section_name'],\n\t\t\t'section_course_id' => $section['section_course_id'],\n\t\t\t'section_order' => $section['section_order'],\n\t\t\t'section_description' => $section['section_description'],\n\t\t);\n\n\t\tglobal $wpdb;\n\n\t\t$wpdb->update(\n\t\t\t$wpdb->learnpress_sections,\n\t\t\t$update_data,\n\t\t\tarray( 'section_id' => $section_id )\n\t\t);\n\t\t$section['section_id'] = $section_id;\n\n\t\treturn $section;\n\t}", "public function distribution(){\n return $this->belongsTo('\\App\\Distribution');\n }", "private function separateData(array $section) {\n // retrieve references\n $references = $this->getReferencesFromIsolates($section['Isolates']);\n\n // loop through the references and retrieve the data by reference\n $section['SeparateIsolates'] = [];\n foreach ($references as $reference) {\n $section['SeparateIsolates'][$reference] = [\n 'Isolates' => $this->getIsolatesByReference($section['Isolates'], $reference),\n 'SubSections' => $this->getSubSectionsByReference($section['SubSections'], $reference),\n ];\n }\n\n return $section;\n }", "function filets_sep_installe_dist() {\n//cs_log('filets_sep_installe_dist()');\n\tinclude_spip('inc/texte');\n\t// Tester si on echappe en span ou en div\n\t$mode = preg_match(',<('._BALISES_BLOCS.'|p)(\\W|$),iS', _FILETS_SEP_BALISE_DEBUT)?'div':'span';\n\t$bt = defined('_DIR_PLUGIN_PORTE_PLUME');\n\t$filets = array();\n\t// filets numeriques\n\tfor($i=0; $i<=_FILETS_SEP_MAX_CSS; $i++) {\n\t\t$filets[6][] = $i;\n\t\t$filets[1][\"$i\"] = cs_code_echappement(_FILETS_SEP_BALISE_DEBUT.\" class='filet_sep filet_sep_$i'\"._FILETS_SEP_BALISE_FIN, '', $mode);\n\t}\n\t// filets image\t\n\t$path = find_in_path('img/filets');\n\t$dossier = opendir($path);\n\tif($path) while ($image = readdir($dossier)) {\n\t\tif (preg_match(',^(([a-z0-9_-]+)'._FILETS_REG_EXT.'),', $image, $reg)) {\n\t\t\t$filets[0][] = '__'.$reg[1].'__';\n\t\t\t$filets[6][] = preg_quote($reg[1]);\n\t\t\t$filets[2][] = $reg[2];\n\t\t\tlist(,$haut) = @getimagesize($path.'/'.$reg[1]);\n\t\t\tif ($haut) $haut=\"height:{$haut}px;\";\n\t\t\t$f = url_absolue($path).'/'.$reg[1];\n\t\t\t$filets[1][$reg[1]] = cs_code_echappement(_FILETS_SEP_BALISE_DEBUT.\" class=\\\"filet_sep filet_sep_image\\\" style=\\\"$haut background-image: url($f);\\\"\"._FILETS_SEP_BALISE_FIN, '', $mode);\n\t\t\tif($bt)\n\t\t\t\t$filets[4]['filet_'.str_replace('.','_',$reg[1])] = $reg[1];\n\t\t}\n\t}\n\t// RegExpr finale\n\t$filets[6] = _FILETS_REG_DEBUT . join('|', $filets[6]) . _FILETS_REG_FIN;\n\tif($bt) for($i=0; $i<=_FILETS_SEP_MAX_CSS; $i++)\n\t\t$filets[5]['filet_'.$i] = $i;\n\treturn array($filets);\n}", "function getDistance2pts($coord1, $coord2){\n\t$r = 6366;\n\n\t$coord1[0] = deg2rad($coord1[0]);\n\t$coord1[1] = deg2rad($coord1[1]);\n\t$coord2[0] = deg2rad($coord2[0]);\n\t$coord2[1] = deg2rad($coord2[1]);\n\t\n\t$ds= acos(sin($coord1[0])*sin($coord2[0])+cos($coord1[0])*cos($coord2[0])*cos($coord1[1]-$coord2[1]));\n\t\n\t$dpr = $ds * $r;\n\t\n\treturn $dpr * 0.54;\t// return une distance en nm\t\n}", "private function parseContentInOldFormat(){\n\t\t $contentArray = explode(FieldContentInAgenda::SPLIT_CHARACTER, $this->filedContent);\n\t\t if(EducationalUtil::isRoleTypeTheme($this->roleType, $this->roleNamesObj)){\n\t\t \t$this->formattedStr = $this->filedContent;\n\t\t } elseif(EducationalUtil::isRoleTypeCC($this->roleType, $this->roleNamesObj)){ \n\t\t\t$this->isMember = $this->isStartedWithMemberTag($contentArray[0]);\t\n\t\t\t$this->name = $contentArray[1];\n\t\t\t$this->memberLevel = $contentArray[2];\n\t\t\t\n\t\t\tif($this->isMember){\n\t\t\t\t$this->ccclLevel = $contentArray[3];\n\t\t\t\t$this->projectNo = $contentArray[4];\n\t\t\t} else {\n\t\t\t\t$this->clubName = $contentArray[3];\n\t\t\t\t$this->ccclLevel = $contentArray[4];\n\t\t\t\t$this->projectNo = $contentArray[5];\n\t\t\t}\n\t\t\t\n\t\t\t$this->formattedStr = $this->getFormattedPrintedStrForCCCL();\n\t\t\t\n\t\t } else {\n\t\t\t$this->isMember = $this->isStartedWithMemberTag($contentArray[0]);\n\t\t\t$this->name = $contentArray[1];\n\t\t\t$this->memberLevel = $contentArray[2];\n\t\t\t\n\t\t\tif(!$this->isMember){\n\t\t\t\t$this->clubName = $contentArray[3];\n\t\t\t}\n\t\t\t\n\t\t\t$this->formattedStr = $this->getFormattedPrintedStrForNOCCCL();\n\t\t }\n\t }", "protected function create_section_data() {\n\t\t$this->enable();\n\t\t$this->post_types();\n\t\t$this->headings();\n\t\t$this->min_headings_num();\n\t\t$this->exclude_keywords();\n\t\t$this->title_to_id();\n\t\t$this->id_prefix();\n\t\t$this->in_widget();\n\t\t$this->customize_css();\n\t\t$this->shotcut();\n\t\t$this->fixed_menu_selector();\n\t\t$this->scroll_offset();\n\t}", "abstract public function toDER();", "private function applyTransformation() {\n if($this->transform !== NULL) {\n $xsl = new DOMDocument();\n $xsl->load($this->transform);\n $xslt = new XSLTProcessor();\n $xslt->importStyleSheet($xsl);\n $document = $xslt->transformToDoc($this->document);\n if ($document) {\n $xpath = new DOMXPath($document);\n // Set the Label\n $results = $xpath->query(\"*[local-name()='title']\");\n $results->item(0)->nodeValue = $this->label;\n // Set the Pid\n $results = $xpath->query(\"*[local-name()='identifier']\");\n $results->item(0)->nodeValue = $this->pid;\n if (isset($document->documentElement)) {\n return $this->importNode($document->documentElement, TRUE);\n }\n }\n }\n return NULL;\n }", "function __mergeMetadata($metadatas, &$destination) {\r\n\t\tforeach($metadatas as $metadata) {\r\n\t\t\t$destination[$metadata['name']] = $metadata['value'];\r\n\t\t}\r\n\t}", "public function sectionSerialize()\n {\n $templatePrefix = $this->getTranslationTemplate();\n\n $properties = array_combine(\n array_map(function ($k) use ($templatePrefix) {\n return $templatePrefix . $k;\n },\n array_keys(get_object_vars($this))),\n get_object_vars($this)\n );\n return $properties;\n }", "public function addCidSingleMapping($src, $dst) {}", "public static function destinationPoint($lat, $lng, $brng, $dist) {\r\n \t//$meters = $dist/3.2808399; // dist in meters\r\n \t//$dist = $meters/1000; // dist in km\r\n \t$rad = 6371.2; // earths mean radius\r\n \t$dist = $dist/$rad; // convert dist to angular distance in radians\r\n \t$brng = deg2rad($brng); // conver to radians\r\n \t$lat1 = deg2rad($lat);\r\n \t$lon1 = deg2rad($lng);\r\n \r\n \t$lat2 = asin(sin($lat1)*cos($dist) + cos($lat1)*sin($dist)*cos($brng) );\r\n \t$lon2 = $lon1 + atan2(sin($brng)*sin($dist)*cos($lat1),cos($dist)-sin($lat1)*sin($lat2));\r\n \t$lon2 = fmod($lon2 + 3*M_PI, 2*M_PI) - M_PI;\r\n \t$lat2 = rad2deg($lat2);\r\n \t$lon2 = rad2deg($lon2);\r\n \r\n \treturn array(\"lat\"=>$lat2, \"lon\"=>$lon2);\r\n \t\r\n }", "public function transform ( Discover $discover )\n\t{\n\t\t$transform = [\n\t\t\t'id'\t\t => $discover->id,\n\t\t\t'name'\t\t => $discover->name,\n\t\t\t'latitude'\t => $discover->latitude,\n\t\t\t'longitude'\t => $discover->longitude,\n\t\t\t'radius'\t => $discover->radius,\n//\t\t\t'start_date' => is_null( $discover->start_date ) ? null : (string) $discover->start_date,\n//\t\t\t'end_date'\t => is_null( $discover->end_date ) ? null : (string) $discover->end_date,\n\t\t\t'running'\t => (bool) $discover->running,\n\t\t\t'created_at' => (string) $discover->created_at\n\t\t];\n\n\t\t$transform = $this->removeDisallowedItems($transform);\n\n\t\t// Add links on\n\t\t$transform[ 'links' ] = [\n\t\t\t[\n\t\t\t\t'rel'\t => 'self',\n\t\t\t\t'uri'\t => '/discovers/' . $discover->id\n\t\t\t],\n\t\t];\n\t\treturn $transform;\n\t}", "public function preferDist()\n {\n $this->prefer = '--prefer-dist';\n return $this;\n }", "public function preferDist()\n {\n $this->prefer = '--prefer-dist';\n return $this;\n }", "public function distributions_list() {\n\t\t$response = $this->request( 'GET', '/2014-11-06/distribution' );\n\t\t$data = $response['body_array'];\n\n\t\t$data = $this->fix_array( $data, array(\n\t\t\t\t'Items', 'DistributionSummary' ) );\n\n\t\tif ( isset( $data['Items']['DistributionSummary'] ) ) {\n\t\t\tforeach ( $data['Items']['DistributionSummary'] as $key => $value ) {\n\t\t\t\t$data['Items']['DistributionSummary'][$key] =\n\t\t\t\t\t$this->fix_distribution(\n\t\t\t\t\t$data['Items']['DistributionSummary'][$key] );\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "abstract public function convert_to_storage();", "function formulaires_editer_ad_service_traiter_dist($id_ad_service='new', $retour='', $associer_objet='', $lier_trad=0, $config_fonc='', $row=array(), $hidden=''){\n\t$res = formulaires_editer_objet_traiter('ad_service',$id_ad_service,'',$lier_trad,$retour,$config_fonc,$row,$hidden);\n \n\t// Un lien a prendre en compte ?\n\tif ($associer_objet AND $id_ad_service = $res['id_ad_service']) {\n\t\tlist($objet, $id_objet) = explode('|', $associer_objet);\n\n\t\tif ($objet AND $id_objet AND autoriser('modifier', $objet, $id_objet)) {\n\t\t\tinclude_spip('action/editer_liens');\n\t\t\tobjet_associer(array('ad_service' => $id_ad_service), array($objet => $id_objet));\n\t\t\tif (isset($res['redirect'])) {\n\t\t\t\t$res['redirect'] = parametre_url ($res['redirect'], \"id_lien_ajoute\", $id_ad_service, '&');\n\t\t\t}\n\t\t}\n\t}\n\treturn $res;\n\n}", "public function normalize()\n {\n }" ]
[ "0.5322687", "0.49303102", "0.4646272", "0.45443472", "0.45050657", "0.42614084", "0.4225275", "0.41486177", "0.41206452", "0.41200885", "0.40926874", "0.4070459", "0.40665832", "0.40553093", "0.4005586", "0.39723906", "0.39657998", "0.39581984", "0.3935438", "0.39322284", "0.39297593", "0.39244103", "0.39192554", "0.3916036", "0.38914075", "0.38769194", "0.38753968", "0.38745946", "0.38522032", "0.38520038", "0.38492745", "0.38461486", "0.38409537", "0.38368216", "0.383209", "0.3824414", "0.38193733", "0.38170364", "0.3815681", "0.38064733", "0.38039944", "0.38038543", "0.38014394", "0.37999463", "0.37945196", "0.3789905", "0.37827492", "0.3777629", "0.3766201", "0.3766159", "0.37552807", "0.37548357", "0.37476146", "0.3745126", "0.37405425", "0.37351283", "0.3721001", "0.37185955", "0.37077466", "0.37073728", "0.37070727", "0.3704859", "0.3700498", "0.36974847", "0.36956185", "0.36930507", "0.36873114", "0.36868176", "0.36846069", "0.3682619", "0.3680471", "0.36804235", "0.367379", "0.36729005", "0.36724222", "0.3667346", "0.36619112", "0.3659429", "0.36569095", "0.36552206", "0.36466172", "0.36430305", "0.36379337", "0.36374116", "0.36351004", "0.36303183", "0.3624994", "0.36197877", "0.36194646", "0.36166835", "0.3612577", "0.36067832", "0.36067438", "0.3606675", "0.35997957", "0.35997957", "0.35972694", "0.35951024", "0.35872316", "0.3586856" ]
0.46300653
3
Convert the each entry of dist section.
private static function convertDistEntry(array &$value, $type, $url) { $httpPrefix = 'http://'; if (0 === strpos($url, $httpPrefix)) { $url = 'https://'.substr($url, \strlen($httpPrefix)); } if ('shasum' === $type) { $value[$type] = $url; } elseif ('tarball' === $type) { $value['type'] = 'tar'; $value['url'] = $url; } elseif (\in_array($type, self::getDownloaderTypes(), true)) { $value['type'] = $type; $value['url'] = $url; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function normalize_distribution_info()\r\n {\r\n $distribution_info=$this->get_key_value('distribution_info');\r\n \r\n $output=array();\r\n $columns=array_keys($this->xpath_map['distribution_info']['items']);\r\n \r\n //there could be multiple distribution info tags\r\n //combine all into one array\r\n foreach($distribution_info as $row)\r\n {\r\n foreach($row as $key=>$value)\r\n {\r\n foreach($value as $val){\r\n $output[$key][]=$val;\r\n }\r\n }\r\n }\r\n \r\n $distribution_info=$output;\r\n $output=array();\r\n \r\n //create associated array\r\n foreach($distribution_info as $key=>$value)\r\n {\r\n $k=0;\r\n foreach($value as $val)\r\n {\r\n $output[$k][$key]=$val;\r\n $k++;\r\n }\r\n \r\n }\r\n \r\n $this->xpath_map['distribution_info']['data']=$output; \r\n }", "private function transformEntry(Entry\\EntryInterface $entry)\n {\n return [\n 'id' => $entry->getID(),\n 'name' => $entry->getLabel(),\n 'icon' => (string) $entry->getIcon()\n ];\n }", "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 }", "public function export_entries()\n {\n }", "public static function convertDist($value)\n {\n if (\\is_array($value)) {\n $data = (array) $value;\n $value = array();\n\n foreach ($data as $type => $url) {\n if (\\is_string($url)) {\n self::convertDistEntry($value, $type, $url);\n }\n }\n }\n\n return $value;\n }", "private function convertContent(){\n $newContent = array();\n foreach ($this->content as $key => $value) {\n if (is_scalar($value)) {\n $newContent[$key] = $this->format($value);\n }\n }\n return $newContent;\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 entries();", "private function parseEntry(array &$entry, array $mappedRelationships): void\n {\n // Remove the data object, because we only needed it to perform a HAVING search on it\n unset($entry['data']);\n\n foreach ($entry as $key => &$value) {\n // Only properties inside the data object are in the types array, not the ID for example\n if (!isset($this->properties[$key])) {\n continue;\n }\n\n /** @var Collection\\Property $property */\n $property = $this->properties[$key];\n $type = $property->getType();\n\n // JSON encoding collection property types\n if ($property->isTranslatable() || in_array($type->getType(), self::JSON, true)) {\n $value = json_decode($value, true);\n }\n\n // Cast the values to the correct format\n $this->performTypeCasting($type, $value);\n }\n\n // Prevent any problems with looped $value variable\n unset($value);\n\n // Parse the dates as ISO strings\n foreach (self::DATES as $date) {\n $dateTime = $entry[$date] instanceof DateTime ? $entry[$date] : new DateTime($entry[$date]);\n\n $entry[$date] = $dateTime->format(DateTime::ATOM);\n }\n\n // Update the user id's to become user objects\n foreach (self::USER_PROPERTIES as $id) {\n // Create a key without _id suffix\n $key = str_replace('_id', '', $id);\n\n // Create the new property with user object\n $entry[$key] = $this->users[$entry[$id]] ?? null;\n\n // No need to perform more actions when the user is NULL\n if ($entry[$key] !== null) {\n // Parse the users' dates\n foreach (self::DATES as $date) {\n /** @var DateTime $dateTime */\n $dateTime = $entry[$key][$date];\n\n $entry[$key][$date] = $dateTime !== null ? $dateTime->format(DateTime::ATOM) : null;\n }\n }\n\n // Unset the old value\n unset($entry[$id]);\n }\n\n // Insert the relationships\n $this->mapRelationships($mappedRelationships, $entry);\n }", "function transformEntry($timeTrackerEntry);", "public static function export_entry($entry)\n {\n }", "public static function sanitize_entry_array(&$entry) {\n /* attributes whose values will be lower-cased: */\n $attrs = array('edupersonorgunitdn', 'edupersonprimaryorgunitdn',\n 'uoauserapps', 'edupersonorgdn', 'edupersonprimaryaffiliation',\n 'edupersonaffiliation', 'eduorgsuperioruri');\n\n for($i=0; $i<$entry['count']; $i++) {\n $entry[$i]['dn'] = strtolower($entry[$i]['dn']);\n foreach($attrs as $attr) {\n if(isset($entry[$i][$attr]['count']) && $entry[$i][$attr]['count'] > 0 ) {\n for($j=0; $j<$entry[$i][$attr]['count']; $j++) {\n $entry[$i][$attr][$j] = strtolower($entry[$i][$attr][$j]);\n }\n }\n }\n }\n }", "public function mapSections() {\n\t\t$request = new FetchAdXmlRequest(self::ENG_URL);\n\t\t$this->enArray = $request->send()->getResponseArray();\n\t\tforeach($this->responseArray['section'] as $index => $section) {\n\t\t\t$enName = $this->validateElement($this->enArray['section'][$index]['name']);\n\t\t\t$enDescription = $this->validateElement($this->enArray['section'][$index]['description']);\n\t\t\t$estName = $this->validateElement($section['name']);\n\t\t\t$estDescription = $this->validateElement($section['description']);\n\n\t\t\t$section['eventival_id'] = $this->validateElement($section['id']);\n\n\t\t\t$section['Translation'] = array('et' => array('name' => $estName,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'description' => $estDescription),\n\t\t\t\t\t\t\t\t\t\t 'en' => array('name' => $enName,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'description' => $enDescription)\n\t\t\t\t\t\t\t\t\t );\n\t\t\t$section['title'] = $estName;\n\t\t\tunset($section['id']);\n\t\t\tunset($section['name']);\n\t\t\tunset($section['description']);\n\n\t\t\t$id = $this->checkData($this->tableType, $section['eventival_id']);\n\t\t\tif (!$id) {\n\t\t\t\t$this->createData($this->tableType, $section);\n\t\t\t} else {\n\t\t\t\t$this->updateData($this->tableType, $section, $id);\n\t\t\t}\n\t\t}\n\t}", "public function toSitemapArray();", "public function exportNormalizationMap()\r\n\t{\r\n\t\t$query = 'SELECT keyword, ingredientID\r\n\t\t\tFROM normalizationMap';\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$normalizationMap = $this->_db->loadAssocList();\r\n\t\treturn $normalizationMap;\r\n\t}", "public function transform(TreeCollection $collection)\n {\n return array_map([$this, 'transformEntry'], $collection->getEntries());\n }", "abstract protected function report_to_array_mapping();", "protected function migrateEntryOrderToStructure()\n {\n $tree = collect($this->entryOrder)\n ->sortKeys()\n ->values()\n ->map(function ($id) {\n return ['entry' => $id];\n })\n ->all();\n\n return [\n 'max_depth' => 1,\n 'tree' => $tree,\n ];\n }", "public function getData(array $entry)\n {\n $entry['title'] = XenForo_Helper_String::censorString($entry['title']);\n\n return array(\n 'loc' => XenForo_Link::buildPublicLink('canonical:classifieds', $entry),\n 'lastmod' => $entry['last_update']\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}", "function blog_entry_to_array ( $entryFile ) {\n\t\t// Reads a blog entry and returns an key/value pair array.\n\t\t//\n\t\t// Returns false on fail...\n\t\tglobal $sb_info;\n\t\t$blog_entry_data = array();\n\t\t\n\t\t$str = sb_read_file( $entryFile );\n\t\t$exploded_array = explode( '|', $str );\n\t\t\n\t\tif ( count( $exploded_array ) > 1 ) {\n\t\t\tif ( count( $exploded_array ) <= 6 ) {\n\t\t\t\t// Old List Format: subject, date, content, (mood, song)\n\t\t\t\t$blog_entry_data[ 'SUBJECT' ]\t\t= $exploded_array[0];\n\t\t\t\t$blog_entry_data[ 'DATE' ]\t\t\t= $exploded_array[1];\n\t\t\t\t$blog_entry_data[ 'CONTENT' ]\t\t= $exploded_array[2];\n\t\t\t\t$blog_entry_data[ 'relatedlink' ]\t= $exploded_array[3];\n\t\t\t\t$blog_entry_data[ 'VERSION' ]\t\t= $sb_info[ 'version' ];\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// New Format: key/value pairs\n\t\t\t\t//\n\t\t\t\t// The \"keys/value\" pairs can be in any order. Also, the only ones\n\t\t\t\t// that are required are VERSION, SUBJECT, DATE, and CONTENT.\n\t\t\t\t//\n\t\t\t\t// All the other keys are optional. Eventually the CATEGORY tag\n\t\t\t\t// will parse into an array of it's own (probably comma delimited...)\n\t\t\t\t//\n\t\t\t\t// VERSION, SUBJECT, DATE, CONTENT, (MOOD, SONG, CATEGORY, etc...)\n\t\t\t\t// Total count will be 14 items...\n\n\t\t\t\t$blog_entry_data = explode_with_keys( $str );\n\t\t\t}\n\t\t\t\n\t\t\treturn( $blog_entry_data );\n\t\t} else {\n\t\t\treturn( false ); // error\n\t\t}\n\t}", "public function transformToSections()\n {\n if (empty($this->options)) {\n return $this->sections;\n }\n\n foreach (array_values($this->options) as $sectionArgs) {\n $section = Section::createFromArray($sectionArgs);\n $fields = array_get($sectionArgs, 'fields', []);\n if (is_array($fields) && count($fields) > 0) {\n $section->createFieldsFromArray($fields);\n }\n array_push($this->sections, $section);\n }\n }", "public function distributions_list() {\n\t\t$response = $this->request( 'GET', '/2014-11-06/distribution' );\n\t\t$data = $response['body_array'];\n\n\t\t$data = $this->fix_array( $data, array(\n\t\t\t\t'Items', 'DistributionSummary' ) );\n\n\t\tif ( isset( $data['Items']['DistributionSummary'] ) ) {\n\t\t\tforeach ( $data['Items']['DistributionSummary'] as $key => $value ) {\n\t\t\t\t$data['Items']['DistributionSummary'][$key] =\n\t\t\t\t\t$this->fix_distribution(\n\t\t\t\t\t$data['Items']['DistributionSummary'][$key] );\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "function as_struct()\n {\n $return = array();\n $entries = $this->entries();\n foreach ($entries as $entry) {\n $attrs = array();\n $entry_attributes = $entry->attributes();\n foreach ($entry_attributes as $attr_name) {\n $attr_values = $entry->getValue($attr_name, 'all');\n if (!is_array($attr_values)) {\n $attr_values = array($attr_values);\n }\n $attrs[$attr_name] = $attr_values;\n }\n $return[$entry->dn()] = $attrs;\n }\n return $return;\n }", "public function getDtdMapping();", "public function migrateDamCategoryMountsToSysCategoryPerms($table) {\n\t\t$this->headerMessage(LocalizationUtility::translate('migrateDamCategoryMountsToSysCategoryPerms', 'dam_falmigration', array($table)));\n\t\t/** @var \\TYPO3\\CMS\\Core\\DataHandling\\DataHandler $dataHandler */\n\t\t$dataHandler = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');\n\n\t\t/* assign imported categories to be_groups or be_users */\n\t\t$whereClause = 'tx_dam_mountpoints != \\'\\'' . BackendUtility::deleteClause($table);\n\t\t$beGroupsOrUsersWithTxDamMountpoints = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', $table, $whereClause);\n\t\t$data = array();\n\n\t\tforeach ($beGroupsOrUsersWithTxDamMountpoints as $beGroupOrUser) {\n\t\t\t$txDamMountpoints = GeneralUtility::trimExplode(',', $beGroupOrUser['tx_dam_mountpoints']);\n\t\t\t$sysCategoryPermissions = array();\n\t\t\tforeach ($txDamMountpoints as $txDamMountpoint) {\n\t\t\t\tif (GeneralUtility::isFirstPartOfStr($txDamMountpoint, 'txdamCat:')) {\n\t\t\t\t\t// we only migrate DAM category mounts\n\t\t\t\t\t$damCategoryMountpoint = GeneralUtility::trimExplode(':', $txDamMountpoint);\n\t\t\t\t\t$whereClause = '_migrateddamcatuid = ' . $damCategoryMountpoint[1];\n\t\t\t\t\t$sysCategory = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid', 'sys_category', $whereClause);\n\t\t\t\t\tif (!empty($sysCategory)) {\n\t\t\t\t\t\t$sysCategoryPermissions[] = $sysCategory['uid'];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (count($sysCategoryPermissions)) {\n\t\t\t\t$data[ $table ][ $beGroupOrUser['uid'] ] = array(\n\t\t\t\t\t'category_perms' => implode(',', $sysCategoryPermissions) . ',' . $beGroupOrUser['category_perms']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t$dataHandler->start($data, array());\n\t\t$dataHandler->admin = TRUE;\n\t\t$dataHandler->process_datamap();\n\t}", "function breakIntoDataStructure( $entry ){\n\tif(!is_string($entry)) return;\n\t$s = array();\n\t$key_value_pairs = explode(\"\\t\", $entry);\n\tforeach($key_value_pairs as $pair){\n\t\tlist($key, $value) = explode(\"#\", $pair);\n\t\t$s[trim($key)] = trim($value);\n\t}\n\tforeach($s as $k => $v){\n\t\tif(preg_match(\"/!_!/\", $v, $m)){\n\t\t\t$values = explode(\"!_!\", $v);\n\t\t\tforeach($values as &$value){\n\t\t\t\t$value = trim($value);\n\t\t\t}\n\t\t\t$s[trim($k)] = $values;\n\t\t}\n\t}\n\t/*\n\t// do lots of unnecessary logic in making $s['desc']\n\tif(isset($s['note']) || isset($s['function'])){\n\t\tif(isset($s['note']) && isset($s['function'])){\n\t\t\t$s['desc'] = $s['note'] . \"<br />\\n\" . $s['function'];\n\t\t} else {\n\t\t\tif(isset($s['note'])) $s['desc'] .= $s['note'];\n\t\t\tif(isset($s['function'])) $s['desc'] .= $s['function'];\n\t\t}\n\t} else {\n\t\t$s['desc'] = $s['product'];\n\t}\n\t*/\n\treturn $s;\n}", "private function convertLinks(){\n\t\tif(!isset($this->course['course_links']))\n\t\t\treturn;\n\t\t\n\t\t//Create folder in tmp for links\n mkdir('./tmp/links');\n\t\t$sectionCounter = 0;\n\n\t\t//Add section to manifest\n\t\tHelper::addIMSSection($this->manifest, $this->currentSectionCounter, $this->identifierCounter, 'Links');\n\n $section = $this->manifest->organizations->organization->item->item[$this->currentSectionCounter];\n \n\t\t//First add all general links\n\t\t\n\t\tforeach($this->course['course_links'] as $link_url)\n\t\t{\n\t\t\tif(intval($link_url['category'])==0)\n\t\t\t{\n\t\t\t\t//Create the xml\n\t\t\t\tHelper::createLinkXML($link_url);\t\t\t\t\n\t\n\t\t\t\t//Edit the manifest\n\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 0);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tforeach($this->course['course_link_categories'] as $cat)\n\t\t{\n\t\t\t//Add the label to the manifest\n\t\t\tHelper::addIMSLabel($section, $sectionCounter, $this->identifierCounter, $cat['name'], 0);\n\n\t\t\t//Add links below the label\n\t\t\tforeach($this->course['course_links'] as $link_url)\n\t\t\t{\n\t\t\t\tif(intval($link_url['category'])==$cat['id'])\n\t\t\t\t{\n\t\t\t\t\t//Create the xml\n\t Helper::createLinkXML($link_url); \n\t\t\t\t\t\n \t\t//Edit the manifest\n\t\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 1);\n \t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Proceed to next section\n\t\t$this->currentSectionCounter++;\n\t\t\t\n\t\t\n\t}", "public function to_array() {\n\t\t$config = array();\n\t\t\n\t\tforeach( $this->sections as $id => $section ) {\n\t\t\t$config[$id] = $section->to_array();\n\t\t}\n\t\t\n\t\treturn $config;\n\t}", "private function convert_lesson_array(array $table) {\n //println(\"<p>convert_lesson_array()\");\n foreach($table as $rowID => $row) {\n //println(\"<p>row($rowID):\");\n //var_dump($row);\n $plainTextContent = $table[$rowID]['content'];\n //println(\"<p>content cell($rowID): \".$table[$rowID]['content']);\n if(!isset($row['contentHTML']) || $row['contentHTML']=='') { //contentHTML has no content, so convert plain content to HTML friendly output\n $htmlContent = text_to_html($plainTextContent);//convert plaintext to html\n //println(\"<p>content plain to HTML cell($rowID): \".$htmlContent);\n } else {\n $plainTextContent = $table[$rowID]['content'];\n $htmlContent = $table[$rowID]['contentHTML'];//change 'content' values to 'contentHTML' values\n //println(\"<p>content HTML cell($rowID): \".$table[$rowID]['contentHTML']);\n }\n foreach($row as $cellID => $cell) {//change each cell that has the 'content' value (i.e. both number and text key)\n if($table[$rowID][$cellID]==$plainTextContent)\n $table[$rowID][$cellID] = $htmlContent;\n }\n }\n return $table;\n }", "protected function _buildFeedData() {\n\t\t$items = $this->_getItems();\n\t\t// array_map must be on an array - $items is a collection so need to get the\n\t\t// underlying array to pass to array_map\n\t\treturn array_map(array($this, '_applyMapping'), $items->getItems());\n\t}", "public function get_sitemap_entries()\n {\n }", "protected function _hydrateEntry($entry) {\n\t\t//echo \"Hydrating: \"; print_r($entry);\n\t\t\n\t\tif ($entry->published && is_numeric($entry->published)) {\n\t\t\t$entry->published = date('c', $entry->published);\n\t\t}\n\n\t\tif ($entry->updated && is_numeric($entry->updated) && $entry->updated>0) {\n\t\t\t$entry->updated = date('c', $entry->updated);\n\t\t}\n\t\t\n\t\tif ($entry->author_id) {\n\t\t\t$entry->author = $this->getAuthorById($entry->author_id);\n\t\t\t//echo \"Hydrating author: \"; print_r($entry->author);\n\t\t\tunset($entry->author_id);\n\t\t}\n\t\t\n\t\treturn $entry;\n\t}", "public function transform(Row $row)\n {\n foreach($this->columns as $key => $value) {\n $districtName = $row->get($value);\n $row->remove($value);\n $row->set('district', trim($this->districts[$districtName]));\n }\n }", "public function unDotData() {\n\t\t\n\t\t// foreach element\n\t\t// if key is dot notation\n\t\t// explode into array\n\t\t// add to output\n\t}", "public function transform_hour_collection( $rs )\n {\n return array_map( [ $this, 'transform_hour_rec' ], $rs );\n }", "function formulaires_editer_feuillederoute_charger_dist() {\n\t$valeurs = array( '_texte' => '' );\n\tlire_fichier_securise(_DIR_IMG . 'feuillederoute.php',$contenu);\n\t$contenu = @unserialize($contenu);\n\tif($contenu){\n\t\t$valeurs['_texte'] = $contenu;\n\t}\n\treturn $valeurs;\n}", "public function prepareData() {\r\n $sections = GearSection::getAll($this->id_shop);\r\n $this->smarty->assign('sections', $sections);\r\n $data = array();\r\n foreach($sections as $section) {\r\n $opts = GearOption::getBySection($section->id, $this->id_shop);\r\n $std = new stdClass();\r\n $std->id = $section->id;\r\n $std->name = $section->name;\r\n $std->label = $section->label;\r\n $std->options = $opts;\r\n array_push($data, $std);\r\n }\r\n \r\n if ($this->imported) { // generate css after import\r\n require_once 'classes/FrontStyle.php';\r\n FrontStyle::generateGearCss($data);\r\n }\r\n \r\n return $data;\r\n }", "public static function updateDistribution($dist)\n\t{\n\t\t// TODO: Implement updateDistribution() method.\n\t}", "public function convert(): void\n {\n // go through files\n foreach ($this->getInFiles() as $file) {\n $bookmarks = $this->parse($file);\n // go through bookmarks\n foreach ($bookmarks as $name => $url) {\n // go through formats\n foreach ($this->formats as $format) {\n switch ($format) {\n case 'url':\n $contents = $this->urlContents($url);\n break;\n case 'webloc':\n $contents = $this->weblocContents($url);\n break;\n case 'desktop':\n $contents = $this->desktopContents($name, $url);\n break;\n default:\n // shouldn't be a case because of constructor validation\n break;\n }\n $this->writeFile($name, $format, $contents);\n }\n }\n }\n }", "public function transform ( Discover $discover )\n\t{\n\t\t$transform = [\n\t\t\t'id'\t\t => $discover->id,\n\t\t\t'name'\t\t => $discover->name,\n\t\t\t'latitude'\t => $discover->latitude,\n\t\t\t'longitude'\t => $discover->longitude,\n\t\t\t'radius'\t => $discover->radius,\n//\t\t\t'start_date' => is_null( $discover->start_date ) ? null : (string) $discover->start_date,\n//\t\t\t'end_date'\t => is_null( $discover->end_date ) ? null : (string) $discover->end_date,\n\t\t\t'running'\t => (bool) $discover->running,\n\t\t\t'created_at' => (string) $discover->created_at\n\t\t];\n\n\t\t$transform = $this->removeDisallowedItems($transform);\n\n\t\t// Add links on\n\t\t$transform[ 'links' ] = [\n\t\t\t[\n\t\t\t\t'rel'\t => 'self',\n\t\t\t\t'uri'\t => '/discovers/' . $discover->id\n\t\t\t],\n\t\t];\n\t\treturn $transform;\n\t}", "public function toArray(Request $request, CommonSectionInterface $entry): array\n {\n $serializer = SerializerBuilder::create()\n ->setPropertyNamingStrategy(\n new SerializedNameAnnotationStrategy(\n new IdenticalPropertyNamingStrategy()\n )\n )\n ->setCacheDir($this->cacheDir . '/serializer')\n ->build();\n\n return $serializer->toArray($entry, $this->getContext($request));\n }", "function child2json( $entry ) {\n\n $relevance_time_str = is_null( $entry->relevance_time()) ? 'n/a' : $entry->relevance_time()->toStringShort();\n $attachments = $entry->attachments();\n $children = $entry->children();\n\n $shift_begin_time_str = is_null( $entry->shift_id()) ? '' : \"<a href=\\\"javascript:select_shift(\".$entry->shift()->id().\")\\\" class=\\\"lb_link\\\">\".$entry->shift()->begin_time()->toStringShort().'</a>';\n $run_number_str = '';\n if( !is_null( $entry->run_id())) {\n $run = $entry->run();\n $run_number_str = \"<a href=\\\"javascript:select_run({$run->shift()->id()},{$run->id()})\\\" class=\\\"lb_link\\\">{$run->num()}</a>\";\n }\n $tag_ids = array();\n $attachment_ids = array();\n if( count( $attachments ) != 0 ) {\n foreach( $attachments as $attachment ) {\n $attachment_url = '<a href=\"ShowAttachment.php?id='.$attachment->id().'\" target=\"_blank\" class=\"lb_link\">'.$attachment->description().'</a>';\n array_push(\n $attachment_ids,\n array(\n \"id\" => $attachment->id(),\n \"type\" => $attachment->document_type(),\n \"size\" => $attachment->document_size(),\n \"url\" => $attachment_url\n )\n );\n }\n }\n $children_ids = array();\n foreach( $children as $child )\n array_push( $children_ids, child2json( $child ));\n\n $content = wordwrap( $entry->content(), 128 );\n return json_encode(\n array (\n \"event_time\" => $entry->insert_time()->toStringShort(),\n \"relevance_time\" => $relevance_time_str,\n \"run\" => $run_number_str,\n \"shift\" => $shift_begin_time_str,\n \"author\" => $entry->author(),\n \"id\" => $entry->id(),\n \"subject\" => substr( $entry->content(), 0, 72).(strlen( $entry->content()) > 72 ? '...' : '' ),\n \"html\" => \"<pre style=\\\"padding:4px; padding-left:8px; font-size:14px; border: solid 2px #efefef;\\\">{$content}</pre>\",\n \"content\" => $entry->content(),\n \"attachments\" => $attachment_ids,\n \"tags\" => $tag_ids,\n \"children\" => $children_ids\n )\n );\n}", "public function toArray() {\n $output = array();\n foreach($this->_magicProperties as $key => $value) {\n if (in_array($key,$this->translation)) {\n $output[array_search($key,$this->translation)] = $value;\n }else{\n $output[$key] = $value;\n }\n }\n return $this->_postarray($output);\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 generateMap()\n {\n $map = array();\n $database = $this->binding->getDatabase()->getData();\n\n foreach ($database->classes as $class) {\n $map[$class->name] = $class->clusters;\n }\n\n $this->map = $map;\n $this->cache->save($this->getCacheKey(), $map);\n }", "protected function indexEntries()\n {\n if ($this->getType() == Reader\\Reader::TYPE_YML) {\n $entries = $this->xpath->evaluate('//offer');\n }\n\n foreach ($entries as $index => $entry) {\n $this->entries[$index] = $entry;\n }\n\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}", "private function prepareResultMap() {\n $resultMap = [];\n foreach ($this->encodings as $encoding) {\n $map = \"_\" . $encoding . \"Map\";\n foreach ($this->$map as $ru => $fo) {\n $resultMap[$ru][] = $fo;\n }\n }\n $this->_resultMap = $resultMap;\n }", "private function separateData(array $section) {\n // retrieve references\n $references = $this->getReferencesFromIsolates($section['Isolates']);\n\n // loop through the references and retrieve the data by reference\n $section['SeparateIsolates'] = [];\n foreach ($references as $reference) {\n $section['SeparateIsolates'][$reference] = [\n 'Isolates' => $this->getIsolatesByReference($section['Isolates'], $reference),\n 'SubSections' => $this->getSubSectionsByReference($section['SubSections'], $reference),\n ];\n }\n\n return $section;\n }", "function fullSplit($entry)\n {\n $matches = preg_split(\"/@(.*)[{(](.*),/U\", $entry, 2, PREG_SPLIT_DELIM_CAPTURE);\n $this->entries[$this->count]['bibtexEntryType'] = strtolower(trim($matches[1]));\n // sometimes a bibtex entry will have no citation key\n if(preg_match(\"/=/\", $matches[2])) // this is a field\n $matches = preg_split(\"/@(.*)\\s*[{(](.*)/U\", $entry, 2, PREG_SPLIT_DELIM_CAPTURE);\n // print_r($matches); print \"<P>\";\n $this->entries[$this->count]['bibtexCitation'] = $matches[2];\n $this->reduceFields($matches[3]);\n }", "private function collectImageData(ProductAttributeMediaGalleryEntryInterface $mediaEntry): array\n {\n $image = $this->getAllSizeImages($mediaEntry->getFile());\n $image[ProductAttributeMediaGalleryEntryInterface::POSITION] = $mediaEntry->getPosition();\n $image['isMain'] =$this->isMainImage($mediaEntry);\n return $image;\n }", "public function get_arr_maps() {\r\n $arr = $this->app->model('article_indexs')->getList('*');\r\n $tmp = array();\r\n \r\n foreach( (array)$arr as $row ) {\r\n $tmp[] = array(\r\n 'url' => app::get('site')->router()->gen_url(array('app'=>'content', 'ctl'=>'site_article', 'act'=>'index', 'arg0'=>$row['article_id'], 'full'=>true) ),\r\n );\r\n }\r\n \r\n return $tmp;\r\n }", "private static function transformMatches(&$matches) {\n $newMatches = [];\n foreach ($matches as $i => $itemMatches) {\n foreach ($itemMatches as $j => $match) {\n if (!isset($newMatches[$j])) {\n $newMatches[$j] = [];\n }\n $newMatches[$j][$i] = $match;\n }\n }\n $matches = $newMatches;\n }", "public function reverseMap()\n {\n foreach ((array) $this->rawData as $index => $documentLink) {\n $documentCategory = $this->getDocumentCategory(getVal($documentLink, ['document_link', 'category', 0, 'code']), true);\n if (!$documentCategory) {\n return $this->mappedData;\n }\n\n if (!array_key_exists($documentCategory, $this->mappedData)) {\n $index = 0;\n }\n\n $this->mappedData[$documentCategory][$index]['document_title'] = getVal($documentLink, ['document_link', 'title', 0, 'narrative', 0, 'narrative']);\n $this->mappedData[$documentCategory][$index]['document_url'] = getVal($documentLink, ['document_link', 'url']);\n $this->mappedData[$documentCategory][$index]['document_link_id'] = getVal($documentLink, ['id']);\n }\n\n return $this->mappedData;\n }", "function array2form($array_dades,$camps=false, $camp_index=false)\n{\n\t$array_final=$array_dades[0];\n\tif ($camps)\n\t{\n\t\tforeach ($camps as $camp)\n\t\t{\n\t\t\t$tmp=array();\n\t\t\tforeach ($array_dades as $row) {$tmp[$row[$camp_index]]=$row[$camp];}\n\t\t\t$array_final[$camp]=$tmp;\n\t\t}\n\t}\n\treturn $array_final;\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 readOSCollection(){\r\n $fp = \"outdoorschool.csv\";\r\n $file = new SplFileObject($fp);\r\n $file->setFlags(SplFileObject::READ_CSV);\r\n $file->setCsvControl(',', '\"', '\\\\'); // this is the default anyway though\r\n $alignments = array();\r\n\r\n $count = 0;\r\n $rows = 0;\r\n foreach ($file as $row) {\r\n //print_r($row);\r\n $curRow = new CSVRow();\r\n $curRow->title = $row[0];\r\n $curRow->numAlignments = $row[1];\r\n for($i = 0; $i < $curRow->numAlignments; $i++){\r\n $curRow->addAlignment($row[$i + 2]);\r\n }\r\n $rows++;\r\n array_push($alignments, $curRow);\r\n }\r\n return $alignments;\r\n}", "private function get_article_data( $get = true, array $entry = [] ) {\n\n\t\tstatic $data = [];\n\n\t\tif ( $get )\n\t\t\treturn $data;\n\n\t\t$data[ key( $entry ) ] = reset( $entry );\n\n\t\treturn [];\n\t}", "function formulaires_publication_ouverte_agenda_charger_dist()\n{\n\t$values = array();\n\n\t$values['etape'] \t\t= _request('etape');\t\t\t// etape actuelle\n\t$values['id_article']\t \t= _request('id_article');\t\t// id de l'article temporaire\n\t$values['type']\t\t\t= \"evenement\";\t\t\t// article ou evenement ?\n\t$values['id_rubrique'] \t\t= _request('id_rubrique');\t\t// rubrique de la contrib\n\t$values['jour_evenement'] \t= _request('jour_evenement'); \t\t// jour de l'événement\n\t$values['mois_evenement'] \t= _request('mois_evenement'); \t\t// mois de l'événement\n\t$values['annee_evenement'] \t= _request('annee_evenement'); \t\t// annee de l'événement\n\t$values['heure_evenement'] \t= _request('heure_evenement'); \t\t// heure de l'événement\n\t$values['lieu_evenement']\t= _request('lieu_evenement');\t\t// lieu de l'evenement\n\t$values['ville_evenement']\t= _request('ville_evenement');\t\t// lieu de l'evenement\n\t$values['adresse_evenement']\t= _request('adresse_evenement');\t// lieu de l'evenement\n\t$values['tel_evenement']\t= _request('tel_evenement');\t\t// lieu de l'evenement\n\t$values['web_evenement']\t= _request('web_evenement');\t\t// lieu de l'evenement\n\t$values['email_evenement']\t= _request('email_evenement');\t\t// lieu de l'evenement\n\t$values['lieu_evenement_existe']= _request('lieu_evenement_existe');\t// lieu de l'evenement déjà existant\n\t$values['titre'] \t\t= _request('titre');\t\t\t// titre de la contrib\n\t$values['texte'] \t\t= _request('texte');\t\t\t// texte de la contrib\n\t$values['pseudo'] \t\t= _request('pseudo');\t\t\t// pseudo ou nom de l'auteur\n\t$values['email'] \t\t= _request('email');\t\t\t// email de l'auteur\n\t$values['mots'] \t\t= _request('mots');\t\t\t// les mots-clés\n\t$values['date'] = _request('date');\n\t$values['date_modif'] = _request('date_modif');\n\t$values['supprimer_documents'] = _request('supprimer_documents');\n\t// editos\n\t$values['mise_en_edito'] = _request('mise_en_edito');\n\t$values['edito_complet'] = _request('edito_complet');\n\t// focus\n\t$values['mot_focus'] = _request('mot_focus');\n\t// si c'est pas un debut d'article\n\tif (_request('titre') or _request('previsu'))\n\t\t$values['ancre'] = '#etape_4';\n\telse\n\t\t$values['ancre'] = '.page-article';\n\t\n\t/*\n\t * s'il s'agit du premier passage, on créé l'article\n\t */\n\tif (!$values['id_article'])\n\t{\n\t\t$id_article = indymedia_creer_article();\n\t\t$values['id_article'] = $id_article;\n\t}\n\t/*\n\t * sinon, si admin, on peut l'éditer\n\t */\n\telse if ($values['id_article'] && est_admin())\n\t{\n\t\t$id_article = (int) $values['id_article'];\n\t\t// on recupere des infos sur l'article\t\n\t\t$row = sql_fetsel(\n\t\t\tarray('texte','extra','id_rubrique','titre','date_debut_indy','statut','date'),\n\t\t\tarray('spip_articles'),\n\t\t\tarray('id_article='.$id_article)\n\t\t);\n\t\t$values['texte'] = $row['texte'] ;\n\t\t$values['titre'] = $row['titre'] ;\n\t\t$values['id_rubrique'] = $row['id_rubrique'] ;\n\t\t//$values['statut'] = $row['statut'] ;\n\t\t$extra = unserialize($row['extra']);\n\t\t$values['explication'] = $extra['OP_moderation'];\n\t\t$values['pseudo'] = $extra['OP_pseudo'];\n\t\t$values['email'] = $extra['OP_email'];\n\t\t$values['date'] = $row['date'];\n\t\t\n\t\t// on recupere la date, l'heure et le lieu de l'evenement\n\t\t$values = indymedia_ajout_valeurs_date ($values, $row['date_debut_indy']);\n\t\t$values = indymedia_ajout_valeurs_lieu ($values, $id_article);\n\t\t$values = indymedia_ajout_valeurs_mots ($values, $id_article);\n\t}\n\tinclude_spip('inc/securiser_action');\n\t$values['cle_ajouter_document'] = calculer_cle_action('ajouter-document-' . 'article' . '-' . $id_article);\n\n\treturn $values;\n}", "private static function process(array $entries)\n {\n /** @var \\GrahamCampbell\\ResultType\\Result<\\Dotenv\\Parser\\Entry[],string> */\n return \\array_reduce($entries, static function (Result $result, string $raw) {\n return $result->flatMap(static function (array $entries) use ($raw) {\n return EntryParser::parse($raw)->map(static function (Entry $entry) use ($entries) {\n /** @var \\Dotenv\\Parser\\Entry[] */\n return \\array_merge($entries, [$entry]);\n });\n });\n }, Success::create([]));\n }", "function entry_parse($entry)\n{\n\n // Address\n if (!empty($entry['city'])) {\n $entry['address'] .= ', ' . $entry['city'];\n }\n if (!empty($entry['state']) && !empty($entry['city'])) {\n $entry['address'] .= ', ' . $entry['state'];\n }\n if (!empty($entry['zip']) && !empty($entry['city'])) {\n $entry['address'] .= ', ' . $entry['zip'];\n }\n $entry['address'] = ltrim($entry['address'], ', ');\n\n // DB Connection\n $db = DB::get('directory');\n\n // Images\n $result = $db->prepare(\"SELECT `file` FROM `\" . Settings::getInstance()->TABLES['UPLOADS'] . \"` WHERE `row` = :row AND `type` = :type ORDER BY `order` ASC;\");\n\n // Logo\n $result->execute(array('row' => $entry['id'], 'type' => 'directory_logo'));\n $logo = $result->fetchColumn();\n if (!empty($logo)) {\n $entry['logo'] = '/uploads/' . $logo;\n }\n\n // Thumbnails\n $result->execute(array('row' => $entry['id'], 'type' => 'directory'));\n $thumbnails = $result->fetchAll();\n if (!empty($thumbnails)) {\n $entry['thumbnails'] = array_map(function ($image) {\n return '/uploads/' . $image['file'];\n }, $thumbnails);\n }\n\n // Main Image (Logo, Thumbnail, No Image)\n $entry['image'] = !empty($entry['logo']) ? $entry['logo'] : false;\n if (empty($entry['image']) && !empty($entry['thumbnails'])) {\n $entry['image'] = $entry['thumbnails'][0];\n }\n $entry['image'] = !empty($entry['image']) ? $entry['image'] : '/img/404.gif';\n\n // Website URL\n if (!empty($entry['website'])) {\n // Escape HTML\n $entry['website'] = htmlspecialchars($entry['website']);\n // Prepend HTTP:// If Needed\n if (!preg_match('#http://#', $entry['website'])) {\n $entry['website'] = 'http://' . $entry['website'];\n }\n // Turn into Anchor Link\n if ($entry['website_link'] == 'Y') {\n $entry['website'] = '<a href=\"' . $entry['website'] . '\" target=\"_blank\"' . ($entry['no_follow'] == 'Y' ? ' rel=\"nofollow\"' : '') . '>' . preg_replace('#^http://#', '', rtrim($entry['website'], '/')) . '</a>';\n }\n }\n\n // Append rel=\"nofollow\" to Anchors\n if ($entry['no_follow'] == 'Y') {\n $entry['description'] = preg_replace(\"/<\\s*a\\s+(.+?)>/i\", '<a $1 rel=\"nofollow\">', $entry['description']);\n }\n\n // URL Details\n if (!empty($entry['primary_category'])) {\n $entry_dir = $entry['primary_category'];\n } elseif (!empty($_GET['category'])) {\n $entry_dir = $_GET['category'];\n } else {\n $entry_cats = explode(',', $entry['categories']);\n $entry_dir = $entry_cats[0];\n }\n $entry['url_details'] = sprintf(URL_DIRECTORY_LISTING, $entry_dir, $entry['link']);\n\n // Return Entry\n return $entry;\n}", "function __mergeMetadata($metadatas, &$destination) {\r\n\t\tforeach($metadatas as $metadata) {\r\n\t\t\t$destination[$metadata['name']] = $metadata['value'];\r\n\t\t}\r\n\t}", "public function convertArray(array $list){\n $o = $this->getHeader();\n if (count($list) > 0){\n foreach($list as $key => $value){\n \t$o .= \"<entry>\\n\";\n \t$o .= \"\\t<form>\\n\";\n\t$o .= \"\\t\\t<orth>\\n\";\n\t$infinitive = $value['infinitive'][0];\n\t$o .= \"\\t\\t\\t$infinitive\\n\";\n\t$o .= \"\\t\\t</orth>\\n\";\n\t$o .= \"\\t\\t<model>\\n\";\n\t$model = $value['model'];\n\t$o .= \"\\t\\t\\t$model\\n\";\n\t$o .= \"\\t\\t</model>\\n\";\n $o .= $this->convertConjugation($value);\n\t$o .= \"\\t</form>\\n\";\n \t$o .= \"</entry>\\n\";\n } // for\n } // if\n\n $o .= $this->getFooter();\n $this->createDownloadFile($o);\t \n }", "protected function prepare_results_for_output( &$results ) {\n\t\t// get the compound key.\n\t\t// only return range and compound key for granular results.\n\n\t\t$return_value = array();\n\n\t\tforeach ( $results as &$result ) {\n\t\t\t// Working on reference to save memory here.\n\n\t\t\t$key = array();\n\t\t\tforeach ( $this->key_fields as $field ) {\n\t\t\t\t$key[] = $result[ $field ];\n\t\t\t}\n\n\t\t\t$return_value[ implode( '-', $key ) ] = $result['checksum'];\n\t\t}\n\n\t\treturn $return_value;\n\t}", "public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {\n $row_array = $row->getSource();\n $migration_id = $row_array['migration_name'];\n $configuration = entity_load('migration', $migration_id);\n $configuration_array = $configuration->toArray();\n\n //creates an array with all element names from the configuration file. The foreach below allows it to find the elemenents that start out with the name\n $source_element = $configuration_array['process'][$destination_property]['source_element'];\n $source_array = array();\n $search_length = strlen($source_element);\n foreach ($row_array as $key => $value) {\n if (substr($key, 0, $search_length) == $source_element) {\n array_push($source_array, $value);\n }\n }\n $array_nid = array();\n foreach($source_array as $source){\n $source = str_replace(' ','%20',$source);\n $data = file_get_contents($source);\n $file = file_save_data($data, 'public://' . basename($source), FILE_EXISTS_REPLACE);\n if ($file) {\n $nodes = $file->id();\n array_push($array_nid,$nodes);\n }\n } \n return $array_nid;\n }", "function requeteur_data_dist(&$boucles, &$boucle, &$id) {\n\tinclude_spip('iterateur/data');\n\tif ($h = charger_fonction($boucle->type_requete . '_to_array' , 'inc', true)) {\n\t\t$g = charger_fonction('data', 'iterateur');\n\t\t$boucles[$id] = $g($boucle);\n\t\t// from[0] stocke le type de data (rss, yql, ...)\n\t\t$boucles[$id]->from[] = $boucle->type_requete;\n\t\t\n\t} else {\n\t\t$x = $boucle->type_requete;\n\t\t$boucle->type_requete = false;\n\t\t$msg = array('zbug_requeteur_inconnu',\n\t\t\t\tarray(\n\t\t\t\t'requeteur' => 'data',\n\t\t\t\t'type' => $x\n\t\t));\n\t\terreur_squelette($msg, $boucle);\n\t}\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\t// Build Array\n\t\t\tforeach($this->_data as $entry) {\n\t\t\t\tforeach($entry as $key => $value) {\n\t\t\t\t\tif(get_class($value) == 'Bedrock\\\\Common\\\\DataFormat\\\\YAML') {\n\t\t\t\t\t\t$result[] = array($key => $value->toArray());\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$result[] = array($key => $value);\n\t\t\t\t\t}\n\t\t\t\t}\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\\Common\\DataFormat\\Exception('A problem was encountered while attempting to generate an array.');\n\t\t}\n\t}", "private function mapProperties(): void\n {\n $this->properties = Collect::keyBy($this->collection->getProperties()->getValues(), 'identifier');\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}", "public function collectData(){\n\t\t// Simple HTML Dom is not accurate enough for the job\n\t\t$content = getContents($this->getURI())\n\t\t\tor returnServerError('No results for LWNprev');\n\n\t\tlibxml_use_internal_errors(true);\n\t\t$html = new DOMDocument();\n\t\t$html->loadHTML($content);\n\t\tlibxml_clear_errors();\n\n\t\t$cat1 = '';\n\t\t$cat2 = '';\n\n\t\tforeach($html->getElementsByTagName('a') as $a){\n\t\t\tif($a->textContent === 'Multi-page format'){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$realURI = self::URI . $a->getAttribute('href');\n\t\t$URICounter = 0;\n\n\t\t$edition = $html->getElementsByTagName('h1')->item(0)->textContent;\n\t\t$editionTimeStamp = strtotime(\n\t\t\tsubstr($edition, strpos($edition, 'for ') + strlen('for '))\n\t\t);\n\n\t\tforeach($html->getElementsByTagName('h2') as $h2){\n\t\t\tif($h2->getAttribute('class') !== 'SummaryHL'){\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$item = array();\n\n\t\t\t$h2NextSibling = $h2->nextSibling;\n\t\t\t$this->jumpToNextTag($h2NextSibling);\n\n\t\t\tswitch($h2NextSibling->getAttribute('class')){\n\t\t\tcase 'FeatureByline':\n\t\t\t\t$item['author'] = $h2NextSibling->getElementsByTagName('b')->item(0)->textContent;\n\t\t\t\tbreak;\n\t\t\tcase 'GAByline':\n\t\t\t\t$text = $h2NextSibling->textContent;\n\t\t\t\t$item['author'] = substr($text, strpos($text, 'by '));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$item['author'] = 'LWN';\n\t\t\t\tbreak;\n\t\t\t};\n\n\t\t\t$h2FirstChild = $h2->firstChild;\n\t\t\t$this->jumpToNextTag($h2FirstChild);\n\t\t\tif($h2FirstChild->nodeName === 'a'){\n\t\t\t\t$item['uri'] = self::URI . $h2FirstChild->getAttribute('href');\n\t\t\t}else{\n\t\t\t\t$item['uri'] = $realURI . '#' . $URICounter;\n\t\t\t}\n\t\t\t$URICounter++;\n\n\t\t\t$item['timestamp'] = $editionTimeStamp + $URICounter;\n\n\t\t\t$h2PrevSibling = $h2->previousSibling;\n\t\t\t$this->jumpToPreviousTag($h2PrevSibling);\n\t\t\tswitch($h2PrevSibling->getAttribute('class')){\n\t\t\tcase 'Cat2HL':\n\t\t\t\t$cat2 = $h2PrevSibling->textContent;\n\t\t\t\t$h2PrevSibling = $h2PrevSibling->previousSibling;\n\t\t\t\t$this->jumpToPreviousTag($h2PrevSibling);\n\t\t\t\tif($h2PrevSibling->getAttribute('class') !== 'Cat1HL'){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$cat1 = $h2PrevSibling->textContent;\n\t\t\t\tbreak;\n\t\t\tcase 'Cat1HL':\n\t\t\t\t$cat1 = $h2PrevSibling->textContent;\n\t\t\t\t$cat2 = '';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$h2PrevSibling = null;\n\n\t\t\t$item['title'] = '';\n\t\t\tif(!empty($cat1)){\n\t\t\t\t$item['title'] .= '[' . $cat1 . ($cat2 ? '/' . $cat2 : '') . '] ';\n\t\t\t}\n\t\t\t$item['title'] .= $h2->textContent;\n\n\t\t\t$node = $h2;\n\t\t\t$content = '';\n\t\t\t$contentEnd = false;\n\t\t\twhile(!$contentEnd){\n\t\t\t\t$node = $node->nextSibling;\n\t\t\t\tif(!$node || (\n\t\t\t\t\t\t$node->nodeType !== XML_TEXT_NODE && (\n\t\t\t\t\t\t\t$node->nodeName === 'h2' || (\n\t\t\t\t\t\t\t\t!is_null($node->attributes) &&\n\t\t\t\t\t\t\t\t!is_null($class = $node->attributes->getNamedItem('class')) &&\n\t\t\t\t\t\t\t\tin_array($class->nodeValue, array('Cat1HL', 'Cat2HL'))\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\t$contentEnd = true;\n\t\t\t\t}else{\n\t\t\t\t\t$content .= $node->C14N();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$item['content'] = $content;\n\t\t\t$this->items[] = $item;\n\t\t}\n\t}", "private function transformCollection($vendas)\n {\n return array_map([$this, 'transform'], $vendas->toArray());\n }", "public function convertItemArray() {}", "protected function convertPriceList() {\n\t\t$retArray =array();\n\t\t\n\t\tforeach ($this->DetailPriceList as $name => $nameValue) {\n\t\t\t$description = '';\n\t\t\t$unit = '';\n\t\t\t$price = 0;\n\t\t\t$avgPrice = 0;\n\t\t\tif (is_array($nameValue)) {\n\t\t\t\tforeach ($nameValue as $desc => $prices) {\n\t\t\t\t\tif (is_array($prices)) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$price = $nameValue;\n\t\t\t\t$avgPrice = $price;\n\t\t\t}\n\t\t\t$retArray[] = array($name,$description, $unit,$price, $avgPrice );\n\t\t}\n\t}", "public function compile($entry){\n\n\t\t\t$main_lang = FLang::getMainLang();\n\t\t\t$entryData = $entry->getData();\n\t\t\t$publishField = $entryData[$this->get('publish_field')];\n\t\t\t$dateField = $entryData[$this->get('date_field')];\n\t\t\t$publishDateField = $entryData[$this->get('id')];\n\n\t\t\t// var_dump($dateField['start']['0']);die;\n\t\t\t// values\n\t\t\tforeach( FLang::getLangs() as $lc ){\n\t\t\t\t// var_dump($publishDateField);die;\n\t\t\t\tif (!isset($publishDateField['date-'.$lc]) && $publishField['value-'.$lc] == 'yes' ){\n\t\t\t\t\t$formattedDate = date('Y-m-d H:i:s');\n\t\t\t\t\t$publishDate = $formattedDate;\n\t\t\t\t\tif ($formattedDate < $dateField['start']['0']){\n\t\t\t\t\t\t//I'm sorry dude this article happens to be future dated; so we've got to stick to the future date\n\t\t\t\t\t\t$publishDate = $dateField['start']['0'];\n\t\t\t\t\t}\n\t\t\t\t\t$data['date-'.$lc] = $publishDate;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//maybe the main should be set to the first actual value not main language value\n\t\t\tif (isset($data))\n\t\t\t\t$data['date'] = array_shift(array_values($data));\n\n\t\t\t//date = main language\n\t\t\t// if (isset($data['date-'.$main_lang]))\n\t\t\t// \t$data['date'] = $data['date-'.$main_lang];\n\n\t\t\tif (isset($data)){\n\t\t\t\t// If we have data Save:\n\t\t\t\tSymphony::Database()->update(\n\t\t\t\t\t$data,\n\t\t\t\t\tsprintf(\"tbl_entries_data_%s\", $this->get('id')),\n\t\t\t\t\tsprintf(\"`entry_id` = '%s'\", $entry->get('id'))\n\t\t\t\t);\n\t\t\t}\n\t\t}", "private function _normalize($list) {\n // If an array wasn't submitted there's nothing to do...\n if (!is_array($list)) {\n return $list;\n }\n $ret = array();\n\n foreach ($list as $key => $val) {\n $val['location'] = isset($val['location']) ? $val['location'] : $key;\n $val['label'] = isset($val['label']) ? $val['label'] : $key;\n $val['class'] = isset($val['class']) ? ' '.$val['class'] : '';\n $val['id'] = isset($val['id']) ? \" id='{$val['id']}'\" : '';\n \n if (isset($val['parent_id'])) {\n if ( isset($ret[$val['parent_id']])) { \n // if parent doesn't exist, the children wont either\n $ret[$val['parent_id']]['children'][$key] = $val;\n }\n } else {\n $ret[$key] = $val;\n }\n }\n return $ret;\n }", "function spr_get_sections() {\n\tglobal $spr_sql_fields;\n\n\t$sql_tables = safe_pfx('txp_section');\n\t$rs = safe_query(\"SELECT \".$spr_sql_fields.\" FROM \".$sql_tables.\" WHERE name != 'default' ORDER BY name\");\n\twhile ($a = nextRow($rs)) {\n\t\textract($a); // set 'name','title','parent' etc in $a\n\t\t$out[$name] = $a;\n\t}\n\treturn $out;\n}", "public function convert();", "function privExtractFileInOutput(&$p_entry, &$p_options)\n {\n }", "private function fetchDeliveryEntries(array $entries): array\n {\n $ids = $this->extractIdsForComparison($entries);\n $query = (new Query())\n ->setInclude(0)\n ->where('sys.id[in]', $ids)\n ;\n\n $deliveryEntries = [];\n foreach ($this->client->getEntries($query) as $entry) {\n $deliveryEntries[$entry->getId()] = $entry;\n }\n\n return $deliveryEntries;\n }", "public function convertToSite($data){\n\t\tforeach($data as $fieldName => $value){\n\n\t\t\tif(isset($this -> convertMap[$fieldName])){\n\n\t\t\t\t$data[$fieldName] = $this -> getSiteId($this -> convertMap[$fieldName], $data[$fieldName]);\n\t\t\t}\n\n\t\t\tif(isset($this -> convertTimeMap[$fieldName])){\n\n\t\t\t\t$data[$fieldName] = $this -> getSiteTime($data[$fieldName]);\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "public function convertData()\n {\n foreach ($this->dataToConvert as $node) {\n $title = $node->xpath('title');\n $fileMeta = $this->retrieveFileInfo($title);\n if (empty($fileMeta) || 201 == ($fileMeta['type']) || ($fileMeta['type']) <= 0) {\n $this->message(\"ignore slash: \" . $title . \": \" . json_encode($fileMeta));\n continue;\n }\n \n $text = $node->xpath('revision/text')[0];\n if (empty($text)) {\n continue;\n }\n\n if ($fileMeta['type'] == 3 || $fileMeta['type'] == 4 || $fileMeta['type'] == 7) {\n if (strlen($text) > 1024) {\n $this->saveFile($fileMeta, $text, \".wikitext\");\n } else {\n $this->message(\"Template: \" . json_encode($fileMeta) . \" -> \" . $text);\n }\n continue;\n } else if ($fileMeta['type'] == 200) {\n $draftpath = $this->output . \"Draft/\" . $fileMeta['filename'] . \".md\";\n @unlink($draftpath);\n }\n \n $text = $this->cleanText($text, $fileMeta);\n if (empty($text)) {\n $this->message(\"cleanText empty: \" . json_encode($fileMeta));\n continue;\n }\n\n if ($this->format === \"mediawiki\") {\n $this->saveFile($fileMeta, $text, \".wikitext\");\n continue;\n }\n\n try {\n $lang = getenv(\"WIKILANG\");\n $this->message(\"pandoc: {$fileMeta['filename']}: \");\n $errpath=$this->output . \"Errors/\" . $fileMeta['filename'];\n $procOpt = [];\n $procOpt[\"stdout\"] = $errpath . \".log\";\n $procOpt[\"stderr\"] = $errpath . \".err.log\";\n $procOpt[\"timeout\"] = 3;\n if ($lang == \"en\" || mb_strlen($text) > 16*1024) {\n $procOpt[\"timeout\"] = 6;\n }\n $this->pandocOptions[\"variable\"] = [\n \"\\\"cfmtitle={$fileMeta['title']}\\\"\",\n \"\\\"cfmurl={$fileMeta['url']}\\\"\",\n \"\\\"WIKILANG={$lang}\\\"\",\n \"\\\"stdout={$errpath}.log\\\"\"\n ];\n \n file_put_contents($errpath . \".wikitext\", $text);\n $this->runPandoc($text, $procOpt);\n $text = file_get_contents($procOpt[\"stdout\"]);\n @unlink($procOpt[\"stdout\"]);\n $stderr = file_get_contents($procOpt[\"stderr\"]);\n if (mb_strlen($stderr) > 0) {\n $this->message(\"Caught stderr {$fileMeta['filename']}: \", $stderr);\n } else {\n @unlink($procOpt[\"stderr\"]);\n }\n if (empty($text)) {\n continue;\n }\n @unlink($errpath . \".wikitext\");\n } catch (\\Throwable $e) {\n $errmsg=$e->getMessage();\n $this->message(\"Caught exception {$fileMeta['filename']}: \", $errmsg);\n continue;\n }\n $text .= $this->getMetaData($fileMeta);\n $this->saveFile($fileMeta, $text);\n $this->counter++;\n }\n }", "public function transform( $articles, $options = [] )\n { \n $day = $options['day'];\n\n $response = [];\n\n $highlightsToShow = 3; \n $categoryCounter = [];\n\n # always provide some meta data about what we're doing\n $response[ $day ]['publication'] = [\n 'date' => $day\n ,'day' => date('D', strtotime($day))\n ,'fullDay' => date('l', strtotime($day))\n ,'iso8601Date' => date('c', strtotime($day))\n ,'epoch' => strtotime($day)\n ];\n\n $response[ $day ]['categories'] = [];\n $response[ $day ]['articles'] = [];\n\n foreach( $articles AS $article )\n {\n // we'll check for this later once the article has been transformed\n $hasEvent = false;\n\n // grab the location array from the article\n $location = $article['location'][0];\n\n // we need to build up a count of articles in each category. this does that\n $categoryCounter[ $day ][$location['categoryId']][] = $location['categoryId']; \n\n $response[ $day ]['categories'][$location['categoryId']] = [\n 'id' => $location['categoryId']\n ,'name' => $location['categoryName']\n ,'sefName' => $location['categorySefName']\n ,'path' => makePath( [ $location['channelSefName'], $location['subChannelSefName'], $location['categorySefName'] ] )\n ,'numberOfArticles' => count($categoryCounter[ $day ][$location['categoryId']])\n ];\n\n // this will get over-written in the articleTransformer. so we'll store it and check for it later\n $articleIsPicked = $article['is_picked'];\n\n // transform the article into a nicer object for the API response\n $article = App::make('ArticleTransformer')->transform($article, [ 'showBody' => false, 'eventDay' => $day ] );\n\n // initialise the picks array for the day\n if( ! isset($response[ $day ]['picks']) ) {\n $response[ $day ]['picks'] = [];\n }\n\n # initialise the articles array for the day\n if( ! isset($response[ $day ]['articles']) ) {\n $response[ $day ]['articles'] = [];\n }\n\n # we want to separate out the first few picks articles into a separate array. Do this until we reach the currently set limit\n # as long as it has a showDate!\n if( $articleIsPicked && count($response[ $day ]['picks']) < $highlightsToShow && isset($article['event']['details']['showDate']) && ! is_null($article['event']['details']['showDate'])) {\n $response[ $day ]['picks'][] = $article;\n }\n # otherwise pipe the article into the main articles array, as long as it has a showDate!\n else if( isset($article['event']['details']['showDate']) && ! is_null($article['event']['details']['showDate']) ) {\n $response[ $day ]['articles'][] = $article; \n }\n }\n\n # once we're done reset the array keys for the category listing\n foreach( $response AS $key => $item ) {\n $response[$key]['categories'] = array_values($item['categories']);\n }\n\n return array_values($response);\n }", "function prepare_attributes($index_section)\n{\n // next code need because xmlpipe_attr_uint can't simple maped as other attrebutes\n // $attr_map has type in output xml as key and name of attribute from config as value\n $attr_map = array(\n 'int' => 'xmlpipe_attr_uint',\n 'timestamp' => 'xmlpipe_attr_timestamp',\n 'bool' => 'xmlpipe_attr_bool',\n 'str2ordinal' => 'xmlpipe_attr_str2ordinal',\n 'float' => 'xmlpipe_attr_float',\n );\n $xml_doc_attr_list = array();\n foreach ($attr_map as $attr_type => $key_in_config)\n {\n if (isset($index_section[$key_in_config]))\n {\n $xml_doc_attr_list = array_merge($xml_doc_attr_list, get_attrs($attr_type, $index_section[$key_in_config]));\n }\n }\n return $xml_doc_attr_list;\n}", "public function toArray()\n {\n return $this->transform();\n }", "public function getEntryCollection(): EntryCollection;", "function formulaires_recommander_charger_dist(){\n\t$valeurs = array('destinataire'=>'','destinataires'=>'','texte'=>'');\n\n\treturn $valeurs;\n}", "public function transform_type_collection( $rs )\n {\n return array_map( [ $this, 'transform_type_rec' ], $rs );\n }", "public function prepare_entry_for_response( $entry ) {\n\n\t\tif ( is_wp_error( $entry ) || ! isset( $entry['form_id'] ) ) {\n\t\t\treturn $entry;\n\t\t}\n\n\t\t$form = GFAPI::get_form( $entry['form_id'] );\n\t\tforeach ( $form['fields'] as $field ) {\n\n\t\t\tif ( empty( $entry[ $field->id ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( $field instanceof GF_Field_MultiSelect ) {\n\n\t\t\t\t$entry[ $field->id ] = $field->to_array( $entry[ $field->id ] );\n\n\t\t\t} elseif ( $field instanceof GF_Field_FileUpload && $field->multipleFiles ) {\n\n\t\t\t\t$entry[ $field->id ] = json_decode( $entry[ $field->id ] );\n\n\t\t\t} elseif ( $field instanceof GF_Field_List ) {\n\n\t\t\t\t$entry[ $field->id ] = maybe_unserialize( $entry[ $field->id ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $entry;\n\t}", "function convert_this(){\r\n// keeping this around for history but we never want it to run by accident.\r\nreturn;\r\n\t$html = '<h3>Converting Yo!</h3>';\r\n\r\n\t$found_args = array(\r\n\t\t'posts_per_page' => 10,\r\n\t\t'post_type' => 'emc_content_focus', // emc_content_focus emc_common_core\r\n\t);\r\n\t$found = get_posts( $found_args );\r\n\r\n\tforeach( $found as $f ){\r\n\t\t$html .= get_the_title( $f->ID ) . '<br />';\r\n\r\n\t\t$related = get_post( $f->ID );\r\n\r\n\t\t$connected = get_posts( array(\r\n\t\t\t'connected_type' => 'content_foci_to_posts', // content_foci_to_posts common_core_to_posts\r\n\t\t\t'connected_items' => $related,\r\n\t\t\t'nopaging' => true,\r\n\t\t\t'suppress_filters' => false,\r\n\t\t\t'posts_per_page' => -1,\r\n\t\t));\r\n\r\n\t\t$term_title = get_the_title( $f->ID );\r\n\r\n\t\t$term_id = wp_insert_term( $term_title, 'emc_tax_found' ); // emc_tax_found, emc_tax_common_core\r\n\r\n\t\tforeach( $connected as $c ){\r\n\t\t\t$html .= '&nbsp; &nbsp;' . get_the_title( $c->ID ) .'<br />';\r\n\r\n\t\t\twp_set_post_terms( $c->ID, $term_id, 'emc_tax_found' ); // emc_tax_found, emc_tax_common_core\r\n\r\n\t\t} // foreach\r\n\r\n\r\n\t} // foreach\r\n\r\n//////////////////////\r\n\r\n\t$found_args = array(\r\n\t\t'posts_per_page' => 10,\r\n\t\t'post_type' => 'emc_common_core', // emc_content_focus emc_common_core\r\n\t);\r\n\t$found = get_posts( $found_args );\r\n\r\n\tforeach( $found as $f ){\r\n\t\t$html .= get_the_title( $f->ID ) . '<br />';\r\n\r\n\t\t$related = get_post( $f->ID );\r\n\r\n\t\t$connected = get_posts( array(\r\n\t\t\t'connected_type' => 'common_cores_to_posts', // content_foci_to_posts common_core_to_posts\r\n\t\t\t'connected_items' => $related,\r\n\t\t\t'nopaging' => true,\r\n\t\t\t'suppress_filters' => false,\r\n\t\t\t'posts_per_page' => -1,\r\n\t\t));\r\n\t\t$term_title = get_the_title( $f->ID );\r\n\r\n\t\t$term_id = wp_insert_term( $term_title, 'emc_tax_common_core' ); // emc_tax_found, emc_tax_common_core\r\n\r\n\t\tforeach( $connected as $c ){\r\n\t\t\t$html .= '&nbsp; &nbsp;' . get_the_title( $c->ID ) .'<br />';\r\n\r\n\t\t\twp_set_post_terms( $c->ID, $term_id, 'emc_tax_common_core' ); // emc_tax_found, emc_tax_common_core\r\n\t\t} // foreach\r\n\t} // foreach\r\n\treturn $html;\r\n}", "private function entries_pointer() {\n\t\treturn array(\n\t\t\t'content' => '<h3>' . __( 'Entries', 'formidable' ) . '</h3>'\n\t\t\t . '<p>' . __( 'Each time one of your forms is submitted, an entry is created. You will find every form submission listed here so you will always have a backup if an email fails.', 'formidable' ) . '</p>',\n\t\t\t'prev_page' => '',\n\t\t\t'next_page' => 'styles',\n\t\t\t'selector' => '.wp-list-table',\n\t\t\t'position' => array( 'edge' => 'bottom', 'align' => 'center' ),\n\t\t);\n\t}", "function d_getCollectionData($collection) {\n\t$result = array();\n\tforeach($collection as $v) {\n\t\t$item = array();\n\t\tforeach($v as $k2 => $v2) {\n\t\t\t$item[ $k2 ] = $v2;\n\t\t}\n\t\tif (isset($v->fid)) $item['fid'] = $v->fid; \n\t\t$result[] = $item;\n\t}\n\treturn $result;\n}", "abstract protected function _generateDataCollection();", "public function convert( $line );", "function export_destinations( $flush = true ) {\r\n\tglobal $uploadpath;\r\n\tif( !$flush ) {\r\n\t\t$files = array(\r\n\t\t\t$uploadpath.'/datadestinations.json',\r\n\t\t\t$uploadpath.'/datadestinations_ac.json',\r\n\t\t\t$uploadpath.'/dataregions.json',\r\n\t\t\t$uploadpath.'/dataregions_ac.json',\r\n\t\t\t$uploadpath.'/datacities.json',\r\n\t\t\t$uploadpath.'/datacities_ac.json');\r\n\t\tforeach ( $files as $f ) {\r\n\t\t\tif( !file_exists( $f ) ) {\r\n\t\t\t\t$flush = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif(!$flush) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t$destinations = get_terms( 'destinations', array( 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false) );\r\n\r\n\t$regions = array_filter($destinations, function ($t) {\r\n\t\t$destinationstree = get_ancestors( $t->term_id, 'destinations' );\r\n\t\t$destinationstree = array_reverse($destinationstree);\r\n\t\t$destdepth = count($destinationstree);\r\n\t\treturn $destdepth == 1;\r\n\t});\r\n\r\n\t$cities = array_filter($destinations, function ($t) {\r\n\t\t$destinationstree = get_ancestors( $t->term_id, 'destinations' );\r\n\t\t$destinationstree = array_reverse($destinationstree);\r\n\t\t$destdepth = count($destinationstree);\r\n\t\treturn $destdepth == 2;\r\n\t});\r\n\r\n\t$datadestinations = array();\r\n\t$datadestac = array();\r\n\t$dataregions = array();\r\n\t$dataregionsac = array();\r\n\t$datacities = array();\r\n\t$datacitiesac = array();\r\n\t$i = 0;\r\n\r\n\t// cities\r\n\tforeach ( $cities as $term ) {\r\n\t\t$datadestinations[$i][] = $term->term_id;\r\n\t\t$datadestinations[$i][] = $term->slug;\r\n\t\t$datadestinations[$i][] = $term->name;\r\n\r\n\t\t$datacities[$i][] = $term->term_id;\r\n\t\t$datacities[$i][] = $term->slug;\r\n\t\t$datacities[$i][] = $term->name;\r\n\r\n\t\t$datacitiesac[$i][] = $term->name;\r\n\t\t$datacitiesac[$i][] = $term->slug;\r\n\r\n\t\t$datadestac[$i][] = $term->name;\r\n\t\t$datadestac[$i][] = $term->slug;\r\n\r\n\t\t$i++;\r\n\t}\r\n\r\n\t$j = $i;\r\n\r\n\t// regions\r\n\tforeach ( $regions as $term ) {\r\n\t\t$datadestinations[$i][] = $term->term_id;\r\n\t\t$datadestinations[$i][] = $term->slug;\r\n\t\t$datadestinations[$i][] = $term->name;\r\n\r\n\t\t$dataregions[$i-$j][] = $term->term_id;\r\n\t\t$dataregions[$i-$j][] = $term->slug;\r\n\t\t$dataregions[$i-$j][] = $term->name;\r\n\r\n\t\t$dataregionsac[$i-$j][] = $term->name;\r\n\t\t$dataregionsac[$i-$j][] = $term->slug;\r\n\r\n\t\t$datadestac[$i][] = $term->name;\r\n\t\t$datadestac[$i][] = $term->slug;\r\n\r\n\t\t$i++;\r\n\t}\r\n\r\n\t$file = fopen($uploadpath.'/datadestinations.txt', 'w');\r\n\t$headers = array('destination_id','slug','name');\r\n\tfputcsv($file, $headers);\r\n\t\tforeach ($datadestinations as $fields) {\r\n\t\t\tfputcsv($file,$fields);\r\n\t\t}\r\n\tfclose($file);\r\n\r\n\t$jsondestinations = json_encode($datadestinations);\r\n\tfile_put_contents( $uploadpath.'/datadestinations.json', $jsondestinations);\r\n\r\n\t$jsondestinations = json_encode($datadestac);\r\n\tfile_put_contents( $uploadpath.'/datadestinations_ac.json', $jsondestinations);\r\n\r\n\t$jsonregions = json_encode($dataregions);\r\n\tfile_put_contents( $uploadpath.'/dataregions.json', $jsonregions);\r\n\r\n\t$jsonregions = json_encode($dataregionsac);\r\n\tfile_put_contents( $uploadpath.'/dataregions_ac.json', $jsonregions);\r\n\r\n\t$jsoncities = json_encode($datacities);\r\n\tfile_put_contents( $uploadpath.'/datacities.json', $jsoncities);\r\n\r\n\t$jsoncities = json_encode($datacitiesac);\r\n\tfile_put_contents( $uploadpath.'/datacities_ac.json', $jsoncities);\r\n\texport_bookingwidget();\r\n}", "private function getEntries(OutputInterface $output)\n {\n foreach ($this->events as $event) {\n // Event comments.\n $response = $this->client->get($event->comments_uri, ['query' => ['resultsperpage' => 1000]])->getBody();\n $event->event_comments = json_decode($response)->comments;\n\n // Talk comments.\n $response = $this->client->get($event->all_talk_comments_uri, ['query' => ['resultsperpage' => 1000]])->getBody();\n $event->talk_comments = json_decode($response)->comments;\n\n $event->comments = array_merge($event->event_comments, $event->talk_comments);\n\n // Exclude hosts.\n $hosts = $this->hosts;\n $event->entries = array_filter($event->comments, function ($comment) use ($hosts) {\n return !in_array($comment->user_display_name, $hosts);\n });\n\n $this->io->section($event->name);\n\n $elements = [];\n foreach ($event->entries as $comment) {\n $elements[] = vsprintf('%s - %s', [\n $comment->user_display_name,\n substr(str_replace(PHP_EOL, ' ', $comment->comment ?: '<< no comment >>'), 0, 200),\n ]);\n }\n\n $this->io->listing($elements);\n\n $this->entries = array_merge($this->entries, $event->entries);\n }\n }", "public function export_for_template(\\renderer_base $output) {\n $data = array('feeds' => array());\n\n foreach ($this->feeds as $feed) {\n $data['feeds'][] = $feed->export_for_template($output);\n }\n\n return $data;\n }", "function extract(){\n $datamine_row = $datamine_col = $header = array();\n $i = 0; $j = 0;\n \n // Groups all excel data by row\n for ($row = 1; $row <= $this->highestRow; $row++) {\n $rowData = $this->sheet->rangeToArray('A' . $row . ':' . $this->highestColumn . $row, null, true, false);\n if(empty($header)){\n $header=$rowData[0];\n }else{\n for($col=0;$col<count($header);$col++){\n $datamine_row[$i][$header[$col]] = $rowData[0][$col]; \n }\n $i++;\n }\n }\n $this->data_row = $datamine_row;\n \n // Re-group all excel data by column\n foreach($datamine_row as $data){\n foreach($header as $grp){\n $datamine_col[$grp][$j] = $data[$grp];\n }\n $j++;\n }\n $this->data_col = $datamine_col;\n }", "private function normalize_html_head(){\n\n foreach ( (new HEAD_Section_Normalizer())->as_array() as $result)\n {\n\n }\n\n }", "protected function _read() {\n\n $totalClusters = $this->_readShort();\n\n $dataClusters = [ ];\n for ( $i = 0; $i < $totalClusters; $i++ ) {\n\n if( $this->_transport->getProtocolVersion() < 24 ){\n\n $dataClusters[ ] = [\n 'name' => $this->_readString(),\n 'id' => $this->_readShort(),\n 'type' => $this->_readString(),\n 'dataSegment' => $this->_readShort()\n ];\n\n } else {\n $dataClusters[ ] = [\n 'name' => $this->_readString(),\n 'id' => $this->_readShort(),\n ];\n }\n\n }\n\n $clusterList = $this->_transport->getClusterMap();\n $clusterList->configure( array( 'dataClusters' => $dataClusters ) );\n\n return $clusterList;\n }" ]
[ "0.61989355", "0.5280693", "0.5230639", "0.50370914", "0.48981643", "0.48660454", "0.4796196", "0.47830683", "0.47760907", "0.4772455", "0.47413233", "0.458941", "0.4556049", "0.44960174", "0.4491714", "0.44855556", "0.44741055", "0.44662833", "0.44583943", "0.44467956", "0.44431123", "0.443902", "0.44313085", "0.44246477", "0.43777296", "0.43772468", "0.43580598", "0.4337232", "0.43355814", "0.4286156", "0.42443627", "0.42410645", "0.42370078", "0.42364037", "0.41861326", "0.41838303", "0.416495", "0.41549775", "0.41536167", "0.41516718", "0.41429663", "0.41391683", "0.41324854", "0.4124532", "0.41089222", "0.40985784", "0.40979457", "0.40973505", "0.409582", "0.40958026", "0.40936458", "0.40821564", "0.4064361", "0.40614104", "0.40589958", "0.40568495", "0.40437928", "0.40423477", "0.4041391", "0.40397298", "0.40338725", "0.40301496", "0.40283096", "0.40218863", "0.4019479", "0.40165603", "0.39968592", "0.39965048", "0.3995624", "0.39925936", "0.3990642", "0.3984737", "0.3982016", "0.39788467", "0.3978436", "0.39764145", "0.39763", "0.39551553", "0.39549154", "0.3953424", "0.3951575", "0.3951272", "0.39466232", "0.39378032", "0.39326477", "0.39273912", "0.39212367", "0.3919893", "0.3916209", "0.39147058", "0.39129463", "0.3910333", "0.39095995", "0.39074355", "0.3902932", "0.39028436", "0.390093", "0.38984063", "0.3889821", "0.3889256" ]
0.49160236
4
Get downloader types in Composer.
private static function getDownloaderTypes() { return array('git', 'svn', 'fossil', 'hg', 'perforce', 'zip', 'rar', 'tar', 'gzip', 'xz', 'phar', 'file', 'path'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTypeLoaders(): array\n {\n return $this->typeLoaders;\n }", "public function getComposerDependencies(): array;", "public function getSupportedTypesComposerPackage()\n {\n throw new \\BadMethodCallException(__FUNCTION__ . ' is not supported by ' . __CLASS__);\n }", "protected function getTypes() {}", "public function getSupportedFileTypes(){\n\t\t$_url = $this->constants['SERVICE_ENTRY_POINT'].$this->constants['SERVICE_VERSION'].'/'.$this->constants['MISC_PATH'].'/supported-file-types';\n\t\t$response = $this->getRequests($_url)['response'];\n\t\treturn $response;\n\t}", "public static function getTypes();", "public static function getTypes(): array\n {\n return self::getRelevancyTypes();\n }", "static function getTypes(): array\n\t{\n return self::$types;\n }", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public static function getComposer();", "function wp_get_ext_types()\n {\n }", "public function getDependencies()\n {\n return [LoadProductData::class, LoadCategoryData::class];\n }", "public function getClassLoaders();", "public static function get_dependencies_class( $type ) {\n\t\tif ( 'style' === $type ) {\n\t\t\treturn wp_styles();\n\t\t} else {\n\t\t\treturn wp_scripts();\n\t\t}\n\t}", "public static function getTypes() {\n\t\treturn array(self::TYPE_FILE, self::TYPE_SOURCE, self::TYPE_THUMBNAIL);\n\t}", "public function getTypes(): array;", "public function getTypes(): array;", "public function getComposerRequires(): array;", "function sloodle_get_installed_object_types()\n {\n // Fetch all sub-directories of the \"mod\" directory\n \n // Go through each object to parse names and version numbers.\n // Object names should have format \"name-version\" (e.g. \"chat-1.0\").\n // We will skip anything that does not match this format.\n // We will also skip anything with a \"noshow\" file in the folder.\n\n\treturn SloodleObjectConfig::AllAvailableAsNameVersionHash();\n\n }", "public function getTypesFromApi(): array {\n return $this->curlRequest('types');\n }", "public static function GetExportFileTypeList()\n\t{\n\t\t$files = scandir(TYPE_ROOT);\n\n\t\t$types = array();\n\n\t\tforeach($files as $file) {\n\t\t\tif(!is_file(TYPE_ROOT . $file) || isc_substr($file, -3) != \"php\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\trequire_once TYPE_ROOT . $file;\n\n\t\t\t$file = isc_substr($file, 0, isc_strlen($file) - 4);\n\t\t\t/*\n\t\t\t$pos = isc_strrpos($file, \".\");\n\t\t\t$typeName = isc_strtoupper(isc_substr($file, $pos + 1));\n\t\t\t*/\n\t\t\t$className = \"ISC_ADMIN_EXPORTFILETYPE_\" . strtoupper($file); //$typeName;\n\t\t\tif(!class_exists($className)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$obj = new $className;\n\t\t\tif (!$obj->ignore) {\n\t\t\t\t$types[$file] = $obj->GetTypeDetails();\n\t\t\t}\n\t\t}\n\n\t\treturn $types;\n\t}", "protected function getComposerFiles () : array\n {\n $file = new Filesystem();\n\n return $file->glob (base_path ('packages') . '/*/*/composer.json');\n }", "private function getPossibleResolvableTypes(): array\n {\n $suffixTypes = $this->getGacelaConfigFile()->getSuffixTypes();\n\n $resolvableTypes = $suffixTypes[$this->getResolvableType()] ?? $this->getResolvableType();\n\n return is_array($resolvableTypes) ? $resolvableTypes : [$resolvableTypes];\n }", "public function get_types()\n\t{\n\t\treturn array();\n\t}", "public function getDependencies(): array\n {\n return [\n 'invokables' => [\n ],\n 'factories' => [\n // third party\n Adapter::class => AdapterServiceFactory::class,\n CorsMiddleware::class => Middleware\\CorsMiddlewareFactory::class,\n // Handler\n Handler\\AuthorizationTokenHandler::class => Handler\\AuthorizationTokenFactory::class,\n Handler\\ObtainCalcResultHandler::class => Handler\\ObtainCalcResultFactory::class,\n Handler\\StoreCalcResultHandler::class => Handler\\StoreCalcResultFactory::class,\n // Service\n Service\\PreserveNumberOfResultsService::class => Service\\PreserveNumberOfResultsFactory::class,\n Service\\CalcResultExtractingService::class => Service\\CalcResultExtractingFactory::class,\n // Repository\n Repository\\CalcResultsRepository::class => Repository\\CalcResultsFactory::class,\n ],\n ];\n }", "public function get_types()\n\t{\n\t\treturn $this->driver_query('type_list', FALSE);\n\t}", "public function getTypesForDefaultQueue() {\n $types = array(\n ParseGitolite3Logs::NAME,\n MigrateToTuleapSSHKeyManagement::NAME\n );\n\n if ($this->repository_factory->hasGitShellRepositories()) {\n return array_merge(\n $types,\n array(\n SystemEvent_GIT_LEGACY_REPO_ACCESS::NAME,\n SystemEvent_GIT_LEGACY_REPO_DELETE::NAME,\n )\n );\n }\n\n return $types;\n }", "function get_dependencies();", "public function getDownloads($type) {\n\t\treturn StatManager::getAddonDownloads($this->id, $type);\n\t}", "public function getTypes(): array\n {\n return $this->types;\n }", "public function getFileTypes() {\r\n return $this->fileTypes;\r\n }", "protected function _listTypes()\n {\n global $config;\n $types = objects::types();\n\n $result = array();\n foreach ($types as $type) {\n $infos = objects::infos($type);\n $result[$type] = $infos['name'];\n }\n return $result;\n }", "private function getAvailableStrategies() {\n\t\t$availableStrategies = array();\n\t\t$path = APP . 'Lib' . DS . 'Migrations' . DS;\n\t\tforeach (new \\DirectoryIterator($path) as $info) {\n \t\t\tif ($info->isDot()) {\n \t\t\t\tcontinue;\n \t\t\t}\n\n \t\t\tif (preg_match('/Strategy\\.php/', $info->getBasename())) {\n \t\t\t\t$type = str_replace('Strategy.php', '', $info->getBasename());\n \t\t\t\t$availableStrategies[] = strtolower($type);\n \t\t\t}\n\t\t}\n\n\t\treturn $availableStrategies;\n\t}", "public function get_desired_types();", "function getInfo()\n {\n return array(\n 'releasetypes' => array('php', 'extsrc', 'extbin', 'bundle'),\n 'installable' => true,\n 'locationconfig' => false,\n 'honorsbaseinstall' => true,\n 'unusualbaseinstall' => false,\n 'phpfile' => false,\n 'executable' => false,\n 'phpextension' => false,\n );\n }", "public function getDependencies(): array;", "function getComposerFileData()\n{\n $arr = [];\n $arr['autoload']['files'] = ['src/Arrays.php'];\n $arr['config'] = ['vendor-dir' => '/composer/vendor'];\n return $arr;\n}", "public static function getTypes()\n {\n return [\n // Listings Reports\n '_GET_FLAT_FILE_OPEN_LISTINGS_DATA_',\n '_GET_MERCHANT_LISTINGS_DATA_',\n '_GET_MERCHANT_LISTINGS_DATA_BACK_COMPAT_',\n '_GET_MERCHANT_LISTINGS_DATA_LITE_',\n '_GET_MERCHANT_LISTINGS_DATA_LITER_',\n '_GET_MERCHANT_CANCELLED_LISTINGS_DATA_',\n '_GET_CONVERGED_FLAT_FILE_SOLD_LISTINGS_DATA_',\n '_GET_MERCHANT_LISTINGS_DEFECT_DATA_',\n\n // Order Reports\n '_GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_',\n '_GET_ORDERS_DATA_',\n '_GET_FLAT_FILE_ORDERS_DATA_',\n '_GET_CONVERGED_FLAT_FILE_ORDER_REPORT_DATA_',\n\n // Order Tracking Reports\n '_GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_',\n '_GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_',\n '_GET_XML_ALL_ORDERS_DATA_BY_LAST_UPDATE_',\n '_GET_XML_ALL_ORDERS_DATA_BY_ORDER_DATE_',\n\n // Pending Order Reports\n '_GET_FLAT_FILE_PENDING_ORDERS_DATA_',\n '_GET_PENDING_ORDERS_DATA_',\n '_GET_CONVERGED_FLAT_FILE_PENDING_ORDERS_DATA_',\n\n // Performance Reports\n '_GET_SELLER_FEEDBACK_DATA_',\n '_GET_V1_SELLER_PERFORMANCE_REPORT_',\n\n // Settlement Reports\n '_GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_',\n '_GET_V2_SETTLEMENT_REPORT_DATA_XML_',\n '_GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2_',\n\n // Fulfillment By Amazon (FBA) Reports\n // FBA Sales Reports\n '_GET_AMAZON_FULFILLED_SHIPMENTS_DATA_',\n '_GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_',\n '_GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_',\n '_GET_XML_ALL_ORDERS_DATA_BY_LAST_UPDATE_',\n '_GET_XML_ALL_ORDERS_DATA_BY_ORDER_DATE_',\n '_GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_SALES_DATA_',\n '_GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_PROMOTION_DATA_',\n '_GET_FBA_FULFILLMENT_CUSTOMER_TAXES_DATA_',\n\n // FBA Inventory Reports\n '_GET_AFN_INVENTORY_DATA_',\n '_GET_AFN_INVENTORY_DATA_BY_COUNTRY_',\n '_GET_FBA_FULFILLMENT_CURRENT_INVENTORY_DATA_',\n '_GET_FBA_FULFILLMENT_MONTHLY_INVENTORY_DATA_',\n '_GET_FBA_FULFILLMENT_INVENTORY_RECEIPTS_DATA_',\n '_GET_RESERVED_INVENTORY_DATA_',\n '_GET_FBA_FULFILLMENT_INVENTORY_SUMMARY_DATA_',\n '_GET_FBA_FULFILLMENT_INVENTORY_ADJUSTMENTS_DATA_',\n '_GET_FBA_FULFILLMENT_INVENTORY_HEALTH_DATA_',\n '_GET_FBA_MYI_UNSUPPRESSED_INVENTORY_DATA_',\n '_GET_FBA_MYI_ALL_INVENTORY_DATA_',\n '_GET_FBA_FULFILLMENT_CROSS_BORDER_INVENTORY_MOVEMENT_DATA_',\n '_GET_FBA_FULFILLMENT_INBOUND_NONCOMPLIANCE_DATA_',\n '_GET_STRANDED_INVENTORY_UI_DATA_',\n '_GET_STRANDED_INVENTORY_LOADER_DATA_',\n '_GET_FBA_INVENTORY_AGED_DATA_',\n '_GET_EXCESS_INVENTORY_DATA_',\n\n // FBA Payments Reports\n '_GET_FBA_ESTIMATED_FBA_FEES_TXT_DATA_',\n '_GET_FBA_REIMBURSEMENTS_DATA_',\n\n // FBA Customer Concessions Reports\n '_GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA_',\n '_GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_REPLACEMENT_DATA_',\n\n // FBA Removals Reports\n '_GET_FBA_RECOMMENDED_REMOVAL_DATA_',\n '_GET_FBA_FULFILLMENT_REMOVAL_ORDER_DETAIL_DATA_',\n '_GET_FBA_FULFILLMENT_REMOVAL_SHIPMENT_DETAIL_DATA_',\n\n // Sales Tax Reports\n '_GET_FLAT_FILE_SALES_TAX_DATA_',\n\n // Browse Tree Reports\n '_GET_XML_BROWSE_TREE_DATA_',\n ];\n }", "function mimetypes()\n {\n return json_decode(file_get_contents(__DIR__.'/../../resources/data/mimetypes.json'), true);\n }", "public function getDependencies(): array\n {\n return [\n CityFixtures::class,\n ];\n }", "public function getFileTypes()\n {\n return $this->fileTypes;\n }", "public function get_types()\n {\n }", "public function getDependencies() {}", "public function getDependencies(): array\r\n {\r\n return [\r\n 'factories' => [\r\n 'Admin\\Action\\Post\\Admin' => User\\Factory\\Action\\Post\\Admin::class,\r\n 'Admin\\Action\\Form\\Admin' => User\\Factory\\Action\\Form\\Admin::class,\r\n 'Admin\\User\\Action\\View\\ResultSet' => User\\Factory\\Action\\View\\ResultSet::class,\r\n ]\r\n ];\r\n }", "function papi_get_all_core_type_files() {\n\treturn papi()->once( __FUNCTION__, function() {\n\t\t$directories = papi_filter_settings_directories();\n\t\t$result = [];\n\n\t\tforeach ( $directories as $directory ) {\n\t\t\t$result = array_merge( $result, papi_get_all_files_in_directory( $directory ) );\n\t\t}\n\n\t\t// Get the last file path from directories.\n\t\t$result = array_map( 'papi_get_core_type_file_path', $result );\n\n\t\t// Only unique path, no duplicated path is allowed.\n\t\treturn array_unique( $result );\n\t} );\n}", "public function getDependencies()\n {\n return[\n DegreeFixtures::class,\n YearFixtures::class\n ];\n\n }", "function get_importers()\n {\n }", "public static function swaggerTypes() {\n\t\treturn self::$swaggerTypes;\n\t}", "static public function getThemeResourceTypes();", "protected function get_available_compression_methods()\n\t{\n\t\t$methods[] = array(\n\t\t\t'value'\t\t=> '.tar',\n\t\t\t'label'\t\t=> '.tar',\n\t\t\t'selected'\t=> true,\n\t\t);\n\n\t\tforeach ($this->available_methods as $type => $module)\n\t\t{\n\t\t\tif (!@extension_loaded($module))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$methods[] = array(\n\t\t\t\t'value'\t\t=> $type,\n\t\t\t\t'label'\t\t=> $type,\n\t\t\t\t'selected'\t=> false,\n\t\t\t);\n\t\t}\n\n\t\treturn $methods;\n\t}", "public static function getTypes(): array {\n\t\treturn ['pizza'];\n\t}", "function qa_list_module_types()\n{\n\treturn array_keys(qa_list_modules_info());\n}", "protected function loadTypes()\n {\n return array(\n new RecaptchaType(\n $this->app['salberts_recaptcha2.public_key'],\n $this->app['salberts_recaptcha2.enabled'],\n $this->app['salberts_recaptcha2.ajax'],\n $this->app['salberts_recaptcha2.locale_key']\n )\n );\n }", "public static function swaggerTypes() {\n return self::$swaggerTypes;\n }", "public static function types()\n {\n return self::$types;\n }", "public function getPackages(): array\n {\n return $this->packagesClasses;\n }", "public function getDependencies();", "public function getImports();", "public static function getTypes()\n {\n return [\n ModelRegistry::TRANSACTION => ModelRegistry::getById(ModelRegistry::TRANSACTION)->label,\n ModelRegistry::PRODUCT => ModelRegistry::getById(ModelRegistry::PRODUCT)->label,\n ];\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }" ]
[ "0.6339156", "0.60351616", "0.5951606", "0.5896058", "0.58784753", "0.5802125", "0.5765444", "0.57297313", "0.56952935", "0.56952935", "0.56952935", "0.56952935", "0.56921214", "0.56669384", "0.5649522", "0.564113", "0.56166685", "0.56142694", "0.5602435", "0.5602435", "0.55915815", "0.55817", "0.55676275", "0.55565786", "0.5554544", "0.55446804", "0.5505931", "0.54800045", "0.5448128", "0.54255337", "0.54210234", "0.54186064", "0.5415508", "0.5367596", "0.53593373", "0.5358709", "0.53518623", "0.5337977", "0.5334972", "0.5318386", "0.53141856", "0.53080577", "0.53069377", "0.5305665", "0.5301752", "0.53017443", "0.52966475", "0.52856094", "0.5284638", "0.5281741", "0.528012", "0.5277235", "0.5258984", "0.52588665", "0.52561235", "0.5247846", "0.5231976", "0.52202094", "0.52192426", "0.5219081", "0.52185816", "0.5214425", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911", "0.5212911" ]
0.77381843
0
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
public function __construct() { parent::__construct(); cek_login(); $this->load->model('home_mod'); $this->load->model('branch_mod'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome';\r\n\t\t$this->template->content = View::factory('index');\r\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function indexAction()\n\t{\n\t\t//echo 'Hello from the index action in the Home controller!';\n\t\t\n\t\t/*View::render('Home' . DS . 'index.php', [\n\t\t\t\"name\" => \"Laura\",\n\t\t\t\"colours\" => [\"red\", \"green\", \"blue\"]\n\t\t]);*/\n\t\t\n\t\t// View::renderTemplate('Home' . DS . 'index.html', [\n\t\t// \t\"name\" => \"Laura\",\n\t\t// \t\"colours\" => [\"red\", \"green\", \"blue\"]\n // ]);\n \n\t\t$this->showRouteParams();\n\t\t// echo \"Hello, World!\";\n }", "public function index()\n\t{\n\t\t//Default view\n\t\t$this->load->view('index.html');\n\t}", "function index() {\n\n // This page cannot be accessed without providing a page\n // the routes.php file will not allow the page to be accessed\n // $route['pages/(:any)'] = 'pages/view/$';\n redirect('/', 'refresh');\n\n }", "public function Index()\n\t{\n\t\t$this->views->SetTitle('Index Controller');\n\t\t$this->views->AddView('index/index.tpl.php', array(),'primary');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('default/index');\n\t}", "public function index() {\n\t\t$this->display('index');\n\t}", "public function index()\n\t{\t\n\n\t\t$this->load->view('welcome_message');\n\t}", "public function indexAction()\n {\n $arr = [\n 'title' => 'Welcome',\n 'data' => [\n 'name' => 'PHP FRAMEWORK',\n ]\n ];\n View::renderTemplate('Welcome/index.html', $arr);\n }", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n }", "public function show_index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function Index()\n {\n $this->standardView('Index');\n }", "public function index()\n {\n return view('main.welcome');\n }", "public function index()\n {\n // return view('welcome');\n }", "public function index()\n {\n $this->load->view('index');\n }", "public function index()\n {\n // return view('welcome');\n \n }", "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "public function index()\n\t{\n\t\techo \"Nothing !\";\n\t}", "public function index() {\n \n return view('welcome');\n }", "public function index()\n {\n return view('pages.welcome');\n }", "public function Index()\n {\n \treturn view(\"index\");\n\t}", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n\t\t/*$this->layout->setTitle('Welcome to our Blog');\n\t\t$this->layout->showView('welcome/about.php');*/\n\t\techo 'hello I\\'m using codeigniter';\n }", "public function index() {\n\n\t\tif(!empty($_GET['page'])) {\n\t\t\tif($_GET['page'] == 'home') {\n\t\t\t\t(new HomeController)->home();\n\t\t\t} elseif($_GET['page'] == 'about-me') {\n\t\t\t\t(new HomeController)->aboutMe();\n\t\t\t}\n\t\t} else {\n\t\t\t(new HomeController)->home();\n\t\t}\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\treturn view('pages/home');\n\t}", "public function index()\n {\n return \"INDEX PAGE\";\n }", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n {\n SEOMeta::setTitle('Trusted Mortgage & Remortgage Solutions In UK - SmartMortgages UK');\n SEOMeta::setDescription('Home Page Description: For competitive mortgage and remortgage quotes around the UK at affordable rates, speak to one of our expert credit consultants and get a mortgage. For more visit us today.');\n\n return view('welcome');\n }", "function index() {\n \n parent::index();\n\n\t\t$data['user_id'] = $this->tank_auth->get_user_id();\n\t\t$data['username'] = $this->tank_auth->get_username();\n\t\t$data['main_content_view'] = $this->load->view('welcome', $data, true);\n $this->render_template($data);\n\t}", "public function index()\n\t{\n\t\t$this->title = 'My Index Action';\n\n\t\treturn new View('basic/index');\n\t}", "public function index()\n\t{\n\t\t$data['title'] = 'Home | Welcome to AEY';\n\t\t$data ['view_page'] = 'homepage';\n\n\t\t$this->load->view('site', $data);\n\t}", "public function index()\n {\n\n return view('welcome');\n\n }", "public function actionIndex(){ \n $this->view(\"index.php\");\n }", "public function index() {\n $this->registry->template->module = 'welcome';\n \n /*** load the index template ***/\n $this->registry->template->show('index');\n }", "public function actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}", "public function index()\n {\n return view('front.welcome');\n }", "public function index()\n\t{\n\t\treturn $this->traces();\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\t$this->loadViews(\"index\");\n\t}", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('home/home');\n\t}", "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function index()\r\n\t{\r\n\t\techo \"index\";\r\n\t}", "public function index()\n\t{\n\t\t$this->twig->display('welcome/index.html', []);\n\t}", "public function Index() {\n $this->Display();\n }", "public function index()\r\n {\r\n View::render('home');\r\n }", "public function index()\n {\n $title = 'Welcome Page';\n return view($this->view . '.home', compact('title'));\n }", "public function index()\n\t{\n\t\t//\n\t\techo'index';\n\t}", "public function index() {\n $this->getView('navigation', array('pagename' => 'Welcome'));\n $this->getView('welcome');\n $this->getView('footer');\n }", "public function index()\n {\n return view(\"home\");\n }", "public function home()\n\t{\n\t\t$this->load->view('index_view');\n\t}", "function index() {\n $this->renderView(\"index\");\n }", "public function index()\n\t{\n\t\treturn view('index');\n\t}", "function index()\r\n\t{\r\n\t\t$this->view(); \r\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n\n\n\n return view('welcome');\n }", "public function index() {\n\t\t$page = Page::getInstance();\n\t\t$session = Session::getInstance();\n\t\t$page->setPageTitle('Method index notfound');\n\t\t$session->setFlash('Chaque controller doit avoir une m&eacute;thode index', 'error');\n\t}", "public function index()\r\n\t{\r\n\t\t//\r\n\t}", "public function index() {\n\t\t// render the view (/view/main/index.php)\n\t\t$this->view->render(\"main\", \"index\");\n\t}", "public function index()\n {\n return View(\"pages.home\");\n }", "public function index()\n {\n // Nothing to do\n }", "public function index(){\n return view('welcome');\n }", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}", "public function index()\n\t{\n\t\t//\n\t}" ]
[ "0.7655508", "0.74145436", "0.7396173", "0.7317418", "0.72283363", "0.72283363", "0.71903646", "0.7166857", "0.7151917", "0.7145717", "0.7108151", "0.70780236", "0.70754886", "0.70406276", "0.70306057", "0.70306057", "0.70306057", "0.70306057", "0.70306057", "0.69742966", "0.6968103", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69477713", "0.69316655", "0.6926416", "0.6911975", "0.6901835", "0.6894632", "0.6876047", "0.6858327", "0.68569815", "0.68399274", "0.6803998", "0.6802956", "0.6802956", "0.6796031", "0.6790225", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6767983", "0.6766831", "0.6764303", "0.6761992", "0.6761992", "0.67514986", "0.675126", "0.67485875", "0.67429", "0.67388356", "0.6729889", "0.6717446", "0.67143476", "0.6711851", "0.6704955", "0.6700333", "0.6693287", "0.66756153", "0.666292", "0.6661336", "0.6650874", "0.66305923", "0.6622069", "0.661396", "0.66047865", "0.6598352", "0.6595009", "0.65937525", "0.65860605", "0.65768355", "0.6576564", "0.657412", "0.65545326", "0.6547276", "0.6545392", "0.6544484", "0.65438914", "0.654184", "0.6517758", "0.65157586", "0.65157586", "0.65157586", "0.65157586" ]
0.0
-1
Liste les noms des fichiers
private function deleteDirectory($path) { $files = glob('../' . $path . '/*'); //Supprime les fichiers foreach ($files as $file) { // iterate files if (is_file($file)) { unlink($file); // delete file } } //suppression du dossier vide if (is_dir('../' . $path)) { rmdir('../' . $path); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFileNames();", "private function getAllFileNames(): Collection\n {\n return collect(File::allFiles(config('deepl.lang_directory') . '/' . app()->getLocale()))\n ->map(function (SplFileInfo $file) {\n return $file->getFilenameWithoutExtension();\n });\n }", "public function listFiles() {\r\n $list = ftp_nlist($this->connessione, '.');\r\n return $list;\r\n }", "function get_list_of_files() {\n $result = $this->pdo->query('SELECT * FROM files ORDER BY filename ASC');\n return $result;\n }", "private function getFilenames() {\n $result = [];\n $files = scandir($this->tmpFolder);\n foreach ($files as $v) {\n if($v != '.' && $v != '..' && '__MACOSX') {\n $result[] = $v;\n }\n }\n\n return $result;\n }", "protected function getModuleFileNames()\n {\n $results = db_query('SELECT name, filename FROM {system} WHERE status = 1 ORDER BY weight ASC, name ASC')->fetchAllAssoc('name');\n\n return array_map(function ($value) {\n return DRUPAL_ROOT.DIRECTORY_SEPARATOR.$value->filename;\n }, $results);\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/jestr.php',\n 'sources_custom/forum/cns.php',\n 'lang_custom/EN/jestr.ini',\n 'themes/default/templates_custom/EMOTICON_IMG_CODE_THEMED.tpl',\n 'forum/pages/modules_custom/topicview.php',\n 'sources_custom/hooks/systems/config/jestr_avatar_switch_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_emoticon_magnet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_leet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_piglatin_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes_shown_for.php',\n );\n }", "abstract function list_files($path = '.');", "function list_files () {\n\t\t$root = $this->get_root();\n\t\t\n\t\treturn $this->_list_files($root);\n\t}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/wiki_sync.php',\n '_tests/tests/unit_tests/wiki_sync.php',\n 'lang_custom/EN/wiki_sync.ini',\n 'sources_custom/wiki_sync.php',\n 'sources_custom/hooks/systems/config/wiki_alt_changes_link_stub.php',\n 'sources_custom/hooks/systems/config/wiki_enable_git_sync.php',\n 'sources_custom/hooks/systems/config/wiki_enable_wysiwyg.php',\n 'sources_custom/hooks/systems/config/wiki_sync_media_directory.php',\n 'sources_custom/hooks/systems/config/wiki_sync_page_directory.php',\n 'sources_custom/hooks/systems/cron/wiki_sync_git.php',\n 'sources_custom/hooks/systems/notifications/wiki_failed_git_pull.php',\n 'sources_custom/wiki.php',\n 'site/pages/modules_custom/wiki.php',\n 'cms/pages/modules_custom/cms_wiki.php',\n );\n }", "protected function getFileList()\n\t\t{\n\t\t\t$dirname=opendir($this->ruta);\n\t\t\t$files=scandir($this->ruta);\n\t\t\tclosedir ($dirname);\t\n\t\t\t\n\t\t\treturn $files;\t\t\n\t\t}", "public function listCommand() {\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\t$this->outputLine($file->getFilename());\n\t\t\t}\n\t\t}\n\n\t\t$this->outputLine();\n\t\t$this->outputLine(sprintf('%s temporary file(s).', $counter));\n\t}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/trickstr.php',\n 'sources_custom/programe/.htaccess',\n 'sources_custom/programe/aiml/.htaccess',\n 'sources_custom/programe/aiml/index.html',\n 'sources_custom/programe/index.html',\n 'sources_custom/hooks/modules/chat_bots/knowledge.txt',\n 'sources_custom/hooks/modules/chat_bots/trickstr.php',\n 'sources_custom/programe/aiml/readme.txt',\n 'sources_custom/programe/aiml/startup.xml',\n 'sources_custom/programe/aiml/std-65percent.aiml',\n 'sources_custom/programe/aiml/std-pickup.aiml',\n 'sources_custom/programe/botloaderfuncs.php',\n 'sources_custom/programe/customtags.php',\n 'sources_custom/programe/db.sql',\n 'sources_custom/programe/graphnew.php',\n 'sources_custom/programe/respond.php',\n 'sources_custom/programe/util.php',\n );\n }", "public function getFiles ();", "public function listAll()\n {\n $files = \\Core\\File\\System::listFiles($this->_getPath(), \\Core\\File\\System::EXCLUDE_DIRS);\n $result = [];\n foreach (array_keys($files) as $file) {\n $result[] = pathinfo($file, PATHINFO_FILENAME);\n }\n return $result;\n }", "public function provideFileAnExpectedNames()\n {\n return [\n [__FILE__, pathinfo(__FILE__, PATHINFO_FILENAME)],\n ['.htaccess', ''],\n ['name', 'name'],\n ['a.combined.filename.with.multiple.ext.separator', 'a.combined.filename.with.multiple.ext']\n ];\n }", "function _generateFilesList() {\n return array();\n }", "public function getFiles();", "public function getFiles();", "public function getFiles();", "public function files();", "public function files();", "public function files();", "static function namelist($dir, $ext=null, $stream=null) \n {\n $dir=rtrim($dir, '/\\\\').'/';\n $namelist=array();\n $handle = opendir($dir);\n if (!$handle) return $filename;\n while (false !== ($entry = readdir($handle))) {\n if ($entry[0]=='.' || $entry[0]=='_') continue;\n if ($entry=='teiheader' || $entry=='onix') continue;\n $file=$dir.$entry;\n if (is_file($file)) {\n if ($ext && $ext != pathinfo($file, PATHINFO_EXTENSION) ) continue; \n $name=pathinfo($file, PATHINFO_FILENAME);\n if (!isset($namelist[$name])) $namelist[$name] = array();\n else if ($stream) {\n fwrite($stream, \"Namelist: $name is not unique ($file)\\n\");\n }\n $namelist[$name][] = $file;\n }\n if (is_dir($file)) {\n $namelist=array_merge($namelist, self::namelist($file));\n }\n }\n return $namelist;\n }", "function _get_filenames($path) {\n $finderFiles = Finder::create()->files()->in($path)->name('*.php');\n $filenames = array();\n foreach ($finderFiles as $finderFile) {\n $filenames[] = \"App\\\\Discount\\\\\".$this->_get_classname($finderFile->getRealpath());\n }\n\n return $filenames;\n }", "public function listFileNames(callable $filter = null): array\n {\n return iterator_to_array($this->scanFileNames($filter));\n }", "private function getFilenames()\n\t{\n\t\t$filenames = array();\n\n\t\tforeach ($this->filesets as $fileset)\n\t\t{\n\t\t\t$ds = $fileset->getDirectoryScanner($this->project);\n\t\t\t$ds->scan();\n\n\t\t\t$files = $ds->getIncludedFiles();\n\n\t\t\tforeach ($files as $file)\n\t\t\t{\n\t\t\t\t$filenames[] = $ds->getBaseDir() . \"/\" . $file;\n\t\t\t}\n\t\t}\n\n\t\treturn $filenames;\n\t}", "public function ShowFiles() {\n $i = 0;\n if ($handle = opendir($this->filePath)) {\n while (false !== ($file = readdir($handle))) {\n if (($file != '..') && ($file != '.') && ($file != 'Thumbs.db')) {\n $files[$i] = $file;\n $i++;\n }\n }\n closedir($handle);\n }\n return($files);\n }", "public function listFiles($dir);", "public function getPrintFiles()\n {\n $key = $this->specification->key;\n\n $files = glob(storage_path('prints' . DIRECTORY_SEPARATOR . $key . DIRECTORY_SEPARATOR . '*.docx'));\n $file_names = array_map('basename', $files);\n\n return $file_names;\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/idolisr.php',\n 'sources_custom/hooks/modules/members/idolisr.php',\n 'sources_custom/miniblocks/main_stars.php',\n 'sources_custom/miniblocks/side_recent_points.php',\n 'themes/default/templates_custom/POINTS_GIVE.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_STARS.tpl',\n 'themes/default/templates_custom/BLOCK_SIDE_RECENT_POINTS.tpl',\n );\n }", "public function list_owned_files() {\n $stmt = $this->pdo->prepare('select filename from file where user_id = :id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, $f['filename']);\n }\n return $result;\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/google_search.php',\n 'lang_custom/EN/google_search.ini',\n 'sources_custom/blocks/side_google_search.php',\n 'sources_custom/blocks/main_google_results.php',\n 'themes/default/templates_custom/BLOCK_SIDE_GOOGLE_SEARCH.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_GOOGLE_SEARCH_RESULTS.tpl',\n 'themes/default/css_custom/google_search.css',\n 'pages/comcode_custom/EN/_google_search.txt',\n );\n }", "public function browse_files()\n {\n // Scan file directory, render the images.\n if (is_dir($this->file_path)) {\n $files = preg_grep('/^([^.])/', scandir($this->file_path));\n return $files;\n }\n \n }", "function list_all_files($path) {\n\t\t\t$files = scandir($path);\n\t\t\tprint_r($files);\n\t\t}", "function getLanguageFiles() {\n $directory = \"models/languages/\";\n $languages = glob($directory . \"*.php\");\n //print each file name\n return $languages;\n}", "public function fileList()\n {\n return array_values(array_diff(scandir($this->location), ['.', '..']));\n }", "function getListOfFiles(){\n $result = \"\";\n $directoryFiles = scandir(\"uploads/\");\n $amount = count($directoryFiles);\n if($amount > 2){\n $result .= '<div class=\"listFile\"><ul class=\"blue\">'; \n $r = 0;\n for ($i = 2; $i < $amount; $i++) { \n $r++;\n if (preg_match(\"/(jpg|jpeg|png|gif)$/\", $directoryFiles[$i])) {\n $result .= '<li><a href=\"uploads/'. $directoryFiles[$i] . '\" download><img class=\"minIcon\" src=\"uploads/'.\n $directoryFiles[$i] . '\" alt=\"' . $directoryFiles[$i] . '\">';\n $filesize = filesize('uploads/'. $directoryFiles[$i]);\n $newFileSize = convertFileSize($filesize);\n $result .= '<span>' . $directoryFiles[$i] . ' (Size is: ' . $newFileSize . ')</span></a></li>';\n } \n }\n $result .= '</ul></div>';\n }\n\n return $result; \n }", "function fileList(){\n\t\tchdir('./../cloud/books/'); //Move to template directory\n\t\t\n\t\tif ($handle = opendir(getcwd())) { //Open dir\n\t\t echo '<ul class=\"list-group\">';\n\t\t while (false !== ($entry = readdir($handle))) { //While directory not end - return files list\n\t\t \tif ($entry != \".\" && $entry != \".DS_Store\" && $entry != \"..\") { //Filter trash\n\t\t \t\tif(is_dir($entry)){ //IF dir then return button with folder icon \n\t\t \t\t\techo '<a href=\"#\" class=\"list-group-item cat\"><i class=\"fa fa-folder-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t}else{ //else return file button\n\t\t \t\t\t$FileInfo = new SplFileInfo($entry); //Get file info\n\t\t \t\t\t$ext = $FileInfo->getExtension(); //Get file extension\n\t\t \t\t\tif($ext == \"png\" or $ext == \"jpg\" or $ext == \"bmp\") //IF file is image then return button with image icon\n\t\t \t\t\t\techo '<a href=\"/files/cloud/books/'.$entry.'\" class=\"list-group-item file\"><i class=\"fa fa-file-image-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t\telse //Else return button with file-code icon\n\t\t \t\t\t\techo '<a href=\"/files/cloud/books/'.$entry.'\" class=\"list-group-item file\"><i class=\"fa fa-file-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t echo '</ul>';\n\t\t closedir($handle); //Close dir\n\t\t}\n\t}", "public function getMessagesFileName()\n {\n $names = [];\n foreach ($this->_messages as $message) {\n $names[] = $message['file'];\n }\n\n return $names;\n }", "function getdirfilesname($dir) {\n $namearr = scandir($dir);\n $namearr = array_diff($namearr, array('..', '.'));\n var_dump($namearr);\n}", "public function getFiles()\n\t{\n\t\tif ($this->_files === null) {\n\t\t\t$command = 'show --pretty=\"format:\" --name-only '.$this->hash;\n\t\t\tforeach(explode(\"\\n\",$this->repository->run($command)) as $line) {\n\t\t\t\t$this->_files[] = trim($line);\n\t\t\t}\n\t\t}\n\t\treturn $this->_files;\n\t}", "public function getFilenames(): array\n {\n $filenames = $this->getEntityManager()->getConnection()->createQueryBuilder()\n ->from('image')\n ->select('DISTINCT CONCAT(\"data/images/\", filename)')\n ->where('filename != \"\"')\n ->orderBy('filename')->execute()->fetchAll(\\PDO::FETCH_COLUMN);\n\n return $filenames;\n }", "public function getNameFil()\n\t {\n\t return $this->nameFile;\n\t }", "public function getFiles() {}", "public function getFiles($name = null);", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/purrrr.php',\n 'data_custom/images/lolcats/index.html',\n 'data_custom/images/lolcats/thumbs/index.html',\n 'data_custom/images/lolcats/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/ridiculous_poses_moddles.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/thumbs/ridiculous_poses_moddles.jpg',\n );\n }", "function llista_carpeta($ruta,$extensions)\n{\n\t$llistat=array();\n\t$extensions=var2array($extensions,',');\n\tif ($handle = opendir($ruta))\n\t{\n\t\twhile (false !== ($file = readdir($handle)))\n\t\t{\n\t\t\tforeach ($extensions as $extensio)\n\t\t\t{\n\t\t\t\t$tipus=filetype(\"$ruta/$file\");\n\t\t\t\tif ($extensio=='.' && $tipus==='dir' && $file != \".\" && $file != \"..\" || substr($file, strrpos($file, '.')+1) == $extensio && $tipus==='file')\n\t\t\t\t\t{$llistat[]=$file;break;}\n\t\t\t}\n\t\t}\n\t}\n\treturn $llistat;\n}", "public function get_names() {\n return String_util::get_lines(Text_file::read($this->_storage_path));\n }", "public function list_of_fileuploads() {\n $request = $_GET;\n $result = $this->fileupload_model->load_list_of_fileuploads($request, array());\n $result = getUtfData($result);\n echo json_encode($result);\n exit;\n }", "function file_list($d,$x){\r\n foreach(array_diff(scandir($d),array('.','..')) as $f)if(is_file($d.'/'.$f)&&(($x)?ereg($x.'$',$f):1))$l[]=$f;\r\n return $l;\r\n}", "function ajaxlistfiles(){\n\n\t\t//Glob all files in uploaddir\n\t\t$files = array();\n\t\tforeach(glob($this->uploaddir.'*') as $file){\n\n\t\t\t//Strip path\n\t\t\t$filename = str_replace($this->uploaddir,'',$file);\n\n\t\t\t$files[$filename]['filename']=$filename;\n\t\t\t$files[$filename]['filesize']=filesize($file) / 1024 / 1024; //Mb\n\t\t\t$files[$filename]['modified']=filemtime($file); //Mb\n\n\t\t\t//Check torrent\n\t\t\tif( file_exists( $this->torrentdir.$filename.'.torrent' )){\n\n\t\t\t\t//Add torrent file\n\t\t\t\t$files[$filename]['torrent']=$filename.'.torrent';\n\n\t\t\t\t//Check database table phptracker_peers for torrent peers:\n\t\t\t\tif($torrent = $this->Torrent->findByName($filename)){\n\t\t\t\t\tif($peers = $this->Peer->findAllByInfoHash($torrent['Torrent']['info_hash'])){\n\t\t\t\t\t\t$files[$filename]['peers']=$peers;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->set('files',$files);\n\n\t\t$this->layout = 'ajax';\n\t}", "function file_list($d,$x) {\n foreach(array_diff(scandir($d),array('.','..')) as $f)if(is_file($d.'/'.$f)&&(($x)?ereg($x.'$',$f):1))$l[]=$f;\n return $l;\n}", "protected function getFilesByName($filename)\n\t{\n\t\t$sql = <<<SQL\n\t\tSELECT\n\t\t\t*\n\t\tFROM\n\t\t\toxfiles\n\t\tWHERE\n\t\t\tOXFILENAME = ?\nSQL;\n\t\t//$sql = sprintf($sql);\n\t\treturn R::getAll($sql, array($filename));\n\t}", "function getLanguageFiles()\r\n{\r\n\t$directory = \"models/languages/\";\r\n\t$languages = glob($directory . \"*.php\");\r\n\t//print each file name\r\n\treturn $languages;\r\n}", "function get_list_lfiles($dir){\n\t\tif(!is_dir(APPPATH.\"language/$dir/\")){\n\t\t\treturn FALSE;\n\t\t}\n\t\t$dir = APPPATH.\"language/$dir/\";\n\t\t$dh = opendir($dir);\n\t\twhile (false !== ($filename = readdir($dh))) {\n\t\t\tif($filename!=='.' && $filename!=='..' && !is_dir($dir.$filename) && pathinfo($filename, PATHINFO_EXTENSION)=='php' && substr($filename,0,7)!='backup_'){\n\t\t\t\t$files[] = $filename;\n\t\t\t}\n\t\t}\n\t\treturn (!empty($files))?$files:FALSE;\n\t}", "public function getAltFileSystemNames()\n\t{\n\t\treturn array(\n\t\t\t\t'x264_LQ',\n\t\t\t\t'x264_HQ',\n\t\t\t\t'webm_LQ',\t\t\t\t\n\t\t\t\t'webm_HQ',\n 'Mezzanine'\n\t\t);\n\t}", "public function getList() {\n\t\treturn Cgn_Module_Manager_File::getListStatic();\n\t}", "private function getUploadedFiles()\n {\n $list = array();\n \n if(isset($_REQUEST['files']))\n {\n $files = explode('::', $_REQUEST['files']);\n foreach($files as $index => $item)\n {\n list($name, $src, $size) = explode(':', $item);\n \n $list[] = array(\n 'name' => $name,\n 'src' => $src,\n 'size' => $size \n );\n }\n }\n \n return $list;\n }", "private function _listFile($val) {\n\t\t\n\t\t$path = g($val, 'path');\n\t\t$name = g($val, 'name');\n\t\t\n\t\t$mypath = $this->_sanitize($path . '/' . $name);\n\t\t\n\t\tif (!file_exists($this->_path($mypath))) return;\n\t\t\t\n\t\t$ext = strtolower(pathinfo($this->_path($mypath), PATHINFO_EXTENSION));\n\t\tif (is_array(g($this->conf, 'ext')) && !in_array($ext, g($this->conf, 'ext'))) return; //extension not match\n\t\t\n\t\t//define attributes\n\t\t$attr = 'data-is-file=\"true\"';\n\t\t$attr .= 'data-type=\"' . $ext . '\"';\n\t\t$attr .= 'data-path=\"' . $mypath . '\"';\n\t\t$attr .= 'data-size=\"' . filesize($this->_path($mypath)) . '\" ';\n\t\t$attr .= 'data-name=\"' . htmlspecialchars($name). '\"';\n\t\t$attr .= 'data-ctime=\"' . filectime($this->_path($path.'/'.$name)). '\"';\n\t\t$attr .= 'data-mtime=\"' . filemtime($this->_path($path.'/'.$name)). '\"';\n\t\t$attr .= 'data-url=\"' . g($this->conf, 'rootURL').'/'.$path.'/'.$name . '\" ';\n\t\t$attr .= 'data-path-enc=\"' . \\Crypt::encrypt($mypath) . '\" ';\n\t\t$attr .= 'data-mbsize=\"'. mbsize(filesize($this->_path($mypath))) .' \" ';\n $attr .= 'data-ctime-readable=\"'.date('D, d M Y H:i',filectime($this->_path($path.'/'.$name))).'\" ';\n $attr .= 'data-mtime-readable=\"'.date('D, d M Y H:i',filemtime($this->_path($path.'/'.$name))).'\" ';\n //image types\n\t\tif (in_array($ext, array('jpg', 'jpeg', 'png', 'bmp', 'gif', 'ico'))) {\n\t\t\t$info = getimagesize($this->_path($path.'/'.$name));\n\t\t\t$attr .= ' data-is-image=\"true\" ';\n\t\t\t$attr .= ' data-image-width=\"' . g($info, 0) . '\" ';\n\t\t\t$attr .= ' data-image-height=\"' . g($info, 1) . '\" ';\n\t\t}\n\t\t\n\t\t$html = '\n\t\t\t\t<li class=\"cfind-item-file\" '.$attr.'>\n\t\t\t\t\t<a href=\"\" title=\"'.htmlspecialchars($name).'\" >\n\t\t\t\t\t\t<figure></figure>\n\t\t\t\t\t\t<span>'.htmlspecialchars($name).'</span>\n\t\t\t\t\t</a>\n\t\t\t\t</li>';\n\t\t\t\t\n\t\treturn $html;\n\t}", "public function getFileList()\n {\n return array_map(\n function (FileEntry $file) {\n return $file->getFilename();\n },\n $this->pharchive->getFiles()\n );\n }", "function getLanguageFiles() // used in admin_configuration.php\r\n\r\n{\r\n\r\n\t$directory = \"models/languages/\";\r\n\r\n\t$languages = glob($directory . \"*.php\");\r\n\r\n\t//print each file name\r\n\r\n\treturn $languages;\r\n\r\n}", "public function getFilenames($whiteListKey = 'filenames')\n\t{\n\t\t$filenames = false;\n\t\tif($this->text)\n\t\t{\n\t\t\t$filenames = $this->getFilePaths();\n\t\t\tif(!$filenames)\n\t\t\t{\n\t\t\t\t$filenames = array();\n\t\t\t}\n\t\t\n\t\t\tif(preg_match_all('/[\\/\\w\\-\\_\\.\\(\\)]+\\.[a-z]{2,4}/i', $this->text, $matches))\n\t\t\t{\n\t\t\t\tif(isset($matches[0]))\n\t\t\t\t{\n\t\t\t\t\t$filenames = am($filenames, $matches[0]);\n\t\t\t\t\t$filenames = array_flip(array_flip($filenames));\n\t\t\t\t\t\n\t\t\t\t\tforeach($filenames as $i => $filename)\n\t\t\t\t\t{\n\t\t\t\t\t\t$filename = trim($filename);\n\t\t\t\t\t\t$filenames[$i] = array_pop(explode('\\\\', $filename));\n\t\t\t\t\t\t$filenames[$i] = array_pop(explode('/', $filenames[$i]));\n\t\t\t\t\t}\n\t\t\t\t\t$filenames = array_flip(array_flip($filenames));\n\t\t\t\t\t\n\t\t\t\t\t// see if it's extension is in the known extensions above\n\t\t\t\t\tforeach($filenames as $i => $filename)\n\t\t\t\t\t{\n\t\t\t\t\t\t$ext = array_pop(explode('.', $filename));\n\t\t\t\t\t\t$ext = strtoupper($ext);\n\t\t\t\t\t\tif(!in_array($ext, $this->extensions))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($filenames[$i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// make sure it's not in the hostames \n\t\t\t\t\t$hostnames = $this->getHostnames();\n\t\t\t\t\t\n\t\t\t\t\tforeach($filenames as $i => $filename)\n\t\t\t\t\t{\n\t\t\t\t\t\t$filenames[$i] = strtolower($filename);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// make sure it's not in the hostames \n\t\t\t\t\t\tif(is_array($hostnames) and !empty($hostnames) and in_array($filenames[$i], $hostnames))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tunset($filenames[$i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$filenames = $this->whiteList($filenames, $whiteListKey);\t\t\t\t\t\n\t\t\t\t\tsort($filenames);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $filenames;\n\t}", "public function getAllFiles()\n {\n }", "private function obtainFiles($dir,$type){\n $files = glob($dir.\"/{*.$type}\",GLOB_BRACE);\n $names =\"\";\n foreach ($files as $ima)\n $names[]=array_pop(explode(\"/\",$ima));\n if(!$names) return false;\n return $names;\n }", "public function listFiles() {\n \n $list = [];\n \n for ($i = 0; $i < $this->zip_archive->numFiles; $i++) {\n $name = $this->zip_archive->getNameIndex($i);\n if ($name === false) {\n throw new Exception(self::getStatus($this->zip_archive->status));\n }\n $list[] = $name;\n }\n\n return $list;\n }", "public function listInscriptionFiles(){\n $req = $this->db->query('SELECT file_url, title_file FROM admin_files');\n $req->setFetchMode(\\PDO::FETCH_CLASS | \\PDO::FETCH_PROPS_LATE, \n 'taekwondo\\model\\FileAdmin');\n return $req;\n }", "public function filelist($data)\n {\n $data = trim($data);\n if ($data === '') {\n return '';\n }\n $data_arr = explode('|', $data);\n // read directory:\n // MUST exist!\n $path = '';\n if ($this->getTypoScriptFrontendController()->lockFilePath) {\n // Cleaning name..., only relative paths accepted.\n $path = $this->clean_directory($data_arr[0]);\n // See if path starts with lockFilePath, the additional '/' is needed because clean_directory gets rid of it\n $path = GeneralUtility::isFirstPartOfStr($path . '/', $this->getTypoScriptFrontendController()->lockFilePath) ? $path : '';\n }\n if (!$path) {\n return '';\n }\n $items = [\n 'files' => [],\n 'sorting' => []\n ];\n $ext_list = strtolower(GeneralUtility::uniqueList($data_arr[1]));\n $sorting = trim($data_arr[2]);\n // Read dir:\n $d = @dir($path);\n if (is_object($d)) {\n $count = 0;\n while ($entry = $d->read()) {\n if ($entry !== '.' && $entry !== '..') {\n // Because of odd PHP-error where <br />-tag is sometimes placed after a filename!!\n $wholePath = $path . '/' . $entry;\n if (file_exists($wholePath) && filetype($wholePath) === 'file') {\n $info = GeneralUtility::split_fileref($wholePath);\n if (!$ext_list || GeneralUtility::inList($ext_list, $info['fileext'])) {\n $items['files'][] = $info['file'];\n switch ($sorting) {\n case 'name':\n $items['sorting'][] = strtolower($info['file']);\n break;\n case 'size':\n $items['sorting'][] = filesize($wholePath);\n break;\n case 'ext':\n $items['sorting'][] = $info['fileext'];\n break;\n case 'date':\n $items['sorting'][] = filectime($wholePath);\n break;\n case 'mdate':\n $items['sorting'][] = filemtime($wholePath);\n break;\n default:\n $items['sorting'][] = $count;\n }\n $count++;\n }\n }\n }\n }\n $d->close();\n }\n // Sort if required\n if (!empty($items['sorting'])) {\n if (strtolower(trim($data_arr[3])) !== 'r') {\n asort($items['sorting']);\n } else {\n arsort($items['sorting']);\n }\n }\n if (!empty($items['files'])) {\n // Make list\n reset($items['sorting']);\n $fullPath = trim($data_arr[4]);\n $list_arr = [];\n foreach ($items['sorting'] as $key => $v) {\n $list_arr[] = $fullPath ? $path . '/' . $items['files'][$key] : $items['files'][$key];\n }\n return implode(',', $list_arr);\n }\n return '';\n }", "function GetDirectoryList($bIsShowResult = true, $sInFilePath = '')\n{\t\n\t$sDirectoryPath = '';\n\t\n\tif(strlen($sInFilePath) === 0)\n\t{\n\t\tif(isset($_REQUEST['file-path']) === false)\n\t\t{\n\t\t\techo '<fail>no file path</fail>';\n\t\t\treturn;\n\t\t}\n\t\t$sDirectoryPath = trim($_REQUEST['file-path']);\n\t} else\n\t{\n\t\t$sDirectoryPath = $sInFilePath;\n\t}\n\n\t\n\t\n\t$lsNamesArrayList = array();\n\t\n\t$stDirectoryHandle = opendir($sDirectoryPath);\n\t\n\tif (!($stDirectoryHandle === false)) \n\t{\n\t\t$sFileName = '';\n\t\t\n\t\twhile (false !== ($sFileName = readdir($stDirectoryHandle))) \n\t\t{ \n\t\t\tif(strcmp($sFileName, '.') != 0 && strcmp($sFileName, '..'))\n\t\t\t{\n\t\t\t\tif(is_dir($sDirectoryPath.$sFileName) === true)\n\t\t\t\t{\n\t\t\t\t\tif($bIsShowResult === true)\n\t\t\t\t\t{\n\t\t\t\t\t\t$lsNamesArrayList[] = $sFileName.'<$%sep%$>d';\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$lsNamesArrayList[] = array('type' => 'd', 'name' => $sFileName);\n\t\t\t\t\t}\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tif($bIsShowResult === true)\n\t\t\t\t\t{\n\t\t\t\t\t\t$lsNamesArrayList[] = $sFileName.'<$%sep%$>f';\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$lsNamesArrayList[] = array('type' => 'f', 'name' => $sFileName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else\n\t{\n\t\techo '<fail>cant open direcotry</fail>';\n\t}\n\t\n\t\n\tif($bIsShowResult === true)\n\t{\n\t\techo '<correct>directory list</correct>';\n\t\techo implode(\"\\n\", $lsNamesArrayList);\n\t} else\n\t{\n\t\treturn $lsNamesArrayList;\n\t}\n}", "public function findFiles();", "private function getTestFileList() {\n\t\treturn [\n\t\t\tself::makeFileInfo('a.txt', 4, 2.3 * \\pow(10, 9)),\n\t\t\tself::makeFileInfo('q.txt', 5, 150),\n\t\t\tself::makeFileInfo('subdir2', 87, 128, true),\n\t\t\tself::makeFileInfo('b.txt', 2.2 * \\pow(10, 9), 800),\n\t\t\tself::makeFileInfo('o.txt', 12, 100),\n\t\t\tself::makeFileInfo('subdir', 88, 125, true),\n\t\t];\n\t}", "public function getNameList() {\n return $this->_get(3);\n }", "public function getNameList() {\n return $this->_get(3);\n }", "public function getNameList() {\n return $this->_get(3);\n }", "public function find_all() {\n $this->ensure_path_exists();\n $files = glob($this->glob_keys_pattern(), GLOB_MARK | GLOB_NOSORT);\n $return = array();\n if ($files === false) {\n return $return;\n }\n foreach ($files as $file) {\n $return[] = substr(basename($file), 0, -6);\n }\n return $return;\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/mediaelement.php',\n 'data_custom/mediaelement/flashmediaelement.swf',\n 'data_custom/mediaelement/silverlightmediaelement.xap',\n 'themes/default/css_custom/mediaelementplayer.css',\n 'themes/default/images_custom/mediaelement/background.png',\n 'themes/default/images_custom/mediaelement/bigplay.png',\n 'themes/default/images_custom/mediaelement/bigplay_svg.svg',\n 'themes/default/images_custom/mediaelement/controls.png',\n 'themes/default/images_custom/mediaelement/controls_svg.svg',\n 'themes/default/images_custom/mediaelement/jumpforward.png',\n 'themes/default/images_custom/mediaelement/loading.gif',\n 'themes/default/images_custom/mediaelement/skipback.png',\n 'themes/default/javascript_custom/mediaelement-and-player.js',\n 'themes/default/templates_custom/MEDIA_AUDIO_WEBSAFE.tpl',\n 'themes/default/templates_custom/MEDIA_VIDEO_WEBSAFE.tpl',\n );\n }", "function getTemplateFiles() {\n $directory = \"models/site-templates/\";\n $languages = glob($directory . \"*.css\");\n //print each file name\n return $languages;\n}", "public function readFilesInFileadmin() {\n $fileArr = $newArr = array();\n\n // direktes auslesen des Ordners, da evtl. nicht alle Dateien in Tabellen indexiert sind\n $path = GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT') . GeneralUtility::getIndpEnv('TYPO3_SITE_PATH') . 'fileadmin/';\n $fileList = GeneralUtility::getAllFilesAndFoldersInPath($fileArr, $path);\n\n $pathCount = strlen($path);\n // deployment-Ordner exkludieren\n foreach ($fileList as $filekey => $filevalue) {\n if (strstr($filevalue, '/fileadmin/deployment') == FALSE) {\n $newArr[$filekey] = substr($filevalue, $pathCount);\n }\n }\n\n return $newArr;\n }", "public function getFiles()\n {\n return array_keys($this->files);\n }", "function getPages() {\n echo \"<option value=0> -সিলেক্ট করুন- </option>\";\n foreach (glob(\"*.php\") as $filename) {\n echo \"<option value=\" . $filename . \">\" . $filename . \"</option>\";\n }\n}", "public function dir_readdir() {}", "public function files() :array\n {\n $files = DB::query(\"SELECT `ft_filename` AS 'filename', `ft_size` AS 'size' FROM `file_table` WHERE `ft_ut_id` = :u_id ORDER BY `ft_filename` ASC\", array(':u_id'=>$_SESSION['user_id']));\n\n $list = [];\n $i = 0;\n\n foreach($files as $file){\n $list[$i] = array($file['filename'], round($file['size']/1024, 2));\n $i++;\n }\n return $list;\n }", "public function getAllNames() {}", "public function getFiles() {\n\t\tif ($this->_files === null) {\n\t\t\t$command = 'show --pretty=\"format:\" --name-only '.$this->hash;\n\t\t\tforeach(explode(\"\\n\",$this->branch->repository->run($command)) as $line) {\n\t\t\t\t$this->_files[] = trim($line);\n\t\t\t}\n\t\t}\n\t\treturn $this->_files;\n\t}", "public function getConcatenateFiles() {}", "public function getNameList() {\n return $this->_get(1);\n }", "public function getFileList(){\n return ftp_nlist($this->ftp_conn, $this->directory); \n }", "function list_files($folder = '', $levels = 100, $exclusions = array(), $include_hidden = \\false)\n {\n }", "function listar_directorios_ruta($ruta){\n\t\t$directorios = array();\n\t\tif(is_dir($ruta)){ \n\t if($dh = opendir($ruta)){ \n\t while(($file = readdir($dh)) !== false){ \n\t //esta línea la utilizaríamos si queremos listar todo lo que hay en el directorio \n\t //mostraría tanto archivos como directorios \n\t //echo \"<br>Nombre de archivo: $file : Es un: \" . filetype($ruta . $file); \n\t if (is_dir($ruta . $file) && $file!=\".\" && $file!=\"..\"){ \n\t //solo si el archivo es un directorio, distinto que \".\" y \"..\" \n\t $directorios[] = $ruta.$file;\n\t //echo \"<br>Directorio: $ruta$file\"; \n\t $directorio[] = listar_directorios_ruta($ruta . $file . \"/\"); \n\t } \n\t } \n\t \tclosedir($dh); \n\t } \n\t }\n\t return $directorios;\n\t }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getNameList() {\n return $this->_get(2);\n }", "public function getLocalExtListFile() {}", "public function listFiles($start_dir)\n\t{\n\t\t$files = array();\n\t\t$dir = opendir($start_dir);\n\t\twhile(($myfile = readdir($dir)) !== false)\n\t\t\t{\n\t\t\tif($myfile != '.' && $myfile != '..' && !is_file($myfile) && $myfile != 'resource.frk' && $myfile != 'index.php' && $myfile != '.htaccess' )\n\t\t\t\t{\n\t\t\t\t$files[] = $myfile;\n\t\t\t\t}\n\t\t\t}\n\t\tclosedir($dir);\n\t\treturn $files;\n\t}", "private function getFileList()\n {\n\n $count = $this->getFileCount();\n $size = $this->getSize() + 4;\n\n $this->seek(\n $this->offset\n + 18\n + $this->getAliasSize()\n + 4\n + $this->getMetadataSize()\n );\n\n return $this->readFileList($count, $size);\n }", "function cn_get_files($name) {\r\n $result = array();\r\n if(!isset($_FILES[$name])) return $result;\r\n\r\n $files = $_FILES[$name];\r\n \r\n if(isset($files['name']) and $files['name']) {\r\n if(is_array($files['name'])) {\r\n $l = count($files['name']);\r\n for($n = 0; $n < $l; $n ++) {\r\n if(isset($files['name'][$n]) and $files['name'][$n]) {\r\n $result[] = array(\r\n 'name' => $files['name'][$n],\r\n 'type' => $files['type'][$n],\r\n 'tmp_name' => $files['tmp_name'][$n],\r\n 'error' => $files['error'][$n],\r\n 'size' => $files['size'][$n]\r\n );\r\n }\r\n }\r\n } else {\r\n $result[] = $files;\r\n }\r\n }\r\n\r\n return $result;\r\n}", "public function get_files()\n {\n }" ]
[ "0.805822", "0.70951796", "0.68087244", "0.6765111", "0.67226523", "0.6713215", "0.6661838", "0.66202885", "0.65345603", "0.64673823", "0.6400387", "0.63953376", "0.6380445", "0.6366427", "0.6352214", "0.63054734", "0.62966645", "0.629104", "0.629104", "0.629104", "0.6274519", "0.6274519", "0.6274519", "0.62651926", "0.6255806", "0.6203162", "0.62011033", "0.61994696", "0.61819625", "0.6162587", "0.61343235", "0.6118852", "0.6118647", "0.6105387", "0.6098845", "0.60931116", "0.60622126", "0.6060187", "0.6058532", "0.60565287", "0.6053238", "0.60503423", "0.604548", "0.60367197", "0.6022212", "0.59955937", "0.59921706", "0.5972178", "0.59590125", "0.5929888", "0.59164244", "0.590944", "0.590148", "0.5899563", "0.58946604", "0.5893885", "0.5893556", "0.5883375", "0.5882502", "0.5876744", "0.5857646", "0.5856776", "0.5845726", "0.58428156", "0.5832831", "0.5823911", "0.5814501", "0.5796228", "0.5792708", "0.57921195", "0.57801145", "0.5774198", "0.5774198", "0.5774198", "0.5767251", "0.5761096", "0.57594657", "0.5749726", "0.57458884", "0.57453024", "0.57420707", "0.57360345", "0.5735246", "0.57347757", "0.5723423", "0.5722065", "0.57213795", "0.5714747", "0.5713364", "0.57069933", "0.57069933", "0.57069933", "0.57069933", "0.57069933", "0.57069933", "0.57069933", "0.56991976", "0.5694494", "0.5693987", "0.5685288", "0.5684823" ]
0.0
-1
Create the event listener.
public function __construct() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addRequestCreateListener($listener);", "public function onEvent();", "private function init_event_listeners() {\n\t\t// add_action('wp_ajax_example_action', [$this, 'example_function']);\n\t}", "public function listener(Listener $listener);", "protected function setupListeners()\n {\n //\n }", "function eventRegister($eventName, EventListener $listener);", "public function listen($event, $listener);", "private function createStreamCallback()\n {\n $read =& $this->readListeners;\n $write =& $this->writeListeners;\n $this->streamCallback = function ($stream, $flags) use(&$read, &$write) {\n $key = (int) $stream;\n if (\\EV_READ === (\\EV_READ & $flags) && isset($read[$key])) {\n \\call_user_func($read[$key], $stream);\n }\n if (\\EV_WRITE === (\\EV_WRITE & $flags) && isset($write[$key])) {\n \\call_user_func($write[$key], $stream);\n }\n };\n }", "public function addEventListener(string $eventClass, callable $listener, int $priority = 0): EnvironmentBuilderInterface;", "public function setupEventListeners()\r\n\t{\r\n\t\t$blueprints = craft()->courier_blueprints->getAllBlueprints();\r\n\t\t$availableEvents = $this->getAvailableEvents();\r\n\r\n\t\t// Setup event listeners for each blueprint\r\n\t\tforeach ($blueprints as $blueprint) {\r\n\t\t\tif (!$blueprint->eventTriggers) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tforeach ($blueprint->eventTriggers as $event) {\r\n\t\t\t\t// Is event currently enabled?\r\n\t\t\t\tif (!isset($availableEvents[$event])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tcraft()->on($event, function(Event $event) use ($blueprint) {\r\n\t\t\t\t\tcraft()->courier_blueprints->checkEventConditions($event, $blueprint);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// On the event that an email is sent, create a successful delivery record\r\n\t\tcraft()->on('courier_emails.onAfterBlueprintEmailSent', [\r\n\t\t\tcraft()->courier_deliveries,\r\n\t\t\t'createDelivery'\r\n\t\t]);\r\n\r\n\t\t// On the event that an email fails to send, create a failed delivery record\r\n\t\tcraft()->on('courier_emails.onAfterBlueprintEmailFailed', [\r\n\t\t\tcraft()->courier_deliveries,\r\n\t\t\t'createDelivery',\r\n\t\t]);\r\n\t}", "protected function registerListeners()\n {\n }", "public function listen($listener);", "public function listenForEvents()\n {\n Event::listen(DummyEvent::class, DummyListener::class);\n\n event(new DummyEvent);\n }", "public function createEvent()\n {\n return new Event();\n }", "public function attachEvents();", "public function attachEvents();", "public function add_event_handler($event, $callback);", "function addListener(EventListener $listener): void;", "public static function initListeners() {\n\t\t\n\t\tif(GO::modules()->isInstalled('files') && class_exists('\\GO\\Files\\Controller\\FolderController')){\n\t\t\t$folderController = new \\GO\\Files\\Controller\\FolderController();\n\t\t\t$folderController->addListener('checkmodelfolder', \"GO\\Projects2\\Projects2Module\", \"createParentFolders\");\n\t\t}\n\t\t\n\t\t\\GO\\Base\\Model\\User::model()->addListener('delete', \"GO\\Projects2\\Projects2Module\", \"deleteUser\");\n\n\t}", "public function __create()\n {\n $this->eventPath = $this->data('event_path');\n $this->eventName = $this->data('event_name');\n $this->eventInstance = $this->data('event_instance');\n $this->eventFilter = $this->data('event_filter');\n }", "private static function event()\n {\n $files = ['Event', 'EventListener'];\n $folder = static::$root.'Event'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyListenersArgumentsException'];\n $folder = static::$root.'Event/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function addEventListener($event, $callable){\r\n $this->events[$event] = $callable;\r\n }", "public function testEventCallBackCreate()\n {\n }", "public function listeners($event);", "public function addListener($event, $listener, $priority = 0);", "public function on($name, $listener, $data = null, $priority = null, $acceptedArgs = null);", "public function createWatcher();", "public function __construct()\n\t{\n\t\t$this->delegate = Delegate_1::fromMethod($this, 'onEvent');\n\t}", "public function init_listeners( $callable ) {\n\t}", "public static function events();", "public static function __events () {\n \n }", "public function onEventAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function addApplicationBuilderListener( \n MyFusesApplicationBuilderListener $listener );", "public function addListener($eventName, $listener, $priority = 0);", "public function __construct(){\n\n\t\t\t$this->listen();\n\n\t\t}", "protected function registerListeners()\n {\n // Login event listener\n #Event::listen('auth.login', function($user) {\n //\n #});\n\n // Logout event subscriber\n #Event::subscribe('Mrcore\\Parser\\Listeners\\MyEventSubscription');\n }", "public function __construct()\n {\n// global $callback;\n // $this->eventsArr = $eventsArr;\n $this->callback = function () {\n\n // echo \"event: message\\n\"; // for onmessage listener\n echo \"event: ping\\n\";\n $curDate = date(DATE_ISO8601);\n echo 'data: {\"time\": \"' . $curDate . '\"}';\n echo \"\\n\\n\";\n\n while (($event = ServerSentEvents::popEvent()) != null) {\n $m = json_encode($event->contents);\n echo \"event: $event->event\\n\";\n echo \"data: $m\";\n echo \"\\n\\n\";\n }\n // echo \"event: message\\n\";\n // $curDate = date(DATE_ISO8601);\n // echo 'data: {\"message-time\": \"' . $curDate . '\"}';\n // echo \"\\n\\n\";\n // while(true){\n // if ($index != $this->eventsCounter){\n // ServerSentEvents::sendEvent($this->event, $this->eventBody);\n // $index = $this->eventsCounter;\n // }\n\n // sleep(1);\n // }\n };\n\n $this->setupResponse();\n }", "private function createMyEvents()\n {\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend_Checkout',\n 'onPostDispatchCheckoutSecure'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_Checkout_PreRedirect',\n 'onPreRedirectToPayPal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch_Frontend_PaymentPaypal',\n 'onPreDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_Webhook',\n 'onPaymentPaypalWebhook'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_PlusRedirect',\n 'onPaymentPaypalPlusRedirect'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Account',\n 'onPostDispatchAccount'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Javascript',\n 'onCollectJavascript'\n );\n $this->subscribeEvent(\n 'Shopware_Components_Document::assignValues::after',\n 'onBeforeRenderDocument'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Config',\n 'onPostDispatchConfig'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_Order',\n 'onPostDispatchOrder'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_PaymentPaypal',\n 'onPostDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n $this->subscribeEvent(\n 'Enlight_Bootstrap_InitResource_paypal_plus.rest_client',\n 'onInitRestClient'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Api_PaypalPaymentInstruction',\n 'onGetPaymentInstructionsApiController'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Front_StartDispatch',\n 'onEnlightControllerFrontStartDispatch'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch',\n 'onPreDispatchSecure'\n );\n }", "public static function creating(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATING, $listener, $priority);\n }", "public function listen();", "public function listen() {\n $this->source->listen($this->id);\n }", "public function addEventListener($event, $callback, $weight = null);", "public function testAddListener()\n {\n // Arrange\n $listenerCalled = false;\n $communicator = new Communicator();\n\n // Act\n $communicator->addListener(function () use (&$listenerCalled) {\n $listenerCalled = true;\n });\n\n $communicator->broadcast([], 'channel', [], []);\n\n // Assert\n static::assertTrue($listenerCalled);\n }", "public function addListener($name, $listener, $priority = 0);", "public static function created(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATED, $listener, $priority);\n }", "public function on($event, $callback){ }", "public function appendListenerForEvent(string $eventType, callable $listener): callable;", "public function initEventLogger()\n {\n $dispatcher = static::getEventDispatcher();\n\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }", "protected function getCron_EventListenerService()\n {\n return $this->services['cron.event_listener'] = new \\phpbb\\cron\\event\\cron_runner_listener(${($_ = isset($this->services['cron.lock_db']) ? $this->services['cron.lock_db'] : $this->getCron_LockDbService()) && false ?: '_'}, ${($_ = isset($this->services['cron.manager']) ? $this->services['cron.manager'] : $this->getCron_ManagerService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }", "public function getListener(/* ... */)\n {\n return $this->_listener;\n }", "protected function _listener($name) {\n\t\treturn $this->_crud()->listener($name);\n\t}", "private function listeners()\n {\n foreach ($this['config']['listeners'] as $eventName => $classService) {\n $this['dispatcher']->addListener($classService::NAME, [new $classService($this), 'dispatch']);\n }\n }", "public function initializeListeners()\n {\n $this->eventsEnabled = false;\n $this->setPreloads();\n $this->setEvents();\n $this->eventsEnabled = true;\n }", "protected function listenForEvents()\n {\n $callback = function ($event) {\n foreach ($this->logWriters as $writer) {\n $writer->log($event);\n }\n };\n\n $this->events->listen(JobProcessing::class, $callback);\n $this->events->listen(JobProcessed::class, $callback);\n $this->events->listen(JobFailed::class, $callback);\n $this->events->listen(JobExceptionOccurred::class, $callback);\n }", "protected function registerListeners()\n {\n $this->container['listener.server'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\ServerListener($c['filesystem'], $c['generator.server']);\n });\n\n $this->container['listener.gateway'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\GatewayListener($c['filesystem'], $c['generator.gateway']);\n });\n }", "public function listeners($eventName);", "public static function create()\n {\n list(\n $message,\n $callbackService,\n $callbackMethod,\n $callbackParams\n ) = array_pad( func_get_args(), 4, null);\n\n static::addToEventQueue( array(\n 'type' => \"alert\",\n 'properties' => array(\n 'message' => $message\n ),\n 'service' => $callbackService,\n 'method' => $callbackMethod,\n 'params' => $callbackParams ?? []\n ));\n }", "public function requestCreateEvent()\n {\n $ch = self::curlIni('event_new', $this->eventParams);\n\n return $ch;\n }", "function __construct()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}", "public function __construct()\n {\n Hook::listen(__CLASS__);\n }", "function add_listener($hook, $function_name){\n\t\tglobal $listeners;\n\n\t\t$listeners[$hook][] = $function_name;\n\t}", "public function __construct()\n {\n $this->events = new EventDispatcher();\n }", "protected function initEventLogger(): void\n {\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $this->dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }", "public function listen($events, $listener = null): void;", "public function onCreate($callback)\n {\n $this->listeners[] = $callback;\n return $this;\n }", "public static function listen() {\n $projectId = \"sunday-1601040613995\";\n\n # Instantiates a client\n $pubsub = new PubSubClient([\n 'projectId' => $projectId\n ]);\n\n # The name for the new topic\n $topicName = 'gmail';\n\n # Creates the new topic\n $topic = $pubsub->createTopic($topicName);\n\n echo 'Topic ' . $topic->name() . ' created.';\n }", "protected function registerEventListeners()\n {\n Event::listen(Started::class, function (Started $event) {\n $this->progress = $this->output->createProgressBar($event->objects->count());\n });\n\n Event::listen(Imported::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(ImportFailed::class, function () {\n if ($this->progress) {\n $this->progress->advance();\n }\n });\n\n Event::listen(DeletedMissing::class, function (DeletedMissing $event) {\n $event->deleted->isEmpty()\n ? $this->info(\"\\n No missing users found. None have been soft-deleted.\")\n : $this->info(\"\\n Successfully soft-deleted [{$event->deleted->count()}] users.\");\n });\n\n Event::listen(Completed::class, function (Completed $event) {\n if ($this->progress) {\n $this->progress->finish();\n }\n });\n }", "public function addBeforeCreateListener(IBeforeCreateListener $listener)\n {\n $this->_lifecyclers[BeanLifecycle::BeforeCreate][] = $listener;\n }", "protected function registerInputEvents() {\n\t\t$this->getEventLoop()->addEventListener('HANG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->offHook = (bool)$event['value'];\n\n\t\t\t// Trigger specific events for receiver up and down states\n\t\t\t$eventName = $this->isOffHook() ? 'RECEIVER_UP' : 'RECEIVER_DOWN';\n\t\t\t$this->fireEvents($eventName, $event);\n\t\t});\n\n\t\t$this->getEventLoop()->addEventListener('TRIG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->dialling = (bool)$event['value'];\n\t\t});\n\n\t\t// Proxy registration for all EventLoop events to pass them back up to our own listeners\n\t\t$this->getEventLoop()->addEventListener(true, function ($event, $type) {\n\t\t\t// Fire event to our own listeners\n\t\t\t$this->fireEvents($type, $event);\n\t\t});\n\t}", "public static function creating($callback)\n {\n self::listenEvent('creating', $callback);\n }", "public function attach(string $event, callable $listener, int $priority = 0): void;", "public function __construct()\n {\n $this->listnerCode = config('settings.listener_code.DeletingVoucherEventListener');\n }", "protected function registerEventListener()\n {\n $subscriber = $this->getConfig()->get('audit-trail.subscriber', AuditTrailEventSubscriber::class);\n $this->getDispatcher()->subscribe($subscriber);\n }", "function listenTo(string $eventName, callable $callback)\n {\n EventManager::register($eventName, $callback);\n }", "public function attach($identifier, $event, callable $listener, $priority = 1)\n {\n }", "public function testRegisiterListenerMethodAddsAListener()\n\t{\n\t\t$instance = new Dispatcher();\n\n\t\t$instance->register_listener('some_event', 'my_function');\n\n\t\t$this->assertSame(array('some_event' => array('my_function')), $instance->listeners);\n\t\t$this->assertAttributeSame(array('some_event' => array('my_function')), 'listeners', $instance);\n\t}", "protected function getPhpbb_Viglink_ListenerService()\n {\n return $this->services['phpbb.viglink.listener'] = new \\phpbb\\viglink\\event\\listener(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['template']) ? $this->services['template'] : $this->getTemplateService()) && false ?: '_'});\n }", "public static function create($className, array &$extraTabs, $selectedTabId)\r\n {\r\n $createClass = XenForo_Application::resolveDynamicClass($className, 'listener_th');\r\n if (!$createClass) {\r\n throw new XenForo_Exception(\"Invalid listener '$className' specified\");\r\n }\r\n \r\n return new $createClass($extraTabs, $selectedTabId);\r\n }", "function listen($listener)\n{\n return XPSPL::instance()->listen($listener);\n}", "function getEventListeners()\n {\n $listeners = array();\n \n $listener = new Listener($this);\n \n $listeners[] = array(\n 'event' => RoutesCompile::EVENT_NAME,\n 'listener' => array($listener, 'onRoutesCompile')\n );\n\n $listeners[] = array(\n 'event' => GetAuthenticationPlugins::EVENT_NAME,\n 'listener' => array($listener, 'onGetAuthenticationPlugins')\n );\n\n return $listeners;\n }", "protected static function loadListeners() {\n\t\t\n\t\t// default var\n\t\t$configDir = Config::getOption(\"configDir\");\n\t\t\n\t\t// make sure the listener data exists\n\t\tif (file_exists($configDir.\"/listeners.json\")) {\n\t\t\t\n\t\t\t// get listener list data\n\t\t\t$listenerList = json_decode(file_get_contents($configDir.\"/listeners.json\"), true);\n\t\t\t\n\t\t\t// get the listener info\n\t\t\tforeach ($listenerList[\"listeners\"] as $listenerName) {\n\t\t\t\t\n\t\t\t\tif ($listenerName[0] != \"_\") {\n\t\t\t\t\t$listener = new $listenerName();\n\t\t\t\t\t$listeners = $listener->getListeners();\n\t\t\t\t\tforeach ($listeners as $event => $eventProps) {\n\t\t\t\t\t\t$eventPriority = (isset($eventProps[\"priority\"])) ? $eventProps[\"priority\"] : 0;\n\t\t\t\t\t\tself::$instance->addListener($event, array($listener, $eventProps[\"callable\"]), $eventPriority);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "function __construct()\n\t{\n\t\t$this->events[\"BeforeShowList\"]=true;\n\n\t\t$this->events[\"BeforeProcessList\"]=true;\n\n\t\t$this->events[\"BeforeProcessPrint\"]=true;\n\n\t\t$this->events[\"BeforeShowPrint\"]=true;\n\n\t\t$this->events[\"BeforeQueryList\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeProcessEdit\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"BeforeProcessView\"]=true;\n\n\t\t$this->events[\"BeforeShowView\"]=true;\n\n\n\n\n\t\t$this->events[\"ProcessValuesView\"]=true;\n\n\t\t$this->events[\"ProcessValuesEdit\"]=true;\n\n\t\t$this->events[\"CustomAdd\"]=true;\n\n\t\t$this->events[\"CustomEdit\"]=true;\n\n\t\t$this->events[\"ProcessValuesAdd\"]=true;\n\n\t\t$this->events[\"BeforeQueryEdit\"]=true;\n\n\t\t$this->events[\"BeforeQueryView\"]=true;\n\n\n\t\t$this->events[\"BeforeProcessAdd\"]=true;\n\n\n//\tonscreen events\n\t\t$this->events[\"calmonthly_snippet2\"] = true;\n\t\t$this->events[\"calmonthly_snippet1\"] = true;\n\t\t$this->events[\"Monthly_Next_Prev\"] = true;\n\n\t}", "function defineHandlers() {\n EventsManager::listen('on_rawtext_to_richtext', 'on_rawtext_to_richtext');\n EventsManager::listen('on_daily', 'on_daily');\n EventsManager::listen('on_wireframe_updates', 'on_wireframe_updates');\n }", "public function createEvents()\n {\n //\n\n return 'something';\n }", "public static function createInstance()\n {\n return new GridPrintEventManager('ISerializable');\n }", "public function setUp()\n {\n if ($this->getOption('listener') === true) \n $this->addListener(new BlameableListener($this->_options));\n }", "public static function created($callback)\n {\n self::listenEvent('created', $callback);\n }", "public function addListener()\n {\n $dispatcher = $this->wrapper->getDispatcher();\n $listener = new TestListener();\n\n $dispatcher->addListener(PsKillEvents::PSKILL_PREPARE, [$listener, 'onPrepare']);\n $dispatcher->addListener(PsKillEvents::PSKILL_SUCCESS, [$listener, 'onSuccess']);\n $dispatcher->addListener(PsKillEvents::PSKILL_ERROR, [$listener, 'onError']);\n $dispatcher->addListener(PsKillEvents::PSKILL_BYPASS, [$listener, 'onBypass']);\n\n return $listener;\n }", "public static function addEventListener($event, $listenerClassName) {\n\t\tif (!is_a($listenerClassName, EventListenerInterface::class, TRUE)) {\n\t\t\tthrow new \\RuntimeException(\n\t\t\t\tsprintf(\n\t\t\t\t\t'Invalid CMIS Service EventListener: %s must implement %s',\n\t\t\t\t\t$listenerClassName,\n\t\t\t\t\tEventListenerInterface::class\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tstatic::$eventListeners[get_called_class()][$event][] = $listenerClassName;\n\t}", "public function makeListener($listener, $wildcard = false): Closure;", "public function createSubscriber();", "public function listener() {\n\t\treturn $this->_runtime['listener'];\n\t}", "public function addEventListener($events, $eventListener)\n {\n $this->eventListeners[] = array('events' => $events, 'listener' => $eventListener);\n }", "function __construct()\r\n\t{\r\n\t\t$this->events[\"BeforeAdd\"]=true;\r\n\r\n\r\n\t}", "function __construct()\n\t{\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\n\t\t$this->events[\"BeforeShowAdd\"]=true;\n\n\t\t$this->events[\"BeforeShowEdit\"]=true;\n\n\t\t$this->events[\"IsRecordEditable\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\n\t}", "public function startListening();", "public function addEntryAddedListener(callable $listener): SubscriptionInterface;", "function __construct()\n\t{\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeEdit\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}", "function GetEventListeners() {\n $my_file = '{%IEM_ADDONS_PATH%}/dynamiccontenttags/dynamiccontenttags.php';\n $listeners = array ();\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_SENDSTUDIOFUNCTIONS_GENERATEMENULINKS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'SetMenuItems'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_USERAPI_GETPERMISSIONTYPES',\n 'trigger_details' => array (\n 'Interspire_Addons',\n 'GetAddonPermissions',\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_DCT_HTMLEDITOR_TINYMCEPLUGIN',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'DctTinyMCEPluginHook'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners [] =\n array (\n 'eventname' => 'IEM_EDITOR_TAG_BUTTON',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'CreateInsertTagButton'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_GETALLTAGS',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'getAllTags'\n ),\n 'trigger_file' => $my_file\n );\n\n $listeners[] =\n array (\n 'eventname' => 'IEM_ADDON_DYNAMICCONTENTTAGS_REPLACETAGCONTENT',\n 'trigger_details' => array (\n 'Addons_dynamiccontenttags',\n 'replaceTagContent'\n ),\n 'trigger_file' => $my_file\n );\n\n return $listeners;\n }", "function on_creation() {\n $this->init();\n }", "public function addEventListener(ListenerInterface $eventListener)\n {\n $this->eventListeners[] = $eventListener;\n }" ]
[ "0.65685207", "0.62875676", "0.6221792", "0.6197413", "0.61627764", "0.6129312", "0.6096226", "0.6056844", "0.6051069", "0.6041841", "0.596228", "0.596194", "0.5957539", "0.59439605", "0.58821785", "0.58821785", "0.5874665", "0.5864387", "0.5856076", "0.584338", "0.5824244", "0.5820997", "0.5791637", "0.57913053", "0.57893854", "0.57716024", "0.5764599", "0.5744472", "0.57417566", "0.57387024", "0.5721539", "0.57068586", "0.5699624", "0.56838834", "0.5675836", "0.56686187", "0.5661412", "0.56601405", "0.56584114", "0.5649107", "0.5638085", "0.56257224", "0.56172097", "0.56064796", "0.55919635", "0.5579062", "0.55775297", "0.5559927", "0.5546297", "0.5546121", "0.5545537", "0.5539715", "0.55295366", "0.55276597", "0.5527287", "0.551302", "0.5497285", "0.5495119", "0.54845315", "0.54834753", "0.54812366", "0.5478984", "0.5474917", "0.5471286", "0.54693574", "0.54684293", "0.5466594", "0.5465012", "0.5450231", "0.5450062", "0.5450001", "0.544321", "0.54308116", "0.54218924", "0.5389615", "0.53857446", "0.5378957", "0.5378836", "0.53771406", "0.5368413", "0.5360908", "0.5356685", "0.5349897", "0.53419805", "0.5340825", "0.53330225", "0.53323317", "0.5330117", "0.53270465", "0.5326564", "0.5307367", "0.52996707", "0.52980274", "0.52973336", "0.52886003", "0.528163", "0.5276869", "0.5269541", "0.5268173", "0.5265876", "0.52629435" ]
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\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(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "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 }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.7891453", "0.7890965", "0.7862504", "0.78414804", "0.78414804", "0.7837965", "0.78248763", "0.7812292", "0.7809632", "0.77928597", "0.7788316", "0.7781619", "0.77815884", "0.7763308", "0.7754035", "0.7717961", "0.7717961", "0.77171147", "0.77138597", "0.7705001", "0.7693082", "0.7692783", "0.76915383", "0.76909506", "0.76733255", "0.7667128", "0.7665592", "0.7656238", "0.7650853", "0.764326", "0.76431626", "0.76431614", "0.7635147", "0.76311624", "0.76294273", "0.7627076", "0.76207024", "0.76207024", "0.76139116", "0.76036394", "0.76035625", "0.76035625", "0.76032084", "0.7602515", "0.76007926", "0.75971127", "0.7588128", "0.7586303", "0.7581912", "0.7563037", "0.7554785", "0.75526226", "0.755171", "0.75436753", "0.75432944", "0.7540682", "0.7538806", "0.75280696", "0.751548", "0.75149626", "0.7501161", "0.74959517", "0.74956346", "0.74911124", "0.7489147", "0.74858016", "0.748033", "0.7478443", "0.7472642", "0.7472576", "0.7465409", "0.7464371", "0.74630046", "0.7462218", "0.7461453", "0.7449168", "0.74399257", "0.74358094", "0.7433247", "0.7432659", "0.74248093" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'name' => 'required|max:255', 'address' => 'required', 'postcode' => 'required|max:15', 'cardnumber' => 'required|digits_between:16,20', 'cvv' => 'required|digits_between:3,4' ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Execute the console command.
public function fire() { $response = file_get_contents('https://www.bitstamp.net/api/ticker/'); $result = json_decode($response, true); // Split the JSON into arrays. $amounts = [ 'low' => $result['low'], 'high' => $result['high'], 'last' => $result['last'], ]; $volumes = [ 'bitcoins' => $result['volume'], ]; $this->saveData(ExchangeData::MARKET_BITSTAMP, ExchangeData::CURRENCY_BTC, ExchangeData::CURRENCY_USD, $amounts, $volumes); $this->info('Ticker: bitstamp @ USD | Saved Exchange Data for ' . date('d.m.Y H:i:s')); }
{ "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
TODO: flexible base path
public function load($source): array { $file = $this->getAbsolutePath($source, getcwd()); $this->ensureFileExists($file); try { $data = $this->loadFile($file); } catch (\Throwable $e) { throw new LoadException("配置文件 '{$file}' 加载失败:{$e->getMessage()}", 0, $e); } $this->ensureDataLoaded($data, $file); return (array) $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAbsoluteBasePath() {}", "public function base_path($path = null);", "public function getBasePath(): string;", "public function getBasePath(): string;", "function base_path($path)\n{\n return __DIR__.'/../'.$path;\n}", "public function getBasePath();", "public function getBasePath();", "public function getBasePath();", "public function getBasePath();", "public function basePath();", "public function basePath();", "function base_path($path = '')\n {\n return str_replace('//' ,'/',str_ireplace('/' . SYSTEMPATHS['core'], '/', __DIR__) . '/' . $path);\n }", "function base_path()\n {\n $paths = getPaths();\n\n return $paths['base'];\n }", "private static function getPath() : string {\n return getBasePath() . '/miaus';\n }", "public function getPublicBasePath();", "function base_path($path = '')\n {\n return phanda()->basePath() . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n }", "function base_path() {\n\treturn str_replace('index.php','',$_SERVER['SCRIPT_NAME']);\n}", "public function getBasePath() { return self::$basePath; }", "function base_path()\n {\n return dirname(__DIR__);\n }", "function base_path() {\n return (new Server)->get('DOCUMENT_ROOT');\n }", "private static function base_relative($path = null)\n\t{\n\t\t$test\t= self::getProtocol().$_SERVER['HTTP_HOST'].\"/\".apps::getGlobal(\"router\")->getBasePath();\n\t\treturn concat_path($test,$path);\n\t}", "protected function determineBaseUrl() {}", "function base_path($uri = '', $protocol = NULL)\n\t{\n\t\treturn get_instance()->config->base_path($uri, $protocol);\n\t}", "function path($path='') {\n return $this->base_dir . $path;\n }", "public function base($path = null)\n\t{\n\t\treturn ($this->baseUrl ? rtrim($this->baseUrl, '/' ).'/' : '/').($path ? trim($path, '/') : '');\n\t}", "public function getFilesBase();", "private static function base_url($path=NULL)\n {\n\t\tglobal $url;\n $fullurl=$url.$path;\n return $fullurl;\n\t}", "function getBaseUrl()\n{\n $doc_root_folders = utf8_explode(\"/\", $_SERVER['DOCUMENT_ROOT']);\n $cwd__folders = utf8_explode(\"/\", getcwd());\n //the difference between those is the path from doc root to the folder where\n //all files for this URI reside\n $path_from_doc_root = implode(\"/\", array_diff($cwd__folders, $doc_root_folders));\n return $_SERVER['HTTP_HOST'].'/'.$path_from_doc_root;\n}", "public function getBasePath() : string{\n return $this->basePath;\n }", "public static function baseURI($mnt)\n{\nreturn 'phk://'.$mnt.'/';\n}", "public function abspath()\n {\n }", "protected static function baseurl($path=NULL)\n {\n\t\t$res=self::base_url($path);\n\t\treturn $res;\n }", "function urlfor($path) {\n return basepath() . $path;\n}", "private function baseName(){\n \n if ($this->baseName===null) {\n $this->baseName= implode('/', array_slice(explode('/', $_SERVER['SCRIPT_NAME']), 0, -1)) . '/';\n }\n return $this->baseName;\n\n }", "function basePath()\n{\n $path= dirname(__FILE__) . '/../';\n if (function_exists('realpath')) {\n $path = realpath($path) . '/';\n }\n\n return $path;\n}", "abstract protected function getPath();", "private static function _initViewScriptsFullPathBase () {\n\t\t$app = & \\MvcCore\\Application::GetInstance();\n\t\tself::$_viewScriptsFullPathBase = implode('/', [\n\t\t\t$app->GetRequest()->GetAppRoot(),\n\t\t\t$app->GetAppDir(),\n\t\t\t$app->GetViewsDir()\n\t\t]);\n\t}", "protected function defineOriginalRootPath() {}", "public function getBaseDir();", "private function basePath(): string\n\t{\n\t\treturn rtrim((new RequestFactory)\n\t\t\t->fromGlobals()->url->basePath, '/');\n\t}", "static function base()\n {\n return trim(App::router()->getBase(), '/');\n }", "protected function defineSitePath() {}", "public function setBasePath($path);", "function snappy_basedir($typeDir)\t{\r\n\t$newCI =& get_instance();\r\n\t$baseDir = $newCI->config->slash_item('base_url');\r\n\t$sourceDir = 'web/' . 'assets/';\r\n\treturn $baseDir.$sourceDir.$typeDir;\r\n}", "function basePath() {\n\t$commonPath = __FILE__;\n\t$requestPath = $_SERVER['SCRIPT_FILENAME'];\n\t\n\t//count the number of slashes\n\t// number of .. needed for include level is numslashes(request) - numslashes(common)\n\t// then add one more to get to base\n\t$commonSlashes = substr_count($commonPath, '/');\n\t$requestSlashes = substr_count($requestPath, '/');\n\t$numParent = $requestSlashes - $commonSlashes + 1;\n\t\n\t$basePath = \".\";\n\tfor($i = 0; $i < $numParent; $i++) {\n\t\t$basePath .= \"/..\";\n\t}\n\t\n\treturn $basePath;\n}", "public static function getBasePath()\n {\n\n $baseUrl = trim(_PS_BASE_URL_, '/') . '/';\n\n $baseUri = trim(__PS_BASE_URI__, '/');\n\n // Do some check on subfolder.\n if(!empty($baseUri)) {\n\n $baseUri = $baseUri . '/';\n\n }\n\n return $baseUrl . $baseUri;\n }", "protected function getBasePath()\n {\n return $this->vfs()->url();\n }", "private function get_base_path() : string {\n return plugin_dir_path( dirname( __FILE__, 2 ) );\n }", "protected function setBasePath()\n {\n $this->container->instance('path.base', $this->basePath);\n }", "public function getPartialRootPath() {}", "public function baseRelPath()\n {\n if($this instanceof Layout)\n {\n $class = Application::getApp();\n }\n else\n {\n $class = \\get_class($this);\n }\n $reflector = new \\ReflectionClass($class);\n $parts = \\explode('\\\\', $reflector->getName());\n $parts = \\array_chunk($parts, 3, false);\n return \\strtolower(\\implode('/', $parts[0])) . '/';\n }", "public function getBasePath()\n {\n return __DIR__ . '/..';\n }", "public function path() {}", "public function path() {}", "function get_base_dir() {\n return $this->base_dir;\n }", "abstract protected function paths();", "static function basePath($path)\n {\n return base_path($path);\n }", "function app_path()\n {\n return base_path() . '/app';\n }", "public function testUrlGenerationWithBasePath(): void\n {\n Router::createRouteBuilder('/')\n ->connect('/{controller}/{action}/*');\n $request = new ServerRequest([\n 'params' => [\n 'action' => 'index',\n 'plugin' => null,\n 'controller' => 'Subscribe',\n ],\n 'url' => '/subscribe',\n 'base' => '/magazine',\n 'webroot' => '/magazine/',\n ]);\n Router::setRequest($request);\n\n $result = Router::url();\n $this->assertSame('/magazine/subscribe', $result);\n\n $result = Router::url([]);\n $this->assertSame('/magazine/subscribe', $result);\n\n $result = Router::url('/');\n $this->assertSame('/magazine/', $result);\n\n $result = Router::url('/articles/');\n $this->assertSame('/magazine/articles/', $result);\n\n $result = Router::url('/articles::index');\n $this->assertSame('/magazine/articles::index', $result);\n\n $result = Router::url('/articles/view');\n $this->assertSame('/magazine/articles/view', $result);\n\n $result = Router::url(['controller' => 'Articles', 'action' => 'view', 1]);\n $this->assertSame('/magazine/Articles/view/1', $result);\n }", "public static function getBasePath() {\n\t \tif(!isset(self::$basePath)) {\n\t \t\t$script = self::getScriptName();\n\t \t\tself::$basePath = substr (\n\t \t\t\t\t$script,\n\t \t\t\t\t0,\n\t \t\t\t\tstrrpos($script, '/' ));\n\t \t}\n\t \treturn self::$basePath;\n\t }", "static public function get_base_path(){\r\n return plugin_dir_path(__FILE__) . '/';\r\n }", "public function getBasePath()\n {\n return config('nar.generator.basePath', app()->path()) . '/Api/'\n . strtoupper(env('API_VERSION')) . '/'\n . 'Controllers';\n }", "protected function getBasePath()\n {\n return getcwd();\n }", "protected static function generate_base_url()\n\t{\n\t\t$base_url = parent::generate_base_url();\n\t\treturn str_replace('htdocs/novius-os/', '', $base_url);\n\t}", "private function basePath()\n {\n $directory = dirname((new \\ReflectionClass(self::class))->getFileName());\n\n return $directory . '/../../../../twig-bridge/src/BenGorUser/TwigBridge/Infrastructure/Ui';\n }", "public function set_base_path( $path ) {\n\t\t$this->base_path = $path;\n\t}", "protected function urlBase()\n {\n return \"/bibs/{$this->bib->mms_id}/representations/{$this->representation_id}\";\n }", "public function getBasePath(): string\n {\n return $this->basePath;\n }", "function set_base_dir($dir) {\n if($dir[strlen($dir)-1] != '/') {\n $dir .= '/'; \n }\n \n $this->base_dir = $dir;\n }", "public function getRealUrlAliasBase(): string;", "public function getBasePath() {\n\t\treturn $this->settings['npo_api_base_path'];\n\t}", "public function getFileBaseUrl()\n {\n return Mage::getBaseUrl('media').'family'.'/'.'file';\n }", "protected function route_base() {\n\t\treturn substr( strrchr( get_class( $this ), '\\\\' ), 1 );\n\t}", "protected function getBasePath()\n {\n // Note that the actual filesystem base is the 'assets' subdirectory within this\n return ASSETS_PATH . '/SecureAssetsMigrationHelperTest';\n }", "public function webPath();", "private function determineFixturesPath() {}", "function path() {\r\n $basePath = explode('/',$_SERVER['SCRIPT_NAME']);\r\n $script = array_pop($basePath);\r\n $basePath = implode('/',$basePath);\r\n if ( isset($_SERVER['HTTPS']) ) {\r\n $scheme = 'https';\r\n } else {\r\n $scheme = 'http';\r\n }\r\n echo $scheme.'://'.$_SERVER['SERVER_NAME'].$basePath;\r\n}", "public function testBaseUrl()\n\t{\n \t$this->assertEquals(Util::base('foo'), 'http://localhost/www/foo');\n \t$this->assertEquals(Util::css('foo.css'), 'http://localhost/www/public/css/foo.css');\n \t$this->assertEquals(Util::js('foo.js'), 'http://localhost/www/public/js/foo.js');\n \t$this->assertEquals(Util::img('foo.png'), 'http://localhost/www/public/images/foo.png');\n // Test cached\n $this->assertEquals(Util::base('foo'), 'http://localhost/www/foo');\n\t}", "public function testBaseUrlWithBasePath(): void\n {\n Configure::write('App.base', '/cakephp');\n Router::fullBaseUrl('http://example.com');\n Router::setRequest(ServerRequestFactory::fromGlobals());\n\n $this->assertSame('http://example.com/cakephp/tasks', Router::url('/tasks', true));\n }", "private function somebody_set_us_up_the_base()\n\t{\n\t\tdefine('BASE', SELF.'?S='.ee()->session->session_id().'&amp;D=cp'); // cp url\n\t}", "public function baseDir() {\n return 'uploads/placeholders';\n }", "protected function getInstancePath() {}", "public static function basePath(){\n return \\Illuminate\\Foundation\\Application::basePath();\n }", "function base_url(){\n return BASE_URL;\n }", "public function base_url()\n\t{\n\t\treturn URL::base();\n\t}", "public function get_strBasePath()\n {\n return $this->strBasePath;\n }", "public function path();", "public static function basePath()\n {\n if(!self::$BASE_PATH){\n $reflector = new \\ReflectionClass(\\BethelChika\\Laradmin\\LaradminServiceProvider::class);\n self::$BASE_PATH= dirname(dirname($reflector->getFileName()));\n }\n return self::$BASE_PATH;\n }", "function base_tag($path = null) {\n if(!empty($path)) $path = trim($path, '/').\"/\";\n return $this->context->tag('base', array('href' => $this->base_url().\"/$path\")).\"\\n\";\n }", "public function get_base_dir($base = '.', $verbose = \\false)\n {\n }", "public function getBasePath(): string\n {\n return '/v2/refund';\n }", "private function detectBaseUrl() {\n $this->baseurl = empty($this->subdir) ? '/' : \"/{$this->subdir}/\";\n }", "protected function setInitialRelativePath() {}", "public function setBasePath(string $basePath);", "public function getBasePath()\n {\n return $this->detectBasePath();\n }", "public function getBaseUri() {}", "protected function _getBase ()\n {\n global $config;\n return $config->current['BASE'];\n }", "public function getBaseUri() {}", "protected abstract function getPath();", "private static function calculatePaths()\n\t{\n\n\t\t//get the raw URI path depth and create relative path to root\n\t\tself::$baseRelativePath = \"\";\n\t\tfor( $x=0; $x<self::$URIRawDepth; $x++ )\n\t\t\tself::$baseRelativePath .= \"../\";\n\n\t\t//create base URL\n//TODO - need to validate HTTP_HOST, can be spoofed by client\n//TODO - need to correctly handle $_SERVER['SERVER_PORT'] VARIANTS http !== 80 || https !== 443, put port\n//TODO - check for multiple consecutive slashes in path (should be fixed for end of path)??\n\t\t$protocol = ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] !== 'off' ) ? \"https\" : \"http\";\n\t\t$path = parse_url( $_SERVER['SCRIPT_NAME'], PHP_URL_PATH );\n\t\t$path = substr( $path, 0, strrpos( $path, \"/\" )+1 );\n\t\tself::$baseURL = \"{$protocol}://{$_SERVER['HTTP_HOST']}{$path}\";\n\t}", "public function getBaseUrl() {}" ]
[ "0.7581352", "0.73497754", "0.7325214", "0.7325214", "0.73157835", "0.7244033", "0.7244033", "0.7244033", "0.7244033", "0.7177438", "0.7177438", "0.70382136", "0.70111287", "0.6987904", "0.6980662", "0.68408257", "0.6832051", "0.6782784", "0.6701057", "0.6698101", "0.6695639", "0.6597515", "0.6594023", "0.65874404", "0.6564465", "0.6557385", "0.65522504", "0.6549361", "0.6539195", "0.6536165", "0.6522544", "0.64914274", "0.64508957", "0.6449847", "0.643475", "0.6391765", "0.6389083", "0.6383347", "0.6381784", "0.63676643", "0.6356882", "0.63541996", "0.63490134", "0.63355064", "0.6329027", "0.6325456", "0.6324943", "0.63237154", "0.6323511", "0.632154", "0.6320874", "0.63133514", "0.6296652", "0.62954855", "0.6285015", "0.6259674", "0.62568426", "0.62496734", "0.6249413", "0.62475246", "0.624332", "0.62405735", "0.622971", "0.62217474", "0.62115514", "0.6205124", "0.62013364", "0.61809504", "0.6174489", "0.61645055", "0.61595964", "0.6158188", "0.6143193", "0.6138489", "0.6137511", "0.6134286", "0.61301273", "0.61266387", "0.61261135", "0.6121856", "0.6114483", "0.6114384", "0.61134034", "0.6098424", "0.6094827", "0.60943455", "0.60939795", "0.60808325", "0.6077361", "0.60655123", "0.60637057", "0.606137", "0.605819", "0.60458845", "0.6045824", "0.6045429", "0.6045218", "0.604495", "0.6043153", "0.6041969", "0.6041183" ]
0.0
-1
Run the database seeds.
public function run() { DB::table('chitiethoadons')->insert([ 'hd_id'=>1, 'created_at'=>new DateTime() ]); // $faker = Faker\Factory::create(); // for ($i=0; $i < 5; $i++) { // DB::table('chitiethoadons')->insert([ // 'hd_id'=>2, // 'created_at'=>new DateTime() // ]); // } }
{ "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' => 'simpleadressemail@mail.com', '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'=> \"admin@admin.com\"\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' => 'admin@petstore.com',\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' => 'prosales@researchmobile.co',\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' => 'movil@researchmobile.co',\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'=>'test@yandex.ru'\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' => 'admin@yahoo.com',\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' => 'programmerlemar@gmail.com',\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' => 'qwerty@gmail.com',\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=> 'admin@example.com',\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' => 'briedis@aa.bb',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => 'briedis2@aa.bb',\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' => 'admin@admin.com',\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' => 'ignacio@dh.com',\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' => 'admin@gmail.com',\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\"=>'alice@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'bob@gmail.com',\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 = your.email@domain.com\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' => 'admin@gmail.com',\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'=>'papesambandour@hotmail.com',\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' => 'rognales@gmail.com',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => 'sonic21danger@gmail.com',\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' => 'sovon.kucse@gmail.com']);\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'=>'abada@gmail.com',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','abada@gmail.com')->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' => 'eddyjaair@gmail.com']);\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' => 'barbozagonzalesjose@gmail.com',\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' => 'russell@gmail.com',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => 'bitfumes@gmail.com',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => 'paul@gmail.com',\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' => 'pkw@pkw.com',\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' => 'empresa02@gmail.com',\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' => 'carlos@email.com',\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'=>'izzanniroshlei@gmail.com',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'aina@gmail.com',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'sab@gmail.com',\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' => 'pedrito@juase.com',\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'=>'hienphan18112015@gmail.com', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'haphan@gmail.com', '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
Display a listing of the resource.
public function index() { $pharmacies = $this->pharmacies->index(); return view('pharmacies_products.index', compact('pharmacies')); }
{ "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() { $data = $this->pharmacies->getData(); return view('pharmacies_products.create',compact('data')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(PharmaciesProductsRequest $request) { $pharmacies = $this->pharmacies->store($request); if ($pharmacies) { return Redirect::to('pharmacies_products'); } else { return Redirect::back()->withErrors($pharmacies); } }
{ "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) { $pharmacies = $this->pharmacies->show($id); return view('pharmacies_products/show', compact('pharmacies')); }
{ "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) { $data = $this->pharmacies->getData(); $pharmacies = $this->pharmacies->show($id); return view('pharmacies_products/edit', compact('pharmacies','data')); }
{ "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(PharmaciesProductsRequest $request, $id) { $pharmacies = $this->pharmacies->update($request,$id); if ($pharmacies) { return Redirect::to('pharmacies_products'); } else { return Redirect::back()->withErrors($pharmacies); } }
{ "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) { return $this->pharmacies->destroy($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
/ On recupere l'event et l'id de l'utilisateur et on lui envoie un mail au bde pour le notifier
public function evenement($id) { $evenement = Evenement::findOrFail($id); $id_utilisateur = \Auth::user()->id; \Mail::to('bde@exiacesi.fr')->send(new AvertissementNuisanceEvenementEmail($evenement, $id_utilisateur)); return back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function email_evento_id($id){\r\n $this->db->trans_start();\r\n\r\n $query = $this->db->select('registrado_por')\r\n ->where('id_evento', $id)\r\n ->get('evento');\r\n \r\n log_message('ERROR', 'llego a email_evento_id con id -->'.$id);\r\n \r\n if ($query->num_rows() > 0) \r\n {\r\n $row = $query->row(); \r\n $this->db->trans_complete(); \r\n \r\n $email = $this->email_evento($row->registrado_por); //llega el nombre de quien registra\r\n log_message('ERROR', 'se captura el correo -->'.$email);\r\n \r\n return $email;\r\n } \r\n else \r\n {\r\n $this->db->trans_complete();\r\n return FALSE;\r\n }\r\n\r\n $this->db->trans_complete();\r\n }", "function email_conferencia($id){\r\n $this->db->trans_start();\r\n\r\n $query = $this->db->select('email_user') //busco el email del user que registro el evento.\r\n ->where('id_evento', $id)\r\n ->get('evento');\r\n \r\n log_message('ERROR', 'llego a email_conferencia con id -->'.$id);\r\n \r\n if ($query->num_rows() > 0) \r\n {\r\n $row = $query->row(); \r\n $this->db->trans_complete(); \r\n \r\n //$email = $this->email_evento($row->registrado_por); //llega el nombre de quien registra\r\n log_message('ERROR', 'email_conferencia envio link a correo -->'.$email);\r\n \r\n return $row->email_user;\r\n } \r\n else \r\n {\r\n $this->db->trans_complete();\r\n log_message('ERROR', 'momv->email_conferencia eno encuentra correo ');\r\n return FALSE;\r\n }\r\n\r\n $this->db->trans_complete();\r\n }", "protected function afterInsert() {\r\n // echo 'checking mail todo'.BR;\r\n $lUid = intval($this -> mVal['user_id']);\r\n if (empty($lUid)) {\r\n return;\r\n }\r\n $lSql = 'SELECT val FROM al_usr_pref WHERE uid='.$lUid.' AND code=\"sys.mail.todo\"';\r\n $lVal = CCor_Qry::getStr($lSql);\r\n if (FALSE === $lVal) {\r\n $lSql = 'SELECT val FROM al_sys_pref WHERE code=\"sys.mail.todo\"';\r\n $lVal = CCor_Qry::getStr($lSql);\r\n } \r\n if (smEveryTime == $lVal) {\r\n // mail versenden\r\n $lUsr = CCor_Usr::getInstance();\r\n $lFMail = $lUsr -> getVal('email');\r\n $lFName = $lUsr -> getVal('firstname').' '.$lUsr -> getVal('lastname');\r\n \r\n $lSql = 'SELECT firstname,lastname,email FROM al_usr WHERE id='.intval($lUid);\r\n $lQry = new CCor_Qry($lSql);\r\n if ($lRow = $lQry -> getAssoc()) {\r\n $lToName = $lRow['firstname'].' '.$lRow['lastname'];\r\n $lToMail = $lRow['email'];\r\n $lMsg = 'Dear user,'.LF.LF.'you have a new todo in your todo list:'.LF.LF;\r\n $lMsg.= $this['subject'].LF.LF; \r\n $lCfg = CCor_Cfg::getInstance();\r\n $lUrl = $lCfg -> getVal('base.url').'index.php?act=';\r\n $lMsg.= 'Link: '.$lUrl.$this['ref_link'];\r\n #echo $lMsg;\r\n $lMai = new CApi_Mail_Item($lFMail, $lFName, $lToMail, $lToName, 'Todo: '.$this['subject'], $lMsg);\r\n #$lMai -> send();\r\n $lMai -> insert();\r\n }\r\n } \r\n }", "function attendeeRegistrationEditNotification($eventID, $userID, $attenID, $status, $eventName, $attenFirstName, $attenLastName) \r\r\n\t{\r\r\n\t\t$result = mysql_query(\"select emailAddress from User where userID = '\".$attenID.\"'\");\r\r\n\t\t$num_rows = mysql_num_rows($result);\r\r\n\t\t\r\r\n\t\tif (!$result) \r\r\n\t\t{\r\r\n\t\t \tthrow new Exception('Could not find email address.');\r\r\n\t\t} \r\r\n\t\telse if ($num_rows == 0) \r\r\n\t\t{\r\r\n\t\t\tthrow new Exception('Could not find the user!');\r\r\n\t\t} \r\r\n\t\telse \r\r\n\t\t{\r\r\n\t\t\t$apostrophe \t\t= array(\"\\'\"); // for fixing apostrophe issue\r\r\n\t\t\t$attenFirstName \t= str_replace($apostrophe, \"'\", $attenFirstName);\r\r\n\t\t\t$attenLastName \t\t= str_replace($apostrophe, \"'\", $attenLastName);\r\r\n\t\t\t$eventName \t\t\t= str_replace($apostrophe, \"'\", $eventName);\r\r\n\t\t\t\r\r\n\t\t \t$row = mysql_fetch_object($result);\r\r\n\t\t\t$email = $row -> emailAddress;\r\r\n\r\r\n\t\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'From: uGather <ugather@ugather.info>' . \"\\r\\n\";\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t$sub = \"uGather: \".$attenID.\": Event Registration for \".$eventName.\"\";\r\r\n\t\t\t$mesg = \"<html>\r\r\n\t\t\t\t\t\t<head>\r\r\n\t\t\t\t\t\t\t<title>You have registered for an event!</title>\r\r\n\t\t\t\t\t\t</head>\r\r\n\t\t\t\t\t\t<body>\r\r\n\t\t\t\t\t\t<h2 style=\\\"font-family: 'Trebuchet MS', 'Helvetica Neue', Arial, Sans-serif; font-weight: bold; padding: 10px 0 5px 5px; color: #444; font-size: 2.5em; color: #88AC0B; border-bottom: 1px solid #E4F2C8; letter-spacing: -2px; margin-left: 5px; \\\">uGather Event Registration Change</h2>\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">Hello, \".$attenFirstName.\" \".$attenLastName.\"! </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">You have changed your registration status for the event <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">\".$eventName.\"</a> at <a href=\\\"http://www.ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. <br />\r\r\n\t\t\t\t\t\tYour registration status for \".$eventName.\" is: \".$status.\". </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">You can find the event page for \".$eventName.\" here: <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view event \".$eventName.\"</a>. You can view all of the attendees to that event here: <a href=\\\"http://www.ugather.info/viewAttendees.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view attendees to \".$eventName.\"</a>. </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">This is an automatically generated email from <a href=\\\"http://ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. Please do not respond. Thank you.</p> \r\r\n\t\t\t\t\t\t</body>\r\r\n\t\t\t\t\t\t</html>\";\r\r\n\t\r\r\n\t\t\tif (mail($email, $sub, $mesg, $headers)) \r\r\n\t\t\t{\r\r\n\t\t\t\treturn true;\r\r\n\t\t\t} \r\r\n\t\t\telse \r\r\n\t\t\t{\r\r\n\t\t\t\tthrow new Exception('Could not send email.');\r\r\n\t\t\t}\r\r\n \t}\r\r\n\t}", "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}", "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 attendeeRegistrationNotification($eventID, $userID, $attenID, $status, $eventName, $attenFirstName, $attenLastName) \r\r\n\t{\r\r\n\t\t$result = mysql_query(\"select emailAddress from User where userID = '\".$attenID.\"'\");\r\r\n\t\t$num_rows = mysql_num_rows($result);\r\r\n\t\t\r\r\n\t\tif (!$result) \r\r\n\t\t{\r\r\n\t\t \tthrow new Exception('Could not find email address.');\r\r\n\t\t} \r\r\n\t\telse if ($num_rows == 0) \r\r\n\t\t{\r\r\n\t\t\tthrow new Exception('Could not find the user!');\r\r\n\t\t} \r\r\n\t\telse \r\r\n\t\t{\r\r\n\t\t\t$apostrophe \t\t= array(\"\\'\"); // for fixing apostrophe issue\r\r\n\t\t\t$attenFirstName \t= str_replace($apostrophe, \"'\", $attenFirstName);\r\r\n\t\t\t$attenLastName \t\t= str_replace($apostrophe, \"'\", $attenLastName);\r\r\n\t\t\t$eventName \t\t\t= str_replace($apostrophe, \"'\", $eventName);\r\r\n\t\t\t\r\r\n\t\t \t$row = mysql_fetch_object($result);\r\r\n\t\t\t$email = $row -> emailAddress;\r\r\n\r\r\n\t\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'From: uGather <ugather@ugather.info>' . \"\\r\\n\";\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t$sub = \"uGather: \".$attenID.\": Event Registration for \".$eventName.\"\";\r\r\n\t\t\t$mesg = \"<html>\r\r\n\t\t\t\t\t\t<head>\r\r\n\t\t\t\t\t\t\t<title>You have registered for an event!</title>\r\r\n\t\t\t\t\t\t</head>\r\r\n\t\t\t\t\t\t<body>\r\r\n\t\t\t\t\t\t<h2 style=\\\"font-family: 'Trebuchet MS', 'Helvetica Neue', Arial, Sans-serif; font-weight: bold; padding: 10px 0 5px 5px; color: #444; font-size: 2.5em; color: #88AC0B; border-bottom: 1px solid #E4F2C8; letter-spacing: -2px; margin-left: 5px; \\\">\r\r\nuGather Event Registration</h2>\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">Hello, \".$attenFirstName.\" \".$attenLastName.\"! </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">You have changed your registration status for the event <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">\".$eventName.\"</a> at <a href=\\\"http://www.ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. <br />\r\r\n\t\t\t\t\t\tYour registration status for \".$eventName.\" is: \".$status.\". </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">You can find the event page for \".$eventName.\" here: <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view event \".$eventName.\"</a>. You can view all of the attendees to that event here: <a href=\\\"http://www.ugather.info/viewAttendees.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view attendees to \".$eventName.\"</a>. </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">This is an automatically generated email from <a href=\\\"http://ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. Please do not respond. Thank you.</p> \r\r\n\t\t\t\t\t\t</body>\r\r\n\t\t\t\t\t\t</html>\";\r\r\n\t\r\r\n\t\t\tif (mail($email, $sub, $mesg, $headers)) \r\r\n\t\t\t{\r\r\n\t\t\t\treturn true;\r\r\n\t\t\t} \r\r\n\t\t\telse \r\r\n\t\t\t{\r\r\n\t\t\t\tthrow new Exception('Could not send email.');\r\r\n\t\t\t}\r\r\n \t}\r\r\n\t}", "function updateSingleEvent($celestaid,$user_data,$ev_data,$ev_id,$paid_amount){\n updateUser($celestaid,$paid_amount,$ev_id,$user_data,$ev_data['ev_name']);\n\n updateSingleEventTable($celestaid,$paid_amount,$ev_id,$ev_data);\n\n $qrcode=$user_data['qrcode'];\n $subject=\"Celesta Events Payment\";\n $ev_name=$ev_data['ev_name'];\n $email=$user_data[\"email\"];\n $msg=\"<p>\n Your Celesta Id is \".$celestaid.\".<br>\n You have successfully paid for $ev_name.<br>\n Amount paid is: Rs. $paid_amount<br>\n You qr code is <img src='$qrcode'/> <a href='$qrcode'>click here</a><br/>\n </p>\n \";\n $header=\"From: celesta19@gmail.com\";\n send_email($email,$subject,$msg,$header);\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('programaenlazamundos@cta.org.co ', 'Programa Enlazamundos');\n $mail->addTo($correo);\n $mail->setSubject('Confirmación de registro Enlazamundos');\n $mail->send();\n return;\n }\n}", "function pp_events_send_attend_notification( $to_user_id = 0, $from_user_id = 0, $post_id = 0 ) {\r\n\r\n\tif ( empty( $to_user_id ) || empty( $from_user_id ) || empty( $post_id ) )\r\n\t\treturn;\r\n\r\n\t$bp = buddypress();\r\n\r\n\r\n\t$send_notify = get_post_meta( $post_id, 'event-attend-notify', true );\r\n\r\n\tif ( ! empty( $send_notify ) ) {\r\n\r\n\t\tbp_notifications_add_notification( array(\r\n\t\t\t'user_id' => $to_user_id,\r\n\t\t\t'item_id' => $post_id,\r\n\t\t\t'secondary_item_id' => $from_user_id,\r\n\t\t\t'component_name' => $bp->events->id,\r\n\t\t\t'component_action' => 'event_attender'\r\n\t\t) );\r\n\t}\r\n\r\n\r\n\t// Check to see if the Event owner wants emails\r\n\tif( 'yes' == get_user_meta( (int)$to_user_id, 'notification_events', true ) ) {\r\n\r\n\t\t$sender_name = bp_core_get_user_displayname( $from_user_id, false );\r\n\t\t$receiver_name = bp_core_get_user_displayname( $to_user_id, false );\r\n\t\t$receiver_email = bp_core_get_user_email( $to_user_id );\r\n\r\n\t\t$sender_profile_link = trailingslashit( bp_core_get_user_domain( $from_user_id ) );\r\n\t\t$event_link = get_permalink( $post_id );\r\n\r\n\t\t$attendees = get_post_meta( $post_id, 'event-attendees', true );\r\n\t\tif( in_array( $from_user_id, $attendees ) )\r\n\t\t\t$going = __( 'is attending your Event', 'bp-simple-events' );\r\n\t\telse\r\n\t\t\t$going = __( 'is not attending your Event', 'bp-simple-events' );\r\n\r\n\t\t// Set up and send the message\r\n\t\t$to = $receiver_email;\r\n\t\t$subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( '%s %s', 'bp-simple_events' ), stripslashes( $sender_name ), $going );\r\n\r\n\r\n\t\t$message = sprintf( __(\r\n'%s %s\r\n\r\nTo see %s\\'s profile: %s\r\n\r\nEvent: %s\r\n\r\n---------------------\r\n', 'bp-simple_events' ), $sender_name, $going, $sender_name, $sender_profile_link, $event_link );\r\n\r\n\t\t// Only add the link to email notifications settings if the component is active\r\n\t\tif ( bp_is_active( 'settings' ) ) {\r\n\t\t\t$receiver_settings_link = trailingslashit( bp_core_get_user_domain( $to_user_id ) . bp_get_settings_slug() . '/notifications' );\r\n\t\t\t$message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'bp-simple_events' ), $receiver_settings_link );\r\n\t\t}\r\n\r\n\t\twp_mail( $to, $subject, $message );\r\n\r\n\t}\r\n}", "function subscribeUser()\n\t\t{\n\t\t\techo $this->email.\"add to the database !!\";\n\t\t}", "public function Notify_owner_ready($requeridor, $vale)\n {\n if($this->email_check($requeridor['email'])){\n if($vale['id_estado']->id_estado_entrega == $this->CI->config->item('EnProcesoDeArmado')){\n\n $header = '[Sistema de Vales #'.$vale['id_vale'].'] Su vale se encuentra en proceso de armado';\n\n }elseif($vale['id_estado']->id_estado_entrega == $this->CI->config->item('ListoParaRetirar')){\n\n $header = '[Sistema de Vales #'.$vale['id_vale'].'] Su vale ya esta listo para ser retirado';\n\n }elseif($vale['id_estado']->id_estado_entrega == $this->CI->config->item('Retirado')){\n\n $header = '[Sistema de Vales #'.$vale['id_vale'].'] Su vale ha sido retirado';\n\n }elseif($vale['id_estado']->id_estado_entrega == $this->CI->config->item('RechazoPorFaltaDeStock')){\n\n $header = '[Sistema de Vales #'.$vale['id_vale'].'] Su vale ha sido Rechazado por falta de stock';\n }\n $body = $this->CI->load->view('email/update_status', $vale, TRUE);\n $dbdata = array(\n '_recipients' => $requeridor['email'],\n '_body' => $body,\n '_headers' => $header,\n );\n $this->CI->mailer->new_mail_queue($dbdata);\n }\n }", "function validateSendTo($event, array $infos, $notify_me = false, $emitter = null) {\n $users_id = Session::getLoginUserID(false);\n\n // Override session ID with emitter ID if supplied\n if (is_int($emitter)) {\n // We have an ID, we can use it directly\n $users_id = $emitter;\n } else if (is_string($emitter)) {\n // We have an email, we need to check that the users_id is -1 which\n // is the value used for anonymous user and compare the emails\n if (isset($infos['users_id']) && $infos['users_id'] == -1\n && isset($infos['email']) && $infos['email'] == $emitter\n ) {\n $users_id = -1;\n }\n }\n\n if (!$notify_me) {\n if (isset($infos['users_id'])\n // Check login user and not event launch by crontask\n && ($infos['users_id'] === $users_id)) {\n return false;\n }\n }\n\n return true;\n }", "private function verificarEmail(){\n\t \n\t \t\t//Verifica se a requisição é via AJAX\n\t \t\tif(HelperFactory::getInstance()->isAjax()){\n\t \t\t\n\t \t\t\t //Solicita a verificação do E-mail\n\t\t\t\t $this->Delegator('ConcreteCadastro', 'verificarEmail',$this->getPost());\t \t\t\t \n\t \t\t}\t \n\t }", "public function init(){\n $this->on(SELF::EVENT_NEW_USER,[$this,'SendMailToAdmin']);\n\t\t$this->created_at = time();\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 : \"no_reply@nonprofitsoftwarecorp.org\");\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 }", "function eventPlannerRegistrationEditNotification($eventID, $userID, $status, $eventName, $userFirstName, $userLastName, $plannerFirstName, $plannerLastName) \r\r\n\t{\r\r\n\t\t$result = mysql_query(\"select emailAddress from User where userID in (select userID from Event where eventID = '\".$eventID.\"')\");\r\r\n\t\t$num_rows = mysql_num_rows($result);\r\r\n\t\tif (!$result) \r\r\n\t\t{\r\r\n\t\t \tthrow new Exception('Could not find email address for that event.');\r\r\n\t\t} \r\r\n\t\telse if ($num_rows == 0) \r\r\n\t\t{\r\r\n\t\t\tthrow new Exception('Could not find event planner for event.');\r\r\n\t\t} \r\r\n\t\telse \r\r\n\t\t{\r\r\n\t\t\t$apostrophe \t\t= array(\"\\'\"); // for fixing apostrophe issue\r\r\n\t\t\t$userFirstName \t\t= str_replace($apostrophe, \"'\", $userFirstName);\r\r\n\t\t\t$userLastName \t\t= str_replace($apostrophe, \"'\", $userLastName);\r\r\n\t\t\t$plannerFirstName \t\t= str_replace($apostrophe, \"'\", $plannerFirstName);\r\r\n\t\t\t$plannerLastName \t\t= str_replace($apostrophe, \"'\", $plannerLastName);\r\r\n\t\t\t$eventName \t\t\t= str_replace($apostrophe, \"'\", $eventName);\r\r\n\t\t\t\r\r\n\t\t \t$row = mysql_fetch_object($result);\r\r\n\t\r\r\n\t\t\t$email = $row -> emailAddress;\r\r\n\t\t\t\r\r\n\t\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'From: uGather <ugather@ugather.info>' . \"\\r\\n\";\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t$sub = \"uGather: \".$userID.\": Event Registration for \".$eventName.\"\";\r\r\n\t\t\t$mesg = \"<html>\r\r\n\t\t\t\t\t\t<head>\r\r\n\t\t\t\t\t\t\t<title>Someone has registered for your event!</title>\r\r\n\t\t\t\t\t\t</head>\r\r\n\t\t\t\t\t\t<body>\r\r\n\t\t\t\t\t\t<h2 style=\\\"font-family: 'Trebuchet MS', 'Helvetica Neue', Arial, Sans-serif; font-weight: bold; padding: 10px 0 5px 5px; color: #444; font-size: 2.5em; color: #88AC0B; border-bottom: 1px solid #E4F2C8; letter-spacing: -2px; margin-left: 5px; \\\">uGather Event Registration Change</h2>\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">Hello, \".$plannerFirstName.\" \".$plannerLastName.\"! </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">The user \".$userID.\" (\".$userFirstName.\" \".$userLastName.\") has changed their registration status for your event, <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">\".$eventName.\"</a>, at <a href=\\\"http://www.ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. <br />\r\r\n\t\t\t\t\t\t\".$userID.\"'s registration status for \".$eventName.\" is: \".$status.\". </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">You can find the event page for \".$eventName.\" here: <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view event \".$eventName.\"</a>. You can view all of the attendees to your event here: <a href=\\\"http://www.ugather.info/viewAttendees.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view attendees to \".$eventName.\"</a>. </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">This is an automatically generated email from <a href=\\\"http://ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. Please do not respond. Thank you.</p> \r\r\n\t\t\t\t\t\t</body>\r\r\n\t\t\t\t\t\t</html>\";\r\r\n\t\r\r\n\t\t\tif (mail($email, $sub, $mesg, $headers)) \r\r\n\t\t\t{\r\r\n\t\t\t\treturn true;\r\r\n\t\t\t} \r\r\n\t\t\telse \r\r\n\t\t\t{\r\r\n\t\t\t\tthrow new Exception('Could not send email.');\r\r\n\t\t\t}\r\r\n \t}\r\r\n\t}", "public function Enviar_Email() : void\n {\n $valor = array();\n $valor['status'] = '';\n $valor['html'] = '';\n $valor['campos'] = $this->campos;\n \n if (empty($this->erros)) {\n if (Email::Enviar_Contato_Anunciante($this->obj_contato_anunciante)) {\n $this->obj_contato_anunciante->set_datahora_envio(date('Y-m-d H:i:s'));\n $this->obj_contato_anunciante->set_lido(false);\n \n DAO_Contato_Anunciante::Inserir($this->obj_contato_anunciante);\n \n $valor['status'] = 'certo';\n $valor['html'] = \"<li>Enviado com Sucesso</li>\";\n } else {\n $valor['status'] = 'erro';\n $valor['html'] = '<li>Erro ao tentar enviar e-mail</li>';\n }\n } else {\n $valor['status'] = 'erro';\n \n foreach ($this->erros as $erro) {\n $valor['html'] .= \"<li>$erro</li>\";\n }\n }\n \n echo json_encode($valor);\n }", "public function 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 static function setMSGForHaveNTEmailUsers() {\n\n // not have email end moderation job seekers\n $queryMail = \"\n SELECT\n u.id_user,\n u.email,\n u.crdate,\n u.mdate,\n u.status,\n r.ismoder\n FROM\n user u\n INNER JOIN \n resume r ON r.id_user=u.id_user \n WHERE\n DATE(u.crdate) >= NOW() - INTERVAL 1 DAY \n or \n DATE(u.mdate) >= NOW() - INTERVAL 1 DAY \n GROUP BY u.id_user\n \";\n $queryMail = Yii::app()->db->createCommand($queryMail)->queryAll();\n\n if(count($queryMail)){\n\n foreach ($queryMail as $user){\n $email = $user['email'];\n if ((!preg_match(\"/^(?:[a-z0-9]+(?:[-_.]?[a-z0-9]+)?@[a-z0-9_.-]+(?:\\.?[a-z0-9]+)?\\.[a-z]{2,5})$/i\", $email))\n || ( $email = '' )){\n /**\n * Send messages to users who did not enter the email\n */\n $resultm['users'][] = $user['id_user'];\n $resultm['title'] = 'Администрация';\n $resultm['text'] = 'Уважаемый пользователь, будьте добры заполнить \n поле e-mail в вашем профиле.\n Заранее спасибо!';\n }\n }\n $admMsgM = new AdminMessage();\n\n // send notifications\n if (isset($resultm)) {\n $admMsgM->sendDataByCron($resultm);\n }\n\n foreach ($queryMail as $user){\n $status = $user['status'];\n $ismoder = $user['ismoder'];\n if ( ($status == 2) && ($ismoder != 1)){\n /**\n * Send messages to users who did not enter moderation information\n */\n $resultjs['users'][] = $user['id_user'];\n $resultjs['title'] = 'Администрация';\n $resultjs['text'] = 'Уважаемый пользователь, заполните '.\n 'поля, необходимые для модерации:'.\n '<ul style=\"text-align:left\">'.\n '<li>имя и фамилия</li>'.\n '<li>год рождения</li>'.\n '<li>Фото(допускается и без него, на фото не природа, '.\n 'не больше одной личности, не анимация и т.д)</li>'.\n '<li>номер телефона и эмейл</li>'.\n '<li>целевая вакансия</li>'.\n '<li>раздел \"О себе\"</li>'.\n '<ul>';\n }\n }\n $admMsgJS = new AdminMessage();\n if (isset($resultjs)) {\n $admMsgJS->sendDataByCron($resultjs);\n }\n\n }\n\n $queryEmpl = \"\n SELECT\n u.id_user,\n u.email,\n u.crdate,\n u.mdate,\n u.status,\n e.ismoder\n FROM\n user u\n INNER JOIN \n employer e ON e.id_user=u.id_user \n WHERE\n (\n DATE(u.crdate) >= NOW() - INTERVAL 1 DAY \n or \n DATE(u.mdate) >= NOW() - INTERVAL 1 DAY\n ) and u.status = 3 \n \n GROUP BY u.id_user\n \";\n $queryEmpl = Yii::app()->db->createCommand($queryEmpl)->queryAll();\n\n if(count($queryEmpl)) {\n\n foreach ($queryEmpl as $user){\n $ismoder = $user['ismoder'];\n if ( $ismoder != 1 ){\n /**\n * Send messages to employer who did not enter moderation information\n */\n $resulte['users'][] = $user['id_user'];\n $resulte['title'] = 'Администрация';\n $resulte['text'] = 'Уважаемый пользователь, заполните '.\n 'поля в вашем профиле, необходимые для модерации:'.\n '<ul style=\"text-align:left\">'.\n '<li>название компании</li>'.\n '<li>логотип - желаельно</li>'.\n '<li>номер телефона и эмейл</li>'.\n '<li>имя контактного лица</li>'.\n '<li>контактный номер телефона</li>'.\n '<ul>';\n }\n }\n $admMsgE = new AdminMessage();\n if (isset($resulte)) {\n $admMsgE->sendDataByCron($resulte);\n }\n }\n\n }", "function email_notification_objet($id_objet, $type_objet, $modele) {\n\t$envoyer_mail = charger_fonction('envoyer_mail','inc'); // pour nettoyer_titre_email\n\t$id_type = id_table_objet($type_objet);\n\treturn recuperer_fond($modele,array($id_type=>$id_objet,\"id\"=>$id_objet));\n}", "public function envoyer_email($id)\n {\n\n $q = $this->db->where('fac_id', $id)\n ->where('fac_inactif is null')\n ->select('t_factures.*,scv_email')\n ->join('t_commandes', 'cmd_id=fac_commande', 'left')\n ->join('t_devis', 'dvi_id=cmd_devis', 'left')\n ->join('t_societes_vendeuses', 'scv_id=dvi_societe_vendeuse', 'left')\n ->get('t_factures');\n if ($q->num_rows() != 1) {\n throw new MY_Exceptions_NoSuchRecord('Impossible de trouver la facture numéro ' . $id);\n }\n $row = $q->row();\n\n // récupération du contact et du correspondant\n $q = $this->db->select(\"dvi_client,dvi_correspondant\")\n ->join('t_commandes', 'cmd_id=' . $row->fac_commande, 'left')\n ->join('t_devis', 'dvi_id=cmd_devis', 'left')\n ->get('t_factures');\n if ($q->num_rows() == 0) {\n throw new MY_Exceptions_NoSuchUser('Pas de correspondant trouvé pour la facture ' . $id);\n }\n\n $row2 = $q->row();\n\n // récupération de l'adresse email\n $q = $this->db->where('cor_id', $row2->dvi_correspondant)\n ->where('LENGTH(cor_email)>0')\n ->get('t_correspondants');\n if ($q->num_rows() == 1) {\n $email = $q->row()->cor_email;\n } else {\n $q = $this->db->where('ctc_id', $row2->dvi_client)\n ->where('LENGTH(ctc_email)>0')\n ->get('t_contacts');\n if ($q->num_rows() == 1) {\n $email = $q->row()->ctc_email;\n }\n }\n if (!$email) {\n throw new MY_Exceptions_NoEmailAddress(\"Le contact n'a pas d'adresse email\");\n }\n\n // récupération du modèle de document\n $q = $this->db->where('mod_nom', 'FACTURE')\n ->get('t_modeles_documents');\n if ($q->num_rows() == 0) {\n throw new MY_Exceptions_NoSuchTemplate(\"Pas de modèle disponible pour le message email\");\n }\n $sujet = $q->row()->mod_sujet;\n $corps = $q->row()->mod_texte;\n\n $fac_fichier = $this->generer_pdf($id);\n\n // envoi du mail\n $this->load->library('email');\n $resultat = $this->email->send_one($email, $row->scv_email, $sujet, $corps, $fac_fichier);\n if (!$resultat) {\n return false;\n }\n\n // enregistrement de la transmission\n $transmise = $row->fac_transmise;\n if ($transmise != '') {\n $transmise .= '<br />';\n }\n $transmise .= date('d/m/Y') . '&nbsp;Mail';\n $data = array(\n 'fac_transmise' => $transmise,\n );\n return $this->_update('t_factures', $data, $id, 'fac_id');\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 }", "private function sendRegistrationConfirmMail($event,$registrator){\n\t\tif($this->Session->read('dontSendEmails')) return;\n\t \t\t$mailArray['first_name'] = $registrator['first_name'];\n\t\t\t$mailArray['last_name'] = $registrator['last_name'];\n\t\t\t$mailArray['email'] = $registrator['email'];\n\t\t\t$mailArray['event_name'] = $event['name'];\n\t \t\t$this->sendBookingMail($mailArray);\n\t}", "public function onSendMail(Enlight_Event_EventArgs $args)\n {\n $this->mails[] = $args->getMail();\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 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 static function sendEmailReminder()\n {\n /*'text'->Notification.notification_message\n subject-> notification_subject \n\n sender can be from .env or email of currently logged user ....\n to... list from vic, vol, emp\n */\n /*Mail::raw(Input::get('notification_message'), function($message) {\n $message->from('cmpuchane@gmail.com', 'NECare System email');\n\n $message->to('cmpuchanemolefha@unomaha.edu', 'Chanda')->subject(Input::get('notification_subject'));\n });\n */\n\n $activities= Input::get('activity_id');\n //if volunteer = 'Y'\n if (Input::get('to_all_volunteers')=='Y') {\n\n\n $activitydetails = Activitydetail::where('activity_id', $activities)->value('volunteer_id'); \n $volunteers = Volunteer::where('id', $activitydetails)->get(); \n foreach ($volunteers as $volunteer) {\n Mail::raw(Input::get('notification_message'), function($message) use ($volunteer) {\n $message->from('team6necare@gmail.com', 'NECare System email');\n\n $message->to($volunteer->email, $volunteer->last_name.\", \".$volunteer->first_name)->subject(Input::get('notification_subject'));\n });\n } \n }\n\n //if victim = 'Y'\n if (Input::get('to_all_victims')=='Y') {\n\n $activitydetails = Activitydetail::where('activity_id', $activities)->value('victim_id'); \n $victims = Victim::where('id', $activitydetails)->get(); \n foreach ($victims as $victim) {\n Mail::raw(Input::get('notification_message'), function($message) use ($victim) {\n $message->from('team6necare@gmail.com', 'NECare System email');\n\n $message->to($victim->email, $victim->last_name.\", \".$victim->first_name)->subject(Input::get('notification_subject'));\n });\n }\n }\n\n //if employee = 'Y'\n if (Input::get('to_all_employees')=='Y') {\n\n\n $activitydetails = Activitydetail::where('activity_id', $activities)->value('employee_id'); \n $employees = Employee::where('id', $activitydetails)->get(); \n foreach ($employees as $employee) {\n Mail::raw(Input::get('notification_message'), function($message) use ($employee) {\n $message->from('team6necare@gmail.com', 'NECare System email');\n\n $message->to($employee->email, $employee->last_name.\", \".$employee->first_name)->subject(Input::get('notification_subject'));\n });\n } \n }\n }", "public function notifyRSVPRegistered( $data )\n {\n $subject = \"Event Manager - RSVP Registered\";\n\n $msg = '\n <img src=\"http://' . $_SERVER['HTTP_HOST'] . '/images/event.png\" width=\"200\" height=\"200\" alt=\"Event Manager Banner\"/>\n\n <br><br>\n Hello ' . $data['Eid'] . ',\n\n <br><br>\n We have received your RSVP on ' . date(\"m/d/Y\") . ' through the event management platform.\n\n <br><br>\n\n <hr>\n\n <br>\n\n <table>\n <tr>\n <td colspan=\"2\">\n Reservation Information\n </td>\n </tr>\n <tr>\n <td colspan=\"2\">\n ---------------------------------------------------------\n </td>\n </tr>\n <tr>\n <td width=\"50%\">\n Your EID:\n </td>\n <td width=\"50%\">' .\n $data['Eid'] . '\n </td>\n </tr>\n <tr>\n <td>\n Event Name:\n </td>\n <td>' .\n $data['Name'] . '\n </td>\n </tr>\n <tr>\n <td>\n Event Date:\n </td>\n <td>' .\n $data['Date'] . '\n </td>\n </tr>\n <tr>\n <td>\n Event Location:\n </td>\n <td>' .\n $data['Location'] . '\n </td>\n </tr>\n </table>\n\n <br><br>\n\n An iCal has been attached for your convenience, please use it to add a reminder to your calendar.\n\n <br><br>\n\n Thank you,\n <br>\n Event Manager<br><br>';\n\n return $this->sendEmail( array( \"subject\"=>$subject, \"msg\"=>$msg, \"email\"=>$data['Email'], \"name\"=>$data['Eid'], \"iCal\"=>$data['iCal'] ) );\n }", "function sendEventStartNotificationEmail( $userObject, $node )\n {\n // Settings\n $sini = eZINI::instance( \"site.ini\" );\n $siteUrl = $sini->variable( \"SiteSettings\", \"SiteURL\" );\n\n $ini = eZINI::instance( \"bceventnotifications.ini\" );\n $eventStartDateTimeIdentifier = $ini->variable( \"EventNotificationsSettings\", \"EventClassAttributeIdentifierStartDateTime\" );\n $eventEndDateTimeIdentifier = $ini->variable( \"EventNotificationsSettings\", \"EventClassAttributeIdentifierEndDateTime\" );\n\n $eventName = $node->attribute('name');\n $eventUrl = $node->attribute('url_alias');\n $eventDataMap = $node->dataMap();\n\n $eventFromDateContent = $eventDataMap[$eventStartDateTimeIdentifier];\n $eventFromDate = $eventFromDateContent->content();\n\n $eventToDateContent = $eventDataMap[$eventEndDateTimeIdentifier];\n $eventToDate = $eventToDateContent->content();\n\n // Fetch Current User Session / Email\n $userID = $userObject->ContentObjectID;\n $user = eZUser::fetch( $userID );\n $userEmail = $user->Email;\n\n $currentUserObject = $userObject;\n $currentUserObjectDataMap = $currentUserObject->dataMap();\n\n // Fetch User First Name\n $attributeFirstName = $currentUserObjectDataMap['first_name'];\n $attributeLastName = $currentUserObjectDataMap['last_name'];\n $firstName = $attributeFirstName->content();\n $lastName = $attributeLastName->content();\n\n // Build email to user\n include_once( 'kernel/common/template.php' );\n $tpl = templateInit();\n\n // Fetch site hostname\n // $tpl->setVariable( 'site_host', $siteUrl );\n\n // Fetch event information\n $tpl->setVariable( 'user_first_name', $firstName );\n $tpl->setVariable( 'user_last_name', $lastName );\n\n $tpl->setVariable( 'event_name', $eventName );\n $tpl->setVariable( 'event_url', \"http://\". $siteUrl.\"/\". $eventUrl );\n $tpl->setVariable( 'event_from_date', $eventFromDateContent );\n $tpl->setVariable( 'event_to_date', $eventToDateContent );\n\n // Send email to user\n $subject = \"Event Start Notification: \" . $eventName;\n $to = $userEmail;\n\n $body = $tpl->fetch(\"design:eventnotifications/eventstart.tpl\");\n $results = $this->sendNotificationEmail( $to, $subject, $body );\n\n return $results;\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 }", "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 }", "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}", "function event_notify($op, $data) {\n global $xoopsModuleConfig;\n $notify = $xoopsModuleConfig['notify'];\n if (!$notify) return;\n\n $xoopsMailer =& getMailer();\n $xoopsMailer->useMail();\n\n switch ($op) {\n case \"new\":\n\t$tpl = 'notify_admin_new.tpl';\n\t// notify suppress will be confused?\n\t$title = $data['title'];\n\t$edate = eventdate($data['edate']);\n\t$xoopsMailer->setSubject(_MD_NEWSUB);\n\t$note = ($data['status'] == STAT_POST)?_MD_APPROVE_REQ:\"\";\n\t$tags = array('EVENT_TITLE'=> $title,\n\t\t 'EVENT_DATE' => $edate,\n\t\t 'EVENT_NOTE' => $note,\n\t\t 'EVENT_URL' => EGUIDE_URL.\"/event.php?eid=\".$data['eid']);\n\tbreak;\n case \"update\":\n\t$tpl = 'notify_admin_change.tpl';\n\t$tags =& $data;\n\t$xoopsMailer->setSubject(_MD_UPDATE_SUBJECT);\n\tbreak;\n }\n $member_handler =& xoops_gethandler('member');\n $users = $member_handler->getUsersByGroup($xoopsModuleConfig['notify_group'], true);\n $uids = array();\n if ($notify==1) $uids[] = $GLOBALS['xoopsUser']->getVar('uid'); // suppress self\n $uid = $data['uid'];\n if (!in_array($uid, $uids)) { // update by not poster?\n\t$user = $member_handler->getUser($uid);\n\t$xoopsMailer->setToUsers($user);\n\t$uids[] = $uid;\n }\n foreach ($users as $user) {\n\tif (!in_array($user->getVar('uid'), $uids)) {\n\t $xoopsMailer->setToUsers($user);\n\t}\n }\n $xoopsMailer->setTemplateDir(template_dir($tpl));\n $xoopsMailer->setTemplate($tpl);\n $xoopsMailer->assign($tags);\n $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']);\n $xoopsMailer->setFromName(eguide_from_name());\n return $xoopsMailer->send();\n}", "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 }", "private function composeRoomChangeMail($a_user_id) {\r\n\t\t$lng = $this->lng;\r\n\r\n\t\t$this->initLanguage($a_user_id);\r\n\t\t$this->initMail();\r\n\t\t$this->setSubject($this->lng->txt('rep_robj_xrs_mail_room_changed_subject'));\r\n\t\t$this->setBody(ilMail::getSalutation($a_user_id, $this->getLanguage()));\r\n\t\t$this->appendBody(\"\\n\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_mail_room_changed_message') . \"\\n\");\r\n\t\tforeach ($this->bookings as $booking) {\r\n\t\t\tif ($booking['user_id'] != $a_user_id) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\t$roomname = $this->ilRoomSharingDatabase->getRoomName($booking['room_id']);\r\n\t\t\t\t$datestart = new ilDateTime($booking['date_from'], IL_CAL_DATETIME);\r\n\t\t\t\t$dateend = new ilDateTime($booking['date_to'], IL_CAL_DATETIME);\r\n\r\n\t\t\t\t$this->appendBody($lng->txt('rep_robj_xrs_room') . \" \");\r\n\t\t\t\t$this->appendBody($roomname . \" \");\r\n\t\t\t\t$this->appendBody($lng->txt('rep_robj_xrs_from') . \" \");\r\n\t\t\t\t$this->appendBody($datestart->get(IL_CAL_FKT_DATE, 'd.m.Y H:s') . \" \");\r\n\t\t\t\t$this->appendBody($lng->txt('rep_robj_xrs_to') . \" \");\r\n\t\t\t\t$this->appendBody($dateend->get(IL_CAL_FKT_DATE, 'd.m.Y H:s') . \"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function eventPlannerRegistrationNotification($eventID, $userID, $status, $eventName, $userFirstName, $userLastName, $plannerFirstName, $plannerLastName) \r\r\n\t{\r\r\n\t\t$result = mysql_query(\"select emailAddress from User where userID in (select userID from Event where eventID = '\".$eventID.\"')\");\r\r\n\t\t$num_rows = mysql_num_rows($result);\r\r\n\t\tif (!$result) \r\r\n\t\t{\r\r\n\t\t \tthrow new Exception('Could not find email address for that event.');\r\r\n\t\t} \r\r\n\t\telse if ($num_rows == 0) \r\r\n\t\t{\r\r\n\t\t\tthrow new Exception('Could not find event planner for event.');\r\r\n\t\t} \r\r\n\t\telse \r\r\n\t\t{\r\r\n\t\t\t$apostrophe \t\t= array(\"\\'\"); // for fixing apostrophe issue\r\r\n\t\t\t$userFirstName \t\t= str_replace($apostrophe, \"'\", $userFirstName);\r\r\n\t\t\t$userLastName \t\t= str_replace($apostrophe, \"'\", $userLastName);\r\r\n\t\t\t$plannerFirstName \t\t= str_replace($apostrophe, \"'\", $plannerFirstName);\r\r\n\t\t\t$plannerLastName \t\t= str_replace($apostrophe, \"'\", $plannerLastName);\r\r\n\t\t\t$eventName \t\t\t= str_replace($apostrophe, \"'\", $eventName);\r\r\n\t\t\t\r\r\n\t\t \t$row = mysql_fetch_object($result);\r\r\n\t\r\r\n\t\t\t$email = $row -> emailAddress;\r\r\n\t\t\t\r\r\n\t\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'From: uGather <ugather@ugather.info>' . \"\\r\\n\";\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t$sub = \"uGather: \".$userID.\": Event Registration for \".$eventName.\"\";\r\r\n\t\t\t$mesg = \"<html>\r\r\n\t\t\t\t\t\t<head>\r\r\n\t\t\t\t\t\t\t<title>Someone has registered for your event!</title>\r\r\n\t\t\t\t\t\t</head>\r\r\n\t\t\t\t\t\t<body>\r\r\n\t\t\t\t\t\t<h2 style=\\\"font-family: 'Trebuchet MS', 'Helvetica Neue', Arial, Sans-serif; font-weight: bold; padding: 10px 0 5px 5px; color: #444; font-size: 2.5em; color: #88AC0B; border-bottom: 1px solid #E4F2C8; letter-spacing: -2px; margin-left: 5px; \\\">uGather Event Registration</h2>\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">Hello, \".$plannerFirstName.\" \".$plannerLastName.\"! </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">The user \".$userID.\" (\".$userFirstName.\" \".$userLastName.\") has registered for your event, <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">\".$eventName.\"</a>, at <a href=\\\"http://www.ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. <br />\r\r\n\t\t\t\t\t\t\".$userID.\"'s registration status for \".$eventName.\" is: \".$status.\". </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">You can find the event page for \".$eventName.\" here: <a href=\\\"http://www.ugather.info/viewEvent.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view event \".$eventName.\"</a>. You can view all of the attendees to your event here: <a href=\\\"http://www.ugather.info/viewAttendees.php?eventID=\".$eventID.\"\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">view attendees to \".$eventName.\"</a>. </p>\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t<p style=\\\"font: 12px/170% 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; color: #6B6B6B; padding: 12px 10px; \\\">This is an automatically generated email from <a href=\\\"http://ugather.info\\\" style=\\\"color: #332616; text-decoration: underline; font-weight: bold; \\\">uGather</a>. Please do not respond. Thank you.</p> \r\r\n\t\t\t\t\t\t</body>\r\r\n\t\t\t\t\t\t</html>\";\r\r\n\t\r\r\n\t\t\tif (mail($email, $sub, $mesg, $headers)) \r\r\n\t\t\t{\r\r\n\t\t\t\treturn true;\r\r\n\t\t\t} \r\r\n\t\t\telse \r\r\n\t\t\t{\r\r\n\t\t\t\tthrow new Exception('Could not send email.');\r\r\n\t\t\t}\r\r\n \t}\r\r\n\t}", "public function notify_user($id,$month){\n\t\t$user_data = $this->HrAttWaive->HrEmployee->find('first', array('fields' => array('email_address', 'first_name','last_name'), \n\t\t'conditions' => array('HrEmployee.id' => $id)));\t\t\t\n\t\t$sub = 'BigOffice - Waive Off Request is processed by '.ucfirst($this->Session->read('USER.Login.first_name')).' '.ucfirst($this->Session->read('USER.Login.last_name'));\n\t\t$template = 'notify_waive_req';\n\t\t$from = ucfirst($this->Session->read('USER.Login.first_name')).' '.ucfirst($this->Session->read('USER.Login.last_name'));\n\t\t$name = $user_data['HrEmployee']['first_name'].' '.$user_data['HrEmployee']['last_name'];\t\t\t\t\t\n\t\t$vars = array('from_name' => $from, 'name' => $name, 'month' => $month, \n\t\t'employee' => $user_data['HrEmployee']['first_name'].' '.$user_data['HrEmployee']['last_name']);\n\t\t// notify superiors\t\t\t\t\t\t\n\t\tif(!$this->send_email($sub, $template, 'noreply@mypdca.in', $user_data['HrEmployee']['email_address'],$vars)){\t\n\t\t\t// show the msg.\t\t\t\t\t\t\t\t\n\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Problem in sending the mail to user...', \n\t\t\t'default', array('class' => 'alert alert-error'));\t\t\t\t\n\t\t}\t\t\n\t}", "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 sendEventEndNotificationEmail( $userObject, $node )\n {\n // Settings\n $sini = eZINI::instance( \"site.ini\" );\n $siteUrl = $sini->variable( \"SiteSettings\", \"SiteURL\" );\n\n $ini = eZINI::instance( \"bceventnotifications.ini\" );\n $eventStartDateTimeIdentifier = $ini->variable( \"EventNotificationsSettings\", \"EventClassAttributeIdentifierStartDateTime\" );\n $eventEndDateTimeIdentifier = $ini->variable( \"EventNotificationsSettings\", \"EventClassAttributeIdentifierEndDateTime\" );\n\n $eventName = $node->attribute('name');\n $eventUrl = $node->attribute('url_alias');\n $eventDataMap = $node->dataMap();\n\n $eventFromDateContent = $eventDataMap[$eventStartDateTimeIdentifier];\n $eventFromDate = $eventFromDateContent->content();\n\n $eventToDateContent = $eventDataMap[$eventEndDateTimeIdentifier];\n $eventToDate = $eventToDateContent->content();\n\n // Fetch Current User Session / Email\n $userID = $userObject->ContentObjectID;\n $user = eZUser::fetch( $userID );\n $userEmail = $user->Email;\n\n $currentUserObject = $userObject;\n $currentUserObjectDataMap = $currentUserObject->dataMap();\n\n // Fetch User First Name\n $attributeFirstName = $currentUserObjectDataMap['first_name'];\n $attributeLastName = $currentUserObjectDataMap['last_name'];\n $firstName = $attributeFirstName->content();\n $lastName = $attributeLastName->content();\n\n // Build email to user\n include_once( 'kernel/common/template.php' );\n $tpl = templateInit();\n\n // Fetch site hostname\n // $tpl->setVariable( 'site_host', $siteUrl );\n\n // Fetch event information\n $tpl->setVariable( 'user_first_name', $firstName );\n $tpl->setVariable( 'user_last_name', $lastName );\n\n $tpl->setVariable( 'event_name', $eventName );\n $tpl->setVariable( 'event_url', \"http://\". $siteUrl.\"/\". $eventUrl );\n $tpl->setVariable( 'event_from_date', $eventFromDateContent );\n $tpl->setVariable( 'event_to_date', $eventToDateContent );\n\n // Send email to user\n $subject = \"Event End Notification: \" . $eventName;\n $to = $userEmail;\n\n $body = $tpl->fetch(\"design:eventnotifications/eventend.tpl\");\n $results = $this->sendNotificationEmail( $to, $subject, $body );\n\n return $results;\n }", "function active_mail($id){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"UPDATE `utilisateur` SET `status_mail` = '1' WHERE id_utilisateur = :id\");\n\t\t$req->execute(array('id'=>$id));\n\t\t$req->closeCursor();\n\t}", "function addUser()\n{\n\tglobal $xoopsDB, $myts, $xoopsConfig, $xoopsModule, $dirname, $men_erro,$usa_perf;\n\n\t$user_name = $myts->makeTboxData4Save($_POST['user_name']);\n\t$user_nick = $myts->makeTboxData4Save($_POST['user_nick']);\n\t$user_mail = $myts->makeTboxData4Save($_POST['user_mail']);\n//\t$user_host = $myts->makeTboxData4Save($_SERVER['REMOTE_HOST']);\n\t$user_host = $myts->makeTboxData4Save(gethostbyaddr($_SERVER['REMOTE_ADDR']));\n\n\t$query = \"SELECT * FROM \". $xoopsDB->prefix('xmail_newsletter').\" WHERE user_email='$user_mail' \";\n\t$myarray = $xoopsDB->fetchArray($xoopsDB->query($query));\n\n\t$xoopsMailer =& getMailer();\n\t$xoopsMailer->useMail();\n\t// Herv�\n\t$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH.'/modules/'.$dirname.'/language/'.$xoopsConfig['language'].'/mail_template');\n if($usa_perf) {\n \t$xoopsMailer->setTemplate(\"confirm_email_perf.tpl\");\n }else {\n \t$xoopsMailer->setTemplate(\"confirm_email.tpl\");\n }\n \n \n \n\tif (!$myarray) {\t// New User\n\t\t$better_token = md5(uniqid(rand(), 1));\n\t\t$query = \"INSERT INTO \" . $xoopsDB->prefix('xmail_newsletter') . \" (user_id, user_name, user_nick, user_email, user_host, user_conf, user_time) \";\n\t\t$query .= \"VALUES (0, '$user_name', '$user_nick', '$user_mail', '$user_host', '$better_token', NOW())\";\n\t\t$result = $xoopsDB->queryF($query);\n if(!$result) {\n echo \"erro na inclus�o $query \";\n return ;\n }\n // incluir em xmail_perfil_news $_POST['id_perf']\n // pegar user_id incluso\n $user_id=$xoopsDB->getInsertId();\n\t\t\n // incluir perfil\n\t\tinclude XOOPS_ROOT_PATH.'/modules/xmail/xnews_incperfil.php'; \n \n \n\t\t$confirm_url = XOOPS_URL .'/modules/xmail/include/xmail_ativa.php?id='.$better_token;\n\t\t$xoopsMailer->setToEmails($_POST['user_mail']);\n\t\t$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);\n\t\t$xoopsMailer->setFromName($xoopsConfig['sitename']);\n\t\t$xoopsMailer->setSubject(_MD_XMAIL_CONFIRM_SUBJECT);\n\t\t$xoopsMailer->assign('X_UNAME',$user_name);\n\t\t$xoopsMailer->assign('X_CONTACT_NAME',$xoopsConfig['adminmail']);\n\t\t$xoopsMailer->assign('VALIDATION_URL',$confirm_url);\n\t\t$xoopsMailer->assign('PERFIL_DEF',$perfil_definido);\n\t\t\n\t\tif ($xoopsMailer->send()) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn -2;\n\t\t}\n\n\t} elseif ($myarray['confirmed'] == '0') {\t//Still Needs Confirmation\n\t\t$user_id=$myarray['user_id'];\n\t\t// incluir perfil\n\t\tinclude XOOPS_ROOT_PATH.'/modules/xmail/xnews_incperfil.php'; \n\t\n\t\t$confirm_url = XOOPS_URL .'/modules/xmail/include/xmail_ativa.php?id='.$myarray['user_conf'];\n\t\t$xoopsMailer->setToEmails($myarray['user_email']);\n\t\t$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);\n\t\t$xoopsMailer->setFromName($xoopsConfig['sitename']);\n\t\t$xoopsMailer->setSubject(_MD_XMAIL_CONFIRM_SUBJECT);\n\t\t$xoopsMailer->assign('X_UNAME',$user_name);\n\t\t$xoopsMailer->assign('X_CONTACT_NAME',$xoopsConfig['adminmail']);\n\t\t$xoopsMailer->assign('VALIDATION_URL',$confirm_url);\n\t\t$xoopsMailer->assign('PERFIL_DEF',$perfil_definido);\n\t\tif ($xoopsMailer->send()) {\n\t\t\treturn 2;\n\t\t} else {\n\t\t\treturn -2;\n\t\t}\n\t\n\t} else { // Duplicate Email in db\n\t\treturn -1;\n\t}\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 sendNotifycation($type,$user_id,$item,$is_request = false)\n {\n $aActualUser = Engine_Api::_()->getItem('user',$user_id); \n }", "private function emailAtLogin() {}", "function notifications_email_auteur($email, $key, $id_auteur=null){\n\t// si un email fourni, il doit etre signe par une cle valide\n\tif ($email){\n\t\tinclude_spip(\"inc/securiser_action\");\n\t\tif (!$key\n\t\t\tOR !verifier_cle_action(\"abonner_notifications $email\",$key))\n\t\t\treturn array('','');\n\t}\n\n\t// retrouver l'id_auteur correspondant a ce mail\n\tif ($email AND !$id_auteur){\n\t\t$id_auteur = sql_allfetsel(\"id_auteur\",\"spip_auteurs\",\"email=\".sql_quote($email));\n\t\tif ($id_auteur)\n\t\t\t$id_auteur = array_map('reset',$id_auteur);\n\t\tif (count($id_auteur)==1)\n\t\t\t$id_auteur = reset($id_auteur);\n\t}\n\t// si pas d'email mais un id_auteur, prendre l'email de l'auteur\n\tif (!$email AND $id_auteur){\n\t\t$email = sql_getfetsel(\"email\",\"spip_auteurs\",\"id_auteur=\".intval($id_auteur));\n\t}\n\n\treturn array($email,$id_auteur);\n}", "function add_mail($id,$adresse_mail){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `mail_open` = '$adresse_mail' WHERE `id_utilisateur` = $id\");\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `status_mail` = '1' WHERE `id_utilisateur` = $id\");\n\t\t\n\t\t$req->closeCursor();\n\t}", "protected function sendNotification(){\n\t\t$events = Event::getEvents(0);\n\t\t\n\t\t\n\t\tforeach($events as $event)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\t$eventType = $event['eventType'];\n\t\t\t$message = '';\n\t\t\n\t\t\t//notify followers\n\t\t\tif($eventType == Event::POST_CREATED)\n\t\t\t\t$message = $event['raiserName'] . ' added a new post.';\n\t\t\telse if($eventType == Event::POST_LIKED)\n\t\t\t\t$message = $event['raiserName'] . ' liked a post of ' . $event['relatedUserName'];\n\t\t\telse if($eventType == Event::POST_FLAGGED)\n\t\t\t\t$message = $event['raiserName'] . ' flagged a post of ' . $event['relatedUserName'];\n\t\t\telse if($eventType == Event::COMMENT_CREATED)\n\t\t\t\t$message = $event['raiserName'] . ' commented on a post of ' . $event['relatedUserName'];\n\t\t\telse if($eventType == Event::RESTAURANT_MARKED_FAVOURITE)\n\t\t\t\t$message = $event['raiserName'] . ' marked a restaurant as favourite.';\n\t\t\telse if($eventType == Event::USER_FOLLOWED)\n\t\t\t\t$message = $event['raiserName'] . ' is now following ' . $event['relatedUserName'];\n\t\t\n\t\t\tif(!empty($message))\n\t\t\t{\n\t\t\t\t//fetch all followers of the event raiser or related user\n\t\t\t\t$sql = Follower::getQueryForFollower($event['raiserId']);\n\t\t\n\t\t\t\tif($event['relatedUserId'])\n\t\t\t\t\t$sql .= ' OR f.followedUserId =' . $event['relatedUserId'];\n\t\t\n// \t\t\t\t$followers = Yii::app()->db->createCommand($sql)->queryAll(true);\n// \t\t\t\tforeach($followers as $follower)\n// \t\t\t\t{\n// \t\t\t\t\tif($follower['id'] != $event['raiserId'] && $follower['id'] != $event['relatedUserId'])\n// \t\t\t\t\t{\n// // \t\t\t\t\t\t$did = Notification::saveNotification($follower['id'], Notification::NOTIFICATION_GROUP_WORLD, $message, $event['id']);\n// // \t\t\t\t\t\terror_log('DID : => '.$did);\n// \t\t\t\t\t\t//send push notification\n// \t\t\t\t\t\t/**----- commented as no followers will be notified, as suggested by the client\n// \t\t\t\t\t\t$session = Session::model()->findByAttributes(array('deviceToken'=>$follower['deviceToken']));\n// \t\t\t\t\t\tif($session)\n// \t\t\t\t\t\t{\n// \t\t\t\t\t\t$session->deviceBadge += 1;\n// \t\t\t\t\t\t$session->save();\n// \t\t\t\t\t\tsendApnsNotification($follower['deviceToken'], $message, $follower['deviceBadge']);\n// \t\t\t\t\t\t}\n// \t\t\t\t\t\t*****/\n// \t\t\t\t\t}\n// \t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t//notify the related user\n\t\t\tif($event['relatedUserId'] && $event['relatedUserId'] != $event['raiserId'])\n\t\t\t{\n\t\t\t\tif($eventType == Event::POST_LIKED)\n\t\t\t\t\t$message = $event['raiserName'] . ' liked your post.';\n\t\t\t\telse if($eventType == Event::POST_FLAGGED)\n\t\t\t\t\t$message = $event['raiserName'] . ' flagged your post.';\n\t\t\t\telse if($eventType == Event::COMMENT_CREATED)\n\t\t\t\t\t$message = $event['raiserName'] . ' commented on your post.';\n\t\t\t\telse if($eventType == Event::USER_FOLLOWED)\n\t\t\t\t\t$message = $event['raiserName'] . ' is now following you.';\n\t\t\t\telse if($eventType == Event::USER_MENTIONED_COMMENT){\n\t\t\t\t\t$message = $event['raiserName'] . ' mentioned you in a comment.';\n// \t\t\t\t\t$eventType = Event::COMMENT_CREATED;\n\t\t\t\t}\n\t\t\t\telse if($eventType == Event::USER_MENTIONED_POST){\n\t\t\t\t\t$message = $event['raiserName'] . ' mentioned you in a post.';\n// \t\t\t\t\t$eventType = Event::COMMENT_CREATED;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($message))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$notfyId = Notification::saveNotification($event['relatedUserId'], Notification::NOTIFICATION_GROUP_YOU, $message, $event['id']);\n\t\t\t\t\t$session = Session::model()->findByAttributes(array('userId'=>$event['relatedUserId']));\n// \t\t\t\t\terror_log('SESSION_LOG : '. print_r( $session, true ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tif(!is_null($session) && !empty($session) && $session->deviceToken)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$notifyData = array(\n// \t\t\t\t\t\t\t\t\"id\" => $notfyId,\n// \t\t\t\t\t\t\t\t\"receiverId\" => $event['relatedUserId'],\n// \t\t\t\t\t\t\t\t\"notificationGroup\" => Notification::NOTIFICATION_GROUP_YOU,\n\t\t\t\t\t\t\t\t\"alert\" => $message,\n// \t\t\t\t\t\t\t\t\"eventId\" => $event['id'],\n// \t\t\t\t\t\t\t\t\"isSeen\" => \"0\",\n\t\t\t\t\t\t\t\t\"eventType\" => $eventType,\n// \t\t\t\t\t\t\t\t\"raiserId\" => $event['raiserId'],\n// \t\t\t\t\t\t\t\t\"raiserName\" => $event['raiserName'],\n// \t\t\t\t\t\t\t\t\"relatedUserId\" => $event['relatedUserId'],\n// \t\t\t\t\t\t\t\t\"relatedUserName\" => $event['relatedUserName'],\n\t\t\t\t\t\t\t\t\"elementId\" => $event['elementId'],\n\t\t\t\t\t\t\t\t\"eventDate\" => $event['eventDate'],\n// \t\t\t\t\t\t\t\t\"isNotified\" => $event['isNotified'],\n\t\t\t\t\t\t\t\t'badge' => $session->deviceBadge,\n\t\t\t\t\t\t\t\t'sound' => 'default'\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n// \t\t\t\t\t\t\techo 'Notify Data : ';\n// \t\t\t\t\t\tprint_r($notifyData);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$session->deviceBadge += 1;\n\t\t\t\t\t\t$session->save();\n\t\t\t\t\t\tsendApnsNotification($session->deviceToken, $message, $session->deviceBadge, $notifyData);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}elseif( isset($event['message']) && $event['message'] !=null){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$devices = array();\n\t\t\t\t$sql = 'SELECT id, deviceToken, deviceBadge from session where role=\"manager\"';\n\t\t\t\t\n\t\t\t $rows = Yii::app()->db->createCommand($sql)->queryAll(true);\n\t\t \t$chunk=1;\t\t \n\t\t \n\t\t\t\tforeach ($rows as $row){\n\t\t\t\t\t$devices[] = array(\n\t\t\t\t\t\t\t'deviceToken'=>$row['deviceToken'],\n\t\t\t\t\t\t\t'notifyData' => array('aps'=> array(\n\t\t\t\t\t\t\t\t\t\"alert\" => $event['message'],\n\t\t\t\t\t\t\t\t\t\"eventType\" => $event['eventType'],\n\t\t\t\t\t\t\t\t\t\"elementId\" => $event['id'],\n\t\t\t\t\t\t\t\t\t\"eventDate\" => $event['eventDate'],\n\t\t\t\t\t\t\t\t\t'badge' => $row['deviceBadge'],\n\t\t\t\t\t\t\t\t\t'sound' => 'default'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif($chunk > 4){\n\t\t\t\t\t\tsendApnsNotification($devices, '');\n\t\t\t\t\t\t$chunk=1;\n\t\t\t\t\t\t$devices = array();\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$chunk++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(!empty($devices)){\n\t\t\t\t\techo 'Sending...'.date(DATE_RFC850).\"\\n\";\n\t\t\t\t\tsendApnsNotification($devices, '');\n\t\t\t\t\techo 'done '.date(DATE_RFC850).\"\\n\";\n\t\t\t\t}\n// \t\t\t\t$notfyId = Notification::saveNotification($event['relatedUserId'], Notification::NOTIFICATION_GROUP_YOU, $message, $event['id']);\n\n// \t\t\t\t$insertSql = 'INSERT into notification (receiverId, notificationGroup, message, eventId) (select id, \"1\", \"'.$event['message'].'\", '.$event['id'].' from user where isDisabled = 0 and role=\"manager\")';\n// \t\t\t\tYii::app()->db->createCommand($insertSql)->query();\n\t\t\t\t\n\t\t\t}\n\t\t\tEvent::model()->updateByPk($event['id'], array('isNotified'=>1));\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "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 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 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 restablecer2(Request $request)\n {\n $email = $request->email;\n $mail = User::where('email',$email)->first();\n if(isset($mail)){\n Mail::to($mail)->send(new Restablecer($mail->id));\n echo \"Solicitud recibida!!!<br>Se te ha enviado un correo electronico para restablecer la contraseña!!\";\n }else{\n echo \"Correo no válido!!\";\n }\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 }", "function wp_send_new_user_notifications($user_id, $notify = 'both')\n {\n }", "function usermessage_send_to_user($user, $message_event)\r\n{\r\n\t\r\n\t$sql=\"SELECT type, subject, message, once, reward, sendby FROM \".PREFIX.\"messages_to_users WHERE event='\".sql_safe($message_event).\"' ORDER BY activated DESC LIMIT 0,1\";\r\n\tif($mm=mysql_query($sql))\r\n\t{\r\n\t\tif($m=mysql_fetch_array($mm))\r\n\t\t{\r\n\t\t\t$adress=\"\";\r\n\t\t\t$sendby=explode(\",\",$m['sendby']);\r\n\t\t\tif(in_array(\"insite_privmess\", $sendby))\r\n\t\t\t{\r\n\t\t\t\t//Skicka ett ingame-meddelande till användaren med meddelandet\r\n\t\t\t\t$privmess_id=privmess_send(0, $user, $m['subject'], $m['message'], FALSE);\r\n\t\t\t\t$adress.=\"insite_privmess\";\r\n\t\t\t}\r\n\t\t\tif(in_array(\"insite_notice\", $sendby))\r\n\t\t\t{\r\n\t\t\t\tnotice_send($user, $message_event, $m['type'], $m['subject'], $m['message']);\r\n\t\t\t\tif($adress!=\"\")\r\n\t\t\t\t\t$adress.=\", \";\r\n\t\t\t\t$adress.=\"insite_notice\";\r\n\t\t\t}\r\n\t\t\tif(in_array(\"email\", $sendby))\r\n\t\t\t{\r\n\t\t\t\t$email=user_get_email($user);\r\n\t\t\t\tmailer_send_mail($adress, user_get_name($user), $m['subject'], $m['message']);\r\n\t\t\t\tif($adress!=\"\")\r\n\t\t\t\t\t$adress.=\", \";\r\n\t\t\t\t$adress.=$email;\r\n\t\t\t}\r\n\t\t\t\t//Ge eventuellt belöning\r\n\t\t\t\tif($m['reward']>0)\r\n\t\t\t\t\tmoney_transaction(0, $user, $m['reward'], \"Reward\", $m['subject']);\r\n\t\t\t\t//lägg in att detta skickats i messages_to_users_sent\r\n\t\t\t\t$sql=\"INSERT INTO \".PREFIX.\"messages_to_users_sent SET\r\n\t\t\t\tuser='\".sql_safe($user).\"', \r\n\t\t\t\tmessage_event='\".sql_safe($message_event).\"',\r\n\t\t\t\tadress='\".$adress.\"'\";\r\n\t\t\t\tif(isset($privmess_id))\r\n\t\t\t\t$sql.=\", privmess_id=\".sql_safe($privmess_id);\r\n\t\t\t\t$sql.=\";\";\r\n\t\t\t\t// echo \"<br />DEBUG1753: $sql\"; \r\n\t\t\t\tmysql_query($sql);\r\n\t\t}\r\n\t}\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 }", "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 sendemail( $id_projet , $status);", "public function enviarCorreoEvento($correo) {\n\t\t\n\t\t$correo1=$correo;\n\t\t$envioCorreo = new OficioUB();\n\t\t\n\t\t$Subject = utf8_decode( \"UNIVERSIDAD EL BOSQUE ACTIVACION USUARIO ASPIRANTE\" );\n\t\t$AddAddress = array( 0 => array ( \"mail\" => ''.strtolower($correo1).'',\n\t\t\t\t\t\t\t\t\t\t\t\"nombre\" => utf8_decode( \"UNIVERSIDAD EL BOSQUE ACTIVACION USUARIO ASPIRANTE\" )\n\t \t\t)\n\t );\n\t\t$AddAttachment = \"\";\n\t\t$urlactivacion=\"https://artemisa.unbosque.edu.co/aspirantes/usuarioaspirante/registrarpasouno.php?\";\n\t\t$html=\"<br><br>\".\n \"Gracias por preferir la UNIVERSIDAD EL BOSQUE, La siguiente url le permite continuar su proceso de inscripción presione\".\n \"<br><br>\".\n \"<a href='\" . $urlactivacion . \"' target='new'>\".\"aqui\".\"</a>\" .\n \" \".\"o copie el siguiente enlace en su navegador\".\" <br><br><br>\" . $urlactivacion;;\n\t\t\t\n\t\t$Body = utf8_decode($html);\n\t\t$AltBody = utf8_decode( \"UNIVERSIDAD EL BOSQUE ACTIVACION USUARIO ASPIRANTE\" );\n\t\t\n\t\t\n\t\t\n\t\tif($envioCorreo->envioCorreoElectronico($this->Mailer, $this->IsSMTP, $this->Host, $this->SMTPAuth, $this->From, $this->FromName,\n\t\t\t\t\t\t\t\t\t\t\t\t$this->Timeout, $this->IsHTML, $this->SMTPDebug, $Subject, $Body, \n \t\t\t\t\t\t\t\t\t\t $AddAddress, $this->AddReplyTo, $AddAttachment, $AltBody, $AddCc=null, $AddBCc=null)){\n\t\t\t\n \t\techo \"<script>\n\t\t\t alert('Se ha enviado un correo electrónico');\n\t\t\t </script>\";\n\t\t}\n\t\telse{\n \t\techo \"<script>\n\t\t\t alert('No se envío');\n\t\t\t </script>\";\n\t\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' => 'opublisher@gmail.com',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => 'opublisher@gmail.com',\r\n 'fromName' => 'opublisher@gmail.com',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "public function testMailLogger()\n\t{\n\t\t$one = $this->user->userByID(1);\n\t\t$this->assertContains('dre', $one);\n\t\t$this->assertContains('1', $one);\n\t\t$this->assertTrue($this->user->checkExisting('dre'), true);\n\t}", "private function composeUpdatingBookingMailForParticipant($a_user_id) {\r\n\t\t$lng = $this->lng;\r\n\r\n\t\t$this->initLanguage($a_user_id);\r\n\t\t$this->initMail();\r\n\t\t$this->setSubject($this->lng->txt('rep_robj_xrs_mail_update_booking_participant_subject'));\r\n\t\t$this->setBody(ilMail::getSalutation($a_user_id, $this->getLanguage()));\r\n\t\t$this->appendBody(\"\\n\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_mail_update_booking_participant_message') . \"\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_room') . \" \");\r\n\t\t$this->appendBody($this->s_roomname . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_from') . \" \");\r\n\t\t$this->appendBody($this->datestart->get(IL_CAL_FKT_DATE, 'd.m.Y H:s') . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_to') . \" \");\r\n\t\t$this->appendBody($this->dateend->get(IL_CAL_FKT_DATE, 'd.m.Y H:s'));\r\n\t\t$this->appendBody(\"\\n\\n\");\r\n\t\t$this->appendBody(ilMail::_getAutoGeneratedMessageString($this->language));\r\n\t}", "public function todayBirthday_notification() {\n $this->layout = 'front_end';\n $todayDate = date('Y-m-d');\n $users = $this->User->userList();\n foreach ($users as $value) {\n $userEmail= $value['User']['email'];\n $userName= $value['User']['first_name'];\n $birthdaydata = $this->User->userBirthday($todayDate);\n foreach ($birthdaydata as $birthdayvalue) {\n $birthday_boy_name= $birthdayvalue['User']['name'];\n $url = Router::url(array(\n 'controller' => 'users',\n 'action' => 'login', ), true);\n $dataArry = array('birthday_boy_name'=>$birthday_boy_name,\n 'user_name'=>$userName,\n 'url'=>$url, );\n if ($userName != $publisher_name) {\n $Email = new Email();\n $send = $Email->sendEmail($userEmail, 'Birthday Notification', 'today_birthday_notification', $dataArry);\n }\n }\n }\n }", "public function restablecer(Request $request)\n {\n $idusuario = $request->id;\n $mail = User::find($idusuario)->email;\n if(isset($mail)){\n Mail::to($mail)->send(new Restablecer($idusuario));\n echo \"Correo enviado\";\n }else{\n echo \"No hay correo disponible\";\n }\n \n }", "public function getSender();", "public function syncEmailUserCRM($app,$finalmail,$usuarioid){\n\t\t\n\t\t$usuarios = $app['orm.em']->getConnection()->prepare(\"SELECT DISTINCT * FROM usuario_crm WHERE tipo=1 and crm in (1,5) and email=0 AND try!=4 and id='\".$usuarioid.\"' ORDER BY id ASC\");\n $usuarios->execute();\n $usuarios = $usuarios->fetchAll();\n\t\t\n\t\t$correos = [];\n\t\t\n\t\tif(count($usuarios)>0){\n\t\t\tforeach($usuarios as $usuario){\n\t\t\t\t\n\t\t\t\t//$campos = DB::table('campo_crm')->where('user_id','=',$usuario->id)->get();\n\t\t\t\t$campos = $app['orm.em']->getRepository('Entity\\Campo_crm')->findBy( array('user_id'=>$usuario['id']) );\n\t\t\t\tif(count($campos)==0){\n\t\t\t\t\t$mensaje = 'No existen campos del usuario no se puede enviar email';\n\t\t\t\t\t\n\t\t\t\t\t//DB::table('usuario_crm')->where('user_id','=',$usuario->id)->update(array('email'=>'1','error'=>$mensaje));\n\t\t\t\t\t\t\n\t\t\t\t\t$qb = $app['orm.em']->createQueryBuilder();\n $q = $qb->update('Entity\\Usuario_crm', 'u')\n ->set('u.email', $qb->expr()->literal('1') )\n ->set('u.error', $qb->expr()->literal($mensaje) )\n ->where('u.id = ?1')\n ->setParameter(1, $usuario['id'])\n ->getQuery();\n $p = $q->execute();\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$dataForm = new \\stdClass();\n\t\t\t\tforeach($campos as $campo){\n\t\t\t\t\t$dataForm->{$campo->getCampo()} = $campo->getValor();\n\t\t\t\t}\n\n\t\t\t\t//$vendedor = array($dataForm->email_final);\n\t\t\t\t/*\n\t\t\t\t$dataFi = array('dataForm'=>$dataForm);*/\n\t\t\t\t$paterno = isset($dataForm->lastname)?$dataForm->lastname:'';\n\t\t\t\t$materno = isset($dataForm->persondeoctrapellidomaternoc)?$dataForm->persondeoctrapellidomaternoc:'';\n\t\t\t\t$nombre = isset($dataForm->firstname)?$dataForm->firstname:'';\n\t\t\t\t$dni = isset($dataForm->persondeoctrnrodedocumentoc)?$dataForm->persondeoctrnrodedocumentoc:'';\n\t\t\t\t\n\t\t\t\t$subject = isset($dataForm->origen)?$dataForm->origen:'';\n\t\t\t\t$subject = $subject.' - '.$paterno.' '.$materno.', '.$nombre.' - '.$dni;\n\t\t\t\t\n\t\t\t\t//$correos_add = DB::table('correo')->where('co_codigo_programa','=',$dataForm->programa)->where('co_estado','=','1')->get();\n\t\t\t\t\n\t\t\t\t$correos_add = $app['orm.em']->getConnection()->prepare(\"select p.CTREnviodeMailalumno_c as enviar from programas p where p.CTRNumProd_c='\".$dataForm->programa.\"'\");\n\t\t\t\t$correos_add->execute();\n\t\t\t\t$correos_add = $correos_add->fetchAll();\n\t\n\t\n\t\t\t\tif(count($correos_add)>0){\n\t\t\t\t\tforeach($correos_add as $correo){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$correos[] = [ 'enviar' => $correo['enviar'] ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($correos as $email_usuario){\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t/**/\n\t\t\t\tswitch ($dataForm->ctrorigendelregistroc) {\n\t\t\t\t\tcase 'RIADMISION':\n\t\t\t\t\t\t\t$mensaje = $app['twig']->render('mail03.html.twig',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'dataform' => $dataForm,\n\t\t\t\t\t\t\t\t'fecha' => date('Y-m-d')\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'RIEVENTO':\n\t\t\t\t\t\t$mensaje = $app['twig']->render('mail01.html.twig',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'dataform' => $dataForm,\n\t\t\t\t\t\t\t\t'fecha' => date('Y-m-d')\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'RICHARLA':\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$mensaje = $app['twig']->render('mail02.html.twig',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'dataform' => $dataForm,\n\t\t\t\t\t\t\t\t'fecha' => date('Y-m-d')\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif($email_usuario['enviar'] == 'false'){\n\t\t\t\t\t\t\t\t//$error = 'Programa no se encuentra activo';\n\t\t\t\t\t\t\t\t$qb = $app['orm.em']->createQueryBuilder();\n\t\t\t\t\t\t\t\t$q = $qb->update('Entity\\Usuario_crm', 'u')\n\t\t\t\t\t\t\t\t\t\t\t->set('u.email', $qb->expr()->literal( '0' ) )\n\t\t\t\t\t\t\t\t\t\t\t->set('u.error', $qb->expr()->literal( '' ))\n\t\t\t\t\t\t\t\t\t\t\t->where('u.id = ?1')\n\t\t\t\t\t\t\t\t\t\t\t->setParameter(1, $usuario['id'])\n\t\t\t\t\t\t\t\t\t\t\t->getQuery();\n\t\t\t\t\t\t\t\t$p = $q->execute();\n\t\t\t\t\t\t\t\t$app['orm.em']->flush();\n\t\t\t\t\t}\n\t\t\t\t\t/**/\n\t\t\t\t\t\n\t\t\t\t\t$app['mail']->addAddress($dataForm->email_final,'' );\n\t\t\t\t\n\t\t\t\t\tif($email_usuario['enviar'] == 'true'){\n\t\t\t\t\t\t$app['mail']->addBCC($dataForm->persondeoctrcorreopucpc,'');\n\t\t\t\t\t}\n\t\t\t\t\t$app['mail']->addCC('centrum.informes@pucp.pe', '');\n\t\t\t\t\t$app['mail']->isHTML(true);\n\t\t\t\t\t$app['mail']->Subject = $subject;\n\t\t\t\t\t$app['mail']->Body = $mensaje;\n\t\t\t\t\t$app['mail']->AltBody = 'Copyright 2017 PUCP';\n\n\t\t\t\t\tif(!$app['mail']->send()){\n\t\t\t\t\t\treturn '0'; //json_encode( array('error'=> ) );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$qb = $app['orm.em']->createQueryBuilder();\n\t\t\t\t\t\t\t\t$q = $qb->update('Entity\\Usuario_crm', 'u')\n\t\t\t\t\t\t\t\t\t\t\t->set('u.email', $qb->expr()->literal( '1' ) )\n\t\t\t\t\t\t\t\t\t\t\t->set('u.error', $qb->expr()->literal( '' ))\n\t\t\t\t\t\t\t\t\t\t\t->where('u.id = ?1')\n\t\t\t\t\t\t\t\t\t\t\t->setParameter(1, $usuario['id'])\n\t\t\t\t\t\t\t\t\t\t\t->getQuery();\n\t\t\t\t\t\t\t\t$p = $q->execute();\n\t\t\t\t\t\t\t\t$app['orm.em']->flush();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\treturn '1';//json_encode( array('success' => 1 ) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t//DB::table('usuario_crm')->where('id','=',$usuario->id)->update(array('email'=>'1'));\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\treturn '0';\n\t}", "function subscribe($data){\r\ntry{\r\n$bdd = new PDO('mysql:host=localhost;dbname=ma_base;charset=utf8', 'root', 'addafbaplm');\r\n//$bdd = new PDO('mysql:host=localhost;dbname=pornckys_tes;charset=utf8', 'pornckys_moi', 'test123');\r\n//91.216.107.248\r\n}\r\ncatch (Exception $e)\r\n{\r\n die('Erreur : ' . $e->getMessage());\r\n}\r\n\r\n\r\n$nom=$data['FNAME'];\r\n$prenom=$data['LNAME'];\r\n$mail=$data['EMAIL'];\r\n$password=$data['MMERGE4'];\r\n$fired_at= $_POST['fired_at'];\r\n\r\n//creer dossier et fichier\r\n$dossier = \"users/\".$mail;\r\nif(!is_dir($dossier)){\r\n mkdir($dossier);\r\n $fp = fopen(\"users/\".$mail.\"/avis.txt\",\"w\");\r\n}\r\n\r\n\r\n//Mettre ses valeur récupérés à la $ligne de video_\r\n\r\n\r\n$req = $bdd->prepare(\"INSERT INTO `ma_base`.`user` (`nom`, `prenom`, `mail`, `password`) VALUES (:nom, :prenom, :mail, :password)\");\r\n $req->execute(array(\r\n \"nom\" => $nom, \r\n \"prenom\" => $prenom,\r\n \"mail\" => $mail,\r\n \"password\" => $password,\r\n \r\n ));\r\n\r\n // $req = $bdd->prepare(\"INSERT INTO `ma_base`.`user` (`nom`, `prenom`, `mail`, `password`,, `date`) VALUES (:nom, :prenom, :mail, :password, :mdate)\");\r\n // $req->execute(array(\r\n // \"nom\" => $nom, \r\n // \"prenom\" => $prenom,\r\n // \"mail\" => $mail,\r\n // \"password\" => $password,\r\n // \"mdate\" => $fired_at,\r\n \r\n // ));\r\n\r\n\r\n// try{\r\n// $bdd = new PDO('mysql:host=localhost;dbname=ma_base;charset=utf8', 'root', 'addafbaplm');\r\n// //$bdd = new PDO('mysql:host=localhost;dbname=pornckys_tes;charset=utf8', 'pornckys_moi', 'test123');\r\n// //91.216.107.248\r\n// }\r\n// catch (Exception $e)\r\n// {\r\n// die('Erreur : ' . $e->getMessage());\r\n// }\r\n\r\n\r\n// $nom=$data['FNAME'];\r\n// $prenom=$data['LNAME'];\r\n// $mail=$data['email'];\r\n// $password=$data['MMERGE4'];\r\n\r\n// //Mettre ses valeur récupérés à la $ligne de video_\r\n\r\n\r\n// $req = $bdd->prepare(\"INSERT INTO `ma_base`.`user` (`nom`, `prenom`, `mail`, `password`) VALUES (:nom, :prenom, :mail, :password)\");\r\n// $req->execute(array(\r\n// \"nom\" => $nom, \r\n// \"prenom\" => $prenom,\r\n// \"mail\" => $mail,\r\n// \"password\" => $password,\r\n \r\n// ));\r\n\r\n\r\n\r\n $req->closeCursor(); \r\n// ;\r\n\r\n\r\n\r\n\r\n\r\n \r\n}", "public function notificacionRegistroUsuario($user, $pass) {\n\n\n if ($this->email and $this->email->getMailer() and $user->getEmail()) {\n\n $message = $this->email->createMessage('Su cuenta en openAO ha sido creada')\n ->setFrom(array($this->remitente => 'openAO'))\n ->setTo(array($user->getEmail()))\n ->setBody($this->app->render('@NotificacionBundle/nuevousuario.twig', array(\n 'notification_title' => \"Usted ha sido registrado en el sistema de openAO\",\n 'notification_subtitle' => \"En este correo encontrará la información de su cuenta \",\n 'notification' => \"Nombre completo: \" . $user->getFullname(),\n 'notification_email' => \"Correo: \" . $user->getEmail(),\n 'notification_access' => \"Sus datos de acceso son los siguientes\",\n 'notification_username' => \"Nombre de usuario: \" . $user->getUsername(),\n 'notification_password' => \"Contraseña \" . $pass,\n 'notification_url' => $this->app->request()->getUrl().$this->app->request()->getRootUri()\n )), 'text/html');\n $this->email->getMailer()->send($message);\n }\n }", "private function composeBookingMailForParticipant($a_user_id) {\r\n\t\t$lng = $this->lng;\r\n\r\n\t\t$this->initLanguage($a_user_id);\r\n\t\t$this->initMail();\r\n\t\t$this->setSubject($this->lng->txt('rep_robj_xrs_mail_booking_participant_subject'));\r\n\t\t$this->setBody(ilMail::getSalutation($a_user_id, $this->getLanguage()));\r\n\t\t$this->appendBody(\"\\n\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_mail_booking_participant_message') . \"\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_room') . \" \");\r\n\t\t$this->appendBody($this->s_roomname . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_from') . \" \");\r\n\t\t$this->appendBody($this->datestart->get(IL_CAL_FKT_DATE, 'd.m.Y H:s') . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_to') . \" \");\r\n\t\t$this->appendBody($this->dateend->get(IL_CAL_FKT_DATE, 'd.m.Y H:s'));\r\n\t\t$this->appendBody(\"\\n\\n\");\r\n\t\t$this->appendBody(ilMail::_getAutoGeneratedMessageString($this->language));\r\n\t}", "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}", "function motDePasseOublie($mail) { $userManager = new OpenClassrooms\\DWJP4\\Backend\\Model\\UsersManager();\n $emailExist = $userManager->emailExist($mail);\n if($emailExist){\n //S'il existe, on fabrique le code , on update le code , on envoi le message\n $pseudo=$emailExist[0]['USER_PSEUDO'];\n $code = codeValidation();\n //echo $pseudo;\n // echo \" code : \".$code;\n $updatePassword = $userManager->updatePsswd($code,$pseudo);\n $message = messagePasswdOublie($mail,$code);\n //echo $message;\n }else {\n //echo \"pas de mail exist\";\n }\n // on retourne sur la page d'identification\n require ('view/backend/identificationView.php'); \n}", "private function composeUpdateBookingMailForCreator($a_user_id) {\r\n\t\t$lng = $this->lng;\r\n\r\n\t\t$this->initLanguage($a_user_id);\r\n\t\t$this->initMail();\r\n\t\t$this->setSubject($this->lng->txt('rep_robj_xrs_mail_update_booking_creator_subject'));\r\n\t\t$this->setBody(ilMail::getSalutation($a_user_id, $this->getLanguage()));\r\n\t\t$this->appendBody(\"\\n\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_mail_update_booking_creator_message') . \"\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_room') . \" \");\r\n\t\t$this->appendBody($this->s_roomname . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_from') . \" \");\r\n\t\t$this->appendBody($this->datestart->get(IL_CAL_FKT_DATE, 'd.m.Y H:s') . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_to') . \" \");\r\n\t\t$this->appendBody($this->dateend->get(IL_CAL_FKT_DATE, 'd.m.Y H:s'));\r\n\t\t$this->appendBody(\"\\n\\n\");\r\n\t\t$this->appendBody(ilMail::_getAutoGeneratedMessageString($this->language));\r\n\t}", "public function userAskToBeNotified(){\n// $message = new Message();\n// $message->setHeure(\"19h50\");\n// $message->setVille(\"TO\");\n// $message->setStatue(\"Retart\");\n// $message->setPhoneNumber(\"+15143468023\");\n// $message->setMessage(\"Salut je fait un test\");\n// $messagemodel->sendSMS($message);\n $arryNotif [0]= $_POST[\"vol\"];\n $arryNotif[1] = $_POST[\"phone\"];\n $arryNotif[2] = $_POST[\"date\"];\n $arryNotif[3] = $_POST[\"status\"];\n $notifDAO = new NotifyDAO();\n $notifDAO->create($arryNotif);\n\n }", "private function composeAndSendBookingMailToCreator($a_user_id) {\r\n\t\t$this->composeBookingMailForCreator($a_user_id);\r\n\t\tparent::sendMail(array( $a_user_id ), array( 'system' ), is_numeric($a_user_id));\r\n\t}", "public function sendEmailVerificationNotification()\n { \n \n $this->notify(new ConfirmEmail); \n \n }", "public function api_entry_sendnotification() {\n parent::validateParams(array('sender', 'receiver', 'subject'));\n\n if(!$this->Mdl_Users->get($_POST['sender'])) parent::returnWithErr(\"Sender is not valid\");\n if(!$this->Mdl_Users->get($_POST['receiver'])) parent::returnWithErr(\"Receiver is not valid\");\n\n $sender = $this->Mdl_Users->get($_POST['sender']);\n $receiver = $this->Mdl_Users->get($_POST['receiver']);\n\n unset($sender->password);\n unset($receiver->password);\n\n if ($_POST['subject'] == \"ipray_sendinvitation\") {\n $msg = $sender->username . \" has invited you.\";\n }\n else if ($_POST['subject'] == \"ipray_acceptinvitation\") {\n $msg = $sender->username . \" has accepted your invitation.\";\n\n // sender ---> receiver \n $this->Mdl_Users->makeFriends($_POST[\"sender\"], $_POST[\"receiver\"]);\n }\n else if ($_POST['subject'] == \"ipray_rejectinvitation\") {\n $msg = $sender->username . \" has rejected your invitation.\";\n }\n else if ($_POST['subject'] == 'ipray_sendprayrequest') {\n parent::validateParams(array('request'));\n }\n else if ($_POST['subject'] == 'ipray_acceptprayrequest') {\n parent::validateParams(array('request'));\n }\n else if ($_POST['subject'] == 'ipray_rejectprayrequest') {\n parent::validateParams(array('request'));\n }\n else {\n parent::returnWithErr(\"Unknown subject is requested.\");\n }\n\n if (!isset($receiver->devicetoken) || $receiver->devicetoken == \"\")\n parent::returnWithErr(\"User is not available at this moment. Please try again later.\");\n\n $payload = array(\n 'sound' => \"default\",\n 'subject' => $_POST['subject'],\n 'alert' => $msg,\n 'sender' => $sender,\n 'receiver' => $receiver\n );\n\n if (($failedCnt = $this->qbhelper->sendPN($receiver->devicetoken, json_encode($payload))) == 0) {\n $this->load->model('Mdl_Notifications');\n $this->Mdl_Notifications->create(array(\n 'subject' => $_POST['subject'],\n 'message' => $msg,\n 'sender' => $sender->id,\n 'receiver' => $receiver->id\n ));\n\n parent::returnWithoutErr(\"Contact request has been sent successfully.\");\n }\n else {\n parent::returnWithErr($failedCnt . \" requests have not been sent.\");\n }\n \n }", "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 commit()\n {\n // my code\n $builder = new EventsBuilder();\n $builder->createEventType(self::EVENT_TYPE, 'ru', function (EventType $event) {\n $event\n ->name(self::EVENT_NAME)\n ->sort(10)\n ->description('#NAME# - Имя\n#EMAIL# - Email\n#PHONE# - Телефон\n#MESSAGE# - Сообщение\n#FILE# - Ссылка на файл');\n $event\n ->addEventMessage('#DEFAULT_EMAIL_FROM#', '#EMAIL_TO#', 's1')\n ->subject('#SITE_NAME#: Новое сообщение')\n ->body('Информационное сообщение сайта #SITE_NAME#\n------------------------------------------\nВам было отправлено новое сообщение:\n\nИмя: #NAME#\nEmail: #EMAIL#\nТелефон: #PHONE#\nСсылка на файл: #FILE#\n\nСообщение: \n#MESSAGE#\n\n------------------------------------------\nСообщение сгенерировано автоматически.')\n ->bodyType(EventMessage::BODY_TYPE_TEXT)\n ->active();\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 postCreateMail()\n {\n if ($this->_activeMail->getData('recipient_email') == '') {\n $recipient_email = $this->cart->getData('email');\n $recipient_name = $this->cart->getCustomerFirstname(). ' ' .$this->cart->getCustomerLastname();\n $data = [\n 'recipient_email' => $recipient_email,\n 'recipient_name' => $recipient_name\n ];\n $this->_activeMail->addData($data)->save();\n }\n }", "function addEmailHandler1() {\n global $inputs;\n\n insert('mail',[\n 'title' => $inputs['title'],\n 'content' => $inputs['content'],\n 'sender_id' => $inputs['sender_id'],\n 'sender' => $inputs['sender_name'],\n 'receiver_id' => $inputs['receiver_id'],\n 'receiver' => $inputs['receiver_name'],\n 'is_read' => 'unread'\n ]);\n\n formatOutput(true, 'add success');\n}", "function invia_email_richiesta_accettata($id_richiesta) {\n $query = \"SELECT U.email as email_fornitore, UU.nome, UU.cognome, UU.telefono, UU.indirizzo, UU.email as email_utente, UU.dati_contatto\n FROM Richieste as R JOIN Users as U ON R.id_fornitore=U.id JOIN Users as UU ON R.id_utente=UU.id\n WHERE R.id=\".$id_richiesta;\n $result = mysql_query($query) or die(mysql_error());\n\n\tif($result){\n $row = mysql_fetch_assoc($result);\n\t} else {\n\t return false;\n\t}\n\n\tif($row['dati_contatto'][0] == 1) {\n\t $indirizzo = $row['indirizzo'];\n\t} else {\n\t $indirizzo = '<i>non visibile</i>';\n\t}\n\tif($row['dati_contatto'][1] == 1) {\n\t $telefono = $row['telefono'];\n\t} else {\n\t $telefono = '<i>non visibile</i>';\n\t}\n\tif($row['dati_contatto'][2] == 1) {\n\t $email = $row['email_utente'];\n\t} else {\n\t $email = '<i>non visibile</i>';\n\t}\n\n $to = $row['email_fornitore'];\n $subject = \"Richiesta Accettata\";\n $message = \"<html><head>\n <title>Hai accettato una richiesta</title>\n </head><body>\n <p>Riepilogo dati utente:</p>\n <p>Nome: \".$row['nome'].\" \".$row['cognome'].\"<br>\n Telefono: \".$telefono.\"<br>\n Email: \".$email.\"<br>\n Indirizzo: \".$indirizzo.\"</p>\n <p>Ricordiamo che per ogni richiesta accettata saranno aggiunti 2€ sul conto aziendale.</p>\n </body></html>\";\n\n $res = sendEmail($to, $subject, $message);\n\n}", "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('contact@elevenmx.com')\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 }", "function daily_update_property_email(){\n\t\t$meta_post = $this->InteractModal->get_update_post_meta();\n\t\tif(!empty($meta_post)){\n\t\t\t$data = array();\n\t\t\tforeach($meta_post as $meta_details){\n\t\t\t\t$user_id = $this->InteractModal->get_post_meta($meta_details['post_id'],'initiator_id');\n\t\t\t\t$data[$user_id][]= $meta_details['meta_key'];\n\t\t\t}\n\t\t}\t\t\n\t\t$get_data=$this->InteractModal->get_today_data();\n\t\t$id=2;\n\t\tif(!empty($get_data)){\n\t\t\t$result = array();\n\t\t\tforeach ($get_data as $element) {\n\t\t\t\t$result[$element['user_id']][]= $element['task_type'];\n\t\t\t}\n\t\t\tif(!empty($data) && (!empty($result))){\n\t\t\t\t$results = array_merge($data,$result);\n\t\t\t}\n\t\t\t$user_id= '';\n\t\t\tif(!empty($results)){\n\t\t\t\tforeach($result as $user_id=>$value):\n\t\t\t\t\t$update_details='';\n\t\t\t\t\t$value = array_unique($value);\n\t\t\t\t\tforeach($value as $values):\t\t\t\t\t\t\n\t\t\t\t\t\t$update_details=$update_details.'Today '.ucwords($values).' Successfully.<br>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\tif(!empty($user_id)){\n\t\t\t\t\t\t$where = array( 'id' =>$user_id);\n\t\t\t\t\t\t$user_data=$this->InteractModal->single_field_value('users',$where);\n\t\t\t\t\t\techo $email= $user_data[0]['user_email'];\n\t\t\t\t\t\techo \"<br>\";\n\t\t\t\t\t\t$company_id = $this->InteractModal->get_user_meta( $user_id, 'company_id');\n\t\t\t\t\t\t///get auto email content data \n\t\t\t\t\t\t$status_template = $this->InteractModal->get_user_meta( $company_id, 'status_template_id_'.$id );\n\t\t\t\t\t\tif(($status_template ==1)){\n\t\t\t\t\t\t\t$subject = $this->InteractModal->get_user_meta( $company_id, 'subject_template_id_'.$id );\n\t\t\t\t\t\t\t$content = $this->InteractModal->get_user_meta( $company_id, 'content_template_id_'.$id );\n\t\t\t\t\t\t\t$user_name = $this->InteractModal->get_user_meta( $user_id, 'concerned_person');\n\t\t\t\t\t\t\t$phone_number = $this->InteractModal->get_user_meta( $user_id, 'phone_number');\n\t\t\t\t\t\t\t$logo_content = '<img src=\"'.base_url().'/assets/img/profiles/logo_(2).png\" height=\"auto\" width=\"100\" alt=\"Logo\">'; \t\t\t\t\t\t\n\t\t\t\t\t\t\t$content=nl2br($content);\n\t\t\t\t\t\t\t$content = str_replace(\"_NAME_\",$user_name,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_PHONE_\",$phone_number,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_EMAIL_\",$email,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_LOGO_\",$logo_content,$content);\n\t\t\t\t\t\t\t$content = str_replace(\"_DATE_\",date('d-F-Y'),$content);\n\t\t\t\t\t\t\t$content = $content.'<br>'.$update_details;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$template_list = $this->InteractModal->get_email_template($id);\n\t\t\t\t\t\t\tforeach( $template_list as $template_lists ):\n\t\t\t\t\t\t\t\t$subject = $template_lists['subject']; \n\t\t\t\t\t\t\t\t$content = $update_details; \n\t\t\t\t\t\t\tendforeach;\t\t\t\t\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t///get auto email content data \t\t\t\t\n\t\t\t\t\t\t$email_data = array('email' => $email,\n\t\t\t\t\t\t\t'content' => $content,\n\t\t\t\t\t\t\t'subject' => $subject\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->send_email($email_data);\n\t\t\t\t\t} \n\t\t\t\tendforeach;\n\t\t\t}\n\t\t}\n\t}", "public static function sendActivationReminders(){\n self::$UserService->sendEmailActivationReminders();\n }", "function sendEvent( $event )\n {\n Event_Manager::notify( $event );\n }", "public function invitMembre($slug)\n {\n if(isset($_SESSION['user']))\n {\n if($this->allowToTwo('Admin','Assoc',$slug)){\n\n $donnee = $this->listing('Assoc',$slug);\n\n if($_POST){\n $r_POST = $this->nettoyage($_POST);\n $error['mail'] = ValidationTools::emailValid($r_POST['mail']);\n\n $assocModel = new AssocModel;\n $nom_assoc = $assocModel->FindElementByElement('nom','slug',$slug);\n $id_assoc = $assocModel->FindElementByElement('id','slug',$slug);\n\n if(ValidationTools::IsValid($error)){\n if(!is_numeric($r_POST['mail'])){ //si c'est ce n'est pas id on verifie si eventuelemt il le mail\n //exist en base en base de donnee\n $UserModel = new UserModel;\n $contactModel = new ContactModel;\n\n if($UserModel->emailExists($r_POST['mail'])){ //si oui on recupere l'id\n $r_POST['mail'] = $UserModel->FindElementByElement('id','mail',$r_POST['mail']);\n $r_POST['destinataire_orga'] = 'users';\n $RolesModel = new RolesModel;\n $roleRetourner = $RolesModel->FindRole($id_assoc,$r_POST['mail']);\n\n if(!empty($roleRetourner)){\n\n $confirmation ='Cet utilisateur fait déjà partie de l\\'Association';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n\n }\n\n }else {\n $r_POST['destinataire_orga'] = 'public';\n $r_POST['destinataire_status'] = 'del';\n }\n\n $invitation = $contactModel->findInvitation($r_POST['mail'],$id_assoc);\n if(!empty($invitation)){\n $confirmation ='Une invitation a déjà été envoyée à cette personne';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n }\n\n if($contactModel->findDemande($r_POST['mail'],$id_assoc)){\n $confirmation ='Une demande pour rejoindre l\\'Association a déjà faite par ce membre, merci de consulter les messages reçus de l\\'Association pour pouvoir y répondre';\n\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n }\n }\n\n unset($r_POST['submit']);\n\n $r_POST['emeteur_pseudo'] = $nom_assoc;\n $r_POST['objet'] = 'Invitation a rejoindre '.$nom_assoc ;\n $r_POST['emeteur_mailOrId'] = $id_assoc;\n $r_POST['destinataire_mailOrId'] = $r_POST['mail'];\n $r_POST['emeteur_orga'] = 'assoc';\n $r_POST['date_envoi'] = date('Y-m-d H:i:s');\n $r_POST['status'] = 'non-lu';\n $ok = false;\n\n\n if(is_numeric($r_POST['mail'])){\n //on envoi en interne une invite\n\n unset($r_POST['mail']);\n\n $r_POST['contenu'] = 'Bonjour,<br/>\n Nous serions très heureux de pouvoir vous compter parmi nous et vous invitons donc à rejoindre notre Association ! Pour en savoir plus sur nos activités n\\'hésitez pas à visiter <a href=\"'.$this->generateUrl('racine_assoc',['orga'=>'assoc','slug'=>$slug],true).'\">notre page</a> !<br/>\n A bientôt !';\n\n if($contactModel->insert($r_POST,false)){\n $ok = true;\n }\n }else {\n unset($r_POST['mail']);\n\n\n $r_POST['contenu'] = 'Bonjour, <br/>\n Nous serions très heureux de pouvoir vous compter parmi nous ! Pour en savoir plus sur nos activités n\\'hésitez pas à visiter <a href=\"'.$this->generateUrl('racine_assoc',['orga'=>'assoc','slug'=>$slug],true).'\">notre page</a> !<br/>\n Cependant, vous devez au préalable être inscrit sur le site.<br/>\n <a href=\"'.$this->generateUrl('racine_inscriptForm',[],true).'\">Cliquez ici</a> pour vous inscrire et devenir aussitôt un de nos membres !<br/>\n A bientôt !';\n\n $contactModel = new ContactModel;\n $contactModel->insert($r_POST,false);\n $mail = new PHPMailer();\n $mail->CharSet = \"utf8\";\n //$mail->SMTPDebug = 3; // Enable verbose debug output\n $mail->isMail();\n $mail->setFrom('Webmaster@as-co-ma.fr', 'Mailer');\n $mail->addAddress($r_POST['destinataire_mailOrId'], 'exemple@example.com');\n $mail->addReplyTo('no-reply@as-co-ma', 'Information');\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = $r_POST['objet'];\n $mail->Body = $r_POST['contenu'];\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n if($mail->send()) {\n $ok = true;\n }\n }\n if($ok){\n $confirmation = 'L\\'invitation a bien été envoyée';\n }else {\n $confirmation = 'L\\'invitation n\\'a pas pu être envoyée suite à un problème technique';\n }\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'confirmation'=>$confirmation]);\n }else {\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'error'=>$error]);\n }\n\n }else {\n\n $error['mail']= 'Merci de saisir un mail';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'error'=>$error]);\n\n }\n\n }\n }else{\n $this->redirectToRoute('racine_form');\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 }", "private function notify_on_add($meet, $location)\n { \n $subject = 'Shackmeet Announcement - ' . $meet->title;\n $body = $this->build_create_message($meet, $location);\n \n $notification_users = $this->load_users_to_notify();\n \n foreach ($notification_users as $user)\n {\n // Prevent shackmessages from being sent to yourself. Unless you're me. I get all the shackmessages.\n if ($user['username'] == $this->current_user->username && $user['username'] != 'omnova') \n continue;\n \n if ($user['notify_option'] == 2 || ($user['notify_option'] == 1 && $this->eligible_for_notification($user['latitude'], $user['longitude'], $location->latitude, $location->longitude, $user['notify_max_distance'])))\n { \n // Insert SM message into the queue\n if ($user['notify_shackmessage'] == 1)\n {\n $message = Model::factory('message_queue');\n $message->message_type_id = 1;\n $message->message_recipients = $user['username'];\n $message->message_subject = $subject;\n $message->message_body = $body;\n $message->meet_id = $meet->meet_id;\n $message->notification_reason_id = 1;\n $message->insert(); \n }\n \n // Insert email message into the queue\n if ($user['notify_email'] == 1)\n {\n $message = Model::factory('message_queue');\n $message->message_type_id = 2;\n $message->message_recipients = $user['email_address'];\n $message->message_subject = $subject;\n $message->message_body = $body;\n $message->meet_id = $meet->meet_id;\n $message->notification_reason_id = 1;\n $message->insert();\n }\n }\n }\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new EmailVerification('admin'));\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 sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail); // my notification\n }", "public function send_confirm_mail($userDetails = '') {\n //Send email to user\n }", "public function sendEmailReminder($id,$promoidmail)\n {\n $user = User::findOrFail($id);\n $cupon = Promociones::findOrFail($promoidmail);\n\n Mail::send('emails.contactpromocion', ['user' => $user, 'cupon' => $cupon], function ($m) use ($user) {\n \n $m->from('hello@app.com', 'Información de la promoción');\n\n $m->to($user->email, $user->name)->subject(\"Información de la promoción\");\n });\n return redirect('/promocion');\n\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 }", "function addCurrentUserAsRecipient(){\n // $this->AddRecipient( SessionUser::getProperty(\"firstname\").\" \".SessionUser::getProperty(\"lastname\").\" <\".SessionUser::getProperty(\"username\").\"@\".SITE_EMAILDOMAIN.\">\" );\n $this->AddRecipient( SessionUser::getProperty(\"username\").\"@\".SITE_EMAILDOMAIN );\n }", "public function sendEmailVerificationNotification()\n {\n $this->notify(new AdminEmailVerificationNotification);\n }", "public function emails($boletoID, $post);", "function send_notification($user,$i) {\r\n # get PO1 email address\r\n # @$po_num = string, po1, po2, po3\r\n $usrmgr = instantiate_module('usrmgr');\r\n $row = $usrmgr->get_row(array('username'=>$user));\r\n assert($row);\r\n $row['email'];\r\n\r\n $h = array();\r\n $h['from'] = $GLOBALS['mail_from'];\r\n $h['to'] = $row['email'];\r\n $h['subject'] = 'PO3 Has not accept new project after 7 days from partner '.$this->ds->partner_id[$i];\r\n $h['body'] = <<<__END__\r\nHello $user, PO3 has not accepted this project entered by Partner {$this->ds->partner_id[$i]}\r\n\r\nRegistration Number: {$this->ds->project_id[$i]}\r\nProject Name: {$this->ds->name[$i]}\r\n\r\n--\r\n dswbot\r\n\r\n__END__;\r\n\r\n supermailer($h);\r\n\r\n\r\n }", "protected function composeAndSendUpdateBookingMailToCreator($a_user_id) {\r\n\t\t$this->composeUpdateBookingMailForCreator($a_user_id);\r\n\t\tparent::sendMail(array( $a_user_id ), array( 'system' ), is_numeric($a_user_id));\r\n\t}", "private function generateEmail($intermediair) {\n $this->smarty->assign('user', $intermediair);\n $q = 'SELECT * FROM `Useridemail` WHERE id = ' . $intermediair['userid'];\n $data = $this->cmsmanager->customSelectQuery($q)[0];\n $token = $this->generateToken($data['email'], $user['userid'], $user['refCode']);\n $this->smarty->assign('token', $token);\n $email = new GezinneninArmoedeEmail();\n $email->addReceiver('smelt@cardsolutions.nl');\n// //$email->addReceiver($data['email']);\n $email->setSubject('Activiteit 2020');\n $email->setHtmlBody($this->smarty->fetch(\"intermediairFormEmail.html\"));\n $email->setSender(\"info@gezinneninarmoede.nl\");\n $email->send();\n }" ]
[ "0.6388809", "0.6303277", "0.6240412", "0.6223204", "0.6216377", "0.6168349", "0.60655093", "0.6050126", "0.6009876", "0.5980157", "0.5946027", "0.5936113", "0.5933727", "0.5927928", "0.592371", "0.5907212", "0.5899623", "0.589514", "0.58886564", "0.58795685", "0.5874295", "0.5874049", "0.58493274", "0.58318835", "0.5811088", "0.58051074", "0.5798075", "0.57966775", "0.5787941", "0.5770621", "0.5766493", "0.5759882", "0.5755666", "0.574842", "0.5736949", "0.57361346", "0.57305396", "0.5728004", "0.5712722", "0.5699372", "0.56971884", "0.56845653", "0.5669975", "0.5654656", "0.56291574", "0.5627703", "0.5626001", "0.562084", "0.5612483", "0.5598524", "0.5577952", "0.55706996", "0.55663925", "0.5560083", "0.5558572", "0.55560744", "0.5553901", "0.55511594", "0.5540019", "0.55369765", "0.5530971", "0.5530753", "0.5526685", "0.5525401", "0.552166", "0.5521378", "0.551515", "0.55150646", "0.55149114", "0.55072975", "0.54984325", "0.5494011", "0.54917884", "0.5485305", "0.54822594", "0.5479983", "0.547885", "0.54762244", "0.5475157", "0.5472391", "0.545465", "0.5454005", "0.5451556", "0.5451405", "0.54464656", "0.5444758", "0.5441404", "0.5439906", "0.5435368", "0.5433744", "0.5428858", "0.5426974", "0.5424761", "0.5421904", "0.54202837", "0.5418685", "0.5416728", "0.54114753", "0.54063565", "0.5403353", "0.54031366" ]
0.0
-1
/ On recupere l'image et l'id de l'utilisateur et on lui envoie un mail au bde pour le notifier
public function image($id) { $image = Image::findOrFail($id); $id_utilisateur = \Auth::user()->id; \Mail::to('bde@exiacesi.fr')->send(new AvertissementNuisanceImageEmail($image, $id_utilisateur)); return back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emailValidaUsu($emailUsu, $idUsuario){\n\t$mail = new PHPMailer;\n\t//Set who the message is to be sent from\n\t$mail->setFrom('management@omolds.com', 'Omolds');\n\t//Set an alternative reply-to address\n\t//$mail->addReplyTo('management@omolds.com', 'Omolds');\n\t\n\t//Set who the message is to be sent to\n\t$mail->addAddress($emailUsu, $nombreUsu);\n\t//Set the subject line\n\t$mail->Subject = 'Activar Cuenta Omolds';\n\t//Read an HTML message body from an external file, convert referenced images to embedded,\n\t//convert HTML into a basic plain-text alternative body\n\t$postdata = http_build_query(\n\t array(\n\t 'nombreUsu' => $emailUsu,\n\t 'clave' => md5($emailUsu),\n\t 'id' => $idUsuario, \n\t 'dominio' => APP_PAGE\n\t )\n\t);\n\t//printVar($postdata); exit;\n\t$opts = array('http' =>\n\t array(\n\t 'method' => 'POST',\n\t 'header' => 'Content-type: application/x-www-form-urlencoded',\n\t 'content' => $postdata\n\t )\n\t);\n\t\n\t$context = stream_context_create($opts);\n\t//$rutaArchivo = '/home/omolds/public_html/page/default/public/';\n\t$mail->msgHTML(file_get_contents(APP_PAGE.'emails/omolds/activarCuenta.php', false, $context), dirname(__FILE__));\n\t//Replace the plain text body with one created manually\n\t$mail->AltBody = 'This is a plain-text message body';\n\t//Attach an image file\n\t//$mail->addAttachment('images/phpmailer_mini.png');\n\t\n\t$mail->CharSet = 'UTF-8';\n\t//send the message, check for errors\n\t$enviaEmail = $mail->send();\n\tif (!$enviaEmail) {\n\t\tFlash::error(\"Mailer Error: \" . $mail->ErrorInfo); \n\t} else {\n\t\tFlash::valid(\"Mensaje enviado\"); \t\n\t}\n\t//exit;\n}", "function express_intrest_mail_send($member_id,$sender_id)\n {\n // /uploads/profile_image/profile_13.jpg\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->express_intrest_mail_send($member_id,$sender_id,$from_mail,$sender_name,$to_mail,$sub);\n }", "public function enviar(){\n\t\t\t$email = array(\n\t\t \t\t'nome'=>$this->remover_caracter($this->nome),\n\t\t \t\t'email'=>$this->email,\n\t\t\t\t'assunto'=>$this->remover_caracter($this->assunto),\n\t\t \t\t'texto'=>$this->remover_caracter($this->mensagem)\n\t\t\t);\n\t\t\tif( is_file($this->logo) ){\n\t\t\t\t$imagem_nome=$this->logo;\n\t\t\t\t$arquivo=fopen($imagem_nome,'r');\n\t\t\t\t$contents = fread($arquivo, filesize($imagem_nome));\n\t\t\t\t$encoded_attach = chunk_split(base64_encode($contents));\n\t\t\t\tfclose($arquivo);\n\t\t\t}\n\t\t\t$limitador = \"_=======\". date('YmdHms'). time() . \"=======_\";\n\n\t\t\t$mailheaders = \"From: \".$email['email'].\"\\r\\n\";\n\t\t\t$mailheaders .= \"MIME-version: 1.0\\r\\n\";\n\t\t\t$mailheaders .= \"Content-type: multipart/related; boundary=\\\"$limitador\\\"\\r\\n\";\n\t\t\t$cid = date('YmdHms').'.'.time();\n\n\t\t\t$texto=\"\n\t\t\t\t<html>\n\t\t\t\t<head>\n\t\t\t\t\t\".header('Content-type: text/html; charset=utf-8').\"\n\t\t\t\t</head>\n\t\t\t\t<body>\n\t\t\t\t\t<img src=\\\"cid:$cid\\\">\n\t\t\t\t\t<h1>Desenvolvedor avulso para Web</h1>\n\t\t\t\t\t<br>\n\t\t\t\t\t<p><strong>\".$email['nome'].\"</strong>: Solicitou contato, sobre :<em>\".$email['assunto'].\"</em></p>\n\t\t\t\t\t<p>com a seguinte mensagem: <span>\".$email['texto'].\"</span></p>\n\t\t\t\t\t<p>email: \".$email['email'].\"</p>\n\t\t\t\t\t<a href='http://\". $this->url .\"'><font size=3>\". $this->url .\"</font></a>\n\t\t\t\t</body>\n\t\t\t\t</html>\n\t\t\t\";\n\n\t\t\t$msg_body = \"--$limitador\\r\\n\";\n\t\t\t$msg_body .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n\t\t\t$msg_body .= \"$texto\";\n\n\t\t\t$emailPara = explode('@',$this->para)[1];\n\t\t\treturn mail($this->para ,\"Um novo Cliente Contactou o Site \". $emailPara ,$msg_body, $mailheaders);\n\t\t}", "function emailRecuperaClave($emailUsu, $clave){\n\t$mail = new PHPMailer;\n\t//Set who the message is to be sent from\n\t$mail->setFrom('management@omolds.com', 'Omolds');\n\t//Set an alternative reply-to address\n\t//$mail->addReplyTo('management@omolds.com', 'Omolds');\n\t\n\t//Set who the message is to be sent to\n\t$mail->addAddress($emailUsu);\n\t//Set the subject line\n\t$mail->Subject = 'Recupera clave Omolds';\n\t//Read an HTML message body from an external file, convert referenced images to embedded,\n\t//convert HTML into a basic plain-text alternative body\n\t$postdata = http_build_query(\n\t array(\n\t 'nombreUsu' => $emailUsu,\n\t 'clave' => $clave,\n\t 'dominio' => APP_PAGE\n\t )\n\t);\n\t//printVar($postdata); exit;\n\t$opts = array('http' =>\n\t array(\n\t 'method' => 'POST',\n\t 'header' => 'Content-type: application/x-www-form-urlencoded',\n\t 'content' => $postdata\n\t )\n\t);\n\t\n\t$context = stream_context_create($opts);\n\t//$rutaArchivo = '/home/omolds/public_html/page/default/public/';\n\t$mail->msgHTML(file_get_contents(APP_PAGE.'emails/omolds/recuperarClave.php', false, $context), dirname(__FILE__));\n\t\n\t//Replace the plain text body with one created manually\n\t$mail->AltBody = 'This is a plain-text message body';\n\t//Attach an image file\n\t//$mail->addAttachment('images/phpmailer_mini.png');\n\t\n\t$mail->CharSet = 'UTF-8';\n\t//send the message, check for errors\n\t$enviaEmail = $mail->send();\n\tif (!$enviaEmail) {\n\t\treturn false;\n\t} else {\n\t\treturn true; \t\n\t}\n}", "public function ctrRegistroRecipient(){\n\n\t\tif(isset($_POST[\"send\"])){\n\n\t\t\tif (preg_match('/^[a-zA-Z ]+$/', $_POST[\"fname\"]) && preg_match('/^[a-zA-Z ]+$/', $_POST[\"lname\"]) && preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"email\"]) && preg_match('/^[0-9+() ]*$/', $_POST[\"phone\"])) {\n\n\n\t\t\t\t$encriptarEmail=md5($_POST[\"email\"]);\n\t\t\t\t$photo =\"\";\n\n\t\t\t\t$datos = array(\"fname\"=>$_POST[\"fname\"],\n\t\t\t\t\t\"lname\"=>$_POST[\"lname\"],\n\t\t\t\t\t\"email\"=>$_POST[\"email\"],\n\t\t\t\t\t\"phone\"=>$_POST[\"phone\"],\n\t\t\t\t\t\"description\"=>$_POST[\"description\"],\n\t\t\t\t\t\"photo\"\t=> $photo,\n\t\t\t\t\t\"modo\"=> \"directo\",\t\t\t\t\t\t\t\n\t\t\t\t\t\"verificacion\"=> 1,\n\t\t\t\t\t\"emailEncriptado\" => $encriptarEmail);\n\n\t\t\t\t$tabla=\"recipient\";\n\n\t\t\t\t$respuesta = ModeloRecipients::mdlRegistroRecipient($tabla,$datos);\t\n\n\t\t\t\tif ($respuesta==\"ok\") {\n\n\n\t\t\t\t\t\n\t\t\t\t\tif ((isset($_POST[\"optradio\"])) && ($_POST[\"optradio\"]==\"No\")) {\n\t\t\t\t\t\t$cita= $_POST[\"firstName\"].\" has created an account for you at Kikupal\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$cita= $_POST[\"firstName\"].\" has created an account on Kikupal\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$search=array(\"fname\"=>$_POST[\"fname\"],\n\t\t\t\t\t\t\"lname\"=>$_POST[\"lname\"],\n\t\t\t\t\t\t\"email\"=>$_POST[\"email\"]);\n\t\t\t\t\t$consul= ModeloRecipients::mdlbuscarRecipient($tabla,$search);\t\n\t\t\t\t\t\n\t\t\t\t\t/*==========================================================\n\t\t\t\t\t= verificacion de correo electronico =\n\t\t\t\t\t==========================================================*/\n\t\t\t\t\t\n\t\t\t\t\tdate_default_timezone_get(\"America/Mexico_City\");\n\t\t\t\t\t$url=Ruta::ctrRuta();\n\t\t\t\t\t$mail = new PHPMailer;\n\n\t\t\t\t\t$mail->CharSet = 'UTF-8';\n\n\t\t\t\t\t$mail->isMail();\n\t\t\t\t\t$mail->setFrom('info@kikupal.com','Kikupal.com');\t\t\t\t\n\t\t\t\t\t$mail->Subject=\"Check your email address\";\n\t\t\t\t\t$mail->addAddress($_POST[\"email\"]);\n\t\t\t\t\t$mail->msgHTML('\n\t\t\t\t\t\t<div style=\"width:100%; background:#eee; position:relative; font-family:sans-serif; padding-bottom:40px\">\n\n\t\t\t\t\t\t<center>\n\n\t\t\t\t\t\t<img style=\"padding:20px; width:30%\" src=\"http://www.kikupal.com/img/logo-kikupal-hz.png\">\n\n\t\t\t\t\t\t</center>\n\n\t\t\t\t\t\t<div style=\"position:relative; margin:auto; width:65%; background:white; padding:20px\">\n\n\t\t\t\t\t\t<center>\n\n\t\t\t\t\t\t<img style=\"padding:20px; width:15%\" src=\"http://tutorialesatualcance.com/tienda/icon-email.png\">\n\n\t\t\t\t\t\t<h3 style=\"font-weight:100; color:#999\">CHECK YOUR EMAIL ADDRESS</h3>\n\n\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<h4 style=\"font-weight:100; color:#999; padding:0 20px\">'.$cita.' </h4>\n\n\t\t\t\t\t\t<a href=\"'.$url.'verificar/'.$encriptarEmail.'\" target=\"_blank\" style=\"text-decoration:none; border-radius:10px;\">\n\n\t\t\t\t\t\t<div style=\"line-height:60px; background:#0aa; width:60%; color:white\">Please active you account</div>\n\n\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t<br>\n\n\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\n\t\t\t\t\t\t<h5 style=\"font-weight:100; color:#999\">If you are not enrolled in this account, you can ignore this email and the account will be deleted.</h5>\n\n\t\t\t\t\t\t</center>\n\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t</div>'\n\t\t\t\t\t);\n\n\t\t\t\t\t$envio =$mail->send();\n\n\t\t\t\t\tif(!$envio){\n\t\t\t\t\t\techo '<script> \n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttitle:\"Error\",\n\t\t\t\t\t\t\ttext:\" problem has occurred sending the Verificaion '.$_POST[\"email\"].$mail->ErrorInfo.'!\",\n\t\t\t\t\t\t\ttipo:\"error\",\n\t\t\t\t\t\t\tconformButtonText:\"close\",\n\t\t\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t\t\t},function(isConfirm){if(isConfirm){history.back();}}); </script>';\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\techo '<script> \n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttitle:\"CONFIRM E-MAIL\",\n\t\t\t\t\t\t\ttext:\"Account created, an e-mail was sent to ('.$_POST[\"email\"].'), thank you!\",\n\t\t\t\t\t\t\ttipo:\"success\",\n\t\t\t\t\t\t\tconformButtonText:\"close\",\n\t\t\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t\t\t},function(isConfirm){if(isConfirm){window.location=\"'.$url.'c3.php?id='.$consul[\"id_recipient\"].'\";\t}});</script>';\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo '<script> \n\t\t\t\tswal({\n\t\t\t\t\ttitle:\"Error\",\n\t\t\t\t\ttext:\"Failed to register the recipient\",\n\t\t\t\t\ttipo:\"error\",\n\t\t\t\t\tconformButtonText:\"Cerrar\",\n\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t},function(isConfirm){if(isConfirm){history.back();\t}}); </script>';\n\t\t\t}\n\t\t}\n\t}", "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}", "function motDePasseOublie($mail) { $userManager = new OpenClassrooms\\DWJP4\\Backend\\Model\\UsersManager();\n $emailExist = $userManager->emailExist($mail);\n if($emailExist){\n //S'il existe, on fabrique le code , on update le code , on envoi le message\n $pseudo=$emailExist[0]['USER_PSEUDO'];\n $code = codeValidation();\n //echo $pseudo;\n // echo \" code : \".$code;\n $updatePassword = $userManager->updatePsswd($code,$pseudo);\n $message = messagePasswdOublie($mail,$code);\n //echo $message;\n }else {\n //echo \"pas de mail exist\";\n }\n // on retourne sur la page d'identification\n require ('view/backend/identificationView.php'); \n}", "function sendEmail($mail, $name, $age, $department, $message, $picture) {\n if (!preg_match(\"#^[a-z0-9._-]+@(hotmail|live|msn|gmail).[a-z]{2,4}$#\", $mail)) // On filtre les serveurs qui rencontrent des bogues.\n {\n $passage_ligne = \"\\r\\n\";\n }\n else\n {\n $passage_ligne = \"\\n\";\n }\n\n //=====Création de la boundary\n $boundary = \"-----=\".md5(rand());\n $boundary_alt = \"-----=\".md5(rand());\n //==========\n\n //=====Création de la pièce jointe\n $file = fopen($picture['tmp_name'], \"r\");\n $attachment = fread($file, filesize($picture['tmp_name']));\n fclose($file);\n\n $attachment = chunk_split(base64_encode($attachment));\n //==========\n\n //=====Définition du sujet.\n $sujet = \"My Website\";\n //=========\n\n //=====Destinaire du mail\n // $mail_receiver = \"kan.rans93@gmail.com \";\n $mail_receiver = \"roman.fourquin@gmail.com \";\n //$mail_receiver = \"enzo-ramos@live.com \";\n\n //=========\n\n $mail_message = \"Prénom : \" .$name. \"\\nAnnée de naissance : \" .$age. \"\\nDépartement : \" .$department. \"\\nEmail : \" .$mail. \"\\n\\n\" .$message;\n\n //=====Création du header de l'e-mail.\n $header = \"From: \\\"\". $name . \"\\\"<\" . $mail .\">\".$passage_ligne;\n $header.= \"Reply-to: \\\"Randy\\\" <\" .$mail_receiver. \">\".$passage_ligne;\n $header.= \"MIME-Version: 1.0\".$passage_ligne;\n $header.= \"Content-Type: multipart/mixed;\".$passage_ligne.\" boundary=\\\"$boundary\\\"\".$passage_ligne;\n\n $message = $passage_ligne.\"--\".$boundary.$passage_ligne;\n $message.= \"Content-Type: multipart/alternative;\".$passage_ligne.\" boundary=\\\"$boundary_alt\\\"\".$passage_ligne;\n $message.= $passage_ligne.\"--\".$boundary_alt.$passage_ligne;\n //==========\n\n //=====Création du corps de l'email\n\n $message.= \"Content-Type: text/plain; charset=\\\"ISO-8859-1\\\"\".$passage_ligne;\n $message.= \"Content-Transfer-Encoding: 8bit\".$passage_ligne;\n $message.= $passage_ligne.$mail_message.$passage_ligne;\n\n $message.= $passage_ligne.\"--\".$boundary_alt.\"--\".$passage_ligne;\n\n $message.= $passage_ligne.\"--\".$boundary.$passage_ligne;\n\n $message.= \"Content-Type: \" .$picture['type']. \"; name=\\\"\" .$picture['name']. \"\\\"\".$passage_ligne;\n $message.= \"Content-Transfer-Encoding: base64\".$passage_ligne;\n $message.= \"Content-Disposition: attachment; filename=\\\"\" .$picture['name']. \"\\\"\".$passage_ligne;\n $message.= $passage_ligne.$attachment.$passage_ligne.$passage_ligne;\n\n $message.= $passage_ligne.\"--\".$boundary.\"--\".$passage_ligne;\n //==========\n\n //=====Envoi de l'e-mail.\n return mail($mail_receiver, $sujet, $message, $header);\n //==========\n }", "function invia_email_richiesta_accettata($id_richiesta) {\n $query = \"SELECT U.email as email_fornitore, UU.nome, UU.cognome, UU.telefono, UU.indirizzo, UU.email as email_utente, UU.dati_contatto\n FROM Richieste as R JOIN Users as U ON R.id_fornitore=U.id JOIN Users as UU ON R.id_utente=UU.id\n WHERE R.id=\".$id_richiesta;\n $result = mysql_query($query) or die(mysql_error());\n\n\tif($result){\n $row = mysql_fetch_assoc($result);\n\t} else {\n\t return false;\n\t}\n\n\tif($row['dati_contatto'][0] == 1) {\n\t $indirizzo = $row['indirizzo'];\n\t} else {\n\t $indirizzo = '<i>non visibile</i>';\n\t}\n\tif($row['dati_contatto'][1] == 1) {\n\t $telefono = $row['telefono'];\n\t} else {\n\t $telefono = '<i>non visibile</i>';\n\t}\n\tif($row['dati_contatto'][2] == 1) {\n\t $email = $row['email_utente'];\n\t} else {\n\t $email = '<i>non visibile</i>';\n\t}\n\n $to = $row['email_fornitore'];\n $subject = \"Richiesta Accettata\";\n $message = \"<html><head>\n <title>Hai accettato una richiesta</title>\n </head><body>\n <p>Riepilogo dati utente:</p>\n <p>Nome: \".$row['nome'].\" \".$row['cognome'].\"<br>\n Telefono: \".$telefono.\"<br>\n Email: \".$email.\"<br>\n Indirizzo: \".$indirizzo.\"</p>\n <p>Ricordiamo che per ogni richiesta accettata saranno aggiunti 2€ sul conto aziendale.</p>\n </body></html>\";\n\n $res = sendEmail($to, $subject, $message);\n\n}", "public function envoyer_email($id)\n {\n\n $q = $this->db->where('fac_id', $id)\n ->where('fac_inactif is null')\n ->select('t_factures.*,scv_email')\n ->join('t_commandes', 'cmd_id=fac_commande', 'left')\n ->join('t_devis', 'dvi_id=cmd_devis', 'left')\n ->join('t_societes_vendeuses', 'scv_id=dvi_societe_vendeuse', 'left')\n ->get('t_factures');\n if ($q->num_rows() != 1) {\n throw new MY_Exceptions_NoSuchRecord('Impossible de trouver la facture numéro ' . $id);\n }\n $row = $q->row();\n\n // récupération du contact et du correspondant\n $q = $this->db->select(\"dvi_client,dvi_correspondant\")\n ->join('t_commandes', 'cmd_id=' . $row->fac_commande, 'left')\n ->join('t_devis', 'dvi_id=cmd_devis', 'left')\n ->get('t_factures');\n if ($q->num_rows() == 0) {\n throw new MY_Exceptions_NoSuchUser('Pas de correspondant trouvé pour la facture ' . $id);\n }\n\n $row2 = $q->row();\n\n // récupération de l'adresse email\n $q = $this->db->where('cor_id', $row2->dvi_correspondant)\n ->where('LENGTH(cor_email)>0')\n ->get('t_correspondants');\n if ($q->num_rows() == 1) {\n $email = $q->row()->cor_email;\n } else {\n $q = $this->db->where('ctc_id', $row2->dvi_client)\n ->where('LENGTH(ctc_email)>0')\n ->get('t_contacts');\n if ($q->num_rows() == 1) {\n $email = $q->row()->ctc_email;\n }\n }\n if (!$email) {\n throw new MY_Exceptions_NoEmailAddress(\"Le contact n'a pas d'adresse email\");\n }\n\n // récupération du modèle de document\n $q = $this->db->where('mod_nom', 'FACTURE')\n ->get('t_modeles_documents');\n if ($q->num_rows() == 0) {\n throw new MY_Exceptions_NoSuchTemplate(\"Pas de modèle disponible pour le message email\");\n }\n $sujet = $q->row()->mod_sujet;\n $corps = $q->row()->mod_texte;\n\n $fac_fichier = $this->generer_pdf($id);\n\n // envoi du mail\n $this->load->library('email');\n $resultat = $this->email->send_one($email, $row->scv_email, $sujet, $corps, $fac_fichier);\n if (!$resultat) {\n return false;\n }\n\n // enregistrement de la transmission\n $transmise = $row->fac_transmise;\n if ($transmise != '') {\n $transmise .= '<br />';\n }\n $transmise .= date('d/m/Y') . '&nbsp;Mail';\n $data = array(\n 'fac_transmise' => $transmise,\n );\n return $this->_update('t_factures', $data, $id, 'fac_id');\n }", "public function update_w_image($id_user){\n\n $find_img = mysql_query(\"SELECT image FROM users WHERE id_user = '\".$id_user.\"' LIMIT 1\");\n $delete_img = mysql_fetch_array($find_img);\n $path = '../../'.$delete_img['image'];\n $delete = unlink($path);\n\n if($delete == true){\n\n if($this->password == \"\"){\n $update = mysql_query(\"UPDATE users SET id_city = '\".$this->city.\"', image = '\".$this->image.\"', username = '\".$this->username.\"', lastname_1 = '\".$this->lastname_1.\"', lastname_2 = '\".$this->lastname_2.\"', gender = '\".$this->gender.\"', birthday = '\".$this->birthday.\"', email = '\".$this->email.\"', street = '\".$this->street.\"', number_home = '\".$this->number.\"', location = '\".$this->location.\"', zip = '\".$this->zip.\"' WHERE id_user = '\".$id_user.\"'\");\n \n if($update == true ){\n header(\"Location:../logout.php\");\n die();\n }else{\n header(\"Location:../users/profile-edit.php?id=$id_user&status=error\");\n die();\n }\n\n }else{\n $update = mysql_query(\"UPDATE users SET id_city = '\".$this->city.\"', image = '\".$this->image.\"', username = '\".$this->username.\"', lastname_1 = '\".$this->lastname_1.\"', lastname_2 = '\".$this->lastname_2.\"', gender = '\".$this->gender.\"', birthday = '\".$this->birthday.\"', email = '\".$this->email.\"', password = '\".md5($this->password).\"', street = '\".$this->street.\"', number_home = '\".$this->number.\"', location = '\".$this->location.\"', zip = '\".$this->zip.\"' WHERE id_user = '\".$id_user.\"'\");\n if($update == true ){\n\n //-- If everything is ok, we send to the user the new password by email.\n require_once('mail/class.phpmailer.php');\n require_once('mail/class.smtp.php');\n\n //PHPMailer Object\n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = \"ssl\";\n $mail->Host = \"smtp.gmail.com\"; \n $mail->Port = 465;\n $mail->Username = \"erandivilla92@gmail.com\";\n $mail->Password = \"makeIT4w38_m3\";\n \n //From email address and name\n $mail->From = \"erandivilla92@gmail.com\";\n $mail->FromName = \"IA Sistema Web\";\n\n //To address and name\n $mail->addAddress($this->email, iconv('UTF-8', 'ISO-8859-1', $this->username.\" \".$this->lastname_1)); \n \n //Send HTML or Plain Text email\n $mail->isHTML(true);\n \n $mail->Subject = \"Nuevo password.\";\n $mail->Body = iconv('UTF-8', 'ISO-8859-1', \"<p><strong>Su password ha sido actualizado!</strong> A continuación le proporcionamos los nuevos accesos al sistema: </p>\n <p><strong>Email: </strong>\".$this->email.\"</p>\n <p><strong>Password: </strong>\".$this->password.\"</p>\n\n <h5>Cualquier detalle o sugerencia, póngase en contacto con nosotros.</h5>\");\n $mail->AltBody = \"This is the plain text version of the email content\";\n if($mail->send()){\n header(\"Location:../logout.php\");\n die();\n }\n\n }else{\n header(\"Location:../users/profile-edit.php?id=$id_user&status=error\");\n die();\n }\n }\n }else{\n header(\"Location:../users/profile-edit.php?id=$id_user&status=error\");\n die();\n }\n\n }", "public function update_wo_image($id_user){\n if($this->password == \"\"){\n $update = mysql_query(\"UPDATE users SET id_city = '\".$this->city.\"', username = '\".$this->username.\"', lastname_1 = '\".$this->lastname_1.\"', lastname_2 = '\".$this->lastname_2.\"', gender = '\".$this->gender.\"', birthday = '\".$this->birthday.\"', email = '\".$this->email.\"', street = '\".$this->street.\"', number_home = '\".$this->number.\"', location = '\".$this->location.\"', zip = '\".$this->zip.\"' WHERE id_user = '\".$id_user.\"'\")or die(mysql_error());\n \n if($update == true ){\n header(\"Location:../logout.php\");\n die();\n }else{\n header(\"Location:../users/profile-edit.php?id=$id_user&status=error\");\n die();\n }\n\n }else{\n $update = mysql_query(\"UPDATE users SET id_city = '\".$this->city.\"', username = '\".$this->username.\"', lastname_1 = '\".$this->lastname_1.\"', lastname_2 = '\".$this->lastname_2.\"', gender = '\".$this->gender.\"', birthday = '\".$this->birthday.\"', email = '\".$this->email.\"', password = '\".md5($this->password).\"', street = '\".$this->street.\"', number_home = '\".$this->number.\"', location = '\".$this->location.\"', zip = '\".$this->zip.\"' WHERE id_user = '\".$id_user.\"'\")or die(mysql_error());\n \n if($update == true ){ \n //-- If everything is ok, we send to the user the new password by email. \n require_once('mail/class.phpmailer.php');\n require_once('mail/class.smtp.php');\n\n //PHPMailer Object\n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = \"ssl\";\n $mail->Host = \"smtp.gmail.com\"; \n $mail->Port = 465;\n $mail->Username = \"erandivilla92@gmail.com\";\n $mail->Password = \"makeIT4w38_m3\";\n \n //From email address and name\n $mail->From = \"erandivilla92@gmail.com\";\n $mail->FromName = \"IA Sistema Web\";\n\n //To address and name\n $mail->addAddress($this->email, iconv('UTF-8', 'ISO-8859-1', $this->username.\" \".$this->lastname_1)); \n \n //Send HTML or Plain Text email\n $mail->isHTML(true);\n \n $mail->Subject = \"Nuevo password.\";\n $mail->Body = iconv('UTF-8', 'ISO-8859-1', \"<p><strong>Su password ha sido actualizado!</strong> A continuación le proporcionamos los nuevos accesos al sistema: </p>\n <p><strong>Email: </strong>\".$this->email.\"</p>\n <p><strong>Password: </strong>\".$this->password.\"</p>\n\n <h5>Cualquier detalle o sugerencia, póngase en contacto con nosotros.</h5>\");\n $mail->AltBody = \"This is the plain text version of the email content\";\n if($mail->send()){\n header(\"Location:../logout.php\");\n die();\n }\n\n }else{\n header(\"Location:../users/profile-edit.php?id=$id_user&status=error\");\n die();\n }\n }\n }", "public static function sendEmail($nome,$email, $user)\n {\n $CI = &get_instance();\n\n $CI->load->library(['Fo_email']);\n\n\n $msg = '<div style=\"width: 800px\">\n<img style=\"margin-left: 160px; height: 125px; width: 250px\" src=\"https://gtxsports.com.br/wp-content/uploads/2017/07/gtxSports_blk.png\">\n\n <div style=\"\n padding: 30px 0px;\n font-size: 3rem;\n font-weight: bold;\n width: 100%;\n margin-left: 120px;\n height: auto;\n color: #4682B4;\n font-family:Multicolore;\">\n Seja bem vindo\n </div>\n <img height=\"290\" width=\"600\" style=\"margin-left 100px; border-radius: 20px\" src=\"https://gtxsports.com.br/wp-content/uploads/2017/07/slide_20estados.jpg\">\n'\n .'<div style=\" widt:80%; padding: 20px 0px;\">'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;display: inline-flex\"\"> Olá <div style=\"color: #4682B4; font-weight: bold;display: inline-flex; \"> &nbsp;'.$nome.'</div></p>'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px; display: inline-flex\">Seja bem vindo a <div style=\"color: #4682B4; font-weight: bold;display: inline-flex \"> &nbsp; GTX</div></p>'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;\"> Seu usuário foi cadastrado em nosso sistema,</p>'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;\"> logo seu pedido estará disponivel para acesso em: </p>' . base_url('home/cliente')\n . '</p></div>'\n . '<p style=\"color:#696969; padding: 0px 20px 20px 0px;font-weight: bold;font-size:20px;font-family:Multicolore;margin:0px;\"><b>Seu acesso:</b></p>\t'\n . '<div style=\" display: flex; justify-content: center; width: 100%; height: auto\">'\n .'<div style=\" width:550px; background-color:#e1efbc;border-radius: 10px; padding: 20px;\">'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;\"><b>Usuário:</b> ' . $user . ' ou seu E-mail </p>'\n . '<p style=\"color:#696969;font-size:15px;font-family:Multicolore;margin:0px;\"><b>Senha: </b> Seu nome e sobrenome (sem espaço e sem letras maiusculas )</p>'\n .'</div></div></div>';\n $Data['to'] = $email;\n $Data['name'] = 'GTX';\n $Data['html'] = $msg;\n $Data['subject'] = 'Parabéns, você foi cadastrado em nosso sistema!';\n\n $resp_email = Fo_email::from_system($Data);\n\n }", "function send_reg_confirmation_mail($id)\n\t\t\t{\n\t\t\t\t //print_r($id);exit;\n\t\t\t\t$sql = \"select * from registration where registration_id = \".$id;\n\n\t\t\t\t$result = mysql_query($sql) or die(mysql_error());\n\t\t\t\t$user_data = mysql_fetch_assoc($result);\n\t\t\t\t// echo \"<pre>\";print_r($user_data['registration_email']);exit;\n\n\t\t\t\t$from = 'noreply@saiprasadvivah.net';\n\n\t\t\t\t$to = $user_data[\"registration_email\"];\n\n\t\t\t\t$subject=\"Registration Conformation\";\n\n\n\t$msg .= \"\";\n\n\t$msg .='\n\n\t<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\n\t<head>\n\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\n\t<title>Saiprasad</title>\n\n\t<link rel=\"stylesheet\" href=\"http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\">\n\n\t<style type=\"text/css\"> \n\n\tbody {\n\t\tmargin-left:100px;\n\t\tmargin-right:100px;\n\t}\n\n\t#main-div{\n\t\tbackground-size: 100%;\n\t\tbackground-image: url(\"../images/473025691.jpg\");\n\t\tbackground-repeat: no-repeat;\n \tbackground-position: center center;\n \tbackground-attachment: fixed;\n \topacity: 0.5;\n \tfilter: alpha(opacity=90);\n\n\t}\n\t\n\t.TextCss {\n\n\tfont-family: Arial, Helvetica, sans-serif;\n\n\tfont-size: 12px;\n\n\tcolor:#333333 ;\n\n\tpadding:45px;\n\n\t} \n\n\t</style>\n\n\t</head>\n\n\t<body>\n\t<div class=\"container\" style=\"width:700px;\">\n\t<div style=\"background:#fff; border: 1px solid #b3b3b3; width:650;\">\n\t\t<div style=\"margin-left:10px; margin-top: 10px; margin-bottom: 0px;\">\n\t\t\t<img src=\"http://'.$_SERVER['SERVER_NAME'].'/public/images/logo-(1).png\" style=\"align:center; height:150px width: 200px;\" />\n\t\t</div>\n\t\t<br/>\n\t\t<div style=\"background:#d9d9d9; padding:30px;height:auto; text-align:justify;\" >\n\t\t\t<b>Dear '.$user_data[\"registration_fname\"].',</b>\n\t\t\t<br/>\n\t\t\t<p>Welcome to SHREE SAI PRASAD VIVAH <b>Founder / President : Mr. Baburao Sonawane,</b></p>\n\t\t\t\n\t\t\t<p>Sai Prasad Vivah is Most Trusted & Successful Matrimony Portal in Hindu-Chambhar Community, Sai Prasad Vivah started working manually in 1993 from home and pioneered online in 2004.The service was found with simple objective to help people find happiness. Sai Prasad Vivah has created a community-renowned service that has touched over thousands of people.</p>\n\t\t\t<br/>\n\t\t\t<b><p style=\"color:#000;font-size:18px;\">Login Details:</p>\n\t\t\t<p>Email ID: '.$user_data[\"registration_email\"].'</p>\t \n\t\t\t<p>Password: '.$user_data[\"registration_password\"].'</p>\n\t <p>Your Profile id is: SPV'.$user_data[\"registration_id\"].'</p>\n\t <br/>\n\t\t\t<p style=\"color:#ff8533;font-size:18px;\">Special Note for Members Benefit:</p></b>\n\t\t\t<div class=\"row\">\n\t\t\t<div class=\"col-sm-10 col-sm-offset-1\">\n\t\t\t\t<li>Please Check your profile is completed or not.</li>\n\t\t\t\t<li>Please complete ABOUT MYSELF & ABOUT MY PARTNER.</li>\n\t\t\t\t<li>Please add your 2 or 3 new photos in MY ALBUM</li>\n\t\t\t\t<li>Please Note upload photo 600 x 700 Size or Less than 1.00 MB.</li>\n\t\t\t\t<li>Please Check your profile daily on our Website & take a facility of Send Messages.</li>\n\t\t\t\t<li>After Log in when you looking Received Messages We request to all MEMBERS Please REPLY the Messages in answer YES or NO Because Candidates waiting for your valuable Reply.</li>\n\t\t\t\t<li>If your ENGAGEMENT OR MARRIAGE is fixed, for delete or Remove your profile from our Web Site. Only Telephonic communication will not be treated as an official Massage. Only Official E-Mail is Compulsory. </li>\n\t\t\t</div>\n\t\t\t</div>\n\t\t\t<br/>\n\t <br/>\n\t\t\t<div class=\"row\">\n\t\t\t\t<div style=\"text-align:center;font-size:17px;\">\n\t\t\t\tPlease contact us for Support\n\t\t\t\t</div>\n\n\t\t\t\t<div style=\"text-align:center;font-size:17px;\">\n\t\t\t\t<b>E-mail:</b> saiprasadvivah@gmail.com OR Tel: 9702970803, 9833096623\n\t\t\t\t</div>\n\n\t\t\t\t<div style=\"text-align:center;font-size:17px;\">\n\t\t\t\t<b>Visit on</b><a href=\"http://saiprasadvivah.net\"> www.saiprasadvivah.net</a> \n\t\t\t\t</div><br/>\n\n\t\t\t\t<div style=\"text-align:center;color:#ff8533;\">**************************************************************</div>\n\n \t<div style=\"text-align:center;color:#ff8533;\">We value your time and support!!</div>\n\n \t<div style=\"text-align:center;color:#ff8533;\">**************************************************************</div>\n \n\t\t\t</div>\n\t\t\t<br/>\n\t <br/>\n\t\t\t<footer>\n\t <b>Thanks & Regards,</b>\n\t <br/>\n\t\t\t\tSAI PRASAD VIVAH.NET<br/>\n\t\t\t\t<b>Mr. BABURAO A SONAWANE</b><br/>\n\t\t\t\tConact no.: 9702970803<br/>\n\t\t\t\tADD- 98/3446, Nehru Nagar,Kurla<br/>\n\t\t\t\tMumbai 400024.\n </footer> \n\n\t\t\t</div>\n\t \n\t </div>\n\t</div>\n\t</div>\n\t</body>\n\n\t</html>';\t\n\t//print_r($msg);exit;\n\t$mailheaders = 'MIME-Version: 1.0' . \"\\r\\n\";\n\n\t$mailheaders .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\n\t$mailheaders .= 'From: Saiprasad Vivah <noreply@saiprasadvivah.net>' . \"\\r\\n\";\n\n\tmail($to,$subject,$msg,$mailheaders);\n\n \n// print_r($msg);exit;\n\n\t\t\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('contact@elevenmx.com')\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 }", "public static function setNewMessage($idUser,$texte,$image) {\n\n\t\t\t$em = dbconnection::getInstance()->getEntityManager() ;\n\n\t\t\t$messageRepository = $em->getRepository('message');\n\t\t\t$utilisateurRepository = $em->getRepository('utilisateur');\n\n\t\t \t$utilisateur = $utilisateurRepository->findOneById($idUser);\n\n\t\t\t$newMessage = new message;\n\t\t\t$newPost = new post;\n\n\t\t\t$newPost->texte = $texte;\n\t\t\t$newPost->image = $image;\n\t\t\t$newPost->date = new DateTime();\n\n\t\t\t$em->persist($newPost);\n\t\t\t$em->flush();\n\n\t\t\t$newMessage->post = $newPost;\n\t\t\t$newMessage->emetteur = $utilisateur;\n\t\t\t$newMessage->parent = $utilisateur;\n\t\t\t$newMessage->destinataire = $utilisateur;\n\t\t\t$newMessage->aime = 0;\n\n\t\t\t$em->persist($newMessage);\n\t\t\t$em->flush();\n\n\t\t\treturn $newMessage; \n\t}", "function enviar_repuestos(){\n\t\t$this->asignar_valores2();\n\t\t$cuerpo =\"<img width='200' height='100' src='http://www.vehiculosvenezuela.com/imagenes/logon.jpg' />\n\t\t<br /><u>DATOS PERSONALES:</u><br />\";\n\t\t$cuerpo .=\"<br />\";\n\t\t$cuerpo .= \"<strong>Nombre: <strong/>\".$this->nombre.\"<br />\" ;\n\t\t$cuerpo .= \"<strong>Apellido: <strong/>\".$this->apellido.\"<br />\" ;\n\t\t$cuerpo .= \"<strong>Tel&eacute;fono: <strong/>\".$this->telefono.\"<br />\" ;\n\t\t$cuerpo .= \"<strong>E-mail: <strong/>\".$this->email.\"<br />\" ;\n\t\t$cuerpo .= \"<br />\";\n\t\t$cuerpo .= \"---- DATOD DE REPUESTO ----\";\n\t\t$cuerpo .= \"<br />\";\n\t\t$cuerpo .= \"<strong>Marca: <strong/>\".$this->marca.\"<br />\" ;\n\t\t$cuerpo .= \"<strong>Modelo: <strong/>\".$this->modelo.\"<br />\" ;\n\t\t$cuerpo .= \"<strong>A&ntilde;o: <strong/>\".$this->ano.\"<br />\" ;\n\t\t$cuerpo .= \"<strong>Tipo: <strong/>\".$this->tipo.\"<br />\" ;\n\t\t$cuerpo .= \"<strong>Descripci&oacute;n: <strong/>\".$this->descripcion.\"<br />\" ;\n\t\t$cuerpo .= \"<br />\";\n\t\t$cuerpo .= \"---- END DATA ----\";\n\t\t$cuerpo .= \"<br />\";\n\t\t$subject= \"Solicitud de Repuesto desde www.vehiculosvenezuela.com\";\n\t\t$subject2= \"Solicitud desde www.vehiculosvenezuela.com\";\n\t\t$basemailfor=\"info@vehiculosvenezuela.com\";\n\t\t//$basemailfor=\"marabino20@gmail.com\";\n\t\t$basemailfrom = $this->email;\n\t\t$respuesta =\"<img width='200' height='100' src='http://www.vehiculosvenezuela.com/imagenes/logon.jpg' /><br /><br />\n\t\t<strong>Reciba un cordial saludo: \".$this->nombre.\" \".$this->apellido.\"<strong/><br /><br />\n\t\tHemos recibido su solicitud con &eacute;xito y le damos gracias por contactarnos, en este momento la estamos procesando y obtendrá una respuesta a la brevedad posible.\n\t\t<br><br> \n\t\t Muchas Gracias\n\t\t<br /><br />\n\t\tAtentamente,<br /><br />\n\t\tVeh&iacute;culosVenezuela<br />\n\t\twww.vehiculosvenezuela.com\";\n\t\t$this->mensaje=\"Su solicitud de repuesto ha sido enviado satisfactoriamente!\";\n\t\tif(mail (\"$basemailfor\", \"$subject2\", \"$cuerpo\", \"From: $basemailfrom\\nContent-Type: text/html\" )){\n\t\t mail (\"$basemailfrom\", \"$subject\", \"$respuesta\", \"From: $basemailfor\\nContent-Type: text/html\" );\n\t\t \n\t\t}\n\t}", "function getUserImage($mail)\n{\n return $GLOBALS['conn']->query(\"SELECT image FROM `users` WHERE mail='$mail'\");\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 }", "public static function upload() {\n if(isset($_POST['q1'])){\n $nomexpediteur = $_POST['q1'];\n }\n \n $choixg = isset($_POST['q1']) ? $_POST['q1'] : NULL;\n \n if(empty($choixg)){\n echo \"Remplis l'information Nom de famille<br>\";\n }else {\n }\n\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$choixg)) {\n echo \"un chiffre dans le nom ?<br>\";\n }\n\n //recupere le mail de l'expediteur \n if(isset($_POST['q2'])){\n $mailUploader = $_POST['q2'];\n }\n $choixi = isset($_POST['q2']) ? $_POST['q2'] : NULL;\n\n if (empty($_POST[\"q2\"])) {\n $CourrielErr = \"Email is required\";\n echo $CourrielErr;\n } else if (!filter_var($choixi, FILTER_VALIDATE_EMAIL)) {\n $CourrielErr = \"Invalid email format\"; \n echo $CourrielErr;\n } \n //recupere recipent \n if(isset($_POST['q3'])){\n $recipent = $_POST['q3'];\n }\n\n //recupere le mail for friends \n if(isset($_POST['q4'])){\n $mailFriends = $_POST['q4'];\n }\n\n $choixig = isset($_POST['q4']) ? $_POST['q4'] : NULL;\n\n if (empty($_POST[\"q4\"])) {\n $CourrielErr = \"Email is required\";\n echo $CourrielErr;\n } else if (!filter_var($choixi, FILTER_VALIDATE_EMAIL)) {\n $CourrielErr = \"Invalid email format\"; \n echo $CourrielErr;\n } \n\n //recupere le messagesender \n if(isset($_POST['message'])){\n $messagesender = $_POST['message'];\n }\n $choixh = isset($_POST['message']) ? $_POST['message'] : NULL;\n //$testcommentaires = Wetransfert::test_input($choixh);\n \n $nb_erreur = 0;\n if(!empty($_FILES)){\n \n if(isset($_FILES['q6']['error'])){\n switch($_FILES['q6']['error']){\n case 1:\n $message['urlImg'] = '';\n $message['msg'] = \"Votre fichier ne doit pas dépasser 1Go\";\n $message['type'] = 'error';\n $nb_erreur++;\n break;\n case 2:\n $message['urlImg'] = '';\n $message['msg'] = \"Erreur\";\n $message['type'] = 'error';\n $nb_erreur++;\n break;\n case 3:\n $message['urlImg'] = '';\n $message['msg'] = \"Une erreur est survenue lors du téléchargement.\";\n $message['type'] = 'error';\n $nb_erreur++;\n break;\n case 4:\n $message['urlImg'] = '';\n $message['msg'] = \"Aucun fichier n'a été séléctionné.\";\n $message['type'] = 'error';\n $nb_erreur++;\n break; \n }\n }\n \n if($nb_erreur == 0){\n $file_name = Wetransfert::cryptFileName($_FILES['q6']);\n //$img = $_FILES['q6'];\n //$ext = substr($img['name'], strrpos($img['name'], '.') + 1);\n //$allow_ext = array(\"jpg\", \"JPG\", \"png\", \"PNG\", \"JPEG\", \"jpeg\", \"GIF\", \"gif\");\n \n //if(in_array($ext, $allow_ext)){\n //définit l'image en cours\n //$file_name = 'file_'.substr(md5($img['name']), 0, 5).'_'.time().'.'.$ext;\n \n //Récupère le chemin temporaire + la direction où on veux l'envoyer.\n $tmp_name = $_FILES[\"q6\"][\"tmp_name\"];\n $directory = $_SERVER['DOCUMENT_ROOT'].\"/we_transfer_like/app/assets/dossier/\".$file_name;\n //var_dump($_SERVER['DOCUMENT_ROOT']);die();\n move_uploaded_file($tmp_name, $directory);\n //}\n \n $dateUpload = date('d-m-Y-G-i');\n\n\n //upload\n $db = Database::getInstance();\n $stmt = $db->prepare(\"INSERT INTO upload(fichierUpload,mailUploader,dateUpload) VALUES (:fichierUpload,:mailUploader,:dateUpload)\");\n \n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n \n $stmt->bindParam(':fichierUpload',$file_name);\n $stmt->bindParam(':mailUploader',$mailUploader);\n $stmt->bindParam(':dateUpload',$dateUpload); \n $stmt->execute();\n \n }\n }\n }", "function actualizarDatos(){\n $e = new Empresa();\n \n $e->ruc = $_POST['ruc'];\n\n $imagenName = $_FILES['file']['name']; \n\n if($_POST['nameimage'] ==\"\"){\n\n \n \n //-------- MODIFIED NAME --------------\n $extension = pathinfo($imagenName, PATHINFO_EXTENSION);\n $random = rand(0,99);\n $rename = $random.date('Ymd').$imagenName;\n $newname = $rename;\n //for obtain extension of image .'.'.$extension\n $imageurl = \"./vistas/panel_usuario/logoemp/\" . $newname;\n \n $imagenTemp = $_FILES['file']['tmp_name'];\n move_uploaded_file($imagenTemp, $imageurl);\n //copy($imagenTemp,$imagenUrl);\n }else{\n \n\n $eliminarimage = \"./vistas/panel_usuario/logoemp/\" . $_POST['nameimage'];\n unlink($eliminarimage);\n\n $extension = pathinfo($imagenName, PATHINFO_EXTENSION);\n $random = rand(0,99);\n $rename = $random.date('Ymd').$imagenName;\n $newname = $rename;\n //for obtain extension of image .'.'.$extension\n $imageurl = \"./vistas/panel_usuario/logoemp/\" . $newname;\n \n $imagenTemp = $_FILES['file']['tmp_name'];\n move_uploaded_file($imagenTemp, $imageurl);\n\n }\n //ad in controller \n $e->logo = $newname;\n $e->logoUrl = $imageurl;\n\n $e->emailEmp = str_replace(\" \",\"\",$_POST['email']);\n $e->descripcion = trim($_POST['descripcion']);\n $e->direccion = trim($_POST['direccion']);\n $e->distrito = $_POST['distrito'];\n $e->telefono = $_POST['telefono'];\n $e->whatsapp = $_POST['whatsapp'];\n $e->facebook = trim($_POST['facebook']);\n $e->instagram = trim($_POST['instagram']);\n if (empty($e->descripcion) || empty($e->direccion) || $_POST['departamento'] == '0' || strlen($e->telefono) != 9 || strlen($e->whatsapp) > 9) {\n return ['bool' => false, 'msg' => 'datosIncorrectos'];\n }\n return ($this->modelo->actualizarEmpresa($e)) ?\n $this->modelo->buscarByRuc($e->ruc) :\n ['bool' => true, 'msg' => 'problemaSQL'];\n }", "static public function ctrIngresoRecipient(){\n\n\t\tif(isset($_POST[\"ingEmail\"])){\n\n\t\t\tif (preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"ingEmail\"]) && preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"])) {\n\t\t\t\t$encriptar=md5($_POST[\"ingPassword\"]);\n\t\t\t\t$url=Ruta::ctrRuta();\n\t\t\t\t$tabla=\"recipient\";\n\t\t\t\t$item=\"bemail\";\n\t\t\t\t$valor=$_POST[\"ingEmail\"];\n\t\t\t\t$respuesta=ModeloRecipients::mdlMostrarRecipientVerificado($tabla,$item,$valor);\t\t\t\t\n\t\t\t\tif ($respuesta[\"bemail\"] == $_POST[\"ingEmail\"] && $respuesta[\"password\"] == $encriptar) {\n\t\t\t\t\tif($respuesta[\"verificacion\"] == 1){\n\n\t\t\t\t\t\techo '<script> \n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttitle:\"You have not verified your email account\",\n\t\t\t\t\t\t\ttext:\"The system could not be accessed\",\n\t\t\t\t\t\t\ttipo:\"error\",\n\t\t\t\t\t\t\tconformButtonText:\"close\",\n\t\t\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction(isConfirm){\n\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\thistory.back();\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</script>';\n\t\t\t\t\t\t\t}else{\n\n\t\t\t\t\t\t\t\t$_SESSION[\"validarSesion\"]=\"ok\";\n\t\t\t\t\t\t\t\t$_SESSION[\"id_recipient\"]=$respuesta[\"id_recipient\"];\n\t\t\t\t\t\t\t\t$_SESSION[\"bFname\"]=$respuesta[\"bFname\"];\n\t\t\t\t\t\t\t\t$_SESSION[\"bLname\"]=$respuesta[\"bLname\"];\n\t\t\t\t\t\t\t\t$_SESSION[\"bemail\"]=$respuesta[\"bemail\"];\n\t\t\t\t\t\t\t\t$_SESSION[\"bphone\"]=$respuesta[\"bphone\"];\n\t\t\t\t\t\t\t\t$_SESSION[\"bdescription\"]=$respuesta[\"bdescription\"];\n\t\t\t\t\t\t\t\t$_SESSION[\"bphoto\"]=$respuesta[\"bphoto\"];\t\n\t\t\t\t\t\t\t\t$_SESSION[\"direccion\"]=$respuesta[\"direccion\"];\n\t\t\t\t\t\t\t\t$_SESSION[\"modo\"]=$respuesta[\"modo\"];\n\t\t\t\t\t\t\t\t$_SESSION[\"password\"]=$respuesta[\"password\"];\n\n\n\t\t\t\t\t\t\t\techo '<script> \n\t\t\t\t\t\t\t\twindow.location = \"'.$url.'panel.php\";\n\t\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\techo '<script> \n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\ttitle:\"Failed to access\",\n\t\t\t\t\t\t\t\ttext:\"Mail and/or password incorrect. Please check again. \",\n\t\t\t\t\t\t\t\ttipo:\"error\",\n\t\t\t\t\t\t\t\tconformButtonText:\"close\",\n\t\t\t\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tfunction(isConfirm){\n\t\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\t\twindow.location =localStorage.getItem(\"rutaActual\", rutaActual);\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</script>';\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\techo '<script> \n\t\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t\ttitle:\"Error\",\n\t\t\t\t\t\t\t\t\ttext:\"The system could not be accessed\",\n\t\t\t\t\t\t\t\t\ttipo:\"error\",\n\t\t\t\t\t\t\t\t\tconformButtonText:\"close\",\n\t\t\t\t\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tfunction(isConfirm){\n\t\t\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\t\t\thistory.back();\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</script>';\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}", "public function invitMembre($slug)\n {\n if(isset($_SESSION['user']))\n {\n if($this->allowToTwo('Admin','Assoc',$slug)){\n\n $donnee = $this->listing('Assoc',$slug);\n\n if($_POST){\n $r_POST = $this->nettoyage($_POST);\n $error['mail'] = ValidationTools::emailValid($r_POST['mail']);\n\n $assocModel = new AssocModel;\n $nom_assoc = $assocModel->FindElementByElement('nom','slug',$slug);\n $id_assoc = $assocModel->FindElementByElement('id','slug',$slug);\n\n if(ValidationTools::IsValid($error)){\n if(!is_numeric($r_POST['mail'])){ //si c'est ce n'est pas id on verifie si eventuelemt il le mail\n //exist en base en base de donnee\n $UserModel = new UserModel;\n $contactModel = new ContactModel;\n\n if($UserModel->emailExists($r_POST['mail'])){ //si oui on recupere l'id\n $r_POST['mail'] = $UserModel->FindElementByElement('id','mail',$r_POST['mail']);\n $r_POST['destinataire_orga'] = 'users';\n $RolesModel = new RolesModel;\n $roleRetourner = $RolesModel->FindRole($id_assoc,$r_POST['mail']);\n\n if(!empty($roleRetourner)){\n\n $confirmation ='Cet utilisateur fait déjà partie de l\\'Association';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n\n }\n\n }else {\n $r_POST['destinataire_orga'] = 'public';\n $r_POST['destinataire_status'] = 'del';\n }\n\n $invitation = $contactModel->findInvitation($r_POST['mail'],$id_assoc);\n if(!empty($invitation)){\n $confirmation ='Une invitation a déjà été envoyée à cette personne';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n }\n\n if($contactModel->findDemande($r_POST['mail'],$id_assoc)){\n $confirmation ='Une demande pour rejoindre l\\'Association a déjà faite par ce membre, merci de consulter les messages reçus de l\\'Association pour pouvoir y répondre';\n\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n }\n }\n\n unset($r_POST['submit']);\n\n $r_POST['emeteur_pseudo'] = $nom_assoc;\n $r_POST['objet'] = 'Invitation a rejoindre '.$nom_assoc ;\n $r_POST['emeteur_mailOrId'] = $id_assoc;\n $r_POST['destinataire_mailOrId'] = $r_POST['mail'];\n $r_POST['emeteur_orga'] = 'assoc';\n $r_POST['date_envoi'] = date('Y-m-d H:i:s');\n $r_POST['status'] = 'non-lu';\n $ok = false;\n\n\n if(is_numeric($r_POST['mail'])){\n //on envoi en interne une invite\n\n unset($r_POST['mail']);\n\n $r_POST['contenu'] = 'Bonjour,<br/>\n Nous serions très heureux de pouvoir vous compter parmi nous et vous invitons donc à rejoindre notre Association ! Pour en savoir plus sur nos activités n\\'hésitez pas à visiter <a href=\"'.$this->generateUrl('racine_assoc',['orga'=>'assoc','slug'=>$slug],true).'\">notre page</a> !<br/>\n A bientôt !';\n\n if($contactModel->insert($r_POST,false)){\n $ok = true;\n }\n }else {\n unset($r_POST['mail']);\n\n\n $r_POST['contenu'] = 'Bonjour, <br/>\n Nous serions très heureux de pouvoir vous compter parmi nous ! Pour en savoir plus sur nos activités n\\'hésitez pas à visiter <a href=\"'.$this->generateUrl('racine_assoc',['orga'=>'assoc','slug'=>$slug],true).'\">notre page</a> !<br/>\n Cependant, vous devez au préalable être inscrit sur le site.<br/>\n <a href=\"'.$this->generateUrl('racine_inscriptForm',[],true).'\">Cliquez ici</a> pour vous inscrire et devenir aussitôt un de nos membres !<br/>\n A bientôt !';\n\n $contactModel = new ContactModel;\n $contactModel->insert($r_POST,false);\n $mail = new PHPMailer();\n $mail->CharSet = \"utf8\";\n //$mail->SMTPDebug = 3; // Enable verbose debug output\n $mail->isMail();\n $mail->setFrom('Webmaster@as-co-ma.fr', 'Mailer');\n $mail->addAddress($r_POST['destinataire_mailOrId'], 'exemple@example.com');\n $mail->addReplyTo('no-reply@as-co-ma', 'Information');\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = $r_POST['objet'];\n $mail->Body = $r_POST['contenu'];\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n if($mail->send()) {\n $ok = true;\n }\n }\n if($ok){\n $confirmation = 'L\\'invitation a bien été envoyée';\n }else {\n $confirmation = 'L\\'invitation n\\'a pas pu être envoyée suite à un problème technique';\n }\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'confirmation'=>$confirmation]);\n }else {\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'error'=>$error]);\n }\n\n }else {\n\n $error['mail']= 'Merci de saisir un mail';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'error'=>$error]);\n\n }\n\n }\n }else{\n $this->redirectToRoute('racine_form');\n }\n }", "public function enviarMensaje($correo, $nombre, $texto, $img) {\n\n\n if ($this->email and $this->email->getMailer() and $correo) {\n\n $message = $this->email->createMessage('Mensaje a Fidel(AtencionOnline)')\n ->setFrom(array($this->remitente => 'AtencionOnline'))\n ->setTo(array($correo))\n ->setBody(\"Nombre: $nombre<br>Mensaje: $texto\", 'text/html');\n if ($img)\n $message->attach(\\Swift_Attachment::fromPath($img));\n $this->email->getMailer()->send($message);\n }\n }", "function sendNotificationEmail($kind, $name, $email, $picture_id)\n{\n if ($kind == \"comment\")\n {\n $subject = 'New comment on your picture!';\n $sentence_1 = 'Someone left a comment on your picture! ';\n }\n\n $to = $email;\n $message = '\n \n Hello '.$name.'!\n '.$sentence_1.'\n \n Click here to check it:\n http://localhost:8100//index.php?view=picture&id='.$picture_id.'\n \n ';\n \n $headers = 'From:noreply@camagru.com' . \"\\r\\n\";\n mail($to, $subject, $message, $headers);\n}", "function email_conferencia($id){\r\n $this->db->trans_start();\r\n\r\n $query = $this->db->select('email_user') //busco el email del user que registro el evento.\r\n ->where('id_evento', $id)\r\n ->get('evento');\r\n \r\n log_message('ERROR', 'llego a email_conferencia con id -->'.$id);\r\n \r\n if ($query->num_rows() > 0) \r\n {\r\n $row = $query->row(); \r\n $this->db->trans_complete(); \r\n \r\n //$email = $this->email_evento($row->registrado_por); //llega el nombre de quien registra\r\n log_message('ERROR', 'email_conferencia envio link a correo -->'.$email);\r\n \r\n return $row->email_user;\r\n } \r\n else \r\n {\r\n $this->db->trans_complete();\r\n log_message('ERROR', 'momv->email_conferencia eno encuentra correo ');\r\n return FALSE;\r\n }\r\n\r\n $this->db->trans_complete();\r\n }", "public static function setNewMessageOnFriend($idUser,$texte,$image,$idDest) {\n\n\t\t\t$em = dbconnection::getInstance()->getEntityManager() ;\n\n\t\t\t$messageRepository = $em->getRepository('message');\n\t\t\t$utilisateurRepository = $em->getRepository('utilisateur');\n\n\t\t \t$utilisateur = $utilisateurRepository->findOneById($idUser);\n\t\t \t$destinataire = $utilisateurRepository->findOneById($idDest);\n\n\t\t\t$newMessage = new message;\n\t\t\t$newPost = new post;\n\n\t\t\t$newPost->texte = $texte;\n\t\t\t$newPost->image = $image;\n\t\t\t$newPost->date = new DateTime();\n\n\t\t\t$em->persist($newPost);\n\t\t\t$em->flush();\n\n\t\t\t$newMessage->post = $newPost;\n\t\t\t$newMessage->emetteur = $utilisateur;\n\t\t\t$newMessage->parent = $utilisateur;\n\t\t\t$newMessage->destinataire = $destinataire;\n\t\t\t$newMessage->aime = 0;\n\n\t\t\t$em->persist($newMessage);\n\t\t\t$em->flush();\n\n\t\t\treturn $newMessage; \n\t}", "public function store(Request $request)\n {\n \n if($request->isMethod('post')){\n\n $chauffeur = new chauffeur();\n \n\n $chauffeur->NomchauffTaxi=$request->input('NomChof');\n $chauffeur ->PrechauffTaxi = $request->input('PrenomChof');\n $chauffeur->Sexe = $request->input('SexeChof');\n $chauffeur ->AdrChauffTaxi = $request->input('AdresseChof');\n $chauffeur ->CategoriPermis = $request->input('CategorieChof');\n $chauffeur ->Numero = $request->input('NumeroChof');\n $chauffeur ->Identifiant = $request->input('EmailChof');\n $chauffeur ->Password = $request->input('PasswordChof');\n\n\n $chauffeur ->photo = $request->PhotoChof->store('image');\n \n //if($request->hasFile('permis')){\n \n $chauffeur ->permis = $request->PermisChof->store('image');\n \n\n $chauffeur->save();\n\n $attribution = new attribution();\n\n $attribution ->CodeChauffTaxi = $chauffeur->id;\n $attribution ->CodeTaxi= $request->input('TaxiChof');\n $attribution ->dateAttrib = date(\"Y-m-d H:i:s\");\n\n\n //dd($attribution);\n $attribution->save();\n \n }\n\n$msg=\"inscription en cours\";\n $mailable= new MessageCreated($chauffeur ->NomchauffTaxi,$chauffeur ->Identifiant,$msg) ; \nMail::to('pascaldaf2016@gmail.com')->send($mailable); \n\nsession()->flash('message','Chauffeur a été créer avec succès!!!');\n\n return redirect('/Chauffeurs');\n }", "function new_mail()\n\t{\n\t\t\t\n\t\tif($this->redux_auth->logged_in()) {\n\t\t\t$profile=$this->redux_auth->profile();\n\t\t\t$user_id=$profile->id;\n\t\t}\telse {\n $this->session->set_userdata('error_message', 'Acceso a zona no habilitada');\n redirect(site_url(), 'Location'); \n exit();\n\t\t}\t\t\t\t\n\t\t\t\n\t\tif($this->input->post('action') && $this->input->post('action')==\"send\") {\n\n\t\t\t$this->load->library('comunicacion');\n\t\t\t\n\t\t\t$tipo_comunicacion = $this->input->post('comm_type');\n\t\t\tif(!isset($tipo_comunicacion) || $tipo_comunicacion == '') $tipo_comunicacion = '1';\n\t\t\t\n\t\t\t$registro = array(\n\t 'subject' => $this->input->post('subject'),\n\t 'from' => $this->config->item('email_from'),\n\t 'type' => 5,\n\t //'destination_text' => $this->input->post('destination'),\n\t 'content' => $this->input->post('content'),\n\t 'active' => 1,\n\t 'create_user' => $this->session->userdata('user_id'),\n\t 'create_ip' => $this->session->userdata('ip_address'),\n\t 'create_time' => date(DATETIME_DB)\n\t );\n\t\t\t\n\t\t\t\n\t\t\tif($this->comunicacion->send_general_notification($registro, $tipo_comunicacion)) {\n\t\t\t\t$this->session->set_userdata('info_message', 'Mensaje creado.');\n\t\t\t} else {\n\t\t\t\t$this->session->set_userdata('error_message', 'Error en la creacion del mensaje.');\n\t\t\t}\n\t\t\t\n redirect(site_url('notifications/new_mail'), 'Location'); \n exit();\n\t\t}\n\n\t\t$this->load->library('ckeditor');\n\t\t$this->load->helper('ckeditor');\n\t\t\n\t\t//$menu=array('menu' => $this->app_common->get_menu_options());\n\t\t//print(\"<pre>\");print_r($menu);print(\"</pre>\");\n\t\t//$this->session->set_userdata('message',\"asasassa\");\n\t\t//print_r($this->session->all_userdata());\n\t\t$data=array(\n\t\t\t'meta' => $this->load->view('meta', '', true),\n\t\t\t'header' => $this->load->view('header', array('enable_menu' => $this->redux_auth->logged_in()), true),\n\t\t\t'menu' => $this->load->view('menu', '', true),\n\t\t\t'footer' => $this->load->view('footer', '', true),\n\t\t\t'info_message' => $this->session->userdata('info_message'),\n\t\t\t'error_message' => $this->session->userdata('error_message')\n\t\t);\n\t\t$this->session->unset_userdata('info_message');\n\t\t$this->session->unset_userdata('error_message');\n\t\t\n\t\t$editors_code = $this->load->view('editor/main', array('textbox_id' => 'content', 'style' => 'width:100%'), true);\n\t\t//$contenido = $this->load->view('notifications/new_mail', array('editors_code' => $editors_code), true);\n\t\t\n\t\t//print_r($this->redux_auth->profile());\n\t\t$data['editors_code']=$editors_code;\n\t\t$data['page']='notifications/new_mail';\n\t\t$profile=$this->redux_auth->profile();\n\t\t$data['profile']=$profile;\n $this->load->view('main', $data);\n\t\t\t\t\n\n\t\t\t\t\t\t\t\t//print\t\t($this->redux_auth->logged_in());\t\t\n\t}", "function enviar_mensaje($con, $username, $password, $mobile, $emailadd, $identificacion, $matricula, $codigo_activacion, $tipo_usuario)\r\n{\r\n $mail = new PHPMailer(true);\r\n $mail->CharSet = \"UTF-8\";\r\n\r\n try {\r\n//Server settings\r\n $mail->SMTPDebug = 0; // Enable verbose debug output\r\n $mail->isSMTP(); // Send using SMTP\r\n\r\n //$mail->Helo = \"smtp.gmail.com\"; //Muy importante para que llegue a hotmail y otros\r\n $mail->Host = \"smtp.live.com\"; // Set the SMTP server to send through\r\n $mail->SMTPAuth = true; // Enable SMTP authentication\r\n $mail->Username = 'commer.colombia@hotmail.com'; // SMTP username\r\n $mail->Password = 'commer123'; // SMTP password\r\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` also accepted\r\n $mail->Port = 587; // TCP port to connect to\r\n\r\n//Recipients\r\n $mail->setFrom('commer.colombia@hotmail.com', 'Commer');\r\n $mail->addAddress($emailadd); // Add a recipient\r\n //$mail->addAddress('ellen@example.com'); // Name is optional\r\n //$mail->addReplyTo('info@example.com', 'Information');\r\n //$mail->addCC('cc@example.com');\r\n //$mail->addBCC('bcc@example.com');\r\n\r\n// Attachments\r\n\r\n//$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments\r\n //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name\r\n\r\n $base_url = \"http://localhost/ionic-php-mysql/\";\r\n\r\n $mail->isHTML(true); // Set email format to HTML\r\n $mail->Subject = 'Verificación de correo Commer';\r\n $mail->Body = '<p>Hola ' . $username . ' <br/> <br/> ¡Por favor! ingrese al link para verificar su cuenta de correo y poder ingresar al aplicativo, ¡gracias! . <br/> <br/> <a href=\"' . $base_url . 'verificacion_email.php?activation_code=' . $codigo_activacion . '\">' . $base_url . 'verificacion_email.php?activation_code=' . $codigo_activacion . '</a>';\r\n $mail->send();\r\n //echo 'El mensaje se ha enviado';\r\n\r\n if ($tipo_usuario == '2') {\r\n\r\n $sql = \"INSERT INTO clientes (id_rol, nombre_cli, clave_cli, telefono_cli, correo_cli, identificacion_cli, matricula_mercantil_cli, estado_correo_cli, codigo_activacion_cli)\r\n VALUES (2,'$username', '$password', '$mobile', '$emailadd', '$identificacion', '$matricula','false','$codigo_activacion')\";\r\n\r\n if ($con->query($sql) === true) {\r\n\r\n $response = 'El mensaje se ha enviado';\r\n\r\n } else {\r\n\r\n $response = \"Error: \" . $sql . \"<br>\" . $db->error;\r\n\r\n }\r\n\r\n echo json_encode($response);\r\n\r\n } else {\r\n\r\n $sql = \"INSERT INTO usuarios (id_rol, nombre_usu, clave_usu, telefono_usu, correo_usu, estado_correo_usu, codigo_activacion_usu)\r\n VALUES (3, '$username', '$password', '$mobile', '$emailadd','false','$codigo_activacion')\";\r\n\r\n if ($con->query($sql) === true) {\r\n\r\n $response = 'El mensaje se ha enviado';\r\n\r\n } else {\r\n\r\n $response = \"Error: \" . $sql . \"<br>\" . $db->error;\r\n }\r\n\r\n echo json_encode($response);\r\n\r\n }\r\n\r\n } catch (Exception $e) {\r\n //echo \"El mensaje no se pudo enviar: {$mail->ErrorInfo}\";\r\n $response = \"El mensaje no se pudo enviar: {$mail->ErrorInfo}\";\r\n echo json_encode($response);\r\n\r\n }\r\n\r\n}", "function enviar_contacto(){\n $this->asignar_ingreso();\n $nombre_sede = $this->sede;\n\n $resultado = $this->datoSede($nombre_sede);\n $cuerpo =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br /><br />\n\t\t<u>Datos de Entrada:</u><br />\";\n $cuerpo .=\"<br />\";\n $cuerpo .= \"<strong>Nombre Completo: </strong>\".utf8_decode($this->nombre).\"<br />\" ;\n $cuerpo .= \"<strong>Número de telefono: </strong>\".$this->telefono.\"<br />\" ;\n $cuerpo .= \"<strong>E-mail: </strong>\".$this->email.\"<br />\" ;\n $cuerpo .= \"<strong>Mensaje: </strong>\".$this->comentario.\"<br />\";\n $cuerpo .= \"<br />\";\n $cuerpo .= \"---- Fin ----\";\n $cuerpo .= \"<br />\";\n $subject= \"Contacto Web Prevaler\";\n $subject2= \"Contacto Web Prevaler\";\n $basemailfor=$resultado['email_sede'];\n //$basemailfor=\"sales@nickautoglass.com\";\n $basemailfrom = $this->email;\n $respuesta =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br />\n\t\t<strong>Saludos Sr(a).: $this->nombre $this->apellido</strong><br /><br />\n\t\tNosotros hemos recibido su mensaje, nuestro departamento de atención al cliente le responderá lo más pronto posible<br />\n\t\tGracias por contactar a Prevaler.<br />\n\t\tPrevaler<br /><br />\n\t\tTel&eacute;fonos: <br/>\n\t\t\".$resultado['telefono_sede'].\"<br />\n\t\tTwitter: <a href='https://twitter.com/Prevaler_VE'>@Prevaler_VE</a><br />\n\t\tInstagram: <a href='https://www.instagram.com/prevaler_ve/'>@prevaler_ve</a><br />\n\t\t\".$resultado['email_sede'].\"\n\t\t<br /><br />\n\t\tAtentamente,<br />\n\t\tClínica Prevaler.\";\n $this->mensaje=\"<strong>&iexcl;Excelente!</strong> Su Mensaje ha sido enviado exitosamente.\";\n\n $mail = new PHPMailer();\n $mail->From = $basemailfrom;\n $mail->FromName = utf8_decode($subject);\n $mail->AddAddress($basemailfor, $this->nombre.\" \".$this->apellido);\n $mail->Subject = utf8_decode($subject);\n $mail->Body = $cuerpo;\n $mail->AltBody = $cuerpo;\n $exito = $mail->Send();\n\n $mail2 = new PHPMailer();\n $mail2->From = $basemailfor;\n $mail2->FromName = utf8_decode($subject2);\n $mail2->AddAddress($basemailfrom, $this->nombre.\" \".$this->apellido);\n $mail2->Subject = utf8_decode($subject2);\n $mail2->Body = $respuesta;\n $mail2->AltBody = $respuesta;\n $exito = $mail2->Send();\n }", "public function newUser () {\n if (!empty($_POST)) {\n $this->checkSignIn();\n\n if (empty($_SESSION['errors'])) {\n $date = date('Y-m-d');\n $bytes = openssl_random_pseudo_bytes(20);\n $this->registration_token = UtilsClass::generator(10);\n $sql = \"INSERT INTO users (avatar,\n cover,\n birthdate,\n email,\n nickname,\n location,\n password,\n creation_date,\n registration_token,\n activated,\n phone,\n username)\n VALUES (:avatar,\n :cover,\n :birthdate,\n :email,\n :nickname,\n :location,\n :password,\n :creation_date,\n :registration_token,\n 0,\n :phone,\n :username)\";\n $query = $this->bdd->prepare($sql);\n $query->bindParam(':avatar', $this->avatar);\n $query->bindParam(':cover', $this->cover);\n $query->bindParam(':birthdate', $this->birthdate);\n $query->bindParam(':email', $this->email);\n $query->bindParam(':nickname', $this->nickname, PDO::PARAM_STR);\n $query->bindParam(':location', $this->location, PDO::PARAM_STR);\n $query->bindParam(':password', $this->password, PDO::PARAM_STR);\n $query->bindParam(':creation_date', $date);\n $query->bindParam(':registration_token', $this->registration_token, PDO::PARAM_STR);\n $query->bindParam(':phone', $this->phone, PDO::PARAM_STR);\n $query->bindParam(':username', $this->username, PDO::PARAM_STR);\n $query->execute();\n $id = $this->bdd->lastInsertId();\n ThemeClass::create($id);\n\n $message = \"<!DOCTYPE html>\n <html>\n <head>\n <title>Mail confirmation TwittaWac</title>\n </head>\n <body>\n <p>Bonjour, voici le lien d'activation pour votre compte TweetaWac : </p>\n <a href='http://\".$_SERVER['HTTP_HOST'].URL.\"/users/validation.php?token=$this->registration_token&email=\".$this->email.\"'>Activer votre compte</a>\n </body>\n </html>\";\n UtilsClass::sendMail($this->email, $message);\n }\n }\n }", "public function getSenderPicUrl()\n {\n if (count($this->sender()->first()) > 0)\n return URL::to($this->sender->user_pic);\n else\n return URL::to('/img/profiles/default.png');\n }", "public function account() {\n\t\t\t// choix du layout\n\t\t\t$this->layout = 'default2';\n\t\t\t// si l'utilisateur appuie sur \"modifier\"\n\n\t\t\tif (!empty($this->request->data)) {\n\n\t\t\t\tif (!isset($this->request->data['User']['password'])) {\n\n\t\t\t\t\t$this->request->data['User']['id'] = $this->Auth->user('id');\n\t\t\t\t\t// récupération de l'utilisateur courant\n\t\t\t\t\t$this->User->id = $this->Auth->user('id');\n\n\t\t\t\t\t// validation des champs\n\t\t\t\t\tif ($this->User->validates()) {\n\t\t\t\t\t\t// vérification de la présence d'un avatar\n\t\t\t\t\t\tif (!empty($this->request->data['User']['avatarf']['tmp_name'])) {\n\t\t\t\t\t\t\t// création du chemin (ou récupération)\n\t\t\t\t\t\t\t// supposons qu'il y ait beaucoup d'utilisateur, on va mettre les images dans des\n\t\t\t\t\t\t\t// dossiers séparés 1 pour utilisateur 1 à 1000 etc etc\n\t\t\t\t\t\t\t$directory = IMAGES . 'avatars' . DS . ceil($this->User->id / 1000);\n\t\t\t\t\t\t\tif (!file_exists($directory)) {\n\t\t\t\t\t\t\t\t// si le dossier n'existe pas on le créer\n\t\t\t\t\t\t\t\tmkdir($directory, 0777);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// enfin on récupère l'image pour la mettre dans notre dossier\n\t\t\t\t\t\t\tmove_uploaded_file($this->request->data['User']['avatarf']['tmp_name'], $directory . DS . $this->User->id . '.jpg');\n\t\t\t\t\t\t\t// on modifie la colonne \"avatar\" de la tables users pour mettre la valeur 1\n\t\t\t\t\t\t\t$this->User->saveField('avatar', 1);\n\t\t\t\t\t\t\t$this->Session->destroy();\n\t\t\t\t\t\t\t$this->Session->write('Auth.User.avatari', $directory . DS . $this->User->id . '.jpg');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!empty($this->request->data['User']['mail'])) {\n\t\t\t\t\t\t\t$this->User->saveField(\n\t\t \t\t\t\t'mail', $this->request->data['User']['mail']\n\t \t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// on recharge les informations\n\t\t\t\t\t\t$user = $this->User->read();\n\n\t\t\t\t\t\t$this->Auth->login($user['User']);\n\n\t\t\t\t\t\t// on laisse un message de validation\n\t\t\t\t\t\t$this->Session->setFlash(__(\"Vos informations ont bien été modifiées\"), 'success');\n\n\t\t\t\t\t\t$user = $this->User->findById($this->Auth->user('id'));\n\t\t\t\t\t\t$this->set('user', $user);\n\t\t\t\t\t\t$this->redirect($this->referer());\n\t\t\t\t\t}\n\t\t\t\t} else {\n\n\t\t\t\t\t$user = $this->User->find('first', array(\n\t\t\t\t\t\t'conditions'=>array('id'=>$this->Auth->user('id'))\n\t\t\t\t\t));\n\n\t\t\t\t\t$this->User->create($this->request->data);\n\t\t\t\t\t// validation des champs\n\t\t\t\t\tif ($this->User->validates()) {\n\t\t\t\t\t\t// modification de la DB\n\t\t\t\t\t\t$this->User->create();\n\t\t\t\t\t\t$this->User->save(array(\n\t\t\t\t\t\t\t'id'=>$user['User']['id'],\n\t\t\t\t\t\t\t'active'=>1,\n\t\t\t\t\t\t\t'password'=>$this->Auth->password($this->request->data['User']['password']),\n\t\t\t\t\t\t\t'groups_id'=>$user['User']['groups_id'],\n\t\t\t\t\t\t\t'avatar'=>$user['User']['avatar']\n\t\t\t\t\t\t));\n\t\t\t\t\t\t$user = $this->User->read();\n\n\t\t\t\t\t\t$this->Auth->login($user['User']);\n\t\t\t\t\t\t// on laisse un petit message\n\t\t\t\t\t\t$this->Session->setFlash(__(\"Votre mot de passe a bien été modifié\"), 'success');\n\t\t\t\t\t\t$user = $this->User->findById($this->Auth->user('id'));\n\t\t\t\t\t\t$this->set('user', $user);\n\t\t\t\t\t\t// on redirige notre utilisateur\n\t\t\t\t\t\treturn $this->redirect($this->referer());\n\t\t\t\t\t}\n\n\t\t\t\t\t$user = $this->User->findById($this->Auth->user('id'));\n\t\t\t\t\t$this->set('user', $user);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// sinon on se contente d'afficher les informations de l'utilisateur\n\t\t\t\t$user = $this->User->findById($this->Auth->user('id'));\n\t\t\t\t$this->set('user', $user);\n\t\t\t\t$this->User->id = $this->Auth->user('id');\n\t\t\t\t$this->request->data = $this->User->read();\n\t\t\t\t$this->request->data['User']['password'] = array();\n\t\t\t}\n\t\t}", "function nouveau()\n {\n $data['scripts'] = array('jquery', 'bootstrap', 'lte', 'datepicker','cssMessagerie' );\n\n // Creation du bandeau\n $data['titre'] = array(\"Messagerie\", \"fas fa-envelope\");\n\n \n \n\n // si la session est null c'est que l'utilisateur n'est pas connecté donc retour à la page de login\n if(!isset($_SESSION['dataUser']))\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-sync\", $this->dir_login, null),\n array(\"Retour\", \"fas fa-sync\", $this->dir_retour, null),\n );\n }\n \n $data['ActiveConv'] = false;\n \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 $data['profils'] = $this->m_messagerie->get_all_profil();\n\n $this->form_validation->set_rules(\"inputMessage\",\"inputMessage\",\"required\");\n if($this->form_validation->run()){\n $data['id_profils'] = $this->input->post('id_profils');\n $data[\"message\"] = $this->input->post('inputMessage');\n $data['date'] = date(\"Y-m-d H:i:s\"); \n $this->m_messagerie->set_message($data['userId'],$data['id_profils'],$data['message'],$data['date']);\n var_dump($data['id_profils']);\n var_dump($data[\"message\"]);\n var_dump($data['date']);\n var_dump($data['userId']);\n //redirect($this->dir_controlleur);\n }\n \n\n // On charge les differents modules neccessaires a l'affichage d'une page\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/nouveau',$data);\n }", "public function submit() {\n\n $target_dir = \"upload-images/\";\n $filename = basename($_FILES[\"fileToUpload\"][\"name\"]);\n $target_file = $target_dir . $filename;\n $uploadOk = 1;\n $imageFileType = pathinfo($target_file, PATHINFO_EXTENSION);\n $recipient = $_POST['recipient'];\n $subject = $_POST['subject'];\n $message = $_POST['message'];\n $is_approved = $_POST['is_approved'];\n $status = $_POST['status'];\n $type = $_POST['type'];\n $action = $_POST['action'];\n\n $creator_IDno = Auth::user()->IDno;\n\n $insert = DB::table('announcementNotif')->insertGetId([\n 'creator_IDno' => $creator_IDno,\n 'recipient_userLevel' => $recipient,\n 'subject' => $subject,\n 'message' => $message,\n 'image' => $filename,\n 'is_approved' => $is_approved,\n 'status' => $status,\n 'type' => $type,\n 'created_at' => date('Y-m-d H:i:s')\n ]);\n \n DB::insert(\"INSERT INTO is_readTB ( announcementID, IDno, is_read, type ) (SELECT '$insert',IDno, '0', '$type' FROM users)\");\n\n // Check if image file is a actual image or fake image\n if (isset($_POST[\"submit\"])) {\n $check = getimagesize($_FILES[\"fileToUpload\"][\"tmp_name\"]);\n if ($check !== false) {\n echo \"File is an image - \" . $check[\"mime\"] . \".\";\n $uploadOk = 1;\n } else {\n echo \"File is not an image.\";\n $uploadOk = 0;\n }\n }\n // Check if file already exists\n if (file_exists($target_file)) {\n echo \"Sorry, file already exists.\";\n $uploadOk = 0;\n }\n // Check file size\n if ($_FILES[\"fileToUpload\"][\"size\"] > 500000) {\n echo \"Sorry, your file is too large.\";\n $uploadOk = 0;\n }\n // Allow certain file formats\n if ($imageFileType != \"jpg\" && $imageFileType != \"png\" && $imageFileType != \"jpeg\" && $imageFileType != \"gif\") {\n echo \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.\";\n $uploadOk = 0;\n }\n // Check if $uploadOk is set to 0 by an error\n if ($uploadOk == 0) {\n echo \"Sorry, your file was not uploaded.\";\n // if everything is ok, try to upload file\n } else {\n if (move_uploaded_file($_FILES[\"fileToUpload\"][\"tmp_name\"], $target_file)) {\n echo \"The file \" . basename($_FILES[\"fileToUpload\"][\"name\"]) . \" has been uploaded.\";\n } else {\n echo \"Sorry, there was an error uploading your file.\";\n }\n }\n return redirect()->action($action);\n }", "function envoyerLeLog()\r\n{\r\n // ----------------------------------\r\n // Construction de l'entête\r\n // ----------------------------------\r\n // On choisi généralement de construire une frontière générée aléatoirement\r\n // comme suit. (le document pourra ainsi etre attache dans un autre mail\r\n // dans le cas d'un transfert par exemple)\r\n $boundary = \"-----=\" . md5(uniqid(rand()));\r\n\r\n // Ici, on construit un entête contenant les informations\r\n // minimales requises.\r\n // Version du format MIME utilisé\r\n $header = \"MIME-Version: 1.0\\r\\n\";\r\n // Type de contenu. Ici plusieurs parties de type different \"multipart/mixed\"\r\n // Avec un frontière définie par $boundary\r\n $header .= \"Content-Type: multipart/mixed; boundary=\\\"$boundary\\\"\\r\\n\";\r\n $header .= \"\\r\\n\";\r\n\r\n // --------------------------------------------------\r\n // Construction du message proprement dit\r\n // --------------------------------------------------\r\n\r\n // Pour le cas, où le logiciel de mail du destinataire\r\n // n'est pas capable de lire le format MIME de cette version\r\n // Il est de bon ton de l'en informer\r\n // REM: Ce message n'apparaît pas pour les logiciels sachant lire ce format\r\n $msg = \"Je vous informe que ceci est un message au format MIME 1.0 multipart/mixed.\\r\\n\";\r\n\r\n // ---------------------------------\r\n // 1ère partie du message\r\n // Le texte\r\n // ---------------------------------\r\n // Chaque partie du message est séparée par une frontière\r\n $msg .= \"--$boundary\\r\\n\";\r\n\r\n // Et pour chaque partie on en indique le type\r\n $msg .= \"Content-Type: text/plain; charset=\\\"utf-8\\\"\\r\\n\";\r\n // Et comment il sera codé\r\n $msg .= \"Content-Transfer-Encoding:8bit\\r\\n\";\r\n // Il est indispensable d'introduire une ligne vide entre l'entête et le texte\r\n $msg .= \"\\r\\n\";\r\n // Enfin, on peut écrire le texte de la 1ère partie\r\n $msg .= \"Ceci est un mail avec un fichier joint\\r\\n\";\r\n $msg .= \"\\r\\n\";\r\n\r\n // ---------------------------------\r\n // 2nde partie du message\r\n // Le fichier\r\n // ---------------------------------\r\n // Tout d'abord lire le contenu du fichier\r\n $file = 'GSB2020.log';\r\n $fp = fopen($file, 'rb'); // b c'est pour les windowsiens\r\n $attachment = fread($fp, filesize($file));\r\n fclose($fp);\r\n\r\n // puis convertir le contenu du fichier en une chaîne de caractères\r\n // certe totalement illisible mais sans caractères exotiques\r\n // et avec des retours à la ligne tout les 76 caractères\r\n // pour être conforme au format RFC 2045\r\n $attachment = chunk_split(base64_encode($attachment));\r\n\r\n // Ne pas oublier que chaque partie du message est séparée par une frontière\r\n $msg .= \"--$boundary\\r\\n\";\r\n // Et pour chaque partie on en indique le type\r\n $msg .= \"Content-Type: image/gif; name=\\\"$file\\\"\\r\\n\";\r\n // Et comment il sera codé\r\n $msg .= \"Content-Transfer-Encoding: base64\\r\\n\";\r\n // Petit plus pour les fichiers joints\r\n // Il est possible de demander à ce que le fichier\r\n // soit si possible affiché dans le corps du mail\r\n $msg .= \"Content-Disposition: inline; filename=\\\"$file\\\"\\r\\n\";\r\n // Il est indispensable d'introduire une ligne vide entre l'entête et le texte\r\n $msg .= \"\\r\\n\";\r\n // C'est ici que l'on insère le code du fichier lu\r\n $msg .= $attachment . \"\\r\\n\";\r\n $msg .= \"\\r\\n\\r\\n\";\r\n\r\n // voilà, on indique la fin par une nouvelle frontière\r\n $msg .= \"--$boundary--\\r\\n\";\r\n\r\n $destinataire = 'gsb2020@free.fr';\r\n $expediteur = 'ne-pas-repondre@gsb2020.org';\r\n $reponse = 'gsb2020@free.fr';\r\n try {\r\n $ret = mail($destinataire, 'GSB2020 : transmission du log', $msg,\r\n \"Reply-to: $reponse\\r\\nFrom: $expediteur\\r\\n\" . $header);\r\n if ($ret == 1) {\r\n unlink('gsb2020.log');\r\n return true;\r\n }\r\n }\r\n catch (Exception $e) {\r\n addLogEvent(\"Erreur d'envoi du log à gsb2020@free.fr\");\r\n }\r\n return false;\r\n}", "public function insert(){\n $save = mysql_query(\"INSERT INTO users (id_city, id_rol, image, username, lastname_1, lastname_2, gender, birthday, email, password, street, number_home,location, zip) \n VALUES ('\".$this->city.\"', '2', '\".$this->image.\"', '\".$this->username.\"', '\".$this->lastname_1.\"', '\".$this->lastname_2.\"', '\".$this->gender.\"', '\".$this->birthday.\"', '\".$this->email.\"', '\".md5($this->password).\"', '\".$this->street.\"', '\".$this->number.\"', '\".$this->location.\"', '\".$this->zip.\"')\")or die(mysql_error());\n if($save == true){ \n\n //-- If the insert is success, we send a email to user \n require_once('mail/class.phpmailer.php');\n require_once('mail/class.smtp.php');\n\n //PHPMailer Object\n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->SMTPAuth = true;\n $mail->SMTPSecure = \"ssl\";\n $mail->Host = \"smtp.gmail.com\"; \n $mail->Port = 465;\n $mail->Username = \"erandivilla92@gmail.com\";\n $mail->Password = \"makeIT4w38_m3\";\n \n //From email address and name\n $mail->From = \"erandivilla92@gmail.com\";\n $mail->FromName = \"IA Sistema Web\";\n\n //To address and name\n $mail->addAddress($this->email, iconv('UTF-8', 'ISO-8859-1', $this->username.\" \".$this->lastname_1)); \n \n //Send body text\n $mail->isHTML(true);\n \n $mail->Subject = \"Accesos al sistema.\";\n $mail->Body = iconv('UTF-8', 'ISO-8859-1', \"<p><strong>Gracias por registrarse!</strong> A continuación le proporcionamos los accesos al sistema: </p>\n <p><strong>Email: </strong>\".$this->email.\"</p>\n <p><strong>Password: </strong>\".$this->password.\"</p>\n\n <h5>Cualquier detalle o sugerencia, póngase en contacto con nosotros.</h5>\");\n $mail->AltBody = \"This is the plain text version of the email content\";\n \n if(!$mail->send()){\n header(\"Location:register.php?status=error_envio\");\n die();\n }else{\n header(\"Location:../index.php?status=ok\");\n die();\n }\n\n }else{\n\n //-- If the insert fails, the image we got on the server, now will be deleted\n unlink('../../'.$this->image);\n header(\"Location:register.php?status=error\");\n die();\n }\n\n }", "function biller_registration() {\n\t\t$user_id = $_REQUEST['user_id'];\n\t\t$company_name = $_REQUEST['company_name'];\n\t\t$company_reg_no = $_REQUEST['company_reg_no'];\n\t\t$rc_no = $_REQUEST['rc_no'];\n\t\t$tin_no = $_REQUEST['tin_no'];\n\t\t$bussiness_phone = $_REQUEST['bussiness_phone'];\n\t\t$bussiness_address = $_REQUEST['bussiness_address'];\n\t\t$biller_name = $_REQUEST['biller_name'];\n\t\t$biller_email = $_REQUEST['biller_email'];\n\t\t$biller_category_id = $_REQUEST['biller_category_id'];\n\t\t$biller_reg_type = '2';\n\t\t$image = $_FILES['bussiness_logo']['name'];\n\t\t$current_date = date(\"Y-m-d h:i:sa\");\n\t\t$biller_status = '2';\n\t\t//--1 approved, 2- pending\n\t\tif (!empty($company_name) && ($company_reg_no) && !empty($rc_no) && !empty($tin_no) && !empty($bussiness_phone) && !empty($biller_name) && !empty($biller_name) && !empty($_FILES['bussiness_logo']['name']) && !empty($user_id)) {\n\t\t\t$biller_records = $this -> conn -> get_table_row_byidvalue('biller_details', 'biller_email', $biller_email);\n\t\t\tif (empty($biller_records)) {\n\n\t\t\t\t$user_image = '';\n\t\t\t\tif ($_FILES['bussiness_logo']['name']) {\n\t\t\t\t\t$user_image = $_FILES['bussiness_logo']['name'];\n\t\t\t\t}\n\t\t\t\t$attachment = $_FILES['bussiness_logo']['name'];\n\n\t\t\t\tif (!empty($attachment)) {\n\t\t\t\t\t$file_extension = explode(\".\", $_FILES[\"bussiness_logo\"][\"name\"]);\n\t\t\t\t\t$new_extension = strtolower(end($file_extension));\n\t\t\t\t\t$today = time();\n\t\t\t\t\t$custom_name = \"bussiness_logo\" . $today;\n\t\t\t\t\t$file_name = $custom_name . \".\" . $new_extension;\n\n\t\t\t\t\tif ($new_extension == 'png' || $new_extension == 'jpeg' || $new_extension == 'jpg' || $new_extension == 'bmp') {\n\t\t\t\t\t\tmove_uploaded_file($_FILES['bussiness_logo']['tmp_name'], \"../uploads/biller_company_logo/\" . $file_name);\n\t\t\t\t\t\t$biller_company_logo = $file_name;\n\t\t\t\t\t}\n\t\t\t\t\t$original_pass = rand('10000000', '99999999');\n\t\t\t\t\t$biller_pass = md5($original_pass);\n\t\t\t\t\t$biller_insert = $this -> conn -> insertnewrecords('biller_details', 'biller_category_id,biller_name,biller_email,company_reg_no,rc_no,tin_no,biller_address,biller_contact_no,biller_company_name,biller_company_logo,biller_created_date,biller_status,biller_reg_type,biller_password,biller_original_pass', '\"' . $biller_category_id . '\",\"' . $biller_name . '\",\"' . $biller_email . '\",\"' . $company_reg_no . '\",\"' . $rc_no . '\",\"' . $tin_no . '\",\"' . $bussiness_address . '\",\"' . $bussiness_phone . '\",\"' . $company_name . '\",\"' . $biller_company_logo . '\",\"' . $current_date . '\",\"' . $biller_status . '\",\"' . $biller_reg_type . '\",\"' . $biller_pass . '\",\"' . $original_pass . '\"');\n\n\t\t\t\t\tif (!empty($biller_insert)) {\n\t\t\t\t\t\t$data_admin['biller_id'] = $biller_insert;\n\t\t\t\t\t\t$data_admin['biller_status'] = 2;\n\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $user_id, $data_admin);\n\t\t\t\t\t\t$post = array('status' => \"true\", \"message\" => \"Biller added successfully, please wait for admin approval.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Technical server error\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$post = array('status' => \"false\", \"message\" => \"These Bussiness email already exist\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array('status' => \"false\", \"message\" => \"Missing parameter\", 'company_name' => $company_name, 'company_reg_no' => $company_reg_no, 'rc_no' => $rc_no, 'tin_no' => $tin_no, 'bussiness_phone' => $bussiness_phone, 'biller_name' => $biller_name, 'biller_email' => $biller_email, 'image' => $image, 'user_id' => $user_id, 'biller_category_id' => $biller_category_id);\n\t\t}\n\t\techo $this -> json($post);\n\t}", "function enviar_mail_mov($datos)\r\n{\r\n\tglobal $db,$titulo_pagina;\r\n\t//ver el origen y destino\r\n\t$sql = \"select temp1.nombre as origen, temp1.id_deposito as id_origen,temp2.nombre as destino, temp2.id_deposito as id_destino from movimiento_material join depositos as temp1 on (temp1.id_deposito = deposito_origen) join depositos as temp2 on (temp2.id_deposito = deposito_destino) where id_movimiento_material = \".$datos['Id'];\r\n $result = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail\");\r\n\r\n $origen = $result->fields['origen'];\r\n\t$destino = $result->fields['destino'];\r\n $id_origen = $result->fields['id_origen'];\r\n $id_destino = $result->fields['id_destino'];\r\n\r\n\t//buscar el responsable del deposito origen\r\n\t$sql = \"select usuarios.mail from depositos join responsable_deposito using (id_deposito) join usuarios using (id_usuario) where id_deposito = \".$id_origen;\r\n\t$result = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail\");\r\n\t$responsable_origen = array();\r\n\twhile (!$result->EOF) {\r\n\t\t$responsable_origen[] = $result->fields['mail'];\r\n\t\t$result->MoveNext();\r\n\t}\r\n\r\n\t//buscar el responsable del deposito origen\r\n\t$sql = \"select usuarios.mail from depositos join responsable_deposito using (id_deposito) join usuarios using (id_usuario) where id_deposito = \".$id_destino;\r\n $result = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail\");\r\n\t$responsable_destino = array();\r\n\twhile (!$result->EOF) {\r\n\t\t$responsable_destino[] = $result->fields['mail'];\r\n\t\t$result->MoveNext();\r\n\t}\r\n\r\n\t//tengo que prepara el \"para\" para enviar el mail\r\n\t//el problema es que se pueden repetir los mail\r\n\t//armo un arreglo con los mail\r\n\t$mail_para = array ();\r\n //la variable \"$responsable_origen\" es arreglo por eso hago un merge para que me quede solo un arreglo\r\n $mail_para= array_merge($mail_para,$responsable_origen);\r\n //la variable \"$responsable_destino\" es arreglo por eso hago un merge para que me quede solo un arreglo\r\n $mail_para= array_merge($mail_para,$responsable_destino);\r\n //saco el tamaño del arreglo por que no se como me quedo despues de los merge\r\n $i=sizeof($mail_para);\r\n\t//$para = \"juanmanuel@coradir.com.ar,\".join(\",\",$responsable_origen).\",\".join(\",\",$responsable_destino);\r\n\tif($origen==\"New Tree\" || $destino==\"New Tree\"){\r\n\t $mail_para[$i]=\"cinthia@newtree.com.ar\";\r\n\t $i++;\r\n\t $mail_para[$i]=\"nestor@newtree.com.ar\";\r\n\t $i++;\r\n\t //$para.=\",cinthia@newtree.com.ar,nestor@newtree.com.ar\";\r\n\t}\r\n\t//agregar responsables\r\n\r\n\t$asunto = \"$titulo_pagina Nº: \".$datos['Id'];\r\n\t$contenido = \"$titulo_pagina Nº \".$datos['Id'].\".\\n\";\r\n\t$contenido.= \"Depósito de Origen: \".$origen.\".\\n\";\r\n\t$contenido.= \"Depósito de Destino: \".$destino.\".\\n\";\r\n\t$contenido.= \"Autorizado por \".$datos['Usuario'].\" el día \".fecha($datos[\"Fecha\"]).\".\\n\";\r\n\t$contenido.= \"\\nDetalle del movimiento: \\n\";\r\n\r\n\r\n\t//obtener el detalle del movimiento\r\n\t$sql = \"select cantidad,descripcion from detalle_movimiento where id_movimiento_material = \".$datos['Id'];\r\n $result = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail\");\r\n\r\n $contenido.= \"Cantidad | Descripción \\n\";\r\n $contenido.= \"--------------------------------------------------------------\\n\";\r\n\r\n while (!$result->EOF) {\r\n \t$contenido.=\" \".$result->fields['cantidad'].\" \".$result->fields['descripcion'].\"\\n\";\r\n \t$result->MoveNext();\r\n }\r\n\r\n\t//agrego datos si tiene logistica integrada\r\n\tif ($datos['id_logistica_integrada']!=''){\r\n\t\t//todo lo que sigue es para el para\r\n\r\n\t\t$mail_para[$i]=\"valentino@coradir.com.ar\";\r\n\t\t$i++;\r\n\t\t$mail_para[$i]=\"pietragalla@coradir.com.ar\";\r\n\t\t$i++;\r\n\t\t//$para = $para. \" valentino@coradir.com.ar\";\r\n\t\t//$para = $para. \", pietragalla@coradir.com.ar\";\r\n\t\t$sql = \"select * from\r\n\t\t\t\t (select (nombre|| ' ' ||apellido) as usuario, mail from sistema.usuarios)as lado_a\r\n\t\t\t\tjoin\r\n\t\t\t\t (select usuario from mov_material.log_movimiento where id_movimiento_material = \".$datos['Id'].\"\r\n\t\t\t\t group by usuario\r\n\t\t\t\t )as lado_b\r\n\t\t\t\tusing (usuario)\";\r\n \t$result_mail = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail (consulta trae mail a partir de log)\");\r\n\r\n \twhile (!$result_mail->EOF){\r\n \t\t//$para = $para. \", \" . $result_mail->fields['mail'];\r\n \t\t$mail_para[$i]=$result_mail->fields['mail'];\r\n \t\t$i++;\r\n \t\t$result_mail->MoveNext();\r\n \t}\r\n\r\n \t//saco el tamaño del arreglo para asegurarme que esta en la posicion correcta para seguir\r\n\t\t$i=sizeof($mail_para);\r\n\r\n \t//si esta asociado a una licitacion\r\n\t\tif ($datos['asociado_a']=='lic') {\r\n\t\t\t$sql = \"select mail as mail_patrocinador, mail_lider from (\r\n\t\t\t\t\tselect mail as mail_lider, patrocinador from\r\n\t\t\t\t\t(\r\n\t\t\t\t\tselect id_licitacion, lider, patrocinador from\r\n\t\t\t\t\t (select id_licitacion from mov_material.movimiento_material where id_movimiento_material = \".$datos['Id'].\") as a\r\n\t\t\t\t\tjoin\r\n\t\t\t\t\t licitaciones.licitacion\r\n\t\t\t\t\tusing (id_licitacion)\r\n\t\t\t\t\t)as b\r\n\t\t\t\t\tleft join sistema.usuarios\r\n\t\t\t\t\ton id_usuario = lider\r\n\t\t\t\t\t)as c\r\n\t\t\t\t\tleft join sistema.usuarios\r\n\t\t\t\t\ton id_usuario = patrocinador\";\r\n\t\t $result_mail = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail (consulta trae mail a partir de log)\");\r\n\t\t if ($result_mail->fields['mail_lider']!=''){\r\n\t\t \t$mail_para[$i]=$result_mail->fields['mail_lider'];\r\n\t\t\t\t$i++;\r\n\t\t \t//$para = $para. \", \".$result_mail->fields['mail_lider'];\r\n\t\t }\r\n\t\t if ($result_mail->fields['mail_patrocinador']!=''){\r\n\t\t \t$mail_para[$i]=$result_mail->fields['mail_patrocinador'];\r\n\t\t\t\t$i++;\r\n\t\t \t//$para = $para. \", \".$result_mail->fields['mail_patrocinador'];\r\n\t\t }\r\n\t\t}\r\n\r\n\t\t//si esta asociado a un caso\r\n\t\tif ($datos['asociado_a']=='caso'){\r\n\t\t\t$mail_para[$i]=\"estrada@coradir.com.ar\";\r\n\t\t\t$i++;\r\n\t\t\t$mail_para[$i]=\"dcristian@coradir.com.ar\";\r\n\t\t\t$i++;\r\n\t\t\t//$para = $para. \", estrada@coradir.com.ar, dcristian@coradir.com.ar \";\r\n\t\t}\r\n\r\n\t\t//todo lo que sigue es para el contenido\r\n\t\t$sql = \"select * from mov_material.logistica_integrada where id_logistica_integrada = \". $datos['id_logistica_integrada'];\r\n\t\t$result = $db->Execute($sql) or die($db->ErrorMsg().\"<br>Error Enviando mail (consulta trae mail a partir de log)\");\r\n\t\t$contenido.=\"\\n\\n\\n\";\r\n\t\t$contenido.=\"----------------------- Logistica Integrada -------------------\\n\\n\";\r\n\t\t$contenido.=\"Dirección: \". $result->fields['direccion'] .\"\\n\";\r\n\t\t$contenido.=\"Fecha de envio: \". fecha ($result->fields['fecha_envio_logis']) .\"\\n\";\r\n\t\t$contenido.=\"Contacto: \". $result->fields['contacto'] .\"\\n\";\r\n\t\t$contenido.=\"Telefono: \". $result->fields['telefono'] .\"\\n\";\r\n\t\t$contenido.=\"Código Postal: \". $result->fields['cod_pos'] .\"\\n\\n\";\r\n\t\t$contenido.= \"--------------------------------------------------------------\\n\";\r\n\t}\r\n\t//fin de agrego datos si tiene logistica integrada\r\n\t//print_r ($mail_para);\r\n\t$para=elimina_repetidos($mail_para,0);\r\n\t//no envia el mail a juan manuel lo saco del string, en caso que se encuentre ultimo el mail\r\n\t$para=ereg_replace(\"juanmanuel@coradir.com.ar\",\"\",$para);\r\n\t//no envia el mail a juan manuel lo saco del string, en caso que se encuentre distinto del ultimo el mail\r\n\t$para=ereg_replace(\"juanmanuel@coradir.com.ar,\",\"\",$para);\r\n/*\techo \"<br> los ok: \".$para;\r\n\tdie();*/\r\n\tenviar_mail($para, $asunto, $contenido,'','','',0);\r\n}", "function inscrire($db, $info) \n{\n\tif(!empty($info['username']) AND !empty($info['email']) AND !empty($info['pass']) AND !empty($info['pass2'])) {\n\t\tif($info['pass'] === $info['pass2']) {\n\t\t\t$verifIdentifiant = 'SELECT * FROM site_user WHERE username= ?';\n\t\t\t$prep = $db->prepare($verifIdentifiant);\n\t\t\t$prep->bindValue(1, $info['username'], PDO::PARAM_STR);\n\t\t\t$prep->execute();\n\t\t\t\tif($prep -> rowCount() != 1) {\n\t\t\t\t\t$prep->closeCursor();\n\t\t\t\t\t$prep = NULL;\n\t\t\t\t\tif(check_mail($info['email'])) {\n\t\t\t\t\t\t\t$verifMail = 'SELECT * FROM site_user WHERE email= ?';\n\t\t\t\t\t\t\t$prep2 = $db->prepare($verifMail);\n\t\t\t\t\t\t\t$prep2->bindValue(1, $info['email'], PDO::PARAM_STR);\n\t\t\t\t\t\t\t$prep2 -> execute();\n\t\t\t\t\t\t\t\tif($prep2 -> rowCount() !== 1) {\n\t\t\t\t\t\t\t\t\t\t$prep2->closeCursor();\n\t\t\t\t\t\t\t\t\t\t$prep2 = NULL;\n\t\t\t\t\t\t\t\t\t\tInscription_profil($info, $db);\n\t\t\t\t\t\t\t\t\t\t//Inscription_protect($identifiant);\n\t\t\t\t\t\t\t\t\t\t//Inscription_message($identifiant);\n\t\t\t\t\t\t\t\t\t\tactivationMail($db,$info);\n\t\t\t\t\t\t\t\t\t\t$resultat = 'Votre inscription est termin&eacute;e, un email de confirmation viens de vous &ecirc;tre envoy&eacute;,<br />pensez a v&eacute;rifier vos spams.';//Inscription::activer($identifiant);\n\t\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$resultat = 'L\\'adresse email '.$email.' existe d&eacute;j&agrave;,<br />veuillez en saisir une autre et recommencer l\\'inscription..';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$resultat = 'L\\'adresse email saisi n\\'est pas valide, <br />veuillez recommencer l\\'inscription.';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$resultat = 'L\\'identifiant saisi existe d&eacute;j&agrave;,<br />veuillez en choisir un autre et recommencer l\\'inscription.';\n\t\t\t\t\t}\n\t\t\t}\n\t\telse {\n\t\t\t$resultat = 'Le champ &quot;Saisir un Mot de Passe&quot; et le champ &quot;Resaisir un Mot de Passe&quot; doivent &ecirc;tre identiques, <br />veuillez recommencer l\\'inscription.';\n\t\t\t}\n\t\t}\n\telse {\n\t\t$resultat = 'Vous devez remplir tout les champs, <br />veuillez recommencer l\\'inscription.';\n\t\t}\nreturn $resultat;\n}", "public function verificarEmail(){\n\n\n $info = new stdClass();\n $info->errores = [];\n $info->url = null;\n \n\n\n $valor_login = $this->security->xss_clean($this->input->post('correo', TRUE));\n\n if ($valor_login !== 'undefined') {\n \n \n \n // if (!($valor_login)) {\n // die(\"falta el correo\");\n // }\n // die(\"correo : \".$valor_login);\n \n $where = \"U.CORREO=?\";\n\n if ($check_usuario = $this->home_model->getUsuario($where, array($valor_login))) { \n \n\n $datosUsuario = (object) array(\n 'ID_USUARIO' => $check_usuario->ID_USUARIO,\n 'USUARIO_PREVIO' => null,\n 'ID_TIPO' => (int) $check_usuario->ID_TIPO,\n 'NOMBRE' => $check_usuario->NOMBRE,\n 'CORREO' => $check_usuario->CORREO,\n 'AVATAR' => $check_usuario->FOTOPERFIL,\n 'ULTIMO_ACCESSO' => $check_usuario->FECHAULTIMOACCESO,\n 'MENU' => (object) array(\n ));\n\n\n //Almacenar información en sesión\n $this->session->set_userdata(\"usuario\", $datosUsuario);\n\n $info->url = base_url();\n\n }else{\n $info->errores[] = \"La información no pertenece a ningún usuario registrado. Intente nuevamente.\";\n }\n\n }else{\n $info->errores[] = \"Es necesario que proporcione su dirección de correo electrónico\";\n }\n $info = json_encode($info);\n echo $info;\n }", "public function edit2Action(Request $request, RendezVous $rendezVous)\n {\n\n global $kernel;\n $user = $kernel->getContainer()->get('security.token_storage')->getToken()->getUser();\n\n\n if ($user!=='anon.' && $user->getFonctionuser()==2){\n\n $deleteForm = $this->createDeleteForm($rendezVous);\n $editForm = $this->createForm('VeterinaireBundle\\Form\\confirmationType', $rendezVous);\n $editForm->handleRequest($request);\n $file = $rendezVous->getPhotoa();\n if ($editForm->isSubmitted()) {\n\n $rendezVous->setPhotoa($file);\n $rendezVous->setVerif(true);\n $this->getDoctrine()->getManager()->flush();\n\n return $this->redirectToRoute('r_show', array('id' => $rendezVous->getId()));\n }\n\n return $this->render('rendezvous/confirmation.html.twig', array(\n 'rendezVous' => $rendezVous,\n 'form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }else{\nreturn $this->redirectToRoute('user_homepage');\n\n}\n\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}", "function saveReceptionistNotices($connection,$noticeFor,$noticeDate,$noticeSubject,$noticeText,$receptionistId,$userRole,$userEmailss,$noticeAction,$hiddenNoticeEditId){\n $noticeDate = date('Y-m-d',strtotime($noticeDate));\n if ($noticeAction == \"add\") {\n\n /*\n * Send emails also\n */\n $to = \"cs.ankitprajapati@gmail.com,\" . $userEmailss;\n $subject = \"Notice Board\";\n // Set content-type header for sending HTML email\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\n // Additional headers\n $headers .= 'From: Allen Forum<info@allenforum.com>' . \"\\r\\n\";\n $headers .= 'Cc: welcome@example.com' . \"\\r\\n\";\n $headers .= 'Bcc: welcome2@example.com' . \"\\r\\n\";\n $message = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n <title>Receptionist | Allenhouse</title>\n </head>\n <body style=\"-webkit-text-size-adjust: none; box-sizing: border-box; color: #74787E; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; height: 100%; line-height: 1.4; margin: 0; width: 100% !important;\" bgcolor=\"#F2F4F6\"><style type=\"text/css\">\nbody {\nwidth: 100% !important; height: 100%; margin: 0; line-height: 1.4; background-color: #F2F4F6; color: #74787E; -webkit-text-size-adjust: none;\n}\n@media only screen and (max-width: 600px) {\n .email-body_inner {\n width: 100% !important;\n }\n .email-footer {\n width: 100% !important;\n }\n}\n@media only screen and (max-width: 500px) {\n .button {\n width: 100% !important;\n }\n}\n</style>\n <span class=\"preheader\" style=\"box-sizing: border-box; display: none !important; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 1px; line-height: 1px; max-height: 0; max-width: 0; mso-hide: all; opacity: 0; overflow: hidden; visibility: hidden;\">Reception,Allenhouse Institute of Technology informs you that a new Notice shared with you.</span>\n <table class=\"email-wrapper\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin: 0; padding: 0; width: 100%;\" bgcolor=\"#F2F4F6\">\n <tr>\n <td align=\"center\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; word-break: break-word;\">\n <table class=\"email-content\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin: 0; padding: 0; width: 100%;\">\n <tr>\n <td class=\"email-masthead\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; padding: 25px 0; word-break: break-word;\" align=\"center\">\n <a href=\"http://allenforum.cubersindia.com\" class=\"email-masthead_name\" style=\"box-sizing: border-box; color: #bbbfc3; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 16px; font-weight: bold; text-decoration: none; text-shadow: 0 1px 0 white;\">\n Notice Board </a>\n </td>\n </tr>\n <tr>\n <td class=\"email-body\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"-premailer-cellpadding: 0; -premailer-cellspacing: 0; border-bottom-color: #EDEFF2; border-bottom-style: solid; border-bottom-width: 1px; border-top-color: #EDEFF2; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin: 0; padding: 0; width: 100%; word-break: break-word;\" bgcolor=\"#FFFFFF\">\n <table class=\"email-body_inner\" align=\"center\" width=\"570\" cellpadding=\"0\" cellspacing=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin: 0 auto; padding: 0; width: 570px;\" bgcolor=\"#FFFFFF\">\n <tr>\n <td class=\"content-cell\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; padding: 35px; word-break: break-word;\">\n <h1 style=\"box-sizing: border-box; color: #2F3133; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 19px; font-weight: bold; margin-top: 0;\" align=\"left\">Hi, Allenits!</h1>\n <p style=\"box-sizing: border-box; color: #74787E; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 16px; line-height: 1.5em; margin-top: 0;\" align=\"left\">Greetings of the Day,<br/>\n We hope you actively participating in Allenforum discussion,to resolve doubts of each other. Its a duty to inform you that an important ntoice has been shared with you\n </p> <p>for checking about it login to your <b>Allenforum accunt</b></p>\n <table class=\"body-action\" align=\"center\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin: 30px auto; padding: 0; text-align: center; width: 100%;\">\n <tr>\n <td align=\"center\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; word-break: break-word;\">\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif;\">\n <tr>\n <td align=\"center\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; word-break: break-word;\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif;\">\n <tr>\n <td style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; word-break: break-word;\">\n <a href=\"http://allenforum.cubersindia.com\" class=\"button button--\" target=\"_blank\" style=\"-webkit-text-size-adjust: none; background: #ee5d42; border-color: #ee5d42; border-radius: 3px; border-style: solid; border-width: 10px 18px; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16); box-sizing: border-box; color: #FFF; display: inline-block; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; text-decoration: none;\">Check</a>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n <p style=\"box-sizing: border-box; color: #74787E; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 16px; line-height: 1.5em; margin-top: 0;\" align=\"left\">Regards\n <br />Allenforum Team</p>\n <img src=\"http://allenforum.cubersindia.com/home/ownImages/other/allenoverflow.png\" alt=\"allenforum\" width=\"200\" height=\"40\"/>\n <table class=\"body-sub\" style=\"border-top-color: #EDEFF2; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin-top: 25px; padding-top: 25px;\">\n <tr>\n <td style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; word-break: break-word;\">\n <p class=\"sub\" style=\"box-sizing: border-box; color: #74787E; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 12px; line-height: 1.5em; margin-top: 0;\" align=\"left\">Please do not reply to this email</p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <tr>\n <td style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; word-break: break-word;\">\n <table class=\"email-footer\" align=\"center\" width=\"570\" cellpadding=\"0\" cellspacing=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin: 0 auto; padding: 0; text-align: center; width: 570px;\">\n <tr>\n <td class=\"content-cell\" align=\"center\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; padding: 35px; word-break: break-word;\">\n <p class=\"sub align-center\" style=\"box-sizing: border-box; color: #AEAEAE; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 12px; line-height: 1.5em; margin-top: 0;\" align=\"center\">© 2018 Allenforum. All rights reserved.</p>\n <p class=\"sub align-center\" style=\"box-sizing: border-box; color: #AEAEAE; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 12px; line-height: 1.5em; margin-top: 0;\" align=\"center\">\n <a href=\"https://cubersindia.com\" target=\"_blank\">Cubersindia</a>\n <br />info@cubersindia.com\n <br />Kanpur-208021\n </p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </body>\n</html>\n';\n\n\n // Send email\n @mail($to, $subject, $message, $headers);\n $query = \"INSERT INTO forum_notices SET notice_subject='$noticeSubject',notice='$noticeText',permission='$noticeFor',postedBy='$receptionistId',postedByUserType='$userRole',date_time='$noticeDate' \";\n } else if ($noticeAction == \"edit\"){\n if ($hiddenNoticeEditId) {\n $query = \"UPDATE forum_notices SET notice_subject='$noticeSubject',notice='$noticeText',permission='$noticeFor',postedBy='$receptionistId',postedByUserType='$userRole',date_time='$noticeDate' WHERE notice_id='$hiddenNoticeEditId'\";\n }\n\n }\n\n $result = $connection->query($query);\n return $result;\n }", "private function verificarEmail(){\n\t \n\t \t\t//Verifica se a requisição é via AJAX\n\t \t\tif(HelperFactory::getInstance()->isAjax()){\n\t \t\t\n\t \t\t\t //Solicita a verificação do E-mail\n\t\t\t\t $this->Delegator('ConcreteCadastro', 'verificarEmail',$this->getPost());\t \t\t\t \n\t \t\t}\t \n\t }", "function envoi_email($email_expediteur, $nom_expediteur, $email_destinataire, $email_retour, $sujet_email, $body_mail)\n{\n\t$mail = new PHPMailer();\n\t$mail->IsMail();\n\t$mail->From = $email_expediteur;\n\t$mail->FromName = $nom_expediteur;\n\t$mail->AddAddress($email_destinataire);\n\t$mail->AddReplyTo($email_retour);\n\t$mail->IsHtml(true);\n\t$mail->Subject = $sujet_email;\n\t$mail->Body= $body_mail;\n\t\n\tif(!$mail->Send())\n\t{ \n\t \treturn FALSE;\n\t}\n\telse\n\t{\t \n\t \treturn TRUE;\n\t}\n}", "private function processUpdateUser(){\n\n\t\tif($_FILES[\"foto_usuario\"][\"error\"] == 0){\n\t\t\t$randNumber = rand(0, 999999);\n\t\t\t$imgName = $randNumber . $_FILES['foto_usuario']['name'];\n\t\t\t$image_upload = Config::$userDirImage . $imgName;\n\t\t\tif (move_uploaded_file($_FILES['foto_usuario']['tmp_name'], $image_upload)) {\n\t\t\t\t$result = $this->users->updateUser($_REQUEST[\"idusuario\"], $imgName); //Devuelve 1 si inserta user\n\t\t\t\tif($result){\n\t\t\t\t\tif($_REQUEST[\"nombre_foto\"] != \"\")\n\t\t\t\t\t\tunlink(Config::$userDirImage.$_REQUEST[\"nombre_foto\"]);\n\t\t\t\t\tView::redireccion(\"user\", \"userController\");\n\t\t\t\t} else {\n\t\t\t\t\tunlink($image_upload);\n\t\t\t\t\techo \"Ocurrio un error al insertar el usuario.\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo \"Ocurrio un error al guardar el archivo.\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"Ocurrio un error al cargar el archivo.\";\n\t\t}\n\t}", "function email_notification_objet($id_objet, $type_objet, $modele) {\n\t$envoyer_mail = charger_fonction('envoyer_mail','inc'); // pour nettoyer_titre_email\n\t$id_type = id_table_objet($type_objet);\n\treturn recuperer_fond($modele,array($id_type=>$id_objet,\"id\"=>$id_objet));\n}", "function enviarCorreoRegistro($mail_AddAddress, $name, $id_user){\r\n $mail = new PHPMailer(true);\r\n\r\n try {\r\n //Server settings\r\n $mail->SMTPDebug = 0; // Enable verbose debug output\r\n $mail->isSMTP(); // Send using SMTP\r\n $mail->Host = 'mail.livesummit.plus'; // Set the SMTP server to send through\r\n $mail->SMTPAuth = true; // Enable SMTP authentication\r\n $mail->Username = 'no-reply@livesummit.plus'; // SMTP username\r\n $mail->Password = 'L1v3nore*'; // SMTP password\r\n $mail->SMTPSecure = 'ssl'; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged\r\n $mail->Port = 465; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above\r\n\r\n //Recipients\r\n $mail->setFrom('no-reply@livesummit.plus', 'No Responder');\r\n $mail->addAddress($mail_AddAddress, $name); // Add a recipient\r\n //$mail->addAddress('ellen@example.com'); // Name is optional\r\n //$mail->addReplyTo('info@example.com', 'Information');\r\n //$mail->addCC('cc@example.com');\r\n //$mail->addBCC('bcc@example.com');\r\n\r\n // Attachments\r\n //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments\r\n //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name\r\n\r\n // Content\r\n $mail->isHTML(true); // Set email format to HTML\r\n $mail->Subject = 'Registro exitoso';\r\n $mail->Body = '<h1>'.$_POST[$id_user].'</h1>'; //Información a enviar en formato HTML\r\n //$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\r\n\r\n //Al no tener los certificados correspondientes debemos agregar esto\r\n $mail->SMTPOptions = array(\r\n 'ssl' => array(\r\n 'verify_peer' => false,\r\n 'verify_peer_name' => false,\r\n 'allow_self_signed' => true\r\n )\r\n );\r\n\r\n $mail->send();\r\n echo 'El mensaje se envió correctamente.'; //Imprimir mensaje en pantalla o\r\n //Código para redireccionamiento\r\n } catch (Exception $e) {\r\n echo \"El mensaje no pudo ser enviado. Mailer Error: {$mail->ErrorInfo}\";\r\n //Código para redireccionamiento\r\n }\r\n}", "function saveUserPic($img,$action)\n\t\t{\n\t\t\t//checking that product with order id is present or not\n\t\t\tif($action == 'pro')\n\t\t\t{\n\t\t\t\t//update user profile pic\n\t\t\t\t$update = $this->manageContent->updateValueWhere('user_info', 'profile_image', 'files/pro-image/'.$img, 'user_id', $_SESSION['user_id']);\n\t\t\t}\n\t\t\telseif($action == 'cov')\n\t\t\t{\n\t\t\t\t//update user cover pic\n\t\t\t\t$update = $this->manageContent->updateValueWhere('user_info', 'cover_image', 'files/cov-image/'.$img, 'user_id', $_SESSION['user_id']);\n\t\t\t}\n\t\t}", "public function uploadProfilePicture()\n {\n // nécessaire de le nettoyer pour éviter les problèmes de sécurité\n\n // move copie le fichier présent chez le client dans le répertoire indiqué.\n $this->file->move($this->getUploadRootDir(), $this->file->getClientOriginalName());\n\n // On sauvegarde le nom de fichier\n $this->nomImage = $this->file->getClientOriginalName();\n\n // La propriété file ne servira plus\n $this->file = null;\n }", "public function enviarMailDoc() {\n $obj_con = new cls_Base();\n $obj_var = new cls_Global();\n $objEmpData= new EMPRESA();\n $dataMail = new mailSystem();\n $rep = new REPORTES();\n //$con = $obj_con->conexionVsRAd();\n $objEmp=$objEmpData->buscarDataEmpresa(cls_Global::$emp_id,cls_Global::$est_id,cls_Global::$pemi_id);//recuperar info deL Contribuyente\n $con = $obj_con->conexionIntermedio();\n \n $dataMail->file_to_attachXML=$obj_var->rutaXML.'NC/';//Rutas FACTURAS\n $dataMail->file_to_attachPDF=$obj_var->rutaPDF;//Ructa de Documentos PDF\n try {\n $cabDoc = $this->buscarMailNcRAD($con,$obj_var,$obj_con);//Consulta Documentos para Enviar\n //Se procede a preparar con los correos para enviar.\n for ($i = 0; $i < sizeof($cabDoc); $i++) {\n //Retorna Informacion de Correos\n $rowUser=$obj_var->buscarCedRuc($cabDoc[$i]['CedRuc']);//Verifico si Existe la Cedula o Ruc\n if($rowUser['status'] == 'OK'){\n //Existe el Usuario y su Correo Listo para enviar\n $row=$rowUser['data'];\n $cabDoc[$i]['CorreoPer']=$row['CorreoPer'];\n $cabDoc[$i]['Clave']='';//No genera Clave\n }else{\n //No Existe y se crea uno nuevo\n $rowUser=$obj_var->insertarUsuarioPersona($obj_con,$cabDoc,'MG0031',$i);//Envia la Tabla de Dadtos de Person ERP\n $row=$rowUser['data'];\n $cabDoc[$i]['CorreoPer']=$row['CorreoPer'];\n $cabDoc[$i]['Clave']=$row['Clave'];//Clave Generada\n }\n }\n //Envia l iformacion de Correos que ya se completo\n for ($i = 0; $i < sizeof($cabDoc); $i++) {\n if(strlen($cabDoc[$i]['CorreoPer'])>0){ \n //if(1>0){ \n $mPDF1=$rep->crearBaseReport();\n //Envia Correo \n include('mensaje.php');\n $htmlMail=$mensaje;\n\n $dataMail->Subject='Ha Recibido un(a) Documento Nuevo(a)!!! ';\n $dataMail->fileXML='NOTA DE CREDITO-'.$cabDoc[$i][\"NumDocumento\"].'.xml';\n $dataMail->filePDF='NOTA DE CREDITO-'.$cabDoc[$i][\"NumDocumento\"].'.pdf';\n //CREAR PDF\n $mPDF1->SetTitle($dataMail->filePDF);\n $cabFact = $this->mostrarCabNc($con,$obj_con,$cabDoc[$i][\"Ids\"]);\n $detDoc = $this->mostrarDetNc($con,$obj_con,$cabDoc[$i][\"Ids\"]);\n $impDoc = $this->mostrarNcImp($con,$obj_con,$cabDoc[$i][\"Ids\"]);\n $adiDoc = $this->mostrarNcDataAdicional($con,$obj_con,$cabDoc[$i][\"Ids\"]);\n \n $usuData=array();\n //$usuData=$objEmpData->buscarDatoVendedor($cabFact[0][\"USU_ID\"]);//Correo del Usuario que Autoriza\n include('formatNc/ncPDF.php');\n \n //COMETAR EN CASO DE NO PRESENTAR ESTA INFO\n $mPDF1->SetWatermarkText('ESTA INFORMACIÓN ES UNA PRUEBA');\n $mPDF1->watermark_font= 'DejaVuSansCondensed';\n $mPDF1->watermarkTextAlpha = 0.5;\n $mPDF1->showWatermarkText=($cabDoc[$i][\"Ambiente\"]==1)?TRUE:FALSE; // 1=Pruebas y 2=Produccion\n //****************************************\n \n $mPDF1->WriteHTML($mensajePDF); //hacemos un render partial a una vista preparada, en este caso es la vista docPDF\n $mPDF1->Output($obj_var->rutaPDF.$dataMail->filePDF, 'F');//I en un naverdoad F=ENVIA A UN ARCHVIO\n\n $resulMail=$dataMail->enviarMail($htmlMail,$cabDoc,$obj_var,$usuData,$i);\n if($resulMail[\"status\"]=='OK'){\n $cabDoc[$i]['EstadoEnv']=6;//Correo Envia\n }else{\n $cabDoc[$i]['EstadoEnv']=7;//Correo No enviado\n }\n \n }else{\n //No envia Correo \n //Error COrreo no EXISTE\n $cabDoc[$i]['EstadoEnv']=7;//Correo No enviado\n }\n \n }\n $con->close();\n $obj_var->actualizaEnvioMailRAD($cabDoc,\"NC\");\n //echo \"ERP Actualizado\";\n return true;\n } catch (Exception $e) {\n //$trans->rollback();\n //$con->active = false;\n $con->rollback();\n $con->close();\n throw $e;\n return false;\n } \n }", "static public function ctrRegistroUsuario()\n {\n if (isset($_POST['regUsuario'])) {\n /*Validando lo que venga por post, y validando que estengo, santeizadas los compaos*/\n if (preg_match('/^[a-zA-ZñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"regUsuario\"]) &&\n preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"regEmail\"]) &&\n preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"regPassword\"])\n ) {\n\n $encriptar = crypt($_POST[\"regPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\n\n //encritamos en MD5 para que se ecnripte solo en alfanumerico sin caracteres especiales\n $encriptarEmail = md5($_POST[\"regEmail\"]);\n\n $datos = array(\"nombre\" => $_POST[\"regUsuario\"],\n \"password\" => $encriptar,\n \"email\" => $_POST[\"regEmail\"],\n \"foto\" => \"\",\n \"modo\" => \"directo\",\n \"verificacion\" => 1, // 1 siginifica que no ha verificado su cuenta, y 0 que si\n \"emailEncriptado\" => $encriptarEmail);\n\n\n $tabla = \"usuarios\";\n\n $respuesta = @ModeloUsuarios::mdlRegistroUsuario($tabla, $datos);\n\n if ($respuesta == 'ok') {\n /*=============================================\n VERIFICACIÓN CORREO ELECTRÓNICO\n =============================================*/\n //definimos sona horaria para enviar el correo\n date_default_timezone_set(\"America/Bogota\");\n\n $url = @Ruta::ctrRuta();\n //instancioamos la libreria\n $mail = new PHPMailer;\n\n $mail->CharSet = 'UTF-8';\n\n $mail->isMail();\n //de donde se va a enviar el correo\n $mail->setFrom('ing.gustavo.marquez@gmail.com', 'Ingeniero Gustavo');\n // responder el correo a\n $mail->addReplyTo('ing.gustavo.marquez@gmail.com', 'Ingeniero Gustavo');\n // asunto\n $mail->Subject = \"Por favor verifique su dirección de correo electrónico\";\n //email de destinatario\n $mail->addAddress($_POST[\"regEmail\"]);\n // Mensaje que se enviara, com omaqueta HTML\n $mail->msgHTML('<div style=\"width:100%; background:#eee; position:relative; font-family:sans-serif; padding-bottom:40px\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<img style=\"padding:20px; width:10%\" src=\"http://tutorialesatualcance.com/tienda/logo.png\">\n\n\t\t\t\t\t\t</center>\n\n\t\t\t\t\t\t<div style=\"position:relative; margin:auto; width:600px; background:white; padding:20px\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<img style=\"padding:20px; width:15%\" src=\"http://tutorialesatualcance.com/tienda/icon-email.png\">\n\n\t\t\t\t\t\t\t<h3 style=\"font-weight:100; color:#999\">VERIFIQUE SU DIRECCIÓN DE CORREO ELECTRÓNICO</h3>\n\n\t\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\n\t\t\t\t\t\t\t<h4 style=\"font-weight:100; color:#999; padding:0 20px\">Para comenzar a usar su cuenta de Tienda Virtual, debe confirmar su dirección de correo electrónico</h4>\n\n\t\t\t\t\t\t\t<a href=\"' . $url . 'verificar/' . $encriptarEmail . '\" target=\"_blank\" style=\"text-decoration:none\">\n\n\t\t\t\t\t\t\t<div style=\"line-height:60px; background:#0aa; width:60%; color:white\">Verifique su dirección de correo electrónico</div>\n\n\t\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t\t<br>\n\n\t\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\n\t\t\t\t\t\t\t<h5 style=\"font-weight:100; color:#999\">Si no se inscribió en esta cuenta, puede ignorar este correo electrónico y la cuenta se eliminará.</h5>\n\n\t\t\t\t\t\t\t</center>\n\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div>');\n\n $envio = $mail->Send();\n\n if (!$envio) {\n echo '<script> \n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t title: \"¡ERROR!\",\n\t\t\t\t\t\t\t\t text: \"¡Ha Ocurrido un problema, enviando verificacion de correo electronico a ' . $_POST[\"regEmail\"] . $mail->ErrorInfo . '!\",\n\t\t\t\t\t\t\t\t type:\"error\",\n\t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tfunction (isConfirm){\n\t\t\t\t\t\t\t if(isConfirm){\n\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t</script>';\n } else {\n /*Si se envio el correo al usuario muestra la alerta de revisar el mail*/\n //Debe realizar la verificacion de correo electronico\n echo '<script> \n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t title: \"¡OK!\",\n\t\t\t\t\t\t\t\t text: \"¡Por favor revise la bandeja de entrada de su correo electronico,' . $_POST[\"regEmail\"] . ' para verificar su cuenta!\",\n\t\t\t\t\t\t\t\t type:\"success\",\n\t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tfunction (isConfirm){\n\t\t\t\t\t\t\t if(isConfirm){\n\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t</script>';\n }\n\n\n }\n } else {\n echo '<script> \n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t title: \"¡ERROR!\",\n\t\t\t\t\t\t\t\t text: \"¡Error al registrar el usuario, no se permiten caracteres especiales\",\n\t\t\t\t\t\t\t\t type:\"error\",\n\t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tfunction (isConfirm){\n\t\t\t\t\t\t\t if(isConfirm){\n\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t</script>';\n }\n } else {\n\n\n }\n }", "function recuperar_clave(){\n if(!isset($_POST['correo']) || $_POST['correo']==\"\"){\n header(\"location:recuperar_clave.php?msg=4\");\n exit();\n }else{\n $correo=$_POST['correo'];\n }\n /* \t\techo(\"Aqui llego\");\n exit(); */\n $sql=\"SELECT * FROM registro WHERE correo_reg='$correo'\";\n $consulta=mysql_query($sql) or die(mysql_error());\n if(!$resultado=mysql_fetch_array($consulta)){\n header(\"location:recuperar_clave.php?msg=5\");\n exit();\n }else{\n $cuerpo =\"<img width='200' height='100' src='http://uiformese.diazcreativos.net.ve/imagenes/logon.jpg' /><br /><br />\";\n $cuerpo .=\"<U>Sus datos son:</U><br>\";\n $cuerpo .=\"<BR>\";\n $cuerpo .= \"<b>Nombre: </b>\".$resultado['nombre_reg'].\"<BR>\" ;\n $cuerpo .= \"<b>Apellido: </b>\".$resultado['apellido_reg'].\"<BR>\" ;\n $cuerpo .= \"<b>Usuario: </b>\".$resultado['login_reg'].\"<BR>\" ;\n $cuerpo .= \"<b>Clave: </b>\".$resultado['clave_reg'].\"<BR>\" ;\n $cuerpo .= \"<BR>\";\n $cuerpo .= \"---- END DATOS ----\";\n $cuerpo .= \"<BR>\";\n $subject= \"Recuperación de clave de Delle Cucine\";\n $redir= \"recuperar_clave.php?msg=6\";\n $basemailfrom=\"adri220487@gmail.com\";\n $basemailfor = $correo;\n\n mail (\"$basemailfor\", \"$subject\", \"$cuerpo\", \"From: $basemailfrom\\nContent-Type: text/html\" );\n //print \"<meta HTTP-EQUIV=REFRESH CONTENT=$cuerpo>\";\n print \"<meta HTTP-EQUIV=REFRESH CONTENT=1;URL=$redir>\";\n }\n }", "public function saveImageToUser($image, $user);", "private function sendMail() {\n $BodyMail = new BodyMail();\n //$to = $this->_datPerson[email];\n $to = 'potcheunam@gmail.com';\n\n $url = baseUri.\"linkCode?code=\".base64_encode($this->_code).\"&email=\".base64_encode($this->_datPerson[email]);\n\n $subject = \"DEV-Validación de Email\";\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\n $headers .= 'From: Evaluacione Red UNOi <noreplymx@unoi.com>'.\"\\r\\n\";\n $headers .= 'Reply-To: NoReply <noreplymx@unoi.com>' . \"\\r\\n\";\n $headers .= 'Bcc: potcheunam@gmail.com' . \"\\r\\n\";\n $message = $BodyMail->run($this->_datPerson['name'], $this->_code, $url);\n mail($to, $subject, $message, $headers, '-f noreplymx@unoi.com');\n }", "public function crearCorreoInstitucional(){\n $nom0 = $this->attributes['nombre'];\n //tomo el/los apellido/s del preinscripto\n $ape0 = $this->attributes['apellido'];\n //defino el dominio que tendrá cada mail creado\n $dominio = \"@udc.edu.ar\";\n \n $nom = $this->inicialesDeNombres($nom0);\n $nom1 = $this->sanear_string($nom);\n \n $ape = $this->apellidosCompletos($ape0);\n $ape1 = $this->sanear_string($ape);\n \n \n $correo_institucional = $nom1.$ape1.$dominio; \n $this->attributes['email_institucional'] = $correo_institucional;\n $this->save();\n }", "public function sendMessageFromProfil($request){\n $userArray = $this->verify_token($request);\n if ($userArray==false){\n return new Response(401, ['Content-Type' => 'application/json'], json_encode(array(\n \"status\" => \"error\",\n \"message\" => \"Invalid authorized access\"\n )));\n }\n\n $user_id = $userArray[\"id\"];\n $user_to_send = $this->getRequestBody($request, 'user_id');\n $message_text = $this->getRequestBody($request, 'message');\n $message_type = $this->getRequestBody($request, 'type');\n\n $status = \"success\";\n $messageJson = \"Message sent\";\n $message_user = null;\n $discu_id = null;\n $link = null;\n\n $uploaded = false;\n\n $maxSize = 1000000; //octet\n\n if ($message_type == \"media\"){\n $media = $this->getUploadedFiles($request, 'media');\n\n if ($media AND $media->getError() == 0){\n if ($media->getSize() <= $maxSize){\n $infosFichier = pathinfo($media->getClientFileName());\n $extension = $infosFichier['extension'];\n $extensionsAuorisees = array('jpg','jpeg','gif','png');\n if (in_array($extension, $extensionsAuorisees)){\n $newFileName = 'm' . $user_id . date('YmdHis') . '.' . $extension;\n $destinationPath = $_SERVER['DOCUMENT_ROOT'] . '/simple-chat/public/images/message/';\n $media->moveTo($destinationPath.$newFileName);\n\n $message_text = $newFileName;\n $m = new Message();\n $link = $m->getMessageMediaLink($newFileName);\n\n $uploaded = true;\n }\n else{\n $messageJson = \"Extension non autorisée\";\n }\n }\n else{\n $messageJson = \"Max taille fichier : \" . (string)$maxSize . \" (octet)\";\n }\n }\n else {\n if ($media){\n $messageJson = \"Error code : \" . (string)$media->getError();\n }\n else{\n $messageJson = \"Fichier inexistant\";\n }\n }\n }\n else {\n $uploaded = true;\n }\n\n $status = $uploaded ? \"success\" : \"error\";\n\n if ($uploaded){\n $discussion = new Discussion();\n $discu_id = $discussion->getDiscuIdFromProfil($user_id, $user_to_send);\n\n $message = new Message();\n $message->setMsg_text($message_text);\n $message->setType($message_type);\n $message->setUser_id($user_id);\n $message->setDiscussion_id($discu_id);\n $message->create();\n\n $message_user = $message->getArrayVersion();\n\n $discussion->setId($discu_id);\n $discussion->load();\n $discussion->setLast_message($message->getId());\n $discussion->update();\n }\n\n return $this->renderJson(array(\n \"status\" => $status,\n \"message\" => $messageJson,\n \"message_user\" => $message_user,\n \"discussion_id\" => $discu_id,\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('programaenlazamundos@cta.org.co ', 'Programa Enlazamundos');\n $mail->addTo($correo);\n $mail->setSubject('Confirmación de registro Enlazamundos');\n $mail->send();\n return;\n }\n}", "public function actualizarUsuario()\n {\n //quitamos el id del array y lo guardamos a parte\n $datos = $_POST;\n $ciu = isset($datos['CIU']) ? $datos['CIU'] : $this->session->userdata(\"ciu\");\n unset($datos['CIU']);\n\n //miramos si ha enviado imagen de perfil. de ser asi se procesa en otro metodo aparte y se quita del array\n if (isset($datos['img'])) {\n self::actualizarImagenPerfil($datos['img']);\n unset($datos['img']);\n }\n\n echo $this->Usuarios_model->actualizarUsuario($ciu, $datos);\n }", "public function inicio($edicion = 0,$id_usuario = \"\"){\r\n\t\t$tipoDirec = self::$datoDB->selectTipoDireccion();\r\n\t\t//$ciudad\t = self::$datoDB->selectCiudad();\r\n\t\t$localidad = self::$datoDB->selectLocalidad();\r\n\t\t/* Query para llenar Email*/\r\n\t\t$tipoEmail = self::$datoDB->selectTipoCorreo();\r\n\t\t/* Query para llenar Fono*/\r\n\t\t$tipoFono = self::$datoDB->selectTipoTelefono();\r\n\t\t\r\n\r\n\t\t/* Querys si el administrador edita al usuario */\t\r\n\t\tif($edicion == 1){\r\n\t\t\t/* Datos tabla org_usuario */\r\n\t\t\t$dataUsuario = self::$datoDB->selectuDataUsuario($id_usuario);\t\t\t\t\t\r\n\t\t}\r\n?>\r\n\t<script language=\"javascript\" type=\"text/javascript\">\r\n\t\t$('#rut_us').Rut({\r\n\t\t\t on_error: function(){ alert('Rut incorrecto');\r\n\t\t\t \t\t$(\"#rut_us\").each(function(){\t\r\n\t\t\t\t\t$($(this)).val('')\r\n\t\t\t\t});},\r\n\t\t\t format_on: 'keyup'\r\n\t\t});\r\n\t</script>\r\n\r\n<div id=\"form_inicio\" align=\"center\">\r\n<form id=\"principal\" name=\"principal\" method=\"POST\" enctype=\"multipart/form-data\"><!-- action=\"controller.php?mod=4\" -->\r\n\r\n<table class=\"cuadrotexto\" align=\"center\" width=\"70%\">\r\n\t<div id='uso_default'></div>\r\n\t<?php \r\n\t\tif($edicion == 1){\r\n\t\t\tif($dataUsuario[0][11] == \"\"){\r\n\t\t\t\t$dataUsuario[0][11] = \"./Fotos/sin-imagen.jpg\";\r\n\t\t\t\t$liminaF = \"\"; \t //Si el usuario no tiene foto oculto el boton eliminar foto\r\n\t\t\t\t$fileLocked = \"\"; //si el usuario no tiene foto activo el cargar foto\r\n\t\t\t}else{\r\n\t\t\t\t$liminaF = \"<tr><td align='center'><a href='#' onClick='eliminaFoto(\\\"\".$dataUsuario[0][11].\"\\\",$id_usuario);'>Eliminar foto</a></td></tr>\";\r\n\t\t\t\t$fileLocked = \"disabled = true\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo \"<tr><td colspan='4' align='center' class='person'><div class='person'><img src='\".$dataUsuario[0][11].\"' width='130px' height='150px'></div></td></tr>\";\r\n\t\t\techo $liminaF;\r\n\t\t\t$colsan = \"colspan='7'\";\r\n\t\t}else{\r\n\t\t\t$colsan = \"colspan='5'\";\r\n\t\t}\r\n?>\r\n\t<tr>\r\n\t\t<td>\r\n\t\t\t<table align=\"center\" width=\"100%\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td <?=$colsan?> class=\"ui-corner-all ui-widget-header\" align=\"center\">DATOS USUARIO</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"cuadrotexto\" width=\"60px\">Rut</td>\r\n\t\t\t\t\t<td width=\"290px\"><?=self::inputText(array(\"name\"=>\"rut_us\",\"id\"=>\"rut_us\",\"onBlur\"=>\"validaRut(this.value,$edicion);\",\"value\"=>$dataUsuario[0][1]))?></td> <!-- ,\"onBlur\"=>\"validaRut()\" -->\r\n\t\t\t\t\t<td width=\"80px\"><div id=\"rut_val\"></div></td>\r\n\t\t\t\t\t<td class=\"cuadrotexto\">Foto</td>\r\n\t\t\t\t\t<td><input type=\"file\" id=\"foto_us\" name=\"foto_us\" <?=$fileLocked?>></input></td><!-- class=\"upload\" -->\t\r\n\t\t\t\t<?php \r\n\t\t\tif($edicion == 1){\r\n echo \" <script type=\\\"text/javascript\\\">\\n\"; \r\n echo \" // <![CDATA[\\n\"; \r\n echo \" $(document).ready(function() {\\n\"; \r\n echo \" $('#foto_us').uploadify({\\n\"; \r\n echo \" 'uploader' : 'uploadify/uploadify.swf',\\n\"; \r\n echo \" 'script' : 'uploadify/uploadify.php',\\n\"; \r\n echo \" 'cancelImg' : 'uploadify/cancel.png',\\n\"; \r\n echo \" 'folder' : 'Fotos',\\n\"; \r\n echo \" 'auto' : true,\\n\";\r\n echo \" 'buttonText' :'Subir Archivo',\\n\"; \r\n //echo \" 'scriptData' : {'fuente':'Status','id_informe':12067},\\n\"; \r\n echo \" 'method' : 'post',\\n\"; \r\n echo \" 'onComplete' : function(event, ID, fileObj, response, data) {\\n\"; \r\n echo \" alert('Archivo Subido Correctamente!');\\n\"; \r\n echo \" insertarUploadify('$id_usuario',response);\\n\";\r\n echo \" }\\n\"; \r\n echo \" });\\n\"; \r\n echo \" });\\n\"; \r\n echo \" // ]]>\\n\"; \r\n echo \" </script>\\n\";\r\n\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"cuadrotexto\">Nombres</td>\r\n\t\t\t\t\t<td><?=self::inputText(array(\"id\"=>\"nombre_us\",\"name\"=>\"nombre_us\",\"value\"=>$dataUsuario[0][12],\"maxlength\"=>100))?></td>\r\n\t\t\t\t\t<td>&nbsp;</td>\r\n\t\t\t\t\t<td class=\"cuadrotexto\">Apellidos</td>\r\n\t\t\t\t\t<td><?=self::inputText(array(\"id\"=>\"apellido_us\",\"name\"=>\"apellido_us\",\"value\"=>$dataUsuario[0][13],\"maxlength\"=>100))?></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"cuadrotexto\">Login</td>\r\n\t\t\t\t\t<td><?=self::inputText(array(\"id\"=>\"login_us\",\"name\"=>\"login_us\",\"onblur\"=>\"validaLogin(this.value,$edicion);\",\"value\"=>$dataUsuario[0][14],\"maxlength\"=>30))?></td>\r\n\t\t\t\t\t<td width=\"80px\"><div id=\"acep_no\"></div></td>\r\n\t\t\t\t\t<td class=\"cuadrotexto\">Fecha Nac.</td>\r\n\t\t\t\t\t<td><?=self::inputFecha(\"fecha_nac\",array(\"id\"=>\"fecha_nac\",\"value\"=>$dataUsuario[0][15],\"yearRange\"=>\"c-90:c+0\"))?></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t\r\n\t\t\t\t<tr>\r\n\t\t\t\t<?php if($edicion == 1){\r\n\t\t\t\t\t\t\tif($dataUsuario[0][4] == \"M\"){\r\n\t\t\t\t\t\t\t\t$selectedM = \"selected\";\r\n\t\t\t\t\t\t\t\t$selectedF = \"\";\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t$selectedM = \"\";\r\n\t\t\t\t\t\t\t\t$selectedF = \"selected\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t\t\t<td class=\"cuadrotexto\">Sexo</td>\r\n\t\t\t\t\t<td>\r\n\t\t\t\t\t\t<select id=\"sexo_us\" name=\"sexo_us\">\r\n\t\t\t\t\t\t\t<option value=\"\">-Seleccione-</option>\r\n\t\t\t\t\t\t\t<option value=\"M\" <?=$selectedM?>>Masculino</option>\r\n\t\t\t\t\t\t\t<option value=\"F\" <?=$selectedF?>>Femenino</option>\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t<td>&nbsp;</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t\r\n\t\t\t<?php if($edicion != 1){?>\r\n\t\t\t<table>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"cuadrotexto\" width=\"60px\">Direccion</td>\r\n\t\t\t\t\t<td colspan=\"4\"><?=self::inputText(array(\"name\"=>\"direccion_pers0\",\"id\"=>\"direccion_pers0\",\"style\"=>\"width: 100px\",\"maxlength\"=>50))?> <!-- ,\"style\"=>\"50px\" -->\r\n\t\t\t\t\tNro <?=self::inputText(array(\"id\"=>\"nmro0\",\"name\"=>\"nmro0\",\"style\"=>\"width: 50px\"))?>\r\n\t\t\t\t\tDpto <?=self::inputText(array(\"id\"=>\"dpto0\",\"name\"=>\"dpto0\",\"style\"=>\"width: 50px\",\"maxlength\"=>5))?>\r\n\t\t\t\t\t<?=self::combobox(\"tipo_direc0\",$tipoDirec,array(\"id\"=>\"tipo_direc0\",\"style\"=>\"width: 70px\",\"first_option\"=>\"-Tipo-\"))?>\r\n\t\t\t\t\t<?=self::combobox(\"local_pers0\",$localidad,array(\"id\"=>\"local_pers0\",\"style\"=>\"width: 100px\",\"first_option\"=>\"-Localidad-\"))?>\r\n\t\t\t\t\t<a href='#' onClick='AgregarCamposDireccion();'><img src='../../img/mas.jpg'></a></td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t\t\t<?php }else{?>\r\n\t\t\t\t\t<div id='muestraDirec'><?=self::muestraDireccion($id_usuario)?></div>\r\n\t\t\t\t<?php }?>\t\r\n<!-- Dinamico Direc --> <div id=\"campos_direccion\" align=\"center\"></div>\t\r\n<input type=\"hidden\" id=\"mod_direc\" name=\"mod_direc\" value=\"0\">\t\r\n\t\t\t<?php if($edicion != 1){?>\t\r\n\t\t\t<table>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"cuadrotexto\" width=\"60px\">Email</td>\r\n\t\t\t\t\t<td colspan=\"2\"><?=self::inputText(array(\"id\"=>\"email0\",\"name\"=>\"email0\",\"maxlength\"=>100))?>&nbsp;\r\n\t\t\t\t\t<?=self::combobox(\"tipo_correo0\",$tipoEmail,array(\"id\"=>\"tipo_correo0\",\"style\"=>\"width:70px\",\"first_option\"=>\"-Tipo-\"))?> <a href='#' onClick='AgregarCamposEmail();'><img src='../../img/mas.jpg'></a></td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t\t<?php }else{?>\r\n\t\t\t\t\t<div id='div_muestra_email'><?=self::muestraEmail($id_usuario)?></div>\r\n\t\t\t<?php }?>\r\n\t\t\t\r\n<!-- Dinamico email --> <div id=\"campos_email\" align=\"center\"></div>\r\n<input type=\"hidden\" id=\"mod_email\" name=\"mod_email\" value=\"0\">\r\n\t\t\t<?php if($edicion != 1){?>\t\r\n\t\t\t<table>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"cuadrotexto\" width=\"60px\">Fono</td>\r\n\t\t\t\t\t<td colspan=\"2\"><?=self::inputText(array(\"id\"=>\"fono0\",\"name\"=>\"fono0\",\"maxlength\"=>30))?>&nbsp;\r\n\t\t\t\t\t<?=self::combobox(\"tipo_fono0\",$tipoFono,array(\"id\"=>\"tipo_fono0\",\"style\"=>\"width: 70px\",\"first_option\"=>\"-Tipo-\"))?> <a href='#' onClick='AgregarCamposFono();'><img src='../../img/mas.jpg'></a></td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t\t<?php }else{?>\r\n\t\t\t\t\t<div id='div_muestra_fono'><?=self::muestraFono($id_usuario)?></div>\r\n\t\t\t<?php }?>\r\n<!-- Dinamico Fono --> <div id=\"campos_fono\" align=\"center\"></div>\r\n<input type=\"hidden\" id=\"mod_fono\" name=\"mod_fono\" value=\"0\">\r\n\t\t\t<table width=\"100%\">\r\n\t\t\t\t\t<tr><td>&nbsp;</td></tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\"4\" class=\"ui-corner-all ui-widget-header\" align=\"center\">DATOS LABORALES</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=\"cuadrotexto\">C&oacute;digo T&eacute;cnico</td>\r\n\t\t\t\t\t\t<td><?=self::inputText(array(\"id\"=>\"codigo_tecnico_us\",\"name\"=>\"codigo_tecnico_us\",\"value\"=>$dataUsuario[0][16],\"maxlength\"=>30))?></td>\r\n\t\t\t\t\t\t<td class=\"cuadrotexto\">Area Funcional</td>\r\n\t\t\t\t\t\t<td><?=self::combobox(\"area_fun_us\",self::$datoDB->selectAreaFun(),array(\"id\"=>\"area_fun_us\",\"default\"=>$dataUsuario[0][17]))?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=\"cuadrotexto\">Cargo</td>\r\n\t\t\t\t\t\t<td><?=self::combobox(\"cargo_us\",self::$datoDB->selectCargo(),array(\"id\"=>\"cargo_us\",\"default\"=>$dataUsuario[0][18]))?></td>\r\n\t\t\t\t\t\t<td class=\"cuadrotexto\">Direcci&oacute;n</td> \r\n\t\t\t\t\t\t<td><?=self::combobox(\"dire_lab_us\",self::$datoDB->selectDireccionLaboral(),array(\"id\"=>\"dire_lab_us\",\"default\"=>$dataUsuario[0][19]))?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=\"cuadrotexto\">Tipo usuario</td>\r\n\t\t\t\t\t\t<td><?=self::combobox(\"interno_no_us\",self::$datoDB->selectInternoNoi(),array(\"id\"=>\"interno_no_us\",\"onchange\"=>\"verificaInterino(this.value);\",\"default\"=>$dataUsuario[0][20]))?></td>\r\n\t\t\t\t\t\t<td class=\"cuadrotexto\">Empresa</td>\r\n\t\t\t\t\t\t<td><div id=\"empresa\"><?=self::combobox(\"empresa_us\",self::$datoDB->selectEmpresa(),array(\"id\"=>\"empresa_us\",\"default\"=>$dataUsuario[0][21]))?></div></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=\"cuadrotexto\">Fecha ing. VTR</td>\r\n\t\t\t\t\t\t<td><?=self::inputFecha(\"fecha_ingreso_vtr\",array(\"id\"=>\"fecha_ingreso_vtr\",\"value\"=>$dataUsuario[0][3],\"yearRange\"=>\"-20:+0\"))?></td>\r\n\t\t\t\t\t\t<td class=\"cuadrotexto\">Nivel de aprobaci&oacute;n</td><!-- Es el nivel Ap. Si. -->\r\n\t\t\t\t\t\t<td><?=self::combobox(\"nivel_apro_us\",self::$datoDB->selectNivelApSi(),array(\"id\"=>\"nivel_apro_us\",\"default\"=>$dataUsuario[0][22],\"selected\"=>\"selected\"))?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=\"cuadrotexto\">Perfil</td>\r\n\t\t\t\t\t\t<td><?=self::combobox(\"perfil_us\",self::$datoDB->selectPerfil(),array(\"id\"=>\"perfil_us\",\"default\"=>$dataUsuario[0][23]))?></td>\r\n\t\t\t\t\t\t<td class=\"cuadrotexto\">Jefe</td>\r\n\t\t\t\t\t\t<td><?=self::combobox(\"jefe_us\",self::$datoDB->selectJefes(),array(\"id\"=>\"jefe_us\",\"default\"=>$dataUsuario[0][24]))?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<?php if($edicion == 1){\r\n\t\t\t\t\t\t \t$valor = $dataUsuario[0][25];\r\n\t\t\t\t\t\t }else{\r\n\t\t\t\t\t\t\t$valor = 1;\r\n\t\t\t\t\t\t }?>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=\"cuadrotexto\">Estado</td>\r\n\t\t\t\t\t\t<td><?=self::combobox(\"estado_us\",self::$datoDB->selectEstado(),array(\"id\"=>\"estado_us\",\"default\"=>$valor))?></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t</table>\t\r\n\t<!-- ----------------- Campos dinamicos -->\r\n\t<script type=\"text/javascript\">\r\n\r\n// ********************************* DINAMICOS DIRECCION *************************\t\t\r\n\t\t\tvar nextinput2 = 0;\r\n\t\t\tfunction AgregarCamposDireccion(){\r\n\t\t\t\tdireccion\t= $(\"#direccion_pers\"+nextinput2).val();\r\n\t\t\t\ttipo_direc\t= $(\"#tipo_direc\"+nextinput2).val();\r\n\t\t\t\tlocalidad\t= $(\"#local_pers\"+nextinput2).val();\r\n\t\t\t\tnmro\t\t= $(\"#nmro\"+nextinput2).val();\r\n\t\t\t\tdpto\t\t= $(\"#dpto\"+nextinput2).val();\r\n\r\n\t\t\t\terror = \"\"\r\n\t\t\t\tcabecera = \"Debe ingresar los siguientes datos \\n\";\r\n\r\n\t\t\t\tif(direccion == \"\"){\r\n\t\t\t\t\terror += \"- Ingrese Direccion \\n\";\r\n\t\t\t\t}\r\n\t\t\t\tif(nmro == \"\"){\r\n\t\t\t\t\terror += \"- Ingrese el numero de la direccion \\n\";\r\n\t\t\t\t}\r\n\t\t\t\tif(tipo_direc == \"\"){\r\n\t\t\t\t\terror += \"- Seleccione Tipo de direccion \\n\";\r\n\t\t\t\t}\r\n\t\t\t\tif(localidad == \"\"){\r\n\t\t\t\t\terror += \"- Seleccione Localidad \\n\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(error != \"\"){\r\n\t\t\t\t\talert(cabecera+error);\r\n\t\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\t\tnextinput2++;\r\n\t\r\n\t\t\t\t\tcampo = \"<table align='left' width='100%'>\";\r\n\r\n\t\t\t\t\tcampo += \"<tr>\";\r\n\r\n\t\t\t\t\tcampo += \"<td width='65px'>&nbsp;</td>\";\r\n\r\n\t\t\t\t\tcampo += \"<td>\";\r\n\r\n\t\t\t\t\tcampo += \"&nbsp;<input type='text' id='direccion_pers\"+nextinput2+\"' name='direccion_pers\"+nextinput2+\"' style='width:100px' maxlength='50'>&nbsp;\";\r\n\t\t\t\t\tcampo += \"&nbsp;Nro <input type='text' id='nmro\"+nextinput2+\"' name='nmro\"+nextinput2+\"' style='width:50px'>&nbsp;\";\r\n\t\t\t\t\tcampo += \"&nbsp;Dpto <input type='text' id='dpto\"+nextinput2+\"' name='dpto\"+nextinput2+\"' style='width:50px' maxlength='5'>&nbsp;\";\r\n\r\n\t\t\t\t\tcampo += \"<select style='width: 70px' id='tipo_direc\"+nextinput2+\"' name='tipo_direc\"+nextinput2+\"'>\";\r\n\t\t\t\t\tcampo += \"<option value=''>-Tipo-</option>\";\r\n\t\t\t\t\t<?php for($i=0;$i<count($tipoDirec['ID_TIPO_DIRECCION_USUARIO']);$i++){?>\r\n\t\t\t\t\tcampo += \"<option value='<?=$tipoDirec['ID_TIPO_DIRECCION_USUARIO'][$i]?>'><?=$tipoDirec['NOMBRE'][$i]?></option>\";\r\n\t\t\t\t\t<?php }?>\r\n\t\t\t\t\tcampo += \"</select>&nbsp;\";\r\n\r\n\t\t\t\t\tcampo += \"<select style='width: 100px' id='local_pers\"+nextinput2+\"' name='local_pers\"+nextinput2+\"'>\";\r\n\t\t\t\t\tcampo += \"<option value=''>-Localidad-</option>\";\r\n\r\n\t\t\t\t\t<?php for($i=0;$i<count($localidad['CODI_LOCALIDAD']);$i++){?>\r\n\t\t\t\t\tcampo += \"<option value='<?=$localidad['CODI_LOCALIDAD'][$i]?>'><?=$localidad['DESC_LOCALIDAD'][$i]?></option>\";\r\n\t\t\t\t\t<?php }?>\r\n\t\t\t\t\tcampo += \"</select>&nbsp;\";\r\n\r\n\t\t\t\t\tcampo += \"<a href='#' onClick='eliminaTr(this);'><img src='../../img/menos.jpg'> Eliminar</a>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tcampo += \"</td>\";\r\n\r\n\t\t\t\t\tcampo += \"<td>&nbsp;</td>\";\r\n\t\t\t\t\tcampo += \"</tr>\";\r\n\t\t\t\t\tcampo += \"</table>\";\r\n\r\n\t\t\t\t\t$(\"#campos_direccion\").append(campo);\r\n\t\r\n\t\t\t\t\tdocument.getElementById(\"mod_direc\").value = nextinput2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n// ********************************* DINAMICOS EMAIL *************************\t\t\r\n\tvar nextinput = 0;\r\n\r\n\t\tfunction AgregarCamposEmail(){\r\n\t\t\tcorreo\t= $(\"#email\"+nextinput).val();\r\n\t\t\ttipo\t= $(\"#tipo_correo\"+nextinput).val();\r\n\r\n\t\t\terror = \"\"\r\n\t\t\tcabecera = \"Debe ingresar los siguientes datos \\n\";\r\n\t\t\t\r\n\t\t\tif(correo == \"\"){\r\n\t\t\t\terror += \" - Correo \\n\";\r\n\t\t\t}\r\n\t\t\tif(tipo == \"\"){\r\n\t\t\t\terror += \" - Tipo de correo \\n\";\r\n\t\t\t}\r\n\r\n\t\t\tif(error != \"\"){\r\n\t\t\t\talert(cabecera+error);\r\n\t\t\t}else{\r\n\r\n\t\t\t\tnextinput++;\r\n\t\r\n\t\t\t\tcampo = \"<table align='left' width='100%'>\";\r\n\t\t\t\tcampo += \"<tr>\";\r\n\t\r\n\t\t\t\tcampo += \"<td width='65px'>&nbsp;</td>\";\r\n\t\t\t\t\r\n\t\t\t\tcampo += \"<td>\";\r\n\t\r\n\t\t\t\tcampo += \"<input type='text' id='email\"+nextinput+\"' name='email\"+nextinput+\"' style='width: 290px' maxlength=100>&nbsp;\";\r\n\t\t\t\tcampo += \"<select style='width:70px' id='tipo_correo\"+nextinput+\"' name='tipo_correo\"+nextinput+\"'>\";\r\n\t\t\t\tcampo += \"<option value=''>-Tipo-</option>\";\r\n\t\t\t\t<?php for($i=0;$i<count($tipoEmail['ID_TIPO_CORREO_USUARIO']);$i++){?>\r\n\t\t\t\tcampo += \"<option value='<?=$tipoEmail['ID_TIPO_CORREO_USUARIO'][$i]?>'><?=$tipoEmail['DESCRIPCION'][$i]?></option>\";\r\n\t\t\t\t<?php }?>\r\n\t\t\t\tcampo += \"</select>\";\r\n\t\r\n\t\t\t\tcampo += \"&nbsp;<a href='#' onClick='eliminaTr(this);'><img src='../../img/menos.jpg'> Eliminar</a>\";\t\r\n\t\r\n\t\t\t\tcampo += \"</td>\";\r\n\t\t\t\t\r\n\t\t\t\tcampo += \"<td>&nbsp;</td>\";\r\n\t\r\n\t\t\t\tcampo += \"</tr>\";\r\n\t\t\t\tcampo += \"</table>\";\r\n\t\r\n\t\t\t\t$(\"#campos_email\").append(campo);\r\n\t\r\n\t\t\t\tdocument.getElementById(\"mod_email\").value = nextinput;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n// ********************************* DINAMICOS FONO *************************\t\t\r\n\t\tvar nextinput3 = 0;\r\n\t\tfunction AgregarCamposFono(){\r\n\r\n\t\t\tfono\t\t= $(\"#fono\"+nextinput3).val();\r\n\t\t\ttipo_fono\t= $(\"#tipo_fono\"+nextinput3).val();\r\n\r\n\t\t\terror = \"\"\r\n\t\t\tcabecera = \"Debe ingresar los siguientes datos \\n\";\r\n\t\t\t\r\n\t\t\tif(fono == \"\"){\r\n\t\t\t\terror += \" - Fono \\n\";\r\n\t\t\t}\r\n\t\t\tif(tipo_fono == \"\"){\r\n\t\t\t\terror += \" - Tipo de Fono \\n\";\r\n\t\t\t}\r\n\r\n\t\t\tif(error != \"\"){\r\n\t\t\t\talert(cabecera+error);\r\n\t\t\t}else{\r\n\t\t\t\r\n\t\t\t\tnextinput3++;\r\n\t\r\n\t\t\t\tcampo = \"<table align='left' width='100%'>\";\r\n\t\t\t\t\r\n\t\t\t\tcampo += \"<tr>\";\r\n\t\r\n\t\t\t\tcampo += \"<td width='65px'>&nbsp;</td>\";\r\n\t\t\t\t\r\n\t\t\t\tcampo += \"<td>\";\r\n\t\r\n\t\t\t\tcampo += \"<input type='text' id='fono\"+nextinput3+\"' name='fono\"+nextinput3+\"' style='width:290px' maxlength=30>&nbsp;\";\r\n\t\t\t\t\r\n\t\t\t\tcampo += \"<select style='width:70px' id='tipo_fono\"+nextinput3+\"' name='tipo_fono\"+nextinput3+\"'>\";\r\n\t\t\t\tcampo += \"<option value=''>-Tipo-</option>\";\r\n\t\t\t\t<?php for($i=0;$i<count($tipoFono['ID_TIPO_TELEFONO']);$i++){?>\r\n\t\t\t\tcampo += \"<option value='<?=$tipoFono['ID_TIPO_TELEFONO'][$i]?>'><?=$tipoFono['DESCRIPCION_TELEFONO'][$i]?></option>\";\r\n\t\t\t\t<?php }?>\r\n\t\t\t\tcampo += \"</select>&nbsp;\";\r\n\t\r\n\t\t\t\tcampo += \"<a href='#' onClick='eliminaTr(this);'><img src='../../img/menos.jpg'> Eliminar</a>\";\t\r\n\t\t\t\t\r\n\t\t\t\tcampo += \"</td>\";\r\n\t\t\t\t\r\n\t\t\t\tcampo += \"<td>&nbsp;</td>\";\r\n\t\t\t\t\r\n\t\t\t\tcampo += \"</tr>\";\r\n\t\t\t\tcampo += \"</table>\";\r\n\t\r\n\t\t\t\t$(\"#campos_fono\").append(campo);\r\n\t\r\n\t\t\t\tdocument.getElementById(\"mod_fono\").value = nextinput3;\r\n\t\t\t}\r\n\t\t}\r\n\t</script>\r\n\t<!-- ----------------- Fin campos dinamicos ----------- -->\r\n\t\t</td>\r\n\t</tr>\r\n\t<?php if($edicion == 1){?>\r\n\t\t<tr>\r\n\t\t\t<td colspan=\"4\" align=\"center\"><?=self::inputButton(array(\"value\"=>\"Actualizar\",\"onclick\"=>\"actualizaUsuario($id_usuario);\",\"style\"=>\"width :100px\"));?></td>\r\n\t\t</tr>\r\n\t<?php }else{?>\r\n\t<tr>\r\n\t\t<td colspan=\"4\" align=\"center\"><?=self::inputButton(array(\"value\"=>\"Guardar\",\"onclick\"=>\"insertaUsuario(this.form);\",\"style\"=>\"width :100px\"));?></td>\r\n\t</tr>\r\n\t<?php }?>\r\n</table>\r\n\r\n</form>\r\n</div>\r\n<?php\r\n\t}", "public function notificacionRegistroUsuario($user, $pass) {\n\n\n if ($this->email and $this->email->getMailer() and $user->getEmail()) {\n\n $message = $this->email->createMessage('Su cuenta en openAO ha sido creada')\n ->setFrom(array($this->remitente => 'openAO'))\n ->setTo(array($user->getEmail()))\n ->setBody($this->app->render('@NotificacionBundle/nuevousuario.twig', array(\n 'notification_title' => \"Usted ha sido registrado en el sistema de openAO\",\n 'notification_subtitle' => \"En este correo encontrará la información de su cuenta \",\n 'notification' => \"Nombre completo: \" . $user->getFullname(),\n 'notification_email' => \"Correo: \" . $user->getEmail(),\n 'notification_access' => \"Sus datos de acceso son los siguientes\",\n 'notification_username' => \"Nombre de usuario: \" . $user->getUsername(),\n 'notification_password' => \"Contraseña \" . $pass,\n 'notification_url' => $this->app->request()->getUrl().$this->app->request()->getRootUri()\n )), 'text/html');\n $this->email->getMailer()->send($message);\n }\n }", "function ajout_image2($user){\n\n include(\"../../modele/modele.php\");\n\n\n// On creer le chemin du fichier avec des variable et des extensions.\n $dossier = '../../assets/img/users/';\n $fichier = basename($_FILES['avatar']['name']);\n $taille_maxi = 1000000;\n $taille = filesize($_FILES['avatar']['tmp_name']); // ou utiliser $_FILES['avatar']['size']; \n $extensions = array('.png', '.gif', '.jpg', '.jpeg');\n $extension = strrchr($_FILES['avatar']['name'], '.');\n\n//Début des vérifications de sécurité..\n\n if(!in_array($extension, $extensions)) //Si l'extension n'est pas dans le tableau\n {\n $erreur = 'Vous devez uploader un fichier de type png, gif, jpg, jpeg, txt ou doc...';\n }\n if($taille > $taille_maxi) {\n $erreur = 'Le fichier est trop gros...';\n }\n if(!isset($erreur)) { //S'il n'y a pas d'erreur, on upload\n\n //On formate le nom du fichier ici\n $fichier = strtr($fichier, \n 'ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðòóôõöùúûüýÿ', \n 'AAAAAACEEEEIIIIOOOOOUUUUYaaaaaaceeeeiiiioooooouuuuyy'); // Permet d'accepter les caracteres speciaux et de les remplacer par des caracteres normaux.\n $fichier = preg_replace('/([^.a-z0-9]+)/i', '-', $fichier);\n // Fin formatage\n\n if(move_uploaded_file($_FILES['avatar']['tmp_name'], $dossier . $fichier)) { //Si la condition renvoie TRUE, c'est que ça a fonctionné\n echo 'Upload effectué avec succès !';\n\n// Partie requete SQL pour ajouter le nom de l'image associer à la user\n $sql = ' UPDATE user SET image= \"'.$fichier.'\" WHERE id = \"'.$user.'\" ';\n $req = $bdd -> prepare($sql);\n $req -> execute();\n// Fin de la partie requete SQL\n\n } else {\n echo 'Echec de l\\'upload !';\n }\n } else {\n echo $erreur;\n }\n}", "private function generateEmail($intermediair) {\n $this->smarty->assign('user', $intermediair);\n $q = 'SELECT * FROM `Useridemail` WHERE id = ' . $intermediair['userid'];\n $data = $this->cmsmanager->customSelectQuery($q)[0];\n $token = $this->generateToken($data['email'], $user['userid'], $user['refCode']);\n $this->smarty->assign('token', $token);\n $email = new GezinneninArmoedeEmail();\n $email->addReceiver('smelt@cardsolutions.nl');\n// //$email->addReceiver($data['email']);\n $email->setSubject('Activiteit 2020');\n $email->setHtmlBody($this->smarty->fetch(\"intermediairFormEmail.html\"));\n $email->setSender(\"info@gezinneninarmoede.nl\");\n $email->send();\n }", "protected function saveUserProfile(){\n\t\t$req = $this->postedData;\n\t\t$avatar = $req['avatar'];\n\t\t// Si un fichier est chargé, alors l'utilisateur veut certainement celui-ci comme avatar...\n\t\tif (isset($_FILES['field_string_avatarFile']) and !empty($_FILES['field_string_avatarFile']['name'])) $avatar = 'user';\n\n\t\tswitch ($avatar){\n\t\t\tcase 'default': $this->user->setAvatar('default'); break;\n\t\t\tcase 'gravatar': $this->user->setAvatar('gravatar'); break;\n\t\t\tcase 'user':\n\t\t\t\t$userAvatarFile = Sanitize::sanitizeFilename($this->user->getName()).'.png';\n\t\t\t\tif ((!isset($_FILES['field_string_avatarFile']) or empty($_FILES['field_string_avatarFile']['name'])) and !file_exists(\\Settings::AVATAR_PATH.$userAvatarFile)){\n\t\t\t\t\t// Si l'utilisateur n'a pas d'image déjà chargée et qu'il n'en a pas indiqué dans le champ adéquat, on retourne false\n\t\t\t\t\tnew Alert('error', 'Impossible de sauvegarder l\\'avatar, aucune image n\\'a été chargée !');\n\t\t\t\t\treturn false;\n\t\t\t\t}elseif(isset($_FILES['field_string_avatarFile']) and !empty($_FILES['field_string_avatarFile']['name'])){\n\t\t\t\t\t// Chargement de l'image\n\t\t\t\t\t$args = array();\n\t\t\t\t\t$args['resize'] = array('width' => 80, 'height' => 80);\n\t\t\t\t\t// Les avatars auront le nom des utilisateurs, et seront automatiquement transformés en .png par SimpleImages\n\t\t\t\t\t$args['name'] = $this->user->getName().'.png';\n\t\t\t\t\t$avatarFile = Upload::file($_FILES['field_string_avatarFile'], \\Settings::AVATAR_PATH, \\Settings::AVATAR_MAX_SIZE, \\Settings::ALLOWED_IMAGES_EXT, $args);\n\t\t\t\t\tif (!$avatar) {\n\t\t\t\t\t\tnew Alert('error', 'L\\'avatar n\\'a pas été pris en compte !');\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$this->user->setAvatar($avatarFile);\n\t\t\t\t}else{\n\t\t\t\t\t// Si l'utilisateur a déjà une image chargée et qu'il n'en a pas indiqué de nouvelle, on lui remet celle qu'il a déjà.\n\t\t\t\t\t$this->user->setAvatar($userAvatarFile);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'ldap': $this->user->setAvatar('ldap');\n\t\t}\n\t\t// L'authentification via LDAP ramène déjà le nom l'adresse email et la gestion du mot de passe\n\t\tif (AUTH_MODE == 'sql'){\n\t\t\tif (!isset($req['name'])){\n\t\t\t\tnew Alert('error', 'Vous n\\'avez pas indiqué le nom d\\'utilisateur !');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!isset($req['email'])){\n\t\t\t\tnew Alert('error', 'Vous n\\'avez pas indiqué l\\'adresse email !');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$name = htmlspecialchars($req['name']);\n\t\t\tif (UsersManagement::getDBUsers($name) != null and $name != $this->user->getName()){\n\t\t\t\tnew Alert('error', 'Ce nom d\\'utilisateur est déjà pris !');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$email = $req['email'];\n\t\t\tif (!\\Check::isEmail($email)){\n\t\t\t\tnew Alert('error', 'Le format de l\\'adresse email que vous avez saisi est incorrect !');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$currentPwd = (isset($req['currentPwd'])) ? $req['currentPwd'] : null;\n\t\t\t$newPwd = (isset($req['newPwd'])) ? $req['newPwd'] : null;\n\t\t\tif (!empty($newPwd)){\n\t\t\t\t// On vérifie que le mot de passe actuel a bien été saisi\n\t\t\t\tif (!ACL::canAdmin('admin', 0) and empty($currentPwd)){\n\t\t\t\t\tnew Alert('error', 'Vous avez saisi un nouveau mot de passe sans saisir le mot de passe actuel !');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// On vérifie que le mot de passe actuel est correct\n\t\t\t\tif (!ACL::canAdmin('admin', 0) and Login::saltPwd($currentPwd) != $this->user->getPwd()){\n\t\t\t\t\tnew Alert('error', 'Le mot de passe actuel que vous avez saisi est incorrect !');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// On vérifie que le nouveau mot de passe comporte bien le nombre minimum de caractères requis\n\t\t\t\tif (strlen($newPwd) < \\Settings::PWD_MIN_SIZE){\n\t\t\t\t\tnew Alert('error', 'Le mot de passe doit comporter au moins '.\\Settings::PWD_MIN_SIZE.' caractères !');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$this->user->setPwd($newPwd);\n\t\t\t}\n\t\t}\n\n\t\tif (UsersManagement::updateDBUser($this->user)){\n\t\t\t$msg = ($this->user->getId() == $GLOBALS['cUser']->getId()) ? '' : 'de '.$this->user->getName().' ';\n\t\t new Alert('success', 'Les paramètres du profil '.$msg.'ont été correctement sauvegardés !');\n\t\t\treturn true;\n\t\t}else{\n\t\t\tnew Alert('error', 'Echec de la sauvegarde des paramètres !');\n\t\t\treturn false;\n\t\t}\n\t}", "public function restablecer2(Request $request)\n {\n $email = $request->email;\n $mail = User::where('email',$email)->first();\n if(isset($mail)){\n Mail::to($mail)->send(new Restablecer($mail->id));\n echo \"Solicitud recibida!!!<br>Se te ha enviado un correo electronico para restablecer la contraseña!!\";\n }else{\n echo \"Correo no válido!!\";\n }\n }", "function trataImagem($nomeIntegrador=false){\n\t\t$this->enviaMensagemTelegramWeb(\"\\xF0\\x9F\\x94\\xB4\\xF0\\x9F\\x94\\xB4 ATENCAO \\xF0\\x9F\\x94\\xB4\\xF0\\x9F\\x94\\xB4\");\n\t\t$this->enviaMensagemTelegramWeb(\"=====================%0A \\xF0\\x9F\\x98\\xB1 FALHA $nomeIntegrador \\xF0\\x9F\\x98\\xB1%0A=====================%0APor Favor Resolva a imagem abaixo!%0AResponda: /resp SoLuCao\");\n\t\t$this->enviaImagem();\n\t\t$this->monitoraRespostaImagem();\n\t}", "protected function SendRequestMail(){\n\n\t\t\t\tif(\n\t\t\t\t\tisset($this->parent) && is_object($this->parent)\n\n\t\t\t\t\t&& isset($this->parent->email) && is_string($this->parent->email)\n\n\t\t\t\t\t&& isset($this->parent->user) && is_array($this->parent->user)\n\n\t\t\t\t){\n\n\t\t\t\t\t$to = $this->parent->email;\n\n\t\t\t\t\t$lnk = \\_native::setvar(\\_native::varn('LOGIN_PAGE')) . $this->FACTORY_URL_PARAM \n\t\t\t\t\t\t\n\t\t\t\t\t\t. '&reference='.\\_nativeCrypt::encoder(\\date(\\_native::DATETIMEM_NUM), 'BASE64')\n\t\t\t\t\t\t\n\t\t\t\t\t\t. '&app=-'.\\_nativeCrypt::encoder(\\date(\\_native::TIME_NUM), 'BASE64')\n\t\t\t\t\t\t\n\t\t\t\t\t\t. '&tmp=' . $this->codex \n\t\t\t\t\t\t\n\t\t\t\t\t\t. '&email=' . $to\n\n\t\t\t\t\t\t;\n\n\t\t\t\t\t\n\t\t\t\t\t$title = 'Réinitialisation de mot de passe';\n\t\t\t\t\t\n\t\t\t\t\t$about = 'Commencez maintenant';\n\t\t\t\t\t\n\t\t\t\t\t$message = ''.ucwords($this->user['USERNAME']).',<p>Vous avez demandez à reinitialiser votre mot de passe. Pour cela vous devez suivre les instructions à la suite de ce lien.';\n\n\t\t\t\t\t\t$message .= '<br><br><b>NB</b><span class=\"mac\"> : Ce lien est valide quelque temps après la demande de réinitialisation de mot de passe.</span>.';\n\t\t\t\t\t\n\t\t\t\t\t$buttons = array(\n\n\t\t\t\t\t\t'active.now' => array(\n\n\t\t\t\t\t\t\t'title' => 'Réinitialisation du mot de passe'\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t,'link' => $lnk\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t,'focus' => true\n\n\t\t\t\t\t\t)\n\n\t\t\t\t\t);\n\n\n\t\t\t\t\t$c = \\GUSERS::mailTemplate($title, $about, $message, $buttons);\n\t\t\t\t\t\n\t\t\t\t\t$s = \\_native::varn('SITENAME') . ' - ' . $title;\n\n\t\t\t\t\t$h = 'MIME-Version: 1.0' . \"\\r\\n\";\n\n\t\t\t\t\t$h .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\n\n\t\t\t\t\t$h .= 'From: ' . \\_native::varn('SITENAME') . ' <no.reset.password@' . $_SERVER['HTTP_HOST'] . '>' . \"\\r\\n\";\n\n\t\t\t\t\t/* \n\t\t\t\t\t\tEnvoie \n\t\t\t\t\t*/\n\t\t\t\t\tif(@mail($to, $s, $c, $h)){\n\n\t\t\t\t\t\treturn true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse{\n\n\t\t\t\t\t\t$this->because('attempt.rup.request.mail.send.failed');\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse{\n\n\t\t\t\t\t$this->because('attempt.rup.request.mail.param.not.found');\n\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\n\t\t\t}", "function createEmail($from_email, $from_name, $id_user) {\n $result = $this->getNewEmailId($id_user); //Contiene le email dell'utente con data a null\n if (mysql_num_rows($result) > 0) {//Se vi sono email pregresse ritorna la lista delle email pregresse\n return $result;\n }\n if ($this->connectToMySql()) {\n $query = sprintf(\"INSERT INTO scuola.email_store(from_email, from_name, id_user, subject, body) VALUES ('%s','%s', '%s', '<NO SUBJECT>', '<NO BODY>')\", $from_email, $from_name, $id_user);\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n }//else\n //setcookie('message','Creata nuova Email');\n }\n $this->closeConnection();\n return $result;\n }", "function form_upload_picture() {\n $user = $this->ion_auth->user()->row();\n $this->load->view('portofolio/form_update_foto', $user);\n }", "function mailCreaPersona($datos=null){\t\t\t\n\t\t\t\t$mail = new PHPMailer;\n\t\t\t\t\t$mail->isSMTP();\n\t\t\t\t\t$mail->SMTPDebug = 0;\n\t\t\t\t\t$mail->Debugoutput = 'html';\n\t\t\t\t\t$mail->Host =@$this->config->item('anfitrion');\n\t\t\t\t\t$mail->Port =@$this->config->item('puerto');\n\t\t\t\t\t$mail->Username =@$this->config->item('usuario');\n\t\t\t\t\t$mail->Password =@$this->config->item('clave');\n\t\t\t\t\t$mail->SMTPAuth = true;\n\t\t\t\t\t$mail->SMTPSecure = 'ssl';\n\t\t\t\t\t$mail->setFrom(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t\t$mail->addReplyTo(@$this->config->item('correoSistema'),utf8_decode(@$this->config->item('usuarioSistema')));\n\t\t\t\t$mail->addAddress($datos['correoUsuario']);\n\t\t\n\t\t\t\t$subject = utf8_decode('Correo Registro ANALISIS');\n\t\t\t\t$clavemsj= \"<B>Clave Temporal: </B>\".$datos['claveTemp'].\"<br><br>\";\n\t\t\t\t$pagina=\"<a style='color:#4257F9' href='\".@$this->config->item('enlaceSistema').\"'>\".\"www.madeinbarter.com</a>\".\"<br><br>\";\n\t\t\t\t\t$mensaje = \"<h3> Estimado/a, \n\t\t\t\t\t\t\t\t<br>Usuario<br><br>\n\t\t\t\t\t\t\t\tA continuaci&oacute;n termine el registro con los datos siguientes:<br> \n\t\t\t\t\t\t\t\t<br>E_mail: \".$datos['correoUsuario']\n\t\t\t\t\t\t\t\t.\"<br>\".$clavemsj.\"<br>\"\n\t\t\t\t\t\t\t\t.\"Referido Por: \".$datos['referido'].\"<br>\"\n\t\t\t\t\t\t\t\t.\"Ingresando en la siguiente p&aacute;gina: \".$pagina;\n\t\t\t\t\t$mail->Subject = $subject;\n\t\t\t\t\t$mail->msgHTML($mensaje);\t\n\t\t\t\t\tif (!$mail->send()) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\t\t\n\t}", "function send_mail($item){\n $mail = new PHPMailer;\n $mail->setFrom('info@quangdung.com.vn', 'Website administrator');\n //Set an alternative reply-to address\n $mail->addReplyTo($item['email'], $item['name']);\n //Set who the message is to be sent to\n $mail->addAddress('czanubis@gmail.com');\n //Set the subject line\n $mail->isHTML(true);\n $mail->CharSet = 'UTF-8';\n $mail->Subject = 'Contact sent from website';\n //Read an HTML message body from an external file, convert referenced images to embedded,\n //convert HTML into a basic plain-text alternative body\n //$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));\n //Replace the plain text body with one created manually\n $mail->Body = '\n <html>\n <head>\n \t<title>'.$mail->Subject.'</title>\n </head>\n <body>\n \t<p>Full Name: '.$item['name'].'</p>\n \t\n \t<p>Address: '.$item['adds'].'</p>\n \t<p>Phone: '.$item['phone'].'</p>\n \t\n \t<p>Email: '.$item['email'].'</p>\n <p>Tiêu Đề: '.$item['fax'].'</p>\n \t<p>Content: '.nl2br($item['content']).'</p>\n </body>\n </html>\n ';\n //Attach an image file\n //$mail->addAttachment('images/phpmailer_mini.png');\n \n //send the message, check for errors\n //$mail->send();\n if ($mail->send()) {\n echo \"Message sent!\";\n } else {\n echo \"Mailer Error: \" . $mail->ErrorInfo;\n }\n }", "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 users($userid=0){\n\t if(!$this->phpsession->get('ciAdmId')){ redirect($this->config->item('base_url').'r/k/admin'); }\n\t\n if($userid > 0){\n //resend verification mail to user\n $___user = $this->U_Model->getUserById($userid);\n\n $activationcode = $___user->activationcode;\n $verification_code=$userid * 32765;\n // Create link for verification\n $link = \"<a href='\".$this->config->item('base_url').\"register/register_verify/\".$activationcode.\"'>\".$this->config->item('base_url').\"register/register_verify/\".$activationcode.\"</a>\";\n\n $this->load->model('SystemEmail_Model','SE_Model');\n\n $admin_email= $this->SE_Model->getAdminEmails();\n $mail_content= $this->SE_Model->getEmailById(1);\n//print_r($mail_content); exit;\n //Email Sending Code\n $this->load->library('email');\n $this->email->from($admin_email->value,'Wraters');\n $this->email->to($___user->email); // \n $this->email->subject($mail_content->subject);\n\n $message = str_replace(\"[link]\", $link, $mail_content->message);\n $message = str_replace(\"[[username]]\", $___user->first_name, $message);\n $message = str_replace(\"[[email]]\", $___user->email, $message);\n $message = str_replace(\"[[verificationcode]]\", $verification_code, $message);\n $message = str_replace(\"[[password]]\", base64_decode($___user->base_password), $message);\n \n \n $content_message = str_replace(\"[sitename]\", $this->config->item('base_site_name'), $message);\n\n $emailPath = $this->config->item('base_abs_path').\"templates/\".$this->config->item('base_template_dir');\n $email_template = file_get_contents($emailPath.'/email/email.html');\n \n\n $email_template = str_replace(\"[[EMAIL_HEADING]]\", $mail_content->subject, $email_template);\n $email_template = str_replace(\"[[EMAIL_CONTENT]]\", utf8_encode($content_message), $email_template);\n $email_template = str_replace(\"[[SITEROOT]]\", $this->config->item('base_url'), $email_template);\n $email_template = str_replace(\"[[LOGO]]\",$this->config->item('base_url').\"templates/\".$this->config->item('base_template_dir'), $email_template);\n\n $this->email->message(html_entity_decode(($email_template)));\n //echo html_entity_decode(($email_template));\n\n $this->email->send();\n\n //$this->phpsession->save('success_msg',\"Verification email successfully send to '\".$___user->first_name.\" \".$___user->last_name.\"'.\");\n\t\t $this->message->setMessage(\"Verification email successfully send to '\".$___user->first_name.\" \".$___user->last_name.\"'.\", \"SUCCESS\" );\t\n redirect($this->config->item('base_url').\"admin/users/\");\n \n }\n\n $data = array('users' => '', 'PAGING' => '', 'search' => '-','signup'=>'-','orderby'=>'-','fn'=>'-','status'=>'-');\n $this->load->helper(array('pagination'));\n $array = $this->uri->uri_to_assoc(3);\n\n $pages = (@$array['pages']?$array['pages']:1);\n $page = (@$array['page']?$array['page']:1);\n\n $orderb = (@$array['orderby']?@$array['orderby']:\"asc\"); $data['orderby'] = $orderb;\n $fn = (@$array['fn']?@$array['fn']:\"first_name\"); $data['fn'] = $fn;\n $status = (@$array['status']?@$array['status']:\"-\"); $data['status'] = $status; \n $isverified = (@$array['isverified']?@$array['isverified']:\"-\"); $data['isverified'] = $isverified; \n $orderby = $fn.\" \".$orderb;\n\n $data['search'] = (@$array['search']?$array['search']:'-');\n $data['signup'] = (@$array['signup']?$array['signup']:'-');\n\n \n if(strlen(trim($this->input->post('submit'))) > 0){ \n $user_ids = implode(\",\",$this->input->post('checbox_ids'));\n $action = $this->input->post('action'); \n $message = $this->U_Model->users_operations(array('user_ids' => $user_ids),$action);\n\t\t\n\t\t\t\n // echo $this->db->last_query();exit;\n //$this->phpsession->save('success_msg',$message);\n $this->message->setMessage($message,\"SUCCESS\");\n }\n\n $PAGE = $page;\n $PAGE_LIMIT = $this->U_Model->countUsersBySearch($data['search'],$data['signup'],$status,$isverified); //20;\n $DISPLAY_PAGES = 25;\n $PAGE_LIMIT_VALUE = ($PAGE - 1) * $PAGE_LIMIT;\n\n if($this->input->post('signup')!='')\n {\n $data['signup'] = $this->input->post('signup'); \n }\n \n // Get posted search value in variables\n \n $data['search'] = ($this->input->post('search')?trim($this->input->post('search')):$data['search']);\n $data['signup']= ($this->input->post('signup')?trim($this->input->post('signup')):$data['signup']);\n \n // Count total users\n $total = $this->U_Model->countUsersBySearch($data['search'],$data['signup'],$status,$isverified);\n//print_r($this->db->last_query());\n $PAGE_TOTAL_ROWS = $total;\n $PAGE_URL = $this->config->item('base_url').'admin/users/fn/'.$fn.'/orderby/'.$orderb.'/search/'.$data['search'].'/signup/'.$data['signup'].'/status/'.$status.'/isverified/'.$isverified;\n $data['PAGING'] = pagination_assoc($PAGE_TOTAL_ROWS,$PAGE_LIMIT,$DISPLAY_PAGES,$PAGE_URL,$page,$pages);\n // Pagination end\n \n // Get all users\n $data['users'] = $this->U_Model->users($PAGE_LIMIT_VALUE,$PAGE_LIMIT,$data['search'],$orderby,$data['signup'],$status,$isverified);\n\n // set variable to show active menu \n $data['menutab'] = 'network';\n $data['menuitem'] = 'users';\n $this->load->view($this->config->item('base_template_dir').'/admin/users', $data);\n\n }", "function sendEmail($email, $type){\n $to = $email;\n $from = \"contact@book-kevin-guillier.com\"; // adresse MAIL OVH liée à l'hébergement.\n\n $Subject = \"Support FindTeamMates\";\n\n $mail_Data = '<p>Bonjour</p>';\n\n $headers = \"MIME-Version: 1.0 \\n\";\n $headers .= \"Content-type: text/html; charset=iso-8859-1 \\n\";\n $headers .= \"From: $from \\n\";\n $headers .= \"Reply-To: $email \\n\";\n\n // Message de Priorité haute\n\n $headers .= \"X-Priority: 1 \\n\";\n $headers .= \"X-MSMail-Priority: High \\n\";\n\n $CR_Mail = TRUE;\n\n $CR_Mail = @mail ($to, $Subject, $mail_Data, $headers);\n\n if ($CR_Mail === FALSE){\n return false;\n }\n else{\n include '../Bdd/connexion_user.php';\n\n include_once 'Ip.php';\n $ipProvider = new Ip();\n $adressTrackingIp = $ipProvider->get_ip();\n\n include_once 'User.php';\n $userProvider = new User();\n $idUser = $userProvider->getUserByEmail($email);\n\n try{\n $sql = $bdd->prepare(\"INSERT INTO tracking_ip(adress_tracking_ip, date_tracking_ip, type_tracking_ip, id_user) VALUES (:ip_client)\");\n $sql->bindParam(':adress_tracking_ip', $adressTrackingIp);\n $sql->bindParam(':date_tracking_ip', date(\"Y-m-d H:i\"));\n $sql->bindParam(':type_tracking_ip', $type);\n $sql->bindParam(':id_user', $idUser);\n $sql->execute();\n\n return true;\n }\n catch (Exception $e){\n $error = $e->getCode();\n $errorMessage = $e->getMessage();\n\n return false;\n }\n }\n }", "public function createnotification($id='',$name='',$htmls='',$header='',$buttonhtml='',$pass_url='',$path='',$subject='',$to_email='')\n { \n $email_path = file_get_contents($path);\n $cur_year = date('Y');\n $email_content = array('[name]','[pass_url]','[htmls]','[buttonhtml]','[header]','[cur_year]');\n $replace = array($name,$pass_url,$htmls,$buttonhtml,$header,$cur_year);\n $message = str_replace($email_content,$replace,$email_path);\n $header = 'From: '.env(\"IMAP_HOSTNAME_TEST\").'' . \"\\r\\n\";\n $header .= \"MIME-Version: 1.0\\r\\n\";\n $header .= \"Content-type: text/html\\r\\n\";\n $retval = mail($to_email,$subject,$message,$header); \n if($retval)\n {\n return true; \n }else\n {\n return false;\n }\n }", "function checkForEmailNotification($kind, $picture_id)\n{\n $userManager = new UserManager();\n $pictureManager = new PictureManager();\n\n $users = $userManager->getUsers();\n $pictures = $pictureManager->getPictures(\"\");\n\n $user = $users->fetchAll();\n $picture = $pictures->fetchAll();\n\n if ($user && $picture && $kind != '' && $picture_id > 0)\n {\n for ($i = 0; $picture[$i]; $i++)\n {\n if ($picture_id == $picture[$i]['picture_id'])\n {\n $picture_was_taken_by = $picture[$i]['user_id'];\n }\n }\n for ($i = 0; $user[$i]; $i++)\n {\n if ($picture_was_taken_by == $user[$i]['user_id'])\n {\n if ($user[$i]['notifications'] == 1)\n {\n $name = $user[$i]['user_name'];\n $email = $user[$i]['user_email'];\n sendNotificationEmail($kind, $name, $email, $picture_id); \n }\n }\n }\n }\n}", "function addUser()\n{\n\tglobal $xoopsDB, $myts, $xoopsConfig, $xoopsModule, $dirname, $men_erro,$usa_perf;\n\n\t$user_name = $myts->makeTboxData4Save($_POST['user_name']);\n\t$user_nick = $myts->makeTboxData4Save($_POST['user_nick']);\n\t$user_mail = $myts->makeTboxData4Save($_POST['user_mail']);\n//\t$user_host = $myts->makeTboxData4Save($_SERVER['REMOTE_HOST']);\n\t$user_host = $myts->makeTboxData4Save(gethostbyaddr($_SERVER['REMOTE_ADDR']));\n\n\t$query = \"SELECT * FROM \". $xoopsDB->prefix('xmail_newsletter').\" WHERE user_email='$user_mail' \";\n\t$myarray = $xoopsDB->fetchArray($xoopsDB->query($query));\n\n\t$xoopsMailer =& getMailer();\n\t$xoopsMailer->useMail();\n\t// Herv�\n\t$xoopsMailer->setTemplateDir(XOOPS_ROOT_PATH.'/modules/'.$dirname.'/language/'.$xoopsConfig['language'].'/mail_template');\n if($usa_perf) {\n \t$xoopsMailer->setTemplate(\"confirm_email_perf.tpl\");\n }else {\n \t$xoopsMailer->setTemplate(\"confirm_email.tpl\");\n }\n \n \n \n\tif (!$myarray) {\t// New User\n\t\t$better_token = md5(uniqid(rand(), 1));\n\t\t$query = \"INSERT INTO \" . $xoopsDB->prefix('xmail_newsletter') . \" (user_id, user_name, user_nick, user_email, user_host, user_conf, user_time) \";\n\t\t$query .= \"VALUES (0, '$user_name', '$user_nick', '$user_mail', '$user_host', '$better_token', NOW())\";\n\t\t$result = $xoopsDB->queryF($query);\n if(!$result) {\n echo \"erro na inclus�o $query \";\n return ;\n }\n // incluir em xmail_perfil_news $_POST['id_perf']\n // pegar user_id incluso\n $user_id=$xoopsDB->getInsertId();\n\t\t\n // incluir perfil\n\t\tinclude XOOPS_ROOT_PATH.'/modules/xmail/xnews_incperfil.php'; \n \n \n\t\t$confirm_url = XOOPS_URL .'/modules/xmail/include/xmail_ativa.php?id='.$better_token;\n\t\t$xoopsMailer->setToEmails($_POST['user_mail']);\n\t\t$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);\n\t\t$xoopsMailer->setFromName($xoopsConfig['sitename']);\n\t\t$xoopsMailer->setSubject(_MD_XMAIL_CONFIRM_SUBJECT);\n\t\t$xoopsMailer->assign('X_UNAME',$user_name);\n\t\t$xoopsMailer->assign('X_CONTACT_NAME',$xoopsConfig['adminmail']);\n\t\t$xoopsMailer->assign('VALIDATION_URL',$confirm_url);\n\t\t$xoopsMailer->assign('PERFIL_DEF',$perfil_definido);\n\t\t\n\t\tif ($xoopsMailer->send()) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn -2;\n\t\t}\n\n\t} elseif ($myarray['confirmed'] == '0') {\t//Still Needs Confirmation\n\t\t$user_id=$myarray['user_id'];\n\t\t// incluir perfil\n\t\tinclude XOOPS_ROOT_PATH.'/modules/xmail/xnews_incperfil.php'; \n\t\n\t\t$confirm_url = XOOPS_URL .'/modules/xmail/include/xmail_ativa.php?id='.$myarray['user_conf'];\n\t\t$xoopsMailer->setToEmails($myarray['user_email']);\n\t\t$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);\n\t\t$xoopsMailer->setFromName($xoopsConfig['sitename']);\n\t\t$xoopsMailer->setSubject(_MD_XMAIL_CONFIRM_SUBJECT);\n\t\t$xoopsMailer->assign('X_UNAME',$user_name);\n\t\t$xoopsMailer->assign('X_CONTACT_NAME',$xoopsConfig['adminmail']);\n\t\t$xoopsMailer->assign('VALIDATION_URL',$confirm_url);\n\t\t$xoopsMailer->assign('PERFIL_DEF',$perfil_definido);\n\t\tif ($xoopsMailer->send()) {\n\t\t\treturn 2;\n\t\t} else {\n\t\t\treturn -2;\n\t\t}\n\t\n\t} else { // Duplicate Email in db\n\t\treturn -1;\n\t}\n}", "public function soumettre(Request $request)\n {\n $avatarPath = $request->session()->get('avatarPath');\n\n $dossier = 'storage/imagesSubmits/';\n $user=Auth::User()->id;\n $avatars=Avatar::all();\n foreach($avatars as $avatar){\n $userId = $avatar->user_id;\n $imageValide = $avatar->imageValider;\n if ($userId==$user and $imageValide == false){\n $avatar->delete();\n }\n /*if($avatar==$user){\n echo ('trouve doublon de '.$username);\n }*/\n }\n $avatarName=$_POST['publierNom'];\n $avatar = new Avatar();\n $avatar->user_id = $user;\n $avatar->imageUrl = $avatarName;\n $avatar->save();\n //recupere l'extension du nom de l'image\n $avatarHeader = 'image/'.substr(strrchr($avatarName, '.'),1);\n //sauvegarde de l'image cropped apres encodage(balise canvas)/decodage Base64\n \\header($avatarHeader);\n $avatarBase64=$_POST['publierHref'];\n //on retire le MINE-type et le mot clé present pour ne recuperer que la data de l'encodage\n $avatarBase64= substr(strrchr($avatarBase64,','),1);\n $avatarData=base64_decode($avatarBase64);\n $avatarImage=imagecreatefromstring($avatarData);\n imagejpeg($avatarImage,$dossier.$avatarName);\n\n return view ('profile.profile',compact('avatarPath'));\n }", "function activationEnvoiMail($login, $jeton,$info) {\n\t\t$headers ='From: \"'.$info['nom'].' '.$info['prenom'].'\"'.$info['email'].''.\"\\n\";\n\t\t$headers .='Reply-To: ftgraphisme@gmail.com'.\"\\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(\"ftgraphisme@gmail.com\", $sujet, $message, $headers);\n\t}", "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 }", "function pmail($m, $r)\n{\n $mail = new PHPMailer(true);\n\n try {\n //Server settings\n $mail->SMTPDebug = false;\n $mail->isSMTP();\n $mail->Host = 'smtp.gmail.com';\n $mail->CharSet = 'UTF-8';\n $mail->SMTPAuth = true;\n $mail->Username = 'justtestingmag69@gmail.com';\n $mail->Password = 'peerlessmag33'; // SMTP password\n $mail->SMTPSecure = 'ssl';\n $mail->Port = 465;\n\n\n //Recipients \n $mail->setFrom('example@example.com', 'Example');\n \n \n $mail->addReplyTo('example@example.com');\n \n $mail->addAddress($r['mail'], $r['name']); // Add a recipient\n\n\n // Attachments\n //$mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments\n //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name\n\n\n\n // $mail->AddEmbeddedImage('files/source/main.png', 'logo','main');\n\n $mail->isHTML(true);\n\n if ($m['mess'] == \"issue1\") {\n $message = $m['content'];\n } else if ($m['mess'] == \"confirm\" || $m['mess'] == \"recovery\") {\n // Content\n $message = '<style type=\"text/css\">\n title{text-align:center;}\n </style>\n <table width=\"100%\" style=\"text-align:center;\" cellspacing=\"0\" cellpadding=\"0\">\n <tr>\n <td>\n <table cellspacing=\"0\" cellpadding=\"0\" style=\"margin:auto;\">\n <tr>\n <td width=\"100%\" align=\"center\" style=\"border-radius: 2px;\">\n <a href=\"\" target=\"_blank\" style=\" border-radius: 2px;display:block;margin:auto;text-align:center;color:#fff;\">\n <img alt=\"portal\" src=\"\" \n width=\"200px\" style=\"display: block;margin:auto;\"> \n </a>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n</table>\n<table style=\"width:100%;text-align:center;\">\n <tr>\n <td>\n <h1 style=\"padding:4px;border-radius: 2px;font-family: Georgia;color: #000000;text-decoration: none;\"><style>table{width:100%;text-align:center;}</style>' . (($m['mess'] == \"confirm\") ? \"Confirm Your Email Address\" : \"Recover Your Password\") . '</h1>\n <td></tr>\n </td>\n </table>\n</tr>\n </table>\n \n \n <table width=\"100%\" style=\"text-align:center;\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n <td>\n <table style=\"margin:auto;\">\n <tr>\n <td>\n <span style=\"padding:4px;border-radius: 2px;font-family: Georgia;font-size: 18px; color: #000000;text-decoration: none;\">Your ' . (($m['mess'] == \"confirm\") ? \"confirmation\" : \"Recovery\") . ' code is below - enter it into your open browser or click on the link</span>\n <br></br>\n <span style=\"padding:4px;border-radius: 2px;font-family: Georgia;font-size: 18px; color: #000000;text-decoration: none;\">Please enter the code exactly how it is here into your browser</span>\n <td></tr>\n </table>\n </td>\n</tr>\n </table>\n<br></br>\n<br></br>\n<br></br> \n<table width=\"100%\" style=\"text-align:center;\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n <td>\n <table style=\"text-align:center;\" width=\"100%\">\n<tr>\n <td align=\"center\" valign=\"middle\" style=\"\">\n <a target=\"_blank\" href=' . $m['url'] . ' style=\"background-color:#ffa500; display: block; padding: 12px;max-width:700px; text-transform: capitalize;text-align:center;border-radius: 2px;font-family: Georgia;font-weight: 500; font-size: 14px;color:#ffffff;text-decoration: none;\">' . (($m['mess'] == \"confirm\") ? \"confirmation\" : \"Recovery\") . '</a>\n </td>\n</tr>\n </td>\n </table>\n</tr>\n </table>\n\n<br></br>\n\n<table width=\"100%\" style=\"text-align:center;\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n <td>\n <table style=\"margin:auto;\">\n <tr>\n <td>\n <span style=\"padding:4px;border-radius: 2px;font-family: Georgia;font-size: 18px; color: #000000;text-decoration: none;\">If you didn\\'t request this email, there\\'s nothing to worry about - you can safely ignore it.</span>\n <td></tr>\n </td>\n </table>\n</tr>\n </table>'; //end herrre\n } else if ($m['mess'] == \"save\") {\n $message = '\n <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n <tr>\n <td>\n <table cellspacing=\"0\" cellpadding=\"0\" style=\"margin:auto;\">\n <tr>\n <td align=\"center\" style=\"border-radius: 2px;\">\n <a href=\"/link/\" target=\"_blank\" style=\"padding: 8px 12px; border-radius: 2px;font-family: Helvetica, Arial, sans-serif;margin:auto;color: #ffffff;text-align:center;text-decoration: none;\">\n <img src=\"/link/\" width=\"200px\" style=\"display: block;\n margin:auto;\"> \n </a>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n</table>\n<table style=\"width:100%;text-align:center;\">\n <tr>\n <td>\n <style>table{width:100%;text-align:center;}</style>\n <h1 style=\"padding:4px;border-radius: 2px;font-family: Georgia;color: #000000;text-decoration: none;\">Profile Changes</h1>\n <td></tr>\n </td>\n </table>\n</tr>\n </table>\n \n \n <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n <td>\n <table style=\"margin:auto;\">\n <tr>\n <td>\n <span style=\"padding:4px;border-radius: 2px;font-family: Georgia;font-size: 18px; color: #000000;text-decoration: none;\">Hello You Made Changes To Your Profile Earlier...Click The Link Below To Save Your Settings</span>\n <td></tr>\n </td>\n </table>\n</tr>\n </table>\n<br></br>\n<br></br>\n<br></br> \n<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n <td>\n <table width=\"100%\">\n<tr>\n <td align=\"center\" valign=\"middle\" style=\"\">\n <a target=\"_blank\" href=' . $m['url'] . ' style=\"background-color:#ffa500; display: block; padding: 12px;max-width:700px; text-transform: capitalize;text-align:center;border-radius: 3px;font-family: Georgia;font-weight: 500; font-size: 14px;color:#ffffff;text-decoration: none; font-style: normal; \">Save Settings</a>\n </td>\n</tr>\n </td>\n </table>\n</tr>\n </table>\n\n<br></br>\n<br></br>\n\n<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n <td>\n <table style=\"margin:auto;\">\n <tr>\n <td>\n <span style=\"padding:4px;border-radius: 2px;font-family: Georgia;font-size: 18px; color: #000000;text-decoration: none;\">If you didn\\'t request this email, there\\'s nothing to worry about - you can safely ignore it.</span>\n <td></tr>\n </td>\n </table>\n</tr>\n </table>'; //end herrre\n\n } else if ($m['mess'] == \"notify\") {\n\n $message = '\n <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n <tr>\n <td>\n <table cellspacing=\"0\" cellpadding=\"0\" style=\"margin:auto;\">\n <tr>\n <td width=\"100%\" align=\"center\" style=\"border-radius: 2px;\">\n <a href=\"/link/\" target=\"_blank\" style=\" border-radius: 2px;display:block;margin:auto;text-align:center;color:#fff;\">\n <img alt=\"/link/\" src=\"/link/\" width=\"200px\" style=\"display: block;margin:auto;\"> \n </a>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n</table>\n<table style=\"width:100%;text-align:center;\">\n <tr>\n <td>\n \n <h1 style=\"padding:4px;border-radius: 2px;font-family: Georgia;color: #000000;text-decoration: none;\">New Articles Ready For Review<style>table{width:100%;text-align:center;}</style></h1>\n <td></tr>\n </td>\n </table>\n</tr>\n </table>\n\n <br></br>\n <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n <td>\n <table style=\"margin:auto;\">\n <tr>\n <td>\n <span style=\"padding:4px;border-radius: 2px;font-family: Georgia;font-size: 18px; color: #000000;text-decoration: none;\">Hello ' . $r['name'] . ' You Have Up To 5 or More Waiting For Your Approval Click On The Button Below To Login.</span>\n\n<br></br>\n<br></br>\n\n<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n <td>\n <table width=\"100%\">\n<tr>\n <td align=\"center\" valign=\"middle\" style=\"\">\n <a target=\"_blank\" href=' . $m['url'] . ' style=\"background-color:#ffa500; display: block; padding: 12px;max-width:700px; text-transform: capitalize;text-align:center;border-radius: 2px;font-family: Georgia;font-weight: 500; font-size: 14px;color:#ffffff;text-decoration: none; font-style: normal;\">Login</a>\n </td>\n</tr>\n </td>\n </table>\n</tr>\n </table>\n\n<br></br>\n<br></br>\n<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">\n<tr>\n <td>\n <table style=\"margin:auto;\">\n <tr>\n <td>\n <span style=\"padding:4px;border-radius: 2px;font-family: Georgia;font-size: 18px; color: #000000;text-decoration: none;\">If this email doesn\\'t seem familiar to you, there\\'s nothing to worry about - you can safely ignore it.</span>\n <td></tr>\n </td>\n </table>\n</tr>\n </table>';\n\n } else if ($m['mess'] == \"ninfo\") {\n $message = $m['info'];\n }\n $mail->Subject = $m['subject'];\n $mail->Body = $message;\n $mail->send();\n return true;\n } catch (Exception $e) {\n return false;\n }\n}", "public function noticia_update_form()\r\n {\r\n $array = [\r\n 'user_info' => $this->user->infoUser(),\r\n ];\r\n $post = new PostFix();\r\n $array['info_post'] = $post->getPostId($_GET['id']);\r\n $this->loadTemplate('noticias/update_img', $array);\r\n }", "function Send_mail($to_email, $emailkey) \n{\n $random_number = Random_xkcd();\n $image_url = Image_url($random_number);\n $attachment_data = Attachment_data($image_url);\n $attachment_name = \"xkcd$random_number.jpeg\";\n $server_name = 'localhost';\n $eol = PHP_EOL;\n $from = FROM ;\n\n $subject = 'xkcd';\n $body = \"<img src=$image_url><br>\n <a href='$server_name/php-parasdalsaniya/unsubscribe.php?usersign=$emailkey'>\n Unsubscrib Here;\n </a>\";\n $separator = md5(time());\n\n $headers = '';\n $headers .= 'MIME-Version: 1.0' . $eol;\n $headers .= \"Content-Type: multipart/mixed; boundary=\\\"\".$separator.\"\\\"\" . $eol;\n $headers .= \"FROM: $from\";\n \n // HTML message\n $message = '';\n $message .= '--'.$separator.$eol;\n $message .= \"Content-Type: text/html; charset=\\\"iso-8859-1\\\"\" . $eol;\n $message .= \"Content-Transfer-Encoding: 7bit\" . $eol . $eol;\n $message .= $body . $eol;\n \n // Attachment\n $message .= '--'.$separator.$eol;\n $message .= \"Content-Type: application/octet-stream; name=\\\"\".$attachment_name.\"\\\"\".$eol;\n $message .= \"Content-Transfer-Encoding: base64\" . $eol;\n $message .= \"Content-Disposition: attachment\" . $eol . $eol;\n $message .= $attachment_data . $eol;\n $message .= '--' . $separator . '--';\n\n return mail($to_email, $subject, $message, $headers);\n}", "public function enviarEmailBienvenida(){\n\t\t$params ['url'] = Yii::$app->urlManager->createAbsoluteUrl ( [ \n\t\t\t'ingresar/' . $this->txt_token \n\t\t] );\n\t\t$params ['user'] = $this->nombreCompleto;\n\t\t$params ['usuario'] = $this->txt_email;\n\t\t$params ['password'] = $this->password;\n\t\t\n\t\t\n\t\t\t$email = new Email();\n\t\t\t$email->emailHtml = \"@app/modules/ModUsuarios/email/bienvenida\";\n\t\t\t$email->emailText = \"@app/modules/ModUsuarios/email/layouts/text\";\n\t\t\t$email->to = $this->txt_email;\n\t\t\t$email->subject = \"Bienvenido\";\n\t\t\t$email->params =$params ;\n\t\t\t\n\t\t\t// Envio de correo electronico\n\t\t\t$email->sendEmail();\n\t\t\treturn true;\n\t\t\n\n\t}", "public function sendMail()\n {\n $config = JFactory::getConfig();\n $mailer = JFactory::getMailer();\n $mailer->setSender($config->get('mailfrom'));\n\n\n\n $recipient = array('antonio@ggallery.it', 'caress_coordinator@si4life.it');\n $mailer->addRecipient($recipient);\n\n $mailer->setSubject('Registrazione supporting partner '.$config->get('sitename'));\n $mailer->isHTML(true);\n\n $body = '<h2>Dettagli account</h2>';\n $body .=\"Name: \" . $this->_parametri['name'] . \", <br>\";\n $body .=\"Username: \" . $this->_parametri['username'] . \", <br>\";\n $body .=\"Email: '\" . $this->_parametri['email'] . \", \";\n $body .=\"<br><br>\";\n\n $body .=\"<a \n href='http://framework.project-caress.eu/administrator/index.php?option=com_wizard' \n target='_blank'>Accedi al backend per abilitarlo</a>\";\n\n\n\n http://framework.project-caress.eu/administrator/index.php?option=com_wizard\n\n $mailer->setBody($body);\n\n if (!$mailer->Send())\n throw new RuntimeException('Error sending mail', E_USER_ERROR);\n\n }", "function clsRecordemails()\r\n {\r\n\r\n global $FileName;\r\n $this->Visible = true;\r\n $this->Errors = new clsErrors();\r\n $this->ds = new clsemailsDataSource();\r\n $this->ReadAllowed = false;\r\n $this->InsertAllowed = false;\r\n $this->UpdateAllowed = false;\r\n $this->DeleteAllowed = false;\r\n $this->Visible = (CCSecurityAccessCheck(\"1;2\") == \"success\");\r\n if($this->Visible)\r\n {\r\n $this->ReadAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->InsertAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->ComponentName = \"emails\";\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n $this->message = new clsControl(ccsTextArea, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n $this->Insert = new clsButton(\"Insert\");\r\n $this->item_id = new clsControl(ccsHidden, \"item_id\", \"Item Id\", ccsInteger, \"\", CCGetRequestParam(\"item_id\", $Method));\r\n $this->to_user_id = new clsControl(ccsHidden, \"to_user_id\", \"To User Id\", ccsInteger, \"\", CCGetRequestParam(\"to_user_id\", $Method));\r\n $this->from_user_id = new clsControl(ccsHidden, \"from_user_id\", \"From User Id\", ccsInteger, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n $this->emaildate = new clsControl(ccsHidden, \"emaildate\", \"date\", ccsInteger, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n $this->subject = new clsControl(ccsHidden, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n if(!$this->FormSubmitted) {\r\n if(!strlen($this->from_user_id->GetValue()))\r\n $this->from_user_id->SetValue(CCGetUserID());\r\n if(!strlen($this->emaildate->GetValue()))\r\n $this->emaildate->SetValue(time());\r\n }\r\n }\r\n }", "public function sendMailRenovacionPlan( $sendparams = array() ){\r\t\t\r\t\t$uri = JFactory::getURI();\r\t\t\r\t\t//parametros para el metodo que obtiene el formulario de pago\r\t\t$params_pay = array(\r\t\t\t\t'btn_input' => '<input type=\"image\" src=\"'.$uri->root().'components/com_referidos/assets/images/img-pay.png\" alt=\"Pagar desde Payu Latam\" title=\"Pagar desde Payu Latam\" />'\r\t\t\t,\t'planuser' => $sendparams[ 'planuser' ]\r\t\t\t,\t'userid' => $sendparams[ 'userid' ]\r\t\t\t,\t'nomplan' => $this->nom_plan\r\t\t\t,\t'valorpesos' => number_format( $this->valor_pesos , 2 , '.' , '')\r\t\t\t,\t'valordolar' => number_format( $this->valor_dolares , 2 , '.' , '')\r\t\t\t,\t'emailuser' => $sendparams[ 'emailuser' ]\r\t\t\t,\t'nameuser' => $sendparams[ 'nameuser' ]\r\t\t);\r\t\t\r\t\t//destinatari\r\t\t$para = $sendparams[ 'emailuser' ];\r\t\t\r\t\t// subject\r\t\t$titulo = ucfirst( $sendparams[ 'nameuser' ] ).', necesitas renovar tu plan';\r\t\t\r\t\t// message\r\t\t$mensaje = '\r\t\t\t<html>\r\t\t\t\t<head>\r\t\t\t\t <title>Renovaci&oacute;n Plan JooinWorld</title>\r\t\t\t\t</head>\r\t\t\t\t<body>\r\t\t\t\t\t<div class=\"content-mail\" style=\"font-family: \\'Calibri\\', \\'Helvetica Neue\\'; width: 80%; height:auto; margin:0 auto; padding:0;\">\r\t\t\t\t\t\t<div class=\"titulo\" style=\"width:100%; height:61px; background-color:#566EAC; color:#ffffff; padding: 2px 37px;\">\r\t\t\t\t\t\t\t<img src=\"'.$uri->root().'templates/jooinworld-home/images/logo.png\">\r\t\t\t\t\t\t\t<!--<span style=\"color:#CDCBE3; font-size:12px; padding: 5px 10px;\">uniendo al mundo</span>-->\r\t\t\t\t\t\t</div>\r\t\t\t\t\t\t<div class=\"cuerpo\" style=\"width:100%; padding: 25px; font-size:14px;\">\r\t\t\t\t\t\t\t<h3 style=\"color:#000000\">Hola <span style=\"color: #566EAC;\" class=\"text-blue\">'.ucfirst( $sendparams[ 'nameuser' ] ).'</span></h3>\r\t\t\t\t\t\t\t<p style=\"margin: 20px 0px; text-align:justify;\" >\r\t\t\t\t\t\t\tNesecitas renovar tu plan '.strtoupper($this->nom_plan).', para que no pierdas las comisiones por las personas que has referido, y puedas seguir utilizando este plan para obtener mas personas que pueden llegar a ser referidos tuyos.\r\t\t\t\t\t\t\t</p>\r\t\t\t\t\t\t\t<div class=\"content-img\" style=\"width:100%; text-align:left;\">\r\t\t\t\t\t\t\t\t<img style=\"display:inline-block; border: 1px solid #B2B2B2; border-radius:5px; padding: 2px; margin-right: 5px;\" src=\"'. $uri->root() . ( ( !empty($sendparams[ 'thumb' ]) ) ? $sendparams[ 'thumb' ] : 'images/user-Male-thumb.png').'\" alt=\"'.$sendparams[ 'nameuser' ].'\" />\r\t\t\t\t\t\t\t\t<span style=\"display:inline-block; vertical-align:top; color: #566EAC;\" class=\"text-blue\">'.$sendparams[ 'nameuser' ].'</span>\r\t\t\t\t\t\t\t</div> \r\t\t\t\t\t\t\t<div class=\"agradecimiento\" style=\"width:100%; text-align:left; margin: 0px 0px 10px 0px;\">\r\t\t\t\t\t\t\t\t<h2 style=\"color:#000000\">Gracias</h2>\t\t\t\t\t\t\t\t\r\t\t\t\t\t\t\t</div>\r\t\t\t\t\t\t\t<di style=\"text-align:center; width:100%;\">\r\t\t\t\t\t\t\t\t\t'.$this->formPay( $params_pay ).'\r\t\t\t\t\t\t\t</div>\r\t\t\t\t\t\t</div>\r\t\t\t\t\t</div>\r\t\t\t\t</body>\r\t\t\t</html>\r\t\t';\r\t\t\r\t\t// Para enviar un correo HTML mail, la cabecera Content-type debe fijarse\r\t\t$cabeceras = \"MIME-Version: 1.0 \\r\\n\";\r\t\t$cabeceras .= \"Content-type: text/html; charset=UTF-8 \\r\\n\";\r\t\t\r\t\t// Cabeceras adicionales\r\t\t$cabeceras .= \"To: \" . $para .\" \\r\\n\";\r\t\t$cabeceras .= \"From: soporte@sainetingenieria.com \\r\\n\";\r\t\t\r\t\t// Mail it\r\t\tmail( $para, $titulo, $mensaje, $cabeceras);\r\t\r\t}", "function add_mail($id,$adresse_mail){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `mail_open` = '$adresse_mail' WHERE `id_utilisateur` = $id\");\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `status_mail` = '1' WHERE `id_utilisateur` = $id\");\n\t\t\n\t\t$req->closeCursor();\n\t}", "private function usrsave() {\n $id = 0;\n $resultado = 0;\n $pass = '';\n if ($this->UTILITY->validate_email($this->email)) {\n $arrjson = $this->UTILITY->error_wrong_email();\n } else {\n if ($this->id > 0) {\n //se verifica que el email está disponible\n $q = \"SELECT usr_id FROM ass_usuario WHERE usr_email = '\" . $this->email . \"' AND usr_id != $this->id \";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $resultado = mysql_num_rows($con);\n if ($resultado == 0) {\n //actualiza la informacion\n $q = \"SELECT usr_id FROM ass_usuario WHERE usr_id = \" . $this->id;\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n while ($obj = mysql_fetch_object($con)) {\n $id = $obj->usr_id;\n if (strlen($this->pass) > 2) {\n $pass = $this->UTILITY->make_hash_pass($this->email, $this->pass);\n }\n $table = \"ass_usuario\";\n $arrfieldscomma = array(\n 'usr_nombre' => $this->nombre,\n 'usr_apellido' => $this->apellido,\n 'usr_email' => $this->email,\n 'usr_pass' => $pass,\n 'usr_cargo' => $this->cargo,\n 'usr_identificacion' => $this->identificacion,\n 'usr_celular' => $this->celular,\n 'usr_telefono' => $this->telefono,\n 'usr_habilitado' => $this->habilitado,\n 'usr_contacto' => $this->contacto);\n $arrfieldsnocomma = array('mzt_proveedor_pro_id' => $this->idprov, 'mzt_cliente_cli_id' => $this->idcli, 'usr_dtcreate' => $this->UTILITY->date_now_server());\n $q = $this->UTILITY->make_query_update($table, \"usr_id = '$id'\", $arrfieldscomma, $arrfieldsnocomma);\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n }\n } else {\n $arrjson = $this->UTILITY->error_user_already_exist();\n }\n } else {\n //se verifica que el email está disponible\n $q = \"SELECT usr_id FROM ass_usuario WHERE usr_email = '\" . $this->email . \"'\";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $resultado = mysql_num_rows($con);\n if ($resultado == 0) {\n if (strlen($this->pass) > 2) {\n $pass = $this->UTILITY->make_hash_pass($this->email, $this->pass);\n }\n $this->pass = $pass;\n $q = \"INSERT INTO ass_usuario (usr_dtcreate, mzt_cliente_cli_id, mzt_proveedor_pro_id, usr_habilitado, usr_nombre, usr_apellido, usr_cargo, usr_email, usr_pass, usr_identificacion, usr_celular, usr_telefono, usr_contacto) VALUES (\" . $this->UTILITY->date_now_server() . \", $this->idcli, $this->idprov, '$this->habilitado', '$this->nombre', '$this->apellido', '$this->cargo', '$this->email', '$this->pass', '$this->identificacion', '$this->celular', '$this->telefono', '$this->contacto')\";\n mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $id = mysql_insert_id();\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n } else {\n $arrjson = $this->UTILITY->error_user_already_exist();\n }\n }\n }\n $this->response = ($arrjson);\n }", "public function authorMail($email, $comment)\n\t{\n\t\t$email = str_replace(array(\"\\n\",\"\\r\",PHP_EOL),'',$email);\n\t\t$subject = 'Camagru - New comment on your picture';\n\t\t$from = 'matt.saubin@gmail.com';\n\n\t\t// To send HTML mail, the Content-type header must be set\n\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\n\t\t// Create email headers\n\t\t$headers .= 'From: '.$from.\"\\r\\n\".\n\t\t'Reply-To: '.$from.\"\\r\\n\" .\n\t\t'X-Mailer: PHP/' . phpversion();\n\n\t\t// Compose a simple HTML email message\n\t\t$link = \"http://localhost:8081/Camagru/gallery/1\";\n\t\t$custom = \"gallery: <a href=\\\"$link\\\">Click the link!</a>\";\n\t\t$message = '<html><body>';\n\t\t$message .= '<h1 style=\"color:#006600;\">';\n\t\t$message .= 'New comment on your picture !';\n\t\t$message .= '</h1>';\n\t\t$message .= '<p style=\"color:#009900;font-size:16px;\">';\n\t\t$message .= 'Someone added a comment on your picture:' . '<br>' . '<br>' . '\"' . $comment . '\"' . '<br>' . '<br>';\n\t\t$message .= 'Go check it out in the ' . $custom;\n\t\t$message .= '</p><p style=\"color:#006600;font-size:16px;\"> Have a nice day ! <br><br> Team Camagru</p>';\n\t\t$message .= '</body></html>';\n\n\t\tmail($email, $subject, $message, $headers);\n\t}", "public function enviar_correo_datos()\r\n {\r\n \tif ($this->session->userdata(\"session_id\")==\"\") {\r\n redirect(base_url().'Inicio/Zona_roja/');\r\n }\r\n\r\n $id_paciente = $this->input->post(\"id_paciente_update\");\r\n $correo_paciente = $this->input->post(\"correo_valid\");\r\n echo \"mosytramos_id:\".$this->input->post(\"id_paciente_update\");\r\n\r\n //aqui buscamos los datos del mismo\r\n \t$query = $this->db->query(\"select * from exam_datos_generales where Id='\".$id_paciente.\"'\");\r\n\t\tforeach ($query->result() as $emp) {\r\n\t\t\t$nombrexxx = $emp->apellido_paterno.\" \".$emp->apellido_materno.\", \".$emp->nombre;\r\n\t\t}\r\n\r\n if(!empty($_FILES['imagen']['name'])) {\r\n $config['upload_path'] = 'upload/Resultado_analisis/';\r\n $config['allowed_types'] = 'jpg|jpeg|png|gif|pdf';\r\n $config['file_name'] = $nombrexxx.\" \".rand(100000000000000,900000000000000).md5($_FILES['imagen']['name']);\r\n \r\n //Load upload library and initialize configuration\r\n $this->load->library('upload',$config);\r\n $this->upload->initialize($config);\r\n \r\n if($this->upload->do_upload('imagen')){\r\n $uploadDataI = $this->upload->data();\r\n $imagen = $uploadDataI['file_name'];\r\n } else {\r\n $imagen = '';\r\n }\r\n\r\n } else {\r\n $imagen = '';\r\n }\r\n\r\n $data_update = array(\r\n \t'update_result_date' =>date('Y-m-d G:i:s'),\r\n \t'correo'=> $correo_paciente,\r\n \t'status'=>\"3\",\r\n \t'archivo'=> $imagen\r\n );\r\n\r\n $this->ResultadoFinal_model->update_insert_file($id_paciente,$data_update);\r\n\r\n\r\n //aqui buscamos los datos del mismo\r\n $query_result = $this->db->query(\"select * from exam_datos_generales where Id='\".$id_paciente.\"'\");\r\n \r\n\t\tforeach ($query_result->result() as $emp) {\r\n\t\t\t$nombrex = $emp->apellido_paterno.\" \".$emp->apellido_materno.\", \".$emp->nombre;\r\n\t\t\t$archivo1_xx = $emp->archivo;\r\n\t\t\t$url_unico = $emp->url_unico;\r\n\t\t}\r\n\r\n\r\n \r\n if ($this->input->post(\"options\")==\"si\") {\r\n \t$acceso_link = base_url().'ResultadoFinal/ResultadoFinal/view_result_data_list_details/'.$url_unico;\r\n } elseif ($this->input->post(\"options\")==\"no\") {\r\n \t$acceso_link = \"\";\r\n }\r\n\r\n \r\n\t\t$mail = new PHPMailer();\r\n\r\n // Esta configuracion solo funciona en godaddy, no en el servidor local\r\n /*$mail->isSMTP();\r\n\t\t$mail->Host = 'localhost';\r\n\t\t$mail->SMTPSecure = false;\r\n\t\t$mail->SMTPDebug = 3;\r\n\t\t$mail->Username = 'pagina_web@innomedic.pe';\r\n\t\t$mail->Password = '';\r\n\t\t$mail->SMTPAuth = false;\r\n\t\t$mail->SMTPAutoTLS = false; \r\n\t\t$mail->SMTPSecure = ''; \r\n\t\t$mail->Port = 25;\r\n\t\t$mail->CharSet = 'UTF-8'; \r\n\t\t$mail->AllowEmpty = true;\r\n \r\n\r\n $mail->setFrom('pagina_web@innomedic.pe', 'Innomedic.pe | Resultados de la Clinica Innomedic International E.I.R.L');\r\n\r\n */\r\n\r\n\r\n\r\n // Configuracion para el servidor local\r\n \r\n $mail->isSMTP();\r\n\t\t$mail->Host = 'localhost';\r\n\t\t$mail->SMTPSecure = false;\r\n\t\t$mail->SMTPDebug = 3;\r\n\t\t$mail->Username = 'pagina_web@innomedic.pe';\r\n\t\t$mail->Password = '';\r\n\t\t$mail->SMTPAuth = false;\r\n\t\t$mail->SMTPAutoTLS = false; \r\n\t\t$mail->SMTPSecure = ''; \r\n\t\t$mail->Port = 25;\r\n\t\t$mail->CharSet = 'UTF-8'; \r\n\t\t$mail->AllowEmpty = true;\r\n\r\n // De: \r\n $mail->setFrom('pagina_web@innomedic.pe', 'Innomedic.pe | Resultados de la Clinica Innomedic International E.I.R.L');\r\n\r\n // Archivo a adjuntar en el correo. El archivo ya fue subido\r\n $archivo1 = 'upload/Resultado_analisis/'.$archivo1_xx;\r\n\r\n\r\n \r\n //Mandamos a los correos\r\n $mail->addReplyTo('reenviadorweb@innomedic.pe', 'Innomedic.pe | Reenviar Email');\r\n $mail->addAddress($correo_paciente, $nombrex); \r\n $mail->Subject = 'Innomedic.pe '.$nombrex.' | Verificar Tus resultados';\r\n \r\n // Set email format to HTML\r\n $mail->isHTML(true);\r\n $mailContent = '<!DOCTYPE html>\r\n\t\t\t<html>\r\n\t\t\t<head>\r\n\t\t\t\t<title>Acceso al Sistema</title>\r\n\t\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n\t\t\t</head>\r\n\t\t\t<body>\r\n\t\t\t\t<tr><td valign=\"top\"><table class=\"full-width\" align=\"center\" width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" style=\"background-color: #ffffff; width: 600px\"><tbody><tr><td style=\"vertical-align: top\"><table class=\"full-width\" align=\"center\" width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width: 600px\"><tbody><tr><td class=\"logo\" width=\"588\" align=\"right\" valign=\"top\" style=\"color: #ffffff; font-family: adobe-clean, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px; padding-bottom: 12px; text-align: right; width: 588px\"><img class=\"logo\" alt=\"Adobe\" src=\"http://innomedic.pe/public/assets/images/logo.png\" border=\"0\" hspace=\"0\" vspace=\"0\" style=\" display: inline-block; vertical-align: top; width: 205px; height: 60px\"></td>\r\n\t\t\t <td width=\"12\" style=\"width: 12px\">&nbsp;</td>\r\n\t\t\t </tr></tbody></table></td>\r\n\t\t\t </tr><tr><td valign=\"top\"><table class=\"full-width\" align=\"center\" width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#ffffff\" style=\"background-color: #ffffff; width: 600px\"><tbody><tr><td class=\"mobile-spacer\" width=\"30\" style=\"width: 30px\">&nbsp; </td>\r\n\t\t\t <td style=\"color: #555555; font-family: adobe-clean, Arial, Helvetica, sans-serif; font-size: 16px; line-height: 22px; padding-top: 20px\">Estimado(a) Cliente; '.$nombrex.' <br>\r\n\t\t\t Envió los resultados Médicos <a href=\"'.$acceso_link.'\" style=\"color: #1473e6; text-decoration: none\">Link de Acceso: </a></td>\r\n\t\t\t <td class=\"mobile-spacer\" width=\"30\" style=\"width: 30px\">&nbsp;</td>\r\n\t\t\t </tr><tr><td class=\"mobile-spacer\" width=\"30\" style=\"width: 30px\">&nbsp;</td>\r\n\t\t\t \r\n\t\t\t <td class=\"mobile-spacer\" width=\"30\" style=\"width: 30px\">&nbsp;</td>\r\n\t\t\t </tr><tr><td class=\"mobile-spacer\" width=\"30\" style=\"width: 30px\">&nbsp;</td>\r\n\t\t\t <td style=\"color: #555555; font-family: adobe-clean, Arial, Helvetica, sans-serif; font-size: 16px; line-height: 22px; padding-top: 20px\">En caso de un error, <a href=\"http://innomedic.pe/\" style=\"color: #1473e6; text-decoration: none\" target=\"_blank\" rel=\"noreferrer\">ponte en contacto con nosotros inmediatamente</a>.</td>\r\n\t\t\t <td class=\"mobile-spacer\" width=\"30\" style=\"width: 30px\">&nbsp;</td>\r\n\t\t\t </tr><tr><td class=\"mobile-spacer\" width=\"30\" style=\"width: 30px\">&nbsp;</td>\r\n\t\t\t <td style=\"color: #555555; font-family: adobe-clean, Arial, Helvetica, sans-serif; font-size: 16px; line-height: 22px; padding-top: 20px; padding-bottom: 30px\">Muchas gracias,<br> INNOMEDIC INTERNATIONAL E.I.R.L</td>\r\n\t\t\t <td class=\"mobile-spacer\" width=\"30\" style=\"width: 30px\">&nbsp;</td>\r\n\t\t\t </tr></tbody></table></td>\r\n\t\t\t </tr><tr><td valign=\"top\"><table class=\"full-width\" align=\"center\" width=\"600\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#313A3E\" style=\"background-color: #313A3E; width: 600px\"><tbody><tr><td width=\"22\" style=\"width: 22px\">&nbsp;</td>\r\n\t\t\t \t\t\t<td align=\"center\" style=\"color: #ffffff; font-family: adobe-clean, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 14px; padding-top: 30px; text-align: center\"><strong><a href=\"http://intranet.innomedic.pe/\" style=\"color: #ffffff; font-weight: bold; text-decoration: none\" target=\"_blank\" rel=\"noreferrer\">Administrar tu cuenta</a> | <a href=\"http://innomedic.pe\" style=\"color: #ffffff; font-weight: bold; text-decoration: none\" target=\"_blank\" rel=\"noreferrer\">Asistencia al colaborador</a> | <a href=\"http://innomedic.pe/\" style=\"color: #ffffff; font-weight: bold; text-decoration: none\" target=\"_blank\" rel=\"noreferrer\">Foros</a> </strong></td>\r\n\t\t\t \t\t\t<td width=\"22\" style=\"width: 22px\">&nbsp;</td>\r\n\t\t\t \t\t</tr>\r\n\t\t\t \t\t<tr>\r\n\t\t\t \t\t\t<td width=\"22\" style=\"width: 22px\">&nbsp;</td>\r\n\t\t\t \t\t\t<td class=\"legal\" style=\"color: #999999; font-family: adobe-clean, Arial, Helvetica, sans-serif; font-size: 11px; line-height: 14px; padding-top: 30px; padding-bottom: 30px\">\r\n\t\t\t \t\t\t\tIntranet Innomedic | desarrollado especialmente para los clientes de Innomedic International E.I.R.L &copy; todo los derechos reservados.<br><br> \r\n\t\t\t \t\t\t\t\r\n\t\t\t \t\t\t\t&reg; Av. Javier Prado Este 2638, San Borja, Lima, Perú<br/>\r\n\t\t\t <a target=\"_blank\" href=\"http://innomedic.pe\" style=\"color: #ffffff;\"><font color=\"#ffffff\">Mas informacion</font></a> Área de Sistemas T.I\r\n\t\t\t <br /><br />\r\n\t\t\t <a color=\"#ffffff\" style=\"color: #ffffff;\">Desarrollado por: Area de Sistemas</a>\r\n\t\t\t \t\t\t</td>\r\n\r\n\t\t\t \t\t\t<td width=\"22\" style=\"width: 22px\">&nbsp;</td>\r\n\r\n\t\t\t \t\t</tr>\r\n\t\t\t \t</tbody></table></td>\r\n\t\t\t </tr></tbody></table></td>\r\n\t\t\t </tr>\r\n\r\n\t\t\t</body>\r\n\r\n\t\t\t</html>';\r\n\r\n $mail->AddAttachment($archivo1);\r\n\r\n $mail->Body = $mailContent;\r\n\r\n // Enviando email. Notese que send() devuelve true ó false a parte de enviar el correo\r\n if(!$mail->send()){\r\n echo 'Mailer Error: ' . $mail->ErrorInfo;\r\n $this->output->set_status_header(400);\r\n } else {\r\n $this->ResultadoFinal_model->actualizarResultadoProgreso($id_paciente, \"1\");\r\n $this->actualizarEstadoProgreso($id_paciente);\r\n echo \"Su petición ha sido enviada\";\r\n }\r\n\r\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'username' => 'required|unique:users',\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|confirmed|min:6'\n ]);\n $input = $request->all();\n $user = User::create([\n 'username' => $input['username'],\n 'email' => $input['email'],\n 'password' => bcrypt($input['password']),\n 'role_id' => 1,\n 'status' => 1\n ]);\n $imageName = \"default_avatar.png\";\n $image_extension = \"\";\n if($input[\"avatar\"] != null){\n $image = $input[\"avatar\"] ;\n preg_match(\"/data:image\\/(.*?);/\",$image,$image_extension);\n $image = preg_replace('/data:image\\/(.*?);base64,/','',$image);\n $image = str_replace(' ', '+', $image);\n $imageName = 'image_' . $user->username . '.' . $image_extension[1];\n Storage::disk('public')->put($imageName,base64_decode($image));\n }\n $admin = Admin::create([\n 'first_name' => $input['first_name'],\n 'last_name' => $input['last_name'],\n 'user_id' => $user->id,\n 'avatar' => $imageName\n ]);\n $data = [\n 'name' => $input['username'],\n 'password' => $input['password']\n ];\n $mailclient=$input['email'];\n Mail::send(['html'=>'mail'], ['data' => $data], function($message) use($mailclient) {\n $message->to($mailclient, 'Super fich ')->subject\n ('Admin crée');\n $message->from('contactapi@superworks.fr');\n });\n echo \"Basic Email Sent. Check your inbox.\";\n return redirect()->route('admins.index')\n ->with('success','Compte administrateur crée avec succée');\n }", "function sendInfoMail()\t{\n\t\tif ($this->conf['infomail'] && $this->conf['email.']['field'])\t{\n\t\t\t$recipient='';\n\t\t\t$emailfields=t3lib_div::trimexplode(',',$this->conf['email.']['field']);\t\t\t\t\n\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t$recipient.=$recipient?$Arr[$this->conf['email.']['field']].';'.$recipient:$Arr[$this->conf['email.']['field']];\n\t\t\t}\n\t\t\t$fetch = t3lib_div::_GP('fetch');\n\t\t\tif ($fetch)\t{\n\t\t\t\t\t// Getting infomail config.\n\t\t\t\t$key= trim(t3lib_div::_GP('key'));\n\t\t\t\tif (is_array($this->conf['infomail.'][$key.'.']))\t\t{\n\t\t\t\t\t$config = $this->conf['infomail.'][$key.'.'];\n\t\t\t\t} else {\n\t\t\t\t\t$config = $this->conf['infomail.']['default.'];\n\t\t\t\t}\n\t\t\t\t$pidLock='';\n\t\t\t\tif (!$config['dontLockPid'] && $this->thePid)\t{\n\t\t\t\t\t$pidLock='AND pid IN ('.$this->thePid.') ';\n\t\t\t\t}\n\n\t\t\t\t\t// Getting records\n\t\t\t\tif (t3lib_div::testInt($fetch))\t{\n\t\t\t\t\t$DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$this->conf['uidField'],$fetch,$pidLock,'','','1');\n\t\t\t\t} elseif ($fetch) {\t// $this->conf['email.']['field'] must be a valid field in the table!\n\t\t\t\t\tforeach($emailfields as $ef) {\n\t\t\t\t\t\tif ($ef) $DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$ef,$fetch,$pidLock,'','','100');\n\t\t\t\t\t\tif (count($DBrows )) break;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Processing records\n\t\t\t\tif (is_array($DBrows))\t{\n\t\t\t\t\t//$recipient = $DBrows[0][$this->conf['email.']['field']];\n\t\t\t\t\tif ($this->conf['evalFunc'])\t{\n\t\t\t\t\t\t$DBrows[0] = $this->userProcess('evalFunc',$DBrows[0]);\n\t\t\t\t\t}\n\t\t\t\t\t$this->compileMail($config['label'], $DBrows, $this->getFeuserMail($DBrows[0],$this->conf), $this->conf['setfixed.']);\n\t\t\t\t} elseif ($this->cObj->checkEmail($fetch)) {\n\t\t\t\t\t$this->sendMail($fetch, '', '',trim($this->cObj->getSubpart($this->templateCode, '###'.$this->emailMarkPrefix.'NORECORD###')));\n\t\t\t\t}\n\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL_SENT###');\n\t\t\t} else {\n\t\t\t\t$content = $this->metafeeditlib->getPlainTemplate($this->conf,$this->markerArray,'###TEMPLATE_INFOMAIL###');\n\t\t\t}\n\t\t} else $content='Error: infomail option is not available or emailField is not setup in TypoScript';\n\t\treturn $content;\n\t}", "public function Enviar_Email() : void\n {\n $valor = array();\n $valor['status'] = '';\n $valor['html'] = '';\n $valor['campos'] = $this->campos;\n \n if (empty($this->erros)) {\n if (Email::Enviar_Contato_Anunciante($this->obj_contato_anunciante)) {\n $this->obj_contato_anunciante->set_datahora_envio(date('Y-m-d H:i:s'));\n $this->obj_contato_anunciante->set_lido(false);\n \n DAO_Contato_Anunciante::Inserir($this->obj_contato_anunciante);\n \n $valor['status'] = 'certo';\n $valor['html'] = \"<li>Enviado com Sucesso</li>\";\n } else {\n $valor['status'] = 'erro';\n $valor['html'] = '<li>Erro ao tentar enviar e-mail</li>';\n }\n } else {\n $valor['status'] = 'erro';\n \n foreach ($this->erros as $erro) {\n $valor['html'] .= \"<li>$erro</li>\";\n }\n }\n \n echo json_encode($valor);\n }", "public function deletedusers($userid=0){\n if(!$this->phpsession->get('ciAdmId')){ redirect($this->config->item('base_url').'r/k/admin'); }\n\n if($userid > 0){\n //resend verification mail to user\n $___user = $this->U_Model->getUserById($userid);\n\n $activationcode = $___user->activationcode;\n $verification_code=$userid * 32765;\n // Create link for verification\n $link = \"<a href='\".$this->config->item('base_url').\"register/registerverify/\".$activationcode.\"'>\".$this->config->item('base_url').\"register/registerverify/\".$activationcode.\"</a>\";\n\n $this->load->model('SystemEmail_Model','SE_Model');\n\n $admin_email= $this->SE_Model->getAdminEmails();\n $mail_content= $this->SE_Model->getEmailById(1);\n \n //Email Sending Code\n $this->load->library('email');\n $this->email->from($admin_email->value,'fashionesia');\n $this->email->to($___user->email); // \n $this->email->subject($mail_content->subject);\n\n $message = str_replace(\"[link]\", $link, $mail_content->message);\n $message = str_replace(\"[[username]]\", $___user->first_name, $message);\n $message = str_replace(\"[[email]]\", $___user->email, $message);\n \n $content_message = str_replace(\"[sitename]\", $this->config->item('base_site_name'), $message);\n\n $emailPath = $this->config->item('base_abs_path').\"templates/\".$this->config->item('base_template_dir');\n $email_template = file_get_contents($emailPath.'/email/email.html');\n \n\n $email_template = str_replace(\"[[EMAIL_HEADING]]\", $mail_content->subject, $email_template);\n $email_template = str_replace(\"[[EMAIL_CONTENT]]\", nl2br(utf8_encode($content_message)), $email_template);\n $email_template = str_replace(\"[[SITEROOT]]\", $this->config->item('base_url'), $email_template);\n $email_template = str_replace(\"[[LOGO]]\",$this->config->item('base_url').\"templates/\".$this->config->item('base_template_dir'), $email_template);\n\n $this->email->message(html_entity_decode(($email_template)));\n\n //echo html_entity_decode(($email_template));\n\n $this->email->send();\n\n $this->phpsession->save('success_msg',\"Verification email successfully send to '\".$___user->first_name.\" \".$___user->last_name.\"'.\");\n\n redirect($this->config->item('base_url').\"admin/users/\");\n \n }\n\n $data = array('users' => '', 'PAGING' => '', 'search' => '-','delete'=>'-','fn'=>'-','status'=>'-');\n $this->load->helper(array('pagination'));\n $array = $this->uri->uri_to_assoc(3);\n\n $pages = (@$array['pages']?$array['pages']:1);\n $page = (@$array['page']?$array['page']:1);\n\n $orderb = (@$array['orderby']?@$array['orderby']:\"asc\"); $data['orderby'] = $orderb;\n $fn = (@$array['fn']?@$array['fn']:\"first_name\"); $data['fn'] = $fn;\n $status = (@$array['status']?@$array['status']:\"-\"); $data['status'] = $status; \n $orderby = $fn.\" \".$orderb;\n\n $data['search'] = (@$array['search']?$array['search']:'-');\n $data['delete'] = (@$array['delete']?$array['delete']:'-');\n\n \n if(strlen(trim($this->input->post('submit'))) > 0){\n $user_ids = implode(\",\",$this->input->post('checbox_ids'));\n $action = $this->input->post('action');\n if($action=='delete'){$action = 'permanentdelete';}\n $message = $this->U_Model->users_operations(array('user_ids' => $user_ids),$action);\n //$this->phpsession->save('success_msg',$message);\n $this->message->setMessage($message,\"SUCCESS\");\n }\n\n $PAGE = $page;\n $PAGE_LIMIT = $this->U_Model->countDeletedUsersBySearch($data['search'],$data['delete'],$status); //20;\n $DISPLAY_PAGES = 25;\n $PAGE_LIMIT_VALUE = ($PAGE - 1) * $PAGE_LIMIT;\n\n if($this->input->post('delete')!='')\n {\n// $delete = explode(\"-\",$this->input->post('datepicker'));\n// $delete_date = $delete[2].\"-\".$delete[0].\"-\".$delete[1];\n $data['delete'] =$this->input->post('delete');\n }\n // Get posted search value in variables\n $data['search'] = ($this->input->post('search')?trim($this->input->post('search')):$data['search']);\n $data['delete'] = ($this->input->post('delete')?trim($this->input->post('delete')):$data['delete']);\n \n // Count total users\n $total = $this->U_Model->countDeletedUsersBySearch($data['search'],$data['delete'],$status);\n \n $PAGE_TOTAL_ROWS = $total;\n $PAGE_URL = $this->config->item('base_url').'admin/adminusers/fn/'.$fn.'/orderby/'.$orderb.'/search/'.$data['search'].'/delete/'.$data['delete'].'/status/'.$status;\n $data['PAGING'] = pagination_assoc($PAGE_TOTAL_ROWS,$PAGE_LIMIT,$DISPLAY_PAGES,$PAGE_URL,$page,$pages);\n // Pagination end \n // Get all users\n $data['users'] = $this->U_Model->deletedusers($PAGE_LIMIT_VALUE,$PAGE_LIMIT,$data['search'],$orderby,$data['delete'],$status); \n // set variable to show active menu \n $data['menutab'] = 'network';\n $data['menuitem'] = 'deletedusers'; \n $this->load->view($this->config->item('base_template_dir').'/admin/users_del', $data);\n \n }", "private function show_all_mail(){\n $this->get_all_mail();\n $counter =1;\n while ($this->mails[$counter][\"date\"]!=\"\"){\n echo \"<hr/>\";\n echo \"date: \".$this->mails[$counter][\"date\"][\"raw\"].\"<br/>\";\n echo \"year: \".$this->mails[$counter][\"date\"][\"year\"].\"<br/>\";\n echo \"month: \".$this->mails[$counter][\"date\"][\"month\"].\"<br/>\";\n echo \"day: \".$this->mails[$counter][\"date\"][\"day\"].\"<br/>\";\n echo \"hour: \".$this->mails[$counter][\"date\"][\"hour\"].\"<br/>\";\n echo \"minute: \".$this->mails[$counter][\"date\"][\"minute\"].\"<br/>\";\n echo \"subject: \".$this->mails[$counter][\"subject\"].\"<br/>\";\n echo \"mailbox: \".$this->mails[$counter][\"mailbox\"].\"<br/>\";\n echo \"host: \".$this->mails[$counter][\"host\"].\"<br/>\";\n echo \"text: \".$this->mails[$counter][\"text\"].\"<br/>\";\n $pic = 2;\n while ($this->mails[$counter][\"image\"][$pic][\"data\"]!=\"\"){\n $pic--;\n echo \"Bild Nr.\".$pic.\"<br/>\";\n $pic++;\n echo \"Bild Name: <a href=\\\"pics/\".$this->mails[$counter][\"image\"][$pic][\"name\"].\"\\\">\".$this->mails[$counter][\"image\"][$pic][\"name\"].\"</a><br/>\";\n //$this->email_base64_to_file($counter, $pic);\n //echo \"image \".$pic.\": \".$this->mails[$counter][\"image\"][$pic][\"data\"].\"<br/>\";\n $pic++;\n } \n $counter++; \n }\n }", "function singup()\n{\n // $id = null;\n $name = $_POST['name']; //post获取表单里的name\n $password = $_POST['password']; //post获取表单里的password\n $token = md5($name . $password . time());\n $email = trim($_POST['email']);\n $regtime = time();\n $restime = 0;\n $respwd = 0;\n // echo $email;\n $status = 0;\n $icon = null;\n if (isset($_SESSION['fromid']) && !empty($_SESSION['fromid'])) {\n $fromid = $_SESSION['fromid'];\n unset($_SESSION['fromid']);\n } else {\n $fromid = null;\n }\n include 'connect.php'; //链接数据库\n include 'sendMail.php'; //发送激活邮件\n include \"invition.php\"; //更新邀请者邀请成功人数\n mysqli_query($con, \"set names utf8\"); //utf8 设为对应的编码\n // $q = \"insert into user(id,username,password,email,token,status) values (null,'$name','$password','$email','$token',$status)\"; //向数据库插入表单传来的值的sql\n // $q = \"insert into user(id,username,password,email,token,status,regtime,restime,respwd,icon) values (null,'$name','$md5pwd','$email','$token','$status','$regtime','$restime','$respwd',null)\"; //向数据库插入表单传来的值的sql\n //查询\n $sql = \"insert into user(username,password,email,token,status,regtime,restime,respwd,fromid) values (?,?,?,?,?,?,?,?,?)\"; //向数据库插入表单传来的值的sql\n $stmt = $con->stmt_init();\n if ($stmt->prepare($sql)) {\n $stmt->bind_param(\"sssssssss\", $name, md5($password), $email, $token, $status, $regtime, $restime, $respwd, $fromid);\n // $stmt->execute();\n if ($stmt->execute()) {\n postmail($email, '注册', $token, $name, 'signup');\n header(\"refresh:0;url=checkMail.html\"); //如果成功跳转至登陆页面\n // echo \"注册成功\"; //成功输出注册成功\n if (!is_null($fromid)) {\n updateRegistrationNum($fromid, getRegistrationNum($fromid) + 1);\n }\n exit();\n } else {\n die(mysqli_error($con));\n }\n $stmt->close();\n }\n mysqli_close($con); //关闭数据库\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 }" ]
[ "0.6799667", "0.6652079", "0.6630249", "0.62054324", "0.612156", "0.60513496", "0.60328484", "0.5985431", "0.59803146", "0.5961746", "0.5959672", "0.59389853", "0.59133595", "0.5890293", "0.5857407", "0.58370596", "0.57937247", "0.5786716", "0.5782304", "0.5757845", "0.57565176", "0.5740691", "0.57335633", "0.5723854", "0.57134986", "0.56997085", "0.5696366", "0.5692982", "0.5678786", "0.56765014", "0.5666634", "0.5662451", "0.5661701", "0.56529605", "0.5643742", "0.56428903", "0.5624937", "0.5623481", "0.561253", "0.5609148", "0.560786", "0.56050944", "0.56042993", "0.5598659", "0.55979586", "0.55903965", "0.5588505", "0.5584796", "0.55843997", "0.5578104", "0.5576164", "0.5573861", "0.55721796", "0.5569382", "0.5567063", "0.5554476", "0.555367", "0.5546243", "0.5542508", "0.5542047", "0.5541043", "0.5534595", "0.5533224", "0.5532075", "0.5530428", "0.55302787", "0.5529039", "0.5528571", "0.5525424", "0.55239785", "0.55196893", "0.5511037", "0.5510733", "0.5504941", "0.5503235", "0.55031", "0.5498706", "0.5497284", "0.5496789", "0.54860234", "0.548127", "0.5480711", "0.54800934", "0.54800725", "0.5479068", "0.54775226", "0.54678714", "0.54676497", "0.54668564", "0.5466013", "0.5459851", "0.5453484", "0.54471254", "0.54471195", "0.5446571", "0.54464364", "0.543662", "0.5435913", "0.5435028", "0.5430536" ]
0.6512032
3
/ On recupere le commentaire et l'id de l'utilisateur et on lui envoie un mail au bde pour le notifier
public function commentaire($id) { $commentaire = Commentaire::findOrFail($id); $id_utilisateur = \Auth::user()->id; \Mail::to('bde@exiacesi.fr')->send(new AvertissementNuisanceCommentaireEmail($commentaire, $id_utilisateur)); return back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ajax_comment(){\n\t\t\n $comment = isset( $_POST['message'] ) ? sanitize_text_field( $_POST['message'] ) : '';\n $post_id = isset( $_POST['post_id'] ) ? sanitize_text_field( $_POST['post_id'] ) : '';\n\t\t\t$user_id = isset( $_POST['user_id'] ) ? sanitize_text_field( $_POST['user_id'] ) : '';\n\t\t\t\n\t\t\t//Traigo data de usuario\n $user_data = get_userdata( $user_id );\n\n\t\t\t//Verifico que venga con informacion\n\t\t\tif ( '' === $comment \n\t\t\t\tOR '' === $post_id\n\t\t\t\tOR '' === $user_id\n\t\t\t) {\n\t\t\t\twp_send_json_error( 'Error en el pedido de informacion.');\t\n\t\t\t\t die();\n\t\t\t}\n\n $commentdata = array(\n\t\t\t\t'comment_author' => $user_data->user_login,\n\t\t\t\t'comment_content' \t=> $comment,\n\t\t\t\t'user_id' => $user_id,\n 'comment_post_ID' => $post_id,\n\t\t\t\t'comment_approved' => '1',\n\t\t\t\t'comment_type' => 'public'\n );\n \n if ( wp_insert_comment( $commentdata ) ) { \n\n //Tomo la data de la id denuncia\n $commentary = array();\n $commentaux['comment'] = $comment;\n $commentaux['user'] = $user_data->user_login;\n $commentaux['time'] = date( 'Y-m-d H:i:s', current_time( 'timestamp', 0 ) );\n array_push( $commentary , $commentaux ); //array\n\n\n\t\t\t\t\t$user = wp_get_current_user();\n\t\t\t\t\t//print_r($user);\n\t\t\t\t\t//Si lo puso una persona aviso a usuarios\n\t\t\t\t\tif ( ( $user->roles[0] == 'denunciante' ) OR ( $user->roles[0] == 'suscriptor' ) ){\n\t\t\t\t\t\t\t//Envio de mail\n\t\t\t\t\t\t\tmail_new_comment_vecino ( $user->user_nicename, '', '', $post_id );\n\t\t\t\t\t}\n\n echo json_encode( array(\n 'status' => 'success', \n 'commentary' => $commentary \n ));\n\t\t\t}else{\n\t\t\t\techo json_encode( array('loggedin'=>false, 'message'=>__('Error de usuario o contraseña. Volve a intentarlo.')));\n\t\t\t}\n\t\t\t\n\t\t\tdie();\t}", "function notify_new_comment($id){\n\t\t// nactu si comment\n\t\t$comment = $this->find('first', array(\n\t\t\t'conditions' => array('Comment.id' => $id),\n\t\t\t'contain' => array()\n\t\t));\n\t\t// natahnu si mailovaci skript\n\t\tApp::import('Vendor', 'PHPMailer', array('file' => 'class.phpmailer.php'));\n\t\t$mail = new PHPMailer();\n\t\t\n\t\t// uvodni nastaveni\n\t\t$mail->CharSet = 'utf-8';\n\t\t$mail->Hostname = CUST_ROOT;\n\t\t$mail->Sender = 'no-reply@sportnutrition.cz';\n\t\t\n\t\t// nastavim adresu, od koho se poslal email\n\t\t$mail->From = 'no-reply@sportnutrition.cz';\n\t\t$mail->FromName = \"sportnutrition.cz\";\n\t\t\n//\t\t$mail->AddReplyTo(CUST_MAIL, CUST_NAME);\n\n\t\t$mail->AddAddress(CUST_MAIL, CUST_NAME);\n//\t\t$mail->AddBCC(\"vlado@tovarnak.com\", \"Vlado Tovarnak\");\n\t\t\n\t\t$mail->Subject = 'E-SHOP (' . CUST_ROOT . ') - NOVÝ DOTAZ';\n\t\t$mail->Body = 'Právě byl položen nový dotaz.' . \"\\n\\n\";\n\t\t$mail->Body .= $comment['Comment']['subject'] . \"\\n\";\n\t\t$mail->Body .= $comment['Comment']['author'] . ' - ' . $comment['Comment']['email'] . \"\\n\";\n\t\t$mail->Body .= $comment['Comment']['body'] . \"\\n\\n\";\n\t\t$mail->Body .= 'Spravovat jej můžete zde: http://www.' . CUST_ROOT . '/admin/comments/edit/' . $id . \"\\n\";\n\n\t\treturn $mail->Send();\n\t}", "public function GrabEmailFromComment()\n\t{\n\t\tif ($_POST['gr_comment_checkbox'] == 1 AND isset($_POST['email']))\n\t\t{\n\t\t\tif ($this->grApiInstance)\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'comment_campaign');\n\t\t\t\t$this->addContact($campaign, $_POST['author'], $_POST['email']);\n\t\t\t}\n\t\t}\n\t\telse if ($_POST['gr_comment_checkbox'] == 1 && is_user_logged_in())\n\t\t{\n\t\t\t$current_user = wp_get_current_user();\n\t\t\t$name = $current_user->user_firstname . ' ' . $current_user->user_lastname;\n\t\t\tif (strlen(trim($name)) > 1)\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'comment_campaign');\n\t\t\t\t$this->addContact($campaign, $name, $current_user->user_email);\n\t\t\t}\n\t\t}\n\t}", "function notify_answer($comment){\n\t\tif (is_numeric($comment)) {\n\t\t\t$comment = $this->find('first', array(\n\t\t\t\t'conditions' => array('Comment.id' => $comment),\n\t\t\t\t'contain' => array()\t\n\t\t\t));\n\t\t}\n\n\t\tif ( isset( $comment['Comment']['email'] ) ){\n\t\t\t// natahnu si mailovaci skript\n\t\t\tinclude 'class.phpmailer.php';\n\t\t\t\n\t\t\t// notifikacni email zakaznikovi\n\t\t\t// o dotazu\n\t\t\t$mail = new phpmailer();\n\n\t\t\t// uvodni nastaveni\n\t\t\t$mail->CharSet = 'utf-8';\n\t\t\t$mail->Hostname = CUST_ROOT;\n\t\t\t$mail->Sender = CUST_MAIL;\n\t\t\t\n\t\t\t// nastavim adresu, od koho se poslal email\n\t\t\t$mail->From = CUST_MAIL;\n\t\t\t$mail->FromName = \"Automatické potvrzení\";\n\t\t\t\n\t\t\t$mail->AddReplyTo(CUST_MAIL, CUST_NAME);\n\n\t\t\t$mail->AddAddress($comment['Comment']['email'] , $comment['Comment']['author']);\n\t\t\t$mail->AddBCC(\"vlado@tovarnak.com\", \"Vlado Tovarnak\");\n\t\n\t\t\t$mail->Subject = $comment['Comment']['subject'] . \" - odpověď na váš dotaz\";\n\t\t\t$mail->Body = 'Dobrý den,' . \"\\n\";\n\t\t\t$mail->Body .= 'Váš dotaz v následujícím znění:' . \"\\n\\n\";\n\t\t\t$mail->Body .= $comment['Comment']['body']. \"\\n\\n\";\n\t\t\t$mail->Body .= 'byl zodpovězen, odpověď naleznete níže:' . \"\\n\\n\";\n\t\t\t$mail->Body .= $comment['Comment']['reply']. \"\\n\\n\";\n\t\t\t\n\t\t\t$mail->Body .= 's pozdravem' . \"\\n\" . 'team internetového obchodu ' . CUST_NAME;\n\n\t\t\treturn $mail->Send();\n\t\t}\n\t\treturn false;\n\t}", "public function actionComment()\n {\n\n if(isset($_POST['Comment']))\n {\n $model = new Comment;\n //$model->attributes=$_POST['Comment'];\n $model->a_id = $_POST['answer_id'];\n $model->author_id = $_POST['author_id'];\n\n $model->text = strip_tags($_POST['Comment']['text']);\n\n if($model->save()) {\n $receivers = User::model()->with(array('follow_question' => array('condition' => 'follow_question.q_id = ' . $_POST['question_id'])))->findAll();\n if ($receivers) {\n foreach ($receivers as $key => $receiver) {\n $notifications = UserNotifications::model()->findByPk($receiver->id);\n\n if ($receiver && $notifications)\n if ($notifications->comment_on_question == 1) {\n\n $subject = 'Question has been commented at ' . Yii::app()->name . '!';\n $message = CHtml::link('Question',\n 'http://' . $_SERVER['HTTP_HOST']. Yii::app()->baseUrl . '/question/view/id/' . $_POST['question_id']) . ' you are following has been commented ';\n\n UserModule::sendMail($receiver->email,$subject,$message);\n }\n }\n }\n Yii::app()->user->setFlash('answerCommented', \"Comment was posted successfully\");\n $this->redirect($this->createUrl('/question/view/id/' . $_POST['question_id']));\n }\n\n }\n\n }", "function comment_author_email($comment_id = 0)\n {\n }", "function notifyComments($cids, $type)\r\n {\r\n $my = JFactory::getUser();\r\n\r\n $database =& JFactory::getDBO();\r\n\r\n\r\n if (is_array($cids)) {\r\n $cids = implode(',',$cids);\r\n }\r\n\r\n $sentemail = \"\";\r\n $database->setQuery(\"SELECT * FROM #__comment WHERE id IN ($cids)\");\r\n $rows = $database->loadObjectList();\r\n if ($rows) {\r\n $query = \"SELECT email FROM #__users WHERE id='\".$my->id.\"' LIMIT 1\";\r\n $database->SetQuery($query);\r\n $myemail = $database->loadResult();\r\n $_notify_users = $this->_notify_users;\r\n\r\n foreach($rows as $row) {\r\n $this->_notify_users = $_notify_users;\r\n $this->setIDs($row->id, $row->contentid);\r\n $this->resetLists();\r\n $this->lists['name'] \t= $row->name;\r\n $this->lists['title'] \t= $row->title;\r\n $this->lists['notify'] \t= $row->notify;\r\n $this->lists['comment']\t= $row->comment;\r\n\r\n $email_writer = $row->email;\r\n /*\r\n * notify writer of approval\r\n */\r\n if ($row->userid > 0) {\r\n $query = \"SELECT email FROM #__users WHERE id='\".$row->userid.\"' LIMIT 1\";\r\n $database->SetQuery($query);\r\n $result = $database->loadAssocList();\r\n if ($result) {\r\n $user = $result[0];\r\n $email_writer = $user['email'];\r\n }\r\n }\r\n\r\n if ($email_writer && $email_writer != $myemail) {\r\n switch ($type) {\r\n \t\t\tcase 'publish':\r\n $this->lists['subject'] = _JOOMLACOMMENT_NOTIFY_PUBLISH_SUBJECT;\r\n $this->lists['message'] = _JOOMLACOMMENT_NOTIFY_PUBLISH_MESSAGE;\r\n break;\r\n case 'unpublish':\r\n $this->lists['subject'] = _JOOMLACOMMENT_NOTIFY_UNPUBLISH_SUBJECT;\r\n $this->lists['message'] = _JOOMLACOMMENT_NOTIFY_UNPUBLISH_MESSAGE;\r\n break;\r\n case 'delete' :\r\n $this->lists['subject'] = _JOOMLACOMMENT_NOTIFY_DELETE_SUBJECT;\r\n $this->lists['message'] = _JOOMLACOMMENT_NOTIFY_DELETE_MESSAGE;\r\n break;\r\n }\r\n\r\n $sentemail .= ($sentemail ? ';' : '').$this->notifyMailList($temp=array($email_writer));\r\n $exclude = $myemail ? ($email_writer.','.$myemail): $email_writer;\r\n } else {\r\n $exclude = $myemail ? $myemail:\"\";\r\n }\r\n\t\t\t /*\r\n\t\t\t * notify users, moderators, admin\r\n\t\t\t */\r\n switch ($type) {\r\n case 'publish':\r\n $this->lists['subject']\t= _JOOMLACOMMENT_NOTIFY_PUBLISH_SUBJECT;\r\n $this->lists['message']\t= _JOOMLACOMMENT_NOTIFY_PUBLISH_MESSAGE;\r\n break;\r\n case 'unpublish':\r\n $this->_notify_users = false;\r\n $this->lists['subject']\t= _JOOMLACOMMENT_NOTIFY_UNPUBLISH_SUBJECT;\r\n $this->lists['message']\t= _JOOMLACOMMENT_NOTIFY_UNPUBLISH_MESSAGE;\r\n break;\r\n case 'delete' :\r\n $this->_notify_users = false;\r\n $this->lists['subject']\t= _JOOMLACOMMENT_NOTIFY_DELETE_SUBJECT;\r\n $this->lists['message']\t= _JOOMLACOMMENT_NOTIFY_DELETE_MESSAGE;\r\n break;\r\n }\r\n//\t \t \techo implode(',', $notification->getMailList($row->contentid));\r\n $templist = $this->getMailList($row->contentid, $exclude);\r\n $sentemail .= ($sentemail ? ';' : '').$this->notifyMailList($templist);\r\n }\r\n }\r\n return $sentemail;\r\n }", "function add_mail($id,$adresse_mail){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `mail_open` = '$adresse_mail' WHERE `id_utilisateur` = $id\");\n\t\t$req = $bdd->query(\"UPDATE `utilisateur` SET `status_mail` = '1' WHERE `id_utilisateur` = $id\");\n\t\t\n\t\t$req->closeCursor();\n\t}", "function get_comment_author_email($comment_id = 0)\n {\n }", "public function comment() {\n if (isLoggedIn() == false) {\n flash('login_to_post', 'Please, login to comment');\n redirect('/users/login');\n }\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n // Sanitize array\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n $data = [\n 'body' => trim($_POST['body']),\n 'post_id' => trim($_POST['post_id']),\n 'user_id' => $_SESSION['user_id'],\n 'user_name' => $this->userModel->getUserById($_SESSION['user_id'])->name\n ];\n\n if (!empty($data['body']) && !empty($data['post_id']) && !empty($data['user_id']) && !empty($data['user_name'])) {\n // Save comment\n $this->postModel->comment($data);\n $post = $this->postModel->getPostById($data['post_id']);\n $receiver = $this->userModel->getUserById($post->user_id);\n if ($receiver->receive_email == true) {\n $this->mail($receiver->email, $receiver->name, $post->id);\n }\n }\n redirect('/posts/show/' . $_POST['post_id']);\n }\n\n }", "public function addComment() {\n $body = $this->getData();\n\n $comentario = $body->comentario;\n $usuario = $body->usuario;\n $fecha = $body->fecha;\n $puntaje = $body->puntaje;\n $id_jugador = $body->id_jugador;\n $id_comentario = $this->model->insert($comentario, $usuario, $fecha, $puntaje, $id_jugador);\n\n if($id_comentario) {\n $this->view->response(\"Se agrego el comentario nùmero: {$id_comentario}\", 200);\n } else {\n $this->view->response(\"El comentario no se pudo agregar \", 500);\n }\n\n }", "public function envoyer_email($id)\n {\n\n $q = $this->db->where('fac_id', $id)\n ->where('fac_inactif is null')\n ->select('t_factures.*,scv_email')\n ->join('t_commandes', 'cmd_id=fac_commande', 'left')\n ->join('t_devis', 'dvi_id=cmd_devis', 'left')\n ->join('t_societes_vendeuses', 'scv_id=dvi_societe_vendeuse', 'left')\n ->get('t_factures');\n if ($q->num_rows() != 1) {\n throw new MY_Exceptions_NoSuchRecord('Impossible de trouver la facture numéro ' . $id);\n }\n $row = $q->row();\n\n // récupération du contact et du correspondant\n $q = $this->db->select(\"dvi_client,dvi_correspondant\")\n ->join('t_commandes', 'cmd_id=' . $row->fac_commande, 'left')\n ->join('t_devis', 'dvi_id=cmd_devis', 'left')\n ->get('t_factures');\n if ($q->num_rows() == 0) {\n throw new MY_Exceptions_NoSuchUser('Pas de correspondant trouvé pour la facture ' . $id);\n }\n\n $row2 = $q->row();\n\n // récupération de l'adresse email\n $q = $this->db->where('cor_id', $row2->dvi_correspondant)\n ->where('LENGTH(cor_email)>0')\n ->get('t_correspondants');\n if ($q->num_rows() == 1) {\n $email = $q->row()->cor_email;\n } else {\n $q = $this->db->where('ctc_id', $row2->dvi_client)\n ->where('LENGTH(ctc_email)>0')\n ->get('t_contacts');\n if ($q->num_rows() == 1) {\n $email = $q->row()->ctc_email;\n }\n }\n if (!$email) {\n throw new MY_Exceptions_NoEmailAddress(\"Le contact n'a pas d'adresse email\");\n }\n\n // récupération du modèle de document\n $q = $this->db->where('mod_nom', 'FACTURE')\n ->get('t_modeles_documents');\n if ($q->num_rows() == 0) {\n throw new MY_Exceptions_NoSuchTemplate(\"Pas de modèle disponible pour le message email\");\n }\n $sujet = $q->row()->mod_sujet;\n $corps = $q->row()->mod_texte;\n\n $fac_fichier = $this->generer_pdf($id);\n\n // envoi du mail\n $this->load->library('email');\n $resultat = $this->email->send_one($email, $row->scv_email, $sujet, $corps, $fac_fichier);\n if (!$resultat) {\n return false;\n }\n\n // enregistrement de la transmission\n $transmise = $row->fac_transmise;\n if ($transmise != '') {\n $transmise .= '<br />';\n }\n $transmise .= date('d/m/Y') . '&nbsp;Mail';\n $data = array(\n 'fac_transmise' => $transmise,\n );\n return $this->_update('t_factures', $data, $id, 'fac_id');\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' => 'opublisher@gmail.com',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => 'opublisher@gmail.com',\r\n 'fromName' => 'opublisher@gmail.com',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }", "public function addOneComment(){\n\t\tif (!empty($_POST['user_name']) && !empty($_POST['content'])){\n\t\t\t$values = array(\n \t\t'user_name' => $_POST['user_name'],\n\t\t\t'content' => $_POST['content'],\n\t\t\t'post_id' => $_POST['post_id']\n\t\t);\n\n\t\t$sqlfuncs = array(\n \t\t'date_creation' => 'NOW()',\n\t\t);\n\n\t$this->pInsertFunc(\"INSERT INTO\", \"comment\", $values, $sqlfuncs);\n\t\t\techo '<script>alert(\"Le commentaire a bien été envoyé.\")</script>';\n\t\t}\n\n\t}", "public function addComment()\n {\n session_start();\n $superglobalsPost = $this->getSuperglobals()->get_POST();\n $newComment = new CommentManager;\n $superglobalsPost['status'] = \"waiting\";\n $newComment->createComment($superglobalsPost);\n if (isset($superglobalsPost['post_id'])) {\n $post_id = $superglobalsPost['post_id'];\n }\n $titleAction = \"Confirmation d'enregistrement\"; //confirmation message\n $actionConfirmation = \"/post?id=\" . $post_id;\n $textConfirmation = \"Votre commentaire a bien été enregistré\";\n echo $this->getRender()->render('confirmationTemplate.twig', [\n 'titleAction' => $titleAction,\n 'actionConfirmation' => $actionConfirmation,\n 'textConfirmation' => $textConfirmation,\n 'session' => $this->getSuperglobals()->get_SESSION()\n ]);\n }", "protected function afterInsert() {\r\n // echo 'checking mail todo'.BR;\r\n $lUid = intval($this -> mVal['user_id']);\r\n if (empty($lUid)) {\r\n return;\r\n }\r\n $lSql = 'SELECT val FROM al_usr_pref WHERE uid='.$lUid.' AND code=\"sys.mail.todo\"';\r\n $lVal = CCor_Qry::getStr($lSql);\r\n if (FALSE === $lVal) {\r\n $lSql = 'SELECT val FROM al_sys_pref WHERE code=\"sys.mail.todo\"';\r\n $lVal = CCor_Qry::getStr($lSql);\r\n } \r\n if (smEveryTime == $lVal) {\r\n // mail versenden\r\n $lUsr = CCor_Usr::getInstance();\r\n $lFMail = $lUsr -> getVal('email');\r\n $lFName = $lUsr -> getVal('firstname').' '.$lUsr -> getVal('lastname');\r\n \r\n $lSql = 'SELECT firstname,lastname,email FROM al_usr WHERE id='.intval($lUid);\r\n $lQry = new CCor_Qry($lSql);\r\n if ($lRow = $lQry -> getAssoc()) {\r\n $lToName = $lRow['firstname'].' '.$lRow['lastname'];\r\n $lToMail = $lRow['email'];\r\n $lMsg = 'Dear user,'.LF.LF.'you have a new todo in your todo list:'.LF.LF;\r\n $lMsg.= $this['subject'].LF.LF; \r\n $lCfg = CCor_Cfg::getInstance();\r\n $lUrl = $lCfg -> getVal('base.url').'index.php?act=';\r\n $lMsg.= 'Link: '.$lUrl.$this['ref_link'];\r\n #echo $lMsg;\r\n $lMai = new CApi_Mail_Item($lFMail, $lFName, $lToMail, $lToName, 'Todo: '.$this['subject'], $lMsg);\r\n #$lMai -> send();\r\n $lMai -> insert();\r\n }\r\n } \r\n }", "public function get_commentaire(){retrun($id_local_commentaire); }", "function motDePasseOublie($mail) { $userManager = new OpenClassrooms\\DWJP4\\Backend\\Model\\UsersManager();\n $emailExist = $userManager->emailExist($mail);\n if($emailExist){\n //S'il existe, on fabrique le code , on update le code , on envoi le message\n $pseudo=$emailExist[0]['USER_PSEUDO'];\n $code = codeValidation();\n //echo $pseudo;\n // echo \" code : \".$code;\n $updatePassword = $userManager->updatePsswd($code,$pseudo);\n $message = messagePasswdOublie($mail,$code);\n //echo $message;\n }else {\n //echo \"pas de mail exist\";\n }\n // on retourne sur la page d'identification\n require ('view/backend/identificationView.php'); \n}", "public function restablecer2(Request $request)\n {\n $email = $request->email;\n $mail = User::where('email',$email)->first();\n if(isset($mail)){\n Mail::to($mail)->send(new Restablecer($mail->id));\n echo \"Solicitud recibida!!!<br>Se te ha enviado un correo electronico para restablecer la contraseña!!\";\n }else{\n echo \"Correo no válido!!\";\n }\n }", "public function after_comment_create($ticket_id, $comment_id){\n\n\t\t$admin_emails = $this->get_ticket_admin_emails($ticket_id);\n\t\t$author_email = wt_get_ticket_author_meta($ticket_id, 'email');\n\n\t\t// add html email header\n\t\tadd_filter( 'wp_mail_content_type', array($this, 'set_html_content_type') );\n\t\n\t\t// current comment author\n\t\t$comment_email = get_comment($comment_id)->comment_author_email;\n\t\tif(in_array($comment_email, $admin_emails)){\n\n\t\t\t// check to see if the current comment was not public or private then dont notify\n\t\t\tif( !in_array( get_comment_meta( $comment_id, '_comment_access',true), array('public', 'private') ) ){\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// author posted\n\t\t\tif(is_member_ticket($ticket_id)){\n\n\t\t\t\t// send member email\n\t\t\t\t$email_subject = 'new comment member';\n\t\t\t\t$email_message = $this->get_email_content( 'member_update', array('test' => 'Member'));\n\t\t\t\t$template = $this->set_template_content($email_message, $email_subject);\n\t\t\t\twp_mail( $author_email, $email_subject, $template);\n\t\t\t}else{\n\n\t\t\t\t$email_vars = array(\n\t\t\t\t\t'pass' => get_post_meta( $ticket_id, '_view_key', true ),\n\t\t\t\t\t'name' => get_post_meta( $ticket_id, '_user_name', true ),\n\t\t\t\t);\n\n\t\t\t\t// send public email\n\t\t\t\t$email_subject = 'new comment public';\n\t\t\t\t$email_message = $this->get_email_content( 'public_update', $email_vars);\n\t\t\t\t$template = $this->set_template_content($email_message, $email_subject);\n\t\t\t\twp_mail( $author_email, $email_subject, $template);\n\t\t\t}\n\t\t}else{\n\n\t\t\t// non author, send admin emails\n\t\t\t$email_subject = 'new comment admin';\n\t\t\t$email_message = $this->get_email_content( 'admin_update', array('test' => 'Admin'));\n\t\t\t$template = $this->set_template_content($email_message, $email_subject);\n\t\t\twp_mail( $admin_emails, $email_subject, $template);\n\t\t}\n\n\t\t// remove html email header filter\n\t\tremove_filter( 'wp_mail_content_type', array($this, 'set_html_content_type') );\n\t}", "public function commentQuery()\n {\n $uznName = $_POST['uzn_name'];\n $uznID = $_POST['uzn_id'];\n\n $authID = @$_SESSION['sess_user_id'];\n $authName = @$_SESSION['sess_user_name'];\n $commText = htmlspecialchars($_POST['comment'], ENT_QUOTES);\n if(!isset($_SESSION['sess_user_id'])){\n echo 'Rakstīt atsauksmes var tikai ielogoti lietotāji. <br>';\n }\n if(isset($_SESSION['user_email_status']) &&\n $_SESSION['user_email_status'] == 'email_code_is_checked_email_verified'){\n\n $insert = \"INSERT INTO comment_section\n (comm_location_uzn, comm_location_uzn_id, comm_author_id, comm_auth_name,\n comm_tetx, comm_date)\n VALUES\n (?, ?, ?, ?, ?, NOW())\";\n $do = $this->connect()->prepare($insert);\n $do->execute([$uznName, $uznID, $authID, $authName, $commText]);\n echo \"Komentārs ir veiksmīgi izveidots.\";\n\n } else{\n echo 'Jums ir jāapstiprina e-pasts pirms rakstīt atsauksmes.';\n }\n }", "function Dao_add_notification($post_owner,$id_comment){\n\n session_start();\n $conn = open_cnxn();\n global $log;\n\n // Check connection\n if (!$conn)\n {\n\n $log->error(\"Connection failed: \" . mysqli_connect_error());\n\n }\n if ($conn) {\n $log->info(\"before insert notif /********************************/\");\n $sql = \"INSERT INTO notification(id_owner_post, id_comment, status) VALUES ('$post_owner','$id_comment','unread')\";\n\n if (mysqli_query($conn, $sql))\n {\n//send email\n //check if usr\n echo get_all_notifcation($_SESSION['id']);\n } else\n {\n\n $log->error(\"Error \" . $sql . \"\\n\" . mysqli_error($conn));\n }\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}", "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('programaenlazamundos@cta.org.co ', 'Programa Enlazamundos');\n $mail->addTo($correo);\n $mail->setSubject('Confirmación de registro Enlazamundos');\n $mail->send();\n return;\n }\n}", "function addComment(int $postId, string $postTitle, string $author, string $comment, string $email)\r\n {\r\n //to encode the json\r\n header( 'Content-Type: application/json' );\r\n if (empty($author ) || empty( $comment ) || empty( $email )) {\r\n $data = array('reponse' => 'error', 'content' => \"Per poter inviare il messaggio bisogna riempire tutti i campi\");\r\n } else {\r\n $affectedLines = $this->CommentModel->postComment( $postId, $author, $comment, $email );\r\n\r\n if ($affectedLines === false) {\r\n throw new Exception( 'Impossibile aggiungere il commento !' );\r\n } else {\r\n // Create the Transport\r\n $transport = (new \\Swift_SmtpTransport( 'smtp.mailtrap.io', 2525 ))\r\n ->setUsername( 'dba91667e2ea0a' )\r\n ->setPassword( 'dc8598d61f7a38' );\r\n\r\n // Create the Mailer using your created Transport\r\n $mailer = new \\Swift_Mailer( $transport );//configuration smtp\r\n\r\n // Create a message\r\n $message = (new \\Swift_Message( 'Hai ricevuto un nuovo commento al tuo post \"' . $postTitle . '\"' ))\r\n ->setFrom( [$email => $author] )\r\n ->setTo( ['pietrociccarello@gmail.com' => 'A Damiano'] )\r\n ->setBody( 'Hai ricevuto un nuovo commento al tuo post dal titolo \"'. $postTitle. '\" <br><br>Ecco il commento:<br><br>\" '.$comment . '\" <br><br>Indirizzo e-mail dell\\'autore del commento: ' . $email. '<br><br>Puoi accedere alla pagina del commento, per decidere se approvarlo o meno, direttamente dal tuo spazio admin tramite questo <a href=\"http://localhost:8888/Damiano_Civiletto/adminPost-'. $postId. '\">link</a>', 'text/html' );\r\n\r\n // Send the message\r\n $result = $mailer->send( $message );\r\n\r\n if ($result) {\r\n $data = array('reponse' => 'success', 'content' => \"Il messaggio è stato inviato correttamente ma sarà visibile soltanto dopo essere stato approvato\");\r\n }\r\n }\r\n }\r\n echo json_encode( $data );\r\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 : \"no_reply@nonprofitsoftwarecorp.org\");\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 sendToUser($id, $comment)\n {\n $GLOBALS['ID']= $id;\n // ID number\n $ID = (new Utility)->get_string_between($comment, 'ID:', '--');\n // $a = '<a>'.$ID.'</a>';\n // echo $a;\n //id 为 $id的ticket & 获取ticket里的from user name\n $ticket = Tickets::where('_id', $id)->first();\n $from_user_name = $ticket['from_user_name'];\n // 通过from user name找到UserModel 并 取出nickname\n $user = UserModel::where('openid', $from_user_name)->first();\n $nickname = $user['nickname'];\n $postdata = '{\"touser\":\"'.$from_user_name.'\",\"msgtype\":\"text\",\"text\":{\"content\":\"'.$comment.'\"}}';\n // $postdata = json_decode($postdata, true);\n // 微信api主动 给用户为 touser 的人 发送信息\n $opts = array(\n 'http' => array(\n 'method' => 'POST',\n 'Content-Length' => strlen($postdata),\n 'Host' => 'api.weixin.qq.com',\n 'header' => \"Content-Type: application/x-www-form-urlencoded\\r\\n\",\n 'Content-Type' => 'application/json',\n 'content' => $postdata,\n ),\n );\n $context = stream_context_create($opts);\n // access token更新如果已过期 然后发送\n $access_token = (new Utility())->accessToken();\n $result = file_get_contents('https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token='.$access_token.'', true, $context);\n // dd($result);\n echo $result;\n }", "function email_notification_objet($id_objet, $type_objet, $modele) {\n\t$envoyer_mail = charger_fonction('envoyer_mail','inc'); // pour nettoyer_titre_email\n\t$id_type = id_table_objet($type_objet);\n\treturn recuperer_fond($modele,array($id_type=>$id_objet,\"id\"=>$id_objet));\n}", "public function testCommentReceivedValid()\n {\n $user = factory(User::class)->create();\n $post = factory(Post::class)->create([\n 'author_id'=>$user->id\n ]);\n\n\n Mail::fake();\n\n $this->actingAs($user)->post('/posts/'.$post->id. '/comments',\n ['text'=>'this is some text more then fif..',\n 'author'=>'some_name']);\n\n Mail::assertSent(CommentReceived::class, function($mail) use ($post){\n return $mail->post->id === $post->id;\n });\n }", "public function authorMail($email, $comment)\n\t{\n\t\t$email = str_replace(array(\"\\n\",\"\\r\",PHP_EOL),'',$email);\n\t\t$subject = 'Camagru - New comment on your picture';\n\t\t$from = 'matt.saubin@gmail.com';\n\n\t\t// To send HTML mail, the Content-type header must be set\n\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\n\t\t// Create email headers\n\t\t$headers .= 'From: '.$from.\"\\r\\n\".\n\t\t'Reply-To: '.$from.\"\\r\\n\" .\n\t\t'X-Mailer: PHP/' . phpversion();\n\n\t\t// Compose a simple HTML email message\n\t\t$link = \"http://localhost:8081/Camagru/gallery/1\";\n\t\t$custom = \"gallery: <a href=\\\"$link\\\">Click the link!</a>\";\n\t\t$message = '<html><body>';\n\t\t$message .= '<h1 style=\"color:#006600;\">';\n\t\t$message .= 'New comment on your picture !';\n\t\t$message .= '</h1>';\n\t\t$message .= '<p style=\"color:#009900;font-size:16px;\">';\n\t\t$message .= 'Someone added a comment on your picture:' . '<br>' . '<br>' . '\"' . $comment . '\"' . '<br>' . '<br>';\n\t\t$message .= 'Go check it out in the ' . $custom;\n\t\t$message .= '</p><p style=\"color:#006600;font-size:16px;\"> Have a nice day ! <br><br> Team Camagru</p>';\n\t\t$message .= '</body></html>';\n\n\t\tmail($email, $subject, $message, $headers);\n\t}", "public function send($userId) { \n // Save the communique.\n $this->save($userId);\n // Send the mail.\n if (!isset($this->bcc) || $this->bcc == '') $this->bcc = $this->from;\n $headers = \"From: \" . $this->from . \"\\r\\n\"\n . \"Reply-To: \" . $this->from . \"\\r\\n\"\n . \"Bcc: \" . $this->bcc . \"\\r\\n\"\n . \"X-Mailer: PHP\" . phpversion() . \"\\r\\n\"\n . \"X-Apparently-To: \" . $this->to;\n if (self::$TESTING) $mailedData = mail('snoopy@leserman.com', $this->subject, $this->message . \"\\r\\n\\r\\n\", $headers);\n else $mailedData = mail($this->to, $this->subject, $this->message . \"\\r\\n\\r\\n\", $headers);\n // Update the object and database sent and dateSent fields.\n $updateQuery = 'UPDATE communications set sent=1, dateSent=NOW() where communicationId=' . $this->commId;\n SSFDB::getDB()->saveData($updateQuery);\n //SSFDB::debugNextQuery();\n $getDateQuery = 'SELECT dateSent from communications where communicationId=' . $this->commId;\n $dateResult = SSFDB::getDB()->getArrayFromQuery($getDateQuery); \n self::$debugger->belch('send() dateResult', $dateResult, -1);\n $this->dateSent = (count($dateResult) > 0) ? $dateResult[0]['dateSent'] : date(\"Y-m-d H:i:s\");\n/* The fields works.artistInformedOfMediaReceipt and works.artistInformedOfMediaReceiptDate are no longer used.\n // Mark the referenced works in the works table to show that the artist was informed of media receipt.\n// $worksAffected = $this->referencedWorks; $worksWhereClause = \"\"; $disjunctionString = \"\";\n// foreach ($worksAffected as $work) { if (self::mediaReceivedFor($work)) { $worksWhereClause .= $disjunctionString . \"workId = \" . $work['workId']; $disjunctionString = \" or \"; }}\n// $query = \"UPDATE works SET artistInformedOfMediaReceipt=1, artistInformedOfMediaReceiptDate=NOW()\" . \" WHERE \" . $worksWhereClause;\n// SSFDB::getDB()->saveData($query);\n*/\n }", "public function sendmailprolongation($utilisateur){\n $ObjParameters = new ParametersController();\n $mailtoGestannuaire = $ObjParameters->get_gestionnaireannuaire();\n $mailto[] = $mailtoGestannuaire['Parameter']['param'];\n $to=$mailto;\n $from = Configure::read('mailapp');\n $objet = \"SAILL : Prolongation d'un utilisateur [\".$utilisateur['Utilisateur']['NOM'].' '.$utilisateur['Utilisateur']['PRENOM'].']';\n $message = \"Merci de traiter cette demande concernant la prolongation de \".$utilisateur['Utilisateur']['NOM'].' '.$utilisateur['Utilisateur']['PRENOM'].\n '<ul>\n <li>Date de naissance :'.$utilisateur['Utilisateur']['NAISSANCE'].'</li>\n <li>Société :'.$utilisateur['Societe']['NOM'].'</li>\n <li>Fin de mission :'.$utilisateur['Utilisateur']['FINMISSION'].'</li>\n <li>Commentaire :'.$utilisateur['Utilisateur']['COMMENTAIRE'].'</li> \n </ul>';\n if($to!=''):\n try{\n $email = new CakeEmail();\n $email->config('smtp')\n ->emailFormat('html')\n ->from($from)\n ->to($to)\n ->subject($objet)\n ->send($message);\n }\n catch(Exception $e){\n $this->Session->setFlash(__('Erreur lors de l\\'envois du mail - '.translateMailException($e->getMessage()),true),'flash_warning');\n } \n endif;\n }", "function new_mail()\n\t{\n\t\t\t\n\t\tif($this->redux_auth->logged_in()) {\n\t\t\t$profile=$this->redux_auth->profile();\n\t\t\t$user_id=$profile->id;\n\t\t}\telse {\n $this->session->set_userdata('error_message', 'Acceso a zona no habilitada');\n redirect(site_url(), 'Location'); \n exit();\n\t\t}\t\t\t\t\n\t\t\t\n\t\tif($this->input->post('action') && $this->input->post('action')==\"send\") {\n\n\t\t\t$this->load->library('comunicacion');\n\t\t\t\n\t\t\t$tipo_comunicacion = $this->input->post('comm_type');\n\t\t\tif(!isset($tipo_comunicacion) || $tipo_comunicacion == '') $tipo_comunicacion = '1';\n\t\t\t\n\t\t\t$registro = array(\n\t 'subject' => $this->input->post('subject'),\n\t 'from' => $this->config->item('email_from'),\n\t 'type' => 5,\n\t //'destination_text' => $this->input->post('destination'),\n\t 'content' => $this->input->post('content'),\n\t 'active' => 1,\n\t 'create_user' => $this->session->userdata('user_id'),\n\t 'create_ip' => $this->session->userdata('ip_address'),\n\t 'create_time' => date(DATETIME_DB)\n\t );\n\t\t\t\n\t\t\t\n\t\t\tif($this->comunicacion->send_general_notification($registro, $tipo_comunicacion)) {\n\t\t\t\t$this->session->set_userdata('info_message', 'Mensaje creado.');\n\t\t\t} else {\n\t\t\t\t$this->session->set_userdata('error_message', 'Error en la creacion del mensaje.');\n\t\t\t}\n\t\t\t\n redirect(site_url('notifications/new_mail'), 'Location'); \n exit();\n\t\t}\n\n\t\t$this->load->library('ckeditor');\n\t\t$this->load->helper('ckeditor');\n\t\t\n\t\t//$menu=array('menu' => $this->app_common->get_menu_options());\n\t\t//print(\"<pre>\");print_r($menu);print(\"</pre>\");\n\t\t//$this->session->set_userdata('message',\"asasassa\");\n\t\t//print_r($this->session->all_userdata());\n\t\t$data=array(\n\t\t\t'meta' => $this->load->view('meta', '', true),\n\t\t\t'header' => $this->load->view('header', array('enable_menu' => $this->redux_auth->logged_in()), true),\n\t\t\t'menu' => $this->load->view('menu', '', true),\n\t\t\t'footer' => $this->load->view('footer', '', true),\n\t\t\t'info_message' => $this->session->userdata('info_message'),\n\t\t\t'error_message' => $this->session->userdata('error_message')\n\t\t);\n\t\t$this->session->unset_userdata('info_message');\n\t\t$this->session->unset_userdata('error_message');\n\t\t\n\t\t$editors_code = $this->load->view('editor/main', array('textbox_id' => 'content', 'style' => 'width:100%'), true);\n\t\t//$contenido = $this->load->view('notifications/new_mail', array('editors_code' => $editors_code), true);\n\t\t\n\t\t//print_r($this->redux_auth->profile());\n\t\t$data['editors_code']=$editors_code;\n\t\t$data['page']='notifications/new_mail';\n\t\t$profile=$this->redux_auth->profile();\n\t\t$data['profile']=$profile;\n $this->load->view('main', $data);\n\t\t\t\t\n\n\t\t\t\t\t\t\t\t//print\t\t($this->redux_auth->logged_in());\t\t\n\t}", "public function restablecer(Request $request)\n {\n $idusuario = $request->id;\n $mail = User::find($idusuario)->email;\n if(isset($mail)){\n Mail::to($mail)->send(new Restablecer($idusuario));\n echo \"Correo enviado\";\n }else{\n echo \"No hay correo disponible\";\n }\n \n }", "Public function addComment(Request $request){\n // return $id;\n\n $this->validate($request,[ \n 'comment' => 'required', \n ],\n\n [\n 'comment.required' => ' اجرات خود را بنویسید ',\n ]);\n\n $user_id = Auth::user()->id;\n $comment = new AhkamComment;\n $comment->comment = $request->comment;\n $comment->ahkam_id = $request->ahkam_id;\n $comment->user_id = $user_id;\n DB::transaction(function() use ($comment) {\n $comment->save();\n });\n //to generate its notifications\n Helper::add_noti('Ahkam', $comment->id, $comment->ahkam_id);\n $request->session()->flash('alert-success', ' اجرات شما افزوده شد ' );\n return redirect()->back();\n \n }", "function active_mail($id){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"UPDATE `utilisateur` SET `status_mail` = '1' WHERE id_utilisateur = :id\");\n\t\t$req->execute(array('id'=>$id));\n\t\t$req->closeCursor();\n\t}", "public function Commento($idricetta){\n if(($_SERVER['REQUEST_METHOD']==\"POST\")){\n $session = Sessione::getInstance();\n if($session->isLoggedUtente()){\n $view = new VDettaglio();\n $commento = $view->recuperaCommento();\n $utente = $session->getUtente();\n $idutente = $utente->getId();\n //costruzione di ECommento\n $com = new ECommento($commento['testo'], $commento['data'], $commento['ora'], $idutente, $idricetta);\n $pm = FPersistentManager::getInstance();\n $id = $pm->store($com);\n //devo aggiornare l'oggetto utente nei dati di sessione (ha un nuovo commento)\n $utente = $pm->loadById(\"utente\", $idutente);\n $session->setUtenteLoggato($utente);\n if($id){\n //inserimento corretto, redirect a dettaglio ricetta attuale (usiamo il metodo Ricetta di questo controller)\n header('Location: /myRecipes/web/Ricette/Ricetta/'.$idricetta);\n } else {\n //messaggio errore inserimento non corretto\n $viewerr = new VErrore();\n $viewerr->mostraErrore(\"Inserimento commento non corretto\");\n }\n\n } else { //utente non loggato\n //redirect alla form di login\n header('Location: /myRecipes/web/Utente/Login');\n }\n\n }\n else{\n header('HTTP/1.1 405 Method Not Allowed');\n header('Allow: POST');\n }\n\n\n }", "public function commenter($auteur, $comm, $idBillet)\n {\n $donnees = array('auteur' => $auteur,\n 'commentaire' => $comm,\n 'idBillet' => $idBillet);\n $commentaire = new Commentaire($donnees);\n $commentaire->setAuteur($auteur);\n $commentaire->setCommentaire($comm);\n $commentaire->setId_billet($idBillet);\n \n $this->commentaire->postCommentaire($commentaire);\n $_SESSION['info'] = 'Votre commentaire a bien été publié ! ';\n header('Location: index.php?action=billet&id='.$idBillet.'&page=1#ajoutCom');\n }", "public static function setMSGForHaveNTEmailUsers() {\n\n // not have email end moderation job seekers\n $queryMail = \"\n SELECT\n u.id_user,\n u.email,\n u.crdate,\n u.mdate,\n u.status,\n r.ismoder\n FROM\n user u\n INNER JOIN \n resume r ON r.id_user=u.id_user \n WHERE\n DATE(u.crdate) >= NOW() - INTERVAL 1 DAY \n or \n DATE(u.mdate) >= NOW() - INTERVAL 1 DAY \n GROUP BY u.id_user\n \";\n $queryMail = Yii::app()->db->createCommand($queryMail)->queryAll();\n\n if(count($queryMail)){\n\n foreach ($queryMail as $user){\n $email = $user['email'];\n if ((!preg_match(\"/^(?:[a-z0-9]+(?:[-_.]?[a-z0-9]+)?@[a-z0-9_.-]+(?:\\.?[a-z0-9]+)?\\.[a-z]{2,5})$/i\", $email))\n || ( $email = '' )){\n /**\n * Send messages to users who did not enter the email\n */\n $resultm['users'][] = $user['id_user'];\n $resultm['title'] = 'Администрация';\n $resultm['text'] = 'Уважаемый пользователь, будьте добры заполнить \n поле e-mail в вашем профиле.\n Заранее спасибо!';\n }\n }\n $admMsgM = new AdminMessage();\n\n // send notifications\n if (isset($resultm)) {\n $admMsgM->sendDataByCron($resultm);\n }\n\n foreach ($queryMail as $user){\n $status = $user['status'];\n $ismoder = $user['ismoder'];\n if ( ($status == 2) && ($ismoder != 1)){\n /**\n * Send messages to users who did not enter moderation information\n */\n $resultjs['users'][] = $user['id_user'];\n $resultjs['title'] = 'Администрация';\n $resultjs['text'] = 'Уважаемый пользователь, заполните '.\n 'поля, необходимые для модерации:'.\n '<ul style=\"text-align:left\">'.\n '<li>имя и фамилия</li>'.\n '<li>год рождения</li>'.\n '<li>Фото(допускается и без него, на фото не природа, '.\n 'не больше одной личности, не анимация и т.д)</li>'.\n '<li>номер телефона и эмейл</li>'.\n '<li>целевая вакансия</li>'.\n '<li>раздел \"О себе\"</li>'.\n '<ul>';\n }\n }\n $admMsgJS = new AdminMessage();\n if (isset($resultjs)) {\n $admMsgJS->sendDataByCron($resultjs);\n }\n\n }\n\n $queryEmpl = \"\n SELECT\n u.id_user,\n u.email,\n u.crdate,\n u.mdate,\n u.status,\n e.ismoder\n FROM\n user u\n INNER JOIN \n employer e ON e.id_user=u.id_user \n WHERE\n (\n DATE(u.crdate) >= NOW() - INTERVAL 1 DAY \n or \n DATE(u.mdate) >= NOW() - INTERVAL 1 DAY\n ) and u.status = 3 \n \n GROUP BY u.id_user\n \";\n $queryEmpl = Yii::app()->db->createCommand($queryEmpl)->queryAll();\n\n if(count($queryEmpl)) {\n\n foreach ($queryEmpl as $user){\n $ismoder = $user['ismoder'];\n if ( $ismoder != 1 ){\n /**\n * Send messages to employer who did not enter moderation information\n */\n $resulte['users'][] = $user['id_user'];\n $resulte['title'] = 'Администрация';\n $resulte['text'] = 'Уважаемый пользователь, заполните '.\n 'поля в вашем профиле, необходимые для модерации:'.\n '<ul style=\"text-align:left\">'.\n '<li>название компании</li>'.\n '<li>логотип - желаельно</li>'.\n '<li>номер телефона и эмейл</li>'.\n '<li>имя контактного лица</li>'.\n '<li>контактный номер телефона</li>'.\n '<ul>';\n }\n }\n $admMsgE = new AdminMessage();\n if (isset($resulte)) {\n $admMsgE->sendDataByCron($resulte);\n }\n }\n\n }", "function activacion_cuenta($correo,$propietario,$id){\n\t\t$email = new correo();\n\t\t$url = $email->url_();\n\t\t// print_r($email);\n\n\t\t// mensaje html\n\t\t$html='\n\t\t\t\t<!doctype html>\n\t\t\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\n\t\t\t\t\t<head>\n\t\t\t\t\t <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n\t\t\t\t\t <meta name=\"viewport\" content=\"initial-scale=1.0\" />\n\t\t\t\t\t <meta name=\"format-detection\" content=\"telephone=no\" />\n\t\t\t\t\t <title></title>\n\t\t\t\t\t <style type=\"text/css\">\n\t\t\t\t\t body {\n\t\t\t\t\t width: 100%;\n\t\t\t\t\t margin: 0;\n\t\t\t\t\t padding: 0;\n\t\t\t\t\t -webkit-font-smoothing: antialiased;\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t @media only screen and (max-width: 600px) {\n\t\t\t\t\t table[class=\"table-row\"] {\n\t\t\t\t\t float: none !important;\n\t\t\t\t\t width: 98% !important;\n\t\t\t\t\t padding-left: 20px !important;\n\t\t\t\t\t padding-right: 20px !important;\n\t\t\t\t\t }\n\t\t\t\t\t table[class=\"table-row-fixed\"] {\n\t\t\t\t\t float: none !important;\n\t\t\t\t\t width: 98% !important;\n\t\t\t\t\t }\n\t\t\t\t\t table[class=\"table-col\"],\n\t\t\t\t\t table[class=\"table-col-border\"] {\n\t\t\t\t\t float: none !important;\n\t\t\t\t\t width: 100% !important;\n\t\t\t\t\t padding-left: 0 !important;\n\t\t\t\t\t padding-right: 0 !important;\n\t\t\t\t\t table-layout: fixed;\n\t\t\t\t\t }\n\t\t\t\t\t td[class=\"table-col-td\"] {\n\t\t\t\t\t width: 100% !important;\n\t\t\t\t\t }\n\t\t\t\t\t table[class=\"table-col-border\"] + table[class=\"table-col-border\"] {\n\t\t\t\t\t padding-top: 12px;\n\t\t\t\t\t margin-top: 12px;\n\t\t\t\t\t border-top: 1px solid #E8E8E8;\n\t\t\t\t\t }\n\t\t\t\t\t table[class=\"table-col\"] + table[class=\"table-col\"] {\n\t\t\t\t\t margin-top: 15px;\n\t\t\t\t\t }\n\t\t\t\t\t td[class=\"table-row-td\"] {\n\t\t\t\t\t padding-left: 0 !important;\n\t\t\t\t\t padding-right: 0 !important;\n\t\t\t\t\t }\n\t\t\t\t\t table[class=\"navbar-row\"],\n\t\t\t\t\t td[class=\"navbar-row-td\"] {\n\t\t\t\t\t width: 100% !important;\n\t\t\t\t\t }\n\t\t\t\t\t img {\n\t\t\t\t\t max-width: 100% !important;\n\t\t\t\t\t display: inline !important;\n\t\t\t\t\t }\n\t\t\t\t\t img[class=\"pull-right\"] {\n\t\t\t\t\t float: right;\n\t\t\t\t\t margin-left: 11px;\n\t\t\t\t\t max-width: 125px !important;\n\t\t\t\t\t padding-bottom: 0 !important;\n\t\t\t\t\t }\n\t\t\t\t\t img[class=\"pull-left\"] {\n\t\t\t\t\t float: left;\n\t\t\t\t\t margin-right: 11px;\n\t\t\t\t\t max-width: 125px !important;\n\t\t\t\t\t padding-bottom: 0 !important;\n\t\t\t\t\t }\n\t\t\t\t\t table[class=\"table-space\"],\n\t\t\t\t\t table[class=\"header-row\"] {\n\t\t\t\t\t float: none !important;\n\t\t\t\t\t width: 98% !important;\n\t\t\t\t\t }\n\t\t\t\t\t td[class=\"header-row-td\"] {\n\t\t\t\t\t width: 100% !important;\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t @media only screen and (max-width: 480px) {\n\t\t\t\t\t table[class=\"table-row\"] {\n\t\t\t\t\t padding-left: 16px !important;\n\t\t\t\t\t padding-right: 16px !important;\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t @media only screen and (max-width: 320px) {\n\t\t\t\t\t table[class=\"table-row\"] {\n\t\t\t\t\t padding-left: 12px !important;\n\t\t\t\t\t padding-right: 12px !important;\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t @media only screen and (max-width: 458px) {\n\t\t\t\t\t td[class=\"table-td-wrap\"] {\n\t\t\t\t\t width: 100% !important;\n\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t </style>\n\t\t\t\t\t</head>\n\n\t\t\t\t\t<body style=\"font-family: Arial, sans-serif; font-size:13px; color: #444444; min-height: 200px;\" bgcolor=\"#E4E6E9\" leftmargin=\"0\" topmargin=\"0\" marginheight=\"0\" marginwidth=\"0\">\n\t\t\t\t\t <table width=\"100%\" height=\"100%\" bgcolor=\"#E4E6E9\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td width=\"100%\" align=\"center\" valign=\"top\" bgcolor=\"#E4E6E9\" style=\"background-color:#E4E6E9; min-height: 200px;\">\n\t\t\t\t\t <table>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-td-wrap\" align=\"center\" width=\"458\">\n\t\t\t\t\t <table class=\"table-space\" height=\"18\" style=\"height: 18px; font-size: 0px; line-height: 0; width: 450px; background-color: #e4e6e9;\" width=\"450\" bgcolor=\"#E4E6E9\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"18\" style=\"height: 18px; width: 450px; background-color: #e4e6e9;\" width=\"450\" bgcolor=\"#E4E6E9\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t <table class=\"table-space\" height=\"8\" style=\"height: 8px; font-size: 0px; line-height: 0; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"8\" style=\"height: 8px; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table class=\"table-row\" width=\"450\" bgcolor=\"#FFFFFF\" style=\"table-layout: fixed; background-color: #ffffff;\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-row-td\" style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; font-weight: normal; padding-left: 36px; padding-right: 36px;\" valign=\"top\" align=\"left\">\n\t\t\t\t\t <table class=\"table-col\" align=\"left\" width=\"378\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"table-layout: fixed;\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-col-td\" width=\"378\" style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; font-weight: normal; width: 378px;\" valign=\"top\" align=\"left\">\n\t\t\t\t\t <table class=\"header-row\" width=\"378\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"table-layout: fixed;\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"header-row-td\" width=\"378\" style=\"font-family: Arial, sans-serif; font-weight: normal; line-height: 19px; color: #478fca; margin: 0px; font-size: 18px; padding-bottom: 10px; padding-top: 15px;\" valign=\"top\" align=\"left\">Gracias por registrarte!</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t <div style=\"font-family: Arial, sans-serif; line-height: 20px; color: #444444; font-size: 13px;\">\n\t\t\t\t\t <b style=\"color: #478fca;\">Estimad@ '.$propietario.'</b>\n\t\t\t\t\t <b style=\"color: #777777;\">\n\t\t\t\t\t Estamos muy contentos de que te unas a nosotros Asociación Promoda\n\t\t\t\t\t </b>\n\t\t\t\t\t <br> Por favor confirmar su registro para continuar\n\t\t\t\t\t </div>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table class=\"table-space\" height=\"12\" style=\"height: 12px; font-size: 0px; line-height: 0; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"12\" style=\"height: 12px; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t <table class=\"table-space\" height=\"12\" style=\"height: 12px; font-size: 0px; line-height: 0; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"12\" style=\"height: 12px; width: 450px; padding-left: 16px; padding-right: 16px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" align=\"center\">&nbsp;\n\t\t\t\t\t <table bgcolor=\"#E8E8E8\" height=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td bgcolor=\"#E8E8E8\" height=\"1\" width=\"100%\" style=\"height: 1px; font-size:0;\" valign=\"top\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t <table class=\"table-space\" height=\"16\" style=\"height: 16px; font-size: 0px; line-height: 0; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"16\" style=\"height: 16px; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table class=\"table-row\" width=\"450\" bgcolor=\"#FFFFFF\" style=\"table-layout: fixed; background-color: #ffffff;\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-row-td\" style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; font-weight: normal; padding-left: 36px; padding-right: 36px;\" valign=\"top\" align=\"left\">\n\t\t\t\t\t <table class=\"table-col\" align=\"left\" width=\"378\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"table-layout: fixed;\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-col-td\" width=\"378\" style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; font-weight: normal; width: 378px;\" valign=\"top\" align=\"left\">\n\t\t\t\t\t <div style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; text-align: center;\">\n\t\t\t\t\t <a href=\"http://'.$url.'active_count/'.$id.'\" target=\"_blank\" style=\"text-decoration:none; color:#4285F4\">Confirmar </a>\n\t\t\t\t\t </div>\n\t\t\t\t\t <table class=\"table-space\" height=\"16\" style=\"height: 16px; font-size: 0px; line-height: 0; width: 378px; background-color: #ffffff;\" width=\"378\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"16\" style=\"height: 16px; width: 378px; background-color: #ffffff;\" width=\"378\" bgcolor=\"#FFFFFF\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table class=\"table-space\" height=\"6\" style=\"height: 6px; font-size: 0px; line-height: 0; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"6\" style=\"height: 6px; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table class=\"table-row-fixed\" width=\"450\" bgcolor=\"#FFFFFF\" style=\"table-layout: fixed; background-color: #ffffff;\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-row-fixed-td\" style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; font-weight: normal; padding-left: 1px; padding-right: 1px;\" valign=\"top\" align=\"left\">\n\t\t\t\t\t <table class=\"table-col\" align=\"left\" width=\"448\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"table-layout: fixed;\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-col-td\" width=\"448\" style=\"font-family: Arial, sans-serif; line-height: 19px; color: #444444; font-size: 13px; font-weight: normal;\" valign=\"top\" align=\"left\">\n\t\t\t\t\t <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"table-layout: fixed;\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td width=\"100%\" align=\"center\" bgcolor=\"#f5f5f5\" style=\"font-family: Arial, sans-serif; line-height: 24px; color: #bbbbbb; font-size: 13px; font-weight: normal; text-align: center; padding: 9px; border-width: 1px 0px 0px; border-style: solid; border-color: #e3e3e3; background-color: #f5f5f5;\" valign=\"top\">\n\t\t\t\t\t <a href=\"#\" style=\"color: #428bca; text-decoration: none; background-color: transparent;\">promoda &copy; 2016, por david criollo</a>\n\t\t\t\t\t <br>\n\t\t\t\t\t <a href=\"#\" style=\"color: #478fca; text-decoration: none; background-color: transparent;\">twitter</a> .\n\t\t\t\t\t <a href=\"#\" style=\"color: #5b7a91; text-decoration: none; background-color: transparent;\">facebook</a> .\n\t\t\t\t\t <a href=\"#\" style=\"color: #dd5a43; text-decoration: none; background-color: transparent;\">google+</a>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t <table class=\"table-space\" height=\"1\" style=\"height: 1px; font-size: 0px; line-height: 0; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"1\" style=\"height: 1px; width: 450px; background-color: #ffffff;\" width=\"450\" bgcolor=\"#FFFFFF\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t <table class=\"table-space\" height=\"36\" style=\"height: 36px; font-size: 0px; line-height: 0; width: 450px; background-color: #e4e6e9;\" width=\"450\" bgcolor=\"#E4E6E9\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t <td class=\"table-space-td\" valign=\"middle\" height=\"36\" style=\"height: 36px; width: 450px; background-color: #e4e6e9;\" width=\"450\" bgcolor=\"#E4E6E9\" align=\"left\">&nbsp;</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </tbody>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </table>\n\t\t\t\t\t </td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </table>\n\t\t\t\t\t</body>\n\t\t\t\t</html>\n\t\t';\n\t\t// Contenido\n\t\t$titulo = utf8_decode('Acivación cuenta');\n\t\t$html=utf8_decode($html);\n\t\t// Mail it\n\t\t$acu=0;\n\t\tif ($email->enviar($correo,$propietario,$titulo,$html)) {\n\t\t\t$acu=1;\n\t\t};\n\t\treturn $acu;\n\t}", "public function createComment(Request $request)\n {\n\n $validator = Validator::make($request->all(), [\n 'comment' => 'required',\n ]);\n\n if ($validator->fails()) {\n return back()\n ->withErrors($validator)\n ->withInput();\n }\n\n $comment = new BlogComment();\n $comment->user_id = Auth::id();\n $comment->blog_id = $request->bid;\n $comment->comment = $request->comment;\n $comment->save();\n\n $comment = BlogComment::with('user')->find($comment->id);\n\n //send email here\n $comment->notify(new BlogCommentNotification($comment));\n\n return redirect()->back();\n }", "function set_form_contacto(){\n\n\t\tif($this->input->post('id')){\n\n\t\t\t$user = $this->session->userdata('cliente_id');\n\n\t\t\t$mensaje = $this->load->view('frontend/comunes/form_contacto',null,true);\n\n\t\t\t$data_in = array(\n\t 'from_id' \t=> 0,\n\t 'to_id' \t=> $user,\n\t 'mensaje' => $mensaje,\n\t 'sin_fondo'\t=> 1,\n\t 'date'\t\t=> applib::fecha(),\n\t );\n\n\t applib::create(applib::$mensajes_table,$data_in);\n\n\t echo json_encode(array('res' => 'success'));\n\n\t\t}\n\n\t}", "function post_notification_fe_subscribe_comment(){\r\n\tglobal $post_notification_addr, $post_notification_code, $post_notification_action, $wpdb;\r\n\t$addr = &$post_notification_addr;\r\n\t$code = &$post_notification_code;\r\n\t$action = &$post_notification_action;\r\n\t$t_emails = $wpdb->prefix . 'post_notification_emails';\r\n\t\t\r\n\tif(isset($_POST['PID'])){\r\n\t\t$PID = $_POST['PID'];\r\n\t} else {\r\n\t\t$PID = $_GET['PID'];\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\tif(!is_email($addr)){ //We havent't got an Email - Lets get one\r\n\t\t$ret = post_notification_ldfile('subscribe_comment_email.tmpl');\r\n\t\t$post = get_post($PID);\r\n\r\n\t\t$ret['header'] = str_replace('@@title',$post->post_title,$ret['header']);\r\n\t\t$ret['body'] = str_replace('@@title',$post->post_title,$ret['body']);\r\n\t\t$ret['body'] = str_replace('@@addr',$addr,$ret['body']);\r\n\t\t\r\n\t\t$forminput .= '<input type=\"hidden\" name=\"PID\" value=\"' . $PID . '\">';\r\n\t\t$forminput .= '<input type=\"hidden\" name=\"action\" value=\"subscribe_comment\">';\r\n\t\t\t\t\r\n\t\t$ret['body'] = str_replace('@@vars',$forminput,$ret['body']);\r\n\t\t$ret['body'] = str_replace('@@action',post_notification_get_link(). 'POST_NOTIFICATION_FE_CHECK=1',$ret['body']);\r\n\t\t//var_dump($ret);\r\n\t\treturn $ret;\r\n\t\t\r\n\t} else {\r\n\t\tif($addr != post_notification_get_addr()){\r\n\t\t\tsetcookie('comment_author_email_' . COOKIEHASH, $addr, time() + 30000000, COOKIEPATH, COOKIE_DOMAIN);\r\n\t\t}\r\n\t\t$res = $wpdb->get_row(\"SELECT id, gets_mail FROM $t_emails WHERE email_addr = '$addr'\");\r\n\t\t//post_notification_vardump($res);\r\n\t\tif($res === false){\r\n\t\t\t//There is no entry. Lets add one\r\n\t\t\tpost_notification_add_email($addr);\r\n\t\t\t$res = $wpdb->get_row(\"SELECT id, gets_mail FROM $t_emails WHERE email_addr = '$addr'\");\r\n\t\t\t//Now there should be an entry\r\n\t\t}\r\n\t\tif($_GET['unsub'] == 1){ //This si always GET!\r\n\t\t\t//echo \"----------UNSUB\";\r\n\t\t\tpost_notification_fe_update_subscriptions($res->id, array($PID),2,2);\r\n\t\t} else{\r\n\t\t\tpost_notification_fe_update_subscriptions($res->id, array($PID),2,0);\r\n\t\t}\r\n\t\tif($res->gets_mail == 1){\r\n\t\t\t$link = get_permalink($PID) . '#commentform';\r\n\t\t} else {\r\n\t\t\t$link = post_notification_get_link() . 'addr=' . urlencode($addr) . '&action=subscribe';\r\n\t\t}\r\n\t\twp_redirect($link);\r\n\t\techo \"Redirecting to <a href=\\\"$link\\\">$link</a>\";\r\n\t\texit();\r\n\t\t\r\n\t}\r\n\t\r\n\t\r\n}", "private function composeUpdateBookingMailForCreator($a_user_id) {\r\n\t\t$lng = $this->lng;\r\n\r\n\t\t$this->initLanguage($a_user_id);\r\n\t\t$this->initMail();\r\n\t\t$this->setSubject($this->lng->txt('rep_robj_xrs_mail_update_booking_creator_subject'));\r\n\t\t$this->setBody(ilMail::getSalutation($a_user_id, $this->getLanguage()));\r\n\t\t$this->appendBody(\"\\n\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_mail_update_booking_creator_message') . \"\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_room') . \" \");\r\n\t\t$this->appendBody($this->s_roomname . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_from') . \" \");\r\n\t\t$this->appendBody($this->datestart->get(IL_CAL_FKT_DATE, 'd.m.Y H:s') . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_to') . \" \");\r\n\t\t$this->appendBody($this->dateend->get(IL_CAL_FKT_DATE, 'd.m.Y H:s'));\r\n\t\t$this->appendBody(\"\\n\\n\");\r\n\t\t$this->appendBody(ilMail::_getAutoGeneratedMessageString($this->language));\r\n\t}", "function enregistre_message($sujet, $message, $login_src, $login_dest, $date_visibilite=\"\", $in_reply_to=-1) {\n\tglobal $mysqli;\n\t$retour=\"\";\n\n\t$date_courante=strftime(\"%Y-%m-%d %H:%M:%S\");\n\tif(($date_visibilite==\"\")||($date_visibilite<$date_courante)) {\n\t\t$date_visibilite=$date_courante;\n\t}\n\n\t$sql=\"INSERT INTO messagerie SET sujet='\".$mysqli->real_escape_string($sujet).\"',\n\t\t\t\t\t\t\t\t\tmessage='\".$mysqli->real_escape_string($message).\"',\n\t\t\t\t\t\t\t\t\tlogin_src='\".$login_src.\"',\n\t\t\t\t\t\t\t\t\tlogin_dest='\".$login_dest.\"',\n\t\t\t\t\t\t\t\t\tin_reply_to='\".$in_reply_to.\"',\n\t\t\t\t\t\t\t\t\tdate_msg='\".$date_courante.\"',\n\t\t\t\t\t\t\t\t\tdate_visibilite='\".$date_visibilite.\"';\";\n\t//echo \"$sql<br />\";\n\t$res=mysqli_query($mysqli, $sql);\n\tif($res) {\n\t\t$retour = $mysqli->insert_id;\n\t}\n\treturn $retour;\n}", "private function composeCancellationMailForCreator($a_user_id, $reason = \"\") {\r\n\t\t$lng = $this->lng;\r\n\r\n\t\t$this->initLanguage($a_user_id);\r\n\t\t$this->initMail();\r\n\t\t$this->setSubject($this->lng->txt('rep_robj_xrs_mail_cancellation_creator_subject'));\r\n\t\t$this->setBody(ilMail::getSalutation($a_user_id, $this->getLanguage()));\r\n\t\t$this->appendBody(\"\\n\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_mail_cancellation_creator_message\r\n\t\t\t') . \"\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_room') . \" \");\r\n\t\t$this->appendBody($this->s_roomname . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_from') . \" \");\r\n\t\t$this->appendBody($this->datestart->get(IL_CAL_FKT_DATE, 'd.m.Y H:s') . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_to') . \" \");\r\n\t\t$this->appendBody($this->dateend->get(IL_CAL_FKT_DATE, 'd.m.Y H:s') . \" \\n\");\r\n\t\tif ($reason !== '') {\r\n\t\t\t$this->appendBody($lng->txt('rep_robj_xrs_mail_cancellation_reason_prefix') . \"\\n\");\r\n\t\t\t$this->appendBody($reason . \"\\n\");\r\n\t\t\t$this->appendBody(\"\\n\");\r\n\t\t}\r\n\t}", "public function commenter(Request $data)\n {\nif(Auth::check()){\n $comment = Commentaire::create([\n 'contenu' => $data['contenu'],\n 'evenement_id' => $data['evenement_id'],\n 'id_utilisateur' => Auth::user()->id,\n ]);\n\n if($comment){ return back()->with('success' , 'Commentaire ajouter'); }\n }\n\n return back()->with('errors' , 'Vous devez etre connecté pour pouvoir commenter!');\n}", "public function invitMembre($slug)\n {\n if(isset($_SESSION['user']))\n {\n if($this->allowToTwo('Admin','Assoc',$slug)){\n\n $donnee = $this->listing('Assoc',$slug);\n\n if($_POST){\n $r_POST = $this->nettoyage($_POST);\n $error['mail'] = ValidationTools::emailValid($r_POST['mail']);\n\n $assocModel = new AssocModel;\n $nom_assoc = $assocModel->FindElementByElement('nom','slug',$slug);\n $id_assoc = $assocModel->FindElementByElement('id','slug',$slug);\n\n if(ValidationTools::IsValid($error)){\n if(!is_numeric($r_POST['mail'])){ //si c'est ce n'est pas id on verifie si eventuelemt il le mail\n //exist en base en base de donnee\n $UserModel = new UserModel;\n $contactModel = new ContactModel;\n\n if($UserModel->emailExists($r_POST['mail'])){ //si oui on recupere l'id\n $r_POST['mail'] = $UserModel->FindElementByElement('id','mail',$r_POST['mail']);\n $r_POST['destinataire_orga'] = 'users';\n $RolesModel = new RolesModel;\n $roleRetourner = $RolesModel->FindRole($id_assoc,$r_POST['mail']);\n\n if(!empty($roleRetourner)){\n\n $confirmation ='Cet utilisateur fait déjà partie de l\\'Association';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n\n }\n\n }else {\n $r_POST['destinataire_orga'] = 'public';\n $r_POST['destinataire_status'] = 'del';\n }\n\n $invitation = $contactModel->findInvitation($r_POST['mail'],$id_assoc);\n if(!empty($invitation)){\n $confirmation ='Une invitation a déjà été envoyée à cette personne';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n }\n\n if($contactModel->findDemande($r_POST['mail'],$id_assoc)){\n $confirmation ='Une demande pour rejoindre l\\'Association a déjà faite par ce membre, merci de consulter les messages reçus de l\\'Association pour pouvoir y répondre';\n\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc','donnee' => $donnee,\n 'page'=>1,'confirmation'=>$confirmation]);\n }\n }\n\n unset($r_POST['submit']);\n\n $r_POST['emeteur_pseudo'] = $nom_assoc;\n $r_POST['objet'] = 'Invitation a rejoindre '.$nom_assoc ;\n $r_POST['emeteur_mailOrId'] = $id_assoc;\n $r_POST['destinataire_mailOrId'] = $r_POST['mail'];\n $r_POST['emeteur_orga'] = 'assoc';\n $r_POST['date_envoi'] = date('Y-m-d H:i:s');\n $r_POST['status'] = 'non-lu';\n $ok = false;\n\n\n if(is_numeric($r_POST['mail'])){\n //on envoi en interne une invite\n\n unset($r_POST['mail']);\n\n $r_POST['contenu'] = 'Bonjour,<br/>\n Nous serions très heureux de pouvoir vous compter parmi nous et vous invitons donc à rejoindre notre Association ! Pour en savoir plus sur nos activités n\\'hésitez pas à visiter <a href=\"'.$this->generateUrl('racine_assoc',['orga'=>'assoc','slug'=>$slug],true).'\">notre page</a> !<br/>\n A bientôt !';\n\n if($contactModel->insert($r_POST,false)){\n $ok = true;\n }\n }else {\n unset($r_POST['mail']);\n\n\n $r_POST['contenu'] = 'Bonjour, <br/>\n Nous serions très heureux de pouvoir vous compter parmi nous ! Pour en savoir plus sur nos activités n\\'hésitez pas à visiter <a href=\"'.$this->generateUrl('racine_assoc',['orga'=>'assoc','slug'=>$slug],true).'\">notre page</a> !<br/>\n Cependant, vous devez au préalable être inscrit sur le site.<br/>\n <a href=\"'.$this->generateUrl('racine_inscriptForm',[],true).'\">Cliquez ici</a> pour vous inscrire et devenir aussitôt un de nos membres !<br/>\n A bientôt !';\n\n $contactModel = new ContactModel;\n $contactModel->insert($r_POST,false);\n $mail = new PHPMailer();\n $mail->CharSet = \"utf8\";\n //$mail->SMTPDebug = 3; // Enable verbose debug output\n $mail->isMail();\n $mail->setFrom('Webmaster@as-co-ma.fr', 'Mailer');\n $mail->addAddress($r_POST['destinataire_mailOrId'], 'exemple@example.com');\n $mail->addReplyTo('no-reply@as-co-ma', 'Information');\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = $r_POST['objet'];\n $mail->Body = $r_POST['contenu'];\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n if($mail->send()) {\n $ok = true;\n }\n }\n if($ok){\n $confirmation = 'L\\'invitation a bien été envoyée';\n }else {\n $confirmation = 'L\\'invitation n\\'a pas pu être envoyée suite à un problème technique';\n }\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'confirmation'=>$confirmation]);\n }else {\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'error'=>$error]);\n }\n\n }else {\n\n $error['mail']= 'Merci de saisir un mail';\n $this->show('admin/liste',['slug' => $slug,'orga' => 'assoc',\n 'page'=>1,'donnee' => $donnee,'error'=>$error]);\n\n }\n\n }\n }else{\n $this->redirectToRoute('racine_form');\n }\n }", "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 notificacionRegistroUsuario($user, $pass) {\n\n\n if ($this->email and $this->email->getMailer() and $user->getEmail()) {\n\n $message = $this->email->createMessage('Su cuenta en openAO ha sido creada')\n ->setFrom(array($this->remitente => 'openAO'))\n ->setTo(array($user->getEmail()))\n ->setBody($this->app->render('@NotificacionBundle/nuevousuario.twig', array(\n 'notification_title' => \"Usted ha sido registrado en el sistema de openAO\",\n 'notification_subtitle' => \"En este correo encontrará la información de su cuenta \",\n 'notification' => \"Nombre completo: \" . $user->getFullname(),\n 'notification_email' => \"Correo: \" . $user->getEmail(),\n 'notification_access' => \"Sus datos de acceso son los siguientes\",\n 'notification_username' => \"Nombre de usuario: \" . $user->getUsername(),\n 'notification_password' => \"Contraseña \" . $pass,\n 'notification_url' => $this->app->request()->getUrl().$this->app->request()->getRootUri()\n )), 'text/html');\n $this->email->getMailer()->send($message);\n }\n }", "public function calificacionPendiente($changuita, $usuario, $contraparte) {\n $sql = \"select nombre, mail, aviso_ca from usuarios where id = $usuario and activo = '2'\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n if ($fila[\"aviso_ca\"] == 1) {\n $mail = $fila[\"mail\"];\n $nombre = $fila[\"nombre\"];\n $sql = \"select nombre, apellido, mail, celular_area, celular from usuarios where id = $contraparte\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n //$cNombre = $fila[\"nombre\"].\" \".$fila[\"apellido\"];\n $cNombre = $fila[\"nombre\"];\n $cMail = $fila[\"mail\"];\n // $cTel = $fila[\"telefono_area\"].\" \".$fila[\"telefono\"];\n $cCel = $fila[\"celular_area\"] . \" \" . $fila[\"celular\"];\n $sql = \"select usuario, titulo from changuitas where id = $changuita\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n $titulo = $fila[\"titulo\"];\n $txtContrato = \"fuiste elegido por\";\n if ($usuario == $fila[\"usuario\"])\n $txtContrato = \"elegiste a\";\n $this->mailer->Subject = \"Tenés que calificar a $cNombre por la changuita $titulo\";\n $this->mailer->Body = $this->bodyIni;\n $this->mailer->Body .= \"Estimado/a $nombre:<br/><br/>Ya pasaron varios días desde que $txtContrato $cNombre para realizar la changuita <a href='\" . Sitio . \"/#/changuita|\" . $changuita . \"'><strong>$titulo</strong></a>. Por este motivo, te pedimos que lo/a califiques por su amabilidad, claridad y efectividad en el intercambio. Si la changuita ya fue concretada, podés <a href='\" . Sitio . \"/#/changuita|\" . $changuita . \"'>calificarlo/a ahora</a>. De no haberse concretado el intercambio en el tiempo indicado, podés indicarlo y calificar a tu contraparte para obtener una bonificación de los cargos. En ese caso, la reputación de $cNombre se verá afectada negativamente.<br/>Te recordamos sus datos de contacto:<br/>E-mail: $cMail<br/>\";\n // if(trim($cTel) != \"\")\n // $this->mailer->Body .= \"Tel.: $cTel<br/>\";\n if (trim($cCel) != \"\")\n $this->mailer->Body .= \"Cel.: $cCel<br/>\";\n $this->mailer->Body .= \"<br/>\" . $this->bodyFin;\n $this->mailer->ClearAddresses();\n $this->mailer->AddAddress($mail);\n $this->mailer->Send();\n }\n }", "public function notifyModerators(&$comment) {\n if (!$comment instanceof modxTalksPost && !$comment instanceof modxTalksTempPost) {\n return false;\n }\n\n $this->modx->lexicon->load('modxtalks:emails');\n\n /**\n * Get User info\n */\n $user = $comment->getUserData();\n $images_url = $this->modx->getOption('site_url') . substr($this->config['imgUrl'], 1);\n\n if ($comment instanceof modxTalksPost) {\n $cid = $comment->conversationId;\n $idx = $comment->idx;\n $link = $this->generateLink($cid, $idx, 'full');\n $subject = $this->modx->lexicon('modxtalks.email_new_comment');\n $text = $this->modx->lexicon('modxtalks.email_added_new_comment', array(\n 'link' => $link,\n 'name' => $user['name'],\n ));\n } elseif ($comment instanceof modxTalksTempPost) {\n $subject = $this->modx->lexicon('modxtalks.email_new_premoderated_comment');\n $text = $this->modx->lexicon('modxtalks.email_user_add_premoderated_comment', array(\n 'name' => $user['name'],\n ));\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\n */\n $success = false;\n\n $emails = $this->getUsersEmailsByGroups($this->config['moderator'], $comment);\n\n /**\n * send notifications to moderators\n */\n if (!empty($emails)) {\n if ($this->sendEmail($subject, $body, $emails)) {\n $success = true;\n }\n }\n\n return $success;\n }", "function vfhky_send_email($parent_id,$comment){\n $adminEmail = get_option('admin_email'); //取得博主的邮箱\n $parent_comment=get_comment($parent_id);//取得被回复者的所有信息\n $author_email=trim($comment->comment_author_email);//取得评论者的邮箱\n $to = trim($parent_comment->comment_author_email);//取得被回复者的邮箱\n $spam_confirmed = $comment->comment_approved;\n if ($spam_confirmed != 'spam') {\n $wp_email = 'no-reply@' . preg_replace('#^www\\.#', '', strtolower($_SERVER['SERVER_NAME'])); // \n $subject = '尊敬的 ' . trim(get_comment($parent_id)->comment_author) . ',您在 [' . get_option(\"blogname\") . '] 中的评论有了新的回复';\n$message = '<b>尊敬的:' . trim(get_comment($parent_id)->comment_author) . ' </b><br/>\n<HR style=\"FILTER: alpha(opacity=100,finishopacity=0,style=1)\" width=\"100%\" color=#987cb9 SIZE=3>\n<font style=\"margin:0px 0px 0px 25px;\">您之前在 [' . get_option(\"blogname\") . '] 中的一篇文章《' . get_the_title($comment->comment_post_ID) . '》上发表了如下评论:</font>\n<p style=\"background-color:#EEE;border: 1px solid #DDD; padding: 20px;margin: 6px 0px 20px 25px;\">'\n. nl2br(trim(get_comment($parent_id)->comment_content)). '\n</p>\n<b>回复人:' . trim($comment->comment_author) . ' </b><br/>\n<HR style=\"FILTER: alpha(opacity=100,finishopacity=0,style=1)\" width=\"100%\" color=#987cb9 SIZE=3>\n<font style=\"margin:0px 0px 0px 25px;\">给您的回复如下:</font><p style=\"background-color:#EEE;border: 1px solid #DDD; padding: 20px;margin: 6px 0px 20px 25px;\">'\n. nl2br(trim($comment->comment_content)) .\n' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style=\"text-decoration:none;\" href=\"' . htmlspecialchars(get_comment_link($parent_id,array(\"type\" => \"all\"))) . '\" target=\"_blank\">' .'[查看回复详情]</a></p>\n<b>获取博客最新资讯:</b><br/>\n<HR style=\"FILTER: alpha(opacity=100,finishopacity=0,style=1)\" width=\"100%\" color=#987cb9 SIZE=3>\n<p style=\"background-color:#EEE;border: 1px solid #DDD; padding: 20px;margin: 15px 0px 15px 25px;\">\n新浪微博:<a style=\"text-decoration:none;\" href=\"'.stripslashes(get_option('vfhky_sinamblog')).'\" target=\"_blank\">'.stripslashes(get_option('vfhky_sinamblog')).'</a><br/>\n腾讯微博:<a style=\"text-decoration:none;\" href=\"'.stripslashes(get_option('vfhky_qqmblog')).'\" target=\"_blank\">'.stripslashes(get_option('vfhky_qqmblog')).'</a><br/>\nQQ邮箱订阅:<a style=\"text-decoration:none;\" href=\"http://mail.qq.com/cgi-bin/feed?u='.get_option(\"siteurl\").'/feed\" target=\"_blank\">http://mail.qq.com/cgi-bin/feed?u='.get_option(\"siteurl\").'/feed</a><br/>\nGitHub源码:<a style=\"text-decoration:none;\" href=\"https://github.com/vfhky/vfhky\" target=\"_blank\">WordPress主题[vfhky]</a><br/>\n</p>\n\n<div align=\"center\">感谢您对 <a href=\"'.get_option(\"siteurl\").'\" target=\"_blank\">黄克业的博客</a> 的支持!<br/>任何疑问,敬请访问 <a href=\"'.get_option(\"siteurl\").'/contact\" target=\"_blank\">'.get_option(siteurl).'/contact</a><br/>\nCopyright &copy;2012-'.date(\"Y\").' All Rights Reserved</div>';\n\t\t $message = convert_smilies($message);\n $from = \"From: \\\"\" . get_option('blogname') . \"\\\" <$wp_email>\";\n $headers = \"$from\\nContent-Type: text/html; charset=\" . get_option('blog_charset') . \"\\n\";\n wp_mail( $to, $subject, $message, $headers );\n }\n }", "public function addComment(): void{\n Quizzes::addComment($_SESSION[\"quizID\"], $_SESSION[\"email\"], $_POST[\"commentText\"]);\n\n $qfa = new QuizFinishUser($_SESSION[\"q\"], $_SESSION[\"ua\"], $_SESSION[\"aa\"]);\n $qfa->generateHTML();\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 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('contact@elevenmx.com')\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 }", "public function getMailComment($id) {\n\n\t\t$manager = $this->manager->getManager();\n\n\t\t$mail = $manager->prepare('SELECT * FROM comments WHERE ID = ?') or die(print_r($manager->errorMessage()));\n\n\t\t$mail->execute(array($id));\n\n\t\t$email = $mail->fetch();\n\n\t\treturn $email;\n\t}", "function do_salmon_as_comment($module,$id,$self_url,$self_title,$title=NULL,$post=NULL,$email='',$poster_name_if_guest='',$forum=NULL,$validated=NULL)\n\t{\n\t\tif (!is_null($post)) $_POST['post'] = $post;\n\t\tif (!is_null($title)) $_POST['title'] = $title;\n\t\t$_POST['email'] = $email;\n\t\t$_POST['poster_name_if_guest'] = $poster_name_if_guest;\n\t\t\n\t\treturn do_comments(true,$module,$id,$self_url,$self_title,$forum,true,$validated,false,true);\n\t}", "public function responder($idPregunta) {\n $sql = \"select ch.id, u.nombre, u.mail, u.aviso_res, ch.titulo, p.respuesta from preguntas as p left join changuitas as ch on p.changuita = ch.id left join usuarios as u on p.usuario = u.id where p.id = $idPregunta and ch.activo = '1' and u.activo = '2' and ch.vencida = '0' and ch.estado = '0'\";\n $res = $this->bd->query($sql);\n $fila = $res->fetch_assoc();\n if ($fila[\"aviso_res\"] == 1) {\n $mail = $fila[\"mail\"];\n $nombre = $fila[\"nombre\"];\n $titulo = $fila[\"titulo\"];\n $respuesta = $fila[\"respuesta\"];\n $this->mailer->Subject = $nombre . \", respondieron tu pregunta en la changuita $titulo\";\n $this->mailer->Body = $this->bodyIni;\n $this->mailer->Body .= \"Estimado/a $nombre:<br/><br/>Respondieron tu pregunta en lu changuita <strong>$titulo</strong>:<blockquote><strong>$respuesta</strong></blockquote><a href='\" . Sitio . \"/#/changuita|\" . $fila[\"id\"] . \"'>Entrá acá</a> para volver a ver la publicación y evaluar postularte.\";\n $this->mailer->Body .= \"<br/>\" . $this->bodyFin;\n $this->mailer->ClearAddresses();\n $this->mailer->AddAddress($mail);\n $this->mailer->Send();\n }\n }", "private function verificarEmail(){\n\t \n\t \t\t//Verifica se a requisição é via AJAX\n\t \t\tif(HelperFactory::getInstance()->isAjax()){\n\t \t\t\n\t \t\t\t //Solicita a verificação do E-mail\n\t\t\t\t $this->Delegator('ConcreteCadastro', 'verificarEmail',$this->getPost());\t \t\t\t \n\t \t\t}\t \n\t }", "function wp_new_comment_notify_moderator($comment_id)\n {\n }", "public function update()\n {\n $id=request('id');\n\n $res=commentes::where('id',$id)->get();\n\n $comment=new commentes;\n foreach ($res as $res) {\n $userid=$res->user_id;\n }\n if(Auth::user()->id == $userid){\n $comment= commentes::find($id);\n $comment->body=request('body');\n $comment->save();\n return redirect('/');\n }\n else {\n echo \"<script type='text/javascript'>alert('call the owner plz!');\n window.location.href='/blog/public/';\n </script>\";\n }\n }", "function clsRecordemails()\r\n {\r\n\r\n global $FileName;\r\n $this->Visible = true;\r\n $this->Errors = new clsErrors();\r\n $this->ds = new clsemailsDataSource();\r\n $this->ReadAllowed = false;\r\n $this->InsertAllowed = false;\r\n $this->UpdateAllowed = false;\r\n $this->DeleteAllowed = false;\r\n $this->Visible = (CCSecurityAccessCheck(\"1;2\") == \"success\");\r\n if($this->Visible)\r\n {\r\n $this->ReadAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->InsertAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->ComponentName = \"emails\";\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n $this->message = new clsControl(ccsTextArea, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n $this->Insert = new clsButton(\"Insert\");\r\n $this->item_id = new clsControl(ccsHidden, \"item_id\", \"Item Id\", ccsInteger, \"\", CCGetRequestParam(\"item_id\", $Method));\r\n $this->to_user_id = new clsControl(ccsHidden, \"to_user_id\", \"To User Id\", ccsInteger, \"\", CCGetRequestParam(\"to_user_id\", $Method));\r\n $this->from_user_id = new clsControl(ccsHidden, \"from_user_id\", \"From User Id\", ccsInteger, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n $this->emaildate = new clsControl(ccsHidden, \"emaildate\", \"date\", ccsInteger, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n $this->subject = new clsControl(ccsHidden, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n if(!$this->FormSubmitted) {\r\n if(!strlen($this->from_user_id->GetValue()))\r\n $this->from_user_id->SetValue(CCGetUserID());\r\n if(!strlen($this->emaildate->GetValue()))\r\n $this->emaildate->SetValue(time());\r\n }\r\n }\r\n }", "public function addRefillemail()\n\t{\n\t\n\t\t$this->Checklogin();\n\t\tif (isset($_POST ['btnSubmit']))\n\t\t{\n\t\n\t\t\t$data ['admin_section']='Branch';\n\t\t\t$id=$this->branch_model->addRefillemail();\n\t\t\tif ($id)\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Email refilled successfully in branch.');\n\t\t\t\tredirect('admin/branch');\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('error','Unable to refill email.');\n\t\t\t\tredirect('admin/branch');\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\tredirect('admin/branch');\n\t\t}\n\t\n\t}", "function sendMail($recipient, $admin, $data,$content='', $adminContent='',$dataContent='')\t{\n\t\tif ($this->conf['debug'] && !$recipient) echo 'No recepient for email';\n\t\tif ($this->conf['debug']) echo \"<br> Emails : $recipient, $admin, $data : <br/>User : $content=,<br/>Admin : $adminContent,<br/>Data : $dataContent\";\n\t\t//dataEmail\n\t\tif ($data && $dataContent && $dataContent!='NOMAIL')\t{\n\t\t\t$cc=$this->conf['emails']['data']['cc'];\n\t\t\t$bcc=$this->conf['emails']['data']['bcc'];;\n\t\t\tif (!$this->isHTMLContent($dataContent))\t{\n\t\t\t\t$admMail = $this->cObj->sendNotifyEmail($dataContent,\n\t\t\t\t\t\t\t\t\t$data,\n\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t$this->conf['email.']['from'],\n\t\t\t\t\t\t\t\t\t$this->conf['email.']['fromName'],\n\t\t\t\t\t\t\t\t\t$recipient\n\t\t\t\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$this->sendHTMLMail($dataContent,\n\t\t\t\t\t\t\t\t\t$data,\n\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t$this->conf['email.']['from'],\n\t\t\t\t\t\t\t\t\t$this->conf['email.']['fromName'],\n\t\t\t\t\t\t\t\t\t$recipient,\n\t\t\t\t\t\t\t\t\t$cc,\n\t\t\t\t\t\t\t\t\t$bcc\n\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Admin mail:\n\t\tif ($admin && $adminContent && $adminContent!='NOMAIL')\t{\n\t\t\t$cc=$this->conf['emails']['admin']['cc'];\n\t\t\t$bcc=$this->conf['emails']['admin']['bcc'];;\n\t\t\tif (!$this->isHTMLContent($adminContent))\t{\n\t\t\t\t$admMail = $this->cObj->sendNotifyEmail($adminContent,\n\t\t\t\t\t\t\t\t\t$admin,\n\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t$this->conf['email.']['from'],\n\t\t\t\t\t\t\t\t\t$this->conf['email.']['fromName'],\n\t\t\t\t\t\t\t\t\t$recipient\n\t\t\t\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$this->sendHTMLMail($adminContent,\n\t\t\t\t\t\t\t\t\t$admin,\n\t\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t\t$this->conf['email.']['from'],\n\t\t\t\t\t\t\t\t\t$this->conf['email.']['fromName'],\n\t\t\t\t\t\t\t\t\t$recipient,\n\t\t\t\t\t\t\t\t\t$cc,\n\t\t\t\t\t\t\t\t\t$bcc\n\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t//user mail:\n\t\tif ($recipient && $content!='NOMAIL') {\n\t\t\t$cc=$this->conf['emails']['user']['cc'];\n\t\t\t$bcc=$this->conf['emails']['user']['bcc'];\n\t\t\tif (!$this->isHTMLContent($content))\t{\n\t\t\t\t$this->cObj->sendNotifyEmail($content,\n\t\t\t\t\t\t\t\t\t$recipient,\n\t\t\t\t\t\t\t\t\t'',\t\t\t// ($admMail ? '' : $admin), \t\t// If the special administration mail was not found and send, the regular is...\n\t\t\t\t\t\t\t\t\t$this->conf['email.']['from'],\n\t\t\t\t\t\t\t\t\t$this->conf['email.']['fromName'],\n\t\t\t\t\t\t\t\t\t$admin\n\t\t\t\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t$this->sendHTMLMail($content,\n\t\t\t\t\t\t\t\t\t$recipient,\n\t\t\t\t\t\t\t\t\t'',\t\t\t// ($admMail ? '' : $admin), \t\t// If the special administration mail was not found and send, the regular is...\n\t\t\t\t\t\t\t\t\t$this->conf['email.']['from'],\n\t\t\t\t\t\t\t\t\t$this->conf['email.']['fromName'],\n\t\t\t\t\t\t\t\t\t$admin\n\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "public function userAskToBeNotified(){\n// $message = new Message();\n// $message->setHeure(\"19h50\");\n// $message->setVille(\"TO\");\n// $message->setStatue(\"Retart\");\n// $message->setPhoneNumber(\"+15143468023\");\n// $message->setMessage(\"Salut je fait un test\");\n// $messagemodel->sendSMS($message);\n $arryNotif [0]= $_POST[\"vol\"];\n $arryNotif[1] = $_POST[\"phone\"];\n $arryNotif[2] = $_POST[\"date\"];\n $arryNotif[3] = $_POST[\"status\"];\n $notifDAO = new NotifyDAO();\n $notifDAO->create($arryNotif);\n\n }", "function invia_email_richiesta_accettata($id_richiesta) {\n $query = \"SELECT U.email as email_fornitore, UU.nome, UU.cognome, UU.telefono, UU.indirizzo, UU.email as email_utente, UU.dati_contatto\n FROM Richieste as R JOIN Users as U ON R.id_fornitore=U.id JOIN Users as UU ON R.id_utente=UU.id\n WHERE R.id=\".$id_richiesta;\n $result = mysql_query($query) or die(mysql_error());\n\n\tif($result){\n $row = mysql_fetch_assoc($result);\n\t} else {\n\t return false;\n\t}\n\n\tif($row['dati_contatto'][0] == 1) {\n\t $indirizzo = $row['indirizzo'];\n\t} else {\n\t $indirizzo = '<i>non visibile</i>';\n\t}\n\tif($row['dati_contatto'][1] == 1) {\n\t $telefono = $row['telefono'];\n\t} else {\n\t $telefono = '<i>non visibile</i>';\n\t}\n\tif($row['dati_contatto'][2] == 1) {\n\t $email = $row['email_utente'];\n\t} else {\n\t $email = '<i>non visibile</i>';\n\t}\n\n $to = $row['email_fornitore'];\n $subject = \"Richiesta Accettata\";\n $message = \"<html><head>\n <title>Hai accettato una richiesta</title>\n </head><body>\n <p>Riepilogo dati utente:</p>\n <p>Nome: \".$row['nome'].\" \".$row['cognome'].\"<br>\n Telefono: \".$telefono.\"<br>\n Email: \".$email.\"<br>\n Indirizzo: \".$indirizzo.\"</p>\n <p>Ricordiamo che per ogni richiesta accettata saranno aggiunti 2€ sul conto aziendale.</p>\n </body></html>\";\n\n $res = sendEmail($to, $subject, $message);\n\n}", "public function emails($boletoID, $post);", "public function newComment() {\n $datas['chapter_id'] = abs((int) $_GET['id']);\n $datas['author'] = trim(htmlspecialchars((string) $_POST['newCommentAuthor']));\n $datas['content'] = trim(htmlspecialchars((string) $_POST['newCommentContent']));\n\n if (!empty($datas['content']) && !empty($datas['author'])) {\n $commentMngr = new CommentManager();\n $commentMngr->add($datas);\n \n $_SESSION['commentsPseudo'] = $datas['author'];\n } else {\n $GLOBALS['error']['newComment'] = \"Un commentaire ne peut pas être vide et doit impérativement être associé à un pseudo.\";\n }\n }", "public function insertContact($nom, $email, $sujet, $message) {\n \t// on récupère les données rentrées par l'utilisateur\n $this->nom = strip_tags($nom);\n\t\t$this->email = strip_tags($email);\n $this->sujet = strip_tags($sujet);\n $this->message = strip_tags($message);\n \n // appelle la connexion à la BDD\n require('connexion.php');\n \n // on crée une requête puis on l'exécute\n $req = $bdd->prepare('INSERT INTO t_commentaires (co_nom, co_email, co_sujet, co_message) VALUES (:co_nom, :co_email, :co_sujet, :co_message)');\n $req->execute([\n \t':co_nom'\t=> $this->nom, // on attribue à la variable co_nom la valeur de l'objet en cours d'instanciation, le nom de l'auteur du message qui vient d'être posté.\n ':co_email' => $this->email,\n ':co_sujet' => $this->sujet,\n ':co_message' => $this->message]);\n echo 'bonjour';\n // on ferme la requête pour protéger des injections\n $req->closeCursor();\n }", "private function composeUpdatingBookingMailForParticipant($a_user_id) {\r\n\t\t$lng = $this->lng;\r\n\r\n\t\t$this->initLanguage($a_user_id);\r\n\t\t$this->initMail();\r\n\t\t$this->setSubject($this->lng->txt('rep_robj_xrs_mail_update_booking_participant_subject'));\r\n\t\t$this->setBody(ilMail::getSalutation($a_user_id, $this->getLanguage()));\r\n\t\t$this->appendBody(\"\\n\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_mail_update_booking_participant_message') . \"\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_room') . \" \");\r\n\t\t$this->appendBody($this->s_roomname . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_from') . \" \");\r\n\t\t$this->appendBody($this->datestart->get(IL_CAL_FKT_DATE, 'd.m.Y H:s') . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_to') . \" \");\r\n\t\t$this->appendBody($this->dateend->get(IL_CAL_FKT_DATE, 'd.m.Y H:s'));\r\n\t\t$this->appendBody(\"\\n\\n\");\r\n\t\t$this->appendBody(ilMail::_getAutoGeneratedMessageString($this->language));\r\n\t}", "public function addMessage(Request $request, $Titre, $user)\n {\n if(!empty($request->Descrition) OR !empty($request->Email)){\n $Message= new Message;\n $Message->fk_User= $user;\n $Message->Titre= $Titre;\n $Message->Description= $request->Description;\n $Message->Email= $request->Email;\n $Message->save();\n // return redirect('/view/detail/$id');\n $config['content'] = \"Vous avez un nouveau message\";\n $config['to'] = CRUDBooster::adminPath('Message');\n $config['id_cms_users'] = [$user]; \n CRUDBooster::sendNotification($config);\n\n return back(); \n }else{\n\n return back();\n }\n }", "function ajax_add() {\n\t\t$result = array(\n\t\t\t'success' => false,\n\t\t\t'message' => 'default message'\n\t\t);\n\t\t\n\t\tif (isset($_POST)) {\n\t\t\tif (isset($_POST['author']) && isset($_POST['email']) && isset($_POST['subject']) && isset($_POST['body']) && isset($_POST['productId']) && isset($_POST['personalEmail']) && isset($_POST['workEmail'])) {\n\t\t\t\t$author = $_POST['author'];\n\t\t\t\t$email = $_POST['email'];\n\t\t\t\t$subject = $_POST['subject'];\n\t\t\t\t$body = $_POST['body'];\n\t\t\t\t$product_id = $_POST['productId'];\n\t\t\t\t$personal_email = $_POST['personalEmail'];\n\t\t\t\t$work_email = $_POST['workEmail'];\n\t\t\t\t\n\n\t\t\t\tif ($this->Comment->is_spam($body)) {\n\t\t\t\t\t$result['message'] = 'Váš komentář obsahuje zakázaná slova a je proto považován za SPAM. Kometář nebyl uložen.';\n\t\t\t\t} else {\n\t\t\t\t\t$comment = array(\n\t\t\t\t\t\t'Comment' => array(\n\t\t\t\t\t\t\t'author' => $author,\n\t\t\t\t\t\t\t'email' => $email,\n\t\t\t\t\t\t\t'subject' => $subject,\n\t\t\t\t\t\t\t'body' => $body,\n\t\t\t\t\t\t\t'product_id' => $product_id,\n\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t'personal_email' => $personal_email,\n\t\t\t\t\t\t\t'work_email' => $work_email\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t$this->Comment->create();\n\t\t\t\t\tif ($this->Comment->save($comment)) {\n\t\t\t\t\t\t// komentar byl vlozen, notifikace adminu o novem dotazu\n\t\t\t\t\t\t$this->Comment->notify_new_comment($this->Comment->id);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$result['message'] = 'Váš kometář byl uložen ke zpracování. Po schválení se bude zobrazovat.';\n\t\t\t\t\t\t$result['success'] = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$result['message'] = 'Chyba při ukládání, zkontrolujte formulář a zkuste to prosím znovu.';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$result['message'] = 'Nejsou známá všechna potřebná formulářová pole.';\n\t\t\t}\n\t\t} else {\n\t\t\t$result['message'] = 'Neznám POST data';\n\t\t}\n\t\t\n\t\techo json_encode($result);\n\t\tdie();\n\t}", "public function commandeSpecialFormTraitement(){\n\n // Récupération des informations du formulaire de contact\n $nom = $this->verifierSaisie(\"nom\");\n $prenom = $this->verifierSaisie(\"prenom\");\n $email = $this->verifierSaisie(\"email\");\n $sujet = $this->verifierSaisie(\"sujet\");\n $message = $this->verifierSaisie(\"message\");\n\n // Sécurité\n if ( $this->verifierEmail($email)\n && ($nom != \"\")\n && ($prenom != \"\")\n && ($sujet != \"\")\n && ($message != \"\") ){\n\n \n // message pour l'utilisateur\n // $GLOBALS[\"contactRetour\"] = \"<p class='bg-success'>Merci $prenom, votre message est bien envoyé !</p>\";\n $GLOBALS[\"commandeSpecialRetour\"] = \"<span class='glyphicon glyphicon-ok' aria-hidden='true'></span> Merci $prenom, votre message a bien été envoyé !\";\n }\n\n else{\n // $GLOBALS[\"contactRetour\"] = \"Il manque des informations\";\n $GLOBALS[\"commandeSpecialRetour\"] = \"<span class='glyphicon glyphicon-alert' aria-hidden='true'></span> Il manque des informations !\";\n }\n\n }", "function postCommentNotify($id, $postId){\r\n $commentManager = new CommentsManager();\r\n $notify = $commentManager->postNotify($id);\r\n}", "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 }", "function nouveau()\n {\n $data['scripts'] = array('jquery', 'bootstrap', 'lte', 'datepicker','cssMessagerie' );\n\n // Creation du bandeau\n $data['titre'] = array(\"Messagerie\", \"fas fa-envelope\");\n\n \n \n\n // si la session est null c'est que l'utilisateur n'est pas connecté donc retour à la page de login\n if(!isset($_SESSION['dataUser']))\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-sync\", $this->dir_login, null),\n array(\"Retour\", \"fas fa-sync\", $this->dir_retour, null),\n );\n }\n \n $data['ActiveConv'] = false;\n \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 $data['profils'] = $this->m_messagerie->get_all_profil();\n\n $this->form_validation->set_rules(\"inputMessage\",\"inputMessage\",\"required\");\n if($this->form_validation->run()){\n $data['id_profils'] = $this->input->post('id_profils');\n $data[\"message\"] = $this->input->post('inputMessage');\n $data['date'] = date(\"Y-m-d H:i:s\"); \n $this->m_messagerie->set_message($data['userId'],$data['id_profils'],$data['message'],$data['date']);\n var_dump($data['id_profils']);\n var_dump($data[\"message\"]);\n var_dump($data['date']);\n var_dump($data['userId']);\n //redirect($this->dir_controlleur);\n }\n \n\n // On charge les differents modules neccessaires a l'affichage d'une page\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/nouveau',$data);\n }", "function offer_mail($recharge_user_id) {\n\t\t$recharge_user_id = $recharge_user_id;\n\t\t$frnd_records = $this -> conn -> get_table_row_byidvalue('user', 'user_id', $recharge_user_id);\n\t\t$user_name = $frnd_records['0']['user_name'];\n\t\t$user_email = $frnd_records['0']['user_email'];\n\t\t// $frnd_number = $frnd_records['0']['user_contact_no'];\n\t\t//\t$offer_records = $this -> conn -> get_table_row_byidvalue('add_cart_offer', 'cart_user_id', 12);\n\t\t$offer_records = $this -> conn -> get_table_field_doubles('add_cart_offer', 'cart_user_id', $recharge_user_id, 'cart_offer_status', 2);\n\n\t\tif (!empty($offer_records)) {\n\n\t\t\tforeach ($offer_records as $value) {\n\n\t\t\t\t$coupon_id = $value['cart_offer_id'];\n\t\t\t\t$frnd_records = $this -> conn -> join_two_table('free_coupon_list', 'free_coupon_category', 'fee_coupon_category_id', 'free_coupon_category_id', 'free_coupon_id', $coupon_id);\n\t\t\t\t//$transaction = $this->login_model->join_two_table('free_coupon_list','free_coupon_category', 'fee_coupon_category_id', 'free_coupon_category_id','free_coupon_id',$coupon_id);\n\n\t\t\t\t$free_coupon_id = $frnd_records['0']['free_coupon_id'];\n\t\t\t\t$coupon_name = $frnd_records['0']['coupon_name'];\n\t\t\t\t$coupon_discount = $frnd_records['0']['coupon_discount'];\n\t\t\t\t$coupon_code = $frnd_records['0']['coupon_code'];\n\t\t\t\t$coupon_expiry_date = $frnd_records['0']['coupon_expiry_date'];\n\t\t\t\t$coupon_refference_url = $frnd_records['0']['refference_website'];\n\t\t\t\t$coupon_image_url = coupon_logo . '/' . $frnd_records['0']['coupon_img'];\n\t\t\t\t// $to='blm.ypsilon@gmail.com';\n\t\t\t\t$to = $user_email;\n\n\t\t\t\t$subject = \"Promotional offer code details\";\n\t\t\t\t$path = mail_logo;\n\t\t\t\t$message = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\"><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><title>Untitled Document</title></head>\n\n<body bgcolor=\"#f1f1f1\">\n<table cellpadding=\"0\" cellspacing=\"0\" width=\"600\" style=\"background:#fff; border:1px solid #cbcbcb; margin:0 auto; font-family:Arial, Helvetica, sans-serif; font-size:12px;\">\n\t<thead class=\"header\">\n \t<tr>\n \t<td style=\"background:#FFFFFF; height:62px; width:100%; padding:5px; border-bottom:1px solid #DDD;\" valign=\"middle\">\n \t<a href=\"#\" style=\"margin-left:10px;\"><img width=\"100\" src=\"' . $path . '\" alt=\"...\"/></a>\n \n </td>\n </tr>\n </thead>\n <tbody style=\" background:#FEFEFE; border-bottom:1px solid #ddd;\">\n \t<tr>\n \t<td style=\"padding:10px 15px;\">\n \t<h1 style=\"margin-bottom:0px; color:#337d75;\">RECHARGE </h1>\n \t<p >Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since</p>';\n\t\t\t\t$message .= '<p>Coupon name:<strong>' . $coupon_name;\n\t\t\t\t'</strong></p>';\n\t\t\t\t$message .= '<p>Coupon Discount:<strong>' . $coupon_discount;\n\t\t\t\t'</strong></p></td></tr>';\n\t\t\t\t$message .= '<p>Coupon Code:<strong>' . $coupon_code;\n\t\t\t\t'</strong></p>';\n\t\t\t\t$message .= '<p>Coupon Expiry Date:<strong>' . $coupon_expiry_date;\n\t\t\t\t'</strong></p></td></tr>';\n\t\t\t\t$message .= '<p>Refference Website:<strong>' . $coupon_refference_url;\n\t\t\t\t'</strong></p></td></tr>';\n\t\t\t\t$message .= '<tr><td style=\"background:#ddd; height:1px; width:100%;\"></td></tr></tbody>';\n\n\t\t\t\t$message .= '<tfoot style=\"background:#337d75; text-align:center; color:#fff;\"><tr><td><p> Copyright © 2016 Recharge All right reserved </p></td><tr></tfoot></table></body></html>';\n\n\t\t\t\t//\n\t\t\t\t// $message= '<!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// <html xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t\t// <head>\n\t\t\t\t// <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t\t\t// <title>Untitled Document</title>\n\t\t\t\t// </head>\n\t\t\t\t//\n\t\t\t\t// <body>\n\t\t\t\t// <table width=\"550\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" style=\"width:550px; font-family:Arial, Helvetica, sans-serif; border:1px solid #ddd;\">\n\t\t\t\t// <tbody>\n\t\t\t\t// <tr>\n\t\t\t\t// <td><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t// <tbody>\n\t\t\t\t// <tr bgcolor=\"#60c4ba\">\n\t\t\t\t// <td align=\"left\"><img src=\"'.$path.'\" width=\"150\" alt=\"...\"/></td>\n\t\t\t\t// </tr>\n\t\t\t\t// </tbody>\n\t\t\t\t// </table>\n\t\t\t\t// &nbsp;\n\t\t\t\t// <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"padding:10px;\">\n\t\t\t\t// <tbody>\n\t\t\t\t// <tr>\n\t\t\t\t// <td valign=\"bottom\" style=\"font-size:14px;text-align:left;font-family:arial;text-transform:capitalize\">Dear \"'.$user_name\t.'\",</td>\n\t\t\t\t// </tr>\n\t\t\t\t// </tbody>\n\t\t\t\t// </table>\n\t\t\t\t// <p style=\"margin:0;min-height:20px padding:10px;\">&nbsp;</p>\n\t\t\t\t// <p style=\"margin:0 0 0 0;color:#000000; padding:10px;text-align:left;font-size:14px;font-weight:normal;line-height:20px\">Your recharge has officially been made free! Your free coupons have been listed below. Please note, e-coupons can be redeemed instantly.</p>\n\t\t\t\t// <p style=\"font-size:14px;padding:10px;margin:0;color:#000000;text-align:justify;line-height:18px\">If theres anything else we can do to make you smile, please dont hesitate to get in touch with us.</p>\n\t\t\t\t// <p style=\"font-size:14px;padding:10px;margin:0;text-align:left;font-weight:bold\"><span style=\"text-transform:uppercase\">Insta coupon(s)</span> - <span style=\"font-weight:normal;padding:10px;color:#666;font-size:12px\">Delivered instantly via email to your registered email id.</span></p>\n\t\t\t\t// <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" style=\"border:2px dashed #0d2651;padding:10px;background:#fefdf5\">\n\t\t\t\t// <tbody>\n\t\t\t\t// <tr>\n\t\t\t\t// <td colspan=\"5\"><div style=\"min-height:10px\">&nbsp;</div></td>\n\t\t\t\t// </tr>\n\t\t\t\t// <tr>\n\t\t\t\t// <td width=\"10\" rowspan=\"2\">&nbsp;</td>\n\t\t\t\t// <td width=\"95\" align=\"center\" style=\"font-size:11px;padding:0px\" rowspan=\"2\"><a style=\"text-decoration:none;border:0;font-size:11px;color:#000000\" rel=\"external\"><img width=\"95\" height=\"50\" title=\"Dominos.co.in 15% OFF\" style=\"min-height:50px;display:block;text-decoration:none;border:0;word-break:break-all\" src=\".$coupon_image_url.\" alt=\"Dominos.co.in 15% OFF\" class=\"CToWUd\"></a></td>\n\t\t\t\t// <td width=\"290\" valign=\"top\" style=\"text-align:left;padding:0px;padding-left:7px\"><span style=\"color:#999;font-size:14px;font-weight:bold;display:block\"><a data-saferedirecturl=\"https://www.google.com/url?hl=en&amp;q=http://Dominos.co.in&amp;source=gmail&amp;ust=1465984931028000&amp;usg=AFQjCNGti07GxKef8IQLYh-4J9SikJsGZQ\" target=\"_blank\" rel=\"external\" href=\"http://Dominos.co.in\">Dominos.co.in</a> 15% OFF</span></td>\n\t\t\t\t// <td width=\"135\" style=\"text-align:right;padding:0\"><strong style=\"color:#0d2651;font-size:28px;font-weight:bold;text-align:center\"><span style=\"font-size:17px\">Rs.</span> 50</strong></td>\n\t\t\t\t// <td width=\"10\" rowspan=\"2\">&nbsp;</td>\n\t\t\t\t// </tr>\n\t\t\t\t// <tr>\n\t\t\t\t// <td style=\"padding:0;margin:0\"><table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n\t\t\t\t// <tbody>\n\t\t\t\t// <tr>\n\t\t\t\t// <td width=\"90\" valign=\"middle\" style=\"text-align:left;padding:0px;padding-left:7px\"><span style=\"color:#999;font-size:12px;line-height:18px\">Coupon Code:</span></td>\n\t\t\t\t// <td width=\"200\"><div style=\"background:none repeat scroll 0 0 #eee;border:1px dashed #333333;font-size:16px;font-weight:bold;padding:1px 0px;display:block;text-align:center;width:185px;margin:0 5px\">Frchr01</div></td>\n\t\t\t\t// </tr>\n\t\t\t\t// </tbody>\n\t\t\t\t// </table></td>\n\t\t\t\t// <td style=\"text-align:right;padding:0;font-size:16px;color:#000000\"><p style=\"margin:0;padding:0;font-size:11px;color:#999\">Expire on: &nbsp; <span data-term=\"goog_1872809791\" class=\"aBn\" tabindex=\"0\"><span class=\"aQJ\">31 Aug 2016</span></span></p></td>\n\t\t\t\t// </tr>\n\t\t\t\t// <tr>\n\t\t\t\t// <td colspan=\"5\"><div style=\"min-height:18px\">&nbsp;</div></td>\n\t\t\t\t// </tr>\n\t\t\t\t// </tbody>\n\t\t\t\t// </table>\n\t\t\t\t// <table cellspacing=\"0\" cellpadding=\"0\" style=\"padding:10px;\">\n\t\t\t\t// <tbody>\n\t\t\t\t// <tr>\n\t\t\t\t// <td style=\"padding:15px 0px;background:#fff;border-bottom:3px solid #f9f9f9\" colspan=\"\"><p style=\"font-size:11px;color:#999;line-height:16px;margin:0;padding:0\"><strong>Terms &amp; Conditions:</strong> Offer Highlights: Enjoy flat 15% discount on minimum billing of Rs. 350 at <a data-saferedirecturl=\"https://www.google.com/url?hl=en&amp;q=http://www.dominos.co.in&amp;source=gmail&amp;ust=1465984931028000&amp;usg=AFQjCNHKk0HpqXE9TW5R1pA62PZ9rbGT2Q\" target=\"_blank\" rel=\"external\" href=\"http://www.dominos.co.in\">www.dominos.co.in</a> How to redeem this Offer: You will receive an coupon code via e-mail as soon as your transaction is successful. You need to apply the coupon code at the time of placing the order on <a data-saferedirecturl=\"https://www.google.com/url?hl=en&amp;q=http://www.dominos.co.in&amp;source=gmail&amp;ust=1465984931028000&amp;usg=AFQjCNHKk0HpqXE9TW5R1pA62PZ9rbGT2Q\" target=\"_blank\" rel=\"external\" href=\"http://www.dominos.co.in\">www.dominos.co.in</a> Terms of this Offer: Offer not valid on Simply Veg, Simply Non Veg Pizzas, Pizza Mania Combos and Beverages. Only one Coupon Code is valid per transaction and cannot be clubbed with any other offer or promotion. Offer valid only on orders placed ONLINE. Offer valid till <span data-term=\"goog_1872809792\" class=\"aBn\" tabindex=\"0\"><span class=\"aQJ\">31st August, 2016</span></span>.</p></td>\n\t\t\t\t// </tr>\n\t\t\t\t// </tbody>\n\t\t\t\t// </table>\n\t\t\t\t// <p style=\"font-size:12px;margin:0;color:#000000;padding:10px;text-align:left\">Lots of love,</p>\n\t\t\t\t// <p style=\"font-size:12px;margin:0;color:#000000;padding:10px;text-align:left\">The OyaCharge Family</p>\n\t\t\t\t// <p style=\"font-size:12px;margin:0;color:#000000;padding:10px;text-align:left;font-weight:normal\">This is a system-generated mail, please do not respond to this e-mail Id. Got a question or need clarifications? You can either visit <a data-saferedirecturl=\"https://www.google.com/url?hl=en&amp;q=http://support.freecharge.in/&amp;source=gmail&amp;ust=1465984931028000&amp;usg=AFQjCNEm1EolVTUsdJj69XGVn3lMVSSUeg\" target=\"_blank\" rel=\"external\" href=\"http://support.freecharge.in/\">support.Oyacharge.in</a> or write in to <a target=\"_blank\" href=\"mailto:care@freecharge.com\">care@oyacharge.com</a> we will get in touch with you asap.</p></td>\n\t\t\t\t// </tr>\n\t\t\t\t// </tbody>\n\t\t\t\t// </table>\n\t\t\t\t// </body>\n\t\t\t\t// </html>';\n\t\t\t\t//\n\t\t\t\t$headers = \"Organization: OyaCharge\\r\\n\";\n\t\t\t\t$headers .= \"MIME-Version: 1.0\\r\\n\";\n\t\t\t\t$headers .= \"Content-type: text/plain; charset=iso-8859-1\\r\\n\";\n\t\t\t\t$headers .= \"X-Priority: 3\\r\\n\";\n\t\t\t\t$headers .= \"X-Mailer: PHP\" . phpversion() . \"\\r\\n\";\n\t\t\t\t$header = \"From:blm.ypsilon@gmail.com \\r\\n\";\n\t\t\t\t$header .= \"Cc:blm.ypsilon@gmail.com \\r\\n\";\n\t\t\t\t$header .= \"MIME-Version: 1.0\\r\\n\";\n\t\t\t\t$header .= \"Content-type: text/html\\r\\n\";\n\t\t\t\t$retval = mail($to, $subject, $message, $header);\n\t\t\t\t$data_frnd['cart_offer_status'] = 1;\n\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'cart_offer_id', $coupon_id, $data_frnd);\n\t\t\t}\n\n\t\t}\n\t}", "private function composeCancellationMailForParticipant($a_user_id, $reason = \"\") {\r\n\t\t$lng = $this->lng;\r\n\r\n\t\t$this->initLanguage($a_user_id);\r\n\t\t$this->initMail();\r\n\t\t$this->setSubject($this->lng->txt('rep_robj_xrs_mail_cancellation_participant_subject'));\r\n\t\t$this->setBody(ilMail::getSalutation($a_user_id, $this->getLanguage()));\r\n\t\t$this->appendBody(\"\\n\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_mail_cancellation_participant_message') . \"\\n\");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_room') . \" \");\r\n\t\t$this->appendBody($this->s_roomname . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_from') . \" \");\r\n\t\t$this->appendBody($this->datestart->get(IL_CAL_FKT_DATE, 'd.m.Y H:s') . \" \");\r\n\t\t$this->appendBody($lng->txt('rep_robj_xrs_to') . \" \");\r\n\t\t$this->appendBody($this->dateend->get(IL_CAL_FKT_DATE, 'd.m.Y H:s') . \" \\n\");\r\n\t\tif ($reason !== '') {\r\n\t\t\t$this->appendBody($lng->txt('rep_robj_xrs_mail_cancellation_reason_prefix') . \"\\n\");\r\n\t\t\t$this->appendBody($reason . \"\\n\");\r\n\t\t\t$this->appendBody(\"\\n\");\r\n\t\t}\r\n\t}", "public function ctrRegistroUsuario(){\n\n\t\tif(isset($_POST[\"numero_id\"])){\n\t\t\n\t\t\t$ruta = RouteController::ctrRoute();\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"numero_id\"]) /*preg_match('/^[a-zA-ZñÑáéíóúÁÉÍÓÚ ]+$/', $_POST[\"numero_id\"]) &&\n\t\t\t preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"registroEmail\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"registroPassword\"])*/){\n\n\t\t\t\t//$encriptar = crypt($_POST[\"password1\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\t\t\t\t$encriptar = crypt($_POST[\"password1\"], '$2a$07$asxx54ahjppf17sd87a5a4dDDGsystemdevmybebe$');\n\n\t\t\t\t$encriptarEmail = md5($_POST[\"email\"]);\n\n\t\t\t\t$tabla = \"genusuario\";\n\t\t\t\t$datos = array(\"genrol\" => \"1\",\n\t\t\t\t\t\t\t \"usunombre\" => $_POST[\"numero_id\"],\n\t\t\t\t\t\t\t \"usudescrip\" => $_POST[\"nombre\"],\n\t\t\t\t\t\t\t \"usuclave\" => $encriptar,\n\t\t\t\t\t\t\t \"usuemail\" => $_POST[\"email\"],\n\t\t\t\t\t\t\t \"usuemailen\" => $encriptarEmail,\n\t\t\t\t\t\t\t \"usuverific\" => 0); \n\n\t\t\t\t\n\t\t\t\t$respuesta = UserModel::mdlRegistroUsuario($tabla, $datos);\t\t\t\t\n\n\t\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\t\t/*=============================================\n\t\t\t\t\tVerificación Correo Electrónico\n\t\t\t\t\t=============================================*/\n\n\t\t\t\t\tdate_default_timezone_set(\"America/Bogota\");\n\n\t\t\t\t\t$mail = new PHPMailer(true);\n\t\t\t\n\n\t\t\t\t\t$mail->Charset = \"UTF-8\";\n\n\t\t\t\t\t$mail->isMail();\n\n\t\t\t\t\t$mail->setFrom(\"sdhsoluciones.sas@gmail.com\", \"SDH Soluciones \",0);\n\n\t\t\t\t\t$mail->addReplyTo(\"sdhsoluciones.sas@gmail.com\", \"Informacion SDH Soluciones\");\n\n\t\t\t\t\t$mail->Subject = \"Por favor verifique su direcci&oacute;n de correo electr&oacute;nico\";\n\n\t\t\t\t\t$mail->addAddress($_POST[\"email\"]);\n\n\t\t\t\t\t$mail->msgHTML('<div style=\"width:100%; background:#eee; position:relative; font-family:sans-serif; padding-bottom:40px\">\n\t\n\t\t\t\t\t<center>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t<img style=\"padding:20px; width:10%\" src=\"http://reservi.tech/views/img/logo.png\">\n\n\t\t\t\t\t</center>\n\n\t\t\t\t\t<div style=\"position:relative; margin:auto; width:600px; background:white; padding:20px\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<center>\n\n\t\t\t\t\t\t\t<img style=\"padding:20px; width:15%\" src=\"http://reservi.tech/views/img/logo.png\">\n\n\t\t\t\t\t\t\t<h3 style=\"font-weight:100; color:#999\">VERIFIQUE SU DIRECCI&Oacute;N DE CORREO ELECTR&Oacute;NICO</h3>\n\n\t\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\n\t\t\t\t\t\t\t<h4 style=\"font-weight:100; color:#999; padding:0 20px\">Para comenzar a usar su cuenta, debe confirmar su direcci&oacute;n de correo electr&oacute;nico</h4>\n\n\t\t\t\t\t\t\t<a href=\"'.$ruta.$encriptarEmail.'\" target=\"_blank\" style=\"text-decoration:none\">\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div style=\"line-height:60px; background:#0aa; width:60%; color:white\">Verifique su direcci&oacute;n de correo electr&oacute;nico</div>\n\n\t\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t\t<br>\n\n\t\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\n\t\t\t\t\t\t\t<h5 style=\"font-weight:100; color:#999\">Si no se inscribi&oacute; en esta cuenta, puede ignorar este correo electr&oacute;nico y eliminarlo.</h5>\n\n\t\t\t\t\t\t</center>\t\n\n\t\t\t\t\t</div>\n\n\t\t\t\t</div>');\n\t\t\t\t\t\t\t\n\t\t\t\t\t$envio = $mail->Send();\n\n\t\t\t\t\tif(!$envio){\n\n\t\t\t\t\t\techo '<script>\n\n\t\t\t\t\t\t\tswal({\n\n\t\t\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\t\t\ttitle: \"¡ERROR!\",\n\t\t\t\t\t\t\t\ttext: \"¡¡Ha ocurrido un problema enviando verificación de correo electrónico a '.$_POST[\"email\"].' '.$mail->ErrorInfo.', por favor inténtelo nuevamente\",\n\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\t\t\t\thistory.back();\n\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t});\t\n\n\t\t\t\t\t\t</script>';\n\n\n\t\t\t\t\t}else{\n\n\n\t\t\t\t\t\techo '<script>\n\n\t\t\t\t\t\t\tswal({\n\n\t\t\t\t\t\t\t\ttype:\"success\",\n\t\t\t\t\t\t\t\ttitle: \"¡SU CUENTA HA SIDO CREADA CORRECTAMENTE!\",\n\t\t\t\t\t\t\t\ttext: \"¡Por favor revise la bandeja de entrada o la carpeta SPAM de su correo electrónico para verificar la cuenta!\",\n\t\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\t\t\t\twindow.location = \"'.$ruta.'ingreso\";\n\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t});\t\n\n\t\t\t\t\t\t</script>';\n\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\techo '<script>\n\n\t\t\t\t\tswal({\n\n\t\t\t\t\t\ttype:\"error\",\n\t\t\t\t\t\ttitle: \"¡CORREGIR!\",\n\t\t\t\t\t\ttext: \"¡No se permiten caracteres especiales en ninguno de los campos!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\n\t\t\t\t\t}).then(function(result){\n\n\t\t\t\t\t\tif(result.value){\n\n\t\t\t\t\t\t\thistory.back();\n\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t});\t\n\n\t\t\t\t</script>';\n\n\n\t\t\t}\n\n\t\t}\n\n\t}", "public function send_to($subject,$text,$to_user_id,$mes=false)\n {\n /*$mailData = [\n 'to_user_mail'=>User::where('id','=',$to_user_id)->first()->get('email'),\n ];*/\n\n //is a a new message\n\n if($mes == false){\n $action = $this->table->insert(\n [\n 'from_user_id'=>$this->current_user->id,\n 'to_user_id'=>$to_user_id,\n 'subject'=>$subject,\n 'message'=>$text,\n 'new'=>1,\n 'created_at'=>new Datetime(),\n 'updated_at'=>new Datetime(),\n ]\n );\n if ($action){\n /*Mail::send('emails.welcome', array('key' => 'value'), function($message)\n {\n $message->to('foo@example.com', 'John Smith')->subject('Welcome!');\n });*/\n return Redirect::to('inbox')->with('success','you message has been sent');\n }else{\n return Redirect::back()->with('error','something went wrong #94848448');\n }\n }else{\n\n $action = $this->table2->insert(\n [\n 'mid'=>$mes,\n 'user_id'=>$this->current_user->id,\n 'message'=>$text,\n 'created_at'=>date('Y-m-d H:i:s',strtotime('now'))\n ]\n );\n $action2 = $this->table->where('id','=',$mes)->update(\n [\n 'new'=>1,\n 'updated_at'=>new DateTime()\n ]\n );\n\n if ($action && $action2){\n\n return Redirect::to('inbox')->with('success','reply has been sent');\n }else {\n return Redirect::back()->with('error','something went wrong $iasa9da9');\n }\n\n }\n\n }", "protected function SendRequestMail(){\n\n\t\t\t\tif(\n\t\t\t\t\tisset($this->parent) && is_object($this->parent)\n\n\t\t\t\t\t&& isset($this->parent->email) && is_string($this->parent->email)\n\n\t\t\t\t\t&& isset($this->parent->user) && is_array($this->parent->user)\n\n\t\t\t\t){\n\n\t\t\t\t\t$to = $this->parent->email;\n\n\t\t\t\t\t$lnk = \\_native::setvar(\\_native::varn('LOGIN_PAGE')) . $this->FACTORY_URL_PARAM \n\t\t\t\t\t\t\n\t\t\t\t\t\t. '&reference='.\\_nativeCrypt::encoder(\\date(\\_native::DATETIMEM_NUM), 'BASE64')\n\t\t\t\t\t\t\n\t\t\t\t\t\t. '&app=-'.\\_nativeCrypt::encoder(\\date(\\_native::TIME_NUM), 'BASE64')\n\t\t\t\t\t\t\n\t\t\t\t\t\t. '&tmp=' . $this->codex \n\t\t\t\t\t\t\n\t\t\t\t\t\t. '&email=' . $to\n\n\t\t\t\t\t\t;\n\n\t\t\t\t\t\n\t\t\t\t\t$title = 'Réinitialisation de mot de passe';\n\t\t\t\t\t\n\t\t\t\t\t$about = 'Commencez maintenant';\n\t\t\t\t\t\n\t\t\t\t\t$message = ''.ucwords($this->user['USERNAME']).',<p>Vous avez demandez à reinitialiser votre mot de passe. Pour cela vous devez suivre les instructions à la suite de ce lien.';\n\n\t\t\t\t\t\t$message .= '<br><br><b>NB</b><span class=\"mac\"> : Ce lien est valide quelque temps après la demande de réinitialisation de mot de passe.</span>.';\n\t\t\t\t\t\n\t\t\t\t\t$buttons = array(\n\n\t\t\t\t\t\t'active.now' => array(\n\n\t\t\t\t\t\t\t'title' => 'Réinitialisation du mot de passe'\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t,'link' => $lnk\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t,'focus' => true\n\n\t\t\t\t\t\t)\n\n\t\t\t\t\t);\n\n\n\t\t\t\t\t$c = \\GUSERS::mailTemplate($title, $about, $message, $buttons);\n\t\t\t\t\t\n\t\t\t\t\t$s = \\_native::varn('SITENAME') . ' - ' . $title;\n\n\t\t\t\t\t$h = 'MIME-Version: 1.0' . \"\\r\\n\";\n\n\t\t\t\t\t$h .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\n\n\t\t\t\t\t$h .= 'From: ' . \\_native::varn('SITENAME') . ' <no.reset.password@' . $_SERVER['HTTP_HOST'] . '>' . \"\\r\\n\";\n\n\t\t\t\t\t/* \n\t\t\t\t\t\tEnvoie \n\t\t\t\t\t*/\n\t\t\t\t\tif(@mail($to, $s, $c, $h)){\n\n\t\t\t\t\t\treturn true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse{\n\n\t\t\t\t\t\t$this->because('attempt.rup.request.mail.send.failed');\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse{\n\n\t\t\t\t\t$this->because('attempt.rup.request.mail.param.not.found');\n\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\n\t\t\t}", "public function commentaireAction(){\n\t\t\t$mode \t\t= \"backend\";\n\t\t\t$action = @$_GET['action']; \n\t\t\t$this->cmt->setIdentifiant(@$_GET['idcom']);\n\t\t\t\n\t\t\tswitch($action){\n\t\t\t\tcase \"reset\"; \n\t\t\t\t\t$commentaires = $this->com->resetReport($this->cmt);\n\t\t\t\t\tbreak; \t\n\t\t\t\t\t\n\t\t\t\tcase \"delete\"; \n\t\t\t\t\t$commentaires = $this->com->deleteComment($this->cmt); \n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"valide\"; \n\t\t\t\t\t$commentaires = $this->com->confirmComment($this->cmt); \n\t\t\t\t\tbreak; \t\n\t\t\t\t\t\t\n\t\t\t\tdefault;\n\t\t\t\t\t$this->cmt->setNbrReport(@$_POST['valRprt']);\n\t\t\t\t\t$mode = \"frontend\";\n\t\t\t\t\t$commentaires = $this->com->reportComment($this->cmt); \n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo $this->info->resultAff(\"commen\", \"commentaires\", $commentaires, $mode);\n\t\t}", "public function ctrRegistroRecipient(){\n\n\t\tif(isset($_POST[\"send\"])){\n\n\t\t\tif (preg_match('/^[a-zA-Z ]+$/', $_POST[\"fname\"]) && preg_match('/^[a-zA-Z ]+$/', $_POST[\"lname\"]) && preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"email\"]) && preg_match('/^[0-9+() ]*$/', $_POST[\"phone\"])) {\n\n\n\t\t\t\t$encriptarEmail=md5($_POST[\"email\"]);\n\t\t\t\t$photo =\"\";\n\n\t\t\t\t$datos = array(\"fname\"=>$_POST[\"fname\"],\n\t\t\t\t\t\"lname\"=>$_POST[\"lname\"],\n\t\t\t\t\t\"email\"=>$_POST[\"email\"],\n\t\t\t\t\t\"phone\"=>$_POST[\"phone\"],\n\t\t\t\t\t\"description\"=>$_POST[\"description\"],\n\t\t\t\t\t\"photo\"\t=> $photo,\n\t\t\t\t\t\"modo\"=> \"directo\",\t\t\t\t\t\t\t\n\t\t\t\t\t\"verificacion\"=> 1,\n\t\t\t\t\t\"emailEncriptado\" => $encriptarEmail);\n\n\t\t\t\t$tabla=\"recipient\";\n\n\t\t\t\t$respuesta = ModeloRecipients::mdlRegistroRecipient($tabla,$datos);\t\n\n\t\t\t\tif ($respuesta==\"ok\") {\n\n\n\t\t\t\t\t\n\t\t\t\t\tif ((isset($_POST[\"optradio\"])) && ($_POST[\"optradio\"]==\"No\")) {\n\t\t\t\t\t\t$cita= $_POST[\"firstName\"].\" has created an account for you at Kikupal\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$cita= $_POST[\"firstName\"].\" has created an account on Kikupal\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$search=array(\"fname\"=>$_POST[\"fname\"],\n\t\t\t\t\t\t\"lname\"=>$_POST[\"lname\"],\n\t\t\t\t\t\t\"email\"=>$_POST[\"email\"]);\n\t\t\t\t\t$consul= ModeloRecipients::mdlbuscarRecipient($tabla,$search);\t\n\t\t\t\t\t\n\t\t\t\t\t/*==========================================================\n\t\t\t\t\t= verificacion de correo electronico =\n\t\t\t\t\t==========================================================*/\n\t\t\t\t\t\n\t\t\t\t\tdate_default_timezone_get(\"America/Mexico_City\");\n\t\t\t\t\t$url=Ruta::ctrRuta();\n\t\t\t\t\t$mail = new PHPMailer;\n\n\t\t\t\t\t$mail->CharSet = 'UTF-8';\n\n\t\t\t\t\t$mail->isMail();\n\t\t\t\t\t$mail->setFrom('info@kikupal.com','Kikupal.com');\t\t\t\t\n\t\t\t\t\t$mail->Subject=\"Check your email address\";\n\t\t\t\t\t$mail->addAddress($_POST[\"email\"]);\n\t\t\t\t\t$mail->msgHTML('\n\t\t\t\t\t\t<div style=\"width:100%; background:#eee; position:relative; font-family:sans-serif; padding-bottom:40px\">\n\n\t\t\t\t\t\t<center>\n\n\t\t\t\t\t\t<img style=\"padding:20px; width:30%\" src=\"http://www.kikupal.com/img/logo-kikupal-hz.png\">\n\n\t\t\t\t\t\t</center>\n\n\t\t\t\t\t\t<div style=\"position:relative; margin:auto; width:65%; background:white; padding:20px\">\n\n\t\t\t\t\t\t<center>\n\n\t\t\t\t\t\t<img style=\"padding:20px; width:15%\" src=\"http://tutorialesatualcance.com/tienda/icon-email.png\">\n\n\t\t\t\t\t\t<h3 style=\"font-weight:100; color:#999\">CHECK YOUR EMAIL ADDRESS</h3>\n\n\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<h4 style=\"font-weight:100; color:#999; padding:0 20px\">'.$cita.' </h4>\n\n\t\t\t\t\t\t<a href=\"'.$url.'verificar/'.$encriptarEmail.'\" target=\"_blank\" style=\"text-decoration:none; border-radius:10px;\">\n\n\t\t\t\t\t\t<div style=\"line-height:60px; background:#0aa; width:60%; color:white\">Please active you account</div>\n\n\t\t\t\t\t\t</a>\n\n\t\t\t\t\t\t<br>\n\n\t\t\t\t\t\t<hr style=\"border:1px solid #ccc; width:80%\">\n\n\t\t\t\t\t\t<h5 style=\"font-weight:100; color:#999\">If you are not enrolled in this account, you can ignore this email and the account will be deleted.</h5>\n\n\t\t\t\t\t\t</center>\n\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t</div>'\n\t\t\t\t\t);\n\n\t\t\t\t\t$envio =$mail->send();\n\n\t\t\t\t\tif(!$envio){\n\t\t\t\t\t\techo '<script> \n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttitle:\"Error\",\n\t\t\t\t\t\t\ttext:\" problem has occurred sending the Verificaion '.$_POST[\"email\"].$mail->ErrorInfo.'!\",\n\t\t\t\t\t\t\ttipo:\"error\",\n\t\t\t\t\t\t\tconformButtonText:\"close\",\n\t\t\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t\t\t},function(isConfirm){if(isConfirm){history.back();}}); </script>';\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\techo '<script> \n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttitle:\"CONFIRM E-MAIL\",\n\t\t\t\t\t\t\ttext:\"Account created, an e-mail was sent to ('.$_POST[\"email\"].'), thank you!\",\n\t\t\t\t\t\t\ttipo:\"success\",\n\t\t\t\t\t\t\tconformButtonText:\"close\",\n\t\t\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t\t\t},function(isConfirm){if(isConfirm){window.location=\"'.$url.'c3.php?id='.$consul[\"id_recipient\"].'\";\t}});</script>';\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo '<script> \n\t\t\t\tswal({\n\t\t\t\t\ttitle:\"Error\",\n\t\t\t\t\ttext:\"Failed to register the recipient\",\n\t\t\t\t\ttipo:\"error\",\n\t\t\t\t\tconformButtonText:\"Cerrar\",\n\t\t\t\t\tclosOnConfirm: false\n\t\t\t\t},function(isConfirm){if(isConfirm){history.back();\t}}); </script>';\n\t\t\t}\n\t\t}\n\t}", "function set_comment_on_receipt() {\n $this->sale_lib->set_comment_on_receipt($this->input->post('show_comment_on_receipt'));\n }", "public function contactSubmit()\n {\n // Update newcomer's email and phone\n $this->validate(Request::instance(), [\n 'name' => Auth::user() ? '' : 'required',\n 'email' => 'required|email',\n 'message' => 'required',\n ]);\n\n $user = Auth::user();\n $name = $user ? $user->first_name.' '.$user->last_name : Request::get('name') ;\n $email = Request::get('email');\n $message = Request::get('message');\n $userStatus = $user ? (\n $user->isNewcomer() ? 'un nouveau' : 'un ancien'\n ) : 'un utilisateur non connecté';\n\n // Send email\n $sent = Mail::send('emails.contact', ['user' => $user, 'userStatus' => $userStatus, 'email' => $email, 'text' => $message, 'name' => $name], function ($m) use ($userStatus, $email, $message, $name) {\n $m->from('integration@utt.fr', 'Site de l\\'Inté');\n $m->to('integration@utt.fr', 'Intégration UTT');\n $m->replyTo($email, $name);\n $m->subject('[integration.utt.fr] Nouveau message d\\''.$userStatus);\n });\n\n return Redirect(route(Authorization::getHomeRoute()))->withSuccess('Ton message a bien été transmis !');\n }", "protected function render() {\n\t\t$settings = $this->get_settings_for_display();\n $error =\"\";\n if(isset($_POST['add'])) {\n if(!empty($_POST['naam'])){\n if(!empty($_POST['email'])){\n if(!empty($_POST['bericht'])){\n require('dbconnect.php');\n function safe($waarde){\n $waarde = trim($waarde);\n $waarde = stripslashes($waarde);\n $waarde = htmlspecialchars($waarde);\n return $waarde;\n }\n \n $naam = safe($_POST['naam']);\n $naam = $conn->real_escape_string($naam);\n $email = safe($_POST['email']);\n $email = $conn->real_escape_string($email);\n $bericht = safe($_POST['bericht']);\n $bericht = $conn->real_escape_string($bericht);\n $today = date('Y-m-d H:i:s');\n \n $sql = \"INSERT INTO mFD13_comments\n (comment_ID, comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_karma, comment_approved, comment_agent, comment_type, comment_parent, user_id) \n VALUES (NULL, '5463', '$naam', '$email', '', '', '$today', '$today', '$bericht', '0', '0', '', 'comment', '0', '0')\";\n \n if($conn->query($sql)){\n $error =\"<br><div style='border-radius:10px; border:3px solid green; margin-top:2vh; margin-bottom:2vh; display:flex; align-items:center; '><p style='margin:0; font-size:2rem; line-height:2; display:flex; align-items:center;'>reactie is binnen, het moet wel nog verwerkt worden.</p></div <br>\";\n \n \n \n $mail = new PHPMailer(true);\n\n // Settings\n $mail->IsSMTP();\n $mail->CharSet = 'UTF-8';\n\n $mail->Host = \"mail02.compleet.it\"; \n $mail->SMTPAuth = true; \n $mail->SMTPSecure = \"ssl\";\n $mail->Port = 465; \n $mail->Username = \"site@speeltuinwesterkwartier.nl\"; \n $mail->Password = $SMTPWW; \n $mail->setFrom('site@speeltuinwesterkwartier.nl','Speeltuinwesterkwartier');\n $mail->addAddress('site@speeltuinwesterkwartier.nl');\n\n // Content\n $mail->isHTML(true); \n $mail->Subject = 'Reactie van '.$naam;\n $mail->Body = $naam.' heeft een reactie geplaats op speeltuinwesterkwartier.nl<br>Met email: '.$email.'<br><br>Het bericht: '.$bericht;\n $mail->AltBody = $naam.' heeft een reactie geplaats op speeltuinwesterkwartier.nl<br><br>Het bericht: '.$bericht;\n\n $mail->send();\n }\n else{\n $error =\"<br><div style='border-radius:10px; border:3px solid red; margin-top:2vh; margin-bottom:2vh; display:flex; align-items:center;'><p style='margin:0; font-size:2rem; line-height:2; display:flex; align-items:center;'>Er is iets fout gegaan</p></div> <br>\";\n } \n }else{\n $error=\"<br><div style='border-radius:10px; border:3px solid orange; margin-top:2vh; margin-bottom:2vh; display:flex; align-items:center;'><p style='margin:0; font-size:2rem; line-height:2; display:flex; align-items:center;'>Bericht is niet ingevult</p></div><br>\";\n }\n }else{\n $error=\"<br><div style='border-radius:10px; border:3px solid orange; margin-top:2vh; margin-bottom:2vh; display:flex; align-items:center;'><p style='margin:0; font-size:2rem; line-height:2; display:flex; align-items:center;'>Email is niet ingevult</p></div><br>\";\n }\n }else{\n $error=\"<br><div style='border-radius:10px; border:3px solid orange; margin-top:2vh; margin-bottom:2vh; display:flex; align-items:center;'><p style='margin:0; font-size:2rem; line-height:2; display:flex; align-items:center;'>Naam is niet ingevult</p></div><br>\";\n }\n }\n ?>\n <form method=post style=\"color:black;\">\n <label style='font-size:2rem;'>Uw naam*</label><input style=\"border-radius:10px; font-size:2rem;\" type=text name=naam /> <br>\n <label style='font-size:2rem;'>Uw e-mailadres*</label><input style=\"border-radius:10px; font-size:2rem;\" type=email name=email /> <br>\n <label style='font-size:2rem;'>Uw bericht*</label><textarea style=\"border-radius:10px; font-size:2rem; width:100%; height:25vh; border-radius:10xpx;\" name=bericht> </textarea><br>\n <input type=submit name=add style=\"border-radius:10px; color:white; background-color:#004020; font-size:2rem;\" value=\"Reactie plaatsen\"/>\n <?php echo $error; ?>\n </form>\n <?php\n\t}", "public function set_recipient( $id ) {\n\t\t$this->recipient_id = $id;\n\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_RECIPIENT_KEY, $id );\n\t}", "function saveReceptionistNotices($connection,$noticeFor,$noticeDate,$noticeSubject,$noticeText,$receptionistId,$userRole,$userEmailss,$noticeAction,$hiddenNoticeEditId){\n $noticeDate = date('Y-m-d',strtotime($noticeDate));\n if ($noticeAction == \"add\") {\n\n /*\n * Send emails also\n */\n $to = \"cs.ankitprajapati@gmail.com,\" . $userEmailss;\n $subject = \"Notice Board\";\n // Set content-type header for sending HTML email\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\n // Additional headers\n $headers .= 'From: Allen Forum<info@allenforum.com>' . \"\\r\\n\";\n $headers .= 'Cc: welcome@example.com' . \"\\r\\n\";\n $headers .= 'Bcc: welcome2@example.com' . \"\\r\\n\";\n $message = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n <title>Receptionist | Allenhouse</title>\n </head>\n <body style=\"-webkit-text-size-adjust: none; box-sizing: border-box; color: #74787E; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; height: 100%; line-height: 1.4; margin: 0; width: 100% !important;\" bgcolor=\"#F2F4F6\"><style type=\"text/css\">\nbody {\nwidth: 100% !important; height: 100%; margin: 0; line-height: 1.4; background-color: #F2F4F6; color: #74787E; -webkit-text-size-adjust: none;\n}\n@media only screen and (max-width: 600px) {\n .email-body_inner {\n width: 100% !important;\n }\n .email-footer {\n width: 100% !important;\n }\n}\n@media only screen and (max-width: 500px) {\n .button {\n width: 100% !important;\n }\n}\n</style>\n <span class=\"preheader\" style=\"box-sizing: border-box; display: none !important; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 1px; line-height: 1px; max-height: 0; max-width: 0; mso-hide: all; opacity: 0; overflow: hidden; visibility: hidden;\">Reception,Allenhouse Institute of Technology informs you that a new Notice shared with you.</span>\n <table class=\"email-wrapper\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin: 0; padding: 0; width: 100%;\" bgcolor=\"#F2F4F6\">\n <tr>\n <td align=\"center\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; word-break: break-word;\">\n <table class=\"email-content\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin: 0; padding: 0; width: 100%;\">\n <tr>\n <td class=\"email-masthead\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; padding: 25px 0; word-break: break-word;\" align=\"center\">\n <a href=\"http://allenforum.cubersindia.com\" class=\"email-masthead_name\" style=\"box-sizing: border-box; color: #bbbfc3; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 16px; font-weight: bold; text-decoration: none; text-shadow: 0 1px 0 white;\">\n Notice Board </a>\n </td>\n </tr>\n <tr>\n <td class=\"email-body\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"-premailer-cellpadding: 0; -premailer-cellspacing: 0; border-bottom-color: #EDEFF2; border-bottom-style: solid; border-bottom-width: 1px; border-top-color: #EDEFF2; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin: 0; padding: 0; width: 100%; word-break: break-word;\" bgcolor=\"#FFFFFF\">\n <table class=\"email-body_inner\" align=\"center\" width=\"570\" cellpadding=\"0\" cellspacing=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin: 0 auto; padding: 0; width: 570px;\" bgcolor=\"#FFFFFF\">\n <tr>\n <td class=\"content-cell\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; padding: 35px; word-break: break-word;\">\n <h1 style=\"box-sizing: border-box; color: #2F3133; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 19px; font-weight: bold; margin-top: 0;\" align=\"left\">Hi, Allenits!</h1>\n <p style=\"box-sizing: border-box; color: #74787E; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 16px; line-height: 1.5em; margin-top: 0;\" align=\"left\">Greetings of the Day,<br/>\n We hope you actively participating in Allenforum discussion,to resolve doubts of each other. Its a duty to inform you that an important ntoice has been shared with you\n </p> <p>for checking about it login to your <b>Allenforum accunt</b></p>\n <table class=\"body-action\" align=\"center\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin: 30px auto; padding: 0; text-align: center; width: 100%;\">\n <tr>\n <td align=\"center\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; word-break: break-word;\">\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif;\">\n <tr>\n <td align=\"center\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; word-break: break-word;\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif;\">\n <tr>\n <td style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; word-break: break-word;\">\n <a href=\"http://allenforum.cubersindia.com\" class=\"button button--\" target=\"_blank\" style=\"-webkit-text-size-adjust: none; background: #ee5d42; border-color: #ee5d42; border-radius: 3px; border-style: solid; border-width: 10px 18px; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16); box-sizing: border-box; color: #FFF; display: inline-block; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; text-decoration: none;\">Check</a>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n <p style=\"box-sizing: border-box; color: #74787E; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 16px; line-height: 1.5em; margin-top: 0;\" align=\"left\">Regards\n <br />Allenforum Team</p>\n <img src=\"http://allenforum.cubersindia.com/home/ownImages/other/allenoverflow.png\" alt=\"allenforum\" width=\"200\" height=\"40\"/>\n <table class=\"body-sub\" style=\"border-top-color: #EDEFF2; border-top-style: solid; border-top-width: 1px; box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin-top: 25px; padding-top: 25px;\">\n <tr>\n <td style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; word-break: break-word;\">\n <p class=\"sub\" style=\"box-sizing: border-box; color: #74787E; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 12px; line-height: 1.5em; margin-top: 0;\" align=\"left\">Please do not reply to this email</p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <tr>\n <td style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; word-break: break-word;\">\n <table class=\"email-footer\" align=\"center\" width=\"570\" cellpadding=\"0\" cellspacing=\"0\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; margin: 0 auto; padding: 0; text-align: center; width: 570px;\">\n <tr>\n <td class=\"content-cell\" align=\"center\" style=\"box-sizing: border-box; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; padding: 35px; word-break: break-word;\">\n <p class=\"sub align-center\" style=\"box-sizing: border-box; color: #AEAEAE; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 12px; line-height: 1.5em; margin-top: 0;\" align=\"center\">© 2018 Allenforum. All rights reserved.</p>\n <p class=\"sub align-center\" style=\"box-sizing: border-box; color: #AEAEAE; font-family: Arial, \\'Helvetica Neue\\', Helvetica, sans-serif; font-size: 12px; line-height: 1.5em; margin-top: 0;\" align=\"center\">\n <a href=\"https://cubersindia.com\" target=\"_blank\">Cubersindia</a>\n <br />info@cubersindia.com\n <br />Kanpur-208021\n </p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </body>\n</html>\n';\n\n\n // Send email\n @mail($to, $subject, $message, $headers);\n $query = \"INSERT INTO forum_notices SET notice_subject='$noticeSubject',notice='$noticeText',permission='$noticeFor',postedBy='$receptionistId',postedByUserType='$userRole',date_time='$noticeDate' \";\n } else if ($noticeAction == \"edit\"){\n if ($hiddenNoticeEditId) {\n $query = \"UPDATE forum_notices SET notice_subject='$noticeSubject',notice='$noticeText',permission='$noticeFor',postedBy='$receptionistId',postedByUserType='$userRole',date_time='$noticeDate' WHERE notice_id='$hiddenNoticeEditId'\";\n }\n\n }\n\n $result = $connection->query($query);\n return $result;\n }", "public static function sendEmail($user,$RDV) : bool {\n\n $user = parent::findBy($user->getEmail(), 'email');\n\n $to = $user->getEmail();\n $from = \"<CHUO@newsletter.com>\";\n $subject = 'CHUO NEWSLETTER : Reclamation';\n $message = '\n <html>\n <head>\n <style>\n .banner-color {\n background-color: #eb681f;\n }\n .title-color {\n color: #0066cc;\n }\n .button-color {\n background-color: #0066cc;\n }\n @media screen and (min-width: 500px) {\n .banner-color {\n background-color: #0066cc;\n }\n .title-color {\n color: #eb681f;\n }\n .button-color {\n background-color: #eb681f;\n }\n }\n </style>\n </head>\n <body>\n <div style=\"background-color:#ececec;padding:0;margin:0 auto;font-weight:200;width:100%!important\">\n <table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout:fixed;font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\">\n <center style=\"width:100%\">\n <table bgcolor=\"#FFFFFF\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin:0 auto;max-width:512px;font-weight:200;width:inherit;font-family:Helvetica,Arial,sans-serif\" width=\"512\">\n <tbody>\n <tr>\n <td bgcolor=\"#F3F3F3\" width=\"100%\" style=\"background-color:#f3f3f3;padding:12px;border-bottom:1px solid #ececec\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;width:100%!important;font-family:Helvetica,Arial,sans-serif;min-width:100%!important\" width=\"100%\">\n <tbody>\n <tr>\n <td valign=\"middle\" width=\"50%\" align=\"right\" style=\"padding:0 0 0 10px\"><span style=\"margin:0;color:#4c4c4c;white-space:normal;display:inline-block;text-decoration:none;font-size:12px;line-height:20px\">'.date(\"Y-m-d\").'</span></td>\n <td width=\"1\">&nbsp;</td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"left\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" bgcolor=\"#8BC34A\" style=\"padding:20px 48px;color:#ffffff\" class=\"banner-color\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\">\n <img src=\"../img/logo-accueil.png\" alt=\"Centre Hospitalier Universitaire Mohammed VI OUJDA\">\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"center\" style=\"padding:20px 0 10px 0\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\" style=\"padding: 0 15px;text-align: justify;color: rgb(76, 76, 76);font-size: 12px;line-height: 18px;\">\n <h3 style=\"font-weight: 600; padding: 0px; margin: 0px; font-size: 16px; line-height: 24px; text-align: center;\" class=\"title-color\">Bonjour '.$user->getNom().',</h3>\n <p style=\"margin: 20px 0 30px 0;font-size: 15px;text-align: center;\">L\\'Etat du votre Rendez-vous que vous avez reservé pour '.$RDV->getDateRdv().' a été changer!</p>\n <div style=\"font-weight: 200; text-align: center; margin: 25px;\"><a style=\"padding:0.6em 1em;border-radius:600px;color:#ffffff;font-size:14px;text-decoration:none;font-weight:bold\" class=\"button-color\">Consulter votre compte pour plus de détails</a></div>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n </tr>\n <tr>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"left\">\n <table bgcolor=\"#FFFFFF\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"padding:0 24px;color:#999999;font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"middle\" width=\"100%\" style=\"border-top:1px solid #d9d9d9;padding:12px 0px 20px 0px;text-align:center;color:#4c4c4c;font-weight:200;font-size:12px;line-height:18px\">Regards,\n <br><b>The CHUO Team</b>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"center\" width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" style=\"padding:0 0 8px 0\" width=\"100%\"></td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </center>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </body>\n </html>';\n\n //from w3schools\n $headers = 'From: ' . $from . \"\\r\\n\".\n \"MIME-Version: 1.0\" . \"\\r\\n\" .\n \"Content-type: text/html; charset=UTF-8\" . \"\\r\\n\";\n\n if(mail($to, $subject, $message, $headers))\n //Email Sended\n return true;\n else\n return false;\n\n }", "private function sendMail() {\n $BodyMail = new BodyMail();\n //$to = $this->_datPerson[email];\n $to = 'potcheunam@gmail.com';\n\n $url = baseUri.\"linkCode?code=\".base64_encode($this->_code).\"&email=\".base64_encode($this->_datPerson[email]);\n\n $subject = \"DEV-Validación de Email\";\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\n $headers .= 'From: Evaluacione Red UNOi <noreplymx@unoi.com>'.\"\\r\\n\";\n $headers .= 'Reply-To: NoReply <noreplymx@unoi.com>' . \"\\r\\n\";\n $headers .= 'Bcc: potcheunam@gmail.com' . \"\\r\\n\";\n $message = $BodyMail->run($this->_datPerson['name'], $this->_code, $url);\n mail($to, $subject, $message, $headers, '-f noreplymx@unoi.com');\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 clsRecordemails()\r\n\r\n {\r\n\r\n\r\n\r\n global $FileName;\r\n\r\n $this->Visible = true;\r\n\r\n $this->Errors = new clsErrors();\r\n\r\n $this->ds = new clsemailsDataSource();\r\n\r\n $this->InsertAllowed = false;\r\n\r\n $this->UpdateAllowed = false;\r\n\r\n if($this->Visible)\r\n\r\n {\r\n\r\n $this->ComponentName = \"emails\";\r\n\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n\r\n $this->from_user_id = new clsControl(ccsLabel, \"from_user_id\", \"From User Id\", ccsText, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n\r\n $this->emaildate = new clsControl(ccsLabel, \"emaildate\", \"date\", ccsText, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n\r\n $this->subject = new clsControl(ccsLabel, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n\r\n $this->message = new clsControl(ccsLabel, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n\r\n $this->message->HTML = true;\r\n\r\n $this->Delete = new clsButton(\"Delete\");\r\n\r\n $this->cancel = new clsButton(\"cancel\");\r\n\r\n }\r\n\r\n }", "function insert_pm($id_auteur)\n{\n\tif ( $GLOBALS['spipbb']['sw_send_pm_warning'] == \"oui\" ) {\n\t\t$from_id = $GLOBALS['spipbb']['sw_warning_from_admin'] ;\n\t\t$message = $GLOBALS['spipbb']['sw_warning_pm_message'] ;\n\t\t$to_auteur = sql_fetsel('email', 'spip_auteurs', \"id_auteur=$id_auteur\");\n\t\t$from_auteur = sql_fetsel('email', 'spip_auteurs', \"id_auteur=$from_id\");\n\n\t\t// action !!!\n\t\t$envoyer_mail = charger_fonction('envoyer_mail','inc');\n\t\t$titre = nettoyer_titre_email($GLOBALS['spipbb']['sw_warning_pm_titre']);\n\t\t$envoyer_mail($to_auteur['email'],$titre,$message,$from_auteur['email']);\n\t}\n\n}", "protected function prepareSendEditComment(){\n if (!empty($_POST['comment'])) {\n $this->sendEditComment();\n header('Location: index.php?action=article&number='.$this->getNumber().'');\n }\n else{\n $this->prepareEditComment();\n }\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 email_conferencia($id){\r\n $this->db->trans_start();\r\n\r\n $query = $this->db->select('email_user') //busco el email del user que registro el evento.\r\n ->where('id_evento', $id)\r\n ->get('evento');\r\n \r\n log_message('ERROR', 'llego a email_conferencia con id -->'.$id);\r\n \r\n if ($query->num_rows() > 0) \r\n {\r\n $row = $query->row(); \r\n $this->db->trans_complete(); \r\n \r\n //$email = $this->email_evento($row->registrado_por); //llega el nombre de quien registra\r\n log_message('ERROR', 'email_conferencia envio link a correo -->'.$email);\r\n \r\n return $row->email_user;\r\n } \r\n else \r\n {\r\n $this->db->trans_complete();\r\n log_message('ERROR', 'momv->email_conferencia eno encuentra correo ');\r\n return FALSE;\r\n }\r\n\r\n $this->db->trans_complete();\r\n }", "function saveComment(){\n\t\t$this->layout = 'ajax';\n\t\t$user_id = $_POST['user_id'];\n\t\t$feeds_id = $_POST['business_feeds_id'];\n\t\t$comment = $_POST['comment'];\n\t\t$membership_id = $_POST['membershipPlan'];\n\n\t\t$saveData['user_id'] = $user_id;\n\t\t$saveData['feed_id'] = $feeds_id;\n\t\t$saveData['comment'] = $comment;\n\t\tif($membership_id != 1){\n\t\t\t$saveData['status'] = 1;\n\t\t} else {\n\t\t\t$saveData['status'] = 2;\n\t\t}\n\n\t\t$this->Comment->save($saveData);\n\n\t\t$this->set('comment', $comment);\n\n\t\t$last_id = $this->Comment->id;\n\t\t$commentArr = $this->Comment->find('first', array('conditions'=>array('Comment.id'=>$last_id, 'Comment.status'=>'1')));\n\t\t$this->set('commentArr', $commentArr);\n\t\tif(!empty($commentArr)){\n\t\t$userr_id = $commentArr['Comment']['user_id'];\n\t\t$this->set('userr_id', $userr_id);\n\t\t}\t\n\t\t$this->set('last_id', $last_id);\n\t}", "public function updateCorreo(){\n\t\t$email = $this->input->post('usuario_email'); \n\t\t$asunto = $this->input->post('usuario_asunto');\n\t\t$mensaje = $this->input->post('usuario_mensaje');\n\t\t$session = $this->session->userdata['logged_in'];\n\n\n\t\tif($session[\"is_loged\"] == true){\n\t\t$id = $session['user_id'];\t\n\n \t\t\t$data = array(\n\t\t\t\t'destinatario' => $email, \n\t\t\t\t'mensaje' => $mensaje,\n\t\t\t\t'asunto' => $asunto,\n\t\t\t\t);\n\n \t\t$idc = $_REQUEST['cid'];\n \t\t\n \t\t$this->load->model('model_correo','correo');\n \t\t$this->correo->updateEmail($idc,$data);\n \t\t\n \t\t$urln = base_url().\"correo/vistaCorreo\";\n \t\tredirect($urln);\n \t\t}\n \t\telse{\n\n \t\t\t$urln = base_url().\"user/loginUsuario\";\n\t\t\tredirect($urln);\n \t\t}\n\t}", "public function Action_Reminder()\n {\n $this->Chunk_Init();\n\n if ( $_REQUEST['Users']['Keystring'] != Zero_App::$Users->Keystring )\n {\n $this->SetMessage(-1, ['Контрольная строка не верна']);\n $this->Chunk_View();\n return $this->View;\n }\n\n $this->Model->Load_Email($_REQUEST['Users']['Email']);\n if ( 0 == $this->Model->ID )\n {\n $this->SetMessage(-1, ['Пользователь не найден']);\n $this->Chunk_View();\n return $this->View;\n }\n\n $password = substr(md5(uniqid(mt_rand())), 0, 10);\n $this->Model->Password = md5($password);\n $this->Model->Save();\n\n $subject = \"Reminder access details \" . HTTP;\n $View = new Zero_View('Zero_Users_ReminderMail');\n $View->Assign('Users', $this->Model);\n $View->Assign('password', $password);\n $message = $View->Fetch();\n\n $email = [\n 'Reply' => ['Name' => Zero_App::$Config->Site_Name, 'Email' => Zero_App::$Config->Site_Email],\n 'From' => ['Name' => Zero_App::$Config->Site_Name, 'Email' => Zero_App::$Config->Site_Email],\n 'To' => [\n $this->Model->Email => $this->Model->Name,\n ],\n 'Subject' => \"Reminder access details \" . HTTP,\n 'Message' => $message,\n 'Attach' => [],\n ];\n $cnt = Helper_Mail::SendMessage($email);\n if ( 0 < $cnt )\n $this->SetMessageError(-1, [\"Реквизиты не отправлены на почту\"]);\n else\n $this->SetMessage(0, [\"Реквизиты отправлены на почту\"]);\n $this->Chunk_View();\n return $this->View;\n }" ]
[ "0.6598449", "0.6522574", "0.640839", "0.6393142", "0.6384156", "0.63320535", "0.6329298", "0.6289396", "0.62299395", "0.61846477", "0.6176303", "0.611958", "0.6113126", "0.60946625", "0.6045078", "0.6013135", "0.60130185", "0.60068095", "0.59857166", "0.5953853", "0.59437597", "0.59332687", "0.5909967", "0.59053624", "0.5903584", "0.58969176", "0.5896334", "0.58826166", "0.58482265", "0.5843855", "0.5842132", "0.5822964", "0.5815095", "0.5814271", "0.58038616", "0.5779658", "0.5775559", "0.57724375", "0.5771694", "0.5767495", "0.57579786", "0.5746165", "0.57391936", "0.5736079", "0.57335603", "0.5725885", "0.57217586", "0.5707897", "0.5701203", "0.569317", "0.56861675", "0.5682913", "0.56782985", "0.5677909", "0.5674737", "0.56701374", "0.5669973", "0.5661537", "0.56590617", "0.5659042", "0.56590164", "0.56545025", "0.5648557", "0.5647726", "0.56458455", "0.5644447", "0.5644175", "0.5638931", "0.56372243", "0.5612661", "0.56123567", "0.5608871", "0.5608733", "0.560375", "0.5599982", "0.55911505", "0.55899024", "0.5585221", "0.5585154", "0.55767554", "0.5575663", "0.5575037", "0.55734944", "0.55708945", "0.5568206", "0.55645245", "0.5561722", "0.5559656", "0.5552735", "0.55435836", "0.5535119", "0.55344385", "0.5531624", "0.552964", "0.55267537", "0.55243194", "0.5522071", "0.55187535", "0.55145013", "0.5514039" ]
0.64408505
2
/ $options = array( CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => false, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $post, );
function curl_post($url, $post) { $ch = curl_init(); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_URL,$url); //curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); curl_setopt($ch, CURLOPT_HEADER, false); ob_start(); curl_exec($ch); if (curl_errno($ch)){ print curl_error($ch);} else{ curl_close($ch);} $result = ob_get_contents() ; ob_end_clean(); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function curl_post($url, array $post = NULL, array $headers = NULL, array $options = array()) {\n $defaults = array(\n CURLOPT_POST => 1,\n CURLOPT_HEADER => 0,\n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_URL => $url,\n CURLOPT_FRESH_CONNECT => 1,\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_FORBID_REUSE => 1,\n CURLOPT_TIMEOUT => 4,\n CURLOPT_POSTFIELDS => http_build_query($post)\n );\n\n $_defaults = defaults;\n \n $ch = curl_init();\n curl_setopt_array($ch, ($options + $defaults));\n if( ! $result = curl_exec($ch)) {\n trigger_error(curl_error($ch));\n }\n curl_close($ch);\n return $result;\n}", "function curl_post($url, array $post = NULL, array $options = array())\n{\n $defaults = array(\n CURLOPT_POST => 1,\n CURLOPT_HEADER => 0,\n CURLOPT_URL => $url,\n CURLOPT_FRESH_CONNECT => 1,\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_FORBID_REUSE => 1,\n CURLOPT_TIMEOUT => 4,\n CURLOPT_POSTFIELDS => http_build_query($post)\n );\n\n $ch = curl_init();\n curl_setopt_array($ch, ($options + $defaults));\n if( ! $result = curl_exec($ch))\n {\n echo \"curl_exec failed \" . $url;\n trigger_error(curl_error($ch));\n }\n curl_close($ch);\n return $result;\n}", "function curl_post($url, array $post = NULL, array $options = array()) {\n\t\t$this->curlError = 0;\n\t $defaults = array(\n\t CURLOPT_POST => 1,\n\t CURLOPT_HEADER => 0,\n\t CURLOPT_URL => $url,\n\t CURLOPT_FRESH_CONNECT => 1,\n\t CURLOPT_RETURNTRANSFER => 1,\n\t CURLOPT_FORBID_REUSE => 1,\n\t CURLOPT_TIMEOUT => 4,\n\t CURLOPT_POSTFIELDS => $this->decodeParamsIntoGetString($post),\n\t\t\tCURLOPT_USERAGENT => $_SERVER['HTTP_USER_AGENT']\n\t );\n\t \n\t $this->logMessage(\"Posting to: \".$this->decodeParamsIntoGetString($post));\n\t\t\n\t $ch = curl_init();\n\t curl_setopt_array($ch, ($options + $defaults));\n\t if( !$result = curl_exec($ch))\n\t { \n\t // trigger_error(curl_error($ch));\n\t \t$this->curlError = curl_error($ch);\n\t \treturn false;\n\t }\n\t else {\n\t \treturn $result;\n\t \n\t \t} \t\n\t}", "public function usePost()\n {\n $this->setOption(CURLOPT_POST, true);\n }", "function curl_post($url, $postfields=array(), $headers=array(), $auth=array()) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));\n curl_setopt($ch,CURLOPT_HTTPHEADER, $headers);\n if(!empty($auth['username']) && !empty($auth['password'])) {\n curl_setopt($ch, CURLOPT_USERPWD, $auth['username'].\":\".$auth[\"password\"]);\n }\n return curl_exec($ch);\n}", "public function curl_post($url, array $post = NULL, array $options = array()){\n\n try{\n\n $defaults = array(\n CURLOPT_POST => 1,\n CURLOPT_HEADER => 0,\n CURLOPT_URL => $url,\n CURLOPT_FRESH_CONNECT => 1,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_FORBID_REUSE => 1,\n CURLOPT_TIMEOUT => 25,\n CURLOPT_CONNECTTIMEOUT => 25,\n CURLOPT_POSTFIELDS => http_build_query($post)\n );\n\n /*\n If you are doing a POST, and the content length is 1,025 or greater, then curl exploits\n a feature of http 1.1: 100 (Continue) Status.\n\n See http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3\n\n * it adds a header, \"Expect: 100-continue\".\n * it then sends the request head, waits for a 100 response code, then sends the content\n\n Not all web servers support this though. Various errors are returned depending on the\n server. If this happens to you, suppress the \"Expect\" header with this command:\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));\n */\n\n $ch = curl_init();\n curl_setopt_array($ch, ($options + $defaults));\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));\n if(!$result = curl_exec($ch)) {\n\n //\n // HOOOSTON...VE HAF PROBLEM!\n throw new Exception('CRNRSTN :: CURL [POST] ERROR experienced :: '.curl_error($ch));\n\n }\n\n curl_close($ch);\n\n return $result;\n\n } catch (Exception $e) {\n\n curl_close($ch);\n\n $this->catchException($e, LOG_ERR, __METHOD__, __NAMESPACE__);\n\n return false;\n\n }\n\n }", "function doPost($url, $post = array() , $format = 'plain')\n{\n return curlExecute($url, 'post', $post, $format);\n}", "function zbase_remote_post_json($url, $data, $options = [])\n{\n\t$dataString = '';\n\tforeach ($data as $key => $value)\n\t{\n\t\t$dataString .= $key . '=' . $value . '&';\n\t}\n\trtrim($dataString, '&');\n\t$ch = curl_init($url);\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n\tcurl_setopt($ch, CURLOPT_POST, count($data));\n\tcurl_setopt($ch, CURLOPT_COOKIEJAR, zbase_storage_path() . 'cookie.txt');\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $dataString);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t'Content-Type: application/json',\n\t\t'Content-Length: ' . strlen($dataString))\n\t);\n\t$result = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $result;\n}", "function request_post_api($url=\"\",$post=\"\") {\n\tif(empty($url))\n\t\treturn false;\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL,$url);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\tif($post){\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post)); \t\t\n\t}\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $response;\n}", "function post_query_slack($url,$opts) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($opts));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n $data = curl_exec($curl);\n curl_close($curl);\n return $data;\n}", "function http_post($url, $params = array()) {\n $postData = '';\n //create name value pairs seperated by &\n foreach ($params as $k => $v) {\n $postData .= $k . '=' . $v . '&';\n }\n $postData = rtrim($postData, '&');\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_POST, count($postData));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);\n $output = curl_exec($ch);\n\n curl_close($ch);\n return $output;\n}", "function post($url, $headers, $params)\n{\n $data = json_encode($params);\n\n $curl = curl_init();\n\n array_push($headers, \"Content-Type: application/json\");\n array_push($headers, \"Content-Length: \" . strlen($data));\n\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n\n // print_r(\"=========请求信息 start =========\\n\");\n // print_r($url . \"\\n\");\n // print_r(json_encode($headers) . \"\\n\");\n // print_r($data . \"\\n\");\n $response = curl_exec($curl);\n curl_close($curl);\n // print_r(\"==============================\\n\");\n // print_r($response);\n // print_r(\"\\n=========请求信息 end =========\\n\");\n return $response;\n}", "function httpPOST($url, $data)\n{\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n return $response;\n}", "function PostURL($url, $postData, $options = array())\n\t{\n\t\t//\t\t$postString = '';\n\t\t//\t\tforeach ($postData as $key => $value) { $postString .= \"$key=$value&\"; }\n\n//\t\t\n//\t\t$options['post_string'] = http_build_query($postData);\n\t\t$options['post_array'] = $postData;\n\t\treturn self::FetchURL($url, $options);\n\t\t\n\t}", "private function initPostRequest()\n {\n $this\n ->addCurlOption(CURLOPT_URL, $this->getUrl())\n ->addCurlOption(CURLOPT_CUSTOMREQUEST, HttpMethodResolver::HTTP_POST)\n ->addCurlOption(CURLOPT_POSTFIELDS, $this->getQuery())\n ;\n }", "function elastic_post($url, $data) {\n global $elasticAuth;\n\n $response = null;\n\n $ch = curl_init($url);\n $opts = [\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_POSTFIELDS => $data,\n CURLOPT_POST => 1,\n CURLOPT_HTTPHEADER => [\n \"Authorization: Basic $elasticAuth\",\n 'Content-Type: application/x-ndjson'\n ]\n ];\n curl_setopt_array($ch, $opts);\n\n $exec = curl_exec($ch);\n\n if ($exec !== false) {\n $response = [\n 'body' => $exec,\n 'info' => curl_getinfo($ch)\n ];\n }\n\n curl_close($ch);\n\n return $response;\n\n}", "function new_post($request,$url) {\n ##Data Post\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $request);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n return curl_exec($ch);\n}", "public static function CurlPost($url, array $post = array(), array $options = array()) {\n $defaults = array(\n CURLOPT_POST => 1,\n CURLOPT_HEADER => 0,\n CURLOPT_URL => $url,\n CURLOPT_FRESH_CONNECT => 1,\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_FORBID_REUSE => 1,\n CURLOPT_FOLLOWLOCATION => 1,\n CURLOPT_TIMEOUT => 4,\n CURLOPT_POSTFIELDS => http_build_query($post)\n );\n\n $ch = curl_init();\n curl_setopt_array($ch, ($options + $defaults));\n if (!$result = curl_exec($ch)) {\n trigger_error(curl_error($ch));\n }\n\n curl_close($ch);\n // var_dump(curl_getinfo($ch)); exit;\n\n\n return $result;\n }", "function request(string $url, string $fields = '', int $isPost = 0)\n{\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POST, $isPost);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n if ($isPost) {\n curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);\n }\n $requestHeaders = array(\n 'Content-type: application/x-www-form-urlencoded',\n 'Content-Length: ' . strlen($fields),\n );\n curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);\n return curl_exec($ch);\n}", "function http_post_data($url, $data = null, ?array $options = null, ?array &$info = null) {}", "function http_post_contents($pay_server, $post_data){\n $timeout = 30;\n $ch = curl_init(); \n // set URL and other appropriate options\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_URL, $pay_server);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n $file_contents = curl_exec($ch);\n curl_close($ch);\n \n return $file_contents; \n}", "function curl_post_https($url,$data){ // 模拟提交数据函数\n $curl = curl_init(); // 启动一个CURL会话\n curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // 从证书中检查SSL加密算法是否存在\n curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模拟用户使用的浏览器\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转\n curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer\n curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的数据包\n curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 设置超时限制防止死循环\n curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回\n $tmpInfo = curl_exec($curl); // 执行操作\n if (curl_errno($curl)) {\n echo 'Errno'.curl_error($curl);//捕抓异常\n }\n curl_close($curl); // 关闭CURL会话\n return $tmpInfo; // 返回数据,json格式\n}", "function curl_post_https($url, $data)\r\n{ // 模拟提交数据函数\r\n $curl = curl_init(); // 启动一个CURL会话\r\n curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // 从证书中检查SSL加密算法是否存在\r\n curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模拟用户使用的浏览器\r\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转\r\n curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer\r\n curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的数据包\r\n curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 设置超时限制防止死循环\r\n curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回\r\n $tmpInfo = curl_exec($curl); // 执行操作\r\n if (curl_errno($curl)) {\r\n echo 'Errno' . curl_error($curl); //捕抓异常\r\n }\r\n curl_close($curl); // 关闭CURL会话\r\n return $tmpInfo; // 返回数据,json格式\r\n}", "function curl($url, $post_fields = null, $return_headers = false)\n {\n global $standard_headers;\n global $cookie;\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $standard_headers);\n curl_setopt($ch, CURLOPT_COOKIE, $cookie);\n\n if($return_headers == true) {\n curl_setopt($ch, CURLOPT_HEADER, 1);\n }\n\n if(!is_null($post_fields)) {\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_fields));\n } else {\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n }\n\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n }", "function curl_post(&$handle, $url, $fields = '', &$info = NULL) {\r\n\tglobal $curl_last_timestamp, $curl_throttle;\r\n\tif (! $curl_throttle) {\r\n\t\t$curl_throttle = 2;\r\n\t}\r\n\tif ($curl_last_timestamp && time() - $curl_last_timestamp < $curl_throttle * 60) {\r\n\t\t$delay = min(array(\r\n\t\t\t$curl_throttle * 60, time() - $curl_last_timestamp\r\n\t\t));\r\n\t\tif ($delay) {\r\n\t\t\t//log_msg('CURL', \"Sleeping for $delay second(s)\");\r\n\t\t\tusleep($delay * 1000000);\r\n\t\t}\r\n\t}\r\n\t$curl_last_timestamp = time();\r\n\tif ($fields && is_array($fields))\r\n\t\t$fields = http_build_query2($fields, '', '&');\r\n\tcurl_setopt($handle, CURLOPT_POST, TRUE);\r\n\tif ($fields)\r\n\t\tcurl_setopt($handle, CURLOPT_POSTFIELDS, $fields);\r\n\tcurl_setopt($handle, CURLOPT_URL, $url);\r\n\tcurl_setopt($handle, CURLOPT_RETURNTRANSFER, TRUE);\r\n\t$result = curl_exec($handle);\r\n\t$info = curl_getinfo($handle);\r\n\t//log_msg('CURL', \"Post $url?$fields ; result info=\" . json_encode($info));\r\n\treturn $result;\r\n}", "function makecurl($api,$data=array())\n{\n$options = array(\n);\n$ds1=array();\n$ds1['header']=\"Content-type: application/x-www-form-urlencoded\\r\\n\";\n$ds1['method']=\"POST\";\n$ds1['content']=http_build_query($data);\n$options['http']=$ds1;\n \n$context = stream_context_create($options);\n$result = file_get_contents($api, false, $context);\nif ($result === FALSE) { /* Handle error */ }\nreturn $result;\n}", "function post($url, $fields = array(), $http_options = array()) {\n $http_options = $http_options + $this->http_options;\n $http_options[CURLOPT_POST] = true;\n $http_options[CURLOPT_POSTFIELDS] = $fields;\n if (is_array($fields)) {\n $http_options[CURLOPT_HTTPHEADER] = array(\"Content-Type: multipart/form-data\");\n }\n $this->handle = curl_init($url);\n\n if (!curl_setopt_array($this->handle, $http_options)) {\n throw new RestClientException(\"Error setting cURL request options.\");\n }\n\n $this->response_object = curl_exec($this->handle);\n $this->http_parse_message($this->response_object);\n\n curl_close($this->handle);\n return $this->response_object;\n }", "function web_hook_post($url, $fields) {\n // url-ify the data for the POST\n foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }\n rtrim($fields_string,'&');\n\n //open connection\n $ch = curl_init();\n\n //set the url, number of POST vars, POST data\n curl_setopt($ch,CURLOPT_URL,$url);\n curl_setopt($ch,CURLOPT_POST,count($fields));\n curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);\n\n //execute post\n $result = curl_exec($ch);\n\n //close connection\n curl_close($ch);\n\n return ($result);\n}", "function ccweb_httpPost2($url, $data, &$outResponse) { \r\n $params = array('http' => array('method' => 'POST', 'content' => $data)); \r\n $context = stream_context_create($params);\r\n\r\n $fh = fopen($url, 'rb', false, $context);\r\n if (!$fh) {return FALSE;} \r\n \r\n $response = stream_get_contents($fh); \r\n if ($response === false) {return FALSE;} \r\n \r\n $outResponse = $response; \r\n return TRUE; \r\n}", "function Curl($url = false , array $data = array()){\n\n\t\tif($url !== false){\n\n\t\t\t$build[CURLOPT_POST] = 1;\n\t\t\t$build[CURLOPT_POSTFIELDS] = http_build_query($data, '', '&');\n\n\t\t\treturn new curlseton($url,$build);\n\t\t\t\n\t\t}\n\t}", "public static function post($url,$vars,$extended=false,$headers=null,$closeAfterUse=true,$timeout=-1,$cookies=null){\n\t\t\tif(!function_exists('connect_store_headers_callback')){\n\t\t\t\tfunction connect_store_headers_callback($ch,$header){\n\t\t\t\t\tConnect::$HEADERS[]=$header;\n\t\t\t\t\treturn strlen($header);\n\t\t\t\t}\n\t\t\t}\n\t\t\tself::$HEADERS=array();\n\t\t\t$ch=curl_init();\n\t\t\t$wp=fopen('php://temp','r+');\n\t\t\tcurl_setopt($ch,CURLOPT_URL,$url);\n\t\t\tcurl_setopt($ch,CURLOPT_STDERR,$wp);\n\t\t\tcurl_setopt($ch,CURLOPT_VERBOSE,true);\n\t\t\tif(substr($url,0,8)=='https://'){\n\t\t\t\tcurl_setopt($ch,CURLOPT_HTTPAUTH,CURLAUTH_ANY);\n\t\t\t\tcurl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);\n\t\t\t}\n\t\t\tif($headers)curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);\n\t\t\tif($timeout!=-1)curl_setopt($ch,CURLOPT_TIMEOUT_MS,$timeout);\n\t\t\tif($cookies){\n\t\t\t\tforeach($cookies as $k=>$v)$cookies[$k]=$k.'='.urlencode($v);\n\t\t\t\tcurl_setopt($ch,CURLOPT_COOKIE,implode('; ',$cookies));\n\t\t\t}\n\t\t\tcurl_setopt($ch,CURLOPT_HEADER,false);\n\t\t\tcurl_setopt($ch,CURLOPT_USERAGENT,self::$USERAGENT);\n\t\t\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\t\t\tcurl_setopt($ch,CURLOPT_POST,true);\n\t\t\tcurl_setopt($ch,CURLOPT_POSTFIELDS,$vars);\n\t\t\tcurl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);\n\t\t\tcurl_setopt($ch,CURLOPT_MAXREDIRS,50);\n\t\t\tcurl_setopt($ch,CURLOPT_HEADERFUNCTION,'connect_store_headers_callback');\n\t\t\t$data=curl_exec($ch);\n\t\t\tif(CFG::get('DEBUG_VERBOSE'))xlog('HTTP POST ',$url,':',$data!==false?'success':'failure');\n\t\t\tif($data===false)$data='';\n\t\t\t$ips=self::_get_curl_remote_ips($wp);\n\t\t\tif(!$extended && (curl_getinfo($ch,CURLINFO_HTTP_CODE)>=400))$data='';\n\t\t\tif($extended)$data=array(\n\t\t\t\t'ip'=>count($ips)>0 ? end($ips) : '',\n\t\t\t\t'ips'=>$ips,\n\t\t\t\t'curl'=>$ch,\n\t\t\t\t'status'=>curl_getinfo($ch,CURLINFO_HTTP_CODE),\n\t\t\t\t'response'=>!$data?'':$data,\n\t\t\t\t'headers'=>self::$HEADERS,\n\t\t\t\t'headers_received'=>self::$HEADERS,\n\t\t\t\t'headers_sent'=>curl_getinfo($ch,CURLINFO_HEADER_OUT)\n\t\t\t);\n\t\t\tif($closeAfterUse)curl_close($ch);\n\t\t\tfclose($wp);\n\t\t\t$GLOBALS['K2F_CURL'][]=$ch;\n\t\t\treturn $data;\n\t\t}", "function rest_post_data($url, $data)\n{\n if (is_array($data)) {\n $data = json_encode($data);\n }\n\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n}", "function wget_post($url, $data) {\n //if ($data == null) $data = array(\"\"=>\"\");\n $options = array(\n 'http' => array(\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n //'header'=> \"Content-Type: application/json\\r\\n\" .\n // \"Accept: application/json\\r\\n\",\n 'method' => 'POST',\n 'content' => http_build_query($data),\n ),\n );\n $context = stream_context_create($options);\n return file_get_contents($url, false, $context);\n}", "function post_to_url($url, $data) {\n $fields = '';\n foreach ($data as $key => $value) {\n $fields .= $key . '=' . $value . '&';\n }\n rtrim($fields, '&');\n $post = curl_init();\n curl_setopt($post, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($post, CURLOPT_URL, $url);\n curl_setopt($post, CURLOPT_POST, count($data));\n curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\n curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\n $result = curl_exec($post); //result from mobile seva server \n return $result; //output from server displayed \n curl_close($post);\n}", "function fetch_url ($url, $post_options = []) {\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION\t,0);\n curl_setopt($ch, CURLOPT_HEADER\t\t\t,0); // DO NOT RETURN HTTP HEADERS\n curl_setopt($ch, CURLOPT_RETURNTRANSFER\t,1); // RETURN THE CONTENTS OF THE CALL\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_TIMEOUT, 9);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 3);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 9);\n curl_setopt($ch, CURLOPT_ENCODING, '');\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n}", "function mi_http_request($url, $data)\r\n{\r\n\r\n $curl = curl_init($url);\r\n curl_setopt($curl, CURLOPT_POST, true);\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n $response = curl_exec($curl);\r\n curl_close($curl);\r\n return $response;\r\n}", "private function http($url, $method, $postfields = NULL, $headers = array())\n {\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_HEADERFUNCTION, array($this, 'getHeader'));\n curl_setopt($ci, CURLOPT_HEADER, FALSE);\n\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 }\n break;\n case 'DELETE':\n curl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\n if (!empty($postfields)) {\n $url = \"{$url}?{$postfields}\";\n }\n }\n\n curl_setopt($ci, CURLOPT_URL, $url );\n if($headers) {\n curl_setopt($ci, CURLOPT_HTTPHEADER, $headers );\n }\n curl_setopt($ci, CURLINFO_HEADER_OUT, TRUE );\n\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\n if ($this->debug) {\n echo \"=====post data======\\r\\n\";\n var_dump($postfields);\n\n echo '=====info====='.\"\\r\\n\";\n print_r( curl_getinfo($ci) );\n\n echo '=====$response====='.\"\\r\\n\";\n print_r( $response );\n }\n curl_close ($ci);\n return $response;\n }", "public function send_post_request(){\n $url = \\Request::get('url');\n $post_array = \\Request::all();\n\n//\t\t$url = 'http://localhost/_websites/ahmed-badawy.com/site/json-test';\n//\t\t$post_array = array('type' => 'scss', 'source' => '.pre{color:red;background-color:green;}', 'compress'=>true);\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $query = curl_exec($ch);\n curl_close($ch);\n\n return $query;\n }", "function post($url, $data = null, $options = array()) {\n\t\treturn $this->request($url, array_merge(array('method' => 'POST', 'body' => $data), $options));\n\t}", "public function test_setOptions_returnsSelf()\n\t{\n\t\t$options = [CURLOPT_AUTOREFERER => true];\n\t\t\n\t\t$request = new Post('http://example.com');\n\t\t\n\t\t$this->assertSame($request, $request->setOptions($options));\n\t\t$this->assertEquals($options, $request->getOptions());\n\t\t\n\t\treturn;\n\t}", "function post($url, $data = '', $content_type = '')\n{\n\t\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data); \n\t\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\n\tif ($content_type != '')\n\t{\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, \n\t\t\tarray(\n\t\t\t\t\"Content-type: \" . $content_type\n\t\t\t\t)\n\t\t\t);\n\t}\t\n\t\n\t$response = curl_exec($ch);\n\tif($response == FALSE) \n\t{\n\t\t$errorText = curl_error($ch);\n\t\tcurl_close($ch);\n\t\tdie($errorText);\n\t}\n\t\n\t$info = curl_getinfo($ch);\n\t$http_code = $info['http_code'];\n\t\t\n\tcurl_close($ch);\n\t\n\treturn $response;\n}", "public function testBuildCURLPostRequestOptions()\n {\n $expectedOptions = [\n 10023 => [\n 'Authorization: ' . self::AUTH\n ],\n 42 => false,\n 10002 => self::URL,\n 19913 => true,\n 64 => false,\n 10015 => 'field1=\"test\", field2=\"test\"'\n ];\n $postFields = 'field1=\"test\", field2=\"test\"';\n $actualOptions = $this->mRequest->buildCURLPostRequestOptions(self::URL, self::AUTH, $postFields);\n $this->assertEquals($expectedOptions, $actualOptions);\n }", "function http_upload($url, $method, $postfields = NULL, $headers = array()) {\n\t\t$this->http_info = array();\n\t\t//$url=\"http://222.44.51.34:1234\";\n\t\t$ci = curl_init();\n\t\t/* Curl settings */\n\t\tcurl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);\n\t\tcurl_setopt($ci, CURLOPT_USERAGENT, $this->useragent);\n\t\tcurl_setopt($ci, CURLOPT_CONNECTTIMEOUT, $this->connecttimeout);\n\t\tcurl_setopt($ci, CURLOPT_TIMEOUT, $this->timeout);\n\t\tcurl_setopt($ci, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($ci, CURLOPT_ENCODING, \"\");\n\t\tcurl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\n\t\tcurl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 1);\n\t\tcurl_setopt($ci, CURLOPT_HEADERFUNCTION, array($this, 'getHeader'));\n\t\tcurl_setopt($ci, CURLOPT_HEADER, FALSE);\n\n\t\tswitch ($method) {\n\t\t\tcase 'POST':\n\t\t\t\tcurl_setopt($ci, CURLOPT_POST, TRUE);\n\t\t\t\tif (!empty($postfields)) {\n\t\t\t\t\tcurl_setopt($ci, CURLOPT_POSTFIELDS, $postfields);\n\t\t\t\t\t$this->postdata = $postfields;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'DELETE':\n\t\t\t\tcurl_setopt($ci, CURLOPT_CUSTOMREQUEST, 'DELETE');\n\t\t\t\tif (!empty($postfields)) {\n\t\t\t\t\t$url = \"{$url}?{$postfields}\";\n\t\t\t\t}\n\t\t}\n\n\t\tif ( isset($this->Token['access_token']) && $this->Token['access_token'] )\n\t\t\t$headers[] = \"Authorization: OAuth2 \".$this->Token['access_token'];\n\n\t\tif ( !empty($this->remote_ip) ) {\n\t\t\tif ( defined('SAE_ACCESSKEY') ) {\n\t\t\t\t$headers[] = \"SaeRemoteIP: \" . $this->remote_ip;\n\t\t\t} else {\n\t\t\t\t$headers[] = \"API-RemoteIP: \" . $this->remote_ip;\n\t\t\t}\n\t\t} else {\n\t\t\tif ( !defined('SAE_ACCESSKEY') ) {\n\t\t\t\t$headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\n\t\t\t}\n\t\t}\n\t\tcurl_setopt($ci, CURLOPT_URL, $url );\n\t\tcurl_setopt($ci, CURLOPT_HTTPHEADER, $headers );\n\t\tcurl_setopt($ci, CURLINFO_HEADER_OUT, TRUE );\n\n\t\t$response = curl_exec($ci);\n\t\t$this->http_code = curl_getinfo($ci, CURLINFO_HTTP_CODE);\n\t\t$this->http_info = array_merge($this->http_info, curl_getinfo($ci));\n\t\t$this->url = $url;\n\n\t\tif ($this->debug) {\n\t\t\techo \"=====post data======\\r\\n\";\n\t\t\tvar_dump($postfields);\n\n\t\t\techo \"=====headers======\\r\\n\";\n\t\t\tprint_r($headers);\n\n\t\t\techo '=====request info====='.\"\\r\\n\";\n\t\t\tprint_r( curl_getinfo($ci) );\n\n\t\t\techo '=====response====='.\"\\r\\n\";\n\t\t\tprint_r( $response );\n\t\t}\n\t\tcurl_close ($ci);\n\t\treturn $response;\n\t}", "function wechat_php_curl_https_post($url, $postfields, $ct = '')\n{\n //$postfields = array('field1'=>'value1', 'field2'=>'value2');\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_POST, true);\n // Edit: prior variable $postFields should be $postfields;\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n if($ct == 'json'){\n curl_setopt($ch, CURLOPT_HTTPHEADER,\n array('Content-Type: application/json',\n 'Content-Length: ' . strlen($postfields),\n )); \n }\n\n //Keep this code to remind me use it for some chinese character just in case\n if($ct == 'utf-8'){\n curl_setopt($ch, CURLOPT_HTTPHEADER,\n array('Content-Type: text/xml; charset=utf-8', \n 'Content-Length: ' . strlen($postfields),\n )); \n }\n\n $result = curl_exec($ch);\n\n if(curl_errno($ch))\n {\n curl_close($ch);\n return NULL;\n }\n\n curl_close($ch);\n return $result;\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}", "function do_post_request($url, $data, $optional_headers = null)\n {\n\t \n$params = array('http' => array(\n 'method' => 'POST',\n 'content' => $data\n ));\n if ($optional_headers !== null) {\n $params['http']['header'] = $optional_headers;\n }\n $ctx = stream_context_create($params);\n $fp = @fopen($url, 'rb', false, $ctx);\n if (!$fp) {\n throw new Exception(\"Problem with $url, $php_errormsg\");\n }\n $response = @stream_get_contents($fp);\n if ($response === false) {\n throw new Exception(\"Problem reading data from $url, $php_errormsg\");\n }\n\t //print_r($response);\n return $response;\n }", "function http_post_fields($url, ?array $data = null, ?array $files = null, ?array $options = null, ?array &$info = null) {}", "public function https_post($url, $data = [] , $is_raw = false){\n// $this->response = $curl->post($url , $data , $is_raw)\n// ->setHeader('X-Requested-With', 'XMLHttpRequest')\n// ->setHeader(\"Accept\" , 'application/json')\n// ->setHeader('Content-Type' , 'application/json')\n// //->setOpt(CURLOPT_PROXY , '127.0.0.1:8888')\n// ->response;\n\n $header = [\n 'Accept:application/json' , 'Content-Type:application/json'\n ];\n $this->response = $this->https_request($url , json_encode($data ) , $header);\n\n return $this;\n }", "function callRemitaApiPost($endPoint, $postData) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $endPoint);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postData));\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen(json_encode($postData)))\n );\n $output = curl_exec($ch);\n return $output;\n}", "function postDataToServerUsingCurl( $post, $rel_url )\n\t{\n\t\t$url\t\t= \"https://api.razorpay.com/v1/\" . $rel_url;\n\t\t$post_json = json_encode($post);\n\t\t$headers = array();\n\t\t$headers[] = \"Content-Type: application/json\";\n\t\t$options = array(\n\t\t\tCURLOPT_POST\t\t => true,\n\t\t\tCURLOPT_POSTFIELDS\t => $post_json,\n\t\t\tCURLOPT_URL\t\t\t => $url,\n\t\t\tCURLOPT_USERPWD\t\t => $this->password,\n\t\t\tCURLOPT_RETURNTRANSFER => true, // return web page\n\t\t\tCURLOPT_HTTPHEADER\t => $headers,\n\t// CURLOPT_HEADER => false, // don't return headers\n\t// CURLOPT_FOLLOWLOCATION => true, // follow redirects\n\t// CURLOPT_ENCODING => \"\", // handle all encodings\n\t// CURLOPT_USERAGENT => \"spider\", // who am i\n\t// CURLOPT_AUTOREFERER => true, // set referer on redirect\n\t\t\tCURLOPT_CONNECTTIMEOUT => 20, // timeout on connect\n\t\t\tCURLOPT_TIMEOUT => 120, // timeout on response\n\t\t\tCURLOPT_MAXREDIRS => 10, // stop after 10 redirects\n\t\t\tCURLOPT_SSL_VERIFYPEER => true, // enable SSL Cert checks\n\t\t\tCURLOPT_SSL_VERIFYHOST => 2,\n\t\t\tCURLOPT_SSLVERSION\t => CURL_SSLVERSION_TLSv1_2\n\t\t);\n\n\t\t$ch = curl_init( $url );\n\t\tcurl_setopt_array( $ch, $options );\n\t\t$result = curl_exec( $ch );\n\t\tif (curl_errno($ch))\n\t\t {\n\t\t\techo 'Error:' . curl_error($ch);\n\t\t }\n\t\tcurl_close( $ch );\n\t\treturn json_decode($result);\n\t}", "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 }", "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 }", "private function _post($path, $options)\n {\n // Login to the service if not already done.\n $this->_logIn();\n\n $options['_rnr_se'] = $this->_rnr_se;\n $this->_curlUrl = self::GV_SERVER_URL . $path;\n $this->_curlOptions = $options;\n // Send HTTP POST request.\n curl_setopt($this->_ch, CURLOPT_URL, $this->_curlUrl);\n curl_setopt($this->_ch, CURLOPT_POST, true);\n curl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($this->_ch, CURLOPT_POSTFIELDS, $options);\n\n $this->_result = curl_exec($this->_ch);\n \n return $this->_result;\n }", "function customPost($url, $refer, $post_info)\n {\n $USER_AGENT=\"Mozilla/5.0 (Windows NT 6.3; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0\";\n\n if (!isset($CONNECT_TIMEOUT) || !filter_var($CONNECT_TIMEOUT, FILTER_VALIDATE_INT)) {$CONNECT_TIMEOUT=10;} //use 10 seconds by default when no timeout is set\n if (!isset($refer) || !filter_var($refer, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED)) {$refer=$url;} //use original url as refer when no valid URL provided\n\n $ch=curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_USERAGENT, $USER_AGENT);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $CONNECT_TIMEOUT);\n curl_setopt($ch, CURLOPT_TIMEOUT, $CONNECT_TIMEOUT);\n curl_setopt($ch, CURLOPT_REFERER, $refer);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_info);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 10);\n $result=curl_exec($ch);\n curl_close($ch);\n\n return $result;\n }", "function qt_post($protocol,$host,$uri,$auth,$parms,$encoding)\n{\n $url = \"$protocol://$host\";\n if (strlen($uri))\n $url .= $uri;\n\n $post = '';\n if ( strtoupper($encoding) == 'URL' )\n {\n foreach($parms as $k => $v)\n $post .= $k . '=' . $v . '&';\n $post = rtrim($post,'&');\n }\n if ( strtoupper($encoding) == 'JSON' )\n {\n $post = json_encode($parms);\n }\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n curl_setopt($ch, CURLOPT_USERAGENT, 'phpAPI');\n\n qt_curl_header('','',1);\n qt_curl_code('',1);\n curl_setopt($ch, CURLOPT_HEADERFUNCTION, \"qt_curl_header\");\n if ( strlen($auth) )\n {\n curl_setopt($ch, CURLOPT_HTTPHEADER,array(\"Authorization: $auth\"));\n echo \"auth: $auth<br>\\n\";\n }\n\n $out = curl_exec($ch);\n $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n qt_curl_code($httpCode);\n curl_close($ch);\n \n return $out;\n}", "public function test_getOptions_returnsArray_ifOptionsDoExist()\n\t{\n\t\t$options = [CURLOPT_AUTOREFERER => true];\n\t\t\n\t\t$request = new Post('http://example.com');\n\t\t$request->setOptions($options);\n\t\t\n\t\t$this->assertEquals($options, $request->getOptions());\n\t\t\n\t\treturn;\n\t}", "public function post ($url, $data = null, $headers = null, $options = null);", "public function curlpost($url, $data)\n {\n\n $host = $url;\n // echo $host;exit;\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $host);\n //curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n //curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n //var_dump(curl_error($ch));\n $res = curl_exec($ch);\n curl_close($ch);\n return $res;\n }", "protected function execCurl() \n\t{\t\t\t\n\t\tif ( $this->sandbox == true )\n\t\t{\n\t\t\t$server = $this->_server['sandbox'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$server = $this->_server['live'];\n\t\t}\n\n\t\t$url = $server . $this->adhocPostUrl;\n\t\t\n\t\t$headers = array(\n\t\t\t'Content-type: application/x-www-form-urlencoded',\n\t\t\t'Authorization: GoogleLogin auth=' . $this->getAuthToken(),\n\t\t\t'developerToken: ' . $this->developerToken,\n\t\t\t'clientCustomerId: ' . $this->clientCustomerId,\n\t\t\t'returnMoneyInMicros: true',\n\t\t\t\t\t\t\n\t\t);\n\n\t\t$data = '__rdxml=' . urlencode( $this->__rdxml );\n\t\t\n\t\t$ch = curl_init( $url );\n\t\tcurl_setopt( $ch, CURLOPT_POST, 1 );\n\t\tcurl_setopt( $ch, CURLOPT_POSTFIELDS, $data );\n\t\tcurl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, FALSE );\n\t\tcurl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE );\n\t\tcurl_setopt( $ch, CURLOPT_HEADER, FALSE );\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, TRUE );\n\t\tcurl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );\n\t\t\n\t\t$response = curl_exec( $ch );\n\t\t$httpCode = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n\t\t$error = curl_error( $ch );\n\t\tcurl_close( $ch );\n\t\t\n\t\tif( $httpCode == 200 || $httpCode == 403 )\n\t\t{\n\t\t\treturn $response;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( !empty( $error ) )\n\t\t\t{\n\t\t\t\tthrow new exception( $httpCode . ' - ' . $error );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new exception( $httpCode . ' - Unknow error occurred while post operation.' ); \n\t\t\t}\n\t\t}\n\t}", "function Send($url, $POST){ //работа с CURL'ом\n\t$ch = curl_init();// Устанавливаем соединение\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $POST);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 10);\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\n\t$result = curl_exec($ch);\n\n\tif($result === false) print $err = curl_error($ch);\n\n\treturn $result;\n}", "private function postHop () {\n\t\t$this->result = curl_exec ( $this->ch );\n\t\tcurl_close ( $this->ch );\n\t}", "public function http($url, $method='POST', $postfields = null, $headers = array())\r\n {\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_COOKIESESSION, true);\r\n curl_setopt($ci, CURLOPT_ENCODING, \"\");\r\n curl_setopt($ci, CURLOPT_SSL_VERIFYPEER, $this->ssl_verifypeer);\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->accessToken) && $this->accessToken) {\r\n $headers[] = \"Authorization: OAuth2 \" . $this->accessToken;\r\n }\r\n\r\n $headers[] = \"API-RemoteIP: \" . $_SERVER['REMOTE_ADDR'];\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 $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 '=====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\r\n curl_close($ci);\r\n return $response;\r\n }", "function postDataToUrl($url, $data) {\r\n $curl = curl_init();\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 1);\r\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8'));\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($curl, CURLOPT_VERBOSE, 0);\r\n curl_setopt($curl, CURLOPT_HEADER, 1);\r\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\r\n $response = curl_exec ($curl);\r\n curl_close ($curl);\r\n\treturn $response;\r\n}", "function httpRequest($url, $post=null, $headers=null, $method='GET', $timeout=1800)\n{\n Log::debug(\"$url \".anyToString($post).\" $method\",'exthttp');\n $httpMethod = 'GET';\n //$cookie_jar = tempnam('/tmp','cookie');\n $url = (string) $url;\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HEADER, 1); // To get only the headers use CURLOPT_NOBODY\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2); //TODO get seconds from ini files\n curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); //TODO get seconds from ini files\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/4.0 (compatible;)\");\n curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/cookie.php.dat'); // TODO add hostname to filename\n curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookie.php.dat');\n\n if ($headers)\n {\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // !array\n }\n\n // TODO clear cookie curl_setopt($ch, CURLOPT_COOKIELIST, \"ALL\");\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n if (count($post) && $method != 'PUT')\n {\n $method = 'POST';\n $httpMethod = 'POST';\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n }\n elseif ($post && $method == 'PUT')\n {\n $httpMethod = 'PUT';\n $fp = fopen('php://temp/maxmemory:256000', 'w');\n if (!$fp)\n die('could not open temp memory data');\n fwrite($fp, $post);\n fseek($fp, 0);\n curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);\n curl_setopt($ch, CURLOPT_INFILE, $fp);\n curl_setopt($ch, CURLOPT_INFILESIZE, strlen($post));\n }\n $output = curl_exec($ch);\n if (curl_errno($ch))\n {\n $errno = curl_errno($ch);\n $error = curl_error($ch).' ('.$errno.')';\n curl_close($ch);\n throw new Exception($error, (int)$errno);\n }\n // {httpcode: 200, url: '/login', effectiveurl: '/account', 'totaltime': 2, data: '<html>', 'headers': [k:v,..], redirectcount: 1, receivedbytes: 1000, 'method': post, 'contenttype': 'html'}\n $meta = array();\n $meta['effectiveurl'] = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);\n $meta['httpcode'] = (integer) curl_getinfo($ch, CURLINFO_HTTP_CODE); // last\n $meta['totaltime'] = (float) curl_getinfo($ch, CURLINFO_TOTAL_TIME);\n $meta['dnstime'] = (float) curl_getinfo($ch, CURLINFO_NAMELOOKUP_TIME);\n $meta['connecttime'] = (float) curl_getinfo($ch, CURLINFO_CONNECT_TIME);\n $meta['starttransfertime'] = (float) curl_getinfo($ch, CURLINFO_STARTTRANSFER_TIME);\n $meta['redirectcount'] = (integer) curl_getinfo($ch, CURLINFO_REDIRECT_COUNT);\n $meta['receivedbytes'] = (integer) curl_getinfo($ch, CURLINFO_SIZE_DOWNLOAD);\n $meta['contenttype'] = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);\n $headersBytes = (integer) curl_getinfo($ch, CURLINFO_HEADER_SIZE);\n $meta['url'] = $url;\n $meta['method'] = $httpMethod;\n $header = substr($output, 0, $headersBytes);\n $body = substr($output, $headersBytes);\n $headersarray = explode(\"\\r\\n\", $header);\n $headersclean = array();\n foreach ($headersarray as $headervalue)\n {\n $hstruct = explode(':', $headervalue); //$headerkey\n if ($hstruct[0] && $hstruct[1])\n $headersclean[$hstruct[0]] = $hstruct[1];\n }\n $meta['headers'] = $headersclean;\n // cookies\n $pattern = \"#Set-Cookie:\\\\s+(?<cookie>[^=]+=[^;]+)#m\";\n preg_match_all($pattern, $header, $matches);\n $cookiesOut = implode(\"; \", $matches['cookie']);\n foreach (explode(';',$cookiesOut) as $kv)\n {\n list($k,$v) = explode('=',$kv);\n $k = trim($k);\n $v = trim($v);\n $meta['newcookies'][$k] = urldecode($v);\n }\n unset($meta['headers']['Set-Cookie']);\n\n $meta['data'] = $body;\n //unset($body);\n curl_close($ch);\n if ($meta['httpcode'] == 200)\n {\n // $meta['contenttype'] == 'text/html'\n $aa = explode(';', $meta['contenttype']);\n if (count($aa) == 1)\n {\n if ($meta['contenttype'] == 'text/html') $ishtml = true;\n }\n else { // 2 or more\n if ($aa[0] == 'text/html') $ishtml = true;\n $aa[1] = trim($aa[1]);\n //println($aa[1],1,TERM_RED);\n $enc = explode('=', $aa[1]);\n //println($enc);\n if ($enc[0] == 'charset')\n {\n //println($enc[1],1,TERM_YELLOW);\n if ($enc[1] == 'windows-1251')\n {\n $meta['data'] = mb_convert_encoding($meta['data'], \"utf-8\", \"windows-1251\");\n }\n }\n }\n// printlnd($meta['contenttype']);\n if (explode(';', $meta['contenttype'])[0] == 'application/json') $isjson = true;\n\n if ($ishtml) {\n $d = new DOMDocument;\n $d->loadHTML($body);\n $meta['html'] = $d;\n }\n elseif ($isjson)\n {\n\n $meta['json'] = json_decode($body, true);\n }\n }\n return $meta;\n}", "public function postData(){\n\t\t$url = $this->host . \"/rest/v1/leads.json?access_token=\" . $this->getToken();\n\t\t$ch = curl_init($url);\n\t\t$requestBody = $this->bodyBuilder();\n\t\t//debug\n\t\t//print_r($requestBody);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('accept: application/json','Content-Type: application/json'));\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $requestBody);\n\t\tcurl_getinfo($ch);\n\t\t$response = curl_exec($ch);\n\t\treturn $response;\n\t}", "private function _httpPost($fields)\n {\n $fields_string = http_build_query($fields);\n //open connection\n $ch = curl_init();\n\n //set the url, number of POST vars, POST data\n curl_setopt($ch,CURLOPT_URL,$this->_getFullUrl());\n curl_setopt($ch,CURLOPT_POST,count($fields));\n curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\n //execute post\n $result = curl_exec($ch);\n\n //close connection\n curl_close($ch);\n\n return $result;\n }", "function PPHttpPost($url_, $postFields_, $parsed_)\n\t{\n\t\t//setting the curl parameters.\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL,$url_);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\n\n\t\t//turning off the server and peer verification(TrustManager Concept).\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\n\t\t//setting the nvpreq as POST FIELD to curl\n\t\tcurl_setopt($ch,CURLOPT_POSTFIELDS,$postFields_);\n\n\t\t//getting response from server\n\t\t$httpResponse = curl_exec($ch);\n\n\t\tif(!$httpResponse) {\n\t\t\treturn array(\"status\" => false, \"error_msg\" => curl_error($ch), \"error_no\" => curl_errno($ch));\n\t\t}\n\n\t\tif(!$parsed_) {\n\t\t\treturn array(\"status\" => true, \"httpResponse\" => $httpResponse);\n\t\t}\n\n\t\t$httpResponseAr = explode(\"\\n\", $httpResponse);\n\n\t\t$httpParsedResponseAr = array();\n\t\tforeach ($httpResponseAr as $i => $value) {\n\t\t\t$tmpAr = explode(\"=\", $value);\n\t\t\tif(sizeof($tmpAr) > 1) {\n\t\t\t\t$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];\n\t\t\t}\n\t\t}\n\n\t\tif(0 == sizeof($httpParsedResponseAr)) {\n\t\t\t$error = \"Invalid HTTP Response for POST request($postFields_) to $url_.\";\n\t\t\treturn array(\"status\" => false, \"error_msg\" => $error, \"error_no\" => 0);\n\t\t}\n\t\treturn array(\"status\" => true, \"httpParsedResponseAr\" => $httpParsedResponseAr);\n\n\t}", "function post_to_url($url, $data) {\r\n\t\t$fields = '';\r\n\t\tforeach($data as $key => $value) {\r\n\t\t\t$fields .= $key . '=' . $value . '&';\r\n\t\t}\r\n \r\n\t\trtrim($fields, '&');\r\n\t\t$post = curl_init();\r\n \r\n\t\t curl_setopt($post, CURLOPT_URL, $url);\r\n\t\t curl_setopt($post, CURLOPT_POST, count($data));\r\n\t\t curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\r\n\t\t curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t $result = curl_exec($post);\r\n\t\t curl_close($post);\r\n\t}", "public function setPostfields($fields) {\n if(is_array($fields)) {\n $fields = http_build_query($fields,'','&');\n }\n\n return curl_setopt($this->ch,CURLOPT_POSTFIELDS,$fields);\n }", "function restPost($url, $content) {\n\t$ch = curl_init();\n\t// Uses the URL passed in that is specific to the API used\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t// When posting to a Fuel API, content-type has to be explicitly set to application/json\n\t$headers = [\"Content-Type: application/json\", \"User-Agent: \" . getSDKVersion()];\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\t// The content is the JSON payload that defines the request\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $content);\n\t//Need to set ReturnTransfer to True in order to store the result in a variable\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t// Disable VerifyPeer for SSL\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t$outputJSON = curl_exec($ch);\n\t$responseObject = new \\stdClass();\n\t$responseObject->body = $outputJSON;\n\t$responseObject->httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\treturn $responseObject;\n}", "function curl_post_https($url,$data=null,$cookie=null){ // 模拟提交数据函数\n $curl = curl_init(); // 启动一个CURL会话\n curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址\n /*curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1); // 从证书中检查SSL加密算法是否存在*/\n curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模拟用户使用的浏览器\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转\n curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer\n curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的数据包\n curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 设置超时限制防止死循环\n curl_setopt($curl, CURLOPT_HEADER, 0);\n if ($cookie) curl_setopt($curl, CURLOPT_HTTPHEADER, array('Cookie:laravel_session='.$cookie['laravel_session']));//在请求头中写入cookie并发送\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回\n $tmpInfo = curl_exec($curl); // 执行操作\n if (curl_errno($curl)) {\n echo 'Errno'.curl_error($curl);//捕抓异常\n }\n curl_close($curl); // 关闭CURL会话\n return $tmpInfo; // 返回数据,json格式\n}", "function Qassim_HTTP($method, $url, $header, $data){\r\n\r\n if( $method == 1 ){\r\n $method_type = 1; // 1 = POST\r\n }else{\r\n $method_type = 0; // 0 = GET\r\n }\r\n\r\n $curl = curl_init();\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\r\n curl_setopt($curl, CURLOPT_HEADER, 0);\r\n\r\n if( $header !== 0 ){\r\n curl_setopt($curl, CURLOPT_HTTPHEADER, $header);\r\n }\r\n\r\n curl_setopt($curl, CURLOPT_POST, $method_type);\r\n\r\n if( $data !== 0 ){\r\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\r\n }\r\n\r\n $response = curl_exec($curl);\r\n $json = json_decode($response, true);\r\n curl_close($curl);\r\n\r\n return $json;\r\n}", "function postRequest ($url, $data = [], $cookies = []) {\n /*$ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\n\n if ($cookies) {\n $cookie_str = [];\n foreach ($cookies as $k => $v) $cookie_str[] = $k . '=' . $v;\n curl_setopt($ch, CURLOPT_HTTPHEADER, ['Cookie: ' . implode('& ', $cookie_str)]);\n }\n\n $response = curl_exec($ch);\n\n preg_match('/^Set-Cookie:\\s*([^;]*)/mi', $response, $matches);\n $cookies_new = [];\n if (isset($matches[1])) {\n foreach (explode('&', $matches[1]) as $cookie) {\n $cookie = explode('=', trim($cookie), 2);\n $cookies_new[$cookie[0]] = $cookie[1];\n }\n } else {\n $cookies_new = $cookies;\n }\n\n curl_close($ch);\n\n $content = substr($response, strpos($response, '<!DOCTYPE'));*/\n\n $data = http_build_query($data);\n $context = [\n 'http' => [\n 'method' => 'POST',\n 'follow_location' => 1,\n 'content' => $data,\n 'timeout' => 100,\n 'header' => 'Content-Length: ' . strlen($data) . \"\\r\\n\" .\n 'Content-type: application/x-www-form-urlencoded' . \"\\r\\n\"\n ]\n ];\n\n if ($cookies) {\n $cookie_str = [];\n foreach ($cookies as $k => $v) $cookie_str[] = $k . '=' . $v;\n $context['http']['header'] .= 'Cookie: ' . implode('& ', $cookie_str) . \"\\r\\n\";\n }\n\n $content = file_get_contents($url, FALSE, stream_context_create($context));\n\n $found = FALSE;\n $matches = ['', ''];\n foreach ($http_response_header as $header) {\n preg_match('/^Set-Cookie:\\s*([^;]*)/mi', $header, $matches);\n if ($matches) {\n $found = TRUE;\n break;\n }\n }\n $cookies_new = [];\n if ($found) {\n foreach (explode('&', $matches[1]) as $cookie) {\n $cookie = explode('=', trim($cookie), 2);\n $cookies_new[$cookie[0]] = $cookie[1];\n }\n } else {\n $cookies_new = $cookies;\n }\n\n return ['cookie' => $cookies_new, 'content' => str_get_html($content), 'content_raw' => $content];\n}", "public function request_post($uri, array $options = array()) {\n $options['method'] = 'POST';\n return $this->request($uri, $options);\n }", "private function curl_post($url, $data)\n {\n $json_str = file_get_contents($this->cil_config_file);\n $json = json_decode($json_str);\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($doc)));\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\n curl_setopt($ch, CURLOPT_POSTFIELDS,$data);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_USERPWD, $json->readonly_unit_tester);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n $response = curl_exec($ch);\n curl_close($ch);\n return $response;\n }", "public function post($url, $body = array(), $query = array(), $headers = array());", "function https_request($url, $post = null)\n {\n $cookieFile = NULL;\n $hCURL = curl_init();\n curl_setopt($hCURL, CURLOPT_URL, $url);\n curl_setopt($hCURL, CURLOPT_TIMEOUT, 30);\n curl_setopt($hCURL, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($hCURL, CURLOPT_USERAGENT, $userAgent);\n curl_setopt($hCURL, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($hCURL, CURLOPT_AUTOREFERER, TRUE);\n curl_setopt($hCURL, CURLOPT_ENCODING, \"gzip,deflate\");\n //curl_setopt($hCURL, CURLOPT_HTTPHEADER,$host);\n if ($post) {\n curl_setopt($hCURL, CURLOPT_POST, 1);\n curl_setopt($hCURL, CURLOPT_POSTFIELDS, $post);\n }\n $sContent = curl_exec($hCURL);\n var_dump(curl_error($hCURL));\n if ($sContent === FALSE) {\n $error = curl_error($hCURL);\n curl_close($hCURL);\n\n throw new \\Exception($error . ' Url : ' . $url);\n } else {\n curl_close($hCURL);\n return $sContent;\n }\n }", "function api_post($url, array $post_contents, $username = null, $password = null)\n {\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, TRUE);\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post_contents));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n if ($username != NULL) {\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_USERPWD, \"{$username}:{$password}\");\n }\n return $this->gather_response($ch);\n }", "public function post($url, $params = array(), $options = array())\n\t{\n\t\t$field_string = '';\n\t\t\n\t\tif ( iterable($params) ) {\n\t\t\tforeach ( $params as $key => $value ) {\n\t\t\t\t$field_string .= urlencode($key) . '=' . urlencode($value) . '&';\n\t\t\t}\n\t\t\t\n\t\t\trtrim($field_string, '&');\n\t\t}\n\t\t\n\t\t$options[CURLOPT_URL] = $url;\n\t\t$options[CURLOPT_RETURNTRANSFER] = array_ensure($options, CURLOPT_RETURNTRANSFER, 1);\n\t\t$options[CURLOPT_HEADER] = array_ensure($options, CURLOPT_HEADER, 0);\n\t\t$options[CURLOPT_USERAGENT] = array_ensure($options, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0');\n\t\t$options[CURLOPT_IPRESOLVE] = array_ensure($options, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);\n\t\t$options[CURLOPT_POST] = sizeof($params);\n\t\t$options[CURLOPT_SSL_VERIFYPEER] = false;\n\t\t$options[CURLOPT_SSL_VERIFYHOST] = 0;\n\t\t$options[CURLOPT_POSTFIELDS] = $field_string;\n\t\t//$options[CURLOPT_HEADER] = strlen($field_string);\n\t\t\n\t\t$curl = curl_init();\n\t\t\n\t\tcurl_setopt_array($curl, $options);\n\t\t\n\t\t$response = curl_exec($curl);\n\t\t\n\t\tif ( false === $response ) {\n\t\t\techo curl_error($curl);\n\t\t}\n\t\t\n\t\tcurl_close($curl);\n\t\t\n\t\treturn $response;\n\t}", "function Curl_Call($url, $args) {\n\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, false);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\tcurl_setopt($ch, CURLOPT_VERBOSE, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $args);\n\t\t$data = curl_exec($ch);\n\n\t\t//echo \"<pre>\".print_r(curl_getinfo($ch));\n\n\t\treturn $data;\n\t}", "function submit($returnArray = false) { if (!function_exists('curl_init')) {\r\n die('Sorry cURL is not installed!');\r\n }\r\n\r\n // OK cool - then let's create a new cURL resource handle\r\n $ch = curl_init();\r\n\r\n // Now set some options (most are optional)\r\n // Set URL to download\r\n curl_setopt($ch, CURLOPT_URL, BUGZILLA_URL);\r\n\r\n $post = $this->toXML();\r\n\r\n //Identifies the call by its method name\r\n $name = new SimpleXMLElement($post);\r\n $this->requestID = (string) $name->methodName;\r\n \r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n\r\n curl_setopt($ch, CURLOPT_POST, true);\r\n\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post); \r\n\r\n //echo $post;\r\n // Include header in result? (1 = yes, 0 = no)\r\n curl_setopt($ch, CURLOPT_HEADER, 0);\r\n\r\n // Should cURL return or print out the data? (true = return, false = print)\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\r\n\r\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/xml'));\r\n\r\n // Timeout in seconds\r\n curl_setopt($ch, CURLOPT_TIMEOUT, 100000);\r\n\r\n // Download the given URL, and return output\r\n $output = curl_exec($ch);\r\n \r\n \r\n //For 1500 bugs: 3784845\r\n //For 1000 bugs: 2686061\r\n //echo $output;\r\n // Close the cURL resource, and free system resources\r\n curl_close($ch);\r\n if ($returnArray) {\r\n return $this->toPHP($output);\r\n } else {\r\n return $this->toJson($output);\r\n }\r\n }", "function post_to_url_unicode($url, $data) {\n $fields = '';\n foreach ($data as $key => $value) {\n $fields .= $key . '=' . urlencode($value) . '&';\n }\n rtrim($fields, '&');\n $post = curl_init();\n curl_setopt($post, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($post, CURLOPT_URL, $url);\n curl_setopt($post, CURLOPT_POST, count($data));\n curl_setopt($post, CURLOPT_POSTFIELDS, $fields);\n curl_setopt($post, CURLOPT_HTTPHEADER, array(\"Content-Type:application/x-www-form-urlencoded\"));\n curl_setopt($post, CURLOPT_HTTPHEADER, array(\"Content-length:\"\n . strlen($fields)));\n curl_setopt($post, CURLOPT_HTTPHEADER, array(\"User-Agent:Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)\"));\n curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);\n $result = curl_exec($post); //result from mobile seva server\n //echo $result = curl_exec($post); //result from mobile seva server \n curl_close($post);\n return $result;\n}", "function httpPOST($url, array $data, $headers = '') {\n $this->ensureOpened(__FUNCTION__);\n $query = http_build_query($data, '', '&');\n ($headers = trim($headers) === '') or $headers .= \"\\r\\n\";\n\n $headers = \"POST $url HTTP/1.0\\r\\n\".\n $headers.\n \"Content-Type: application/x-www-form-urlencoded\\r\\n\".\n \"Content-Length: \".strlen($query).\"\\r\\n\".\n \"$query\\r\\n\";\n\n $this->write($headers);\n return $this->readAllAndClose();\n }", "function post_to_ilevel($url, $user, $password, $body) {\n\n\t// Set the arguments for the query\n\t$args = array(\n\t\t'method' => 'POST',\n\t\t'headers' => array(\n\t\t\t'Authorization' => 'Basic ' . base64_encode( $user . ':' . $password )\n\t\t\t),\n\t\t'httpversion' => '1.0',\n 'sslverify' => true,\n 'body' => $body\n\t\t);\n\n\t// Make the query, using the URL and arguments\n\t$response = wp_remote_get( $url, $args );\n\n\t// If the query returns an error, exit early\n\tif( is_wp_error( $response ) ) {\n\t\treturn false;\n\t}\n\n\t// Retrieve the body from the returned data\n\t$response_body = wp_remote_retrieve_body( $response );\n\n\t// Decode the response_body so we can access its values\n\t// $json = json_decode($response_body, true);\n\n\t// Log the body in the error log\n\t// error_log('response_status: '.$json['response_status']);\n\t// error_log('type: '.gettype($response_body));\n\n\twp_mail('michael@tyrell.mobi', 'i.LEVEL RetailOrder Response', $response_body);\n\n\t// Return the response body\n\treturn $body;\n\n}", "function DoRequest($url, $post_options = \"\", $referer = \"\", $style=\"\")\n\t{\n\t\t$this->req_id++;\n\t\tif ($this->opt[\"use_proxy\"] ==1)\n\t\t{\n\t\t\t$this->proxy = $this->get_new_ip($this->proxy);\n\t\t\tcurl_setopt($this->ch, CURLOPT_PROXY, $this->proxy);\n\t\t\t//e(\"doing request with: \" .$this->proxy, 3);\n\t\t}\n\t\telseif($this->opt[\"use_proxy\"]==2)\n\t\t{\n\t\t\t$this->proxy=$this->get_proxy();\n\t\t\tcurl_setopt($this->ch, CURLOPT_PROXY, $this->proxy);\n\t\t}\n\t\tif ($this->opt[\"use_slot\"])\n\t\t{\n\t\t\t$this->slot = $this->get_new_slot($this->slot);\n\t\t\t//e(\"doing request with: \" .$this->slot, 3);\n\t\t\tcurl_setopt($this->ch, CURLOPT_PROXY, $this->slot);\n\t\t}\n\n\t\tcurl_setopt($this->ch, CURLOPT_URL, $url);\n\t\tif (!$style)\n\t\t$style = \"array\";\n\n\t\tif ($style == \"array\" && is_array($post_options))\n\t\t{\n\t\t\t$post_string = \"\";\n\t\t\tforeach ($post_options as $key => $val)\n\t\t\t$post_string .= \"&\".urlencode($key).\"=\".urlencode($val);\n\t\t\tcurl_setopt($this->ch, CURLOPT_POST, 1);\n\t\t\tcurl_setopt($this->ch, CURLOPT_HTTPHEADER, $this->header_post);\n\t\t\tcurl_setopt($this->ch, CURLOPT_POSTFIELDS, substr($post_string,1));\n\t\t}\n\t\telse if ($style == \"multipart\" && is_array($post_options))\n\t\t{\t// HTTP POST\n\t\t\t//echo \"Doing POST\\n\";\n\t\t\tcurl_setopt($this->ch, CURLOPT_POST, 1);\n\t\t\tcurl_setopt($this->ch, CURLOPT_POSTFIELDS, $post_options);\n\t\t\tcurl_setopt($this->ch, CURLOPT_HTTPHEADER, $this->header_multipart);\n\t\t}\n\t\telseif($style == \"string\" && !is_array($post_options))\n\t\t{\n\t\t\t//echo \"Doing POST\\n\";\n\t\t\tcurl_setopt($this->ch, CURLOPT_POST, 1);\n\t\t\tcurl_setopt($this->ch, CURLOPT_POSTFIELDS, $post_options);\n\t\t\tcurl_setopt($this->ch, CURLOPT_HTTPHEADER, $this->header_post);\n\t\t}\n\t\telseif($style == \"json\" && !is_array($post_options))\n\t\t{\n\t\t\tcurl_setopt($this->ch, CURLOPT_POST, 1);\n\t\t\tcurl_setopt($this->ch, CURLOPT_HTTPHEADER, $this->header_json);\n\t\t\tcurl_setopt($this->ch, CURLOPT_POSTFIELDS, $post_options);\n\t\t}\n\t\telse{\n\t\t\tcurl_setopt($this->ch, CURLOPT_HTTPGET, 1);\n\t\t\tcurl_setopt($this->ch, CURLOPT_HTTPHEADER, $this->header);\n\t\t}\n\n\n\t\tif ($referer)\t\tcurl_setopt($this->ch, CURLOPT_REFERER, $referer);\n\t\telse \t\t\t\tcurl_setopt($this->ch, CURLOPT_REFERER, \"\");\n\t\t\n\t\t// added by vlatko in order to test\n\t\t//curl_setopt($this->ch, CURLOPT_HTTP_VERSION, 1.0);\n\t\t//curl_setopt($this->ch, CURLOPT_HEADER, TRUE);\n\t\t//curl_setopt($this->ch, CURLOPT_BINARYTRANSFER, TRUE);\n\t\t//curl_setopt($this->ch, CURLOPT_FAILONERROR, true);\n\t\t\n\t\t\n\t\t// added by vlatko\n\t\t//if ( $error = curl_error($this->ch) ) echo 'ERROR0: ',$error;\n\t\t\n\t\t$this->res = curl_exec($this->ch);\n\t\t\n\t\t// added by vlatko\n\t\t//print_r(curl_getinfo($this->ch));\n\t\t//if ( $error = curl_error($this->ch) ) echo 'ERROR1: ',$error;\n\n\t\t//TRAP ERROR RESET PROXY\n\t\t//**********************\n\t\t/*if(curl_error($this->ch)){\n\t\t\tif(stripos(curl_error($this->ch), \"timed out\") || stripos(curl_error($this->ch), \"connect to host\")) {\n\t\t\t\twhile(1){\n\t\t\t\t\tif ($this->opt[\"use_proxy\"]==1){\n\t\t\t\t\t\te(curl_error($this->ch) . ' ' . $this->proxy . ' proxy is down, getting new one',4);\n\t\t\t\t\t\tunset($this->proxy);\n\t\t\t\t\t\t$this->proxy = $this->get_new_ip($this->proxy);\n\t\t\t\t\t\tcurl_setopt($this->ch, CURLOPT_PROXY, $this->proxy);\n\t\t\t\t\t}\n\t\t\t\t\tif ($this->opt[\"use_slot\"]||$this->opt[\"use_slots\"]){\n\t\t\t\t\t\te(curl_error($this->ch) . ' ' . $this->slot . ' slot is down, getting new one',4);\n\t\t\t\t\t\tmysql_query(\"DELETE FROM main.proxy_slots where proxy_ip='$this->slot'\");\n\t\t\t\t\t\tunset($this->slot);\n\t\t\t\t\t\t$this->slot = $this->get_new_slot($this->slot);\n\t\t\t\t\t\tcurl_setopt($this->ch, CURLOPT_PROXY, $this->slot);\n\t\t\t\t\t}\n\t\t\t\t\t$this->res = curl_exec($this->ch);\n\t\t\t\t\tif(!stripos(curl_error($this->ch), 'timed out')){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$try++;\n\t\t\t\t\t\tif($try > 5) break;\n\t\t\t\t\t\tsleep(1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\te(curl_error($this->ch), 4);\n\t\t\t}\n\t\t}\n\t\t*/\n\n\t\tif (!$this->check_result($this->res))\n\t\t{\n\t\t\t$this->res = curl_exec($this->ch);\n\t\t\tif (!$this->check_result($this->res))\n\t\t\t$this->res = curl_exec($this->ch);\n\t\t\t\n\t\t\t//echo \"check_result not OK \";\n\t\t\t//print_r(curl_getinfo($this->ch));\n\t\t}\n\n\t\tif ($this->check_result($this->res))\n\t\t{\n\t\t\t$result = array(\n\t\t\t\"req_id\"\t\t=>\t$this->req_id,\n\t\t\t\"url\"\t\t\t=>\t$url,\n\t\t\t\"post_options\"\t=>\t$post_options,\n\t\t\t\"referer\"\t\t=>\t$referer,\n\t\t\t\"res\"\t\t\t=>\t$this->res,\n\t\t\t\"ok\"\t\t\t=>\tTRUE\n\t\t\t);\n\t\t\t//echo \"check_result OK\";\n\t\t}\n\t\telse\n\t\t$result = array(\"req_id\" => $this->req_id,\n\t\t\"ok\" => FALSE);\n\n\t\tif ($this->opt[\"save_results\"])\n\t\t$this->save_result($result);\n\n\t\tif ($this->opt[\"verbose\"])\n\t\techo \"- Issued Request to: \".$url.\"\\n\";\n\n\t\t//if ($style == \"json\")\n\t\t//$this->setHeader(array(\"\")); // remove the content type..\n\t\t\n\t\t// added by vlatko in order to test\n\t\t//print_r(curl_getinfo($this->ch));\n\t\t//if ( $error = curl_error($this->ch) ) echo 'ERROR2: ',$error;\n\t\t\n\t\treturn ($result);\n\t}", "function post($url, $data) {\n $options = array(\n\t\t 'http' => array(\n\t\t\t\t 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n\t\t\t\t 'method' => 'POST',\n\t\t\t\t 'content' => http_build_query($data),\n\t\t\t\t ),\n\t\t );\n $context = stream_context_create($options);\n $result = file_get_contents($url, false, $context);\n return $result;\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}", "public static function curlPOST($url,$dato){\n\n $ch = curl_init($url);\n //curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\tcurl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\tcurl_setopt($ch, CURLOPT_CAINFO, getcwd() . \"/certificado/privatekey.pem\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $dato);\n\tcurl_setopt($ch, CURLOPT_CERTINFO, 1);\n\t$response = curl_exec($ch);\n\t$info = curl_getinfo($ch);\n //var_dump($info);\n\t$certInfo = curl_getinfo($ch, CURLINFO_CERTINFO);\n\t//var_dump($response);\n\t//exit;\n curl_close($ch);\n\n\n if(!$response)\n {\n return false;\n }\n else\n {\n return $response;\n }\n}", "function make_post_call($mid_url, $post_values) {\n global $base_url, $end_url;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $base_url . $mid_url . $end_url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($post_values));\n \n $output = curl_exec($curl);\n curl_close($curl);\n \n return $output;\n }", "function http_post($url, $post_string) {\n\t\t\n\t\t// add any additional curl options here\n\t\t$options = array(CURLOPT_URL => $url,\n\t\tCURLOPT_POST => true,\n\t\tCURLOPT_POSTFIELDS => $post_string,\n\t\tCURLOPT_USERAGENT => $this->user_agent);\n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch, $options);\n\t\t\n\t\t$response = curl_exec($ch);\n\t\t$this->last_response = $response;\n\t\t$info = curl_getinfo($ch);\n\t\t\n\t\tcurl_close($ch);\n\t\t\n\t\t// all good\n\t\tif ($info['http_code'] == 204)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "function fetchUrl($method = 'POST', $uri, $parametrosArray , $headers = false)\n {\n $response = [];\n //Initialize curl\n $curl = curl_init();\n //headers default\n $headers = ($headers == false) ? [\"Content-Type: multipart/form-data;\"]: $headers;\n //Define options\n $CurlOptions=array(\n CURLOPT_CUSTOMREQUEST => $method, \n CURLOPT_URL => $uri,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 0,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_SSL_VERIFYPEER => false, /*ignora la validacion de ssl*/\n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_POSTFIELDS => $parametrosArray,\n );\n //Add options\n curl_setopt_array($curl,$CurlOptions );\n //Execute curl\n $result = curl_exec($curl);\n //Get Code\n $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n //if only errors\n if ($result === false) {\n $result .= curl_error($curl);\n }\n //Close\n curl_close($curl);\n //create array response\n $response[\"data\"]=$result;\n $response[\"code\"]=$httpcode;\n return $response;\n }", "function get( $url, $post = null, $auth = null, $progress = false, $timeout = 5, &$error = false, $options = array() ) {\n\n // Create CURL Object\n $CURL = curl_init();\n\n // By using array union we can pre-set/change options from function call\n $curl_opts = $options + array(\n CURLOPT_URL => $url,\n CURLOPT_TIMEOUT => $timeout,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_USERAGENT => 'Mozilla/5.0 (AIO Radio Station Player) AppleWebKit/537.36 (KHTML, like Gecko)',\n CURLOPT_FOLLOWLOCATION => ( ( ini_get( 'open_basedir' ) == false ) ? true : false ),\n CURLOPT_CONNECTTIMEOUT => ( ( $timeout < 6 && $timeout != 0 ) ? 5 : $timeout ),\n CURLOPT_REFERER => 'http' . ( ( $_SERVER[ 'SERVER_PORT' ] == 443 ) ? 's://' : '://' ) . $_SERVER[ 'HTTP_HOST' ] . strtok( $_SERVER[ 'REQUEST_URI' ], '?' ),\n CURLOPT_CAINFO => dirname( __FILE__ ) . '/bundle.crt'\n );\n\n\n // Post data to the URL (expects array)\n if ( isset( $post ) && is_array( $post ) ) {\n\n // Make every just simpler using custom array for options\n $curl_opts = $curl_opts + array(\n CURLOPT_POSTFIELDS => http_build_query( $post, '', '&' ),\n CURLOPT_POST => true,\n CURLOPT_FRESH_CONNECT => true,\n CURLOPT_FORBID_REUSE => true\n );\n\n }\n\n // Use HTTP Authorization\n if ( isset( $auth ) && !empty( $auth ) ) {\n\n $curl_opts = $curl_opts + array( CURLOPT_USERPWD => $auth );\n\n }\n\n // Call anonymous $progress_function function\n if ( $progress !== false && is_callable( $progress ) ) {\n\n $curl_opts = $curl_opts + array(\n CURLOPT_NOPROGRESS => false,\n CURLOPT_PROGRESSFUNCTION => $progress\n );\n\n }\n\n // Before executing CURL pass options array to the session\n curl_setopt_array( $CURL, $curl_opts );\n\n // Finally execute CURL\n $data = curl_exec( $CURL );\n\n // Parse ERROR\n if ( curl_error( $CURL ) ) {\n\n // This must be referenced in-memory variable\n $error = curl_error( $CURL );\n\n // Only works when writeLog function is available\n if ( function_exists( 'writeLog' ) )\n writeLog( 'errors', \"CURL Request \\\"{$url}\\\" failed! LOG: \" . curl_error( $CURL ), dirname( __FILE__ ) . '/./../tmp/logs/' );\n\n }\n\n // Close connection and return data\n curl_close( $CURL );\n return $data;\n\n }", "private function sendCurl($url,$data,$headers_array)\r\n {\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $url);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n curl_setopt($ch, CURLOPT_POST, true);\r\n curl_setopt($ch,CURLOPT_POSTFIELDS, $data);\r\n curl_setopt($ch,CURLOPT_HTTPHEADER, $headers_array);\r\n $response = trim(curl_exec($ch));\r\n curl_close($ch);\r\n return $response;\r\n }", "protected function applyOptions()\n {\n return curl_setopt_array($this->res, $this->options);\n }", "public function post($url, $payload, $options = [])\n {\n $request = new Client();\n $request->init();\n\n $request->setopt(CURLOPT_URL, $url);\n\n foreach ($this->options as $optionKey => $optValue) {\n $request->setopt($optionKey, $optValue);\n }\n\n foreach ($options as $optionKey => $optValue) {\n $request->setopt($optionKey, $optValue);\n }\n\n $request->setopt(CURLOPT_POSTFIELDS, $payload);\n $request->setopt(\n CURLOPT_HTTPHEADER,\n [\n 'Content-Type: ' . $this->dataType,\n 'Content-Length: ' . strlen($payload)\n ]\n );\n\n if (!$this->body = $request->exec()) {\n $this->error = $request->error();\n }\n\n $info = $request->getinfo();\n $this->status = isset($info['http_code']) ? $info['http_code'] : null;\n\n $request->close();\n }", "function post_files($url,$file) {\n // path to a file. $files can be array (multiple) or string (one file).\n // Data will be posted in a series of POST vars named $file0, $file1...\n // $fileN\n $data=array();\n $data['uploadedfile']=\"@\".$file;\n \n\t$ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data); \n $response = curl_exec($ch);\n return $response;\n}", "function do_curl($url, $data_arr=NULL, $tierionHeaderArray=[])\n{\n\t$ch = curl_init($url);\n\n\t$headers = $tierionHeaderArray;\n\t// curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)');\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\n\tif ($data_arr != NULL) {\n\t\t$headers = array_merge(array('Content-Type: application/json'), $headers);\n\t\t$data_string = json_encode($data_arr);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);\n\t}\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\n\tob_start(); // prevent any output\n\treturn curl_exec($ch); // Execute the Curl Command\n\tob_end_clean(); // stop preventing output\n\tcurl_close($ch);\n}", "function postRequest( $url, $fields, $optional_headers = null ) {\n\t\t// http_build_query is preferred but doesn't seem to work!\n\t\t// $fields_string = http_build_query($fields, '', '&', PHP_QUERY_RFC3986);\n\t\t\n\t\t// Create URL parameter string\n\t\tforeach( $fields as $key => $value )\n\t\t\t$fields_string .= $key.'='.$value.'&';\n\t\t\t\n\t\t$fields_string = rtrim( $fields_string, '&' );\n\n//\t\techo \"controlKey.php : postRequest() : URL = $url\";\n//\t\techo \"controlKey.php : postRequest() : Fields_string = $fields_string\";\n\t\t\n\t\t$ch = curl_init( $url );\n\t\tcurl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\tcurl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE);\n\t\tcurl_setopt( $ch, CURLOPT_POST, count( $fields ) );\n\t\tcurl_setopt( $ch, CURLOPT_POSTFIELDS, $fields_string );\n\t\t\n\t\t$result = curl_exec( $ch );\n\t\t\n\t\tcurl_close( $ch );\n\t}", "function push_temp() \n{\n // Work out the data\n $data = [\"temp\" => read_temperater()];\n \n $posts = http_build_query($data);\n // echo $posts;\n $ch = curl_init(\"http://caychoivang.vn/ftp/controller/read_temp.php\");\n // set URL and other appropriate options\n \n curl_setopt($ch, CURLOPT_POST, TRUE); \n curl_setopt($ch, CURLOPT_POSTFIELDS, $posts);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n $rp = curl_exec($ch);\n curl_close($ch);\n print_r($rp);\n}", "function curl_method(&$curl, $method = 'GET') {\n return curl_option($curl, CURLOPT_CUSTOMREQUEST, $method);\n}" ]
[ "0.74248385", "0.73709", "0.70078194", "0.7000821", "0.68916005", "0.6826317", "0.66516083", "0.6621654", "0.6482398", "0.6476909", "0.64677167", "0.64155525", "0.6401605", "0.6348873", "0.6298275", "0.6264946", "0.6258797", "0.6248524", "0.62175065", "0.6212284", "0.6184426", "0.6172987", "0.615961", "0.6158738", "0.6133364", "0.6129736", "0.61218405", "0.6119106", "0.60967773", "0.60835993", "0.6075913", "0.6065558", "0.606046", "0.60360646", "0.6036009", "0.60222983", "0.6016538", "0.601157", "0.6006359", "0.6004298", "0.5999239", "0.59872705", "0.5984846", "0.5979528", "0.5975655", "0.5972702", "0.5969268", "0.5960947", "0.5960073", "0.59491664", "0.5943116", "0.5930092", "0.5930085", "0.59198815", "0.5912265", "0.5894766", "0.58894604", "0.5855523", "0.5853575", "0.584728", "0.5839406", "0.5835561", "0.5824975", "0.58098274", "0.57930785", "0.57824117", "0.5774695", "0.5772484", "0.57584244", "0.57565486", "0.5754292", "0.5747142", "0.57413036", "0.5702315", "0.5701928", "0.56943095", "0.56745476", "0.56700814", "0.5655328", "0.56498295", "0.5648103", "0.56458175", "0.5639231", "0.56382746", "0.5624152", "0.5613079", "0.5612909", "0.55734384", "0.55712956", "0.5570625", "0.5567778", "0.55632627", "0.55580133", "0.555619", "0.55535287", "0.5552336", "0.5547439", "0.55469877", "0.5539455", "0.55391383" ]
0.67249846
6
Determine if the given feature is enabled.
public static function enabled(string $feature): bool { return in_array($feature, config('socialstream.features', [])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_feature_enabled( $feature ) {\n\treturn FeatureFlags::get_instance()->flag_enabled( $feature );\n}", "function ff_is_feature_enabled( $feature )\n\t{\n\t\tff_FeatureFlags::getInstance()->getFeature( $feature )->isEnabledForUser();\n\t}", "public function isEnabled( $feature )\n {\n return @$this->features[ $feature ];\n }", "public function enabled($feature): bool\n {\n $value = $this->value($feature);\n\n if (is_null($value)) {\n return false;\n }\n\n // If value is one of the positive words configured then the\n // feature is enabled.\n if (in_array(strtoupper($value), config('subscriptions.positive_words'))) {\n return true;\n }\n\n return false;\n }", "public function isEnabled($feature) {\n\t\t$section = $this->getValue($feature);\n\n\t\tif(is_array($section)) {\n\t\t\tif(array_key_exists('enable', $section)) {\n\t\t\t\t$value = $section['enable'];\n\t\t\t} elseif(array_key_exists('enabled', $section)) {\n\t\t\t\t$value = $section['enabled'];\n\t\t\t}\n\t\t} else {\n\t\t\t$value = $this->getValue($feature . '_enable');\n\n\t\t\tif(is_null($value)) {\n\t\t\t\t$value = $this->getValue($feature . '_enabled');\n\t\t\t}\n\t\t}\n\n\t\tif(!is_null($value)) {\n\t\t\tif($value === 1) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif($value === true) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif(is_string($value)) {\n\t\t\t\tswitch(strtolower($value)) {\n\t\t\t\t\tcase '1':\n\t\t\t\t\tcase 'enable':\n\t\t\t\t\tcase 'enabled':\n\t\t\t\t\tcase 'on':\n\t\t\t\t\tcase 'true':\n\t\t\t\t\tcase 'yes':\n\t\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 isEnabledByDefault($feature)\n {\n $f = $this->getFeature($feature);\n if ($f == null) return false;\n\n if ($this->storage) {\n $enabled = $this->storage->getFeatureEnabled($feature);\n if ($enabled !== null) return $enabled;\n }\n\n return $f->isEnabled();\n }", "public function canUse($feature): bool\n {\n // Get features and usage\n $value = $this->value($feature);\n\n if (is_null($value)) {\n return false;\n }\n\n // Match \"bool\" type value\n if ($this->enabled($feature) === true) {\n return true;\n }\n\n // If the feature value is zero, let's return false\n // since there's no uses available. (useful to disable\n // countable features)\n if ($value === '0') {\n return false;\n }\n\n // Check for available uses\n return $this->remainings($feature) > 0;\n }", "public function supports($feature) { return true; }", "public function hasFeature($feature);", "function stage_is_feature_active($feature)\n{\n return stage_string_to_bool(stage_get_fallback('features' . '.' . $feature . '.' . 'activate'));\n}", "public function isFeatureEnabled($featureName)\n { \n // first make sure shoptimally is generally enabled\n if (!$this->getIsEnabled())\n {\n return false;\n }\n \n // get user data\n $userData = Mage::helper('shoptimally_core/clientData');\n \n // make sure we have valid user id\n $userId = $userData->getUserId();\n if (empty($userId))\n {\n return false;\n }\n \n // now check from features list from the user cookie\n // this will give us the input from the server + the AB testing\n return in_array($featureName, $userData->getEnabledFeatures());\n }", "public function hasFeature(){\n return true;\n }", "public function isEnabled($feature)\n {\n $f = $this->getFeature($feature);\n if ($f == null) return false;\n\n if ($this->state && $f->canChange()) {\n $enabled = $this->state->getFeatureEnabled($feature);\n if ($enabled !== null) return $enabled;\n }\n\n return $this->isEnabledByDefault($feature);\n }", "public static function isFeatureActive()\n {\n }", "private function isFeature($feature)\n\t{\n\t\treturn in_array($feature, self::$features_list);\n\t}", "public function isEnabled( $feature, $user = null )\n {\n if( isset( $this->map[ $feature ] ) )\n {\n if( is_bool( $this->map[ $feature ] ) )\n return $this->map[ $feature ];\n\n return (bool) $this->map[ $feature ];\n }\n\n return false;\n }", "public function hasFeature($feature)\n {\n return $this->{'is' . app(Str::class)->studly($feature)}();\n }", "public function requireFeatures(int $feature): bool {}", "public function isEnabled()\n {\n if ((string)$this->global->enabled === \"1\") {\n return true;\n }\n return false;\n }", "public static function canAccess ($feature)\n {\n return in_array($feature, self::getFeatures());\n }", "public function hasFeature($feature) {\n\t\t// checking if we got feature ID instead of object for backwards compatibility\n\t\tif (is_int($feature)) {\n\t\t\t$feature = Feature::getByID($feature);\n\t\t}\n\n\t\treturn $feature->isEnabledForAccount($this);\n\t}", "public function isEnabled()\n {\n\t\tif($this->actif == 1) return true;\n \telse return false;\n }", "public function hasFeature ($feature, $version) {}", "public function isEnabled() {\n\t\treturn $this->_runtime['enabled'];\n\t}", "public function isEnabled()\n {\n return $this->_helperData->isEnabled();\n }", "public function isEnabled() : bool {\n\n\t\t\treturn $this->enabled;\n\t\t}", "public function get_enabled() {\n $enabled = get_post_meta( $this->post_id, '_wcs_enabled', true );\n $enabled_exists = metadata_exists( 'post', $this->post_id, '_wcs_enabled' );\n\n // Metadata doesn't exist yet so we assume it's enabled\n if ( ! $enabled_exists ) {\n return true;\n }\n\n return $enabled === 'yes';\n }", "public function isEnabled()\n {\n return $this->helper->isEnabled();\n }", "private function isEnabled()\n {\n return $this->getConfigBool('enable', false);\n }", "public static function isEnabled(): bool\n {\n return self::$enabled;\n }", "public function isEnabled(): bool\n\t{\n\t\treturn $this->enabled;\n\t}", "function braincert_supports($feature) {\n $feature = array(FEATURE_GROUPS, FEATURE_GROUPINGS, FEATURE_GROUPMEMBERSONLY, FEATURE_MOD_INTRO,\n FEATURE_COMPLETION_TRACKS_VIEWS, FEATURE_COMPLETION_HAS_RULES, FEATURE_GRADE_HAS_GRADE,\n FEATURE_GRADE_OUTCOMES, FEATURE_BACKUP_MOODLE2\n );\n if (in_array($feature, $feature)) {\n return true;\n }\n return null;\n}", "public static function is_enable() {\n\t\treturn true;\n\t}", "public static function is_enabled() {\n\t\tif (self::$enabled) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function isFeatureActive( $pFeatureName ) {\n\t\t$ret = FALSE;\n\t\tif( $pFeatureName ) {\n\t\t\t$featureValue = $this->getConfig($pFeatureName);\n\t\t\t$ret = !empty( $featureValue ) && ( $featureValue != 'n' );\n\t\t}\n\n\t\treturn( $ret );\n\t}", "public static function isEnabled()\n {\n return self::get('is_enabled', false);\n }", "protected function isEnabled() {\n\t\treturn (\n\t\t\t$this->getPageService()->isEnabled() &&\n\t\t\t(bool) $this->getTypoScriptService()->resolve('settings.enable')\n\t\t);\n\t}", "public function isEnabled()\n {\n return (int)$this->getIsEnabled() === self::STATUS_ENABLED;\n }", "public function isEnabled()\n\t{\n\t\t// note: don't use $this->_main->.. as it might not exist when this func is called.\n\t\treturn Mage::helper('shoptimally_upsalecoupons/main')->isEnabled();\n\t}", "public function getIsEnabled()\n {\n return $this->helper->isEnabled();\n }", "public function _isEnable(){\n return true;\n if(!array_key_exists('enable', $this->moduleConfig)) return false;\n return $this->moduleConfig['enable'];\n }", "public function isEnabled(): bool\n {\n return $this->enabled;\n }", "public static function isEnabled()\n {\n return self::$enabled;\n }", "public static function isEnabled()\n {\n return self::$enabled;\n }", "public function isEnabled()\n {\n return $this->profiler['enabled'];\n }", "function tquiz_supports($feature) {\n switch($feature) {\n case FEATURE_MOD_INTRO: return true;\n case FEATURE_SHOW_DESCRIPTION: return true;\n\t\tcase FEATURE_BACKUP_MOODLE2: return true;\n\n default: return null;\n }\n}", "public static function isEnabled() {\n return self::$enabled;\n }", "function tab_supports($feature) {\n switch ($feature) {\n case FEATURE_IDNUMBER:\n return false;\n case FEATURE_GROUPS:\n return false;\n case FEATURE_GROUPINGS:\n return false;\n case FEATURE_MOD_INTRO:\n return true;\n case FEATURE_COMPLETION_TRACKS_VIEWS:\n return true;\n case FEATURE_GRADE_HAS_GRADE:\n return false;\n case FEATURE_GRADE_OUTCOMES:\n return false;\n case FEATURE_MOD_ARCHETYPE:\n return MOD_ARCHETYPE_RESOURCE;\n case FEATURE_BACKUP_MOODLE2:\n return true;\n\n default:\n return null;\n }\n}", "public function isEnabled()\n {\n return $this->config->isEnabled();\n }", "function contactmod_supports($feature) {\n switch($feature) {\n case FEATURE_MOD_INTRO: return false;\n case FEATURE_SHOW_DESCRIPTION: return false;\n\t\tcase FEATURE_IDNUMBER: return false;\n case FEATURE_GROUPS: return false;\n case FEATURE_GROUPINGS: return false;;\n\t\tcase FEATURE_MOD_ARCHETYPE: return MOD_ARCHETYPE_RESOURCE;\n\t\t\n default: return null;\n }\n}", "public function is_powered_by_enabled() {\n\t\t$enabled = get_option( 'algolia_powered_by_enabled', 'yes' );\n\n\t\treturn 'yes' === $enabled;\n\t}", "public static function enabled(): bool\n {\n return static::$_enabled;\n }", "public function isEnabled(): bool\n\t{\n\t\treturn ($this->disabled_at === null);\n\t}", "public function is_enableable();", "public function hasFeature (string $flag) : bool\n\t{\n\t\treturn $this->getFlags()[$flag] ?? false;\n\t}", "function newsslider_supports($feature) {\n switch($feature) {\n case FEATURE_MOD_ARCHETYPE: return MOD_ARCHETYPE_RESOURCE;\n case FEATURE_GROUPS: return false;\n case FEATURE_GROUPINGS: return false;\n case FEATURE_MOD_INTRO: return true;\n case FEATURE_COMPLETION_TRACKS_VIEWS: return true;\n case FEATURE_GRADE_HAS_GRADE: return false;\n case FEATURE_GRADE_OUTCOMES: return false;\n case FEATURE_BACKUP_MOODLE2: return false;\n //case FEATURE_SHOW_DESCRIPTION: return true;\n\n default: return null;\n }\n}", "public function is_enabled() {\n $settings = get_option('woocommerce_enda_bundle_rate_settings');\n return $settings['enabled'] == 'yes' ? true : false;\n }", "public function hasEnabled()\n {\n return $this->enabled !== null;\n }", "function vitero_supports($feature) {\n\n if (defined('FEATURE_MOD_PURPOSE')) {\n // Only defined in M4.0+.\n if ($feature === FEATURE_MOD_PURPOSE) {\n return MOD_PURPOSE_COMMUNICATION;\n }\n }\n\n switch ($feature) {\n case FEATURE_MOD_INTRO:\n return true;\n case FEATURE_BACKUP_MOODLE2:\n return true;\n case FEATURE_SHOW_DESCRIPTION:\n return true;\n default:\n return null;\n }\n}", "function flashcard_supports($feature) {\n switch($feature) {\n case FEATURE_GROUPS: {\n return true;\n }\n case FEATURE_GROUPINGS: {\n return false;\n }\n case FEATURE_GROUPMEMBERSONLY: {\n return false;\n }\n case FEATURE_MOD_INTRO: {\n return true;\n }\n case FEATURE_COMPLETION_TRACKS_VIEWS: {\n return true;\n }\n case FEATURE_COMPLETION_HAS_RULES: {\n return true;\n }\n case FEATURE_GRADE_HAS_GRADE: {\n return false;\n }\n case FEATURE_GRADE_OUTCOMES: {\n return false;\n }\n case FEATURE_RATE: {\n return false;\n }\n case FEATURE_BACKUP_MOODLE2: {\n return true;\n }\n case FEATURE_SHOW_DESCRIPTION: {\n return true;\n }\n\n default: {\n return null;\n }\n }\n}", "public function isEnabled()\n {\n return $this->boolValue('tracing.enabled', true);\n }", "public function checkFeatureImplemented();", "public function getIsEnabled()\n {\n if (array_key_exists(\"isEnabled\", $this->_propDict)) {\n return $this->_propDict[\"isEnabled\"];\n } else {\n return null;\n }\n }", "public function getIsEnabled()\n {\n if (array_key_exists(\"isEnabled\", $this->_propDict)) {\n return $this->_propDict[\"isEnabled\"];\n } else {\n return null;\n }\n }", "public function getIsEnabled()\n {\n if (array_key_exists(\"isEnabled\", $this->_propDict)) {\n return $this->_propDict[\"isEnabled\"];\n } else {\n return null;\n }\n }", "protected function should_load_feature() {\n\t\tif ( ! defined( 'ELEMENTOR_VERSION' ) ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function is_enabled(){\n\t\treturn !!$this->_enabled;\n\t}", "public function hasFeature(string $featureCode){\n $feature = $this->features()->code($featureCode)->first();\n\n if (!$feature) {\n return false;\n }\n\n return true;\n }", "public function is_enabled() {\n\t\t\t$enabled = get_option( $this->_plugin_prefix . '_enabled' );\n\t\t\tif ( $enabled == 1 ) {\n\t\t\t\t$enabled = true;\n\t\t\t} else {\n\t\t\t\t$enabled = false;\n\t\t\t}\n\t\t\treturn $enabled;\n\t\t}", "public function is_enabled() {\n\n\t\t// Check if debug is on\n\t\tif ( 'on' === $this->settings->get_option( 'debug' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function bookking_supports($feature) {\n switch($feature) {\n case FEATURE_GROUPS: return true;\n case FEATURE_GROUPINGS: return true;\n case FEATURE_GROUPMEMBERSONLY: return true;\n case FEATURE_MOD_INTRO: return true;\n case FEATURE_COMPLETION_TRACKS_VIEWS: return false;\n case FEATURE_GRADE_HAS_GRADE: return true;\n case FEATURE_GRADE_OUTCOMES: return false;\n case FEATURE_BACKUP_MOODLE2: return true;\n\n default: return null;\n }\n}", "public function isEnabled()\n {\n return $this->status == 1;\n }", "public function is_enabled() : Bool\n\t{\n\t\treturn $this->_enabled;\n\t}", "public function isEnabled()\n {\n return $this->enabled;\n }", "public function isEnabled()\n {\n return $this->enabled;\n }", "public function isEnabled()\n {\n return $this->enabled;\n }", "public function isEnabled()\n {\n return $this->enabled;\n }", "public function isEnabled()\n {\n return $this->enabled;\n }", "public static function isLockedFeature()\n\t{\n\t\tif (ModuleManager::isModuleInstalled('bitrix24'))\n\t\t{\n\t\t\t$checkFeature = Manager::checkFeature(\n\t\t\t\tManager::FEATURE_ENABLE_ALL_HOOKS,\n\t\t\t\t['hook' => 'headblock']\n\t\t\t);\n\t\t\tif ($checkFeature)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$dateCreate = \\Bitrix\\Main\\Config\\Option::get(\n\t\t\t\t'main', '~controller_date_create'\n\t\t\t);\n\t\t\t// for all portals early than 01.07.2019, feature are available\n\t\t\tif ($dateCreate < 1562000000)\n\t\t\t{\n\t\t\t\t// this option will be set after downgrade in bitrix24\n\t\t\t\treturn Manager::getOption('html_disabled', 'N') == 'Y';\n\t\t\t}\n\t\t\telse\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 isEnabled($svc) {\r\n return !empty($this->enabled[$svc]);\r\n }", "public function isEnabled()\r\n {\r\n return $this->enabled;\r\n }", "public function isEnabled()\r\n {\r\n return $this->enabled;\r\n }", "public function isEnabled(): bool;", "public function isEnabled(): bool;", "public function isEnabled(): bool;", "protected static function isThemeFeature($feat) {\n global $_wp_theme_features;\n if (isset($_wp_theme_features[$feat])) {\n return true;\n }\n return false;\n }", "function onlyoffice_supports(string $feature) {\n switch ($feature) {\n case FEATURE_SHOW_DESCRIPTION:\n case FEATURE_BACKUP_MOODLE2:\n case FEATURE_COMPLETION_TRACKS_VIEWS:\n case FEATURE_MOD_INTRO:\n case FEATURE_GROUPINGS:\n case FEATURE_GROUPS:\n return true;\n case FEATURE_GRADE_OUTCOMES:\n case FEATURE_GRADE_HAS_GRADE:\n return false;\n default:\n return null;\n }\n}", "public function isEnabledInSystem()\r\n\t{\r\n\t\t// Get global vars\r\n\t\tglobal $realtime_webservice_global_enabled;\r\n\t\t// If both vars have a value, then it IS enabled\r\n\t\treturn $realtime_webservice_global_enabled;\r\n\t}", "public function isEnabled(): bool\n {\n return config('theme-system.enable', true) ?? true;\n }", "public function isModuleEnable()\n {\n return $this->helperData->getEnabled();\n }", "public function hasFeatures(){\n return $this->_has(1);\n }", "function isEnabled();", "function isEnabled();", "public function is_enabled() {\n $enabled = file_exists(ABSPATH . '!sak4wp.php');\n return $enabled;\n }", "public static function enabled()\n {\n return (extension_loaded('apc') && ini_get('apc.enabled')) ? true : false;\n }", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();", "public function isEnabled();" ]
[ "0.84168607", "0.8161005", "0.7995348", "0.786733", "0.7778459", "0.73978007", "0.7323293", "0.72723925", "0.72476023", "0.71419555", "0.71362716", "0.71145093", "0.6998007", "0.69842726", "0.6958498", "0.69311655", "0.6926787", "0.6860522", "0.68312275", "0.6808578", "0.6699876", "0.66891015", "0.6647525", "0.66202444", "0.6614865", "0.66052234", "0.6583604", "0.65760756", "0.65637404", "0.651652", "0.6481266", "0.6478398", "0.6458005", "0.64553595", "0.64501154", "0.6437442", "0.6428423", "0.6422738", "0.64226985", "0.642104", "0.6420721", "0.63976216", "0.6391253", "0.6391253", "0.6390291", "0.63891584", "0.6371658", "0.6365334", "0.6346666", "0.63466007", "0.63422", "0.63417673", "0.63313127", "0.63299394", "0.6326886", "0.63217753", "0.6318478", "0.63123226", "0.63123", "0.6303402", "0.6300539", "0.62932396", "0.629234", "0.629234", "0.629234", "0.62825996", "0.62805724", "0.627866", "0.62768507", "0.6270309", "0.6268786", "0.6265434", "0.625805", "0.6254738", "0.6254738", "0.6254738", "0.6254738", "0.6254738", "0.62544143", "0.6253734", "0.624976", "0.624976", "0.62472236", "0.62472236", "0.62472236", "0.62470126", "0.62261623", "0.6218742", "0.62184113", "0.62154853", "0.6214743", "0.6210549", "0.6210549", "0.6162541", "0.61543953", "0.61513215", "0.61513215", "0.61513215", "0.61513215", "0.61513215" ]
0.780182
4
Determine if the application has the generates missing emails feature enabled.
public static function generatesMissingEmails(): bool { return static::enabled(static::generateMissingEmails()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isEmailDisabled()\n {\n return !Mage::getStoreConfigFlag('markdown/markdown/enable_email');\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 }", "public static function generateMissingEmails(): string\n {\n return 'generate-missing-emails';\n }", "function air_helper_mail_delivery_check() {\n if ( class_exists( 'Mailgun' ) && getenv( 'MAILGUN_API_KEY' ) && ( defined( 'MAILGUN_USEAPI' ) && MAILGUN_USEAPI ) ) {\n return true;\n }\n\n // SendGrid for legacy support.\n if ( class_exists( 'Sendgrid_Tools' ) && getenv( 'SENDGRID_API_KEY' ) ) {\n return true;\n }\n\n // Do not show the notice in dev.\n if ( 'development' === wp_get_environment_type() ) {\n return true;\n }\n\n add_action( 'admin_notices', 'air_helper_mail_delivery_not_configured_notice' );\n return false;\n}", "private function checkEmailSettings(): bool\n {\n return (is_array($this->properties['mail_recipients']) || is_array($this->properties['mail_bcc']));\n }", "public function should_send_email() {\n\t\t$options = get_option( 'mylisting_notifications', [] );\n\t\t$notification = $this->get_key();\n\t\t$should_send = true;\n\n\t\tif ( isset( $options[ $notification ], $options[ $notification ]['send_email'] ) && $options[ $notification ]['send_email'] === 'disabled' ) {\n\t\t\t$should_send = false;\n\t\t}\n\n\t\treturn apply_filters( sprintf( 'mylisting/emails/%s:enabled', $notification ), $should_send );\n\t}", "public static function isBrokenEmailEnvironment() {}", "public function hasEmail() {\n return $this->_has(4);\n }", "protected function useEmailNotifications()\n {\n return true;\n }", "protected function useEmailNotificationsDeduplication()\n {\n return false;\n }", "protected function isMailMode() {\n return ($this->mode == Notification_NotificationTemplate::MODE_MAIL);\n }", "protected function shouldSendEmail(): bool\r\n {\r\n return $this->sendEmail === Boolean::YES;\r\n }", "public function _isEnabledShipmentsEmail()\r\n {\r\n return ($this->scopeConfig->getValue(self::EMAIL_SHIPMENTS)) ? true:false ;\r\n }", "public function isEnableAdminEmail ()\n {\n return $this->scopeConfig->isSetFlag(\n 'b2bregistration/admin_notification/admin_notification_enable',\n ScopeInterface::SCOPE_STORE\n );\n }", "public function canSend()\n {\n $flag = intval(setting(\"mail_notify_{$this->getTemplateTag()}\"));\n\n return !!$flag;\n }", "protected function isMailingEnabled()\n {\n if ($this->user->email === \"\") {\n return false;\n }\n return true;\n }", "public function _isEnabledInvoiceEmail()\r\n {\r\n return ($this->scopeConfig->getValue(self::EMAIL_INVOICE)) ? true:false ;\r\n }", "public function isSendmail() {\n\t\t$this->getSendmail();\n\t}", "public function isSendmail()\n {\n }", "public function getIsEmailHeaderEnabled(): bool;", "public function isAutoNotifyEnabled()\n {\n return (Mage::getStoreConfig('easywebshopsms/abandoned_notifications/auto_notify_enable')==0) ? false : true;\n }", "public function isUsingMailList()\n\t{\n\t\treturn !empty($this->_modSettings['maillist_enabled']) && !empty($this->_modSettings['pbe_post_enabled']);\n\t}", "public function isEmailRegistered()\n {\n return $this->isEmailAvailable($this->getEmailAddress());\n\n }", "public function hasTestEmailError()\n {\n return '' !== (string)\\XLite\\Core\\Session::getInstance()->test_email_error;\n }", "function erp_is_smtp_enabled() {\n $erp_email_smtp_settings = get_option( 'erp_settings_erp-email_smtp', [] );\n\n if ( isset( $erp_email_smtp_settings['enable_smtp'] ) && filter_var( $erp_email_smtp_settings['enable_smtp'], FILTER_VALIDATE_BOOLEAN ) ) {\n return true;\n }\n\n return false;\n}", "public function hasEmailAddress()\n {\n return $this->_hasVar('user_email') && $this->_getVar('user_email');\n }", "public function hasPregeneratedKeysExported()\n {\n return $this->pregenerated_keys_exported !== null;\n }", "public function checkEMailSettings ()\n {\n if (self::$cms_type == 'BlackCat') {\n return ((CATMAILER_ROUTINE == 'smtp') && (CATMAILER_SMTP_USERNAME != '') && (CATMAILER_SMTP_PASSWORD != ''));\n }\n else {\n return ((WBMAILER_ROUTINE == 'smtp') && (WBMAILER_SMTP_USERNAME != '') && (WBMAILER_SMTP_PASSWORD != ''));\n }\n }", "private static function canRemoveEmail() {\n\t\treturn\n\t\t\tRights::hasRight(Right::getByName('Premanager', 'registerWithoutEmail'));\n\t}", "public function getMailboxes()\r\n\t{\r\n\t\treturn false;\r\n\t}", "static public function isMailServerUsed()\r\n {\r\n $cfgMailSrvService = Warecorp_Config_Loader::getInstance()->getAppConfig('cfg.instance.xml')->{'mailsrv'};\r\n return $cfgMailSrvService->use && ( $cfgMailSrvService->use == 1 || $cfgMailSrvService->use == 'true' );\r\n }", "public function hasPromotionalEmailOptOut() {\n\t\treturn $this->promotionalEmailOptOut;\n\t}", "public function isCheckEmail()\n {\n if( (!$this -> zgloszePozniej) && ($this -> emailAtt2User == '') ) :\n return false;\n endif;\n return true;\n }", "public function hasNotifications()\n {\n return count($this->notifications) > 0;\n }", "public function effectively_installed()\n {\n return isset($this->config['oxcom_phpbbch_format_only']);\n }", "public function isEmailVerification()\n {\n if (strtolower($this->CI->preferences->type('system')->item('users_emailVerification')) == 'optional') {\n return true;\n } else {\n if ($this->isEmailVerified()) {\n return true;\n } else {\n return false;\n }\n }\n }", "private function canRun()\n {\n if (!$this->apiConfig->isAutoInvoiceEnabled()) {\n return false;\n }\n if (!$this->apiConfig->isEnabled()) {\n return false;\n }\n\n return true;\n }", "function checkRequirements(){\n\t\n\t// IMAP is needed\n\tif(function_exists('imap_open') && function_exists('mail')){ return true; }\n\t\n\t// everything looks good!\n\treturn false;\n}", "public function isEnableCustomerEmail ()\n {\n return $this->scopeConfig->isSetFlag(\n 'b2bregistration/email_setting/customer_email_enable',\n ScopeInterface::SCOPE_STORE\n );\n }", "public function getUseDestinationConfirmMail() : bool\n\t{\n\t\treturn $this->useDesinationConfirmMail;\n\t}", "public function hasPregeneratedKeysAvailable()\n {\n return $this->pregenerated_keys_available !== null;\n }", "public function isMail()\n {\n }", "public function verifyEmail()\n {\n return $this->getBoolean('verify_email');\n }", "public function getUseCertifiedMailMail() : bool\n\t{\n\t\treturn $this->useCertifiedMail;\n\t}", "public static function isConfigured()\n {\n return !(bool) (empty(self::applicationId()) || empty(self::apiKey()));\n }", "public function is_email() {\n return $this->is_email;\n }", "public function isNewsletterPopUpEnable() \n {\n return (bool) Mage::getStoreConfig(self::XML_PATH_ENABLE);\n }", "protected function usersEmailNotVerified()\n\t{\n\t\tif ( !$this->user->email_verified ) {\n\t\t\t$this->setError('Users email not verified.', 403);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function hasPregeneratedKeysUsed()\n {\n return $this->pregenerated_keys_used !== null;\n }", "public function hasContactEmail() {\n\t\treturn $this->contactEmail !== null;\n\t}", "protected function should_show_notification() {\n\t\t// Don't show a notification if the indexing has already been started earlier.\n\t\tif ( $this->indexing_helper->get_started() > 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Never show a notification when nothing should be indexed.\n\t\treturn $this->indexing_helper->get_filtered_unindexed_count() > 0;\n\t}", "public function hasEmail(): bool;", "public function getPhraseDetectEmail() {\n\n return (bool) $this->phrase_detect_email;\n\n }", "protected function isSetup(){\n \treturn isset($GLOBALS['setup']);\n }", "protected function _checkSendEmail()\n {\n // get the last shipment time\n $shipment = Mage::getResourceModel('sales/order_shipment_collection')\n ->addAttributeToSelect('created_at')\n ->addAttributeToFilter('store_id', $this->_storeId)\n ->setOrder('created_at', 'DESC')\n ->setPageSize(1)\n ->setCurPage(1);\n\n if ($shipment->count() != 0) {\n $lastShipment = $shipment->getFirstItem();\n $shipmentTime = $lastShipment->getCreatedAt();\n\n if ($shipmentTime) {\n return $this->_helper->checkAddAlert(\n $shipmentTime,\n $this->_helper->getConfig(\n NoShipmentsAlert_Helper_Data::PATH_ALERT_TIME,\n $this->_storeId\n ),\n NoShipmentsAlert_Helper_Data::ALERT_TYPE,\n $this->_storeId\n );\n }\n } else {\n // no records exist check monitor start date in config\n // to determine if an alert should be sent\n $startDate = $this->_helper->getConfig(\n NoShipmentsAlert_Helper_Data::PATH_START_DATE,\n $this->_storeId\n );\n if ($startDate) {\n return $this->_helper->checkAddAlert(\n $startDate,\n $this->_helper->getConfig(\n NoShipmentsAlert_Helper_Data::PATH_ALERT_TIME,\n $this->_storeId\n ),\n NoShipmentsAlert_Helper_Data::ALERT_TYPE,\n $this->_storeId\n );\n }\n }\n\n return false;\n }", "function has_altis_config() : bool {\n\tif ( ! function_exists( 'Altis\\\\get_config' ) ) {\n\t\treturn false;\n\t}\n\n\tif ( ! isset( Altis\\get_config()['hm-juicer'] ) ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "protected function getExtraInstallment()\n {\n return false;\n }", "protected function accountNotLinkedToAnyApp(): bool\n {\n report(AccountNotLinkedToAnyApp::create($this));\n\n return false;\n }", "protected function needsEncoding(): bool\n {\n $emailFormat = $this->format();\n\n if (($emailFormat === 'text' || $emailFormat === 'both') and mb_check_encoding($this->textMessage, 'ASCII') === false) {\n return true;\n }\n if (($emailFormat === 'html' || $emailFormat === 'both') and mb_check_encoding($this->htmlMessage, 'ASCII') === false) {\n return true;\n }\n\n return false;\n }", "public function can_auto_create_users() {\n return (bool)$this->config['weautocreateusers'];\n }", "public function isAutocreateNotification()\n {\n return (1 == $this->getConfig('autocreate/autocreate_notify'));\n }", "public function hasAppid()\n {\n return $this->appid !== null;\n }", "public function hasAppid()\n {\n return $this->appid !== null;\n }", "public function hasAppid()\n {\n return $this->appid !== null;\n }", "public function checkSettings() {\n try {\n $response = $this->getMailingLists();\n if (!empty($response->error)) {\n return $response->error;\n }\n\n if ($this->response_code != 200) {\n return \"An error occurred. Code {$this->response_code}, reponse: \" . var_export($this->response_body, TRUE) . \".\";\n }\n }\n catch (MailerException $e) {\n return $e->getMessage();\n }\n\n return TRUE;\n }", "public function isSetup()\n\t{\n\t\treturn $this->fileExists($this->rocketeer->getFolder('current'));\n\t}", "function testDebugDoNotEmail() {\n Debug::$enable_send = false;\n $this->assertFalse(Debug::sendEmail());\n }", "public function isSetupRequired()\n {\n $methodCodes = Mage::getConfig()->getNode('global/payment/setup_required')->asArray();\n if (is_array($methodCodes) && count($methodCodes) > 0) {\n foreach (array_keys($methodCodes) as $methodCode) {\n $methodModel = Mage::getConfig()->getNode('default/payment/' . (string) $methodCode . '/model');\n if ($methodModel) {\n $model = Mage::getModel($methodModel);\n if ($model && method_exists($model, 'isAvailable') && $model->isAvailable()) {\n return true;\n }\n }\n }\n }\n\n return false;\n }", "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 isAppEventEnabled()\n {\n return true;\n }", "public function is_mailer_complete() {\n\n\t\tif ( ! $this->is_php_compatible() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$auth = new Auth();\n\n\t\tif (\n\t\t\t$auth->is_clients_saved() &&\n\t\t\t! $auth->is_auth_required()\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function testEmailNotAvailable()\n {\n $user = factory(User::class)->create();\n $this->assertFalse(User::isEmailAvailable($user->email));\n }", "public function is_email_sent() {\n\n\t\t$is_sent = false;\n\n\t\tif ( method_exists( $this->response, 'getId' ) ) {\n\t\t\t$message_id = $this->response->getId();\n\t\t\tif ( ! empty( $message_id ) ) {\n\t\t\t\t$is_sent = true;\n\t\t\t}\n\t\t}\n\n\t\t// Clear debug messages if email is successfully sent.\n\t\tif ( $is_sent ) {\n\t\t\tDebug::clear();\n\t\t}\n\n\t\treturn $is_sent;\n\t}", "public function checkIfEssentialConfigurationExists() {}", "function is_system_configured() {\n global $CFG;\n return (!empty($CFG->ombielalertsserverendpoint) && \n !empty($CFG->ombielalertsserversserverusername) && \n !empty($CFG->ombielalertsserverpassword) && \n !empty($CFG->ombielalertsorgcode) && \n !empty($CFG->ombielalertsorgpassword)\n );\n }", "public function isEnableConfirmations()\r\n {\r\n return $this->enable_confirmations;\r\n }", "public function hasAttachments()\n {\n return !empty($this->_attachments);\n }", "public function reportingEnabled(): bool\n {\n return $this->config['reporting']['enabled'];\n }", "public function getAllowMissingDependencies() : bool\n {\n return $this->allowMissingDependencies;\n }", "public static function is_registration_forced(){\n\t\treturn ( defined('EM_FORCE_REGISTRATION') || self::$force_registration );\n\t}", "public function enableEmailNoRecordExists()\n {\n // Get user mapper\n $userMapper = $this->getUserMapper();\n \n // Check if user mapper is empty\n if (empty($userMapper)) {\n // Throw an exception\n throw new \\RuntimeException(\"User mapper is required, none given.\");\n }\n \n // Attact validator\n return $this->attactEmailValidator('User\\Validator\\NoRecordExists', array(\n 'field' => 'email',\n 'mapper' => $userMapper,\n ));\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}", "private function shouldDisplayMessage()\n\t{\n\t\t// Only on admin app\n\t\tif (!$this->app->isClient('administrator'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only if authenticated\n\t\tif (JFactory::getUser()->guest)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only on HTML documents\n\t\tif ($this->app->getDocument()->getType() !== 'html')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only on full page requests\n\t\tif ($this->app->input->getCmd('tmpl', 'index') === 'component')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only to com_cpanel\n\t\tif ($this->app->input->get('option') !== 'com_cpanel')\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "protected function shouldRun()\n {\n return false === (bool) $this->configurationManager->getConfigurationValueByPath('FE/pageUnavailable_force');\n }", "public function isSMTP()\n {\n }", "public function has_email_template( $recipient = 'customer' ) {\n\t\treturn ( isset( $this->rule_data[ 'email_template_' . $recipient ] ) && ! empty( $this->rule_data[ 'email_template_' . $recipient ] ) ) ? true : false;\n\t}", "public function areRegisterMessagesEnabled() : bool{\n \treturn $this->register_message;\n }", "public function isGenerated()\n\t{\n\t\treturn (!empty($this->hex));\n\t}", "public function isGlobalsDisabled()\n {\n $checking_result = (Bootstrap::getIniParam('register_globals') == true) ? false : true;\n\n if (!$checking_result) {\n App::instance()->setNotification('E', App::instance()->t('error'), App::instance()->t('text_register_globals_notice'), true, 'validator');\n }\n\n return $checking_result;\n }", "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "private function altMessageExist()\n { \n return !empty($this->altMessage);\n }", "protected function checkIfNoConflictingExtensionIsInstalled() {}", "protected function appNotHavingAnyDefaultPlan(): bool\n {\n report(AppNotHavingAnyDefaultPlan::create($this));\n\n return false;\n }", "private function shouldProcess()\n {\n if (count($this->settings['whitelist']) > 0) {\n return in_array($this->templateName, $this->settings['whitelist'], true);\n }\n\n if (count($this->settings['blacklist']) > 0) {\n return !in_array($this->templateName, $this->settings['blacklist'], true);\n }\n\n return true;\n }", "protected function checkMailCanBeSent()\n {\n if (!$this->checkNotificationCanBeSent()) {\n return false;\n }\n\n if (!$this->checkEmailIsValid()) {\n return false;\n }\n\n if (!$this->checkUserExpectsNotification()) {\n return false;\n }\n\n if (!$this->checkMailContent()) {\n return false;\n }\n\n return true;\n }", "public function has_config() {\n return false;\n }", "public function has_config() {\n return false;\n }", "public function isReported()\n\t{\n\t\tif ($this->get('state') == self::APP_STATE_FLAGGED)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static function isInstalled(){\n\t\treturn !empty(\\GO::config()->db_user);\n\t}" ]
[ "0.71139026", "0.6870696", "0.67369413", "0.67016506", "0.67006224", "0.66366494", "0.64906037", "0.6472777", "0.64690715", "0.6412436", "0.63711727", "0.6342583", "0.63164014", "0.6294933", "0.62698305", "0.6261005", "0.62309504", "0.62054235", "0.6147738", "0.6114796", "0.6109941", "0.6099747", "0.60886437", "0.6081781", "0.6005139", "0.59954476", "0.59928536", "0.5966855", "0.5940738", "0.5918562", "0.59131217", "0.5886247", "0.58822626", "0.5862882", "0.58412904", "0.583853", "0.5834685", "0.58337045", "0.580695", "0.5787736", "0.5785227", "0.5781773", "0.57739043", "0.57701355", "0.5754118", "0.57475543", "0.5743633", "0.57012874", "0.5680301", "0.5680144", "0.5674024", "0.5673266", "0.56712914", "0.56567615", "0.5650216", "0.5644217", "0.5621823", "0.5621475", "0.56199294", "0.56195", "0.5614168", "0.56109387", "0.56109387", "0.56109387", "0.56076556", "0.5591452", "0.55789554", "0.5576105", "0.55638504", "0.5547883", "0.5540752", "0.5535074", "0.55321056", "0.55299896", "0.5526042", "0.5523115", "0.5522362", "0.5517324", "0.5516879", "0.55115575", "0.55090314", "0.55040836", "0.5503459", "0.55000544", "0.5492746", "0.54750043", "0.54722536", "0.5462723", "0.54624224", "0.5461492", "0.54598683", "0.54572546", "0.5457011", "0.54525834", "0.5451887", "0.5447029", "0.54443157", "0.54443157", "0.5426554", "0.54144055" ]
0.8474877
0
Determine if the application supports creating accounts when logging in for the first time via a provider.
public static function hasCreateAccountOnFirstLoginFeatures(): bool { return static::enabled(static::createAccountOnFirstLogin()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function canCreateAccounts() {\r\n\t\treturn true;\r\n\t}", "public function canCreateAccounts()\n {\n return false;\n }", "function canCreateAccounts() {\n return false;\n }", "protected function isFirstTimeSetup() {\n // If there are any auth providers, this isn't first time setup, even if\n // we don't have accounts.\n if (PhabricatorAuthProvider::getAllEnabledProviders()) {\n return false;\n }\n\n // Otherwise, check if there are any user accounts. If not, we're in first\n // time setup.\n $any_users = id(new PhabricatorPeopleQuery())\n ->setViewer(PhabricatorUser::getOmnipotentUser())\n ->setLimit(1)\n ->execute();\n\n return !$any_users;\n }", "public static function userCreationAllowed(): bool\n {\n return self::isConfigured(self::ACTION_ADD_USER);\n }", "public function create(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "protected function creatingNewUser() {\n return ($this->request_exists('user_choice') && $this->request('user_choice') == 'new' );\n }", "protected function detectLoginProvider() {}", "public function can_auto_create_users() {\n return (bool)$this->config['weautocreateusers'];\n }", "public function usingSocialAccount()\n {\n return ( ! is_null($this->provider) && ! is_null($this->provider_id) ) ? true : false;\n }", "public function hasPersistentLogin();", "protected function shouldAutoInitiate(): bool\n {\n $socialDrivers = $this->socialAuthService->getActiveDrivers();\n $authMethod = config('auth.method');\n $autoRedirect = config('auth.auto_initiate');\n\n return $autoRedirect && count($socialDrivers) === 0 && in_array($authMethod, ['oidc', 'saml2']);\n }", "public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }", "public static function is_available () {\n\t\t$auth = op5Auth::instance();\n\t\tforeach (AuthModulePool_Model::all() as $module) {\n\t\t\t$driver = $auth->get_auth_driver($module->get_modulename());\n\t\t\tif (\n\t\t\t\t$driver->get_metadata('require_user_configuration') &&\n\t\t\t\t$driver->get_user_count() > 0\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "function get_can_create_user ()\r\n {\r\n return $_SESSION[\"can_create_user\"];\r\n }", "function the_champ_social_login_provider_enabled($provider){\r\n\tglobal $theChampLoginOptions;\r\n\tif(the_champ_social_login_enabled() && isset($theChampLoginOptions['providers']) && in_array($provider, $theChampLoginOptions['providers'])){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public static function user_has_providers()\n {\n $retval = false;\n\n $providers = self::get_providers_of_current_user();\n\n if (count($providers))\n {\n $retval = true;\n }\n\n return $retval;\n }", "function b2c_has_social_login() {\n\treturn ! empty( b2c_get_current_user_auth_provider() );\n}", "function userCanCreateUser( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function loginExists() {\n return (bool) $this->local_account;\n }", "public function getAuthenticationAvailable();", "function allow_create_users() {\n\t\treturn apply_filters( 'import_allow_create_users', true );\n\t}", "protected function needsAuthentication()\n {\n return !empty($this->authType);\n }", "public function canCreate();", "public function canCreate();", "public static function hasLoginOnRegistrationFeatures(): bool\n {\n return static::enabled(static::loginOnRegistration());\n }", "public function userHasCreatePermission(){\n//\t\tif(\\GO\\Base\\Model\\Acl::hasPermission($this->getPermissionLevel(),\\GO\\Base\\Model\\Acl::CREATE_PERMISSION)){\n//\t\t\treturn true;\n//\t\t}else \n\t\tif(\\GO::modules()->isInstalled('freebusypermissions')){\n\t\t\treturn \\GO\\Freebusypermissions\\FreebusypermissionsModule::hasFreebusyAccess(\\GO::user()->id, $this->user_id);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function isActive()\n {\n if (empty($this->authProvider)) {\n return false;\n }\n if ($this->authProvider->getId() == AuthProvider::MAIN_PROVIDER_ID && empty($this->password)) {\n return false;\n }\n\n return true;\n }", "public function canManageCredentials()\n {\n return true;\n }", "function canCreate(){\n\t\t\tif(!isset($_POST['action'])) return false;\n\t\t\tif($_POST['action'] !== 'create_profile') return false;\n\t\t\tif($_POST['profile_folder'] === '') return false;\n\t\t\tif($_POST['profile_name'] === '') return false;\n\t\t\treturn true;\n\t\t}", "protected function is_first_time()\n\t{\n\t\tif ( !get_site_option( 'cur_from' ) && !get_site_option( 'confirm-user-registration' ) ) :\n\t\t\treturn TRUE;\n\t\telse :\n\t\t\treturn FALSE;\n\t\tendif;\n\t}", "public function hasLogin(){\r\n\r\n $auth = new AuthenticationService();\r\n\r\n if ($auth->hasIdentity()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "function accountswitcher_is_installed()\n{\n\tglobal $db;\n\n\tif ($db->field_exists(\"as_uid\", \"users\") && $db->field_exists(\"as_canswitch\", \"usergroups\") && $db->field_exists(\"as_limit\", \"usergroups\"))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "public function authorize()\n {\n return Auth::user() && Auth::user()->hasPermissionTo('create-users');\n }", "public static function allowUserSignUp()\n {\n return false;\n }", "public function create(): bool\n {\n return $this->isAllowed(self::CREATE);\n }", "public function isProviderConfigurationActive($userId, $providerCode);", "public function canCreate(): bool\n {\n if (!$this->hasData('can_create')) {\n $this->setData('can_create', $this->eraseCustomerChecker->canCreate((int) $this->session->getCustomerId()));\n }\n\n return (bool) $this->_getData('can_create');\n }", "public function customerIsAlreadyLoggedIn()\n {\n return (bool)$this->httpContext->getValue(\\Magento\\Customer\\Model\\Context::CONTEXT_AUTH);\n }", "public function isAuth(){\n\t\t$sess = Core::getSingleton(\"system/session\");\n\t\tif( $sess->has(\"account\") ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private function canCreate()\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 hasPasswordBrokerFactory(): bool;", "public function checksocialCustomers()\n {\n $this->setRules([ 'login_type' => 'required|in:normal,fb,google+','email' => 'required|max:100|email','token' => 'required','social_user_id' => 'required','name' => 'required' ]);\n $this->_validate();\n\n $type = ($this->request->login_type == 'fb') ? 'facebook' : (($this->request->login_type == 'google+') ? 'google' : '');\n return $this->registerSocialUser($this->request->all(), $type);\n }", "public function hasProviders(): bool;", "public function authorize()\n {\n return request()->user()->tokenCan('user_create');\n }", "protected function canCreate() {}", "public function isConfiguredForThisStore()\n {\n return $this->getUsername() && $this->isEnabled();\n }", "protected function accountNotLinkedToAnyApp(): bool\n {\n report(AccountNotLinkedToAnyApp::create($this));\n\n return false;\n }", "public function supportsRegistration()\n {\n if ($this->config->has('auth.external_concrete.registration.enabled')) {\n return (bool) $this->config->get('auth.external_concrete.registration.enabled');\n } else {\n // Legacy support\n return (bool) $this->config->get('auth.external_concrete5.registration.enabled', false);\n }\n }", "protected function hasAccount(): bool\n {\n if (null === $this->hasAccount) {\n $account = $this->accountContext->getAccount();\n if (null !== $account) {\n $this->account = $account;\n $this->hasAccount = true;\n } else {\n $this->hasAccount = false;\n }\n }\n\n return $this->hasAccount;\n }", "protected function isUserAllowedToLogin() {}", "protected function isAuthenticate() {\n $em = $this->getEm();\n $repository = $em->getRepository('Ephp\\Bundle\\WsInvokerBundle\\Entity\\Log\\LogAuthentication');\n /* @var $repository \\Ephp\\Bundle\\WsInvokerBundle\\Entity\\Log\\LogAuthenticationRepository */\n return $repository->checkOrCreateToken($this->getUtente(), $this->persist);\n }", "public function isAutoLoginEnabled()\n {\n return $this->scopeConfig->getValue(\n self::AUTO_LOGIN_ENABLE,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "public function create(User $user)\n {\n return $user->hasCapability('members::account::create');\n }", "public function hasUserConnected() {\n $accessToken = get_option(self::ACCESS_TOKEN_OPTION_NAME);\n\n return !empty($accessToken);\n }", "protected function _can_make_pin()\n\t{\n\t\t$user = user_get_account_info();\n\n\t\t$user = model('user')->get_info($user->id, 'pin');\n\n\t\treturn ($user && !$user->pin);\n\t}", "public function check_user_exists_provider() {\n return [\n 'Fetch by email' => [\n 'email', 's1@example.com', true\n ],\n 'Fetch by email, different case' => [\n 'email', 'S1@EXAMPLE.COM', true\n ],\n 'Fetch data using a non-existent email' => [\n 'email', 's2@example.com', false\n ],\n 'Multiple accounts with the same email' => [\n 'email', 's1@example.com', false, 1\n ],\n 'Fetch data using a valid user ID' => [\n 'id', true, true\n ],\n 'Fetch data using a non-existent user ID' => [\n 'id', false, false\n ],\n 'Fetch data using a valid username' => [\n 'username', 's1', true\n ],\n 'Fetch data using a valid username, different case' => [\n 'username', 'S1', true\n ],\n 'Fetch data using an invalid username' => [\n 'username', 's2', false\n ],\n 'Fetch data using a valid ID Number' => [\n 'idnumber', 's1', true\n ],\n 'Fetch data using an invalid ID Number' => [\n 'idnumber', 's2', false\n ],\n ];\n }", "public function canLogin()\n {\n $mssg = \"\";\n $type = Extra::COOKIE_MESSAGE_INFO;\n\n if(!$this->isEmailVerified()){\n $mssg = \"Your email is not verified. You need to verify your email to login.<form class='otp-inline-form' method='POST' action='/user/verify-email/'><input type='hidden' name='email' value='{$this->email}' /><input type='hidden' name='resend' value='' /><button class='submit'>VERIFY</button></form>\";\n Extra::setMessageCookie($mssg, $type);\n return false;\n }\n if($this->isTraderRequested()){\n $mssg = \"Your request of becoming trader is not yet reviewed. We will notify you after we have reviewed.\";\n Extra::setMessageCookie($mssg, $type);\n return false;\n }\n\n return true;\n }", "public function hasIdentity() {\n $objAuth = Zend_Auth::getInstance();\n \n // Verifica se já está autenticado\n if ($objAuth->hasIdentity()) {\n \treturn true;\n } else {\n \tif(Zf_Util_Cookie::cookieExists( Zend_Registry::get('admin_config')->resources->cookie->name )) {\n \t\t\n \t}\n }\n }", "public function check_insta_user() {\n \n }", "public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }", "private function _checkIdent()\n {\n $auth = Zend_Auth::getInstance();\n $auth->setStorage(new Zend_Auth_Storage_Session('hl_connect'));\n \n if ($auth->hasIdentity())\n $this->_agentSchemeNumber = $auth->getStorage()->read()->agentschemeno;\n \n return $auth->hasIdentity();\n }", "public function create()\n {\n return isAdmin();\n }", "public function authorize()\n {\n return $this->user()->can('user.create');\n }", "public function hasMultipleAccounts();", "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }", "public function checkFirstLogin();", "function has_account()\n{\n return file_exists(DEFAULT_ACCOUNTFILE);\n}", "function google_login_allow_new_users_with_google()\n{\n\t$site_reg = elgg_get_config('allow_registration');\n\t$google_reg = elgg_get_plugin_setting('new_users');\n\tif ($site_reg || (!$site_reg && $google_reg == 'yes'))\n\t{\n\t\treturn true;\n\t}\n\treturn false;\n}", "function requiresAuth()\n {\n return parent::requiresAuth() ||\n $this->create || $this->delete;\n }", "public function hasUserConnected() {\n $accessTokenIG = get_option( self::INSTAGRAM_TOKEN_LONG_LIVED_TIME );\n $accessTokenFB = get_option( self::FACEBOOK_TOKEN );\n\n return ! empty( $accessTokenIG ) || ! empty( $accessTokenFB );\n }", "public function create_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "public function authorize()\n {\n if($this->path() == 'profile/create')\n {\n return true;\n } else {\n return false;\n }\n }", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "private function createUserProviders($config) {}", "public function authorize()\n {\n // TODO: Check if is authorized to create user\n return true;\n }", "protected function isLoginInProgress() {}", "public function supports_users() {\n return true;\n }", "public function isSignupChecked()\n {\n $v = Mage::helper('budgetmailer/config')->getAdvancedCreateAccount();\n \n return \n Professio_BudgetMailer_Model_Config_Source_Account::HIDDENCHECKED\n == $v\n || Professio_BudgetMailer_Model_Config_Source_Account::CHECKED\n == $v;\n }", "public function is_init(){\n\t\tglobal $_wt_options;\n\t\tif($this->user_key || !empty($this->user_key) && $this->app_key || !empty($this->app_key)) return 1;\n\t\treturn 0;\n\t}", "public function create(User $user)\n {\n return config('mailcare.auth') && config('mailcare.automations');\n }", "protected function hasLoginBeenProcessed() {}", "public function providerHasDevices(): bool;", "function is_nextend_facebook_login() {\n\t\tif ( class_exists( 'NextendSocialLogin', false ) && ! class_exists( 'NextendSocialLoginPRO', false ) ) {\n\t\t\treturn NextendSocialLogin::isProviderEnabled( 'facebook' );\n\t\t}\n\t\treturn false;\n\t}", "public function hasLoginType()\n {\n return $this->get(self::LOGIN_TYPE) !== null;\n }", "public function isAutoLoginEnabled()\n {\n return $this->quotationHelper->isAutoLoginEnabled();\n }", "function randomUser_exists()\t{\n\t\treturn $this->recordNumber(self::RNDUSERSC_NAME) > 0;\n\t}", "public function create(Manager $manager)\n {\n return in_array('payment_create', $manager->permissions);\n }", "public function canImpersonate(): bool\n {\n return $this->can('impersonate-users');\n }", "public function checkIfAvailable(){\n $user_check_query = self::$connection->db->prepare(\"SELECT * FROM users WHERE name = ? OR email = ?\");\n $user_check_query->bind_param(\"ss\", self::$signUpName, self::$signUpEmail);\n $user_check_query->execute();\n $users = $user_check_query->get_result()->fetch_assoc();\n $user_check_query->close();\n $nameError = false;\n $emailError = false;\n $_POST = array();\n if (isset($users)) {\n foreach($users as $key=>$value) {\n if (strtolower($users['name']) === strtolower(self::$signUpName) && !$nameError) {\n self::addError(\"signUp\", \"Name already exists.\");\n $nameError = true;\n Auth::CreateView('Auth');\n };\n if ($users['email'] === self::$signUpEmail && !$emailError) {\n self::addError(\"signUp\", \"Email already exists.\");\n $emailError = true;\n Auth::CreateView('Auth');\n };\n }\n } else if(count(self::$signUpErrors) === 0){\n $this->registering();\n return true;\n }\n }", "public function register_user()\n {\n \n return true;\n \n }", "public function hasPostAuthentication()\n {\n return isset($this->sessionStorage->user['twofactor_activated']) && $this->sessionStorage->user['twofactor_activated'] === true;\n }", "public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }", "private function checkFirstLogin() {\n\n $count = DB::table('users')->count();\n\n if ($count == 0) {\n\n $password = Hash::make('cciadminpassword');\n\n // insert in users table\n $id = DB::table('users')->insertGetId([\n 'username' => 'admin',\n 'name' => 'Administrator',\n 'password' => $password,\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n\n // insert in roles table\n DB::table('user_roles')->insert([\n 'user_id' => $id,\n 'role' => 'administrator',\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n\n // insert project status codes\n DB::table('project_status')->insert([\n [ 'status' => 'New' ],\n [ 'status' => 'Quoted' ],\n [ 'status' => 'Sold' ],\n [ 'status' => 'Engineered' ],\n [ 'status' => 'Lost']\n ]);\n\n return;\n }\n\n else { return; }\n }", "public static function createAccountOnFirstLogin(): string\n {\n return 'create-account-on-first-login';\n }", "public function isLogin()\n\t{\n\t\t$type = Bn::getValue('user_type');\n\t\treturn (!empty($type));\n\t}", "public function hasProviders();", "public function authorize()\n {\n return $this->user()->can('create', MarEntry::class);\n }", "public static function isActivated ()\r\n {\r\n return Session::exists('acl');\r\n }", "protected function CanCreate()\n {\n return self::Guard()->Allow(BackendAction::Create(), new Site());\n }" ]
[ "0.6998437", "0.6779915", "0.6649063", "0.66418815", "0.64215887", "0.6395429", "0.63893616", "0.6329993", "0.6271034", "0.621557", "0.6202948", "0.61060405", "0.6081782", "0.59520304", "0.59157735", "0.5913746", "0.59013", "0.58826786", "0.5871972", "0.587152", "0.58465457", "0.58119655", "0.5809646", "0.57849145", "0.57849145", "0.5752288", "0.5749218", "0.5744825", "0.57423234", "0.5723654", "0.5712973", "0.56993866", "0.566417", "0.5663073", "0.5662355", "0.56501365", "0.5636131", "0.5614336", "0.5612741", "0.5585331", "0.557829", "0.55769163", "0.5576572", "0.5561418", "0.55459255", "0.5541127", "0.5511822", "0.55076295", "0.55062443", "0.54955465", "0.54903495", "0.54898214", "0.54854405", "0.54799783", "0.5479377", "0.5473343", "0.5468386", "0.5451211", "0.5450888", "0.5448626", "0.5447563", "0.54458946", "0.54428947", "0.54362375", "0.54313207", "0.543096", "0.5417969", "0.5417399", "0.5411763", "0.5409248", "0.5403035", "0.53970915", "0.5394167", "0.538658", "0.53851527", "0.538503", "0.53828084", "0.5382534", "0.5380151", "0.537915", "0.5371745", "0.53649807", "0.53588635", "0.53580976", "0.5354093", "0.535334", "0.5351762", "0.5346213", "0.5338168", "0.53374076", "0.5335773", "0.53326", "0.5325181", "0.5325127", "0.53228587", "0.5317743", "0.53131914", "0.530298", "0.529382", "0.5276813" ]
0.74714476
0
Determine if the application supports logging into existing accounts when registering with a provider who's email address is already registered.
public static function hasLoginOnRegistrationFeatures(): bool { return static::enabled(static::loginOnRegistration()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function detectLoginProvider() {}", "public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }", "public function supportsRegistration()\n {\n if ($this->config->has('auth.external_concrete.registration.enabled')) {\n return (bool) $this->config->get('auth.external_concrete.registration.enabled');\n } else {\n // Legacy support\n return (bool) $this->config->get('auth.external_concrete5.registration.enabled', false);\n }\n }", "function the_champ_social_login_provider_enabled($provider){\r\n\tglobal $theChampLoginOptions;\r\n\tif(the_champ_social_login_enabled() && isset($theChampLoginOptions['providers']) && in_array($provider, $theChampLoginOptions['providers'])){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public function usingSocialAccount()\n {\n return ( ! is_null($this->provider) && ! is_null($this->provider_id) ) ? true : false;\n }", "public function canLogin()\n {\n $mssg = \"\";\n $type = Extra::COOKIE_MESSAGE_INFO;\n\n if(!$this->isEmailVerified()){\n $mssg = \"Your email is not verified. You need to verify your email to login.<form class='otp-inline-form' method='POST' action='/user/verify-email/'><input type='hidden' name='email' value='{$this->email}' /><input type='hidden' name='resend' value='' /><button class='submit'>VERIFY</button></form>\";\n Extra::setMessageCookie($mssg, $type);\n return false;\n }\n if($this->isTraderRequested()){\n $mssg = \"Your request of becoming trader is not yet reviewed. We will notify you after we have reviewed.\";\n Extra::setMessageCookie($mssg, $type);\n return false;\n }\n\n return true;\n }", "public function checkIfAvailable(){\n $user_check_query = self::$connection->db->prepare(\"SELECT * FROM users WHERE name = ? OR email = ?\");\n $user_check_query->bind_param(\"ss\", self::$signUpName, self::$signUpEmail);\n $user_check_query->execute();\n $users = $user_check_query->get_result()->fetch_assoc();\n $user_check_query->close();\n $nameError = false;\n $emailError = false;\n $_POST = array();\n if (isset($users)) {\n foreach($users as $key=>$value) {\n if (strtolower($users['name']) === strtolower(self::$signUpName) && !$nameError) {\n self::addError(\"signUp\", \"Name already exists.\");\n $nameError = true;\n Auth::CreateView('Auth');\n };\n if ($users['email'] === self::$signUpEmail && !$emailError) {\n self::addError(\"signUp\", \"Email already exists.\");\n $emailError = true;\n Auth::CreateView('Auth');\n };\n }\n } else if(count(self::$signUpErrors) === 0){\n $this->registering();\n return true;\n }\n }", "public function hasPersistentLogin();", "public static function hasCreateAccountOnFirstLoginFeatures(): bool\n {\n return static::enabled(static::createAccountOnFirstLogin());\n }", "public function loginExistingUser() {\n\n // Check whether remote account with requested email exists:\n try {\n $this->sso = dosomething_canada_get_sso();\n\n if ($this->sso->authenticate($this->email, $this->password)) {\n $this->remote_account = $this->sso->getRemoteUser();\n }\n }\n catch (Exception $e) {\n\n // The only users that exist locally but not remotely should be admin\n // accounts that were created before SSO integration. These should be\n // created remotely as well.\n $this->sso->propagateLocalUser(\n $this->email,\n $this->password,\n dosomething_canada_create_sso_user($this->email, $this->password, $this->local_account)\n );\n }\n return TRUE;\n }", "public function loginExists() {\n return (bool) $this->local_account;\n }", "function b2c_has_social_login() {\n\treturn ! empty( b2c_get_current_user_auth_provider() );\n}", "public static function is_available () {\n\t\t$auth = op5Auth::instance();\n\t\tforeach (AuthModulePool_Model::all() as $module) {\n\t\t\t$driver = $auth->get_auth_driver($module->get_modulename());\n\t\t\tif (\n\t\t\t\t$driver->get_metadata('require_user_configuration') &&\n\t\t\t\t$driver->get_user_count() > 0\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static function user_has_providers()\n {\n $retval = false;\n\n $providers = self::get_providers_of_current_user();\n\n if (count($providers))\n {\n $retval = true;\n }\n\n return $retval;\n }", "function google_login_allow_new_users_with_google()\n{\n\t$site_reg = elgg_get_config('allow_registration');\n\t$google_reg = elgg_get_plugin_setting('new_users');\n\tif ($site_reg || (!$site_reg && $google_reg == 'yes'))\n\t{\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function isActive()\n {\n if (empty($this->authProvider)) {\n return false;\n }\n if ($this->authProvider->getId() == AuthProvider::MAIN_PROVIDER_ID && empty($this->password)) {\n return false;\n }\n\n return true;\n }", "public function canLogin()\n {\n $email = $this->getEmail();\n $password = $this->getPassword();\n $conn = Db::getInstance();\n $statement = $conn->prepare(\"SELECT * FROM users WHERE email = :email\");\n $statement->bindValue(\":email\", $email);\n $statement->execute();\n $user = $statement->fetch();\n $hash = $user[\"password\"];\n\n if (!$user) {\n return false;\n }\n\n // use password_verify() to verify your user\n // this function should return true or false and nothing else\n if (password_verify($password, $hash)) {\n return true;\n } else {\n return false;\n }\n }", "private function _checkIdent()\n {\n $auth = Zend_Auth::getInstance();\n $auth->setStorage(new Zend_Auth_Storage_Session('hl_connect'));\n \n if ($auth->hasIdentity())\n $this->_agentSchemeNumber = $auth->getStorage()->read()->agentschemeno;\n \n return $auth->hasIdentity();\n }", "public function isProviderConfigurationActive($userId, $providerCode);", "public function isEuRegistered();", "protected function isFirstTimeSetup() {\n // If there are any auth providers, this isn't first time setup, even if\n // we don't have accounts.\n if (PhabricatorAuthProvider::getAllEnabledProviders()) {\n return false;\n }\n\n // Otherwise, check if there are any user accounts. If not, we're in first\n // time setup.\n $any_users = id(new PhabricatorPeopleQuery())\n ->setViewer(PhabricatorUser::getOmnipotentUser())\n ->setLimit(1)\n ->execute();\n\n return !$any_users;\n }", "protected function shouldAutoInitiate(): bool\n {\n $socialDrivers = $this->socialAuthService->getActiveDrivers();\n $authMethod = config('auth.method');\n $autoRedirect = config('auth.auto_initiate');\n\n return $autoRedirect && count($socialDrivers) === 0 && in_array($authMethod, ['oidc', 'saml2']);\n }", "private function isOnboardedWithAccountAndGoogle()\n {\n if (false === (new PsAccountsService())->getShopUuidV4() &&\n false === $this->configurationRepository->getGoogleLinkedValue()\n ) {\n return false;\n }\n\n return true;\n }", "protected function isUserAllowedToLogin() {}", "function canCreateAccounts() {\r\n\t\treturn true;\r\n\t}", "private function checkUserExistence() {\n\t\t\t\t$query = \"select count(email) as count from register where email='$this->email'\";\n\t\t\t\t$resource = returnQueryResult($query);\n\t\t\t\t$result = mysql_fetch_assoc($resource);\n\t\t\t\tif($result['count'] > 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}", "public function canImpersonate(): bool\n {\n return $this->can('impersonate-users');\n }", "public function getAuthenticationAvailable();", "public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }", "protected function _isAlreadyLoggedIn(){\n debug($_SESSION);\n die();\n if ($this->Session->read('Auth.User')) {\n $role = $this->Role->read(null, $this->Auth->user('role_id'));\n CakeSession::write('Auth.User.role', $role['Role']['alias']);\n\n $url = null;\n switch ($role['Role']['alias']) {\n case 'admin':\n case 'manager':\n $this->Session->setFlash(__('If you pretend to register an other person, user \"Add Register (Consolidate)\" at Administrative Panel.'), 'default', array('class' => 'notice'));\n $url = array('plugin' => false, 'controller' => 'systems', 'action' => 'dashboard', 'prefix' => 'admin', 'admin' => true);\n break;\n case 'registered':\n $this->Session->setFlash(__('You has already registered!'), 'default', array('class' => 'notice'));\n $url = array('plugin' => false, 'controller' => 'systems', 'action' => 'dashboard', 'prefix' => 'profile', 'profile' => true);\n break;\n default:\n $url = $this->Auth->redirect();\n break;\n }\n $this->redirect($url);\n }\n return array('success' => true);\n \n }", "public function hasLogin(){\r\n\r\n $auth = new AuthenticationService();\r\n\r\n if ($auth->hasIdentity()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "function accountswitcher_is_installed()\n{\n\tglobal $db;\n\n\tif ($db->field_exists(\"as_uid\", \"users\") && $db->field_exists(\"as_canswitch\", \"usergroups\") && $db->field_exists(\"as_limit\", \"usergroups\"))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "public function checksocialCustomers()\n {\n $this->setRules([ 'login_type' => 'required|in:normal,fb,google+','email' => 'required|max:100|email','token' => 'required','social_user_id' => 'required','name' => 'required' ]);\n $this->_validate();\n\n $type = ($this->request->login_type == 'fb') ? 'facebook' : (($this->request->login_type == 'google+') ? 'google' : '');\n return $this->registerSocialUser($this->request->all(), $type);\n }", "public function check_user_exists_provider() {\n return [\n 'Fetch by email' => [\n 'email', 's1@example.com', true\n ],\n 'Fetch by email, different case' => [\n 'email', 'S1@EXAMPLE.COM', true\n ],\n 'Fetch data using a non-existent email' => [\n 'email', 's2@example.com', false\n ],\n 'Multiple accounts with the same email' => [\n 'email', 's1@example.com', false, 1\n ],\n 'Fetch data using a valid user ID' => [\n 'id', true, true\n ],\n 'Fetch data using a non-existent user ID' => [\n 'id', false, false\n ],\n 'Fetch data using a valid username' => [\n 'username', 's1', true\n ],\n 'Fetch data using a valid username, different case' => [\n 'username', 'S1', true\n ],\n 'Fetch data using an invalid username' => [\n 'username', 's2', false\n ],\n 'Fetch data using a valid ID Number' => [\n 'idnumber', 's1', true\n ],\n 'Fetch data using an invalid ID Number' => [\n 'idnumber', 's2', false\n ],\n ];\n }", "function is_nextend_google_login() {\n\t\tif ( class_exists( 'NextendSocialLogin', false ) && ! class_exists( 'NextendSocialLoginPRO', false ) ) {\n\t\t\treturn NextendSocialLogin::isProviderEnabled( 'google' );\n\t\t}\n\t\treturn false;\n\t}", "protected function isAuthenticate() {\n $em = $this->getEm();\n $repository = $em->getRepository('Ephp\\Bundle\\WsInvokerBundle\\Entity\\Log\\LogAuthentication');\n /* @var $repository \\Ephp\\Bundle\\WsInvokerBundle\\Entity\\Log\\LogAuthenticationRepository */\n return $repository->checkOrCreateToken($this->getUtente(), $this->persist);\n }", "public function hasUserConnected() {\n $accessToken = get_option(self::ACCESS_TOKEN_OPTION_NAME);\n\n return !empty($accessToken);\n }", "public function canFriendProvider($provider = null): bool;", "public function hasUserConnected() {\n $accessTokenIG = get_option( self::INSTAGRAM_TOKEN_LONG_LIVED_TIME );\n $accessTokenFB = get_option( self::FACEBOOK_TOKEN );\n\n return ! empty( $accessTokenIG ) || ! empty( $accessTokenFB );\n }", "function is_nextend_facebook_login() {\n\t\tif ( class_exists( 'NextendSocialLogin', false ) && ! class_exists( 'NextendSocialLoginPRO', false ) ) {\n\t\t\treturn NextendSocialLogin::isProviderEnabled( 'facebook' );\n\t\t}\n\t\treturn false;\n\t}", "public static function userCreationAllowed(): bool\n {\n return self::isConfigured(self::ACTION_ADD_USER);\n }", "public function isRegistered() {\n //1ero. es un registro completo o 2do es un\n //registro incompleto.\n if (is_file(\"/etc/elastix.key\")) { \n if($this->columnExists(\"has_account\")) {\n $result = $this->_DB->getFirstRowQuery(\"select has_account from register;\", true);\n if (is_array($result) && count($result)>0){\n return ($result['has_account']==\"yes\")?\"yes-all\":\"yes-inc\";\n }\n else return \"yes-inc\";\n }\n else {\n //intento crear la columna \n if(!$this->addColumnTableRegister(\"has_account char(3) default 'no'\")) {\n $this->errMsg = \"The column 'has_account' does not exist and could not be created\";\n return \"yes-inc\";\n }\n\n //Actualizo el valor de la columna\n //con la info desde webservice\n $dataWebService = $this->getDataServerRegistration();\n if(!(is_array($dataWebService) && count($dataWebService)>0)) // no se puedo conectar al webservice\n return \"yes-inc\";\n \n if($this->updateHasAccount(1,$dataWebService['has_account']))\n return ($dataWebService['has_account']==\"yes\")?\"yes-all\":\"yes-inc\";\n else return \"yes-inc\";\n }\n }\n else return \"no\";\n }", "public function hasIdentity() {\n $objAuth = Zend_Auth::getInstance();\n \n // Verifica se já está autenticado\n if ($objAuth->hasIdentity()) {\n \treturn true;\n } else {\n \tif(Zf_Util_Cookie::cookieExists( Zend_Registry::get('admin_config')->resources->cookie->name )) {\n \t\t\n \t}\n }\n }", "public function canCreateAccounts()\n {\n return false;\n }", "public function canLoginHere()\n {\n if (! $this->_hasVar('can_login_here')) {\n $this->_setVar('can_login_here', true);\n if ($orgId = $this->userLoader->getOrganizationIdByUrl()) {\n if (! $this->isAllowedOrganization($orgId)) {\n $this->_setVar('can_login_here', false);;\n }\n }\n }\n return $this->_getVar('can_login_here');\n }", "public function isAuth(){\n\t\t$sess = Core::getSingleton(\"system/session\");\n\t\tif( $sess->has(\"account\") ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function hasMultipleAccounts();", "public function external_login($provider) {\n\t\tif ($provider == User_External_Model::PROVIDER_FACEBOOK && $fb_uid = FB::instance()->get_loggedin_user()) {\n\n\t\t\t// Load the external user\n\t\t\t$user = User_Model::find_user_by_external($fb_uid, $provider);\n\n\t\t\tif ($user->loaded && $this->complete_login($user)) {\n\t\t\t\t$this->session->set($this->config['session_key'] . '_provider', $provider);\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function iarb_extauth()\n{\n\tglobal $context, $modSettings;\n\n\tif (empty($modSettings['extauth_master']))\n\t{\n\t\treturn;\n\t}\n\n\t// Registration Screen ?\n\tif ((!empty($context['site_action']) && $context['site_action'] === 'register')\n\t\t&& (isset($_GET['action']) && $_GET['action'] === 'register'))\n\t{\n\t\t// Load the enabled providers\n\t\trequire_once(SUBSDIR . '/Extauth.subs.php');\n\t\t$context['enabled_providers'] = extauth_enabled_providers();\n\n\t\tif ($modSettings['requireAgreement'] && empty($_POST['accept_agreement']))\n\t\t{\n\t\t\tTemplate_Layers::instance()->addBegin('extauth_register');\n\t\t}\n\t}\n}", "function canCreateAccounts() {\n return false;\n }", "public function hasProviders(): bool;", "protected function hasLoginBeenProcessed() {}", "public function providerHasFriends(): bool\n {\n return $this->providerHasFriends;\n }", "public function hasPasswordBrokerFactory(): bool;", "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }", "protected function creatingNewUser() {\n return ($this->request_exists('user_choice') && $this->request('user_choice') == 'new' );\n }", "protected function needsAuthentication()\n {\n return !empty($this->authType);\n }", "public function customerIsAlreadyLoggedIn()\n {\n return (bool)$this->httpContext->getValue(\\Magento\\Customer\\Model\\Context::CONTEXT_AUTH);\n }", "public function create(Provider $provider)\n {\n\t if (Auth::guard('provider-web')->user()->id == $provider->id) return true;\n\t return false;\n }", "public function hasProviders();", "public function isConnected()\n\t{\n\t\t// TODO: Make this check the login functionality or something..!!\n\t\treturn true;\n\t}", "protected function isLoginInProgress() {}", "function acadp_registration_enabled() {\n\n\t$registration_settings = get_option( 'acadp_registration_settings', array() );\n\n\tif( ! empty( $registration_settings['engine'] ) && 'acadp' == $registration_settings['engine'] ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n\n}", "public function can_auto_create_users() {\n return (bool)$this->config['weautocreateusers'];\n }", "public function isProviderFriendable($provider = null): bool;", "public function isLogin();", "function wlabarron_saml_is_user_in_config() {\n global $yourls_user_passwords;\n $users = array_keys($yourls_user_passwords);\n \n return in_array(YOURLS_USER, $users);\n}", "protected function accountNotLinkedToAnyApp(): bool\n {\n report(AccountNotLinkedToAnyApp::create($this));\n\n return false;\n }", "public function IsAuth()\n {\n if ($this->mSystemLogin || $this->mFacebookId || $this->mTwitterId)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "function is_registered($email) {\n\t\tglobal $pdo;\n\n\t\t//delete old registration attempts\n\t\t$pdo->query(\"DELETE FROM user WHERE verified = 0 AND TIME_TO_SEC(TIMEDIFF(CURRENT_TIMESTAMP, code_generation_time)) > 600\");\n\n\t\t//empty or array check\n\t\tif(empty($email) || is_array($email)) {\n\t\t\treturn null;\n\t\t}\n\n\t\t//check if user exists\n\t\t$sql = \"SELECT id FROM user WHERE REPLACE(email, \\\".\\\", \\\"\\\") = REPLACE(:email, \\\".\\\", \\\"\\\")\";\n\t\t$sth = $pdo->prepare($sql);\n\t\t$sth->bindValue(\":email\", mail_simplify($email), PDO::PARAM_STR);\n\t\t$sth->execute();\n\n\t\tif($sth->rowCount() == 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function canImpersonate();", "public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }", "protected function isLogin()\n {\n $skey = \\Web\\Config\\Auth::$prefix . $this->sessionId;\n if (\\Web\\Config\\Auth::$username != $this->gdata($skey)) {\n return false;\n }else{\n $this->gexpire($skey, \\Web\\Config\\Auth::$expire);\n return true;\n }\n }", "public function providerHasFriends(): bool;", "public function hasPostAuthentication()\n {\n return isset($this->sessionStorage->user['twofactor_activated']) && $this->sessionStorage->user['twofactor_activated'] === true;\n }", "public function checkAllowed() {\r\n\t\t// if option is not active return true!\r\n\t\tif (Mage::getStoreConfig('b2bprofessional/generalsettings/activecustomers')) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t$iUserStoreId\t\t= Mage::getSingleton('customer/session')->getCustomer()->getStore()->getGroupID();\r\n\t\t$iCurrentStoreId\t= Mage::app()->getStore()->getGroupID();\r\n\r\n\t\tif ($iUserStoreId == $iCurrentStoreId) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function isProviderOnline($provider = null): bool;", "static public function shouldExtendSSOSessionOnUserActivity() {\n\t\t\n\t\t$session = self::getCurrentSession();\n\t\t\t\t\n\t\tif (!empty($session)) {\n\t\t\treturn $session->ExtendOnUserActivity; \n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function register_user()\n {\n \n return true;\n \n }", "public function canManageCredentials()\n {\n return true;\n }", "function isGuestLoginAvailable()\n{\n\treturn false;\n}", "public function supports_users() {\n return true;\n }", "public function isEmailRegistered()\n {\n return $this->isEmailAvailable($this->getEmailAddress());\n\n }", "public function checkForRegisteredRedirect() {\n /* if provided a redirect id, will redirect to that resource, with the\n * GET params `username` and `email` for you to use */\n $submittedResourceId = $this->controller->getProperty('submittedResourceId','');\n if (!empty($submittedResourceId)) {\n\t\t\t$persistParams = $this->persistParams;\n if ($this->controller->getProperty('redirectUnsetDefaultParams') == false) {\n $persistParams = array_merge($this->persistParams,array(\n 'username' => $this->user->get('username'),\n 'fullname' => $this->profile->get('fullname'),\n 'email' => $this->profile->get('email'),\n ));\n }\n $url = $this->modx->makeUrl($submittedResourceId,'',$persistParams,'full');\n if (!$this->login->inTestMode) {\n $this->modx->sendRedirect($url);\n }\n return true;\n }\n return false;\n }", "public function can_log_in()\n\t{\n\t\t$salt = \"Qx-g0Yb.g>)8457!y%AX:?,,u.j93I\";\n\n\t\t// Compares the username and password with the db\n\t\t$this->db->where('username', $this->input->post('username'));\n\t\t//$this->db->where('password', \n\t\t//\tmd5($this->input->post('password').$salt));\n\t\t$this->db->where('password',$this->input->post('password')); \n\t\t$query = $this->db->get('registration');\n\t\t$data =$query->result_array();\n\t\t// If the query returns one row then the user exists\n\t\tif ($query->num_rows() == 1) {\n\t\t\treturn $data[0]['id'];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function is_member_login() {\n\t\t$cm_account = $this->get_account_cookie(\"member\");\n\t\tif ( !isset($cm_account['id']) || !isset($cm_account['username']) || !isset($cm_account['password']) || !isset($cm_account['onlinecode']) ) {\n\t\t\treturn false;\n\t\t}\n\t\t// check again in database\n\t\treturn $this->check_account();\n\t}", "public static function allowUserSignUp()\n {\n return false;\n }", "public function showFbConnectToAccountMsg()\n {\n if ($this->getConfig()->getRequestParameter(\"fblogin\")) {\n if (!$this->getUser() || ($this->getUser() && $this->getSession()->getVariable('_blFbUserIdUpdated'))) {\n return true;\n } else {\n return false;\n }\n }\n\n return false;\n }", "public function hasLoginType()\n {\n return $this->get(self::LOGIN_TYPE) !== null;\n }", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function providerHasDevices(): bool;", "private function findAccount() {\n\t\t\tassertArray($this->errorMsgs);\n\t\t\t// find existing email/login\n\t\t\t$result = $this->dbh->query(\"SELECT `affiliateID`, `email`, `password` FROM `affiliates` WHERE `email` = '\".prepDB($this->registrationForm['email']).\"'\");\n\t\t\tif (isset($_REQUEST['affiliateLogin'])) {\n\t\t\t\t// login\n\t\t\t\tif ($this->affiliateID) {\n\t\t\t\t\t// already logged in\n\t\t\t\t\t$this->errorMsgs[] = 'You are already logged in, please log out first';\n\t\t\t\t} elseif ($result->rowCount) {\n\t\t\t\t\t$row = $result->fetchAssoc();\n\t\t\t\t\tif ($row['password'] != $this->registrationForm['password']) {\n\t\t\t\t\t\t// login, incorrect password\n\t\t\t\t\t\t$this->errorMsgs[] = 'Incorrect password for '.$this->registrationForm['email'];\n\t\t\t\t\t\taddErrorField('password');\n\t\t\t\t\t} elseif (!$this->affiliateID) {\n\t\t\t\t\t\t// affiliate id is the logged in flag\n\t\t\t\t\t\t// the only way affiliate id can be set is if user successfully creates a new account or logs in\n\t\t\t\t\t\t$this->affiliateID = $row['affiliateID'];\n\t\t\t\t\t\t// update login count\n\t\t\t\t\t\t$this->dbh->query(\"UPDATE `affiliates` SET `totalLogins` = `totalLogins` + 1 WHERE `affiliateID` = '\".prepDB($this->affiliateID).\"'\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->errorMsgs[] = 'You are already logged in, please log out first';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// no email found\n\t\t\t\t\t$this->errorMsgs[] = 'Email not found';\n\t\t\t\t}\n\t\t\t} elseif ($this->affiliateID) {\n\t\t\t\t// affiliate changing account info\n\t\t\t\tif ($result->rowCount) {\n\t\t\t\t\t$row = $result->fetchAssoc();\n\t\t\t\t\tif ($row['affiliateID'] != $this->affiliateID) {\n\t\t\t\t\t\t// user entered an existing address/login that belongs to another account\n\t\t\t\t\t\t$this->errorMsgs[] = $this->registrationForm['email'].' has an existing account, please enter a different email address';\n\t\t\t\t\t\taddErrorField('email');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->errorMsgs[] = 'You are currently using this email address';\n\t\t\t\t\t\taddErrorField('email');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif ($result->rowCount) {\n\t\t\t\t// new account\n\t\t\t\t$row = $result=>fetchAssoc();\n\t\t\t\tif ($row['email'] == prepDB($this->registrationForm['email'])) {\n\t\t\t\t\t$this->errorMsgs[] = $this->registrationForm['email'].' has an existing account, please log in or enter a different email address';\n\t\t\t\t\taddErrorField('email');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function google_login_allow_sign_on_with_google()\n{\n\n \n\treturn elgg_get_plugin_setting('sign_on', 'google_login') == 'yes';\n}", "public function login($provider, $params)\n {\n $email = getLogin($provider)->verifyEmail($params);\n if($email === false)\n return false;\n\n $this->setEmail($email);\n return true;\n }", "public static function isNewLogin(){\n $request = Request::getInstance();\n\n if(!self::isLoggedIn()){\n return false;\n }\n\n self::init();\n\n $last_log = self::$db->select(CONFIG['AUTH_LOG_TABLE'], ['user_ip', 'user_agent'], [\n 'user_id' => $_SESSION['logged_user_id'],\n 'status' => 'success',\n 'type' => ['login', 'signup'],\n 'ORDER' => ['id' => 'DESC'],\n 'LIMIT' => [0, 500]\n ]);\n\n if(empty($last_log)){\n return false;\n }\n\n $known_agents = [];\n foreach ($last_log as $key => $data) {\n $ag = json_decode($data['user_agent'], true);\n $known_agents['ip'][$key] = $data['user_ip'];\n $known_agents['device'][$key] = $ag['device'];\n $known_agents['os'][$key] = $ag['os'];\n $known_agents['os_version'][$key] = $ag['os_version'];\n $known_agents['browser'][$key] = $ag['browser'];\n }\n\n $current_agent = $request->userAgent();\n $current_agent['ip'] = $request->ip();\n $current_agent['date_time'] = date(\"M d, Y | H:i:s\");\n $new_entries = [];\n $keys = ['ip', 'device', 'os', 'browser', 'os_version'];\n\n foreach ($keys as $key) {\n if (!is_null($current_agent[$key]) && !in_array($current_agent[$key], $known_agents[$key])) {\n $new_entries[] = $key;\n }\n }\n\n $current_agent['info'] = $new_entries;\n\n return !empty($current_agent['info']) ? $current_agent : false;\n }", "public function hasUser();", "public function checkRegistryRequestsAnswers()\n {\n if (! (($this->db instanceof \\Zend_Db_Adapter_Abstract) && ($this->session instanceof \\Zend_Session_Namespace))) {\n return false;\n }\n\n // Checks if this is the current user\n if (! $this->_vars instanceof \\Zend_Session_Namespace) {\n $sessionStore = $this->session;\n\n $notCurrent = true;\n foreach (array('user_id', 'user_organization_id') as $key) {\n if ($sessionStore->__isset($key) && $this->_vars->offsetExists($key)) {\n $notCurrent = $sessionStore->__get($key) != $this->_vars->offsetGet($key);\n } else {\n $notCurrent = $sessionStore->__isset($key) || $this->_vars->offsetExists($key);\n }\n\n if ($notCurrent) {\n break;\n }\n }\n if (! $notCurrent) {\n // When this is the case, use the \\Zend_Session_Namespace object with the current set values\n // This way changes to this user object are reflected in the CurrentUser object and vice versa.\n $this->setAsCurrentUser();\n }\n }\n\n return (boolean) $this->acl && $this->userLoader;\n }", "function backend_user_check()\n {\n return app('nodes.backend.auth')->check();\n }", "public function hasTwoFactorEnabled(): bool\n {\n return $this->twoFactorAuth->isEnabled();\n }", "function auth_check()\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->is_logged_in();\n\t}" ]
[ "0.6682351", "0.6411934", "0.63961715", "0.631945", "0.6282531", "0.6252783", "0.6237317", "0.6196904", "0.6142553", "0.6141368", "0.612901", "0.6078345", "0.60560524", "0.6048749", "0.59934705", "0.593505", "0.59184295", "0.5914763", "0.5880123", "0.5878682", "0.5863729", "0.5859615", "0.5858017", "0.5854991", "0.58456546", "0.58425003", "0.5838332", "0.58327", "0.5832286", "0.5829703", "0.58274484", "0.5810748", "0.58008224", "0.5799491", "0.5788275", "0.57866704", "0.57841295", "0.5780128", "0.5777978", "0.5722258", "0.57115585", "0.57115394", "0.5698831", "0.5673474", "0.567238", "0.5667046", "0.5656236", "0.5638798", "0.5637273", "0.5633861", "0.5633606", "0.5624191", "0.56193435", "0.55955076", "0.5590459", "0.5580708", "0.5579037", "0.5575081", "0.5572979", "0.556997", "0.55623364", "0.5555936", "0.55546504", "0.5553647", "0.55495745", "0.5539684", "0.55378306", "0.552127", "0.5505403", "0.5504279", "0.54924524", "0.5491406", "0.54768896", "0.5468731", "0.5468605", "0.5467056", "0.5464955", "0.5461632", "0.54613", "0.5447474", "0.5443473", "0.5441545", "0.5440022", "0.543722", "0.5432212", "0.5431627", "0.54302263", "0.5422883", "0.5419251", "0.5415893", "0.5414329", "0.54132676", "0.5411389", "0.5409073", "0.5406266", "0.5405359", "0.5400302", "0.5400047", "0.5399868", "0.53937954" ]
0.6378861
3
Determine if the application should use provider avatars when registering.
public static function hasProviderAvatarsFeature(): bool { return static::enabled(static::providerAvatars()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function providerAvatars(): string\n {\n return 'provider-avatars';\n }", "function supportDefaultAvatar()\n {\n\n // Check if a default avatar is defined\n $default = $this->getDefaultImageConfiguration();\n if (empty($default['defaultavatar'])) {\n return false;\n }\n\n // check if default avatar method is configured as one of the avatar methods.\n for($methodnr = 1; $methodnr <= PLUGIN_EVENT_GRAVATAR_METHOD_MAX; $methodnr++){\n $method = $this->get_config(\"method_\" . $methodnr);\n\n // if none is configured, ignore later methods!\n if ($method == 'none'){\n return false;\n }\n\n // return true if default avatar method is found\n if ($method == 'default'){\n return true;\n }\n }\n return false;\n }", "public function hasAvatar()\n {\n return $this->avatar ? true : false;\n }", "protected function validateSortAndInitiateAvatarProviders() {}", "public function hasAvatar()\n {\n return isset($this->avatar);\n }", "public function hasAvatar() {\r\n\t\treturn !is_null($this->avatar);\r\n\t}", "public function hasAvatar(){\n return $this->_has(6);\n }", "public function hasAvatar(){\n return $this->_has(9);\n }", "public function hasAvatar(){\n return $this->_has(9);\n }", "public function hasAvatar(){\n return $this->_has(5);\n }", "public function usingSocialAccount()\n {\n return ( ! is_null($this->provider) && ! is_null($this->provider_id) ) ? true : false;\n }", "public function providerHasFriends(): bool\n {\n return $this->providerHasFriends;\n }", "public function isProviderFriendable($provider = null): bool;", "public function hasProfilePicture()\n {\n $file = public_path('/images/players/') . $this->id . '.webp';\n return ( file_exists($file) ) ? true : false;\n }", "public function providerHasDevices(): bool\n {\n return $this->providerHasDevices;\n }", "public function provides()\n\t{\n\t\treturn [\n\t\t\t'gravatar'\n\t\t];\n\t}", "public function canFriendProvider($provider = null): bool;", "public function providerHasDevices(): bool;", "public function is_default_userpic()\n {\n $this->log('Checking for default userpic');\n return (false !== strpos($this->_connection->get(\n self::HOST . self::ACCOUNT_OVERVIEW_URL,\n null,\n self::HOST . self::ACCOUNT_URL\n ), 'no_videos_'));\n }", "function hasProfilePicture()\n\t{\n\t\treturn $this->ppic;\n\t}", "function the_champ_social_login_provider_enabled($provider){\r\n\tglobal $theChampLoginOptions;\r\n\tif(the_champ_social_login_enabled() && isset($theChampLoginOptions['providers']) && in_array($provider, $theChampLoginOptions['providers'])){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "public function isProvider()\n {\n if ($this->type == 2) {\n return true;\n } else {\n return false;\n }\n }", "public static function hasProvider() {\n\t\treturn !is_null(self::$provider);\n\t}", "private function isAvatarDefault($avatar)\n {\n return strcmp($avatar, 'storage/avatars/user.png') == 0;\n }", "function b2c_has_social_login() {\n\treturn ! empty( b2c_get_current_user_auth_provider() );\n}", "public function hasProviders(): bool;", "public function providerHasFriends(): bool;", "public static function is_available () {\n\t\t$auth = op5Auth::instance();\n\t\tforeach (AuthModulePool_Model::all() as $module) {\n\t\t\t$driver = $auth->get_auth_driver($module->get_modulename());\n\t\t\tif (\n\t\t\t\t$driver->get_metadata('require_user_configuration') &&\n\t\t\t\t$driver->get_user_count() > 0\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "protected function detectLoginProvider() {}", "public function hasProviders();", "public function supportsRegistration()\n {\n if ($this->config->has('auth.external_concrete.registration.enabled')) {\n return (bool) $this->config->get('auth.external_concrete.registration.enabled');\n } else {\n // Legacy support\n return (bool) $this->config->get('auth.external_concrete5.registration.enabled', false);\n }\n }", "public static function user_has_providers()\n {\n $retval = false;\n\n $providers = self::get_providers_of_current_user();\n\n if (count($providers))\n {\n $retval = true;\n }\n\n return $retval;\n }", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function hasProvider($type);", "public function profile_complete()\n\t{\n\t\t$profile_image = glob(\"uploads/avatar/\".$this->_user->id.\"*\");\n\t\treturn ( ! empty($this->_user->biography) AND !empty($profile_image));\n\t}", "public static function getProviders()\n {\n return config('socialauth.providers', []);\n }", "public function isProviderFriendable($provider = null): bool\n {\n $baseClass = $this->getClassNameString($provider);\n\n return (bool) $this->providers->search(\n fn (MessengerProviderDTO $item) => $this->isBaseOrMorphClass($item, $baseClass)\n && $item->friendable\n );\n }", "public function fallbackAvatar($return_url = true)\n\t{\n\t\t$default_url = Helpers::plugin_url() . '/assets/images/avatar-fallback.png';\n\t\t$option = get_option('social_curator_fallback_avatar');\n\t\tif ( !$option && !$return_url) return false;\n\t\tif ( !$option && $return_url ) return $default_url;\n\t\tif ( !$option ) return '<img src=\"' . $default_url . '\" />';\n\t\tif ( $return_url ) return $option;\n\t\treturn '<img src=\"' . $option . '\" />';\n\t}", "public function isGroupProviderForUser()\n {\n return false;\n }", "public function initialize(){\n if(empty($this->avatar)){\n $this->setAvatar('/img/avatar/avatar-icon2.png');\n }\n }", "function fc_get_easySocial_avatar(){\r\n\t$user = Foundry::user();\r\n\t\r\n\t// Retrieve the avatar.\r\n\treturn correct_avatar_path($user->getAvatar());\r\n}", "public function canFriendProvider($provider = null): bool\n {\n return $provider\n && is_object($provider)\n && in_array(get_class($provider), $this->providerCanFriend);\n }", "protected function isImageMagickEnabledAndConfigured() {}", "public function getFriendableForCurrentProvider(): array;", "protected function shouldAutoInitiate(): bool\n {\n $socialDrivers = $this->socialAuthService->getActiveDrivers();\n $authMethod = config('auth.method');\n $autoRedirect = config('auth.auto_initiate');\n\n return $autoRedirect && count($socialDrivers) === 0 && in_array($authMethod, ['oidc', 'saml2']);\n }", "public function isProviderConfigurationActive($userId, $providerCode);", "protected function initAvatarRendering()\n\t{\n\t\tif (get_option(CommentsEncryptMain::OPTION_STORE_AVATAR_HASHES))\n\t\t{\n\t\t\trequire_once $this->root . '/lib/CommentsEncryptAvatar.php';\n\t\t\t$Avatar = new CommentsEncryptAvatar();\n\t\t\tadd_filter(\n\t\t\t\t'get_avatar',\n\t\t\t\tarray($Avatar, 'getAvatar')\n\t\t\t);\n\t\t}\n\t}", "function avatar_filter( $avatar, $user, $size, $default, $alt ) {\n global $pagenow;\n \n // Do not filter if inside WordPress options page\n if ( 'options-discussion.php' == $pagenow )\n return $avatar;\n\n // If passed an object, assume $user->user_id\n if ( is_object( $user ) )\n $id = $user->user_id;\n\n // If passed a number, assume it was a $user_id\n else if ( is_numeric( $user ) )\n $id = $user;\n\n // If passed a string and that string returns a user, get the $id\n else if ( is_string( $user ) && ( $user_by_email = get_user_by_email( $user ) ) )\n $id = $user_by_email->ID;\n\n // If somehow $id hasn't been assigned, return the result of get_avatar\n if ( empty( $id ) )\n return !empty( $avatar ) ? $avatar : $default;\n\n if ( !$this->loaded_defines ) {\n $this->defines();\n $this->loaded_defines = true;\n } \n \n // Let BuddyPress handle the fetching of the avatar\n $bp_avatar = $this->fetch( array( 'item_id' => $id, 'width' => $size, 'height' => $size, 'alt' => $alt ) );\n\n // If BuddyPress found an avatar, use it. If not, use the result of get_avatar\n return ( !$bp_avatar ) ? $avatar : $bp_avatar; \n }", "function imageUser($name) {\n\tif (File::exists(base_path() . '/public/avatar/' . $name)) {\n\t\treturn Asset('avatar/'.$name);\n\t} else {\n\t\treturn Asset('images/default-avatar.png');\n\t}\n}", "public function getDefaultAvatar()\n\t{\n\t\t$event = new Event('onApplicationGetDefaultAvatar');\n\t\tFactory::getDispatcher()->triggerEvent($event);\n\n\t\treturn $event->getArgument('avatar', false);\n\t}", "function isPeopleManager() {\n if($this->is_people_manager === null) {\n if($this->isAdministrator()) {\n $this->is_people_manager = true;\n } else {\n $this->is_people_manager = $this->getSystemPermission('people_management');\n } // if\n } // if\n return $this->is_people_manager;\n }", "protected function validateOwner()\n {\n $value = $this->owner->getValue();\n if (!isset($value['error']) || UPLOAD_ERR_NO_FILE == $value['error']) {\n return true;\n }\n $mime = $this->getConfig();\n return is_array($mime)? in_array($value['type'], $mime):\n $value['type'] == $mime;\n }", "function upm_get_avatar($avatar = '') {\r\n global $current_user;\r\n wp_get_current_user();\r\n\r\n if( $current_user && is_object($current_user) && is_a($current_user, 'WP_User')) {\r\n if ($current_user->has_cap('partner') && !empty($current_user->user_image)) {\r\n $avatar = wp_get_attachment_image_url($current_user->user_image,'thumbnail', false);\r\n } else {\r\n $avatar = get_avatar_url($current_user->ID);\r\n }\r\n }\r\n return \"<img class='avatar avatar-64 photo' src='\" . $avatar . \"'>\";\r\n}", "public static function isAllowedDomainProvider()\n {\n return array(\n ['https://gustavus.edu/test.jpg', true],\n ['http://distilery10.s3.amazonaws.com/images/456.jpg', true],\n ['https://news.blog.gac.edu/files/image_42843.jpg', true],\n ['http://ip-23-48-54-39.ec2.amazonaws.com/images/456.jpg', false],\n ['http://not.a.valid.site.com/images/123.jpg', false],\n );\n }", "static function isLoaded() {\n return Ak::getStaticVar('CurrentUser') != null;\n }", "public function hasProfilePreLoaded()\n {\n return property_exists($this, 'profile') && ! is_null($this->profile);\n }", "function wap8_custom_gravatar( $avatar_defaults ) {\n\t$sans_gravatar = of_get_option( 'sans_gravatar' );\n\tif ( !empty( $sans_gravatar ) ) {\n\t\t$avatar_defaults[$sans_gravatar] = __( 'Custom Gravatar', 'designcrumbs' );\n\t}\n\treturn $avatar_defaults;\n}", "protected function getAvatar_ManagerService()\n {\n return $this->services['avatar.manager'] = new \\phpbb\\avatar\\manager(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, ${($_ = isset($this->services['avatar.driver_collection']) ? $this->services['avatar.driver_collection'] : $this->getAvatar_DriverCollectionService()) && false ?: '_'});\n }", "function register_block_core_avatar()\n {\n }", "public function avatar(){\n if($this->avatar){\n return asset('/avatars/patients/'.$this->avatar);\n }else{\n return \"https://www.gravatar.com/avatar/{{md5(trim($this->fname))}}?d=mm&s=150\" ;\n }\n }", "public static function isAvailable()\n {\n return Image::isAvailable('gd');\n }", "abstract protected function isSocialUser($type);", "public function isProvidersCached(): bool;", "public function getUseSkuImageFallback()\n {\n $value = $this->_config->get('dataprocessing/images/sku_fallback');\n\n if ($value === null) {\n $value = true;\n }\n\n return (bool)$value;\n }", "public function userImageUriIsDefault($image_uri){\n return ($image_uri === 'default/img/default_img_male.jpg' || $image_uri === 'default/img/default_img_female.jpg');\n }", "public function isDefaultCropperEnabled()\n {\n return $this->defaultCropperEnabled;\n }", "public function getUserProvider()\n {\n return $this->userProvider;\n }", "public function userProvider() {\n return [\n // Test blocked authenticated user.\n [self::BLOCKED, self::AUTHENTICATED, 1, ['user']],\n // Test active anonymous user.\n [self::ACTIVE, self::ANONYMOUS, 0, []],\n // Test active authenticated user.\n [self::ACTIVE, self::AUTHENTICATED, 0, []],\n // Test blocked anonymous user.\n [self::BLOCKED, self::ANONYMOUS, 0, []],\n ];\n }", "public function defaultAvatarUrl()\n {\n $providerURL = 'https://ui-avatars.com/api/';\n $url = $providerURL . '?' . http_build_query([\n 'name' => urlencode($this->name),\n 'size' => $this->getAvatarSize(),\n 'color' => $this->getAvatarTextColor(),\n 'background' => $this->getAvatarBackgroundColor(),\n ]);\n \n return $url;\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}", "public function getAvatarImage() : string\n {\n $imagePlaceholder = asset('storage/images/profiles') . '/' . Auth::user()->avatar;\n\n if(empty(Auth::user()->avatar)) {\n $imagePlaceholder = asset('img/user-image-placeholder.png');\n }\n\n return $imagePlaceholder;\n }", "public function needAdditionalData()\n {\n $result = false;\n if ($this->provider !== null) {\n $result = $this->provider->needAdditionalData();\n }\n\n return $result;\n }", "public static function getEnabled()\n {\n return array_filter(\n $providers = array_keys(self::getProviders(), true, true),\n function ($provider) {\n // if ('google' === $provider && ends_with(config('app.url'), '.local')) {\n // return false;\n // }\n\n return self::isConfigured($provider);\n }\n );\n }", "public function avatar()\n {\n if (setting('enable_external_dependencies')) {\n return sprintf('https://www.gravatar.com/avatar/%s?size=%d', md5(strtolower($this->email)), 200);\n }\n\n return Avatar::create($this->username)->toBase64();\n }", "public function testAutoDetectLocation()\n {\n $values = [\"on\", \"\", 1, true];\n\n foreach ($values as $value) {\n $_SERVER['HTTPS'] = $value;\n $this->assertMatchesRegularExpression(\n '/src=\"https:\\/\\/secure.gravatar.com\\/avatar\\/[a-z0-9]{32}.+\"/',\n $this->_object->gravatar(\"example@example.com\")->__toString()\n );\n }\n }", "public function getAvatar(): string;", "public function avatar() {\n return $this->avatar_path ? Storage::url($this->avatar_path) : '/images/svg/avatar_default.svg';\n }", "public function setAvatar(string $avatar);", "private function isOnboardedWithAccountAndGoogle()\n {\n if (false === (new PsAccountsService())->getShopUuidV4() &&\n false === $this->configurationRepository->getGoogleLinkedValue()\n ) {\n return false;\n }\n\n return true;\n }", "public function hasDefaultUserAliasesPath()\n {\n return !empty($this->getDefaultUserAliasesPath())?:false;\n }", "public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }", "public static function init() {\n\t\tadd_filter( 'pre_get_avatar_data', array( 'Linkbacks_Avatar_Handler', 'pre_get_avatar_data' ), 11, 2 );\n\t\tadd_filter( 'get_avatar_data', array( 'Linkbacks_Avatar_Handler', 'anonymous_avatar_data' ), 12, 2 );\n\n\t\t// All the default gravatars come from Gravatar instead of being generated locally so add a local default\n\t\tadd_filter( 'avatar_defaults', array( 'Linkbacks_Avatar_Handler', 'anonymous_avatar' ) );\n\n\t\tadd_filter( 'get_avatar_comment_types', array( 'Linkbacks_Avatar_Handler', 'get_avatar_comment_types' ) );\n\t}", "private function isAvailableImageLibrary()\n {\n return ($this->isAvailableGD() || $this->isAvailableImageLibrary()) ? true : false;\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "protected function isFirstTimeSetup() {\n // If there are any auth providers, this isn't first time setup, even if\n // we don't have accounts.\n if (PhabricatorAuthProvider::getAllEnabledProviders()) {\n return false;\n }\n\n // Otherwise, check if there are any user accounts. If not, we're in first\n // time setup.\n $any_users = id(new PhabricatorPeopleQuery())\n ->setViewer(PhabricatorUser::getOmnipotentUser())\n ->setLimit(1)\n ->execute();\n\n return !$any_users;\n }", "public function setup($provider, $tokens = null) {\n\t\tswitch ($provider) {\n\t\t\tcase 'github':\n\t\t\t\t$this->setDbConfig($provider);\n\t\t\t\t$user = $this->find('all', array('fields' => 'users'));\n\t\t\t\t$this->setDbConfig();\n\t\t\t\t$data = $this->find('first', array('conditions' => array('type' => $provider, 'username' => $user['login'])));\n\t\t\t\tif (!$data) {\n\t\t\t\t\t$data['Account'] = array();\n\t\t\t\t}\n\t\t\t\t$data['Account']['username'] = $user['login'];\n\t\t\t\tif (isset($user['email']))\n\t\t\t\t\t$data['Account']['email'] = $user['email'];\n\t\t\tbreak;\n\t\t\tcase 'linkedin';\n\t\t\t\t$this->setDbConfig($provider);\n\t\t\t\t$user = $this->find('all', array('path' => 'people/~', 'fields' => array('id')));\n\t\t\t\t$this->setDbConfig();\n\t\t\t\t$data = $this->find('first', array('conditions' => array('type' => $provider, 'username' => $user['id'])));\n\t\t\t\tif (!$data) {\n\t\t\t\t\t$data['Account'] = array();\n\t\t\t\t}\n\t\t\t\t$data['Account']['username'] = $user['id'];\n\t\t\tbreak;\n\t\t\tcase 'flickr':\n\t\t\t\t$data = $this->find('first', array('conditions' => array('type' => $provider, 'username' => $tokens['user_nsid'])));\n\t\t\t\tif (!$data) {\n\t\t\t\t\t$data['Account'] = array();\n\t\t\t\t}\n\t\t\t\t$data['Account']['username'] = $tokens['user_nsid'];\n\t\t\tbreak;\n\t\t\tcase 'jsfiddle':\n\t\t\t\t$this->setDbConfig($provider);\n\t\t\t\t$user = $this->find('all', array('fields' => 'user'));\n\t\t\t\t$this->setDbConfig();\n\t\t\t\tif ($user) {\n\t\t\t\t\t$data = $this->find('first', array('conditions' => array('type' => $provider, 'username' => $user)));\n\t\t\t\t\tif (!$data) {\n\t\t\t\t\t\t$data['Account'] = array();\n\t\t\t\t\t}\n\t\t\t\t\t$data['Account']['username'] = $user;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'vimeo':\n\t\t\t\t$this->setDbConfig($provider);\n\t\t\t\t$user = $this->find('all', array('fields' => 'test'));\n\t\t\t\t$this->setDbConfig();\n\t\t\t\t$data = $this->find('first', array('conditions' => array('type' => $provider, 'username' => $user['user']['username'])));\n\t\t\t\tif (!$data) {\n\t\t\t\t\t$data['Account'] = array();\n\t\t\t\t}\n\t\t\t\t$data['Account']['username'] = $user['user']['username'];\n\t\t\tbreak;\n\t\t}\n\t\tif (!empty($tokens))\n\t\t\t$data['Account']['api_key'] = $tokens;\n\t\t$data['Account']['type'] = $provider;\n\t\t$data['Account']['user_id'] = Configure::read('owner');\n\t\treturn $this->save($data);\n\t}", "protected function isExternalImage() {}", "public function AvatarURL() {\n\t\t\n\t\tif (!empty($this->profil)) {\n\t\t\t\n\t\t\treturn $this->profil['user']['avatar150'];\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "function the_champ_social_avatar_options(){\r\n\tglobal $user_ID, $theChampLoginOptions;\r\n\tif(isset($theChampLoginOptions['enable']) && isset($theChampLoginOptions['avatar']) && isset($theChampLoginOptions['avatar_options'])){\r\n\t\tif(isset($_POST['ss_dontupdate_avatar'])){\r\n\t\t\t$dontUpdateAvatar = intval($_POST['ss_dontupdate_avatar']);\r\n\t\t\tupdate_user_meta($user_ID, 'thechamp_dontupdate_avatar', $dontUpdateAvatar);\r\n\t\t}else{\r\n\t\t\t$dontUpdateAvatar = get_user_meta($user_ID, 'thechamp_dontupdate_avatar', true);\r\n\t\t}\r\n\t\tif(isset($_POST['ss_small_avatar']) && heateor_ss_validate_url($_POST['ss_small_avatar']) !== false){\r\n\t\t\t$updatedSmallAvatar = str_replace('http://', '//', esc_url(trim($_POST['ss_small_avatar'])));\r\n\t\t\tupdate_user_meta($user_ID, 'thechamp_avatar', $updatedSmallAvatar);\r\n\t\t}\r\n\t\tif(isset($_POST['ss_large_avatar']) && heateor_ss_validate_url($_POST['ss_large_avatar']) !== false){\r\n\t\t\t$updatedLargeAvatar = str_replace('http://', '//', esc_url(trim($_POST['ss_large_avatar'])));\r\n\t\t\tupdate_user_meta($user_ID, 'thechamp_large_avatar', $updatedLargeAvatar);\r\n\t\t}\r\n\t\t?>\r\n\t\t<div class=\"profile\" style=\"margin-bottom:20px\">\r\n\t\t\t<form action=\"\" method=\"post\" class=\"standard-form base\">\r\n\t\t\t\t<h4><?php _e('Social Avatar', 'super-socializer') ?></h4>\r\n\t\t\t\t<div class=\"clear\"></div>\r\n\t\t\t\t<div class=\"editfield field_name visibility-public field_type_textbox\">\r\n\t\t\t\t\t<label for=\"ss_dontupdate_avatar_1\"><input id=\"ss_dontupdate_avatar_1\" style=\"margin-right:5px\" type=\"radio\" name=\"ss_dontupdate_avatar\" value=\"1\" <?php echo $dontUpdateAvatar ? 'checked' : '' ?> /><?php _e('Do not fetch and update social avatar from my profile, next time I Social Login', 'super-socializer') ?></label>\r\n\t\t\t\t\t<label for=\"ss_dontupdate_avatar_0\"><input id=\"ss_dontupdate_avatar_0\" style=\"margin-right:5px\" type=\"radio\" name=\"ss_dontupdate_avatar\" value=\"0\" <?php echo ! $dontUpdateAvatar ? 'checked' : '' ?> /><?php _e('Update social avatar, next time I Social Login', 'super-socializer') ?></label>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"editfield field_name visibility-public field_type_textbox\">\r\n\t\t\t\t\t<label for=\"ss_small_avatar\"><?php _e('Small Avatar', 'super-socializer') ?></label>\r\n\t\t\t\t\t<input id=\"ss_small_avatar\" type=\"text\" name=\"ss_small_avatar\" value=\"<?php echo isset($updatedSmallAvatar) ? $updatedSmallAvatar : get_user_meta($user_ID, 'thechamp_avatar', true) ?>\" />\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"editfield field_name visibility-public field_type_textbox\">\r\n\t\t\t\t\t<label for=\"ss_large_avatar\"><?php _e('Large Avatar', 'super-socializer') ?></label>\r\n\t\t\t\t\t<input id=\"ss_large_avatar\" type=\"text\" name=\"ss_large_avatar\" value=\"<?php echo isset($updatedLargeAvatar) ? $updatedLargeAvatar : get_user_meta($user_ID, 'thechamp_large_avatar', true) ?>\" />\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"submit\">\r\n\t\t\t\t\t<input type=\"submit\" value=\"<?php _e('Save Changes', 'super-socializer') ?>\" />\r\n\t\t\t\t</div>\r\n\t\t\t</form>\r\n\t\t</div>\r\n\t\t<?php\r\n\t}\r\n}", "public function canViewAssociate()\n {\n return $this->settings->MODULES['REW_ISA_MODULE']\n && ($this->auth->isSuperAdmin()\n || $this->auth->isAgent()\n || $this->isSelf());\n }", "function _getAvatarImg($data) {\n\t\tglobal $_JC_CONFIG, $mosConfig_live_site, $grav_link, $database, $mosConfig_absolute_path,\n\t\t\t\t$mosConfig_db;\n\t\t\n\t\t$grav_url = $mosConfig_live_site . \"/components/com_jomcomment/smilies/guest.gif\";\n\t\t\n\t\t$gWidth = ($_JC_CONFIG->get('gWidth')) ? intval($_JC_CONFIG->get('gWidth')) : \"\";\n\t\t$gHeight = ($_JC_CONFIG->get('gHeight')) ? intval($_JC_CONFIG->get('gHeight')) : \"\";\n\t\t\n\t\tswitch ($_JC_CONFIG->get('gravatar')) {\n\t\t\tcase \"gravatar\" :\n\t\t\t\t$gWidth = ($gWidth) ? $gWidth : \"40\";\n\t\t\t\t$grav_url = \"http://www.gravatar.com/avatar.php?gravatar_id=\" . md5($data->email) .\n\t\t\t\t\"&default=\" . urlencode($mosConfig_live_site . \"/components/com_jomcomment/smilies/guest.gif\") .\n\t\t\t\t\"&size=$gWidth\";\n\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"cb\" :\n\t\t\t\t$database->setQuery(\"SELECT avatar FROM #__comprofiler WHERE user_id=\" . $data->user_id . \" AND avatarapproved=1\");\n\t\t\t\t$result = $database->loadResult();\n\t\t\t\tif ($result) {\n\t\t\t\t\t// CB might store the images in either of this 2 folder\n\t\t\t\t\tif (file_exists($mosConfig_absolute_path . \"/components/com_comprofiler/images/\" . $result))\n\t\t\t\t\t\t$grav_url = $mosConfig_live_site . \"/components/com_comprofiler/images/\" . $result;\n\t\t\t\t\telse\n\t\t\t\t\t\tif (file_exists($mosConfig_absolute_path . \"/images/comprofiler/\" . $result))\n\t\t\t\t\t\t\t$grav_url = $mosConfig_live_site . \"/images/comprofiler/\" . $result;\n\t\t\t\t} \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"smf\" :\n\t\t\t\t$smfPath = $_JC_CONFIG->get('smfPath');\n\t\t\t\t$smfPath = trim($smfPath);\n\t\t\t\t$smfPath = rtrim($smfPath, '/');\n\t\t\t\tif (!$smfPath or $smfPath == \"\" or !file_exists(\"$smfPath/Settings.php\"))\n\t\t\t\t\t$smfPath = \"$mosConfig_absolute_path/forum\";\n\t\t\t\tif (!$smfPath or $smfPath == \"\" or !file_exists(\"$smfPath/Settings.php\")) {\n\t\t\t\t\t$database->setQuery(\"select id from #__components WHERE `option`='com_smf'\");\n\t\t\t\t\tif ($database->loadResult()) {\n\t\t\t\t\t\t$database->setQuery(\"select value1 from #__smf_config WHERE variable='smf_path'\");\n\t\t\t\t\t\t$smfPath = $database->loadResult();\n\t\t\t\t\t\t$smfPath = str_replace(\"\\\\\", \"/\", $smfPath);\n\t\t\t\t\t\t$smfPath = rtrim($smfPath, \"/\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (file_exists(\"$smfPath/Settings.php\")) {\n\t\t\t\t\tinclude(\"$smfPath/Settings.php\");\n\t\t\t\t\tmysql_select_db($mosConfig_db, $database->_resource);\n\t\t\t\t\t$useremail = $data->email;\n\t\t\t\t\tmysql_select_db($db_name, $database->_resource);\n\t\t\t\t\t$q = sprintf(\"SELECT avatar,ID_MEMBER FROM $db_prefix\" . \"members WHERE emailAddress='$useremail'\");\n\t\t\t\t\t$result = mysql_query($q);\n\t\t\t\t\tif ($result)\n\t\t\t\t\t{\n\t\t\t\t\t\t$result_row = mysql_fetch_array($result);\n\t\t\t\t\t\tmysql_select_db($mosConfig_db, $database->_resource);\n\t\t\t\t\t\tif ($result_row) {\n\t\t\t\t\t\t\t$id_member = $result_row[1];\n\t\t\t\t\t\t\tif (trim($result_row[0]) != \"\") {\n\t\t\t\t\t\t\t\tif (substr($result_row[0], 0, 7) != \"http://\")\n\t\t\t\t\t\t\t\t\t$grav_url = $boardurl . \"/avatars/$result_row[0]\";\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t$grav_url = $result_row[0];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmysql_select_db($db_name);\n\t\t\t\t\t\t\t\t$q = sprintf(\"SELECT ID_ATTACH FROM $db_prefix\" . \"attachments WHERE ID_MEMBER='$id_member' and ID_MSG=0 and attachmentType=0\");\n\t\t\t\t\t\t\t\t$result = mysql_query($q);\n\t\t\t\t\t\t\t\tif ($result)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$result_avatar = mysql_fetch_array($result);\n\t\t\t\t\t\t\t\t\tmysql_select_db($mosConfig_db, $database->_resource);\n\t\t\t\t\t\t\t\t\tif ($result_avatar[0])\n\t\t\t\t\t\t\t\t\t\t$grav_url = \"$boardurl/index.php?action=dlattach;attach=\" . $result_avatar[0] . \";type=avatar\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $grav_url;\n\t}", "function isPackageEnabled ($provider)\n {\n $registeredProvidersArray = array_keys (app ()->getLoadedProviders ());\n\n return in_array ($provider, $registeredProvidersArray);\n }", "function get_avatar($member_avatar=\"\", $member_view_avatars=0, $avatar_dims=\"x\", $avatar_type='', $no_cache=0 )\n {\n \t//-----------------------------------------\n \t// No avatar?\n \t//-----------------------------------------\n \t\n \tif ( ! $member_avatar or $member_view_avatars == 0 or ! $this->vars['avatars_on'] or ( strpos( $member_avatar, \"noavatar\" ) AND !strpos( $member_avatar, '.' ) ) )\n \t{\n \t\treturn \"\";\n \t}\n \t\n \tif ( substr( $member_avatar, -4 ) == \".swf\" and $this->vars['allow_flash'] != 1 )\n \t{\n \t\treturn \"\";\n \t}\n \t\n \t//-----------------------------------------\n \t// Defaults...\n \t//-----------------------------------------\n \t\n \t$davatar_dims = explode( \"x\", strtolower($this->vars['avatar_dims']) );\n\t\t$default_a_dims = explode( \"x\", strtolower($this->vars['avatar_def']) );\n \t$this_dims = explode( \"x\", strtolower($avatar_dims) );\n\t\t\n\t\tif (!isset($this_dims[0])) $this_dims[0] = $davatar_dims[0];\n\t\tif (!isset($this_dims[1])) $this_dims[1] = $davatar_dims[1];\n\t\tif (!$this_dims[0]) $this_dims[0] = $davatar_dims[0];\n\t\tif (!$this_dims[1]) $this_dims[1] = $davatar_dims[1];\n\t\t\n \t//-----------------------------------------\n \t// LEGACY: Determine type\n \t//-----------------------------------------\n\t\t\n\t\tif ( ! $avatar_type )\n\t\t{\n\t\t\tif ( preg_match( \"/^http:\\/\\//\", $member_avatar ) )\n\t\t\t{\n\t\t\t\t$avatar_type = 'url';\n\t\t\t}\n\t\t\telse if ( strstr( $member_avatar, \"upload:\" ) or ( strstr( $member_avatar, 'av-' ) ) )\n\t\t\t{\n\t\t\t\t$avatar_type = 'upload';\n\t\t\t\t$member_avatar = str_replace( 'upload:', '', $member_avatar );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$avatar_type = 'local';\n\t\t\t}\n\t \t}\n\t\n\t\t//-----------------------------------------\n\t\t// No cache?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $no_cache )\n\t\t{\n\t\t\t$member_avatar .= '?_time=' . time();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// No avatar?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $member_avatar == 'noavatar' )\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// URL avatar?\n\t\t//-----------------------------------------\n\t\t\n\t\telse if ( $avatar_type == 'url' )\n\t\t{\n\t\t\tif ( substr( $member_avatar, -4 ) == \".swf\" )\n\t\t\t{\n\t\t\t\treturn \"<object classid=\\\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\\\" width='{$this_dims[0]}' height='{$this_dims[1]}'>\n\t\t\t\t\t\t<param name='movie' value='{$member_avatar}'><param name='play' value='true'>\n\t\t\t\t\t\t<param name='loop' value='true'><param name='quality' value='high'>\n\t\t\t\t\t\t<param name='wmode' value='transparent'> \n\t\t\t\t\t\t<embed src='{$member_avatar}' width='{$this_dims[0]}' height='{$this_dims[1]}' play='true' loop='true' quality='high' wmode='transparent'></embed>\n\t\t\t\t\t\t</object>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"<img src='{$member_avatar}' border='0' width='{$this_dims[0]}' height='{$this_dims[1]}' alt='' />\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Not a URL? Is it an uploaded avatar?\n\t\t//-----------------------------------------\n\t\t\t\n\t\telse if ( ($this->vars['avup_size_max'] > 1) and ( $avatar_type == 'upload' ) )\n\t\t{\n\t\t\t$member_avatar = str_replace( 'upload:', '', $member_avatar );\n\t\t\t\n\t\t\tif ( substr( $member_avatar, -4 ) == \".swf\" )\n\t\t\t{\n\t\t\t\treturn \"<object classid=\\\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\\\" width='{$this_dims[0]}' height='{$this_dims[1]}'>\n\t\t\t\t\t\t<param name='movie' value='{$this->vars['upload_url']}/$member_avatar'><param name='play' value='true'>\n\t\t\t\t\t\t<param name='loop' value='true'><param name='quality' value='high'>\n\t\t\t\t\t\t<param name='wmode' value='transparent'> \n\t\t\t\t\t <embed src='{$this->vars['upload_url']}/$member_avatar' width='{$this_dims[0]}' height='{$this_dims[1]}' play='true' loop='true' quality='high' wmode='transparent'></embed>\n\t\t\t\t\t\t</object>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"<img src='{$this->vars['upload_url']}/$member_avatar' border='0' width='{$this_dims[0]}' height='{$this_dims[1]}' alt='' />\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// No, it's not a URL or an upload, must\n\t\t// be a normal avatar then\n\t\t//-----------------------------------------\n\t\t\n\t\telse if ($member_avatar != \"\")\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Do we have an avatar still ?\n\t\t \t//-----------------------------------------\n\t\t \t\n\t\t\treturn \"<img src='{$this->vars['AVATARS_URL']}/{$member_avatar}' border='0' alt='' />\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// No, ok - return blank\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\treturn \"\";\n\t\t}\n }", "public function isProviderOnline($provider = null): bool;", "function available()\n {\n static $available = null;\n if (is_null($available)) $available = FactoryPattern::available('Image_Filter'\n , dirname(__FILE__));\n return $available;\n }", "public function canImpersonate(): bool\n {\n return $this->can('impersonate-users');\n }", "public function profilePicture()\n {\n if ($this->picture) {\n return \"/storage/{$this->picture}\";\n }\n\n return 'http://i.pravatar.cc/200';\n }", "public function is_chooser_available() {\n\n\t\t// If custom app is not enabled, return false.\n\t\tif ( ! $this->get_plugin_setting( 'customAppEnable' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get site URL.\n\t\t$site_url = parse_url( get_site_url() );\n\n\t\t// Get origin from site URL.\n\t\t$origin = $site_url['scheme'] . '://' . $site_url['host'];\n\n\t\t// Get app key.\n\t\t$app_key = $this->get_app_key();\n\n\t\t// Prepare chooser URL.\n\t\t$chooser_url = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'origin' => $origin,\n\t\t\t\t'app_key' => $app_key,\n\t\t\t),\n\t\t\t'https://www.dropbox.com/chooser'\n\t\t);\n\n\t\t// Make a request to the chooser URL.\n\t\t$chooser_request = wp_remote_get( $chooser_url );\n\n\t\treturn ! is_wp_error( $chooser_request ) && 200 === $chooser_request['response']['code'];\n\n\t}", "public function isAssetsEnabled(): bool\n {\n return config('theme-system.assets', true) ?? true;\n }", "public function check_user_exists_provider() {\n return [\n 'Fetch by email' => [\n 'email', 's1@example.com', true\n ],\n 'Fetch by email, different case' => [\n 'email', 'S1@EXAMPLE.COM', true\n ],\n 'Fetch data using a non-existent email' => [\n 'email', 's2@example.com', false\n ],\n 'Multiple accounts with the same email' => [\n 'email', 's1@example.com', false, 1\n ],\n 'Fetch data using a valid user ID' => [\n 'id', true, true\n ],\n 'Fetch data using a non-existent user ID' => [\n 'id', false, false\n ],\n 'Fetch data using a valid username' => [\n 'username', 's1', true\n ],\n 'Fetch data using a valid username, different case' => [\n 'username', 'S1', true\n ],\n 'Fetch data using an invalid username' => [\n 'username', 's2', false\n ],\n 'Fetch data using a valid ID Number' => [\n 'idnumber', 's1', true\n ],\n 'Fetch data using an invalid ID Number' => [\n 'idnumber', 's2', false\n ],\n ];\n }" ]
[ "0.70216095", "0.6605752", "0.63519216", "0.6256076", "0.6111713", "0.60518104", "0.5999292", "0.59981203", "0.59981203", "0.59431463", "0.5853932", "0.5751328", "0.56215423", "0.5593554", "0.5577325", "0.55430853", "0.5527476", "0.5486564", "0.5406888", "0.53667474", "0.5359838", "0.53579915", "0.53460264", "0.53362083", "0.53340846", "0.5281128", "0.52566236", "0.5212047", "0.5207552", "0.51637137", "0.5161559", "0.51352084", "0.5108282", "0.5093274", "0.5087449", "0.5072441", "0.5069173", "0.50652754", "0.50483555", "0.50450075", "0.5038899", "0.5029134", "0.5018526", "0.5010037", "0.49841624", "0.4975453", "0.49676418", "0.49300808", "0.491443", "0.49109298", "0.49086815", "0.4898895", "0.48981133", "0.48912838", "0.48781127", "0.48737738", "0.48731396", "0.48602602", "0.48586378", "0.48569715", "0.48530626", "0.48489228", "0.48459563", "0.48415205", "0.48365647", "0.48017135", "0.47954795", "0.4792685", "0.47858799", "0.47839385", "0.47836918", "0.47767037", "0.47660702", "0.47620043", "0.47613648", "0.47537425", "0.47528595", "0.47486222", "0.47465745", "0.47458562", "0.47443902", "0.47379646", "0.4737087", "0.4737006", "0.47331926", "0.47295478", "0.47267213", "0.4723577", "0.47203958", "0.4719643", "0.46944672", "0.46866", "0.46853185", "0.4681833", "0.46783388", "0.4677458", "0.46726528", "0.4668976", "0.4664862", "0.46637186" ]
0.76804376
0
Determine if the application should remember the users session om login.
public static function hasRememberSessionFeatures(): bool { return static::enabled(static::rememberSession()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function is_remembered()\r\n {\r\n return false;\r\n }", "public function isRemembered() {\n if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_REMEMBERED])) {\n return $_SESSION[self::SESSION_FIELD_REMEMBERED];\n } else {\n return null;\n }\n }", "public function supportsRememberMe()\n {\n return false;\n }", "public function supportsRememberMe()\n {\n return false;\n }", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "public function supportsRememberMe()\n {\n }", "protected function detectRememberMe()\n {\n // TODO: Make remember me work in TenantLoginProvider\n }", "public function isViaRemember()\r\n\t{\r\n\t\treturn $this->viaRemember;\r\n\t}", "public function hasPersistentLogin();", "public function hasRememberMe()\n\t{\n return $this->cookies->has('RMU');\n }", "public static function isLogin()\n\t{\n\t\t$session = Common::getSession();\n\n\t\tif (!$session->has(self::$sessionName)) return false;\n\t\t$sessionInfo = $session->get(self::$sessionName);\n\n\t\t$sessionInfo = self::_cookieEncrypt($sessionInfo, 'DECODE');\n\t\tif (!$sessionInfo || !$sessionInfo[1] || !$sessionInfo[3]) return false;\n\t\tif (!$userInfo = self::getUserByName($sessionInfo[1])) return false;\n\t\tif ($sessionInfo[2] != $userInfo['user_id'] || $sessionInfo[3] != $userInfo['password']) {\n\t\t\treturn false;\n\t\t}\n\t\tself::_cookieUser($userInfo);\n\t\treturn $userInfo;\n\t}", "public static function isLogged()\n {\n $session = Session::Instance();\n\n if ( empty($session->get('uid')) ) {\n return false;\n }\n\n $redis = self::redisInstance();\n\n /** get data from cookie */\n $uid = Cookie::get('uid');\n $sid = Cookie::get('sid');\n $secret = Cookie::get('secret');\n $hash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n if ($redis->get($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash) && $hash == $secret) {\n\n // Создаем новую сессию\n $auth = new Model_Auth();\n $auth->recoverById($uid);\n\n $sid = $session->id();\n $uid = $session->get('uid');\n\n $redis->delete($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash);\n\n // генерируем новый хэш c новый session id\n $newHash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n // меняем хэш в куки\n Cookie::set('secret', $newHash, Date::MONTH);\n\n // сохраняем в редис\n $redis->set($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash, $sid . ':' . $uid . ':' . Request::$client_ip, array('nx', 'ex' => 2629744));\n\n } else {\n return false;\n }\n\n return true;\n }", "function check_login()\r\n {\r\n if ($this->user != null) {\r\n return true;\r\n }\r\n if (!isset($_COOKIE[$this->manifest['session_token']])) {\r\n return false;\r\n }\r\n $session = $this->load_controller('Session');\r\n $this->user = $session->recover_session_by_token($_COOKIE[$this->manifest['session_token']]);\r\n if ($this->user == false) {\r\n $session->remove_session_recover_cookie();\r\n return false;\r\n }\r\n return true;\r\n }", "public function hasRememberMe()\n {\n return $this->cookies->has('RMU');\n }", "protected function isLogin()\n {\n $skey = \\Web\\Config\\Auth::$prefix . $this->sessionId;\n if (\\Web\\Config\\Auth::$username != $this->gdata($skey)) {\n return false;\n }else{\n $this->gexpire($skey, \\Web\\Config\\Auth::$expire);\n return true;\n }\n }", "public function isLogin() {\n\t\treturn (empty($this->session)) ? false : $this->session->get('login', false);\n\t}", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }", "public function is_remember_me() {\n\t\treturn ! empty( $this->data['remember_me'] );\n\t}", "public function verifySession() {\n\t\t$this->reload();\n\t\tif ($this->getSession() == session_id())\n\t\t\treturn true;\n\t\telse {\n\t\t\tif($_SESSION[\"loginUser\"])\n\t\t\t\tunset($_SESSION[\"loginUser\"]);\n\t\t\treturn false;\n\t\t}\n\t}", "public function rememberExtendsSession();", "public function getRemember() {\n\t\tif (isset($_POST['remember'])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static function check_session() {\n\t\t\t// get redirect_to_default\n\t\t\t$redirect_to_default = Cookie::get('redirect_to_default');\n\t\t\t\n\t\t\t// if empty redirect_to_default set from default settings\n\t\t\tif(empty($redirect_to_default)){$redirect_to_default = REDIRECT_TO_DEFAULT;}\n\t\t\t\t\t\t\n\t\t\t// check if auth token is submitted\n\t\t\tif(isset($_GET['authtoken']))\n\t\t\t{\n\t\t\t\t// check auth token\n\t\t\t\t$authtoken = Functions::encrypt_decrypt('decrypt', $_GET['authtoken'], \"\\x73\\x6f\\x6d\\x31\\x34\\x31\\x30\\x40\\x73\\x6f\\x6d\\x6e\\x65\\x74\\x69\\x63\\x73\");\n\t\t\t\t\t\n\t\t\t\t// get auth token\n\t\t\t\t$authtoken = json_decode($authtoken);\n\t\t\t\t\n\t\t\t\t// set active session\n\t\t\t\tif(!isset($authtoken->keep_session)){$authtoken->keep_session = true;}\n\t\t\t\t\n\t\t\t\t// unset login state\n\t\t\t\tif(!$authtoken->keep_session){self::set_state(false);}\n\t\t\t}\n\t\t\t\n\t\t\t// if session exists\n\t\t\tif(!self::get_state())\n\t\t\t{\t\n\t\t\t\t// check requested url\n\t\t\t\tif(trim(REQUEST_URI) != trim(APP_PATH.'/'.$redirect_to_default))\n\t\t\t\t{\t\n\t\t\t\t\t// get return url\t\t\t\t\t\n\t\t\t\t\t$returnUrl = urlencode(ltrim(str_replace(APP_PATH, '', REQUEST_URI), '/'));\n\t\t\t\t\t\n\t\t\t\t\t// check if auth token is submitted\n\t\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n // get guest user info\n\t\t\t\t\t\t$guest_user = ORM::for_table('sys_user_login');\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user pass is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_pass))\n\t\t\t\t\t\t$guest_user = $guest_user->where('user_pass', $authtoken->auth_pass);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user company is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_comp))\n\t\t\t\t\t\t$guest_user = $guest_user->where('sys_company_id', $authtoken->auth_comp);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if user name is provided please authenticate it\n\t\t\t\t\t\tif(isset($authtoken->auth_name))\n\t\t\t\t\t\t\t$guest_user = $guest_user->where('user_name', $authtoken->auth_name)->find_one();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$guest_user = $guest_user->find_one($authtoken->auth_user);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// check if user exists\n\t\t\t\t\t\tif(is_object($guest_user))\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// start session and set session values\n\t\t\t\t\t\t\tself::set_state(true);\n\t\t\t\t\t\t\tself::set('user_id', $guest_user->id);\n\t\t\t\t\t\t\tself::set('user_name', $guest_user->user_name);\n\t\t\t\t\t\t\tself::set('first_name', $guest_user->first_name);\n\t\t\t\t\t\t\tself::set('last_name', $guest_user->last_name);\n\t\t\t\t\t\t\tself::set('full_name', trim($guest_user->first_name.' '.$guest_user->last_name));\n\t\t\t\t\t\t\tself::set('email', $guest_user->email);\n\t\t\t\t\t\t\tself::set('mobile', $guest_user->mobile);\n\t\t\t\t\t\t\tself::set('company_id', (empty($guest_user->sys_company_id) ? $authtoken->company_id : $guest_user->sys_company_id));\n\t\t\t\t\t\t\tself::set('is_super_admin', $guest_user->is_super_admin);\t\n\t\t\t\t\t\t\tself::set('is_guest', ($authtoken->auth_user==GUEST_ID ? 1 : 0));\t\n\t\t\t\t\t\t\tself::set('last_login', $guest_user->last_login);\t\n\t\t\t\t\t\t\tself::set('logged_with_master_password', false);\n\t\t\t\t\t\t\tself::set('authtoken', $authtoken);\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// redirect to given path\n\t\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\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{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.(empty($returnUrl) ? '' : '?returnUrl='.$returnUrl));\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else\n\t\t\t{\n\t\t\t\t// check if auth token is submitted\n\t\t\t\tif(isset($_GET['authtoken']))\n\t\t\t\t{\n\t\t\t\t\t// check for valid auth user\n\t\t\t\t\tif($authtoken->auth_user!=GUEST_ID)\n\t\t\t\t\t{\n\t\t\t\t\t\t// redirect to given path\n\t\t\t\t\t\theader('Location: '.BASE_URL.'/'.$redirect_to_default.'/authtoken_error?authtoken='.$_GET['authtoken']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*/\n\t\t}", "private function isLoggedin()\n\t{\n\t\t$this->idletime = 18000;\n\n\t\tif ((time()-$_SESSION['timestamp'])>$this->idletime)\n\t\t{\n\t\t\t$message = \"You are signed out from the previous session ! Please try sign in again!\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telseif($this->logged_in() == false)\n\t\t{\n\t\t\t$message = \"Invalid session !! Please try sign in again.\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_SESSION['timestamp'] = time();\n\t\t}\n\t}", "protected function checkRememberMe() {\n if ($this->app->getCookie($this->app->config->get('auth.remember')) && ! $this->app->auth) {\n $data = $this->app->getCookie($this->app->config->get('auth.remember'));\n $credentials = explode('___', $data);\n\n if (empty(trim($data)) || count($credentials) !== 2) {\n $this->app->response->redirect($this->app->urlFor('home'));\n }\n else {\n $identifier = $credentials[0];\n $token = $this->app->hash->hash($credentials[1]);\n\n $user = $this->app->user\n ->where('remember_identifier', $identifier)\n ->first();\n\n if ($user) {\n if ($this->app->hash->hashCheck($token, $user->remember_token)) {\n /*\n * Set session with user id.\n */\n $_SESSION[$this->app->config->get('auth.session')] = $user->id;\n\n /*\n * Instantiate auth variable with the corresponding User object.\n */\n $this->app->auth = $this->app->user->where('id', $user->id);\n\n /*\n * Generate a new remember token.\n */\n $rememberToken = $this->app->randomlib->generateString(128);\n\n $user->updateRememberCredentials(\n $identifier,\n $this->app->hash->hash($rememberToken)\n );\n\n $this->app->setCookie(\n $this->app->config->get('auth.remember'),\n \"{$identifier}___{$rememberToken}\",\n Carbon::parse('+6 month')->timestamp\n );\n }\n else {\n $user->removeRememberCredentials();\n }\n }\n }\n }\n }", "public function isSameSession() {\n\t\tif($this->ipAdress != $_SERVER[\"REMOTE_ADDR\"] || \n\t\t\t$this->userAgent != $_SERVER[\"HTTP_USER_AGENT\"]) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static function isLogin() {\r\n\t\treturn (bool) Session::get('login', KumbiaAuthBase::$namespace);\r\n\t}", "public function isLogin() {\n\t\t\t$this->login = isset($_SESSION['sess_login']) ? $_SESSION['sess_login'] : false;\n\t\t\t$this->timeout = isset($_SESSION['sess_timeout']) ? strtotime($_SESSION['sess_timeout']) : false;\n\n\t\t\tif(!$this->login) { return false; }\n\t\t\t\n\t\t\tif($this->login && $this->login === true && (time() > $this->timeout)) {\n\t\t\t\t$_SESSION['sess_login'] = false;\n\t\t\t\t$_SESSION['sess_lockscreen'] = true;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "public static function rememberSession(): string\n {\n return 'remember-session';\n }", "public function viaRemember()\n {\n return true;\n }", "function sessionSet(){\r\n\t\tif(isset($_SESSION[\"$this->session_name\"])) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function authLogin(): bool\n {\n if (!empty($_SESSION['sessionId'])) {\n return true;\n }\n\n return false;\n }", "public function isLogin() : bool\n {\n\n\n return (bool) Session::key()->currentUser;\n\n //return $this->validate();\n\n }", "public static function isLoggedIn() \n {\n // Check whether the session index with the SESSION_KEY\n // has been set\n if (Session::keyExists(self::SESSION_KEY)) {\n return true; \n }\n else {\n return false;\n }\n }", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function isAuth( ) {\n\t\tif( $this->getName() == null || $this->getId() == -1 ) {\n\t\t\treturn false;\n\t\t} elseif( isset($_SESSION) ) {\n\t\t\t// Make sure we have all the required session values.\n\t\t\tforeach( $this->SESSION_KEYS_USED as $key ){\n\t\t\t\tif( ! array_key_exists($key, $_SESSION) ){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function customerIsAlreadyLoggedIn()\n {\n return (bool)$this->httpContext->getValue(\\Magento\\Customer\\Model\\Context::CONTEXT_AUTH);\n }", "public function loggedIn(){\r\n if (isset($_SESSION['user_session']))\r\n return true;\r\n else\r\n return false;\r\n }", "public function rememberMe()\n\t{\n\t\t// TODO\n\t}", "function isAuthenticated(){\n return Session::has('SESSION_USER_NAME') ? true:false;\n}", "public function is_login()\n {\n $name=Session::get(\"username\");\n if($name)\n {\n return 1;\n }\n else\n {\n return 0;\n }\n }", "public function loggedIn() {\r\n //if userID is not proper then return False.\r\n if (intval($this->id) <= 0) {\r\n return False;\r\n }\r\n // if we last checked for login under a second ago then return true.\r\n if (($this->id == $_SESSION['id']) && $_SESSION['lastLoginCheckTime'] > microtime(true) - 1) {\r\n return True;\r\n } elseif (isset($_SESSION['switched_user'])) {\r\n $checkID = $_SESSION['switched_user'];\r\n } else {\r\n $checkID = $this->id;\r\n }\r\n $thisUserInfo = $this->dbConn->queryFirstRow(\"SELECT `ip` FROM `usermap` WHERE `user_id` = \".intval($checkID).\" ORDER BY `last_date` DESC LIMIT 1\");\r\n if (!$thisUserInfo || $thisUserInfo['ip'] != $_SERVER['REMOTE_ADDR']) {\r\n return False;\r\n }\r\n $_SESSION['lastLoginCheckTime'] = microtime(true);\r\n return True;\r\n }", "private function aim() {\n\t\t# The class pretends to use the session for storing the\n\t\t# permanent memory of one application\n\t\t# wheteher it does or doesn't a log in to execute it.\n\t\t# It has two ways of make the logout:\n\t\t#\ta) The logout is performed by calling to a website from\n\t\t#\t\twhich yhe user will need to login again to come back\n\t\t#\t\tinside the app.\n\t\t#\tb) The logout is performed changing to the anonymous user\n\t\t#\t\tand accessing to the places suitable for that user.\n\t}", "public function isUserLogged(){\r\n return isset($_SESSION[$this->userSessionKey]);\r\n }", "function isLogin(){\n if (session('?user_id'))\n return true;\n else\n return false;\n}", "public static function getAuth()\n {\n if( !isset($_SESSION['FOXY_userid']) ) {\n return false;\n }\n return true;\n }", "public function checkLoginStatus()\n\t{\n\t\tif (isset($_SESSION[$this->sess_auth]) || isset($_SESSION[$this->sess_cookie_auth])) {\n\t\t\treturn true;\n\t\t}\n\t}", "function is_authed() {\n\tif (isset($_SESSION['username'])) {\n\t\treturn true;\n\t}\n\telse {\n\t\treturn false;\n\t}\n}", "private\n function checkAuth()\n {\n if (!isset($_SESSION['artiste_id'])) {\n return false;\n }\n return true;\n }", "private function checkLogin()\n {\n if ($this->verifySession()) {\n $this->userId = $this->session['id'];\n }\n if ($this->userId === 0) {\n if ($this->verifyCookie()) {\n $this->userId = $this->cookie['userid'];\n $this->createSession();\n }\n }\n }", "public function isLoggedBack()\n {\n\t\t\n\t\t$cookie = Context::getInstance()->getCookie();\n\t\t$result = (\n\t\t\t$this->id && Validate::isUnsignedId($this->id) && $this->isAdmin() && self::checkPassword($this->id, $cookie->password, true) &&\n\t\t\t\t(!isset($cookie->remoteAddress) || ($cookie->remoteAddress == Tools::getNumericRemoteAddress()) || !Configuration::get('COOKIE_CHECKIP'))\n\t\t);\n\t\treturn $result;\n }", "public function loggedIn()\n {\n if($this->di->session->get('user'))\n {\n return true;\n }\n return false;\n }", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function sys_session_test(){\n session_name(\"MELOLSESSION\");\n session_start();\n if (isset($_SESSION[\"userId\"]) && isset($_SESSION[\"sessionId\"]) && isset($_REQUEST[\"sessionId\"])) {\n if ($_SESSION[\"sessionId\"] == $_REQUEST[\"sessionId\"]) {\n return TRUE;\n }\n }\n return FALSE;\n}", "private function isAuth()\n\t{\n\t\treturn $this->session->userdata('auth') ? true : false;\n\t}", "public static function verifyLogin():bool\n\t{\n\n\t\tif (\n\t\t\t!isset($_SESSION[User::SESSION])\n\t\t\t||\n\t\t\t!$_SESSION[User::SESSION]\n\t\t\t||\n\t\t\t!(int)$_SESSION[User::SESSION]['iduser'] > 0\n\t\t)\n\t\t{\n\t\t\n\t\t\treturn false;\n\t\t\n\t\t} else {\n\n\t\t\treturn true;\n\n\t\t} \n\n\t}", "public function login()\n\t{\n $identity = $this->getIdentity();\n if ($identity->ok) {\n\t\t\t$duration = $this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tYii::app()->user->login($this->getIdentity(), $duration);\n\t\t\treturn true;\n \n\t\t} else\n\t\t\treturn false;\n\t}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "protected function autoUserLogin(): bool\n {\n if (!isset($this->session) || !isset($this->session->user_id)) {\n $user = new User();\n $userInfo = $user->getUserById(1);\n if (!$userInfo) {\n View::render(500);\n exit;\n }\n\n $this->session->user_id = $userInfo['user_id'];\n $this->session->name = $userInfo['user_name'];\n $this->session->email = $userInfo['email'];\n }\n return true;\n }", "function checkLogin(){\n /* Check if user has been remembered */\n if(isset($_COOKIE['cookname']) && isset($_COOKIE['cookpass'])){\n $_SESSION['usernameremember'] = $_COOKIE['cookname'];\n $_SESSION['passwordremember'] = $_COOKIE['cookpass'];\n }\n\n /* Username and password have been set */\n if(isset($_SESSION['usernameremember']) && isset($_SESSION['passwordremember'])){\n /* Confirm that username and password are valid */\n if(confirmUser($_SESSION['usernameremember'], $_SESSION['passwordremember']) != 0){\n /* Variables are incorrect, user not logged in */\n unset($_SESSION['usernameremember']);\n unset($_SESSION['passwordremember']);\n return false;\n }\n return true;\n }\n /* User not logged in */\n else{\n return false;\n }\n}", "public function isLoggedIn() {\n if(!(isset($_SESSION[Strings::$sessionLocation])) || $_SESSION[Strings::$sessionLocation] === false)\n {\n return false;\n }\n else\n {\n return true;\n }\n }", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "private function verifySession()\n {\n if ((isset($this->session['id']))\n && (is_numeric($this->session['id']))\n && (isset($this->session['legit']))\n && ($this->session['legit'] === $this->sessionHash())\n ) {\n return true;\n }\n return false;\n }", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "function _read_user_session()\n {\t\t\n\t\tif($this->sh_Options['keeping_logic'] == 'db'){\n\t\t\t$this->is_present = $this->_read_user_session_db();\n\t\t} else {\n\t\t\t$this->is_present = $this->_read_user_session_ss();\n\t\t}\n\t}", "function login_check() {\n global $logvar;\n session_start();\n $obj = new Cryptography();\n\n if (isset($_SESSION[\"login_user\"])) {\n $de_log_var = $obj->decoding($_SESSION[\"login_user\"]);\n if ($de_log_var == $logvar) {\n\n return true;\n\n } else {\n\n return false;\n }\n\n } else {\n return false;\n\n }\n /*check for real user end*/\n}", "static function refresh_session_if_staying_logged_in() {\n if (!isset($_SESSION['id']) && isset($_COOKIE['stay_logged_in_hash']) && isset($_COOKIE['stay_logged_in_id'])) {\n // no session running but user has cookies indicating that he stayed logged in\n\n // confirm if the user stayed logged in\n if (Database::check_stay_logged_in($_COOKIE['stay_logged_in_id'], $_COOKIE['stay_logged_in_hash'])) {\n // the user stayed logged in\n // set the session cookie with the users id\n $_SESSION['id'] = $_COOKIE['stay_logged_in_id'];\n }\n }\n }", "public function resume() {\n \n if (!isset($_COOKIE) || !\\array_key_exists($this->name, $_COOKIE)) {\n\n //coookie prob expired\n $this->forget();\n return false;\n }\n\n\n\n if (!$this->sessionStarted()) {\n\n if (\\session_start()) {\n $this->refresh();\n }\n }\n if (!$this->isFingerprint()) { //UA doesnt match\n $this->forget();\n return false;\n }\n\n return true;\n }", "public function userActive(){\n\t\treturn (isset($this->session) && $this->session != null && isset($this->session['id']) && $this->session['id'] > 0) ? true : false;\n\t}", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "public function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\n }", "function remember_me ($remember_me = NULL)\n {\n\n\n //Set the \"Remember Me\" cookie name\n $cookie_name = $this->sess_name . '_remember';\n\n if ($remember_me === FALSE) {\n //Destroy the \"Remember Me\" setting\n \n /**\n * @todo replace '/' by related path\n * Added by NRGiser\n */\n setcookie($cookie_name, '', time()-42000, '/');\n return FALSE;\n }\n if ($remember_me === '' OR $remember_me === NULL) {\n //Return the value of the \"Remember Me\" setting\n if (isset($_COOKIE[$cookie_name])) {\n return $this->_ra_decode($_COOKIE[$cookie_name]);\n }\n /**\n * Added by NRGiser to avoid creation of remember me cookie for all users\n */\n return FALSE;\n }\n\n //We must be setting the remember me setting\n setcookie($cookie_name, $this->_ra_encode($remember_me), (time() + (60*60*24*365)), '/');\n return TRUE;\n }", "private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }", "public function isLogged()\n {\n return isset($this->sessionStorage->user) && ! empty($this->sessionStorage->user);\n }", "function checkLogin() {\n\t\t$fingerprint = fingerprint();\n\t\tsession_start();\n\t\tif (!isset($_SESSION['log_user']) || $_SESSION['log_fingerprint'] != $fingerprint) logout();\n\t\tsession_regenerate_id();\n\t}", "static function verifyLogin(){\r\n\r\n // check if there's a session\r\n if(session_id() == '' && !isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n // if session is started, check if a user is login or not\r\n if(isset($_SESSION[\"loggedin\"])){\r\n \r\n return true;\r\n }\r\n else{\r\n session_destroy();\r\n \r\n return false;\r\n }\r\n }", "public function logged_in()\n\t{\n\t\treturn $this->_me != NULL;\n\t}", "function check() \n\t{\n\t\t//On creation store the useragent fingerprint\n\t\tif(empty($_SESSION['fingerprint'])) \n\t\t{\n\t\t\t$_SESSION['fingerprint'] = $this->generate_fingerprint();\n\t\t} \n\t\t//If we should verify user agent fingerprints (and this one doesn't match!)\n\t\telseif($this->match_fingerprint && $_SESSION['fingerprint'] != $this->generate_fingerprint()) \n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t//If an IP address is present and we should check to see if it matches\n\t\tif(isset($_SESSION['ip_address']) && $this->match_ip) \n\t\t{\n\t\t\t//If the IP does NOT match\n\t\t\tif($_SESSION['ip_address'] != ip_address()) \n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\n\t\t//Set the users IP Address\n\t\t$_SESSION['ip_address'] = ip_address();\n\n\t\t//If a token was given for this session to match\n\t\tif($this->match_token) \n\t\t{\n\t\t\tif(empty($_SESSION['token']) OR $_SESSION['token'] != $this->match_token) \n\t\t\t{\n\t\t\t\t//Remove token check\n\t\t\t\t$this->match_token = FALSE;\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\n\t\t//Set the session start time so we can track when to regenerate the session\n\t\tif(empty($_SESSION['last_activity'])) \n\t\t{\n\t\t\t$_SESSION['last_activity'] = time();\n\t\t}\n\t\t//Check to see if the session needs to be regenerated\n\t\telseif($_SESSION['last_activity'] + $this->expiration < time()) \n\t\t{\n\t\t\t//Generate a new session id and a new cookie with the updated id\n//\t\t\tsession_regenerate_id(TRUE);\n session_regenerate_id();\n\n\t\t\t//Store new time that the session was generated\n\t\t\t$_SESSION['last_activity'] = time();\n\n\t\t}\n\t\treturn TRUE;\n\t}", "public static function isLoggedIn(): bool {\n return Session::instance()->has(AccessControl::SESSION_AUTH_KEY);\n }", "public function is_logged()\n {\n // set a variable to determine how to validate authentication data\n $validate_using = NULL;\n\n if (\n get_cookie($this->config->item('auth_cookie_id'), TRUE)\n && get_cookie($this->config->item('auth_cookie_key'), TRUE)\n ) {\n // store cookie informations in variables\n $encryptedUserIDs = get_cookie($this->config->item('auth_cookie_id'), TRUE);\n $enckey = get_cookie($this->config->item('auth_cookie_key'), TRUE);\n\n $validate_using = 'cookie';\n } else {\n // store session informations in variables\n $encryptedUserIDs = $this->session->userdata($this->config->item('auth_session_id'));\n $enckey = $this->session->userdata($this->config->item('auth_session_enkey'));\n\n $validate_using = 'session';\n }\n\n // check if any data is available\n if (empty($encryptedUserIDs) || empty($enckey)) {\n return FALSE;\n }\n\n // decrypt user IDs\n $userIDs = $this->encryption->decrypt($encryptedUserIDs);\n\n $userArray = explode('-', $userIDs);\n\n // return status\n return $this->auth_model->check_session($userArray[0], $userArray[1], $enckey, $validate_using);\n }", "function authenticated() {\n return $_SESSION['auth'] == md5(config('security.password.hash') . $_SESSION['user']['id']);\n}", "public static function remember_from_cookies() {\n\t\tif (isset($_COOKIE['remember']) && !(self::logged_in())) {\n\t\t\t$user_id = explode(\"==\", $_COOKIE['remember'])[0];\n\t\t\t$user = User::find_where(\"users\", array(\"id\" => $user_id));\n\t\t\t$expected = $user_id.\"==\".$user[0][\"remember_token\"];\n\t\t\tif ($user_id && $user && $expected == $_COOKIE['remember']) {\n\t\t\t\tSession::write(\"user\", $user);\n\t\t\t\t$remember_token = $user[0][\"remember_token\"];\n\t\t\t\tsetcookie(\"remember\", $user[0][\"id\"]. \"==\". $remember_token, time()+60*60*24*7);\n\t\t\t} else {\n\t\t\t\tsetcookie(\"remember\", null, -1);\n\t\t\t}\n\t\t}\n\t}", "public static function viaRemember(){\n return \\Illuminate\\Auth\\Guard::viaRemember();\n }", "public static function isLoggedIn()\n {\n if(isset($_SESSION[static::$sessionKey]))\n return (self::getUser(false) ? true : false);\n \n return false;\n }", "function cekLogin() {\n if ($this->session->userdata('login') == FALSE) {\n return FALSE;\n } else {\n return TRUE;\n }\n }", "public static function getLoginStatus(): bool\n\t{\n\t\tif (isset(self::$isLoggedIn)) return self::$isLoggedIn;\n\n\t\tsession_start([\n\t\t\t'name' => self::SESSION_NAME,\n\t\t\t'read_and_close' => true\n\t\t]);\n\n\t\tif (isset($_SESSION['tokens']) && count($_SESSION['tokens'])) {\n\t\t\t$token_count = count($_SESSION['tokens']);\n\t\t\t$cookie_count = 0;\n\n\t\t\tforeach ($_SESSION['tokens'] as $id => $token) {\n\t\t\t\tif (isset($_COOKIE[$id]) && $_COOKIE[$id] === $token)\n\t\t\t\t\t$cookie_count++;\n\t\t\t}\n\n\t\t\tif ($token_count === $cookie_count)\n\t\t\t\treturn self::$isLoggedIn = true;\n\n\t\t\t// if invalid credentials, clear cookies and destroy session\n\t\t\tforeach ($_COOKIE as $key => $value)\n\t\t\t\tself::setCookie($key, '');\n\n\t\t\tsession_start();\n\t\t\tsession_destroy();\n\t\t}\n\n\t\treturn self::$isLoggedIn = false;\n\t}", "function user_login_status() {\n $g = get_session('user_data');\n if (!empty($g)) {\n return true;\n }\n return false;\n}", "public function logged_in()\n {\n if (isset($_SESSION['user_data'])) {\n return true;\n } else {\n return false;\n }\n }", "public static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "private function checkLogin() {\n if (isset($_SESSION['login'])) {\n if ($_SESSION['login'] == true) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "private function is_authenticated()\n {\n if($this->mode == rabkTwttr::MODE_APP)\n return isset($_SESSION['access_token']);\n \n if($this->mode == rabkTwttr::MODE_USER)\n return isset($_SESSION['access_token']) && isset($_SESSION['access_token_secret']);\n }", "public static function loggedin()\r\n {\r\n if (Maker::get('logged_in_user') != null) {\r\n return Maker::get('logged_in_user');\r\n }\r\n\r\n $query = Mysql::query(\r\n 'SELECT u.* FROM sessions s LEFT JOIN users u ON s.userid=u.id\r\n WHERE s.sessid=%s AND s.password=u.password AND u.username=%s AND s.userid=%u AND s.ip=%b',\r\n Session::instance()->password,\r\n Session::instance()->username,\r\n Session::instance()->userid,\r\n ip()->realip\r\n );\r\n\r\n if ($query->rows == 1) {\r\n Maker::set('logged_in_user', $query->row);\r\n return true;\r\n }\r\n Maker::set('logged_in_user', null);\r\n return false;\r\n }", "static public function sessionIsValid()\n {\n try {\n $ret = false;\n\n session_start();\n\n // TODO: Make sure this is correct\n if (isset($_SESSION) && $_SESSION['sessionkey']) {\n $ret = true;\n\n // Update last activity time stamp\n $_SESSION['LAST_ACTIVITY'] = time();\n } else {\n session_unset();\n session_destroy();\n }\n\n return $ret;\n } catch (Exception $e) {\n return false;\n }\n }", "public function login()\n {\n Yii::$app->settings->clearCache();\n if ($this->validate() && $this->checkSerialNumberLocal()) {\n Yii::$app->settings->checkFinalExpireDate();\n $flag = Yii::$app->user->login($this->getUserByPassword(), 0);\n Yii::$app->object->setShift();\n return $flag;\n }\n \n return false;\n }", "public function sess_read()\n\t{\n\t\treturn ($this->session_valid()) ? parent::sess_read() : FALSE;\n\t}", "function isLogin()\n {\n if($this->ci->session->userdata('status')==1)\n {\n return true;\n }\n return false;\n }", "public static function isLoggedIn()\r\n\t\t{\r\n\r\n\t\t\tif(isset($_SESSION['user_session']))\r\n\t\t\t{\r\n\r\n\t\t\t\treturn $_SESSION['user_session'];\r\n\r\n\t\t\t}\r\n\r\n\t\t}", "function Pico_VerifySession()\n{\n\tglobal $db;\n\n\t$check = $db->force_multi_assoc('SHOW TABLES LIKE ?', PICO_SESSIONS);\n\tif (!is_array($check)) \n\t{\n\t\t$session_table = PICO_SESSIONS;\n\t\t$db->run(<<<SQL\nCREATE TABLE IF NOT EXISTS `$session_table` (\n `session_id` varchar(100) NOT NULL,\n `user_id` bigint(11) NOT NULL,\n `expiration` bigint(11) NOT NULL,\n `auth_token` varchar(50) NOT NULL\n);\nSQL\n);\n\t}\n\n\tif (!isset($_COOKIE['keep_session'])) { return 0; }\n\n\t$session_data = unserialize(base64_decode($_COOKIE['keep_session']));\n\tif (!is_array($session_data)) { exit(); } // hack attempt\n\n\t// delete old sessions\n\t$db->run('DELETE FROM `'.PICO_SESSIONS.'` WHERE `expiration`<?', time());\n\n\t// see if a valid session\n\t$user_id = $db->result('SELECT `user_id` FROM `'.PICO_SESSIONS.'` WHERE `session_id`=? AND `auth_token`=?', \n\t\t$session_data['session_id'], decrypt($session_data['auth_token'])\n\t);\n\n\tif (is_numeric($user_id))\n\t{\n\t\t$user_data = $db->assoc('SELECT * FROM `'.DB_USER_TABLE.'` WHERE `id`=?', $user_id);\n\t\t$user_ip = getenv('REMOTE_ADDR');\n\t\t$db->run('UPDATE `'.DB_USER_TABLE.'` SET `last_login`=?, `last_ip`=? WHERE `id`=?', time(), $user_ip, $user_id);\n\n\t\treturn $user_data['id'];\n\n\t\t//define('USER_ACCESS', $user_data['access']);\n\t\t//define('USER_ID', $user_data['id']);\n\t}\n\telse\n\t{\n\t\t// destroy cookie\n\t\t$domain = CookieDomain();\n\t\tsetcookie('keep_session', '', time() - 3600, '/', $domain);\n\n\t\treturn 0;\n\t\t//define('USER_ACCESS', 0);\n\t}\n}", "private function isLogin()\n {\n return Auth::user() !== null;\n }" ]
[ "0.74364054", "0.7167344", "0.70814973", "0.70814973", "0.705478", "0.69623625", "0.68998593", "0.6874661", "0.6869826", "0.6856636", "0.6810715", "0.68083256", "0.6797936", "0.67445314", "0.6744044", "0.67137724", "0.6691948", "0.66576785", "0.6643459", "0.6638388", "0.6634477", "0.66242486", "0.66106296", "0.6576959", "0.6573309", "0.65525955", "0.65357095", "0.64594793", "0.64548874", "0.64534646", "0.64311963", "0.641726", "0.6399529", "0.6366771", "0.6360944", "0.6354935", "0.6350535", "0.63330144", "0.63138056", "0.63125855", "0.6311721", "0.63110363", "0.62914705", "0.6290694", "0.6262014", "0.62535864", "0.62442267", "0.62428707", "0.6241316", "0.6240763", "0.62379074", "0.6235047", "0.62339085", "0.62335455", "0.6230417", "0.62295973", "0.62207234", "0.6220481", "0.62184167", "0.6217744", "0.62149364", "0.6214521", "0.62094647", "0.61956775", "0.6195452", "0.61911076", "0.61874443", "0.61735505", "0.6170688", "0.61665004", "0.61635274", "0.6151909", "0.6149926", "0.61480224", "0.61477286", "0.6143099", "0.6142579", "0.6132517", "0.6131664", "0.61308086", "0.6130514", "0.61301166", "0.6129553", "0.6129425", "0.6127498", "0.612456", "0.6122512", "0.6120793", "0.6111635", "0.6108294", "0.610724", "0.6106052", "0.6105437", "0.61030793", "0.6100268", "0.60965186", "0.60959595", "0.6095491", "0.6095077", "0.6090305" ]
0.67349786
15
Determine if the application should refresh the tokens on retrieval.
public static function refreshesOauthTokens(): bool { return static::enabled(static::refreshOauthTokens()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function refresh_token()\n {\n if ($result = $this->request('refresh_token')) {\n if (isset($result->token)) {\n $this->token_update($result->token);\n return true;\n }\n }\n return false;\n }", "public function hasRefreshToken ()\n {\n return $this->refreshToken != null;\n }", "private function refreshToken()\n {\n syslog(LOG_DEBUG, \"Monzo: Refreshing Token\");\n $data = array(\n 'grant_type' => 'refresh_token',\n 'client_id' => $this->clientId,\n 'client_secret' => $this->clientSecret,\n 'refresh_token' => $this->refreshToken\n );\n $jsonResponse = $this->getJson('/oauth2/token', $data, false);\n if (isset($jsonResponse['access_token']) && isset($jsonResponse['refresh_token']))\n {\n syslog(LOG_DEBUG, \"Monzo: Token refreshed, validating\");\n $this->refreshToken = $jsonResponse['refresh_token'];\n $this->bearerToken = $jsonResponse['access_token'];\n if ($this->validateTokens())\n {\n syslog(LOG_DEBUG, \"Monzo: Token refreshed, validated and stored\");\n $this->storeTokens($this->bearerToken, $this->refreshToken);\n return true;\n }else {\n syslog(LOG_DEBUG, \"Monzo: Token refreshed, but failed to validate\");\n return false;\n }\n }\n else\n {\n syslog(LOG_ERR, \"Monzo: Not able to refresh token\");\n throw new Exception('Monzo Not able to refresh token');\n return false;\n }\n }", "private function getRefreshToken() {\n if (!empty($this->refresh_token)) {\n return $this->refresh_token;\n } else {\n $api_keys=db_asocquery(\"SELECT * FROM cfgesitoken WHERE `tokenID` = '$this->tokenID';\");\n if (count($api_keys) == 1) {\n if (isset($api_keys[0]['token'])) {\n $this->refresh_token = $api_keys[0]['token'];\n return $this->refresh_token;\n }\n }\n }\n\treturn FALSE;\n }", "public function isRefreshExpired()\n {\n return $this->refresh_token->isExpired();\n }", "protected function refreshToken()\n {\n $user = Auth::user();\n\n if ($user) {\n $body = $this->getRefreshTokenBodyRequest($user);\n } else {\n // No user found. Terminate the session.\n return false;\n }\n\n $response = parent::post($this->refreshTokenUrl, $body);\n\n if ($response->failed()) {\n // Token did not refreshed, current session will be terminated\n return false;\n } else {\n $body = $response->json();\n\n if ($this->withoutWrapper) {\n $result = $body;\n } else {\n $result = $body[$this->wrapperKey];\n }\n\n // Store the new access token to the user repository\n $user->setAccessToken($result[$this->accessTokenName]);\n\n // If the result contain new refresh token, save it as well\n if (! is_null($result[$this->refreshTokenName])) {\n $user->setRefreshToken($result[$this->refreshTokenName]);\n }\n\n // Renew the token in the object memory\n $this->withToken($user->getAccessToken(), $user->getTokenSchema());\n\n return true;\n }\n }", "public function needsRefreshing()\n {\n return $this->isExpired() || ! $this->isLoaded();\n }", "protected function forceRefreshTokens()\n\t{\n\t\t/** @var ConnectorBox $connector */\n\t\t$connector = $this->getConnector();\n\t\t$config = Factory::getConfiguration();\n\t\t$pingResult = $connector->ping(true);\n\n\t\tFactory::getLog()->debug(sprintf(\"%s - Box tokens were forcibly refreshed\", __METHOD__));\n\n\t\t$config->set('engine.postproc.' . $this->settingsKey . '.access_token', $pingResult['access_token'], false);\n\t\t$config->set('engine.postproc.' . $this->settingsKey . '.refresh_token', $pingResult['refresh_token'], false);\n\n\t\t$profile_id = Platform::getInstance()->get_active_profile();\n\n\t\tPlatform::getInstance()->save_configuration($profile_id);\n\t}", "public function getRefreshToken()\n {\n if (!$this->psAccountsService) {\n return false;\n }\n\n return $this->psAccountsService->getRefreshToken();\n }", "private function checkTokenExpire()\n {\n if (new DateTime() > $this->tokenExpire) {\n $this->refreshToken();\n $this->getAuthorization();\n }\n }", "public function handleTokenRefreshRequest() {\n\t\tif (!elgg_is_xhr()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// the page's session_token might have expired (not matching __elgg_session in the session), but\n\t\t// we still allow it to be given to validate the tokens in the page.\n\t\t$session_token = get_input('session_token', null, false);\n\t\t$pairs = (array) get_input('pairs', [], false);\n\t\t$valid_tokens = (object) [];\n\t\tforeach ($pairs as $pair) {\n\t\t\tlist($ts, $token) = explode(',', $pair, 2);\n\t\t\tif ($this->validateTokenOwnership($token, $ts, $session_token)) {\n\t\t\t\t$valid_tokens->{$token} = true;\n\t\t\t}\n\t\t}\n\n\t\t$ts = $this->getCurrentTime()->getTimestamp();\n\t\t$token = $this->generateActionToken($ts);\n\t\t$data = [\n\t\t\t'token' => [\n\t\t\t\t'__elgg_ts' => $ts,\n\t\t\t\t'__elgg_token' => $token,\n\t\t\t\t'logged_in' => $this->session->isLoggedIn(),\n\t\t\t],\n\t\t\t'valid_tokens' => $valid_tokens,\n\t\t\t'session_token' => $this->session->get('__elgg_session'),\n\t\t\t'user_guid' => $this->session->getLoggedInUserGuid(),\n\t\t];\n\n\t\telgg_set_http_header(\"Content-Type: application/json;charset=utf-8\");\n\t\treturn elgg_ok_response($data);\n\t}", "public function getRefreshToken();", "public function validateRefreshToken()\n {\n try {\n\n // Try to get token from header\n $token = $this->getBearerToken();\n \n // let's check if refreshToken is valid\n $refreshToken = JWT::decode($token, API_REFRESH_TOKEN_KEY, [''.API_ALGORITHM.'']);\n \n //print_r($refreshToken);\n $db = new Database();\n $this->database = $db->connect(); \n \n $tokenType = TOKEN_TYPE_REFRESH;\n \n try {\n $sql = $this->database->prepare(\"SELECT UserId, \n Token FROM \n tokens WHERE \n Token = :token AND \n TokenType = :tokentype\");\n $sql->bindParam(\":token\", $token);\n $sql->bindParam(\":tokentype\", $tokenType);\n $sql->execute();\n $dbToken = $sql->fetch(PDO::FETCH_ASSOC);\n } catch (Exception $e) {\n $this->throwException(DATABASE_ERROR, \"Database select error.\");\n }\n \n //print_r($tokens);\n \n // if there is no any results from db return that there is no matchign refresh token\n if (!is_array($dbToken)) {\n $this->response(NO_MATCHING_REFRESH_TOKEN, \"No matching refresh token found.\"); \n }\n \n // Not needed, JWT::decode should throw an exception before this\n if ($refreshToken->exp < time()) {\n $this->throwException(REFRESH_TOKEN_ERROR, \"dsadsa\");\n }\n \n //print_r($dbToken);//debug\n \n //if validation has passed all above we still have to check if user is not disabled\n $sql = null;\n try {\n $sql = $this->database->prepare(\"SELECT Id, Disabled FROM users WHERE Id = :id\");\n $sql->bindParam(\":id\", $dbToken['UserId']);\n $sql->execute();\n $user = $sql->fetch(PDO::FETCH_ASSOC);\n } catch (Exception $e) {\n $this->throwException(DATABASE_ERROR, \"Database select error.\");\n }\n \n if ($user['Disabled'] == 1 ) {\n $this->response(USER_IS_DISABLED, \"This user is disabled.\");\n }\n \n // if refreshToken is valid. Let's generate new Tokens. Both tokens are always generated, \n // so it is enough to call generateTokens\n $this->generateTokens($dbToken['UserId'], $refreshToken->exp);\n \n } catch (Exception $e) {\n //close db connection\n //$this->database->disconnect();\n $this->throwException(REFRESH_TOKEN_ERROR, \"RefreshToken: \".$e->getMessage());\n }\n }", "public function refreshAccessTokenIfNecessary()\n {\n $user = auth()->user();\n // dd(json_decode($user->xero_access_token,true));\n $accessToken = new AccessToken(json_decode($user->xero_access_token,true));\n\n if ($accessToken->hasExpired()) {\n $accessToken = $this->getOAuth2()->refreshAccessToken($accessToken);\n\n $user->xero_access_token = json_encode($accessToken);\n dd(json_encode($accessToken));\n $user->save();\n $successMessage=\"New Access Token generated\";\n return $this->successResponse($user, $successMessage, 200);\n }\n $successMessage=\"Token Didn't expired\";\n return $this->successResponse($user, $successMessage, 200);\n }", "public function refreshToken()\n {\n return $this->refreshToken;\n }", "public function isRefreshTokenRevoked($tokenId)\n {\n return false;\n }", "public function getShouldRefreshShard()\n {\n return $this->shouldRefreshShard;\n }", "public function regenerateSessionAuthToken(): bool;", "public function refreshToken()\n {\n $token = $this->getToken();\n }", "public function getRefreshToken() {\n\t\treturn $this->refresh_token;\n\t}", "public function refreshToken()\n {\n return $this->token['refresh_token'] ?? null;\n }", "public function getNewRefreshToken()\n {\n // TODO: Implement getNewRefreshToken() method.\n }", "public function refresh()\n {\n try {\n if ($token = $this->guard()->refresh()) {\n return response()\n ->json([\n 'error' => false,\n 'message' => 'Your token already refreshed',\n 'data' => [\n 'token' => $token\n ]\n ], 200)\n ->header('Authorization', $token)\n ;\n }\n \n return response()->json([\n 'error' => true,\n 'message' => 'Your credentials is invalid, failed to refresh token',\n 'data' => []\n ], 401);\n } catch (\\Throwable $th) {\n $this->guard()->logout();\n\n return response()->json([\n 'error' => false,\n 'message' => 'Successfully logging out from system'\n ], 200);\n }\n }", "public function isRefreshTimeBasedCookie() {}", "public function isRefreshTimeBasedCookie() {}", "public function getRefreshToken()\n {\n return $this->refreshToken;\n }", "public function refreshToken()\n\t{\n\t\tAuth::user()->generateToken()->didUpdate()->save();\n\n\t\t// Return token\n\t\treturn response()->json([\n\t\t\t'status' => 'Token updated',\n\t\t\t'token' => Auth::user()->token,\n\t\t], 200);\n\t}", "public function isRefreshTokenRevoked($tokenId) {\n // TODO: Implement isRefreshTokenRevoked() method.\n return false;\n }", "public function get_refresh_token() {\n return $this->refreshtoken;\n }", "public function CanRefreshAccessToken(array $credentials) {\n return !empty($credentials['refresh_token']);\n }", "public function testRefreshTokenNotExpired()\n {\n $oauthToken = $this->getOAuthToken(GoogleApiAuthenticationTest::NOT_EXPIRED_IN_SECONDS);\n $request = $this->getRequestWithSession(serialize($oauthToken));\n\n $tokenHasBeenUpdated = $this->googleApiAuthentication->refreshToken($request);\n\n $this->assertFalse($tokenHasBeenUpdated);\n }", "public function accessTokenValid()\n {\n return $this->expireTime > time();\n }", "public function refresh(string $refreshToken) : bool\n {\n $postFields = array(\n 'client_id' => $this->connection->getClientId(),\n 'client_secret' => $this->connection->getClientSecret(),\n 'grant_type' => 'refresh_token',\n 'refresh_token' => $refreshToken\n );\n\n try {\n $token = $this->connection->post('/oauth/token', $postFields);\n $token = Response::toArray($token);\n $this->set($token);\n return true;\n } catch (\\Exception $e) {\n throw new CronofyException($e->getMessage(), $e->getCode());\n }\n }", "public function isAuthed(): bool\n {\n return ($this->status == self::STATUS_AUTHED);\n }", "public function removeRefreshToken();", "public static function refreshOauthTokens(): string\n {\n return 'refresh-oauth-tokens';\n }", "public function getNewRefreshToken() {\n return new RefreshToken();\n }", "public function testAndRefresh()\n {\n try {\n if (JWTAuth::parseToken()->getClaim('origin') == $this->claim) {\n $payload = JWTAuth::parseToken()->getPayload()->get('exp');\n\n switch (true) {\n case ($payload - Carbon::now()->timestamp > 600):\n return response()->json(['data' => ['status' => 1]], 200);\n break;\n case ($payload - Carbon::now()->timestamp > 0):\n return response()->json([\n 'data' => [\n 'status' => 2,\n 'access_token' => JWTAuth::parseToken()->refresh(),\n 'token_type' => 'bearer',\n 'expires_in' => JWTAuth::factory()->getTTL()\n ]\n ], 200);\n break;\n }\n } else {\n throw new AuthenticationException(null, 'Invalid Token');\n }\n } catch (TokenExpiredException $e) {\n return response()->json(['data' => ['status' => 0]], 200);\n } catch (JWTException $e) {\n throw new AuthenticationException($e->getMessage(), 'The token cannot be tested');\n }\n\n return response()->json(['data' => ['status' => 0]], 200);\n }", "public function checkToken() {\n if (!isset($this->requestToken)) {\n trigger_error(tr('Request token missing. Is the session module missing?'), E_USER_WARNING);\n return false;\n }\n if (!isset($this->data['access_token'])) {\n return false;\n }\n return $this->requestToken->getToken() === $this->data['access_token'];\n }", "public function testSessionWithoutOAuthToken()\n {\n $request = $this->getRequestEmptySession();\n\n $tokenHasBeenUpdated = $this->googleApiAuthentication->refreshToken($request);\n\n $this->assertEquals(false, $tokenHasBeenUpdated);\n }", "public function testRefreshUserByToken_()\n {\n $response = $this->apiCall($this->endpoint, 'post', [], true);\n\n // assert response status is correct\n $this->assertEquals($response->getStatusCode(), '200');\n }", "public function isRefreshable();", "public static function verifyRefreshJWT( $refreshJWT )\n {\n self::$UserDao = new UserDao();\n $refreshSecret = getenv('REFRESH_SECRET');\n $decoded = json_decode( JWT::decode( $refreshJWT, $refreshSecret, ['HS256'] ) );\n\n //la scadenza deve essere nel futuro\n $exp = $decoded->exp > time();\n //iat deve essere nel passato\n $iat = $decoded->iat < time();\n //il refreshToken dell'utente deve essere presente nel db\n $sub = $decoded->sub; // userID\n $userExist = null !== self::$UserDao->getRefreshToken($sub);\n\n if( $exp && $iat && $userExist ) return true;\n else{\n TokenManager::invalidateRefreshJWT($sub);\n return false;\n }\n }", "static function tokenGatekeeper() {\n $token = getInput(\"token\");\n $session_token = Cache::get(\"token\", \"session\");\n if ($token == $session_token) {\n return true;\n }\n return false;\n }", "public function getRefreshToken()\n {\n return $this->get('RefreshToken');\n }", "public function isAccessTokenExpired() {\n return ($this->received_at + $this->expires_in - 60) < time();\n }", "public function isRefreshTokenRevoked($tokenId)\n {\n // TODO: Implement isRefreshTokenRevoked() method.\n }", "public function testRefreshTokenExpiredWithoutTokenInStorage()\n {\n $oauthToken = $this->getOAuthToken(GoogleApiAuthenticationTest::EXPIRED_IN_SECONDS);\n $request = $this->getRequestWithSession(serialize($oauthToken));\n $this->mockTokenStorage(null);\n $this->mockGoogleResourceOwner();\n\n $tokenHasBeenUpdated = $this->googleApiAuthentication->refreshToken($request);\n\n $this->assertFalse($tokenHasBeenUpdated);\n }", "public function actionUseRefresh(): Response\n {\n // Do we have a token?\n $token = JwtManager::$plugin->jwts->getTokenFromRequest();\n if (!$token) {\n return $this->asJson(['token' => null]);\n }\n\n // Token valid?\n if (!JwtManager::$plugin->jwts->isTokenValid($token, Jwt::TYPE_REFRESH)) {\n return $this->asJson(['token' => null]);\n }\n\n // Can we get the payload?\n $payload = JwtManager::$plugin->jwts->getTokenPayload($token);\n if (!$payload) {\n return $this->asJson(['token' => null]);\n }\n\n // Can we find the related JWT?\n if (!isset($payload->relatedId)) {\n return $this->asJson(['token' => null]);\n }\n $jwt = JwtManager::$plugin->jwts->getJwtById($payload->relatedId);\n if (!$jwt) {\n return $this->asJson(['token' => null]);\n }\n\n // Refresh the token\n if (!JwtManager::$plugin->jwts->refreshJwt($jwt)) {\n return $this->asJson(['token' => null]);\n }\n\n // A JWT was used\n $refreshJwt = JwtManager::$plugin->jwts->getJwtBy([\n 'type' => Jwt::TYPE_REFRESH,\n 'token' => $token,\n ]);\n if ($refreshJwt) {\n JwtManager::$plugin->jwts->updateJwtUsage($refreshJwt);\n }\n\n return $this->asJson(['token' => $jwt->token]);\n }", "public function getRefreshToken()\n {\n if (! $this->refreshToken) {\n $this->exchange();\n }\n\n return $this->refreshToken;\n }", "public function testThatRefreshTokenIsRequired()\n {\n $env = self::getEnv();\n $api = new Authentication($env['DOMAIN'], $env['APP_CLIENT_ID'], $env['APP_CLIENT_SECRET']);\n\n try {\n $api->refresh_token( null );\n $caught_exception = false;\n } catch (ApiException $e) {\n $caught_exception = $this->errorHasString( $e, 'Refresh token cannot be blank' );\n }\n\n $this->assertTrue( $caught_exception );\n }", "public function isAuthed() {\n return $this->state == 2;\n }", "public function getRefreshToken(): string\n {\n return $this->refreshToken;\n }", "public function isTokenExpired()\n {\n return Carbon::now()->greaterThanOrEqualTo($this->getTokenExpiry()->subMinutes(5));\n }", "public function isTokenExpired()\n {\n return Carbon::now()->greaterThanOrEqualTo($this->getTokenExpiry()->subMinutes(5));\n }", "public function supportedToken()\n {\n if (!$this->diffTokenTimeExpire()) {\n $newToken = $this->createToken($this->user->getId());\n\n $this->user->updateUserToken($newToken);\n }\n return true;\n }", "public function testRefreshTokenExpired()\n {\n $oauthToken = $this->getOAuthToken(GoogleApiAuthenticationTest::EXPIRED_IN_SECONDS);\n $request = $this->getRequestWithSession(serialize($oauthToken));\n $this->mockTokenStorage($oauthToken);\n $this->mockGoogleResourceOwner();\n\n $tokenHasBeenUpdated = $this->googleApiAuthentication->refreshToken($request);\n\n $this->assertTrue($tokenHasBeenUpdated);\n }", "public function isRefreshTokenRevoked($tokenId) {\n\n $em = AuthDAL . getEntityManager();\n\n $refreshToken = $em->find('RefreshToken', $tokenId);\n\n return $refreshToken->get_is_revoked();\n }", "public function refreshToken($refreshToken,$userIdentifier){\r\n return $oAuthTokens = $this->oAuthClient->generateAccessTokenFromRefreshToken($refreshToken,$userIdentifier);\r\n }", "public function refreshToken()\n {\n return $this->response->array([]);\n }", "public function getNewRefreshToken()\n {\n return new RefreshTokenEntity;\n }", "public function isRegenerated(): bool;", "public function refreshAccessToken () {\n\n if ( $this->refresh_token ) {\n \t\n $body = array (\n\t\t\t \"grant_type\" \t=> \"refresh_token\", \n\t\t\t \"client_id\" \t=> $this->client_id, \n\t\t\t \"client_secret\" => $this->client_secret, \n\t\t\t \"refresh_token\" => $this->refresh_token\n );\n\n $opts = array (\n\t\t\t CURLOPT_POST \t\t=> true, \n\t\t\t CURLOPT_POSTFIELDS \t=> $body\n );\n \n $request = $this->execute ( self::$OAUTH_URL, $opts );\n\n if ( $request[\"httpCode\"] == 200 ) {\n \t \n $this->access_token = $request[\"body\"]->access_token;\n\n if ( $request[\"body\"]->refresh_token ) {\n \n \t$this->refresh_token = $request[\"body\"]->refresh_token;\n }\n \n return $request;\n\n } else {\n \t\n return $request;\n } \n \n } else {\n \t\n $result = array (\n\t\t\t \t'error' \t=> 'Offline-Access is not allowed.',\n\t\t\t \t'httpCode' => null\n );\n \n return $result;\n } \n }", "final public function checkAuth(bool $refresh = true): bool\n {\n $data = $this->session->authData;\n\n if (is_array($data)\n && isset($data['username'])\n && isset($data['expiry'])\n && isset($data['checkhash'])\n && md5($data['username'] . $data['expiry'] . $this->config->getSalt()) == $data['checkhash']\n && time() <= $data['expiry']\n ) {\n // Refresh the expiry time\n if ($refresh) {\n $data['expiry'] = time() + $this->config->getIdletime();\n $data['checkhash'] = md5($data['username'] . $data['expiry'] . $this->config->getSalt());\n $this->session->authData = $data;\n }\n\n return true;\n }\n $this->logout();\n\n return false;\n }", "private function save_refresh_token() {\n global $DB, $USER;\n\n $newdata = new stdClass();\n $newdata->refreshtokenid = $this->client->getRefreshToken();\n $newdata->gmail = $this->get_user_info()->email;\n\n if (!is_null($newdata->refreshtokenid) && !is_null($newdata->gmail)) {\n $rectoken = $DB->get_record('repository_gdrive_tokens', array ('userid' => $USER->id));\n if ($rectoken) {\n $newdata->id = $rectoken->id;\n if ($newdata->gmail === $rectoken->gmail) {\n unset($newdata->gmail);\n }\n $DB->update_record('repository_gdrive_tokens', $newdata);\n } else {\n $newdata->userid = $USER->id;\n $newdata->gmail_active = 1;\n $DB->insert_record('repository_gdrive_tokens', $newdata);\n }\n }\n\n $event = \\repository_googledrive\\event\\repository_gdrive_tokens_created::create_from_userid($USER->id);\n $event->trigger();\n }", "function csrf_token_is_recent() {\n\t$max_elapsed = 60 * 60 * 24; // 1 day\n\tif(isset($_SESSION['csrf_token_time'])) {\n\t\t$stored_time = $_SESSION['csrf_token_time'];\n\t\treturn ($stored_time + $max_elapsed) >= time();\n\t} else {\n\t\t// Remove expired token\n\t\tdestroy_csrf_token();\n\t\treturn false;\n\t}\n}", "protected function hasAccessToken()\n {\n return (bool)$this->_accessToken;\n }", "public function tokenShouldBeUpdated($platform)\n {\n $column = \"{$platform}_token_expires_at\";\n\n if (is_null($this->{$column})) return false;\n\n return abs($this->{$column}->diffInDays(Carbon::now())) < 5;\n }", "public function getSpotifyRefreshToken()\n {\n return $this->spotifyRefreshToken;\n }", "public function tokenExpired()\n {\n if (empty($this->token_expires)) {\n return true;\n }\n\n return new FrozenTime($this->token_expires) < FrozenTime::now();\n }", "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}", "public function hasAccessToken();", "public function validateAccessToken(): bool\n {\n // Token is null or has expired.\n if (!$this->isAccessTokenValid()) {\n $this->refreshAccessToken();\n }\n\n return true;\n }", "public function getRefreshTokenExpiration()\n\t{\n\t\treturn $this->accessTokenExpiration;\n\t}", "public function refreshAccessToken(): string\n {\n // TODO: check the current token expiry\n $updatedToken = null;\n\n return $updatedToken;\n }", "public function refreshToken() {\n $token = $this->controller->refreshToken();\n\n return $this->response(compact('token'));\n }", "public function authenticate() {\n if ($this->client->isAccessTokenExpired()) {\n $token = $this->client->getAccessToken();\n var_dump($token);\n// $this->client->getAuth()->refreshToken($token['refresh_token']);\n $_SESSION[self::ACCESS_TOKEN] = $this->client->getAccessToken();\n }\n\n return true;\n }", "public function getNewRefreshToken() {\n return new RefreshTokenEntity();\n }", "public function isRefreshTokenRevoked($id)\n {\n if ($token = $this->find($id)) {\n return $token->isRevoked();\n }\n\n return true;\n }", "public function isAccessTokenExpired()\n {\n return time() > $this->accessToken->created + $this->accessToken->expires_in;\n }", "public function getRefreshToken($refreshToken);", "public function getRefreshToken(): ?string;", "public function isTokenExpired()\n {\n $expireTime = $this->getDataValue('expiration') - time();\n return $expireTime < 5;\n }", "public function revokeRefreshToken(string $refresh_token): bool\n {\n return RefreshToken::firstWhere('uuid', $refresh_token)->update(['expire_at' => now()]);\n }", "public function is_access_token_expired() {\n\t\tif ( null == $this->token ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check if the token is expired in the next 30 seconds.\n\t\t$expired = ( $this->token['created'] + ( $this->token['expires_in'] - 30 ) ) < time();\n\n\t\treturn $expired;\n\t}", "protected function regenerateTokenIfNotNew()\n {\n if ($this->tokenExpiry !== null) {\n $this->regenerateToken();\n }\n }", "private static function getGFusionOAuthRefreshToken() {\n\t\treturn '1/zuRSQC5Q12yBoJ1idPljEw4xlolOWXrp4hyoKSC1C2o';\n\t}", "function isAuthed ()\r\n\t{\r\n\t\tif ((strlen($this->acUserAuth) > 0 ? $this->acUserAuth : 0) >= $this->acPageAuth)\r\n\t\t{\r\n\t\t\t$status = true;\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$status = false;\r\n\t\t}\r\n\t\treturn $status;\r\n\t}", "public function testRefreshToken() {\n $client = static::createClient();\n\n $client->request('POST', '/api/user/refresh');\n $this->assertEquals($client->getResponse()->getContent(), '{\"error\":\"The payload is not correct.\"}');\n\n $client = static::createClient();\n $client->request('POST', '/api/user/refresh', array(), array(), array('CONTENT_TYPE' => 'application/json'), '{\"auth\":\"pizza\"}');\n\n $this->assertEquals($client->getResponse()->getContent(), '{\"error\":\"The refresh token is missing\"}');\n\n // Get the access token.\n $access_token = $this->getTahiniAccessToken()->getAccessToken($this->createUser(false));\n\n // Refreshing the access token.\n $client = static::createClient();\n $client->request('POST', '/api/user/refresh', array(), array(), array('CONTENT_TYPE' => 'application/json'), '{\"refresh_token\":\"' . $access_token->refresh_token . '\"}');\n\n $decoded_response = json_decode($client->getResponse()->getContent());\n\n $new_access_token = $this->getTahiniAccessToken()->loadByAccessToken($decoded_response->access_token);\n $this->assertNotEquals($new_access_token->id, $access_token->id);\n }", "public function refreshOnSave()\n {\n return $this->refreshOnSave;\n }", "public function isAutoReload()\n {\n return $this->autoReload;\n }", "public function isRublonConfigured() {\t \t \n\t\treturn ($this->getSystemToken() AND $this->getSecretKey());\n\t}", "public function refreshAccessToken(): AccessToken;", "public function testRefreshTokenGetterAndSetter()\n {\n $user = new User();\n $user->setRefreshToken('foo');\n\n $this->assertEquals('foo', $user->getRefreshToken());\n }", "public function isAuthenticated()\n\t{\n\t\t$token = $this->getToken();\n\n\t\tif (!$token || !array_key_exists('access_token', $token))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telseif (array_key_exists('expires_in', $token) && $token['created'] + $token['expires_in'] < time() + 20)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "public static function _refresh($service, &$error = null, $threshold = null) {\n\t\tif (!is_array($config = static::config($service))) {\n\t\t\treturn false;\n\t\t}\n\t\t$attempt = 0;\n\t\t$adapter = $config['token_cache'];\n\t\t$key = self::_key($service);\n\n\t\tif (!($cache = TokenCache::read($adapter, $key)) || !$cache['authorized']) {\n\t\t\t$error = \"Unable to locate valid access credentials.\";\n\t\t\treturn false;\n\t\t}\n\n\t\t$expires = static::adapter($service)->expires($cache['token']);\n\t\twhile ($expires && (!$threshold || time() + $threshold > $expires)) {\n\n\t\t\tif ($attempt++ > 5) {\n\t\t\t\t$error = \"Unable to refresh token.\";\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($cache = TokenCache::read($adapter, $key, array('block' => true))){\n\n\t\t\t\tif (!$cache['authorized']) {\n\t\t\t\t\t$error = $cache['error'];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (!static::adapter($service)->refresh($cache['token'], $error)) {\n\t\t\t\t\t$cache['authorized'] = false;\n\t\t\t\t\t$cache['error'] = $error;\n\t\t\t\t\tTokenCache::write($adapter, $key, $cache, '+2 Years');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tTokenCache::write($adapter, $key, $cache, '+2 Years');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telseif (!$cache = TokenCache::read($adapter, $key) || !$cache['authorized']) {\n\t\t\t\t$error = $cache['error'] ?: \"Unable to locate valid access credentials.\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn $cache;\n\t}", "protected function needsIdRegen() {\n return (\n (\n $this->config->regenIdInterval > 0 &&\n time() >= $this->metadata->regenerateIdAt\n ) ||\n (\n $this->config->regenIdCount > 0 &&\n $this->metadata->sessionStartCount >= $this->config->regenIdCount\n )\n );\n }", "private function validateTokens()\n {\n $whoami = $this->getJson('/ping/whoami');\n if (isset($whoami['authenticated']) && $whoami['authenticated'])\n {\n syslog(LOG_DEBUG, \"Monzo: Token is still valid\");\n return true;\n }\n else\n {\n return false;\n }\n }", "public function refresh(): Response\n {\n return $this->respondWithToken(auth()->refresh());\n }", "function is_valid_token($request)\n\t{\n\t\tif (!isset($request->token) || empty($request->token))\n\t\t\treturn [FALSE, ['message' => F::lang('err_token_invalid')]];\n\t\t// else\n\t\t\t// $request->token = urldecode($request->token);\n\t\t\n\t\tif ($request->agent == 'android') {\n\t\t\t$token = ['android_token' => $request->token];\n\t\t}\n\t\tif ($request->agent == 'ios') {\n\t\t\t$token = ['ios_token' => $request->token];\n\t\t}\n\t\tif ($request->agent == 'web') {\n\t\t\t$token = ['web_token' => $request->token];\n\t\t}\n\t\t\n\t\t$ci = &get_instance();\n\t\t$ci->load->model('auth_model');\n\t\t$row = $ci->auth_model->get_token($token);\n\t\tif (!$row)\n\t\t\treturn [FALSE, ['message' => F::lang('err_token_invalid')]];\n\n\t\tif ($request->agent == 'android') {\n\t\t\t$token = $row->android_token;\n\t\t\t$token_exp = $row->android_token_expired;\n\t\t}\n\t\tif ($request->agent == 'ios') {\n\t\t\t$token = $row->ios_token;\n\t\t\t$token_exp = $row->ios_token_expired;\n\t\t}\n\t\tif ($request->agent == 'web') {\n\t\t\t$token = $row->web_token;\n\t\t\t$token_exp = $row->web_token_expired;\n\t\t}\n\t\t\n\t\tif ($request->token != $token)\n\t\t\treturn [FALSE, ['result' => NULL, 'message' => F::lang('err_token_invalid')]];\n\t\t\n\t\tif ($token_exp < date('Y-m-d H:i:s'))\n\t\t\treturn [FALSE, ['result' => NULL, 'message' => F::lang('err_token_expired')]];\n\t\t\n\t\treturn [TRUE, ['result' => $row, 'message' => NULL]];\n\t}" ]
[ "0.73907757", "0.7220211", "0.70071495", "0.67945766", "0.66890967", "0.6637173", "0.6608096", "0.6410184", "0.63523567", "0.6350197", "0.6346775", "0.6345005", "0.63357264", "0.62909764", "0.62741846", "0.6215936", "0.619032", "0.618808", "0.61257285", "0.61062133", "0.6099148", "0.60776764", "0.60748565", "0.60636324", "0.60636324", "0.60172987", "0.6013131", "0.6011736", "0.59741175", "0.596798", "0.59635824", "0.5888463", "0.5876072", "0.5857139", "0.5836456", "0.5828669", "0.58252394", "0.58182913", "0.5807837", "0.5805283", "0.5795738", "0.57955986", "0.5786749", "0.57681733", "0.57589126", "0.57488084", "0.5744298", "0.5733439", "0.57331705", "0.573105", "0.5710437", "0.5697541", "0.5693928", "0.56929314", "0.56929314", "0.5691948", "0.56883395", "0.56753474", "0.56590444", "0.5656692", "0.56545967", "0.56493175", "0.56427586", "0.56326765", "0.5632003", "0.5621003", "0.5614538", "0.5606086", "0.5583427", "0.55715424", "0.5561692", "0.5561679", "0.55506897", "0.5545978", "0.5542521", "0.55353886", "0.55347574", "0.55333465", "0.5517991", "0.5513168", "0.5495661", "0.54890054", "0.5488557", "0.54861027", "0.5484863", "0.54834366", "0.54767007", "0.5453905", "0.54507184", "0.54498005", "0.5436807", "0.54262805", "0.5424159", "0.5414985", "0.5404488", "0.53967226", "0.53961694", "0.53920114", "0.5386614", "0.53807586" ]
0.77682203
0
Enabled the generate missing emails feature.
public static function generateMissingEmails(): string { return 'generate-missing-emails'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function generatesMissingEmails(): bool\n {\n return static::enabled(static::generateMissingEmails());\n }", "public function isEmailDisabled()\n {\n return !Mage::getStoreConfigFlag('markdown/markdown/enable_email');\n }", "protected function useEmailNotificationsDeduplication()\n {\n return false;\n }", "protected function useEmailNotifications()\n {\n return true;\n }", "function testDebugDoNotEmail() {\n Debug::$enable_send = false;\n $this->assertFalse(Debug::sendEmail());\n }", "public function enableEmailNoRecordExists()\n {\n // Get user mapper\n $userMapper = $this->getUserMapper();\n \n // Check if user mapper is empty\n if (empty($userMapper)) {\n // Throw an exception\n throw new \\RuntimeException(\"User mapper is required, none given.\");\n }\n \n // Attact validator\n return $this->attactEmailValidator('User\\Validator\\NoRecordExists', array(\n 'field' => 'email',\n 'mapper' => $userMapper,\n ));\n }", "public function filterValidEmailsProvider() {}", "function filter_enabled_email( $email ) {\n\n $get_option_id = $email->get_option_id();\n $can_not_be_disabled = apply_filters( 'email_settings_enable_filter', [\n 'erp_email_settings_new-leave-request',\n 'erp_email_settings_approved-leave-request',\n 'erp_email_settings_rejected-leave-request',\n 'erp_email_settings_employee-asset-request',\n 'erp_email_settings_employee-asset-approve',\n 'erp_email_settings_employee-asset-reject',\n 'erp_email_settings_employee-asset-overdue'\n ] );\n if ( in_array( $get_option_id, $can_not_be_disabled ) ) {\n return $email;\n }\n $get_email_settings = get_option( $get_option_id );\n if ( isset( $get_email_settings['is_enable'] ) && $get_email_settings['is_enable'] == 'yes' ) {\n return $email;\n }\n add_filter( 'erp_email_recipient_'.$email->id, function( $recipient, $object){\n return '';\n }, 10, 2 );\n return $email;\n}", "public function registerMailTemplates()\n {\n return [];\n }", "function set_email_to_html(){\n\treturn true;\n}", "public function validEmailInvalidDataProvider() {}", "public function generate_email_error()\n {\n $valid = $this->mod_mahasiswa->read_belum_vote();\n foreach ($valid as $data) {\n $nama=$data->nama;\n $token_now=$data->token;\n $email=$data->email;\n $nim = $data->nim;\n if ($this->mod_kirimemail->kirim_generate($email, $nama, $token_now)) {\n echo \"sukses\";\n $this->mod_kirimemail->is_register($nim);\n } else {\n echo \"gagal\";\n }\n }\n }", "public function testUsersEmailSend()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function notificationEnabled(){\n\t\treturn false;\n\t}", "public function testRequireEmail()\n {\n $this->markTestIncomplete('Not yet implemented.');\n }", "public function testEmailNotAvailable()\n {\n $user = factory(User::class)->create();\n $this->assertFalse(User::isEmailAvailable($user->email));\n }", "function no_email() {\n\tob_end_clean();\n require './assets/includes/header.html';\n require './assets/includes/error.inc.php';\n $links = ['Return To Home' => 'index.php'];\n produce_error_page('That email doesn\\'t exist. Please contact our service team to resolve the issue.', $links);\n require './assets/includes/footer.html';\n exit();\n}", "function misc()\n\t{\n\t\tif (!cron_installed()) attach_message(do_lang_tempcode('CRON_NEEDED_TO_WORK',escape_html(brand_base_url().'/docs'.strval(ocp_version()).'/pg/tut_configuration')),'warn');\n\n\t\trequire_code('templates_donext');\n\t\treturn do_next_manager(get_page_title('WELCOME_EMAILS'),comcode_lang_string('DOC_WELCOME_EMAILS'),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t/*\t type\t\t\t\t\t\t\t page\t params\t\t\t\t\t\t\t\t\t\t\t\t\t zone\t */\n\t\t\t\t\t\tarray('add_one',array('_SELF',array('type'=>'ad'),'_SELF'),do_lang('ADD_WELCOME_EMAIL')),\n\t\t\t\t\t\tarray('edit_one',array('_SELF',array('type'=>'ed'),'_SELF'),do_lang('EDIT_WELCOME_EMAIL')),\n\t\t\t\t\t),\n\t\t\t\t\tdo_lang('WELCOME_EMAILS')\n\t\t);\n\t}", "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "function _webform_defaults_email() {\r\n return array(\r\n 'name' => '',\r\n 'form_key' => NULL,\r\n 'pid' => 0,\r\n 'weight' => 0,\r\n 'value' => '',\r\n 'mandatory' => 0,\r\n 'email' => 1,\r\n 'extra' => array(\r\n 'width' => '',\r\n 'disabled' => 0,\r\n 'email' => 0,\r\n 'description' => '',\r\n 'attributes' => array(),\r\n ),\r\n );\r\n}", "public function _isEnabledShipmentsEmail()\r\n {\r\n return ($this->scopeConfig->getValue(self::EMAIL_SHIPMENTS)) ? true:false ;\r\n }", "public function testEmailHashingDisabled(): void\n {\n $class = new \\ReflectionClass(\\MaxMind\\MinFraud::class);\n $prop = $class->getProperty('content');\n $prop->setAccessible(true);\n\n $client = $this->createMinFraudRequestWithFullResponse(\n 'insights',\n 0,\n ['hashEmail' => false],\n )->withEmail(['address' => 'test@gmail.com']);\n\n $this->assertSame(\n ['email' => ['address' => 'test@gmail.com']],\n $prop->getValue($client),\n 'hashing disabled using withEmail',\n );\n\n $client = $client->with(['email' => ['address' => 'test@yahoo.com']]);\n\n $this->assertSame(\n ['email' => ['address' => 'test@yahoo.com']],\n $prop->getValue($client),\n 'hashing disabled using with',\n );\n\n $client = $this->createMinFraudRequestWithFullResponse(\n 'insights',\n 0,\n )->withEmail(['address' => 'test@gmail.com']);\n\n $this->assertSame(\n ['email' => ['address' => 'test@gmail.com']],\n $prop->getValue($client),\n 'hashing is disabled by default',\n );\n }", "public function getEmailOnBrokenLinkOnly() {}", "protected function send_debug_email()\n {\n }", "private function testEmail(){\n $this->user_panel->checkSecurity();\n $this->mail_handler->testEmailFunction();\n }", "public function should_send_email() {\n\t\t$options = get_option( 'mylisting_notifications', [] );\n\t\t$notification = $this->get_key();\n\t\t$should_send = true;\n\n\t\tif ( isset( $options[ $notification ], $options[ $notification ]['send_email'] ) && $options[ $notification ]['send_email'] === 'disabled' ) {\n\t\t\t$should_send = false;\n\t\t}\n\n\t\treturn apply_filters( sprintf( 'mylisting/emails/%s:enabled', $notification ), $should_send );\n\t}", "public function validEmailValidDataProvider() {}", "public function isAutoNotifyEnabled()\n {\n return (Mage::getStoreConfig('easywebshopsms/abandoned_notifications/auto_notify_enable')==0) ? false : true;\n }", "public function _isEnabledInvoiceEmail()\r\n {\r\n return ($this->scopeConfig->getValue(self::EMAIL_INVOICE)) ? true:false ;\r\n }", "function email_cron() {\n return true;\n}", "public function getIsEmailHeaderEnabled(): bool;", "function i_want_no_generators()\r\n{\r\n \t\treturn '';\r\n\t}", "public function enableEmailUniqueRecord()\n {\n // Get user mapper\n $userMapper = $this->getUserMapper();\n \n // Check if user mapper is empty\n if (empty($userMapper)) {\n // Throw an exception\n throw new \\RuntimeException(\"User mapper is required, none given.\");\n }\n \n // Add validator\n return $this->attactEmailValidator('User\\Validator\\UniqueRecord', array(\n 'field' => 'email',\n 'mapper' => $userMapper,\n ));\n }", "function offerEmail() {\n\t\t$this->set('title_for_layout', 'Advertiser Offer Email');\n\t\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll());\n\t}", "protected function sendTestMail() {}", "public function run()\n {\n // Запрос на подтверждение email участника\n Template::create([\n 'name' => Template::PARTICIPANT_EMAIL_CONFIRMATION,\n 'subject' => '«7 шагов к медитации» – подтверждение адреса электронной почты',\n 'sender' => [\n 'email' => 'info@vueberry.com',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_EMAIL_CONFIRMATION . '.html')),\n ]);\n\n Template::create([\n 'name' => Template::PARTICIPANT_GRADUATE,\n 'subject' => 'Спасибо за участие!',\n 'sender' => [\n 'email' => 'info@vueberry.com',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_GRADUATE . '.html')),\n ]);\n\n // Оповещение участника об ответе куратора\n Template::create([\n 'name' => Template::PARTICIPANT_CURATOR_REPLIED,\n 'subject' => 'Новый ответ на ваш комментарий',\n 'sender' => [\n 'email' => 'info@vueberry.com',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_CURATOR_REPLIED . '.html')),\n ]);\n\n // Письмо ремайндер щаг 4\n Template::create([\n 'name' => Template::PARTICIPANT_REMIND_STEP_4,\n 'subject' => 'Нужна помощь?',\n 'sender' => [\n 'email' => 'info@vueberry.com',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_REMIND_STEP_4 . '.html')),\n ]);\n // Письмо ремайндер щаг 5\n Template::create([\n 'name' => Template::PARTICIPANT_REMIND_STEP_5,\n 'subject' => 'Как проходят ваши «дни осознанности»?',\n 'sender' => [\n 'email' => 'info@vueberry.com',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_REMIND_STEP_5 . '.html')),\n ]);\n // Письмо ремайндер щаг 5\n Template::create([\n 'name' => Template::PARTICIPANT_REMIND_STEP_6,\n 'subject' => 'Возвращайтесь!',\n 'sender' => [\n 'email' => 'info@vueberry.com',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_REMIND_STEP_6 . '.html')),\n ]);\n // Письмо ремайндер щаг 5\n Template::create([\n 'name' => Template::PARTICIPANT_REMIND_STEP_7,\n 'subject' => 'Не сдавайтесь! Вы почти у цели.',\n 'sender' => [\n 'email' => 'info@vueberry.com',\n 'name' => '7steps',\n ],\n 'body' => trim(file_get_contents(__DIR__ . '/templates/email/' . Template::PARTICIPANT_REMIND_STEP_7 . '.html')),\n ]);\n }", "function send_emails() {\n $settings = new Settings();\n $mail_companies = $settings->get_mailto_companies();\n $failed_list_mails = array();\n $mail_reader = new EmailReader(dirname(__FILE__) . '/mails', $this->user_information);\n foreach ($this->cookie_list as $item) {\n if (!$item->has_email()) {\n \t$failed_list_mails[] = $item;\n }\n else {\n $template = $mail_reader->get_companies_mail($item, $mail_companies);\n if (!$this->mail_to($item, $template, $mail_companies)) {\n $failed_list_mails[] = $item;\n }\n\t }\n }\n $this->update_amounts_used($this->cookie_list);\n\n\n $attachments = array();\n\n $failed_list_letters = array();\n foreach ($this->cookie_list as $item) {\n if (!$item->has_address()) {\n $failed_list_letters[] = $item;\n }\n else {\n $letter_generator = new LetterGenerator($this->user_information);\n $pdf = $letter_generator->generate_letter_string($item);\n if ($pdf) {\n \t$folder_writer = new FolderHandler();\n \t$file = $folder_writer->store_file($pdf, \"pdf\");\n \tif ($file) {\n \t\t$attachments[] = $file;\n \t}\n \telse {\n \t\t$failed_list_letters[] = $item;\n \t}\n }\n else {\n $failed_list_letters[] = $item;\n }\n }\n }\n\n\n\n return $this->send_confirmation_mail($attachments, $failed_list_mails, array_diff($this->cookie_list,\n $failed_list_mails), $failed_list_letters, array_diff($this->cookie_list, $failed_list_letters),\n $mail_companies);\n }", "public function actionNotifyUnExeptedProfiles(){\n $message = new YiiMailMessage;\n $message->view = 'system';\n $message->from = Yii::app()->params['noreplyEmail'];\n \n // send newsletter to all in waiting list\n $hidden = UserStat::model()->findAll(\"completeness < :comp\",array(\":comp\"=>PROFILE_COMPLETENESS_MIN));\n\n $c = 0;\n foreach ($hidden as $stat){\n //set mail tracking\n if ($stat->user->status != 0) continue; // skip active users\n if ($stat->user->newsletter == 0) continue; // skip those who unsubscribed\n if ($stat->user->lastvisit_at != '0000-00-00 00:00:00') continue; // skip users who have already canceled their account\n \n //echo $stat->user->name.\" - \".$stat->user->email.\": \".$stat->user->create_at.\" (\".date('c',strtotime('-4 week')).\" \".date('c',strtotime('-3 week')).\")<br />\\n\";\n $create_at = date(\"Y-m-d H\",strtotime($stat->user->create_at));\n //$create_at_hour = date(\"Y-m-d H\",strtotime($stat->user->create_at));\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 if ( !($create_at == date(\"Y-m-d H\",strtotime('-2 hour')) || $create_at == date(\"Y-m-d H\",strtotime('-1 day')) || \n $create_at == date(\"Y-m-d H\",strtotime('-3 days')) || $create_at == date(\"Y-m-d H\",strtotime('-8 days')) || \n $create_at == date(\"Y-m-d H\",strtotime('-14 day')) || $create_at == date(\"Y-m-d H\",strtotime('-21 day')) || \n $create_at == date(\"Y-m-d H\",strtotime('-28 day'))) ) continue;\n //echo $stat->user->email.\" - \".$stat->user->name.\" your Cofinder profile is moments away from approval!\";\n\n //echo \"SEND: \".$stat->user->name.\" - \".$stat->user->email.\": \".$stat->user->create_at.\" (\".$stat->completeness.\")<br />\\n\";\n //echo 'http://www.cofinder.eu/profile/registrationFlow?key='.substr($stat->user->activkey,0, 10).'&email='.$stat->user->email;\n\n //continue;\n //set mail tracking\n $mailTracking = mailTrackingCode($stat->user->id);\n $ml = new MailLog();\n $ml->tracking_code = mailTrackingCodeDecode($mailTracking);\n $ml->type = 'registration-flow-reminder';\n $ml->user_to_id = $stat->user->id;\n $ml->save();\n\n $email = $stat->user->email;\n $message->subject = $stat->user->name.\" your Cofinder account is almost approved\"; // 11.6. title change\n\n $content = \"We couldn't approve your profile just yet since you haven't provided enough information.\"\n . \"Please fill your profile and we will revisit your application.\".\n mailButton(\"Do it now\", absoluteURL().'/profile/registrationFlow?key='.substr($stat->user->activkey,0, 10).'&email='.$stat->user->email,'success',$mailTracking,'fill-up-button');\n\n $message->setBody(array(\"content\"=>$content,\"email\"=>$email,\"tc\"=>$mailTracking), 'text/html');\n $message->setTo($email);\n Yii::app()->mail->send($message);\n\n Notifications::setNotification($stat->user_id,Notifications::NOTIFY_INVISIBLE);\n $c++;\n }\n if ($c > 0) Slack::message(\"CRON >> UnExcepted profiles: \".$c);\n return 0;\n }", "function sendEmails() {\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\n\t\t$emailUser = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailUser = str_replace(\"<br />\", \"\\n\", $emailUser);\n\t\t$emailAdmin = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailAdminBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailAdmin = str_replace(\"<br />\", \"\\n\", $emailAdmin);\n\t\t$emailFrom = $this->data['tx_gokontakt_emailFrom'];\n\t\t$emailFromName = $this->data['tx_gokontakt_emailFromName'];\n\t\t$emailToAdmin = $this->data['tx_gokontakt_emailToAdmin'];\n\n\t\t$this->sendEmail($this->pi_getLL('subject_email_user'), $emailUser, '', $emailFrom, $emailFromName, $this->piVars['email']);\n\t\t$this->sendEmail($this->pi_getLL('subject_email_admin'), $emailAdmin, '', $emailFrom, $emailFromName, $emailToAdmin);\n\t}", "public function testemailsetupAction(){\n $to = 'tracks@ponyengine.com';\n $subject = 'the subject';\n $message = 'hello';\n $headers = 'From: tracks@ponyengine.com' . \"\\r\\n\" .\n 'Reply-To: tracks@ponyengine.com' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n date_default_timezone_set('America/Chicago');\n\n $mail = mail($to, $subject, $message, $headers);\n if($mail){\n echo \"YES\";\n\n } else{\n echo \"NO\";\n }\n //noResponse\n $this->getHelper('ViewRenderer')->setNoRender();\n }", "public function getMailboxes()\r\n\t{\r\n\t\treturn false;\r\n\t}", "private static function canRemoveEmail() {\n\t\treturn\n\t\t\tRights::hasRight(Right::getByName('Premanager', 'registerWithoutEmail'));\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 generateWhitelist($disable = false)\n {\n $whitelist = $this->_params['storage']\n ->retrieve(Ingo_Storage::ACTION_WHITELIST);\n $wl_addr = $whitelist->getWhitelist();\n\n if (!empty($wl_addr)) {\n $this->_addItem(Ingo::RULE_WHITELIST, new Ingo_Script_Procmail_Comment(_(\"Whitelisted Addresses\"), $disable, true));\n foreach ($wl_addr as $address) {\n if (!empty($address)) {\n $recipe = new Ingo_Script_Procmail_Recipe(array('action' => Ingo_Storage::ACTION_KEEP, 'disable' => $disable), $this->_params);\n $recipe->addCondition(array('field' => 'From', 'value' => $address, 'match' => 'address'));\n $this->_addItem(Ingo::RULE_WHITELIST, $recipe);\n }\n }\n }\n }", "private function prepareForTests()\n {\n \\Mail::pretend(true);\n }", "public function testOrderReceiptDisabled() {\n $order_type = OrderType::load($this->order->bundle());\n $order_type->setSendReceipt(FALSE);\n $order_type->save();\n\n $this->order->getState()->applyTransitionById('place');\n $this->order->save();\n\n $this->assertCount(0, $this->getMails());\n }", "public function isSendmail()\n {\n }", "function mme_addemail($email) {\n\t$option_name = \"custom_emails\";\n\tif ( get_option( $option_name ) !== false ) {\n\n \t// The option already exists, so we just update it.\n \tupdate_option( $option_name, $email );\n\t} else {\n\n\t // The option hasn't been added yet. We'll add it with $autoload set to 'no'.\n\t $deprecated = null;\n\t $autoload = 'no';\n\t add_option( $option_name, $email, $deprecated, $autoload );\n\t}\n}", "public function generate()\n {\n $mailer = new Mailer();\n\n }", "function opanda_show_mymail_html() {\r\n \r\n if ( !defined('MYMAIL_VERSION') ) {\r\n ?>\r\n <div class=\"form-group\">\r\n <label class=\"col-sm-2 control-label\"></label>\r\n <div class=\"control-group controls col-sm-10\">\r\n <p><strong><?php _e('The MyMail plugin is not found on your website. Emails will not be saved.', 'opanda') ?></strong></p>\r\n </div>\r\n </div>\r\n <?php\r\n } else {\r\n ?>\r\n <div class=\"form-group\">\r\n <label class=\"col-sm-2 control-label\"></label>\r\n <div class=\"control-group controls col-sm-10\">\r\n <p><?php _e('You can set a list where the subscribers should be added in the settings of a particular locker.', 'opanda') ?></p>\r\n </div>\r\n </div>\r\n <?php\r\n }\r\n}", "protected function isMailingEnabled()\n {\n if ($this->user->email === \"\") {\n return false;\n }\n return true;\n }", "function no_generator() { return ''; }", "function no_generator() { return ''; }", "public function emailtest(){\n\t\t$sub = array(\n\t \t'email' => '704385454@qq.com',\n\t \t'order_no' => '14615660058503',\n\t \t'sequence' => 8,\n\t \t'rent_price' => 808.00,\n\t \t'rent_start' => '2016-04-26',\n\t \t'rent_end' => '2016-04-26',\n\t \t'balance' =>12,\n\t \t'username' => 'zhihui',\n\t \t'date' => '2016-04',\n\t \t'url' => 'http://www.kuaizu365.cn/home/account/bill.html'\n\t\t);\n\t\t$email = new \\Common\\Service\\EmailService();\n\t\t$flag = $email ->billWarning($sub);\n\t\tvar_dump($flag);\n\n\t}", "private function emailSerialNumbers()\n {\n if (!$this->individual_purchase) {\n $subject = $this->upgrade_purchase ? \"Upgrade Confirmation\" : \"New \"\n . $this->user->getCurrentRoleName() . \" \"\n . $this->payment_method->name . \" order\";\n\n $template = $this->upgrade_purchase ? \"upgrade-confirmation.phtml\" : \"serial-numbers-multiple.phtml\";\n\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo($this->user->email)\n ->setSubject($subject)\n ->setViewParam('order', $this)\n ->setViewParam('salesEmail', false)\n ->sendHtmlTemplate($template);\n\n //Send email to fisdap-sales@fisdap.net\n if (APPLICATION_ENV != \"production\") {\n $subject = ucfirst(APPLICATION_ENV) . \" - \" . $subject;\n }\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo(\"fisdap-sales@fisdap.net\")\n ->setSubject($subject)\n ->setViewParam('order', $this)\n ->setViewParam('salesEmail', true)\n ->sendHtmlTemplate($template);\n\n // send out a seperate email to those who have accounts that are being upgraded\n if ($this->upgrade_purchase) {\n foreach ($this->order_configurations as $config) {\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo($config->upgraded_user->email)\n ->setSubject(\"Your Fisdap account has been upgraded\")\n ->setViewParam('config', $config)\n ->setViewParam('orderer', $this->user->first_name . \" \" . $this->user->last_name)\n ->sendHtmlTemplate('account-upgrade.phtml');\n }\n }\n } elseif ($this->individual_purchase) {\n $subject = $this->upgrade_purchase ? \"Upgrades to your Fisdap account\" : \"Your new Fisdap account\";\n\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo($this->email)\n ->setSubject($subject)\n ->setViewParam('order', $this)\n ->setViewParam('urlRoot', \\Util_HandyServerUtils::getCurrentServerRoot())\n ->setViewParam('salesEmail', false)\n ->sendHtmlTemplate('individual-purchase-order.phtml');\n\n //Send email to fisdap-sales@fisdap.net\n if (APPLICATION_ENV != \"production\") {\n $subject = ucfirst(APPLICATION_ENV) . \" - \" . $subject;\n }\n $mail = new \\Fisdap_TemplateMailer();\n $mail->addTo(\"fisdap-sales@fisdap.net\")\n ->setSubject($subject)\n ->setViewParam('order', $this)\n ->setViewParam('urlRoot', \\Util_HandyServerUtils::getCurrentServerRoot())\n ->setViewParam('salesEmail', true)\n ->sendHtmlTemplate('individual-purchase-order.phtml');\n }\n }", "public function sendNotificationEmail(){\n $unsentNotifications = $this->unsentNotifications;\n $notificationCount = count($unsentNotifications);\n \n if($notificationCount > 0){\n //Send this employer all his \"unsent\" notifications \n if($this->employer_language_pref == \"en-US\"){\n //Set language based on preference stored in DB\n Yii::$app->view->params['isArabic'] = false;\n\n //Send English Email\n Yii::$app->mailer->compose([\n 'html' => \"employer/notification-html\",\n ], [\n 'employer' => $this,\n 'notifications' => $unsentNotifications,\n ])\n ->setFrom([\\Yii::$app->params['supportEmail'] => \\Yii::$app->name ])\n ->setTo([$this->employer_email])\n ->setSubject(\"[StudentHub] You've got $notificationCount new applicants!\")\n ->send();\n }else{\n //Set language based on preference stored in DB\n Yii::$app->view->params['isArabic'] = true;\n\n //Send Arabic Email\n Yii::$app->mailer->compose([\n 'html' => \"employer/notification-ar-html\",\n ], [\n 'employer' => $this,\n 'notifications' => $unsentNotifications,\n ])\n ->setFrom([\\Yii::$app->params['supportEmail'] => \\Yii::$app->name ])\n ->setTo([$this->employer_email])\n ->setSubject(\"[StudentHub] لقد حصلت على $notificationCount متقدمين جدد\")\n ->send();\n }\n \n \n return true;\n }\n \n return false;\n }", "private function _generateInvoice()\n {\n $order = $this->_getOrder();\n if ($order->canInvoice()) {\n $invoice = $order->prepareInvoice();\n\n $invoice->register();\n Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder())\n ->save();\n \n $invoice->pay()->save();\n\n $order->save();\n\n $invoice->sendEmail(\n (boolean) Mage::getStoreConfig(\n 'payment/paymentnetwork_pnsofortueberweisung/send_mail', \n Mage::app()->getStore()->getStoreId()\n ), ''\n );\n }\n }", "public function practice2()\n {\n dump(config('mail.supportEmail'));\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}", "public function enableEmailRecordExists()\n {\n // Get user mapper\n $userMapper = $this->getUserMapper();\n \n // Check if user mapper is empty\n if (empty($userMapper)) {\n // Throw an exception\n throw new \\RuntimeException(\"User mapper is required, none given.\");\n }\n \n // Attact validator\n return $this->attactEmailValidator('User\\Validator\\RecordExists', array(\n 'field' => 'email',\n 'mapper' => $userMapper,\n ));\n }", "public function testSendWithWrongEmailAddress()\n {\n $Email = new \\EmailTemplate('test');\n \n // send the email\n $r1 = $Email->send('', 'test');\n $r2 = $Email->send('abc', 'test');\n \n // assert false was returned which means error\n $this->assertFalse($r1);\n $this->assertFalse($r2);\n }", "function air_helper_mail_delivery_check() {\n if ( class_exists( 'Mailgun' ) && getenv( 'MAILGUN_API_KEY' ) && ( defined( 'MAILGUN_USEAPI' ) && MAILGUN_USEAPI ) ) {\n return true;\n }\n\n // SendGrid for legacy support.\n if ( class_exists( 'Sendgrid_Tools' ) && getenv( 'SENDGRID_API_KEY' ) ) {\n return true;\n }\n\n // Do not show the notice in dev.\n if ( 'development' === wp_get_environment_type() ) {\n return true;\n }\n\n add_action( 'admin_notices', 'air_helper_mail_delivery_not_configured_notice' );\n return false;\n}", "public static function allow_attachments() {\n\t\tDataObject::add_extension('UserDefinedForm_EmailRecipient', 'RecipientAttachmentDecorator');\n\t}", "public function groupNotChangedMails()\n {\n $conditions = array('GroupChangeRequest.request_type'=>'cr','GroupChangeRequest.is_moved'=>0);\n $pendingRequests = $this->GroupChangeRequest->find('all',array('conditions'=>$conditions));\n $cuttentTimeStamp = strtotime(date('Y-m-d'));\n if(!empty($pendingRequests)) {\n $count = 0;\n foreach($pendingRequests as $row){\n $timeDiff = round(abs($cuttentTimeStamp - strtotime($row['GroupChangeRequest']['created'])) / (60*60),0);\n if($timeDiff < 48) {\n //Send Mails\n $count++;\n $emailLib = new Email();\n $to = $userInfo['BusinessOwner']['email'];\n //$to = 'rohan.julka@a3logics.in';\n $subject = 'FoxHopr: Group change request status';\n $template ='group_change_pending';\n $variable = array('name'=>$row['BusinessOwner']['fname'] . \" \" . $row['BusinessOwner']['lname']);\n $success = $emailLib->sendEmail($to,$subject,$variable,$template,'both');\n }\n }\n }\n }", "public function shufflingMissedEmailNotification()\n {\n \t$initialDate = date(\"Y-m-d\",strtotime(\"-1 days\"));\n \t$endDate = date(\"Y-m-d\",strtotime(\"-3 days\"));\n \t \n \t$this->Group->unbindModel(\n \t\t\tarray('belongsTo' => array('Country','State','User'))\n \t); \t\n \t\n \t$groupInfo = $this->Group->find('all', array(\n \t\t'conditions' => array('Group.shuffling_date >=' => $endDate,'Group.shuffling_date <=' => $initialDate,'Group.total_member >' => 0)\n \t));\n \t\n \t$groupCount = count($groupInfo);\n \t//pr($groupInfo);\n \tif(!empty($groupInfo)){\n \t\t$emailLib = new Email();\n \t\t$subjectAdmin = \"FoxHopr: Group Shuffling\";\n \t\t$templateAdmin = \"shuffling_missed_admin_notify\";\n \t\t$format = \"both\";\n \t\n \t\t// send email to admin\n \t\t$adminEmail = AdminEmail;\n \t\t$ok = $emailLib->sendEmail($adminEmail,$subjectAdmin,array('groupCount'=>$groupCount),$templateAdmin,$format);\n \t\t//var_dump($ok);\t\n \t}\n }", "public static function isBrokenEmailEnvironment() {}", "function allow_create_users() {\n\t\treturn apply_filters( 'import_allow_create_users', true );\n\t}", "function m_dspemails()\n\t{\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_EMAIL_FILE\",$this->emailTemplate);\n\n\t\t#SETTING ALL TEMPLATE BLOCKS\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_EMAIL_BLK\", \"email_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_MESSAGE_BLK\", \"message_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_MSG_BLK1\", \"msg_blk1\");\n\n\t\t#SETTING TEMPLATE VARIABLE\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SALESURL\",SITE_URL.\"sales/\");\n\n\t\t#INTAILIZING ***\n\t\t$this->ObTpl->set_var(\"email_blk\",\"\");\t\n\t\t$this->ObTpl->set_var(\"message_blk\",\"\");\t\n\t\t$this->ObTpl->set_var(\"msg_blk1\",\"\");\t\n\t\t$this->ObTpl->set_var(\"msg_blk2\",\"\");\t\n\n\t\t$this->request['msg']=$this->libFunc->ifSet($this->request,\"msg\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MESSAGE\",\"\");\n\n\t\t#DATABASE QUERY\n\t\t$this->obDb->query = \"SELECT * FROM \".EMAILS;\n\t\t$queryResult = $this->obDb->fetchQuery();\n\t\t$campaigncount = $this->obDb->record_count;\n\t\tif($this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_INSERTED);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\t\telseif($this->request['msg']==3)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_DELETED);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\t\telseif($this->request['msg']==5)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_SENT);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\n\t\tif($campaigncount>0)\n\t\t{\n\t\t\t#PARSING DISCOUNT BLOCK\n\t\t\tfor($j=0;$j<$campaigncount;$j++)\n\t\t\t{\t\t\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$queryResult[$j]->iMailid_PK);\n\t\t\t\tif ($queryResult[$j]->vUserList==\"All\"){\n $this->obDb->query = \"SELECT count(*) as cnt FROM \".CUSTOMERS.\" WHERE iStatus=1 AND iMailList !=0\";\n }else{ \n $this->obDb->query = \"SELECT count(*) as cnt FROM \".LEADLIST.\" WHERE iLeadId_FK='\". $queryResult[$j]->vUserList.\"'\";\n }\n\t\t\t\t$qryRs = $this->obDb->fetchQuery();\n\t\t\t\t\n\t\t\t\tif ($queryResult[$j]->vVisitorList==\"1\"){\n $this->obDb->query = \"SELECT count(*) as cnt FROM \".NEWSLETTERS;\n\t\t\t\t $qryVs = $this->obDb->fetchQuery();\n\t\t\t\t $qryRs[0]->cnt = $qryRs[0]->cnt + $qryVs[0]->cnt;\n }\n\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_USERCOUNT\",$qryRs[0]->cnt);\n \n $this->ObTpl->set_var(\"TPL_VAR_SUBJECT\",$this->libFunc->m_displayContent($queryResult[$j]->vSubject));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SID\",$this->libFunc->m_displayContent($queryResult[$j]->vSid));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_BUILDDATE\",$this->libFunc->dateFormat2($queryResult[$j]->tmBuildDate));\t\n\t\t\t\t$sentDate=$this->libFunc->dateFormat2($queryResult[$j]->tmSentDate);\n\t\t\t\tif(empty($sentDate))\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",\"Send now\");\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWLABEL\",\"View/Sent\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",$sentDate);\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWLABEL\",\"View\");\n\t\t\t\t}\n\t\t\t\t$this->ObTpl->parse(\"email_blk\",\"TPL_EMAIL_BLK\",true);\n\t\t\t}\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$campaigncount.\" records found\");\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MESSAGE\",MSG_NOEMAILS);\n\t\t\t$this->ObTpl->parse(\"message_blk\",\"TPL_MESSAGE_BLK\");\n\t\t}\n\t\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_EMAIL_FILE\"));\n\t}", "protected function shouldSendEmail(): bool\r\n {\r\n return $this->sendEmail === Boolean::YES;\r\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 }", "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 }", "protected function enabled()\n {\n }", "protected function get_notified_email_address()\n\t{\n\t\treturn [];\n\t}", "public function toMailCustom($notifiable)\r\n {\r\n $contact = \\App\\Models\\Contact::findOrFail($notifiable->id);\r\n $notification_attributes = json_decode($contact->list->notification_attributes, true);\r\n $attributes = json_decode($contact->list->attributes);\r\n\r\n\r\n $sending_server = \\App\\Models\\SendingServer::whereId($contact->list->sending_server_id)\r\n ->whereStatus('Active')\r\n ->with('bounce')\r\n ->first();\r\n\r\n if(!empty($sending_server->id)) {\r\n $connection = Helper::configureSendingNode($sending_server->type, $sending_server->sending_attributes);\r\n\r\n if($connection['success']) {\r\n\r\n // If Unsubscribe Email is set to 'Yes' for a list\r\n if($contact->list->double_optin == 'Yes' || $contact->list->welcome_email == 'Yes' || $contact->list->unsub_email == 'Yes') {\r\n // send email to contact \r\n $send_email = false; //' It may possilbe one option is true other false\r\n // Run old emails that have no value set\r\n if(($this->subscriber_email == 'confirm-email-app' || $this->subscriber_email == 'confirm-email-webform') && $contact->list->double_optin == 'Yes') {\r\n if(!empty($attributes->confirmation_email_id)) {\r\n $page = \\App\\Models\\Page::whereId($attributes->confirmation_email_id)->whereAppId($contact->app_id)->first();\r\n } else {\r\n $page = \\App\\Models\\Page::whereSlug($this->subscriber_email)->whereAppId($contact->app_id)->first();\r\n }\r\n $send_email = true;\r\n } elseif($this->subscriber_email == 'welcome-email' && $contact->list->welcome_email == 'Yes') {\r\n if(!empty($attributes->welcome_email_id)) {\r\n $page = \\App\\Models\\Page::whereId($attributes->welcome_email_id)->whereAppId($contact->app_id)->first();\r\n } else {\r\n $page = \\App\\Models\\Page::whereSlug($this->subscriber_email)->whereAppId($contact->app_id)->first();\r\n }\r\n $send_email = true;\r\n } elseif($this->subscriber_email == 'unsub-email' && $contact->list->unsub_email == 'Yes') {\r\n if(!empty($attributes->unsub_email_id)) {\r\n $page = \\App\\Models\\Page::whereId($attributes->unsub_email_id)->whereAppId($contact->app_id)->first();\r\n } else {\r\n $page = \\App\\Models\\Page::whereSlug($this->subscriber_email)->whereAppId($contact->app_id)->first();\r\n }\r\n $send_email = true;\r\n }\r\n\r\n if($send_email) {\r\n $content = Helper::replaceSpintags(Helper::decodeString($page->content_html)); // replace spintags\r\n $content = Helper::replaceCustomFields($content, $contact->customFields); // replace custom field\r\n $content = Helper::replaceSystemVariables($contact, $content, $data_values=[]); // replace system variables\r\n\r\n $subject = Helper::replaceSpintags(Helper::decodeString($page->email_subject)); // replace spintags\r\n $subject = Helper::replaceCustomFields($subject, $contact->customFields); // replace custom field\r\n $subject = Helper::replaceSystemVariables($contact, $subject, $data_values=[]); // replace system variables\r\n\r\n $message = Helper::configureEmailBasicSettings($sending_server);\r\n if(in_array($sending_server->type, Helper::sendingServersFramworkSuported())) {\r\n $message->setTo($contact->email);\r\n $message->setSubject($subject);\r\n $message->setBody($content, \"text/html\");\r\n try {\r\n $connection['transport']->send($message);\r\n $status = 'Sent';\r\n } catch(\\Exception $e) {\r\n //echo $e->getMessage();\r\n $status = 'Failed';\r\n }\r\n } elseif($sending_server->type == 'sendgrid_api') {\r\n $message->addTo($contact->email);\r\n $message->setSubject($subject);\r\n $message->addContent(\"text/html\", $content);\r\n $sendgrid = new \\SendGrid(\\Crypt::decrypt(json_decode($sending_server->sending_attributes)->api_key));\r\n try {\r\n $response = $sendgrid->send($message);\r\n // status start with 2 consider as sent\r\n if(substr($response->statusCode(), 1) == 2) {\r\n $status = 'Sent';\r\n } else {\r\n $status = 'Failed';\r\n }\r\n } catch(\\Exception $e) {\r\n //echo $e->getMessage();\r\n $status = 'Failed';\r\n }\r\n }\r\n\r\n if($status == 'Sent') {\r\n Helper::updateSendingServerCounters($sending_server->id);\r\n }\r\n }\r\n }\r\n\r\n // send notification email\r\n if($contact->list->notification == 'Enabled' && in_array($this->notify_action, $notification_attributes['criteria'])) {\r\n $page = \\App\\Models\\Page::whereSlug($this->notify_email)->whereAppId($contact->app_id)->first();\r\n\r\n $content = Helper::replaceSpintags($page->content_html); // replace spintags\r\n $content = Helper::replaceCustomFields($content, $contact->customFields); // replace custom field\r\n $content = Helper::replaceSystemVariables($contact, $content, $data_values=[]); // replace system variables\r\n\r\n $subject = Helper::replaceSpintags($page->email_subject); // replace spintags\r\n $subject = Helper::replaceCustomFields($subject, $contact->customFields); // replace custom field\r\n $subject = Helper::replaceSystemVariables($contact, $subject, $data_values=[]); // replace system variables\r\n\r\n $message = Helper::configureEmailBasicSettings($sending_server);\r\n if(in_array($sending_server->type, Helper::sendingServersFramworkSuported())) {\r\n $message->setTo($notification_attributes['email']);\r\n $message->setSubject($subject);\r\n $message->setBody($content, \"text/html\");\r\n try {\r\n $connection['transport']->send($message);\r\n $status = 'Sent';\r\n } catch(\\Exception $e) {\r\n //echo $e->getMessage();\r\n $status = 'Failed';\r\n }\r\n } elseif($sending_server->type == 'sendgrid_api') {\r\n $message->addTo($notification_attributes['email']);\r\n $message->setSubject($subject);\r\n $message->addContent(\"text/html\", $content);\r\n $sendgrid = new \\SendGrid(json_decode($sending_server->sending_attributes)->api_key);\r\n try {\r\n $response = $sendgrid->send($message);\r\n $status = 'Sent';\r\n } catch(\\Exception $e) {\r\n //echo $e->getMessage();\r\n $status = 'Failed';\r\n }\r\n }\r\n\r\n if($status == 'Sent') {\r\n Helper::updateSendingServerCounters($sending_server->id);\r\n }\r\n }\r\n } // if($connection['success'])\r\n } // If !empty($sending_server->id)\r\n }", "static function sendNotGotApplicationMail($recepient, $reg_date, $hash) {\r\n\t\tif (!MAIL) return;\r\n\r\n\t\t$mailTemplate = new Art_Model_Email_Template(array('name'=>static::EMAIL_TEMPLATE_NOT_GOT_APPLICATION));\r\n\t\tif (!$mailTemplate->isLoaded()) return;\r\n\r\n\t\t$resource = Art_Server::getHost().'/resource/'.$hash;\r\n\t\t$footer = Helper_Default::getDefaultValue(Helper_TBDev::DEFAULT_MAIL_FOOTER);\r\n\t\t$body = Art_Model_Email_Template::replaceIdentities(array('date_now' => nice_date('now'),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'date_registration' => nice_date($reg_date),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'pdf_url' => $resource,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'footer' => $footer),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$mailTemplate->body);\t\r\n\t\tstatic::sendMailUsingTemplate($mailTemplate, $body, $recepient);\r\n\t}", "protected function setNoticesExist() {}", "function emailconfirmation(){\n\t\t\trequire( dirname(__FILE__) . '/email-confirmation.php' );\n\t\t}", "public function testMailingList() {\n\t}", "function new_user_email_admin_notice()\n {\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 email() {\n\t\trequire( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/email.php' );\n\t}", "private function checkEmailSettings(): bool\n {\n return (is_array($this->properties['mail_recipients']) || is_array($this->properties['mail_bcc']));\n }", "function edd_pup_get_email_templates() {\r\n\r\n\t$templates = edd_get_email_templates();\r\n\t$eddpdfi_email_templates = array(\r\n\t\t'invoice_default',\r\n\t\t'blue_stripe',\r\n\t\t'lines',\r\n\t\t'minimal',\r\n\t\t'traditional',\r\n\t\t'invoice_blue',\r\n\t\t'invoice_green',\r\n\t\t'invoice_orange',\r\n\t\t'invoice_pink',\r\n\t\t'invoice_purple',\r\n\t\t'invoice_red',\r\n\t\t'invoice_yellow'\r\n\t);\r\n\r\n\tforeach ( $eddpdfi_email_templates as $pdftemplate ) {\r\n\t\tif ( array_key_exists( $pdftemplate, $templates ) ) {\r\n\t\t\tunset( $templates[$pdftemplate] );\r\n\t\t}\r\n\t}\r\n\r\n\treturn $templates;\r\n}", "function updatenotifier_activate() {\n\t// clear any existing schedules first\n\twp_clear_scheduled_hook( 'updatenotifier_sendmail' );\n\t// schedule daily check\n\twp_schedule_event( time(), 'daily', 'updatenotifier_sendmail' );\n\n\t$current = get_option( 'updatenote_options' );\n\t$defaults = array(\n\t\t'secondemail' => '', 'plugins' => 'No', 'themes' => 'No',\n\t\t'emailadmin' => false, 'version' => '1.4.1'\n\t);\n\n\tif ( ! $current )\n\t\tadd_option( 'updatenote_options', $defaults );\n\telse\n\t\tupdatenotifier_upgrade( $current, $defaults );\n}", "public function sitemaps_enabled()\n {\n }", "protected function enableDisplayErrors() {}", "protected function enableDisplayErrors() {}", "function canCreateAccounts() {\n return false;\n }", "public function setIgnoreValidation() {\r\n\t\t$this->getOnepage()->getQuote()->getBillingAddress()->setShouldIgnoreValidation(true);\r\n\t\t$this->getOnepage()->getQuote()->getShippingAddress()->setShouldIgnoreValidation(true);\r\n\t}", "public static function allow_conditional_recipients() {\n\t\tDataObject::add_extension('UserDefinedForm_EmailRecipient', 'ConditionalRecipientDecorator');\n\t\tDataObject::add_extension('UserDefinedForm', 'ConditionalFormDecorator');\n\t\tObject::add_extension('UserDefinedForm_Controller', 'ConditionalFormControllerDecorator');\n\t}", "public function setEmailTpl($value){$this->_emailTpl = $value;}", "public function allowDeliveryAddress()\n {\n $this->_data['DireccionEnvio'] = 1;\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 hasEmail() {\n return $this->_has(4);\n }", "public function testRegistrationEmailAlreadyInUse(): void { }", "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 }", "public function allow_auto_install()\n\t{\n\t\treturn TRUE;\n\t}", "public function sendEmail()\n {\n $new_mail = new NewMails();\n $data_email = NewMails::getDataByEmail($this->new_email);\n $ip = ip2long(Yii::$app->request->userIP);\n // Debugger::testDie();\n if($data_email){\n // if (!NewMails::isRegistrationTokenValid($new_mail->registration_token)) {\n $new_mail->generateRegistrationToken();\n NewMails::updateIpToken($this->new_email, $ip, $new_mail->registration_token);\n // Debugger::EhoBr($new_mail->registration_token);\n // Debugger::testDie();\n // if(!NewMails::newMail($this->login, $this->ip, $new_mail->registration_token)){\n // return false;\n\n // }\n //}\n }else{\n $new_mail->generateRegistrationToken();\n NewMails::newMail($this->new_email, $ip, $new_mail->registration_token);\n }\n\n\n\n\n\n return Yii::$app\n ->mailer\n ->compose(\n ['html' => 'emailResetToken-html', 'text' => 'emailResetToken-text'],\n ['new_mail' => $new_mail]\n )\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name . ' robot'])\n ->setTo($this->new_email)\n ->setSubject('NetAssist IPv6 Tunnel Broker e-mail verification')\n ->send();\n\n }", "public function change_email_sent()\n {\n $this->_render();\n }" ]
[ "0.8028825", "0.659105", "0.6525555", "0.61501", "0.61399525", "0.6070084", "0.5882142", "0.5754294", "0.57516795", "0.57161874", "0.5618793", "0.5598981", "0.55216986", "0.5503217", "0.5496662", "0.54847854", "0.54809314", "0.5468038", "0.5452649", "0.54513335", "0.54355824", "0.54150724", "0.54087305", "0.53967834", "0.53894645", "0.5368979", "0.53685385", "0.53591377", "0.5344743", "0.53344405", "0.5333246", "0.53258073", "0.5323185", "0.5321678", "0.5304288", "0.5294688", "0.5281739", "0.527383", "0.52724665", "0.52671534", "0.5261005", "0.5257176", "0.5256412", "0.5253624", "0.5246125", "0.52447027", "0.5241588", "0.524002", "0.5218658", "0.5217886", "0.5215846", "0.5211053", "0.52005863", "0.52005863", "0.5192234", "0.5185674", "0.51828593", "0.51778597", "0.51701087", "0.5162817", "0.5162058", "0.516029", "0.5158125", "0.51579773", "0.5147877", "0.5145148", "0.51446503", "0.5136133", "0.5121012", "0.5106857", "0.5105291", "0.5092003", "0.50731194", "0.50666547", "0.50647795", "0.50638115", "0.50632066", "0.5063169", "0.506007", "0.5057048", "0.5056318", "0.5055022", "0.50543535", "0.504882", "0.50389", "0.5038723", "0.5036718", "0.5036214", "0.5033755", "0.5032451", "0.5023758", "0.5022496", "0.50217086", "0.5019568", "0.50189763", "0.50118905", "0.50106215", "0.5010461", "0.50094444", "0.5005894" ]
0.7524471
1
Enable the create account on first login feature.
public static function createAccountOnFirstLogin(): string { return 'create-account-on-first-login'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function hasCreateAccountOnFirstLoginFeatures(): bool\n {\n return static::enabled(static::createAccountOnFirstLogin());\n }", "public function activate(){\n # Enable Single Sign-On\n if(in_array(\"login\", $this->features, TRUE)){\n $this->enable_sso();\n }\n }", "private function checkFirstLogin() {\n\n $count = DB::table('users')->count();\n\n if ($count == 0) {\n\n $password = Hash::make('cciadminpassword');\n\n // insert in users table\n $id = DB::table('users')->insertGetId([\n 'username' => 'admin',\n 'name' => 'Administrator',\n 'password' => $password,\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n\n // insert in roles table\n DB::table('user_roles')->insert([\n 'user_id' => $id,\n 'role' => 'administrator',\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n\n // insert project status codes\n DB::table('project_status')->insert([\n [ 'status' => 'New' ],\n [ 'status' => 'Quoted' ],\n [ 'status' => 'Sold' ],\n [ 'status' => 'Engineered' ],\n [ 'status' => 'Lost']\n ]);\n\n return;\n }\n\n else { return; }\n }", "public static function autoLogin()\n {\n return true;\n }", "public function register_user()\n {\n \n return true;\n \n }", "public function createUserAction() {\n $this->authService->createUser();\n die();\n }", "private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }", "public function checkFirstLogin();", "function canCreateAccounts() {\r\n\t\treturn true;\r\n\t}", "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }", "function canCreateAccounts() {\n return false;\n }", "function onBeforeInit() {\n\t\tif(Permission::check(\"ADMIN\")) return;\n\t\t\n\t\t// Logged into vBulletin; should be logged into SilverStripe\n\t\tif($userID = $this->currentVBUserID()) {\n\t\t\tif(!Member::currentUserID()) {\n\t\t\t\t$member = $this->findUser($userID);\n\t\t\t\tif(!$member) $member = $this->createNewUser($userID);\n\t\t\t\t$member->logIn();\n\t\t\t}\n\t\t\t\n\t\t// Not logged into vBulletin; shoudln't be logged into SilverStripe\n\t\t} else {\n\t\t\tif($member = Member::currentUser()) {\n\t\t\t\t$member->logOut();\n\t\t\t}\n\t\t}\n\t}", "public function create() {\n $page = 'createAccount';\n\n require('./View/default.php');\n }", "public function create()\n {\n $this->resetFields();\n //DAN MEMBUKA AREA\n $this->openUser();\n }", "public function create()\n {\n $this->cpAuthorize();\n }", "public function activate()\n {\n if (Manager::getInstance()->isPluginActivated('Login') == true) {\n Manager::getInstance()->deactivatePlugin('Login');\n }\n }", "public function onLogin()\n {\n return true;\n }", "public function onLogin()\n {\n return true;\n }", "public function enableTwoFactorAuth(): void\n {\n $this->twoFactorAuth->enabled_at = now();\n\n if (config('laraguard.recovery.enabled')) {\n $this->generateRecoveryCodes();\n }\n\n $this->twoFactorAuth->save();\n\n event(new Events\\TwoFactorEnabled($this));\n }", "public function canCreateAccounts()\n {\n return false;\n }", "protected function _createUser()\n {\n $data = [\n 'email' => 'newuser@email.nl',\n 'password' => 'test',\n ];\n\n $user = $this->Users->newEntity($data);\n\n $user->set('active', true);\n $user->set('role_id', 1);\n\n $this->Users->save($user);\n }", "public function create()\n {\n // Admin only\n }", "public function preDispatch()\n {\n parent::preDispatch();\n \n if (!Mage::getSingleton('customer/session')->authenticate($this)) {\n $this->setFlag('', 'no-dispatch', true);\n \n // adding message in customer login page\n Mage::getSingleton('core/session')\n ->addSuccess(Mage::helper('ordercustom')->__('Please sign in or create a new account'));\n }\n }", "public function FirstStepTenant()\n {\n $user = User::find(\\Auth::user()->idPerson);\n $user->status = 1;\n $user->save();\n }", "protected function firstLogin ( )\n\t{\n\t\t$uid = \\io\\creat\\chassis\\session::getInstance( )->getUid( );\n\t\t\n\t\t/**\n\t\t * Check if this user has signed first time.\n\t\t */\n\t\t$count = _db_1field( \"SELECT COUNT(*) FROM `\" . Config::T_LOGINS . \"`\n\t\t\t\t\t\t\t\tWHERE `\" . Config::F_UID . \"` = \\\"\" . _db_escape( $uid ) . \"\\\"\n\t\t\t\t\t\t\t\t\tAND `\" . Config::F_NS . \"` = \\\"\" . _db_escape( N7_SOLUTION_ID ) . \"\\\"\" );\n\t\t\n\t\tif ( $count <= 1 )\n\t\t{\n\t\t\t/**\n\t\t\t * Check for existence of Stuff app contexts. There should be none\n\t\t\t * at the time of first login.\n\t\t\t */\n\t\t\t$ctxs = _cdes::allCtxs( $uid, AbConfig::T_ABCTX);\n\t\t\tif ( !is_array( $ctxs ) || !count( $ctxs ) )\n\t\t\t{\n\t\t\t\t/*_db_query( \"INSERT INTO `\" . Config::T_LOGINS . \"`\n\t\t\t\t\t\t\t\tSET `\" . Config::F_UID . \"` = \\\"\" . _db_escape( $uid ) . \"\\\",\n\t\t\t\t\t\t\t\t\t`\" . Config::F_NS . \"` = \\\"\" . _db_escape( N7_SOLUTION_ID ) . \"\\\",\n\t\t\t\t\t\t\t\t\t`\" . Config::F_STAMP . \"` = NOW()\" );*/\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * Create base set of contexts.\n\t\t\t\t */\n\t\t\t\t$set = $this->messages['1st_login'];\n\t\t\t\t$cdes = new _cdes( $uid, AbConfig::T_ABCTX );\n\t\t\t\t$ctx_id = 0;\n\t\t\t\tforeach ( $set as $data )\n\t\t\t\t\t$ctx_id = $cdes->add( 0, $data[1], $data[0], $data[2] );\n\t\t\t}\n\t\t}\n\t}", "public function preDispatch()\n {\n parent::preDispatch();\n if (!Mage::getSingleton('customer/session')->authenticate($this)) {\n $this->setFlag('', Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true);\n\n // adding message in customer login page\n Mage::getSingleton('core/session')\n ->addSuccess(Mage::helper('inchoo_tickets')->__('Please sign in or create a new account.'));\n }\n }", "static function doCreateUser()\n {\n global $controller;\n runtime_csfr::Protect();\n $currentuser = ctrl_users::GetUserDetail();\n $formvars = $controller->GetAllControllerRequests('FORM');\n if ($formvars['inAccess'] == 1) {\n $access = \"%\";\n } else {\n $access = $formvars['inAccessIP'];\n }\n if (self::ExecuteCreateUser($currentuser['userid'], $formvars['inUserName'], $formvars['inDatabase'], $access))\n return true;\n return false;\n }", "function support_dynamo_first_activation() {\n wp_redirect(get_bloginfo('wpurl').'/wp-admin/admin.php?page=dynamo_support_&view=account');\n }", "public function beginLogin() {\n return false;\n }", "public function firstTime()\n {\n $user = Auth::user();\n $user->ce = true;\n $user->save();\n\n return redirect(route('dashboard.index'));\n }", "public function users_register_pre_add_user($h)\n {\n if (isset($h->vars['reg_flags'])) {\n $h->currentUser->role = 'pending';\n }\n }", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }", "public function createUser()\r\n {\r\n // use sign up in AuthController\r\n }", "public function login()\n {\n $customerData = Mage::getSingleton('customer/session')->getCustomer();\n $defaultprofile = Mage::getModel('beautyprofiler/beutyprofiler')->getCollection()->addFieldToSelect('profile_id')->addFieldToFilter('is_default', array('is_default'=>1))->addFieldToFilter('customer_entity_id', array('customer_entity_id'=>$customerData->getId()))->load();\n $profile_id = $defaultprofile->getData()[0]['profile_id'];\n // $profile_id = 300;\n Mage::getSingleton('customer/session')->setBeautyProfileId($profile_id);\n /*Check if current login customer have default profile or not*/\n $getprofile = Mage::getModel('beautyprofiler/beutyprofiler')->getCollection()->addFieldToSelect('profile_id')->addFieldToFilter('customer_entity_id', array('customer_entity_id'=>$customerData->getId()))->load();\n if(count($getprofile->getData()) == 0)\n {\n Mage::getSingleton('customer/session')->setNoprofile('yes');\n }\n Mage::getSingleton('customer/session')->setIncompleteprofile('yes');\n Mage::getSingleton('customer/session')->setRegisterprofile('yes');\n }", "public function create()\n {\n return isAdmin();\n }", "public function createUser()\n {\n }", "protected function startup()\n\t{\n\t\tparent::startup();\n\n\t\tif (!$this->getUser()->isAllowed($this->getName(), $this->getAction())) {\n\t\t\t$this->flashMessage('Daná sekcia alebo akcia je dostupná len po prihlásení.\n\t\t\t\tAk ste prihlásený požiadajte administrátora o pridelenie\n\t\t\t\toprávnení pre túto sekciu.');\n\n\t\t\tif ($this->loginPresenter) {\n\t\t\t\t$this->redirect('Administration:default');\n\t\t\t}\n\t\t}\n\t}", "public function run()\n {\n $this->createDefaultUser();\n }", "public function create(User $user)\n {\n if (Auth::check()==true ) {\n return true;\n }\n }", "protected function before()\n {\n $this->requireLogin();\n }", "protected function before()\n {\n $this->requireLogin();\n }", "public static function allowUserSignUp()\n {\n return false;\n }", "function allow_create_users() {\n\t\treturn apply_filters( 'import_allow_create_users', true );\n\t}", "public function create(){\n \n $data = array();\n $data['login'] = $_POST['login'];\n $data['password'] = Hash::create('sha256', $_POST['password'], HASH_KEY);\n $data['role'] = $_POST['role'];\n \n //Do the Error checking\n \n $this->model->RunCreate($data);\n /*\n * After we Post the user info to create, the header is refereshed so that the data appears dynamically \n * below in the users list\n */\n header('location: ' . URL . 'users');\n }", "function renren_account_auto_create($renren_user = null) {\n global $user;\n if (!isset($renren_user)) {\n $renren_user = renren_user_profile();\n if (!isset($renren_user)) {\n return false;\n }\n }\n // renren account is already exists\n if ($hishanghai_uid = hishanghai_account_uid_with_renren($renren_user->uid)) {\n $account = user_load($hishanghai_uid);\n if ($account) {\n $user = $account;\n drupal_goto('');\n }\n else {\n return;\n }\n }\n else {\n // renren account is not already exists\n // we create for user\n $user_edit = array(\n 'name' => check_plain($renren_user->name),\n 'mail' => 'renren@renren.com',\n 'pass' => user_password(),\n 'status' => 1,\n 'init' => check_plain($renren_user->name),\n 'access' => time(),\n );\n // check the user name \n if ($account = user_load(array('name' => $user_edit['name']))) {\n drupal_set_message(t('Sorry, We already have %name in our %site', array('%name' => $account->name, '%site' => variable_get('site_name', ''))));\n return;\n }\n else {\n $account = user_save(NULL, $user_edit);\n if ($account->uid) {\n if (!renren_account_insert($account->uid, $renren_user->uid)) {\n drupal_set_message(t('Sorry, there have errors accours.Please contact site adminstrator for support'));\n return;\n }\n else {\n $user = $account;\n drupal_set_message(t('Please complete the follow register form to create account on %site', array('%site' => variable_get('site_name', ''))));\n drupal_goto(\"user/$account->uid/settings\");\n }\n }\n else {\n drupal_set_message(t('Sorry, there have errors accors.Please contact site adminstrator for support'));\n return;\n }\n }\n }\n}", "private function register(): void\n {\n $user = User::factory()->create();\n $this->actingAs($user);\n }", "public function accountAction()\n {\n \tif(!in_array($this->_user->{User::COLUMN_STATUS}, array(User::STATUS_BANNED, User::STATUS_PENDING, User::STATUS_GUEST))){\n \t\t$this->_forward('homepage');\n \t\treturn;\n \t}\n \t$this->view->registerForm = new User_Form_Register();\n \t$this->view->loginForm = new User_Form_Login();\n }", "public static function userCreationAllowed(): bool\n {\n return self::isConfigured(self::ACTION_ADD_USER);\n }", "public function actionCreate()\n {\n $this->_model->status = User::ACTIVE;\n return $this->save($this->_model);\n }", "function assignFrontAuth() {\n AuthComponent::$sessionKey = 'Auth.User';\n $this->Auth->authenticate = array(\n 'Form' => array(\n 'userModel' => 'User',\n 'fields' => array('username' => 'email', 'password' => 'password', 'store_id'),\n 'scope' => array('User.merchant_id' => $this->Session->read('merchant_id'), 'User.role_id' => array('4', '5'), 'User.is_active' => 1, 'User.is_deleted' => 0)\n )\n );\n }", "public function start()\n {\n // Este módulo requiere a un usuario logueado\n $this -> setRequireUser( true );\n }", "public static function loginEnabled()\n\t{\n\t\treturn FALSE;\n\t}", "public static function loginEnabled()\n\t{\n\t\treturn FALSE;\n\t}", "public static function loginEnabled()\n\t{\n\t\treturn FALSE;\n\t}", "public function create($params)\n\t{\n\t\tif($user = parent::create($params))\n\t\t{\n\t\t\tif($user->add(ORM::factory('role', 'login')) AND $user->save())\n\t\t\t{\n\t\t Auth::instance()->force_login($user->username);\n\t\t return true;\n\t\t }\n\t\t}\n\t \n\t return false;\n\t}", "public function beforeFilter() {\n $this->set('user',$this->Auth->user());\n $this->set('isadmin',$this->Auth->user('role')==='admin');\n $this->AutoLogin->settings = array(\n // Model settings\n 'model' => 'Member',\n 'username' => 'username',\n 'password' => 'password',\n \n // Controller settings\n 'plugin' => '',\n 'controller' => 'users',\n 'loginAction' => 'login',\n 'logoutAction' => 'logout',\n \n // Cookie settings\n 'cookieName' => 'rememberMeWeblog',\n 'expires' => '+1 month',\n \n // Process logic\n 'active' => true,\n 'redirect' => true,\n 'requirePrompt' => true\n );\n }", "public function onUserRegistered()\n {\n $client = $this->clientManager->createClient();\n $client->setAllowedGrantTypes(array('token', 'authorization_code', ['password']));\n $this->clientManager->updateClient($client);\n }", "public function create() {\n\n if ($this->getIsNewRecord() == false) {\n throw new \\RuntimeException('Calling \"' . __CLASS__ . '::' . __METHOD__ . '\" on existing user');\n }\n\n $transaction = $this->getDb()->beginTransaction();\n\n try {\n $this->password = $this->password == null ? Password::generate(8) : $this->password;\n\n $this->trigger(self::BEFORE_CREATE);\n\n if (!$this->save()) {\n $transaction->rollBack();\n return false;\n }\n\n $this->confirm();\n\n $this->mailer->sendWelcomeMessage($this, null, true);\n $this->trigger(self::AFTER_CREATE);\n\n $transaction->commit();\n\n return true;\n } catch (\\Exception $e) {\n $transaction->rollBack();\n \\Yii::warning($e->getMessage());\n throw $e;\n }\n\n }", "function activate()\n {\n $user_id\t\t= $this->uri->segment(3);\n $new_email_key\t= $this->uri->segment(4);\n\n // Activate user\n if ($this->tank_auth->activate_user($user_id, $new_email_key)) {\t\t// success\n $this->tank_auth->logout();\n $this->_show_message($this->lang->line('auth_message_activation_completed').' '.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_activation_failed'));\n }\n }", "public function createUser(){\n $post = $this->_app->request->post();\n \n // Load the request schema\n $requestSchema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/user-create.json\");\n \n // Get the alert message stream\n $ms = $this->_app->alerts; \n \n // Access-controlled resource\n if (!$this->_app->user->checkAccess('create_account')){\n $ms->addMessageTranslated(\"danger\", \"ACCESS_DENIED\");\n $this->_app->halt(403);\n }\n\n // Set up Fortress to process the request\n $rf = new \\Fortress\\HTTPRequestFortress($ms, $requestSchema, $post); \n \n // Sanitize data\n $rf->sanitize();\n \n // Validate, and halt on validation errors.\n $error = !$rf->validate(true);\n \n // Get the filtered data\n $data = $rf->data(); \n \n // Remove csrf_token, password confirmation from object data\n $rf->removeFields(['csrf_token, passwordc']);\n \n // Perform desired data transformations on required fields. Is this a feature we could add to Fortress?\n $data['user_name'] = strtolower(trim($data['user_name']));\n $data['display_name'] = trim($data['display_name']);\n $data['email'] = strtolower(trim($data['email']));\n $data['active'] = 1;\n \n // Check if username or email already exists\n if (UserLoader::exists($data['user_name'], 'user_name')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_USERNAME_IN_USE\", $data);\n $error = true;\n }\n\n if (UserLoader::exists($data['email'], 'email')){\n $ms->addMessageTranslated(\"danger\", \"ACCOUNT_EMAIL_IN_USE\", $data);\n $error = true;\n }\n \n // Halt on any validation errors\n if ($error) {\n $this->_app->halt(400);\n }\n \n // Get default primary group (is_default = GROUP_DEFAULT_PRIMARY)\n $primaryGroup = GroupLoader::fetch(GROUP_DEFAULT_PRIMARY, \"is_default\");\n \n // Set default values if not specified or not authorized\n if (!isset($data['locale']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"locale\"]))\n $data['locale'] = $this->_app->site->default_locale;\n \n if (!isset($data['title']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"title\"])) {\n // Set default title for new users\n $data['title'] = $primaryGroup->new_user_title;\n }\n \n if (!isset($data['primary_group_id']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"primary_group_id\"])) {\n $data['primary_group_id'] = $primaryGroup->id;\n }\n \n // Set groups to default groups if not specified or not authorized to set groups\n if (!isset($data['groups']) || !$this->_app->user->checkAccess(\"update_account_setting\", [\"property\" => \"groups\"])) {\n $default_groups = GroupLoader::fetchAll(GROUP_DEFAULT, \"is_default\");\n $data['groups'] = [];\n foreach ($default_groups as $group_id => $group){\n $data['groups'][$group_id] = \"1\";\n }\n }\n \n // Hash password\n $data['password'] = Authentication::hashPassword($data['password']);\n \n // Create the user\n $user = new User($data);\n\n // Add user to groups, including selected primary group\n $user->addGroup($data['primary_group_id']);\n foreach ($data['groups'] as $group_id => $is_member) {\n if ($is_member == \"1\"){ \n $user->addGroup($group_id); \n }\n }\n \n // Store new user to database\n $user->store(); \n \n // Success message\n $ms->addMessageTranslated(\"success\", \"ACCOUNT_CREATION_COMPLETE\", $data);\n }", "protected function require_login()\n {\n return false;\n }", "protected function createDefaultUser() {\n User::create([\n 'name' => 'Admin',\n 'puntaje' => 1,\n 'lastname' => 'Admin',\n 'nacimiento' => Carbon::now(),\n 'fecha_visita' => Carbon::now(),\n 'email' => 'admin@admin.com',\n 'equipo_id' => 1,\n 'password' => Hash::make('123456789')\n ]); \n }", "public function sign_up()\n {\n\n }", "public function create()\n\t{\n\t\tif (Auth::check()) {\n\t\t\treturn view('Manageuser.create');\n\t\t} else {\n\t\t\treturn view('auth.login');\n\t\t}\n\t}", "public function userHasCreatePermission(){\n//\t\tif(\\GO\\Base\\Model\\Acl::hasPermission($this->getPermissionLevel(),\\GO\\Base\\Model\\Acl::CREATE_PERMISSION)){\n//\t\t\treturn true;\n//\t\t}else \n\t\tif(\\GO::modules()->isInstalled('freebusypermissions')){\n\t\t\treturn \\GO\\Freebusypermissions\\FreebusypermissionsModule::hasFreebusyAccess(\\GO::user()->id, $this->user_id);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function create()\n {\n abort_if(Gate::denies('roleCreate'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n $this->resetInputFields();\n\n $this->createModal = true;\n }", "function after_switch_theme() {\n \\add_role('demo', __('Demo', 'theme-piber'), get_role('administrator')->capabilities);\n \\wp_insert_user(array(\n 'user_login' => 'demo',\n 'user_pass' => 'demo',\n 'role' => 'demo',\n ));\n}", "public function init()\n {\n parent::init();\n \n if (!Yii::$app->user->isGuest) {\n if (PodiumModule::getInstance()->userComponent == PodiumModule::USER_INHERIT) {\n $user = User::findMe();\n if (empty($user)) {\n $new = new User;\n $new->setScenario('installation');\n $new->inherited_id = Yii::$app->user->id;\n $new->status = User::STATUS_ACTIVE;\n $new->role = User::ROLE_MEMBER;\n $new->timezone = User::DEFAULT_TIMEZONE;\n if ($new->save()) {\n $this->success(Yii::t('podium/flash', 'Hey! Your new forum account has just been automatically created! Go to {link} to complement it.', ['link' => Html::a(Yii::t('podium/view', 'Profile'))]));\n Cache::clearAfterActivate();\n Log::info('Inherited account created', $new->id, __METHOD__);\n }\n else {\n throw new Exception(Yii::t('podium/view', 'There was an error while creating inherited user account. Podium can not run with the current configuration. Please contact administrator about this problem.'));\n }\n }\n elseif ($user->status == User::STATUS_BANNED) {\n return $this->redirect(['default/ban']);\n }\n }\n else {\n $user = Yii::$app->user->identity;\n }\n if ($user && !empty($user->timezone)) {\n Yii::$app->formatter->timeZone = $user->timezone;\n }\n }\n }", "public function indexApCreate(){\n //This will be used to display in the Wizard of available Realms in the Create screens of Vouchers; Permanent Users; and Devices\n $user = $this->Aa->user_for_token($this);\n if(!$user){ //If not a valid user\n return;\n }\n $this->_doApListFor($user,'create'); \n }", "public function initializeBackendUser() {}", "public function initializeBackendUser() {}", "public function authorize()\n {\n // TODO: Check if is authorized to create user\n return true;\n }", "function register_action()\n {\n $login_model = $this->loadModel('Login');\n $registration_successful = $login_model->registerNewUser();\n\n if ($registration_successful == true) {\n $this->view->render('login/index');\n } else {\n $this->view->render('login/register');\n }\n }", "public function create()\n {\n // TODO: Algún parámetro para no permitir el registro.\n \n // Es ya un usuario?\n if (Core::isUser())\n {\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('') . '\\';');\n return;\n }\n \n // Tenemos datos?\n if ($this->request->is('email'))\n {\n // Validamos los datos\n $form = Core::getLib('form.validator');\n $form->setRules(Core::getService('account.signup')->getValidation());\n \n // Si no hay errores procedemos a capturar los datos.\n if ($form->validate())\n {\n // Agregamos usuario\n if (Core::getService('account.process')->add($this->request->getRequest()))\n {\n if (Core::getParam('user.verify_email_at_signup'))\n {\n // Vamos a que verifique su email\n Core::getLib('session')->set('email', $this->request->get('email'));\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.verify') . '\\';');\n }\n else\n {\n // Iniciamos sesión\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.login') . '\\';');\n }\n \n return;\n }\n }\n }\n \n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.signup') . '\\';');\n }", "public function isLoginRequired()\r\n\t{\r\n\t\treturn true;\r\n\t}", "function initUser(&$user) {\n $user->setName($this->getFasUsername());\n $user->mEmail = strtolower($user->getName()).\"@fedoraproject.org\";\n $user->mEmailAuthenticated = wfTimestampNow();\n $user->setToken();\n $user->saveSettings();\n //error_log(\"FAS [initUser]: \" . $user->getName() . \", \" . $this->getFasUsername(), 0);\n return true;\n }", "public function create()\n {\n //\n if ((Session::get('grandidsession')===null)){\n return view('admin.login');\n }\n \n return view('admin.create_user');\n }", "public function initialConfig() \n {\n //NB: various link modes handled below in setupPageData()\n if(!isset($_GET['mode'])) {\n\n $this->user_id = $this->user->setupUserData();\n if($this->user_id != 0) {\n $this->addMessage('You are already logged in! You can login as another user or '.$this->js_links['back']);\n\n $_SESSION['login_redirect'] = $_SESSION['login_redirect'] + 1 ;\n if($_SESSION['login_redirect'] > 5) {\n $this->addError('Something is wrong with your access credentials. Please contact support.');\n } else {\n $this->user->redirectLastPage();\n }\n }\n }\n \n }", "function loginBegin()\r\n\t{\r\n\t\t// if we have extra perm\r\n\t\tif( isset( $this->config[\"scope\"] ) && ! empty( $this->config[\"scope\"] ) )\r\n\t\t{\r\n\t\t\t$this->scope = $this->scope . \", \". $this->config[\"scope\"];\r\n\t\t}\r\n\r\n\t\t// get the login url \r\n\t\t$url = $this->api->getLoginUrl( array( 'scope' => $this->scope, 'redirect_uri' => $this->endpoint ) );\r\n\r\n\t\t// redirect to facebook\r\n\t\tHybrid_Auth::redirect( $url ); \r\n\t}", "public function ActivateUser()\n {\n if (false === $this->isActivateUserAllowed()) {\n return;\n }\n\n $oMailProfile = TDataMailProfile::GetProfile('new-registration');\n\n if (null === $oMailProfile) {\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $sMessageCode = 'ERROR_ACTIVATE_USER';\n $oMessageManager->AddMessage($sConsumerName, $sMessageCode);\n\n return;\n }\n\n $password = TTools::GenerateNicePassword();\n\n $oMailProfile->AddData('login', $this->oTable->sqlData['login']);\n $oMailProfile->AddData('name', $this->oTable->sqlData['firstname']);\n $oMailProfile->AddData('email', $this->oTable->sqlData['email']);\n $oMailProfile->AddData('password', $password);\n $oMailProfile->ChangeToAddress($this->oTable->sqlData['email'], $this->oTable->sqlData['name']);\n\n $bValidEmail = TTools::IsValidEMail($this->oTable->sqlData['email']);\n $sMessageCode = 'ERROR_ACTIVATE_USER';\n if ($bValidEmail) {\n $oMailProfile->SendUsingObjectView('TDataMailProfile', 'Core');\n\n $filterUtil = $this->getInputFilterUtil();\n $postData = $this->oTable->sqlData;\n foreach ($postData as $key => $value) {\n $valueOfKey = $filterUtil->getFilteredInput($key);\n if (null !== $valueOfKey) {\n $postData[$key] = $valueOfKey;\n }\n }\n\n $postData['crypted_pw'] = $password;\n $postData['crypted_pw_check'] = $password;\n $postData['allow_cms_login'] = '1';\n $this->Save($postData);\n $sMessageCode = 'SUCCESS_ACTIVATE_USER';\n }\n\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $oMessageManager->AddMessage($sConsumerName, $sMessageCode);\n }", "function install_root_user() {\n $fields = array(\n 'username' => $site_config['adminUser'],\n 'password' => $site_config['adminPassword'],\n 'role' => DEFAULT_ADMIN_RID,\n 'email' => $site_config['adminEmail'],\n 'name' => $site_config['adminName'],\n 'language' => Session::get('lang'),\n 'active' => 1\n );\n $new_user = new User();\n if($new_user->create($fields)) {\n return true;\n }\n else {\n System::addMessage('error', rt('The site administrator could not be created. Please verify that your server meets the requirements for the application and that your database user has sufficient permissions ot make changes in the database'));\n }\n}", "public function register_new() {\n\t\t$fields = array(\n\t\t\t'address1', 'address2', 'city', 'comment', 'country', 'email', 'fax_src', 'first_name',\n\t\t\t'gender', 'insertion', 'company_name', 'lang', 'last_name', 'middle_name', 'mobile_src',\n\t\t\t'phone_src', 'prefix', 'state', 'suffix', 'zip', 'tax_ex_number', 'timezone'/* , 'house_num', 'house_suff' */\n\t\t);\n\t\t$clean_data = $this->_fill_account_data($fields);\n\n\t\t$clean_data['password'] = $_POST['password'];\t## password may contain escapeable symbols\n\t\t$clean_data['fraud_check'] = 1;\n\t\t$clean_data['ip_address'] = $this->translator->getClientIp();\n\n\t\tinstall_error_handler(array('UserPerson', 'NewAccountsDenied', 'UserExtData', 'InvalidAccountStatus'), 'handle_register_new_account_error');\n\t\t$account_id = call('create_customer', $clean_data, 'HSPC/API/Account');\n\t\tif($account_id) {\n\t\t\t$this->error->add(MC_SUCCESS, 'YOU_BEEN_REGISTERED');\n\t\t\treturn $this->sign_in();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function create()\n {\n if(Auth::check())\n {\n return view('niveaux.create');\n\n }\n return view('auth.login');\n }", "public function doCreate() {\n if(\n isset($_POST['email']) &&\n isset($_POST['password']) &&\n isset($_POST['lastName']) &&\n isset($_POST['firstName']) &&\n isset($_POST['address']) &&\n isset($_POST['postalCode']) &&\n isset($_POST['city'])\n ) {\n $alreadyExist = $this->userManager->findByEmail($_POST['email']);\n\n if(!$alreadyExist) {\n $newUser = new User($_POST);\n $this->userManager->create($newUser);\n $page = 'login';\n }\n else {\n $error = \"ERROR : This email (\".$_POST['email'].\") is used by another user\";\n $page = 'create';\n }\n }\n\n require('./View/default.php');\n }", "function add() {\n $this->layout = \"no_header\";\n if (!empty($this->data)) {\n if ($this->User->save($this->data)) {\n $this->Session->setFlash(\"Your account has been created successfully\");\n $this->go_back(\"login\");\n }\n }\n }", "public function register(){\n\n\t\t$this->Login_model->register();\t\n\n\t}", "public function beforeSave() {\n if(($this->getScenario() === 'register') || ($this->getScenario() === 'changePassword')) \n $this->password = md5($this->password);\n return true;\n }", "function create_user()\n{\n\t// Check to see if the account is admin\n\t$account_type = account_type();\n\t\n\tif ( $account_type == 0 )\n\t{\n\t\t// Connect to the database\n\t\t$link = dbConnect();\n\t\t\n\t\t$query = mysql_query( \"SELECT first_name, last_name FROM BCD_User WHERE username = '\" . $_SESSION[ 'username' ] . \"'\" );\n\t\t\n\t\t// Close the database\n\t\tdbClose( $link );\n\t}\n}", "public function __construct() {\n $this->isLogin();\n }", "public function create()\n\t{\n\t\t$data = ['user_role_id' => USER_ROLE_ADMINISTRATOR];\n\t\tif ($id = $this->users_model->save($data)) {\n\n\t\t\t//if user has not access to update\n\t\t\t$this->session->set_userdata(['new_item' => ['module' => 'administrators', 'id' => $id]]);\n\n\t\t\tredirect(\"/admin/users/update/$id\");\n\t\t}\n\t\telse {\n\t\t\t$this->pls_alert_lib->set_flash_messages('error', lang('admin_create_failed'));\n\t\t\tredirect(\"/admin/administrators\");\n\t\t}\n\t}", "public function create()\n {\n if($result = check_auth_to('QXXX_ADD')) return $result;\n $site = Config::get('site');\n $data['auth_type'] = $site['auth_type'];\n return view('admin.auth.create', $data);\n }", "public function actionActivate()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', [\n 'required' => true\n ]);\n $model = $this->findModel($username);\n $model->status = User::STATUS_ACTIVE;\n $model->removeEmailConfirmToken();\n $this->log($model->save());\n }", "public function login() {\r\n\r\n // signal any observers that the user has logged in\r\n $this->setState(\"login\");\r\n }", "public function enableRememberMe()\n {\n $this->rememberMe = true;\n }", "function requires_login()\n {\n $user = user();\n \n if ( empty( $user ) )\n {\n // no user id found, send to login\n Utility::redirect( Utility::login_url() );\n }\n }", "public function create()\n\t{\n\t\tif (Auth::check()) {\n\t\t\tSession::flash('info_message', 'You are already logged into an account!');\n\t\t\treturn Redirect::route('users.index');\n\t\t} else {\n\t\t\treturn view('users.create');\n\t\t}\n\t}" ]
[ "0.7401358", "0.65005904", "0.63615036", "0.6343414", "0.63270164", "0.6242941", "0.61625224", "0.6149442", "0.6074863", "0.6060299", "0.60417706", "0.60383976", "0.6037879", "0.6032267", "0.60147244", "0.60064083", "0.6005071", "0.6005071", "0.5972743", "0.59504443", "0.5929355", "0.5919029", "0.58964163", "0.58859974", "0.58850294", "0.58628994", "0.5842671", "0.5799875", "0.57950574", "0.57937276", "0.5785461", "0.576841", "0.576841", "0.576841", "0.576841", "0.57612824", "0.57612824", "0.5749465", "0.5747835", "0.57448006", "0.5744688", "0.57426983", "0.57365584", "0.5735986", "0.5735986", "0.57327884", "0.5730698", "0.57296866", "0.5728007", "0.5713659", "0.5709895", "0.5709169", "0.5705535", "0.57015914", "0.56959194", "0.56890655", "0.56890655", "0.56890655", "0.5688862", "0.5685227", "0.56698513", "0.5664619", "0.5658217", "0.5650711", "0.5648154", "0.56461424", "0.56276006", "0.56163394", "0.56146145", "0.5612084", "0.56114346", "0.56107444", "0.55982554", "0.5596336", "0.55958575", "0.5587547", "0.55866617", "0.5585139", "0.55840194", "0.55827475", "0.5577271", "0.5573483", "0.5562621", "0.5558901", "0.55569315", "0.5550699", "0.5549095", "0.5542664", "0.5542392", "0.55381167", "0.55379266", "0.5533076", "0.5526055", "0.5520211", "0.55191624", "0.55138695", "0.55134666", "0.55129653", "0.5497758", "0.5497318" ]
0.72981447
1