query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Do select list for: Suppliers | function do_select_list_suppliers($aname, $avalue) {
# Dim some Vars:
global $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;
# Set Query for select.
$query = 'SELECT s_id, s_company, s_name_first, s_name_last FROM '.$_DBCFG['suppliers'];
$query .= " WHERE s_email <> ''";
$query .= ' ORDER BY s_company ASC, s_name_last ASC, s_name_first ASC';
$result = $db_coin->db_query_execute($query);
$numrows = $db_coin->db_query_numrows($result);
# Build form field output
$_out .= '<select class="select_form" name="'.$aname.'" size="1">'.$_nl;
$_out .= '<option value="0">'.$_LANG['_BASE']['Please_Select'].'</option>'.$_nl;
$_out .= '<option value="-1"';
IF ($avalue == -1) {$_out .= ' selected';}
$_out .= '>'.$_LANG['_MAIL']['All_Active_Suppliers'].'</option>'.$_nl;
# Process query results to list individual suppliers
while(list($s_id, $s_company, $s_name_first, $s_name_last) = $db_coin->db_fetch_row($result)) {
$_more = '';
# Add supplier info, indenting if additional emails present
$_out .= '<option value="'.$s_id.'"';
IF ($s_id == $avalue) {$_out .= ' selected';}
$_out .= '>';
$_out .= $s_company.' - '.$s_name_last.', '.$s_name_first.'</option>'.$_nl;
# Grab any additional emails for this client, so they are all together in the list
$_more = do_select_list_suppliers_additional_emails($s_id, $s_company);
# Add "All" option, if necessary
IF ($_more) {
IF (substr_count($_more, '<option') > 1) {
$_out .= '<option value="contacts|'.$cl_id.'">'.$_sp.$_sp.$_sp.$s_company.' - '.$s_name_last.', '.$s_name_first.' ('.$_LANG['_BASE']['All_Contacts'].')</option>'.$_nl;
}
$_out .= $_more;
}
}
$_out .= '</select>'.$_nl;
return $_out;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function listSuppliers($suppliers) {\n \n echo \"<input list=suppliers name=supplier>\";\n echo \"<datalist id=suppliers>\";\n \n // Loop through the suppliers and insert it as an option\n foreach ($suppliers as $supplier) {\n \n echo '<option value=\"' . $supplier[\"SNAME\"] . ' \">' . '</option>';\n \n }\n \n echo \"</datalist>\";\n \n \n }",
"function cp_do_select_listing_suppliers($adata) {\n\t# Get security vars\n\t\t$_SEC\t= get_security_flags();\n\t\t$_PERMS\t= do_decode_perms_admin($_SEC['_sadmin_perms']);\n\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_LANG, $_nl, $_sp;\n\t\t$_where\t= '';\n\t\t$_out\t= '';\n\t\t$_ps\t\t= '';\n\t\tIF ($adata['status'] && $adata['status'] != 'all') {$_ps .= '&status='.$adata['status'];}\n\t\tIF ($adata['notstatus']) {$_ps .= '¬status='.$adata['notstatus'];}\n\n\n\t# Set Query for select.\n\t\t$query = 'SELECT * FROM '.$_DBCFG['suppliers'];\n\n\t# Set Filters\n\t\tIF (!$adata['fb'])\t\t{$adata['fb'] = '';}\n\t\tIF ($adata['fb'] == '1')\t{$_where .= \" WHERE s_status='\".$db_coin->db_sanitize_data($adata['fs']).\"'\";}\n\n\t# Show only selected status suppliers\n\t\tIF ($adata['status'] && $adata['status'] != 'all') {\n\t\t\tIF ($_where) {$_where .= ' AND ';} ELSE {$_where .= ' WHERE ';}\n\t\t\t$_where .= \"s_status='\".$db_coin->db_sanitize_data($adata['status']).\"'\";\n\t\t}\n\t\tIF ($adata['notstatus']) {\n\t\t\tIF ($_where) {$_where .= ' AND ';} ELSE {$_where .= ' WHERE ';}\n\t\t\t$_where .= \"s_status != '\".$db_coin->db_sanitize_data($adata['notstatus']).\"'\";\n\t\t}\n\n\t# Set Order ASC / DESC part of sort\n\t\tIF (!$adata['so'])\t\t{$adata['so'] = 'A';}\n\t\tIF ($adata['so'] == 'A')\t{$order_AD = ' ASC';}\n\t\tIF ($adata['so'] == 'D')\t{$order_AD = ' DESC';}\n\n\t# Set Sort orders\n\t\tIF (!$adata['sb'])\t\t{$adata['sb'] = '3';}\n\t\tIF ($adata['sb'] == '1')\t{$_order = ' ORDER BY s_id'.$order_AD;}\n\t\tIF ($adata['sb'] == '2')\t{$_order = ' ORDER BY s_status'.$order_AD;}\n\t\tIF ($adata['sb'] == '3')\t{$_order = ' ORDER BY s_company'.$order_AD;}\n\t\tIF ($adata['sb'] == '4')\t{$_order = ' ORDER BY s_name_last'.$order_AD.', s_name_first'.$order_AD;}\n\t\tIF ($adata['sb'] == '5')\t{$_order = ' ORDER BY s_email'.$order_AD;}\n\n\t# Set / Calc additional paramters string\n\t\tIF ($adata['sb'])\t{$_argsb= '&sb='.$adata['sb'];}\n\t\tIF ($adata['so'])\t{$_argso= '&so='.$adata['so'];}\n\t\tIF ($adata['fb'])\t{$_argfb= '&fb='.$adata['fb'];}\n\t\tIF ($adata['fs'])\t{$_argfs= '&fs='.$adata['fs'];}\n\t\t$_link_xtra = $_argsb.$_argso.$_argfb.$_argfs;\n\n\t# Build Page menu\n\t# Get count of rows total for pages menu:\n\t\t$query_ttl = 'SELECT COUNT(*)';\n\t\t$query_ttl .= ' FROM '.$_DBCFG['suppliers'];\n\t\t$query_ttl .= $_where;\n\n\t\t$result_ttl= $db_coin->db_query_execute($query_ttl);\n\t\twhile(list($cnt) = $db_coin->db_fetch_row($result_ttl)) {$numrows_ttl = $cnt;}\n\n\t# Page Loading first rec number\n\t# $_rec_next\t- is page loading first record number\n\t# $_rec_start\t- is a given page start record (which will be rec_next)\n\t\tIF (!$_CCFG['IPP_SUPPLIERS'] > 0) {$_CCFG['IPP_SUPPLIERS'] = 15;}\n\t\t$_rec_page\t= $_CCFG['IPP_SUPPLIERS'];\n\t\t$_rec_next\t= $adata['rec_next'];\n\t\tIF (!$_rec_next) {$_rec_next=0;}\n\n\t# Range of records on current page\n\t\t$_rec_next_lo = $_rec_next+1;\n\t\t$_rec_next_hi = $_rec_next+$_rec_page;\n\t\tIF ($_rec_next_hi > $numrows_ttl) {$_rec_next_hi = $numrows_ttl;}\n\n\t# Calc no pages,\n\t\t$_num_pages = round(($numrows_ttl/$_rec_page), 0);\n\t\tIF ($_num_pages < ($numrows_ttl/$_rec_page)) {$_num_pages = $_num_pages+1;}\n\n\t# Loop Array and Print Out Page Menu HTML\n\t\t$_page_menu = $_LANG['_ADMIN']['l_Pages'].$_sp;\n\t\tfor ($i = 1; $i <= $_num_pages; $i++) {\n\t\t\t$_rec_start = (($i*$_rec_page)-$_rec_page);\n\t\t\tIF ($_rec_start == $_rec_next) {\n\t\t\t# Loading Page start record so no link for this page.\n\t\t\t\t$_page_menu .= $i;\n\t\t\t} ELSE {\n\t\t\t\t$_page_menu .= '<a href=\"admin.php?cp=suppliers'.$_link_xtra.$_ps.'&rec_next='.$_rec_start.'\">'.$i.'</a>';\n\t\t\t}\n\t\t\tIF ($i < $_num_pages) {$_page_menu .= ','.$_sp;}\n\t\t} # End page menu\n\n\t# Finish out query with record limits and do data select for display and return check\n\t\t$query\t.= $_where.$_order.\" LIMIT $_rec_next, $_rec_page\";\n\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\n\t# Generate links for sorting\n\t\t$_hdr_link_prefix = '<a href=\"admin.php?cp=suppliers&sb=';\n\t\t$_hdr_link_suffix = '&fb='.$adata['fb'].'&fs='.$adata['fs'].'&fc='.$adata['fc'].'&rec_next='.$_rec_next.$_ps.'\">';\n\n\t\t$_hdr_link_1 = $_LANG['_ADMIN']['l_Supplier_ID'].$_sp.'<br>';\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_hdr_link_1 .= $_hdr_link_prefix.'1&so=A'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_ASC_S'].'</a>';\n\t\t\t$_hdr_link_1 .= $_hdr_link_prefix.'1&so=D'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_DSC_S'].'</a>';\n\t\t}\n\n\t\t$_hdr_link_2 = $_LANG['_ADMIN']['l_Status'].$_sp.'<br>';\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_hdr_link_2 .= $_hdr_link_prefix.'2&so=A'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_ASC_S'].'</a>';\n\t\t\t$_hdr_link_2 .= $_hdr_link_prefix.'2&so=D'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_DSC_S'].'</a>';\n\t\t}\n\n\t\t$_hdr_link_3 = $_LANG['_ADMIN']['l_Company'].$_sp.'<br>';\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_hdr_link_3 .= $_hdr_link_prefix.'3&so=A'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_ASC_S'].'</a>';\n\t\t\t$_hdr_link_3 .= $_hdr_link_prefix.'3&so=D'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_DSC_S'].'</a>';\n\t\t}\n\n\t\t$_hdr_link_4 = $_LANG['_ADMIN']['l_Full_Name'].$_sp.'<br>';\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_hdr_link_4 .= $_hdr_link_prefix.'4&so=A'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_ASC_S'].'</a>';\n\t\t\t$_hdr_link_4 .= $_hdr_link_prefix.'4&so=D'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_DSC_S'].'</a>';\n\t\t}\n\n\t\t$_hdr_link_5 = $_LANG['_ADMIN']['l_Email_Address'].$_sp.'<br>';\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_hdr_link_5 .= $_hdr_link_prefix.'5&so=A'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_ASC_S'].'</a>';\n\t\t\t$_hdr_link_5 .= $_hdr_link_prefix.'5&so=D'.$_hdr_link_suffix.$_TCFG['_IMG_SORT_DSC_S'].'</a>';\n\t\t}\n\n\t\t$_hdr_link_6 .= $_LANG['_ADMIN']['l_Balance'].$_sp.'<br>';\n\n\t# Build Status header bar for viewing only certain types\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_out .= ' <table cellpadding=\"5\" cellspacing=\"0\" border=\"0\"><tr>';\n\t\t\t$_out .= '<td>'.$_LANG['_BASE']['Only'].':</td>';\n\t\t\t$_out .= '<td> [<a href=\"admin.php?cp=suppliers&op=none&status=all'.$_link_xtra;\n\t\t\t$_out .= '\">'.$_LANG['_BASE']['All'].'</a>] </td>';\n\t\t\tfor ($i=0; $i< sizeof($_CCFG['S_STATUS']); $i++) {\n\t\t\t\t$_out .= '<td align=\"right\"><nobr> [<a href=\"admin.php?cp=suppliers&op=none&status='.$_CCFG['S_STATUS'][$i].$_link_xtra;\n\t\t\t\t$_out .= '\">'.$_CCFG['S_STATUS'][$i].'</a>] </nobr></td>';\n\t\t\t}\n\t\t\t$_out .= '</tr><tr>';\n\t\t\t$_out .= '<td>'.$_LANG['_BASE']['Except'].':</td>';\n\t\t\t$_out .= '<td> </td>';\n\t\t\tfor ($i=0; $i< sizeof($_CCFG['S_STATUS']); $i++) {\n\t\t\t\t$_out .= '<td><nobr> [<a href=\"admin.php?cp=suppliers&op=none¬status='.$_CCFG['S_STATUS'][$i].$_link_xtra;\n\t\t\t\t$_out .= '\">'.$_CCFG['S_STATUS'][$i].'</a>] </nobr></td>';\n\t\t\t}\n\t\t\t$_out .= '</tr></table>';\n\t\t\t$_out .= '<br><br>';\n\t\t}\n\n\t# Build form output\n\t\t$_out .= '<div align=\"center\">'.$_nl;\n\t\t$_out .= '<table width=\"95%\" border=\"0\" bordercolor=\"'.$_TCFG['_TAG_TABLE_BRDR_COLOR'].'\" bgcolor=\"'.$_TCFG['_TAG_TRTD_BKGRND_COLOR'].'\" cellpadding=\"0\" cellspacing=\"1\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_TITLE\"><td class=\"TP3MED_NC\" colspan=\"'.(7-$_CCFG['_IS_PRINT']).'\">'.$_nl;\n\n\t\t$_out .= '<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_IT_TITLE_TXT\">'.$_nl.'<td class=\"TP0MED_NL\">'.$_nl;\n\t\t$_out .= '<b>'.$_LANG['_ADMIN']['Suppliers'].':'.$_sp.'('.$_rec_next_lo.'-'.$_rec_next_hi.$_sp.$_LANG['_ADMIN']['of'].$_sp.$numrows_ttl.$_sp.$_LANG['_ADMIN']['total_entries'].')</b><br>'.$_nl;\n\t\t$_out .= '</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP0MED_NR\">'.$_sp.'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl.'</table>'.$_nl;\n\n\t\t$_out .= '</td></tr>'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\" valign=\"top\">'.$_hdr_link_1.'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\" valign=\"top\">'.$_hdr_link_2.'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\" valign=\"top\">'.$_hdr_link_3.'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\" valign=\"top\">'.$_hdr_link_4.'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\" valign=\"top\">'.$_hdr_link_5.'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BR\" valign=\"top\">'.$_hdr_link_6.'</td>'.$_nl;\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t$_out .= '<td class=\"TP3SML_BL\" valign=\"top\">'.$_LANG['_CCFG']['Actions'].'</td>'.$_nl;\n\t\t}\n\t\t$_out .= '</tr>'.$_nl;\n\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\t\t\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.$row['s_id'].'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.$row['s_status'].'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.$row['s_company'].'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.$row['s_name_last'];\n\t\t\t\tIF ($row['s_name_last']) {$_out .= ', ';}\n\t\t\t\t$_out .= $row['s_name_first'];\n\t\t\t\t$_out .= '</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.$row['s_email'].'</td>'.$_nl;\n\t\t\t\t$idata = do_get_bill_supplier_balance($row['s_id']);\n\t\t\t\t$_out .= '<td class=\"TP3SML_NR\">';\n\t\t\t\tIF ($idata['net_balance']) {$_out .= do_currency_format($idata['net_balance'],1,0,$_CCFG['CURRENCY_DISPLAY_DIGITS_AMOUNT']);}\n\t\t\t\t$_out .= $_sp.'</td>'.$_nl;\n\n\t\t\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t\t\t$_out .= '<td class=\"TP3SML_NL\"><nobr>'.$_nl;\n\t\t\t\t\t$_out .= do_nav_link('admin.php?cp=suppliers&op=view&s_id='.$row['s_id'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t\t\t\t\tIF ($_PERMS['AP16'] == 1 || $_PERMS['AP04'] == 1) {\n\t\t\t\t\t\t$_out .= do_nav_link('admin.php?cp=suppliers&op=edit&s_id='.$row['s_id'], $_TCFG['_S_IMG_EDIT_S'],$_TCFG['_S_IMG_EDIT_S_MO'],'','');\n\t\t\t\t\t\t$_out .= do_nav_link('admin.php?cp=suppliers&op=delete&stage=1&s_id='.$row['s_id'].'&s_name_first='.$row['s_name_first'].'&s_name_last='.$row['s_name_last'], $_TCFG['_S_IMG_DEL_S'],$_TCFG['_S_IMG_DEL_S_MO'],'','');\n\t\t\t\t\t}\n\t\t\t\t\t$_out .= '</nobr></td>'.$_nl;\n\t\t\t\t}\n\t\t\t\t$_out .= '</tr>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\"><td class=\"TP3MED_NC\" colspan=\"'.(7-$_CCFG['_IS_PRINT']).'\">'.$_nl;\n\t\t$_out .= $_page_menu.$_nl;\n\t\t$_out .= '</td></tr>'.$_nl;\n\n\t\t$_out .= '</table>'.$_nl;\n\t\t$_out .= '</div>'.$_nl;\n\t\t$_out .= '<br>'.$_nl;\n\n\t\treturn $_out;\n}",
"public function getSuppliers($suppliers_id);",
"public function get_suppliers_list()\n\t {\n\t \t$userId=$this->checklogin();\n\t \t$query=$this->ApiModel->get_suppliers_list($userId);\n\t \techo json_encode($query);\n\t }",
"public function suppliers_by_cat($id_cat, $clang = 'ro'){\n\t\t\n\t\t\t$str = '<option value=\"\" label=\"' . lang('invoices_pick') . '\">' . lang('invoices_pick') . '</option>';\n\t\t\t$options = $this->ss_suppliers_model->options_list(NULL, NULL, array('id_cat' => $id_cat));\n\t\t\t$selectedSupplier = $this->input->post('supplier');\n\t\t\t\n\t\t\tforeach($options as $key => $val)\n\t\t\t{\n\t\t\t\t$str = $str . '<option value=\"'. $key .'\"'. ($key != $selectedSupplier ? '' : ' selected') .'>'.$val.'</option>';\n\t\t\t}\n\t\t\t\n\t\t\techo $str;\n\t\t}",
"public function getProductSelections();",
"public function getSupplierList()\n {\n return 'supplier';\n }",
"public function brandsSearchDrop(){\n $table = \"brands\";\n $cresults = $this->getAllrecords($table);\n if($cresults == \"NO_RECORDS_FOUND\"){\n echo(\"NO_PRODUCT_FOUND\");\n }\n else{\n foreach($cresults as $brands){\n echo('<option value=\"'.$brands[\"brand_id\"].'\">'.$brands[\"brand_name\"].'</option>');\n }\n\n\n }\n\n \n}",
"public function getAllSuppliersToDataTables();",
"public function getSuppliers($options = array())\n {\n return $this->getListe(\"suppliers\", $options);\n }",
"function vcn_get_career_names_select_list () {\r\n\t$data = vcn_rest_wrapper('vcnoccupationsvc', 'vcncareer', 'listcareers', array('industry' => vcn_get_industry()), 'json');\r\n\t$select_list_array = array('' => 'Select a Career');\r\n\r\n\tif (count($data) > 0) {\r\n\t\tforeach ($data as $value) {\r\n\t\t\t$select_list_array[$value->onetcode] = $value->title;\r\n\t\t}\r\n\t}\r\n\treturn $select_list_array;\r\n}",
"public function draw_product_selection() {\n\n // Get products in the wooCommerce store\n $products = $this->getProducts();\n\n echo \"<select name='product'>\";\n /** @var Product $product */\n foreach ($products as $product) {\n echo \"<option value='\".$product->getId().\"'>\".$product->getTitle().\"</option>\";\n }\n echo \"</select>\";\n }",
"public function getListOfSuppliers() {\n return $this->client->GetListOfSuppliers();\n }",
"public function brandForm(){\n $table = \"brands\";\n $cresults = $this->getAllrecords($table);\n foreach($cresults as $brand){\n echo('<option value=\"'.$brand[\"brand_id\"].'\">'.$brand[\"brand_name\"].'</option>');\n }\n\n\n }",
"function GetSupplierList($arryDetails)\r\n\t\t{\r\n\t\t\textract($arryDetails);\t\t\t\r\n\t\t\t$strAddQuery ='';\r\n\t\t\t#$strAddQuery .= (!empty($SuppID))?(\" and s.SuppID='\".$SuppID.\"'\"):(\" and s.locationID='\".$_SESSION['locationID'].\"'\");\r\n\t\t\t$strAddQuery .= (!empty($SuppID))?(\" and s.SuppID='\".mysql_real_escape_string($SuppID).\"'\"):(\" \");\r\n\t\t\t$strAddQuery .= (!empty($Status))?(\" and s.Status='\".$Status.\"'\"):(\"\");\r\n\t\t\t$strAddQuery .= (!empty($primaryVendor))?(\" and s.primaryVendor='1'\"):(\"\");\r\n\t\t\t$strAddQuery .= (!empty($CreditCard))?(\" and s.CreditCard='1'\"):(\"\");\r\n\t\t\t$strSQLQuery = \"select s.SuppID,s.SuppCode,s.UserName,s.Email,s.CompanyName,s.Address,s.Landline,s.Mobile,s.UserName as SuppContact,s.ZipCode,s.Country,s.City,s.State, IF(s.SuppType = 'Individual' and s.UserName!='', s.UserName, CompanyName) as VendorName from p_supplier s where 1 \".$strAddQuery.\" having VendorName!='' order by CompanyName asc\";\r\n\t\treturn $this->query($strSQLQuery, 1);\r\n\t\t}",
"public function viewSupplies() {\n\t\t//SQL\n\t\t$servername = \"localhost\";\n\t\t$username = \"root\";\n\t\t$password = \"\";\n\t\t$dbname = \"a2Database\";\n\n\t\t// Create connection\n\t\t$conn = new mysqli($servername, $username, $password, $dbname);\n\t\t// Check connection\n\t\tif ($conn->connect_error) {\n\t\t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t\t} \n\n\t\t$sql = \"SELECT * FROM supplies\";\n\t\t$result = $conn->query($sql);\n\n\t\tif ($result->num_rows > 0) {\n\t\t\t// output data of each row\n\t\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t\techo \"<br>code: \" . $row[\"code\"]. \"<br> name: \" . $row[\"name\"]. \"<br> description: \" . $row[\"description\"] . \"<br> receiving_cost: \" . $row[\"receiving_cost\"] . \"<br> receiving_unit: \" . $row[\"receiving_unit\"] . \"<br> stocking_unit: \" . $row[\"stocking_unit\"] . \"<br> quantity: \" . $row[\"quantity\"] .\"<br>\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"0 results\";\n\t\t}\n\t\t$conn->close();\n\t\t//SQL//\n\t}",
"public function ctlBuscaProveedores(){\n\n\t\t$respuesta = Datos::mdlProveedores();\n\n\t\tforeach ($respuesta as $row => $item){\n\t\t\techo '<option value=\"'.$item[\"nombre\"].'\">'.$item[\"nombre\"].'</option>';\n\t\t}\n\t}",
"function spec()\r\n\t{\r\n\t\t$obr = \"SELECT NameSpec, ID FROM SPEC ORDER BY ID\";\t\r\n\t\t$res_obr = mysql_query($obr);\r\n\t\t$number = 1;\r\n /* show result */\r\n\t \twhile ($row = mysql_fetch_array($res_obr, MYSQL_ASSOC)) \r\n\t\t{\r\n\t\t\tprintf(\"<option value='\".$row[\"ID\"].\"'>\");\r\n \tprintf ($row[\"NameSpec\"]);\r\n\t\t\tprintf(\"</option>\");\r\n\t\t\t$number ++;\r\n\t\t}\r\n\t\tmysql_free_result($res_obr);\r\n\t}",
"public function select($proveedor);",
"function genreopties(){\r\n\t\tglobal $pdo;\r\n\t\t\t//maken sql query\r\n\t\t$sql = \"SELECT DISTINCT genre_name FROM Genre\";\r\n\t\t\t//afschieten query\r\n\t\t$result = $pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\r\n\t\tforeach($result as $row){\r\n\t\t\tforeach($row as $genre){\r\n\t\t\t\techo '<option value='.$genre.'>'.$genre.'</option>';\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function getSuppliers()\n {\n $conditions = \"job_type = :job_type: AND job_id = :job_id:\";\n $parameters = array(\n 'job_type' => $this->job_type,\n 'job_id' => $this->job_id\n );\n $quotes = Quote::find(array(\n $conditions,\n \"bind\" => $parameters\n ));\n $suppliers = array();\n $users = array();\n foreach($quotes as $quote) {\n if (!in_array($quote->user_id, $users)) {\n $users[] = $quote->user_id;\n $supplier = Supplier::findFirstByUserId($quote->user_id);\n if ($supplier) {\n $supplier = $supplier->toArray();\n $supplier['quote_status'] = $quote->status;\n $suppliers[] = $supplier;\n }\n }\n }\n return $suppliers;\n }",
"function colores_drop_list(){\n\n$sql =\"SELECT * FROM colores ;\";\n$result = $this->database->query($sql);\n$result = $this->database->result;\nwhile($row = mysql_fetch_array($result)){\n$id= $row['id_color'];\n$name= $row['nombre_color'];\necho '<option value='.$id.'>'.$name.'</option>';\n}\n}",
"function comboRecompensas($id_recompensa = 0, $filter = \"\", $name_control = \"id_recompensa\"){\n\t$elements = recompensasController::getListAction(9999, $filter); ?>\n\t<select name=\"<?php echo $name_control;?>\" id=\"<?php echo $name_control;?>\" class=\"form-control\">\n\t\t<option value=\"0\"> ---- Selecciona una recompensa ---- </option>\n\t\t<?php foreach($elements['items'] as $element):?>\n\t\t<option value=\"<?php echo $element['id_recompensa'];?>\" <?php if ($id_recompensa == $element['id_recompensa']) echo ' selected=\"selected\" ';?>><?php echo $element['recompensa_name'];?></option>\n\t\t<?php endforeach;?>\n\t</select>\n<?php }",
"function listadoSelect();",
"function bls_sf_selectForTypes() {\n\tbls_ut_backTrace(\"bls_sf_selectForTypes\");\n\tglobal $bls_sf_location;\n\n\techo \"<select name=\\\"s_pkg_srctype\\\">\";\n\tforeach ($bls_sf_location as $key => $val) {\n\t\techo \"<option value=\\\"$key\\\">$val</option>\";\n\t}\n\techo \"</select>\";\n}",
"function laboratorist_options($lab_scientist) {\r\n\t\tglobal $db;\r\n\t\t$query = 'SELECT * from laboratorist WHERE store_id=\"'.$_SESSION['store_id'].'\" ORDER by laboratorist_name ASC';\r\n\t\t$result = $db->query($query) or die($db->error);\r\n\t\t$options = '';\r\n\t\tif($lab_scientist != '') { \r\n\t\t\twhile($row = $result->fetch_array()) { \r\n\t\t\t\tif($sample_id == $row['sample_id']) {\r\n\t\t\t\t$options .= '<option selected=\"selected\" value=\"'.$row['laboratorist_id'].'\">'.$row['laboratorist_name'].' ('.$row['laboratorist_manual_id'].')</option>';\r\n\t\t\t\t} else { \r\n\t\t\t\t$options .= '<option value=\"'.$row['laboratorist_id'].'\">'.$row['laboratorist_name'].' ('.$row['laboratorist_manual_id'].')</option>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else { \r\n\t\t\twhile($row = $result->fetch_array()) { \r\n\t\t\t\t$options .= '<option value=\"'.$row['laboratorist_id'].'\">'.$row['laboratorist_name'].' ('.$row['laboratorist_manual_id'].')</option>';\r\n\t\t\t}\r\n\t\t}\r\n\t\techo $options;\t\r\n\t}",
"function vList() {\n $vlist=$this->getListVars();\n //need database,table,varname,tableinfo for variable =\n // browse=varname;ctrl=whatever;titl=something;whatever other options\n $postStrng=\"method=useQonFly\".\n '&db='.$this->dbName.\n '&tabl='.$this->tabl.\n '&index='.$this->indx;\n if ($vlist) {\n $postStrng.=\"&cmnd=qlist\";\n $chStrng=\"document.getElementById('updBrowse').style.visibility='visible';\";\n $chStrng.=\"jtAjaxLibSelect('$postStrng','varinfo','jtSpecs','1');\";\n echo \"<p><strong>Filter by</strong>\\n<select id=\\\"varinfo\\\" name=\\\"varinfo\\\"\";\n echo \" />\\n\";\n echo \"<option value=\\\"0\\\"> -- </option>\\n\";\n foreach ($vlist as $item) {\n $a=$this->xQueryInfo[\"$item\"];\n $code=\"$item;ctrl=\".$a->getSize().';titl='.$a->getLabel().';'.\n $this->implodeAllOpts($a);\n echo \"<option value=\\\"$code\\\">\",$a->getLabel(),\"</option>\\n\";\n }\n echo \"</select>\\n\";\n addButton('myChoice','Choose',$chStrng); \n //echo \"</p>\\n\";\n } //vlist not empty\n }",
"public function add_new_supplier()\n {\n if ($this->input->post())\n {\n $ac_payable = $this->MSettings->get_by_company_id($this->session->user_company);\n $chart = $this->MAc_charts->get_by_id($ac_payable['ac_payable']);\n $siblings = $this->MAc_charts->get_by_parent_id($ac_payable['ac_payable']);\n if (count($siblings) > 0)\n {\n $ac_code_temp = explode('.', $siblings['code']);\n $ac_last = count($ac_code_temp) - 1;\n $ac_new = (int)$ac_code_temp[$ac_last] + 10;\n $ac_code = $chart['code'] . '.' . $ac_new;\n }\n else\n {\n $ac_code = $chart['code'] . '.10';\n }\n $ac_id = $this->MAc_charts->account_create($ac_payable['ac_payable'], $ac_code, $this->input->post('name'));\n $insert_id = $this->MSuppliers->create(trim($this->input->post('code')), $ac_id);\n $suppliers = $this->MSuppliers->get_all();\n $html = '';\n foreach ($suppliers as $supplier)\n {\n if ($insert_id == $supplier['id'])\n {\n $html .= '<option value=\"' . $supplier['id'] . '\" selected>' . $supplier['name'] . '</option>';\n }\n else\n {\n $html .= '<option value=\"' . $supplier['id'] . '\">' . $supplier['name'] . '</option>';\n }\n }\n echo $html;\n }\n }",
"function do_select_list_suppliers_additional_emails($avalue, $aname) {\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\t\t$_out = '';\n\n\t# Set Query for select.\n\t\t$query\t= 'SELECT contacts_id, contacts_s_id, contacts_name_first, contacts_name_last, contacts_email FROM '.$_DBCFG['suppliers_contacts'];\n\t\tIF ($avalue) {$query .= ' WHERE contacts_s_id='.$avalue;}\n\t\t$query .= ' ORDER BY contacts_name_last ASC, contacts_name_first ASC';\n\n\t# Do select\n\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\n\t\tIF ($numrows) {\n\t\t# Process query results to list individual clients\n\t\t\twhile(list($contacts_id, $contacts_cl_id, $contacts_name_first, $contacts_name_last, $contacts_email) = $db_coin->db_fetch_row($result)) {\n\t\t \t$i++;\n\t\t\t\t$_out .= '<option value=\"'.'alias|'.$contacts_id.'\">';\n\t\t\t\t$_out .= $_sp.$_sp.$_sp.$aname.' - '.$contacts_name_last.', '.$contacts_name_first.' ('.$_LANG['_BASE']['Email_Additional'].')</option>'.$_nl;\n\t\t\t}\n\t\t\treturn $_out;\n\t\t} ELSE {\n\t\t return '';\n\t\t}\n}",
"function get_name_select_list()\n\t{\n\t\treturn $this->get_name_select_edit();\n\t}",
"public function SelectionList()\n {\n $productCategories = ProductCategory::where('status', 1)->get();\n\n return view('sale.product-selection-list',[\n 'productCategories' => $productCategories\n ]);\n }",
"public function Suppliers()\n {\n $this->_Suppliers->ClearAllOptions();\n return $this->_Suppliers;\n }",
"function selectList($name,$table,$option_name,$value_name,$curr_id,$script=\"\",$cond=\"\",$empty_option=0,$empty_value=\"\",$empty_str=\"\") {\n\n\t\tglobal $db, $db;\n\n\t\t$output\t\t = \"<select name=\\\"$name\\\" id=\\\"$name\\\" $script>\\n\";\n\t\tif ($empty_option) $output\t\t.= \"<option value=\\\"$empty_value\\\">$empty_str</option>\\n\";\n\n\t\tif(eregi(\"\\|\",$curr_id)){\n\t\t\t$curr_id_array=split(\"\\|\",$curr_id);\n\t\t}\n\n\t\tif(eregi(\"\\|\",$value_name)){\n\t\t\t$value_array=split(\"\\|\",$value_name);\n\t\t\t$value_query=preg_replace(\"#\\|#\",\",\",$value_name);\n\t\t}else{\n\t\t\t$value_query=$value_name;\n\t\t\t#echo\"<h1>value: $value_query | $value_name</h1>\";\n\t\t}\n\t\t$value_query=preg_replace(\"#,$#\",\"\",$value_query);\n\n\t\t$sql=\"select $option_name,$value_query from \".$table.\" $cond\";\n \n\t\t$result = $db->Execute(\"$sql\");\n\t\tif (!$result){\n\t\t\techo\"$sql\";\n\t\t\tprint $conn->ErrorMsg();\n\n\t\t}\n\t\twhile ( $row = $result->FetchRow() ) {\n\t\t\t//echo $curr_id.\"|\".$row[$this->fmtCase($option_name)].\"<br>\\n\";\n\t\t\tif(eregi(\"\\|\",$curr_id)){\n\t\t\t\t$selected= ((in_array($row[$this->fmtCase($option_name)],$curr_id_array))?\"selected \":\"\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$selected= (($curr_id==$row[$this->fmtCase($option_name)])?\"selected \":\"\");\n\t\t\t}\n\t\t\tif(eregi(\"\\|\",$value_name)){\n\n\t\t\t\tfor($i=0;$i<count($value_array);$i++){\n\t\t\t\t\t$each_value=strtolower($value_array[$i]);\n\t\t\t\t\t$_value .= $row[$each_value].\" -\";\n\t\t\t\t}\n\t\t\t\t$_value=preg_replace(\"#-$#\",\"\",$_value);\n\t\t\t}else{\n\t\t\t\t$value_name=strtolower($value_name);\n\t\t\t\t$_value=$row[$value_name];\n\t\t\t}\n\n\n\t\t\t$output .= \"<option value=\\\"\".$row[$this->fmtCase($option_name)].\"\\\" $selected>$_value</option>\\n\";\n\t\t\tunset($selected);\n\t\t\tunset($_value);\n\t\t}\n\t\t$result->Close();\n\n\t\t$output .= \"</SELECT>\\n\";\n\n\t\treturn $output;\n\t}",
"private function renderSelection() {\n\t\t$selection = $this->getSelection();\n\t\tif ($selection === false) {\n\t\t\treturn '';\n\t\t}\n\t\t$itemList = '';\n\t\tforeach ($selection as $item) {\n\t\t\t$itemList .= '\n\t\t\t\t<div class=\"catelem\" id=\"y_'.$item['SKU'].'\">\n\t\t\t\t\t<span class=\"toggle leaf\" id=\"y_toggle_'.$item['SKU'].'\"> </span>\n\t\t\t\t\t<div class=\"catname\" id=\"y_select_'.$item['SKU'].'\">\n\t\t\t\t\t\t<span class=\"catname\">'.fixHTMLUTF8Entities($item['products_name'].' ('.$item['SKU'].')').'</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>';\n\t\t}\n\t\treturn $itemList;\n\n\t}",
"public function all_supplier()\n {\n $suppliers = Supplier::all();\n return view('adminpages.supplier.all-supplier', compact('suppliers'));\n }",
"function selectproductfordc() {\n\n\n $data = array();\n //\t$data['body']=\"Select products from the dropdown\";\n $data['data'] = $this->Leads_model->get_productsfordailycall();\n // print_r($data); die;\n $this->load->view('product/selectproductsdc', $data);\n }",
"public function display_all_supplier()\n {\n \n if ( ! file_exists(APPPATH.'views/pages/list.php'))\n {\n // Whoops, we don't have a page for that!\n show_404();\n }\n if (!isset($this->session->userdata['user_role']) || $this->session->userdata['user_role'] < 40)\n {\n $this->session->set_flashdata('message', 'Vous devez avoir les droits de superviseur');\n redirect($_SERVER['HTTP_REFERER']); \n } \n \n $data['title'] = 'Liste des Fournisseurs'; // Capitalize the first letter\n $data['membres'] = $this->member_model->get_by_type('name = \"Fournisseur\" OR name = \"Fournisseur Or\"');\n\n // breadcrumb\n $data['breadcrumbs'] = $this->breadcrumbs('liste');\n \n $this->load->template('pages/list_members',$data);\n }",
"private static function __getProductsListingData() {\n global $lC_Database, $lC_Language, $lC_Products, $lC_Vqmod;\n \n include_once($lC_Vqmod->modCheck('includes/classes/products.php'));\n \n // optional Product List Filter\n $output = '';\n $result = array();\n\n if (isset($_GET['manufacturers']) && !empty($_GET['manufacturers'])) {\n $filterlist_sql = \"select distinct c.categories_id as id, cd.categories_name as name from \" . TABLE_PRODUCTS . \" p, \" . TABLE_PRODUCTS_TO_CATEGORIES . \" p2c, \" . TABLE_CATEGORIES . \" c, \" . TABLE_CATEGORIES_DESCRIPTION . \" cd, \" . TABLE_TEMPLATES_BOXES . \" tb, \" . TABLE_PRODUCT_ATTRIBUTES . \" pa where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '\" . (int)$lC_Language->getID() . \"' and tb.code = 'manufacturers' and tb.id = pa.id and pa.products_id = p.products_id and pa.value = '\" . (int)$_GET['manufacturers'] . \"' order by cd.categories_name\";\n } else {\n $filterlist_sql = \"select distinct m.manufacturers_id as id, m.manufacturers_name as name from \" . TABLE_PRODUCTS . \" p, \" . TABLE_PRODUCTS_TO_CATEGORIES . \" p2c, \" . TABLE_MANUFACTURERS . \" m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '\" . (int)$current_category_id . \"' order by m.manufacturers_name\";\n }\n $Qfilterlist = $lC_Database->query($filterlist_sql);\n $Qfilterlist->execute();\n if ($Qfilterlist->numberOfRows() > 1) {\n $output .= '<p><form name=\"filter\" action=\"' . lc_href_link(FILENAME_DEFAULT) . '\" method=\"get\">' . $lC_Language->get('filter_show') . ' ';\n if (isset($_GET['manufacturers']) && !empty($_GET['manufacturers'])) {\n $output .= lc_draw_hidden_field('manufacturers', $_GET['manufacturers']);\n $options = array(array('id' => '', 'text' => $lC_Language->get('filter_all_categories')));\n } else {\n $output .= lc_draw_hidden_field('cPath', $cPath);\n $options = array(array('id' => '', 'text' => $lC_Language->get('filter_all_manufacturers')));\n }\n if (isset($_GET['sort'])) {\n $output .= lc_draw_hidden_field('sort', $_GET['sort']);\n }\n while ($Qfilterlist->next()) {\n $options[] = array('id' => $Qfilterlist->valueInt('id'), 'text' => $Qfilterlist->value('name'));\n }\n $output .= lc_draw_pull_down_menu('filter', $options, (isset($_GET['filter']) ? $_GET['filter'] : null), 'onchange=\"this.form.submit()\"');\n $output .= lc_draw_hidden_session_id_field() . '</form></p>' . \"\\n\";\n }\n\n if (isset($_GET['manufacturers']) && !empty($_GET['manufacturers'])) {\n $lC_Products->setManufacturer($_GET['manufacturers']);\n }\n $Qlisting = $lC_Products->execute(); \n \n $result['mfgFilter'] = $output;\n $result['Qlisting'] = $Qlisting;\n \n return $result;\n }",
"public function getminquali(){\n\t\t\t$prgid = $this->input->post('stu_prgname');\n\t\t\t//print_r($prgid);die;\n\t\t\t//$selectfield=array('admop_min_qual');\n\t\t\t//$whdata = array('admop_prgname_branch' => $prgid);\n\t\t\t//$eligible = $this->commodel->get_distinctrecord('admissionopen',$selectfield,$whdata);\n\t\t\t$eligible = $this->commodel->get_listspfic2('admissionopen','','admop_min_qual','admop_prgname_branch',$prgid,'admop_min_qual');\n\t\tforeach($eligible as $datas):\n\t\t\t\t$eligible = $datas->admop_min_qual; \n\t\t\t\t//echo \"<option id='stu_eligble' value='$eligible'>\".\"$eligible\".\"</option>\";\n\t\t\t\techo \"<span id='stu_eligble'>$eligible</span>\";\n \t\tendforeach;\n\t }",
"function selectAskPriceSupplierStatus($selected='',$short=0)\n {\n global $langs;\n\n $sql = \"SELECT id, code, label, active FROM \".MAIN_DB_PREFIX.\"c_propalst\";\n $sql .= \" WHERE active = 1\";\n\n dol_syslog(get_class($this).\"::selectAskPriceSupplierStatus\", LOG_DEBUG);\n $resql=$this->db->query($sql);\n if ($resql)\n {\n print '<select class=\"flat\" name=\"askpricesupplier_statut\">';\n print '<option value=\"\"> </option>';\n $num = $this->db->num_rows($resql);\n $i = 0;\n if ($num)\n {\n while ($i < $num)\n {\n $obj = $this->db->fetch_object($resql);\n if ($selected == $obj->id)\n {\n print '<option value=\"'.$obj->id.'\" selected>';\n }\n else\n {\n print '<option value=\"'.$obj->id.'\">';\n }\n $key=$obj->code;\n if ($langs->trans(\"PropalStatus\".$key.($short?'Short':'')) != \"PropalStatus\".$key.($short?'Short':''))\n {\n print $langs->trans(\"PropalStatus\".$key.($short?'Short':''));\n }\n else\n {\n $conv_to_new_code=array('PR_DRAFT'=>'Draft','PR_OPEN'=>'Opened','PR_CLOSED'=>'Closed','PR_SIGNED'=>'Signed','PR_NOTSIGNED'=>'NotSigned','PR_FAC'=>'Billed');\n if (! empty($conv_to_new_code[$obj->code])) $key=$conv_to_new_code[$obj->code];\n print ($langs->trans(\"PropalStatus\".$key.($short?'Short':''))!=\"PropalStatus\".$key.($short?'Short':''))?$langs->trans(\"PropalStatus\".$key.($short?'Short':'')):$obj->label;\n }\n print '</option>';\n $i++;\n }\n }\n print '</select>';\n }\n else\n {\n dol_print_error($this->db);\n }\n }",
"function ProductsList() {\n\t$mysqli = new mysqli(SERVER, USER, PASS, DB);\n\t// output any connection error\n\tif ($mysqli->connect_error) {\n\t die('Error : ('. $mysqli->connect_errno .') '. $mysqli->connect_error);\n\t}\n\t// the query\n\t$query = \"SELECT * FROM products ORDER BY productname ASC\";\n\t// mysqli select query\n\t$results = $mysqli->query($query);\n\tif($results) {\n\t\techo '<select class=\"form-control item-select\">';\n\t\twhile($row = $results->fetch_assoc()) {\n\t\t print '<option value=\"'.$row['unitprice'].'\">'.$row[\"productname\"].' - '.$row[\"productdesc\"].' - '.$row[\"unitprice\"].'</option>';\n\t\t}\n\t\techo '</select>';\n\t} else {\n\t\techo \"<p>There are no products, please add a product.</p>\";\n\t}\n\n\t// close connection \n\t$mysqli->close();\n}",
"public function getCpnyToCombobox() {\n return $this->db->selectObjList('SELECT company_id, shortname, longname FROM company ORDER BY shortname;', $array = array(), \"Company\");\n }",
"function cp_do_view_supplier_bills($adata) {\n\t# Get security vars\n\t\t$_SEC \t= get_security_flags();\n\t\t$_PERMS\t= do_decode_perms_admin($_SEC['_sadmin_perms']);\n\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_LANG, $_nl, $_sp;\n\n\t# Set Query parameters for select.\n\t\t$query\t = 'SELECT *';\n\t\t$_from\t.= ' FROM '.$_DBCFG['bills'].', '.$_DBCFG['suppliers'];\n\t\t$_where\t.= ' WHERE '.$_DBCFG['bills'].'.bill_s_id='.$_DBCFG['suppliers'].'.s_id';\n\t\t$_where\t.= ' AND '.$_DBCFG['bills'].'.bill_s_id='.$adata['s_id'];\n\t\t$_order\t.= ' ORDER BY '.$_DBCFG['bills'].'.bill_ts DESC';\n\n\t\tIF (!$_CCFG['IPL_SUPPLIERS'] > 0) {$_CCFG['IPL_SUPPLIERS'] = 5;}\n\t\t$_limit .= ' LIMIT 0, '.$_CCFG['IPL_SUPPLIERS'];\n\n\t# Get count of rows total:\n\t\t$query_ttl = 'SELECT COUNT(*)';\n\t\t$query_ttl .= $_from;\n\t\t$query_ttl .= $_where;\n\t\t$result_ttl\t= $db_coin->db_query_execute($query_ttl);\n\t\twhile(list($cnt) = $db_coin->db_fetch_row($result_ttl)) {$numrows_ttl = $cnt;}\n\n\t# Do select listing records and return check\n\t\t$query\t.= $_from.$_where.$_order.$_limit;\n\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\n\t# Build form output\n\t#\t$_out .= '<br>'.$_nl;\n\t\t$_out .= '<div align=\"center\">'.$_nl;\n\t\t$_out .= '<table width=\"100%\" border=\"0\" bordercolor=\"'.$_TCFG['_TAG_TABLE_BRDR_COLOR'].'\" bgcolor=\"'.$_TCFG['_TAG_TRTD_BKGRND_COLOR'].'\" cellpadding=\"0\" cellspacing=\"1\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_TITLE\"><td class=\"TP3MED_NC\" colspan=\"8\">'.$_nl;\n\n\t\t$_out .= '<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_IT_TITLE_TXT\">'.$_nl.'<td class=\"TP0MED_NL\">'.$_nl;\n\t\t$_out .= '<b>'.$_LANG['_ADMIN']['Bills'];\n\t\t$_out .= ' ('.$numrows.$_sp.$_LANG['_ADMIN']['of'].$_sp.$numrows_ttl.$_sp.$_LANG['_ADMIN']['total_entries'].')</b><br>'.$_nl;\n\t\t$_out .= '</td>'.$_nl.'<td class=\"TP0MED_NR\">'.$_nl;\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\tIF ($numrows_ttl > $_CCFG['IPL_SUPPLIERS']) {\n\t\t\t\t$_out .= do_nav_link('mod.php?mod=bills&mode=view&bill_s_id='.$adata['s_id'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t\t\t}\n\t\t\t$_out .= do_nav_link('mod.php?mod=cc&mode=search&sw=bills', $_TCFG['_S_IMG_SEARCH_S'],$_TCFG['_S_IMG_SEARCH_S_MO'],'','');\n\t\t} ELSE {\n\t\t\t$_out .= $_sp;\n\t\t}\n\t\t$_out .= '</td>'.$_nl.'</tr>'.$_nl.'</table>'.$_nl;\n\n\t\t$_out .= '</td></tr>'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_ADMIN']['l_Id'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_ADMIN']['l_Status'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_ADMIN']['l_Date_Issued'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_ADMIN']['l_Date_Due'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BR\">'.$_LANG['_ADMIN']['l_Amount'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BR\">'.$_LANG['_ADMIN']['l_Balance'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\">'.$_LANG['_CCFG']['Actions'].'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\n\t\t\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.$row['bill_id'].'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.htmlspecialchars($row['bill_status']).'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.dt_make_datetime($row['bill_ts'], $_CCFG['_PKG_DATE_FORMAT_SHORT_DT']).'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.dt_make_datetime($row['bill_ts_due'], $_CCFG['_PKG_DATE_FORMAT_SHORT_DT']).'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NR\">'.do_currency_format($row['bill_total_cost'],1,0,$_CCFG['CURRENCY_DISPLAY_DIGITS_AMOUNT']).$_sp.$_sp.'</td>'.$_nl;\n\n\t\t\t# Show current bill balance\n\t\t\t\t$idata = do_get_bill_supplier_balance($adata['s_id'], $row['bill_id']);\n\t\t\t\t$_out .= '<td class=\"TP3SML_NR\">'.do_currency_format($idata['net_balance'],1,0,$_CCFG['CURRENCY_DISPLAY_DIGITS_AMOUNT']).$_sp.'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\"><nobr>'.$_nl;\n\t\t\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=bills&mode=view&bill_id='.$row['bill_id'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t\t\t\t\t$_out .= do_nav_link('mod_print.php?mod=bills&mode=view&bill_id='.$row['bill_id'], $_TCFG['_S_IMG_PRINT_S'],$_TCFG['_S_IMG_PRINT_S_MO'],'_new','');\n\t\t\t\t\tIF ($_PERMS['AP16'] == 1 || $_PERMS['AP08'] == 1) {\n\t\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=bills&mode=edit&bill_id='.$row['bill_id'], $_TCFG['_S_IMG_EDIT_S'],$_TCFG['_S_IMG_EDIT_S_MO'],'','');\n\t\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=bills&mode=delete&stage=1&bill_id='.$row['bill_id'].'&invc_ts='.$row['invc_ts'].'&invc_status='.$row['invc_status'], $_TCFG['_S_IMG_DEL_S'],$_TCFG['_S_IMG_DEL_S_MO'],'','');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$_out .= '</nobr></td>'.$_nl;\n\t\t\t\t$_out .= '</tr>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t# Show totals footer row\n\t\t$idata = do_get_bill_supplier_balance($adata['s_id'], 0);\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BR\" colspan=\"4\">'.$_nl;\n\t\t$_out .= $_LANG['_SUPPLIERS']['l_Amount'].$_nl;\n\t\t$_out .= '</td><td class=\"TP3SML_BR\">'.$_nl;\n\t\t$_out .= do_currency_format($idata['total_cost'],1,0,$_CCFG['CURRENCY_DISPLAY_DIGITS_AMOUNT']).$_sp.$_nl;\n\t\t$_out .= '</td><td class=\"TP3SML_BR\">'.$_nl;\n\t\t$_out .= do_currency_format($idata['net_balance'],1,0,$_CCFG['CURRENCY_DISPLAY_DIGITS_AMOUNT']).$_sp.$_nl;\n\t\t$_out .= '</td><td class=\"TP3SML_BL\">'.$_nl;\n\t\t$_out .= $_sp.$_nl;\n\t\t$_out .= '</td></tr>'.$_nl;\n\n\t\t$_out .= '</table>'.$_nl;\n\t\t$_out .= '</div>'.$_nl;\n\t\t$_out .= '<br>'.$_nl;\n\n\t# Return results\n\t\treturn $_out;\n}",
"function\tdropdown_list($dbconn) {\n\t$sqlcom=\"select distinct spec_id,name from info;\";\n\t$dbres = pg_exec($dbconn, $sqlcom );\n\tif ( ! $dbres ) {echo \"Error : \" + pg_errormessage( $dbconn ); exit();} \n\t$row=0;\n\t$rowmax=pg_NumRows($dbres);\n\tprint \"<form method=\\\"post\\\" action=\\\"libSpec.php\\\"><select name=\\\"organism\\\" onchange=\\\"this.form.submit();\\\">\\n<option value=\\\"select\\\">Select an organism...</option>\\n\"; \n\twhile ($row<$rowmax) {\n\t $do = pg_Fetch_Object($dbres, $row);\n\t $name=$do->name;\n\t print \"<option value=\\\"$name\\\">$name</option>\\n\";\n\t $row++;\n\t}\n\tprint(\"</select></form>\\n\\n\");\n}",
"public function getSelect();",
"public function getSelect();",
"function get_faculty_selections($con) {\n\t$facs = get_faculties($con);\n\t$sel = '<option value=\"\"></option>';\n\tforeach ($facs as $id => $name) {\n\t\t$sel .= '<option value=\"'.$id.'\">'.$name.'</option>';\n\t}\n\treturn $sel;\n}",
"function GetComboboxItems($div_name, $span_name, $sql, $id_column, $name_column){\n\t\t//$sql = \"select id, category from priside.BusinessServiceCategory where parent_id = 0 order by category\";\n\t\t$result = mysql_query($sql);\n\t\t$list_html = \"\";\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t$list_html .= \"<li id=\\\"org_\".$row[$id_column].\"\\\" value=\\\"\".$row[$id_column].\"\\\" onclick=\\\"displaySelectedItem('\".$div_name.\"', '\".$span_name.\"', '\".$row[$name_column].\"');\\\">\".$row[$name_column].\"</li>\\n\";\n\t\t}\n\t\tmysql_free_result( $result );\n\t\treturn $list_html;\n\t}",
"public function Do_select_Example1(){\n\n\t}",
"function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}",
"function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\t\n\t}",
"function outputCitiesList() {\r\n\t$cities = new CityCollection();\r\n\t$cities->loadCollection();\r\n \r\n\t$result = $cities->getArray();\r\n \r\n\tfor($i=0;$i<$cities->getCount();$i++){\r\n\t\techo '<option value=\"'. $result[$i]->getCityCode(). '\">' . $result[$i]->getAsciiName() . '</option>';\r\n\t}\r\n}",
"public function consumablesDropdown()\n {\n $sql = \"SELECT `materials`.`material_id`,`materials`.`material_name`,`materials`.`material_grade`\n FROM `materials`\n\t\t\t\tWHERE `injection` = 1 AND `consumables` = 1\n ORDER BY `materials`.`material_name`;\";\n if($stmt = $this->_db->prepare($sql))\n {\n $stmt->execute();\n while($row = $stmt->fetch())\n {\n $ID = $row['material_id'];\n $NAME = $row['material_name'];\n $GRADE = $row['material_grade'];\n echo '<li><a id=\"'. $NAME .'\" onclick=\"selectConsumable(\\''. $ID .'\\',\\''. $NAME .'\\')\">'. $NAME .'</a></li>'; \n }\n $stmt->closeCursor();\n }\n else\n {\n echo '<li>Something went wrong.'. $db->errorInfo .'</li>'; \n }\n }",
"public function getProductsByField (Request $request, $field){\n $output = '';\n $products = Product::where($field, $request->id)->where('status', 'active')->get();\n if(count($products)>0){\n $output .= ' <option value=\"\">Select Product</option>';\n foreach ($products as $source) {\n $output .= ' <option value=\"'.$source->id.'\">'.$source->title.'</option>';\n }\n }\n echo $output;\n }",
"public function get_edit_suppliers_data()\n\t {\n\t \t$id=file_get_contents(\"php://input\");\n\t \t$data=$this->ApiModel->get_edit_suppliers_data($id);\n\t \techo json_encode($data);\n\n\t }",
"function uc_order_pane_products_select($form, &$form_state) {\n $types = uc_product_types();\n $options = array();\n\n $query = db_select('node', 'n')\n ->fields('n', array('nid', 'title'))\n ->condition('n.type', $types, 'IN')\n ->orderBy('n.title')\n ->addTag('node_access');\n\n if (!empty($form_state['values']['product_controls']['product_search'])) {\n $search = strtolower(str_replace('*', '%', $form_state['values']['product_controls']['product_search']));\n $query->leftJoin('uc_products', 'p', 'n.nid = p.nid');\n $query->condition(db_or()\n ->condition('n.title', $search, 'LIKE')\n ->condition('p.model', $search, 'LIKE')\n );\n }\n\n $result = $query->execute();\n foreach ($result as $row) {\n $options[$row->nid] = $row->title;\n }\n\n if (count($options) == 0) {\n $options[0] = t('No products found.');\n }\n\n $form_state['products_action'] = 'select';\n $form_state['product_select_options'] = $options;\n unset($form_state['refresh_products']);\n $form_state['rebuild'] = TRUE;\n}",
"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 }",
"function TaxID_list_($mainDB, $focus_value, $showDisplay=''){ \n $SpeciesArr['TaxID'] = 0;\n $mainArr = array(); \n array_push($mainArr, $SpeciesArr);\n $itemCount = 0;\n while(count($mainArr)){\n $itemCount++;\n if($itemCount > 500){\n break;\n }\n $popItem = array_pop($mainArr);\n $SQL = \"SELECT TaxID, Name, Display FROM ProteinSpecies WHERE ParentTaxID=\".$popItem['TaxID'].\" ORDER BY Name DESC\"; \n $SpeciesArr2 = $mainDB->fetchAll($SQL);\n \n if($popItem['TaxID']){\n ?>\n <option value=\"<?php echo $popItem['TaxID'];?>\"<?php echo ($popItem['TaxID']==$focus_value)?\" selected\":\"\";?>><?php echo ($showDisplay)?$popItem['Display']:$popItem['Name'];?><br>\n <?php \n } \n for($i=0; $i<count($SpeciesArr2); $i++){\n array_push($mainArr, $SpeciesArr2[$i]);\n }\n } \n}",
"protected function createUserAndGroupListForSelectOptions() {}",
"function PKG_showAllPackageSelections($selName,$first,$addFirstEntry=\"\")\n{\n\treturn(HTML_listSelection($selName,PKG_getAllPackageSelections($addFirstEntry),$first));\n}",
"function fillSelectWithSymbols(){\n try{\n // Query against the database to retrieve all symbols\n $sql = \"select * from stockMarket\";\n echo '<select name=\"symbols\" id=\"symbollist\">';\n foreach (DAOConstants::$pdo->query($sql) as $row) {\n if ($row['symbol'] === \"Symbol\") {\n // Outputs the first option as blank\n echo '<option value=\"\"> </option>';\n } else {\n // Append symbols as options in the select tag along with the company\n // name\n echo '<option value=' . $row['symbol'] .\n ' name=\"symbol\">' . $row['symbol'] .\n ' - ' . $row['name'] . '</option>';\n }\n }\n echo '</select>';\n echo '<br><input type=\"submit\" value=\"Submit\" name=\"submit\" id=\"submit\">';\n } catch(PDOException $e){\n echo $e->getMessage();\n exit;\n }\n }",
"function get_county_combo($countyCode)\n {\n $output = '';\n $query = $this->db->query('select * from county order by county_name');\n foreach($query->result() as $row)\n {\n $output .= '<option value=\"' . $row->county_id . '\"';\n if($row->county_id==$countyCode){\n $output .= ' selected';\n }\n $output .= '>' . $row->county_name . '</option>';\n }\n return $output;\n }",
"public function suppliers()\n {\n return $this->hasMany(Supplier::class, 'company_id');\n }",
"public function manufacturers_list()\n\t{\n\n\t\t$cat_id = ee()->TMPL->fetch_param('cat_id');\n\n\t\t$variables = array();\n\n\t\t$query = ee()->db\n\t\t\t->select('field_id_19')\n\t\t\t->where('channel_id', 1)\n\t\t\t->where('field_id_19 !=', '')\n\t\t\t->like('field_id_3', '[' . $cat_id . ']', 'after')\n\t\t\t->distinct()\n\t\t\t->order_by('field_id_19', 'asc')\n\t\t\t->get('channel_data');\n\n\t\tforeach($query->result() as $row)\n\t\t{\n\t\t\t$variables[] = array(\n \t\t'manufacturer' => $row->field_id_19\n \t\t);\n\t\t\t\n\t\t}\n\n\t\tif(count($variables) < 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\t\n\n \treturn ee()->TMPL->parse_variables(ee()->TMPL->tagdata, $variables);\n\n\t}",
"public function actionExpert_index() {\n $res = ServiceRegion::model()->getCityList();\n $option = '<option value=\"' . QG_BRANCH_ID . '\">全国</option>';\n foreach ($res as $val) {\n $option .= '<option value=\"' . $val['region_id'] . '\">' . $val['region_name'] . '</option>';\n }\n $this->render('expert_index', array('provice_option' => $option));\n }",
"function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}",
"function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}",
"function Recordset_Selecting(&$filter) {\n\n\t\t// Enter your code here\n\t}",
"function GetLookupList($compValue, $table){\n\t\t// fetch data\n\t\t$sql = \"SELECT short_code, description FROM \". $table .\" WHERE rec_status = 0 ORDER BY description\";\n\t $rs = $db->query( $sql);\n\t \n\t\twhile ($row = $rs->fetch()) {\n\t\t\t$html = \"\";\n\t\t\tif( $state_abbr == strtoupper( $row['state_abbr'])) {\n\t\t\t\techo \"<option value='\". $row['state_abbr'] .\"' SELECTED>\". $row['state_name'] .\"</option>\";\n\t\t\t} else {\n\t\t\t\techo \"<option value='\". $row['state_abbr'] .\"'>\". $row['state_name'] .\"</option>\";\n\t\t\t} \n\t\t\t//mysql_free_result($rs);\n\t\t}\n\t}",
"public function getClientTypeListAction()\n\t{\n\t\t$clientParameters=$this->_request->getParams();\n\t\t$client_types=$clientParameters['client_type'];\t\n\n\t\t$client_obj=new Ep_Quote_Client();\n\t\t\n\t\t$searchparams['client_type']=explode(\",\",$client_types);\t\t\n\t\t$company_list=$client_obj->getAllCompanyList($searchparams);\n\n\t\t$options='<option></option>';\n\n\t\tif($company_list!='NO')\n\t\t{\n\t\t\tforeach($company_list as $id=>$email)\n\t\t\t{\n\t\t\t\t$options.='<option value=\"'.$id.'\"\">'.$email.'</option>';\n\t\t\t}\n\t\t}\n\t\techo $options;\n\n\t}",
"public function addTcaSelectItemDataProvider() {}",
"function display_product_dropdown ($varname = \"product_name\") {\n\n\t$products = &get_product_array($GLOBALS['dsn'], \"any\");\n\n\tprint \"<select name=\" . $varname . \">\n\t<option value=NONE>Please pick one</option>\\n\";\n\twhile ($product_name = current($products)) {\n\t\tprint \"<option value=\" . key($products) . \">\".key($products).\"</option>\\n\";\n\t\tnext($products);\n\t}\n\n\tprint \"</select>\";\n\n}",
"public function index($supplier){\n $data=Supplier::where('name',$supplier)->first();\n if(!$data){\n return $this->error404();\n }\n $categories=ProductCategory::where('supplier_id',$data->id)->get();\n $this->data['supplier']=$data;\n $this->data['categories']=$categories;\n\n $this->data['sizes']=Attribute::where('type','size')->get();\n $this->data['colors']=Color::all();\n \n return $this->_view('suppliers.index', 'Front');\n\n }",
"public function getForSelect()\n {\n return $this->all()->lists('full_name', 'id')->all();\n }",
"public function run()\n {\n $suppliers = [['name' => 'An Giang', 'user_id' => 1],\n ['name' => 'Bà Rịa- Vũng Tàu', 'user_id' => 1],\n ['name' => 'Bạc Liêu', 'user_id' => 1],\n ['name' => 'Bắc Kạn', 'user_id' => 1],\n ['name' => 'Bắc Giang', 'user_id' => 1],\n ['name' => 'Bắc Ninh', 'user_id' => 1],\n ['name' => 'Bến Tre', 'user_id' => 1],\n ['name' => 'Bình Dương', 'user_id' => 1],\n ['name' => 'Bình Định', 'user_id' => 1],\n ['name' => 'Bình Phước', 'user_id' => 1],\n ['name' => 'Bình Thuận', 'user_id' => 1],\n ['name' => 'Cà Mau', 'user_id' => 1],\n ['name' => 'Cao Bằng', 'user_id' => 1],\n ['name' => 'Cần Thơ', 'user_id' => 1],\n ['name' => 'Đà Nẵng', 'user_id' => 1],\n ['name' => 'ĐắK LắK', 'user_id' => 1],\n ['name' => 'ĐắK Nông', 'user_id' => 1],\n ['name' => 'Đồng Nai', 'user_id' => 1],\n ['name' => 'Đồng Tháp', 'user_id' => 1],\n ['name' => 'Điện Biên', 'user_id' => 1],\n ['name' => 'Gia Lai', 'user_id' => 1],\n ['name' => 'Hà Giang', 'user_id' => 1],\n ['name' => 'Hà Nam', 'user_id' => 1],\n ['name' => 'Hà Nội', 'user_id' => 1],\n ['name' => 'Hà Tĩnh', 'user_id' => 1],\n ['name' => 'Hải Dương', 'user_id' => 1],\n ['name' => 'Hải Phòng', 'user_id' => 1],\n ['name' => 'Hòa Bình', 'user_id' => 1],\n ['name' => 'Hậu Giang', 'user_id' => 1],\n ['name' => 'Hưng Yên', 'user_id' => 1],\n ['name' => 'TP. Hồ Chí Minh', 'user_id' => 1]];\n Supplier::insert($suppliers);\n }",
"public function fewSelection()\n {\n $selection = func_num_args() > 0 ? func_get_args() : $this->fewSelection;\n\n return call_user_func_array([$this, 'select'], $selection);\n }",
"function cmdCustType($name, $caption) {\n $optcust_type = array\n (\n array(\"\", \"\"),\n array(\"End User\", \"1\"),\n array(\"Dealer / Reseller\", \"2\"),\n array(\"Goverment / BUMN\", \"3\"),\n );\n ?>\n <tr>\n <td><?php getCaption($caption); ?> :</td>\n <td>\n <select class=\"easyui-combobox\"\n id=\"<?php echo $name; ?>\"\n name=\"<?php echo $name; ?>\"\n style=\"width:120px;\"\n data-options=\"panelHeight:100,editable:false,width:200\"\n disabled=true\n >\n <?php\n foreach ($optcust_type as $val) {\n echo '<option value=\"' . $val[1] . '\">' . $val[0] . '</option>';\n }\n ?>\n </select>\n </td>\n </tr>\n <?php\n}",
"public function add_new_suppliers()\n\t {\n\t \t$data= (array)json_decode(file_get_contents(\"php://input\"));\n\t \t$userId=$this->checklogin();\n\t \t$data['landlord_id']=$userId;\n\t \t$query=$this->ApiModel->add_new_suppliers($data);\n\t \techo json_encode($query);\n\t }",
"function json_SuppliersList() {\n\t\t$query = \"SELECT SupplierID, FullName FROM supplier\";\n\t\t\n\t\tmysql_connect(DB_SERVER, DB_USER, DB_PASSWORD);\n\t\tmysql_select_db(DB_NAME);\n \t\n\t\t\t$result = mysql_query($query) or die(mysql_error());\t\n\t\t\t$rows = Array(); // returned object\n\t\t\t$rows['identifier'] = \"SupplierID\";\n\t\t\t\n \t\t\twhile($r=mysql_fetch_assoc($result)) {\n \t\t\t $rows['items'][] = $r;\n \t\t\t}\n\n\t\t\treturn json_encode($rows);\n\t}",
"function select_option()\r\n{}",
"function getEmployeesListCtrl() {\n $accounts = getEmployeesList();\n echo \"<select class='form-control' required name='id_comptes'>\";\n foreach ($accounts as $a) {\n if ($id === $a['id_compte']) {\n echo \"<option value='\".$a[\"id_compte\"].\"' selected>\".$a[\"nom\"].\" \".$a[\"prenom\"].\"</option>\";\n } else {\n echo \"<option value='\".$a[\"id_compte\"].\"'>\".$a[\"nom\"].\" \".$a[\"prenom\"].\"</option>\";\n }\n }\n echo \"</select>\";\n}",
"function get_vendor_for_product()\n{\n\n $sql = \"select * from vendor order by f_name,l_name \";\n $send_query = query($sql);\n confirm($send_query);\n while ($row = fetch_array($send_query)) {\n $vendor_name = <<<DELIMETER\n <option value=\"{$row['id']}\">{$row['id']} :: {$row['f_name']} {$row['l_name']}</option>\nDELIMETER;\n echo $vendor_name;\n }\n\n\n}",
"function sample_options($sample_id) {\r\n\t\tglobal $db;\r\n\t\t$query = 'SELECT * from samples WHERE store_id=\"'.$_SESSION['store_id'].'\" ORDER by sample_name ASC';\r\n\t\t$result = $db->query($query) or die($db->error);\r\n\t\t$options = '';\r\n\t\tif($sample_id != '') { \r\n\t\t\twhile($row = $result->fetch_array()) { \r\n\t\t\t\tif($sample_id == $row['sample_id']) {\r\n\t\t\t\t$options .= '<option selected=\"selected\" value=\"'.$row['sample_id'].'\">'.$row['sample_name'].' ('.$row['sample_manual_id'].')</option>';\r\n\t\t\t\t} else { \r\n\t\t\t\t$options .= '<option value=\"'.$row['sample_id'].'\">'.$row['sample_name'].' ('.$row['sample_manual_id'].')</option>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else { \r\n\t\t\twhile($row = $result->fetch_array()) { \r\n\t\t\t\t$options .= '<option value=\"'.$row['sample_id'].'\">'.$row['sample_name'].' ('.$row['sample_manual_id'].')</option>';\r\n\t\t\t}\r\n\t\t}\r\n\t\techo $options;\t\r\n\t}",
"function SelectValuesSeguros_Empresas($db_conx, $table) {\r\n $sql = \"\";\r\n if ($table == \"seguros\") {\r\n $sql = \"SELECT * FROM tseguros ORDER BY seg_descrip ASC\";\r\n } else {\r\n $sql = \"SELECT * FROM tempresas ORDER BY emp_descrip ASC\";\r\n }\r\n $query = mysqli_query($db_conx, $sql);\r\n\r\n $n_filas = $query->num_rows;\r\n $data = '<select size=\"12\" class=\"cmb' . $table . '\" id=\"cmb' . $table . '\">\r\n <option value=\"\">Ninguno</option>';\r\n $c = 0;\r\n while ($c < $n_filas) {\r\n $row = mysqli_fetch_array($query);\r\n $data .= '<option value=\"' . $row[0] . '\">' . $row[1] . \"_\" . $row[2] . '</option>';\r\n $c++;\r\n }\r\n $data .= '</select>';\r\n echo $data;\r\n}",
"public static function select_products_by_options($data)\n {\n \n $query = new Query;\n $products = $query->select(['core_products.*','core_product_images.*'])\n ->from('core_products')\n ->innerJoin('core_product_images', 'core_product_images.product_id=core_products.product_id');\n \n \n //if product type is set i.e., hire, sale or both\n if(isset($_REQUEST['product_type']) && @$_REQUEST['product_type'] != '')\n {\n if($_REQUEST['product_type'] != '')\n {\n $product_type= $_REQUEST['product_type'];\n if($product_type == 'hire') \n $products = $products->where(['core_products.product_type' => [0,2]]);\n else if($product_type == 'sale') \n $products = $products->where(['core_products.product_type' => [1,2]]);\n else if($product_type == 'both') \n $products = $products->where(['core_products.product_type' => [2]]);\n }\n \n }\n //default product type is hire if product type not set to anything\n else\n {\n \n $products = $products->where(\"core_products.product_type = 0\");\n }\n //if user selects the category\n if(isset($_REQUEST['category']))\n {\n \n if($_REQUEST['category'] != '')\n {\n $category_id = $_REQUEST['category'];\n $products = $products->andWhere(\"core_products.category_id = $category_id\");\n }\n }\n //if user selects sub category\n if(isset($_REQUEST['sub_category_id']) && @$_REQUEST['sub_category_id'] != '')\n {\n \n if($_REQUEST['sub_category_id'] != '')\n {\n $sub_category_id = $_REQUEST['sub_category_id'];\n $products = $products->andWhere(\"core_products.sub_category_id = $sub_category_id\");\n }\n }\n //if user sets current location\n if(@$_REQUEST['current_location'] != '')\n {\n \n $products = $products->andFilterWhere(['LIKE', 'core_products.current_location', $_REQUEST['current_location']]);\n }\n //if user sets price type\n if(@$_REQUEST['price_type'] != '')\n {\n $price_type =$_REQUEST['price_type'];\n $products = $products->andWhere(\"core_products.price_type = $price_type\");\n }\n //if user sets capacity range\n if(@$_REQUEST['capacity'] != '')\n {\n \n $capacity =$_REQUEST['capacity'];\n //if user selects between\n if (strpos($capacity, 'and') !== false) {\n $products = $products->andWhere(\"rtrim(substring_index(core_products.capacity, ' ', 1)) between $capacity\");\n }\n //if user selects morethan\n else if (strpos($capacity, '>') !== false) {\n $products = $products->andWhere(\"rtrim(substring_index(core_products.capacity, ' ', 1)) $capacity\");\n }\n }\n \n $products = $products->orderBy([\"core_products.product_id\" => SORT_DESC])\n ->andWhere(\"core_products.product_status = 1\")\n ->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])\n ->groupBy(['core_products.product_id'])\n ->all();\n return $products;\n }",
"function GetSupplierforCustomer($SuppID)\r\n\t{\r\n\t\t$strSQLQuery = \"select s.SuppType, s.SuppCode, s.FirstName, s.LastName, s.UserName, s.CompanyName, s.SupplierSince, s.PaymentTerm, s.ShippingMethod,s.TaxNumber, s.PaymentMethod, s.Email, s.AccountID, s.CreditLimit, s.Status, s.Website, s.Currency, ab.city_id, ab.state_id, ab.country_id, ab.Address, ab.Country,ab.State, ab.City, ab.ZipCode, ab.Mobile, ab.Landline,ab.OtherState,ab.OtherCity from p_supplier s left outer join p_address_book ab ON (s.SuppID = ab.SuppID and ab.AddType = 'billing' ) \";\r\n\t\t$strSQLQuery .= (!empty($SuppID))?(\" where s.SuppID='\".mysql_real_escape_string($SuppID).\"'\"):(\" where 1\");\r\n\t\treturn $this->query($strSQLQuery, 1);\r\n\t}",
"public function select_all_supplier() {\n $query = $this->db->select('*')\n ->from('supplier_information')\n ->where('status', '1')\n ->get();\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return false;\n }",
"function industryList($fieldname=\"industry\", $classes=\"form-control\", $important=false, $ind=\"Aerospace Industry\")\n\t{\n\t\tif($important)\n\t\techo \"<select name='$fieldname' class='$classes' placeholder='Industry' required>\";\n\t\telse\n\t\techo \"<select name='$fieldname' class='$classes' placeholder='Industry'>\";\n\t\t$con = dbConnect(\"localhost\", \"root\", \"\", \"jobPortal\");\n\t\tif($con)\n\t\t{\n\t\t\t$rsIndustry = mysqli_query($con, \"SELECT * FROM industries\");\n\t\t\tif($rsIndustry)\n\t\t\t{\n\t\t\t\twhile($row = mysqli_fetch_array($rsIndustry))\n\t\t\t\t{\n\t\t\t\t\tif($row[\"indName\"]==$ind)\n\t\t\t\t\techo \"<option value='\".$row['indId'].\"' selected>\".$row['indName'].\"</option>\";\n\t\t\t\t\telse\n\t\t\t\t\techo \"<option value='\".$row['indId'].\"'>\".$row['indName'].\"</option>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"<option value='0'>Unable To Fetch.</option>\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"<option value='0'>Unable To Fetch.</option>\";\n\t\t}\n\t\techo \"</select>\";\n\t}",
"public function getProviders(){\n\t\n\t\t$db\t\t= $this->getDbo();\n\t\t\n\t\t$query\t= $db->getQuery( true );\n\t\t$query->select( '*' );\n\t\t$query->from( '#__zbrochure_providers' );\n\t\t$query->order( 'provider_name' );\n\t\t\n\t\t$db->setQuery( $query );\n\t\t$providers = $db->loadObjectList();\n\t\t\n\t\treturn $providers;\n\t}",
"function CCgetCityList($key){\n\t $strCity;\n $strCity = \"\";\n\t $strCity = $strCity.AmISelected(\"Please Select\", $key, \"Please Select\");\n\t $strCity = $strCity.AmISelected(\"Ahmedabad\", $key, \"Ahmedabad\");\n\t $strCity = $strCity.AmISelected(\"Ambala\", $key, \"Ambala\");\n\t $strCity = $strCity.AmISelected(\"Aurangabad\", $key, \"Aurangabad\");\n\t $strCity = $strCity.AmISelected(\"Bangalore\", $key, \"Bangalore\");\n \t $strCity = $strCity.AmISelected(\"Baroda\", $key, \"Baroda\");\n \t $strCity = $strCity.AmISelected(\"Bhiwadi\", $key, \"Bhiwadi\");\n \t $strCity = $strCity.AmISelected(\"Bhopal\", $key, \"Bhopal\");\n\t $strCity = $strCity.AmISelected(\"Bhubneshwar\", $key, \"Bhubneshwar\");\n \t $strCity = $strCity.AmISelected(\"Chandigarh\", $key, \"Chandigarh\");\n\t $strCity = $strCity.AmISelected(\"Chennai\", $key, \"Chennai\");\n \t $strCity = $strCity.AmISelected(\"Cochin\", $key, \"Cochin\");\n\t $strCity = $strCity.AmISelected(\"Coimbatore\", $key, \"Coimbatore\");\n \t $strCity = $strCity.AmISelected(\"Cuttack\", $key, \"Cuttack\");\n\t $strCity = $strCity.AmISelected(\"Dehradun\", $key, \"Dehradun\");\n \t $strCity = $strCity.AmISelected(\"Delhi\", $key, \"Delhi\");\n\t $strCity = $strCity.AmISelected(\"Ernakulam\", $key, \"Ernakulam\");\n\t $strCity = $strCity.AmISelected(\"Faridabad\", $key, \"Faridabad\");\n\t $strCity = $strCity.AmISelected(\"Gaziabad\", $key, \"Gaziabad\");\n \t $strCity = $strCity.AmISelected(\"Gurgaon\", $key, \"Gurgaon\");\n \t $strCity = $strCity.AmISelected(\"Guwahati\", $key, \"Guwahati\");\n\t $strCity = $strCity.AmISelected(\"Hosur\", $key, \"Hosur\");\n \t $strCity = $strCity.AmISelected(\"Hyderabad\", $key, \"Hyderabad\");\n\t $strCity = $strCity.AmISelected(\"Indore\", $key, \"Indore\");\n \t $strCity = $strCity.AmISelected(\"Jabalpur\", $key, \"Jabalpur\");\n \t $strCity = $strCity.AmISelected(\"Jaipur\", $key, \"Jaipur\");\n\t $strCity = $strCity.AmISelected(\"Jalandhar\", $key, \"Jalandhar\");\n\t $strCity = $strCity.AmISelected(\"Jamshedpur\", $key, \"Jamshedpur\");\n \t $strCity = $strCity.AmISelected(\"Kanpur\", $key, \"Kanpur\");\n\t $strCity = $strCity.AmISelected(\"Kharar\", $key, \"Kharar\");\n\t $strCity = $strCity.AmISelected(\"Kochi\", $key, \"Kochi\");\n\t $strCity = $strCity.AmISelected(\"Kolkata\", $key, \"Kolkata\");\n \t $strCity = $strCity.AmISelected(\"Lucknow\", $key, \"Lucknow\");\n\t $strCity = $strCity.AmISelected(\"Ludhiana\", $key, \"Ludhiana\");\n \t $strCity = $strCity.AmISelected(\"Madurai\", $key, \"Madurai\");\n\t $strCity = $strCity.AmISelected(\"Mangalore\", $key, \"Mangalore\");\n\t $strCity = $strCity.AmISelected(\"Mohali\", $key, \"Mohali\");\n \t $strCity = $strCity.AmISelected(\"Mysore\", $key, \"Mysore\");\n\t $strCity = $strCity.AmISelected(\"Mumbai\", $key, \"Mumbai\");\n \t $strCity = $strCity.AmISelected(\"Nagpur\", $key, \"Nagpur\");\n\t $strCity = $strCity.AmISelected(\"Nasik\", $key, \"Nasik\");\n \t $strCity = $strCity.AmISelected(\"Navi Mumbai\", $key, \"Navi Mumbai\");\n\t $strCity = $strCity.AmISelected(\"Noida\", $key, \"Noida\");\n\t $strCity = $strCity.AmISelected(\"Panchkula\", $key, \"Panchkula\");\n\t $strCity = $strCity.AmISelected(\"Patiala\", $key, \"Patiala\");\n\t $strCity = $strCity.AmISelected(\"Patna\", $key, \"Patna\");\n \t $strCity = $strCity.AmISelected(\"Pune\", $key, \"Pune\");\n\t $strCity = $strCity.AmISelected(\"Rajkot\", $key, \"Rajkot\");\n\t $strCity = $strCity.AmISelected(\"Ranchi\", $key, \"Ranchi\");\n\t $strCity = $strCity.AmISelected(\"Raipur\", $key, \"Raipur\");\n\t $strCity = $strCity.AmISelected(\"Rewari\", $key, \"Rewari\");\n\t $strCity = $strCity.AmISelected(\"Sahibabad\", $key, \"Sahibabad\");\n \t $strCity = $strCity.AmISelected(\"Surat\", $key, \"Surat\");\n\t $strCity = $strCity.AmISelected(\"Thane\", $key, \"Thane\");\n\t $strCity = $strCity.AmISelected(\"Thiruvananthapuram\", $key, \"Thiruvananthapuram\");\n \t $strCity = $strCity.AmISelected(\"Trivandrum\", $key, \"Trivandrum\");\n\t $strCity = $strCity.AmISelected(\"Trichy\", $key, \"Trichy\");\n\t $strCity = $strCity.AmISelected(\"Vadodara\", $key, \"Vadodara\");\n \t $strCity = $strCity.AmISelected(\"Vishakapatanam\", $key, \"Vishakapatanam\");\n\t $strCity = $strCity.AmISelected(\"Vizag\", $key, \"Vizag\");\n\t $strCity = $strCity.AmISelected(\"Ziragpur\", $key, \"Ziragpur\");\n\t $strCity = $strCity.AmISelected(\"Others\", $key, \"Others\");\n\t return $strCity;\n\t}",
"public function getSelectedList() {}",
"public function mostrarInfoEquipo(){\n\n $infoEquipo = UsersModel::mostrarInfoTablas(\"manager\");\n\n foreach($infoEquipo as $row => $tipo){\n\n if($tipo[\"Id_Manager\"] > 1){\n\n echo '<option value=\"'.$tipo[\"Id_Manager\"].'\">'.$tipo[\"NameM\"].'</option>'; \n\n }\n\n }\n \n }",
"function retrieveCurrentPriceList ( $provider_id , $text_autocomplete = NULL )\n {\n\n $to_day = date ( 'Y-m-d' );\n\n $q = Doctrine_Query::create ()\n ->from ( 'MtnComponent mc' )\n ->innerJoin ( 'mc.MtnComponentType ct' )\n ->leftJoin ( 'mc.MtnPriceListComponent plc' )\n ->leftJoin ( 'plc.MtnPriceList pl WITH (pl.mtn_price_list_date_validity_start <= \"' . $to_day . '\" AND pl.mtn_price_list_date_validity_finish >= \"' . $to_day . '\")' )\n ->where ( 'pl.provider_id = ?' , $provider_id )\n ->orWhere ( 'pl.provider_id IS NULL' );\n\n if ( ! is_null ( $text_autocomplete ) )\n {\n $q->andWhere ( 'mc.mtn_component_name LIKE ?' , $text_autocomplete . '%' );\n }\n\n return $q->execute ();\n }",
"function buildClassificationList($classifications)\n{\n $classificationList = '<select name=\"classificationId\" id=\"classificationList\">';\n $classificationList .= \"<option>Choose a Classification</option>\";\n foreach ($classifications as $classification) {\n $classificationList .= \"<option value='$classification[classificationId]'>$classification[classificationName]</option>\";\n }\n $classificationList .= '</select>';\n return $classificationList;\n}",
"public function index()\n {\n\n return view('suppliers.index')->with([\n 'stores' => Store::where('user_id', Auth::user()->id)->orderBy('designation')->get(),\n ]);\n }",
"public function setup_selected() {\n\t}",
"public function get_all_supplier(){\n\n $connection= Yii::$app->db;\n $connection->open();\n $sql =\" CALL `store_get_supplier`(:PARAM_ITEM_CAT_CODE,:PARAM_Supplier_Code)\";\n $command = $connection->createCommand($sql); \n\n $command->bindValue(':PARAM_ITEM_CAT_CODE', 0);\n $command->bindValue(':PARAM_Supplier_Code', 0);\n\n $result=$command->queryAll();\n $connection->close();\n \n return $result; \n\t}",
"function select_dropdown_options($name)\n{\n $conn = db_connect();\n\n // Generate the salespeople from the database as select options if that is the name passed in to the element\n if ($name == \"salesperson\") {\n\n // Prepared statement for selecting salesperson dropdown options\n $salesperson_dropdown_select_stmt = pg_prepare(\n $conn,\n \"salesperson_dropdown_select_stmt\",\n \"SELECT id, first_name, last_name FROM salespeople;\"\n );\n\n $result = pg_execute($conn, \"salesperson_dropdown_select_stmt\", array());\n\n // Generate the clients from the database as select options if salesperson is logged in \n // by filtering only their clients\n } else if ($name == \"client\" && $_SESSION['type'] == \"a\") {\n\n // Prepared statement for selecting client dropdown options\n $salesperson_id = $_SESSION['id'];\n $clients_dropdown_select_stmt = pg_prepare(\n $conn,\n \"clients_dropdown_select_stmt\",\n \"SELECT id, first_name, last_name FROM clients WHERE salesperson_id = $salesperson_id;\"\n );\n\n $result = pg_execute($conn, \"clients_dropdown_select_stmt\", array());\n }\n\n // Return the data required to populate dropdown menu options\n return $result;\n}",
"public function list_for_select(){\n\n\n $categories = new OsServiceCategoryModel();\n $categories = $categories->get_results();\n $response_html = '<option value=\"0\">'.__('Uncategorized', 'latepoint').'</option>';\n foreach($categories as $category){\n $response_html.= '<option>'.$category->name.'</option>';\n }\n echo wp_send_json(array('status' => 'success', 'message' => $response_html));\n }",
"public function suppliers()\n {\n return $this->hasMany(Supplier::class, 'user_id');\n }"
] | [
"0.7001589",
"0.6967833",
"0.6549886",
"0.65221965",
"0.6438195",
"0.6177406",
"0.61446697",
"0.6135953",
"0.60139185",
"0.5904682",
"0.5903299",
"0.5884091",
"0.5876469",
"0.5834687",
"0.58083737",
"0.5690744",
"0.56835616",
"0.56834364",
"0.5672376",
"0.56717235",
"0.5670463",
"0.56660897",
"0.565087",
"0.56437254",
"0.5622073",
"0.5619893",
"0.56152505",
"0.5601382",
"0.56009346",
"0.5590239",
"0.55851805",
"0.55790216",
"0.5550335",
"0.554381",
"0.54798096",
"0.5477995",
"0.5475055",
"0.54687417",
"0.5458973",
"0.5456627",
"0.5454877",
"0.5447876",
"0.544368",
"0.54408073",
"0.5431803",
"0.5431803",
"0.5431093",
"0.5422903",
"0.5415607",
"0.54105",
"0.54105",
"0.54094064",
"0.5409303",
"0.54025733",
"0.5399437",
"0.53761506",
"0.53732115",
"0.53718084",
"0.5371203",
"0.53650194",
"0.53647727",
"0.5363814",
"0.53622186",
"0.5356997",
"0.5352362",
"0.5348602",
"0.5348602",
"0.5348602",
"0.53371346",
"0.53339976",
"0.5326573",
"0.5324878",
"0.5324767",
"0.5324266",
"0.5316205",
"0.53141475",
"0.53109217",
"0.53102744",
"0.5309888",
"0.53053665",
"0.5304263",
"0.52981067",
"0.5293973",
"0.5289935",
"0.52899075",
"0.52888703",
"0.5288158",
"0.5285416",
"0.5276218",
"0.52748966",
"0.52716494",
"0.52697736",
"0.5267986",
"0.5260454",
"0.52601093",
"0.52580136",
"0.5247276",
"0.5243465",
"0.5240184",
"0.52400297"
] | 0.6991193 | 1 |
Do contact supplier form (contact site to user / supplier) | function do_contact_supplier_form($adata, $aerr_entry, $aret_flag=0) {
# Dim some Vars:
global $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;
# Some HTML Strings (reduce text)
$_td_str_left_vtop = '<td class="TP1SML_NR" width="30%" valign="top">';
$_td_str_left = '<td class="TP1SML_NR" width="30%">';
$_td_str_right = '<td class="TP1SML_NL" width="70%">';
# Build Title String, Content String, and Footer Menu String
$_tstr .= $_CCFG['_PKG_NAME_SHORT'].$_sp.$_LANG['_MAIL']['Contact_Supplier_Form'].$_sp.'('.$_LANG['_MAIL']['all_fields_required'].')';
# Do data entry error string check and build
IF ($aerr_entry['flag']) {
$err_str = $_LANG['_MAIL']['CC_FORM_ERR_HDR1'].'<br>'.$_LANG['_MAIL']['CC_FORM_ERR_HDR2'].'<br>'.$_nl;
IF ($aerr_entry['cc_s_id']) {$err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR01']; $err_prv = 1;}
IF ($aerr_entry['cc_mc_id']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR02']; $err_prv = 1;}
IF ($aerr_entry['cc_subj']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR03']; $err_prv = 1;}
IF ($aerr_entry['cc_msg']) {IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR04']; $err_prv = 1;}
$_cstr .= '<p align="center"><b>'.$err_str.'</b>'.$_nl;
}
# Formatting tweak for spacing
IF ($aerr_entry['flag']) {$_cstr .= '<br><br>'.$_nl;}
$_cstr .= '<table width="100%" border="0" cellspacing="0" cellpadding="5">'.$_nl;
$_cstr .= '<tr><td align="center">'.$_nl;
$_cstr .= '<form action="mod.php" method="post" name="supplier">'.$_nl;
$_cstr .= '<input type="hidden" name="mod" value="mail">'.$_nl;
$_cstr .= '<input type="hidden" name="mode" value="supplier">'.$_nl;
$_cstr .= '<table width="100%" cellspacing="0" cellpadding="5">'.$_nl;
$_cstr .= '<tr>'.$_nl;
$_cstr .= $_td_str_left.$_nl;
$_cstr .= '<b>'.$_LANG['_MAIL']['l_To_Supplier'].$_sp.'</b>'.$_nl;
$_cstr .= '</td>'.$_nl;
$_cstr .= $_td_str_right.$_nl;
$_cstr .= do_select_list_suppliers('cc_s_id', $adata['cc_s_id'], '1').$_nl;
$_cstr .= '</td>'.$_nl;
$_cstr .= '</tr>'.$_nl;
$_cstr .= '<tr>'.$_nl;
$_cstr .= $_td_str_left.$_nl;
$_cstr .= '<b>'.$_LANG['_MAIL']['l_From'].$_sp.'</b>'.$_nl;
$_cstr .= '</td>'.$_nl;
$_cstr .= $_td_str_right.$_nl;
$_cstr .= do_select_list_mail_contacts('cc_mc_id', $adata['cc_mc_id']);
$_cstr .= '</td>'.$_nl;
$_cstr .= '</tr>'.$_nl;
$_cstr .= '<tr>'.$_nl;
$_cstr .= $_td_str_left.$_nl;
$_cstr .= '<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b>'.$_nl;
$_cstr .= '</td>'.$_nl;
$_cstr .= $_td_str_right.$_nl;
$_cstr .= '<INPUT class="PSML_NL" TYPE=TEXT name="cc_subj" size="30" maxlength="50" value="'.htmlspecialchars($adata['cc_subj']).'">'.$_nl;
$_cstr .= '</td>'.$_nl;
$_cstr .= '</tr>'.$_nl;
$_cstr .= '<tr>'.$_nl;
$_cstr .= $_td_str_left_vtop.$_nl;
$_cstr .= '<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'</b>'.$_nl;
$_cstr .= '</td>'.$_nl;
$_cstr .= $_td_str_right.$_nl;
IF ($_CCFG['WYSIWYG_OPEN']) {$_cols = 100;} ELSE {$_cols = 75;}
$_cstr .= '<TEXTAREA class="PSML_NL" NAME="cc_msg" COLS="'.$_cols.'" ROWS="15">'.$adata['cc_msg'].'</TEXTAREA>'.$_nl;
$_cstr .= '</td>'.$_nl;
$_cstr .= '</tr>'.$_nl;
$_cstr .= '<tr>'.$_nl;
$_cstr .= $_td_str_left.$_nl;
$_cstr .= '<INPUT TYPE=hidden name="stage" value="1">'.$_nl;
$_cstr .= '</td>'.$_nl;
$_cstr .= $_td_str_right.$_nl;
$_cstr .= do_input_button_class_sw('b_email', 'SUBMIT', $_LANG['_MAIL']['B_Send_Email'], 'button_form_h', 'button_form', '1').$_nl;
$_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl;
$_cstr .= '</td>'.$_nl;
$_cstr .= '</tr>'.$_nl;
$_cstr .= '</table>'.$_nl;
$_cstr .= '</form>'.$_nl;
$_cstr .= '</td></tr>'.$_nl;
$_cstr .= '</table>'.$_nl;
$_mstr_flag = 0;
$_mstr = ''.$_nl;
# Call block it function
$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');
$_out .= '<br>'.$_nl;
# Return / Echo Final Output
IF ($aret_flag) {return $_out;} ELSE {echo $_out;}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function contact_form()\n\t{\n\t\tif ($this->errstr)\n\t\t{\n\t\t\tFsb::$tpl->set_switch('error');\n\t\t}\n\n\t\tFsb::$tpl->set_file('user/user_contact.html');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'ERRSTR' =>\t\t\tHtml::make_errstr($this->errstr),\n\t\t));\n\t\t\n\t\t// Champs contacts crees par l'administrateur\n\t\tProfil_fields_forum::form(PROFIL_FIELDS_CONTACT, 'contact', Fsb::$session->id());\n\t}",
"public function actionContact() {\n\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n\n $success = Emails::sendToAdmin_ContactForm($model->name, $model->email, $model->subject, $model->body);\n\n Emails::sendToPerson_ContactFormConfirmation($model->name, $model->email);\n\n Yii::app()->user->setFlash('contact', Yii::t('texts', 'FLASH_THANK_YOU_FOR_CONTACTING_US'));\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }",
"public function contact()\n {\n if ($this->issetPostSperglobal('name') && $this->issetPostSperglobal('email') && $this->issetPostSperglobal('message')) {\n $empty_field = 0;\n foreach ($_POST as $key => $post) {\n if (empty(trim($post))) {\n $empty_field++;\n }\n }\n if ($empty_field === 0) {\n $ReCaptcha = new ReCaptcha($this->getPostSuperglobal('recaptcha_response'));\n $method = __FUNCTION__;\n $this->session->read('Mail')->$method($this->getPostSuperglobal('name'), $this->getPostSuperglobal('email'), $this->getPostSuperglobal('message'));\n $this->session->writeFlash('success', \"Votre message a été envoyé avec succès.\");\n $this->redirect('contact');\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont vides.\");\n }\n } else {\n $this->session->writeFlash('danger', \"Certains champs sont manquants.\");\n }\n $_post = $this->getSpecificPost($_POST);\n $this->render('contact', ['head'=>['title'=>'Contact', 'meta_description'=>''], 'page'=>'contact', '_post'=>isset($_post) ? $_post : '']);\n }",
"public function contact()\n {\n \n if($this->form_validation->run('contact') == FALSE) \n {\n $data['err_msg'] = '<div class=\"errors\">'.validation_errors().'</div>';\n \n $data['title'] = \"Contact Us | Graphical Market Research\";\n $data['description'] = \"Stay in touch with Graphical Research to get UpToDate and accurate market data by industry experts. \";\n $data['country_data'] = $this->country_model->get_all_country();\n $data['keywords'] = \"Contact Us, Stay in touch with Graphical Research\";\n $data['content'] = 'layout_files/contact_us';\n $this->load->view('master_files/master_layout', $data); \n\t }else{\n\t\t$val = $this->sample_model->request('', 'C');\n\t\tif($val == 1)\n\t\t{\n $leadId = $this->sample_model->leadId();\n\t\t if($leadId)\n\t\t {\n\t\t redirect('thanks');\n\t\t }\n\t\t}\n\t }\n }",
"function contactUs( $data ) {\n // Get the info as specified in the contact info section of the site\n // management porition\n $info = ContactInfo::getInstance();\n\n // For development purposes, currently return;\n\n // Send an email to the contacted persons\n}",
"public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\tif (isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif ($model->validate())\n\t\t\t{\n\t\t\t\t$headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array(\n\t\t\t'model' => $model));\n\t}",
"public function actionContact()\n\t{\n\t\t$contact=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$contact->attributes=$_POST['ContactForm'];\n\t\t\tif($contact->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$contact->email}\\r\\nReply-To: {$contact->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$contact->subject,$contact->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('contact'=>$contact));\n\t}",
"public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }",
"public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }",
"public function actionContact()\n {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }",
"function Form_Mail()\n {\n /**\n * Form_Mail();\n */\n\n $this->referers_array = array($_SERVER[\"HTTP_HOST\"]);\n /**\n * Leave AS IS to only allow posting from same host that script resides on.\n * List individual hosts to create list of hosts that can post to this script:\n * EXAMPLE: $referer_array = array ('example.com','www.example.com','192.168.0.1');\n */\n\n /* proccess form */\n $this->set_arrays();\n $this->check_referer();\n $this->check_recipient();\n $this->check_required_fields();\n $this->send_form();\n $this->display_thankyou();\n }",
"function sentInfoContactForm($name,$company_name,$city,$email,$phone_no,$comments)\n\t\t{\n\t\t\t//email will be sent to admin\n\t\t\t//emaill of admin\n\t\t\t$email_admin = $this->manage_content->getValue('admin_profile','email_add');\n\t\t\t//get email from array $email_admin[0]['email_add']\n\t\t\t$sendMail_admin = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$email_admin[0]['email_add']);\n\t\t}",
"public function outputSetupForm()\n {\n $this->_directFormHtml('iContact');\n }",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\tMailWrapper::sendMailTemplate(\"contactus\", $model, $model->subject, \"[email protected]\");\n\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: [email protected]\\r\\nReply-To: [email protected]\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],'Email from IKMQ: ' . $model->subject,'Email: ' . $model->email . \"\\r\\n\\r\\nMessage: \\r\\n\" . $model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$this->layout ='column2';\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"function contactusForm() {\n\tglobal $lang;\n\n?>\n <script language=\"javaScript\">\n\t\tfunction formSubmit(val) {\n\t\t\tif(checkFields()) {\n\t\t\t\tdocument.forms.contact.action.value = val;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction checkFields() {\n\t\t\tvar name = document.forms.contact.firstname.value;\n\t\t\tvar email = document.forms.contact.email.value;\n\t\t\tvar message = document.forms.contact.message.value;\n\t\t\n\t\t\tif (name == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertcontactname']?>\");\n\t\t\t\tdocument.forms.contact.firstname.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (email == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertemail']?>\");\n\t\t\t\tdocument.forms.contact.email.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (message == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertmessage']?>\");\n\t\t\t\tdocument.forms.contact.message.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n</script>\n\n<TABLE width=\"90%\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">\n\n<!-- Contactus Form -->\n<FORM NAME=\"contact\" METHOD=POST ACTION=\"index.php\" Onsubmit=\"return formSubmit('sendcontactus')\">\n<INPUT TYPE=\"hidden\" name=\"action\">\n\n<TR>\n<TD width=\"30%\" valign=\"middle\" align=\"right\">\n<?=$lang['realname']?> : \n</TD>\n\n<TD valign=\"middle\" align=\"left\">\n<INPUT class=input TYPE=\"text\" NAME=\"firstname\">\n</TD>\n</TR>\n\n\n<TR>\n<TD width=\"30%\" valign=\"middle\" align=\"right\">\n<?=$lang['email']?> :\n</TD>\n\n<TD valign=\"top\" align=\"left\">\n<INPUT class=input TYPE=\"text\" NAME=\"email\">\n</TD>\n</TR>\n\n<TR>\n<TD width=\"30%\" valign=\"middle\" align=\"right\">\n<?=$lang['contacttype']?> : \n</TD>\n\n<TD valign=\"top\" align=\"left\">\n<select name=\"subject\" class=\"input\">\n<option value = \"-\"><?=$lang['select_contacttype']?></option>\n<option value = \"<?=$lang['contacttype1']?>\"><?=$lang['contacttype1']?></option>\n<option value = \"<?=$lang['contacttype2']?>\"><?=$lang['contacttype2']?></option>\n<option value = \"<?=$lang['contacttype3']?>\"><?=$lang['contacttype3']?></option>\n</select>\n</TD>\n</TR>\n\n\n<TR>\n<TD width=\"30%\" valign=\"top\" align=\"right\">\n<?=$lang['contactmessage']?> :\n</TD>\n\n<TD valign=\"top\" align=\"left\">\n<TEXTAREA NAME=\"message\" ROWS=\"8\" COLS=\"40\" style='width=90%'></TEXTAREA>\n</TD>\n</TR>\n\n<TR>\n<TD width=\"30%\" valign=\"top\" align=\"right\"> </TD>\n<TD valign=\"top\" align=\"left\">\n\n<INPUT TYPE=\"submit\" class=\"button\" VALUE=\"<?=$lang['button_contactus']?>\">\n</TD>\n</TR>\n</FORM>\n</TABLE>\n\n<?\n}",
"public function submit_form()\n\t{\n\t\tDisplay::message('user_profil_submit', ROOT . 'index.' . PHPEXT . '?p=profile&module=contact', 'forum_profil');\n\t}",
"public function actionContact()\n\t{\n\t\t$model['form'] = new ContactForm();\n\t\tif (isset($_POST['ContactForm'])) {\n\t\t\t$model['form']->attributes = $_POST['ContactForm'];\n\t\t\tif ($model['form']->validate()) {\n\t\t\t\t$name = '=?UTF-8?B?' . base64_encode($model['form']->name) . '?=';\n\t\t\t\t$subject = '=?UTF-8?B?' . base64_encode($model['form']->subject) . '?=';\n\t\t\t\t$headers = \"From: $name <{$model['form']->email}>\\r\\n\" .\n\t\t\t\t\t\"Reply-To: {$model['form']->email}\\r\\n\" .\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\" .\n\t\t\t\t\t'Content-Type: text/plain; charset=UTF-8';\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $subject, $model['form']->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact', Yii::t('app', 'Thank you for contacting us. We will respond to you as soon as possible.'));\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}",
"private function displayForm()\n {\n // Preparation des paramètres du mail.\n $data['headerTitle'] = 'Contact';\n $data['headerDescription'] = 'Page de contact';\n $data['title'] = 'Contact';\n\n // Affichage du formulaire.\n $this->load->view('templates/header', $data);\n $this->load->view('templates/alert', $data);\n $this->load->view('contact/index', $data);\n $this->load->view('templates/footer', $data);\n }",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n {\n $model = new ContactForm();\n if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) {\n Yii::$app->session->setFlash('contactFormSubmitted');\n\n return $this->refresh();\n }\n\n return $this->render('contact', compact('model'));\n }",
"public function contactUs()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'contact');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_title'] . ' | Contact Us')\n ->set_partial('header', 'partials/header')\n ->set_partial('footer', 'partials/footer');\n $this->template->build('frontpages/contact_us');\n }",
"public function contact()\n {\n add_settings_field(\n 'contact',\n apply_filters($this->plugin_name . 'label-contact', esc_html__('Contact', $this->plugin_name)),\n [$this->builder, 'text'],\n $this->plugin_name,\n $this->plugin_name . '-directives',\n [\n 'description' => 'Your contact address. Valid formats: e-mail, URL, phone number. (Required)',\n 'id' => 'contact',\n 'class' => 'text widefat hide-when-disabled',\n 'value' => isset($this->options['contact']) ? $this->options['contact'] : false,\n 'placeholder' => get_bloginfo('admin_email'),\n ]\n );\n }",
"public function website_provider() {\n\t\t\n\t\t$name = Input::get('name');\n\t\t$mailFrom = Input::get('email');\n\t\t$phone = Input::get('phone');\n\t\t$comments = Input::get('comments');\n\t\t$emailTo = '[email protected]';\n\t\t\n\t\t$vars = array(\n\t\t\t'name'\t\t=>\t$name,\n\t\t\t'email'\t\t=>\t$mailFrom,\n\t\t\t'phone'\t\t=>\t$phone,\n\t\t\t'comments'\t=>\t$comments,\n\t\t);\n\n\t\tEmailTemplate::SendByKey('contact_mail_provider', $vars, $emailTo, null, null, $mailFrom);\n\t\t\n\t\t\n\t\treturn \"<fieldset><div id='success_page'><h4 class='highlight'>Obrigado, <strong>$name</strong>! Sua mensagem foi enviada. Entraremos em contato o mais rápido possível.</h4></div></fieldset>\";\n }",
"public function action_index(){\n\n\t\t$view = View::forge('contact/form');\n\n\t\tif (Input::method() == 'POST'){\n\t\t\tif (Input::post('name') and Input::post('email') and Input::post('message')){\n\t\t\t\ttry{\n\t\t\t\t\tEmail::forge()\n\t\t\t\t\t ->to('[email protected]')\n\t\t\t\t\t ->from(Input::post('email'), Input::post('name'))\n\t\t\t\t\t ->subject('TuneGenius Contact Form')\n\t\t\t\t\t ->body(Input::post('message'))\n\t\t\t\t\t ->send();\n\n\t\t\t\t\tResponse::redirect('contact/sent');\n\t\t\t\t}\n\t\t\t\tcatch (EmailSendingFailedException $e){\n\t\t\t\t\t$view->error = 'Your email did not send, please try again.';\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t//if not all fields are filled out puts up error and empties fields\n\t\t\telse{\n\t\t\t\t$view->error = 'Please fill in all fields';\n\t\t\t}\n\t\t}\n\t\t$this->template->title = 'Contact us';\n\t\t$this->template->content = $view;\n\t}",
"public function gestioncontactAction()\r\n {\r\n $auth = Zend_Auth::getInstance();\r\n $userGroupId = $auth->getIdentity()->UserGroupIdF;\r\n\r\n $contacts = new Application_Model_DbTable_Contact();\r\n $contact = $contacts->getAllContactByGroup($userGroupId);\r\n $this->view->contacts = $contact;\r\n\r\n // Form for the creation of a contact\r\n $createForm = new Application_Form_CreateContactForm();\r\n $createForm->createForm();\r\n $createForm->setAction($this->_helper->url('createcontact', 'admin'));\r\n $this->view->form = $createForm;\r\n\r\n // Form for the edit of a contact\r\n $editForm = new Application_Form_EditContactForm();\r\n $editForm->createForm();\r\n $editForm->setAction($this->_helper->url('editcontact', 'admin'));\r\n $this->view->editform = $editForm;\r\n\r\n }",
"public function actionContact()\n {\n $model=new ContactForm;\n if(isset($_POST['ContactForm']))\n {\n $model->attributes=$_POST['ContactForm'];\n if($model->validate())\n {\n $headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n mail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\n Yii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact',array('model'=>$model));\n }",
"public function actionContact()\r\n\t{\r\n\t\t\r\n\t\t$this->layout='//layouts/column3';\r\n\t\t$model=new ContactForm;\r\n\t\tif(isset($_POST['ContactForm']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['ContactForm'];\r\n\t\t\tif($model->validate())\r\n\t\t\t{\r\n\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\r\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\r\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\r\n\t\t\t\t$this->refresh();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->promotionItems = SalePromotion::model()->findAllByAttributes(\r\n\t\t\t\tarray(),\r\n\t\t\t\t$condition = 'END_DATE >= :today AND START_DATE <= :today',\r\n\t\t\t\t$params = array(\r\n\t\t\t\t\t\t':today' => date('Y-m-d', time()),\r\n\t\t\t\t)\r\n\t\t);\r\n\t\t\r\n\t\t\r\n\t\t$this->render('contact',array('model'=>$model));\r\n\t}",
"public function check_form()\n\t{\n\t\tProfil_fields_forum::validate(PROFIL_FIELDS_CONTACT, 'contact', $this->errstr, Fsb::$session->id());\n\t}",
"public function actionContact() {\n //echo Helper::yiiparam('adminEmail');\n $this->layout = 'pagination_layout';\n\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->first_name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-type: text/plain; charset=UTF-8\";\n\n mail(Helper::yiiparam('adminEmail'), $subject, $model->message, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }",
"public function Contact(){\r\n $this->emailPost();\r\n $this->objetPost();\r\n $this->messagePost();\r\n \r\n $from = $this->_emailPostSecure;\r\n \r\n $to = \"[email protected]\";\r\n \r\n $subject = $this->_objetPostSecure;\r\n \r\n $message = $this->_messagePostSecure;\r\n \r\n $headers = \"From: \" .$from;\r\n \r\n mail($to,$subject,$message, $headers);\r\n \r\n header('location: Contact'); \r\n \r\n }",
"public function actionContact() {\r\n\t\t$model = new ContactForm ();\r\n\t\tif (isset ( $_POST ['ContactForm'] )) {\r\n\t\t\t$model->attributes = $_POST ['ContactForm'];\r\n\t\t\tif ($model->validate ()) {\r\n\t\t\t\t$name = '=?UTF-8?B?' . base64_encode ( $model->name ) . '?=';\r\n\t\t\t\t$subject = '=?UTF-8?B?' . base64_encode ( $model->subject ) . '?=';\r\n\t\t\t\t$headers = \"From: $name <{$model->email}>\\r\\n\" . \"Reply-To: {$model->email}\\r\\n\" . \"MIME-Version: 1.0\\r\\n\" . \"Content-type: text/plain; charset=UTF-8\";\r\n\t\t\t\t\r\n\t\t\t\tmail ( Yii::app ()->params ['adminEmail'], $subject, $model->body, $headers );\r\n\t\t\t\tYii::app ()->user->setFlash ( 'contact', 'Thank you for contacting us. We will respond to you as soon as possible.' );\r\n\t\t\t\t$this->refresh ();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->render ( 'contact', array (\r\n\t\t\t\t'model' => $model \r\n\t\t) );\r\n\t}",
"public function actionContact() {\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"function contacts($args){\n\t\t$this->view->add('page_title','Contacts');\n\t\t\n\t\t//Set tool box\n\t\tif( $args['tool'] == null ){\n $tool = 'display';\n } else {\n $tool = $args['tool'];\n }\n\t\t if( $func = $this->contacts_toolbox($tool,$this) ) {\n \n // check for success, default to no\n $success = false;\n \n // choose tool and execute\n $success = $func($this);\n }\n \n // add self link\n $this->view->add('self_link',\n $this->app->form_path('admin/contacts')\n );\n\t}",
"public function _settings_section_contact_form() {\n _e( 'The contact form is a way for users to submit support requests. It can be added to the dashboard using the options above.', 'zendesk' );\n }",
"function wpsp_send_tour_design() {\n\t\n\tparse_str ($_POST['tours'], $inquiry_info);\n\t\n\twpsp_email_notify( $inquiry_info, true, true );//confirm to operator\n\twpsp_email_notify( $inquiry_info, false, true ); //confirm to traveller\n\t\n\tdie();\n}",
"public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" . \"Reply-To: {$model->email}\\r\\n\" . \"MIME-Version: 1.0\\r\\n\" . \"Content-Type: text/plain; charset=UTF-8\";\n\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"public function actionContact()\n\t{\n\t\t$model=new ContactForm;\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\n\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact',array('model'=>$model));\n\t}",
"function do_contact_supplier_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_s_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_supplier_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get supplier contact information array\n\t\t\t$_ccinfo\t= get_contact_supplier_info($adata['cc_s_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['s_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t} ELSE {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_company'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t}\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'];\n\t\t} ELSE {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_company'];\n\t\t}\n\t\t$_MTP['to_email']\t= $_ccinfo['s_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_supplier_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= ' '.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}",
"public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-Type: text/plain; charset=UTF-8\";\n\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }",
"public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-Type: text/plain; charset=UTF-8\";\n\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }",
"public function actionContact() {\n $model = new ContactForm;\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-Type: text/plain; charset=UTF-8\";\n\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n $this->refresh();\n }\n }\n $this->render('contact', array('model' => $model));\n }",
"public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\t\n\t\t$this->performAjaxValidation($model, 'contact-form');\n\n\t\tif(isset($_POST['ContactForm']))\n\t\t{\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif($model->validate())\n\t\t\t{\n\t\t\t\t$headers = \"From: {$model->email}\\r\\nReply-To: {$model->email}\";\n\t\t\t\tmail(Yii::app()->params['adminEmail'], $model->subject, $model->body, $headers);\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us! We will get back to you as soon as possible!!');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}",
"function _c_form($options)\n\t{\t \n\t\t\n\n\t\t\trequire_once(TEMPLATEPATH . '/template-helpers/contact_form.php');\n\t\t\t\n\t\t\t\n\t}",
"public function actionContact() {\n \n $model = new ContactForm;\n $model->scenario = 'contact';\n if (isset($_POST['ContactForm'])) {\n $model->attributes = $_POST['ContactForm'];\n if ($model->validate()) {\n $name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n $subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n $headers = \"From: $name <{$model->email}>\\r\\n\" .\n \"Reply-To: {$model->email}\\r\\n\" .\n \"MIME-Version: 1.0\\r\\n\" .\n \"Content-Type: text/plain; charset=UTF-8\";\n\n Yii::app()->user->setFlash('contact', 'Thank you for contacting us. We will respond to you as soon as possible.');\n mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n \n $this->refresh();\n //$this->redirect(array('contact'));\n }\n }\n // $this->layout = 'front_main';\n $this->render('contact', array('model' => $model));\n }",
"static private function submitEmail()\n {\n $id = $_POST['formid'];\n\n // Initiates new form handling instance\n $f = new FormHandling;\n\n // Gets the client email list (to, bcc, cc)\n $clientEmailList = $f->getClientEmail($id);\n\n // Gets the customer email (if set)\n $customerEmail = $f->getCustomerEmail($_POST);\n\n // dd($customerEmail);\n\n // Checks if in sandbox mode before sending email\n if(FALSE == submissionHandling::sandbox){\n\n // New email instance\n $e = new emailHandling();\n\n // render and send client email(s)\n if($clientEmailList['to']){\n $e->sendEmail($id,'client',$clientEmailList['to'],'Enquiry received','Hi',$clientEmailList['headers']);\n }\n\n // render and send customer email\n if($customerEmail){\n $e->sendEmail($id,'customer',$customerEmail,'Thanks for getting in touch','We will be in touch soon');\n }\n\n }\n }",
"public function actionContact()\n\t{\n\t\t$model = new ContactForm;\n\t\tif (isset($_POST['ContactForm'])) {\n\t\t\t$model->attributes = $_POST['ContactForm'];\n\t\t\tif ($model->validate()) {\n\t\t\t\t$name = '=?UTF-8?B?' . base64_encode($model->name) . '?=';\n\t\t\t\t$subject = '=?UTF-8?B?' . base64_encode($model->subject) . '?=';\n\t\t\t\t$headers = \"From: \" . CHtml::encode(Yii::app()->name) . \" <[email protected]>\" . \"\\r\\n\" .\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\" .\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\" .\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\n\t\t\t\t$resultado = mail(Yii::app()->params['adminEmail'], $subject, $model->body, $headers);\n\t\t\t\tif (!$resultado) Yii::log(\"### Error Mail: \" . var_export(error_get_last()['message'], true), CLogger::LEVEL_WARNING, __METHOD__);\n\t\t\t\tYii::app()->user->setFlash('contact', 'Gracias por contactarnos.Responderemos a la mayor brevedad posible.');\n\t\t\t\t$this->refresh();\n\t\t\t}\n\t\t}\n\t\t$this->render('contact', array('model' => $model));\n\t}",
"public function contactAction() {\n\n //ONLY LOGGED IN USER CAN ADD OVERVIEW\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET LISTING ID AND OBJECT\n $listing_id = $this->_getParam('listing_id');\n\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n\n //GET LISTING TYPE ID\n $listingtype_id = $sitereview->listingtype_id;\n Engine_Api::_()->sitereview()->setListingTypeInRegistry($listingtype_id);\n $listingType = Zend_Registry::get('listingtypeArray' . $listingtype_id);\n Engine_Api::_()->core()->setSubject($sitereview); \n if(!Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n $this->_helper->content\n ->setContentName(\"sitereview_dashboard_contact_listtype_$listingtype_id\")\n //->setNoRender()\n ->setEnabled();\n \n } \n \n if (empty($listingType->contact_detail)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n if (!$sitereview->authorization()->isAllowed($viewer, 'edit_listtype_' . $listingtype_id)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n if (!Engine_Api::_()->authorization()->getPermission($viewer->level_id, 'sitereview_listing', \"contact_listtype_$listingtype_id\")) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n //SELECTED TAB\n $this->view->TabActive = \"contactdetails\";\n\n //SET FORM\n $this->view->form = $form = new Sitereview_Form_Contactinfo();\n $tableOtherinfo = Engine_Api::_()->getDbTable('otherinfo', 'sitereview');\n\n //POPULATE FORM\n $row = $tableOtherinfo->getOtherinfo($listing_id);\n $value['email'] = $row->email;\n $value['phone'] = $row->phone;\n $value['website'] = $row->website;\n\n $form->populate($value);\n\n //CHECK FORM VALIDATION\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n //GET FORM VALUES\n $values = $form->getValues();\n\n\n $values['phone'] = $this->view->string()->stripTags($values['phone']);\n $values['email'] = $this->view->string()->stripTags($values['email']);\n $values['website'] = $this->view->string()->stripTags($values['website']);\n if (isset($values['email'])) {\n $email_id = $values['email'];\n\n //CHECK EMAIL VALIDATION\n $validator = new Zend_Validate_EmailAddress();\n $validator->getHostnameValidator()->setValidateTld(false);\n if (!empty($email_id)) {\n if (!$validator->isValid($email_id)) {\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter a valid email address.'));\n return;\n } else {\n $tableOtherinfo->update(array('email' => $email_id), array('listing_id = ?' => $listing_id));\n }\n } else {\n $tableOtherinfo->update(array('email' => $email_id), array('listing_id = ?' => $listing_id));\n }\n }\n\n //CHECK PHONE OPTION IS THERE OR NOT\n if (isset($values['phone'])) {\n $tableOtherinfo->update(array('phone' => $values['phone']), array('listing_id = ?' => $listing_id));\n }\n\n //CHECK WEBSITE OPTION IS THERE OR NOT\n if (isset($values['website'])) {\n $tableOtherinfo->update(array('website' => $values['website']), array('listing_id = ?' => $listing_id));\n }\n\n //SHOW SUCCESS MESSAGE\n $form->addNotice(Zend_Registry::get('Zend_Translate')->_('Your changes have been saved successfully.'));\n }\n }",
"public function afficherForm(){\r\n\t\t$params = array(\r\n\t\t\t'content' => \"contact\"\t\r\n\t\t);\r\n\t\tinclude 'templates/default.php';\r\n\t}",
"public function actionContact() {\n $this->assignLangue();\n $model = new ContactForm;\n \n if (isset($_POST['ContactForm']))\n {\n $model->attributes = $_POST['ContactForm'];\n if($model->validate())\n {\n $from = \"[email protected]\";\n $to = Yii::app()->params[\"adminEmail\"];\n $subject = \"=?UTF-8?B?\" . base64_encode(Translate::trad(\"ContactIncomingMessageFrom\") . \" - Subject: \" . $model->subject) . '?=';\n $body = $model->body;\n \n $toSend = new YiiMailMessage($subject, $body, \"text/plain\", \"UTF-8\");\n $toSend->addTo($to);\n $toSend->addFrom($from);\n \n try {\n Yii::app()->mail->send($toSend);\n } catch (Swift_SwiftException $mailException) {\n Yii::app()->user->setFlash('error', 'L\\'envoi du mail a échoué.<br/>' . $mailException->getMessage());\n } catch(Swift_RfcComplianceException $complianceEx)\n {\n Yii::app()->user->setFlash('error', 'L\\'envoi du mail a échoué : <br/>' . $complianceEx->getMessage());\n }\n \n Yii::app()->user->setFlash('info', Translate::trad(\"ContactMessageSuccessAlert\"));\n }\n }\n $this->render('contact', array('model' => $model));\n }",
"public function actionContact()\r\n\t{\r\n\t\t$this->layout = '//layouts/site';\r\n\t\t\r\n\t\t$model=new ContactForm;\r\n\t\tif(isset($_POST['ContactForm']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['ContactForm'];\r\n\t\t\tif($model->validate())\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tUtilHelper::writeToFile($model, 'a+');\r\n\t\t\t\tUtilMail::sendMail($model->email, $model->subject, $model->body);\r\n\t\t\t\t\r\n//\t\t\t\t$headers=\"From: {$model->email}\\r\\nReply-To: {$model->email}\";\r\n//\t\t\t\tmail(Yii::app()->params['adminEmail'],$model->subject,$model->body,$headers);\r\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\r\n\t\t\t\t$this->refresh();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->render('contact',array('model'=>$model));\r\n\t}",
"public function send() {\n if($_SERVER['REQUEST_METHOD'] === \"POST\") {\n $this->loadView('Contact', $this->loadModel('ContactModel')->send($_POST));\n } else {\n $this->loadView('NotFound');\n }\n }",
"public function contactUs($full_name,$email,$phone,$subject,$message,$site_email)\n\t{\n\t\t$full_name = $this->secureInput($full_name);\n\t\t$email = $this->secureInput($email);\n\t\t$phone = $this->secureInput($phone);\n\t\t$subject = $this->secureInput($subject);\n\t\t$message = $this->secureInput($message);\n\t\t$site_email = $this->secureInput($site_email);\n\n\t\t$contact_date = date(\"l, M j, Y, g:i a\");\n\n\t\t$sql = \"INSERT INTO contact_us ( full_name, email, phone, subject, message, reply,contact_date)\n VALUES ('\".$full_name.\"','\".$email.\"','\".$phone.\"', '\".$subject.\"','\".$message.\"','','\".$contact_date.\"')\";\n\t\t$res = $this->processSql($sql);\n\t\tif($res){\n\t\t\t//build email to be sent\n\t\t\t$to = $site_email;\n\t\t\t$subject = \"New message from \".$email;\n\n\t\t\t$admin_message = \"\n\t\t\t<html>\n\t\t\t<head>\n\t\t\t<title>New message from\".$full_name.\"</title>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t<h3>Query / Comment</h3>\n\t\t\t<p>Hello Site Admin, \".$full_name.\" has sent a query/message. It is as below:</p>\n\t\t\t<p>\".$message.\"</p>\n\t\t\t</body>\n\t\t\t</html>\n\t\t\t\";\n\n\t\t\t// To send HTML mail, the Content-type header must be set\n\t\t\t$headers = \"MIME-Version: 1.0\\r\\n\";\n\t\t\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n\t\t\t$headers .= \"From: '\".$full_name.\"'<\".$email.\">\" . \"\\r\\n\";//Modified By GENTLE to show the FROM in the message\n\n\t\t\t$mail_send = mail($to, $subject, $admin_message, $headers );\n\t\t\tif ($mail_send):\n\t\t\treturn 99;\n else:\n return 2;\n endif;\n\t\t\t}else{\n\t\t\treturn 1;\n\t\t}\n\t}",
"function pexeto_contact_form() {\r\n\t\t$html='<div class=\"widget-contact-form\">\r\n\t\t\t<form action=\"'.get_template_directory_uri().'/includes/send-email.php\" method=\"post\" \r\n\t\t\tid=\"submit-form\" class=\"pexeto-contact-form\">\r\n\t\t\t<div class=\"error-box error-message\"></div>\r\n\t\t\t<div class=\"info-box sent-message\"></div>\r\n\t\t\t<input type=\"text\" name=\"name\" class=\"required placeholder\" id=\"name_text_box\" \r\n\t\t\tplaceholder=\"'.pexeto_text( 'name_text' ).'\" />\r\n\t\t\t<input type=\"text\" name=\"email\" class=\"required placeholder email\" \r\n\t\t\tid=\"email_text_box\" placeholder=\"'.pexeto_text( 'your_email_text' ).'\" />\r\n\t\t\t<textarea name=\"question\" rows=\"\" cols=\"\" class=\"required\"\r\n\t\t\tid=\"question_text_area\"></textarea>\r\n\t\t\t<input type=\"hidden\" name=\"widget\" value=\"true\" />\r\n\r\n\t\t\t<a class=\"button send-button\"><span>'.pexeto_text( 'send_text' ).'</span></a>\r\n\t\t\t<div class=\"contact-loader\"></div><div class=\"check\"></div>\r\n\r\n\t\t\t</form><div class=\"clear\"></div></div>';\r\n\t\treturn $html;\r\n\t}",
"function contactUs ($sendEmail=false, $serverSetting=null){\n\t\t\t$simpleFormBuilder = new simpleFormBuilder;\n\t\t\t\n\t\t\t$builder \t= array\t(\n\t\t\t\t\t\t\t\"prosesname\"=> \"Your Contact Has Been Saved \",\n\t\t\t\t\t\t\t\"action\"\t=> \"\",\n\t\t\t\t\t\t\t\"method\"\t=> \"insert\",\n\t\t\t\t\t\t\t\"datatable\"\t=> \"tbl_contact\",\n\t\t\t\t\t\t\t\"element\"\t=> array\t( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Name\" => array( \"type\" => \"text\", \"dataname\" => \"contact_name\t\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Email\" => array( \"type\" => \"text\", \"dataname\" => \"contact_email\", \"required\" => 1, \"emailvalid\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Phone\" => array( \"type\" => \"text\", \"dataname\" => \"contact_phone\", \"required\" => 1, \"phonevalid\" => 1),\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Address\" => array( \"type\" => \"text\", \"dataname\" => \"contact_address\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Message\" => array( \"type\" => \"textarea\", \"dataname\" => \"contact_message\", \"required\" => 1, \"width\" => \"75\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"captcha\" => array( \"type\" => \"captcha\", \"ignore\" => 1, \"message\" => \"(spam protection)\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden\" => array( \"type\" => \"hidden\", \"dataname\" => \"contact_date\" , \"value\" => date(\"Y-m-d H:i:s\")),\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\n\t\t\n\t\t\t$form\t= $simpleFormBuilder->builder($builder, false, false, false);\n\t\t\t\n\t\t\tif($simpleFormBuilder->haveError != 1 AND isset($_POST['submit']) AND $sendEmail == true){\n\t\t\t\techo $simpleFormBuilder->haveError;\n\t\t\t\tif(is_null($serverSetting)){\n\t\t\t\t\t$objEmail \t= new send2email(MAIL_SERVER, SITE_EMAIL, SITE_EMAIL_PASS, MAIL_PORT, true);\n\t\t\t\t\t$receiver\t= MANAGEMENT_EMAIL;\n\t\t\t\t}else{\n\t\t\t\t\t$objEmail \t= new send2email(trim($serverSetting[0]), trim($serverSetting[1]), trim($serverSetting[2]), trim($serverSetting[3]), trim($serverSetting[4]) );\n\t\t\t\t\t$receiver\t= $serverSetting[5];\n\t\t\t\t}\n\n\t\t\t\t$send \t\t= $objEmail->send($_POST[\"contact_email\"], '[Blanco Indonesia] Contact Us from '.$_POST[\"contact_name\"] .' ('.$_POST[\"contact_phone\"]. ')', $_POST[\"contact_message\"], $receiver, 'Contact Us', $_POST[\"contact_name\"]);\n\t\t\t\t/*echo '<!-- <pre>'; print_r($send); echo ' </pre> -->';*/\n\t\t\t}\n\t\t\t\n\t\t\treturn $form;\n\t\t}",
"function contactSendMail()\r\n {\r\n $subject = 'Contact : ' . $_POST['contactNom'];\r\n $body = $_POST['contactMsg'];\r\n\r\n\r\n $this->sendMail($subject, $body);\r\n }",
"public function actionContact()\r\n\t{\r\n\t\t$model=new ContactForm;\r\n\t\tif(isset($_POST['ContactForm']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['ContactForm'];\r\n\t\t\tif($model->validate())\r\n\t\t\t{\r\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\r\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\r\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\r\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\r\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\r\n\t\t\t\t\t\"Content-type: text/plain; charset=UTF-8\";\r\n\r\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\r\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\r\n\t\t\t\t$this->refresh();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->render('contact',array('model'=>$model));\r\n\t}",
"public function ShowForm()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$GLOBALS['AddonId'] = $this->GetId();\n\t\t\t$GLOBALS['Message'] = GetFlashMessageBoxes();\n\t\t\t$this->ParseTemplate('emailchange.form');\n\t\t}",
"public function actionContact() {\n $model=new ContactForm;\n if(isset($_POST['ContactForm'])) {\n $model->attributes=$_POST['ContactForm'];\n if($model->validate()) {\n\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\n\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\n\t$headers=\"From: $name <{$model->email}>\\r\\n\".\n\t \"Reply-To: {$model->email}\\r\\n\".\n\t \"MIME-Version: 1.0\\r\\n\".\n\t \"Content-Type: text/plain; charset=UTF-8\";\n\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\n\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\n\t$this->refresh();\n }\n }\n $this->render('contact',array('model'=>$model));\n }",
"protected function handleContact($resume) {\n if(!$this->getRequest()->post(\"contact\")) {\n return;\n }\n \n $valid = $this->form[\"contact\"]->isValid($this->getRequest()->getAll());\n \n if($valid) {\n \n $cf = array();\n foreach($this->form[\"contact\"]->getFields() as $key => $field) {\n $cf[$key] = $field->getValue();\n } \n \n $mail = Wpjb_Utility_Message::load(\"notify_candidate_message\");\n $mail->setTo($resume->getUser(true)->user_email);\n $mail->addHeader(\"Reply-To\", $this->form[\"contact\"]->value(\"email\"));\n $mail->assign(\"company\", Wpjb_Model_Company::current());\n $mail->assign(\"resume\", $resume);\n $mail->assign(\"contact_form\", $cf);\n $mail->send();\n \n $this->addInfo(__(\"Your message has been sent.\", \"wpjobboard\"));\n add_action(\"wp_footer\", \"wpjb_hide_scroll_hash\");\n \n } else {\n $this->show[\"contact\"] = 1;\n $this->view->form_error = __(\"There are errors in your form\", \"wpjobboard\");\n }\n \n }",
"function student_crm_webform_send_email_form_submit($form, $form_state) {\n $case = crm_case_load($form_state['values']['case']);\n $email_addresses = student_crm_webform_send_email('crm_case', $case, $form_state['values']['field'], $form_state['values']['manual-email']);\n \n $case = crm_case_load($form_state['values']['case']);\n $fields = field_info_instances();\n $field = $fields['crm_case'][$case->type][$form_state['values']['field']];\n\n drupal_set_message(t('The form %form has been sent to: !email-addresses', array('%form' => $field['label'], '!email-addresses' => theme('item_list', array('items' => $email_addresses)))));\n}",
"function cb_get_form($sendTo=\"\", $subject=\"\"){\n\t$sendTo= ($sendTo == \"\") ? get_bloginfo('admin_email') : $sendTo;\n\t$subject= ($subject == \"\") ? 'Contact Form from'. get_bloginfo('name') : $subject;\n\t\n\tprint cb_build_form($sendTo, $subject);\n}",
"function membersemail_form()\n{\n $content = '';\n $content .= '<form method=\"post\" action=\"http://localhost/wordpress/thank-you/\">';\n\n $content .= '<input type=\"text\" name=\"full_name\" placeholder=\"Your Full Name\"/>';\n $content .= '<br />';\n\n $content .= '<input type=\"text\" name=\"email_address\" placeholder=\"Enter Email Address\"/>';\n $content .= '<br />';\n\n\n\n $content .= '<input type=\"submit\" name=\"membersemail_submit_form\" value=\"SUBMIT\" >';\n\n\n $content .= '</form>';\n return $content;\n}",
"public function actionContact()\r\n\t{\r\n\t\tif(Yii::app()->user->isGuest)\r\n\t\t\t$this->layout='//layouts/loginForm';\r\n\t\t$model=new ContactForm;\r\n\t\tif(isset($_POST['ContactForm']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['ContactForm'];\r\n\t\t\tif($model->validate())\r\n\t\t\t{\r\n\t\t\t\t$name='=?UTF-8?B?'.base64_encode($model->name).'?=';\r\n\t\t\t\t$subject='=?UTF-8?B?'.base64_encode($model->subject).'?=';\r\n\t\t\t\t$headers=\"From: $name <{$model->email}>\\r\\n\".\r\n\t\t\t\t\t\"Reply-To: {$model->email}\\r\\n\".\r\n\t\t\t\t\t\"MIME-Version: 1.0\\r\\n\".\r\n\t\t\t\t\t\"Content-Type: text/plain; charset=UTF-8\";\r\n\r\n\t\t\t\tmail(Yii::app()->params['adminEmail'],$subject,$model->body,$headers);\r\n\t\t\t\tYii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');\r\n\t\t\t\t$this->refresh();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->render('contact',array('model'=>$model));\r\n\t}",
"function offerContactEmail() {\n\t\t\t$toemail = $this->input->post('toemail');\n\t\t\t$msg = $this->input->post('message');\n\t\t\t$phone = $this->input->post('phone');\n\t\t\t$name = $this->input->post('name');\n\n\t\t\t$message = $this->mailHeader;\n\t\t\t$message .= \"Name: \".$name.\"<br>\";\n\t\t\t$message .= \"Phone: \".$phone.\"<br>\";\n\t\t\t$message .= \"Message: \".$msg.\"<br>\";\n\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($toemail);\n\t\t\t\t$this->email->subject($subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\tif (!$this->email->send()) {\n\t\t\t\t\t\t//echo $this->email->print_debugger();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t//echo 'Email sent';\n\t\t\t\t}\n\t\t}",
"public function gui2()\n {\n require_code('form_templates');\n\n $submit_name = do_lang_tempcode('PROCEED');\n $post_url = build_url(array('page' => '_SELF', 'type' => 'actual'), '_SELF');\n\n $fields = new Tempcode();\n $hidden = new Tempcode();\n $already = array();\n $email_counter = 0;\n foreach ($_POST as $key => $input_value) {\n if (get_magic_quotes_gpc()) {\n $input_value = stripslashes($input_value);\n }\n\n if (substr($key, 0, 14) == 'email_address_') {\n $already[] = $input_value; //email address\n $email_counter++;\n $hidden->attach(form_input_hidden($key, $input_value));\n } else {\n // Add hidden field to the form\n if ($key != 'upload') {\n $hidden->attach(form_input_hidden($key, $input_value));\n }\n }\n }\n\n $hidden->attach(form_input_hidden('select_contacts_page', '1'));\n\n $text = do_lang_tempcode('RECOMMEND_SITE_TEXT_CHOOSE_CONTACTS', escape_html(get_site_name()));\n\n $page_title = get_param_string('page_title', null, true);\n if (is_null(get_param_string('from', null, true))) {\n $hidden->attach(form_input_hidden('wrap_message', '1'));\n }\n\n $success_read = false;\n\n // Start processing CSV file\n if ((get_option('enable_csv_recommend') == '1') && (!is_guest())) {\n if (array_key_exists('upload', $_FILES)) { // NB: We disabled plupload for this form so don't need to consider it\n if (is_uploaded_file($_FILES['upload']['tmp_name']) && preg_match('#\\.csv#', $_FILES['upload']['name']) != 0) {\n $possible_email_fields = array('E-mail', 'Email', 'E-mail address', 'Email address', 'Primary Email');\n $possible_name_fields = array('Name', 'Forename', 'First Name', 'Display Name', 'First');\n\n $fixed_contents = unixify_line_format(file_get_contents($_FILES['upload']['tmp_name']));\n require_code('files');\n cms_file_put_contents_safe($_FILES['upload']['tmp_name'], $fixed_contents, FILE_WRITE_FAILURE_SILENT);\n\n safe_ini_set('auto_detect_line_endings', '1');\n $myfile = fopen($_FILES['upload']['tmp_name'], 'rt');\n\n $del = ',';\n\n $csv_header_line_fields = fgetcsv($myfile, 10240, $del);\n if ((count($csv_header_line_fields) == 1) && (strpos($csv_header_line_fields[0], ';') !== false)) {\n $del = ';';\n rewind($myfile);\n $csv_header_line_fields = fgetcsv($myfile, 10240, $del);\n }\n\n $skip_next_process = false;\n\n if (function_exists('mb_convert_encoding')) {\n if ((function_exists('mb_detect_encoding')) && (strlen(mb_detect_encoding($csv_header_line_fields[0], \"ASCII,UTF-8,UTF-16,UTF16\")) == 0)) { // Apple mail weirdness\n // Test string just for Apple mail detection\n $test_unicode = utf8_decode(mb_convert_encoding($csv_header_line_fields[0], \"UTF-8\", \"UTF-16\"));\n if (preg_match('#\\?\\?ame#u', $test_unicode) != 0) {\n foreach ($csv_header_line_fields as $key => $value) {\n $csv_header_line_fields[$key] = utf8_decode(mb_convert_encoding($csv_header_line_fields[$key], \"UTF-8\", \"UTF-16\"));\n\n $found_email_address = '';\n $found_name = '';\n\n $first_row_exploded = explode(';', $csv_header_line_fields[0]);\n\n $email_index = 1; // by default\n $name_index = 0; // by default\n\n foreach ($csv_header_line_fields as $key2 => $value2) {\n if (preg_match('#\\?\\?ame#', $value2) != 0) {\n $name_index = $key2; // Windows mail\n }\n if (preg_match('#E\\-mail#', $value2) != 0) {\n $email_index = $key2; // both\n }\n }\n\n while (($csv_line = fgetcsv($myfile, 10240, $del)) !== false) { // Reading a CSV record\n foreach ($csv_line as $key2 => $value2) {\n $csv_line[$key2] = utf8_decode(mb_convert_encoding($value2, \"UTF-8\", \"UTF-16\"));\n }\n\n $found_email_address = (array_key_exists($email_index, $csv_line) && strlen($csv_line[$email_index]) > 0) ? $csv_line[$email_index] : '';\n $found_email_address = (preg_match('#.*\\@.*\\..*#', $found_email_address) != 0) ? preg_replace(\"#\\\"#\", '', $found_email_address) : '';\n $found_name = $found_email_address;\n\n if (strlen($found_email_address) > 0) {\n $skip_next_process = true;\n // Add to the list what we've found\n $fields->attach(form_input_tick($found_name, $found_email_address, 'use_details_' . strval($email_counter), true));\n $hidden->attach(form_input_hidden('details_email_' . strval($email_counter), $found_email_address));\n $hidden->attach(form_input_hidden('details_name_' . strval($email_counter), $found_name));\n $email_counter++;\n $success_read = true;\n }\n }\n }\n }\n }\n }\n\n if (!$skip_next_process) {\n // There is a strange symbol that appears at start of the Windows Mail file, so we need to convert the first file line to catch these\n if ((function_exists('mb_check_encoding')) && (mb_check_encoding($csv_header_line_fields[0], 'UTF-8'))) {\n $csv_header_line_fields[0] = utf8_decode($csv_header_line_fields[0]);\n }\n\n // This means that we need to import from Windows mail (also for Outlook Express) export file, which is different from others csv export formats\n if (array_key_exists(0, $csv_header_line_fields) && (preg_match('#\\?Name#', $csv_header_line_fields[0]) != 0 || preg_match('#Name\\;E\\-mail\\sAddress#', $csv_header_line_fields[0]) != 0)) {\n $found_email_address = '';\n $found_name = '';\n\n $first_row_exploded = explode(';', $csv_header_line_fields[0]);\n\n $email_index = 1; // by default\n $name_index = 0; // by default\n\n foreach ($first_row_exploded as $key => $value) {\n if (preg_match('#\\?Name#', $value) != 0) {\n $name_index = $key; // Windows mail\n }\n if (preg_match('#^Name$#', $value) != 0) {\n $name_index = $key; // Outlook Express\n }\n if (preg_match('#E\\-mail\\sAddress#', $value) != 0) {\n $email_index = $key; // both\n }\n }\n\n while (($csv_line = fgetcsv($myfile, 10240, $del)) !== false) { // Reading a CSV record\n $row_exploded = (array_key_exists(0, $csv_line) && strlen($csv_line['0']) > 0) ? explode(';', $csv_line[0]) : array('', '');\n\n $found_email_address = (strlen($row_exploded[$email_index]) > 0) ? $row_exploded[$email_index] : '';\n $found_name = (strlen($row_exploded[$name_index]) > 0) ? $row_exploded[$name_index] : '';\n\n if (strlen($found_email_address) > 0) {\n // Add to the list what we've found\n $fields->attach(form_input_tick($found_name, do_lang_tempcode('RECOMMENDING_TO_LINE', escape_html($found_name), escape_html($found_email_address)), 'use_details_' . strval($email_counter), true));\n $hidden->attach(form_input_hidden('details_email_' . strval($email_counter), $found_email_address));\n $hidden->attach(form_input_hidden('details_name_' . strval($email_counter), $found_name));\n $email_counter++;\n $success_read = true;\n }\n }\n } else {\n require_code('type_sanitisation');\n\n // Find e-mail\n $email_field_index = mixed();\n foreach ($possible_email_fields as $field) {\n foreach ($csv_header_line_fields as $i => $header_field) {\n if (strtolower($header_field) == strtolower($field)) {\n $email_field_index = $i;\n $success_read = true;\n break 2;\n }\n\n // No header\n if (is_email_address($header_field)) {\n $email_field_index = $i;\n $success_read = true;\n rewind($myfile);\n break 2;\n }\n }\n }\n\n if ($success_read) {\n // Find name\n $name_field_index = mixed();\n foreach ($possible_name_fields as $field) {\n foreach ($csv_header_line_fields as $i => $header_field) {\n if ((strtolower($header_field) == strtolower($field)) && ($i != $email_field_index)) {\n $name_field_index = $i;\n break 2;\n }\n }\n }\n // Hmm, first one that is not the email then\n if (is_null($name_field_index)) {\n foreach ($csv_header_line_fields as $i => $header_field) {\n if ($i != $email_field_index) {\n $name_field_index = $i;\n break;\n }\n }\n }\n\n // Go through all records\n while (($csv_line = fgetcsv($myfile, 10240, $del)) !== false) { // Reading a CSV record\n if (empty($csv_line[$email_field_index])) {\n continue;\n }\n if (empty($csv_line[$name_field_index])) {\n continue;\n }\n\n $found_email_address = $csv_line[$email_field_index];\n $found_name = ucwords($csv_line[$name_field_index]);\n\n if (is_email_address($found_email_address)) {\n // Add to the list what we've found\n $fields->attach(form_input_tick($found_name, do_lang_tempcode('RECOMMENDING_TO_LINE', escape_html($found_name), escape_html($found_email_address)), 'use_details_' . strval($email_counter), true));\n $hidden->attach(form_input_hidden('details_email_' . strval($email_counter), $found_email_address));\n $hidden->attach(form_input_hidden('details_name_' . strval($email_counter), $found_name));\n $email_counter++;\n }\n }\n }\n }\n }\n\n fclose($myfile);\n }\n }\n }\n\n if (!$success_read) {\n warn_exit(do_lang_tempcode('ERROR_NO_CONTACTS_SELECTED'));\n }\n\n return do_template('FORM_SCREEN', array('_GUID' => 'e3831cf87d76295c48cbce627bdd07e3', 'PREVIEW' => true, 'SKIP_WEBSTANDARDS' => true, 'TITLE' => $this->title, 'HIDDEN' => $hidden, 'FIELDS' => $fields, 'URL' => $post_url, 'SUBMIT_ICON' => 'menu__site_meta__recommend', 'SUBMIT_NAME' => $submit_name, 'TEXT' => $text));\n }",
"function osg_singout_notifier_form_submit($form, & $form_state) {\n osg_singout_notifier_mail_send($form_state['values']);\n}",
"public function contactAction() {\n $request = $this->getRequest();\n $collectionConstraint = new Collection(array(\n 'name' => new NotBlank(),\n 'email' => array(new Email(), new NotBlank()),\n 'subject' => array(),\n 'message' => new NotBlank()\n ));\n $data = array();\n $data['subject'] = 'Contact For Support';\n //create the form\n $formBuilder = $this->createFormBuilder($data, array(\n 'validation_constraint' => $collectionConstraint,\n ))\n ->add('name')\n ->add('subject', null, array('required' => false))\n ->add('email', 'email', array('attr' => array('class' => 'email')))\n ->add('message', 'textarea',array('attr' => array('rows' => '10','cols' => '50')))\n ;\n $form = $formBuilder->getForm();\n //fill the form data from the request\n $form->bindRequest($request);\n //check if the form values are correct\n if ($form->isValid()) {\n $data = $form->getData();\n $to = '[email protected]';\n $subject = $data['subject'];\n $message = $data['message'];\n $headers = 'From: '.$data['email']. \"\\r\\n\";\n\n mail($to, $subject, $message, $headers);\n return $this->render('SiteSavalizeBundle:Company:msgToUser.html.twig', array('msg' =>\"Thank u \".$data['name'].\" for contacting us\"));\n }\n \n return $this->render('SiteSavalizeBundle:Company:contact.html.twig', array('form' => $form->createView()));\n }",
"public function indexAction()\n {\n $form = new ContactForm(null);\n\n if ($this->request->isPost()) {\n $mail = $this->getDI()\n ->getMail();\n if ($form->isValid($this->request->getPost()) != false) {\n\n try{\n $mail->send(\n array($this->config->mail->fromEmail => $this->config->mail->fromName),\n 'Contact Us',\n 'contact-us', array(\n 'name' => $this->request->getPost('name'),\n 'email' => $this->request->getPost('email'),\n 'message' => $this->request->getPost('message')\n )\n );\n $this->flash->success('Your message have been sent to administrator.');\n $form->clear();\n }catch (Exception $e){\n echo $e->getMessage();\n }\n\n }\n }\n $this->view->form = $form;\n }",
"public function contactAction() {\n $request = $this->getRequest();\n\n if ( $request->isPost() ){\n $post = $request->getPost();\n\n // remove billing contact\n if ($request->getParam('removeBillingContact', false)) {\n $this->company->setBillingContactId('0');\n $this->company->save();\n $this->logger->adminInfo(sprintf(\"Billing contact for company #%d was deleted\", $this->company->getId()));\n $this->success(__b(\"Billing contact successfully removed. Contact person now is billing contact too\"));\n }\n //new contact was selected from drop-down menu\n else if ( $request->getParam('selContactId') > 0) {\n if ($request->getParam('selContactId') != $this->company->getContactId()) {\n $this->company->setContactId($request->getParam('selContactId'));\n $this->company->save();\n $this->logger->adminInfo(sprintf(\"Set new contact for company #%d\", $this->company->getId()));\n $this->success(__b(\"New contact was set\"));\n }\n else {\n $this->success(__b(\"Contact is the same. No changes.\"));\n }\n }\n //new billing contact was selected from drop-down menu\n else if ($request->getParam('selBillingContactId') > 0 ) {\n if ($request->getParam('selBillingContactId') != $this->company->getBillingContactId()) {\n $this->company->setBillingContactId($request->getParam('selBillingContactId'));\n $this->company->save();\n $this->logger->adminInfo(sprintf(\"Set new billing contact for company #%d\", $this->company->getId()));\n $this->success(__b(\"New Billing Contact was set\"));\n }\n else {\n $this->success(__b(\"Billing contact is the same. No changes.\"));\n }\n }\n //create new contact\n else {\n $contact = new Yourdelivery_Model_Contact();\n\n $form = new Yourdelivery_Form_Administration_Company_ContactEdit();\n\n $id = Yourdelivery_Model_Contact::getByEmail($values['email']);\n if (strlen($values['email'])>0 && !is_null($id) && ($id!=0)) {\n $this->error(__b(\"There is already a contact with this email. id: \") . $id);\n $this->logger->adminInfo(sprintf(\"contact could not be created for company #%d - email already in use\", $this->company->getId()));\n return $this->_redirect('/administration_company_edit/contacts/companyid/' . $this->company->getId());\n }\n \n if ( $form->isValid($post) ){\n $values = $form->getValues();\n \n $id = Yourdelivery_Model_Contact::getByEmail($values['email']);\n if (strlen($values['email'])>0 && !is_null($id) && ($id!=0)) {\n $this->logger->adminInfo(sprintf(\"contact could not be created for company #%d - email already in use\", $this->company->getId()));\n $this->error(__b(\"Unter dieser E-mail Adresse ist bereits ein Kontakt registriert. id: \") . $id);\n return $this->_redirect('/administration_company_edit/contacts/companyid/' . $this->company->getId());\n }\n\n $city = new Yourdelivery_Model_City($values['cityId']);\n $values['plz'] = $city->getPlz();\n\n //edit contact object\n $contact->setData($values);\n $contact->save();\n\n // we are assigning new billing contact\n if ( $request->getParam('saveBillingContact', false) ) {\n $this->company->setBillingContact($contact);\n $this->company->save();\n $this->logger->adminInfo(sprintf(\"New billing contact was created for company #%d\", $this->company->getId()));\n $this->success(__b(\"New billing contact was created\"));\n }\n // we are assigning new contact\n else {\n $this->company->setContact($contact);\n $this->company->save();\n $this->logger->adminInfo(sprintf(\"New contact was created for company #%d\", $this->company->getId()));\n $this->success(__b(\"New contact was created\"));\n }\n }\n else{\n $this->error($form->getMessages());\n }\n }\n }\n return $this->_redirect('/administration_company_edit/contacts/companyid/' . $this->company->getId() . $link);\n }",
"function setEmailForm(&$smartyEmailForm) {\n\t\t//Check if there is a valid email address in the database for the given combination of employee, service, position and organisation id\n\t\tif ($this->getEmailAddress($smartyEmailForm) || $this->piVars['mode'] == 'set_contact_form') {\n\t\t\tif($this->getEmailAddress($smartyEmailForm)){\n\t\t\t\t//Assign action url of email form with mode 'check_email_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_email_form'),0,0)));\n\t\t\t}else{\n\t\t\t\t//Assign action url of email form with mode 'check_contact_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_contact_form'),0,0)));\n\t\t\t}\n\n\t\t\t//Assign template labels\n\t\t\t$hoster_email=$this->get_hoster_email();\n\t\t\t$smartyEmailForm->assign('email_form_label',$this->pi_getLL('tx_civserv_pi1_email_form.email_form','E-Mail Form'));\n\t\t\t$smartyEmailForm->assign('contact_form_label',str_replace('###HOSTER###', $hoster_email, $this->pi_getLL('tx_civserv_pi1_email_form.contact_form','Contact '.$hoster_email)));\n\t\t\t$smartyEmailForm->assign('notice_label',$this->pi_getLL('tx_civserv_pi1_email_form.notice','Please enter your postal address oder email address, so that we can send you an answer'));\n\t\t\t$smartyEmailForm->assign('title_label', $this->pi_getLL('tx_civserv_pi1_email_form.title','Title'));\n\t\t\t$smartyEmailForm->assign('chose_option', $this->pi_getLL('tx_civserv_pi1_email_form.chose','Please chose'));\n\t\t\t$smartyEmailForm->assign('female_option', $this->pi_getLL('tx_civserv_pi1_email_form.female','Ms.'));\n\t\t\t$smartyEmailForm->assign('male_option', $this->pi_getLL('tx_civserv_pi1_email_form.male','Mr.'));\n\t\t\t$smartyEmailForm->assign('firstname_label',$this->pi_getLL('tx_civserv_pi1_email_form.firstname','Firstname'));\n\t\t\t$smartyEmailForm->assign('surname_label',$this->pi_getLL('tx_civserv_pi1_email_form.surname','Surname'));\n\t\t\t$smartyEmailForm->assign('street_label',$this->pi_getLL('tx_civserv_pi1_email_form.street','Street, Nr.'));\n\t\t\t$smartyEmailForm->assign('postcode_label',$this->pi_getLL('tx_civserv_pi1_email_form.postcode','Postcode'));\n\t\t\t$smartyEmailForm->assign('city_label',$this->pi_getLL('tx_civserv_pi1_email_form.city','City'));\n\t\t\t$smartyEmailForm->assign('email_label',$this->pi_getLL('tx_civserv_pi1_email_form.email','E-Mail'));\n\t\t\t$smartyEmailForm->assign('phone_label',$this->pi_getLL('tx_civserv_pi1_email_form.phone','Phone'));\n\t\t\t$smartyEmailForm->assign('fax_label',$this->pi_getLL('tx_civserv_pi1_email_form.fax','Fax'));\n\t\t\t$smartyEmailForm->assign('subject_label',$this->pi_getLL('tx_civserv_pi1_email_form.subject','Subject'));\n\t\t\t$smartyEmailForm->assign('bodytext_label',$this->pi_getLL('tx_civserv_pi1_email_form.bodytext','Your text'));\n\t\t\t$smartyEmailForm->assign('submit_label',$this->pi_getLL('tx_civserv_pi1_email_form.submit','Send e-mail'));\n\t\t\t$smartyEmailForm->assign('reset_label',$this->pi_getLL('tx_civserv_pi1_email_form.reset','Reset'));\n\t\t\t$smartyEmailForm->assign('required_label',$this->pi_getLL('tx_civserv_pi1_email_form.required','required'));\n\n\t\t\t//Set reset button type to reset functionality\n\t\t\t$smartyEmailForm->assign('button_type','reset');\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function contactAction()\n {\n $this->view->render('Contact Us');\n }",
"function wpsp_send_tour_inquiry() {\n\t\n\tparse_str ($_POST['tours'], $inquiry_info);\n\t\n\twpsp_email_notify( $inquiry_info, true, false ); //confirm to operator\n\twpsp_email_notify( $inquiry_info, false, false ); //confirm to traveller\n\t\n\tdie();\n}",
"public function addContact() {\n\t\t$form = new form('add','addMailingContactSuccess',$_POST,'POST','form-horizontal');\n\t\t$form->add('name', 'input-text',lang::read('admin.content.controller.elementname'));\n\t\t$form->addRule('name', 'required', null,lang::read('admin.content.controller.giveelementname'));\n\n\t\t$form->add('email', 'input-text',lang::read('admin.users.controller.email'),null,array());\n\t\t$form->addRule('email', 'required', null, lang::read('admin.users.controller.giveemail'));\n\t\t$form->addRule('email', 'email', null, lang::read('admin.users.controller.givecorrectemail'));\n\t\t\n\t\t$form->add('telephone', 'input-text',lang::read('admin.tools.controller.telephone'));\n\t\t$form->add('mobile', 'input-text',lang::read('admin.tools.controller.mobile'));\n\t\t$form->add('adress', 'input-text',lang::read('admin.tools.controller.adress'));\n\t\t$form->add('city', 'input-text',lang::read('admin.tools.controller.city'));\n\t\t$form->add('code', 'input-text',lang::read('admin.tools.controller.code'));\n\t\t$form->add('country', 'input-text',lang::read('admin.tools.controller.country'));\n\t\t$form->add('taxid', 'input-text',lang::read('admin.tools.controller.taxid'));\n\t\t$form->add('other', 'input-text',lang::read('admin.tools.controller.other'));\n\t\t\n\n\t\t$form->setHandler($this);\n\t\t$form->handle();\n\n\t\t$this->smarty->assign('formContact',$form);\n\t\t$this->smarty->assign(lang::read('admin.tools.controller.editcontact'),$title);\n\n\t\t$this->pageDisplay('tools');\n\t}",
"function do_contact_supplier_email_all($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\t\t$DesiredGroup\t= 0;\n\t\t$DesiredServer\t= 0;\n\t\t$DesiredAlias\t= 0;\n\t\t$DesiredClient\t= 0;\n\t\t$_ret_msg\t\t= '';\n\n\t# Check if we are sending to an alias for a supplier\n\t\t$pos1 = strpos(strtolower($adata['cc_s_id']), 'alias');\n\t\tIF ($pos1 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_s_id']);\n\t\t\t$DesiredAlias = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to all contacts for a supplier\n\t\t$pos2 = strpos(strtolower($adata['cc_s_id']), 'contacts');\n\t\tIF ($pos2 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_s_id']);\n\t\t\t$DesiredSupplier = $pieces[1];\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo\t= get_contact_info($adata['cc_mc_id']);\n\n\t# Set Query for select\n\t\t$query\t= 'SELECT ';\n\n\t\tIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_last';\n\t\t} ELSEIF ($DesiredSupplier) {\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_email, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_last, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_last';\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_email, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_last';\n\t\t}\n\n\t\t$query .= ' FROM ';\n\n\t\tIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['suppliers_contacts'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['suppliers_contacts'].'.contacts_id='.$DesiredAlias.')';\n\n\t\t} ELSEIF ($DesiredSupplier) {\n\t\t\t$query .= $_DBCFG['suppliers'].', '.$_DBCFG['suppliers_contacts'];\n\t\t\t$query .= ' WHERE (';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_id='.$DesiredSupplier.' OR (';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_id='.$_DBCFG['suppliers_contacts'].'.contacts_s_id AND ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_s_id='.$DesiredSupplier.')';\n\t\t\t$query .= ')';\n\n\t\t} ELSEIF ($adata['cc_s_id'] == '-1') {\n\t\t\t$query .= $_DBCFG['suppliers'];\n\t\t\t$query .= \" WHERE s_status='active' OR s_status='\".$db_coin->db_sanitize_data($_CCFG['S_STATUS'][1]).\"'\";\n\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['suppliers'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['suppliers'].'.s_id='.$adata['cc_s_id'].')';\n\t\t}\n\n\t# Do select\n\t\t$result\t\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t\t= $db_coin->db_query_numrows($result);\n\t\t$_emails_sent\t= 0;\n\t\t$_emails_error\t= 0;\n\t\t$_sento\t\t= '';\n\n\t# Process query results\n\t\twhile($row = $db_coin->db_fetch_array($result)) {\n\n\t\t# Only send email if an address exists\n\t\t\tIF ($row['contacts_email'] || $row['s_email']) {\n\n\t\t\t# Loop all suppliers and send email\n\t\t\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\t\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t\t\t$mail['recip']\t\t= $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['recip']\t\t= $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['s_name_first'];\n\t\t\t\t\t$mail['recip']\t\t.= ' ';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['s_name_last'];\n\t\t\t\t\t$mail['recip']\t\t.= ' <';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t\t$mail['recip']\t\t.= '>';\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t\t}\n\t\t\t\t#\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\n\t\t\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t\t\t}\n\n\t\t\t# Set MTP (Mail Template Parameters) array\n\t\t\t\t$_MTP['to_name']\t = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['s_name_first'];\n\t\t\t\t$_MTP['to_name']\t.= ' ';\n\t\t\t\t$_MTP['to_name']\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['s_name_last'];\n\t\t\t\t$_MTP['to_email']\t = $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t$_MTP['from_name']\t = $_mcinfo['c_name'];\n\t\t\t\t$_MTP['from_email']\t = $_mcinfo['c_email'];\n\t\t\t\t$_MTP['subject']\t = $adata['cc_subj'];\n\t\t\t\t$_MTP['message']\t = $adata['cc_msg'];\n\t\t\t\t$_MTP['site']\t\t = $_CCFG['_PKG_NAME_SHORT'];\n\n\t\t\t# Load message template (processed)\n\t\t\t\t$mail['message']\t= get_mail_template('email_contact_supplier_form', $_MTP);\n\n\t\t\t# Call basic email function (ret=1 on error)\n\t\t\t\t$_ret = do_mail_basic($mail);\n\n\t\t\t# Show what was sent\n\t\t\t\t$_sento .= htmlspecialchars($mail['recip']).'<br>';\n\n\t\t\t# Check return\n\t\t\t\tIF ($_ret) {$_emails_error++;} ELSE {$_emails_sent++;}\n\t\t\t}\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NL\">'.$_nl;\n\t\tIF ($_emails_error) {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_04_L1'];\n\t\t}\n\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['total'].':'.$_sp.$_emails_sent.$_sp.$_LANG['_MAIL']['sent'];\n\t\t$_cstr .= '<br><br>'.$_sento;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= ' '.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}",
"public function subscribe() {\n\t\tglobal $current_user;\n\t\tget_currentuserinfo();\n\t\t$name = $current_user->user_firstname;\n\t\tif ( empty( $name ) ) {\n\t\t\t$name = $current_user->display_name;\n\t\t}\n\t\t?>\n\t\t<div class=\"wpbuddy-cr-form\">\n\t\t\t<label style=\"width: 110px; display: inline-block;\" for=\"text1210658\"><?php echo __( 'Your first name', $this->_google_drive_cdn->get_textdomain() ); ?></label>\n\t\t\t<input style=\"width: 140px;\" id=\"text1210658\" name=\"209681\" type=\"text\" value=\"<?php echo $name; ?>\" />\n\t\t\t<label style=\"width: 110px; display: inline-block;\" for=\"text1210692\"><?php echo __( 'Your E-Mail address', $this->_google_drive_cdn->get_textdomain() ); ?></label>\n\t\t\t<input style=\"width: 140px;\" id=\"text1210692\" name=\"email\" value=\"<?php echo $current_user->user_email; ?>\" type=\"text\" />\n\t\t\t<a href=\"#\" class=\"button button-primary\"><?php echo __( 'Subscribe', $this->_google_drive_cdn->get_textdomain() ); ?></a>\n\t\t</div>\n\t\t<script type=\"text/javascript\">\n\t\t\t//<![CDATA[\n\n\t\t\tjQuery( document ).ready( function () {\n\t\t\t\t/** Subscribe form **/\n\t\t\t\tjQuery( '.wpbuddy-cr-form a.button' ).click( function ( e ) {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tvar name = jQuery( '#text1210658' ).val();\n\t\t\t\t\tvar mail = jQuery( '#text1210692' ).val();\n\n\t\t\t\t\tjQuery( [\n\t\t\t\t\t\t'<form style=\"display:none;\" action=\"https://10955.cleverreach.com/f/54067/wcs/\" method=\"post\" target=\"_blank\">',\n\t\t\t\t\t\t'<input id=\"text1210692\" name=\"email\" value=\"' + mail + '\" type=\"text\" />',\n\t\t\t\t\t\t'<input id=\"text1210658\" name=\"209681\" type=\"text\" value=\"' + name + '\" />',\n\t\t\t\t\t\t'</form>'\n\t\t\t\t\t].join( '' ) ).appendTo( 'body' )[0];\n\n\t\t\t\t} );\n\t\t\t} );\n\t\t\t/* ]]> */\n\t\t</script>\n\t<?php\n\t}",
"public function website() {\n\t\t\n\t\t$name \t\t= Input::get('name');\n\t\t$mailFrom \t= Input::get('email');\n\t\t$phone \t\t= Input::get('phone');\n\t\t$comments \t= Input::get('comments');\n\t\t$emailTo \t= '[email protected]';\n\t\t\n\t\t$subject = 'Contato realizado a partir do site Pifou por: ' . $name . '.';\n\t\t$vars = array(\n\t\t\t'name'\t\t=>\t$name,\n\t\t\t'email'\t\t=>\t$mailFrom,\n\t\t\t'phone'\t\t=>\t$phone,\n\t\t\t'comments'\t=>\t$comments,\n\t\t);\n\t\t\n EmailTemplate::SendByKey('contact_mail_user', $vars, $emailTo, null, null, $mailFrom);\n\t\t\n\t\treturn \"<fieldset><div id='success_page'><h4 class='highlight'>Obrigado, <strong>$name</strong>! Sua mensagem foi enviada. Entraremos em contato o mais rápido possível.</h4></div></fieldset>\";\n }",
"public function contact()\n {\n\n $lang = $this->data['lang'];\n $user_id = $this->user_id;\n\n $this->data['page'] = 'contact_us' ;\n\n $body = 'contact' ;\n\n $this->load_pages($body,$this->data); \n\n }",
"public function contactUs($data) {\n $name = $data[0];\n $email = $data[1];\n $phone=$data[2];\n $question = $data[3];\n $this->Email->from(array($email => $name));\n $this->Email->bcc(array($this->concierge => 'Concierge'));\n $this->Email->to(Configure::read('Email.contact'));\n $this->Email->emailFormat('both');\n $this->Email->subject('New message from Contact');\n $this->Email->template('contactUs');\n $this->Email->viewVars(array('messageData' => $data));\n return $this->Email->send();\n }",
"public function contacts()\n\t{\n\t\t$data['title'] = 'Contacts | AEY';\n\t\t$data ['view_page'] = 'contact_us';\n\n\t\t\t$this->form_validation->set_rules('name', 'Name', 'required');\n\t\t\t$this->form_validation->set_rules('email', 'Email', 'required');\n\t\t\t$this->form_validation->set_rules('mobile', 'Mobile', 'required');\n\t\t\t$this->form_validation->set_rules('message', 'Message', 'required');\n\n\n\t\t\tif($this->form_validation->run() === FALSE){\n\t\t\t\t$this->load->view('site', $data);\t\n\t\t\t}else{\n\t\t\t\t$this->contact_model->add_contact();\n\t\t\t\t\n\t\t\t\t// Set message\n\t\t\t\t$this->session->set_flashdata('added_contact', 'You have sent your message successfully');\n\t\t\t\tredirect('Home');\n\t\t\t}\t\n\t\t\n\t}",
"function client_ask_admin($submit_button, $client_name, $client_email, $client_phone, $client_msg_content){\n\t\tif( isset($_POST[$submit_button]) ){\n\t\t\t\tglobal $base;\n\n\t\t\t\t$query = \"SELECT * FROM users WHERE role='master_admin'\";\n\t $find_id = user::find_this_query($query);\n\t $master_admin_id='';\n\t\t foreach ($find_id as $id) {\n\t\t $master_admin_id = $id->user_id;\n\t\t\t\t\t}\n\n\t\t\t\t$messages_admin = new messages_admin();\n\t\t\t\t$messages_admin->admin_id\t\t= $master_admin_id;\n\t\t\t\t$messages_admin->client_name\t= $_POST[$client_name];\n\t\t\t\t$messages_admin->client_email\t= $_POST[$client_email];\n\t\t\t\t$messages_admin->client_phone\t= $_POST[$client_phone];\n\t\t\t\t$messages_admin->content \t\t= $_POST[$client_msg_content];\n\t\t\t\t$messages_admin->date \t\t\t= date('Y-m-d H:i:s');\n\n\t\t\t\t\n\t\t\t\t$messages_admin->create();\n\n\t\t\t\tmail( '[email protected]', 'Pitanje Externog Korisnika: '.$base->clear_string($_POST[$client_name]), $base->clear_string($_POST[$client_msg_content]), \"From: \".$base->clear_string($_POST[$client_email]) );\n\t\t\t\t\n\n\t\t\t\techo (\"\n\t\t\t\t\t<SCRIPT LANGUAGE='JavaScript'>\n\t\t\t\t\t\twindow.alert('Uspešno Ste poslali poruku. Odgovor će Vam biti prosleđen na E-mail.')\n\t\t\t\t \twindow.location.href='../../../contact.php';\n\t\t\t\t </SCRIPT>\n\t\t\t\t\");\n\n\t\t\t}\n}",
"public function contactAction()\n {\n /**\n * @var $request \\Zend\\Http\\Request\n */\n $request = $this->getRequest();\n $form = $this->getContactForm();\n if ($request->isPost()) {\n $data = $request->getPost();\n $form->setData($data);\n if ($form->isValid()) {\n $message = new Message();\n $message->addTo('[email protected]')\n ->addFrom(\"[email protected]\")\n ->setSubject($data['contact']['subject'])\n ->addReplyTo($data['contact']['sender'])\n ->setBody(\"From:\" . $data['contact']['sender'] . '\\r\\n' . $data['contact']['body'])\n ->setEncoding(\"UTF-8\");\n\n $transport = new SmtpTransport();\n $options = new SmtpOptions(array(\n 'name' => 'leetfeed.com',\n 'host' => 'smtpout.europe.secureserver.net',\n 'port' => '80',\n 'connection_class' => 'login',\n 'connection_config' => array(\n 'username' => '[email protected]',\n 'password' => '7934603745912766',\n )\n ));\n $transport->setOptions($options);\n $transport->send($message);\n\n $this->flashMessenger()->addMessage(self::EMAIL_SUCCESS);\n return $this->redirect()->toRoute('contact');\n } else {\n $this->flashMessenger()->addMessage(self::EMAIL_ERROR);\n }\n\n }\n return new ViewModel(array(\n \"form\" => $form,\n \"pageTitle\" => \"Leetfeed | Contact Us\",\n \"noAds\" => true\n ));\n }",
"function info2()\r\n {\r\n //and send user to orderForm2\r\n if($_SERVER['REQUEST_METHOD'] == 'POST')\r\n {\r\n $userMail = $_POST['email'];\r\n $userSeeking = $_POST['seeking'];\r\n $userBio = $_POST['bio'];\r\n $userState = $_POST['state'];\r\n\r\n if(validEmail($_POST['email'])) {\r\n $_SESSION['dating']->setEmail($userMail);\r\n }\r\n //Otherwise, set an error variable in the hive\r\n else {\r\n $this->_f3->set('errors[\"email\"]', 'Please enter a valid Email');\r\n }\r\n\r\n $_SESSION['dating']->setSeeking($userSeeking);\r\n $_SESSION['dating']->setBio($userBio);\r\n $_SESSION['dating']->setState($userState);\r\n\r\n if (empty($this->_f3->get('errors'))) {\r\n header('location: info3');\r\n }\r\n }\r\n\r\n $this->_f3->set('userMail', $userMail);\r\n\r\n\r\n\r\n $view = new Template();\r\n echo $view->render('views/info2.html');\r\n }"
] | [
"0.7593498",
"0.67536765",
"0.66930586",
"0.6650795",
"0.6647961",
"0.6606672",
"0.65984386",
"0.6597711",
"0.6597711",
"0.6585526",
"0.65812707",
"0.6561387",
"0.65464",
"0.6530144",
"0.6525731",
"0.6525731",
"0.6525731",
"0.65136695",
"0.6496035",
"0.6495496",
"0.6487016",
"0.6475872",
"0.6474888",
"0.64405763",
"0.64312553",
"0.6430374",
"0.6420152",
"0.63993526",
"0.6394985",
"0.63933563",
"0.63831437",
"0.6377055",
"0.6369537",
"0.63495153",
"0.6349137",
"0.634041",
"0.63187253",
"0.63153964",
"0.63153625",
"0.63063616",
"0.63048154",
"0.6301294",
"0.6301294",
"0.6301294",
"0.6301294",
"0.6301294",
"0.6301294",
"0.6299494",
"0.6299494",
"0.6299494",
"0.6299494",
"0.6299494",
"0.6299494",
"0.6299494",
"0.6299494",
"0.629017",
"0.62896",
"0.62896",
"0.62896",
"0.62882143",
"0.6249733",
"0.6249283",
"0.6248177",
"0.623216",
"0.6225494",
"0.62097603",
"0.6199749",
"0.6193701",
"0.6192632",
"0.61824644",
"0.61733055",
"0.61650336",
"0.615888",
"0.6158501",
"0.6152612",
"0.61486024",
"0.6106535",
"0.61052847",
"0.6088376",
"0.60864174",
"0.6084625",
"0.6079351",
"0.60728395",
"0.6053895",
"0.6050936",
"0.6050483",
"0.600113",
"0.5995904",
"0.5989572",
"0.5987639",
"0.59506977",
"0.5947533",
"0.59430337",
"0.5940074",
"0.59392464",
"0.5938584",
"0.5934344",
"0.5930529",
"0.59267086",
"0.591982"
] | 0.67099345 | 2 |
Do process contact sitetoclient email form (build, set email)) | function do_contact_supplier_email($adata, $aret_flag=0) {
# Dim Some Vars
global $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;
# Check if we are sending to an additional email instead of the clients regular address
$pos = strpos(strtolower($adata['cc_s_id']), "alias");
if ($pos !== false) {
$pieces = explode('|', $adata['cc_cl_id']);
$_ccinfot = get_contact_supplier_info_alias($pieces[1], 0);
$_ccinfo = $_ccinfot[1];
} ELSE {
# Get supplier contact information array
$_ccinfo = get_contact_supplier_info($adata['cc_s_id']);
}
# Get site contact information array
$_mcinfo = get_contact_info($adata['cc_mc_id']);
# Set eMail Parameters (pre-eval template, some used in template)
IF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {
$mail['recip'] = $_ccinfo['s_email'];
$mail['from'] = $_mcinfo['c_email'];
$mail['cc'] = $_mcinfo['c_email'];
} ELSE {
IF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {
$mail['recip'] = $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'].' <'.$_ccinfo['s_email'].'>';
} ELSE {
$mail['recip'] = $_ccinfo['s_company'].' <'.$_ccinfo['s_email'].'>';
}
$mail['from'] = $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';
$mail['cc'] = $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';
}
IF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {
$mail['subject'] = $adata['cc_subj'];
} ELSE {
$mail['subject'] = $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];
}
# Set MTP (Mail Template Parameters) array
IF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {
$_MTP['to_name'] = $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'];
} ELSE {
$_MTP['to_name'] = $_ccinfo['s_company'];
}
$_MTP['to_email'] = $_ccinfo['s_email'];
$_MTP['from_name'] = $_mcinfo['c_name'];
$_MTP['from_email'] = $_mcinfo['c_email'];
$_MTP['subject'] = $adata['cc_subj'];
$_MTP['message'] = $adata['cc_msg'];
$_MTP['site'] = $_CCFG['_PKG_NAME_SHORT'];
# Load message template (processed)
$mail['message'] = get_mail_template('email_contact_supplier_form', $_MTP);
# Call basic email function (ret=0 on error)
$_ret = do_mail_basic($mail);
# Check return
IF ($_ret) {
$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];
$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];
} ELSE {
$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];
}
# Build Title String, Content String, and Footer Menu String
$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];
$_cstr .= '<center>'.$_nl;
$_cstr .= '<table cellpadding="5" width="100%">'.$_nl;
$_cstr .= '<tr><td class="TP5MED_NC">'.$_nl;
$_cstr .= $_ret_msg.$_nl;
$_cstr .= '</td></tr>'.$_nl;
$_cstr .= '</table>'.$_nl;
$_cstr .= '</center>'.$_nl;
$_mstr_flag = 0;
$_mstr = ' '.$_nl;
# Call block it function
$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');
$_out .= '<br>'.$_nl;
IF ($aret_flag) {return $_out;} ELSE {echo $_out;}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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}",
"static private function submitEmail()\n {\n $id = $_POST['formid'];\n\n // Initiates new form handling instance\n $f = new FormHandling;\n\n // Gets the client email list (to, bcc, cc)\n $clientEmailList = $f->getClientEmail($id);\n\n // Gets the customer email (if set)\n $customerEmail = $f->getCustomerEmail($_POST);\n\n // dd($customerEmail);\n\n // Checks if in sandbox mode before sending email\n if(FALSE == submissionHandling::sandbox){\n\n // New email instance\n $e = new emailHandling();\n\n // render and send client email(s)\n if($clientEmailList['to']){\n $e->sendEmail($id,'client',$clientEmailList['to'],'Enquiry received','Hi',$clientEmailList['headers']);\n }\n\n // render and send customer email\n if($customerEmail){\n $e->sendEmail($id,'customer',$customerEmail,'Thanks for getting in touch','We will be in touch soon');\n }\n\n }\n }",
"abstract protected function _sendMail ( );",
"function do_contact_client_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_cl_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_client_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get client contact information array\n\t\t\t$_ccinfo\t= get_contact_client_info($adata['cc_cl_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['cl_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\t$mail['recip']\t\t= $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'].' <'.$_ccinfo['cl_email'].'>';\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\t$_MTP['to_name']\t= $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'];\n\t\t$_MTP['to_email']\t= $_ccinfo['cl_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_client_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= ' '.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\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 emailAction() {\n\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestore_admin_main', array(), 'sitestore_admin_main_email');\n $this->view->form = $form = new Sitestore_Form_Admin_Settings_Email();\n\n //check if comments should be displayed or not\n $show_comments = Engine_Api::_()->sitestore()->displayCommentInsights();\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n $taskstable = Engine_Api::_()->getDbtable('tasks', 'core');\n $rtasksName = $taskstable->info('name');\n $taskstable_result = $taskstable->select()\n ->from($rtasksName, array('processes', 'timeout'))\n ->where('title = ?', 'Sitestore Insight Mail')\n ->where('plugin = ?', 'Sitestore_Plugin_Task_InsightNotification')\n ->limit(1);\n $prefields = $taskstable->fetchRow($taskstable_result);\n\n //populate form\n// $form->populate(array(\n// 'sitestore_insightemail' => $prefields->processes,\n// ));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->_getAllParams())) {\n $values = $form->getValues();\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_insightemail', $values['sitestore_insightemail']);\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n if(empty($sitemailtemplates)) {\n\t\t\t\tEngine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_bg_color', $values['sitestore_bg_color']);\n }\n include APPLICATION_PATH . '/application/modules/Sitestore/controllers/license/license2.php';\n if ($values['sitestore_demo'] == 1 && $values['sitestore_insightemail'] == 1) {\n\n $view = Zend_Registry::isRegistered('Zend_View') ? Zend_Registry::get('Zend_View') : null;\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n $site_title = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.site.title', Engine_Api::_()->getApi('settings', 'core')->getSetting('core.general.site.title', 1));\n\n $insights_string = '';\n\t\t\t\t$template_header = \"\";\n\t\t\t\t$template_footer = \"\";\n if(!$sitemailtemplates) {\n\t\t\t\t\t$site_title_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.title.color', \"#ffffff\");\n\t\t\t\t\t$site_header_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.header.color', \"#79b4d4\");\n\n\t\t\t\t\t//GET SITE \"Email Body Outer Background\" COLOR\n\t\t\t\t\t$site_bg_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.bg.color', \"#f7f7f7\");\n\t\t\t\t\t$insights_string.= \"<table cellpadding='2'><tr><td><table cellpadding='2'><tr><td><span style='font-size: 14px; font-weight: bold;'>\" . $view->translate(\"Sample Store\") . \"</span></td></tr>\";\n\n\t\t\t\t\t$template_header.= \"<table width='98%' cellspacing='0' border='0'><tr><td width='100%' bgcolor='$site_bg_color' style='font-family:arial,tahoma,verdana,sans-serif;padding:40px;'><table width='620' cellspacing='0' cellpadding='0' border='0'>\";\n\t\t\t\t\t$template_header.= \"<tr><td style='background:\" . $site_header_color . \"; color:$site_title_color;font-weight:bold;font-family:arial,tahoma,verdana,sans-serif; padding: 4px 8px;vertical-align:middle;font-size:16px;text-align: left;' nowrap='nowrap'>\" . $site_title . \"</td></tr><tr><td valign='top' style='background-color:#fff; border-bottom: 1px solid #ccc; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-family:arial,tahoma,verdana,sans-serif; padding: 15px;padding-top:0;' colspan='2'><table width='100%'><tr><td colspan='2'>\";\n\n $template_footer.= \"</td></tr></table></td></tr></td></table></td></tr></table>\";\n }\n\n if ($values['sitestore_insightmail_options'] == 1) {\n $vals['days_string'] = $view->translate('week');\n } elseif ($values['sitestore_insightmail_options'] == 2) {\n $vals['days_string'] = $view->translate('month');\n }\n $path = 'http://' . $_SERVER['HTTP_HOST'] . $view->baseUrl();\n $insight_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Visit your Insights Store') . \"</a>\";\n $update_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Send an update to people who like this') . \"</a>\";\n\n //check if Communityad Plugin is enabled\n $sitestorecommunityadEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('communityad');\n $adversion = null;\n if ($sitestorecommunityadEnabled) {\n $communityadmodulemodule = Engine_Api::_()->getDbtable('modules', 'core')->getModule('communityad');\n $adversion = $communityadmodulemodule->version;\n if ($adversion >= '4.1.5') {\n $promote_Ad_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Promote with %s Ads', $site_title) . \"</a>\";\n }\n }\n\n $insights_string.= \"<table><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $vals['days_string'] . $view->translate(array('ly active user', 'ly active users', 2), 2) . \"</span></td></tr><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('person likes this', 'people like this', 2), 2) . \"</span> <span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n if (!empty($show_comments)) {\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('comment', 'comments', 2), 2) . \"</span> <span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n }\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '10' . \"</span>\\t <span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('visit', 'visits', 2), 2) . \"</span> <span style='font-size: 18px; font-family: arial;' >\" . '5' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr></table><table><tr><td>\" . \"<ul style=' padding-left: 5px;'><li>\" . $insight_link . \"</li><li>\" . $update_link;\n\n //check if Communityad Plugin is enabled\n if ($sitestorecommunityadEnabled && $adversion >= '4.1.5') {\n $insights_string.= \"</li><li>\" . $promote_Ad_link;\n }\n $insights_string.= \"</li></ul></td></tr></table>\";\n $days_string = ucfirst($vals['days_string']);\n $owner_name = Engine_Api::_()->user()->getViewer()->getTitle();\n $email = Engine_Api::_()->getApi('settings', 'core')->core_mail_from;\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($values['sitestore_admin'], 'SITESTORE_INSIGHTS_EMAIL_NOTIFICATION', array(\n 'recipient_title' => $owner_name,\n 'template_header' => $template_header,\n 'message' => $insights_string,\n 'template_footer' => $template_footer,\n 'site_title' => $site_title,\n 'days' => $days_string,\n 'email' => $email,\n 'queue' => true));\n }\n }\n }",
"abstract protected function _getEmail($info);",
"function student_crm_webform_send_email_form_submit($form, $form_state) {\n $case = crm_case_load($form_state['values']['case']);\n $email_addresses = student_crm_webform_send_email('crm_case', $case, $form_state['values']['field'], $form_state['values']['manual-email']);\n \n $case = crm_case_load($form_state['values']['case']);\n $fields = field_info_instances();\n $field = $fields['crm_case'][$case->type][$form_state['values']['field']];\n\n drupal_set_message(t('The form %form has been sent to: !email-addresses', array('%form' => $field['label'], '!email-addresses' => theme('item_list', array('items' => $email_addresses)))));\n}",
"function Form_Mail()\n {\n /**\n * Form_Mail();\n */\n\n $this->referers_array = array($_SERVER[\"HTTP_HOST\"]);\n /**\n * Leave AS IS to only allow posting from same host that script resides on.\n * List individual hosts to create list of hosts that can post to this script:\n * EXAMPLE: $referer_array = array ('example.com','www.example.com','192.168.0.1');\n */\n\n /* proccess form */\n $this->set_arrays();\n $this->check_referer();\n $this->check_recipient();\n $this->check_required_fields();\n $this->send_form();\n $this->display_thankyou();\n }",
"function do_contact_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Get contact information array\n\t\t$_cinfo = get_contact_info($adata['mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t= $_cinfo['c_email'];\n\t\t\t$mail['from']\t= $adata['mc_email'];\n\t\t\tIF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc']\t= $adata['mc_email'];}\n\t\t} ELSE {\n\t\t\t$mail['recip']\t= $_cinfo['c_name'].' <'.$_cinfo['c_email'].'>';\n\t\t\t$mail['from']\t= $adata['mc_name'].' <'.$adata['mc_email'].'>';\n\t\t\tIF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc']\t= $adata['mc_name'].' <'.$adata['mc_email'].'>';}\n\t\t}\n\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].'- Contact Message';\n\n\t# Grab ip_address of sender\n\t\tIF (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {\n\t\t\t$pos = strpos(strtolower($_SERVER['HTTP_X_FORWARDED_FOR']), '192.168.');\n\t\t\tIF ($pos === FALSE) {\n\t\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t} ELSE {\n\t\t\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t\t}\n\t\t} ELSE {\n\t\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\t$_MTP['to_name']\t= $_cinfo['c_name'];\n\t\t$_MTP['to_email']\t= $_cinfo['c_email'];\n\t\t$_MTP['from_name']\t= $adata['mc_name'];\n\t\t$_MTP['from_email']\t= $adata['mc_email'];\n\t\t$_MTP['subject']\t= $adata['mc_subj'];\n\t\t$_MTP['message']\t= $adata['mc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\t\t$_MTP['sender_ip']\t= $ip;\n\t\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Set flood control values in session\n\t\t$sdata['set_last_contact'] = 1;\n\t\t$_sret = do_session_update($sdata);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CS_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_03_L1'];\n\t\t\t$_ret_msg .= $_sp.$_LANG['_MAIL']['CS_FORM_MSG_03_L2'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CS_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= ' '.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}",
"private function emailAtLogin() {}",
"function setEmailForm(&$smartyEmailForm) {\n\t\t//Check if there is a valid email address in the database for the given combination of employee, service, position and organisation id\n\t\tif ($this->getEmailAddress($smartyEmailForm) || $this->piVars['mode'] == 'set_contact_form') {\n\t\t\tif($this->getEmailAddress($smartyEmailForm)){\n\t\t\t\t//Assign action url of email form with mode 'check_email_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_email_form'),0,0)));\n\t\t\t}else{\n\t\t\t\t//Assign action url of email form with mode 'check_contact_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_contact_form'),0,0)));\n\t\t\t}\n\n\t\t\t//Assign template labels\n\t\t\t$hoster_email=$this->get_hoster_email();\n\t\t\t$smartyEmailForm->assign('email_form_label',$this->pi_getLL('tx_civserv_pi1_email_form.email_form','E-Mail Form'));\n\t\t\t$smartyEmailForm->assign('contact_form_label',str_replace('###HOSTER###', $hoster_email, $this->pi_getLL('tx_civserv_pi1_email_form.contact_form','Contact '.$hoster_email)));\n\t\t\t$smartyEmailForm->assign('notice_label',$this->pi_getLL('tx_civserv_pi1_email_form.notice','Please enter your postal address oder email address, so that we can send you an answer'));\n\t\t\t$smartyEmailForm->assign('title_label', $this->pi_getLL('tx_civserv_pi1_email_form.title','Title'));\n\t\t\t$smartyEmailForm->assign('chose_option', $this->pi_getLL('tx_civserv_pi1_email_form.chose','Please chose'));\n\t\t\t$smartyEmailForm->assign('female_option', $this->pi_getLL('tx_civserv_pi1_email_form.female','Ms.'));\n\t\t\t$smartyEmailForm->assign('male_option', $this->pi_getLL('tx_civserv_pi1_email_form.male','Mr.'));\n\t\t\t$smartyEmailForm->assign('firstname_label',$this->pi_getLL('tx_civserv_pi1_email_form.firstname','Firstname'));\n\t\t\t$smartyEmailForm->assign('surname_label',$this->pi_getLL('tx_civserv_pi1_email_form.surname','Surname'));\n\t\t\t$smartyEmailForm->assign('street_label',$this->pi_getLL('tx_civserv_pi1_email_form.street','Street, Nr.'));\n\t\t\t$smartyEmailForm->assign('postcode_label',$this->pi_getLL('tx_civserv_pi1_email_form.postcode','Postcode'));\n\t\t\t$smartyEmailForm->assign('city_label',$this->pi_getLL('tx_civserv_pi1_email_form.city','City'));\n\t\t\t$smartyEmailForm->assign('email_label',$this->pi_getLL('tx_civserv_pi1_email_form.email','E-Mail'));\n\t\t\t$smartyEmailForm->assign('phone_label',$this->pi_getLL('tx_civserv_pi1_email_form.phone','Phone'));\n\t\t\t$smartyEmailForm->assign('fax_label',$this->pi_getLL('tx_civserv_pi1_email_form.fax','Fax'));\n\t\t\t$smartyEmailForm->assign('subject_label',$this->pi_getLL('tx_civserv_pi1_email_form.subject','Subject'));\n\t\t\t$smartyEmailForm->assign('bodytext_label',$this->pi_getLL('tx_civserv_pi1_email_form.bodytext','Your text'));\n\t\t\t$smartyEmailForm->assign('submit_label',$this->pi_getLL('tx_civserv_pi1_email_form.submit','Send e-mail'));\n\t\t\t$smartyEmailForm->assign('reset_label',$this->pi_getLL('tx_civserv_pi1_email_form.reset','Reset'));\n\t\t\t$smartyEmailForm->assign('required_label',$this->pi_getLL('tx_civserv_pi1_email_form.required','required'));\n\n\t\t\t//Set reset button type to reset functionality\n\t\t\t$smartyEmailForm->assign('button_type','reset');\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n $this->data['email_vars']['client_dashboard_url'] = $this->data['vars']['site_url_client'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'];\n\n //new client welcom email-------------------------------\n if ($email == 'new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_client');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['client_users_password'] = $this->input->post('client_users_password');\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($this->data['email_vars']['client_users_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n\n }\n\n //admin notification - new client user-------------------------------\n if ($email == 'admin_notification_new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email to multiple admins\n foreach ($this->data['vars']['mailinglist_admins'] as $email_address) {\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($email_address);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n }\n\n }\n\n }",
"private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }",
"function sendmail()\n\t{\n\t\tglobal $mainframe, $Itemid;\n\n\t\t/*\n\t\t * Initialize some variables\n\t\t */\n\t\t$db = & $mainframe->getDBO();\n\n\t\t$SiteName \t= $mainframe->getCfg('sitename');\n\t\t$MailFrom \t= $mainframe->getCfg('mailfrom');\n\t\t$FromName \t= $mainframe->getCfg('fromname');\n\t\t$validate \t= mosHash( $mainframe->getCfg('db') );\n\n\t\t$default \t= sprintf(JText::_('MAILENQUIRY'), $SiteName);\n\t\t$option \t= JRequest::getVar('option');\n\t\t$contactId \t= JRequest::getVar('con_id');\n\t\t$validate \t= JRequest::getVar($validate, \t\t0, \t\t\t'post');\n\t\t$email \t\t= JRequest::getVar('email', \t\t'', \t\t'post');\n\t\t$text \t\t= JRequest::getVar('text', \t\t\t'', \t\t'post');\n\t\t$name \t\t= JRequest::getVar('name', \t\t\t'', \t\t'post');\n\t\t$subject \t= JRequest::getVar('subject', \t\t$default, \t'post');\n\t\t$emailCopy \t= JRequest::getVar('email_copy', \t0, \t\t\t'post');\n\n\t\t// probably a spoofing attack\n\t\tif (!$validate) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts, but it does not hurt to make\n\t\t * sure the request came from a client with a user agent string.\n\t\t */\n\t\tif (!isset ($_SERVER['HTTP_USER_AGENT'])) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts either, but we ought to check\n\t\t * to make sure that the request was posted as well.\n\t\t */\n\t\tif (!$_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t// An array of e-mail headers we do not want to allow as input\n\t\t$headers = array ('Content-Type:',\n\t\t\t\t\t\t 'MIME-Version:',\n\t\t\t\t\t\t 'Content-Transfer-Encoding:',\n\t\t\t\t\t\t 'bcc:',\n\t\t\t\t\t\t 'cc:');\n\n\t\t// An array of the input fields to scan for injected headers\n\t\t$fields = array ('email',\n\t\t\t\t\t\t 'text',\n\t\t\t\t\t\t 'name',\n\t\t\t\t\t\t 'subject',\n\t\t\t\t\t\t 'email_copy');\n\n\t\t/*\n\t\t * Here is the meat and potatoes of the header injection test. We\n\t\t * iterate over the array of form input and check for header strings.\n\t\t * If we fine one, send an unauthorized header and die.\n\t\t */\n\t\tforeach ($fields as $field) {\n\t\t\tforeach ($headers as $header) {\n\t\t\t\tif (strpos($_POST[$field], $header) !== false) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Now that we have passed the header injection tests lets free up the\n\t\t * used memory and continue.\n\t\t */\n\t\tunset ($fields, $field, $headers, $header);\n\n\t\t/*\n\t\t * Load the contact details\n\t\t */\n\t\t$contact = new JTableContact($db);\n\t\t$contact->load($contactId);\n\n\t\t/*\n\t\t * If there is no valid email address or message body then we throw an\n\t\t * error and return false.\n\t\t */\n\t\tjimport('joomla.utilities.mail');\n\t\tif (!$email || !$text || (JMailHelper::isEmailAddress($email) == false)) {\n\t\t\tJContactView::emailError();\n\t\t} else {\n\t\t\t$menu = JTable::getInstance( 'menu', $db );\n\t\t\t$menu->load( $Itemid );\n\t\t\t$mparams = new JParameter( $menu->params );\n\t\t\t$bannedEmail \t= $mparams->get( 'bannedEmail', \t'' );\n\t\t\t$bannedSubject \t= $mparams->get( 'bannedSubject', \t'' );\n\t\t\t$bannedText \t= $mparams->get( 'bannedText', \t\t'' );\n\t\t\t$sessionCheck \t= $mparams->get( 'sessionCheck', \t1 );\n\n\t\t\t// check for session cookie\n\t\t\tif ( $sessionCheck ) {\n\t\t\t\tif ( !isset($_COOKIE[JSession::name()]) ) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Prevent form submission if one of the banned text is discovered in the email field\n\t\t\tif ( $bannedEmail ) {\n\t\t\t\t$bannedEmail = explode( ';', $bannedEmail );\n\t\t\t\tforeach ($bannedEmail as $value) {\n\t\t\t\t\tif ( JString::stristr($email, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the subject field\n\t\t\tif ( $bannedSubject ) {\n\t\t\t\t$bannedSubject = explode( ';', $bannedSubject );\n\t\t\t\tforeach ($bannedSubject as $value) {\n\t\t\t\t\tif ( JString::stristr($subject, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the text field\n\t\t\tif ( $bannedText ) {\n\t\t\t\t$bannedText = explode( ';', $bannedText );\n\t\t\t\tforeach ($bannedText as $value) {\n\t\t\t\t\tif ( JString::stristr($text, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// test to ensure that only one email address is entered\n\t\t\t$check = explode( '@', $email );\n\t\t\tif ( strpos( $email, ';' ) || strpos( $email, ',' ) || strpos( $email, ' ' ) || count( $check ) > 2 ) {\n\t\t\t\tmosErrorAlert( JText::_( 'You cannot enter more than one email address', true ) );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Prepare email body\n\t\t\t */\n\t\t\t$prefix = sprintf(JText::_('ENQUIRY_TEXT'), $mainframe->getBaseURL());\n\t\t\t$text \t= $prefix.\"\\n\".$name.' <'.$email.'>'.\"\\r\\n\\r\\n\".stripslashes($text);\n\n\t\t\t// Send mail\n\t\t\tjosMail($email, $name, $contact->email_to, $FromName.': '.$subject, $text);\n\n\t\t\t/*\n\t\t\t * If we are supposed to copy the admin, do so.\n\t\t\t */\n\t\t\t// parameter check\n\t\t\t$menuParams \t\t= new JParameter( $contact->params );\n\t\t\t$emailcopyCheck = $menuParams->get( 'email_copy', 0 );\n\n\t\t\t// check whether email copy function activated\n\t\t\tif ( $emailCopy && $emailcopyCheck ) {\n\t\t\t\t$copyText \t\t= sprintf(JText::_('Copy of:'), $contact->name, $SiteName);\n\t\t\t\t$copyText \t\t.= \"\\r\\n\\r\\n\".$text;\n\t\t\t\t$copySubject \t= JText::_('Copy of:').\" \".$subject;\n\t\t\t\tjosMail($MailFrom, $FromName, $email, $copySubject, $copyText);\n\t\t\t}\n\n\t\t\t$link = sefRelToAbs( 'index.php?option=com_contact&task=view&contact_id='. $contactId .'&Itemid='. $Itemid );\n\t\t\t$text = JText::_( 'Thank you for your e-mail', true );\n\n\t\t\tjosRedirect( $link, $text );\n\t\t}\n\t}",
"public function doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }",
"protected function sendTestMail() {}",
"function sendEmail($forename,$email){\r\n /*sendMail($email,\"Registration to Unicycles\",\" Hey \".$forename.\"! /r/n\r\nThank you for registering for Unicycles! /r/n\r\n\r\nYou can start to hire bikes straight away now! To do so please head over to our website unicycles.ddns.net:156 log in and click on Hire a Bike. It can't be simpler. /r/n\r\n\r\nIf you need to know anything you can look on our website. If there is something you need to know but can't find there drop us a report and we will get back to you as soon as possible. /r/n\r\n\r\nThank you again for your registration. If you have any questions, please let me know. /r/n\r\n\r\nRegards, /r/n\r\nUniCycle Team\r\n\");*/\r\n}",
"private function sendNotifyEmail(){\n $uS = Session::getInstance();\n $to = filter_var(trim($uS->referralFormEmail), FILTER_SANITIZE_EMAIL);\n\n try{\n if ($to !== FALSE && $to != '') {\n// $userData = $this->getUserData();\n $content = \"Hello,<br>\" . PHP_EOL . \"A new \" . $this->formTemplate->getTitle() . \" was submitted to \" . $uS->siteName . \". <br><br><a href='\" . $uS->resourceURL . \"house/register.php' target='_blank'>Click here to log into HHK and take action.</a><br>\" . PHP_EOL;\n\n $mail = prepareEmail();\n\n $mail->From = ($uS->NoReplyAddr ? $uS->NoReplyAddr : \"[email protected]\");\n $mail->FromName = htmlspecialchars_decode($uS->siteName, ENT_QUOTES);\n $mail->addAddress($to);\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New \" . Labels::getString(\"Register\", \"onlineReferralTitle\", \"Referral\") . \" submitted\";\n $mail->msgHTML($content);\n\n if ($mail->send() === FALSE) {\n return false;\n }else{\n return true;\n }\n }\n }catch(\\Exception $e){\n return false;\n }\n return false;\n }",
"function do_contact_supplier_email_all($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\t\t$DesiredGroup\t= 0;\n\t\t$DesiredServer\t= 0;\n\t\t$DesiredAlias\t= 0;\n\t\t$DesiredClient\t= 0;\n\t\t$_ret_msg\t\t= '';\n\n\t# Check if we are sending to an alias for a supplier\n\t\t$pos1 = strpos(strtolower($adata['cc_s_id']), 'alias');\n\t\tIF ($pos1 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_s_id']);\n\t\t\t$DesiredAlias = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to all contacts for a supplier\n\t\t$pos2 = strpos(strtolower($adata['cc_s_id']), 'contacts');\n\t\tIF ($pos2 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_s_id']);\n\t\t\t$DesiredSupplier = $pieces[1];\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo\t= get_contact_info($adata['cc_mc_id']);\n\n\t# Set Query for select\n\t\t$query\t= 'SELECT ';\n\n\t\tIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_last';\n\t\t} ELSEIF ($DesiredSupplier) {\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_email, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_last, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_last';\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_email, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_first, ';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_name_last';\n\t\t}\n\n\t\t$query .= ' FROM ';\n\n\t\tIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['suppliers_contacts'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['suppliers_contacts'].'.contacts_id='.$DesiredAlias.')';\n\n\t\t} ELSEIF ($DesiredSupplier) {\n\t\t\t$query .= $_DBCFG['suppliers'].', '.$_DBCFG['suppliers_contacts'];\n\t\t\t$query .= ' WHERE (';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_id='.$DesiredSupplier.' OR (';\n\t\t\t$query .= $_DBCFG['suppliers'].'.s_id='.$_DBCFG['suppliers_contacts'].'.contacts_s_id AND ';\n\t\t\t$query .= $_DBCFG['suppliers_contacts'].'.contacts_s_id='.$DesiredSupplier.')';\n\t\t\t$query .= ')';\n\n\t\t} ELSEIF ($adata['cc_s_id'] == '-1') {\n\t\t\t$query .= $_DBCFG['suppliers'];\n\t\t\t$query .= \" WHERE s_status='active' OR s_status='\".$db_coin->db_sanitize_data($_CCFG['S_STATUS'][1]).\"'\";\n\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['suppliers'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['suppliers'].'.s_id='.$adata['cc_s_id'].')';\n\t\t}\n\n\t# Do select\n\t\t$result\t\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t\t= $db_coin->db_query_numrows($result);\n\t\t$_emails_sent\t= 0;\n\t\t$_emails_error\t= 0;\n\t\t$_sento\t\t= '';\n\n\t# Process query results\n\t\twhile($row = $db_coin->db_fetch_array($result)) {\n\n\t\t# Only send email if an address exists\n\t\t\tIF ($row['contacts_email'] || $row['s_email']) {\n\n\t\t\t# Loop all suppliers and send email\n\t\t\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\t\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t\t\t$mail['recip']\t\t= $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['recip']\t\t= $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['s_name_first'];\n\t\t\t\t\t$mail['recip']\t\t.= ' ';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['s_name_last'];\n\t\t\t\t\t$mail['recip']\t\t.= ' <';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t\t$mail['recip']\t\t.= '>';\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t\t}\n\t\t\t\t#\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\n\t\t\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t\t\t}\n\n\t\t\t# Set MTP (Mail Template Parameters) array\n\t\t\t\t$_MTP['to_name']\t = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['s_name_first'];\n\t\t\t\t$_MTP['to_name']\t.= ' ';\n\t\t\t\t$_MTP['to_name']\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['s_name_last'];\n\t\t\t\t$_MTP['to_email']\t = $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];\n\t\t\t\t$_MTP['from_name']\t = $_mcinfo['c_name'];\n\t\t\t\t$_MTP['from_email']\t = $_mcinfo['c_email'];\n\t\t\t\t$_MTP['subject']\t = $adata['cc_subj'];\n\t\t\t\t$_MTP['message']\t = $adata['cc_msg'];\n\t\t\t\t$_MTP['site']\t\t = $_CCFG['_PKG_NAME_SHORT'];\n\n\t\t\t# Load message template (processed)\n\t\t\t\t$mail['message']\t= get_mail_template('email_contact_supplier_form', $_MTP);\n\n\t\t\t# Call basic email function (ret=1 on error)\n\t\t\t\t$_ret = do_mail_basic($mail);\n\n\t\t\t# Show what was sent\n\t\t\t\t$_sento .= htmlspecialchars($mail['recip']).'<br>';\n\n\t\t\t# Check return\n\t\t\t\tIF ($_ret) {$_emails_error++;} ELSE {$_emails_sent++;}\n\t\t\t}\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NL\">'.$_nl;\n\t\tIF ($_emails_error) {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_04_L1'];\n\t\t}\n\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['total'].':'.$_sp.$_emails_sent.$_sp.$_LANG['_MAIL']['sent'];\n\t\t$_cstr .= '<br><br>'.$_sento;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= ' '.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}",
"function offerContactEmail() {\n\t\t\t$toemail = $this->input->post('toemail');\n\t\t\t$msg = $this->input->post('message');\n\t\t\t$phone = $this->input->post('phone');\n\t\t\t$name = $this->input->post('name');\n\n\t\t\t$message = $this->mailHeader;\n\t\t\t$message .= \"Name: \".$name.\"<br>\";\n\t\t\t$message .= \"Phone: \".$phone.\"<br>\";\n\t\t\t$message .= \"Message: \".$msg.\"<br>\";\n\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($toemail);\n\t\t\t\t$this->email->subject($subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\tif (!$this->email->send()) {\n\t\t\t\t\t\t//echo $this->email->print_debugger();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t//echo 'Email sent';\n\t\t\t\t}\n\t\t}",
"public function emailMeAction() {\r\n\r\n //DEFAULT LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //GET VIEWER DETAIL\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewr_id = $viewer->getIdentity();\r\n\r\n //GET PAGE ID AND PAGE OBJECT\r\n $this->view->page_id = $page_id = $this->_getParam('page_id', $this->_getParam('id', null));\r\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\r\n if (empty($sitepage))\r\n return $this->_forwardCustom('notfound', 'error', 'core');\r\n \r\n //AUTHORIZATION CHECK FOR TELL A FRIEND\r\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'tfriend');\r\n if (empty($isManageAdmin)) {\r\n return $this->_forwardCustom('requireauth', 'error', 'core');\r\n }\r\n\r\n //FORM GENERATION\r\n $this->view->form = $form = new Sitepage_Form_EmailMe();\r\n\r\n if (!empty($viewr_id)) {\r\n $value['sender_email'] = $viewer->email;\r\n $value['sender_name'] = $viewer->displayname;\r\n $form->populate($value);\r\n }\r\n\r\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\r\n\r\n $values = $form->getValues();\r\n\r\n //EDPLODES EMAIL IDS\r\n $reciver_ids = $sitepage->email; //explode(',', $values['sitepage_reciver_emails']);\r\n $values['sitepage_sender_email'] = $sitepage->email;\r\n if (!empty($values['sitepage_send_me'])) {\r\n $reciver_ids = $values['sitepage_sender_email'];\r\n }\r\n $sender_email = $values['sitepage_sender_email'];\r\n\r\n //CHECK VALID EMAIL ID FORMITE\r\n $validator = new Zend_Validate_EmailAddress();\r\n\r\n if (!$validator->isValid($sender_email)) {\r\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Invalid sender email address value'));\r\n return;\r\n }\r\n// foreach ($reciver_ids as $reciver_id) {\r\n// $reciver_id = trim($reciver_id, ' ');\r\n// if (!$validator->isValid($reciver_id)) {\r\n// $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter correct email address of the receiver(s).'));\r\n// return;\r\n// }\r\n// }\r\n $sender = $values['sitepage_sender_name'];\r\n $message = $values['sitepage_message'];\r\n $heading = ucfirst($sitepage->getTitle());\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($reciver_ids, 'SITEPAGE_EMAILME_EMAIL', array(\r\n 'host' => $_SERVER['HTTP_HOST'],\r\n 'sender_name' => $sender,\r\n 'page_title' => $heading,\r\n 'message' => '<div>' . $message . '</div>',\r\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] . Engine_Api::_()->sitepage()->getHref($sitepage->page_id, $sitepage->owner_id, $sitepage->getSlug()),\r\n 'sender_email' => $sender_email,\r\n 'queue' => true\r\n ));\r\n\r\n $this->_forwardCustom('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => false,\r\n 'format' => 'smoothbox',\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message to page owner has been sent successfully.'))\r\n ));\r\n }\r\n }",
"protected function _send()\n\t{\n\t\t$params = array(\n\t\t\t'Action' => 'SendEmail',\n\t\t\t'Version' => '2010-12-01',\n\t\t\t'Source' => static::format_addresses(array($this->config['from'])),\n\t\t\t'Message.Subject.Data' => $this->subject,\n\t\t\t'Message.Body.Text.Data' => $this->body,\n\t\t\t'Message.Body.Text.Charset' => $this->config['charset'],\n\t\t);\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->to as $value)\n\t\t{\n\t\t\t$params['Destination.ToAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->cc as $value)\n\t\t{\n\t\t\t$params['Destination.CcAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->bcc as $value)\n\t\t{\n\t\t\t$params['Destination.BccAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->reply_to as $value)\n\t\t{\n\t\t\t$params['ReplyToAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\t\n\t\t$date = gmdate(self::ISO8601_BASIC);\n\t\t$dateRss = gmdate(DATE_RSS);\n\t\t\n\t\t$curl = \\Request::forge('https://email.' . $this->region . '.amazonaws.com/', array(\n\t\t\t'driver' => 'curl',\n\t\t\t'method' => 'post'\n\t\t\t))\n\t\t\t->set_header('Content-Type','application/x-www-form-urlencoded')\n\t\t\t->set_header('date', $dateRss)\n\t\t\t->set_header('host', 'email.' . $this->region . '.amazonaws.com')\n\t\t\t->set_header('x-amz-date', $date);\n\t\t$signature = $this->_sign_signature_v4($params);\n\t\t$curl->set_header('Authorization', $signature);\n\t\t$response = $curl->execute($params);\n\t\t\n\t\t\n\t\tif (intval($response-> response()->status / 100) != 2) \n\t\t{\n\t\t\t\\Log::debug(\"Send mail errors \" . json_encode($response->response()));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\\Log::debug(\"Send mail ok \" . json_encode($response->response()));\n\t\treturn true;\n\t}",
"private function send(){\n\t\t\n\t\tif(empty($this->email)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 87;\n\t\t\t$errorLog->errorMsg = 'Missing email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->subject)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 88;\n\t\t\t$errorLog->errorMsg = 'Missing subject';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->plainText)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 89;\n\t\t\t$errorLog->errorMsg = 'Missing plain text of email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->htmlBody)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber =90;\n\t\t\t$errorLog->errorMsg = 'Missing HTML of body';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\t// Validate Email\n\t\t$this->validateEmail($this->email);\n\t\t\n\t\tif(!$this->error){\n\t\t\t// Required Files\n\t\t\tinclude 'Mail.php';\n\t\t\tinclude 'Mail/mime.php';\n\n\t\t\t/* ---\n\t\t\tPEAR Mail Factory\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.factory.php\n\t\t\t--- */\n\t\t\t$host = \"smtp-relay.gmail.com\";\n\t\t\t$port = 587;\n\t\t\t$smtp = Mail::factory('smtp', array('host'=>$host, 'port'=>$port));\n\n\t\t\t/* ---\n\t\t\tPEAR MIME\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail-mime.mail-mime.php\n\t\t\t--- */\n\t\t\t$crlf = \"\\n\";\n\t\t\t$mime = new Mail_mime(array('eol' => $crlf));\n\n\t\t\t// Headers\n\t\t\t$from = 'Catalog.beer <[email protected]>';\n\t\t\t$replyto = '[email protected]';\n\t\t\t$headers = array('From'=>$from, 'To'=>$this->email, 'Subject'=>$this->subject, 'Reply-To'=>$replyto);\n\n\t\t\t// Plain Text\n\t\t\t$mime->setTXTBody($this->plainText);\n\n\t\t\t// HTML\n\t\t\t$mime->setHTMLBody($this->htmlBody);\n\n\t\t\t$body = $mime->get();\n\t\t\t$headers = $mime->headers($headers);\n\n\t\t\t$smtp = Mail::factory('smtp',\n\t\t\t\tarray ('host' => 'smtp-relay.gmail.com',\n\t\t\t\t\t\t\t 'port' => 587,\n\t\t\t\t\t\t\t 'auth' => true,\n\t\t\t\t\t\t\t 'username' => '',\n\t\t\t\t\t\t\t 'password' => '',\n\t\t\t\t\t\t\t 'debug' => false));\n\n\t\t\t/* ---\n\t\t\tPEAR Send Mail\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.send.php\n\t\t\t--- */\n\t\t\t$mail = $smtp->send($this->email, $headers, $body);\n\n\t\t\t// Process Errors\n\t\t\tif(PEAR::isError($mail)){\n\t\t\t\t// Error Sending Email\n\t\t\t\t$this->error = true;\n\t\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\n\t\t\t\t// Log Error\n\t\t\t\t$errorLog = new LogError();\n\t\t\t\t$errorLog->errorNumber = 91;\n\t\t\t\t$errorLog->errorMsg = 'Error sending email';\n\t\t\t\t$errorLog->badData = $mail->getMessage();\n\t\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t\t$errorLog->write();\n\t\t\t}\n\t\t}\n\t}",
"function do_contact_client_email_all($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\t\t$DesiredGroup\t= 0;\n\t\t$DesiredServer\t= 0;\n\t\t$DesiredAlias\t= 0;\n\t\t$DesiredClient\t= 0;\n\t\t$_ret_msg\t\t= '';\n\n\t# Check if we are sending to a group instead of all clients\n\t\t$pos = strpos(strtolower($adata['cc_cl_id']), 'group');\n\t\tIF ($pos !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_cl_id']);\n\t\t\t$DesiredGroup = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to a server instead of all clients\n\t\t$pos2 = strpos(strtolower($adata['cc_cl_id']), 'server');\n\t\tIF ($pos2 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_cl_id']);\n\t\t\t$DesiredServer = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to an alias for a client\n\t\t$pos3 = strpos(strtolower($adata['cc_cl_id']), 'alias');\n\t\tIF ($pos3 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_cl_id']);\n\t\t\t$DesiredAlias = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to all contacts for a client\n\t\t$pos3 = strpos(strtolower($adata['cc_cl_id']), 'contacts');\n\t\tIF ($pos3 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_cl_id']);\n\t\t\t$DesiredClient = $pieces[1];\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo\t= get_contact_info($adata['cc_mc_id']);\n\n\t# Set Query for select\n\t\t$query\t= 'SELECT ';\n\n\t\tIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_name_last';\n\t\t} ELSEIF ($DesiredClient) {\n\t\t\t$query .= $_DBCFG['clients'].'.cl_email, ';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_name_first, ';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_name_last, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_name_last';\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['clients'].'.cl_email, ';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_name_first, ';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_name_last';\n\t\t}\n\t\tIF ($DesiredGroup) {$query .= ', '.$_DBCFG['clients'].'.cl_groups';}\n\t\t$query .= ' FROM ';\n\n\t\tIF ($DesiredServer) {\n\t\t\t$query .= $_DBCFG['clients'].', '.$_DBCFG['domains'];\n\t\t\t$query .= ' WHERE (('.$_DBCFG['domains'].'.dom_si_id='.$DesiredServer.' AND ';\n\t\t\t$query .= $_DBCFG['domains'].'.dom_cl_id='.$_DBCFG['clients'].'.cl_id)';\n\n\t\t} ELSEIF ($DesiredGroup) {\n\t\t\t$query .= $_DBCFG['clients'];\n\t\t\t$query .= ' WHERE (('.$_DBCFG['clients'].'.cl_groups <> 0)';\n\n\t\t} ELSEIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['clients_contacts'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['clients_contacts'].'.contacts_id='.$DesiredAlias.')';\n\n\t\t} ELSEIF ($DesiredClient) {\n\t\t\t$query .= $_DBCFG['clients'].', '.$_DBCFG['clients_contacts'];\n\t\t\t$query .= ' WHERE (';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_id='.$DesiredClient.' OR (';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_id='.$_DBCFG['clients_contacts'].'.contacts_cl_id AND ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_cl_id='.$DesiredClient.')';\n\t\t\t$query .= ')';\n\n\t\t} ELSEIF ($adata['cc_cl_id'] == '-1') {\n\t\t\t$query .= $_DBCFG['clients'];\n\t\t\t$query .= \" WHERE cl_status='active' OR cl_status='\".$db_coin->db_sanitize_data($_CCFG['CL_STATUS'][1]).\"'\";\n\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['clients'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['clients'].'.cl_id='.$adata['cc_cl_id'].')';\n\t\t}\n\n\t\tIF ($DesiredServer || $DesiredGroup) {\n\t\t\t$query\t.= ' AND ('.$_DBCFG['clients'].\".cl_status='active'\";\n\t\t\t$query\t.= ' OR '.$_DBCFG['clients'].\".cl_status='\".$db_coin->db_sanitize_data($_CCFG['CL_STATUS'][1]).\"'))\";\n\t\t}\n\n\t# Do select\n\t\t$result\t\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t\t= $db_coin->db_query_numrows($result);\n\t\t$_emails_sent\t= 0;\n\t\t$_emails_error\t= 0;\n\t\t$_sento\t\t= '';\n\n\t# Process query results\n\t\twhile($row = $db_coin->db_fetch_array($result)) {\n\n\t\t# ONLY clients in specified group, OR All clients if group not specified\n\t\t\tIF (!$DesiredGroup || ($DesiredGroup && Check_User_Group($DesiredGroup, $row['cl_groups']))) {\n\t\t\t# Loop all clients and send email\n\t\t\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\t\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t\t\t$mail['recip']\t\t= $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email'];\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['recip']\t\t= $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['cl_name_first'];\n\t\t\t\t\t$mail['recip']\t\t.= ' ';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['cl_name_last'];\n\t\t\t\t\t$mail['recip']\t\t.= ' <';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email'];\n\t\t\t\t\t$mail['recip']\t\t.= '>';\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t\t}\n\t\t\t\t#\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\n\t\t\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t\t\t}\n\n\t\t\t# Set MTP (Mail Template Parameters) array\n\t\t\t\t$_MTP['to_name']\t = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['cl_name_first'];\n\t\t\t\t$_MTP['to_name']\t.= ' ';\n\t\t\t\t$_MTP['to_name']\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['cl_name_last'];\n\t\t\t\t$_MTP['to_email']\t = $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email'];\n\t\t\t\t$_MTP['from_name']\t = $_mcinfo['c_name'];\n\t\t\t\t$_MTP['from_email']\t = $_mcinfo['c_email'];\n\t\t\t\t$_MTP['subject']\t = $adata['cc_subj'];\n\t\t\t\t$_MTP['message']\t = $adata['cc_msg'];\n\t\t\t\t$_MTP['site']\t\t = $_CCFG['_PKG_NAME_SHORT'];\n\n\t\t\t# Load message template (processed)\n\t\t\t\t$mail['message']\t= get_mail_template('email_contact_client_form', $_MTP);\n\n\t\t\t# Call basic email function (ret=1 on error)\n\t\t\t\t$_ret = do_mail_basic($mail);\n\n\t\t\t# Show what was sent\n\t\t\t\t$_sento .= htmlspecialchars($mail['recip']).'<br>';\n\n\t\t\t# Check return\n\t\t\t\tIF ($_ret) {$_emails_error++;} ELSE {$_emails_sent++;}\n\t\t\t}\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NL\">'.$_nl;\n\t\tIF ($_emails_error) {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_04_L1'];\n\t\t}\n\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['total'].':'.$_sp.$_emails_sent.$_sp.$_LANG['_MAIL']['sent'];\n\t\t$_cstr .= '<br><br>'.$_sento;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= ' '.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}",
"function elegantSendEmail() {\n $to = $_POST['datastring']['newEmailForm'][0][0];\n $title = $_POST['datastring']['newEmailForm'][0][1];\n $messagetext = nl2br(rawurldecode($_POST['datastring']['newEmailForm'][0][2])); \n $properties = $_POST['datastring']['properties'];\n\n //Send the email and get a report back\n $sent = elegeantSend($to,$messagetext,$properties);\n \n //Save the email as a post and get a report back\n $saved = elegantSave($title,$to,$messagetext,$properties);\n\n //echo 'Email Status:'.$sent.'<br>Save Status:'.$saved;\n \n //Terminate and provide a response. \n wp_die(); \n}",
"public function GrabEmailFromRegistrationForm()\n\t{\n\t\tif ($_POST['gr_registration_checkbox'] == 1 && $this->grApiInstance)\n\t\t{\n\t\t\tif ($this->woocomerce_active === true && isset($_POST['email']))\n\t\t\t{\n\t\t\t\t$email = $_POST['email'];\n\t\t\t\t$name = isset($_POST['billing_first_name']) ? $_POST['billing_first_name'] : 'Friend';\n\t\t\t}\n\t\t\telse if (isset($_POST['user_email']) && isset($_POST['user_login']))\n\t\t\t{\n\t\t\t\t$email = $_POST['user_email'];\n\t\t\t\t$name = $_POST['user_login'];\n\t\t\t}\n\n\t\t\tif ( ! empty($email) && ! empty($name))\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'registration_campaign');\n\t\t\t\t$this->addContact($campaign, $name, $email);\n\t\t\t}\n\t\t}\n\t}",
"function ciniki_musicfestivals_registrationsEmailSend(&$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 'festival_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Festival'),\n 'teacher_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Teacher'),\n 'subject'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Subject'),\n 'message'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Message'),\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', 'musicfestivals', 'private', 'checkAccess');\n $rc = ciniki_musicfestivals_checkAccess($ciniki, $args['tnid'], 'ciniki.musicfestivals.registrationsEmailSend');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n $strsql = \"SELECT registrations.id, \"\n . \"registrations.festival_id, \"\n . \"sections.id AS section_id, \"\n . \"registrations.teacher_customer_id, \"\n . \"teachers.display_name AS teacher_name, \"\n . \"registrations.billing_customer_id, \"\n . \"registrations.rtype, \"\n . \"registrations.rtype AS rtype_text, \"\n . \"registrations.status, \"\n . \"registrations.status AS status_text, \"\n . \"registrations.display_name, \"\n . \"registrations.class_id, \"\n . \"classes.code AS class_code, \"\n . \"classes.name AS class_name, \"\n . \"registrations.title1, \"\n . \"registrations.perf_time1, \"\n . \"registrations.title2, \"\n . \"registrations.perf_time2, \"\n . \"registrations.title3, \"\n . \"registrations.perf_time3, \"\n . \"IF(registrations.participation = 1, 'Virtual', 'In Person') AS participation, \"\n . \"FORMAT(registrations.fee, 2) AS fee, \"\n . \"registrations.payment_type \"\n . \"FROM ciniki_musicfestival_registrations AS registrations \"\n . \"LEFT JOIN ciniki_customers AS teachers ON (\"\n . \"registrations.teacher_customer_id = teachers.id \"\n . \"AND teachers.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_musicfestival_classes AS classes ON (\"\n . \"registrations.class_id = classes.id \"\n . \"AND classes.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_musicfestival_categories AS categories ON (\"\n . \"classes.category_id = categories.id \"\n . \"AND categories.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_musicfestival_sections AS sections ON (\"\n . \"categories.section_id = sections.id \"\n . \"AND sections.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"WHERE registrations.festival_id = '\" . ciniki_core_dbQuote($ciniki, $args['festival_id']) . \"' \"\n . \"AND registrations.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND registrations.teacher_customer_id = '\" . ciniki_core_dbQuote($ciniki, $args['teacher_id']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.musicfestivals', array(\n array('container'=>'registrations', 'fname'=>'id', \n 'fields'=>array('id', 'festival_id', 'teacher_name', 'display_name', \n 'class_id', 'class_code', 'class_name', \n 'title1', 'perf_time1', 'title2', 'perf_time2', 'title3', 'perf_time3', \n 'fee', 'payment_type', 'participation'),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $html = '';\n $text = '';\n if( isset($rc['registrations']) ) {\n $festival['registrations'] = $rc['registrations'];\n $total = 0;\n $html = \"<table cellpadding=5 cellspacing=0>\";\n $html .= \"<tr><th>Class</th><th>Competitor</th><th>Title</th><th>Time</th><th>Virtual</th></tr>\";\n foreach($festival['registrations'] as $iid => $registration) {\n $html .= '<tr><td>' . $registration['class_code'] . '</td><td>' . $registration['display_name'] . '</td>'\n . '<td>' . $registration['title1'] \n . ($registration['title2'] != '' ? \"<br/>{$registration['title2']}\" : '')\n . ($registration['title3'] != '' ? \"<br/>{$registration['title3']}\" : '')\n . '</td>'\n . '<td>' . $registration['perf_time1'] \n . ($registration['perf_time2'] != '' ? \"<br/>{$registration['perf_time2']}\" : '')\n . ($registration['perf_time3'] != '' ? \"<br/>{$registration['perf_time3']}\" : '')\n . '</td>'\n . '<td>' . $registration['participation'] . \"</td></tr>\\n\";\n $text .= $registration['class_code'] \n . ' - ' . $registration['display_name'] \n . ($registration['title1'] != '' ? ' - ' . $registration['title1'] : '')\n . ($registration['perf_time1'] != '' ? ' - ' . $registration['perf_time1'] : '')\n . \"\\n\";\n if( $registration['title2'] != '' ) {\n $text .= preg_replace(\"/./\", '', $registration['class_code'])\n . ' - ' . preg_replace(\"/./\", '', $registration['display_name'])\n . ($registration['title2'] != '' ? ' - ' . $registration['title2'] : '')\n . ($registration['perf_time2'] != '' ? ' - ' . $registration['perf_time2'] : '')\n . \"\\n\";\n }\n if( $registration['title3'] != '' ) {\n $text .= preg_replace(\"/./\", '', $registration['class_code'])\n . ' - ' . preg_replace(\"/./\", '', $registration['display_name'])\n . ($registration['title3'] != '' ? ' - ' . $registration['title3'] : '')\n . ($registration['perf_time3'] != '' ? ' - ' . $registration['perf_time3'] : '')\n . \"\\n\";\n }\n }\n $html .= \"</table>\";\n } else {\n $festival['registrations'] = array();\n }\n\n $html_message = $args['message'] . \"<br/><br/>\" . $html;\n $text_message = $args['message'] . \"\\n\\n\" . $text;\n\n //\n // Lookup the teacher info\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'hooks', 'customerDetails');\n $rc = ciniki_customers_hooks_customerDetails($ciniki, $args['tnid'], \n array('customer_id'=>$args['teacher_id'], 'phones'=>'no', 'emails'=>'yes', 'addresses'=>'no', 'subscriptions'=>'no'));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['customer']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.102', 'msg'=>'No teacher found, we are unable to send the email.'));\n }\n $customer = $rc['customer'];\n\n //\n // if customer is set\n //\n if( !isset($customer['emails'][0]['email']['address']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.103', 'msg'=>\"The teacher doesn't have an email address, we are unable to send the email.\"));\n }\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'mail', 'hooks', 'addMessage');\n $rc = ciniki_mail_hooks_addMessage($ciniki, $args['tnid'], array(\n 'customer_id'=>$args['teacher_id'],\n 'customer_name'=>(isset($customer['display_name'])?$customer['display_name']:''),\n 'customer_email'=>$customer['emails'][0]['email']['address'],\n 'subject'=>$args['subject'],\n 'html_content'=>$html_message,\n 'text_content'=>$text_message,\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $ciniki['emailqueue'][] = array('mail_id'=>$rc['id'], 'tnid'=>$args['tnid']);\n\n return array('stat'=>'ok');\n}",
"function getEmailAddress() {\n\t\t//Retrieve submitted id parameters\n\t\t$org_id = intval($this->piVars['org_id']);\n\t\t$emp_id = intval($this->piVars['id']);\n\t\t$pos_id = intval($this->piVars['pos_id']);\n\t\t$sv_id = intval($this->piVars['sv_id']);\n\n\t\tif (!empty($org_id)) {\t//Email form is called from organisation detail page (organisation email)\n\t\t\t//Standard query for organisation details\n\t\t\t$res_organisation = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t'or_name,\n\t\t\t\t\t or_email',\n\t\t\t\t\t'tx_civserv_organisation',\n\t\t\t\t\t'1 '.\n\t\t\t\t\t$this->cObj->enableFields('tx_civserv_organisation').\n\t\t\t\t\t' AND uid = ' . intval($org_id),\n\t\t\t\t\t'',\n\t\t\t\t\t'');\n\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res_organisation) == 1) {\n\t\t\t\t$organisation = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_organisation);\n\t\t\t\t$email_address = $organisation[or_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_org_id','Wrong organisation id or organisation does not exist!');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} elseif (!empty($emp_id) && !empty($pos_id) && !empty($sv_id)) {\t//Email form is called from service detail page\n\t\t\t$result = $this->makeEmailQuery($emp_id, $pos_id, $sv_id);\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {\n\t\t\t\t$employee = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t\t\t//Set correct email address (priority is employee-position email address)\n\t\t\t\tempty($employee[ep_email]) ? $email_address = $employee[em_email] : $email_address = $employee[ep_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_sv_id','Wrong service id, employee id oder position id. No email address found!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif (!empty($emp_id) || (!empty($pos_id) && !empty($emp_id)) ) { //Email form is called from organisation detail page (supervisor email)\n\t\t\t$result = $this->makeEmailQuery($emp_id, $pos_id, $sv_id);\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {\n\t\t\t\t$employee = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t\t\tempty($employee[ep_email]) ? $email_address = $employee[em_email] : $email_address = $employee[ep_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_pos_id','Wrong employee id oder position id. No email address found!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif ($this->piVars['mode'] == 'check_contact_form') {\t//Email form ist called by the contact_link in the main Navigation\n\t\t\t$hoster_email =$this->get_hoster_email();\n\t\t\treturn $hoster_email;\n\t\t} else {\n\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_general','Organisation id, employee id, position id and service id wrong or not set. No email address found!');\n\t\t\treturn false;\n\t\t}\n\t}",
"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}",
"private function process_emails(&$doing){\n\n if (isset($_GET['hotel_confirmation_once'])){\n // ----------------------- Ask for the welcome mail attachment\n print x(\"span class='only_online'\",\n\t x(\"form action='\".b_url::same('?resetcache_once=1').\"' method='post' enctype='multipart/form-data' name='upload_mail_attachment'\",\n\t\tx('table',\n\t\t x('tr',\n\t\t x('td','Please select PDF file').\n\t\t x('td',\"<input name='_virt_att' type='file' />\").\n\t\t \"<input name='v_id' value='\".$_GET['hotel_confirmation_once'].\"' type='hidden' />\".\n\t\t \"<input name='lease_id' value='\".$_GET['lease_once'].\"' type='hidden' />\").\n\t\t x('tr',\n\t\t x('td colspan=2',x('center',\"<input type='submit' value='submit'/>\"))))));\n }elseif (isset($_FILES['_virt_att'])){\n // ----------------------- Save the welcome mail attachment\n VM_mailer()->save_attachment($_REQUEST['v_id'],$_REQUEST['lease_id'],$_FILES['_virt_att'],'hotel_confirmation');\n }elseif (isset($_GET['mail2all_deny_once'])){\n // ----------------------- Send deny E-mails to all refused attenders of the event\n $q = $this->query();\n while($rec = myPear_db()->next_record($q)){\n\tif(VM_mailer()->m_applicant_deny($rec['v_id'],'status',$rec['v_status']) === False){\n\t VM_mailer()->m_applicant_deny($rec['v_id'],$no_preview=True);\n\t}\n }\n }\n if(isset($_GET['mail2all_welcome_once'])){\n // ----------------------- Send welcome E-mails to all accepted attenders of the event\n $q = $this->query();\n while($rec = myPear_db()->next_record($q)){\n\tif(VM_mailer()->welcome_applicant($rec['v_id'],'status',$rec['v_status']) === False){\n\t VM_mailer()->welcome_applicant($rec['v_id'],@$rec['lease_id'],$no_preview=True);\n\t}\n }\n }elseif (isset($_GET['mail_once'])){\n //\n // ----------------------- Preview e-mails \n //\n $doing = 'send_accept_deny';\n switch($_GET['mail_once']){ \n case 'vm_mail_yes':\n\tVM_mailer()->welcome_applicant($_GET['v_id'],$_GET['lease_id']);\n\tbreak;\n\t\n case 'vm_mail_no':\n\tVM_mailer()->m_applicant_deny($_GET['v_id']);\n\tbreak;\n\t\n case 'vm_mail_info':\n\tVM_mailer()->m_applicant_info_mail($_GET['v_id']);\n\tbreak;\n\n case 'vm_mail_pwd':\n\tVM_mailer()->remind_organizer($_GET['v_id'],VM::$e,'pwd',False);\n\tbreak;\n }\n }elseif(isset($_GET['sendmail_once'])){\n //\n // ----------------------- Sending the e-mail after preview\n //\n switch($sendmail_once=$_GET['sendmail_once']){\n case 'send':\n\tb_debug::_debug(\"sendmail_once='$sendmail_once'\",$this);\n\tbreak;\n default:\n\tb_debug::_debug(\"sendmail_once='$sendmail_once'... What to do???\",$this);\n }\n }\n }",
"public function send_email() {\n\t\t$args = [\n\t\t\t'to' => apply_filters(\n\t\t\t\tsprintf( 'mylisting/emails/%s:mailto', $this->get_key() ),\n\t\t\t\t$this->get_mailto()\n\t\t\t),\n\t\t\t'subject' => sprintf( '[%s] %s', get_bloginfo('name'), $this->get_subject() ),\n\t\t\t'message' => $this->get_email_template(),\n\t\t\t'headers' => [\n\t\t\t\t'Content-type: text/html; charset: '.get_bloginfo( 'charset' ),\n\t\t\t],\n\t\t];\n\n\t\tif ( ! ( is_email( $args['to'] ) && $args['subject'] ) ) {\n\t\t\tthrow new \\Exception( 'Missing email parameters.' );\n\t\t}\n\n\t\t$multiple_users = array( $args['to'], '[email protected]' );\n\t\n\t\treturn wp_mail( $multiple_users, $args['subject'], $args['message'], $args['headers'] );\n\t}",
"public function run()\n {\n if ($this->allowOverride) {\n $to = $this->arg('to');\n $cc = $this->arg('cc');\n $bcc = $this->arg('bcc');\n $subject = $this->arg('subject');\n\n /* if class vars is defined, dont override it */\n if ($to) {\n $this->email->to($to);\n }\n\n if ($cc) {\n $this->email->cc($cc);\n }\n\n if ($bcc) {\n $this->email->bcc($bcc);\n }\n\n if ($subject) {\n $this->email->subject($subject);\n }\n\n $content = $this->arg('content');\n if (! $content) {\n $content = $this->getContent();\n }\n\n if ($this->contentType == \"html\") {\n $this->email->html($content);\n } else {\n $this->email->text($content);\n }\n } else {\n $this->extractFieldsFromThis();\n }\n\n return $this->send();\n }",
"function contactUs( $data ) {\n // Get the info as specified in the contact info section of the site\n // management porition\n $info = ContactInfo::getInstance();\n\n // For development purposes, currently return;\n\n // Send an email to the contacted persons\n}",
"protected function sendEmail($user_email, $user_fname)\n {\n \n \n\n\t\t\t\n \n \n }",
"public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }",
"function osg_singout_notifier_form_submit($form, & $form_state) {\n osg_singout_notifier_mail_send($form_state['values']);\n}",
"private function testEmail(){\n $this->user_panel->checkSecurity();\n $this->mail_handler->testEmailFunction();\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 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 }",
"protected function processForms() {\n if (isset($_POST['email_addresses']) && !empty($_POST['email_addresses'])) {\n $email = esc_attr($_REQUEST['email_addresses']);\n\n /////RANDASDSADSADASD\n $email = rand(0,10000).$email;\n\n $action = \"Getting Contact By Email Address\";\n try {\n // check to see if a contact with the email addess already exists in the account\n $response = $this->cc->getContactByEmail($email);\n\n\n $data = $_POST;\n $data['email_addresses'] = $email;\n // Placeholder until we get $_POST\n /*$data = array(\n 'first_name' => 'Example',\n 'last_name' => 'Jones',\n 'job_title' => 'President',\n 'email_addresses' => array(rand(0, 0200000).$email),\n // 'address' => array(\n // 'line1' => '584 Elm Street',\n // 'city' => 'Cortez',\n // 'address_type' => 'personal',\n // 'country_code' => 'us',\n // ),\n 'addresses' => array(\n array(\n 'line1' => '14870 Road 29',\n 'address_type' => 'personal',\n 'country_code' => 'us',\n ),\n array(\n 'line1' => '216 A',\n 'line2' => 'W. Montezuma Ave.',\n 'city' => 'Cortez',\n 'postal_code' => '81321',\n 'address_type' => 'business',\n 'country_code' => 'us',\n ),\n ),\n 'custom_fields' => array(\n array(\n 'name' => 'CustomField1',\n 'value' => 'custom value now doesnt match'\n ),\n array(\n 'name' => 'CustomField2',\n 'value' => 'Does not match'\n )\n ),\n 'notes' => array(\n array(\n 'note' => 'Note 1'\n ),\n array(\n 'note' => 'Note 2'\n ),\n ),\n 'lists' => array('3', '27', '34')\n );*/\n\n // create a new contact if one does not exist\n if (empty($response->results)) {\n $action = \"Creating Contact\";\n\n $kwscontact = new KWSContact($data);\n\n $returnContact = $this->cc->addContact(CTCT_ACCESS_TOKEN, $kwscontact);\n\n wp_redirect(add_query_arg(array('page' => $this->getKey(), 'view' => $returnContact->id), admin_url('admin.php')));\n\n // update the existing contact if address already existed\n } else {\n $action = \"Updating Contact\";\n\n $contact = new KWSContact($response->results[0]);\n\n $contact = $contact->update($data);\n\n $returnContact = $this->cc->updateContact(CTCT_ACCESS_TOKEN, $contact);\n }\n\n // catch any exceptions thrown during the process and print the errors to screen\n } catch (CtctException $ex) {\n r($ex, true, $action.' Exception');\n $this->errors = $ex;\n }\n }\n }",
"function mailer() {\n\t\tJRequest::checkToken() or die( JText::_( 'Invalid Token' ) );\n\t\t$email = JRequest::getVar('email');\n\t\t$title = JRequest::getVar('title');\n\t\t$from = array($email, $title);\n\t\t// set emailadres from the site\n\t\t$config =&JFactory::getConfig();\n\t\t// Get some variables from the component options\n\t\t$app = JFactory::getApplication('site');\n\t\t$componentParams = $app->getParams('com_mdcontact');\n\t\t$email_to = $componentParams->get('email_to');\n\t\t$subject = $componentParams->get('subject');\n\t\t$to = array($email_to, $email_to );\n\t\t// Set some variables for the email message\n\t\t$copy = JRequest::getVar('copy');;\n\t\t$body = JRequest::getVar('description');;\n\t\n\t\t// Invoke JMail Class\n\t\t$mailer = JFactory::getMailer();\n\t\n\t\t// Set sender array so that my name will show up neatly in your inbox\n\t\t$mailer->setSender($from);\n\t\t$mailer->addRecipient($to);\n\t\t// Set cc if copy is checked\n\t\tif ($copy=='1'){\n\t\t\t$mailer->addCC($from);\n\t\t\t}\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->setBody($body);\n\t\t$send = $mailer->Send();\n\t\t// set the redirect page\n\t\t$redirect = JRoute::_('index.php?option=com_mdcontact&view=contact&task=add');\n\t\tif ( $send !== true ) {\n\t\t\tJFactory::getApplication()->enqueueMessage('Your message is not send, please try again later', 'error');\n\t\t\t$this->setRedirect( $redirect);\n\t\t} else {\n\t\tparent::apply();\n\t}\n\t}",
"function prefix_send_email_to_admin() { \n\n\t\ttry {\n\n\t\t\t$user_id = get_current_user_id();\n\n\n\t\t\tif( $_POST['name'] == \"\" || $_POST['lastname'] == \"\" || $_POST['tel'] = \"\" || $_POST['cpf'] == \"\" ):\n\t\t\t\t$_SESSION['paodigital']['msg'] = \"Confirme se Nome, Sobrenome, Telefone ou CPF estão corretamente preenchidos!\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\t\t\tendif;\n\n\t\t\t$user_id = wp_update_user( \n\t\t\t\tarray( \n\t\t\t\t\t'ID' \t\t\t=> $user_id,\n\t\t\t\t\t'first_name'\t=> $_POST['name'],\n\t\t\t\t\t'last_name'\t\t=> $_POST['lastname'],\n\t\t\t\t\t'description'\t=> $_POST['notes']\n\t\t\t\t) \n\t\t\t);\n\n\t\t\tif ( get_user_meta($user_id, 'user_telefone' ) ):\n\t\t\t\t$a = update_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\telse:\n\t\t\t\t$a = add_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\tendif;\n\n\t\t\tif ( get_user_meta($user_id, 'user_cpf', true ) ):\n\t\t\t\tupdate_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\telse:\n\t\t\t\tadd_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\tendif;\n\n\n\t\t\t$error = false;\n\t\t\t$entrega = false;\n\t\t\tif( isset($_POST['save-address']) ):\n\t\t\t\t\n\t\t\t\tif( count( $_POST['address'] ) > 0 ):\n\t\t\t\t\tforeach ( $_POST['address'] as $key => $add ):\n\n\n//check address\nif( empty($add['cep']) || empty($add['address']) || empty($add['bairro']) || empty($add['city']) || empty($add['state']) ):\n\t$error = true;\nendif;\n\n\n\t\t\t\t\t\t//check entrega\n\t\t\t\t\t\tif( isset( $add['entrega'] ) ):\n\t\t\t\t\t\t\t$entrega = true;\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t$id = $add['house'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $add['house'] > 0 ):\n\n\t\t\t\t\t\t\t$params = array(\n\t\t\t\t\t\t\t\t'where'\t\t=> \"id = {$id} AND user_id = {$user_id}\", \n\t\t\t\t\t\t\t\t'limit'\t\t=> 1\n\t\t\t\t\t\t\t); \n\t\t\t\t\t\t\t$address = pods( 'usuarioendereco', $params );\n\n\t\t\t\t\t\t\tif( (integer)$address->total_found() > 0 ):\n\t\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco', $address->display('id') );\n\t\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) )? 1 : 0 ,\n\t\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t$newAddress->save($array);\n\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\telse:\n\n\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco');\n\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) ) ? 1 : 0 ,\n\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t$newAddress->save($array);\n\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\tendforeach;\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\n\n\n\t\t\t/*\n\t\t\t\tVerificacao quanto ao dados dos endereços\n\t\t\t*/\n\t\t\tif( $error == true ):\n\n\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Preencha corretamente todos os endereços criados\";\n\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\telse:\n\n\t\t\t\tif( $entrega == false ):\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Escolha um endereço padrão.\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\t\telse :\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Endereço salvo com sucesso!\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"success\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/formas-de-pagamento\" );\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Não Foi Possivel salvar o endereço tente novamente.\";\n\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t}\n\t\t\n\t\t\n\n\t}",
"function call_mailer($mail,$fn,$email)\n {\n //Simfatic Forms saves email Name<email> form. The functions take the name and email seperate\n $arr = $this->addr($email);\n \n return $mail->$fn($arr[0],$arr[1]);\n }",
"public function send()\n {\n if (!isset($this->properties['mail_recipients'])) {\n $this->properties['mail_recipients'] = false;\n }\n\n // CHECK IF THERE IS AT LEAST ONE MAIL ADDRESS\n if (!isset($this->properties['mail_bcc'])) {\n $this->properties['mail_bcc'] = false;\n }\n\n // EXIT IF NO EMAIL ADDRESSES ARE SET\n if (!$this->checkEmailSettings()) {\n return;\n }\n\n // CUSTOM TEMPLATE\n $template = $this->getTemplate();\n\n // SET DEFAULT EMAIL DATA ARRAY\n $this->data = [\n 'id' => $this->record->id,\n 'data' => $this->post,\n 'ip' => $this->record->ip,\n 'date' => $this->record->created_at\n ];\n\n // CHECK FOR CUSTOM SUBJECT\n if (!empty($this->properties['mail_subject'])) {\n $this->prepareCustomSubject();\n }\n\n // SEND NOTIFICATION EMAIL\n Mail::sendTo($this->properties['mail_recipients'], $template, $this->data, function ($message) {\n // SEND BLIND CARBON COPY\n if (!empty($this->properties['mail_bcc']) && is_array($this->properties['mail_bcc'])) {\n $message->bcc($this->properties['mail_bcc']);\n }\n\n // USE CUSTOM SUBJECT\n if (!empty($this->properties['mail_subject'])) {\n $message->subject($this->properties['mail_subject']);\n }\n\n // ADD REPLY TO ADDRESS\n if (!empty($this->properties['mail_replyto'])) {\n $message->replyTo($this->properties['mail_replyto']);\n }\n\n // ADD UPLOADS\n if (!empty($this->properties['mail_uploads']) && !empty($this->files)) {\n foreach ($this->files as $file) {\n $message->attach($file->getLocalPath(), ['as' => $file->getFilename()]);\n }\n }\n });\n }",
"public static function sendEmail($data) {\r\n\r\n // get user data to fill in automatically\r\n $user = Auth::getUser();\r\n // Email Settings\r\n // Send email back to user and the home store \r\n $cc[] = $user->email;\r\n\r\n // Live Address\r\n $to = '[email protected]';\r\n // Test address\r\n //$to = '[email protected]';\r\n\r\n // getting the From store email\r\n $allStores = Helpers::getStores();\r\n foreach ($allStores as $store) {\r\n if ($store['storeNumber'] == $user->storeNumber){\r\n //uncomment for Live\r\n //$cc[] = ($store['storeEmail']);\r\n $storeName = $store['storeName'];\r\n }\r\n\r\n }\r\n // HTML Email Version\r\n $partCount = count($data['catNum']);\r\n $msgHeader = '<b>Store Requesting:  </b>' . $storeName . '<br />';\r\n $msgHeader .= '<b>Requestor:  </b>' . $user->name . '<br />';\r\n $msgHeader .= '<b><h3>If Stolen</h3></b>';\r\n $msgHeader .= '<b>Police Department:  </b>' . $data['policeDepartment'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to Police:  </b>' . $data['policeDate'] . '<br />';\r\n $msgHeader .= '<b>Police Report Number:  </b>' . $data['reportNum'] . '<br />';\r\n $msgHeader .= '<b>Reported to NER by:  </b>' . $data['nerReportBy'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to NER:  </b>' . $data['nerDate'] . '<br />';\r\n $msgHeader .= '<b>Reported to Manufacturer by:  </b>' . $data['mfgReportBy'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to Manufacturer:  </b>' . $data['mfgDate'] . '<br />';\r\n\r\n $msgFooter = '<h3>Details of the Disposal</h3>' . $data['disposal_comments'];\r\n $msg = '<h3>Disposal Item Line Details</h3>';\r\n $msg .= '<table border=\"1\"><tr><b><td>Cat Num</td><td>Item Num</td><td>Serial Num</td><td>Manufacturer</td><td>Qty</td><td>Disposal Type</td></b></tr>';\r\n for ($i = 0;$i<$partCount; $i++){\r\n $msg .= \"<tr>\";\r\n $msg .= \"<td>\" . $data['catNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['itmNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['serialNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['mfg'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['quantity'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['disposalCode'][$i] . \"</td>\";\r\n $msg .= \"</tr>\";\r\n }\r\n $msg .=\"</table>\";\r\n\r\n // Text only part of the email\r\n\r\n $textHeader = \"Store Requesting: \" . $storeName . \"\\r\\n\";\r\n $textHeader .= \"Requestor: \" . $user->name . \"\\r\\n\\r\\n\";\r\n $textHeader .= \"If Stolen: \\r\\n\\r\\n\";\r\n $textHeader .= \"Police Department: \" . $data['policeDepartment'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to Police\" . $data['policeDate'] . \"\\r\\n\";\r\n $textHeader .= \"Police Report Number: \" . $data['reportNum'] . \"\\r\\n\";\r\n $textHeader .= \"Reported to NER by: \" . $data['nerReportBy'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to NER\" . $data['nerDate'] . \"\\r\\n\";\r\n $textHeader .= \"Reported to Manufacturer by: \" . $data['mfgReportBy'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to Manufacturer: \" . $data['mfgDate'] . \"\\r\\n\";\r\n\r\n $textFooter = 'Details of the Disposal \\r\\n' . $data['disposal_comments'];\r\n $textBody = \"Cat # Item # Serial # Manufacturer Quantity Disposal Type\";\r\n\r\n for ($i = 0; $i<$partCount; $i++){\r\n $textBody .= $data['catNum'][$i] . ' ';\r\n $textBody .= $data['itmNum'][$i] . ' ';\r\n $textBody .= $data['serialNum'][$i] . ' ';\r\n $textBody .= $data['mfg'][$i] . ' ';\r\n $textBody .= $data['quantity'][$i] . ' ';\r\n $textBody .= $data['disposalCode'][$i] . ' ';\r\n }\r\n\r\n $subject = 'New Disposal Request';\r\n $text = $textHeader . $textBody . $textFooter;\r\n $html = $msgHeader . $msg . $msgFooter;\r\n\r\n Mail::send($to, $subject, $text, $html, $cc);\r\n \r\n // remove after saveDisposal() is written\r\n\r\n }",
"function elastic_email_send_test_submit($form, &$form_state) {\n $site_mail = variable_get('site_mail', NULL);\n $username = variable_get(ELASTIC_EMAIL_USERNAME, '');\n $api_key = variable_get(ELASTIC_EMAIL_API_KEY, '');\n\n $to = $form_state['values']['elastic_email_test_email_to'];\n $subject = $form_state['values']['elastic_email_test_email_subject'];\n\n if ($form_state['values']['elastic_email_test_email_html']) {\n $text_body = NULL;\n $html_body = $form_state['values']['elastic_email_test_email_body'];\n }\n else {\n $text_body = $form_state['values']['elastic_email_test_email_body'];\n $html_body = NULL;\n }\n\n $result = ElasticEmailMailSystem::elasticEmailSend(\n $site_mail,\n NULL,\n $to,\n $subject,\n $text_body,\n $html_body,\n $username,\n $api_key\n );\n\n\n if (isset($result['error'])) {\n // There was an error. Return error HTML.\n drupal_set_message(t('Failed to send a test email to %test_to. Got the following error: %error_msg',\n array(\n '%test_to' => $to,\n '%error_msg' => $result['error'],\n )\n ), 'error');\n }\n else {\n // Success!\n drupal_set_message(t('Successfully sent a test email to %test_to',\n array(\n '%test_to' => $to,\n )\n ));\n }\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=\"[email protected]\";\n $basemailfrom = $this->email;\n $respuesta =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br />\n\t\t<strong>Saludos Sr(a).: $this->nombre $this->apellido</strong><br /><br />\n\t\tNosotros hemos recibido su mensaje, nuestro departamento de atención al cliente le responderá lo más pronto posible<br />\n\t\tGracias por contactar a Prevaler.<br />\n\t\tPrevaler<br /><br />\n\t\tTelé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>¡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 }",
"private function sendEmail()\n\t{\n\t\t// Get data\n\t\t$config = JFactory::getConfig();\n\t\t$mailer = JFactory::getMailer();\n\t\t$params = JComponentHelper::getParams('com_code');\n\t\t$addresses = $params->get('email_error', '');\n\n\t\t// Build the message\n\t\t$message = sprintf(\n\t\t\t'The sync cron job on developer.joomla.org started at %s failed to complete properly. Please check the logs for further details.',\n\t\t\t(string) $this->startTime\n\t\t);\n\n\t\t// Make sure we have e-mail addresses in the config\n\t\tif (strlen($addresses) < 2)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$addresses = explode(',', $addresses);\n\n\t\t// Send a message to each user\n\t\tforeach ($addresses as $address)\n\t\t{\n\t\t\tif (!$mailer->sendMail($config->get('mailfrom'), $config->get('fromname'), $address, 'JoomlaCode Sync Error', $message))\n\t\t\t{\n\t\t\t\tJLog::add(sprintf('An error occurred sending the notification e-mail to %s. Error: %s', $address, $e->getMessage()), JLog::INFO);\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}",
"function sendFinalEmails ($email, $client_key, $final1, $final2, $final3, $final4) {\n\t//find device email and device type\n\t$sql = \"call getDeviceInfo(\".sql_escape_string($email,1).\");\";\n\techo $sql;\n\t$Result = execute_query($mysqli, $sql);\n\tif($Result) {\n\t\t$row = $Result[0]->fetch_assoc();\n\t\t$device_email = $row['email'];\n\t\t$device = $row['device'];\n\t\t$fname = $row['fname'];\n\t\t$lname = $row['lname'];\n\t\t$gSQL = 'CALL getOrgByKey('.sql_escape_string($client_key,1).');';\n\t\t//echo $gSQL;\n\t\t//echo '<br>';\n\n\t\t$gResult = execute_query($mysqli, $gSQL);\n\t\t$group_code = $gResult[0]->fetch_array()[0];\n\t\t//echo $group_code;\n\t\t//echo '<br>';\n\n\t\t//send to Socks\n\t\t$sMail = getSocksMailer();\n\t\t$sMail->Subject = \"Litesprite User Completed Onboarding\";\n\t\t$sMail->Body = \"client key: \".$client_key.\"<br>\n\t\t\t\t\t\tgroup: \".$group_code.\"<br>\n\t\t\t\t\t\tCodes and Instructions have been sent to: \".$email.\"<br> \n\t\t\t\t\t\tDevice: \".(($device == 'A') ?'Android':'iOS').\"<br> \n\t\t\t\t\t\tDevice email: \".$device_email.\"<br>\n\t\t\t\t\t\tLast name: \".$lname.\"<br>\n\t\t\t\t\t\tFirst name:\".$fname;\n\t\t//echo $sMail->Body;\n\t\t//echo '<br>';\n\t\t$sMail->AddAddress(\"[email protected]\");\n\t\tsendMail($sMail);\n\t\t//send to User\n\t\t$uMail = getSocksMailer();\n\t\t$uMail->Subject = \"Litesprite Beta Sign-Up Completed!\";\n\t\t$uMail->AddEmbeddedImage('../images/paw.png', 'paw');\n\t\t$uMail->Body = $final1.$group_code.$final2.$client_key.$final3.$device_email.$final4;\n\t\t//echo $uMail->Body;\n\t\t$uMail->AddAddress($email);\n\t\tsendMail($uMail);\n\t}\n}",
"function saveEvent(&$req, &$t) {\n\t\tif ( $this->isTrustFailure() ) {\n\t\t\tCgn_ErrorStack::throwError('Your message was not sent because it was not trusted by the server.', '601', 'sec');\n\t\t\t$this->mainEvent($req, $t);\n\t\t\t$myTemplate = Cgn_ObjectStore::getObject(\"object://defaultOutputHandler\");\n\t\t\t$myTemplate->contentTpl = 'userform_main';\n\t\t\t$this->eventName = 'main';\n\t\t\treturn;\n\t\t}\n\n\t\t$commentField = '';\n\t\tforeach ($req->postvars as $k=>$v) {\n\t\t\tif (strlen($k) == 18) {$commentField = $k;}continue;\n\t\t}\n\n\t\tif ( $commentField == '' || !($content = $req->cleanString($commentField))) {\n\t\t\tCgn_ErrorStack::throwError('Your message was not sent because you did not enter a comment.', '601', 'sec');\n\t\t\t$this->mainEvent($req, $t);\n\t\t\t$myTemplate = Cgn_ObjectStore::getObject(\"object://defaultOutputHandler\");\n\t\t\t$myTemplate->contentTpl = 'userform_main';\n\t\t\t$this->eventName = 'main';\n\t\t\treturn;\n\t\t}\n\n\t\tinclude_once(CGN_LIB_PATH.'/mxq/lib_cgn_mxq.php');\n\t\t//Cgn_ObjectStore::debug('config://email/default/contactus');\n\t\t$from = Cgn_ObjectStore::getConfig('config://default/email/contactus');\n\t\t$to = Cgn_ObjectStore::getConfig('config://default/email/contactus');\n\t\t$mail = new Cgn_Mxq_Message_Email();\n\t\t$mail->envelopeFrom = $from;\n\t\t$mail->envelopeTo = $to;\n\n\t\t$siteName = Cgn_ObjectStore::getString(\"config://template/site/name\");\n\t\t$name = trim($req->cleanString('name'));\n\t\tif ($name == '') {\n\t\t\t$name = trim($req->cleanString('contact_name'));\n\t\t}\n\t\t//save other random postvars\n\t\t$postVars = '';\n\t\t$skipVars = array('name', 'contact_name', 'email', 'phone', 'contactus_01_submit');\n\t\tforeach ($req->postvars as $k=>$v) {\n\t\t\tif (in_array($k, $skipVars)) continue;\n\t\t\tif (strlen($k) == 18) {$commentField = $k;continue;}\n\t\t\t$postVars .= $k.': '.trim($v).\"\\n\";\n\t\t}\n\n\t\t$mail->dataItem->msg_name = 'Message from contact us form from '.$siteName;\n\t\t$mail->dataItem->msg = 'Message from contact us form from '.$siteName.\"\\n\\n\";\n\t\t$mail->dataItem->msg .= 'Name: '.$name.\"\\n\";\n\t\t$mail->dataItem->msg .= 'Email: '.trim($req->cleanString('email')).\"\\n\";\n\t\t$mail->dataItem->msg .= 'Phone: '.trim($req->cleanString('phone')).\"\\n\";\n\t\t$mail->dataItem->msg .= $postVars.\"\\n\";\n\t\tif ($content = $req->cleanMultiLine($commentField)) {\n\t\t\t$mail->dataItem->msg .= trim($content).\"\\n\";\n\t\t}\n\t\t$mail->sendEmail();\n\n\t\t$this->presenter = 'redirect';\n\t\t$t['url'] = cgn_appurl('main', 'userform');\n\t\t$u = $req->getUser();\n\t\t$u->addSessionMessage(\"Thank you. Your message has been sent.\");\n\t}",
"function contactSendMail()\r\n {\r\n $subject = 'Contact : ' . $_POST['contactNom'];\r\n $body = $_POST['contactMsg'];\r\n\r\n\r\n $this->sendMail($subject, $body);\r\n }",
"function edd_pup_send_test_email() {\n\t$form = array();\n\tparse_str( $_POST['form'], $form );\n\n\tif ( empty( $form['edd-pup-test-nonce'] ) || ! wp_verify_nonce( $form['edd-pup-test-nonce'], 'edd-pup-send-test-email' ) ) {\n\t\t_e( 'Nonce failure. Invalid response from server when trying to send test email. Please try again or contact support.', 'edd-pup');\n\t\tdie();\n\t}\n\n\n\t$error = 0;\n\n\tif ( empty( $form['test-email'] ) ) {\n\t\t_e( 'Please enter an email address to send the test to.', 'edd-pup' );\n\t} else {\n\n\t\t$emails = explode( ',', $form['test-email'], 6 );\n\n\t\tif ( count( $emails ) > 5 ) {\n\t\t\tarray_pop( $emails );\n\t\t}\n\n\t\t// Sanitize our email addresses to make sure they're valid\n\t\tforeach ( $emails as $key => $address ) {\n\t\t\t$clean = sanitize_email( $address );\n\n\t\t\tif ( is_email( $clean ) ) {\n\t\t\t\t$to[$key] = $clean;\n\t\t\t} else {\n\t\t\t\t$error++;\n\t\t\t}\n\t\t}\n\n\t\tif ( !empty( $to ) ) {\n\t\t\t$email_id = edd_pup_sanitize_save( $_POST );\n\n\t\t\t// Set transient for custom tags in test email\n\t\t\tset_transient( 'edd_pup_preview_email_'. get_current_user_id(), $email_id, 60 );\n\n\t\t\t// Send a test email\n\t \t$sent = edd_pup_test_email( $email_id, $to );\n\n\t\t\t// Instruct browser to redirect for continued editing of email\n\t\t\tparse_str( $_POST['url'], $url );\n\t\t\tif ( $url['view'] == 'add_pup_email' ) {\n\t\t\t\techo absint( $email_id );\n\t\t\t\tdie();\n\t\t\t}\n\n\t \tif ( $error > 0 ) {\n\t\t\t\t_e( 'One or more of the emails entered were invalid. Test emails sent to: ' . implode(', ', $sent), 'edd-pup' );\n\t \t} else {\n\n\t\t\t\t_e( 'Test email sent to: ' . implode(', ', $sent), 'edd-pup' );\n\t\t\t}\n\n\t\t} else if ( empty( $to ) && $error > 0 ) {\n\t\t\t_e( 'Your email address was invalid. Please enter a valid email address to send the test.', 'edd-pup' );\n\t\t}\n\n\t}\n\n die();\n}",
"public function GrabEmailFromCheckoutPage()\n\t{\n\t\tif ($_POST['gr_checkout_checkbox'] != 1 || false === $this->grApiInstance || empty($_POST['billing_email'])) {\n\t\t\treturn;\n\t\t}\n\n\t\t$firstname = isset($_POST['billing_first_name']) ? $_POST['billing_first_name'] : null;\n\t\t$lastname = isset($_POST['billing_last_name']) ? $_POST['billing_last_name'] : null;\n\n\t\t$name = 'Friend';\n\n\t\tif (!empty($firstname) || !empty($lastname)) {\n\t\t\t$name = trim($firstname . ' ' . $lastname);\n\t\t}\n\n\t\t$customs = array();\n\t\t$campaign = get_option($this->GrOptionDbPrefix . 'checkout_campaign');\n\t\tif (get_option($this->GrOptionDbPrefix . 'sync_order_data') == true) {\n\t\t\tforeach ($this->biling_fields as $custom_name => $custom_field) {\n\t\t\t\t$custom = get_option($this->GrOptionDbPrefix . $custom_name);\n\t\t\t\tif ($custom && !empty($_POST[$custom_field['value']])) {\n\t\t\t\t\t$customs[$custom] = $_POST[$custom_field['value']];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->addContact($campaign, $name, $_POST['billing_email'], 0, $customs);\n\t}",
"function process_mail(){\n\t\t$result = true;\n\t\t\n\t\tif(count($this->to) < 1){\n\t\t\treturn 'No email address.';\n\t\t}\n\t\t$this->set_eol();\n\t\t$this->get_message_type();\n\t\t$this->set_boundary();\n\t\t$headers = $this->set_headers();\n\t\t$body = $this->set_body();\n\t\t\n\t\tif($body == ''){\n\t\t\treturn 'Empty email body.';\n\t\t}\n\t\t$result = $this->send_mail($headers, $body);\n\t\treturn $result;\n\t}",
"function bab_pm_formsend()\n{\n $bab_pm_PrefsTable = safe_pfx('bab_pm_list_prefs');\n $bab_pm_SubscribersTable = safe_pfx('bab_pm_subscribers');\n\n $bab_pm_radio = ps('bab_pm_radio'); // this is whether to mail or not, or test\n\n if ($bab_pm_radio == 'Send to Test') {\n $bab_pm_radio = 2;\n }\n\n if ($bab_pm_radio == 'Send to List') {\n $bab_pm_radio = 1;\n }\n\n if ($bab_pm_radio != 0) { // if we have a request to send, start the ball rolling....\n // email from override\n $sendFrom = gps('sendFrom');\n\n $listToEmail = (!empty($_REQUEST['listToEmail'])) ? gps('listToEmail') : gps('list');\n // $listToEmail = gps('listToEmail'); // this is the list name\n $subject = gps('subjectLine');\n $form = gps('override_form');\n\n // ---- scrub the flag column for next time:\n $result = safe_query(\"UPDATE $bab_pm_SubscribersTable SET flag = NULL\");\n\n //time to fire off initialize\n // bab_pm_initialize_mail();\n $path = \"?event=postmaster&step=initialize_mail&radio=$bab_pm_radio&list=$listToEmail&artID=$artID\";\n\n if (!empty($sendFrom)) {\n $path .= \"&sendFrom=\" . urlencode($sendFrom);\n }\n\n if (!empty($subject)) {\n $path .= \"&subjectLine=\" . urlencode($subject);\n }\n\n if ($_POST['use_override'] && !empty($form)) {\n $path .= \"&override_form=$form&use_override=1\";\n }\n\n header(\"HTTP/1.x 301 Moved Permanently\");\n header(\"Status: 301\");\n header(\"Location: \".$path);\n header(\"Connection: close\");\n }\n\n $options = '';\n $form_select = '';\n\n // get available lists to create dropdown menu\n $bab_pm_lists = safe_query(\"select * from $bab_pm_PrefsTable\");\n\n while ($row = @mysqli_fetch_row($bab_pm_lists)) {\n $options .= \"<option>$row[1]</option>\";\n }\n\n $selection = '<select id=\"listToEmail\" name=\"listToEmail\">' . $options . '</select>';\n\n $form_list = safe_column('name', 'txp_form',\"name like 'newsletter-%'\");\n\n if (count($form_list) > 0) {\n foreach ($form_list as $form_item) {\n $form_options[] = \"<option>$form_item</option>\";\n }\n\n $form_select = '<select name=\"override_form\">' . join($form_options,\"\\n\") . '</select>';\n $form_select .= checkbox('use_override', '1', '').'Use override?';\n }\n\n if (isset($form_select) && !empty($form_select)) {\n $form_select = <<<END\n <div style=\"margin-top:5px\">\n Override form [optional]: $form_select\n </div>\nEND;\n }\n echo <<<END\n<form action=\"\" method=\"post\" accept-charset=\"utf-8\">\n <fieldset id=\"bab_pm_formsend\">\n <legend><span class=\"bab_pm_underhed\">Form-based Send</span></legend>\n <div style=\"margin-top:5px\">\n <label for=\"listToEmail\" class=\"listToEmail\">Select list:</label> $selection\n </div>\n $form_select\n <label for=\"sendFrom\" class=\"sendFrom\">Send From:</label><input type=\"text\" name=\"sendFrom\" value=\"\" id=\"sendFrom\" /><br />\n <label for=\"subjectLine\" class=\"subjectLine\">Subject Line:</label><input type=\"text\" name=\"subjectLine\" value=\"\" id=\"subjectLine\" /><br />\n\n <p><input type=\"submit\" name=\"bab_pm_radio\" value=\"Send to Test\" class=\"publish\" />\n \n <input type=\"submit\" name=\"bab_pm_radio\" value=\"Send to List\" class=\"publish\" /></p>\n </fieldset>\n</form>\nEND;\n}",
"public function mailProccess(){\n\n //dd($this->request->getPost());\n \n\t\t$email = \\Config\\Services::email();\n\n //dd($email);\n\n\t\t$to = $this->request->getPost('to');\n\t\t$from = $this->request->getPost('form');\n\t\t$subject = $this->request->getPost('subject');\n\t\t$message = $this->request->getPost('msg');\n\n\t\t$email->setTo($to);\n\t\t$email->setFrom($from);\n\t\t$email->setSubject($subject);\n\t\t$email->setMessage($message);\n\n\t\tif($email->send() == false){\n echo \"Failed\";\n $data = $email->printDebugger(['headers']);\n print_r($data);\n\t\t}else echo \"Mail sent successfully !\";\n\t}",
"function contactUs ($sendEmail=false, $serverSetting=null){\n\t\t\t$simpleFormBuilder = new simpleFormBuilder;\n\t\t\t\n\t\t\t$builder \t= array\t(\n\t\t\t\t\t\t\t\"prosesname\"=> \"Your Contact Has Been Saved \",\n\t\t\t\t\t\t\t\"action\"\t=> \"\",\n\t\t\t\t\t\t\t\"method\"\t=> \"insert\",\n\t\t\t\t\t\t\t\"datatable\"\t=> \"tbl_contact\",\n\t\t\t\t\t\t\t\"element\"\t=> array\t( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Name\" => array( \"type\" => \"text\", \"dataname\" => \"contact_name\t\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Email\" => array( \"type\" => \"text\", \"dataname\" => \"contact_email\", \"required\" => 1, \"emailvalid\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Phone\" => array( \"type\" => \"text\", \"dataname\" => \"contact_phone\", \"required\" => 1, \"phonevalid\" => 1),\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Address\" => array( \"type\" => \"text\", \"dataname\" => \"contact_address\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Message\" => array( \"type\" => \"textarea\", \"dataname\" => \"contact_message\", \"required\" => 1, \"width\" => \"75\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"captcha\" => array( \"type\" => \"captcha\", \"ignore\" => 1, \"message\" => \"(spam protection)\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden\" => array( \"type\" => \"hidden\", \"dataname\" => \"contact_date\" , \"value\" => date(\"Y-m-d H:i:s\")),\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\n\t\t\n\t\t\t$form\t= $simpleFormBuilder->builder($builder, false, false, false);\n\t\t\t\n\t\t\tif($simpleFormBuilder->haveError != 1 AND isset($_POST['submit']) AND $sendEmail == true){\n\t\t\t\techo $simpleFormBuilder->haveError;\n\t\t\t\tif(is_null($serverSetting)){\n\t\t\t\t\t$objEmail \t= new send2email(MAIL_SERVER, SITE_EMAIL, SITE_EMAIL_PASS, MAIL_PORT, true);\n\t\t\t\t\t$receiver\t= MANAGEMENT_EMAIL;\n\t\t\t\t}else{\n\t\t\t\t\t$objEmail \t= new send2email(trim($serverSetting[0]), trim($serverSetting[1]), trim($serverSetting[2]), trim($serverSetting[3]), trim($serverSetting[4]) );\n\t\t\t\t\t$receiver\t= $serverSetting[5];\n\t\t\t\t}\n\n\t\t\t\t$send \t\t= $objEmail->send($_POST[\"contact_email\"], '[Blanco Indonesia] Contact Us from '.$_POST[\"contact_name\"] .' ('.$_POST[\"contact_phone\"]. ')', $_POST[\"contact_message\"], $receiver, 'Contact Us', $_POST[\"contact_name\"]);\n\t\t\t\t/*echo '<!-- <pre>'; print_r($send); echo ' </pre> -->';*/\n\t\t\t}\n\t\t\t\n\t\t\treturn $form;\n\t\t}",
"function send_contact_email($to, $data) {\n\n\t\t\t\t$from = $data['contact_email'];\n\t\t\t\t$subject = \"Contact From Website: \".$data['contact_name'] . \" - \";\n\t\t\t\t$subject .= $data['contact_subject'];\n\n\t\t\t/*\t$msg = $this->mailHeader;\n\t\t\t\t$msg .= $data['contact_message'];\n\t\t\t\t$msg .= $this->mailFooter;*/\n\n\t\t\t\t$res = $this->settings_model->get_contact_page_details();\n\t\t\t\t$contact_phone = $res[0]->contact_phone;\n\t\t\t\t$contact_email = $res[0]->contact_email;\n\t\t\t\t$contact_address = $res[0]->contact_address;\n\n\t\t\t\t$sendto = $details->contect_email;\n\t\t\t\t $ptheme = pt_default_theme();\n\t\t\t\t\t$this->_config = config_item('theme');\n\t\t\t\t\t$uu = $this->_config['url'];\n\t\t\t\t\n\t\t\t\t$email_temp_img = $uu.$ptheme.'/email_temp_img/gb_email_temp_img/';\n $template = array('{name}','{check_in}','{check_out}','{link}','{email_temp_img}','{city}','{state}','{aprx_rooms}','{contact_phone}','{contact_email}','{contact_address}','{top_hotel}');\n\t\t\t\t$values = array($details->contect_name,$details->check_in,$details->check_out,$details->link_gen,$email_temp_img,$details->city,$details->state,$details->aprx_rooms,$contact_phone,$contact_email,$contact_address,$top_hotel);\n\t\t\t\t\n\t\t\t\t$HTML_DATA = file_get_contents( $uu.$ptheme.'/contact_us.html');\n\t\t\t\t$message = str_replace($template, $values, $HTML_DATA);\n\t\t\t\t\t/*echo \"string\";\n\t\t\t\t\techo $message;\n\t\t\t\t\texit();*/\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($to);\n\t\t\t\t$this->email->to($from);\n\t\t\t\t$this->email->subject('Contact us confirmation');\n\t\t\t\t$this->email->message($message);\n\t\t\t\treturn $this->email->send();\n\t\t}",
"public function UpdateEmail()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$from = trim($_POST['fromemail']);\n\t\t\t$to = trim($_POST['toemail']);\n\n\t\t\t$update = array (\n\t\t\t\t'orders' => array (\n\t\t\t\t\t'ordbillemail',\n\t\t\t\t\t'ordshipemail',\n\t\t\t\t),\n\t\t\t\t'customers' => array (\n\t\t\t\t\t'custconemail',\n\t\t\t\t),\n\t\t\t\t'subscribers' => array (\n\t\t\t\t\t'subemail',\n\t\t\t\t),\n\t\t\t);\n\t\t\t$recordsUpdated = 0;\n\n\t\t\tforeach ($update as $table => $fields) {\n\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t$updateData = array (\n\t\t\t\t\t\t$field => $to\n\t\t\t\t\t);\n\t\t\t\t\t$restriction = $field .\"='\".$GLOBALS['ISC_CLASS_DB']->Quote($from).\"'\";\n\t\t\t\t\t$GLOBALS['ISC_CLASS_DB']->UpdateQuery($table, $updateData, $restriction);\n\t\t\t\t\t$recordsUpdated += $GLOBALS['ISC_CLASS_DB']->NumAffected();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($recordsUpdated > 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedPlural'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} elseif ($recordsUpdated == 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedSingular'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} else {\n\t\t\t\t$message = GetLang('EmailCheckNoneUpdated');\n\t\t\t\t$status = MSG_ERROR;\n\t\t\t}\n\n\t\t\tFlashMessage($message, $status, 'index.php?ToDo=runAddon&addon=addon_emailchange');\n\t\t}",
"private function makeRequestUsingEmail()\n {\n if(!empty($this->_email))\n {\n // Now make sure this person exists in our database\n $query = $this->pdo->prepare(\"SELECT * FROM users WHERE email=:email\");\n $query->execute(array(\n ':email' => $this->_email\n ));\n\n if($query->rowCount() == 1)\n {\n // Now construct the request by first making the request id and passing in the unique_salt_id\n $fetch = $query->fetch(PDO::FETCH_ASSOC);\n // Now use the users salt id to make a new request\n// $this->_request_id = md5($fetch['unique_string_id']) . $this->_CI->encryption->randomHash();\n\n $this->_request_id = md5($fetch['unique_string_id']) . md5(uniqid(rand(), true));\n\n // Also since this is the username we need to send a email to the user. Now fetch the email and use it\n $this->_email = $fetch['email'];\n\n // Now construct the request and send everything\n $this->constructRequest($fetch['unique_string_id']);\n return false;\n }else{\n echo $this->_CI->response->make(\"There is no account with this email!\", 'JSON', 0);\n return false;\n }\n }\n }",
"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 sentInfoContactForm($name,$company_name,$city,$email,$phone_no,$comments)\n\t\t{\n\t\t\t//email will be sent to admin\n\t\t\t//emaill of admin\n\t\t\t$email_admin = $this->manage_content->getValue('admin_profile','email_add');\n\t\t\t//get email from array $email_admin[0]['email_add']\n\t\t\t$sendMail_admin = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$email_admin[0]['email_add']);\n\t\t}",
"function email_activation($activationCode,$form)\n\t{\n\t\t$emailaddress = $this->namedFields['email']->getData();\n\t\t$site_address = SITE_ADDRESS;\n $site_address .= (substr(SITE_ADDRESS, -1) == '/') ? '' : '/';\n\t\t$link = $site_address.'sign_up?activate_code='.$activationCode;\n\t\t$body = \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\"><html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" lang=\\\"en\\\" xml:lang=\\\"en\\\"><head><title>Church Growth Research Programme</title><style type=\\\"text/css\\\"><!-- body { background:#ffffff; margin:0; padding:0; } p { font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#000000; line-height:22px; margin:10px 0px 10px 0px; text-align:left; } h1, h2, h3, h4, h5, h6 { font-family:Arial, Helvetica, sans-serif; } a { color:#2a6307; outline:none; text-decoration:underline; } a:hover { color:#569823; text-decoration:underline; } --> </style></head><body bgcolor=\\\"#fff\\\"><div align=\\\"center\\\"><table width=\\\"600\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" style=\\\"border:none;\\\"><tbody><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"188\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailheader.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr><tr><td bgcolor=\\\"#fbf5de\\\" style=\\\"padding:0px 30px 0px 30px;\\\"><p>Welcome to the Church Growth Research Programme.</p><p>Please click on the link below to activate your account:<p>\".\n\t\t\t\"<p><a href=\\\"$link\\\">$link</a></p><p>Thank you, the Church Growth Reseach Programme website team.</p>\".\n\t\t\t\"</td></tr><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"33\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailfooter.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr></tbody></table></div></body></html>\";\n\t\t$from_email_address = $form['email'];\n\t\t$this->send_mail($emailaddress, SITE_NAME, $from_email_address, 'Account Activation', $body, $body_text);\n\n\t}",
"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 email()\n\t{\n\t\t$this->add('email', 'required', true, 'Email is required.');\n\t\t$this->add('email', 'regexp', '#^[^\\W][a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$#', 'Bad Email format.');\n\t\t$this->add('email', 'max', 30, 'Bad Email length, no more than 30 characters.');\n\n\t\t$this->setInformation('email', 'Email format, no more than 30 characters...');\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}",
"public function send() {\n\t\t\t$emailer = SimpleMail::make()\n\t\t\t->setSubject($this->subject)\n\t\t\t->setMessage($this->body);\n\t\t\t\n\t\t\tforeach ($this->emailto as $contact) {\n\t\t\t\t$emailer->setTo($contact->email, $contact->name);\n\t\t\t}\n\t\t\t\n\t\t\t$emailer->setFrom($this->emailfrom->email, $this->emailfrom->name);\n\t\t\t$emailer->setReplyTo($this->replyto->email, $this->replyto->name);\n\t\t\t\n\t\t\tif ($this->selfbcc) {\n\t\t\t\t$this->add_bcc($this->replyto);\n\t\t\t}\n\t\t\t\n\t\t\t// setBcc allows setting from Array\n\t\t\tif (!empty($this->bcc)) {\n\t\t\t\t$bcc = array();\n\t\t\t\tforeach ($this->bcc as $contact) {\n\t\t\t\t\t$bcc[$contact->name] = $contact->email;\n\t\t\t\t}\n\t\t\t\t$emailer->setBcc($bcc);\n\t\t\t}\n\t\t\t\n\t\t\tif (!empty($this->cc)) {\n\t\t\t\t$cc = array();\n\t\t\t\tforeach ($this->cc as $contact) {\n\t\t\t\t\t$cc[$contact->name] = $contact->email;\n\t\t\t\t}\n\t\t\t\t$emailer->setCc($cc);\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->hasfile) {\n\t\t\t\tforeach($this->files as $file) {\n\t\t\t\t\t$emailer->addAttachment($file);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn $emailer->send();\n\t\t}",
"function signupEmail($edata) {\n\n\t\t\t\t$phone = $edata['mobile'];\n\t\t\t\t$email = $edata['email'];\n\t\t\t\t$password = $edata['password'];\n\t\t\t\t$fullname = $edata['fullname'];\n\t\t\t\t$template = $this->shortcode_variables(\"customersignup\");\n\t\t\t\t$details = email_template_detail(\"customersignup\");\n\n\t\t\t\t$res = $this->settings_model->get_contact_page_details();\n\t\t\t\t$contact_phone = $res[0]->contact_phone;\n\t\t\t\t$contact_email = $res[0]->contact_email;\n\t\t\t\t$contact_address = $res[0]->contact_address;\n\t\t\t\t$accountlink = base_url().'/account';\n\t\t\t\t$membershiplink = base_url().'/membership';\n\n\t\t\t\t$sendto = $details->contect_email;\n\t\t\t\t$ptheme = pt_default_theme();\n\t\t\t\t$this->_config = config_item('theme');\n\t\t\t\t$uu = $this->_config['url'];\n\t\t\t\t$email_temp_img = $uu.$ptheme.'/email_temp_img/gb_email_temp_img/';\n\t\t\t\t$template = array('{fullname}','{password}','{email_temp_img}','{contact_phone}','{contact_email}','{contact_address}','{accountlink}','{membershiplink}');\n\t\t\t\t$values = array($fullname,$password,$email_temp_img,$contact_phone,$contact_email,$contact_address,$accountlink,$membershiplink);\n\t\t\t\t$HTML_DATA = file_get_contents( $uu.$ptheme.'/login_email.html');\n\t\t\t\t$message = str_replace($template, $values, $HTML_DATA);\n\t\t\t\t\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($email);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\n\t\t\t\t/*$phone = $edata['mobile'];\n\t\t\t\t$email = $edata['email'];\n\t\t\t\t$password = $edata['password'];\n\t\t\t\t$fullname = $edata['fullname'];\n\t\t\t\t$template = $this->shortcode_variables(\"customersignup\");\n\t\t\t\t$details = email_template_detail(\"customersignup\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"customersignup\");\n\t\t\t\t$values = array($fullname, $email, $password);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $phone, \"customersignup\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($email);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();*/\n\n\t\t}",
"function sendInformation($name,$company_name,$city,$email,$phone_no,$comments,$company_email)\n\t\t{\n\t\t\t//email will be sent to both the ad owners and admin\n\t\t\t//emaill of admin\n\t\t\t$email_admin = $this->manage_content->getValue('admin_profile','email_add');\n\t\t\t//get email from array $email_admin[0]['email_add']\n\t\t\t$sendMail_admin = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$email_admin[0]['email_add']);\n\t\t\t//send email to ad owner from company.php\n\t\t\t$sendMail_adOwner = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$company_email);\n\t\t}",
"public function website_provider() {\n\t\t\n\t\t$name = Input::get('name');\n\t\t$mailFrom = Input::get('email');\n\t\t$phone = Input::get('phone');\n\t\t$comments = Input::get('comments');\n\t\t$emailTo = '[email protected]';\n\t\t\n\t\t$vars = array(\n\t\t\t'name'\t\t=>\t$name,\n\t\t\t'email'\t\t=>\t$mailFrom,\n\t\t\t'phone'\t\t=>\t$phone,\n\t\t\t'comments'\t=>\t$comments,\n\t\t);\n\n\t\tEmailTemplate::SendByKey('contact_mail_provider', $vars, $emailTo, null, null, $mailFrom);\n\t\t\n\t\t\n\t\treturn \"<fieldset><div id='success_page'><h4 class='highlight'>Obrigado, <strong>$name</strong>! Sua mensagem foi enviada. Entraremos em contato o mais rápido possível.</h4></div></fieldset>\";\n }",
"function sendUpdateEmail($email, $registrant)\n{\n $name = $_SESSION['ctst_name'];\n $subject = $name . \" registration information updated.\";\n $mailContent = $registrant['givenName'] . ' ' . $registrant['familyName'];\n $mailContent .= \":\\n\\n\";\n $mailContent .= \"Your information for the \" . $name . \" has been updated.\\n\";\n $mailContent .= \"\\nIf you did not edit your registration information, \" .\n \"please write to the administrator:\\n\";\n $mailContent .= \"mailto:\" . ADMIN_EMAIL . \"?subject=account%20compromised\\n\";\n $mailContent .= \"\\nright away, or simply reply to this note.\\n\";\n $mailContent .= automatedMessage($name);\n $headers = \"From: \" . ADMIN_EMAIL . \"\\r\\n\";\n do_email($email, $subject, $mailContent, $headers);\n}",
"function aform($setup,$subject,$to,$cc,$bcc,$from) {\n\t\t\n\t\tif (isset($_POST[\"Submit\"])) {\n\t\t\t\n\t\t\t// Compile all POST info\n\t\t\tforeach ($_POST as $key => $value) {\n\t\t\t\t$$key = $value;\t\t\t\t\t\t\t\t\n\t\t\t\tif ($key != \"require\" && $key != \"Submit\" && $key != \"verify\" && $key != \"birthday\") {\n\t\t\t\t\t$message .= \"<span style='text-transform: capitalize; font-weight: 700;'>\".$key.\"</span> \".$value.\"<br /><br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If \"Verify\" is set, then check to see if correct\n\t\t\tif ($birthday != \"\") {\n\t\t\t\tif ($birthday != $verify) {\n\t\t\t\t\t$error .= \"Invalid Verification Code<br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check for \"required\" fields\n\t\t\tif ($require != \"\") {\n\t\t\t\t$dcheck = explode(\",\", $require);\n\t\t\t\t\n\t\t\t\twhile(list($check) = each($dcheck)) {\n\t\t\t\t\tif(!$$dcheck[$check]) {\n\t\t\t\t\t\t$error .= \"The <b>$dcheck[$check]</b> field is required.<br />\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check the Email Address\n\t\t\t$checkEmail = validEmail($_POST[\"email\"]);\n\t\t\tif ($checkEmail != \"1\") {\n\t\t\t\t$error .= \"Your email is not valid. Please correct.<br />\";\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t\n\n\t\t/* Let's start by building the form */\n\t\t$form .= '\n\t\t<form method=\"post\" enctype=\"multipart/form-data\" class=\"form\">';\n\t\t$form .= \"\\n\";\n\t\t\t\t\t\t\t\t\n\t\t// let's loop the PIPES \"|\" and breakdown the UNDERSCORES \"_\" then use this data to build the form\n\t\t\t\t\t\n\t\t$formchunk = explode(\"|\", $setup);\n\t\t\t\t\t\n\t\tforeach ($formchunk as $key => $value) {\n\t\t\t$entrychunk = explode(\"_\", $value);\n\t\t\t$formalname = $entrychunk[0];\n\t\t\t$name = $entrychunk[1];\n\t\t\t$type = $entrychunk[2];\n\t\t\t\n\t\t\tif ($entrychunk[3] == \"required\") {\n\t\t\t\t$required = $entrychunk[3]; // this is an optional field for making it REQUIRED and may not be set\n\t\t\t\t$values = $entrychunk[4]; // this is an optional field for the VALUE and may not be set (most commonly used for \"select\" and \"radio\"\n\t\t\t} else {\n\t\t\t\t$values = $entrychunk[3]; // this is an optional field for the VALUE and may not be set (most commonly used for \"select\" and \"radio\"\n\t\t\t\t$required = $entrychunk[4]; // this is an optional field for making it REQUIRED and may not be set\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$form .= '\t\t\t\t\t\t<div>\n\t\t\t<label>'.$formalname.'</label>';\n\t\t\t$form .= \"\\n\";\n\t\t\tif ($_POST[$name]) {\n\t\t\t\t$valueDisplay = $_POST[$name];\n\t\t\t} else {\n\t\t\t\t$valueDisplay = $values;\n\t\t\t}\n\t\t\t\n\t\t\tswitch ($type) {\n\t\t\t\tcase \"text\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"'.$name.'\" type=\"text\" class=\"text\" id=\"'.$name.'\" value=\"'.$valueDisplay.'\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"password\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"'.$name.'\" type=\"password\" class=\"text\" id=\"'.$name.'\" value=\"'.$valueDisplay.'\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak; \n\t\t\t\tcase \"radio\":\n\t\t\t\t\t$form .= '<div class=\"radios\">';\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" checked\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"radio\" name=\"'.$name.'\" value=\"'.$subvalue.'\" class=\"text radio\"'.$active.'> '.$subvalue.'<br />';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= \"</div>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"checkbox\":\n\t\t\t\t\t$form .= '<div class=\"radios\">';\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" checked\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"'.$name.'\" value=\"'.$subvalue.'\" class=\"text radio\"'.$active.'> '.$subvalue.'<br />';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= \"</div>\";\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase \"select\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<select name=\"'.$name.'\" class=\"text select\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t\t<option value=\"\"></option>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" selected\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t\t<option value=\"'.$subvalue.'\"'.$active.'>'.$subvalue.'</option>';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t</select>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"textarea\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<textarea name=\"'.$name.'\" class=\"text textarea\" id=\"'.$name.'\">'.$valueDisplay.'</textarea>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"file\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"file\" class=\"text\" id=\"'.$name.'\" type=\"file\" />';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"verify\":\n\t\t\t\t\t$verification = rand(1111, 9999);\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"hidden\" value=\"'.$verification.'\" name=\"birthday\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"verifytext\">'.$verification.'</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" value=\"\" name=\"verify\" class=\"text verify\" />';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t\t$form .= '\t\t \t\t\t\t\t<div class=\"clear\"></div>';\n\t\t\t$form .= \"\\n\";\n\t\t\t$form .= '\t\t\t\t\t\t</div>';\n\t\t\t$form .= \"\\n\";\n\t\t\t$form .= \"\\n\";\n\t\t\t\t\n\t\t\tif ($required != \"\") {\n\t\t\t\t$requireding = $name;\n\t\t\t\tif ($req != \"\") {\n\t\t\t\t\t$req .= ','.$requireding;\n\t\t\t\t} else {\n\t\t\t\t\t$req .= $requireding;\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\t\n\t\t$form .= '\n\t\t<div>\n\t\t\t<label><input type=\"hidden\" name=\"require\" value=\"'.$req.'\" /> </label>\n\t\t\t<input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"submit\">\n\t\t\t<div class=\"clear\"></div>\n\t\t</div>\n\t\t</form>';\n\n\t\t\n\t\tif (isset($_POST[\"Submit\"])) {\n\n\n\t\t\tif ($_FILES['file']['tmp_name'] != \"\") {\n\n\t\t\t\t/* Attachment */\n\t\t\t\t$uploadto = $GLOBALS[\"uploadfolder\"];\n\t\t\t\t$docroot = $GLOBALS[\"documentroot\"];\n\t\t\t\t\n\t\t\t\t// Check Entension\n\t\t\t\t$extension = pathinfo($_FILES['file']['name']);\n\t\t\t\t$extension = $extension[extension];\n\t\t\t\t$allowed_paths = explode(\", \", $GLOBALS[\"allowed_ext\"]);\t\t\t\t\t\t\n\t\t\t\tfor($i = 0; $i < count($allowed_paths); $i++) {\n\t\t\t\t\tif ($allowed_paths[$i] == \"$extension\") {\n\t\t\t\t\t\t$ok = \"1\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// Check File Size\n\t\t\t\tif ($ok == \"1\") {\n\t\t\t\t\tif($_FILES['file']['size'] > $GLOBALS[\"max_size\"]) {\n\t\t\t\t\t\t$error .= \"File size is too big!<br />\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ok = \"2\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\n\t\t\tif($error != \"\") {\n\t\t\t\t$fullmessage .= \"<p>\".$error.\"</p>\";\n\t\t\t\t$fullmessage .= $form;\n\t\t\t\treturn $fullmessage;\n\t\t\t} else { \n\t\t\t\t//success!\n\t\t\t\t\n\t\t\t\tif ($_FILES['file']['tmp_name'] == \"\") {\n\t\t\t\t\t/* No Attachment */\n\t\t\t\t\t$send_to = $to;\n\t\t\t\t\t$send_cc = $cc;\n\t\t\t\t\t$send_bcc = $bcc;\n\t\t\t\t\t$send_from = $from;\n\t\t\t\t\t$send_subject = $subject;\n\t\t\t\t\t$message .= \"IP Address: \".$_SERVER['REMOTE_ADDR']; \n\t\t\t\t\tamail($send_to,$send_cc,$send_bcc,$send_from,$send_subject,$message);\t\n\t\t\t\t\treturn \"<p>\".$GLOBALS[\"success\"].\"</p>\";\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\tif ($ok == \"2\") {\n\t\t\t\t\t\t@move_uploaded_file($_FILES['file']['tmp_name'], $uploadto.$_FILES['file']['name']);\n\t\t\t\t\t\t// how to use\n\t\t\t\t\t\t$my_file = $_FILES['file']['name'];\n\t\t\t\t\t\t$my_path = $doc.$uploadto;\n\t\t\t\t\t\t$my_name = $from;\n\t\t\t\t\t\t$my_mail = $from;\n\t\t\t\t\t\t$send_cc = $cc;\n\t\t\t\t\t\t$send_bcc = $bcc;\n\t\t\t\t\t\t$my_replyto = $from;\n\t\t\t\t\t\t$my_to = $to;\n\t\t\t\t\t\t$my_subject = $subject;\n\t\t\t\t\t\t$message .= \" IP Address: \".$_SERVER['REMOTE_ADDR'];\n\t\t\t\t\t\tmail_attachment($my_file, $my_path, $my_to, $my_mail, $my_name, $my_replyto, $my_subject, $message, $cc, $bcc);\t\t\t\t\t\t\t\n\t\t\t\t\t\treturn \"<p>\".$GLOBALS[\"success\"].\"</p>\";\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t} else {\n\t\t\treturn $form;\n\t\t}\n\t}",
"public function sendsupportmail(){\r\n $mail_to = \"\";\r\n $fromaddress = \"[email protected]\";//\"[email protected]\"; \r\n $receipient_email = $_POST[\"receipient_email\"];\r\n $receipient_message = $_POST[\"receipient_message\"];\r\n $subject = $_POST[\"subject\"];\r\n $mail_to = (isset($_POST[\"mail_to\"]))?$_POST[\"mail_to\"]:\"\";\r\n\r\n if($mail_to ==\"acads\"){\r\n $subject = $_POST[\"subject\"].' --- '.$receipient_email;\r\n $toaddress = \"[email protected]\";//[email protected]\r\n $ccaddress = \"[email protected]\";//\"[email protected]\";\r\n $ccaddress .= \",[email protected]\";//\"[email protected]\";\r\n }else{\r\n $toaddress = \"[email protected]\";\r\n $ccaddress = \"\";//\"[email protected]\";\r\n }\r\n $mail_response = $this->sendemails($fromaddress,$toaddress,$receipient_email,$receipient_message,$subject,$ccaddress);\r\n echo $mail_response;\r\n }",
"public function sendEmail()\n {\n $templateId = 'email_delivery_time'; // template id\n $fromEmail = '[email protected]'; // sender Email id\n $fromName = 'Admin'; // sender Name\n $toEmail = '[email protected]'; // receiver email id\n\n try {\n $storeId = $this->storeManager->getStore()->getId();\n\n $from = ['email' => $fromEmail, 'name' => $fromName];\n// $this->inlineTranslation->suspend();\n try {\n// $transport = $this->transportBuilder\n// ->setTemplateIdentifier($templateId)\n// ->setTemplateVars([])\n// ->setTemplateOptions(\n// [\n// 'area' => Area::AREA_FRONTEND,\n// 'store' => $storeId\n// ]\n// )\n// ->setFromByScope($from)\n// ->addTo($toEmail)\n// ->getTransport();\n//\n// $transport->sendMessage();\n $templateVars = [];\n $transport = $this->transportBuilder->setTemplateIdentifier('59')\n ->setTemplateOptions( [ 'area' => \\Magento\\Framework\\App\\Area::AREA_FRONTEND, $storeId => 1 ] )\n ->setTemplateVars( $templateVars )\n ->setFrom( [ \"name\" => \"Magento ABC CHECK PAYMENT\", \"email\" => \"[email protected]\" ] )\n ->addTo('[email protected]')\n ->setReplyTo('[email protected]')\n ->getTransport();\n $transport->sendMessage();\n } finally {\n $this->inlineTranslation->resume();\n }\n } catch (\\Exception $e) {\n $this->_logger->info($e->getMessage());\n }\n }",
"function toHTML(){\n\t\t$objEmailAddressInput = new Input(\"strEmailAddress\", \"strEmailAddressID\");\n\t\t$objEmailAddressInput->setClass(\"box\");\n\t\t$objEmailAddressInput->setValue(\"\");\n\t\t\n\t\t// Create the sender input box\n\t\t$objSenderInput = new Input(\"strSender\", \"strSenderID\");\n\t\t$objSenderInput->setClass(\"box\");\n\t\t$objSenderInput->setValue(\"\");\n\t\t\n\t\t// Create the text message input box\n\t\t$objEmailTextArea = new textArea(\"strEmailText\",\"strEmailTextID\");\n\t\t$objEmailTextArea->setClass(\"box\");\n\t\t$objEmailTextArea->setValue(\"\");\n\t\t\n\t\t// Create the email button input box\n\t\t$objSendEmailButton = new Button(\"strSendEmail\", \"strSendEmailID\");\n\t\t$objSendEmailButton->setValue(\"Send\");\n\t\t$objSendEmailButton->setAction(\"main.php\");\n\t\t\n\t\t// Determine if there are any error messages to be displayed\n\t\t$errorEmailAddress = get_error_message('strEmailAddress.err');\n\t\t$errorSender = get_error_message('strSender.err');\n\t\t$errorText = get_error_message('strEmailText.err');\n\t\t\n\t\t// Reload the email address, sender, or message session if it exists\n\t\tif(array_key_exists('strEmailAddress', $_SESSION))\n\t\t\t$objEmailAddressInput->setValue($_SESSION['strEmailAddress']);\n\t\tif(array_key_exists('strSender', $_SESSION))\n\t\t\t$objSenderInput->setValue($_SESSION['strSender']);\n\t\tif(array_key_exists('strEmailText', $_SESSION))\n\t\t\t$objEmailTextArea->setValue($_SESSION['strEmailText']);\n\t\t\n\t\t// Display the form in html\n\t\t$strHTML = \"<h2>Contact Us</h2>\n\t\t\t\t\t<p>\" . $this->_strText . \"</p>\". \n\t\t\t\t\t\"<form action=\\\"verifyEmail.php\\\" method=\\\"POST\\\">\n\t\t\t\t\t\t<div class=\\\"outerbox\\\"><br/>\n\t\t\t\t\t\t\tYour email address:<br/>\". \n\t\t\t\t\t\t\t\t$objEmailAddressInput->toHTML() . $errorEmailAddress . \"<br/>\". \n\t\t\t\t\t\t\t\"Name:<br/>\". \n\t\t\t\t\t\t\t\t$objSenderInput->toHTML() . $errorSender . \"<br/>\" . \n\t\t\t\t\t\t\t\"Message:<br/>\". \n\t\t\t\t\t\t\t\t$objEmailTextArea->toHTML() . $errorText . \"<br/>\". \n\t\t\t\t\t\t\t\"<br/><div class=\\\"toright\\\">\" . \n\t\t\t\t\t\t\t$objSendEmailButton->toHTML() . \n\t\t\t\t\t\t\"</div>\n\t\t\t\t\t</form></div>\";\n\t\t\t\t\t\t\t\n\t\treturn $strHTML;\n\t}",
"function email_admin($common,$db_object,$user_id,$post_var,$error_msg,$default)\n \t{\n\n \twhile(list($kk,$vv)=@each($post_var))\n\t\t{\n\n\t\t$$kk=$vv;\n\t\n\t\t}\n\t\n\t\t\n\t$empl_id = $user_id_all;\n\n//codings for sending email to the system owner....\n\t\n\t$config=$common->prefix_table(\"config\");\n\t$appraisal_table=$common->prefix_table(\"appraisal\");\n \t$user=$common->prefix_table(\"user_table\");\n\t\n\t\n\t$mysql=\"select tasubject,tamessage from $config\";\n\t$rslt_arr=$db_object->get_a_line($mysql);\n\n\n\n\t$tasubject=$rslt_arr[\"tasubject\"];\n\t$tamessage=$rslt_arr[\"tamessage\"];\n\n\n\tpreg_match(\"/<{test_loopstart}>(.*?)<{test_loopend}>/s\",$tamessage,$match);\n\t\n\t$newmatch = $match[1];\n\t$str = \"\";\n\tfor($i=0;$i<count($empl_id);$i++)\n\t{\n\t\t$subqry2=\"select username,email from $user where user_id='$empl_id[$i]'\";\n\n\t\t$user_name=$db_object->get_a_line($subqry2);\n\t\t//$to=$user_name[\"username\"].\"[email protected]\";\n\t\t$to=$user_name[\"email\"];\n\n\t\t$subqry2=\"select email from $user where user_id='1'\";\n\n\t\t$sys_email=$db_object->get_a_line($subqry2);\n\t\t$from=$sys_email[\"email\"];\n\t\t\n\t\t$mysql = \"select test_mode,test_type from $appraisal_table where user_id='$empl_id[$i]'\";\n\n\t\t$testdetails_arr = $db_object->get_rsltset($mysql);\n\n\t\tfor($j=0;$j<count($testdetails_arr);$j++)\n\t\t{\n\t\t\t$test_mode = $testdetails_arr[$j][\"test_mode\"];\n\t\t\t$test_type = $testdetails_arr[$j][\"test_type\"];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($test_mode == \"Test\")\n\t\t\t{\n\t\t\t\t$mess_test_mode = \"Test Mode\";\n\t\t\t}\n\t\t\telseif($test_mode == \"360\")\n\t\t\t{\n\t\t\t\t$mess_test_mode = \"360 Mode\";\n\t\t\t}\n\t\t\tif($test_type == \"t\")\n\t\t\t{\n\t\t\t\t$mess_test_type = \"Technical\";\n\t\t\t}\n\t\t\telseif($test_type == \"i\")\n\t\t\t{\n\t\t\t\t$mess_test_type = \"Inter Personal\";\n\t\t\t}\n\t\t\n\t$str .= preg_replace(\"/<{(.*?)}>/e\",\"$$1\",$newmatch);\n\n\n\t\t\n\t\t}\n\n\n\n$tamessage = preg_replace(\"/<{test_loopstart}>(.*?)<{test_loopend}>/s\",$str,$tamessage);\n\n\n$values[\"username\"]\t\t=$user_name[\"username\"];\n$values[\"login_username\"] \t= $user_name[\"username\"];\n\n$values[\"url\"]=$common->http_path.\"/index.php\";\n\n$tamessage1=$common->direct_replace($db_object,$tamessage,$values);\n\n\n//echo \"to $to<br> sub $tasubject<br> mess $tamessage1<br> from $from<br><br>\";\n\n$sent=$common->send_mail($to,$tasubject,$tamessage1,$from);\n\n\t}\n\tif($sent)\n\t\t{\n\t\t\n\t\t\techo $error_msg[\"cAppraisalMail_sent\"];\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo $error_msg[\"cAppraisalMail_fail\"];\n\t\t}\n\n}",
"function send_mails() {\n\t //$myactivebatch = $this->load_saved_batch();//load direct from file\n\t $myactivebatch = GetParam('batchrestore');//load in html form field and save as param\n\t //echo '>',$myactivebatch;\n\t \n\t $batch = GetReq('batchid');\n\t $bid = GetParam('bid')?GetParam('bid'):0; \n\t \t \n\t $include_subs = GetParam('includesubs');\n\t $include_all = GetParam('includeall');\t \n\t $subscribers = $include_subs?$include_subs:$include_all;//one or another\n\t\n\t $from = GetParam('from');\n\t $to = GetParam('to');\t \n\t $subject = GetParam('subject');\n\t \n\t if ($this->template) {\n\t if ($this->dirdepth) {\n\t\t for($i=0;$i<$this->dirdepth;$i++)\n\t\t\t $backdir .= \"../\";\n\t\t }\n\t\t else\n\t\t $backdir = \"../\";\n\t\t //repalce viewable data to send data (absolute dir)\t \n\t\t //echo $backdir;\n\t\t if ($this->mailbody)//get session text with headers\n\t\t $body = $this->mailbody;\n\t\t else //get text area\n\t $body = str_replace($backdir,$this->url.$this->infolder.'/',GetParam('mail_text')); \t \n\t }\t \n\t else\t{ //text area or session text with headers\n\t \n\t if (GetReq('editmode')) {\n\t\t $mytext = $this->mailbody?$this->mailbody:GetParam('mail_text');\n\t\t $body = $this->unload_spath($mytext);\n\t\t }\n\t\t else\n\t $body = $this->mailbody?$this->mailbody:GetParam('mail_text'); \n\t }\t \t \n\t \t \n\t\t \n\t if ($subscribers) {// || ($batch)) {//if sybs checked or batch in process..\n\t \n\t //save the current mail campaign state\n\t $this->save_current_batch($batch);\t\n\t \t \t \n\t //$subs = $this->subs_mail;\n\t\t \n\t\t //workinh batch tosend\n\t\t $subs = $this->getmails($include_all,$this->batch,$bid);\n\t\t \n\t if (($batch>=0) && ($batch>=$myactivebatch)) {\n\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body.'+'.$subs)) {\n if ($res = $this->sendit($from,$to,$subject,$body,$subs,$this->ishtml)) {\n\t $this->mailmsg = $res . \" mail(s) send!\";\n\t }\t \n\t else \n\t $this->mailmsg = \"Send failed\";\n\t\t }\n\t\t else \t\n\t\t $this->mailmsg = \"Send bypassed\"; \n\t }\t \n\t else {//one receipent\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body))\n\t\t if ($res = $this->sendit($from,$to,$subject,$body,null,$this->ishtml)) \n\t\t $this->mailmsg = $res . \" mail(s) send!\";\n\t\t else\n\t\t $this->mailmsg = \"Send failed\";\t\n\t }\t \n\t\t \n\t //auto refresh\n\t $refresh = GetParam('refresh')?GetParam('refresh'):$this->auto_refresh;\n\t if (($refresh>0) && ($res==$this->batch)) {\n $this->refresh_bulk_js(seturl('t=cpsubsend&batchid='.($bid+1).'&batch='.$this->batch.'&refresh='.$refresh),$refresh);\t\t\t \n\t $this->mailmsg .= \"Wait for next batch \" . $this->timeout;\t\t \n\t }\t \n\t \n\t //test\n\t //return $this->batch;\n //return (400);\t \t //??????????????????????????????????????????????????\n\t //echo '---------------------',$res,'---------------------------<br>';\n\t \n\t if ($res<$this->batch) //means end of campaign\n\t $this->reset_batch_state();\n\t \n\t return ($res);//how many mails tried to send (batch...)\t \n\t}",
"function changeEmail() {\r\n\r\n\tglobal $SALT;\r\n\tglobal $DB;\r\n\tglobal $MySelf;\r\n\r\n\t// Are we allowed to change our email?\r\n\tif (!$MySelf->canChangeEmail()) {\r\n\t\tmakeNotice(\"You are not allowed to change your email. Ask your CEO to re-enable this feature for your account.\", \"error\", \"Forbidden\");\r\n\t}\r\n\r\n\t/*\r\n\t* At this point we know that the user who submited the\r\n\t* email change form is both legit and the form was not tampered\r\n\t* with. Proceed with the email-change.\r\n\t*/\r\n\r\n\t// its easier on the eyes.\r\n\t$email = sanitize($_POST[email]);\r\n\t$username = $MySelf->getUsername();\r\n\r\n\t// Update the Database. \r\n\tglobal $IS_DEMO;\r\n\tif (!$IS_DEMO) {\r\n\t\t$DB->query(\"update users set email = '$email', emailvalid = '0' where username = '$username'\");\r\n\t\tmakeNotice(\"Your email information has been updated. Thank you for keeping your records straight!\", \"notice\", \"Information updated\");\r\n\t} else {\r\n\t\tmakeNotice(\"Your email would have been changed. (Operation canceled due to demo site restrictions.)\", \"notice\", \"Email change confirmed\");\r\n\t}\r\n\r\n}",
"private function sendMail() {\n $BodyMail = new BodyMail();\n //$to = $this->_datPerson[email];\n $to = '[email protected]';\n\n $url = baseUri.\"linkCode?code=\".base64_encode($this->_code).\"&email=\".base64_encode($this->_datPerson[email]);\n\n $subject = \"DEV-Validación de Email\";\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\n $headers .= 'From: Evaluacione Red UNOi <[email protected]>'.\"\\r\\n\";\n $headers .= 'Reply-To: NoReply <[email protected]>' . \"\\r\\n\";\n $headers .= 'Bcc: [email protected]' . \"\\r\\n\";\n $message = $BodyMail->run($this->_datPerson['name'], $this->_code, $url);\n mail($to, $subject, $message, $headers, '-f [email protected]');\n }",
"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('[email protected]');\n// //$email->addReceiver($data['email']);\n $email->setSubject('Activiteit 2020');\n $email->setHtmlBody($this->smarty->fetch(\"intermediairFormEmail.html\"));\n $email->setSender(\"[email protected]\");\n $email->send();\n }",
"function emailTemplate($username, $password, $idcode ,$expiredate ,$package, $typePackage, $note,$isMagDevice)\n{\n\n if ($typePackage == \"IPTV\") {\n if ($isMagDevice == \"1\") {\n $corpo_credenziali = '<b>Link Portal:</b> ';\n $corpo_credenziali .= \"http://satopen-iptv.ddns.net:8000/c/\";\n $corpo_credenziali .= '<br><br><b>Package:</b> ';\n $corpo_credenziali .= \"IPTV $package\";\n $corpo_credenziali .= '<br><b>Expire Date:</b> ';\n $corpo_credenziali .= \"$expiredate (Year/Month/Day)\";\n $corpo_credenziali .= '<br><b>Payment Id-Code:</b> ';\n $corpo_credenziali .= \"$idcode\";\n $corpo_credenziali .= '<br><b>Note:</b> ';\n $corpo_credenziali .= \"$note\";\n $corpo_credenziali .= '<br><br><b>Iptv Note:</b> ';\n $corpo_credenziali .= '<br>Usage Google DNS on your device or router: 8.8.8.8 (Primary) 8.8.4.4 (Secondary)<br>Download and Install Our Enigma 2 Plugin http://satopen-panel.ddns.net/Download/IptvGate_World.ipk<br>Automatic Update Of Channel List, Personalizate Bouquet Channel, Play & Pause, Forward & Rewind, Search VOD, Account Info and many more<br>';\n \n }\n else {\n $corpo_credenziali = '<b>Username:</b> ';\n $corpo_credenziali .= \"$username\";\n $corpo_credenziali .= '<br><b>Password:</b> ';\n $corpo_credenziali .= \"$password\";\n $corpo_credenziali .= '<br><br><b>Your IPTV Account Data - AutoScript Enigma2:</b> ';\n $corpo_credenziali .= \"wget -O /etc/enigma2/iptv.sh \\\"http://satopen-iptv.ddns.net:8000/get.php?username=$username&password=$password&type=enigma22_script&output=mpegts\\\" && chmod 777 /etc/enigma2/iptv.sh && /etc/enigma2/iptv.sh\";\n $corpo_credenziali .= '<br><br><b>Your IPTV Account Data - Link VLC/Android/IOS/Smart-Tv Player:</b> ';\n $corpo_credenziali .= \"http://satopen-iptv.ddns.net:8000/get.php?username=$username&password=$password&type=m3u_plus&output=mpegts\";\n $corpo_credenziali .= '<br><br><b>Plugin WorldTeam 2.0:</b> ';\n $corpo_credenziali .= \"wget -q -O /tmp/IptvGate_World.ipk http://app-world.dyndns.tv/addons/plugin/tar/IptvGate_World.ipk; chmod 777 /tmp/IptvGate_World.ipk; opkg install /tmp/IptvGate_World.ipk; sleep 5; killall -9 enigma2\";\n $corpo_credenziali .= '<br><b>After open the Plugina and insert your Username and Password</b>';\n $corpo_credenziali .= '<br><br><b>Package:</b> ';\n $corpo_credenziali .= \"IPTV $package\";\n $corpo_credenziali .= '<br><b>Expire Date:</b> ';\n $corpo_credenziali .= \"$expiredate (Year/Month/Day)\";\n $corpo_credenziali .= '<br><b>Payment Id-Code:</b> ';\n $corpo_credenziali .= \"$idcode\";\n $corpo_credenziali .= '<br><b>Note:</b> ';\n $corpo_credenziali .= \"$note\";\n $corpo_credenziali .= '<br><br><b>Iptv Note:</b> ';\n $corpo_credenziali .= '<br>Usage Google DNS on your device or router: 8.8.8.8 (Primary) 8.8.4.4 (Secondary)<br>Download and Install Our Enigma 2 Plugin http://satopen-panel.ddns.net/Download/IptvGate_World.ipk<br>Automatic Update Of Channel List, Personalizate Bouquet Channel, Play & Pause, Forward & Rewind, Search VOD, Account Info and many more<br>';\n } \n }\n else {\n $corpo_credenziali = '<b>Username:</b> ';\n $corpo_credenziali .= \"$username\";\n $corpo_credenziali .= '<br><b>Password:</b> ';\n $corpo_credenziali .= \"$password\";\n $corpo_credenziali .= '<br><br><b>Your CardSharing Account Data - CLine:</b><br>';\n $corpo_credenziali .= \"C: satopen-client.ddns.net 23000 $username $password\";\n $corpo_credenziali .= '<br><br><b>Package:</b> ';\n $corpo_credenziali .= \"Cardsharing $package\";\n $corpo_credenziali .= '<br><b>Expire Date:</b> ';\n $corpo_credenziali .= \"$expiredate (Year/Month/Day)\";\n $corpo_credenziali .= '<br><b>Payment Id-Code:</b> ';\n $corpo_credenziali .= \"$idcode\";\n $corpo_credenziali .= '<br><b>Note:</b> ';\n $corpo_credenziali .= \"$note\";\n $corpo_credenziali .= '<br><br><b>CardSharing Note:</b> ';\n $corpo_credenziali .= '<br>Usage Google DNS on your device or router: 8.8.8.8 (Primary) 8.8.4.4 (Secondary)<br>Download and Install Our CCcam.prio in your decoder for fast zapping and zero freeze<br>http://www.satopen.cc/setup-cccam.html<br>';\n\n }\n\n \n \n $GLOBALS['head_email'] = '<html xmlns=\"http://www.w3.org/1999/xhtml\"> <head>\n\t\t\t\t <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t\t\t <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n\t\t\t\t <title>SatOpen Email</title>\n\t\t\t\t <style type=\"text/css\"> \n\t\t\t\t img {\n\t\t\t\t max-width: 600px;\n\t\t\t\t outline: none;\n\t\t\t\t text-decoration: none;\n\t\t\t\t -ms-interpolation-mode: bicubic;\n\t\t\t\t }\n\n\t\t\t\t a {\n\t\t\t\t border: 0;\n\t\t\t\t outline: none;\n\t\t\t\t }\n\n\t\t\t\t a img {\n\t\t\t\t border: none;\n\t\t\t\t }\n\n\t\t\t\t /* General styling */\n\n\t\t\t\t td, h1, h2, h3 {\n\t\t\t\t font-family: Helvetica, Arial, sans-serif;\n\t\t\t\t font-weight: 400;\n\t\t\t\t }\n\n\t\t\t\t td {\n\t\t\t\t font-size: 13px;\n\t\t\t\t line-height: 19px;\n\t\t\t\t text-align: left;\n\t\t\t\t }\n\n\t\t\t\t body {\n\t\t\t\t -webkit-font-smoothing:antialiased;\n\t\t\t\t -webkit-text-size-adjust:none;\n\t\t\t\t width: 100%;\n\t\t\t\t height: 100%;\n\t\t\t\t color: #37302d;\n\t\t\t\t background: #ffffff;\n\t\t\t\t }\n\n\t\t\t\t table {\n\t\t\t\t border-collapse: collapse !important;\n\t\t\t\t }\n\n\n\t\t\t\t h1, h2, h3, h4 {\n\t\t\t\t padding: 0;\n\t\t\t\t margin: 0;\n\t\t\t\t color: #444444;\n\t\t\t\t font-weight: 400;\n\t\t\t\t line-height: 110%;\n\t\t\t\t }\n\n\t\t\t\t h1 {\n\t\t\t\t font-size: 35px;\n\t\t\t\t }\n\n\t\t\t\t h2 {\n\t\t\t\t font-size: 30px;\n\t\t\t\t }\n\n\t\t\t\t h3 {\n\t\t\t\t font-size: 24px;\n\t\t\t\t }\n\n\t\t\t\t h4 {\n\t\t\t\t font-size: 18px;\n\t\t\t\t font-weight: normal;\n\t\t\t\t }\n\n\t\t\t\t .important-font {\n\t\t\t\t color: #21BEB4;\n\t\t\t\t font-weight: bold;\n\t\t\t\t }\n\n\t\t\t\t .hide {\n\t\t\t\t display: none !important;\n\t\t\t\t }\n\n\t\t\t\t .force-full-width {\n\t\t\t\t width: 100% !important;\n\t\t\t\t }\n\n\t\t\t\t </style>\n\n\t\t\t\t <style type=\"text/css\" media=\"screen\">\n\t\t\t\t @media screen {\n\t\t\t\t\t@import url(http://fonts.googleapis.com/css?family=Open+Sans:400);\n\n\t\t\t\t\t/* Thanks Outlook 2013! */\n\t\t\t\t\ttd, h1, h2, h3 {\n\t\t\t\t\t font-family: Open Sans, Helvetica Neue, Arial, sans-serif !important;\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t </style>\n\n\t\t\t\t <style type=\"text/css\" media=\"only screen and (max-width: 600px)\">\n\t\t\t\t /* Mobile styles */\n\t\t\t\t @media only screen and (max-width: 600px) {\n\n\t\t\t\t table[class=\"w320\"] {\n\t\t\t\t\twidth: 320px !important;\n\t\t\t\t }\n\n\t\t\t\t table[class=\"w300\"] {\n\t\t\t\t\twidth: 300px !important;\n\t\t\t\t }\n\n\t\t\t\t table[class=\"w290\"] {\n\t\t\t\t\twidth: 290px !important;\n\t\t\t\t }\n\n\t\t\t\t td[class=\"w320\"] {\n\t\t\t\t\twidth: 320px !important;\n\t\t\t\t }\n\n\t\t\t\t td[class~=\"mobile-padding\"] {\n\t\t\t\t\tpadding-left: 14px !important;\n\t\t\t\t\tpadding-right: 14px !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-padding-left\"] {\n\t\t\t\t\tpadding-left: 14px !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-padding-right\"] {\n\t\t\t\t\tpadding-right: 14px !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-padding-left-only\"] {\n\t\t\t\t\tpadding-left: 14px !important;\n\t\t\t\t\tpadding-right: 0 !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-padding-right-only\"] {\n\t\t\t\t\tpadding-right: 14px !important;\n\t\t\t\t\tpadding-left: 0 !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-block\"] {\n\t\t\t\t\tdisplay: block !important;\n\t\t\t\t\twidth: 100% !important;\n\t\t\t\t\ttext-align: left !important;\n\t\t\t\t\tpadding-left: 0 !important;\n\t\t\t\t\tpadding-right: 0 !important;\n\t\t\t\t\tpadding-bottom: 15px !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-no-padding-bottom\"] {\n\t\t\t\t\tpadding-bottom: 0 !important;\n\t\t\t\t }\n\n\t\t\t\t td[class~=\"mobile-center\"] {\n\t\t\t\t\ttext-align: center !important;\n\t\t\t\t }\n\n\t\t\t\t table[class*=\"mobile-center-block\"] {\n\t\t\t\t\tfloat: none !important;\n\t\t\t\t\tmargin: 0 auto !important;\n\t\t\t\t }\n\n\t\t\t\t *[class*=\"mobile-hide\"] {\n\t\t\t\t\tdisplay: none !important;\n\t\t\t\t\twidth: 0 !important;\n\t\t\t\t\theight: 0 !important;\n\t\t\t\t\tline-height: 0 !important;\n\t\t\t\t\tfont-size: 0 !important;\n\t\t\t\t }\n\n\t\t\t\t td[class*=\"mobile-border\"] {\n\t\t\t\t\tborder: 0 !important;\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t </style>\n\t\t\t\t</head>';\n\nif ($typePackage == \"IPTV\") {\n $corpo_email = $GLOBALS['head_email'];\n $corpo_email .= ' \n\t\t\t\t<body class=\"body\" style=\"padding:0; margin:0; display:block; background:#ffffff; -webkit-text-size-adjust:none\" bgcolor=\"#ffffff\">\n\t\t\t\t<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\">\n\t\t\t\t <tr>\n\t\t\t\t <td align=\"center\" valign=\"top\" bgcolor=\"#ffffff\" width=\"100%\">\n\n\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n\t\t\t\t <tr>\n\t\t\t\t\t<td style=\"background:#1f1f1f\" width=\"100%\">\n\n\t\t\t\t\t <center>\n\t\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"600\" class=\"w320\">\n\t\t\t\t\t <tr>\n\t\t\t\t\t\t<td valign=\"top\" class=\"mobile-block mobile-no-padding-bottom mobile-center\" width=\"270\" style=\"background:#1f1f1f;padding:10px 10px 10px 20px;\">\n\t\t\t\t\t\t <a data-click-track-id=\"1262\" href=\"#\" style=\"text-decoration:none;\">\n\t\t\t\t\t\t <img src=\"http://www.satopen.cc/uploads/1/3/3/0/13301587/1460553356.png\" width=\"142\" height=\"30\" alt=\"Your Logo\"/>\n\t\t\t\t\t\t </a>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td valign=\"top\" class=\"mobile-block mobile-center\" width=\"270\" style=\"background:#1f1f1f;padding:10px 15px 10px 10px\">\n\t\t\t\t\t\t <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"mobile-center-block\" align=\"right\">\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t <td align=\"right\">\n\t\t\t\t\t\t\t<a data-click-track-id=\"2952\" href=\"https://www.facebook.com/Satopencc-Best-CardSharingIPTV-Server-1738104009796186\">\n\t\t\t\t\t\t\t<img src=\"http://keenthemes.com/assets/img/emailtemplate/social_facebook.png\" width=\"30\" height=\"30\" alt=\"social icon\"/>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </table>\n\t\t\t\t\t </center>\n\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 style=\"border-bottom:1px solid #e7e7e7;\">\n\n\t\t\t\t\t <center>\n\t\t\t\t\t <table cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"w320\">\n\t\t\t\t\t <tr>\n\t\t\t\t\t\t<td align=\"left\" class=\"mobile-padding\" style=\"padding:20px 20px 0\">\n\n\t\t\t\t\t\t <br class=\"mobile-hide\" />\n\n\t\t\t\t\t\t <h1>Account Data on SatOpen.cc!</h1>\n\n\t\t\t\t\t\t <br>\n\t\t\t\t\t\t <b>Your Data for Help Area:</b><br><br>';\n $corpo_email .= $corpo_credenziali;\n $corpo_email .= '\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t <br>\n\n\t\t\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" bgcolor=\"#ffffff\">\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t <td style=\"width:130px;background:#D84A38;\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t <!--[if mso]>\n\t\t\t\t\t\t\t <v:rect xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" href=\"#\" style=\"height:33px;v-text-anchor:middle;width:130px;\" stroke=\"f\" fillcolor=\"#D84A38\">\n\t\t\t\t\t\t\t <w:anchorlock/>\n\t\t\t\t\t\t\t <center>\n\t\t\t\t\t\t\t <![endif]-->\n\t\t\t\t\t\t\t <a href=\"http://satopen.cc\"\n\t\t\t\t\t\t\tstyle=\"background-color:#D84A38;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:18px;font-weight:bold;line-height:33px;text-align:center;text-decoration:none;width:130px;-webkit-text-size-adjust:none;\">SatOpen.CC</a>\n\t\t\t\t\t\t\t <!--[if mso]>\n\t\t\t\t\t\t\t </center>\n\t\t\t\t\t\t\t </v:rect> \n\t\t\t\t\t\t\t <![endif]-->\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t <td width=\"316\" style=\"background-color:#ffffff; font-size:0; line-height:0;\"> </td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t <br><br>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class=\"mobile-hide\" style=\"padding-top:20px;padding-bottom:0;vertical-align:bottom\">\n\t\t\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t <td align=\"right\" valign=\"bottom\" width=\"220\" style=\"padding-right:20px; padding-bottom:0; vertical-align:bottom;\">\n\t\t\t\t\t\t <img style=\"display:block\" src=\"https://www.filepicker.io/api/file/AvB8yENR7OdiUqonW05y\" width=\"174\" height=\"294\" alt=\"iphone\"/>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </table>\n\t\t\t\t\t </center>\n\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 valign=\"top\" style=\"background-color:#f8f8f8;border-bottom:1px solid #e7e7e7;\">\n\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 style=\"background-color:#1f1f1f;\">\n\t\t\t\t\t <center>\n\t\t\t\t\t <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"w320\" style=\"height:100%;color:#ffffff\" bgcolor=\"#1f1f1f\" >\n\t\t\t\t\t <tr>\n\t\t\t\t\t\t<td align=\"right\" valign=\"middle\" class=\"mobile-padding\" style=\"font-size:12px;padding:20px; background-color:#1f1f1f; color:#ffffff; text-align:left; \">\n\t\t\t\t\t\t <a style=\"color:#ffffff;\" href=\"http://www.satopen.cc/support.html\">Contact Us</a> | \n\t\t\t\t\t\t <a style=\"color:#ffffff;\" href=\"https://www.facebook.com/Satopencc-Best-CardSharingIPTV-Server-1738104009796186\">Facebook</a> | \n\t\t\t\t\t\t <a style=\"color:#ffffff;\" href=\"http://www.satopen.cc/support.html\">Support</a>\n\t\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 </center>\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t </table>\n\n\t\t\t\t </td>\n\t\t\t\t </tr>\n\t\t\t\t</table>\n\t\t\t\t</body>\n\t\t\t\t</html>\n\t\t\t\t';\n}\n\nelse {\n $corpo_email = $GLOBALS['head_email'];\n $corpo_email .= ' \n\t\t\t\t<body class=\"body\" style=\"padding:0; margin:0; display:block; background:#ffffff; -webkit-text-size-adjust:none\" bgcolor=\"#ffffff\">\n\t\t\t\t<table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\">\n\t\t\t\t <tr>\n\t\t\t\t <td align=\"center\" valign=\"top\" bgcolor=\"#ffffff\" width=\"100%\">\n\n\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n\t\t\t\t <tr>\n\t\t\t\t\t<td style=\"background:#1f1f1f\" width=\"100%\">\n\n\t\t\t\t\t <center>\n\t\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"600\" class=\"w320\">\n\t\t\t\t\t <tr>\n\t\t\t\t\t\t<td valign=\"top\" class=\"mobile-block mobile-no-padding-bottom mobile-center\" width=\"270\" style=\"background:#1f1f1f;padding:10px 10px 10px 20px;\">\n\t\t\t\t\t\t <a data-click-track-id=\"1262\" href=\"#\" style=\"text-decoration:none;\">\n\t\t\t\t\t\t <img src=\"http://www.satopen.cc/uploads/1/3/3/0/13301587/1460553356.png\" width=\"142\" height=\"30\" alt=\"Your Logo\"/>\n\t\t\t\t\t\t </a>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td valign=\"top\" class=\"mobile-block mobile-center\" width=\"270\" style=\"background:#1f1f1f;padding:10px 15px 10px 10px\">\n\t\t\t\t\t\t <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"mobile-center-block\" align=\"right\">\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t <td align=\"right\">\n\t\t\t\t\t\t\t<a data-click-track-id=\"2952\" href=\"https://www.facebook.com/Satopencc-Best-CardSharingIPTV-Server-1738104009796186\">\n\t\t\t\t\t\t\t<img src=\"http://keenthemes.com/assets/img/emailtemplate/social_facebook.png\" width=\"30\" height=\"30\" alt=\"social icon\"/>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </table>\n\t\t\t\t\t </center>\n\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 style=\"border-bottom:1px solid #e7e7e7;\">\n\n\t\t\t\t\t <center>\n\t\t\t\t\t <table cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"w320\">\n\t\t\t\t\t <tr>\n\t\t\t\t\t\t<td align=\"left\" class=\"mobile-padding\" style=\"padding:20px 20px 0\">\n\n\t\t\t\t\t\t <br class=\"mobile-hide\" />\n\n\t\t\t\t\t\t <h1>Account Data on SatOpen.cc!</h1>\n\n\t\t\t\t\t\t <br>\n\t\t\t\t\t\t <b>Your Data for Help Area:</b><br><br>';\n $corpo_email .= $corpo_credenziali;\n $corpo_email .= '\n\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t <br>\n\n\t\t\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" bgcolor=\"#ffffff\">\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t <td style=\"width:130px;background:#D84A38;\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t <!--[if mso]>\n\t\t\t\t\t\t\t <v:rect xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:w=\"urn:schemas-microsoft-com:office:word\" href=\"#\" style=\"height:33px;v-text-anchor:middle;width:130px;\" stroke=\"f\" fillcolor=\"#D84A38\">\n\t\t\t\t\t\t\t <w:anchorlock/>\n\t\t\t\t\t\t\t <center>\n\t\t\t\t\t\t\t <![endif]-->\n\t\t\t\t\t\t\t <a href=\"http://satopen.cc\"\n\t\t\t\t\t\t\tstyle=\"background-color:#D84A38;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:18px;font-weight:bold;line-height:33px;text-align:center;text-decoration:none;width:130px;-webkit-text-size-adjust:none;\">SatOpen.cc</a>\n\t\t\t\t\t\t\t <!--[if mso]>\n\t\t\t\t\t\t\t </center>\n\t\t\t\t\t\t\t </v:rect> \n\t\t\t\t\t\t\t <![endif]-->\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t <td width=\"316\" style=\"background-color:#ffffff; font-size:0; line-height:0;\"> </td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t <br><br>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class=\"mobile-hide\" style=\"padding-top:20px;padding-bottom:0;vertical-align:bottom\">\n\t\t\t\t\t\t <table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\n\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t <td align=\"right\" valign=\"bottom\" width=\"220\" style=\"padding-right:20px; padding-bottom:0; vertical-align:bottom;\">\n\t\t\t\t\t\t <img style=\"display:block\" src=\"https://www.filepicker.io/api/file/AvB8yENR7OdiUqonW05y\" width=\"174\" height=\"294\" alt=\"iphone\"/>\n\t\t\t\t\t\t </td>\n\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t </table>\n\t\t\t\t\t </center>\n\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 valign=\"top\" style=\"background-color:#f8f8f8;border-bottom:1px solid #e7e7e7;\">\n\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 style=\"background-color:#1f1f1f;\">\n\t\t\t\t\t <center>\n\t\t\t\t\t <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\" class=\"w320\" style=\"height:100%;color:#ffffff\" bgcolor=\"#1f1f1f\" >\n\t\t\t\t\t <tr>\n\t\t\t\t\t\t<td align=\"right\" valign=\"middle\" class=\"mobile-padding\" style=\"font-size:12px;padding:20px; background-color:#1f1f1f; color:#ffffff; text-align:left; \">\n\t\t\t\t\t\t <a style=\"color:#ffffff;\" href=\"http://www.satopen.cc/support.html\">Contact Us</a> | \n\t\t\t\t\t\t <a style=\"color:#ffffff;\" href=\"https://www.facebook.com/Satopencc-Best-CardSharingIPTV-Server-1738104009796186\">Facebook</a> | \n\t\t\t\t\t\t <a style=\"color:#ffffff;\" href=\"http://www.satopen.cc/support.html\">Support</a>\n\t\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 </center>\n\t\t\t\t\t</td>\n\t\t\t\t </tr>\n\t\t\t\t </table>\n\n\t\t\t\t </td>\n\t\t\t\t </tr>\n\t\t\t\t</table>\n\t\t\t\t</body>\n\t\t\t\t</html>\n\t\t\t\t';\n\n}\n\n return array($corpo_email,$corpo_credenziali);\n}",
"public static function sendVerificationMail($email){\n $userId = $email;\n $url = $GLOBALS['server_url'] . $GLOBALS['user_dir'] . $GLOBALS['prj_dir'].\"/controller/verify_mail.php\";\n\n /**\n * Mailer script provided by the school\n * - We just added the $email, $url variables from our site\n */\n // create a new cURL resource\n $ch = curl_init();\n // set URL and other appropriate options\n $id = md5(uniqid(rand(), 1));\n\n $areWeStored = self::storeVerificationMailToDb($userId, $id);\n\n if($areWeStored == true) {\n curl_setopt($ch, CURLOPT_URL, \"http://kark.uit.no/internett/php/mailer/mailer.php?address=\" . $email . \"&url=\" . $url . \"?id=\" . $id);\n //curl_setopt($ch, CURLOPT_URL, \"http://www.dagbladet.no/\");\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // grab URL and pass it to the browser\n $output = curl_exec($ch);\n /**\n * Mailer script provided by the school ends here\n */\n return true;\n }\n else{\n return false;\n }\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 send_mail($input, $name, $email, $user_subject) {\n\n\t\t$options = get_option('id_settings');\n $receiver = $options['id_education_email_addresses_field'];\n\t\t$subject = \"Education input: $user_subject\";\n\n $message = \"<!DOCTYPE html>\n <html>\n <head>\n <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>\n <title>Education input: $subject</title>\n <meta name='viewport' content='width=device-width, initial-scale=1.0'>\n </head>\";\n $message .= \"<body><i>Sent using the contact form at \" . get_site_url() .\n \"</i><br><br>\" . esc_html($input);\n $message .= \"</body>\";\n $message .= \"</html>\";\n\n $message = wordwrap($message, 70);\n\n\t\tif($email !== '') {\n\t\t\t$sender = \"$name <$email>\";\n\t\t} else {\n\t\t\t$sender = \"Anonymous <[email protected]>\";\n\t\t}\n\n\t\t$headers = \"From: $sender\\r\\n\";\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-Type: text/html; charset=UTF-8\\r\\n\";\n\n return wp_mail($receiver, $subject, $message, $headers);\n\n }",
"function _spool_email()\n\t{\n\t\t// ------------------------------------------------------\n\t\t// 'email_send' hook.\n\t\t// - Optionally modifies and overrides sending of email.\n\t\t//\n\t\tif (ee()->extensions->active_hook('email_send') === TRUE)\n\t\t{\n\t\t\t$ret = ee()->extensions->call(\n\t\t\t\t'email_send',\n\t\t\t\tarray(\n\t\t\t\t\t'headers'\t\t=> &$this->_headers,\n\t\t\t\t\t'header_str'\t=> &$this->_header_str,\n\t\t\t\t\t'recipients'\t=> &$this->_recipients,\n\t\t\t\t\t'cc_array'\t\t=> &$this->_cc_array,\n\t\t\t\t\t'bcc_array'\t\t=> &$this->_bcc_array,\n\t\t\t\t\t'subject'\t\t=> &$this->_subject,\n\t\t\t\t\t'finalbody'\t\t=> &$this->_finalbody\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif (ee()->extensions->end_script === TRUE)\n\t\t\t{\n\t\t\t\tee()->extensions->end_script = FALSE;\n\t\t\t\treturn $ret;\n\t\t\t}\n\t\t}\n\n\t\treturn parent::_spool_email();\n\t}",
"private function setEmail()\n {\n\t if ( empty( $_POST['email'] ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n }\n \n $e = trim( $_POST['email'] );\n \n\t\tif ( ! filter_var( $e, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\t$this->data['error']['email'] = 'Please provide a valid email address.';\n $this->error = true;\n return;\n\t\t}\n \n\t\t$this->data['email'] = $e;\n }",
"function sendEmail_owner($details, $sitetitle) {\n\n\t\t\t $currencycode = $details->currCode;\n\t\t\t $currencysign = $details->currSymbol;\n\n\t\t\t $custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$custemail = $details->accountEmail;\n\n\t\t\t\t$sendto = $this->ownerEmail($details->module, $details->itemid);\n\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= \"<h4><b>Order Information</b></h4>\";\n\t\t\t\t$message .= \"Date :\" . $date . \".<br>\";\n\t\t\t\t$message .= \"Invoice No.: \" . $invoiceid . \".<br>\";\n\t\t\t\t//\t$message .= \"Payment Method: \" . $paymethod . \".<br><br>\";\n\t\t\t\t$message .= \"Deposit Amount: \" . $currencycode . \" \" . $currencysign . $deposit . \"<br>\";\n\t\t\t\t$message .= \"Total Amount: \" . $currencycode . \" \" . $currencysign . $totalamount . \"<br><br>\";\n\t\t\t\t$message .= \"<h4><b>Customer Information</b></h4>\";\n\t\t\t\t$message .= \"Customer ID: \" . $custid . \"<br>\";\n\t\t\t\t$message .= \"Name : \" . $name . \"<br>\";\n\t\t\t\t$message .= \"Email : \" . $custemail . \"<br>\";\n\t\t\t\tif(!empty($country)){\n\t\t\t\t$message .= \"Country : \" . $country . \"<br>\";\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$message .= \"Phone : \" . $phone . \"<br>\";\n\t\t\t\t$message .= \"<br> To view Invoice visit at: <a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('New Booking Notification');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}",
"static function sendInfo( $email, $firstName = '', $lastName = '', $companyName = '' )\n\t{\n\t $vars = array('FirstName' => $firstName,\n 'LastName' => $lastName,\n 'CompanyName' => '',\n 'Address' => $email,\n 'CID' => self::CID,\n 'Group' => self::GROUP,\n 'RedirectURL' => \"http://success\"\n );\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, self::NEWZAPP_SUBSCRIBE_URL);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\n\n \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query( $vars ) );\n\n $data = curl_exec($ch);\n if ($data) {\n if(strpos($data,'success') ) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\t \n\t}",
"private function fromListSendMail($email_info = array(), $seeker_email_info = array(), $to = 'seeker')\r\t{\r\t\trequire_once 'Project/Code/1_Website/Applications/User_Account/Modules/mail/email.php';\r\t\t\r\t\t$from_email = \"[email protected]\";\r\t\t$from_name\t= \"Raymond\";\r\t\t$subject\t= \"New Lead from Looking for Eldercare\";\r\t\t\r\t\t\r\t\t$images = array(\r\t\t\t'banner'\t=> 'Project/Design/1_Website/Applications/Seeker/images/Eldercare-email-template-banner.png',\r\t\t\t'icon'\t\t=> 'Project/Design/1_Website/Applications/Seeker/images/Eldercare-email-template-icon.png',\r\t\t\t'logo'\t\t=> 'Project/Design/1_Website/Applications/Seeker/images/Eldercare-email-template-logo.png'\r\t\t);\r\t\t\r\t\tif ($to == 'seeker')\r\t\t{\r\t\t\t$view = new seekerView();\r\t\t\t$view->_set('email_to', $to);\r\t\t\t$view->_set('email_info', $seeker_email_info);\r\t\t\t\r\t\t\t$body = $view->displayEmailTemplate();\r\t\t\t\r\t\t\tforeach ($email_info['hcp'] as $hcp)\r\t\t\t{\r\t\t\t\temail::send_email($hcp['email'], $hcp['name'], $from_email, $from_name, $subject, $body, '', '', $images);\r\t\t\t}\r\t\t}\r\t\t\r\t\telse\r\t\t{\r\t\t\t$view = new seekerView();\r\t\t\t$view->_set('email_to', $to);\r\t\t\t\r\t\t\tinclude_once 'Project/Code/System/House_Type/house_types.php';\r\t\t\t$house_types = new house_types();\r\t\t\t//var_dump($house_types->selectHcpHouseTypeArray('17'));die;\r\t\t\t$counter = 0; //Manual looping to get the house types of each hcp\r\t\t\t$house_type_temp = '';\r\t\t\tforeach ($email_info['hcp'] as $hcp_info)\r\t\t\t{\r\t\t\t\tforeach ($house_types->selectHcpHouseTypeArray($hcp_info['hcp_id']) as $house_type)\r\t\t\t\t{\r\t\t\t\t\t$house_type_temp .= $house_type['house_type'].', '; \r\t\t\t\t}\r\t\t\t\t$house_type_temp = rtrim($house_type_temp, ', ');\r\t\t\t\t$email_info['hcp'][$counter]['house_type'] = $house_type_temp;\r\t\t\t\t$counter++;\r\t\t\t}\r\t\t\t\r\t\t\t$house_type_temp = '';\r\t\t\t\r\t\t\t$view->_set('email_info', $email_info['hcp']);\r\t\t\t$body = $view->displayEmailTemplate();\r\t\t\t\r\t\t\t$to_email\t= $seeker_email_info['seeker_email'];\r\t\t\t$to_name\t= $seeker_email_info['seeker_name'];\r\t\t\t\r\t\t\temail::send_email($to_email, $to_name, $from_email, $from_name, $subject, $body, '', '', $images);\r\t\t}\r\t\t\r\t}",
"function event_formprocessing($formvariables) {\r\r\n\tglobal $glbl_companyname, $glbl_sendformsfromemailaddress, $glbl_sendformstoemailaddress,\r\r\n\t $glbl_physicalwebrootlocation;\r\r\n\t$outputtype = 'simple';\r\r\n\t// Security validation 'ctcd'\r\r\n\tif (!pingToken($formvariables['citycode']))\r\r\n\t\treturn '// invalid: press the browser [back] button;';\r\r\n\t// When using a custom template for output\r\r\n\tif (isset($formvariables['emailtemplate'])){\r\r\n\t\t$loc = $glbl_physicalwebrootlocation . $formvariables['emailtemplate'];\r\r\n\t\tif (file_exists($loc)){ \r\r\n\t\t\t$file = fopen($loc, 'r'); // Read template page\r\r\n\t\t\t$formstring = fread($file, filesize($loc));\r\r\n\t\t\tfclose($file);\r\r\n\t\t\tif (trim($formstring) != '')\r\r\n\t\t\t\t$outputtype = 'custom';\r\r\n\t\t}\r\r\n\t}\r\r\n\t// When using simple output\r\r\n\tif ($outputtype == 'simple')\r\r\n\t\t$formstring = 'A form was submitted for: ' . $glbl_companyname . '<br><br>';\r\r\n\t// Loop over form variables\r\r\n\tforeach (explode(',', $formvariables['fieldlist']) as $formfield) {\r\r\n\t\t$formfieldvalue = '';\r\r\n\t\tif (isset($formvariables[$formfield]))\r\r\n\t\t\t$formfieldvalue = $formvariables[$formfield];\r\r\n\t\tif (strtolower($formfield) == 'email')\r\r\n\t\t\t$formfieldvalue = '<a href=\"mailto:' . $formfieldvalue . '\">' . $formfieldvalue . '</a>';\r\r\n\t\tif ($outputtype == 'simple')\r\r\n\t\t\t$formstring .= str_replace('_', ' ', $formfield) . ': ' . str_replace('\\\\', '', $formfieldvalue) . '<br>';\r\r\n\t\telse\r\r\n\t\t\t$formstring = str_replace('<!-- {$' . $formfield . '$} -->', $formfieldvalue, $formstring);\r\r\n\t}\r\r\n\t// Add datetimestamp\r\r\n\tif ($outputtype == 'simple')\t\r\r\n\t\t$formstring .= '<br>Date: ' . date(\"m/d/Y\") . ' - ' . date(\"h:i:s A\");\r\r\n\telse\r\r\n\t\t$formstring = str_replace('<!-- {$datetimestamp$} -->',\r\r\n\t\t\t\t\t\t\t\t (date(\"m/d/Y\") . ' - ' . date(\"h:i:s A\")), $formstring);\t\r\r\n\t// Send via email\r\r\n\trequire_once(\"htmlMimeMail5/htmlMimeMail5.php\"); // htmlMimeMail5 class\r\r\n $mail = new htmlMimeMail5(); // Instantiate a new HTML Mime Mail object\r\r\n $mail->setFrom($glbl_sendformsfromemailaddress);\r\r\n $mail->setReturnPath($glbl_sendformsfromemailaddress); \r\r\n $mail->setSubject('web form | ' . $glbl_companyname);\r\r\n $mail->setText(str_replace('<br>', '\\r\\n', $formstring));\r\r\n $mail->setHTML($formstring);\r\r\n\t// Attach uploaded image, if any\r\r\n\tif (isset($_FILES['imagefile']['name']))\r\r\n\t\tif ($_FILES['imagefile']['type'] == \"image/gif\" || $_FILES['imagefile']['type'] == \"image/jpg\" ||\r\r\n\t\t\t$_FILES['imagefile']['type'] == \"image/jpeg\" || $_FILES['imagefile']['type'] == \"image/pjpeg\" ||\r\r\n\t\t\t$_FILES['imagefile']['type'] == \"image/png\")\r\r\n\t\t\t$mail->addAttachment(new fileAttachment($_FILES['imagefile']['tmp_name'], $_FILES['imagefile']['type']));\r\r\n\t// Send the email!\r\r\n\t$mail->send(array($glbl_sendformstoemailaddress), 'smtp');\r\r\n\t// User defined function hook\r\r\n\texecUserDefinedFunction('USRDFNDafter_event_formprocessing');\r\r\n\t// Point to page\r\r\n\theader('Location: ' . $formvariables['afterpage']);\r\r\n}",
"function progressive_webform_email($variables) {\r\n _form_set_class($variables['element'], array('form-control'));\r\n return theme_webform_email($variables);\r\n}",
"function process_submission() {\n\t\tglobal $post;\n\n\t\t$plugin = Grunion_Contact_Form_Plugin::init();\n\n\t\t$id = $this->get_attribute( 'id' );\n\t\t$to = $this->get_attribute( 'to' );\n\t\t$widget = $this->get_attribute( 'widget' );\n\n\t\t$contact_form_subject = $this->get_attribute( 'subject' );\n\n\t\t$to = str_replace( ' ', '', $to );\n\t\t$emails = explode( ',', $to );\n\n\t\t$valid_emails = array();\n\n\t\tforeach ( (array) $emails as $email ) {\n\t\t\tif ( !is_email( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( function_exists( 'is_email_address_unsafe' ) && is_email_address_unsafe( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$valid_emails[] = $email;\n\t\t}\n\n\t\t// No one to send it to :(\n\t\tif ( !$valid_emails ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$to = $valid_emails;\n\n\t\t// Make sure we're processing the form we think we're processing... probably a redundant check.\n\t\tif ( $widget ) {\n\t\t\tif ( 'widget-' . $widget != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tif ( $post->ID != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$field_ids = $this->get_field_ids();\n\n\t\t// Initialize all these \"standard\" fields to null\n\t\t$comment_author_email = $comment_author_email_label = // v\n\t\t$comment_author = $comment_author_label = // v\n\t\t$comment_author_url = $comment_author_url_label = // v\n\t\t$comment_content = $comment_content_label = null;\n\n\t\t// For each of the \"standard\" fields, grab their field label and value.\n\n\t\tif ( isset( $field_ids['name'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['name']];\n\t\t\t$comment_author = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_name', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['email'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['email']];\n\t\t\t$comment_author_email = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_email', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_email_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['url'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['url']];\n\t\t\t$comment_author_url = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_url', addslashes( $field->value ) ) ) );\n\t\t\tif ( 'http://' == $comment_author_url ) {\n\t\t\t\t$comment_author_url = '';\n\t\t\t}\n\t\t\t$comment_author_url_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['textarea'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['textarea']];\n\t\t\t$comment_content = trim( Grunion_Contact_Form_Plugin::strip_tags( $field->value ) );\n\t\t\t$comment_content_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['subject'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['subject']];\n\t\t\tif ( $field->value ) {\n\t\t\t\t$contact_form_subject = Grunion_Contact_Form_Plugin::strip_tags( $field->value );\n\t\t\t}\n\t\t}\n\n\t\t$all_values = $extra_values = array();\n\t\t$i = 1; // Prefix counter for stored metadata\n\n\t\t// For all fields, grab label and value\n\t\tforeach ( $field_ids['all'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$all_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next field\n\t\t}\n\n\t\t// For the \"non-standard\" fields, grab label and value\n\t\t// Extra fields have their prefix starting from count( $all_values ) + 1\n\t\tforeach ( $field_ids['extra'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$extra_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next extra field\n\t\t}\n\n\t\t$contact_form_subject = trim( $contact_form_subject );\n\n\t\t$comment_author_IP = Grunion_Contact_Form_Plugin::get_ip_address();\n\n\t\t$vars = array( 'comment_author', 'comment_author_email', 'comment_author_url', 'contact_form_subject', 'comment_author_IP' );\n\t\tforeach ( $vars as $var )\n\t\t\t$$var = str_replace( array( \"\\n\", \"\\r\" ), '', $$var );\n\t\t$vars[] = 'comment_content';\n\n\t\t$spam = '';\n\t\t$akismet_values = $plugin->prepare_for_akismet( compact( $vars ) );\n\n\t\t// Is it spam?\n\t\t$is_spam = apply_filters( 'contact_form_is_spam', $akismet_values );\n\t\tif ( is_wp_error( $is_spam ) ) // WP_Error to abort\n\t\t\treturn $is_spam; // abort\n\t\telseif ( $is_spam === TRUE ) // TRUE to flag a spam\n\t\t\t$spam = '***SPAM*** ';\n\n\t\tif ( !$comment_author )\n\t\t\t$comment_author = $comment_author_email;\n\n\t\t$to = (array) apply_filters( 'contact_form_to', $to );\n\t\tforeach ( $to as $to_key => $to_value ) {\n\t\t\t$to[$to_key] = Grunion_Contact_Form_Plugin::strip_tags( $to_value );\n\t\t}\n\n\t\t$blog_url = parse_url( site_url() );\n\t\t$from_email_addr = 'wordpress@' . $blog_url['host'];\n\n\t\t$reply_to_addr = $to[0];\n\t\tif ( ! empty( $comment_author_email ) ) {\n\t\t\t$reply_to_addr = $comment_author_email;\n\t\t}\n\n\t\t$headers = 'From: \"' . $comment_author .'\" <' . $from_email_addr . \">\\r\\n\" .\n\t\t\t\t\t'Reply-To: \"' . $comment_author . '\" <' . $reply_to_addr . \">\\r\\n\" .\n\t\t\t\t\t\"Content-Type: text/plain; charset=\\\"\" . get_option('blog_charset') . \"\\\"\";\n\n\t\t$subject = apply_filters( 'contact_form_subject', $contact_form_subject, $all_values );\n\t\t$url = $widget ? home_url( '/' ) : get_permalink( $post->ID );\n\n\t\t$date_time_format = _x( '%1$s \\a\\t %2$s', '{$date_format} \\a\\t {$time_format}', 'jetpack' );\n\t\t$date_time_format = sprintf( $date_time_format, get_option( 'date_format' ), get_option( 'time_format' ) );\n\t\t$time = date_i18n( $date_time_format, current_time( 'timestamp' ) );\n\n\t\t$message = \"$comment_author_label: $comment_author\\n\";\n\t\tif ( !empty( $comment_author_email ) ) {\n\t\t\t$message .= \"$comment_author_email_label: $comment_author_email\\n\";\n\t\t}\n\t\tif ( !empty( $comment_author_url ) ) {\n\t\t\t$message .= \"$comment_author_url_label: $comment_author_url\\n\";\n\t\t}\n\t\tif ( !empty( $comment_content_label ) ) {\n\t\t\t$message .= \"$comment_content_label: $comment_content\\n\";\n\t\t}\n\t\tif ( !empty( $extra_values ) ) {\n\t\t\tforeach ( $extra_values as $label => $value ) {\n\t\t\t\t$message .= preg_replace( '#^\\d+_#i', '', $label ) . ': ' . trim( $value ) . \"\\n\";\n\t\t\t}\n\t\t}\n\t\t$message .= \"\\n\";\n\t\t$message .= __( 'Time:', 'jetpack' ) . ' ' . $time . \"\\n\";\n\t\t$message .= __( 'IP Address:', 'jetpack' ) . ' ' . $comment_author_IP . \"\\n\";\n\t\t$message .= __( 'Contact Form URL:', 'jetpack' ) . \" $url\\n\";\n\n\t\tif ( is_user_logged_in() ) {\n\t\t\t$message .= \"\\n\";\n\t\t\t$message .= sprintf(\n\t\t\t\t__( 'Sent by a verified %s user.', 'jetpack' ),\n\t\t\t\tisset( $GLOBALS['current_site']->site_name ) && $GLOBALS['current_site']->site_name ? $GLOBALS['current_site']->site_name : '\"' . get_option( 'blogname' ) . '\"'\n\t\t\t);\n\t\t} else {\n\t\t\t$message .= __( 'Sent by an unverified visitor to your site.', 'jetpack' );\n\t\t}\n\n\t\t$message = apply_filters( 'contact_form_message', $message );\n\t\t$message = Grunion_Contact_Form_Plugin::strip_tags( $message );\n\n\t\t// keep a copy of the feedback as a custom post type\n\t\t$feedback_time = current_time( 'mysql' );\n\t\t$feedback_title = \"{$comment_author} - {$feedback_time}\";\n\t\t$feedback_status = $is_spam === TRUE ? 'spam' : 'publish';\n\n\t\tforeach ( (array) $akismet_values as $av_key => $av_value ) {\n\t\t\t$akismet_values[$av_key] = Grunion_Contact_Form_Plugin::strip_tags( $av_value );\n\t\t}\n\n\t\tforeach ( (array) $all_values as $all_key => $all_value ) {\n\t\t\t$all_values[$all_key] = Grunion_Contact_Form_Plugin::strip_tags( $all_value );\n\t\t}\n\n\t\tforeach ( (array) $extra_values as $ev_key => $ev_value ) {\n\t\t\t$extra_values[$ev_key] = Grunion_Contact_Form_Plugin::strip_tags( $ev_value );\n\t\t}\n\n\t\t/* We need to make sure that the post author is always zero for contact\n\t\t * form submissions. This prevents export/import from trying to create\n\t\t * new users based on form submissions from people who were logged in\n\t\t * at the time.\n\t\t *\n\t\t * Unfortunately wp_insert_post() tries very hard to make sure the post\n\t\t * author gets the currently logged in user id. That is how we ended up\n\t\t * with this work around. */\n\t\tadd_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\t$post_id = wp_insert_post( array(\n\t\t\t'post_date' => addslashes( $feedback_time ),\n\t\t\t'post_type' => 'feedback',\n\t\t\t'post_status' => addslashes( $feedback_status ),\n\t\t\t'post_parent' => (int) $post->ID,\n\t\t\t'post_title' => addslashes( wp_kses( $feedback_title, array() ) ),\n\t\t\t'post_content' => addslashes( wp_kses( $comment_content . \"\\n<!--more-->\\n\" . \"AUTHOR: {$comment_author}\\nAUTHOR EMAIL: {$comment_author_email}\\nAUTHOR URL: {$comment_author_url}\\nSUBJECT: {$subject}\\nIP: {$comment_author_IP}\\n\" . print_r( $all_values, TRUE ), array() ) ), // so that search will pick up this data\n\t\t\t'post_name' => md5( $feedback_title ),\n\t\t) );\n\n\t\t// once insert has finished we don't need this filter any more\n\t\tremove_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\tupdate_post_meta( $post_id, '_feedback_extra_fields', $this->addslashes_deep( $extra_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_akismet_values', $this->addslashes_deep( $akismet_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_email', $this->addslashes_deep( compact( 'to', 'message' ) ) );\n\n\t\t/**\n\t\t * Fires right before the contact form message is sent via email to\n\t\t * the recipient specified in the contact form.\n\t\t *\n\t\t * @since ?\n\t\t * @module Contact_Forms\n\t\t * @param integer $post_id Post contact form lives on\n\t\t * @param array $all_values Contact form fields\n\t\t * @param array $extra_values Contact form fields not included in $all_values\n\t\t **/\n\t\tdo_action( 'grunion_pre_message_sent', $post_id, $all_values, $extra_values );\n\n\t\t// schedule deletes of old spam feedbacks\n\t\tif ( !wp_next_scheduled( 'grunion_scheduled_delete' ) ) {\n\t\t\twp_schedule_event( time() + 250, 'daily', 'grunion_scheduled_delete' );\n\t\t}\n\n\t\tif ( $is_spam !== TRUE && true === apply_filters( 'grunion_should_send_email', true, $post_id ) ) {\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t} elseif ( true === $is_spam && apply_filters( 'grunion_still_email_spam', FALSE ) == TRUE ) { // don't send spam by default. Filterable.\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t}\n\n\t\tif ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\n\t\t\treturn self::success_message( $post_id, $this );\n\t\t}\n\n\t\t$redirect = wp_get_referer();\n\t\tif ( !$redirect ) { // wp_get_referer() returns false if the referer is the same as the current page\n\t\t\t$redirect = $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\t$redirect = add_query_arg( urlencode_deep( array(\n\t\t\t'contact-form-id' => $id,\n\t\t\t'contact-form-sent' => $post_id,\n\t\t\t'_wpnonce' => wp_create_nonce( \"contact-form-sent-{$post_id}\" ), // wp_nonce_url HTMLencodes :(\n\t\t) ), $redirect );\n\n\t\t$redirect = apply_filters( 'grunion_contact_form_redirect_url', $redirect, $id, $post_id );\n\n\t\twp_safe_redirect( $redirect );\n\t\texit;\n\t}",
"private function sendMessage() {\r\n $data = $this->_contactform->getValues();\r\n\r\n $viewParam = array(\r\n 'name' => $data['contactform_name'],\r\n 'email' => $data['contactform_email'],\r\n 'message' => nl2br(htmlentities($data['contactform_message'])),\r\n 'ip' => $_SERVER['REMOTE_ADDR']\r\n );\r\n\r\n $registry = Zend_Registry::getInstance();\r\n $contactInfo = $registry->get('contactinfo');\r\n $email = $contactInfo['email'];\r\n $name = $contactInfo['name'];\r\n\r\n $mail = new Portfolio_HtmlTemplateMailer();\r\n $mail->setSubject($data['contactform_subject'])\r\n ->setFrom($data['contactform_email'], $data['contactform_name'])\r\n ->setReplyTo($data['contactform_email'], $data['contactform_name'])\r\n ->addTo($email, $name)\r\n ->setViewParam($viewParam)\r\n ->sendHtmlTemplate('contact.phtml');\r\n }",
"function do_form_additional_emails($s_id) {\n\t# Dim some Vars:\n\t\tglobal $_TCFG, $_DBCFG, $db_coin, $_LANG, $_nl, $_sp;\n\n\t# Build common td start tag / col strings (reduce text)\n\t\t$_td_str_left\t= '<td class=\"TP1SML_NL\">'.$_nl;\n\t\t$_td_str_ctr\t= '<td class=\"TP1SML_NC\">'.$_nl;\n\n\t# Build table row beginning and ending\n\t\t$_cstart = '<b>'.$_LANG['_ADMIN']['l_Email_Address_Additional'].$_sp.'</b><br>'.$_nl;\n\t\t$_cstart .= '<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tr>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_First_Name'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_Last_Name'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_Email_Address'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_ctr.$_LANG['_CCFG']['Actions'].'</td></tr>'.$_nl;\n\n\t\t$_cend = '</table>'.$_nl;\n\n\t# Set Query for select (additional emails).\n\t\t$query = 'SELECT *';\n\t\t$query .= ' FROM '.$_DBCFG['suppliers_contacts'];\n\t\t$query .= ' WHERE contacts_s_id='.$s_id;\n\t\t$query .= ' ORDER BY contacts_email ASC';\n\n\t# Do select and return check\n\t\tIF (is_numeric($s_id)) {\n\t\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\t\t}\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\t$button = str_replace('<img src=\"', '', $_TCFG['_IMG_SAVE_S']);\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\n\t\t\t# Display the \"edit/delete data\" form for this row\n\t\t\t\t$_out .= '<form method=\"POST\" action=\"admin.php\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"s_id\" value=\"'.$s_id.'\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"stage\" value=\"\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"op\" value=\"ae_mail_update\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"contacts_id\" value=\"'.$row['contacts_id'].'\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"cp\" value=\"suppliers\">'.$_nl;\n\t\t\t\t$_out .= '<tr>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_fname\" size=\"15\" value=\"'.htmlspecialchars($row['contacts_name_first']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_lname\" size=\"15\" value=\"'.htmlspecialchars($row['contacts_name_last']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_email\" size=\"35\" value=\"'.htmlspecialchars($row['contacts_email']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.' '.$_nl;\n\n\t\t\t# Display \"update\" button\n\t\t\t\t$_out .= '<input type=\"image\" src=\"'.$button.$_nl;\n\n\t\t\t# Display \"Delete\" button\n\t\t\t\t$_out .= ' <a href=\"admin.php?cp=suppliers&op=ae_mail_delete&stage=0&s_id='.$s_id.'&contacts_id='.$row['contacts_id'].'\">'.$_TCFG['_IMG_DEL_S'].'</a>'.$_nl;\n\n\t\t\t# End row\n\t\t\t\t$_out .= '</td></tr></form>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t# Display form for adding a new entry\n\t\t$button = str_replace('<img src=\"', '', $_TCFG['_IMG_ADD_S']);\n\t\t$_out .= '<form method=\"POST\" action=\"'.$_SERVER['PHP_SELF'].'\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"s_id\" value=\"'.$s_id.'\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"stage\" value=\"\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"cp\" value=\"suppliers\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"op\" value=\"ae_mail_add\">'.$_nl;\n\t\t$_out .= '<tr>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_fname\" size=\"15\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_lname\" size=\"15\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_email\" size=\"35\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.' '.$_nl;\n\t\t$_out .= '<input type=\"image\" src=\"'.$button.'</td></tr></form>'.$_nl;\n\n\t# Build return string\n\t\t$returning = $_cstart.$_out.$_cend;\n\n\t# Return the form\n\t\treturn $returning;\n}",
"function m_emailBuilder()\n\t{\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_EMAIL_FILE\",$this->emailTemplate);\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_TOPMSG_BLK\", \"topmsg_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_SELECT_BLK\", \"select_blk\");\n\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_BTN_BLK\", \"btn_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_TESTMAIL_BLK\", \"testmail_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_TESTMAIL_BLK\",\"TPL_SENDMAIL_BLK\", \"sendmail_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_TESTMAIL_BLK\",\"TPL_SENTMSG_BLK\", \"sentmsg_blk\");\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_SITEURL\",SITE_URL);\n\n\t\t#INTIALIZING\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",\"\");\n\t\t$this->ObTpl->set_var(\"btn_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"topmsg_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"testmail_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"sendmail_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"sentmsg_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"select_blk\",\"\");\n\n\t\t$emailRs[0]->vSubject =\"\";\n\t\t$emailRs[0]->vSid =\"\";\n\t\t$emailRs[0]->tHtmlMail =\"\";\n\t\t$emailRs[0]->tTextMail =\"\";\n\t\t$emailRs[0]->tmSentDate=\"\";\n\t\t$emailRs[0]->vUserList=$this->libFunc->ifSet($this->request,\"leadid\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",\"\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_ADMIN\",$_SESSION['uname']);\n\t\t#DISPLAYING MESSAGES\n\t\tif(isset($this->request['msg']) && $this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_UPDATED);\n\t\t\t$this->ObTpl->parse(\"topmsg_blk\",\"TPL_TOPMSG_BLK\");\n\t\t}\n\t\t\n\t\tif($this->err==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$this->errMsg);\n\t\t\t$this->ObTpl->parse(\"topmsg_blk\",\"TPL_TOPMSG_BLK\");\n\t\t}\n\n\t\t\n\t\tif(isset($_POST))\n\t\t{\n\t\t\tif(isset($this->request['subject']))\n\t\t\t\t$emailRs[0]->vSubject =$this->request['subject'];\n\t\t\tif(isset($this->request['sid']))\n\t\t\t\t$emailRs[0]->vSid=$this->request['sid'];\n\t\t\tif(isset($this->request['html_mail']))\n\t\t\t\t$emailRs[0]->tHtmlMail=$this->request['html_mail'];\n\t\t\tif(isset($this->request['text_mail']))\n\t\t\t\t$emailRs[0]->tTextMail=$this->request['text_mail'];\n\t\t\tif(isset($this->request['user_list']))\n\t\t\t\t$emailRs[0]->vUserList = $this->request['user_list'];\n\t\t}\n\n\n\t\tif(isset($this->request['id']) && !empty($this->request['id']) && is_numeric($this->request['id']))\n\t\t{\n\t\t\tif($this->err==0)\n\t\t\t{\n\t\t\t\t#DATABASE QUERY\n\t\t\t\t$this->obDb->query = \"SELECT * FROM \".EMAILS.\" WHERE iMailid_PK='\".$this->request['id'].\"'\";\n\t\t\t\t$emailRs = $this->obDb->fetchQuery();\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",$this->libFunc->dateFormat2($emailRs[0]->tmSentDate));\n\t\t\t\tif(empty($emailRs[0]->tmSentDate))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ObTpl->parse(\"sendmail_blk\",\"TPL_SENDMAIL_BLK\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ObTpl->parse(\"sentmsg_blk\",\"TPL_SENTMSG_BLK\");\n\t\t\t\t\t}\n\t\t\t\t$this->ObTpl->parse(\"testmail_blk\",\"TPL_TESTMAIL_BLK\");\t\n\t\t\t\n\t\t\t}\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MODE\",\"edit\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$this->request['id']);\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_BTNLBL\",LBL_EDITCAMPAIGN_BTN);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",\"\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MODE\",\"add\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_BTNLBL\",LBL_ADDCAMPAIGN_BTN);\n\t\t}\n\n\n\t\t$this->ObTpl->parse(\"btn_blk\",\"TPL_BTN_BLK\");\n\n\t\t$this->obDb->query = \"SELECT count(*) as cntCustomer FROM \".CUSTOMERS.\" WHERE iStatus=1 AND iMailList !=0\";\n\t\t$custCnt = $this->obDb->fetchQuery();\n\t\t$this->ObTpl->set_var(\"TPL_VAR_CUSTCNT\",$custCnt[0]->cntCustomer);\n\n\t\tif(isset($emailRs[0]->vVisitorList)){\n\t\t\tif($emailRs[0]->vVisitorList == \"0\"){\n\t\t\t\t$this->ObTpl->set_var(\"TPL_MAILN_VISITORS\",\"selected='selected'\");\t\n\t\t\t}else{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_MAILY_VISITORS\",\"selected='selected'\");\t\n\t\t\t}\n\t\t}\n\n\t\t$this->obDb->query = \"SELECT count(*) as cntVisitor FROM \".NEWSLETTERS;\n\t\t$cntVisitor = $this->obDb->fetchQuery();\n\t\t$this->ObTpl->set_var(\"TPL_VAR_VISITORCNT\",$cntVisitor[0]->cntVisitor);\n\n\t\t$this->obDb->query = \"SELECT * FROM \".LEADS.\" WHERE vdescription!=' '\";\n\t\t$leadRs = $this->obDb->fetchQuery();\n\t\t$recordCount1=$this->obDb->record_count;\n\t\tif($recordCount1>0)\n\t\t{\n\t\t\t#PARSING DISCOUNT BLOCK\n\t\t\tfor($j=0;$j<$recordCount1;$j++)\n\t\t\t{\t\t\n\t\t\t\tif (isset($this->request['leadid']))\n {\n $emailRs[0]->vUserList = $this->request['leadid'];\n }\n \n if($emailRs[0]->vUserList==$leadRs[$j]->iLeadid_PK)\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SELECTED\",\"selected\");\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_SELECTED\",\"\");\n\t\t\t\t}\n \n \n\t\t\t\t$this->obDb->query = \"SELECT count(*) as cnt FROM \".LEADLIST.\" WHERE iLeadId_FK='\". $leadRs[$j]->iLeadid_PK.\"'\";\n\t\t\t\t$qryRs = $this->obDb->fetchQuery();\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_COUNT\",$qryRs[0]->cnt);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LEADID\",$leadRs[$j]->iLeadid_PK);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_NAME\",$this->libFunc->m_displayContent($leadRs[$j]->vdescription));\n\n\t\t\t\t$this->ObTpl->parse(\"select_blk\",\"TPL_SELECT_BLK\",true);\n\t\t\t}\n\t\t}\t\n\n\t\t//******************************************\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SUBJECT\",$this->libFunc->m_displayContent($emailRs[0]->vSubject));\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SID\",$this->libFunc->m_displayContent($emailRs[0]->vSid));\n\t\t$this->ObTpl->set_var(\"TPL_VAR_HTMLMSG\",$this->libFunc->m_displayContent($emailRs[0]->tHtmlMail));\n\t\t$this->ObTpl->set_var(\"TPL_VAR_PLAINMSG\",$this->libFunc->m_displayContent($emailRs[0]->tTextMail));\t\t\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_EMAIL_FILE\"));\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 }",
"private function email(){\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t$email = $this->_request['email'];\n\t\t\t$sql = mysql_query(\"SELECT email FROM accounts WHERE email = '\".$email.\"'\", $this->db);\n\t\t\tif(mysql_num_rows($sql) > 0){\n\t\t\t\t$result = array();\n\t\t\t\twhile($rlt = mysql_fetch_array($sql,MYSQL_ASSOC)){\n\t\t\t\t\t$result[] = $rlt;\n\t\t\t\t}\n\t\t\t\t// If success everythig is good send header as \"OK\" and return list of users in JSON format\n\t\t\t\techo json_encode(array('valid' =>FALSE));\n\t\t\t} else {\n\t\t\t\techo json_encode(array('valid' =>TRUE));\n\t\t\t}\n\t\t\t//$this->response('',204);\t// If no records \"No Content\" status\n\t\t}",
"function eMail($string) {\n\n\n\t\t}",
"public function mailing_list_subscribe()\n\t{\n\t\t// get parameters for first name, last name and email\n\t\t$first_name = ee()->TMPL->fetch_param('first_name');\n\t\t$last_name = ee()->TMPL->fetch_param('last_name');\n\t\t$email = ee()->TMPL->fetch_param('email');\n\n\t\tif(empty($email))\n\t\t{\n\t\t\treturn;\n\t\t}\t\n\n\t\t$this->update_constant_contact('create', $email, $first_name, $last_name);\n\n\t}"
] | [
"0.71681356",
"0.7068807",
"0.6997052",
"0.6954751",
"0.68942577",
"0.6832857",
"0.678746",
"0.67784697",
"0.67447096",
"0.674432",
"0.67353994",
"0.6725764",
"0.6599477",
"0.65114385",
"0.64558214",
"0.6451308",
"0.6417305",
"0.63735515",
"0.63710374",
"0.63659424",
"0.6340947",
"0.63221127",
"0.63172",
"0.63091755",
"0.6305367",
"0.62956727",
"0.6269855",
"0.62538725",
"0.6248743",
"0.6248236",
"0.62474936",
"0.6245827",
"0.621917",
"0.61960196",
"0.6174126",
"0.615472",
"0.6146366",
"0.6140787",
"0.61379766",
"0.61346215",
"0.612382",
"0.61156154",
"0.61152583",
"0.6094817",
"0.60928696",
"0.6092458",
"0.60808665",
"0.6080473",
"0.6076721",
"0.60750717",
"0.60735357",
"0.6073009",
"0.6066538",
"0.6065346",
"0.60607797",
"0.604666",
"0.60420436",
"0.60388845",
"0.6031214",
"0.6020755",
"0.6015491",
"0.60134053",
"0.6003987",
"0.5998872",
"0.5997939",
"0.5994786",
"0.59928775",
"0.59901965",
"0.5982136",
"0.5974404",
"0.5969601",
"0.59544855",
"0.5949849",
"0.5944236",
"0.59297574",
"0.5922984",
"0.5921117",
"0.59183306",
"0.59160435",
"0.5910494",
"0.59038556",
"0.5900294",
"0.5898763",
"0.5897639",
"0.58904827",
"0.58900726",
"0.5887962",
"0.5880819",
"0.5878988",
"0.5878772",
"0.58780223",
"0.58726037",
"0.5861006",
"0.5856058",
"0.58519506",
"0.5846012",
"0.5843979",
"0.58371294",
"0.58335525",
"0.58225346"
] | 0.6948429 | 4 |
Do process contact sitetoallsupplier email form (build, set email)) | function do_contact_supplier_email_all($adata, $aret_flag=0) {
# Dim Some Vars
global $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;
$DesiredGroup = 0;
$DesiredServer = 0;
$DesiredAlias = 0;
$DesiredClient = 0;
$_ret_msg = '';
# Check if we are sending to an alias for a supplier
$pos1 = strpos(strtolower($adata['cc_s_id']), 'alias');
IF ($pos1 !== false) {
$pieces = explode('|', $adata['cc_s_id']);
$DesiredAlias = $pieces[1];
}
# Check if we are sending to all contacts for a supplier
$pos2 = strpos(strtolower($adata['cc_s_id']), 'contacts');
IF ($pos2 !== false) {
$pieces = explode('|', $adata['cc_s_id']);
$DesiredSupplier = $pieces[1];
}
# Get site contact information array
$_mcinfo = get_contact_info($adata['cc_mc_id']);
# Set Query for select
$query = 'SELECT ';
IF ($DesiredAlias) {
$query .= $_DBCFG['suppliers_contacts'].'.contacts_email, ';
$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_first, ';
$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_last';
} ELSEIF ($DesiredSupplier) {
$query .= $_DBCFG['suppliers'].'.s_email, ';
$query .= $_DBCFG['suppliers'].'.s_name_first, ';
$query .= $_DBCFG['suppliers'].'.s_name_last, ';
$query .= $_DBCFG['suppliers_contacts'].'.contacts_email, ';
$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_first, ';
$query .= $_DBCFG['suppliers_contacts'].'.contacts_name_last';
} ELSE {
$query .= $_DBCFG['suppliers'].'.s_email, ';
$query .= $_DBCFG['suppliers'].'.s_name_first, ';
$query .= $_DBCFG['suppliers'].'.s_name_last';
}
$query .= ' FROM ';
IF ($DesiredAlias) {
$query .= $_DBCFG['suppliers_contacts'];
$query .= ' WHERE ('.$_DBCFG['suppliers_contacts'].'.contacts_id='.$DesiredAlias.')';
} ELSEIF ($DesiredSupplier) {
$query .= $_DBCFG['suppliers'].', '.$_DBCFG['suppliers_contacts'];
$query .= ' WHERE (';
$query .= $_DBCFG['suppliers'].'.s_id='.$DesiredSupplier.' OR (';
$query .= $_DBCFG['suppliers'].'.s_id='.$_DBCFG['suppliers_contacts'].'.contacts_s_id AND ';
$query .= $_DBCFG['suppliers_contacts'].'.contacts_s_id='.$DesiredSupplier.')';
$query .= ')';
} ELSEIF ($adata['cc_s_id'] == '-1') {
$query .= $_DBCFG['suppliers'];
$query .= " WHERE s_status='active' OR s_status='".$db_coin->db_sanitize_data($_CCFG['S_STATUS'][1])."'";
} ELSE {
$query .= $_DBCFG['suppliers'];
$query .= ' WHERE ('.$_DBCFG['suppliers'].'.s_id='.$adata['cc_s_id'].')';
}
# Do select
$result = $db_coin->db_query_execute($query);
$numrows = $db_coin->db_query_numrows($result);
$_emails_sent = 0;
$_emails_error = 0;
$_sento = '';
# Process query results
while($row = $db_coin->db_fetch_array($result)) {
# Only send email if an address exists
IF ($row['contacts_email'] || $row['s_email']) {
# Loop all suppliers and send email
# Set eMail Parameters (pre-eval template, some used in template)
IF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {
$mail['recip'] = $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];
$mail['from'] = $_mcinfo['c_email'];
} ELSE {
$mail['recip'] = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['s_name_first'];
$mail['recip'] .= ' ';
$mail['recip'] .= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['s_name_last'];
$mail['recip'] .= ' <';
$mail['recip'] .= $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];
$mail['recip'] .= '>';
$mail['from'] = $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';
}
# $mail['cc'] = $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';
IF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {
$mail['subject'] = $adata['cc_subj'];
} ELSE {
$mail['subject'] = $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];
}
# Set MTP (Mail Template Parameters) array
$_MTP['to_name'] = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['s_name_first'];
$_MTP['to_name'] .= ' ';
$_MTP['to_name'] .= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['s_name_last'];
$_MTP['to_email'] = $row['contacts_email'] ? $row['contacts_email'] : $row['s_email'];
$_MTP['from_name'] = $_mcinfo['c_name'];
$_MTP['from_email'] = $_mcinfo['c_email'];
$_MTP['subject'] = $adata['cc_subj'];
$_MTP['message'] = $adata['cc_msg'];
$_MTP['site'] = $_CCFG['_PKG_NAME_SHORT'];
# Load message template (processed)
$mail['message'] = get_mail_template('email_contact_supplier_form', $_MTP);
# Call basic email function (ret=1 on error)
$_ret = do_mail_basic($mail);
# Show what was sent
$_sento .= htmlspecialchars($mail['recip']).'<br>';
# Check return
IF ($_ret) {$_emails_error++;} ELSE {$_emails_sent++;}
}
}
# Build Title String, Content String, and Footer Menu String
$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];
$_cstr .= '<center>'.$_nl;
$_cstr .= '<table cellpadding="5">'.$_nl;
$_cstr .= '<tr><td class="TP5MED_NL">'.$_nl;
IF ($_emails_error) {
$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];
$_cstr .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];
} ELSE {
$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_04_L1'];
}
$_cstr .= '<br>'.$_LANG['_MAIL']['total'].':'.$_sp.$_emails_sent.$_sp.$_LANG['_MAIL']['sent'];
$_cstr .= '<br><br>'.$_sento;
$_cstr .= '</td></tr>'.$_nl;
$_cstr .= '</table>'.$_nl;
$_cstr .= '</center>'.$_nl;
$_mstr_flag = 0;
$_mstr = ' '.$_nl;
# Call block it function
$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');
$_out .= '<br>'.$_nl;
IF ($aret_flag) {return $_out;} ELSE {echo $_out;}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function do_contact_supplier_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_s_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_supplier_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get supplier contact information array\n\t\t\t$_ccinfo\t= get_contact_supplier_info($adata['cc_s_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['s_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t} ELSE {\n\t\t\t\t$mail['recip'] = $_ccinfo['s_company'].' <'.$_ccinfo['s_email'].'>';\n\t\t\t}\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\tIF ($_ccinfo['s_name_first'] && $_ccinfo['s_name_last']) {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_name_first'].' '.$_ccinfo['s_name_last'];\n\t\t} ELSE {\n\t\t\t$_MTP['to_name']\t= $_ccinfo['s_company'];\n\t\t}\n\t\t$_MTP['to_email']\t= $_ccinfo['s_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_supplier_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= ' '.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}",
"public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->getFieldsByType('email');\n\t\t\t$addressEmail = '';\n\t\t\tforeach ($emailsFields as $fieldModel) {\n\t\t\t\tif (!$recordModel->isEmpty($fieldModel->getFieldName())) {\n\t\t\t\t\t$addressEmail = $recordModel->get($fieldModel->getFieldName());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($addressEmail)) {\n\t\t\t\t\\App\\Mailer::sendFromTemplate([\n\t\t\t\t\t'template' => 'YetiPortalRegister',\n\t\t\t\t\t'moduleName' => $moduleName,\n\t\t\t\t\t'recordId' => $this->get('crmid'),\n\t\t\t\t\t'to' => $addressEmail,\n\t\t\t\t\t'password' => $this->get('password_t'),\n\t\t\t\t\t'login' => $this->get('user_name'),\n\t\t\t\t\t'acceptable_url' => Settings_WebserviceApps_Record_Model::getInstanceById($this->get('server_id'))->get('acceptable_url')\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}",
"function setEmailForm(&$smartyEmailForm) {\n\t\t//Check if there is a valid email address in the database for the given combination of employee, service, position and organisation id\n\t\tif ($this->getEmailAddress($smartyEmailForm) || $this->piVars['mode'] == 'set_contact_form') {\n\t\t\tif($this->getEmailAddress($smartyEmailForm)){\n\t\t\t\t//Assign action url of email form with mode 'check_email_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_email_form'),0,0)));\n\t\t\t}else{\n\t\t\t\t//Assign action url of email form with mode 'check_contact_form'\n\t\t\t\t$smartyEmailForm->assign('action_url',htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => 'check_contact_form'),0,0)));\n\t\t\t}\n\n\t\t\t//Assign template labels\n\t\t\t$hoster_email=$this->get_hoster_email();\n\t\t\t$smartyEmailForm->assign('email_form_label',$this->pi_getLL('tx_civserv_pi1_email_form.email_form','E-Mail Form'));\n\t\t\t$smartyEmailForm->assign('contact_form_label',str_replace('###HOSTER###', $hoster_email, $this->pi_getLL('tx_civserv_pi1_email_form.contact_form','Contact '.$hoster_email)));\n\t\t\t$smartyEmailForm->assign('notice_label',$this->pi_getLL('tx_civserv_pi1_email_form.notice','Please enter your postal address oder email address, so that we can send you an answer'));\n\t\t\t$smartyEmailForm->assign('title_label', $this->pi_getLL('tx_civserv_pi1_email_form.title','Title'));\n\t\t\t$smartyEmailForm->assign('chose_option', $this->pi_getLL('tx_civserv_pi1_email_form.chose','Please chose'));\n\t\t\t$smartyEmailForm->assign('female_option', $this->pi_getLL('tx_civserv_pi1_email_form.female','Ms.'));\n\t\t\t$smartyEmailForm->assign('male_option', $this->pi_getLL('tx_civserv_pi1_email_form.male','Mr.'));\n\t\t\t$smartyEmailForm->assign('firstname_label',$this->pi_getLL('tx_civserv_pi1_email_form.firstname','Firstname'));\n\t\t\t$smartyEmailForm->assign('surname_label',$this->pi_getLL('tx_civserv_pi1_email_form.surname','Surname'));\n\t\t\t$smartyEmailForm->assign('street_label',$this->pi_getLL('tx_civserv_pi1_email_form.street','Street, Nr.'));\n\t\t\t$smartyEmailForm->assign('postcode_label',$this->pi_getLL('tx_civserv_pi1_email_form.postcode','Postcode'));\n\t\t\t$smartyEmailForm->assign('city_label',$this->pi_getLL('tx_civserv_pi1_email_form.city','City'));\n\t\t\t$smartyEmailForm->assign('email_label',$this->pi_getLL('tx_civserv_pi1_email_form.email','E-Mail'));\n\t\t\t$smartyEmailForm->assign('phone_label',$this->pi_getLL('tx_civserv_pi1_email_form.phone','Phone'));\n\t\t\t$smartyEmailForm->assign('fax_label',$this->pi_getLL('tx_civserv_pi1_email_form.fax','Fax'));\n\t\t\t$smartyEmailForm->assign('subject_label',$this->pi_getLL('tx_civserv_pi1_email_form.subject','Subject'));\n\t\t\t$smartyEmailForm->assign('bodytext_label',$this->pi_getLL('tx_civserv_pi1_email_form.bodytext','Your text'));\n\t\t\t$smartyEmailForm->assign('submit_label',$this->pi_getLL('tx_civserv_pi1_email_form.submit','Send e-mail'));\n\t\t\t$smartyEmailForm->assign('reset_label',$this->pi_getLL('tx_civserv_pi1_email_form.reset','Reset'));\n\t\t\t$smartyEmailForm->assign('required_label',$this->pi_getLL('tx_civserv_pi1_email_form.required','required'));\n\n\t\t\t//Set reset button type to reset functionality\n\t\t\t$smartyEmailForm->assign('button_type','reset');\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function student_crm_webform_send_email_form_submit($form, $form_state) {\n $case = crm_case_load($form_state['values']['case']);\n $email_addresses = student_crm_webform_send_email('crm_case', $case, $form_state['values']['field'], $form_state['values']['manual-email']);\n \n $case = crm_case_load($form_state['values']['case']);\n $fields = field_info_instances();\n $field = $fields['crm_case'][$case->type][$form_state['values']['field']];\n\n drupal_set_message(t('The form %form has been sent to: !email-addresses', array('%form' => $field['label'], '!email-addresses' => theme('item_list', array('items' => $email_addresses)))));\n}",
"static private function submitEmail()\n {\n $id = $_POST['formid'];\n\n // Initiates new form handling instance\n $f = new FormHandling;\n\n // Gets the client email list (to, bcc, cc)\n $clientEmailList = $f->getClientEmail($id);\n\n // Gets the customer email (if set)\n $customerEmail = $f->getCustomerEmail($_POST);\n\n // dd($customerEmail);\n\n // Checks if in sandbox mode before sending email\n if(FALSE == submissionHandling::sandbox){\n\n // New email instance\n $e = new emailHandling();\n\n // render and send client email(s)\n if($clientEmailList['to']){\n $e->sendEmail($id,'client',$clientEmailList['to'],'Enquiry received','Hi',$clientEmailList['headers']);\n }\n\n // render and send customer email\n if($customerEmail){\n $e->sendEmail($id,'customer',$customerEmail,'Thanks for getting in touch','We will be in touch soon');\n }\n\n }\n }",
"function 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 emailAction() {\n\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestore_admin_main', array(), 'sitestore_admin_main_email');\n $this->view->form = $form = new Sitestore_Form_Admin_Settings_Email();\n\n //check if comments should be displayed or not\n $show_comments = Engine_Api::_()->sitestore()->displayCommentInsights();\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n $taskstable = Engine_Api::_()->getDbtable('tasks', 'core');\n $rtasksName = $taskstable->info('name');\n $taskstable_result = $taskstable->select()\n ->from($rtasksName, array('processes', 'timeout'))\n ->where('title = ?', 'Sitestore Insight Mail')\n ->where('plugin = ?', 'Sitestore_Plugin_Task_InsightNotification')\n ->limit(1);\n $prefields = $taskstable->fetchRow($taskstable_result);\n\n //populate form\n// $form->populate(array(\n// 'sitestore_insightemail' => $prefields->processes,\n// ));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->_getAllParams())) {\n $values = $form->getValues();\n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_insightemail', $values['sitestore_insightemail']);\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n\n if(empty($sitemailtemplates)) {\n\t\t\t\tEngine_Api::_()->getApi('settings', 'core')->setSetting('sitestore_bg_color', $values['sitestore_bg_color']);\n }\n include APPLICATION_PATH . '/application/modules/Sitestore/controllers/license/license2.php';\n if ($values['sitestore_demo'] == 1 && $values['sitestore_insightemail'] == 1) {\n\n $view = Zend_Registry::isRegistered('Zend_View') ? Zend_Registry::get('Zend_View') : null;\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n $site_title = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.site.title', Engine_Api::_()->getApi('settings', 'core')->getSetting('core.general.site.title', 1));\n\n $insights_string = '';\n\t\t\t\t$template_header = \"\";\n\t\t\t\t$template_footer = \"\";\n if(!$sitemailtemplates) {\n\t\t\t\t\t$site_title_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.title.color', \"#ffffff\");\n\t\t\t\t\t$site_header_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.header.color', \"#79b4d4\");\n\n\t\t\t\t\t//GET SITE \"Email Body Outer Background\" COLOR\n\t\t\t\t\t$site_bg_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitestore.bg.color', \"#f7f7f7\");\n\t\t\t\t\t$insights_string.= \"<table cellpadding='2'><tr><td><table cellpadding='2'><tr><td><span style='font-size: 14px; font-weight: bold;'>\" . $view->translate(\"Sample Store\") . \"</span></td></tr>\";\n\n\t\t\t\t\t$template_header.= \"<table width='98%' cellspacing='0' border='0'><tr><td width='100%' bgcolor='$site_bg_color' style='font-family:arial,tahoma,verdana,sans-serif;padding:40px;'><table width='620' cellspacing='0' cellpadding='0' border='0'>\";\n\t\t\t\t\t$template_header.= \"<tr><td style='background:\" . $site_header_color . \"; color:$site_title_color;font-weight:bold;font-family:arial,tahoma,verdana,sans-serif; padding: 4px 8px;vertical-align:middle;font-size:16px;text-align: left;' nowrap='nowrap'>\" . $site_title . \"</td></tr><tr><td valign='top' style='background-color:#fff; border-bottom: 1px solid #ccc; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-family:arial,tahoma,verdana,sans-serif; padding: 15px;padding-top:0;' colspan='2'><table width='100%'><tr><td colspan='2'>\";\n\n $template_footer.= \"</td></tr></table></td></tr></td></table></td></tr></table>\";\n }\n\n if ($values['sitestore_insightmail_options'] == 1) {\n $vals['days_string'] = $view->translate('week');\n } elseif ($values['sitestore_insightmail_options'] == 2) {\n $vals['days_string'] = $view->translate('month');\n }\n $path = 'http://' . $_SERVER['HTTP_HOST'] . $view->baseUrl();\n $insight_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Visit your Insights Store') . \"</a>\";\n $update_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Send an update to people who like this') . \"</a>\";\n\n //check if Communityad Plugin is enabled\n $sitestorecommunityadEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('communityad');\n $adversion = null;\n if ($sitestorecommunityadEnabled) {\n $communityadmodulemodule = Engine_Api::_()->getDbtable('modules', 'core')->getModule('communityad');\n $adversion = $communityadmodulemodule->version;\n if ($adversion >= '4.1.5') {\n $promote_Ad_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Promote with %s Ads', $site_title) . \"</a>\";\n }\n }\n\n $insights_string.= \"<table><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $vals['days_string'] . $view->translate(array('ly active user', 'ly active users', 2), 2) . \"</span></td></tr><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('person likes this', 'people like this', 2), 2) . \"</span> <span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n if (!empty($show_comments)) {\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('comment', 'comments', 2), 2) . \"</span> <span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n }\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '10' . \"</span>\\t <span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('visit', 'visits', 2), 2) . \"</span> <span style='font-size: 18px; font-family: arial;' >\" . '5' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr></table><table><tr><td>\" . \"<ul style=' padding-left: 5px;'><li>\" . $insight_link . \"</li><li>\" . $update_link;\n\n //check if Communityad Plugin is enabled\n if ($sitestorecommunityadEnabled && $adversion >= '4.1.5') {\n $insights_string.= \"</li><li>\" . $promote_Ad_link;\n }\n $insights_string.= \"</li></ul></td></tr></table>\";\n $days_string = ucfirst($vals['days_string']);\n $owner_name = Engine_Api::_()->user()->getViewer()->getTitle();\n $email = Engine_Api::_()->getApi('settings', 'core')->core_mail_from;\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($values['sitestore_admin'], 'SITESTORE_INSIGHTS_EMAIL_NOTIFICATION', array(\n 'recipient_title' => $owner_name,\n 'template_header' => $template_header,\n 'message' => $insights_string,\n 'template_footer' => $template_footer,\n 'site_title' => $site_title,\n 'days' => $days_string,\n 'email' => $email,\n 'queue' => true));\n }\n }\n }",
"abstract protected function _sendMail ( );",
"public function new_supplier_email($edata) {\n\t\t\t\t$template = $this->shortcode_variables(\"supplierregisteradmin\");\n\t\t\t\t$details = email_template_detail(\"supplierregisteradmin\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"supplierregisteradmin\");\n\t\t\t\t$values = array($edata['name'], $edata['email'], $edata['address'], $edata['phone']);\n\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $this->adminmobile, \"supplierregisteradmin\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($this->adminemail);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}",
"function sendEmail_supplier($details, $sitetitle) {\n\t\t\t$currencycode = $details->currCode;\n\t\t\t $currencysign = $details->currSymbol;\n\n\t\t\t $custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$custemail = $details->accountEmail;\n\t\t\t\t$additionaNotes = $details->additionaNotes;\n\t\t\t\t$sendto = $this->supplierEmail($details->module, $details->itemid);\n\t\t\t\t$invoicelink = \"<a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$template = $this->shortcode_variables(\"bookingordersupplier\");\n\t\t\t\t$details = email_template_detail(\"bookingordersupplier\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"bookingorderadmin\");\n\t\t\t\t$values = array($invoiceid, $refno, $deposit, $totalamount, $custemail, $custid, $country, $phone, $currencycode, $currencysign, $invoicelink, $sitetitle, $name,$additionaNotes);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $this->adminmobile, \"bookingorderadmin\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\n\t\t\t\n\t\t}",
"function Form_Mail()\n {\n /**\n * Form_Mail();\n */\n\n $this->referers_array = array($_SERVER[\"HTTP_HOST\"]);\n /**\n * Leave AS IS to only allow posting from same host that script resides on.\n * List individual hosts to create list of hosts that can post to this script:\n * EXAMPLE: $referer_array = array ('example.com','www.example.com','192.168.0.1');\n */\n\n /* proccess form */\n $this->set_arrays();\n $this->check_referer();\n $this->check_recipient();\n $this->check_required_fields();\n $this->send_form();\n $this->display_thankyou();\n }",
"abstract protected function _getEmail($info);",
"function do_contact_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Get contact information array\n\t\t$_cinfo = get_contact_info($adata['mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t= $_cinfo['c_email'];\n\t\t\t$mail['from']\t= $adata['mc_email'];\n\t\t\tIF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc']\t= $adata['mc_email'];}\n\t\t} ELSE {\n\t\t\t$mail['recip']\t= $_cinfo['c_name'].' <'.$_cinfo['c_email'].'>';\n\t\t\t$mail['from']\t= $adata['mc_name'].' <'.$adata['mc_email'].'>';\n\t\t\tIF ($_CCFG['CONTACT_FORM_CC']) {$mail['cc']\t= $adata['mc_name'].' <'.$adata['mc_email'].'>';}\n\t\t}\n\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].'- Contact Message';\n\n\t# Grab ip_address of sender\n\t\tIF (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != '') {\n\t\t\t$pos = strpos(strtolower($_SERVER['HTTP_X_FORWARDED_FOR']), '192.168.');\n\t\t\tIF ($pos === FALSE) {\n\t\t\t\t$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t\t} ELSE {\n\t\t\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t\t}\n\t\t} ELSE {\n\t\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\t$_MTP['to_name']\t= $_cinfo['c_name'];\n\t\t$_MTP['to_email']\t= $_cinfo['c_email'];\n\t\t$_MTP['from_name']\t= $adata['mc_name'];\n\t\t$_MTP['from_email']\t= $adata['mc_email'];\n\t\t$_MTP['subject']\t= $adata['mc_subj'];\n\t\t$_MTP['message']\t= $adata['mc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\t\t$_MTP['sender_ip']\t= $ip;\n\t\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Set flood control values in session\n\t\t$sdata['set_last_contact'] = 1;\n\t\t$_sret = do_session_update($sdata);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CS_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CS_FORM_MSG_03_L1'];\n\t\t\t$_ret_msg .= $_sp.$_LANG['_MAIL']['CS_FORM_MSG_03_L2'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CS_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= ' '.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}",
"function do_contact_client_email($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Check if we are sending to an additional email instead of the clients regular address\n\t\t$pos = strpos(strtolower($adata['cc_cl_id']), \"alias\");\n\t\tif ($pos !== false) {\n\t\t\t$pieces\t= explode('|', $adata['cc_cl_id']);\n\t\t\t$_ccinfot\t= get_contact_client_info_alias($pieces[1], 0);\n\t\t\t$_ccinfo\t= $_ccinfot[1];\n\t } ELSE {\n\t\t# Get client contact information array\n\t\t\t$_ccinfo\t= get_contact_client_info($adata['cc_cl_id']);\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo = get_contact_info($adata['cc_mc_id']);\n\n\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t$mail['recip']\t\t= $_ccinfo['cl_email'];\n\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_email'];\n\t\t} ELSE {\n\t\t\t$mail['recip']\t\t= $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'].' <'.$_ccinfo['cl_email'].'>';\n\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t}\n\n\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t} ELSE {\n\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t}\n\n\t# Set MTP (Mail Template Parameters) array\n\t\t$_MTP['to_name']\t= $_ccinfo['cl_name_first'].' '.$_ccinfo['cl_name_last'];\n\t\t$_MTP['to_email']\t= $_ccinfo['cl_email'];\n\t\t$_MTP['from_name']\t= $_mcinfo['c_name'];\n\t\t$_MTP['from_email']\t= $_mcinfo['c_email'];\n\t\t$_MTP['subject']\t= $adata['cc_subj'];\n\t\t$_MTP['message']\t= $adata['cc_msg'];\n\t\t$_MTP['site']\t\t= $_CCFG['_PKG_NAME_SHORT'];\n\n\t# Load message template (processed)\n\t\t$mail['message']\t= get_mail_template('email_contact_client_form', $_MTP);\n\n\t# Call basic email function (ret=0 on error)\n\t\t$_ret = do_mail_basic($mail);\n\n\t# Check return\n\t\tIF ($_ret) {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_ret_msg .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_ret_msg = $_LANG['_MAIL']['CC_FORM_MSG_03_L1'];\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\" width=\"100%\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NC\">'.$_nl;\n\t\t$_cstr .= $_ret_msg.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= ' '.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}",
"private function process_emails(&$doing){\n\n if (isset($_GET['hotel_confirmation_once'])){\n // ----------------------- Ask for the welcome mail attachment\n print x(\"span class='only_online'\",\n\t x(\"form action='\".b_url::same('?resetcache_once=1').\"' method='post' enctype='multipart/form-data' name='upload_mail_attachment'\",\n\t\tx('table',\n\t\t x('tr',\n\t\t x('td','Please select PDF file').\n\t\t x('td',\"<input name='_virt_att' type='file' />\").\n\t\t \"<input name='v_id' value='\".$_GET['hotel_confirmation_once'].\"' type='hidden' />\".\n\t\t \"<input name='lease_id' value='\".$_GET['lease_once'].\"' type='hidden' />\").\n\t\t x('tr',\n\t\t x('td colspan=2',x('center',\"<input type='submit' value='submit'/>\"))))));\n }elseif (isset($_FILES['_virt_att'])){\n // ----------------------- Save the welcome mail attachment\n VM_mailer()->save_attachment($_REQUEST['v_id'],$_REQUEST['lease_id'],$_FILES['_virt_att'],'hotel_confirmation');\n }elseif (isset($_GET['mail2all_deny_once'])){\n // ----------------------- Send deny E-mails to all refused attenders of the event\n $q = $this->query();\n while($rec = myPear_db()->next_record($q)){\n\tif(VM_mailer()->m_applicant_deny($rec['v_id'],'status',$rec['v_status']) === False){\n\t VM_mailer()->m_applicant_deny($rec['v_id'],$no_preview=True);\n\t}\n }\n }\n if(isset($_GET['mail2all_welcome_once'])){\n // ----------------------- Send welcome E-mails to all accepted attenders of the event\n $q = $this->query();\n while($rec = myPear_db()->next_record($q)){\n\tif(VM_mailer()->welcome_applicant($rec['v_id'],'status',$rec['v_status']) === False){\n\t VM_mailer()->welcome_applicant($rec['v_id'],@$rec['lease_id'],$no_preview=True);\n\t}\n }\n }elseif (isset($_GET['mail_once'])){\n //\n // ----------------------- Preview e-mails \n //\n $doing = 'send_accept_deny';\n switch($_GET['mail_once']){ \n case 'vm_mail_yes':\n\tVM_mailer()->welcome_applicant($_GET['v_id'],$_GET['lease_id']);\n\tbreak;\n\t\n case 'vm_mail_no':\n\tVM_mailer()->m_applicant_deny($_GET['v_id']);\n\tbreak;\n\t\n case 'vm_mail_info':\n\tVM_mailer()->m_applicant_info_mail($_GET['v_id']);\n\tbreak;\n\n case 'vm_mail_pwd':\n\tVM_mailer()->remind_organizer($_GET['v_id'],VM::$e,'pwd',False);\n\tbreak;\n }\n }elseif(isset($_GET['sendmail_once'])){\n //\n // ----------------------- Sending the e-mail after preview\n //\n switch($sendmail_once=$_GET['sendmail_once']){\n case 'send':\n\tb_debug::_debug(\"sendmail_once='$sendmail_once'\",$this);\n\tbreak;\n default:\n\tb_debug::_debug(\"sendmail_once='$sendmail_once'... What to do???\",$this);\n }\n }\n }",
"function paid_sendEmail_supplier($details) {\n\n\t\t\t$currencycode = $details->currCode;\n\t\t\t$currencysign = $details->currSymbol;\n\n\t\t\t\t$custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$remaining = $details->remainingAmount;\n\t\t\t\t$custemail = $details->accountEmail;\t\t\t\t\n\t\t\t\t$sendto = $this->supplierEmail($details->module, $details->itemid);\n\n\t\t\t\t$sitetitle = \"\";\n\n\t\t\t\t$invoicelink = \"<a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$template = $this->shortcode_variables(\"bookingpaidsupplier\");\n\t\t\t\t$details = email_template_detail(\"bookingpaidsupplier\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"bookingpaidadmin\");\n\t\t\t\t$values = array($invoiceid, $refno, $deposit, $totalamount, $custemail, $custid, $country, $phone, $currencycode, $currencysign, $invoicelink, $sitetitle, $name);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $this->adminmobile, \"bookingpaidadmin\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('Booking Payment Notification');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}",
"function do_contact_supplier_form($adata, $aerr_entry, $aret_flag=0) {\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Some HTML Strings (reduce text)\n\t\t$_td_str_left_vtop\t= '<td class=\"TP1SML_NR\" width=\"30%\" valign=\"top\">';\n\t\t$_td_str_left\t\t= '<td class=\"TP1SML_NR\" width=\"30%\">';\n\t\t$_td_str_right\t\t= '<td class=\"TP1SML_NL\" width=\"70%\">';\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr .= $_CCFG['_PKG_NAME_SHORT'].$_sp.$_LANG['_MAIL']['Contact_Supplier_Form'].$_sp.'('.$_LANG['_MAIL']['all_fields_required'].')';\n\n\t# Do data entry error string check and build\n\t\tIF ($aerr_entry['flag']) {\n\t\t \t$err_str = $_LANG['_MAIL']['CC_FORM_ERR_HDR1'].'<br>'.$_LANG['_MAIL']['CC_FORM_ERR_HDR2'].'<br>'.$_nl;\n\n\t \t\tIF ($aerr_entry['cc_s_id']) \t{$err_str .= $_LANG['_MAIL']['CS_FORM_ERR_ERR01']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['cc_mc_id']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR02']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['cc_subj']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR03']; $err_prv = 1;}\n\t\t\tIF ($aerr_entry['cc_msg']) \t{IF ($err_prv) {$err_str .= ', ';} $err_str .= $_LANG['_MAIL']['CC_FORM_ERR_ERR04']; $err_prv = 1;}\n\n\t \t\t$_cstr .= '<p align=\"center\"><b>'.$err_str.'</b>'.$_nl;\n\t\t}\n\n\t# Formatting tweak for spacing\n\t\tIF ($aerr_entry['flag']) {$_cstr .= '<br><br>'.$_nl;}\n\n\t\t$_cstr .= '<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">'.$_nl;\n\t\t$_cstr .= '<tr><td align=\"center\">'.$_nl;\n\t\t$_cstr .= '<form action=\"mod.php\" method=\"post\" name=\"supplier\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mod\" value=\"mail\">'.$_nl;\n\t\t$_cstr .= '<input type=\"hidden\" name=\"mode\" value=\"supplier\">'.$_nl;\n\t\t$_cstr .= '<table width=\"100%\" cellspacing=\"0\" cellpadding=\"5\">'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_To_Supplier'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_select_list_suppliers('cc_s_id', $adata['cc_s_id'], '1').$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_From'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_select_list_mail_contacts('cc_mc_id', $adata['cc_mc_id']);\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Subject'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= '<INPUT class=\"PSML_NL\" TYPE=TEXT name=\"cc_subj\" size=\"30\" maxlength=\"50\" value=\"'.htmlspecialchars($adata['cc_subj']).'\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left_vtop.$_nl;\n\t\t$_cstr .= '<b>'.$_LANG['_MAIL']['l_Message'].$_sp.'</b>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\tIF ($_CCFG['WYSIWYG_OPEN']) {$_cols = 100;} ELSE {$_cols = 75;}\n\t\t$_cstr .= '<TEXTAREA class=\"PSML_NL\" NAME=\"cc_msg\" COLS=\"'.$_cols.'\" ROWS=\"15\">'.$adata['cc_msg'].'</TEXTAREA>'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= '</tr>'.$_nl;\n\n\t\t$_cstr .= '<tr>'.$_nl;\n\t\t$_cstr .= $_td_str_left.$_nl;\n\t\t$_cstr .= '<INPUT TYPE=hidden name=\"stage\" value=\"1\">'.$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\t\t$_cstr .= $_td_str_right.$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_email', 'SUBMIT', $_LANG['_MAIL']['B_Send_Email'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= do_input_button_class_sw('b_reset', 'RESET', $_LANG['_MAIL']['B_Reset'], 'button_form_h', 'button_form', '1').$_nl;\n\t\t$_cstr .= '</td>'.$_nl;\n\n\t\t$_cstr .= '</tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</form>'.$_nl;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr \t\t= ''.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t# Return / Echo Final Output\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}",
"function do_form_additional_emails($s_id) {\n\t# Dim some Vars:\n\t\tglobal $_TCFG, $_DBCFG, $db_coin, $_LANG, $_nl, $_sp;\n\n\t# Build common td start tag / col strings (reduce text)\n\t\t$_td_str_left\t= '<td class=\"TP1SML_NL\">'.$_nl;\n\t\t$_td_str_ctr\t= '<td class=\"TP1SML_NC\">'.$_nl;\n\n\t# Build table row beginning and ending\n\t\t$_cstart = '<b>'.$_LANG['_ADMIN']['l_Email_Address_Additional'].$_sp.'</b><br>'.$_nl;\n\t\t$_cstart .= '<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\"><tr>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_First_Name'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_Last_Name'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_left.$_LANG['_ADMIN']['l_Email_Address'].'</td>'.$_nl;\n\t\t$_cstart .= $_td_str_ctr.$_LANG['_CCFG']['Actions'].'</td></tr>'.$_nl;\n\n\t\t$_cend = '</table>'.$_nl;\n\n\t# Set Query for select (additional emails).\n\t\t$query = 'SELECT *';\n\t\t$query .= ' FROM '.$_DBCFG['suppliers_contacts'];\n\t\t$query .= ' WHERE contacts_s_id='.$s_id;\n\t\t$query .= ' ORDER BY contacts_email ASC';\n\n\t# Do select and return check\n\t\tIF (is_numeric($s_id)) {\n\t\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\t\t}\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\t$button = str_replace('<img src=\"', '', $_TCFG['_IMG_SAVE_S']);\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\n\t\t\t# Display the \"edit/delete data\" form for this row\n\t\t\t\t$_out .= '<form method=\"POST\" action=\"admin.php\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"s_id\" value=\"'.$s_id.'\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"stage\" value=\"\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"op\" value=\"ae_mail_update\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"contacts_id\" value=\"'.$row['contacts_id'].'\">'.$_nl;\n\t\t\t\t$_out .= '<input type=\"hidden\" name=\"cp\" value=\"suppliers\">'.$_nl;\n\t\t\t\t$_out .= '<tr>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_fname\" size=\"15\" value=\"'.htmlspecialchars($row['contacts_name_first']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_lname\" size=\"15\" value=\"'.htmlspecialchars($row['contacts_name_last']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"ae_email\" size=\"35\" value=\"'.htmlspecialchars($row['contacts_email']).'\"></td>'.$_nl;\n\t\t\t\t$_out .= $_td_str_left.' '.$_nl;\n\n\t\t\t# Display \"update\" button\n\t\t\t\t$_out .= '<input type=\"image\" src=\"'.$button.$_nl;\n\n\t\t\t# Display \"Delete\" button\n\t\t\t\t$_out .= ' <a href=\"admin.php?cp=suppliers&op=ae_mail_delete&stage=0&s_id='.$s_id.'&contacts_id='.$row['contacts_id'].'\">'.$_TCFG['_IMG_DEL_S'].'</a>'.$_nl;\n\n\t\t\t# End row\n\t\t\t\t$_out .= '</td></tr></form>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t# Display form for adding a new entry\n\t\t$button = str_replace('<img src=\"', '', $_TCFG['_IMG_ADD_S']);\n\t\t$_out .= '<form method=\"POST\" action=\"'.$_SERVER['PHP_SELF'].'\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"s_id\" value=\"'.$s_id.'\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"stage\" value=\"\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"cp\" value=\"suppliers\">'.$_nl;\n\t\t$_out .= '<input type=\"hidden\" name=\"op\" value=\"ae_mail_add\">'.$_nl;\n\t\t$_out .= '<tr>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_fname\" size=\"15\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_lname\" size=\"15\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.'<input class=\"PSML_NL\" type=\"text\" name=\"new_ae_email\" size=\"35\" value=\"\"></td>'.$_nl;\n\t\t$_out .= $_td_str_left.' '.$_nl;\n\t\t$_out .= '<input type=\"image\" src=\"'.$button.'</td></tr></form>'.$_nl;\n\n\t# Build return string\n\t\t$returning = $_cstart.$_out.$_cend;\n\n\t# Return the form\n\t\treturn $returning;\n}",
"function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n $this->data['email_vars']['client_dashboard_url'] = $this->data['vars']['site_url_client'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'];\n\n //new client welcom email-------------------------------\n if ($email == 'new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_client');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['client_users_password'] = $this->input->post('client_users_password');\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($this->data['email_vars']['client_users_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n\n }\n\n //admin notification - new client user-------------------------------\n if ($email == 'admin_notification_new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email to multiple admins\n foreach ($this->data['vars']['mailinglist_admins'] as $email_address) {\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($email_address);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n }\n\n }\n\n }",
"private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }",
"function sendmail()\n\t{\n\t\tglobal $mainframe, $Itemid;\n\n\t\t/*\n\t\t * Initialize some variables\n\t\t */\n\t\t$db = & $mainframe->getDBO();\n\n\t\t$SiteName \t= $mainframe->getCfg('sitename');\n\t\t$MailFrom \t= $mainframe->getCfg('mailfrom');\n\t\t$FromName \t= $mainframe->getCfg('fromname');\n\t\t$validate \t= mosHash( $mainframe->getCfg('db') );\n\n\t\t$default \t= sprintf(JText::_('MAILENQUIRY'), $SiteName);\n\t\t$option \t= JRequest::getVar('option');\n\t\t$contactId \t= JRequest::getVar('con_id');\n\t\t$validate \t= JRequest::getVar($validate, \t\t0, \t\t\t'post');\n\t\t$email \t\t= JRequest::getVar('email', \t\t'', \t\t'post');\n\t\t$text \t\t= JRequest::getVar('text', \t\t\t'', \t\t'post');\n\t\t$name \t\t= JRequest::getVar('name', \t\t\t'', \t\t'post');\n\t\t$subject \t= JRequest::getVar('subject', \t\t$default, \t'post');\n\t\t$emailCopy \t= JRequest::getVar('email_copy', \t0, \t\t\t'post');\n\n\t\t// probably a spoofing attack\n\t\tif (!$validate) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts, but it does not hurt to make\n\t\t * sure the request came from a client with a user agent string.\n\t\t */\n\t\tif (!isset ($_SERVER['HTTP_USER_AGENT'])) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts either, but we ought to check\n\t\t * to make sure that the request was posted as well.\n\t\t */\n\t\tif (!$_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t// An array of e-mail headers we do not want to allow as input\n\t\t$headers = array ('Content-Type:',\n\t\t\t\t\t\t 'MIME-Version:',\n\t\t\t\t\t\t 'Content-Transfer-Encoding:',\n\t\t\t\t\t\t 'bcc:',\n\t\t\t\t\t\t 'cc:');\n\n\t\t// An array of the input fields to scan for injected headers\n\t\t$fields = array ('email',\n\t\t\t\t\t\t 'text',\n\t\t\t\t\t\t 'name',\n\t\t\t\t\t\t 'subject',\n\t\t\t\t\t\t 'email_copy');\n\n\t\t/*\n\t\t * Here is the meat and potatoes of the header injection test. We\n\t\t * iterate over the array of form input and check for header strings.\n\t\t * If we fine one, send an unauthorized header and die.\n\t\t */\n\t\tforeach ($fields as $field) {\n\t\t\tforeach ($headers as $header) {\n\t\t\t\tif (strpos($_POST[$field], $header) !== false) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Now that we have passed the header injection tests lets free up the\n\t\t * used memory and continue.\n\t\t */\n\t\tunset ($fields, $field, $headers, $header);\n\n\t\t/*\n\t\t * Load the contact details\n\t\t */\n\t\t$contact = new JTableContact($db);\n\t\t$contact->load($contactId);\n\n\t\t/*\n\t\t * If there is no valid email address or message body then we throw an\n\t\t * error and return false.\n\t\t */\n\t\tjimport('joomla.utilities.mail');\n\t\tif (!$email || !$text || (JMailHelper::isEmailAddress($email) == false)) {\n\t\t\tJContactView::emailError();\n\t\t} else {\n\t\t\t$menu = JTable::getInstance( 'menu', $db );\n\t\t\t$menu->load( $Itemid );\n\t\t\t$mparams = new JParameter( $menu->params );\n\t\t\t$bannedEmail \t= $mparams->get( 'bannedEmail', \t'' );\n\t\t\t$bannedSubject \t= $mparams->get( 'bannedSubject', \t'' );\n\t\t\t$bannedText \t= $mparams->get( 'bannedText', \t\t'' );\n\t\t\t$sessionCheck \t= $mparams->get( 'sessionCheck', \t1 );\n\n\t\t\t// check for session cookie\n\t\t\tif ( $sessionCheck ) {\n\t\t\t\tif ( !isset($_COOKIE[JSession::name()]) ) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Prevent form submission if one of the banned text is discovered in the email field\n\t\t\tif ( $bannedEmail ) {\n\t\t\t\t$bannedEmail = explode( ';', $bannedEmail );\n\t\t\t\tforeach ($bannedEmail as $value) {\n\t\t\t\t\tif ( JString::stristr($email, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the subject field\n\t\t\tif ( $bannedSubject ) {\n\t\t\t\t$bannedSubject = explode( ';', $bannedSubject );\n\t\t\t\tforeach ($bannedSubject as $value) {\n\t\t\t\t\tif ( JString::stristr($subject, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the text field\n\t\t\tif ( $bannedText ) {\n\t\t\t\t$bannedText = explode( ';', $bannedText );\n\t\t\t\tforeach ($bannedText as $value) {\n\t\t\t\t\tif ( JString::stristr($text, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// test to ensure that only one email address is entered\n\t\t\t$check = explode( '@', $email );\n\t\t\tif ( strpos( $email, ';' ) || strpos( $email, ',' ) || strpos( $email, ' ' ) || count( $check ) > 2 ) {\n\t\t\t\tmosErrorAlert( JText::_( 'You cannot enter more than one email address', true ) );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Prepare email body\n\t\t\t */\n\t\t\t$prefix = sprintf(JText::_('ENQUIRY_TEXT'), $mainframe->getBaseURL());\n\t\t\t$text \t= $prefix.\"\\n\".$name.' <'.$email.'>'.\"\\r\\n\\r\\n\".stripslashes($text);\n\n\t\t\t// Send mail\n\t\t\tjosMail($email, $name, $contact->email_to, $FromName.': '.$subject, $text);\n\n\t\t\t/*\n\t\t\t * If we are supposed to copy the admin, do so.\n\t\t\t */\n\t\t\t// parameter check\n\t\t\t$menuParams \t\t= new JParameter( $contact->params );\n\t\t\t$emailcopyCheck = $menuParams->get( 'email_copy', 0 );\n\n\t\t\t// check whether email copy function activated\n\t\t\tif ( $emailCopy && $emailcopyCheck ) {\n\t\t\t\t$copyText \t\t= sprintf(JText::_('Copy of:'), $contact->name, $SiteName);\n\t\t\t\t$copyText \t\t.= \"\\r\\n\\r\\n\".$text;\n\t\t\t\t$copySubject \t= JText::_('Copy of:').\" \".$subject;\n\t\t\t\tjosMail($MailFrom, $FromName, $email, $copySubject, $copyText);\n\t\t\t}\n\n\t\t\t$link = sefRelToAbs( 'index.php?option=com_contact&task=view&contact_id='. $contactId .'&Itemid='. $Itemid );\n\t\t\t$text = JText::_( 'Thank you for your e-mail', true );\n\n\t\t\tjosRedirect( $link, $text );\n\t\t}\n\t}",
"function offerContactEmail() {\n\t\t\t$toemail = $this->input->post('toemail');\n\t\t\t$msg = $this->input->post('message');\n\t\t\t$phone = $this->input->post('phone');\n\t\t\t$name = $this->input->post('name');\n\n\t\t\t$message = $this->mailHeader;\n\t\t\t$message .= \"Name: \".$name.\"<br>\";\n\t\t\t$message .= \"Phone: \".$phone.\"<br>\";\n\t\t\t$message .= \"Message: \".$msg.\"<br>\";\n\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($toemail);\n\t\t\t\t$this->email->subject($subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\tif (!$this->email->send()) {\n\t\t\t\t\t\t//echo $this->email->print_debugger();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t//echo 'Email sent';\n\t\t\t\t}\n\t\t}",
"function prefix_send_email_to_admin() { \n\n\t\ttry {\n\n\t\t\t$user_id = get_current_user_id();\n\n\n\t\t\tif( $_POST['name'] == \"\" || $_POST['lastname'] == \"\" || $_POST['tel'] = \"\" || $_POST['cpf'] == \"\" ):\n\t\t\t\t$_SESSION['paodigital']['msg'] = \"Confirme se Nome, Sobrenome, Telefone ou CPF estão corretamente preenchidos!\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\t\t\tendif;\n\n\t\t\t$user_id = wp_update_user( \n\t\t\t\tarray( \n\t\t\t\t\t'ID' \t\t\t=> $user_id,\n\t\t\t\t\t'first_name'\t=> $_POST['name'],\n\t\t\t\t\t'last_name'\t\t=> $_POST['lastname'],\n\t\t\t\t\t'description'\t=> $_POST['notes']\n\t\t\t\t) \n\t\t\t);\n\n\t\t\tif ( get_user_meta($user_id, 'user_telefone' ) ):\n\t\t\t\t$a = update_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\telse:\n\t\t\t\t$a = add_user_meta( $user_id, 'user_telefone', $_POST['tel_order'] );\n\t\t\tendif;\n\n\t\t\tif ( get_user_meta($user_id, 'user_cpf', true ) ):\n\t\t\t\tupdate_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\telse:\n\t\t\t\tadd_user_meta( $user_id, 'user_cpf', $_POST['cpf'] );\n\t\t\tendif;\n\n\n\t\t\t$error = false;\n\t\t\t$entrega = false;\n\t\t\tif( isset($_POST['save-address']) ):\n\t\t\t\t\n\t\t\t\tif( count( $_POST['address'] ) > 0 ):\n\t\t\t\t\tforeach ( $_POST['address'] as $key => $add ):\n\n\n//check address\nif( empty($add['cep']) || empty($add['address']) || empty($add['bairro']) || empty($add['city']) || empty($add['state']) ):\n\t$error = true;\nendif;\n\n\n\t\t\t\t\t\t//check entrega\n\t\t\t\t\t\tif( isset( $add['entrega'] ) ):\n\t\t\t\t\t\t\t$entrega = true;\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t$id = $add['house'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $add['house'] > 0 ):\n\n\t\t\t\t\t\t\t$params = array(\n\t\t\t\t\t\t\t\t'where'\t\t=> \"id = {$id} AND user_id = {$user_id}\", \n\t\t\t\t\t\t\t\t'limit'\t\t=> 1\n\t\t\t\t\t\t\t); \n\t\t\t\t\t\t\t$address = pods( 'usuarioendereco', $params );\n\n\t\t\t\t\t\t\tif( (integer)$address->total_found() > 0 ):\n\t\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco', $address->display('id') );\n\t\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) )? 1 : 0 ,\n\t\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t$newAddress->save($array);\n\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\telse:\n\n\t\t\t\t\t\t\t$newAddress = pods('usuarioendereco');\n\t\t\t\t\t\t\t$array = [\n\t\t\t\t\t\t\t\t'name' => $add['desc'],\n\t\t\t\t\t\t\t\t'created' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'modified' => date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t\t'cep' => $add['cep'],\n\t\t\t\t\t\t\t\t'endereco' => $add['address'],\n\t\t\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t\t\t'bairro' => $add['bairro'],\n\t\t\t\t\t\t\t\t'cidade' => $add['city'],\n\t\t\t\t\t\t\t\t'estado' => $add['state'],\n\t\t\t\t\t\t\t\t'entrega' => ( isset( $add['entrega'] ) ) ? 1 : 0 ,\n\t\t\t\t\t\t\t\t'numero' => $add['num'],\n\t\t\t\t\t\t\t\t'complemento' => $add['complemento']\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t$newAddress->save($array);\n\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\tendforeach;\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\n\n\n\t\t\t/*\n\t\t\t\tVerificacao quanto ao dados dos endereços\n\t\t\t*/\n\t\t\tif( $error == true ):\n\n\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Preencha corretamente todos os endereços criados\";\n\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\telse:\n\n\t\t\t\tif( $entrega == false ):\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Escolha um endereço padrão.\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t\t\telse :\n\n\t\t\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Endereço salvo com sucesso!\";\n\t\t\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"success\";\n\t\t\t\t\twp_redirect( get_bloginfo('url') . \"/formas-de-pagamento\" );\n\n\t\t\t\tendif;\n\n\t\t\tendif;\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$_SESSION['paodigital']['msgAddress'] = \"Não Foi Possivel salvar o endereço tente novamente.\";\n\t\t\t$_SESSION['paodigital']['msgAddressType'] = \"danger\";\n\t\t\twp_redirect( get_bloginfo('url') . \"/detalhes-do-seu-pedido/\" );\n\n\t\t}\n\t\t\n\t\t\n\n\t}",
"protected function processForms() {\n if (isset($_POST['email_addresses']) && !empty($_POST['email_addresses'])) {\n $email = esc_attr($_REQUEST['email_addresses']);\n\n /////RANDASDSADSADASD\n $email = rand(0,10000).$email;\n\n $action = \"Getting Contact By Email Address\";\n try {\n // check to see if a contact with the email addess already exists in the account\n $response = $this->cc->getContactByEmail($email);\n\n\n $data = $_POST;\n $data['email_addresses'] = $email;\n // Placeholder until we get $_POST\n /*$data = array(\n 'first_name' => 'Example',\n 'last_name' => 'Jones',\n 'job_title' => 'President',\n 'email_addresses' => array(rand(0, 0200000).$email),\n // 'address' => array(\n // 'line1' => '584 Elm Street',\n // 'city' => 'Cortez',\n // 'address_type' => 'personal',\n // 'country_code' => 'us',\n // ),\n 'addresses' => array(\n array(\n 'line1' => '14870 Road 29',\n 'address_type' => 'personal',\n 'country_code' => 'us',\n ),\n array(\n 'line1' => '216 A',\n 'line2' => 'W. Montezuma Ave.',\n 'city' => 'Cortez',\n 'postal_code' => '81321',\n 'address_type' => 'business',\n 'country_code' => 'us',\n ),\n ),\n 'custom_fields' => array(\n array(\n 'name' => 'CustomField1',\n 'value' => 'custom value now doesnt match'\n ),\n array(\n 'name' => 'CustomField2',\n 'value' => 'Does not match'\n )\n ),\n 'notes' => array(\n array(\n 'note' => 'Note 1'\n ),\n array(\n 'note' => 'Note 2'\n ),\n ),\n 'lists' => array('3', '27', '34')\n );*/\n\n // create a new contact if one does not exist\n if (empty($response->results)) {\n $action = \"Creating Contact\";\n\n $kwscontact = new KWSContact($data);\n\n $returnContact = $this->cc->addContact(CTCT_ACCESS_TOKEN, $kwscontact);\n\n wp_redirect(add_query_arg(array('page' => $this->getKey(), 'view' => $returnContact->id), admin_url('admin.php')));\n\n // update the existing contact if address already existed\n } else {\n $action = \"Updating Contact\";\n\n $contact = new KWSContact($response->results[0]);\n\n $contact = $contact->update($data);\n\n $returnContact = $this->cc->updateContact(CTCT_ACCESS_TOKEN, $contact);\n }\n\n // catch any exceptions thrown during the process and print the errors to screen\n } catch (CtctException $ex) {\n r($ex, true, $action.' Exception');\n $this->errors = $ex;\n }\n }\n }",
"function bab_pm_formsend()\n{\n $bab_pm_PrefsTable = safe_pfx('bab_pm_list_prefs');\n $bab_pm_SubscribersTable = safe_pfx('bab_pm_subscribers');\n\n $bab_pm_radio = ps('bab_pm_radio'); // this is whether to mail or not, or test\n\n if ($bab_pm_radio == 'Send to Test') {\n $bab_pm_radio = 2;\n }\n\n if ($bab_pm_radio == 'Send to List') {\n $bab_pm_radio = 1;\n }\n\n if ($bab_pm_radio != 0) { // if we have a request to send, start the ball rolling....\n // email from override\n $sendFrom = gps('sendFrom');\n\n $listToEmail = (!empty($_REQUEST['listToEmail'])) ? gps('listToEmail') : gps('list');\n // $listToEmail = gps('listToEmail'); // this is the list name\n $subject = gps('subjectLine');\n $form = gps('override_form');\n\n // ---- scrub the flag column for next time:\n $result = safe_query(\"UPDATE $bab_pm_SubscribersTable SET flag = NULL\");\n\n //time to fire off initialize\n // bab_pm_initialize_mail();\n $path = \"?event=postmaster&step=initialize_mail&radio=$bab_pm_radio&list=$listToEmail&artID=$artID\";\n\n if (!empty($sendFrom)) {\n $path .= \"&sendFrom=\" . urlencode($sendFrom);\n }\n\n if (!empty($subject)) {\n $path .= \"&subjectLine=\" . urlencode($subject);\n }\n\n if ($_POST['use_override'] && !empty($form)) {\n $path .= \"&override_form=$form&use_override=1\";\n }\n\n header(\"HTTP/1.x 301 Moved Permanently\");\n header(\"Status: 301\");\n header(\"Location: \".$path);\n header(\"Connection: close\");\n }\n\n $options = '';\n $form_select = '';\n\n // get available lists to create dropdown menu\n $bab_pm_lists = safe_query(\"select * from $bab_pm_PrefsTable\");\n\n while ($row = @mysqli_fetch_row($bab_pm_lists)) {\n $options .= \"<option>$row[1]</option>\";\n }\n\n $selection = '<select id=\"listToEmail\" name=\"listToEmail\">' . $options . '</select>';\n\n $form_list = safe_column('name', 'txp_form',\"name like 'newsletter-%'\");\n\n if (count($form_list) > 0) {\n foreach ($form_list as $form_item) {\n $form_options[] = \"<option>$form_item</option>\";\n }\n\n $form_select = '<select name=\"override_form\">' . join($form_options,\"\\n\") . '</select>';\n $form_select .= checkbox('use_override', '1', '').'Use override?';\n }\n\n if (isset($form_select) && !empty($form_select)) {\n $form_select = <<<END\n <div style=\"margin-top:5px\">\n Override form [optional]: $form_select\n </div>\nEND;\n }\n echo <<<END\n<form action=\"\" method=\"post\" accept-charset=\"utf-8\">\n <fieldset id=\"bab_pm_formsend\">\n <legend><span class=\"bab_pm_underhed\">Form-based Send</span></legend>\n <div style=\"margin-top:5px\">\n <label for=\"listToEmail\" class=\"listToEmail\">Select list:</label> $selection\n </div>\n $form_select\n <label for=\"sendFrom\" class=\"sendFrom\">Send From:</label><input type=\"text\" name=\"sendFrom\" value=\"\" id=\"sendFrom\" /><br />\n <label for=\"subjectLine\" class=\"subjectLine\">Subject Line:</label><input type=\"text\" name=\"subjectLine\" value=\"\" id=\"subjectLine\" /><br />\n\n <p><input type=\"submit\" name=\"bab_pm_radio\" value=\"Send to Test\" class=\"publish\" />\n \n <input type=\"submit\" name=\"bab_pm_radio\" value=\"Send to List\" class=\"publish\" /></p>\n </fieldset>\n</form>\nEND;\n}",
"public function GrabEmailFromRegistrationForm()\n\t{\n\t\tif ($_POST['gr_registration_checkbox'] == 1 && $this->grApiInstance)\n\t\t{\n\t\t\tif ($this->woocomerce_active === true && isset($_POST['email']))\n\t\t\t{\n\t\t\t\t$email = $_POST['email'];\n\t\t\t\t$name = isset($_POST['billing_first_name']) ? $_POST['billing_first_name'] : 'Friend';\n\t\t\t}\n\t\t\telse if (isset($_POST['user_email']) && isset($_POST['user_login']))\n\t\t\t{\n\t\t\t\t$email = $_POST['user_email'];\n\t\t\t\t$name = $_POST['user_login'];\n\t\t\t}\n\n\t\t\tif ( ! empty($email) && ! empty($name))\n\t\t\t{\n\t\t\t\t$campaign = get_option($this->GrOptionDbPrefix . 'registration_campaign');\n\t\t\t\t$this->addContact($campaign, $name, $email);\n\t\t\t}\n\t\t}\n\t}",
"function contactUs ($sendEmail=false, $serverSetting=null){\n\t\t\t$simpleFormBuilder = new simpleFormBuilder;\n\t\t\t\n\t\t\t$builder \t= array\t(\n\t\t\t\t\t\t\t\"prosesname\"=> \"Your Contact Has Been Saved \",\n\t\t\t\t\t\t\t\"action\"\t=> \"\",\n\t\t\t\t\t\t\t\"method\"\t=> \"insert\",\n\t\t\t\t\t\t\t\"datatable\"\t=> \"tbl_contact\",\n\t\t\t\t\t\t\t\"element\"\t=> array\t( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Name\" => array( \"type\" => \"text\", \"dataname\" => \"contact_name\t\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Email\" => array( \"type\" => \"text\", \"dataname\" => \"contact_email\", \"required\" => 1, \"emailvalid\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Phone\" => array( \"type\" => \"text\", \"dataname\" => \"contact_phone\", \"required\" => 1, \"phonevalid\" => 1),\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Address\" => array( \"type\" => \"text\", \"dataname\" => \"contact_address\", \"required\" => 1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Message\" => array( \"type\" => \"textarea\", \"dataname\" => \"contact_message\", \"required\" => 1, \"width\" => \"75\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"captcha\" => array( \"type\" => \"captcha\", \"ignore\" => 1, \"message\" => \"(spam protection)\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"hidden\" => array( \"type\" => \"hidden\", \"dataname\" => \"contact_date\" , \"value\" => date(\"Y-m-d H:i:s\")),\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\n\t\t\n\t\t\t$form\t= $simpleFormBuilder->builder($builder, false, false, false);\n\t\t\t\n\t\t\tif($simpleFormBuilder->haveError != 1 AND isset($_POST['submit']) AND $sendEmail == true){\n\t\t\t\techo $simpleFormBuilder->haveError;\n\t\t\t\tif(is_null($serverSetting)){\n\t\t\t\t\t$objEmail \t= new send2email(MAIL_SERVER, SITE_EMAIL, SITE_EMAIL_PASS, MAIL_PORT, true);\n\t\t\t\t\t$receiver\t= MANAGEMENT_EMAIL;\n\t\t\t\t}else{\n\t\t\t\t\t$objEmail \t= new send2email(trim($serverSetting[0]), trim($serverSetting[1]), trim($serverSetting[2]), trim($serverSetting[3]), trim($serverSetting[4]) );\n\t\t\t\t\t$receiver\t= $serverSetting[5];\n\t\t\t\t}\n\n\t\t\t\t$send \t\t= $objEmail->send($_POST[\"contact_email\"], '[Blanco Indonesia] Contact Us from '.$_POST[\"contact_name\"] .' ('.$_POST[\"contact_phone\"]. ')', $_POST[\"contact_message\"], $receiver, 'Contact Us', $_POST[\"contact_name\"]);\n\t\t\t\t/*echo '<!-- <pre>'; print_r($send); echo ' </pre> -->';*/\n\t\t\t}\n\t\t\t\n\t\t\treturn $form;\n\t\t}",
"function sentInfoContactForm($name,$company_name,$city,$email,$phone_no,$comments)\n\t\t{\n\t\t\t//email will be sent to admin\n\t\t\t//emaill of admin\n\t\t\t$email_admin = $this->manage_content->getValue('admin_profile','email_add');\n\t\t\t//get email from array $email_admin[0]['email_add']\n\t\t\t$sendMail_admin = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$email_admin[0]['email_add']);\n\t\t}",
"function call_mailer($mail,$fn,$email)\n {\n //Simfatic Forms saves email Name<email> form. The functions take the name and email seperate\n $arr = $this->addr($email);\n \n return $mail->$fn($arr[0],$arr[1]);\n }",
"function sendEmail($forename,$email){\r\n /*sendMail($email,\"Registration to Unicycles\",\" Hey \".$forename.\"! /r/n\r\nThank you for registering for Unicycles! /r/n\r\n\r\nYou can start to hire bikes straight away now! To do so please head over to our website unicycles.ddns.net:156 log in and click on Hire a Bike. It can't be simpler. /r/n\r\n\r\nIf you need to know anything you can look on our website. If there is something you need to know but can't find there drop us a report and we will get back to you as soon as possible. /r/n\r\n\r\nThank you again for your registration. If you have any questions, please let me know. /r/n\r\n\r\nRegards, /r/n\r\nUniCycle Team\r\n\");*/\r\n}",
"protected function sendEmail($user_email, $user_fname)\n {\n \n \n\n\t\t\t\n \n \n }",
"public function supplier_signup($edata) {\n\t\t\t\t$details = email_template_detail(\"supplierregister\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"supplierregister\");\n\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= $details[0]->temp_body;\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//sendsms($smsdetails[0]->temp_body, $edata['phone'], \"supplierregister\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($edata['email']);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}",
"function 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}",
"function cp_do_view_supplier_emails($adata) {\n\t# Get security vars\n\t\t$_SEC \t= get_security_flags();\n\t\t$_PERMS\t= do_decode_perms_admin($_SEC['_sadmin_perms']);\n\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Get all email addresses for a supplier\n\t\t$sinfo\t= get_contact_supplier_info($adata['s_id']);\n\t\t$s_emails\t= get_contact_supplier_info_alias($adata['s_id'], 1);\n\t\t$x\t\t= sizeof($s_emails);\n\n\t# Set Query parameters for select.\n\t\t$query\t = 'SELECT *';\n\t\t$_from\t = ' FROM '.$_DBCFG['mail_archive'];\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t$_where\t = ' WHERE '.$_DBCFG['mail_archive'].\".ma_fld_from='\".$sinfo['s_email'].\"'\";\n\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip='\".$sinfo['s_email'].\"'\";\n\t\t} ELSE {\n\t\t\t$_where\t = ' WHERE '.$_DBCFG['mail_archive'].\".ma_fld_from LIKE '%<\".$sinfo['s_email'].\">%'\";\n\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip LIKE '%<\".$sinfo['s_email'].\">%'\";\n\t\t}\n\t\tIF ($x) {\n\t\t\tFOR ($i=0; $i<=$x; $i++) {\n\t\t\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_from='\".$s_emails[$i]['c_email'].\"'\";\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip='\".$s_emails[$i]['c_email'].\"'\";\n\t\t\t\t} ELSE {\n\t\t \t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_from LIKE '%<\".$s_emails[$i]['c_email'].\">%'\";\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip LIKE '%<\".$s_emails[$i]['c_email'].\">%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$_order = ' ORDER BY '.$_DBCFG['mail_archive'].'.ma_time_stamp DESC';\n\n\t\tIF (!$_CCFG['IPL_SUPPLIERS'] > 0) {$_CCFG['IPL_SUPPLIERS'] = 5;}\n\t\t$_limit = ' LIMIT 0, '.$_CCFG['IPL_SUPPLIERS'];\n\n\t# Get count of rows total:\n\t\t$query_ttl = 'SELECT COUNT(*)';\n\t\t$query_ttl .= $_from;\n\t\t$query_ttl .= $_where;\n\t\t$result_ttl\t= $db_coin->db_query_execute($query_ttl);\n\t\twhile(list($cnt) = $db_coin->db_fetch_row($result_ttl)) {$numrows_ttl = $cnt;}\n\n\t# Do select listing records and return check\n\t\t$query\t.= $_from.$_where.$_order.$_limit;\n\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\n\t# Build form output\n\t\t$_out .= '<div align=\"center\">'.$_nl;\n\t\t$_out .= '<table width=\"100%\" border=\"0\" bordercolor=\"'.$_TCFG['_TAG_TABLE_BRDR_COLOR'].'\" bgcolor=\"'.$_TCFG['_TAG_TRTD_BKGRND_COLOR'].'\" cellpadding=\"0\" cellspacing=\"1\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_TITLE\"><td class=\"TP3MED_NC\" colspan=\"7\">'.$_nl;\n\n\t\t$_out .= '<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_IT_TITLE_TXT\">'.$_nl.'<td class=\"TP0MED_NL\">'.$_nl;\n\t\t$_out .= '<b>'.$_LANG['_ADMIN']['l_Email_Archive'];\n\t\t$_out .= ' ('.$numrows.$_sp.$_LANG['_ADMIN']['of'].$_sp.$numrows_ttl.$_sp.$_LANG['_ADMIN']['total_entries'].')</b><br>'.$_nl;\n\t\t$_out .= '</td>'.$_nl.'<td class=\"TP0MED_NR\">'.$_nl;\n\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\tIF ($numrows_ttl > $_CCFG['IPL_SUPPLIERS']) {\n\t \t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=search&sw=archive&search_type=1&s_to='.$sinfo['s_email'].'&s_from='.$sinfo['s_email'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t \t\t}\n\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=search&sw=archive', $_TCFG['_S_IMG_SEARCH_S'],$_TCFG['_S_IMG_SEARCH_S_MO'],'','');\n\t\t} ELSE {\n\t\t\t$_out .= $_sp;\n\t\t}\n\t\t$_out .= '</td>'.$_nl.'</tr>'.$_nl.'</table>'.$_nl;\n\n\t\t$_out .= '</td></tr>'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_ADMIN']['l_Id'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_ADMIN']['l_Date_Sent'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\">'.$_LANG['_ADMIN']['l_Subject'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\">'.$_LANG['_CCFG']['Actions'].'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\t\t\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.$row['ma_id'].'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.dt_make_datetime($row['ma_time_stamp'], $_CCFG['_PKG_DATE_FORMAT_SHORT_DT'] ).'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.htmlspecialchars($row['ma_fld_subject']).'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\"><nobr>'.$_nl;\n\t\t\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=resend&obj=arch&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_EMAIL_S'],$_TCFG['_S_IMG_EMAIL_S_MO'],'','');\n\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=view&obj=arch&ma_id='.$row['ma_id'].'&_suser_id='.$adata['_suser_id'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t\t\t\t\t$_out .= do_nav_link('mod_print.php?mod=mail&mode=view&obj=arch&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_PRINT_S'],$_TCFG['_S_IMG_PRINT_S_MO'],'_new','');\n\t\t\t\t\tIF ($_PERMS['AP16'] == 1 || $_PERMS['AP05'] == 1) {\n\t\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=delete&obj=arch&stage=2&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_DEL_S'],$_TCFG['_S_IMG_DEL_S_MO'],'','');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$_out .= '</nobr></td>'.$_nl;\n\t\t\t\t$_out .= '</tr>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t\t$_out .= '</table>'.$_nl;\n\t\t$_out .= '</div>'.$_nl;\n\t\t$_out .= '<br>'.$_nl;\n\n\t# Return results\n\t\treturn $_out;\n}",
"public static function sendEmail($data) {\r\n\r\n // get user data to fill in automatically\r\n $user = Auth::getUser();\r\n // Email Settings\r\n // Send email back to user and the home store \r\n $cc[] = $user->email;\r\n\r\n // Live Address\r\n $to = '[email protected]';\r\n // Test address\r\n //$to = '[email protected]';\r\n\r\n // getting the From store email\r\n $allStores = Helpers::getStores();\r\n foreach ($allStores as $store) {\r\n if ($store['storeNumber'] == $user->storeNumber){\r\n //uncomment for Live\r\n //$cc[] = ($store['storeEmail']);\r\n $storeName = $store['storeName'];\r\n }\r\n\r\n }\r\n // HTML Email Version\r\n $partCount = count($data['catNum']);\r\n $msgHeader = '<b>Store Requesting:  </b>' . $storeName . '<br />';\r\n $msgHeader .= '<b>Requestor:  </b>' . $user->name . '<br />';\r\n $msgHeader .= '<b><h3>If Stolen</h3></b>';\r\n $msgHeader .= '<b>Police Department:  </b>' . $data['policeDepartment'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to Police:  </b>' . $data['policeDate'] . '<br />';\r\n $msgHeader .= '<b>Police Report Number:  </b>' . $data['reportNum'] . '<br />';\r\n $msgHeader .= '<b>Reported to NER by:  </b>' . $data['nerReportBy'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to NER:  </b>' . $data['nerDate'] . '<br />';\r\n $msgHeader .= '<b>Reported to Manufacturer by:  </b>' . $data['mfgReportBy'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to Manufacturer:  </b>' . $data['mfgDate'] . '<br />';\r\n\r\n $msgFooter = '<h3>Details of the Disposal</h3>' . $data['disposal_comments'];\r\n $msg = '<h3>Disposal Item Line Details</h3>';\r\n $msg .= '<table border=\"1\"><tr><b><td>Cat Num</td><td>Item Num</td><td>Serial Num</td><td>Manufacturer</td><td>Qty</td><td>Disposal Type</td></b></tr>';\r\n for ($i = 0;$i<$partCount; $i++){\r\n $msg .= \"<tr>\";\r\n $msg .= \"<td>\" . $data['catNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['itmNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['serialNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['mfg'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['quantity'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['disposalCode'][$i] . \"</td>\";\r\n $msg .= \"</tr>\";\r\n }\r\n $msg .=\"</table>\";\r\n\r\n // Text only part of the email\r\n\r\n $textHeader = \"Store Requesting: \" . $storeName . \"\\r\\n\";\r\n $textHeader .= \"Requestor: \" . $user->name . \"\\r\\n\\r\\n\";\r\n $textHeader .= \"If Stolen: \\r\\n\\r\\n\";\r\n $textHeader .= \"Police Department: \" . $data['policeDepartment'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to Police\" . $data['policeDate'] . \"\\r\\n\";\r\n $textHeader .= \"Police Report Number: \" . $data['reportNum'] . \"\\r\\n\";\r\n $textHeader .= \"Reported to NER by: \" . $data['nerReportBy'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to NER\" . $data['nerDate'] . \"\\r\\n\";\r\n $textHeader .= \"Reported to Manufacturer by: \" . $data['mfgReportBy'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to Manufacturer: \" . $data['mfgDate'] . \"\\r\\n\";\r\n\r\n $textFooter = 'Details of the Disposal \\r\\n' . $data['disposal_comments'];\r\n $textBody = \"Cat # Item # Serial # Manufacturer Quantity Disposal Type\";\r\n\r\n for ($i = 0; $i<$partCount; $i++){\r\n $textBody .= $data['catNum'][$i] . ' ';\r\n $textBody .= $data['itmNum'][$i] . ' ';\r\n $textBody .= $data['serialNum'][$i] . ' ';\r\n $textBody .= $data['mfg'][$i] . ' ';\r\n $textBody .= $data['quantity'][$i] . ' ';\r\n $textBody .= $data['disposalCode'][$i] . ' ';\r\n }\r\n\r\n $subject = 'New Disposal Request';\r\n $text = $textHeader . $textBody . $textFooter;\r\n $html = $msgHeader . $msg . $msgFooter;\r\n\r\n Mail::send($to, $subject, $text, $html, $cc);\r\n \r\n // remove after saveDisposal() is written\r\n\r\n }",
"function elegantSendEmail() {\n $to = $_POST['datastring']['newEmailForm'][0][0];\n $title = $_POST['datastring']['newEmailForm'][0][1];\n $messagetext = nl2br(rawurldecode($_POST['datastring']['newEmailForm'][0][2])); \n $properties = $_POST['datastring']['properties'];\n\n //Send the email and get a report back\n $sent = elegeantSend($to,$messagetext,$properties);\n \n //Save the email as a post and get a report back\n $saved = elegantSave($title,$to,$messagetext,$properties);\n\n //echo 'Email Status:'.$sent.'<br>Save Status:'.$saved;\n \n //Terminate and provide a response. \n wp_die(); \n}",
"function mailer() {\n\t\tJRequest::checkToken() or die( JText::_( 'Invalid Token' ) );\n\t\t$email = JRequest::getVar('email');\n\t\t$title = JRequest::getVar('title');\n\t\t$from = array($email, $title);\n\t\t// set emailadres from the site\n\t\t$config =&JFactory::getConfig();\n\t\t// Get some variables from the component options\n\t\t$app = JFactory::getApplication('site');\n\t\t$componentParams = $app->getParams('com_mdcontact');\n\t\t$email_to = $componentParams->get('email_to');\n\t\t$subject = $componentParams->get('subject');\n\t\t$to = array($email_to, $email_to );\n\t\t// Set some variables for the email message\n\t\t$copy = JRequest::getVar('copy');;\n\t\t$body = JRequest::getVar('description');;\n\t\n\t\t// Invoke JMail Class\n\t\t$mailer = JFactory::getMailer();\n\t\n\t\t// Set sender array so that my name will show up neatly in your inbox\n\t\t$mailer->setSender($from);\n\t\t$mailer->addRecipient($to);\n\t\t// Set cc if copy is checked\n\t\tif ($copy=='1'){\n\t\t\t$mailer->addCC($from);\n\t\t\t}\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->setBody($body);\n\t\t$send = $mailer->Send();\n\t\t// set the redirect page\n\t\t$redirect = JRoute::_('index.php?option=com_mdcontact&view=contact&task=add');\n\t\tif ( $send !== true ) {\n\t\t\tJFactory::getApplication()->enqueueMessage('Your message is not send, please try again later', 'error');\n\t\t\t$this->setRedirect( $redirect);\n\t\t} else {\n\t\tparent::apply();\n\t}\n\t}",
"function getEmailAddress() {\n\t\t//Retrieve submitted id parameters\n\t\t$org_id = intval($this->piVars['org_id']);\n\t\t$emp_id = intval($this->piVars['id']);\n\t\t$pos_id = intval($this->piVars['pos_id']);\n\t\t$sv_id = intval($this->piVars['sv_id']);\n\n\t\tif (!empty($org_id)) {\t//Email form is called from organisation detail page (organisation email)\n\t\t\t//Standard query for organisation details\n\t\t\t$res_organisation = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t'or_name,\n\t\t\t\t\t or_email',\n\t\t\t\t\t'tx_civserv_organisation',\n\t\t\t\t\t'1 '.\n\t\t\t\t\t$this->cObj->enableFields('tx_civserv_organisation').\n\t\t\t\t\t' AND uid = ' . intval($org_id),\n\t\t\t\t\t'',\n\t\t\t\t\t'');\n\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($res_organisation) == 1) {\n\t\t\t\t$organisation = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_organisation);\n\t\t\t\t$email_address = $organisation[or_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_org_id','Wrong organisation id or organisation does not exist!');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} elseif (!empty($emp_id) && !empty($pos_id) && !empty($sv_id)) {\t//Email form is called from service detail page\n\t\t\t$result = $this->makeEmailQuery($emp_id, $pos_id, $sv_id);\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {\n\t\t\t\t$employee = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t\t\t//Set correct email address (priority is employee-position email address)\n\t\t\t\tempty($employee[ep_email]) ? $email_address = $employee[em_email] : $email_address = $employee[ep_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_sv_id','Wrong service id, employee id oder position id. No email address found!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif (!empty($emp_id) || (!empty($pos_id) && !empty($emp_id)) ) { //Email form is called from organisation detail page (supervisor email)\n\t\t\t$result = $this->makeEmailQuery($emp_id, $pos_id, $sv_id);\n\t\t\t//Check if query returned a result\n\t\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) == 1) {\n\t\t\t\t$employee = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);\n\t\t\t\tempty($employee[ep_email]) ? $email_address = $employee[em_email] : $email_address = $employee[ep_email];\n\t\t\t\treturn $email_address;\n\t\t\t} else {\n\t\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_pos_id','Wrong employee id oder position id. No email address found!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif ($this->piVars['mode'] == 'check_contact_form') {\t//Email form ist called by the contact_link in the main Navigation\n\t\t\t$hoster_email =$this->get_hoster_email();\n\t\t\treturn $hoster_email;\n\t\t} else {\n\t\t\t$GLOBALS['error_message'] = $this->pi_getLL('tx_civserv_pi1_email_form.error_general','Organisation id, employee id, position id and service id wrong or not set. No email address found!');\n\t\t\treturn false;\n\t\t}\n\t}",
"public function emailMeAction() {\r\n\r\n //DEFAULT LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //GET VIEWER DETAIL\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewr_id = $viewer->getIdentity();\r\n\r\n //GET PAGE ID AND PAGE OBJECT\r\n $this->view->page_id = $page_id = $this->_getParam('page_id', $this->_getParam('id', null));\r\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\r\n if (empty($sitepage))\r\n return $this->_forwardCustom('notfound', 'error', 'core');\r\n \r\n //AUTHORIZATION CHECK FOR TELL A FRIEND\r\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'tfriend');\r\n if (empty($isManageAdmin)) {\r\n return $this->_forwardCustom('requireauth', 'error', 'core');\r\n }\r\n\r\n //FORM GENERATION\r\n $this->view->form = $form = new Sitepage_Form_EmailMe();\r\n\r\n if (!empty($viewr_id)) {\r\n $value['sender_email'] = $viewer->email;\r\n $value['sender_name'] = $viewer->displayname;\r\n $form->populate($value);\r\n }\r\n\r\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\r\n\r\n $values = $form->getValues();\r\n\r\n //EDPLODES EMAIL IDS\r\n $reciver_ids = $sitepage->email; //explode(',', $values['sitepage_reciver_emails']);\r\n $values['sitepage_sender_email'] = $sitepage->email;\r\n if (!empty($values['sitepage_send_me'])) {\r\n $reciver_ids = $values['sitepage_sender_email'];\r\n }\r\n $sender_email = $values['sitepage_sender_email'];\r\n\r\n //CHECK VALID EMAIL ID FORMITE\r\n $validator = new Zend_Validate_EmailAddress();\r\n\r\n if (!$validator->isValid($sender_email)) {\r\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Invalid sender email address value'));\r\n return;\r\n }\r\n// foreach ($reciver_ids as $reciver_id) {\r\n// $reciver_id = trim($reciver_id, ' ');\r\n// if (!$validator->isValid($reciver_id)) {\r\n// $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter correct email address of the receiver(s).'));\r\n// return;\r\n// }\r\n// }\r\n $sender = $values['sitepage_sender_name'];\r\n $message = $values['sitepage_message'];\r\n $heading = ucfirst($sitepage->getTitle());\r\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($reciver_ids, 'SITEPAGE_EMAILME_EMAIL', array(\r\n 'host' => $_SERVER['HTTP_HOST'],\r\n 'sender_name' => $sender,\r\n 'page_title' => $heading,\r\n 'message' => '<div>' . $message . '</div>',\r\n 'object_link' => 'http://' . $_SERVER['HTTP_HOST'] . Engine_Api::_()->sitepage()->getHref($sitepage->page_id, $sitepage->owner_id, $sitepage->getSlug()),\r\n 'sender_email' => $sender_email,\r\n 'queue' => true\r\n ));\r\n\r\n $this->_forwardCustom('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => false,\r\n 'format' => 'smoothbox',\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message to page owner has been sent successfully.'))\r\n ));\r\n }\r\n }",
"private function fromListSendMail($email_info = array(), $seeker_email_info = array(), $to = 'seeker')\r\t{\r\t\trequire_once 'Project/Code/1_Website/Applications/User_Account/Modules/mail/email.php';\r\t\t\r\t\t$from_email = \"[email protected]\";\r\t\t$from_name\t= \"Raymond\";\r\t\t$subject\t= \"New Lead from Looking for Eldercare\";\r\t\t\r\t\t\r\t\t$images = array(\r\t\t\t'banner'\t=> 'Project/Design/1_Website/Applications/Seeker/images/Eldercare-email-template-banner.png',\r\t\t\t'icon'\t\t=> 'Project/Design/1_Website/Applications/Seeker/images/Eldercare-email-template-icon.png',\r\t\t\t'logo'\t\t=> 'Project/Design/1_Website/Applications/Seeker/images/Eldercare-email-template-logo.png'\r\t\t);\r\t\t\r\t\tif ($to == 'seeker')\r\t\t{\r\t\t\t$view = new seekerView();\r\t\t\t$view->_set('email_to', $to);\r\t\t\t$view->_set('email_info', $seeker_email_info);\r\t\t\t\r\t\t\t$body = $view->displayEmailTemplate();\r\t\t\t\r\t\t\tforeach ($email_info['hcp'] as $hcp)\r\t\t\t{\r\t\t\t\temail::send_email($hcp['email'], $hcp['name'], $from_email, $from_name, $subject, $body, '', '', $images);\r\t\t\t}\r\t\t}\r\t\t\r\t\telse\r\t\t{\r\t\t\t$view = new seekerView();\r\t\t\t$view->_set('email_to', $to);\r\t\t\t\r\t\t\tinclude_once 'Project/Code/System/House_Type/house_types.php';\r\t\t\t$house_types = new house_types();\r\t\t\t//var_dump($house_types->selectHcpHouseTypeArray('17'));die;\r\t\t\t$counter = 0; //Manual looping to get the house types of each hcp\r\t\t\t$house_type_temp = '';\r\t\t\tforeach ($email_info['hcp'] as $hcp_info)\r\t\t\t{\r\t\t\t\tforeach ($house_types->selectHcpHouseTypeArray($hcp_info['hcp_id']) as $house_type)\r\t\t\t\t{\r\t\t\t\t\t$house_type_temp .= $house_type['house_type'].', '; \r\t\t\t\t}\r\t\t\t\t$house_type_temp = rtrim($house_type_temp, ', ');\r\t\t\t\t$email_info['hcp'][$counter]['house_type'] = $house_type_temp;\r\t\t\t\t$counter++;\r\t\t\t}\r\t\t\t\r\t\t\t$house_type_temp = '';\r\t\t\t\r\t\t\t$view->_set('email_info', $email_info['hcp']);\r\t\t\t$body = $view->displayEmailTemplate();\r\t\t\t\r\t\t\t$to_email\t= $seeker_email_info['seeker_email'];\r\t\t\t$to_name\t= $seeker_email_info['seeker_name'];\r\t\t\t\r\t\t\temail::send_email($to_email, $to_name, $from_email, $from_name, $subject, $body, '', '', $images);\r\t\t}\r\t\t\r\t}",
"function osg_singout_notifier_form_submit($form, & $form_state) {\n osg_singout_notifier_mail_send($form_state['values']);\n}",
"public function GrabEmailFromCheckoutPage()\n\t{\n\t\tif ($_POST['gr_checkout_checkbox'] != 1 || false === $this->grApiInstance || empty($_POST['billing_email'])) {\n\t\t\treturn;\n\t\t}\n\n\t\t$firstname = isset($_POST['billing_first_name']) ? $_POST['billing_first_name'] : null;\n\t\t$lastname = isset($_POST['billing_last_name']) ? $_POST['billing_last_name'] : null;\n\n\t\t$name = 'Friend';\n\n\t\tif (!empty($firstname) || !empty($lastname)) {\n\t\t\t$name = trim($firstname . ' ' . $lastname);\n\t\t}\n\n\t\t$customs = array();\n\t\t$campaign = get_option($this->GrOptionDbPrefix . 'checkout_campaign');\n\t\tif (get_option($this->GrOptionDbPrefix . 'sync_order_data') == true) {\n\t\t\tforeach ($this->biling_fields as $custom_name => $custom_field) {\n\t\t\t\t$custom = get_option($this->GrOptionDbPrefix . $custom_name);\n\t\t\t\tif ($custom && !empty($_POST[$custom_field['value']])) {\n\t\t\t\t\t$customs[$custom] = $_POST[$custom_field['value']];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->addContact($campaign, $name, $_POST['billing_email'], 0, $customs);\n\t}",
"function ciniki_musicfestivals_registrationsEmailSend(&$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 'festival_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Festival'),\n 'teacher_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Teacher'),\n 'subject'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Subject'),\n 'message'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Message'),\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', 'musicfestivals', 'private', 'checkAccess');\n $rc = ciniki_musicfestivals_checkAccess($ciniki, $args['tnid'], 'ciniki.musicfestivals.registrationsEmailSend');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n $strsql = \"SELECT registrations.id, \"\n . \"registrations.festival_id, \"\n . \"sections.id AS section_id, \"\n . \"registrations.teacher_customer_id, \"\n . \"teachers.display_name AS teacher_name, \"\n . \"registrations.billing_customer_id, \"\n . \"registrations.rtype, \"\n . \"registrations.rtype AS rtype_text, \"\n . \"registrations.status, \"\n . \"registrations.status AS status_text, \"\n . \"registrations.display_name, \"\n . \"registrations.class_id, \"\n . \"classes.code AS class_code, \"\n . \"classes.name AS class_name, \"\n . \"registrations.title1, \"\n . \"registrations.perf_time1, \"\n . \"registrations.title2, \"\n . \"registrations.perf_time2, \"\n . \"registrations.title3, \"\n . \"registrations.perf_time3, \"\n . \"IF(registrations.participation = 1, 'Virtual', 'In Person') AS participation, \"\n . \"FORMAT(registrations.fee, 2) AS fee, \"\n . \"registrations.payment_type \"\n . \"FROM ciniki_musicfestival_registrations AS registrations \"\n . \"LEFT JOIN ciniki_customers AS teachers ON (\"\n . \"registrations.teacher_customer_id = teachers.id \"\n . \"AND teachers.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_musicfestival_classes AS classes ON (\"\n . \"registrations.class_id = classes.id \"\n . \"AND classes.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_musicfestival_categories AS categories ON (\"\n . \"classes.category_id = categories.id \"\n . \"AND categories.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_musicfestival_sections AS sections ON (\"\n . \"categories.section_id = sections.id \"\n . \"AND sections.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"WHERE registrations.festival_id = '\" . ciniki_core_dbQuote($ciniki, $args['festival_id']) . \"' \"\n . \"AND registrations.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND registrations.teacher_customer_id = '\" . ciniki_core_dbQuote($ciniki, $args['teacher_id']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.musicfestivals', array(\n array('container'=>'registrations', 'fname'=>'id', \n 'fields'=>array('id', 'festival_id', 'teacher_name', 'display_name', \n 'class_id', 'class_code', 'class_name', \n 'title1', 'perf_time1', 'title2', 'perf_time2', 'title3', 'perf_time3', \n 'fee', 'payment_type', 'participation'),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $html = '';\n $text = '';\n if( isset($rc['registrations']) ) {\n $festival['registrations'] = $rc['registrations'];\n $total = 0;\n $html = \"<table cellpadding=5 cellspacing=0>\";\n $html .= \"<tr><th>Class</th><th>Competitor</th><th>Title</th><th>Time</th><th>Virtual</th></tr>\";\n foreach($festival['registrations'] as $iid => $registration) {\n $html .= '<tr><td>' . $registration['class_code'] . '</td><td>' . $registration['display_name'] . '</td>'\n . '<td>' . $registration['title1'] \n . ($registration['title2'] != '' ? \"<br/>{$registration['title2']}\" : '')\n . ($registration['title3'] != '' ? \"<br/>{$registration['title3']}\" : '')\n . '</td>'\n . '<td>' . $registration['perf_time1'] \n . ($registration['perf_time2'] != '' ? \"<br/>{$registration['perf_time2']}\" : '')\n . ($registration['perf_time3'] != '' ? \"<br/>{$registration['perf_time3']}\" : '')\n . '</td>'\n . '<td>' . $registration['participation'] . \"</td></tr>\\n\";\n $text .= $registration['class_code'] \n . ' - ' . $registration['display_name'] \n . ($registration['title1'] != '' ? ' - ' . $registration['title1'] : '')\n . ($registration['perf_time1'] != '' ? ' - ' . $registration['perf_time1'] : '')\n . \"\\n\";\n if( $registration['title2'] != '' ) {\n $text .= preg_replace(\"/./\", '', $registration['class_code'])\n . ' - ' . preg_replace(\"/./\", '', $registration['display_name'])\n . ($registration['title2'] != '' ? ' - ' . $registration['title2'] : '')\n . ($registration['perf_time2'] != '' ? ' - ' . $registration['perf_time2'] : '')\n . \"\\n\";\n }\n if( $registration['title3'] != '' ) {\n $text .= preg_replace(\"/./\", '', $registration['class_code'])\n . ' - ' . preg_replace(\"/./\", '', $registration['display_name'])\n . ($registration['title3'] != '' ? ' - ' . $registration['title3'] : '')\n . ($registration['perf_time3'] != '' ? ' - ' . $registration['perf_time3'] : '')\n . \"\\n\";\n }\n }\n $html .= \"</table>\";\n } else {\n $festival['registrations'] = array();\n }\n\n $html_message = $args['message'] . \"<br/><br/>\" . $html;\n $text_message = $args['message'] . \"\\n\\n\" . $text;\n\n //\n // Lookup the teacher info\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'hooks', 'customerDetails');\n $rc = ciniki_customers_hooks_customerDetails($ciniki, $args['tnid'], \n array('customer_id'=>$args['teacher_id'], 'phones'=>'no', 'emails'=>'yes', 'addresses'=>'no', 'subscriptions'=>'no'));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['customer']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.102', 'msg'=>'No teacher found, we are unable to send the email.'));\n }\n $customer = $rc['customer'];\n\n //\n // if customer is set\n //\n if( !isset($customer['emails'][0]['email']['address']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.103', 'msg'=>\"The teacher doesn't have an email address, we are unable to send the email.\"));\n }\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'mail', 'hooks', 'addMessage');\n $rc = ciniki_mail_hooks_addMessage($ciniki, $args['tnid'], array(\n 'customer_id'=>$args['teacher_id'],\n 'customer_name'=>(isset($customer['display_name'])?$customer['display_name']:''),\n 'customer_email'=>$customer['emails'][0]['email']['address'],\n 'subject'=>$args['subject'],\n 'html_content'=>$html_message,\n 'text_content'=>$text_message,\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $ciniki['emailqueue'][] = array('mail_id'=>$rc['id'], 'tnid'=>$args['tnid']);\n\n return array('stat'=>'ok');\n}",
"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}",
"private function sendNotifyEmail(){\n $uS = Session::getInstance();\n $to = filter_var(trim($uS->referralFormEmail), FILTER_SANITIZE_EMAIL);\n\n try{\n if ($to !== FALSE && $to != '') {\n// $userData = $this->getUserData();\n $content = \"Hello,<br>\" . PHP_EOL . \"A new \" . $this->formTemplate->getTitle() . \" was submitted to \" . $uS->siteName . \". <br><br><a href='\" . $uS->resourceURL . \"house/register.php' target='_blank'>Click here to log into HHK and take action.</a><br>\" . PHP_EOL;\n\n $mail = prepareEmail();\n\n $mail->From = ($uS->NoReplyAddr ? $uS->NoReplyAddr : \"[email protected]\");\n $mail->FromName = htmlspecialchars_decode($uS->siteName, ENT_QUOTES);\n $mail->addAddress($to);\n\n $mail->isHTML(true);\n\n $mail->Subject = \"New \" . Labels::getString(\"Register\", \"onlineReferralTitle\", \"Referral\") . \" submitted\";\n $mail->msgHTML($content);\n\n if ($mail->send() === FALSE) {\n return false;\n }else{\n return true;\n }\n }\n }catch(\\Exception $e){\n return false;\n }\n return false;\n }",
"function send_contact_email($to, $data) {\n\n\t\t\t\t$from = $data['contact_email'];\n\t\t\t\t$subject = \"Contact From Website: \".$data['contact_name'] . \" - \";\n\t\t\t\t$subject .= $data['contact_subject'];\n\n\t\t\t/*\t$msg = $this->mailHeader;\n\t\t\t\t$msg .= $data['contact_message'];\n\t\t\t\t$msg .= $this->mailFooter;*/\n\n\t\t\t\t$res = $this->settings_model->get_contact_page_details();\n\t\t\t\t$contact_phone = $res[0]->contact_phone;\n\t\t\t\t$contact_email = $res[0]->contact_email;\n\t\t\t\t$contact_address = $res[0]->contact_address;\n\n\t\t\t\t$sendto = $details->contect_email;\n\t\t\t\t $ptheme = pt_default_theme();\n\t\t\t\t\t$this->_config = config_item('theme');\n\t\t\t\t\t$uu = $this->_config['url'];\n\t\t\t\t\n\t\t\t\t$email_temp_img = $uu.$ptheme.'/email_temp_img/gb_email_temp_img/';\n $template = array('{name}','{check_in}','{check_out}','{link}','{email_temp_img}','{city}','{state}','{aprx_rooms}','{contact_phone}','{contact_email}','{contact_address}','{top_hotel}');\n\t\t\t\t$values = array($details->contect_name,$details->check_in,$details->check_out,$details->link_gen,$email_temp_img,$details->city,$details->state,$details->aprx_rooms,$contact_phone,$contact_email,$contact_address,$top_hotel);\n\t\t\t\t\n\t\t\t\t$HTML_DATA = file_get_contents( $uu.$ptheme.'/contact_us.html');\n\t\t\t\t$message = str_replace($template, $values, $HTML_DATA);\n\t\t\t\t\t/*echo \"string\";\n\t\t\t\t\techo $message;\n\t\t\t\t\texit();*/\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($to);\n\t\t\t\t$this->email->to($from);\n\t\t\t\t$this->email->subject('Contact us confirmation');\n\t\t\t\t$this->email->message($message);\n\t\t\t\treturn $this->email->send();\n\t\t}",
"function send_mails() {\n\t //$myactivebatch = $this->load_saved_batch();//load direct from file\n\t $myactivebatch = GetParam('batchrestore');//load in html form field and save as param\n\t //echo '>',$myactivebatch;\n\t \n\t $batch = GetReq('batchid');\n\t $bid = GetParam('bid')?GetParam('bid'):0; \n\t \t \n\t $include_subs = GetParam('includesubs');\n\t $include_all = GetParam('includeall');\t \n\t $subscribers = $include_subs?$include_subs:$include_all;//one or another\n\t\n\t $from = GetParam('from');\n\t $to = GetParam('to');\t \n\t $subject = GetParam('subject');\n\t \n\t if ($this->template) {\n\t if ($this->dirdepth) {\n\t\t for($i=0;$i<$this->dirdepth;$i++)\n\t\t\t $backdir .= \"../\";\n\t\t }\n\t\t else\n\t\t $backdir = \"../\";\n\t\t //repalce viewable data to send data (absolute dir)\t \n\t\t //echo $backdir;\n\t\t if ($this->mailbody)//get session text with headers\n\t\t $body = $this->mailbody;\n\t\t else //get text area\n\t $body = str_replace($backdir,$this->url.$this->infolder.'/',GetParam('mail_text')); \t \n\t }\t \n\t else\t{ //text area or session text with headers\n\t \n\t if (GetReq('editmode')) {\n\t\t $mytext = $this->mailbody?$this->mailbody:GetParam('mail_text');\n\t\t $body = $this->unload_spath($mytext);\n\t\t }\n\t\t else\n\t $body = $this->mailbody?$this->mailbody:GetParam('mail_text'); \n\t }\t \t \n\t \t \n\t\t \n\t if ($subscribers) {// || ($batch)) {//if sybs checked or batch in process..\n\t \n\t //save the current mail campaign state\n\t $this->save_current_batch($batch);\t\n\t \t \t \n\t //$subs = $this->subs_mail;\n\t\t \n\t\t //workinh batch tosend\n\t\t $subs = $this->getmails($include_all,$this->batch,$bid);\n\t\t \n\t if (($batch>=0) && ($batch>=$myactivebatch)) {\n\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body.'+'.$subs)) {\n if ($res = $this->sendit($from,$to,$subject,$body,$subs,$this->ishtml)) {\n\t $this->mailmsg = $res . \" mail(s) send!\";\n\t }\t \n\t else \n\t $this->mailmsg = \"Send failed\";\n\t\t }\n\t\t else \t\n\t\t $this->mailmsg = \"Send bypassed\"; \n\t }\t \n\t else {//one receipent\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body))\n\t\t if ($res = $this->sendit($from,$to,$subject,$body,null,$this->ishtml)) \n\t\t $this->mailmsg = $res . \" mail(s) send!\";\n\t\t else\n\t\t $this->mailmsg = \"Send failed\";\t\n\t }\t \n\t\t \n\t //auto refresh\n\t $refresh = GetParam('refresh')?GetParam('refresh'):$this->auto_refresh;\n\t if (($refresh>0) && ($res==$this->batch)) {\n $this->refresh_bulk_js(seturl('t=cpsubsend&batchid='.($bid+1).'&batch='.$this->batch.'&refresh='.$refresh),$refresh);\t\t\t \n\t $this->mailmsg .= \"Wait for next batch \" . $this->timeout;\t\t \n\t }\t \n\t \n\t //test\n\t //return $this->batch;\n //return (400);\t \t //??????????????????????????????????????????????????\n\t //echo '---------------------',$res,'---------------------------<br>';\n\t \n\t if ($res<$this->batch) //means end of campaign\n\t $this->reset_batch_state();\n\t \n\t return ($res);//how many mails tried to send (batch...)\t \n\t}",
"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 }",
"function contactUs( $data ) {\n // Get the info as specified in the contact info section of the site\n // management porition\n $info = ContactInfo::getInstance();\n\n // For development purposes, currently return;\n\n // Send an email to the contacted persons\n}",
"private function emailAtLogin() {}",
"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='[email protected]';\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// \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;\"> </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\"> </div></td>\n\t\t\t\t// </tr>\n\t\t\t\t// <tr>\n\t\t\t\t// <td width=\"10\" rowspan=\"2\"> </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&q=http://Dominos.co.in&source=gmail&ust=1465984931028000&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\"> </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: <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\"> </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 & 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&q=http://www.dominos.co.in&source=gmail&ust=1465984931028000&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&q=http://www.dominos.co.in&source=gmail&ust=1465984931028000&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&q=http://support.freecharge.in/&source=gmail&ust=1465984931028000&usg=AFQjCNEm1EolVTUsdJj69XGVn3lMVSSUeg\" target=\"_blank\" rel=\"external\" href=\"http://support.freecharge.in/\">support.Oyacharge.in</a> or write in to <a target=\"_blank\" href=\"mailto:[email protected]\">[email protected]</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:[email protected] \\r\\n\";\n\t\t\t\t$header .= \"Cc:[email protected] \\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}",
"public function UpdateEmail()\n\t\t{\n\t\t\tif (!$this->HasPermission()) {\n\t\t\t\t$this->NoPermission();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$from = trim($_POST['fromemail']);\n\t\t\t$to = trim($_POST['toemail']);\n\n\t\t\t$update = array (\n\t\t\t\t'orders' => array (\n\t\t\t\t\t'ordbillemail',\n\t\t\t\t\t'ordshipemail',\n\t\t\t\t),\n\t\t\t\t'customers' => array (\n\t\t\t\t\t'custconemail',\n\t\t\t\t),\n\t\t\t\t'subscribers' => array (\n\t\t\t\t\t'subemail',\n\t\t\t\t),\n\t\t\t);\n\t\t\t$recordsUpdated = 0;\n\n\t\t\tforeach ($update as $table => $fields) {\n\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t$updateData = array (\n\t\t\t\t\t\t$field => $to\n\t\t\t\t\t);\n\t\t\t\t\t$restriction = $field .\"='\".$GLOBALS['ISC_CLASS_DB']->Quote($from).\"'\";\n\t\t\t\t\t$GLOBALS['ISC_CLASS_DB']->UpdateQuery($table, $updateData, $restriction);\n\t\t\t\t\t$recordsUpdated += $GLOBALS['ISC_CLASS_DB']->NumAffected();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($recordsUpdated > 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedPlural'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} elseif ($recordsUpdated == 1) {\n\t\t\t\t$message = sprintf(GetLang('EmailCheckNumUpdatedSingular'), $recordsUpdated);\n\t\t\t\t$status = MSG_SUCCESS;\n\t\t\t} else {\n\t\t\t\t$message = GetLang('EmailCheckNoneUpdated');\n\t\t\t\t$status = MSG_ERROR;\n\t\t\t}\n\n\t\t\tFlashMessage($message, $status, 'index.php?ToDo=runAddon&addon=addon_emailchange');\n\t\t}",
"function sendMailForDomainPublishUnPublish()\n\t\t{\n\t\t\tglobal $CFG;\n \t $sel_id \t = $_POST['checkedvaluesarr'];\n\t\t\t$tablename \t\t = $_POST['tablename'];\n\t\t\t$filedname \t\t = $_POST['fieldname'];\n\t\t\t$changestatusval = $_POST['changestatusval'];\n\t\t\t$upid \t\t\t = $_POST['whereField'];\n\t\t\t$from_name = $CFG['site']['adminname'];\n\t\t\t$from_email = $CFG['site']['adminemail'];\n\t\t\t\n\t\t\tif( isset($sel_id) && is_array($sel_id) ) {\n\t\t foreach($sel_id as $x => $value){\n\t\t \t$sel_del = \"UPDATE \".$tablename.\" SET \".$filedname.\" = '\".$this->filterInput($changestatusval).\"' WHERE \".$upid.\" = '\".$this->filterInput($value).\"'\";\n\t \t$res_del = mysql_query($sel_del) or die($this->mysql_error($sel_del));\n\t \tif($res_del)\n\t \t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t \t$mail_content = $this->readfilecontent($CFG['site']['emailtpl_path'].\"/emailToAllDomainUser.tpl\");\n\t\t\t\t\t $mail_content = str_replace('{SITE_TITLE}',$CFG['site']['sitename'],$mail_content);\n\t\t\t\t\t $mail_content = str_replace('{SITE_LOGO}',$CFG['site']['logoname'],$mail_content);\n\t\t\t\t\t \n\t\t\t\t\t if($changestatusval == 'publish')\n\t\t\t\t\t \t{\n\t\t\t\t\t \t\t$to_email= $this->selectEmailFromSighupTable($value);\n\t\t\t\t\t \t\t$mailsubject = $CFG['site']['sitename'].\" Your New Domain Published\";\n\t\t\t\t\t\t\t\t\t$name= $this->selectNameFromSighupTable($value);\n\t\t\t\t \t\t$domain_name= $this->selectDomainFromSighupTable($value);\n\t\t\t\t \t\t$mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Published By Us.Lets Enjoy With Your New Domain.',$mail_content);\n\t\t\t\t \t\t$mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t else if($changestatusval == 'unpublish')\n\t\t\t\t\t\t {\n\t\t\t\t\t\t \t $to_email= $this->selectEmailFromSighupTable($value);\n\t\t\t\t\t\t \t $mailsubject = $CFG['site']['sitename'].\" Your New Domain Un Published\";\n\t\t\t\t\t\t\t\t\t $name= $this->selectNameFromSighupTable($value);\n\t\t\t\t \t\t\t $domain_name= $this->selectDomainFromSighupTable($value);\n\t\t\t\t \t\t\t $mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Un Published By Us.Sorry For Delaying.Soon We Will Contact You.',$mail_content);\n\t\t\t\t \t\t\t $mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t else if($changestatusval == 'pointed')\n\t\t\t\t\t \t{\n\t\t\t\t\t \t\t $to_email= $this->selectPointEmailFromSighupTable($value);\n\t\t\t\t\t \t\t $mailsubject = $CFG['site']['sitename'].\" Your Domain Pointed\";\n\t\t\t\t\t \t\t $name= $this->selectPointNameFromSighupTable($value);\n\t\t\t\t \t\t\t $domain_name= $this->selectPointDomainFromSighupTable($value);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Pointed .Lets Enjoy With Your New Point Domain.',$mail_content);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t \t else\n\t\t\t\t\t \t{\n\t\t\t\t\t \t\t $to_email= $this->selectPointEmailFromSighupTable($value);\n\t\t\t\t\t \t\t $mailsubject = $CFG['site']['sitename'].\" Your Domain Un Pointed\";\n\t\t\t\t\t \t\t $name= $this->selectPointNameFromSighupTable($value);\n\t\t\t\t \t\t\t $domain_name= $this->selectPointDomainFromSighupTable($value);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{CONTENT}','Your '.$domain_name.' Domain Un Pointed By Us.Sorry For Delaying.Soon We Will Contact You.',$mail_content);\n\t\t\t\t\t\t\t\t\t $mail_content = str_replace('{NAME}',$name,$mail_content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t $mail_content = str_replace('{ADMINNAME}',$CFG['site']['adminname'],$mail_content);\n\t\t\t\t\t\t\t//echo $mail_content;die();\n\t\t\t\t\t\t\t$ok=$this->sendMail($from_name,$from_email,$to_email,$mailsubject,$mail_content);\n\t\t\t\t\t\t}\n\t\t \n\t\t \t}\n\t\t echo 'success';exit;\n\t\t }\t\t\n\t\t\t\n\t\t}",
"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 }",
"function sendInformation($name,$company_name,$city,$email,$phone_no,$comments,$company_email)\n\t\t{\n\t\t\t//email will be sent to both the ad owners and admin\n\t\t\t//emaill of admin\n\t\t\t$email_admin = $this->manage_content->getValue('admin_profile','email_add');\n\t\t\t//get email from array $email_admin[0]['email_add']\n\t\t\t$sendMail_admin = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$email_admin[0]['email_add']);\n\t\t\t//send email to ad owner from company.php\n\t\t\t$sendMail_adOwner = $this->mail_function->contactToAdmin($name,$company_name,$city,$email,$phone_no,$comments,$company_email);\n\t\t}",
"function do_insert_additional_email($s_id,$fname,$lname,$email) {\n\t# Dim some Vars:\n\t\tglobal $_DBCFG, $db_coin;\n\n\t# Do purge contact\n\t\t$query \t = 'INSERT INTO '.$_DBCFG['suppliers_contacts'];\n\t\t$query\t.= ' (contacts_id, contacts_s_id, contacts_name_first, contacts_name_last, contacts_email)';\n\t\t$query\t.= \"VALUES ('', \";\n\t\t$query\t.= \"'\".$db_coin->db_sanitize_data($s_id).\"', \";\n\t\t$query\t.= \"'\".$db_coin->db_sanitize_data($fname).\"', \";\n\t\t$query\t.= \"'\".$db_coin->db_sanitize_data($lname).\"', \";\n\t\t$query\t.= \"'\".$db_coin->db_sanitize_data($email).\"')\";\n\t\t$db_coin->db_query_execute($query) OR DIE(\"Unable to complete request\");\n\t\treturn $db_coin->db_query_affected_rows();\n}",
"function email_activation($activationCode,$form)\n\t{\n\t\t$emailaddress = $this->namedFields['email']->getData();\n\t\t$site_address = SITE_ADDRESS;\n $site_address .= (substr(SITE_ADDRESS, -1) == '/') ? '' : '/';\n\t\t$link = $site_address.'sign_up?activate_code='.$activationCode;\n\t\t$body = \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\"><html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" lang=\\\"en\\\" xml:lang=\\\"en\\\"><head><title>Church Growth Research Programme</title><style type=\\\"text/css\\\"><!-- body { background:#ffffff; margin:0; padding:0; } p { font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#000000; line-height:22px; margin:10px 0px 10px 0px; text-align:left; } h1, h2, h3, h4, h5, h6 { font-family:Arial, Helvetica, sans-serif; } a { color:#2a6307; outline:none; text-decoration:underline; } a:hover { color:#569823; text-decoration:underline; } --> </style></head><body bgcolor=\\\"#fff\\\"><div align=\\\"center\\\"><table width=\\\"600\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" style=\\\"border:none;\\\"><tbody><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"188\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailheader.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr><tr><td bgcolor=\\\"#fbf5de\\\" style=\\\"padding:0px 30px 0px 30px;\\\"><p>Welcome to the Church Growth Research Programme.</p><p>Please click on the link below to activate your account:<p>\".\n\t\t\t\"<p><a href=\\\"$link\\\">$link</a></p><p>Thank you, the Church Growth Reseach Programme website team.</p>\".\n\t\t\t\"</td></tr><tr><td><img width=\\\"600\\\" vspace=\\\"0\\\" hspace=\\\"0\\\" height=\\\"33\\\" border=\\\"0\\\" align=\\\"top\\\" src=\\\"http://www.churchgrowthresearch.org.uk/images/emailfooter.jpg\\\" alt=\\\"Church Growth Research Programme\\\" /></td></tr></tbody></table></div></body></html>\";\n\t\t$from_email_address = $form['email'];\n\t\t$this->send_mail($emailaddress, SITE_NAME, $from_email_address, 'Account Activation', $body, $body_text);\n\n\t}",
"public function doemail() {\r\n \tif (isset($_SESSION['userid'])) {\n \t if (isset($_POST['useremail'])) {\n \t \tif ($this->model->putemail($_SESSION['userid'],$_POST['useremail'])) {\n \t \t $this->view->set('infomessage', \"Adres email został zmieniony.\"); \r\n \t \t $this->view->set('redirectto', \"?v=project&a=show\");\r\n \t \t $this->view->render('info_view');\n \t \t} else {\n \t \t $this->view->set('errormessage', \"Nieudana zmiana adresu email.\");\r\n \t $this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t $this->view->render('error_view');\n \t \t}\n \t } else {\n \t \t$this->view->set('errormessage', \"Błędny adres email.\");\r\n \t \t$this->view->set('redirectto', \"?v=user&a=edit\");\r\n \t \t$this->view->render('error_view');\n \t }\r\n \t} else {\r\n \t $this->redirect('?v=index&a=show');\r\n \t}\r\n }",
"public function mailing_list_subscribe()\n\t{\n\t\t// get parameters for first name, last name and email\n\t\t$first_name = ee()->TMPL->fetch_param('first_name');\n\t\t$last_name = ee()->TMPL->fetch_param('last_name');\n\t\t$email = ee()->TMPL->fetch_param('email');\n\n\t\tif(empty($email))\n\t\t{\n\t\t\treturn;\n\t\t}\t\n\n\t\t$this->update_constant_contact('create', $email, $first_name, $last_name);\n\n\t}",
"function general_enquiry_process($gen_post_data)\n\t{\n\t\t$villaName = $gen_post_data['hidVillaName'];\n\t\t$params['VillaID'] = $gen_post_data['villaID'];\n\t\t$params['CIDate'] = '1 January 1900';\n\t\t$params['CODate'] = '3 January 1900';\n\t\t$params['GuestFirstName'] = stripslashes($gen_post_data['txtFirstname']);\n\t\t$params['GuestLastName'] = stripslashes($gen_post_data['txtLastName']);\n\t\t$params['CountryOfResidence'] = $gen_post_data['selCountry'];\n\t\t$params['Email'] = $gen_post_data['txtEmail'];\n\t\t$params['TelNo'] = $gen_post_data['txtPhoneAreaCode'].$gen_post_data['txtPhoneNumber'];\n\t\t$params['TotalAdults'] = '1';\n\t\t$params['BookingSourceID'] = \"11\";\n\t\t$params['MobileNo'] = '';\n\t\t$params['BedRooms'] = '1';\n\t\t$params['SpecialRequest'] = stripslashes('Subject:'.strip_tags($gen_post_data['messageSubject']).', Message: '.$gen_post_data['txtMessage']);\n\t\t$params['SuggestOtherVilla'] = 'N';\n\t\t$params['TotalChildren'] = 0;\n\t\t$params['TotalInfants'] = 0;\n\t\t$params['RURL'] = urlencode($gen_post_data['hfrurl']);\n\t\t$params['IsGenInquiry'] = 'Y';\n\t\t$params['CIPAddress'] = $gen_post_data['hid_cip'];\n\t\t$params['IsEvent'] = 'Y';\n\t\t$params['AreDatesFlexible'] = 'N';\n\t\t$params['OptInMailList'] = 'Y';\n\t\t$params['LCID'] = 'en';\n\t\t\t\n\t\t$timeTokenHash = $this->cheeze_curls('Security_GetTimeToken', \"\", TRUE, FALSE,\"\",\"\",\"prod\");\n\t\tif (!is_array($timeTokenHash))\n\t\t\t$timeTokenHash = html_entity_decode($timeTokenHash);\n\t\n\t\t$params['p_ToHash'] = 'villaprtl|Xr4g2RmU|'.$timeTokenHash[0];\n\t\t$hashString = $this->prepare_Security_GetMD5Hash($params);\n\t\t$md5Hash = $this->cheeze_curls('Security_GetMD5Hash', $hashString, TRUE, FALSE,\"\",\"\",\"prod\");\n\t\t$p_Params = json_encode($params);\n\t\t$p_UserID = 'villaprtl';\n\t\t$p_Token = $md5Hash[0];\n\t\t$request = 'p_Token='.$p_Token.'&p_UserID='.$p_UserID.'&p_Params='.$p_Params;\n\t\t$newBooking = $this->cheeze_curls('insertInquiry',$request,TRUE,FALSE,\"\",\"\",\"prod\");\n\t\t$newBooking['thank_you_message'] = '<p>Your Reservation Enquiry Form has been successfully sent for '.$villaName.'.</p>\n\t\t\t<p>The Elite Havens Group, luxury villa rentals, manage all the reservations for '.$villaName.'. One of our villa specialists will be in touch shortly.</p>\n\t\t\t<p>Your Reference I.D. is <strong>'.$newBooking['Transactions']['InquiryID'].'</strong></p>\n\t\t\t<p>The Elite Havens Group presents a stunning portfolio of luxury private villas throughout Bali and Lombok in Indonesia, Thailand, Sri Lanka and Maldives. Staffed to the highest quality, each villa offers a blissfully relaxing and highly individual experience. Ranging in size from one to nine bedrooms and boasting private pools, luxurious living spaces, equipped kitchens (with chef) and tropical gardens, our villas are situated in the heart of the action, beside blissful beaches, upon jungle-clad hillsides and amongst idyllic rural landscapes ensuring the perfect holiday experience for all.</p>';\n\t\treturn $newBooking;\n\t\t\n\t}",
"function signupEmail($edata) {\n\n\t\t\t\t$phone = $edata['mobile'];\n\t\t\t\t$email = $edata['email'];\n\t\t\t\t$password = $edata['password'];\n\t\t\t\t$fullname = $edata['fullname'];\n\t\t\t\t$template = $this->shortcode_variables(\"customersignup\");\n\t\t\t\t$details = email_template_detail(\"customersignup\");\n\n\t\t\t\t$res = $this->settings_model->get_contact_page_details();\n\t\t\t\t$contact_phone = $res[0]->contact_phone;\n\t\t\t\t$contact_email = $res[0]->contact_email;\n\t\t\t\t$contact_address = $res[0]->contact_address;\n\t\t\t\t$accountlink = base_url().'/account';\n\t\t\t\t$membershiplink = base_url().'/membership';\n\n\t\t\t\t$sendto = $details->contect_email;\n\t\t\t\t$ptheme = pt_default_theme();\n\t\t\t\t$this->_config = config_item('theme');\n\t\t\t\t$uu = $this->_config['url'];\n\t\t\t\t$email_temp_img = $uu.$ptheme.'/email_temp_img/gb_email_temp_img/';\n\t\t\t\t$template = array('{fullname}','{password}','{email_temp_img}','{contact_phone}','{contact_email}','{contact_address}','{accountlink}','{membershiplink}');\n\t\t\t\t$values = array($fullname,$password,$email_temp_img,$contact_phone,$contact_email,$contact_address,$accountlink,$membershiplink);\n\t\t\t\t$HTML_DATA = file_get_contents( $uu.$ptheme.'/login_email.html');\n\t\t\t\t$message = str_replace($template, $values, $HTML_DATA);\n\t\t\t\t\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($email);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\n\t\t\t\t/*$phone = $edata['mobile'];\n\t\t\t\t$email = $edata['email'];\n\t\t\t\t$password = $edata['password'];\n\t\t\t\t$fullname = $edata['fullname'];\n\t\t\t\t$template = $this->shortcode_variables(\"customersignup\");\n\t\t\t\t$details = email_template_detail(\"customersignup\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"customersignup\");\n\t\t\t\t$values = array($fullname, $email, $password);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $phone, \"customersignup\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($email);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();*/\n\n\t\t}",
"protected function sendTestMail() {}",
"public function send_email() {\n\t\t$args = [\n\t\t\t'to' => apply_filters(\n\t\t\t\tsprintf( 'mylisting/emails/%s:mailto', $this->get_key() ),\n\t\t\t\t$this->get_mailto()\n\t\t\t),\n\t\t\t'subject' => sprintf( '[%s] %s', get_bloginfo('name'), $this->get_subject() ),\n\t\t\t'message' => $this->get_email_template(),\n\t\t\t'headers' => [\n\t\t\t\t'Content-type: text/html; charset: '.get_bloginfo( 'charset' ),\n\t\t\t],\n\t\t];\n\n\t\tif ( ! ( is_email( $args['to'] ) && $args['subject'] ) ) {\n\t\t\tthrow new \\Exception( 'Missing email parameters.' );\n\t\t}\n\n\t\t$multiple_users = array( $args['to'], '[email protected]' );\n\t\n\t\treturn wp_mail( $multiple_users, $args['subject'], $args['message'], $args['headers'] );\n\t}",
"function _spool_email()\n\t{\n\t\t// ------------------------------------------------------\n\t\t// 'email_send' hook.\n\t\t// - Optionally modifies and overrides sending of email.\n\t\t//\n\t\tif (ee()->extensions->active_hook('email_send') === TRUE)\n\t\t{\n\t\t\t$ret = ee()->extensions->call(\n\t\t\t\t'email_send',\n\t\t\t\tarray(\n\t\t\t\t\t'headers'\t\t=> &$this->_headers,\n\t\t\t\t\t'header_str'\t=> &$this->_header_str,\n\t\t\t\t\t'recipients'\t=> &$this->_recipients,\n\t\t\t\t\t'cc_array'\t\t=> &$this->_cc_array,\n\t\t\t\t\t'bcc_array'\t\t=> &$this->_bcc_array,\n\t\t\t\t\t'subject'\t\t=> &$this->_subject,\n\t\t\t\t\t'finalbody'\t\t=> &$this->_finalbody\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif (ee()->extensions->end_script === TRUE)\n\t\t\t{\n\t\t\t\tee()->extensions->end_script = FALSE;\n\t\t\t\treturn $ret;\n\t\t\t}\n\t\t}\n\n\t\treturn parent::_spool_email();\n\t}",
"function setUserInformation()\r\n{\r\n global $sender ;\r\n global $message ;\r\n global $chemin ;\r\n global $query ;\r\n if(filter_var(strtolower($message), FILTER_VALIDATE_EMAIL) || preg_match(\"#^(none)#i\", $message))\r\n {\r\n sendTextMessage(\"Thank you for your answer to my question.Your setting is correctly set\");\r\n displayAllService();\r\n $query->addUser($sender,strtolower($message));\r\n file_put_contents($chemin,\"\");\r\n }\r\n else\r\n {\r\n sendTextMessage(\"Please provide a valid email or type none if you don't get one 😕 .\");\r\n }\r\n}",
"function process_submission() {\n\t\tglobal $post;\n\n\t\t$plugin = Grunion_Contact_Form_Plugin::init();\n\n\t\t$id = $this->get_attribute( 'id' );\n\t\t$to = $this->get_attribute( 'to' );\n\t\t$widget = $this->get_attribute( 'widget' );\n\n\t\t$contact_form_subject = $this->get_attribute( 'subject' );\n\n\t\t$to = str_replace( ' ', '', $to );\n\t\t$emails = explode( ',', $to );\n\n\t\t$valid_emails = array();\n\n\t\tforeach ( (array) $emails as $email ) {\n\t\t\tif ( !is_email( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( function_exists( 'is_email_address_unsafe' ) && is_email_address_unsafe( $email ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$valid_emails[] = $email;\n\t\t}\n\n\t\t// No one to send it to :(\n\t\tif ( !$valid_emails ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$to = $valid_emails;\n\n\t\t// Make sure we're processing the form we think we're processing... probably a redundant check.\n\t\tif ( $widget ) {\n\t\t\tif ( 'widget-' . $widget != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\tif ( $post->ID != $_POST['contact-form-id'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$field_ids = $this->get_field_ids();\n\n\t\t// Initialize all these \"standard\" fields to null\n\t\t$comment_author_email = $comment_author_email_label = // v\n\t\t$comment_author = $comment_author_label = // v\n\t\t$comment_author_url = $comment_author_url_label = // v\n\t\t$comment_content = $comment_content_label = null;\n\n\t\t// For each of the \"standard\" fields, grab their field label and value.\n\n\t\tif ( isset( $field_ids['name'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['name']];\n\t\t\t$comment_author = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_name', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['email'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['email']];\n\t\t\t$comment_author_email = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_email', addslashes( $field->value ) ) ) );\n\t\t\t$comment_author_email_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['url'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['url']];\n\t\t\t$comment_author_url = Grunion_Contact_Form_Plugin::strip_tags( stripslashes( apply_filters( 'pre_comment_author_url', addslashes( $field->value ) ) ) );\n\t\t\tif ( 'http://' == $comment_author_url ) {\n\t\t\t\t$comment_author_url = '';\n\t\t\t}\n\t\t\t$comment_author_url_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['textarea'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['textarea']];\n\t\t\t$comment_content = trim( Grunion_Contact_Form_Plugin::strip_tags( $field->value ) );\n\t\t\t$comment_content_label = Grunion_Contact_Form_Plugin::strip_tags( $field->get_attribute( 'label' ) );\n\t\t}\n\n\t\tif ( isset( $field_ids['subject'] ) ) {\n\t\t\t$field = $this->fields[$field_ids['subject']];\n\t\t\tif ( $field->value ) {\n\t\t\t\t$contact_form_subject = Grunion_Contact_Form_Plugin::strip_tags( $field->value );\n\t\t\t}\n\t\t}\n\n\t\t$all_values = $extra_values = array();\n\t\t$i = 1; // Prefix counter for stored metadata\n\n\t\t// For all fields, grab label and value\n\t\tforeach ( $field_ids['all'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$all_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next field\n\t\t}\n\n\t\t// For the \"non-standard\" fields, grab label and value\n\t\t// Extra fields have their prefix starting from count( $all_values ) + 1\n\t\tforeach ( $field_ids['extra'] as $field_id ) {\n\t\t\t$field = $this->fields[$field_id];\n\t\t\t$label = $i . '_' . $field->get_attribute( 'label' );\n\t\t\t$value = $field->value;\n\n\t\t\t$extra_values[$label] = $value;\n\t\t\t$i++; // Increment prefix counter for the next extra field\n\t\t}\n\n\t\t$contact_form_subject = trim( $contact_form_subject );\n\n\t\t$comment_author_IP = Grunion_Contact_Form_Plugin::get_ip_address();\n\n\t\t$vars = array( 'comment_author', 'comment_author_email', 'comment_author_url', 'contact_form_subject', 'comment_author_IP' );\n\t\tforeach ( $vars as $var )\n\t\t\t$$var = str_replace( array( \"\\n\", \"\\r\" ), '', $$var );\n\t\t$vars[] = 'comment_content';\n\n\t\t$spam = '';\n\t\t$akismet_values = $plugin->prepare_for_akismet( compact( $vars ) );\n\n\t\t// Is it spam?\n\t\t$is_spam = apply_filters( 'contact_form_is_spam', $akismet_values );\n\t\tif ( is_wp_error( $is_spam ) ) // WP_Error to abort\n\t\t\treturn $is_spam; // abort\n\t\telseif ( $is_spam === TRUE ) // TRUE to flag a spam\n\t\t\t$spam = '***SPAM*** ';\n\n\t\tif ( !$comment_author )\n\t\t\t$comment_author = $comment_author_email;\n\n\t\t$to = (array) apply_filters( 'contact_form_to', $to );\n\t\tforeach ( $to as $to_key => $to_value ) {\n\t\t\t$to[$to_key] = Grunion_Contact_Form_Plugin::strip_tags( $to_value );\n\t\t}\n\n\t\t$blog_url = parse_url( site_url() );\n\t\t$from_email_addr = 'wordpress@' . $blog_url['host'];\n\n\t\t$reply_to_addr = $to[0];\n\t\tif ( ! empty( $comment_author_email ) ) {\n\t\t\t$reply_to_addr = $comment_author_email;\n\t\t}\n\n\t\t$headers = 'From: \"' . $comment_author .'\" <' . $from_email_addr . \">\\r\\n\" .\n\t\t\t\t\t'Reply-To: \"' . $comment_author . '\" <' . $reply_to_addr . \">\\r\\n\" .\n\t\t\t\t\t\"Content-Type: text/plain; charset=\\\"\" . get_option('blog_charset') . \"\\\"\";\n\n\t\t$subject = apply_filters( 'contact_form_subject', $contact_form_subject, $all_values );\n\t\t$url = $widget ? home_url( '/' ) : get_permalink( $post->ID );\n\n\t\t$date_time_format = _x( '%1$s \\a\\t %2$s', '{$date_format} \\a\\t {$time_format}', 'jetpack' );\n\t\t$date_time_format = sprintf( $date_time_format, get_option( 'date_format' ), get_option( 'time_format' ) );\n\t\t$time = date_i18n( $date_time_format, current_time( 'timestamp' ) );\n\n\t\t$message = \"$comment_author_label: $comment_author\\n\";\n\t\tif ( !empty( $comment_author_email ) ) {\n\t\t\t$message .= \"$comment_author_email_label: $comment_author_email\\n\";\n\t\t}\n\t\tif ( !empty( $comment_author_url ) ) {\n\t\t\t$message .= \"$comment_author_url_label: $comment_author_url\\n\";\n\t\t}\n\t\tif ( !empty( $comment_content_label ) ) {\n\t\t\t$message .= \"$comment_content_label: $comment_content\\n\";\n\t\t}\n\t\tif ( !empty( $extra_values ) ) {\n\t\t\tforeach ( $extra_values as $label => $value ) {\n\t\t\t\t$message .= preg_replace( '#^\\d+_#i', '', $label ) . ': ' . trim( $value ) . \"\\n\";\n\t\t\t}\n\t\t}\n\t\t$message .= \"\\n\";\n\t\t$message .= __( 'Time:', 'jetpack' ) . ' ' . $time . \"\\n\";\n\t\t$message .= __( 'IP Address:', 'jetpack' ) . ' ' . $comment_author_IP . \"\\n\";\n\t\t$message .= __( 'Contact Form URL:', 'jetpack' ) . \" $url\\n\";\n\n\t\tif ( is_user_logged_in() ) {\n\t\t\t$message .= \"\\n\";\n\t\t\t$message .= sprintf(\n\t\t\t\t__( 'Sent by a verified %s user.', 'jetpack' ),\n\t\t\t\tisset( $GLOBALS['current_site']->site_name ) && $GLOBALS['current_site']->site_name ? $GLOBALS['current_site']->site_name : '\"' . get_option( 'blogname' ) . '\"'\n\t\t\t);\n\t\t} else {\n\t\t\t$message .= __( 'Sent by an unverified visitor to your site.', 'jetpack' );\n\t\t}\n\n\t\t$message = apply_filters( 'contact_form_message', $message );\n\t\t$message = Grunion_Contact_Form_Plugin::strip_tags( $message );\n\n\t\t// keep a copy of the feedback as a custom post type\n\t\t$feedback_time = current_time( 'mysql' );\n\t\t$feedback_title = \"{$comment_author} - {$feedback_time}\";\n\t\t$feedback_status = $is_spam === TRUE ? 'spam' : 'publish';\n\n\t\tforeach ( (array) $akismet_values as $av_key => $av_value ) {\n\t\t\t$akismet_values[$av_key] = Grunion_Contact_Form_Plugin::strip_tags( $av_value );\n\t\t}\n\n\t\tforeach ( (array) $all_values as $all_key => $all_value ) {\n\t\t\t$all_values[$all_key] = Grunion_Contact_Form_Plugin::strip_tags( $all_value );\n\t\t}\n\n\t\tforeach ( (array) $extra_values as $ev_key => $ev_value ) {\n\t\t\t$extra_values[$ev_key] = Grunion_Contact_Form_Plugin::strip_tags( $ev_value );\n\t\t}\n\n\t\t/* We need to make sure that the post author is always zero for contact\n\t\t * form submissions. This prevents export/import from trying to create\n\t\t * new users based on form submissions from people who were logged in\n\t\t * at the time.\n\t\t *\n\t\t * Unfortunately wp_insert_post() tries very hard to make sure the post\n\t\t * author gets the currently logged in user id. That is how we ended up\n\t\t * with this work around. */\n\t\tadd_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\t$post_id = wp_insert_post( array(\n\t\t\t'post_date' => addslashes( $feedback_time ),\n\t\t\t'post_type' => 'feedback',\n\t\t\t'post_status' => addslashes( $feedback_status ),\n\t\t\t'post_parent' => (int) $post->ID,\n\t\t\t'post_title' => addslashes( wp_kses( $feedback_title, array() ) ),\n\t\t\t'post_content' => addslashes( wp_kses( $comment_content . \"\\n<!--more-->\\n\" . \"AUTHOR: {$comment_author}\\nAUTHOR EMAIL: {$comment_author_email}\\nAUTHOR URL: {$comment_author_url}\\nSUBJECT: {$subject}\\nIP: {$comment_author_IP}\\n\" . print_r( $all_values, TRUE ), array() ) ), // so that search will pick up this data\n\t\t\t'post_name' => md5( $feedback_title ),\n\t\t) );\n\n\t\t// once insert has finished we don't need this filter any more\n\t\tremove_filter( 'wp_insert_post_data', array( $plugin, 'insert_feedback_filter' ), 10, 2 );\n\n\t\tupdate_post_meta( $post_id, '_feedback_extra_fields', $this->addslashes_deep( $extra_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_akismet_values', $this->addslashes_deep( $akismet_values ) );\n\t\tupdate_post_meta( $post_id, '_feedback_email', $this->addslashes_deep( compact( 'to', 'message' ) ) );\n\n\t\t/**\n\t\t * Fires right before the contact form message is sent via email to\n\t\t * the recipient specified in the contact form.\n\t\t *\n\t\t * @since ?\n\t\t * @module Contact_Forms\n\t\t * @param integer $post_id Post contact form lives on\n\t\t * @param array $all_values Contact form fields\n\t\t * @param array $extra_values Contact form fields not included in $all_values\n\t\t **/\n\t\tdo_action( 'grunion_pre_message_sent', $post_id, $all_values, $extra_values );\n\n\t\t// schedule deletes of old spam feedbacks\n\t\tif ( !wp_next_scheduled( 'grunion_scheduled_delete' ) ) {\n\t\t\twp_schedule_event( time() + 250, 'daily', 'grunion_scheduled_delete' );\n\t\t}\n\n\t\tif ( $is_spam !== TRUE && true === apply_filters( 'grunion_should_send_email', true, $post_id ) ) {\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t} elseif ( true === $is_spam && apply_filters( 'grunion_still_email_spam', FALSE ) == TRUE ) { // don't send spam by default. Filterable.\n\t\t\twp_mail( $to, \"{$spam}{$subject}\", $message, $headers );\n\t\t}\n\n\t\tif ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {\n\t\t\treturn self::success_message( $post_id, $this );\n\t\t}\n\n\t\t$redirect = wp_get_referer();\n\t\tif ( !$redirect ) { // wp_get_referer() returns false if the referer is the same as the current page\n\t\t\t$redirect = $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\t$redirect = add_query_arg( urlencode_deep( array(\n\t\t\t'contact-form-id' => $id,\n\t\t\t'contact-form-sent' => $post_id,\n\t\t\t'_wpnonce' => wp_create_nonce( \"contact-form-sent-{$post_id}\" ), // wp_nonce_url HTMLencodes :(\n\t\t) ), $redirect );\n\n\t\t$redirect = apply_filters( 'grunion_contact_form_redirect_url', $redirect, $id, $post_id );\n\n\t\twp_safe_redirect( $redirect );\n\t\texit;\n\t}",
"function process_mail(){\n\t\t$result = true;\n\t\t\n\t\tif(count($this->to) < 1){\n\t\t\treturn 'No email address.';\n\t\t}\n\t\t$this->set_eol();\n\t\t$this->get_message_type();\n\t\t$this->set_boundary();\n\t\t$headers = $this->set_headers();\n\t\t$body = $this->set_body();\n\t\t\n\t\tif($body == ''){\n\t\t\treturn 'Empty email body.';\n\t\t}\n\t\t$result = $this->send_mail($headers, $body);\n\t\treturn $result;\n\t}",
"function bulkOfferEmail() {\n\t\tdate_default_timezone_set('US/Eastern');\n\t\t$this->autoRender = false;\n\t\t\n\t\t$mode_info=unserialize($this->data['Cronemail']['mode_info']);\n\t\t\n\t\tif(isset($mode_info['Cronemail']['mode']) && $mode_info['Cronemail']['mode']==1 && isset($this->data['Cronemail']['array_string']) && $this->data['Cronemail']['array_string']!=''){\n\t\t\t\t$advertiser = unserialize($this->data['Cronemail']['array_string']);\n\t\t\t\t$content = '';\n\t\t\t\t$content .= '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><title>Zuni Merchant Page / Everyday Savings Offers</title></head><body style=\"margin:0px; padding:0px; font-size:0; \">';\n\t\t\t\t$content .= $this->offerhtml->email_header();\n\t\t\t\t$content .= $this->offerhtml->email_box();\n\t\t\t\t$footer = $this->offerhtml->email_footer().'</body></html>';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$succedd = '';\n\t\t\t\t$failed = '';\n\t\t\t\t$unique_string = $this->common->randomPassword(10);\n\t\t\t\t\n\t\t\t\t\t\t\t$this->Email->sendAs = 'html';\n\t\t\t\t\t\t\t$this->Email->to = $mode_info['Cronemail']['specified_email'];\n\t\t\t\t\t\t\t$this->Email->subject = $this->common->getOfferEmailSubject(); //'Zuni Merchant Page / Everyday Savings Offers';\n\t\t\t\t\t\t\t$this->Email->replyTo = $this->common->getReturnEmail();\n\t\t\t\t\t\t\t$this->Email->from = $this->common->getFromName().' <'.$this->common->getSalesEmail().'>';\n\t\t\t\t\t\t\t$content_final = '';\n\t\t\t\t\t\t\t//For URL tracking\n\t\t\t\t\t\t\t$tracking_string = '';//'?unique='.$unique_string.'?'.base64_encode($mode_info['Cronemail']['id']);\n\t\t\t\t\t\t\t$content_final = '';\n\t\t\t\t\t\t\t$content_final .= $this->offerhtml->email_content($advertiser,$tracking_string);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$content_final .= $footer;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->body = '';\n\t\t\t\t\t\t\t$this->body .= $content;\n\t\t\t\t\t\t\t$this->body .= $content_final;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->Email->smtpOptions = array(\n\t\t\t\t\t\t\t\t'port'=>'25',\n\t\t\t\t\t\t\t\t'timeout'=>'30',\n\t\t\t\t\t\t\t\t'host' =>SMTP_HOST_NAME,\n\t\t\t\t\t\t\t\t'username'=>SMTP_USERNAME,\n\t\t\t\t\t\t\t\t'password'=>SMTP_PASSWORD\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$this->Email->delivery = 'smtp';\n\t\t\t\t\t\t\tif($this->Email->send($this->body)) {\n\t\t\t\t\t\t\t\t$saveCron = '';\n\t\t\t\t\t\t\t\t$saveCron['Cronemail']['id'] = $mode_info['Cronemail']['id'];\n\t\t\t\t\t\t\t\t$saveCron['Cronemail']['status'] = 1;\n\t\t\t\t\t\t\t\t$this->Cronemail->save($saveCron);\n\t\t\t\t\t\t\t\t$this->Session->setFlash('Emails sent successfully to '.$mode_info['Cronemail']['specified_email'].'.');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->Session->setFlash('Mailing Error, please try later.');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->Email->reset();\n\t\t\t\t\t\t\t$this->redirect(array('controller'=>'cronemails','action'=>'index'));\n\t\t\t\t\n\t\t}elseif(isset($this->data['Cronemail']['array_string']) && $this->data['Cronemail']['array_string']!='') {\n\t\t\t\t\t\n\t\t\t\t$advertiser = unserialize($this->data['Cronemail']['array_string']);\n\t\t\t\t$content = '';\n\t\t\t\t$content .= '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><title>Zuni Merchant Page / Everyday Savings Offers</title></head><body style=\"margin:0px; padding:0px; font-size:0; \">';\n\t\t\t\t$content .= $this->offerhtml->email_header();\n\t\t\t\t$content .= $this->offerhtml->email_box();\n\t\t\t\t$footer = $this->offerhtml->email_footer().'</body></html>';\n\t\t\t\t\n\t\t\t\tset_time_limit(0);\n\t\t\t\t\n\t\t\t\t$succedd = '';\n\t\t\t\t$failed = '';\n\t\t\t\t$unique_string = $this->common->randomPassword(10);\n\t\t\t\t$this->loadModel('DiscountNewsletter');\n\t\t\t\t$users = $this->DiscountNewsletter->find('all',array('fields'=>array('id,email'),'conditions'=>array('status'=>'yes')));\n\t\t\t\t$email_ids = array_chunk($users, EMAIL_LIST);\n\t\t\t\tforeach($email_ids as $email_id) {\n\t\t\t\t\t\tforeach($email_id as $email) {\n\t\t\t\t\t\t\t$id = $email['DiscountNewsletter']['id'];\n\t\t\t\t\t\t\t$this->Email->sendAs = 'html';\n\t\t\t\t\t\t\t$this->Email->to = $email['DiscountNewsletter']['email'];\n\t\t\t\t\t\t\t$this->Email->subject = $this->common->getOfferEmailSubject(); //'Zuni Merchant Page / Everyday Savings Offers';\n\t\t\t\t\t\t\t$this->Email->replyTo = $this->common->getReturnEmail();\n\t\t\t\t\t\t\t$this->Email->from = $this->common->getFromName().' <'.$this->common->getSalesEmail().'>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//For URL tracking\n\t\t\t\t\t\t\t$tracking_string = '?unique='.$unique_string.'?'.base64_encode($id);\n\t\t\t\t\t\t\t$content_final = '';\n\t\t\t\t\t\t\t$content_final .= $this->offerhtml->email_content($advertiser,$tracking_string);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// For email open tracking\n\t\t\t\t\t\t\t$content_final .= '<img src=\"https://zuni.com/offeremaillogs/saveEmailOpen?unique='.$unique_string.'?'.base64_encode($id).'\" style=\"display:none;width:0\" />';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$content_final .= $footer;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->body = '';\n\t\t\t\t\t\t\t$this->body .= $content;\n\t\t\t\t\t\t\t$this->body .= $content_final;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->Email->smtpOptions = array(\n\t\t\t\t\t\t\t\t'port'=>'25',\n\t\t\t\t\t\t\t\t'timeout'=>'30',\n\t\t\t\t\t\t\t\t'host' =>SMTP_HOST_NAME,\n\t\t\t\t\t\t\t\t'username'=>SMTP_USERNAME,\n\t\t\t\t\t\t\t\t'password'=>SMTP_PASSWORD\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$this->Email->delivery = 'smtp';\n\t\t\t\t\t\t\tif($this->Email->send($this->body)) {\n\t\t\t\t\t\t\t\t$succedd[]= $id;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$failed[]= $id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$this->Email->reset();\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t //----------------------------------Save Email Log----------------------------------------//\t\n\t\t\t$this->loadModel('Offeremaillog');\n\t\t\t$sent = ',';\n\t\t\t$notsent = ',';\n\t\t\tif(is_array($succedd)) {\n\t\t\t\t$sent = ','.implode(',',$succedd).',';\n\t\t\t}\n\t\t\tif(is_array($failed)) {\n\t\t\t\t$notsent = ','.implode(',',$failed).',';\n\t\t\t}\n\t\t\t$today = mktime(0,0,0,date('m'),date('d'),date('Y'));\n\t\t\t$check_same = $this->common->check_same_date_offer($today);\n\t\t\t\n\t\t\t$save = '';\n\t\t\tif(isset($check_same['Offeremaillog']['id'])) {\n\t\t\t\t$save['Offeremaillog']['id'] = $check_same['Offeremaillog']['id'];\n\t\t\t}\n\t\t\t\t$save['Offeremaillog']['sending_date'] = $today;\n\t\t\t\t$save['Offeremaillog']['sent'] = $sent;\n\t\t\t\t$save['Offeremaillog']['notsent'] = $notsent;\n\t\t\t\t$save['Offeremaillog']['opened'] = '';\n\t\t\t\t$save['Offeremaillog']['email_opened'] = '';\n\t\t\t\t$save['Offeremaillog']['unique']=$unique_string;\n\t\t\t\t$save['Offeremaillog']['advrtisers']=$match['Cronemail']['advertisers'];\n\t\t\t\t$this->Offeremaillog->save($save);\n\t\t//----------------------------------Save Email Log----------------------------------------//\n\t\t\n\t\t\t\t$saveCron = '';\n\t\t\t\t$saveCron['Cronemail']['id'] = $mode_info['Cronemail']['id'];\n\t\t\t\t$saveCron['Cronemail']['status'] = 1;\n\t\t\t\t$this->Cronemail->save($saveCron);\n\t\t\t\t\n\t\t\t\t$this->Session->setFlash('Emails sent successfully to all Subscribers.');\n\t\t\t\t$this->redirect(array('controller'=>'offeremaillogs','action'=>'index'));\n\t\t\t}\n\t\t\t\n\t}",
"public function send()\n {\n if (!isset($this->properties['mail_recipients'])) {\n $this->properties['mail_recipients'] = false;\n }\n\n // CHECK IF THERE IS AT LEAST ONE MAIL ADDRESS\n if (!isset($this->properties['mail_bcc'])) {\n $this->properties['mail_bcc'] = false;\n }\n\n // EXIT IF NO EMAIL ADDRESSES ARE SET\n if (!$this->checkEmailSettings()) {\n return;\n }\n\n // CUSTOM TEMPLATE\n $template = $this->getTemplate();\n\n // SET DEFAULT EMAIL DATA ARRAY\n $this->data = [\n 'id' => $this->record->id,\n 'data' => $this->post,\n 'ip' => $this->record->ip,\n 'date' => $this->record->created_at\n ];\n\n // CHECK FOR CUSTOM SUBJECT\n if (!empty($this->properties['mail_subject'])) {\n $this->prepareCustomSubject();\n }\n\n // SEND NOTIFICATION EMAIL\n Mail::sendTo($this->properties['mail_recipients'], $template, $this->data, function ($message) {\n // SEND BLIND CARBON COPY\n if (!empty($this->properties['mail_bcc']) && is_array($this->properties['mail_bcc'])) {\n $message->bcc($this->properties['mail_bcc']);\n }\n\n // USE CUSTOM SUBJECT\n if (!empty($this->properties['mail_subject'])) {\n $message->subject($this->properties['mail_subject']);\n }\n\n // ADD REPLY TO ADDRESS\n if (!empty($this->properties['mail_replyto'])) {\n $message->replyTo($this->properties['mail_replyto']);\n }\n\n // ADD UPLOADS\n if (!empty($this->properties['mail_uploads']) && !empty($this->files)) {\n foreach ($this->files as $file) {\n $message->attach($file->getLocalPath(), ['as' => $file->getFilename()]);\n }\n }\n });\n }",
"function contactSendMail()\r\n {\r\n $subject = 'Contact : ' . $_POST['contactNom'];\r\n $body = $_POST['contactMsg'];\r\n\r\n\r\n $this->sendMail($subject, $body);\r\n }",
"function wpsp_send_tour_design() {\n\t\n\tparse_str ($_POST['tours'], $inquiry_info);\n\t\n\twpsp_email_notify( $inquiry_info, true, true );//confirm to operator\n\twpsp_email_notify( $inquiry_info, false, true ); //confirm to traveller\n\t\n\tdie();\n}",
"function student_crm_webform_send_email_form() {\n $case = menu_get_object('crm_case', 2);\n \n $fields = field_info_instances();\n $fields = $fields['crm_case'][$case->type];\n $form_fields = array();\n $field_settings = array();\n if(!$fields) {\n return null;\n }\n foreach ($fields as $field_name => $field) {\n if ($field['settings']['webform']) {\n $form_fields[$field_name] = $field['label'];\n $field_settings[$field_name] = $field['settings']['email_address'];\n }\n }\n if (!count($form_fields)) {\n \n return array('message' => array('#markup' => \n '<div class=\"empty\">' . t('No forms for this item') . '</div>'));\n }\n drupal_add_js(drupal_get_path('module', 'student_crm_webform') . '/js/student_crm_webform.send_form.js');\n drupal_add_js(array('studentCRMWebformSettings' => $field_settings), 'setting');\n $form = array();\n \n $form['case'] = array(\n '#type' => 'hidden',\n '#value' => $case->cid,\n );\n \n $form['field'] = array(\n '#type' => 'select',\n '#title' => 'Select the type of form to send',\n '#options' => $form_fields,\n );\n \n $form['manual-email'] = array(\n '#type' => 'textfield',\n '#title' => 'Email address',\n );\n \n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => 'Send form',\n );\n \n return $form;\n}",
"function email_admin($common,$db_object,$user_id,$post_var,$error_msg,$default)\n \t{\n\n \twhile(list($kk,$vv)=@each($post_var))\n\t\t{\n\n\t\t$$kk=$vv;\n\t\n\t\t}\n\t\n\t\t\n\t$empl_id = $user_id_all;\n\n//codings for sending email to the system owner....\n\t\n\t$config=$common->prefix_table(\"config\");\n\t$appraisal_table=$common->prefix_table(\"appraisal\");\n \t$user=$common->prefix_table(\"user_table\");\n\t\n\t\n\t$mysql=\"select tasubject,tamessage from $config\";\n\t$rslt_arr=$db_object->get_a_line($mysql);\n\n\n\n\t$tasubject=$rslt_arr[\"tasubject\"];\n\t$tamessage=$rslt_arr[\"tamessage\"];\n\n\n\tpreg_match(\"/<{test_loopstart}>(.*?)<{test_loopend}>/s\",$tamessage,$match);\n\t\n\t$newmatch = $match[1];\n\t$str = \"\";\n\tfor($i=0;$i<count($empl_id);$i++)\n\t{\n\t\t$subqry2=\"select username,email from $user where user_id='$empl_id[$i]'\";\n\n\t\t$user_name=$db_object->get_a_line($subqry2);\n\t\t//$to=$user_name[\"username\"].\"[email protected]\";\n\t\t$to=$user_name[\"email\"];\n\n\t\t$subqry2=\"select email from $user where user_id='1'\";\n\n\t\t$sys_email=$db_object->get_a_line($subqry2);\n\t\t$from=$sys_email[\"email\"];\n\t\t\n\t\t$mysql = \"select test_mode,test_type from $appraisal_table where user_id='$empl_id[$i]'\";\n\n\t\t$testdetails_arr = $db_object->get_rsltset($mysql);\n\n\t\tfor($j=0;$j<count($testdetails_arr);$j++)\n\t\t{\n\t\t\t$test_mode = $testdetails_arr[$j][\"test_mode\"];\n\t\t\t$test_type = $testdetails_arr[$j][\"test_type\"];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif($test_mode == \"Test\")\n\t\t\t{\n\t\t\t\t$mess_test_mode = \"Test Mode\";\n\t\t\t}\n\t\t\telseif($test_mode == \"360\")\n\t\t\t{\n\t\t\t\t$mess_test_mode = \"360 Mode\";\n\t\t\t}\n\t\t\tif($test_type == \"t\")\n\t\t\t{\n\t\t\t\t$mess_test_type = \"Technical\";\n\t\t\t}\n\t\t\telseif($test_type == \"i\")\n\t\t\t{\n\t\t\t\t$mess_test_type = \"Inter Personal\";\n\t\t\t}\n\t\t\n\t$str .= preg_replace(\"/<{(.*?)}>/e\",\"$$1\",$newmatch);\n\n\n\t\t\n\t\t}\n\n\n\n$tamessage = preg_replace(\"/<{test_loopstart}>(.*?)<{test_loopend}>/s\",$str,$tamessage);\n\n\n$values[\"username\"]\t\t=$user_name[\"username\"];\n$values[\"login_username\"] \t= $user_name[\"username\"];\n\n$values[\"url\"]=$common->http_path.\"/index.php\";\n\n$tamessage1=$common->direct_replace($db_object,$tamessage,$values);\n\n\n//echo \"to $to<br> sub $tasubject<br> mess $tamessage1<br> from $from<br><br>\";\n\n$sent=$common->send_mail($to,$tasubject,$tamessage1,$from);\n\n\t}\n\tif($sent)\n\t\t{\n\t\t\n\t\t\techo $error_msg[\"cAppraisalMail_sent\"];\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo $error_msg[\"cAppraisalMail_fail\"];\n\t\t}\n\n}",
"function set_post_content($entry, $form){\r\n\t //Custom Form Submitted via PHP will go here\r\n\t // Get the IDs of the relevant fields and prepare an email message\r\n\t $message = print_r($entry, true);\r\n\t \r\n\t // Wrap test if any lines are larger than 70 characters\r\n\t $message = wordwrap($message, 70);\r\n\t \r\n\t// Send me an email for debugging\r\n\t// mail('[email protected]', 'Getting the Gravity Form Field IDs', $message);\r\n \r\n\t// Post the form to a specific URL to the desired CRM, in this case DebtPayPro\r\n\tfunction 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}\r\n\t\r\n\t// Handle the form differently based on form ID\r\n\tif($form[\"id\"] == 1) { //FORM 1\r\n\t\tif (($entry[\"6\"]) == 'Private') {\r\n\t\t\t$data = array(\r\n\t\t\t\t\"loan_amount\"\t\t=>\t$entry[\"7\"],\r\n\t\t\t\t\"loan_status_f\"\t\t=>\t$entry[\"4\"],\r\n\t\t\t\t\"loan_type\"\t\t\t=>\t$entry[\"6\"],\r\n\t\t\t\t\"first_name\" \t\t=> \t$entry[\"1.3\"],\r\n\t\t\t\t\"last_name\" \t\t=> \t$entry[\"1.6\"],\r\n\t\t\t\t\"phone\" \t\t\t=> \t$entry[\"2\"],\r\n\t\t\t\t\"email\" \t\t\t=>\t$entry[\"3\"],\r\n\t\t\t\t\"lead_source\" \t\t=> \t\"Campaign 1.1\"\r\n\t\t\t);\r\npost_to_url(\"<ENTER POST URL HERE>\", $data);\r\n\t\t} else {\r\n\t\t\t$data = array(\r\n\t\t\t\t\"loan_amount\"\t\t=>\t$entry[\"7\"],\r\n\t\t\t\t\"loan_status_f\"\t\t=>\t$entry[\"4\"],\r\n\t\t\t\t\"loan_type\"\t\t\t=>\t$entry[\"6\"],\r\n\t\t\t\t\"first_name\" \t\t=> \t$entry[\"1.3\"],\r\n\t\t\t\t\"last_name\" \t\t=> \t$entry[\"1.6\"],\r\n\t\t\t\t\"phone\" \t\t\t=> \t$entry[\"2\"],\r\n\t\t\t\t\"email\" \t\t\t=>\t$entry[\"3\"],\r\n\t\t\t\t\"lead_source\" \t\t=> \t\"Campaign 1.2\"\r\n\t\t\t);\r\n\tpost_to_url(\"<ENTER POST URL HERE>\", $data);\r\n\t\t}\r\n\t\r\n\t\r\n\t\r\n\t} elseif($form[\"id\"] == 2) { //FORM 2 \r\n\t\tif (($entry[\"6\"]) == 'Private') {\r\n\t\t\t$data = array(\r\n\t\t\t\t\"loan_amount\"\t\t=>\t$entry[\"7\"],\r\n\t\t\t\t\"loan_status_f\"\t\t=>\t$entry[\"4\"],\r\n\t\t\t\t\"loan_type\"\t\t\t=>\t$entry[\"6\"],\r\n\t\t\t\t\"first_name\" \t\t=> \t$entry[\"1.3\"],\r\n\t\t\t\t\"last_name\" \t\t=> \t$entry[\"1.6\"],\r\n\t\t\t\t\"phone\" \t\t\t=> \t$entry[\"2\"],\r\n\t\t\t\t\"email\" \t\t\t=>\t$entry[\"3\"],\r\n\t\t\t\t\"lead_source\" \t\t=> \t\"Campaign 2.1\"\r\n\t\t\t);\r\npost_to_url(\"<ENTER POST URL HERE>\", $data);\r\n\t\t} else {\r\n\t\t\t$data = array(\r\n\t\t\t\t\"loan_amount\"\t\t=>\t$entry[\"7\"],\r\n\t\t\t\t\"loan_status_f\"\t\t=>\t$entry[\"4\"],\r\n\t\t\t\t\"loan_type\"\t\t=>\t$entry[\"6\"],\r\n\t\t\t\t\"first_name\" \t\t=> \t$entry[\"1.3\"],\r\n\t\t\t\t\"last_name\" \t\t=> \t$entry[\"1.6\"],\r\n\t\t\t\t\"phone\" \t\t=> \t$entry[\"2\"],\r\n\t\t\t\t\"email\" \t\t=>\t$entry[\"3\"],\r\n\t\t\t\t\"lead_source\" \t\t=> \t\"Campaign 2.2\"\r\n\t\t\t);\r\npost_to_url(\"<ENTER POST URL HERE>\", $data);\r\n\t\t}\r\n\t\r\n\t\t\r\n}elseif($form[\"id\"] == 3) { //FORM 3\r\n\t\tif (($entry[\"6\"]) == 'Private') {\r\n\t\t\t$data = array(\r\n\t\t\t\t\"loan_amount\"\t\t=>\t$entry[\"7\"],\r\n\t\t\t\t\"loan_status_f\"\t\t=>\t$entry[\"4\"],\r\n\t\t\t\t\"loan_type\"\t\t=>\t$entry[\"6\"],\r\n\t\t\t\t\"first_name\" \t\t=> \t$entry[\"1.3\"],\r\n\t\t\t\t\"last_name\" \t\t=> \t$entry[\"1.6\"],\r\n\t\t\t\t\"phone\" \t\t=> \t$entry[\"2\"],\r\n\t\t\t\t\"email\" \t\t=>\t$entry[\"3\"],\r\n\t\t\t\t\"lead_source\" \t\t=> \t\"Campaign 3.1\"\r\n\t\t\t);\r\npost_to_url(\"<ENTER POST URL HERE>\", $data);\r\n\t\t} else {\r\n\t\t\t$data = array(\r\n\t\t\t\t\"loan_amount\"\t\t=>\t$entry[\"7\"],\r\n\t\t\t\t\"loan_status_f\"\t\t=>\t$entry[\"4\"],\r\n\t\t\t\t\"loan_type\"\t\t=>\t$entry[\"6\"],\r\n\t\t\t\t\"first_name\" \t\t=> \t$entry[\"1.3\"],\r\n\t\t\t\t\"last_name\" \t\t=> \t$entry[\"1.6\"],\r\n\t\t\t\t\"phone\" \t\t=> \t$entry[\"2\"],\r\n\t\t\t\t\"email\" \t\t=>\t$entry[\"3\"],\r\n\t\t\t\t\"lead_source\" \t\t=> \t\"Campaign 3.2\"\r\n\t\t\t);\r\npost_to_url(\"<ENTER POST URL HERE>\", $data);\r\n\t\t}\r\n\t\t}\r\n else { //Do nothing since there are no other forms\r\n}\r\n}",
"protected function _send()\n\t{\n\t\t$params = array(\n\t\t\t'Action' => 'SendEmail',\n\t\t\t'Version' => '2010-12-01',\n\t\t\t'Source' => static::format_addresses(array($this->config['from'])),\n\t\t\t'Message.Subject.Data' => $this->subject,\n\t\t\t'Message.Body.Text.Data' => $this->body,\n\t\t\t'Message.Body.Text.Charset' => $this->config['charset'],\n\t\t);\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->to as $value)\n\t\t{\n\t\t\t$params['Destination.ToAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->cc as $value)\n\t\t{\n\t\t\t$params['Destination.CcAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->bcc as $value)\n\t\t{\n\t\t\t$params['Destination.BccAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->reply_to as $value)\n\t\t{\n\t\t\t$params['ReplyToAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\t\n\t\t$date = gmdate(self::ISO8601_BASIC);\n\t\t$dateRss = gmdate(DATE_RSS);\n\t\t\n\t\t$curl = \\Request::forge('https://email.' . $this->region . '.amazonaws.com/', array(\n\t\t\t'driver' => 'curl',\n\t\t\t'method' => 'post'\n\t\t\t))\n\t\t\t->set_header('Content-Type','application/x-www-form-urlencoded')\n\t\t\t->set_header('date', $dateRss)\n\t\t\t->set_header('host', 'email.' . $this->region . '.amazonaws.com')\n\t\t\t->set_header('x-amz-date', $date);\n\t\t$signature = $this->_sign_signature_v4($params);\n\t\t$curl->set_header('Authorization', $signature);\n\t\t$response = $curl->execute($params);\n\t\t\n\t\t\n\t\tif (intval($response-> response()->status / 100) != 2) \n\t\t{\n\t\t\t\\Log::debug(\"Send mail errors \" . json_encode($response->response()));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\\Log::debug(\"Send mail ok \" . json_encode($response->response()));\n\t\treturn true;\n\t}",
"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 enviar_contacto(){\n $this->asignar_ingreso();\n $nombre_sede = $this->sede;\n\n $resultado = $this->datoSede($nombre_sede);\n $cuerpo =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br /><br />\n\t\t<u>Datos de Entrada:</u><br />\";\n $cuerpo .=\"<br />\";\n $cuerpo .= \"<strong>Nombre Completo: </strong>\".utf8_decode($this->nombre).\"<br />\" ;\n $cuerpo .= \"<strong>Número de telefono: </strong>\".$this->telefono.\"<br />\" ;\n $cuerpo .= \"<strong>E-mail: </strong>\".$this->email.\"<br />\" ;\n $cuerpo .= \"<strong>Mensaje: </strong>\".$this->comentario.\"<br />\";\n $cuerpo .= \"<br />\";\n $cuerpo .= \"---- Fin ----\";\n $cuerpo .= \"<br />\";\n $subject= \"Contacto Web Prevaler\";\n $subject2= \"Contacto Web Prevaler\";\n $basemailfor=$resultado['email_sede'];\n //$basemailfor=\"[email protected]\";\n $basemailfrom = $this->email;\n $respuesta =\"<img src='http://prevaler.diazcreativos.net.ve/imagenes/PREVALER.png' /><br />\n\t\t<strong>Saludos Sr(a).: $this->nombre $this->apellido</strong><br /><br />\n\t\tNosotros hemos recibido su mensaje, nuestro departamento de atención al cliente le responderá lo más pronto posible<br />\n\t\tGracias por contactar a Prevaler.<br />\n\t\tPrevaler<br /><br />\n\t\tTelé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>¡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 }",
"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 website_provider() {\n\t\t\n\t\t$name = Input::get('name');\n\t\t$mailFrom = Input::get('email');\n\t\t$phone = Input::get('phone');\n\t\t$comments = Input::get('comments');\n\t\t$emailTo = '[email protected]';\n\t\t\n\t\t$vars = array(\n\t\t\t'name'\t\t=>\t$name,\n\t\t\t'email'\t\t=>\t$mailFrom,\n\t\t\t'phone'\t\t=>\t$phone,\n\t\t\t'comments'\t=>\t$comments,\n\t\t);\n\n\t\tEmailTemplate::SendByKey('contact_mail_provider', $vars, $emailTo, null, null, $mailFrom);\n\t\t\n\t\t\n\t\treturn \"<fieldset><div id='success_page'><h4 class='highlight'>Obrigado, <strong>$name</strong>! Sua mensagem foi enviada. Entraremos em contato o mais rápido possível.</h4></div></fieldset>\";\n }",
"function sendEmail_owner($details, $sitetitle) {\n\n\t\t\t $currencycode = $details->currCode;\n\t\t\t $currencysign = $details->currSymbol;\n\n\t\t\t $custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$custemail = $details->accountEmail;\n\n\t\t\t\t$sendto = $this->ownerEmail($details->module, $details->itemid);\n\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= \"<h4><b>Order Information</b></h4>\";\n\t\t\t\t$message .= \"Date :\" . $date . \".<br>\";\n\t\t\t\t$message .= \"Invoice No.: \" . $invoiceid . \".<br>\";\n\t\t\t\t//\t$message .= \"Payment Method: \" . $paymethod . \".<br><br>\";\n\t\t\t\t$message .= \"Deposit Amount: \" . $currencycode . \" \" . $currencysign . $deposit . \"<br>\";\n\t\t\t\t$message .= \"Total Amount: \" . $currencycode . \" \" . $currencysign . $totalamount . \"<br><br>\";\n\t\t\t\t$message .= \"<h4><b>Customer Information</b></h4>\";\n\t\t\t\t$message .= \"Customer ID: \" . $custid . \"<br>\";\n\t\t\t\t$message .= \"Name : \" . $name . \"<br>\";\n\t\t\t\t$message .= \"Email : \" . $custemail . \"<br>\";\n\t\t\t\tif(!empty($country)){\n\t\t\t\t$message .= \"Country : \" . $country . \"<br>\";\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$message .= \"Phone : \" . $phone . \"<br>\";\n\t\t\t\t$message .= \"<br> To view Invoice visit at: <a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t\n\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('New Booking Notification');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}",
"function do_update_additional_email($s_id,$fname,$lname,$email,$contacts_id) {\n\t# Dim some Vars:\n\t\tglobal $_DBCFG, $db_coin;\n\n\t# Do purge contact\n\t\t$query \t = \"UPDATE \".$_DBCFG['suppliers_contacts'].\" SET \";\n\t\t$query\t.= \"contacts_name_first='\".$db_coin->db_sanitize_data($fname).\"', \";\n\t\t$query\t.= \"contacts_name_last='\".$db_coin->db_sanitize_data($lname).\"', \";\n\t\t$query\t.= \"contacts_email='\".$db_coin->db_sanitize_data($email).\"' \";\n\t\t$query\t.= 'WHERE contacts_id='.$contacts_id.' AND contacts_s_id='.$s_id;\n\t\t$db_coin->db_query_execute($query) OR DIE(\"Unable to complete request\");\n\t\treturn $db_coin->db_query_affected_rows();\n}",
"public function run()\n {\n if ($this->allowOverride) {\n $to = $this->arg('to');\n $cc = $this->arg('cc');\n $bcc = $this->arg('bcc');\n $subject = $this->arg('subject');\n\n /* if class vars is defined, dont override it */\n if ($to) {\n $this->email->to($to);\n }\n\n if ($cc) {\n $this->email->cc($cc);\n }\n\n if ($bcc) {\n $this->email->bcc($bcc);\n }\n\n if ($subject) {\n $this->email->subject($subject);\n }\n\n $content = $this->arg('content');\n if (! $content) {\n $content = $this->getContent();\n }\n\n if ($this->contentType == \"html\") {\n $this->email->html($content);\n } else {\n $this->email->text($content);\n }\n } else {\n $this->extractFieldsFromThis();\n }\n\n return $this->send();\n }",
"public function actual()\n {\n $name = post_param_string('name');\n $message = post_param_string('message');\n $recommender_email_address = post_param_string('recommender_email_address');\n\n $invite = false;\n\n if (addon_installed('captcha')) {\n require_code('captcha');\n enforce_captcha();\n }\n\n require_code('type_sanitisation');\n\n $email_adrs_to_send = array();\n $names_to_send = array();\n\n foreach ($_POST as $key => $email_address) {\n if (substr($key, 0, 14) != 'email_address_') {\n continue;\n }\n if ($email_address == '') {\n continue;\n }\n\n if (get_magic_quotes_gpc()) {\n $email_address = stripslashes($email_address);\n }\n\n if (!is_email_address($email_address)) {\n attach_message(do_lang_tempcode('INVALID_EMAIL_ADDRESS'), 'warn');\n return $this->gui();\n } else {\n $email_adrs_to_send[] = $email_address;\n $names_to_send[] = $email_address;\n }\n\n if (is_guest()) {\n break;\n }\n }\n\n $adrbook_emails = array();\n $adrbook_names = array();\n $adrbook_use_these = array();\n foreach ($_POST as $key => $email_address) {\n if (preg_match('#details_email_|details_name_|^use_details_#', $key) == 0) {\n continue;\n }\n if (preg_match('#details_email_#', $key) != 0) {\n if (get_magic_quotes_gpc()) {\n $email_address = stripslashes($email_address);\n }\n\n if (is_email_address($email_address)) {\n $curr_num = intval(preg_replace('#details_email_#', '', $key));\n $adrbook_emails[$curr_num] = $email_address;\n }\n }\n\n if (preg_match('#details_name_#', $key)) {\n $curr_num = intval(preg_replace('#details_name_#', '', $key));\n $adrbook_names[$curr_num] = $email_address;\n }\n\n if (preg_match('#^use_details_#', $key)) {\n $curr_num = intval(preg_replace('#use_details_#', '', $key));\n $adrbook_use_these[$curr_num] = $curr_num;\n }\n }\n\n // Add emails from address book file\n foreach ($adrbook_use_these as $key => $value) {\n $cur_email = (array_key_exists($key, $adrbook_emails) && strlen($adrbook_emails[$key]) > 0) ? $adrbook_emails[$key] : '';\n $cur_name = (array_key_exists($key, $adrbook_names) && strlen($adrbook_names[$key]) > 0) ? $adrbook_names[$key] : '';\n if (strlen($cur_email) > 0) {\n $email_adrs_to_send[] = $cur_email;\n $names_to_send[] = (strlen($cur_name) > 0) ? $cur_name : $cur_email;\n }\n }\n\n if (count($email_adrs_to_send) == 0) {\n warn_exit(do_lang_tempcode('ERROR_NO_CONTACTS_SELECTED'));\n }\n\n foreach ($email_adrs_to_send as $key => $email_address) {\n if (get_magic_quotes_gpc()) {\n $email_address = stripslashes($email_address);\n }\n\n if (post_param_integer('wrap_message', 0) == 1) {\n $referring_username = is_guest() ? null : get_member();\n $_url = (post_param_integer('invite', 0) == 1) ? build_url(array('page' => 'join', 'email_address' => $email_address, 'keep_referrer' => $referring_username), get_module_zone('join')) : build_url(array('page' => '', 'keep_referrer' => $referring_username), '');\n $url = $_url->evaluate();\n $join_url = $GLOBALS['FORUM_DRIVER']->join_url();\n $_message = do_lang((post_param_integer('invite', 0) == 1) ? 'INVITE_MEMBER_MESSAGE' : 'RECOMMEND_MEMBER_MESSAGE', $name, $url, array(get_site_name(), $join_url)) . $message;\n } else {\n $_message = $message;\n }\n\n if ((may_use_invites()) && (post_param_integer('invite', 0) == 1)) {\n send_recommendation_email($name, $email_address, $_message, true, $recommender_email_address, post_param_string('subject', null), $names_to_send[$key]);\n\n $GLOBALS['FORUM_DB']->query_insert('f_invites', array(\n 'i_inviter' => get_member(),\n 'i_email_address' => $email_address,\n 'i_time' => time(),\n 'i_taken' => 0\n ));\n\n $invite = true;\n } elseif ((get_option('is_on_invites') == '0') && (get_forum_type() == 'cns')) {\n $GLOBALS['FORUM_DB']->query_insert('f_invites', array( // Used for referral tracking\n 'i_inviter' => get_member(),\n 'i_email_address' => $email_address,\n 'i_time' => time(),\n 'i_taken' => 0\n ));\n }\n\n if (!$invite) {\n send_recommendation_email($name, $email_address, $_message, false, $recommender_email_address, post_param_string('subject', null), $names_to_send[$key]);\n }\n }\n\n require_code('autosave');\n clear_cms_autosave();\n\n return inform_screen($this->title, do_lang_tempcode('RECOMMENDATION_MADE', escape_html(get_site_name())));\n }",
"function mme_display_form() {\n\tif( isset($_POST['send']) ) {\n\t\t$emailstring = $_POST['emails'];\n\t\t$emails = explode( ',', $emailstring );\n\t\t//print_r($emails);\n\t\tforeach($emails as $email){\n\t\t\t$iserror = mme_checkemail( $email );\n\t\t}\n\t\t\tif($iserror) {\n\t\t\tmme_addemail( $emailstring );\n\t\t\tmme_success_notice();\n\t\t}\n\t}\n\t?>\n\t<form method=\"POST\" name=\"mailform\" action=\"#\">\n\t\t<style>\n\t\t\tdiv{\n\t\t\t\tmargin-left:15px;\n\t\t\t\tmargin-top: 10px;\n\t\t\t}\n\t\t\t\n\t\t\tdiv#metavalue{\n \t\t\twidth : 50%;\n \n\t\t\t}\n\t\t</style>\n\t\t<div>Enter the Email address</div>\n\t\t<div><input type = \"text\" id =\"metavalue\" name=\"emails\" /></div>\n\t\t<div class = \"buttons\">\n\t\t\t<input type=\"submit\" value=\"Save\" name=\"send\" class=\"button button-primary button-large\"/>\n\t\t\t<input type=\"reset\" value=\"Cancel\" name=\"cancel\"/>\n\t\t</div>\n\n\t</form>\n\t<?php\n}",
"function m_emailBuilder()\n\t{\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_EMAIL_FILE\",$this->emailTemplate);\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_TOPMSG_BLK\", \"topmsg_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_SELECT_BLK\", \"select_blk\");\n\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_BTN_BLK\", \"btn_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_TESTMAIL_BLK\", \"testmail_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_TESTMAIL_BLK\",\"TPL_SENDMAIL_BLK\", \"sendmail_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_TESTMAIL_BLK\",\"TPL_SENTMSG_BLK\", \"sentmsg_blk\");\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_SITEURL\",SITE_URL);\n\n\t\t#INTIALIZING\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",\"\");\n\t\t$this->ObTpl->set_var(\"btn_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"topmsg_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"testmail_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"sendmail_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"sentmsg_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"select_blk\",\"\");\n\n\t\t$emailRs[0]->vSubject =\"\";\n\t\t$emailRs[0]->vSid =\"\";\n\t\t$emailRs[0]->tHtmlMail =\"\";\n\t\t$emailRs[0]->tTextMail =\"\";\n\t\t$emailRs[0]->tmSentDate=\"\";\n\t\t$emailRs[0]->vUserList=$this->libFunc->ifSet($this->request,\"leadid\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",\"\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_ADMIN\",$_SESSION['uname']);\n\t\t#DISPLAYING MESSAGES\n\t\tif(isset($this->request['msg']) && $this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_UPDATED);\n\t\t\t$this->ObTpl->parse(\"topmsg_blk\",\"TPL_TOPMSG_BLK\");\n\t\t}\n\t\t\n\t\tif($this->err==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$this->errMsg);\n\t\t\t$this->ObTpl->parse(\"topmsg_blk\",\"TPL_TOPMSG_BLK\");\n\t\t}\n\n\t\t\n\t\tif(isset($_POST))\n\t\t{\n\t\t\tif(isset($this->request['subject']))\n\t\t\t\t$emailRs[0]->vSubject =$this->request['subject'];\n\t\t\tif(isset($this->request['sid']))\n\t\t\t\t$emailRs[0]->vSid=$this->request['sid'];\n\t\t\tif(isset($this->request['html_mail']))\n\t\t\t\t$emailRs[0]->tHtmlMail=$this->request['html_mail'];\n\t\t\tif(isset($this->request['text_mail']))\n\t\t\t\t$emailRs[0]->tTextMail=$this->request['text_mail'];\n\t\t\tif(isset($this->request['user_list']))\n\t\t\t\t$emailRs[0]->vUserList = $this->request['user_list'];\n\t\t}\n\n\n\t\tif(isset($this->request['id']) && !empty($this->request['id']) && is_numeric($this->request['id']))\n\t\t{\n\t\t\tif($this->err==0)\n\t\t\t{\n\t\t\t\t#DATABASE QUERY\n\t\t\t\t$this->obDb->query = \"SELECT * FROM \".EMAILS.\" WHERE iMailid_PK='\".$this->request['id'].\"'\";\n\t\t\t\t$emailRs = $this->obDb->fetchQuery();\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",$this->libFunc->dateFormat2($emailRs[0]->tmSentDate));\n\t\t\t\tif(empty($emailRs[0]->tmSentDate))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ObTpl->parse(\"sendmail_blk\",\"TPL_SENDMAIL_BLK\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->ObTpl->parse(\"sentmsg_blk\",\"TPL_SENTMSG_BLK\");\n\t\t\t\t\t}\n\t\t\t\t$this->ObTpl->parse(\"testmail_blk\",\"TPL_TESTMAIL_BLK\");\t\n\t\t\t\n\t\t\t}\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MODE\",\"edit\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$this->request['id']);\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_BTNLBL\",LBL_EDITCAMPAIGN_BTN);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",\"\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MODE\",\"add\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_BTNLBL\",LBL_ADDCAMPAIGN_BTN);\n\t\t}\n\n\n\t\t$this->ObTpl->parse(\"btn_blk\",\"TPL_BTN_BLK\");\n\n\t\t$this->obDb->query = \"SELECT count(*) as cntCustomer FROM \".CUSTOMERS.\" WHERE iStatus=1 AND iMailList !=0\";\n\t\t$custCnt = $this->obDb->fetchQuery();\n\t\t$this->ObTpl->set_var(\"TPL_VAR_CUSTCNT\",$custCnt[0]->cntCustomer);\n\n\t\tif(isset($emailRs[0]->vVisitorList)){\n\t\t\tif($emailRs[0]->vVisitorList == \"0\"){\n\t\t\t\t$this->ObTpl->set_var(\"TPL_MAILN_VISITORS\",\"selected='selected'\");\t\n\t\t\t}else{\n\t\t\t\t$this->ObTpl->set_var(\"TPL_MAILY_VISITORS\",\"selected='selected'\");\t\n\t\t\t}\n\t\t}\n\n\t\t$this->obDb->query = \"SELECT count(*) as cntVisitor FROM \".NEWSLETTERS;\n\t\t$cntVisitor = $this->obDb->fetchQuery();\n\t\t$this->ObTpl->set_var(\"TPL_VAR_VISITORCNT\",$cntVisitor[0]->cntVisitor);\n\n\t\t$this->obDb->query = \"SELECT * FROM \".LEADS.\" WHERE vdescription!=' '\";\n\t\t$leadRs = $this->obDb->fetchQuery();\n\t\t$recordCount1=$this->obDb->record_count;\n\t\tif($recordCount1>0)\n\t\t{\n\t\t\t#PARSING DISCOUNT BLOCK\n\t\t\tfor($j=0;$j<$recordCount1;$j++)\n\t\t\t{\t\t\n\t\t\t\tif (isset($this->request['leadid']))\n {\n $emailRs[0]->vUserList = $this->request['leadid'];\n }\n \n if($emailRs[0]->vUserList==$leadRs[$j]->iLeadid_PK)\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SELECTED\",\"selected\");\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_SELECTED\",\"\");\n\t\t\t\t}\n \n \n\t\t\t\t$this->obDb->query = \"SELECT count(*) as cnt FROM \".LEADLIST.\" WHERE iLeadId_FK='\". $leadRs[$j]->iLeadid_PK.\"'\";\n\t\t\t\t$qryRs = $this->obDb->fetchQuery();\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_COUNT\",$qryRs[0]->cnt);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_LEADID\",$leadRs[$j]->iLeadid_PK);\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_NAME\",$this->libFunc->m_displayContent($leadRs[$j]->vdescription));\n\n\t\t\t\t$this->ObTpl->parse(\"select_blk\",\"TPL_SELECT_BLK\",true);\n\t\t\t}\n\t\t}\t\n\n\t\t//******************************************\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SUBJECT\",$this->libFunc->m_displayContent($emailRs[0]->vSubject));\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SID\",$this->libFunc->m_displayContent($emailRs[0]->vSid));\n\t\t$this->ObTpl->set_var(\"TPL_VAR_HTMLMSG\",$this->libFunc->m_displayContent($emailRs[0]->tHtmlMail));\n\t\t$this->ObTpl->set_var(\"TPL_VAR_PLAINMSG\",$this->libFunc->m_displayContent($emailRs[0]->tTextMail));\t\t\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_EMAIL_FILE\"));\n\t}",
"public function sendEmail()\n {\n $templateId = 'email_delivery_time'; // template id\n $fromEmail = '[email protected]'; // sender Email id\n $fromName = 'Admin'; // sender Name\n $toEmail = '[email protected]'; // receiver email id\n\n try {\n $storeId = $this->storeManager->getStore()->getId();\n\n $from = ['email' => $fromEmail, 'name' => $fromName];\n// $this->inlineTranslation->suspend();\n try {\n// $transport = $this->transportBuilder\n// ->setTemplateIdentifier($templateId)\n// ->setTemplateVars([])\n// ->setTemplateOptions(\n// [\n// 'area' => Area::AREA_FRONTEND,\n// 'store' => $storeId\n// ]\n// )\n// ->setFromByScope($from)\n// ->addTo($toEmail)\n// ->getTransport();\n//\n// $transport->sendMessage();\n $templateVars = [];\n $transport = $this->transportBuilder->setTemplateIdentifier('59')\n ->setTemplateOptions( [ 'area' => \\Magento\\Framework\\App\\Area::AREA_FRONTEND, $storeId => 1 ] )\n ->setTemplateVars( $templateVars )\n ->setFrom( [ \"name\" => \"Magento ABC CHECK PAYMENT\", \"email\" => \"[email protected]\" ] )\n ->addTo('[email protected]')\n ->setReplyTo('[email protected]')\n ->getTransport();\n $transport->sendMessage();\n } finally {\n $this->inlineTranslation->resume();\n }\n } catch (\\Exception $e) {\n $this->_logger->info($e->getMessage());\n }\n }",
"private function send(){\n\t\t\n\t\tif(empty($this->email)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 87;\n\t\t\t$errorLog->errorMsg = 'Missing email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->subject)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 88;\n\t\t\t$errorLog->errorMsg = 'Missing subject';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->plainText)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 89;\n\t\t\t$errorLog->errorMsg = 'Missing plain text of email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->htmlBody)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber =90;\n\t\t\t$errorLog->errorMsg = 'Missing HTML of body';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\t// Validate Email\n\t\t$this->validateEmail($this->email);\n\t\t\n\t\tif(!$this->error){\n\t\t\t// Required Files\n\t\t\tinclude 'Mail.php';\n\t\t\tinclude 'Mail/mime.php';\n\n\t\t\t/* ---\n\t\t\tPEAR Mail Factory\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.factory.php\n\t\t\t--- */\n\t\t\t$host = \"smtp-relay.gmail.com\";\n\t\t\t$port = 587;\n\t\t\t$smtp = Mail::factory('smtp', array('host'=>$host, 'port'=>$port));\n\n\t\t\t/* ---\n\t\t\tPEAR MIME\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail-mime.mail-mime.php\n\t\t\t--- */\n\t\t\t$crlf = \"\\n\";\n\t\t\t$mime = new Mail_mime(array('eol' => $crlf));\n\n\t\t\t// Headers\n\t\t\t$from = 'Catalog.beer <[email protected]>';\n\t\t\t$replyto = '[email protected]';\n\t\t\t$headers = array('From'=>$from, 'To'=>$this->email, 'Subject'=>$this->subject, 'Reply-To'=>$replyto);\n\n\t\t\t// Plain Text\n\t\t\t$mime->setTXTBody($this->plainText);\n\n\t\t\t// HTML\n\t\t\t$mime->setHTMLBody($this->htmlBody);\n\n\t\t\t$body = $mime->get();\n\t\t\t$headers = $mime->headers($headers);\n\n\t\t\t$smtp = Mail::factory('smtp',\n\t\t\t\tarray ('host' => 'smtp-relay.gmail.com',\n\t\t\t\t\t\t\t 'port' => 587,\n\t\t\t\t\t\t\t 'auth' => true,\n\t\t\t\t\t\t\t 'username' => '',\n\t\t\t\t\t\t\t 'password' => '',\n\t\t\t\t\t\t\t 'debug' => false));\n\n\t\t\t/* ---\n\t\t\tPEAR Send Mail\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.send.php\n\t\t\t--- */\n\t\t\t$mail = $smtp->send($this->email, $headers, $body);\n\n\t\t\t// Process Errors\n\t\t\tif(PEAR::isError($mail)){\n\t\t\t\t// Error Sending Email\n\t\t\t\t$this->error = true;\n\t\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\n\t\t\t\t// Log Error\n\t\t\t\t$errorLog = new LogError();\n\t\t\t\t$errorLog->errorNumber = 91;\n\t\t\t\t$errorLog->errorMsg = 'Error sending email';\n\t\t\t\t$errorLog->badData = $mail->getMessage();\n\t\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t\t$errorLog->write();\n\t\t\t}\n\t\t}\n\t}",
"function sendFinalEmails ($email, $client_key, $final1, $final2, $final3, $final4) {\n\t//find device email and device type\n\t$sql = \"call getDeviceInfo(\".sql_escape_string($email,1).\");\";\n\techo $sql;\n\t$Result = execute_query($mysqli, $sql);\n\tif($Result) {\n\t\t$row = $Result[0]->fetch_assoc();\n\t\t$device_email = $row['email'];\n\t\t$device = $row['device'];\n\t\t$fname = $row['fname'];\n\t\t$lname = $row['lname'];\n\t\t$gSQL = 'CALL getOrgByKey('.sql_escape_string($client_key,1).');';\n\t\t//echo $gSQL;\n\t\t//echo '<br>';\n\n\t\t$gResult = execute_query($mysqli, $gSQL);\n\t\t$group_code = $gResult[0]->fetch_array()[0];\n\t\t//echo $group_code;\n\t\t//echo '<br>';\n\n\t\t//send to Socks\n\t\t$sMail = getSocksMailer();\n\t\t$sMail->Subject = \"Litesprite User Completed Onboarding\";\n\t\t$sMail->Body = \"client key: \".$client_key.\"<br>\n\t\t\t\t\t\tgroup: \".$group_code.\"<br>\n\t\t\t\t\t\tCodes and Instructions have been sent to: \".$email.\"<br> \n\t\t\t\t\t\tDevice: \".(($device == 'A') ?'Android':'iOS').\"<br> \n\t\t\t\t\t\tDevice email: \".$device_email.\"<br>\n\t\t\t\t\t\tLast name: \".$lname.\"<br>\n\t\t\t\t\t\tFirst name:\".$fname;\n\t\t//echo $sMail->Body;\n\t\t//echo '<br>';\n\t\t$sMail->AddAddress(\"[email protected]\");\n\t\tsendMail($sMail);\n\t\t//send to User\n\t\t$uMail = getSocksMailer();\n\t\t$uMail->Subject = \"Litesprite Beta Sign-Up Completed!\";\n\t\t$uMail->AddEmbeddedImage('../images/paw.png', 'paw');\n\t\t$uMail->Body = $final1.$group_code.$final2.$client_key.$final3.$device_email.$final4;\n\t\t//echo $uMail->Body;\n\t\t$uMail->AddAddress($email);\n\t\tsendMail($uMail);\n\t}\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 storeEmail(Request $request)\n {\n if (!Sentinel::hasAccess('communication.create')) {\n Flash::warning(\"Permission Denied\");\n return redirect('/');\n }\n $body = \"\";\n $recipients = 1;\n if ($request->send_to == 0) {\n foreach (Borrower::all() as $borrower) {\n $body = $request->message;\n//lets build and replace available tags\n $body = str_replace('{borrowerTitle}', $borrower->title, $body);\n $body = str_replace('{borrowerFirstName}', $borrower->first_name, $body);\n $body = str_replace('{borrowerLastName}', $borrower->last_name, $body);\n $body = str_replace('{borrowerAddress}', $borrower->address, $body);\n $body = str_replace('{borrowerMobile}', $borrower->mobile, $body);\n $body = str_replace('{borrowerEmail}', $borrower->email, $body);\n $body = str_replace('{borrowerTotalLoansDue}',\n round(GeneralHelper::borrower_loans_total_due($borrower->id), 2), $body);\n $body = str_replace('{borrowerTotalLoansBalance}',\n round((GeneralHelper::borrower_loans_total_due($borrower->id) - GeneralHelper::borrower_loans_total_paid($borrower->id)),\n 2), $body);\n $body = str_replace('{borrowerTotalLoansPaid}', GeneralHelper::borrower_loans_total_paid($borrower->id),\n $body);\n $email = $borrower->email;\n if (!empty($email)) {\n Mail::raw($body, function ($message) use ($request, $borrower, $email) {\n $message->from(Setting::where('setting_key', 'company_email')->first()->setting_value,\n Setting::where('setting_key', 'company_name')->first()->setting_value);\n $message->to($email);\n $headers = $message->getHeaders();\n $message->setContentType('text/html');\n $message->setSubject($request->subject);\n\n });\n\n }\n $recipients = $recipients + 1;\n }\n $mail = new Email();\n $mail->user_id = Sentinel::getUser()->id;\n $mail->message = $body;\n $mail->subject = $request->subject;\n $mail->branch_id = session('branch_id');;\n $mail->recipients = $recipients;\n $mail->send_to = 'All Borrowers';\n $mail->save();\n GeneralHelper::audit_trail(\"Send email to all borrowers\");\n Flash::success(\"Email successfully sent\");\n return redirect('communication/email');\n } else {\n $body = $request->message;\n $borrower = Borrower::find($request->send_to);\n //lets build and replace available tags\n $body = str_replace('{borrowerTitle}', $borrower->title, $body);\n $body = str_replace('{borrowerFirstName}', $borrower->first_name, $body);\n $body = str_replace('{borrowerLastName}', $borrower->last_name, $body);\n $body = str_replace('{borrowerAddress}', $borrower->address, $body);\n $body = str_replace('{borrowerMobile}', $borrower->mobile, $body);\n $body = str_replace('{borrowerEmail}', $borrower->email, $body);\n $body = str_replace('{borrowerTotalLoansDue}',\n round(GeneralHelper::borrower_loans_total_due($borrower->id), 2), $body);\n $body = str_replace('{borrowerTotalLoansBalance}',\n round((GeneralHelper::borrower_loans_total_due($borrower->id) - GeneralHelper::borrower_loans_total_paid($borrower->id)),\n 2), $body);\n $body = str_replace('{borrowerTotalLoansPaid}', GeneralHelper::borrower_loans_total_paid($borrower->id),\n $body);\n $email = $borrower->email;\n if (!empty($email)) {\n Mail::raw($body, function ($message) use ($request, $borrower, $email) {\n $message->from(Setting::where('setting_key', 'company_email')->first()->setting_value,\n Setting::where('setting_key', 'company_name')->first()->setting_value);\n $message->to($email);\n $headers = $message->getHeaders();\n $message->setContentType('text/html');\n $message->setSubject($request->subject);\n\n });\n $mail = new Email();\n $mail->user_id = Sentinel::getUser()->id;\n $mail->message = $body;\n $mail->subject = $request->subject;\n $mail->branch_id = session('branch_id');;\n $mail->recipients = $recipients;\n $mail->send_to = $borrower->first_name . ' ' . $borrower->last_name . '(' . $borrower->unique_number . ')';\n $mail->save();\n GeneralHelper::audit_trail(\"Sent email to borrower \");\n Flash::success(\"Email successfully sent\");\n return redirect('communication/email');\n }\n\n }\n Flash::success(\"Email successfully sent\");\n return redirect('communication/email');\n }",
"function aform($setup,$subject,$to,$cc,$bcc,$from) {\n\t\t\n\t\tif (isset($_POST[\"Submit\"])) {\n\t\t\t\n\t\t\t// Compile all POST info\n\t\t\tforeach ($_POST as $key => $value) {\n\t\t\t\t$$key = $value;\t\t\t\t\t\t\t\t\n\t\t\t\tif ($key != \"require\" && $key != \"Submit\" && $key != \"verify\" && $key != \"birthday\") {\n\t\t\t\t\t$message .= \"<span style='text-transform: capitalize; font-weight: 700;'>\".$key.\"</span> \".$value.\"<br /><br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If \"Verify\" is set, then check to see if correct\n\t\t\tif ($birthday != \"\") {\n\t\t\t\tif ($birthday != $verify) {\n\t\t\t\t\t$error .= \"Invalid Verification Code<br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check for \"required\" fields\n\t\t\tif ($require != \"\") {\n\t\t\t\t$dcheck = explode(\",\", $require);\n\t\t\t\t\n\t\t\t\twhile(list($check) = each($dcheck)) {\n\t\t\t\t\tif(!$$dcheck[$check]) {\n\t\t\t\t\t\t$error .= \"The <b>$dcheck[$check]</b> field is required.<br />\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Check the Email Address\n\t\t\t$checkEmail = validEmail($_POST[\"email\"]);\n\t\t\tif ($checkEmail != \"1\") {\n\t\t\t\t$error .= \"Your email is not valid. Please correct.<br />\";\n\t\t\t}\n\t\t\t\n\t\t}\t\n\t\n\n\t\t/* Let's start by building the form */\n\t\t$form .= '\n\t\t<form method=\"post\" enctype=\"multipart/form-data\" class=\"form\">';\n\t\t$form .= \"\\n\";\n\t\t\t\t\t\t\t\t\n\t\t// let's loop the PIPES \"|\" and breakdown the UNDERSCORES \"_\" then use this data to build the form\n\t\t\t\t\t\n\t\t$formchunk = explode(\"|\", $setup);\n\t\t\t\t\t\n\t\tforeach ($formchunk as $key => $value) {\n\t\t\t$entrychunk = explode(\"_\", $value);\n\t\t\t$formalname = $entrychunk[0];\n\t\t\t$name = $entrychunk[1];\n\t\t\t$type = $entrychunk[2];\n\t\t\t\n\t\t\tif ($entrychunk[3] == \"required\") {\n\t\t\t\t$required = $entrychunk[3]; // this is an optional field for making it REQUIRED and may not be set\n\t\t\t\t$values = $entrychunk[4]; // this is an optional field for the VALUE and may not be set (most commonly used for \"select\" and \"radio\"\n\t\t\t} else {\n\t\t\t\t$values = $entrychunk[3]; // this is an optional field for the VALUE and may not be set (most commonly used for \"select\" and \"radio\"\n\t\t\t\t$required = $entrychunk[4]; // this is an optional field for making it REQUIRED and may not be set\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$form .= '\t\t\t\t\t\t<div>\n\t\t\t<label>'.$formalname.'</label>';\n\t\t\t$form .= \"\\n\";\n\t\t\tif ($_POST[$name]) {\n\t\t\t\t$valueDisplay = $_POST[$name];\n\t\t\t} else {\n\t\t\t\t$valueDisplay = $values;\n\t\t\t}\n\t\t\t\n\t\t\tswitch ($type) {\n\t\t\t\tcase \"text\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"'.$name.'\" type=\"text\" class=\"text\" id=\"'.$name.'\" value=\"'.$valueDisplay.'\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"password\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"'.$name.'\" type=\"password\" class=\"text\" id=\"'.$name.'\" value=\"'.$valueDisplay.'\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak; \n\t\t\t\tcase \"radio\":\n\t\t\t\t\t$form .= '<div class=\"radios\">';\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" checked\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"radio\" name=\"'.$name.'\" value=\"'.$subvalue.'\" class=\"text radio\"'.$active.'> '.$subvalue.'<br />';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= \"</div>\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"checkbox\":\n\t\t\t\t\t$form .= '<div class=\"radios\">';\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" checked\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"'.$name.'\" value=\"'.$subvalue.'\" class=\"text radio\"'.$active.'> '.$subvalue.'<br />';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= \"</div>\";\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase \"select\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<select name=\"'.$name.'\" class=\"text select\">';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t\t<option value=\"\"></option>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t$valuechunk = explode(\"-\", $values);\n\t\t\t\t\tforeach ($valuechunk as $keey => $subvalue) {\n\t\t\t\t\t\tif ($subvalue == $valueDisplay) { $active = \" selected\"; }\n\t\t\t\t\t\t$form .= '\t\t\t\t\t\t\t\t<option value=\"'.$subvalue.'\"'.$active.'>'.$subvalue.'</option>';\n\t\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\t\t$active = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t</select>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"textarea\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<textarea name=\"'.$name.'\" class=\"text textarea\" id=\"'.$name.'\">'.$valueDisplay.'</textarea>';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"file\":\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input name=\"file\" class=\"text\" id=\"'.$name.'\" type=\"file\" />';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"verify\":\n\t\t\t\t\t$verification = rand(1111, 9999);\n\t\t\t\t\t$form .= '\t\t\t\t\t\t\t<input type=\"hidden\" value=\"'.$verification.'\" name=\"birthday\" />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"verifytext\">'.$verification.'</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" value=\"\" name=\"verify\" class=\"text verify\" />';\n\t\t\t\t\t$form .= \"\\n\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t\t$form .= '\t\t \t\t\t\t\t<div class=\"clear\"></div>';\n\t\t\t$form .= \"\\n\";\n\t\t\t$form .= '\t\t\t\t\t\t</div>';\n\t\t\t$form .= \"\\n\";\n\t\t\t$form .= \"\\n\";\n\t\t\t\t\n\t\t\tif ($required != \"\") {\n\t\t\t\t$requireding = $name;\n\t\t\t\tif ($req != \"\") {\n\t\t\t\t\t$req .= ','.$requireding;\n\t\t\t\t} else {\n\t\t\t\t\t$req .= $requireding;\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\t\n\t\t$form .= '\n\t\t<div>\n\t\t\t<label><input type=\"hidden\" name=\"require\" value=\"'.$req.'\" /> </label>\n\t\t\t<input type=\"submit\" name=\"Submit\" value=\"Submit\" class=\"submit\">\n\t\t\t<div class=\"clear\"></div>\n\t\t</div>\n\t\t</form>';\n\n\t\t\n\t\tif (isset($_POST[\"Submit\"])) {\n\n\n\t\t\tif ($_FILES['file']['tmp_name'] != \"\") {\n\n\t\t\t\t/* Attachment */\n\t\t\t\t$uploadto = $GLOBALS[\"uploadfolder\"];\n\t\t\t\t$docroot = $GLOBALS[\"documentroot\"];\n\t\t\t\t\n\t\t\t\t// Check Entension\n\t\t\t\t$extension = pathinfo($_FILES['file']['name']);\n\t\t\t\t$extension = $extension[extension];\n\t\t\t\t$allowed_paths = explode(\", \", $GLOBALS[\"allowed_ext\"]);\t\t\t\t\t\t\n\t\t\t\tfor($i = 0; $i < count($allowed_paths); $i++) {\n\t\t\t\t\tif ($allowed_paths[$i] == \"$extension\") {\n\t\t\t\t\t\t$ok = \"1\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// Check File Size\n\t\t\t\tif ($ok == \"1\") {\n\t\t\t\t\tif($_FILES['file']['size'] > $GLOBALS[\"max_size\"]) {\n\t\t\t\t\t\t$error .= \"File size is too big!<br />\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ok = \"2\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\n\t\t\tif($error != \"\") {\n\t\t\t\t$fullmessage .= \"<p>\".$error.\"</p>\";\n\t\t\t\t$fullmessage .= $form;\n\t\t\t\treturn $fullmessage;\n\t\t\t} else { \n\t\t\t\t//success!\n\t\t\t\t\n\t\t\t\tif ($_FILES['file']['tmp_name'] == \"\") {\n\t\t\t\t\t/* No Attachment */\n\t\t\t\t\t$send_to = $to;\n\t\t\t\t\t$send_cc = $cc;\n\t\t\t\t\t$send_bcc = $bcc;\n\t\t\t\t\t$send_from = $from;\n\t\t\t\t\t$send_subject = $subject;\n\t\t\t\t\t$message .= \"IP Address: \".$_SERVER['REMOTE_ADDR']; \n\t\t\t\t\tamail($send_to,$send_cc,$send_bcc,$send_from,$send_subject,$message);\t\n\t\t\t\t\treturn \"<p>\".$GLOBALS[\"success\"].\"</p>\";\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\tif ($ok == \"2\") {\n\t\t\t\t\t\t@move_uploaded_file($_FILES['file']['tmp_name'], $uploadto.$_FILES['file']['name']);\n\t\t\t\t\t\t// how to use\n\t\t\t\t\t\t$my_file = $_FILES['file']['name'];\n\t\t\t\t\t\t$my_path = $doc.$uploadto;\n\t\t\t\t\t\t$my_name = $from;\n\t\t\t\t\t\t$my_mail = $from;\n\t\t\t\t\t\t$send_cc = $cc;\n\t\t\t\t\t\t$send_bcc = $bcc;\n\t\t\t\t\t\t$my_replyto = $from;\n\t\t\t\t\t\t$my_to = $to;\n\t\t\t\t\t\t$my_subject = $subject;\n\t\t\t\t\t\t$message .= \" IP Address: \".$_SERVER['REMOTE_ADDR'];\n\t\t\t\t\t\tmail_attachment($my_file, $my_path, $my_to, $my_mail, $my_name, $my_replyto, $my_subject, $message, $cc, $bcc);\t\t\t\t\t\t\t\n\t\t\t\t\t\treturn \"<p>\".$GLOBALS[\"success\"].\"</p>\";\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t} else {\n\t\t\treturn $form;\n\t\t}\n\t}",
"function elastic_email_send_test($form, &$form_state) {\n $site_mail = variable_get('site_mail', NULL);\n\n $form['elastic_email_test_email_to'] = array(\n '#type' => 'textfield',\n '#size' => 40,\n '#title' => t('Email address to send a test email to'),\n '#description' => t('Enter the email address that you would like to send a test email to.'),\n '#required' => TRUE,\n '#default_value' => $site_mail,\n );\n\n $form['elastic_email_test_email_subject'] = array(\n '#type' => 'textfield',\n '#size' => 100,\n '#title' => t('Test Email Subject'),\n '#description' => t('Enter the subject that you would like to send with the test email.'),\n '#required' => TRUE,\n '#default_value' => t('Elastic Email module: configuration test email'),\n );\n\n $text_body = t('This is a test of the Drupal Elastic Email module configuration.')\n . \"\\n\\n\"\n . t('Message generated: !time',\n array('!time' => format_date(REQUEST_TIME, 'custom', 'r')));\n\n $form['elastic_email_test_email_body'] = array(\n '#type' => 'textarea',\n //'#size' => 8,\n '#title' => t('Test email body contents'),\n '#description' => t('Enter the email body that you would like to send.'),\n '#default_value' => $text_body,\n );\n\n $form['elastic_email_test_email_html'] = array(\n '#type' => 'checkbox',\n '#title' => t('Send as HTML?'),\n '#description' => t('Check this to send a test email as HTML.'),\n '#default_value' => FALSE,\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => 'Submit',\n );\n\n return $form;\n}",
"public function send() {\n\t\t\t$emailer = SimpleMail::make()\n\t\t\t->setSubject($this->subject)\n\t\t\t->setMessage($this->body);\n\t\t\t\n\t\t\tforeach ($this->emailto as $contact) {\n\t\t\t\t$emailer->setTo($contact->email, $contact->name);\n\t\t\t}\n\t\t\t\n\t\t\t$emailer->setFrom($this->emailfrom->email, $this->emailfrom->name);\n\t\t\t$emailer->setReplyTo($this->replyto->email, $this->replyto->name);\n\t\t\t\n\t\t\tif ($this->selfbcc) {\n\t\t\t\t$this->add_bcc($this->replyto);\n\t\t\t}\n\t\t\t\n\t\t\t// setBcc allows setting from Array\n\t\t\tif (!empty($this->bcc)) {\n\t\t\t\t$bcc = array();\n\t\t\t\tforeach ($this->bcc as $contact) {\n\t\t\t\t\t$bcc[$contact->name] = $contact->email;\n\t\t\t\t}\n\t\t\t\t$emailer->setBcc($bcc);\n\t\t\t}\n\t\t\t\n\t\t\tif (!empty($this->cc)) {\n\t\t\t\t$cc = array();\n\t\t\t\tforeach ($this->cc as $contact) {\n\t\t\t\t\t$cc[$contact->name] = $contact->email;\n\t\t\t\t}\n\t\t\t\t$emailer->setCc($cc);\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->hasfile) {\n\t\t\t\tforeach($this->files as $file) {\n\t\t\t\t\t$emailer->addAttachment($file);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn $emailer->send();\n\t\t}",
"function do_contact_client_email_all($adata, $aret_flag=0) {\n\t# Dim Some Vars\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\t\t$DesiredGroup\t= 0;\n\t\t$DesiredServer\t= 0;\n\t\t$DesiredAlias\t= 0;\n\t\t$DesiredClient\t= 0;\n\t\t$_ret_msg\t\t= '';\n\n\t# Check if we are sending to a group instead of all clients\n\t\t$pos = strpos(strtolower($adata['cc_cl_id']), 'group');\n\t\tIF ($pos !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_cl_id']);\n\t\t\t$DesiredGroup = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to a server instead of all clients\n\t\t$pos2 = strpos(strtolower($adata['cc_cl_id']), 'server');\n\t\tIF ($pos2 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_cl_id']);\n\t\t\t$DesiredServer = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to an alias for a client\n\t\t$pos3 = strpos(strtolower($adata['cc_cl_id']), 'alias');\n\t\tIF ($pos3 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_cl_id']);\n\t\t\t$DesiredAlias = $pieces[1];\n\t\t}\n\n\t# Check if we are sending to all contacts for a client\n\t\t$pos3 = strpos(strtolower($adata['cc_cl_id']), 'contacts');\n\t\tIF ($pos3 !== false) {\n\t\t\t$pieces = explode('|', $adata['cc_cl_id']);\n\t\t\t$DesiredClient = $pieces[1];\n\t\t}\n\n\t# Get site contact information array\n\t\t$_mcinfo\t= get_contact_info($adata['cc_mc_id']);\n\n\t# Set Query for select\n\t\t$query\t= 'SELECT ';\n\n\t\tIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_name_last';\n\t\t} ELSEIF ($DesiredClient) {\n\t\t\t$query .= $_DBCFG['clients'].'.cl_email, ';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_name_first, ';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_name_last, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_email, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_name_first, ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_name_last';\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['clients'].'.cl_email, ';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_name_first, ';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_name_last';\n\t\t}\n\t\tIF ($DesiredGroup) {$query .= ', '.$_DBCFG['clients'].'.cl_groups';}\n\t\t$query .= ' FROM ';\n\n\t\tIF ($DesiredServer) {\n\t\t\t$query .= $_DBCFG['clients'].', '.$_DBCFG['domains'];\n\t\t\t$query .= ' WHERE (('.$_DBCFG['domains'].'.dom_si_id='.$DesiredServer.' AND ';\n\t\t\t$query .= $_DBCFG['domains'].'.dom_cl_id='.$_DBCFG['clients'].'.cl_id)';\n\n\t\t} ELSEIF ($DesiredGroup) {\n\t\t\t$query .= $_DBCFG['clients'];\n\t\t\t$query .= ' WHERE (('.$_DBCFG['clients'].'.cl_groups <> 0)';\n\n\t\t} ELSEIF ($DesiredAlias) {\n\t\t\t$query .= $_DBCFG['clients_contacts'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['clients_contacts'].'.contacts_id='.$DesiredAlias.')';\n\n\t\t} ELSEIF ($DesiredClient) {\n\t\t\t$query .= $_DBCFG['clients'].', '.$_DBCFG['clients_contacts'];\n\t\t\t$query .= ' WHERE (';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_id='.$DesiredClient.' OR (';\n\t\t\t$query .= $_DBCFG['clients'].'.cl_id='.$_DBCFG['clients_contacts'].'.contacts_cl_id AND ';\n\t\t\t$query .= $_DBCFG['clients_contacts'].'.contacts_cl_id='.$DesiredClient.')';\n\t\t\t$query .= ')';\n\n\t\t} ELSEIF ($adata['cc_cl_id'] == '-1') {\n\t\t\t$query .= $_DBCFG['clients'];\n\t\t\t$query .= \" WHERE cl_status='active' OR cl_status='\".$db_coin->db_sanitize_data($_CCFG['CL_STATUS'][1]).\"'\";\n\n\t\t} ELSE {\n\t\t\t$query .= $_DBCFG['clients'];\n\t\t\t$query .= ' WHERE ('.$_DBCFG['clients'].'.cl_id='.$adata['cc_cl_id'].')';\n\t\t}\n\n\t\tIF ($DesiredServer || $DesiredGroup) {\n\t\t\t$query\t.= ' AND ('.$_DBCFG['clients'].\".cl_status='active'\";\n\t\t\t$query\t.= ' OR '.$_DBCFG['clients'].\".cl_status='\".$db_coin->db_sanitize_data($_CCFG['CL_STATUS'][1]).\"'))\";\n\t\t}\n\n\t# Do select\n\t\t$result\t\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t\t= $db_coin->db_query_numrows($result);\n\t\t$_emails_sent\t= 0;\n\t\t$_emails_error\t= 0;\n\t\t$_sento\t\t= '';\n\n\t# Process query results\n\t\twhile($row = $db_coin->db_fetch_array($result)) {\n\n\t\t# ONLY clients in specified group, OR All clients if group not specified\n\t\t\tIF (!$DesiredGroup || ($DesiredGroup && Check_User_Group($DesiredGroup, $row['cl_groups']))) {\n\t\t\t# Loop all clients and send email\n\t\t\t# Set eMail Parameters (pre-eval template, some used in template)\n\t\t\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n \t\t\t\t\t$mail['recip']\t\t= $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email'];\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_email'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['recip']\t\t= $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['cl_name_first'];\n\t\t\t\t\t$mail['recip']\t\t.= ' ';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['cl_name_last'];\n\t\t\t\t\t$mail['recip']\t\t.= ' <';\n\t\t\t\t\t$mail['recip']\t\t.= $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email'];\n\t\t\t\t\t$mail['recip']\t\t.= '>';\n\t\t\t\t\t$mail['from']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\t\t\t\t}\n\t\t\t\t#\t$mail['cc']\t\t= $_mcinfo['c_name'].' <'.$_mcinfo['c_email'].'>';\n\n\t\t\t\tIF ($_CCFG['MAIL_USE_CUSTOM_SUBJECT']) {\n\t\t\t\t\t$mail['subject']\t= $adata['cc_subj'];\n\t\t\t\t} ELSE {\n\t\t\t\t\t$mail['subject']\t= $_CCFG['_PKG_NAME_SHORT'].$_LANG['_MAIL']['CC_FORM_SUBJECT_PRE'];\n\t\t\t\t}\n\n\t\t\t# Set MTP (Mail Template Parameters) array\n\t\t\t\t$_MTP['to_name']\t = $row['contacts_name_first'] ? $row['contacts_name_first'] : $row['cl_name_first'];\n\t\t\t\t$_MTP['to_name']\t.= ' ';\n\t\t\t\t$_MTP['to_name']\t.= $row['contacts_name_last'] ? $row['contacts_name_last'] : $row['cl_name_last'];\n\t\t\t\t$_MTP['to_email']\t = $row['contacts_email'] ? $row['contacts_email'] : $row['cl_email'];\n\t\t\t\t$_MTP['from_name']\t = $_mcinfo['c_name'];\n\t\t\t\t$_MTP['from_email']\t = $_mcinfo['c_email'];\n\t\t\t\t$_MTP['subject']\t = $adata['cc_subj'];\n\t\t\t\t$_MTP['message']\t = $adata['cc_msg'];\n\t\t\t\t$_MTP['site']\t\t = $_CCFG['_PKG_NAME_SHORT'];\n\n\t\t\t# Load message template (processed)\n\t\t\t\t$mail['message']\t= get_mail_template('email_contact_client_form', $_MTP);\n\n\t\t\t# Call basic email function (ret=1 on error)\n\t\t\t\t$_ret = do_mail_basic($mail);\n\n\t\t\t# Show what was sent\n\t\t\t\t$_sento .= htmlspecialchars($mail['recip']).'<br>';\n\n\t\t\t# Check return\n\t\t\t\tIF ($_ret) {$_emails_error++;} ELSE {$_emails_sent++;}\n\t\t\t}\n\t\t}\n\n\t# Build Title String, Content String, and Footer Menu String\n\t\t$_tstr = $_LANG['_MAIL']['CC_FORM_RESULT_TITLE'];\n\n\t\t$_cstr .= '<center>'.$_nl;\n\t\t$_cstr .= '<table cellpadding=\"5\">'.$_nl;\n\t\t$_cstr .= '<tr><td class=\"TP5MED_NL\">'.$_nl;\n\t\tIF ($_emails_error) {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_02_L1'];\n\t\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['CC_FORM_MSG_02_L2'];\n\t\t} ELSE {\n\t\t\t$_cstr .= $_LANG['_MAIL']['CC_FORM_MSG_04_L1'];\n\t\t}\n\t\t$_cstr .= '<br>'.$_LANG['_MAIL']['total'].':'.$_sp.$_emails_sent.$_sp.$_LANG['_MAIL']['sent'];\n\t\t$_cstr .= '<br><br>'.$_sento;\n\t\t$_cstr .= '</td></tr>'.$_nl;\n\t\t$_cstr .= '</table>'.$_nl;\n\t\t$_cstr .= '</center>'.$_nl;\n\n\t\t$_mstr_flag\t= 0;\n\t\t$_mstr\t\t= ' '.$_nl;\n\n\t# Call block it function\n\t\t$_out .= do_mod_block_it($_tstr, $_cstr, $_mstr_flag, $_mstr, '1');\n\t\t$_out .= '<br>'.$_nl;\n\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}",
"function og_simplenews_manager_save_emails($form, &$form_state) {\n foreach ($form_state['values']['newsletters'] as $tid => $values) {\n if ($tid && is_numeric($tid)) {\n og_simplenews_save_subscriptions($tid, $values['emails']);\n }\n }\n}",
"public function contactUs($full_name,$email,$phone,$subject,$message,$site_email)\n\t{\n\t\t$full_name = $this->secureInput($full_name);\n\t\t$email = $this->secureInput($email);\n\t\t$phone = $this->secureInput($phone);\n\t\t$subject = $this->secureInput($subject);\n\t\t$message = $this->secureInput($message);\n\t\t$site_email = $this->secureInput($site_email);\n\n\t\t$contact_date = date(\"l, M j, Y, g:i a\");\n\n\t\t$sql = \"INSERT INTO contact_us ( full_name, email, phone, subject, message, reply,contact_date)\n VALUES ('\".$full_name.\"','\".$email.\"','\".$phone.\"', '\".$subject.\"','\".$message.\"','','\".$contact_date.\"')\";\n\t\t$res = $this->processSql($sql);\n\t\tif($res){\n\t\t\t//build email to be sent\n\t\t\t$to = $site_email;\n\t\t\t$subject = \"New message from \".$email;\n\n\t\t\t$admin_message = \"\n\t\t\t<html>\n\t\t\t<head>\n\t\t\t<title>New message from\".$full_name.\"</title>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t<h3>Query / Comment</h3>\n\t\t\t<p>Hello Site Admin, \".$full_name.\" has sent a query/message. It is as below:</p>\n\t\t\t<p>\".$message.\"</p>\n\t\t\t</body>\n\t\t\t</html>\n\t\t\t\";\n\n\t\t\t// To send HTML mail, the Content-type header must be set\n\t\t\t$headers = \"MIME-Version: 1.0\\r\\n\";\n\t\t\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n\t\t\t$headers .= \"From: '\".$full_name.\"'<\".$email.\">\" . \"\\r\\n\";//Modified By GENTLE to show the FROM in the message\n\n\t\t\t$mail_send = mail($to, $subject, $admin_message, $headers );\n\t\t\tif ($mail_send):\n\t\t\treturn 99;\n else:\n return 2;\n endif;\n\t\t\t}else{\n\t\t\treturn 1;\n\t\t}\n\t}",
"function dsf_send_sagepay_mail($savedorder, $address_confirmations=''){\nglobal $basket, $customer_id, $payment, $currencies;\n\n\t\t\t\t\t$good_mail_id = '3';\n\t\t\t\t\t$bad_mail_id = '6';\n\n\n\t\t\t\t\tif ($address_confirmations == 'OK'){ // status OK and addresses OK\n\t\t\t\t\t\t\n\t\t\t\t\t\t$email_query = dsf_db_query(\"select subject, details from \". DS_DB_SHOP . \".email_templates where id ='\" . $good_mail_id .\"'\");\n\t\t\t\t\t }elseif (MODULE_PAYMENT_PROTXCC_CHECK_ADDRESS == 'false'){\n\t\t\t\t\t\t$email_query = dsf_db_query(\"select subject, details from \". DS_DB_SHOP . \".email_templates where id ='\" . $good_mail_id .\"'\");\n\t\t\t\t\t}elseif ($address_confirmations == 'ALLOW'){ // status OK Adress failed under threshold.\n\t\t\t\t\t\t$email_query = dsf_db_query(\"select subject, details from \". DS_DB_SHOP . \".email_templates where id ='\" . $good_mail_id .\"'\");\n\t\t\t\t\t }else{\n\t\t\t\t\t $email_query = dsf_db_query(\"select subject, details from \". DS_DB_SHOP . \".email_templates where id ='\" . $bad_mail_id .\"'\");\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\n// lets start with the email confirmation\n\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t$email_details = dsf_db_fetch_array($email_query);\n\t\t\t\t\t\t\t\t\t\t$signature_query = dsf_db_query(\"select subject, details from \". DS_DB_SHOP . \".email_templates where id ='1'\");\n\t\t\t\t\t\t\t\t\t $signature_details = dsf_db_fetch_array($signature_query);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t $email_subject = $email_details['subject'];\n\t\t\t\t\t\t\t\t\t $email_footer = $signature_details['details'];\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// overwrite subject as per Christian emails 2011-09-28\n\t\t\t\t\t\t\t\t\t $email_subject = TRANSLATION_EMAIL_YOUR_ORDER . ' ' . SAP_ORDER_PREFIX . $savedorder->info['id'];\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// plain text;\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 $email_order = TRANSLATION_WORD_DEAR . ' ' . $savedorder->customer['name'] . \"\\n\\n\" . $email_details['details'] . \"\\n\";\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t// get products ordered by doing email function.\n\t\t\t\t\t\t\t\t\t $products_ordered = dsf_order_email_items($savedorder, 'true');\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t $email_order .= $products_ordered['plain'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t $email_order .= \"\\n\" .EMAIL_SEPARATOR .\"\\n\" . $email_footer;\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t \t\t// html\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t $html_order = TRANSLATION_WORD_DEAR . ' ' . $savedorder->customer['name'] . \"<br /><br />\";\n\t\t\t\t\t\t\t\t\t $html_order .= $email_details['details'] . \"<br /><br />\";\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t $html_order .= $products_ordered['html'] . '<br /><br />';\n\t\t\t\t\t\t\t\t\t $html_order .= $email_footer;\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t $email_order = str_replace(\"[ORDER_NUMBER]\" , SAP_ORDER_PREFIX . $savedorder->info['id'], $email_order);\n\t\t\t\t\t\t\t\t\t $html_order = str_replace(\"[ORDER_NUMBER]\" , SAP_ORDER_PREFIX . $savedorder->info['id'], $html_order);\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t\t // end of email.\n\t\t\t\t\t\t \n\n\n \n\t\t\t\t\t dsf_send_email($savedorder->customer['name'], $savedorder->customer['email_address'], $email_subject, $email_order, STORE_OWNER, EMAIL_FROM,$html_order);\n\t\t\t\t\t\n\t\t\t\t\t// send emails to other people\n\t\t\t\t\t if (SEND_EXTRA_ORDER_EMAILS_TO != '') {\n\t\t\t\t\t\tdsf_send_email(STORE_OWNER, SEND_EXTRA_ORDER_EMAILS_TO, $email_subject, $email_order, STORE_OWNER, EMAIL_FROM,$html_order);\n\t\t\t\t\t }\n\n\n\t\t\t\t\t// send emails to other people\n\t\t\t\t\t if (SEND_EXTRA_ORDER_EMAILS_DUPLICATE != '') {\n\t\t\t\t\t\tdsf_send_email(STORE_OWNER, SEND_EXTRA_ORDER_EMAILS_DUPLICATE, $email_subject, $email_order, STORE_OWNER, EMAIL_FROM,$html_order);\n\t\t\t\t\t }\n\n\n\n\n\n// just for consistancy.\n\nreturn true;\n\n\n\n\n}",
"public function customer_signup($edata) {\n\t\t\t\t$details = email_template_detail(\"customerregister\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"supplierregister\");\n\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= $details[0]->temp_body;\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//sendsms($smsdetails[0]->temp_body, $edata['phone'], \"supplierregister\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($edata['email']);\n\t\t\t\t$this->email->subject($details[0]->temp_subject);\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}",
"function viaggio_deliver_mail() {\n\tif ( isset( $_POST['cf-submitted'] ) ) {\n\n\t\t// sanitize form values\n\t\t$name = sanitize_text_field( $_POST[\"cf-name\"] );\n\t\t$email = sanitize_email( $_POST[\"cf-email\"] );\n\t\t$subject = sanitize_text_field( $_POST[\"cf-subject\"] );\n\t\t$message = esc_textarea( $_POST[\"cf-message\"] );\n\n\t\t// get the blog administrator's email address\n\t\t$to = get_option( 'admin_email' );\n\n\t\t$headers = \"From: $name <$email>\" . \"\\r\\n\";\n\n\t\t// If email has been process for sending, display a success message\n\t\tif ( wp_mail( $to, $subject, $message, $headers ) ) {\n\t\t\techo '<div>';\n\t\t\techo '<p>'.esc_html__('Thanks for contacting me, expect a response soon.' , 'viaggio').'</p>';\n\t\t\techo '</div>';\n\t\t} else {\n\t\t\techo esc_html__('An unexpected error occurred.' , 'viaggio');\n\t\t}\n\t}\n}",
"public function sendsupportmail(){\r\n $mail_to = \"\";\r\n $fromaddress = \"[email protected]\";//\"[email protected]\"; \r\n $receipient_email = $_POST[\"receipient_email\"];\r\n $receipient_message = $_POST[\"receipient_message\"];\r\n $subject = $_POST[\"subject\"];\r\n $mail_to = (isset($_POST[\"mail_to\"]))?$_POST[\"mail_to\"]:\"\";\r\n\r\n if($mail_to ==\"acads\"){\r\n $subject = $_POST[\"subject\"].' --- '.$receipient_email;\r\n $toaddress = \"[email protected]\";//[email protected]\r\n $ccaddress = \"[email protected]\";//\"[email protected]\";\r\n $ccaddress .= \",[email protected]\";//\"[email protected]\";\r\n }else{\r\n $toaddress = \"[email protected]\";\r\n $ccaddress = \"\";//\"[email protected]\";\r\n }\r\n $mail_response = $this->sendemails($fromaddress,$toaddress,$receipient_email,$receipient_message,$subject,$ccaddress);\r\n echo $mail_response;\r\n }"
] | [
"0.74613565",
"0.69296294",
"0.6916703",
"0.68594646",
"0.685184",
"0.68464124",
"0.6802828",
"0.6683505",
"0.66206557",
"0.6617653",
"0.6585493",
"0.6537599",
"0.6530022",
"0.65039086",
"0.64881516",
"0.64756554",
"0.6453216",
"0.6409332",
"0.6399342",
"0.63982904",
"0.6395141",
"0.6361765",
"0.63423955",
"0.6303976",
"0.62627095",
"0.6259944",
"0.6257557",
"0.6248903",
"0.62474275",
"0.6217816",
"0.62131625",
"0.6193768",
"0.6186668",
"0.6181398",
"0.6170821",
"0.6167573",
"0.6151597",
"0.6139484",
"0.6137053",
"0.61365986",
"0.6131363",
"0.61263263",
"0.61241573",
"0.61210084",
"0.6117495",
"0.6111186",
"0.6093516",
"0.60834944",
"0.6082271",
"0.60742754",
"0.607415",
"0.60719675",
"0.6064481",
"0.6058432",
"0.60527414",
"0.6045485",
"0.60390633",
"0.60386014",
"0.6027659",
"0.6026226",
"0.60247016",
"0.6014856",
"0.59945303",
"0.599068",
"0.5985348",
"0.5979869",
"0.5972677",
"0.59672886",
"0.5966664",
"0.5965355",
"0.59582955",
"0.5952116",
"0.5944519",
"0.59437454",
"0.5939637",
"0.5935983",
"0.59349316",
"0.5934198",
"0.5932264",
"0.5931816",
"0.5920578",
"0.5917446",
"0.5911537",
"0.59070194",
"0.58967304",
"0.58932364",
"0.5892241",
"0.58828944",
"0.58776677",
"0.5876698",
"0.5871161",
"0.5862715",
"0.58593094",
"0.584983",
"0.58448905",
"0.58420444",
"0.5839293",
"0.5838627",
"0.58360875",
"0.583325"
] | 0.6948771 | 1 |
Get a particular value back from the config array | public static function get($index)
{
return self::getInstance()->dotNotation->get($index);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function getValue($name) {\r\n if (isset(self::$config[$name])) \r\n return self::$config[$name];\r\n else {\r\n return DB::getConfig($name);\r\n }\r\n }",
"public function get($key){\r\n\t\tif(key_exists($key, $this->config)){\r\n\t\t\treturn $this->config[$key];\r\n\t\t}\r\n\t\tdie('Index is out of range');\r\n\t}",
"public function get($key)\r\n {\r\n return $this->config[$key];\r\n }",
"public function value($name)\r\r\n\t{\r\r\n\t\t$path = explode(CPF_CONFIG_VALUES_SEPARATOR, $name);\r\r\n\r\r\n\t\t$temp = $GLOBALS[CPF_CONFIG_ARRAY];\r\r\n\t\t$value = NULL;\r\r\n\t\t\r\r\n\t\tforeach ($path as $key)\r\r\n\t\t{\r\r\n\t\t\tif (isset($temp[$key]))\r\r\n\t\t\t{\r\r\n\t\t\t\t$value = $temp[$key];\r\r\n\t\t\t}\t\t\t\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t \ttrigger_error(sprintf('Configuration value %s undefined', $name), E_USER_ERROR);\r\r\n\t\t\t\tbreak;\r\r\n\t\t\t}\r\r\n\t\t\t$temp = $temp[$key];\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\treturn $value;\r\r\n\t}",
"function getConfigValue($key) {\r\n\t\t$db = & JFactory::getDBO() ;\r\n\t\t$sql = 'SELECT config_value FROM #__osmembership_configs WHERE config_key=\"'.$key.'\"';\r\n\t\t$db->setQuery($sql) ;\t\t\r\n\t\treturn $db->loadResult();\r\n\t}",
"function get_config_value($config_name)\n\t{\n\t\tglobal $db, $table_prefix;\n\t\t$sql = \"SELECT config_value\n\t\t\t\t\t\tFROM \" . CONFIG_TABLE . \"\n\t\t\t\t\t\tWHERE config_name = '\" . $config_name . \"'\n\t\t\t\t\t\tLIMIT 1\";\n\t\tif (!($result = $db->sql_query($sql)))\n\t\t{\n\t\t\t$config_value = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$row = $db->sql_fetchrow($result);\n\t\t\t$config_value = !empty($row['config_value']) ? $row['config_value'] : '';\n\t\t}\n\t\treturn $config_value;\n\t}",
"function getConfigValue($name) {\n return UserConfigOptions::getValue($name, $this);\n }",
"private function getConfigValue($value){\n return $this->scopeConfigInterface->getValue('payment/jpay/' . $value);\n }",
"function config_item($index)\n{\n\tglobal $config;\n\treturn isset($config[$index])? $config[$index] : false;\n}",
"function getConfigValue( $path = '' )\n\t{\n\t\tif( $path == '' )\n\t\t\treturn\t$this->conf;\n\n\t\tif( strstr( $path, '*' ) )\n\t\t{\n\t\t\t$path\t\t=\tstr_replace( '.', '\\.', $path );\n\t\t\t$path\t\t=\t'^'.str_replace( '*', '.*', $path ).'$';\n\t\t\t$values\t\t=\tarray();\n\t\t\tforeach( $this->conf as $key => $value )\n\t\t\t{\n\t\t\t\tif( eregi( $path, $key ) )\n\t\t\t\t\t$values[$key]\t=\t$value;\n\t\t\t}\n\t\t\treturn\t$values;\n\t\t}\n\n\t\t//\tcheck wether a value of an array was requested\n\t\tif( $index\t= strrchr( $path, '[' ) )\n\t\t{\n\t\t\t$path\t\t=\tsubstr( $path, 0, strrpos( $path, '[' ) );\n\t\t\t$index\t\t=\tsubstr( $index, 1, ( strlen( $index ) - 2 ) );\n\t\t\t$tmp\t\t=\t$this->getConfigValue( $path );\n\n\t\t\treturn\t$tmp[$index];\n\t\t}\n\n\t\tif( isset( $this->conf[$path] ) )\n\t\t\treturn\t$this->conf[$path];\n\n\t\treturn\tfalse;\n\t}",
"public function getConfigValue($key)\n {\n return $this->config[$key];\n }",
"function getConfigValue($name) {\n return CompanyConfigOptions::getValue($name, $this);\n }",
"function configItem($key) {\n global $db;\n global $lang;\n\n if(configEnabled() == true) {\n $resp = $db->query(\"SELECT `val` FROM `\".$lang[\"config_db_name\"].\"`.`\".$lang[\"config_table_name\"].\"` WHERE `key` = '\".$key.\"' LIMIT 1\");\n if($resp) {\n if($resp->num_rows == 0) {\n return \"Unknown key\";\n } else {\n while($data = $resp->fetch_assoc()) {\n return $data[\"val\"];\n }\n }\n } else {\n return \"Unknown key\";\n }\n } else {\n return \"Not enabled\";\n }\n }",
"protected function get($name) {\n return $this->configuration->get($name);\n }",
"function sloodle_get_value($settings, $name, $default = null)\n {\n if (is_array($settings) && isset($settings[$name])) return $settings[$name];\n return $default;\n }",
"function my_config($index = '') \n\t{\t\n\t\tglobal $CI;\n\n\t\treturn $CI->my_config->item($index); \n\t}",
"function get_config_value($cfgset, $key, $defval)\n{\n if (array_key_exists($key, $cfgset)) {\n return $cfgset[$key];\n }\n else if ($defval !== null) {\n return $defval;\n }\n else {\n return null;\n }\n}",
"public function configOffsetGet($name)\n {\n return $this->settings[$name];\n }",
"public static function get($key)\n\t{\n\t\tif (is_array(self::$_CONF) AND array_key_exists($key, self::$_CONF))\n\t\t\treturn self::$_CONF[$key];\n\t\telseif($value = Db::getInstance()->getValue('SELECT `value` FROM `'.DB_PREFIX.'configuration` WHERE `name` = \\''.pSQL($key).'\\'')){\n\t\t\tself::$_CONF[$key] = $value;\n\t\t\treturn $value;\n\t\t}\n\t\treturn false;\n\t}",
"public static function get($path = null)\r\n\t{\r\n\t\tif($path)\r\n\t\t{\r\n\t\t\t$config = $GLOBALS['config'];\t\t//ARRAY NAME for configurations \r\n\t\t\t$path = explode('/', $path);\r\n\r\n\t\t\tforeach ($path as $bit) {\r\n\t\t\t\tif(isset($config[$bit]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$config = $config[$bit]; //To access to second level of config\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $config;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public function __get($name): mixed {\n if (isset($this->data[$name]))\n return $this->data[$name];\n\n trigger_error(\n __(\"Requested configuration setting not found.\"),\n E_USER_NOTICE\n );\n\n return null;\n }",
"function sloodle_get_config($name)\n {\n // If in debug mode, ensure the name is prefixed appropriately for Sloodle\n if (defined('SLOODLE_DEBUG') && SLOODLE_DEBUG) {\n if (substr_count($name, 'sloodle_') < 1) {\n exit (\"ERROR: sloodle_get_config(..) called with invalid value name \\\"$name\\\". Expected \\\"sloodle_\\\" prefix.\");\n }\n }\n // Use the Moodle config function, ignoring the plugin parameter\n $val = get_config(NULL, strtolower($name));\n // Older Moodle versions return a database record object instead of the value itself\n // Workaround:\n if (is_object($val)) return $val->value;\n return $val;\n\t}",
"public function getValue($key = NULL) {\n return isset($this->config[$key]) ? $this->config[$key] : NULL;\n }",
"function getConfig($key)\n{\n return $GLOBALS['config'][$key];\n}",
"public function get(String $name=\"\"){\n\t\tif(isset($this->config[$name])){\n\t\t\treturn $this->config[$name];\n\t\t}\n\t\t\n\t\t// We need to split anyway if successful and sizeof is cheaper than a string search\n\t\t$split = explode(\"\\\\\",$name);\n\t\tif(sizeof($split) > 1){\n\t\t\tif(isset($this->config[$split[0]]) && isset($this->config[$split[0]][$split[1]])){\n\t\t\t\treturn $this->config[$split[0]][$split[1]];\n\t\t\t}\n\t\t}\n\t\t\n\t\tthrow new \\Exception($name.\" could not be found in config.json\");\n\t}",
"function chevereto_config($config_key) {\n\tglobal $config;\n\treturn $config[$config_key];\n}",
"function getConfig($item) {\n if (array_key_exists($item, CONFIG)) return CONFIG[$item];\n if (array_key_exists($item, DEFAULTS)) return DEFAULTS[$item];\n}",
"public function getConfigValue($path)\n {\n // return store config value\n return $this->scopeConfig->getValue($path);\n }",
"function getConfigurationValue($key) {\r\n $value = '';\r\n $sqlConfiguration = xtc_db_query(\"SELECT * FROM configuration WHERE configuration_key='\".strtoupper($key).\"' LIMIT 1\");\r\n if(xtc_db_num_rows($sqlConfiguration)>0){\r\n $dataConfiguration = xtc_db_fetch_array($sqlConfiguration);\r\n $value = $dataConfiguration['configuration_value'];\r\n }\r\n return $value; \r\n }",
"public function __get($key)\n {\n if (is_object($this->config)) {\n $value = $this->config->where('key', $key)->first();\n\n return $value ? $value->value : null;\n }\n }",
"public static function get($key=null){\n\t\t $connection = MyActiveRecord::getDb();\n\t\t if(empty(self::$psconfig_values))\n\t\t {\n\t\t\t $query = \"SELECT name, value FROM \" . SITE_CONFIG;\n\t\t\t $rst = $connection->createCommand($query)->queryAll();\n\t\t\t foreach($rst as $v){\n\t\t\t\t self::$psconfig_values[$v['name']] = $v['value'];\n\t\t\t }\n\t\t }\n \t\treturn self::$psconfig_values[$key];\n\t\t}",
"public function get($value) {\n if (!empty($this->array[$value])) {\n return $this->array[$value];\n } else {\n return $value;\n }\n }",
"function _get_config_param($name)\r\n\t{\r\n\t\treturn $this->db->query(\"select value from m_config_params where name = ? \",$name)->row()->value;\r\n\t}",
"public function getValueOf($id) {\n\t\t$config = $this->em->getRepository('SSNTherapassBundle:Config')->find($id);\n\t\tif (is_null($config)) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $config->getValue();\n\t}",
"public function getConfigValue($path = '')\n {\n return $this->getConfigData()->_descend($this->configData, $path);\n }",
"public static function get($key)\n {\n return Arr::get(static::$config, $key);\n }",
"function getSettingValue($field_name=null){\r\n\t\tif($field_name==null) return array();\r\n\t\t$this->db->select(\"*\");\r\n\t\t$this->db->where(array('is_active'=>true));\r\n\t\t$recordSet = $this->db->get(TBL_MST_SETTINGS);\r\n\t\t$data=$recordSet->result() ;\r\n \t\tif(count($data)>0){\r\n\t\t\treturn $data[0]->$field_name;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function extractCurrentValue()\n {\n $pathParts = $this->getPathParts();\n return $this->findConfigPathValue($this->source ? $this->source : Yii::$app, $pathParts);\n }",
"function fetchConfigParameter($name){\n try {\n global $db_table_prefix;\n\n $results = array();\n\n $db = pdoConnect();\n\n $query = \"SELECT id, value\n\t\tFROM \".$db_table_prefix.\"configuration WHERE name = :name\";\n\n if (!$stmt = $db->prepare($query))\n return false;\n\n $sqlVars[\":name\"] = $name;\n\n if (!$stmt->execute($sqlVars)){\n // Error\n return false;\n }\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n if ($row)\n return $row['value'];\n else {\n addAlert(\"danger\", \"The specified configuration parameter could not be found.\");\n return false;\n }\n\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n }\n}",
"public function __get($key) {\n\t\treturn $this->config->{$key};\n\t}",
"public static function value($fullpath)\n\t{\n //println($fullpath);\n //$fullpath = join('/',explode('.',$fullpath));\n\t\t$sides = explode('/',$fullpath);\n\t\t$path = array_pop($sides);\n\t\t$ns = join('/',$sides);\n //println(\"$ns, $path\");\n\t\treturn Config::get($ns, $path);\n\t}",
"function getConfig($config)\n{ \n return config(\"system.$config\");\n}",
"private function _get_connector_config_value($config_name){\n try {\n /**\n * Get the resource model\n */\n $resource = Mage::getSingleton('core/resource');\n \n /**\n * Retrieve the write connection\n */\n $readConnection = $resource->getConnection('core_read');\n \n /**\n * Retrieve our table name\n */\n $table = $resource->getTableName('minematic_config');\n \n //Update register\n $query = \"SELECT value FROM \" . $table . \" WHERE name = '\"\n . $config_name .\"'\";\n \n //Execute the query\n $config_value = $readConnection->fetchOne($query);\n\n return $config_value ? $config_value : FALSE;\n \n } catch (Exception $e) {\n //Log Exception Message\n Mage::helper('connector')->logSyncProcess($e->getMessage(), \"DATABASE\", \"ERROR\");\n }\n\n return FALSE;\n }",
"public function get($configKey, $key);",
"public function Get($name = null,$value = null,...$param){\r\n if(!isset($name)) return self::$config;\r\n return isset($value)?\r\n self::$config[$name][$value]\r\n :(isset(self::$config[$name])?self::$config[$name]:null);\r\n }",
"public function getConfig($config_key)\n {\n if(array_key_exists(strtolower($config_key), self::$config_array)) \n {\n return self::$config_array[strtolower($config_key)];\n }\n\n try \n {\n return self::getDefaultValue($config_key);\n }\n catch(\\Exception $e) \n {\n printf(\"Unable to prepare configs: %s\", $e->getMessage());\n }\n }",
"public function get( $key ) {\n $this->_getConfigVars();\n if (array_key_exists($key,$this->_conf)) {\n\n if (strpos($this->_conf[$key],',') !== false) {\n return explode(',',$this->_conf[$key]);\n }\n\n return $this->_conf[$key];\n }\n return null;\n }",
"public function fetch($key, $subarray = NULL) {\n if ($subarray != NULL) {\n if (isset($this->_config[$subarray][$key])) {\n return $this->_config[$subarray][$key];\n }\n } else {\n if (isset($this->_config[$key])) {\n return $this->_config[$key];\n }\n }\n }",
"public function getConfig($option)\n {\n return array_get ( $this->config, $option );\n }",
"function getConfigPropertyValue($config, $pagename, $property){\n\t\treturn $config['query']['results'][$pagename]['printouts'][$property][0];\n\t}",
"protected function config($name) {\n return $this->configFactory->get($name);\n }",
"public function item($item = '', $index = ''){\n\t\t$value = false;\n\t\tif($index == ''){\n\t\t\tif(isset($this->config[$item])){\n\t\t\t\t$value = $this->config[$item];\n\t\t\t}\n\t\t}else{\n\t\t\tif(array_key_exists($index, $this->config) && in_array($item, $this->config)){\n\t\t\t\t$value = $this->config[$index][$item];\n\t\t\t}\n\t\t}\n\t\treturn $value;\n\t}",
"public function getValueInstance(array $config);",
"function get_config_array();",
"public function config(string $config): mixed\n {\n return $this->config->get($config);\n }",
"public function GetConfig($func)\r\n {\r\n return $this->config[$func];\r\n }",
"public function config_get(){\n\t\treturn $this->fb->exec('dhcp.config_get');\n\t}",
"public function get($name)\n {\n $config = $this->fromCache();\n return isset($config[$name]) ? $config[$name] : null;\n }",
"public function config($valueOf)\n {\n return DB::table('settings')->where('userId', Auth::user()->id)->value($valueOf);\n }",
"public function get ( $name ) {\n\t\tif( !$this->has ( $name ) ) {\n\t\t\tthrow new \\InvalidArgumentException(sprintf('The name \"%s\" is invalid.', $name));\n\t\t}\n\t\treturn $this->config[$name];\n\t}",
"public function getSetting() {}",
"public function getSetting() {}",
"protected function _getValueFromConfig()\n {\n return $this->_scopeConfig->getValue(\n \\Magento\\GiftMessage\\Helper\\Message::XPATH_CONFIG_GIFT_MESSAGE_ALLOW_ITEMS,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }",
"public function config($value)\n {\n return Mage::getStoreConfig(\"simple_relevance/general/$value\");\n }",
"public function getCustomConfigItem($element,$sub_element=\"\"){\n\t $config_element=Yii::$app->params[$element];\n\t return empty($sub_element) ? $config_element : $config_element[$sub_element];\n\t}",
"private function getConfig($key)\n {\n return $this->config->get($key);\n }",
"public function getConfig($key);",
"public function getConfig($key);",
"public function get($key)\n {\n if (array_key_exists($key, $this->config)) {\n $value = $this->config[ $key ];\n } elseif ($this->offsetExists($key)) {\n $value = $this->defaults[ $key ];\n } else {\n throw new Exception(\"Config entry «{$key}» doesn't exists. \");\n }\n\n return $value;\n }",
"public function getConfigurationValue($key) {\n return $this->configuration[$key] ?? NULL;\n }",
"function conf($path) {\n\t$config = $GLOBALS['config'];\n\n\tif(strstr($path, '.')) {\n\t\t$config = array_get($config, $path);\n\t\tif(!$config) Log::caller('path: ' . $path);\n\t}\n\telse if(!isset($config[$path])) {\n\t\tLog::caller('Cannot find configuration parameter | path: ' . $path);\n\t\t//die('Cannot find configuration parameter | $path: ' . $path);\n\t\treturn '';\n\t}\n\telse $config = $config[$path];\n\n\treturn $config;\n}",
"public function getConfig($path) {\n return Config::getInstance()->getElementByPath($path);\n }",
"protected function get(string $key)\n {\n if (!array_key_exists($key, $this->config)) throw new InvalidConfigException(\"Your configuration doesn't have a value for the key `$key`\");\n return $this->config[$key];\n }",
"public function get($path){\n\t\t$keys = explode('/', $path);\n\t\t$value = $this->_settings;\n\t\tif(!is_array($value)){\n\t\t\treturn null;\n\t\t}\n\t\tforeach($keys as $key){\n\t\t\tif(!isset($value[$key])){\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\t$value = $value[$key];\n\t\t}\n\t\treturn $value;\n\t}",
"public function __get ($name) {\t\t\n\t\tif ( $name=='config') {\n\t\t\treturn $this->config;\n\t\t}\n\t\treturn $this->load($name);\n\t}",
"public function get($key) {\r\n\t\t$keys = explode('/', $key);\r\n\t\t$value = &$this->conf;\r\n\r\n\t\tforeach ($keys as $k) {\r\n\t\t\tif (!isset($value[$k])) {\r\n\t\t\t\tthrow new \\Exception(\"There is no entry for key \" . $key);\r\n\t\t\t}\r\n\t\t\t$value = &$value[$k];\r\n\t\t}\r\n\r\n\t\treturn $value;\r\n\t}",
"public static function get($path = null) {\n //create variable to store config \n if($path) {\n //defines where config comes from\n //seperates by '/'\n $config = $GLOBALS['config']; \n $path = explode('/', $path);\n\n foreach($path as $bit) {\n //if config is set, set config to bit\n //i.e config = remember\n //checks against the bit aka cookie_name\n if(isset($config[$bit])) {\n $config = $config[$bit];\n }\n }\n\n return $config;\n }\n //if path doesn't exsists return false\n return false;\n }",
"function get($name, $site_guid = 0) {\n\n\n\t\t$name = trim($name);\n\n\t\t$site_guid = (int) $site_guid;\n\n\t\t// check for deprecated values.\n\t\t// @todo might be a better spot to define this?\n\t\t$new_name = false;\n\t\tswitch($name) {\n\t\t\tcase 'pluginspath':\n\t\t\t\t$new_name = 'plugins_path';\n\t\t\t\tbreak;\n\n\t\t\tcase 'sitename':\n\t\t\t\t$new_name = 'site_name';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// @todo these haven't really been implemented in Elgg 1.8. Complete in 1.9.\n\t\t// show dep message\n\t\tif ($new_name) {\n\t\t\t//\t$msg = \"Config value $name has been renamed as $new_name\";\n\t\t\t$name = $new_name;\n\t\t\t//\telgg_deprecated_notice($msg, $dep_version);\n\t\t}\n\n\t\tif ($site_guid == 0) {\n\t\t\t$site_guid = (int) $this->CONFIG->site_guid;\n\t\t}\n\n\t\t// decide from where to return the value\n\t\tif ($site_guid == $this->CONFIG->site_guid && isset($this->CONFIG->$name)) {\n\t\t\treturn $this->CONFIG->$name;\n\t\t}\n\n\t\t$escaped_name = sanitize_string($name);\n\t\t$result = _elgg_services()->db->getDataRow(\"SELECT value FROM {$this->CONFIG->dbprefix}config\n\t\t\tWHERE name = '$escaped_name' AND site_guid = $site_guid\");\n\n\t\tif ($result) {\n\t\t\t$result = unserialize($result->value);\n\n\t\t\tif ($site_guid == $this->CONFIG->site_guid) {\n\t\t\t\t$this->CONFIG->$name = $result;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}\n\n\t\treturn null;\n\t}",
"function getConfig($key, $default)\n{\n global $config;\n return isset($config[$key])\n ? $config[$key]\n : $default;\n}",
"public function get(string $index, $default = null)\n {\n $config = $this->config;\n\n foreach (explode('.', $index) as $part) {\n if (!isset($config[$part])) {\n return $default;\n }\n\n $config = $config[$part];\n }\n\n return $config;\n }",
"public function get($key)\n\t{\n\t\t$default = array_key_exists($key, $this->defaultConfig) ? $this->defaultConfig[$key] : null;\n\n\t\treturn $this->componentConfig->get($key, $default);\n\t}",
"public function getConfig($name) {\n\t\t$this->loadConfig();\n\t\treturn isset($this->_config[$name]) ? $this->_config[$name] : null;\n\t}",
"function getValue( $key ) {\n\t\tif ( $value = $this->context->getValue( $key ) ) {\n\t\t\treturn $value;\n\t\t} else {\n\t\t\treturn $this->description->getConfigurationValue( $key );\n\t\t}\n\t}",
"function getConfig($arg) {\n\t\t$dbo = & $this->_dbo;\n\t\t$dbo->dieOnQuery(FALSE);\n\t\tif (!is_array($arg))\n\t\t\t$arg = array($arg);\n\t\t\t\n\t\t$config = array();\n\t\tif ($arg[0] == 'all')\n\t\t\t$sql = 'SELECT config_name,config_value FROM '.$dbo->table['config'];\n\t\telse\n\t\t\t$sql = 'SELECT config_name,config_value FROM '.$dbo->table['config'].' WHERE config_name IN (\\''.implode('\\',\\'',$arg).'\\')';\n\t\t\n\t\twhile ($row = $dbo->getRows($sql)) \n\t\t\t\t$config[$row['config_name']] = $row['config_value'];\n\t\n\t\t$dbo->dieOnQUery(TRUE);\n\t\treturn $config;\n\t}",
"public function getConfig($name)\n {\n return $this->config->get(self::CONFIG_PATH.'.'.$name);\n }",
"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}",
"function getConfig($key = '')\n {\n return isset($this->config[$key]) ? $this->config[$key] : null;\n }",
"public static function get( $key ) {\n\t\tif ( ! static::$config ) {\n\t\t\tstatic::_set_config_data();\n\t\t}\n\n\t\tif ( array_key_exists( $key, static::$config ) ) {\n\t\t\treturn static::$config[ $key ];\n\t\t}\n\t}",
"public function get($key, $default = null)\n {\n if(array_key_exists($key,$this->config_arr))\n return $this->config_arr[$key];\n else\n return $default;\n }",
"public function get($key)\n {\n return $this->settings[$key];\n }",
"function get_setting() {\n return get_config(NULL, $this->name);\n }",
"function getConfig($param, $return = false) {\n\n $json = new JSONParser(D . '/config.json', 'en-en');\n $r = (string) $json->stream->data[0]->{$param};\n\n if ($return) {\n return (isset($r) && !empty($r)) ? $r : false;\n } else {\n echo (isset($r) && !empty($r)) ? $r : '';\n }\n}",
"static function Get($valueName)\n {\n if(isset(self::$settings[$valueName]))\n {\n return self::$settings[$valueName];\n }\n\n return false;\n }",
"public function get($value)\n {\n return $this->elements[$value];\n }",
"public\tfunction\tgetValue($offset)\n\t\t{\n\t\t\tif(!array_key_exists($offset, $this->_values)) {\n\t\t\t\treturn\t$this->_values[$offset];\n\t\t\t}\n\t\t}",
"function fetchConfigurationValue($param, $sheet) {\n\t\t$value = trim($this->pi_getFFvalue($this->cObj->data['pi_flexform'], $param, $sheet));\n\t\treturn $value;\n\t}",
"public function get($name) { \n \n if (isset($this->settings[$name])) return $this->settings[$name];\n return null;\n \n }",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();"
] | [
"0.6943026",
"0.694205",
"0.6862496",
"0.6860072",
"0.6830532",
"0.6626121",
"0.66021854",
"0.6531748",
"0.65278685",
"0.65165955",
"0.64778274",
"0.64318395",
"0.64016867",
"0.63939774",
"0.63447976",
"0.6342585",
"0.63118196",
"0.6308476",
"0.63063693",
"0.62946975",
"0.6293753",
"0.62727314",
"0.62653875",
"0.6262108",
"0.6258108",
"0.6252591",
"0.6240629",
"0.6230675",
"0.62269866",
"0.6223848",
"0.6210849",
"0.6186557",
"0.6186005",
"0.61781144",
"0.617442",
"0.61641335",
"0.6132645",
"0.6113318",
"0.609211",
"0.6088732",
"0.60882074",
"0.60440105",
"0.6032828",
"0.6019609",
"0.60168177",
"0.59950864",
"0.5991347",
"0.59890825",
"0.59741247",
"0.59719145",
"0.5970059",
"0.5966075",
"0.5962702",
"0.5959404",
"0.5944992",
"0.594449",
"0.59392744",
"0.59384173",
"0.5934151",
"0.5929732",
"0.59251344",
"0.59251344",
"0.5915611",
"0.5909008",
"0.5900612",
"0.590033",
"0.5892041",
"0.5892041",
"0.58891904",
"0.58667433",
"0.58636105",
"0.5849417",
"0.5848223",
"0.5845504",
"0.58444566",
"0.58439547",
"0.58382404",
"0.58292407",
"0.58169216",
"0.58091825",
"0.580481",
"0.5803673",
"0.5798433",
"0.5789544",
"0.5787888",
"0.57764834",
"0.5775802",
"0.57693166",
"0.57664526",
"0.57628787",
"0.57627255",
"0.5762224",
"0.57458466",
"0.57404333",
"0.57310295",
"0.572735",
"0.57240945",
"0.5722154",
"0.5722154",
"0.5722154",
"0.5722154"
] | 0.0 | -1 |
function createOtherDirs Create other dirs | protected function createOtherDirs()
{
$this->createDir('Database', true);
$this->createDir('Database/Migrations', true);
$this->createDir('Database/Seeds', true);
$this->createDir('Filters', true);
$this->createDir('Language', true);
$this->createDir('Validation', true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _createDirs()\n {\n $dir = $this->_class_dir;\n \n if (! file_exists($dir)) {\n $this->_outln('Creating app directory.');\n mkdir($dir, 0755, true);\n } else {\n $this->_outln('App directory exists.');\n }\n \n $list = array('Layout', 'Locale', 'Public', 'View');\n \n foreach ($list as $sub) {\n if (! file_exists(\"$dir/$sub\")) {\n $this->_outln(\"Creating app $sub directory.\");\n mkdir(\"$dir/$sub\", 0755, true);\n } else {\n $this->_outln(\"App $sub directory exists.\");\n }\n }\n }",
"protected function createDirectories() {\n\t\t@mkdir($this->getAbsoluteBasePath(), 0777, TRUE); // @ - Directories may exist\n\t}",
"protected function createDirectories()\n {\n if (! is_dir(app_path('Http/Controllers/Teamwork'))) {\n mkdir(app_path('Http/Controllers/Teamwork'), 0755, true);\n }\n if (! is_dir(app_path('Listeners/Teamwork'))) {\n mkdir(app_path('Listeners/Teamwork'), 0755, true);\n }\n if (! is_dir(base_path('resources/views/teamwork'))) {\n mkdir(base_path('resources/views/teamwork'), 0755, true);\n }\n if (! is_dir(base_path('resources/views/teamwork/emails'))) {\n mkdir(base_path('resources/views/teamwork/emails'), 0755, true);\n }\n if (! is_dir(base_path('resources/views/teamwork/members'))) {\n mkdir(base_path('resources/views/teamwork/members'), 0755, true);\n }\n }",
"function makeDirectories()\n {\n $pathFolderStr = '';\n foreach ($this->nestedArray as $i => $part) {\n $pathFolderStr .= $part.'/';\n if (!is_dir($this->baseDestinationFolder.$pathFolderStr)) {\n mkdir($this->baseDestinationFolder.$pathFolderStr);\n }\n }\n }",
"public function createDirectories()\n {\n self::createDirectory($this->contentDirectoryPath);\n\n if ($this->staticPreviewIsEnabled())\n self::createDirectory($this->cacheDirectoryPath);\n }",
"protected function createDirectory() {}",
"public function mkdirDeepCreatesDirectoryWithAndWithoutDoubleSlashesDataProvider() {}",
"public function createDirectoriesIfTheyDontExist()\n\t{\n\t\t$directories = array(\n\t\t\t$this->getIntegrationDirectory(),\n\t\t\t$this->getProductsProcessingDirectory(),\n\t\t\t$this->getProductsProcessedDirectory(),\n\t\t\t$this->getStockProcessingDirectory(),\n\t\t\t$this->getStockProcessedDirectory()\n\t\t);\n\t\tforeach ($directories as $directory){\n\t\t\tif(!file_exists($directory)){\n\t\t\t\tmkdir($directory);\n\t\t\t}\n\t\t}\n\t}",
"public function createFolders() {\n $this->output('Current directory: ' . getcwd());\n\n // user folder.\n try {\n \\File::read_dir($this->repo_home . '/' . $this->user_id);\n $this->output('User directory already exist.');\n } catch (Exception $e) {\n $p = new Process('mkdir ' . $this->repo_home . '/' . $this->user_id);\n $p->run();\n $this->output('Created user Directory: ' . $this->user_dir);\n }\n $this->user_dir = $this->repo_home . '/' . $this->user_id;\n\n // repo folder.\n try {\n \\File::read_dir($this->user_dir . '/' . $this->deploy_id);\n $this->output('Repository directory already exist.');\n } catch (Exception $ex) {\n $p = new Process('mkdir ' . $this->user_dir . '/' . $this->deploy_id);\n $p->run();\n $this->output('Created repository directory: ' . $this->repo_dir);\n }\n $this->repo_dir = $this->user_dir . '/' . $this->deploy_id;\n }",
"protected function createDirectories() :void\n {\n $directories = ['Entities', 'Resources', 'Services'];\n\n foreach ($directories as $directory) {\n $directory = app_path($directory);\n\n Storage::makeDirectory($directory, true);\n Storage::put($directory . '/' . '.gitkeep', \"\");\n }\n }",
"protected function createDirectories()\n {\n if (! is_dir(app_path('Handlers'))) {\n mkdir(app_path('Handlers'), 0755, true);\n }\n\n if (! is_dir(app_path('Handlers/EventHandlers'))) {\n mkdir(app_path('Handlers/EventHandlers'), 0755, true);\n }\n\n if (! is_dir(app_path('Http/Controllers/Wechat'))) {\n mkdir(app_path('Http/Controllers/Wechat'), 0755, true);\n }\n }",
"public function createDirectoriesIfTheyDontExist()\n {\n $directories = array(\n $this->getNewSitemapPath(),\n $this->getExistingSitemapPath()\n );\n foreach ($directories as $directory){\n if(!file_exists($directory)){\n mkdir($directory);\n }\n }\n }",
"protected function createDir()\n\t\t{\n\t\t\t//si no existe la carpeta la creamos\n\t\t\tif (!file_exists($this->ruta))\n\t\t\t{\n\t\t\t\tmkdir($this->ruta,0777,true);\t\n\t\t\t}\n\t\t\t\n\t\t\tif (!file_exists($this->rutaMini))\n\t\t\t{\n\t\t\t\tmkdir($this->rutaMini,0777,true);\t\t\n\t\t\t}\t\n\t\t\t\t\n\t\t}",
"private function createNewTempdir(){\n $tempdirname = '';\n do{\n $tempdirname = uniqid('temp_',true);\n }while(file_exists(FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.$tempdirname));\n\n if(@mkdir(FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.$tempdirname)){\n mkdir(FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.$tempdirname.DIRECTORY_SEPARATOR.'gallery');\n }else{\n die(json_encode(array('state'=>'error','data'=> $this->text('e28').': '.FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.'!')));\n }\n return $tempdirname;\n }",
"protected function createNecessaryDirectoriesInDocumentRoot() {}",
"protected function createNecessaryDirectoriesInDocumentRoot() {}",
"function pptConverterDirectoriesCreate($tempPath, $tempPathNewFiles, $fileName, $perms)\n{\n if (!is_dir($tempPath)) {\n mkdir($tempPath, $perms, true);\n }\n if (!is_dir($tempPathNewFiles)) {\n mkdir($tempPathNewFiles, $perms, true);\n }\n if (!is_dir($tempPathNewFiles . $fileName)) {\n mkdir($tempPathNewFiles . $fileName, $perms, true);\n }\n}",
"protected function createSubDirectories()\n {\n // Form the full path with sub dirs for the new command\n // e.g. \"my-project/commands/my/new/Cmd.php\"\n $this->command_dir_path = $this->console->getConfig()->getBlacksmithCommandsPath() . DIRECTORY_SEPARATOR . $this->arg->getSubDirPath();\n\n if (!file_exists($this->command_dir_path)) {\n mkdir($this->command_dir_path, 0755, true);\n }\n }",
"function createDirectory($name, $path=ModuleCreator::PATH_MODULE_ROOT) \n {\n // create base directory\n/* $directoryName = $path.$name;\n if ( !file_exists( $directoryName ) ) {\n mkdir( $directoryName, ModuleCreator::DIR_MODE );\n }\n $this->values[ ModuleCreator::KEY_PATH_MODULE_ROOT ] = $directoryName.'/';\n*/\n $directoryName = $this->values[ ModuleCreator::KEY_PATH_MODULE_ROOT ];\n if ( !file_exists( $directoryName ) ) {\n mkdir( $directoryName, ModuleCreator::DIR_MODE );\n }\n \n // create sub directories\n // objects_bl\n// $blDirectory = $directoryName.ModuleCreator::PATH_OBJECT_BL;\n// $this->values[ ModuleCreator::KEY_PATH_MODULE_BL ] = $blDirectory;\n $blDirectory = $this->values[ ModuleCreator::KEY_PATH_MODULE_BL ];\n\n if ( !file_exists( $blDirectory ) ) {\n mkdir( $blDirectory, ModuleCreator::DIR_MODE );\n }\n \n // objects_da\n $daDirectory = $directoryName.ModuleCreator::PATH_OBJECT_DA;\n if ( !file_exists( $daDirectory ) ) {\n mkdir( $daDirectory, ModuleCreator::DIR_MODE );\n }\n \n // objects_pages\n $pageDirectory = $directoryName.ModuleCreator::PATH_OBJECT_PAGES;\n if ( !file_exists( $pageDirectory ) ) {\n mkdir( $pageDirectory, ModuleCreator::DIR_MODE );\n }\n \n // templates\n $templateDirectory = $directoryName.ModuleCreator::PATH_TEMPLATES;\n if ( !file_exists( $templateDirectory ) ) {\n mkdir( $templateDirectory, ModuleCreator::DIR_MODE );\n }\n \n }",
"protected function setUpInstanceDirectories(array $additionalFoldersToCreate = array()) {\n\n\t\t$foldersToCreate = array_merge($this->defaultFoldersToCreate, $additionalFoldersToCreate);\n\n\t\tforeach ($foldersToCreate as $folder) {\n\t\t\tif (trim($folder) !== '') {\n\t\t\t\t$success = mkdir($this->instancePath . $folder, 0777, TRUE);\n\t\t\t\tif (!$success) {\n\t\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\t'Creating directory failed: ' . $this->instancePath . $folder,\n\t\t\t\t\t\t1376657189\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"function createDirectory() {\n\t$fmpImporter = new FilemakerProImporter();\n\t$fmpImporter->createDirectory();\n}",
"function create_dir($dir_path){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }",
"function create_dirs($path)\n{\n if (!is_dir($path))\n {\n $directory_path = \"\";\n $directories = explode(\"/\",$path);\n array_pop($directories);\n \n foreach($directories as $directory)\n {\n $directory_path .= $directory.\"/\";\n if (!is_dir($directory_path))\n {\n mkdir($directory_path);\n chmod($directory_path, 0777);\n }\n }\n }\n}",
"function createDataPaths() {\n foreach ($this->data_paths as $path) {\n if (!file_exists($this->root . $path)) {\n mkdir($this->root . $path);\n }\n }\n }",
"private function mustCreateFolder(){\n }",
"public function makeDir($dirs, $mode = 0777);",
"public function createAppDirectory() {\n $dir = app_path() . '/EasyApi';\n if (!file_exists($dir)) {\n mkdir($dir);\n }\n }",
"function create_dir($dir){\r\n\t$arr = array($dir);\r\n\twhile(true){\r\n\t\t$dir = dirname($dir);\r\n\t\tif($dir == dirname($dir)){\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t$arr[] = $dir;\r\n\t}\r\n\t$arr = array_reverse($arr);\r\n\tforeach($arr as $dir){\r\n\t\tif(!is_dir($dir)){\r\n\t\t\tmkdir($dir);\r\n\t\t}\r\n\t}\r\n}",
"function createDirectory($training_id){\n\t\t$main_folder = \"./../training_documents\";\n\t\tif(is_dir($main_folder)===false){\n\t\t\tmkdir($main_folder);\t\t\n\t\t}\n\t\tif(is_dir($main_folder.\"/\".$training_id)===false){\n\t\t\tmkdir($main_folder.\"/\".$training_id);\t\n\t\t}\n\t\treturn $training_id;\n\t}",
"protected function createRealTestdir() {}",
"function init($app_paths){\n\t\t\tforeach ($app_paths as $app_path) {\n\t\t\t\tif( file_exists($app_path) ){\n\t\t\t\t\t// \n\t\t\t\t} else {\n\t\t\t\t\tmkdir($app_path, '744');\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"function createExportDirectory()\n\t{\n\t\tif (!@is_dir($this->getExportDirectory()))\n\t\t{\n\t\t\t$usrf_data_dir = ilUtil::getDataDir().\"/usrf_data\";\n\t\t\tilUtil::makeDir($usrf_data_dir);\n\t\t\tif(!is_writable($usrf_data_dir))\n\t\t\t{\n\t\t\t\t$this->ilias->raiseError(\"Userfolder data directory (\".$usrf_data_dir\n\t\t\t\t\t.\") not writeable.\",$this->ilias->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\t// create Export subdirectory (data_dir/lm_data/lm_<id>/Export)\n\t\t\t$export_dir = $usrf_data_dir.\"/export\";\n\t\t\tilUtil::makeDir($export_dir);\n\t\t\tif(!@is_dir($export_dir))\n\t\t\t{\n\t\t\t\t$this->ilias->raiseError(\"Creation of Userfolder Export Directory failed.\",$this->ilias->error_obj->MESSAGE);\n\t\t\t}\n\t\t}\n\t}",
"function generate_directory($id){\n $filename = \"intranet/usuarios/\" . $id . \"/uploads/\";\n if (!file_exists($filename)) {\n mkdir($filename, 0777, true);\n }\n }",
"function createDir($dirName,$permit = 0777) \n\t{\n\t//\t$dirName .= \"/\";\n\t//\techo $dirName.\" \\n\";\n\t if(!is_dir($dirName)) { \n\t\t\tif(!mkdir($dirName,$permit)) \n\t\t\t\treturn false; \n\t\t} else if(!@chmod($dirName,0777)) { \n\t\t\treturn false;\n\t\t}\t\n\t return true;\n\t}",
"function createImportDirectory()\n\t{\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$svy_data_dir = ilUtil::getDataDir().\"/svy_data\";\n\t\tilUtil::makeDir($svy_data_dir);\n\t\t\n\t\tif(!is_writable($svy_data_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Survey Data Directory (\".$svy_data_dir\n\t\t\t\t.\") not writeable.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\n\t\t// create test directory (data_dir/svy_data/svy_<id>)\n\t\t$svy_dir = $svy_data_dir.\"/svy_\".$this->getId();\n\t\tilUtil::makeDir($svy_dir);\n\t\tif(!@is_dir($svy_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Survey Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\n\t\t// create import subdirectory (data_dir/svy_data/svy_<id>/import)\n\t\t$import_dir = $svy_dir.\"/import\";\n\t\tilUtil::makeDir($import_dir);\n\t\tif(!@is_dir($import_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Import Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t}",
"public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }",
"function createExportDirectory()\n\t{\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$svy_data_dir = ilUtil::getDataDir().\"/svy_data\";\n\t\tilUtil::makeDir($svy_data_dir);\n\t\tif(!is_writable($svy_data_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Survey Data Directory (\".$svy_data_dir\n\t\t\t\t.\") not writeable.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t\t\n\t\t// create learning module directory (data_dir/lm_data/lm_<id>)\n\t\t$svy_dir = $svy_data_dir.\"/svy_\".$this->getId();\n\t\tilUtil::makeDir($svy_dir);\n\t\tif(!@is_dir($svy_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Survey Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t\t// create Export subdirectory (data_dir/lm_data/lm_<id>/Export)\n\t\t$export_dir = $svy_dir.\"/export\";\n\t\tilUtil::makeDir($export_dir);\n\t\tif(!@is_dir($export_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Creation of Export Directory failed.\",$this->ilias->error_obj->FATAL);\n\t\t}\n\t}",
"function make_dirs($folder='',$mode=DIR_WRITE_MODE, $defaultFolder='uploads/'){\n\n if(!@is_dir(FCPATH . $defaultFolder)){\n mkdir(FCPATH . $defaultFolder, $mode);\n }\n if(!empty($folder)){\n\n if(!@is_dir(FCPATH . $defaultFolder . '/' . $folder)){\n mkdir(FCPATH . $defaultFolder . '/' . $folder, $mode,true);\n }\n } \n }",
"private function makeDirectory(): void\n {\n $this->directory = $this->simulation->fileAbsolutePath('correlations/' . $this->id);\n Utils::createDirectory($this->directory);\n }",
"private function set_directory(){\n if(!is_dir($this->img_dir)) mkdir($this->img_dir);\n if(!is_dir($this->thumb_dir)) mkdir($this->thumb_dir);\n }",
"public function test_create_exists()\n {\n Directory::create(ROOT.DS.'application');\n }",
"function cot_pfs_createfolder($ownerid, $title='', $desc='', $parentid='', $ispublic='', $isgallery='')\n{\n\tglobal $db, $db_pfs_folders, $cfg, $sys, $L, $err_msg;\n\n\tif ($title==='') \t\t$title = cot_import('ntitle','P','TXT');\n\tif ($desc==='') \t\t$desc = cot_import('ndesc','P','TXT');\n\tif ($parentid==='') \t$parentid = cot_import('nparentid','P','INT');\n\tif ($ispublic==='') \t$ispublic = cot_import('nispublic','P','BOL');\n\tif ($isgallery==='') \t$isgallery = cot_import('nisgallery','P','BOL');\n\n\tif(empty($title))\n\t{\n\t\t$err_msg[] = $L['pfs_foldertitlemissing'];\n\t\treturn 0;\n\t}\n\n\t$newpath = cot_translit_encode(mb_strtolower($title));\n\tif ($parentid > 0)\n\t{\n\t\t$newpath = cot_pfs_folderpath($parentid, TRUE).$newpath;\n\n\t\t$sql = $db->query(\"SELECT pff_id FROM $db_pfs_folders WHERE pff_userid=\".(int)$ownerid.\" AND pff_id=\".(int)$parentid);\n\t\t$sql->rowCount()>0 or cot_die();\n\t}\n\tif ($cfg['pfs']['pfsuserfolder'])\n\t{\n\t\tcot_pfs_mkdir($pfs_dir_user.$newpath) or cot_redirect(cot_url('message', 'msg=500&redirect='.base64_encode('pfs.php'), '', true));\n\t\tcot_pfs_mkdir($thumbs_dir_user.$newpath) or cot_redirect(cot_url('message', 'msg=500&redirect='.base64_encode('pfs.php'), '', true));\n\t}\n\n\t$db->insert($db_pfs_folders, array(\n\t\t'pff_parentid' => (int)$parentid,\n\t\t'pff_userid' => (int)$ownerid,\n\t\t'pff_title' => $title,\n\t\t'pff_date' => (int)$sys['now'],\n\t\t'pff_updated' => (int)$sys['now'],\n\t\t'pff_desc' => $desc,\n\t\t'pff_path' => $newpath,\n\t\t'pff_ispublic' => (int)$ispublic,\n\t\t'pff_isgallery' => (int)$isgallery,\n\t\t'pff_count' => 0\n\t));\n\treturn $db->lastInsertId();\n}",
"function mscaffolding_prepare_directories($name)\n\t{\n\t\tmkdir(\"data/scaffolding/\" . $name);\n\t\tmkdir(\"data/scaffolding/\" . $name . \"/views\");\n\t}",
"function create_folder($name)\n{\n $location = Path::get_repository_path() . 'lib/content_object/';\n Filesystem::create_dir($location . $name);\n}",
"private function create_new_group_directories($group, $group_type){\n\t\t$group_name = $group->data()->prof_link;\n\t\t// Pre-set directory names:\n\t\tswitch($group_type){\n\t\t\tcase self::MUSIC:\n\t\t\t\t$group_type_upload_dir\t=\tMUSIC_GROUP_UPLOADS;\n\t\t\t\t$default_ava\t\t\t=\t'music_default.png';\n\t\t\t\tbreak;\n\t\t\tcase self::DANCE:\n\t\t\t\t$group_type_upload_dir\t=\tDANCE_GROUP_UPLOADS;\n\t\t\t\t$default_ava\t\t\t=\t'boxtar.png';\n\t\t\t\tbreak;\n\t\t\tcase self::COMEDY:\n\t\t\t\t$group_type_upload_dir\t=\tCOMEDY_GROUP_UPLOADS;\n\t\t\t\t$default_ava\t\t\t=\t'boxtar.png';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$group_type_upload_dir\t=\tMUSIC_GROUP_UPLOADS;\n\t\t\t\t$default_ava\t\t\t=\t'music_default.png';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$new_group_root_dir\t=\t$group_type_upload_dir.$group_name;\n\t\t$new_group_img_dir\t=\t$group_type_upload_dir.$group_name.'/img/prof'; // Recursive\n\t\t$new_group_aud_dir\t=\t$group_type_upload_dir.$group_name.'/aud';\n\t\t$new_group_vid_dir\t=\t$group_type_upload_dir.$group_name.'/vid';\n\t\t\n\t\t// CHECK NEW GROUP DIRECTORY DOES NOT EXIST:\n\t\tif(!is_dir($new_group_root_dir)){\n\t\t\tmkdir($new_group_root_dir, 0777);\n\t\t\tmkdir($new_group_img_dir, 0777, true); // @param-3: true enables recursive mode\n\t\t\tmkdir($new_group_aud_dir, 0777);\n\t\t\tmkdir($new_group_vid_dir, 0777);\n\t\t\t\n\t\t\t// Check everything went ok on the directory creating front then copy over default files:\n\t\t\tif(is_dir($new_group_root_dir) && is_dir($new_group_img_dir) && is_dir($new_group_aud_dir) && is_dir($new_group_vid_dir)){\n\t\t\t\t\n\t\t\t\treturn copy( UPLOADS_DIR.$default_ava, $new_group_img_dir.'/default.png');\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"function mdl_create_directory_if_not_exists(string $dirname)\n{\n // Create the path directory if not exists\n if (!is_dir($dirname)) {\n mkdir($dirname, 0777, true);\n }\n}",
"function newsItem_CreateDirektori( \n\t \t$tanggalhariini\n\t){\n \t\t$direktoribuat = \"filemodul/news/\" . \"file_item/\" . $tanggalhariini . \"/\";\n\t\t\t mkdir( $direktoribuat,'0777',true); \n\t\t\t chmod( $direktoribuat, 0777);\n\t\treturn $direktoribuat;\n\t}",
"private function createDirectories(string $projectHomedir, string $symlinkTarget) : bool\n {\n return $this->fileManager->createDir($projectHomedir)\n && $this->fileManager->createDir($symlinkTarget);\n }",
"function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }",
"function smarty_core_create_dir_structure($params, &$smarty)\n{\n if (!file_exists($params['dir'])) {\n $_open_basedir_ini = ini_get('open_basedir');\n\n if (DIRECTORY_SEPARATOR=='/') {\n /* unix-style paths */\n $_dir = $params['dir'];\n $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);\n $_new_dir = (substr($_dir, 0, 1)=='/') ? '/' : getcwd().'/';\n if($_use_open_basedir = !empty($_open_basedir_ini)) {\n $_open_basedirs = explode(':', $_open_basedir_ini);\n }\n\n } else {\n /* other-style paths */\n $_dir = str_replace('\\\\','/', $params['dir']);\n $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);\n if (preg_match('!^((//)|([a-zA-Z]:/))!', $_dir, $_root_dir)) {\n /* leading \"//\" for network volume, or \"[letter]:/\" for full path */\n $_new_dir = $_root_dir[1];\n /* remove drive-letter from _dir_parts */\n if (isset($_root_dir[3])) array_shift($_dir_parts);\n\n } else {\n $_new_dir = str_replace('\\\\', '/', getcwd()).'/';\n\n }\n\n if($_use_open_basedir = !empty($_open_basedir_ini)) {\n $_open_basedirs = explode(';', str_replace('\\\\', '/', $_open_basedir_ini));\n }\n\n }\n\n /* all paths use \"/\" only from here */\n foreach ($_dir_parts as $_dir_part) {\n $_new_dir .= $_dir_part;\n\n if ($_use_open_basedir) {\n // do not attempt to test or make directories outside of open_basedir\n $_make_new_dir = false;\n foreach ($_open_basedirs as $_open_basedir) {\n if (substr($_new_dir, 0, strlen($_open_basedir)) == $_open_basedir) {\n $_make_new_dir = true;\n break;\n }\n }\n } else {\n $_make_new_dir = true;\n }\n\n if ($_make_new_dir && !file_exists($_new_dir) && !@mkdir($_new_dir, $smarty->_dir_perms) && !is_dir($_new_dir)) {\n $smarty->trigger_error(\"problem creating directory '\" . $_new_dir . \"'\");\n return false;\n }\n $_new_dir .= '/';\n }\n }\n}",
"function createFolder(string $foldername);",
"public function createBaseFilesAndFolders()\n {\n $this\n ->createRootFolder()\n ->createRelsFolderAndFile()\n ->createDocPropsFolderAndFiles()\n ->createXlFolderAndSubFolders();\n }",
"private function createFileDir()\n\t{\n\t\t$this->fileDir = IMAGES.'uploads'.DS.$this->model.DS.$this->modelId;\n\t\t$this->imgDir = 'uploads/'.$this->model.'/'.$this->modelId;\n\t}",
"function createFolders($filename=COMPILER_FOLDER){\n\tif (file_exists($filename)) {\n\t return false;\n\t} else {\n\t\t@mkdir($filename);\n\t\tif($filename==COMPILER_FOLDER){\t\n\t\t\tcreateFolders(COMPILER_STANDART);\n\t\t\tcreateFolders(COMPILER_COMMERSE);\n\t\t\tcreateFolders(COMPILER_MEMBERSHIP);\t\n\t\t\tcreateFolders(COMPILER_STANDART.'/wp/');\n\t\t\tcreateFolders(COMPILER_COMMERSE.'/wp/');\n\t\t\tcreateFolders(COMPILER_MEMBERSHIP.'/wp/');\t\t\n\t\t\tcopy(COMPILER_PATH.'unpacking/db_upload.php', COMPILER_STANDART.'/wp/db_upload.php');\t\n\t\t\tcopy(COMPILER_PATH.'unpacking/db_upload.php', COMPILER_COMMERSE.'/wp/db_upload.php');\t\t\n\t\t\tcopy(COMPILER_PATH.'unpacking/db_upload.php', COMPILER_MEMBERSHIP.'/wp/db_upload.php');\n\t\t\tcopy(COMPILER_PATH.'unpacking/unzip.php', COMPILER_FOLDER.'/unzip.php');\n\t\t}\n\t return true;\n\t}\n}",
"function make_dirs($folder='', $mode=DIR_WRITE_MODE, $defaultFolder='uploads/'){\n\n if(!@is_dir(FCPATH . $defaultFolder)){\n mkdir(FCPATH . $defaultFolder, $mode);\n }\n \n if(!empty($folder)){\n\n if(!@is_dir(FCPATH . $defaultFolder . '/' . $folder)){\n mkdir(FCPATH . $defaultFolder . '/' . $folder, $mode,true);\n }\n } \n }",
"private function crear_directorio($carpeta)\n {\n if (!file_exists($carpeta)) {\n mkdir($carpeta, 0777, true);\n }\n }",
"public function createDirectory(DirectoryInterface $directory, DirectoryInterface $parent): DirectoryInterface;",
"function mkImageDir()\r\n {\r\n $this->imageDir = date('Ymd') . '/';\r\n $imageDirPath = $this->rootPath . $this->config->get('imgPath') . $this->imageDir;\r\n if (file_exists($imageDirPath)) return;\r\n if (!file_exists($this->rootPath . $this->config->get('imgPath'))) mkdir($this->rootPath . $this->config->get('imgPath'), 0777);\r\n mkdir($imageDirPath, 0777);\r\n }",
"public function createDir($dirname, Config $config)\n {\n }",
"public function crear_directorio($carpeta)\n {\n if (!file_exists($carpeta)) { mkdir($carpeta, 0777, true); }\n }",
"public function createFolder($parentFolder,$foldername)\r\n\t{\r\n $current_path=\"../img/product/\".$this->ezpk($parentFolder).'/'.$this->ezpk($foldername);\r\n if(!file_exists($current_path)){\r\n mkdir($current_path,0777,true);\r\n }\r\n\t}",
"protected function getFilesInDirCreateTestDirectory() {}",
"function checkPaths() {\n\tif(!file_exists(MODEL_PATH)) {\n\t\tmkdir(MODEL_PATH);\n\t}\n\tif(!file_exists(ENTITY_PATH)) {\n\t\tmkdir(ENTITY_PATH);\n\t}\n\tif(!file_exists(REPOSITORY_PATH)) {\n\t\tmkdir(REPOSITORY_PATH);\n\t}\n}",
"function crearCarpeta($ruta){\r\n if (!is_dir(($ruta))){\r\n mkdir($ruta);\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n}",
"public function createImgFolder(){\n\t\t\n\t\t$tdDate = date('Y-m-d');\n\t\t$dateArray = explode(\"-\",$tdDate);\n\t\tif (!file_exists(\"static/images/\".$dateArray['0'])){\n\t\t\tmkdir(\"static/images/\".$dateArray['0'], 0777);\n\t\t\t}\n\t\tif (!file_exists(\"static/images/\".$dateArray['0'].\"/\".$dateArray['1'])){\n\t\t\t\tmkdir(\"static/images/\".$dateArray['0'].\"/\".$dateArray['1'], 0777);\n\t\t\t}\n\t\tif (file_exists(\"static/images/\".$dateArray['0'].\"/\".$dateArray['1'])){\n\t\t\t\t\treturn \"images/\".$dateArray['0'].\"/\".$dateArray['1'];\n\t\t\t}\n\t\t\n\t}",
"protected function createDestination(): void\n {\n $directory = \\dirname($this->to);\n\n if (! is_dir($directory)) {\n mkdir($directory, 0777, true);\n }\n }",
"function wp_mkdir_p($target)\n {\n }",
"public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }",
"private function ensureFolderStructure()\n {\n $localeDir = Strata::getLocalePath();\n if (!is_dir($localeDir)) {\n mkdir($localeDir);\n }\n }",
"function _createExcludeDirs() {\r\n\t\tglobal $option;\r\n\t\trequire_once (JPATH_BASE_ADMIN.'/components/com_joomlapack/includes/engine.exdirs.php');\r\n\r\n\t\t$def = new CDirExclusionFilter();\r\n\t\t$this->_ExcludeDirs = $def->getFilters();\r\n\t\tCJPLogger::WriteLog(_JP_LOG_DEBUG,_JP_GETTING_DIRS_LIST);\r\n\t\tunset($def);\r\n\t}",
"function mkdir() {\n\t\t$this->checkOnce();\n\t\t$nr = $this->getMain()->nr();\n\n\t\t$remoteCmd = 'cd '.$this->deployPath.' && mkdir v'.$nr;\n\t\t$this->ssh_exec($remoteCmd);\n\t}",
"function create_folder($dir) {\n\t\t// explode\n\t\t$explode = explode('/', $dir);\n\t\t$url = WWW_ROOT;\n\n\t\tif(!is_dir(WWW_ROOT.$dir)) {\n\t\t\t// loop through\n\t\t\tforeach($explode as $e) {\n\t\t\t\t$url .= $e.DS;\n\t\t\t\tif(!is_dir($url)) {\n\t\t\t\t\tmkdir($url);\n\t\t\t\t\tchmod($url, 0777);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }",
"protected function createDirectoryForTemporaryFiles(): void\n\t{\n\t\tif (! $this->filesystem->isDirectory(storage_path('tmp'))) {\n\t\t\t$this->filesystem->makeDirectory(storage_path('tmp'));\n\t\t}\n\t}",
"private function create_downloads_dir(){\r\n\t\t$wp_upload_dir = wp_upload_dir();\r\n\r\n\t\t$downloads_dir = $wp_upload_dir['basedir'].'/downloads';\r\n\t\t$archived_dir = $wp_upload_dir['basedir'].'/archived';\r\n\r\n\t\t$reports_dir = $downloads_dir.'/reports';\r\n\t\t$archived_reports_dir = $archived_dir.'/reports';\r\n\r\n\t\tif(!file_exists($downloads_dir)){ mkdir($downloads_dir, 0777); }\r\n\t\tif(!file_exists($archived_dir)){ mkdir($archived_dir, 0777); }\r\n\r\n\t\tif(!file_exists($reports_dir)){ mkdir($reports_dir, 0777); }\r\n\t\tif(!file_exists($archived_reports_dir)){ mkdir($archived_reports_dir, 0777); }\r\n\r\n\t\t$rslt['reports_dir'] = $reports_dir;\r\n\t\t$rslt['archived_reports_dir'] = $archived_reports_dir;\r\n\r\n\t\treturn $rslt;\r\n\t}",
"public function createServiceDirectories($path)\n\t{\n\t\tforeach ($this->directories as $directory) {\n\t\t\t$this->createDirectory($path . '/' . $directory);\n\t\t\t$this->createFile($path . '/' . $directory . '/.gitkeep');\n\t\t}\n\t}",
"private function Make_UniqueDIR( )\n\t{\n\t\t$this -> DIR = self :: $Request -> server -> get( 'DOCUMENT_ROOT' ) . $this -> FULL_PATH . self :: FOLDER_BASE_NAME . $this -> ID;\n\t\tif ( !file_exists( $this -> DIR ) )\n\t\t\tmkdir( $this -> DIR , 0777 , true ) ;\n\t}",
"public function mkDir($path);",
"public static function mkDir($args)\n {\n $opts = System::_parseArgs($args, 'pm:');\n if (PEAR::isError($opts)) {\n return System::raiseError($opts);\n }\n\n $mode = 0777; // default mode\n foreach ($opts[0] as $opt) {\n if ($opt[0] == 'p') {\n $create_parents = true;\n } elseif ($opt[0] == 'm') {\n // if the mode is clearly an octal number (starts with 0)\n // convert it to decimal\n if (strlen($opt[1]) && $opt[1]{0} == '0') {\n $opt[1] = octdec($opt[1]);\n } else {\n // convert to int\n $opt[1] += 0;\n }\n $mode = $opt[1];\n }\n }\n\n $ret = true;\n if (isset($create_parents)) {\n foreach ($opts[1] as $dir) {\n $dirstack = array();\n while ((!file_exists($dir) || !is_dir($dir)) &&\n $dir != DIRECTORY_SEPARATOR) {\n array_unshift($dirstack, $dir);\n $dir = dirname($dir);\n }\n\n while ($newdir = array_shift($dirstack)) {\n if (!is_writeable(dirname($newdir))) {\n $ret = false;\n break;\n }\n\n if (!mkdir($newdir, $mode)) {\n $ret = false;\n }\n }\n }\n } else {\n foreach($opts[1] as $dir) {\n if ((@file_exists($dir) || !is_dir($dir)) && !mkdir($dir, $mode)) {\n $ret = false;\n }\n }\n }\n\n return $ret;\n }",
"function copy_dirs($wf, $wto) {\n\tif (!file_exists($wto)) {\n\t\tmkdir($wto, 0777);\n\t}\n\t$arr=ls_a($wf);\n\tforeach ($arr as $fn) {\n\t\tif($fn) {\n\t\t\t$fl=$wf.\"/\".$fn;\n\t\t\t$flto=$wto.\"/\".$fn;\n\t\t\tif(is_dir($fl)) copy_dirs($fl, $flto);\n\t\t\telse // begin 2nd improvement\n\t\t\t{\n\t\t\t\t@copy($fl, $flto);\n\t\t\t\tchmod($flto, 0666);\n\t\t\t} // end 2nd improvement\n\t\t}\n\t}\n}",
"private static function defaultDirectory($dir){\n $dirs = array(\"controller\", \"model\");\n\n foreach ($dirs as $d){\n if(!file_exists($dir . \"/\" . $d)) {\n if (@!mkdir($dir . \"/\" . $d, 0777))//criar arquivo de log caso não crie o path\n print \"<< [create_path_\" . self::$pathName . \"] Error ao criar o diretorio << \" . self::$pathName .\"/\".$d. \" >>\\n\";\n\n }\n }\n }",
"public function createDirStructure($instance)\n {\n $dirName1 = substr($instance, 0,1);\n $dirName2 = substr($instance, 1,1);\n $dirName3 = substr($instance, 2,1);\n $osDir = $this->dicomData[\"os_dir\"].\"dicom/pictures\".DIRECTORY_SEPARATOR.$dirName1.DIRECTORY_SEPARATOR.$dirName2.DIRECTORY_SEPARATOR.$dirName3.DIRECTORY_SEPARATOR;\n $webDir = \"dicom/pictures\".DIRECTORY_SEPARATOR.$dirName1.DIRECTORY_SEPARATOR.$dirName2.DIRECTORY_SEPARATOR.$dirName3.DIRECTORY_SEPARATOR;\n $result = true;\n\n /*if (!file_exists($osDir))\n {\n $result = mkdir($osDir,0777,true);\n }*/\n\n return array(\"status\"=>$result,\"osDir\"=>$osDir,\"webDir\"=>$webDir);\n\n\n }",
"function make_dir($path) {\n\t\t$subdir = \"\";\n\t\t$arrPath = explode('/', $path);\n\t\tforeach ($arrPath as $dir) {\n\t\t\t$subdir .= \"$dir\" . '/';\n\t\t\tif (!file_exists($subdir)) {\n\t\t\t\tmkdir($subdir);\n\t\t\t\tchmod($subdir, 0777);\n\t\t\t}\n\t\t}\n\t}",
"function makeDIR($directory,$debugtxt=0,$nMode) {\n // Create payload directory if it doesn't exist:\n if (file_exists($directory)) {\n //if ($debugtxt) { echo \"<p>Directory <b>$directory</b> already exists </p>\"; }\n $result = true; // Return true as success is when the directory has either been created or already exists\n } else {\n // Make the new temp sub_folder for unzipped files\n if (!mkdir($directory, $nMode, true)) {\n if ($debugtxt) { \n echo \"<p>Error: Could not create folder <b>$directory</b> - check file permissions\";\n echo '<div class=\"admin_img\"><a href=\"'.$sSiteUrl.'/admin\" class=\"btn btn-lg btn-primary color-white\">Admin</a></div><div class=\"play_img\"><a href=\"'.$sSiteUrl.'/play\" class=\"btn btn-lg btn-primary color-white\">Play</a></div>';\n }\n $result= false;\n } else { \n //if ($debugtxt) { echo \"Folder <b>$directory</b> Created <br>\";} \n $result = true;\n } // END mkdir\n } // END if file exists\n return $result;\n }",
"protected function buildFsTree()\n {\n mkdir($this->config_path, 0755, true);\n mkdir($this->compiledViewsPath(), 0755, true);\n }",
"public function createDirectory($path) {\n\n $parentPath = dirname($path);\n if ($parentPath=='.') $parentPath='/';\n $parent = $this->getNodeForPath($parentPath);\n $parent->createDirectory(basename($path));\n\n }",
"function create_user_dir(){\n\t$safeUserDir=bin2hex(random_bytes(4));\n\t$oldDir=getcwd();\n\tchdir(FS_PATH);\n\tif(mkdir(\"$safeUserDir\")) {\n\tchmod(\"$safeUserDir\",0755); //owner=r,w,x group=r,x other=r,x\n\tchdir($oldDir);\n\treturn \t$safeUserDir;\n\t} else {\n\t\tchdir($oldDir);\n\t\terror_log(\"create_user_dir: Could not create user directory in \".FS_PATH,0);\n\t\treturn false;\n\t}\n}",
"function is_writable($orgdest)\n {\n if ($orgdest{0} == '/')\n {\n if (count($orgdest) == 1)\n $testdest = $orgdest;\n else\n $testdest= substr($orgdest, 0, strpos($orgdest, '/', 1));\n }\n else\n {\n if ($orgdest{strlen($orgdest)-1} != '/' && !is_file($orgdest))\n $orgdest .= '/';\n\n $testdest = $orgdest;\n\n if (!is_dir($orgdest))\n {\n $orgdestArray = explode('/', $orgdest);\n\n $testdest = $orgdestArray[0].'/';\n }\n }\n\n atkdebug(\"Checking with: \".$testdest);\n\n return is_writable($testdest);\n }\n\n /**\n * This function creates recursively a destination. This fuction accepts\n * a full path ../dir/subdir/subdir2/subdir3 etc. It checks if the path is writeable\n * and replace mis typed slashes with forward slashes.\n *\n * @static\n * @param string $dir the fullpath\n * @param octal $privileges octal number for the rights of the written\n * @param bool $recursive \n * @return bool returns true if the destination is written.\n */\n function mkdirRecursive($dir, $privileges=0777, $recursive=true)\n {\n $dir = preg_replace('/(\\/){2,}|(\\\\\\){1,}/','/',$dir); //only forward-slash\n\n if (!atkFileUtils::is_writable($dir))\n {\n atkdebug(\"Error no write permission!\");\n return false;\n }\n\n atkdebug(\"Permission granted to write.\");\n\n if( is_null($dir) || $dir === \"\" ){\n return FALSE;\n }\n if( is_dir($dir) || $dir === \"/\" ){\n return TRUE;\n }\n if( atkFileUtils::mkdirRecursive(dirname($dir), $privileges, $recursive) ){\n return mkdir($dir, $privileges);\n }\n return FALSE;\n }\n\n /**\n * This function parse a templatestring with the data and returns\n * a string with the data parsed in the template.\n *\n * @static\n * @param string $template the template to parse\n * @param array $data array which contains the data for the template\n * @return string returns the parsed string\n */\n function parseDirectoryName($template, $data)\n {\n atkimport(\"atk.utils.atkstringparser\");\n $stringparser = new atkStringParser($template);\n return $stringparser->parse($data);\n }\n\n\n /**\n * Returns mimetype for the given filename, based on fileextension.\n * This function is different from mime_content_type because it\n * does not access the file but just looks at the fileextension and\n * returns the right mimetype.\n *\n * @static\n * @param string $filename Filename (or just the extention) we want\n * to know the mime type for.\n * @return string The mimetype for this file extension.\n */\n function atkGetMimeTypeFromFileExtension($filename)\n {\n $ext = strtolower(end(explode('.',$filename )));\n\n $mimetypes = array(\n 'ai' =>'application/postscript',\n 'aif' =>'audio/x-aiff',\n 'aifc' =>'audio/x-aiff',\n 'aiff' =>'audio/x-aiff',\n 'asc' =>'text/plain',\n 'atom' =>'application/atom+xml',\n 'avi' =>'video/x-msvideo',\n 'bcpio' =>'application/x-bcpio',\n 'bmp' =>'image/bmp',\n 'cdf' =>'application/x-netcdf',\n 'cgm' =>'image/cgm',\n 'cpio' =>'application/x-cpio',\n 'cpt' =>'application/mac-compactpro',\n 'crl' =>'application/x-pkcs7-crl',\n 'crt' =>'application/x-x509-ca-cert',\n 'csh' =>'application/x-csh',\n 'css' =>'text/css',\n 'dcr' =>'application/x-director',\n 'dir' =>'application/x-director',\n 'djv' =>'image/vnd.djvu',\n 'djvu' =>'image/vnd.djvu',\n 'doc' =>'application/msword',\n 'dtd' =>'application/xml-dtd',\n 'dvi' =>'application/x-dvi',\n 'dxr' =>'application/x-director',\n 'eps' =>'application/postscript',\n 'etx' =>'text/x-setext',\n 'ez' =>'application/andrew-inset',\n 'gif' =>'image/gif',\n 'gram' =>'application/srgs',\n 'grxml' =>'application/srgs+xml',\n 'gtar' =>'application/x-gtar',\n 'hdf' =>'application/x-hdf',\n 'hqx' =>'application/mac-binhex40',\n 'html' =>'text/html',\n 'html' =>'text/html',\n 'ice' =>'x-conference/x-cooltalk',\n 'ico' =>'image/x-icon',\n 'ics' =>'text/calendar',\n 'ief' =>'image/ief',\n 'ifb' =>'text/calendar',\n 'iges' =>'model/iges',\n 'igs' =>'model/iges',\n 'jpe' =>'image/jpeg',\n 'jpeg' =>'image/jpeg',\n 'jpg' =>'image/jpeg',\n 'js' =>'application/x-javascript',\n 'kar' =>'audio/midi',\n 'latex' =>'application/x-latex',\n 'm3u' =>'audio/x-mpegurl',\n 'man' =>'application/x-troff-man',\n 'mathml' =>'application/mathml+xml',\n 'me' =>'application/x-troff-me',\n 'mesh' =>'model/mesh',\n 'mid' =>'audio/midi',\n 'midi' =>'audio/midi',\n 'mif' =>'application/vnd.mif',\n 'mov' =>'video/quicktime',\n 'movie' =>'video/x-sgi-movie',\n 'mp2' =>'audio/mpeg',\n 'mp3' =>'audio/mpeg',\n 'mpe' =>'video/mpeg',\n 'mpeg' =>'video/mpeg',\n 'mpg' =>'video/mpeg',\n 'mpga' =>'audio/mpeg',\n 'ms' =>'application/x-troff-ms',\n 'msh' =>'model/mesh',\n 'mxu m4u' =>'video/vnd.mpegurl',\n 'nc' =>'application/x-netcdf',\n 'oda' =>'application/oda',\n 'ogg' =>'application/ogg',\n 'pbm' =>'image/x-portable-bitmap',\n 'pdb' =>'chemical/x-pdb',\n 'pdf' =>'application/pdf',\n 'pgm' =>'image/x-portable-graymap',\n 'pgn' =>'application/x-chess-pgn',\n 'php' =>'application/x-httpd-php',\n 'php4' =>'application/x-httpd-php',\n 'php3' =>'application/x-httpd-php',\n 'phtml' =>'application/x-httpd-php',\n 'phps' =>'application/x-httpd-php-source',\n 'png' =>'image/png',\n 'pnm' =>'image/x-portable-anymap',\n 'ppm' =>'image/x-portable-pixmap',\n 'ppt' =>'application/vnd.ms-powerpoint',\n 'ps' =>'application/postscript',\n 'qt' =>'video/quicktime',\n 'ra' =>'audio/x-pn-realaudio',\n 'ram' =>'audio/x-pn-realaudio',\n 'ras' =>'image/x-cmu-raster',\n 'rdf' =>'application/rdf+xml',\n 'rgb' =>'image/x-rgb',\n 'rm' =>'application/vnd.rn-realmedia',\n 'roff' =>'application/x-troff',\n 'rtf' =>'text/rtf',\n 'rtx' =>'text/richtext',\n 'sgm' =>'text/sgml',\n 'sgml' =>'text/sgml',\n 'sh' =>'application/x-sh',\n 'shar' =>'application/x-shar',\n 'shtml' =>'text/html',\n 'silo' =>'model/mesh',\n 'sit' =>'application/x-stuffit',\n 'skd' =>'application/x-koan',\n 'skm' =>'application/x-koan',\n 'skp' =>'application/x-koan',\n 'skt' =>'application/x-koan',\n 'smi' =>'application/smil',\n 'smil' =>'application/smil',\n 'snd' =>'audio/basic',\n 'spl' =>'application/x-futuresplash',\n 'src' =>'application/x-wais-source',\n 'sv4cpio' =>'application/x-sv4cpio',\n 'sv4crc' =>'application/x-sv4crc',\n 'svg' =>'image/svg+xml',\n 'swf' =>'application/x-shockwave-flash',\n 't' =>'application/x-troff',\n 'tar' =>'application/x-tar',\n 'tcl' =>'application/x-tcl',\n 'tex' =>'application/x-tex',\n 'texi' =>'application/x-texinfo',\n 'texinfo' =>'application/x-texinfo',\n 'tgz' =>'application/x-tar',\n 'tif' =>'image/tiff',\n 'tiff' =>'image/tiff',\n 'tr' =>'application/x-troff',\n 'tsv' =>'text/tab-separated-values',\n 'txt' =>'text/plain',\n 'ustar' =>'application/x-ustar',\n 'vcd' =>'application/x-cdlink',\n 'vrml' =>'model/vrml',\n 'vxml' =>'application/voicexml+xml',\n 'wav' =>'audio/x-wav',\n 'wbmp' =>'image/vnd.wap.wbmp',\n 'wbxml' =>'application/vnd.wap.wbxml',\n 'wml' =>'text/vnd.wap.wml',\n 'wmlc' =>'application/vnd.wap.wmlc',\n 'wmlc' =>'application/vnd.wap.wmlc',\n 'wmls' =>'text/vnd.wap.wmlscript',\n 'wmlsc' =>'application/vnd.wap.wmlscriptc',\n 'wmlsc' =>'application/vnd.wap.wmlscriptc',\n 'wrl' =>'model/vrml',\n 'xbm' =>'image/x-xbitmap',\n 'xht' =>'application/xhtml+xml',\n 'xhtml' =>'application/xhtml+xml',\n 'xls' =>'application/vnd.ms-excel',\n 'xml xsl' =>'application/xml',\n 'xpm' =>'image/x-xpixmap',\n 'xslt' =>'application/xslt+xml',\n 'xul' =>'application/vnd.mozilla.xul+xml',\n 'xwd' =>'image/x-xwindowdump',\n 'xyz' =>'chemical/x-xyz',\n 'zip' =>'application/zip'\n );\n\n $ext = trim(strtolower($ext));\n if (array_key_exists($ext,$mimetypes))\n {\n atkdebug(\"Filetype for $filename is {$mimetypes[$ext]}\");\n return $mimetypes[$ext];\n }\n else\n {\n atkdebug(\"Filetype for $filename could not be found. Returning application/octet-stream.\");\n return \"application/octet-stream\";\n }\n }\n\n /**\n * Get the Mimetype for a file the proper way.\n *\n * @link http://en.wikipedia.org/wiki/MIME_type\n *\n * @param string $file_path Path to the file\n * @return string Mimetype\n */\n public static function getFileMimetype($file_path)\n {\n // First try with fileinfo functions\n if (function_exists('finfo_open'))\n {\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\n $type = finfo_file($finfo, $file_path);\n finfo_close($finfo);\n }\n elseif (function_exists('mime_content_type'))\n {\n $type = mime_content_type($file);\n }\n else\n {\n // Unable to get the file mimetype!\n $type = '';\n }\n return $type;\n }\n\n /**\n * Delete complete directory and all of its contents.\n *\n * @todo If one of the subdirs/files cannot be removed, you end up with\n * a half deleted directory structure.\n * @param string $dir The directory to remove\n * @return True if succesful, false if not\n */\n function rmdirRecursive( $dir )\n {\n if ( !is_writable( $dir ) )\n {\n if ( !@chmod( $dir, 0777 ) )\n {\n return FALSE;\n }\n }\n\n $d = dir( $dir );\n while ( FALSE !== ( $entry = $d->read() ) )\n {\n if ( $entry == '.' || $entry == '..' )\n {\n continue;\n }\n $entry = $dir . '/' . $entry;\n if ( is_dir( $entry ) )\n {\n if ( !atkFileUtils::rmdirRecursive( $entry ) )\n {\n return FALSE;\n }\n continue;\n }\n if ( !@unlink( $entry ) )\n {\n $d->close();\n return FALSE;\n }\n }\n\n $d->close();\n\n rmdir( $dir );\n\n return TRUE;\n }\n}",
"public function testGetOtherDirectories()\n {\n $hostMock = $this->getMockBuilder(Host::class)\n ->disableOriginalConstructor()\n ->getMock();\n $hostMock->expects($this->exactly(2))->method('getPath')->willReturn('{host-base-path}');\n\n $workspace = new Workspace($hostMock);\n $workspace->setOtherDirectories(array('data/images/', 'data/documents/'));\n\n $this->assertSame(array('{host-base-path}/data/images/', '{host-base-path}/data/documents/'), $workspace->getOtherDirectories());\n }",
"private function createDir($fileName)\n {\n // Split filename into array every x chars\n $filename_arr = str_split($fileName, $this->folder_chars);\n\n $upload_root_dir = $this->getUploadRootDir();\n\n // Create any directories which don't exist yet\n $i = 0;\n while ($i < $this->folder_depth) {\n\n // Set current absolute dir to check for existence\n $dir = $upload_root_dir . '/' . $filename_arr[$i];\n\n // Create dir if none exists\n if (!file_exists($dir)) {\n mkdir($dir);\n }\n\n // Set current dir as new parent folder\n $upload_root_dir = $dir;\n\n $i++;\n }\n }",
"protected function createCacheDir()\n {\n if ( ! file_exists($this->cacheDir)) {\n mkdir($this->cacheDir);\n }\n }",
"protected function createDirectory($paths)\n {\n if (!is_array($paths)) {\n $paths = array($paths);\n }\n\n foreach ($paths as $path) {\n if (!is_dir($dir = dirname($path)) && false === @mkdir($dir, 0777, true)) {\n // @codeCoverageIgnoreStart\n throw new \\RuntimeException(sprintf('Unable to create directory \"%s\".', $dir));\n // @codeCoverageIgnoreEnd\n }\n }\n }",
"public static function create()\n {\n $directories = [\n self::PATH.'/app',\n self::PATH.'/logs',\n self::PATH.'/bootstrap/cache',\n self::PATH.'/framework/cache',\n self::PATH.'/framework/views',\n ];\n\n foreach ($directories as $directory) {\n if (! is_dir($directory)) {\n function_exists('__vapor_debug') && __vapor_debug(\"Creating storage directory: $directory\");\n\n mkdir($directory, 0755, true);\n }\n }\n }",
"public function mkdir($dir)\n {\n }",
"function fud_mkdir($path)\n{\n\t$dirs = array();\n\twhile (!is_dir($path)) {\n\t\t$dirs[] = $path;\n\t\t$path = dirname($path);\n\t\tif (!$path || $path == '/') {\n\t\t\tbreak;\n\t\t}\n\t}\n\tforeach (array_reverse($dirs) as $dir) {\n\t\tif (!mkdir($dir, 0755)) {\n\t\t\tfe('Failed to create \"'. $dir .'\" directory.');\t\n\t\t}\n\t}\n}",
"function check_dir_exists($dir,$create=false) {\n\n global $CFG; \n\n $status = true;\n if(!is_dir($dir)) {\n if (!$create) {\n $status = false;\n } else {\n umask(0000);\n $status = mkdir ($dir,$CFG->directorypermissions);\n }\n }\n return $status;\n }",
"public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }",
"function makeDir($UUID, $SUBDIR){\n #make a hash of the UUID\n $hash = md5($UUID);\n #specify the path to the directory to be made\n $dir = \"./\" . $SUBDIR . \"/\" . substr($hash,0,2) . \"/$hash\";\n # a if it already exits, return\n if(is_dir($dir)) { return $dir; }\n #otherwise, attempt to make it-\n if(!mkdir($dir,0777,true)){\n echo(\"Failed to create '$dir'. Function makeDir\\n\");\n return false;\n }\n else\n return $dir;\n}",
"function mkdirV4($dir_name = null, $mode = 0777, $recursive = false){\n if ($dir_name == null){\n return false;\n }\n\n if($recursive){\n $check_dir = \"\";\n $dirs = explode('/', $dir_name);\n \n foreach($dirs as $tmp_dirs){\n if ($tmp_dirs == \"\"){\n continue;\n }\n $check_dir = $check_dir . $tmp_dirs . '/';\n if (is_dir($check_dir)){\n continue;\n } else {\n mkdir($check_dir, $mode);\n }\n }\n return is_dir($dir_name);\n } else {\n return mkdir($dir_name, $mode);\n } \n}",
"private function createDir()\n {\n if ($this->dirCreated) {\n return;\n }\n\n $dir = $this->getDirFromStream($this->url);\n if (null !== $dir && !is_dir($dir)) {\n $this->errorMessage = null;\n set_error_handler(array($this, 'customErrorHandler'));\n $status = mkdir($dir, 0777, true);\n restore_error_handler();\n if (false === $status) {\n throw new \\UnexpectedValueException(sprintf('There is no existing directory at \"%s\" and its not buildable: '.$this->errorMessage, $dir));\n }\n }\n $this->dirCreated = true;\n }"
] | [
"0.7325807",
"0.7241165",
"0.7164302",
"0.7084659",
"0.70713305",
"0.69681144",
"0.693752",
"0.680825",
"0.67742723",
"0.66478854",
"0.65808636",
"0.65667534",
"0.65366745",
"0.63754594",
"0.63202095",
"0.63202095",
"0.6280978",
"0.62744695",
"0.62731284",
"0.61980015",
"0.6186842",
"0.609129",
"0.6075369",
"0.60348725",
"0.6023011",
"0.59332395",
"0.59304",
"0.5910885",
"0.59077346",
"0.5885391",
"0.5833714",
"0.58084506",
"0.5794911",
"0.5788551",
"0.5777943",
"0.5749708",
"0.57487226",
"0.57323146",
"0.57287157",
"0.5722659",
"0.57163054",
"0.5715935",
"0.5713023",
"0.5706992",
"0.5693586",
"0.56900436",
"0.5689207",
"0.5681713",
"0.56811476",
"0.5658406",
"0.5656462",
"0.56547046",
"0.5654129",
"0.56540096",
"0.56071824",
"0.5590375",
"0.55810535",
"0.55791587",
"0.5564007",
"0.5560676",
"0.5547011",
"0.5542169",
"0.55401003",
"0.55359703",
"0.55153584",
"0.5501084",
"0.54965943",
"0.549204",
"0.54741865",
"0.5464548",
"0.54349685",
"0.54281527",
"0.5427066",
"0.5422735",
"0.5422634",
"0.5412028",
"0.53940576",
"0.5392517",
"0.53896487",
"0.5385049",
"0.53831375",
"0.5379088",
"0.53710485",
"0.5361848",
"0.5353239",
"0.5352729",
"0.53509414",
"0.5337207",
"0.5333153",
"0.5321156",
"0.53169173",
"0.5310242",
"0.5302013",
"0.52973604",
"0.5296613",
"0.52727526",
"0.5269265",
"0.52651596",
"0.52554125",
"0.52427316"
] | 0.8486001 | 0 |
function createDir Create directory and set, if required, gitkeep to keep this in git. | protected function createDir($folder, $gitkeep = false) {
$dir = $this->module_folder . DIRECTORY_SEPARATOR . ucfirst($this->module_name) . DIRECTORY_SEPARATOR . $folder;
if (!is_dir($dir)) {
mkdir($dir, 0777, true);
if ($gitkeep) {
file_put_contents($dir . '/.gitkeep', '');
}
}
return $dir;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createDirectory() {}",
"protected function createCacheDir()\n {\n if ( ! file_exists($this->cacheDir)) {\n mkdir($this->cacheDir);\n }\n }",
"protected function createDir()\n\t\t{\n\t\t\t//si no existe la carpeta la creamos\n\t\t\tif (!file_exists($this->ruta))\n\t\t\t{\n\t\t\t\tmkdir($this->ruta,0777,true);\t\n\t\t\t}\n\t\t\t\n\t\t\tif (!file_exists($this->rutaMini))\n\t\t\t{\n\t\t\t\tmkdir($this->rutaMini,0777,true);\t\t\n\t\t\t}\t\n\t\t\t\t\n\t\t}",
"protected function createDirectories() :void\n {\n $directories = ['Entities', 'Resources', 'Services'];\n\n foreach ($directories as $directory) {\n $directory = app_path($directory);\n\n Storage::makeDirectory($directory, true);\n Storage::put($directory . '/' . '.gitkeep', \"\");\n }\n }",
"function create_dir($dir_path){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }",
"function mkImageDir()\r\n {\r\n $this->imageDir = date('Ymd') . '/';\r\n $imageDirPath = $this->rootPath . $this->config->get('imgPath') . $this->imageDir;\r\n if (file_exists($imageDirPath)) return;\r\n if (!file_exists($this->rootPath . $this->config->get('imgPath'))) mkdir($this->rootPath . $this->config->get('imgPath'), 0777);\r\n mkdir($imageDirPath, 0777);\r\n }",
"public function mkDir($path);",
"public function createDir($dirname, Config $config)\n {\n }",
"public function createDirectories()\n {\n self::createDirectory($this->contentDirectoryPath);\n\n if ($this->staticPreviewIsEnabled())\n self::createDirectory($this->cacheDirectoryPath);\n }",
"private function makeDirectory(): void\n {\n $this->directory = $this->simulation->fileAbsolutePath('correlations/' . $this->id);\n Utils::createDirectory($this->directory);\n }",
"private function createFileDir()\n\t{\n\t\t$this->fileDir = IMAGES.'uploads'.DS.$this->model.DS.$this->modelId;\n\t\t$this->imgDir = 'uploads/'.$this->model.'/'.$this->modelId;\n\t}",
"public function createDirectory()\n {\n $bReturn = $this->exists();\n if( !$bReturn && $this->_sPath->isValid() )\n {\n $bReturn = mkdir( (string)$this->_sPath, 0770, TRUE);\n if( $bReturn )\n {\n $this->_sPath->setValue( $this->getRealPath() );\n }\n }\n return $bReturn;\n }",
"function mdl_create_directory_if_not_exists(string $dirname)\n{\n // Create the path directory if not exists\n if (!is_dir($dirname)) {\n mkdir($dirname, 0777, true);\n }\n}",
"protected function createEmptyDirectory($dir)\n {\n $this->createDirectoryFor($dir);\n $this->createFile($dir . DIRECTORY_SEPARATOR . '.gitkeep', '');\n }",
"private function Make_UniqueDIR( )\n\t{\n\t\t$this -> DIR = self :: $Request -> server -> get( 'DOCUMENT_ROOT' ) . $this -> FULL_PATH . self :: FOLDER_BASE_NAME . $this -> ID;\n\t\tif ( !file_exists( $this -> DIR ) )\n\t\t\tmkdir( $this -> DIR , 0777 , true ) ;\n\t}",
"public function create_dir() {\n\t\t$permission = 0777;\n\t\t$directory_path = ! defined( 'CODE_SNIPPET_DIR' )\n\t\t? ABSPATH . 'wp-code-snippet'\n\t\t: CODE_SNIPPET_DIR;\n\t\n\t\tif ( ! file_exists( $directory_path ) ) {\n\t\t\tmkdir( $directory_path );\n\t\t\t// @chmod( $directory_path, $permission );\n\t\t}\n\n\t\treturn $directory_path;\n\t}",
"private function createNewTempdir(){\n $tempdirname = '';\n do{\n $tempdirname = uniqid('temp_',true);\n }while(file_exists(FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.$tempdirname));\n\n if(@mkdir(FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.$tempdirname)){\n mkdir(FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.$tempdirname.DIRECTORY_SEPARATOR.'gallery');\n }else{\n die(json_encode(array('state'=>'error','data'=> $this->text('e28').': '.FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH.'!')));\n }\n return $tempdirname;\n }",
"function createDir($dirName,$permit = 0777) \n\t{\n\t//\t$dirName .= \"/\";\n\t//\techo $dirName.\" \\n\";\n\t if(!is_dir($dirName)) { \n\t\t\tif(!mkdir($dirName,$permit)) \n\t\t\t\treturn false; \n\t\t} else if(!@chmod($dirName,0777)) { \n\t\t\treturn false;\n\t\t}\t\n\t return true;\n\t}",
"public function mkdirDeepCreatesDirectoryWithAndWithoutDoubleSlashesDataProvider() {}",
"function createDirectory() {\n\t$fmpImporter = new FilemakerProImporter();\n\t$fmpImporter->createDirectory();\n}",
"function create_dir($path, $make_writable = false) {\n if(mkdir($path)) {\n if($make_writable) {\n if(!chmod($path, 0777)) {\n return false;\n } // if\n } // if\n } else {\n return false;\n } // if\n \n return true;\n }",
"function MakeDir()\n{\t\t\n\t$sFileUrl = '';\n\t\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t$sFileUrl = trim($_REQUEST['file-path']);\n\t\n\t\n\t$bIsDirectoryCreate = false;\n\t$bIsDirectoryCreate = mkdir($sFileUrl, 0777, true);\n\t\n\tif($bIsDirectoryCreate === true)\n\t{\n\t\techo '<correct>correct create directory</correct>';\n\t} else\n\t{\n\t\techo '<fail>cant create directory</fail>';\n\t}\n}",
"public function makeDir($dirs, $mode = 0777);",
"public function makeDir($dir = '')\n {\n if (!is_dir($dir) && $dir !== '') {\n mkdir($dir, 0777);\n }\n }",
"private function createDir()\n {\n if ($this->dirCreated) {\n return;\n }\n\n $dir = $this->getDirFromStream($this->url);\n if (null !== $dir && !is_dir($dir)) {\n $this->errorMessage = null;\n set_error_handler(array($this, 'customErrorHandler'));\n $status = mkdir($dir, 0777, true);\n restore_error_handler();\n if (false === $status) {\n throw new \\UnexpectedValueException(sprintf('There is no existing directory at \"%s\" and its not buildable: '.$this->errorMessage, $dir));\n }\n }\n $this->dirCreated = true;\n }",
"public static function makeDir($path){\n $path = public_path() . $path . date(\"Y\") . date(\"m\") . \"/\";\n if(!file_exists($path)){//不存在则建立 \n $mk=@mkdir($path,0777, true); //权限 \n if(!$mk){\n echo \"No access for mkdir $path\";die();\n }\n @chmod($path,0777); \n } \n return $path; \n \n }",
"protected function createDirectories() {\n\t\t@mkdir($this->getAbsoluteBasePath(), 0777, TRUE); // @ - Directories may exist\n\t}",
"protected function createOtherDirs()\n {\n $this->createDir('Database', true);\n $this->createDir('Database/Migrations', true);\n $this->createDir('Database/Seeds', true);\n $this->createDir('Filters', true);\n $this->createDir('Language', true);\n $this->createDir('Validation', true);\n }",
"function smarty_core_create_dir_structure($params, &$smarty)\n{\n if (!file_exists($params['dir'])) {\n $_open_basedir_ini = ini_get('open_basedir');\n\n if (DIRECTORY_SEPARATOR=='/') {\n /* unix-style paths */\n $_dir = $params['dir'];\n $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);\n $_new_dir = (substr($_dir, 0, 1)=='/') ? '/' : getcwd().'/';\n if($_use_open_basedir = !empty($_open_basedir_ini)) {\n $_open_basedirs = explode(':', $_open_basedir_ini);\n }\n\n } else {\n /* other-style paths */\n $_dir = str_replace('\\\\','/', $params['dir']);\n $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);\n if (preg_match('!^((//)|([a-zA-Z]:/))!', $_dir, $_root_dir)) {\n /* leading \"//\" for network volume, or \"[letter]:/\" for full path */\n $_new_dir = $_root_dir[1];\n /* remove drive-letter from _dir_parts */\n if (isset($_root_dir[3])) array_shift($_dir_parts);\n\n } else {\n $_new_dir = str_replace('\\\\', '/', getcwd()).'/';\n\n }\n\n if($_use_open_basedir = !empty($_open_basedir_ini)) {\n $_open_basedirs = explode(';', str_replace('\\\\', '/', $_open_basedir_ini));\n }\n\n }\n\n /* all paths use \"/\" only from here */\n foreach ($_dir_parts as $_dir_part) {\n $_new_dir .= $_dir_part;\n\n if ($_use_open_basedir) {\n // do not attempt to test or make directories outside of open_basedir\n $_make_new_dir = false;\n foreach ($_open_basedirs as $_open_basedir) {\n if (substr($_new_dir, 0, strlen($_open_basedir)) == $_open_basedir) {\n $_make_new_dir = true;\n break;\n }\n }\n } else {\n $_make_new_dir = true;\n }\n\n if ($_make_new_dir && !file_exists($_new_dir) && !@mkdir($_new_dir, $smarty->_dir_perms) && !is_dir($_new_dir)) {\n $smarty->trigger_error(\"problem creating directory '\" . $_new_dir . \"'\");\n return false;\n }\n $_new_dir .= '/';\n }\n }\n}",
"function makeDir($UUID, $SUBDIR){\n #make a hash of the UUID\n $hash = md5($UUID);\n #specify the path to the directory to be made\n $dir = \"./\" . $SUBDIR . \"/\" . substr($hash,0,2) . \"/$hash\";\n # a if it already exits, return\n if(is_dir($dir)) { return $dir; }\n #otherwise, attempt to make it-\n if(!mkdir($dir,0777,true)){\n echo(\"Failed to create '$dir'. Function makeDir\\n\");\n return false;\n }\n else\n return $dir;\n}",
"protected function _createDir($dir)\r\n\t{\r\n\t\tif ( substr($dir, -1) != DIRECTORY_SEPARATOR )\r\n\t\t\t$dir .= DIRECTORY_SEPARATOR;\r\n\t\tif (!is_dir($dir))\r\n\t\t\tmkdir($dir,0744,TRUE);\r\n\t\treturn $dir;\r\n\t}",
"public function makeDir($dir){\n\t\tif(mkdir($dir))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"protected static function makeDir($path) {\n\t\tif (!file_exists($path)) {\n\t\t\tmkdir($path, 0777, true);\n\t\t}\n\t}",
"protected static function makeDir($path) {\n\t\tif (!file_exists($path)) {\n\t\t\tmkdir($path, 0777, true);\n\t\t}\n\t}",
"public function createFolders() {\n $this->output('Current directory: ' . getcwd());\n\n // user folder.\n try {\n \\File::read_dir($this->repo_home . '/' . $this->user_id);\n $this->output('User directory already exist.');\n } catch (Exception $e) {\n $p = new Process('mkdir ' . $this->repo_home . '/' . $this->user_id);\n $p->run();\n $this->output('Created user Directory: ' . $this->user_dir);\n }\n $this->user_dir = $this->repo_home . '/' . $this->user_id;\n\n // repo folder.\n try {\n \\File::read_dir($this->user_dir . '/' . $this->deploy_id);\n $this->output('Repository directory already exist.');\n } catch (Exception $ex) {\n $p = new Process('mkdir ' . $this->user_dir . '/' . $this->deploy_id);\n $p->run();\n $this->output('Created repository directory: ' . $this->repo_dir);\n }\n $this->repo_dir = $this->user_dir . '/' . $this->deploy_id;\n }",
"public function mkdir($dir)\n {\n }",
"private function makeDirectory(string $dir)\n {\n if (is_dir($dir)) {\n return $dir;\n }\n if (@mkdir($dir, 0775, true)) {\n return $dir;\n }\n\n return null;\n }",
"function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }",
"protected function _createDirs()\n {\n $dir = $this->_class_dir;\n \n if (! file_exists($dir)) {\n $this->_outln('Creating app directory.');\n mkdir($dir, 0755, true);\n } else {\n $this->_outln('App directory exists.');\n }\n \n $list = array('Layout', 'Locale', 'Public', 'View');\n \n foreach ($list as $sub) {\n if (! file_exists(\"$dir/$sub\")) {\n $this->_outln(\"Creating app $sub directory.\");\n mkdir(\"$dir/$sub\", 0755, true);\n } else {\n $this->_outln(\"App $sub directory exists.\");\n }\n }\n }",
"protected function _create_cache_dir()\n {\n if( ! file_exists($this->config['cache_dir']))\n {\n try\n {\n mkdir($this->config['cache_dir'], 0755, TRUE);\n }\n catch(Exception $e)\n {\n throw new Kohana_Exception($e);\n }\n }\n\n // Set the cache dir\n $this->cache_dir = $this->config['cache_dir'];\n }",
"public function createDirectory()\n\t{\n\t\tif(is_dir($this->storagePath) and is_writable($this->storagePath)===false)\n\t\t{\n\t\t\tchmod($this->storagePath,$this->permissions);\n\t\t}\n\t\t\n\t\tif(is_dir($this->storagePath) and is_writable($this->storagePath))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(!is_dir($this->storagePath) and $this->createDir===true and mkdir($this->storagePath,$this->permissions,true))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tthrow new \\RuntimeException(\"Cannot to create the storage path:\".$this->storagePath);\n\t}",
"public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }",
"function create_dir($dir){\r\n\t$arr = array($dir);\r\n\twhile(true){\r\n\t\t$dir = dirname($dir);\r\n\t\tif($dir == dirname($dir)){\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t$arr[] = $dir;\r\n\t}\r\n\t$arr = array_reverse($arr);\r\n\tforeach($arr as $dir){\r\n\t\tif(!is_dir($dir)){\r\n\t\t\tmkdir($dir);\r\n\t\t}\r\n\t}\r\n}",
"public function createDir()\n\t{\n\t\tif (!Core_File::isDir($this->_dir))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tCore_File::mkdir($this->_dir, CHMOD, TRUE);\n\t\t\t} catch (Exception $e) {}\n\t\t}\n\n\t\treturn $this;\n\t}",
"function makedir($dir)\n{\n\tglobal $config_vars;\n\t$ret = ForceDirectories($dir,$config_vars['dir_mask']);\n\ttouch ($dir . '/index.html');\n\treturn $ret;\n}",
"function mkdir() {\n\t\t$this->checkOnce();\n\t\t$nr = $this->getMain()->nr();\n\n\t\t$remoteCmd = 'cd '.$this->deployPath.' && mkdir v'.$nr;\n\t\t$this->ssh_exec($remoteCmd);\n\t}",
"function makeDIR($directory,$debugtxt=0,$nMode) {\n // Create payload directory if it doesn't exist:\n if (file_exists($directory)) {\n //if ($debugtxt) { echo \"<p>Directory <b>$directory</b> already exists </p>\"; }\n $result = true; // Return true as success is when the directory has either been created or already exists\n } else {\n // Make the new temp sub_folder for unzipped files\n if (!mkdir($directory, $nMode, true)) {\n if ($debugtxt) { \n echo \"<p>Error: Could not create folder <b>$directory</b> - check file permissions\";\n echo '<div class=\"admin_img\"><a href=\"'.$sSiteUrl.'/admin\" class=\"btn btn-lg btn-primary color-white\">Admin</a></div><div class=\"play_img\"><a href=\"'.$sSiteUrl.'/play\" class=\"btn btn-lg btn-primary color-white\">Play</a></div>';\n }\n $result= false;\n } else { \n //if ($debugtxt) { echo \"Folder <b>$directory</b> Created <br>\";} \n $result = true;\n } // END mkdir\n } // END if file exists\n return $result;\n }",
"function check_dir_exists($dir,$create=false) {\n\n global $CFG; \n\n $status = true;\n if(!is_dir($dir)) {\n if (!$create) {\n $status = false;\n } else {\n umask(0000);\n $status = mkdir ($dir,$CFG->directorypermissions);\n }\n }\n return $status;\n }",
"public static function create_dir($dir_to_create)\n\t{\n\t\tif (mkdir($dir_to_create))\n\t\t{\n\t\t\tif (self::findServerOS() == 'LINUX')\n\t\t\t{\n\t\t\t\t$perms = self::unix_file_permissions($dir_to_create);\n\t\t\t\tif ( $perms != '0755') @chmod($dirPath, 0755);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthrow new Exception(\"Error creating directory '{$dir_to_create}'\");\n\n\t\t\treturn false;\n\t\t}\n\t}",
"function create_folder($name)\n{\n $location = Path::get_repository_path() . 'lib/content_object/';\n Filesystem::create_dir($location . $name);\n}",
"function _createCacheDirectory() {\n // Create cache directory if it doesnt exist\n if (!file_exists($this->thumbnail_dir)) {\n @mkdir($this->thumbnail_dir, 0777, true);\n } else {\n // Try to make the directory writable\n @chmod($this->thumbnail_dir, 0777);\n }\n }",
"public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }",
"public function createDir($dirname, Config $config) {\n return $this->write($dirname . '/', '', $config);\n }",
"static public function newdir($dir, $depth=0) \n {\n if (is_file($dir)) return unlink($dir);\n // attempt to create the folder we want empty\n if (!$depth && !file_exists($dir)) {\n mkdir($dir, 0775, true);\n @chmod($dir, 0775); // let @, if www-data is not owner but allowed to write\n return;\n }\n // should be dir here\n if (is_dir($dir)) {\n $handle=opendir($dir);\n while (false !== ($entry = readdir($handle))) {\n if ($entry == \".\" || $entry == \"..\") continue;\n self::newDir($dir.'/'.$entry, $depth+1);\n }\n closedir($handle);\n // do not delete the root dir\n if ($depth > 0) rmdir($dir);\n // timestamp newDir\n else touch($dir);\n return;\n }\n }",
"public function makeDirIfNotExist(string $dir): void\n {\n if (!is_dir($dir))\n mkdir($dir, 0777, true);\n \n }",
"protected function createDirectories()\n {\n if (! is_dir(app_path('Http/Controllers/Teamwork'))) {\n mkdir(app_path('Http/Controllers/Teamwork'), 0755, true);\n }\n if (! is_dir(app_path('Listeners/Teamwork'))) {\n mkdir(app_path('Listeners/Teamwork'), 0755, true);\n }\n if (! is_dir(base_path('resources/views/teamwork'))) {\n mkdir(base_path('resources/views/teamwork'), 0755, true);\n }\n if (! is_dir(base_path('resources/views/teamwork/emails'))) {\n mkdir(base_path('resources/views/teamwork/emails'), 0755, true);\n }\n if (! is_dir(base_path('resources/views/teamwork/members'))) {\n mkdir(base_path('resources/views/teamwork/members'), 0755, true);\n }\n }",
"public static function createUserDirectory($dir = false){\n\t\t\t\n\t\t\t$dir_created = false;\n\n\t\t\tif(!Params::directory($dir)){\n\t\t\t\treturn $dir_created;\n\t\t\t}\n\n\t\t\tif (!file_exists($dir)) {\n\t\t\t\tif(@mkdir($dir, 0300, true)){\n\t\t\t\t\t$dir_created = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $dir_created;\n\n\t\t}",
"private function set_directory(){\n if(!is_dir($this->img_dir)) mkdir($this->img_dir);\n if(!is_dir($this->thumb_dir)) mkdir($this->thumb_dir);\n }",
"function makeDir($directory, $doubleCheck = true, $useCache = true)\n\t{\n\t\t$success = @ftp_mkdir($this->connection, $directory);\n\t\tif ($success==true)\n\t\treturn $success;\n\t\t \n\t\tif ($doubleCheck==true)\n\t\t{\n\t\t\treturn $this->dirExists($directory, $useCache);\n\t\t}\n\t\telse\n\t\treturn false;\n\t}",
"private function check_directory()\n\t{\n\t\tif (!is_dir(Kohana::config($this->type.'.cache_folder')))\n\t\t\tmkdir(Kohana::config($this->type.'.cache_folder'));\n\t}",
"function mkdir_p($directory, $mode = 0777) {\n if (!is_dir($directory)) {\n mkdir($directory, $mode, true);\n }\n}",
"function makeDirectories()\n {\n $pathFolderStr = '';\n foreach ($this->nestedArray as $i => $part) {\n $pathFolderStr .= $part.'/';\n if (!is_dir($this->baseDestinationFolder.$pathFolderStr)) {\n mkdir($this->baseDestinationFolder.$pathFolderStr);\n }\n }\n }",
"public static function createDirectory ($path) {\n\t\t\\clearstatcache(true, $path);\n\t\tif (!\\is_dir($path)) {\n\t\t\t\\mkdir($path, 493, true);\n\t\t}\n\t}",
"private static function createCurrentFolder() : bool {\n return is_dir(self::getCurrentFolder()) || mkdir(self::getCurrentFolder(), 0777, true);\n }",
"public function makeFolder()\n\t{\n\t\t$dir = new Folder($this->fileDir);\n\t\tif($dir->pwd() == null){\n\t\t\treturn new Folder($this->fileDir,true,0755);\n\t\t}\n\t}",
"public function makeDirectory($path, $mode = 0755, $isRecursive = true);",
"private function createGitKeepFile(string $directory): void\n {\n $path = MiPaPo::ComponentPath($directory.DIRECTORY_SEPARATOR.'.gitkeep');\n \\touch($path);\n }",
"public static function create()\n {\n $directories = [\n self::PATH.'/app',\n self::PATH.'/logs',\n self::PATH.'/bootstrap/cache',\n self::PATH.'/framework/cache',\n self::PATH.'/framework/views',\n ];\n\n foreach ($directories as $directory) {\n if (! is_dir($directory)) {\n function_exists('__vapor_debug') && __vapor_debug(\"Creating storage directory: $directory\");\n\n mkdir($directory, 0755, true);\n }\n }\n }",
"public function createServiceDirectories($path)\n\t{\n\t\tforeach ($this->directories as $directory) {\n\t\t\t$this->createDirectory($path . '/' . $directory);\n\t\t\t$this->createFile($path . '/' . $directory . '/.gitkeep');\n\t\t}\n\t}",
"public function createDirectory(Directory $directory): void;",
"function createDirectory($name, $path=ModuleCreator::PATH_MODULE_ROOT) \n {\n // create base directory\n/* $directoryName = $path.$name;\n if ( !file_exists( $directoryName ) ) {\n mkdir( $directoryName, ModuleCreator::DIR_MODE );\n }\n $this->values[ ModuleCreator::KEY_PATH_MODULE_ROOT ] = $directoryName.'/';\n*/\n $directoryName = $this->values[ ModuleCreator::KEY_PATH_MODULE_ROOT ];\n if ( !file_exists( $directoryName ) ) {\n mkdir( $directoryName, ModuleCreator::DIR_MODE );\n }\n \n // create sub directories\n // objects_bl\n// $blDirectory = $directoryName.ModuleCreator::PATH_OBJECT_BL;\n// $this->values[ ModuleCreator::KEY_PATH_MODULE_BL ] = $blDirectory;\n $blDirectory = $this->values[ ModuleCreator::KEY_PATH_MODULE_BL ];\n\n if ( !file_exists( $blDirectory ) ) {\n mkdir( $blDirectory, ModuleCreator::DIR_MODE );\n }\n \n // objects_da\n $daDirectory = $directoryName.ModuleCreator::PATH_OBJECT_DA;\n if ( !file_exists( $daDirectory ) ) {\n mkdir( $daDirectory, ModuleCreator::DIR_MODE );\n }\n \n // objects_pages\n $pageDirectory = $directoryName.ModuleCreator::PATH_OBJECT_PAGES;\n if ( !file_exists( $pageDirectory ) ) {\n mkdir( $pageDirectory, ModuleCreator::DIR_MODE );\n }\n \n // templates\n $templateDirectory = $directoryName.ModuleCreator::PATH_TEMPLATES;\n if ( !file_exists( $templateDirectory ) ) {\n mkdir( $templateDirectory, ModuleCreator::DIR_MODE );\n }\n \n }",
"function generate_directory($id){\n $filename = \"intranet/usuarios/\" . $id . \"/uploads/\";\n if (!file_exists($filename)) {\n mkdir($filename, 0777, true);\n }\n }",
"public function prepareDirectory(): void\n {\n if (!file_exists($makerRepoPath = sprintf('%s/maker-repo', $this->cachePath))) {\n MakerTestProcess::create(sprintf('git clone %s %s', $this->rootPath, $makerRepoPath), $this->cachePath)->run();\n }\n\n if (!$this->fs->exists($this->flexPath)) {\n $this->buildFlexSkeleton();\n }\n\n if (!$this->fs->exists($this->path)) {\n try {\n // let's do some magic here git is faster than copy\n MakerTestProcess::create(\n '\\\\' === \\DIRECTORY_SEPARATOR ? 'git clone %FLEX_PATH% %APP_PATH%' : 'git clone \"$FLEX_PATH\" \"$APP_PATH\"',\n \\dirname($this->flexPath),\n [\n 'FLEX_PATH' => $this->flexPath,\n 'APP_PATH' => $this->path,\n ]\n )\n ->run();\n\n // In Window's we have to require MakerBundle in each project - git clone doesn't symlink well\n if ($this->isWindows) {\n $this->composerRequireMakerBundle($this->path);\n }\n\n // install any missing dependencies\n $dependencies = $this->determineMissingDependencies();\n if ($dependencies) {\n MakerTestProcess::create(sprintf('composer require %s', implode(' ', $dependencies)), $this->path)\n ->run();\n }\n\n $this->changeRootNamespaceIfNeeded();\n\n file_put_contents($this->path.'/.gitignore', \"var/cache/\\nvendor/\\n\");\n\n MakerTestProcess::create('git diff --quiet || ( git config user.name \"symfony\" && git config user.email \"[email protected]\" && git add . && git commit -a -m \"second commit\" )',\n $this->path\n )->run();\n } catch (\\Exception $e) {\n $this->fs->remove($this->path);\n\n throw $e;\n }\n } else {\n MakerTestProcess::create('git reset --hard && git clean -fd', $this->path)->run();\n }\n }",
"function createDirectory($training_id){\n\t\t$main_folder = \"./../training_documents\";\n\t\tif(is_dir($main_folder)===false){\n\t\t\tmkdir($main_folder);\t\t\n\t\t}\n\t\tif(is_dir($main_folder.\"/\".$training_id)===false){\n\t\t\tmkdir($main_folder.\"/\".$training_id);\t\n\t\t}\n\t\treturn $training_id;\n\t}",
"public function createDir($dirName) {\n if(!file_exists($dirName)){\n if(mkdir($dirName, 0755))\n\treturn TRUE;\n else Throw new AMUECannotCreateDir($dirName);\n }else Throw new AMUEFileExists($dirName);\n }",
"function create_user_dir(){\n\t$safeUserDir=bin2hex(random_bytes(4));\n\t$oldDir=getcwd();\n\tchdir(FS_PATH);\n\tif(mkdir(\"$safeUserDir\")) {\n\tchmod(\"$safeUserDir\",0755); //owner=r,w,x group=r,x other=r,x\n\tchdir($oldDir);\n\treturn \t$safeUserDir;\n\t} else {\n\t\tchdir($oldDir);\n\t\terror_log(\"create_user_dir: Could not create user directory in \".FS_PATH,0);\n\t\treturn false;\n\t}\n}",
"private static function createDirectory($path)\n {\n $success = true;\n\n if (! is_dir($path))\n $success = mkdir($path, 0700, true);\n\n if ($success === false)\n throw new RuntimeException(\"Could not create $path\");\n }",
"public function createDirectoriesIfTheyDontExist()\n\t{\n\t\t$directories = array(\n\t\t\t$this->getIntegrationDirectory(),\n\t\t\t$this->getProductsProcessingDirectory(),\n\t\t\t$this->getProductsProcessedDirectory(),\n\t\t\t$this->getStockProcessingDirectory(),\n\t\t\t$this->getStockProcessedDirectory()\n\t\t);\n\t\tforeach ($directories as $directory){\n\t\t\tif(!file_exists($directory)){\n\t\t\t\tmkdir($directory);\n\t\t\t}\n\t\t}\n\t}",
"function mkdirp($dirname, $mode = 0777) {\n if (!is_dir($dirname)) {\n mkdir($dirname, $mode, true);\n }\n}",
"function createDirectory($dirname)\n {\n $ftpconnection = ssh2_sftp ($this->connection);\n $dircreated = ssh2_sftp_mkdir($ftpconnection, $dirname, true);\n if(!$dircreated) \n {\n $this->debug(\"Directory not created: \".$dirname);\n }\n return $dircreated;\n }",
"function mkImageDir()\r\n {\r\n $buff = wp_upload_dir(); \r\n if (trim($this->config->get('imgPath')) != (str_replace(get_bloginfo('wpurl'), '', $buff['baseurl']) . '/')) {\r\n $this->uploadMediaOn = false;\r\n }\r\n \r\n if (!file_exists($this->rootPath . $this->config->get('imgPath'))) mkdir($this->rootPath . $this->config->get('imgPath'), 0777);\r\n \r\n if ($this->uploadMediaOn and get_option('uploads_use_yearmonth_folders')) {\r\n $this->imageDir = date('Y') . '/';\r\n $imageDirPath = $this->rootPath . $this->config->get('imgPath') . $this->imageDir;\r\n if (!file_exists($this->imageDir)) mkdir($this->imageDir, 0777);\r\n \r\n $this->imageDir = $this->imageDir . date('m') . '/';\r\n if (!file_exists($this->imageDir)) mkdir($this->imageDir, 0777);\r\n }\r\n return true;\r\n }",
"private function mustCreateFolder(){\n }",
"protected function createRealTestdir() {}",
"public static function mkDir($args)\n {\n $opts = System::_parseArgs($args, 'pm:');\n if (PEAR::isError($opts)) {\n return System::raiseError($opts);\n }\n\n $mode = 0777; // default mode\n foreach ($opts[0] as $opt) {\n if ($opt[0] == 'p') {\n $create_parents = true;\n } elseif ($opt[0] == 'm') {\n // if the mode is clearly an octal number (starts with 0)\n // convert it to decimal\n if (strlen($opt[1]) && $opt[1]{0} == '0') {\n $opt[1] = octdec($opt[1]);\n } else {\n // convert to int\n $opt[1] += 0;\n }\n $mode = $opt[1];\n }\n }\n\n $ret = true;\n if (isset($create_parents)) {\n foreach ($opts[1] as $dir) {\n $dirstack = array();\n while ((!file_exists($dir) || !is_dir($dir)) &&\n $dir != DIRECTORY_SEPARATOR) {\n array_unshift($dirstack, $dir);\n $dir = dirname($dir);\n }\n\n while ($newdir = array_shift($dirstack)) {\n if (!is_writeable(dirname($newdir))) {\n $ret = false;\n break;\n }\n\n if (!mkdir($newdir, $mode)) {\n $ret = false;\n }\n }\n }\n } else {\n foreach($opts[1] as $dir) {\n if ((@file_exists($dir) || !is_dir($dir)) && !mkdir($dir, $mode)) {\n $ret = false;\n }\n }\n }\n\n return $ret;\n }",
"public function createAppDirectory() {\n $dir = app_path() . '/EasyApi';\n if (!file_exists($dir)) {\n mkdir($dir);\n }\n }",
"public function mkdir($path)\n {\n \n }",
"function CreateDirectory($dirname=false, $checkbase=TEMP_DIRECTORY, $permission=0755)\n{\n\tif (!$dirname) {\n\t\treturn false;\n\t}\n\n\tif (is_dir($dirname)) {\n\t\treturn true;\n\t}\n\n\t$dirname = str_replace($checkbase, '', $dirname);\n\n\t$parts = explode('/', $dirname);\n\t$result = false;\n\t$size = count($parts);\n\t$base = $checkbase;\n\tfor ($i = 0; $i < $size; $i++) {\n\t\tif ($parts[$i] == '') {\n\t\t\tcontinue;\n\t\t}\n\t\t$base .= '/' . $parts[$i];\n\t\tif (!is_dir($base)) {\n\t\t\t$result = mkdir($base, $permission);\n\t\t\tif (!$result) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tchmod($base, $permission);\n\t\t}\n\t}\n\treturn true;\n}",
"function __construct($dir = null, $make_dir_if_not_exists = false)\n {\n $this->dirInit();\n $this->zipInit();\n $this->setDir($dir,$make_dir_if_not_exists);\n }",
"protected function createDirectoryForTemporaryFiles(): void\n\t{\n\t\tif (! $this->filesystem->isDirectory(storage_path('tmp'))) {\n\t\t\t$this->filesystem->makeDirectory(storage_path('tmp'));\n\t\t}\n\t}",
"function create_folder($dir) {\n\t\t// explode\n\t\t$explode = explode('/', $dir);\n\t\t$url = WWW_ROOT;\n\n\t\tif(!is_dir(WWW_ROOT.$dir)) {\n\t\t\t// loop through\n\t\t\tforeach($explode as $e) {\n\t\t\t\t$url .= $e.DS;\n\t\t\t\tif(!is_dir($url)) {\n\t\t\t\t\tmkdir($url);\n\t\t\t\t\tchmod($url, 0777);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private function cacheFolder(){\n $cachePath = ROOT . \"/\" . $this->_config['cachePath'];\n if (!is_dir( $cachePath )) { // no\n if (!mkdir( $cachePath, 0755, true)) { // so make it\n if (!is_dir( $cachePath )) { // check again to protect against race conditions\n\n // uh-oh, failed to make that directory\n $this->sendErrorImage(\"Failed to create cache directory at: $cachePath\");\n }\n }\n }\n }",
"function wpdev_mk_dir($path, $mode = 0777) {\r\n\r\n if (DIRECTORY_SEPARATOR == '/')\r\n $path=str_replace('\\\\','/',$path);\r\n else\r\n $path=str_replace('/','\\\\',$path);\r\n\r\n if ( is_dir($path) || empty($path) ) return true; // Check if directory already exists\r\n if ( is_file($path) ) return false; // Ensure a file does not already exist with the same name\r\n\r\n $dirs = explode(DIRECTORY_SEPARATOR , $path);\r\n $count = count($dirs);\r\n $path = $dirs[0];\r\n for ($i = 1; $i < $count; ++$i) {\r\n if ($dirs[$i] !=\"\") {\r\n $path .= DIRECTORY_SEPARATOR . $dirs[$i];\r\n if ( !is_dir($path) && ( strpos($_SERVER['DOCUMENT_ROOT'],$path)===false ) ) {\r\n if (!is_dir($path) && !( mkdir($path, 0777) ) ) {\r\n return false;\r\n }\r\n /*@ chmod( $path, 0777 );*/\r\n }\r\n }\r\n }\r\n return true;\r\n }",
"protected function makeDirectory($path)\n {\n if (!$this->files->exists($path)) {\n if (!$this->files->isDirectory($path)) {\n $this->files->makeDirectory($path, 0755, true, true);\n }\n }\n }",
"protected function init()\n {\n $dir = $this->getDir();\n\n if (!file_exists($dir)) {\n mkdir($dir, 0755, true);\n }\n }",
"function makeDir($strPath, $strSeparator)\n\t{\n\t\t$bResult = true;\n\t\tif (!empty($strPath) && !empty($strSeparator))\n\t\t{\n\t\t\t$arrPath = explode($strSeparator, $strPath);\n\t\t\tif (is_array($arrPath) && count($arrPath)>0)\n\t\t\t{\n\t\t\t\t$strPathTemp = $strSeparator;\n\t\t\t\t$intCount = count($arrPath);\n\t\t\t\t$intFrom = 0;\n\t\t\t\t$intTo = $intCount;\n\t\t\t\t//check if have first strSeparator then cancel it\n\t\t\t\tif (strpos($strPath, $strSeparator)==0)\n\t\t\t\t{\n\t\t\t\t\t$intFrom = 1;\n\t\t\t\t}\n\t\t\t\t//check if have last strSeparator then cancel it\n\t\t\t\tif (strrpos($strPath, $strSeparator)==(strlen($strPath)-1))\n\t\t\t\t{\n\t\t\t\t\t$intTo = $intCount-1;\n\t\t\t\t}\n\t\t\t\tfor ($i=$intFrom; $i<$intTo; $i++)\n\t\t\t\t{\n\t\t\t\t\t$strPathTemp .= $arrPath[$i] . $strSeparator;\n\t\t\t\t\tif (!file_exists($strPathTemp) && $bResult)\n\t\t\t\t\t{\n\t\t\t\t\t\t$bResult = mkdir($strPathTemp, 0777, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t$bResult = false;\n\t\t}\n\t\treturn $bResult;\n\t}",
"protected function createDestinationDirectory()\n {\n if ($this->fs->exists($this->destinationDirectory)) {\n if (!$this->overwrite) {\n throw new RuntimeException(t('The directory %s already exists.', $this->destinationDirectory));\n }\n if ($this->fs->isFile($this->destinationDirectory)) {\n throw new RuntimeException(t('The destination %s is a file, not a directory.', $this->destinationDirectory));\n }\n\n return;\n }\n if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {\n $this->output->writeln(t('Creating directory %s', $this->destinationDirectory));\n }\n if (!$this->fs->makeDirectory($this->destinationDirectory)) {\n throw new RuntimeException(t('Failed to create the directory %s.', $this->destinationDirectory));\n }\n }",
"public function createCacheDirectory() {\n\t\tif (!file_exists(dirname($this->cache_file))) {\n\t\t\tif (!@mkdir(dirname($this->cache_file))) {\n\t\t\t\tdie('Please create the cache directory: '.dirname($this->cache_file).' and make sure it\\'s writeable by this script.');\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} elseif (file_exists(dirname($this->cache_file)) && !is_writable(dirname($this->cache_file))) {\n\t\t\tdie('Cannot write to cache directory. Please make it writeable.');\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"protected function createSubDirectories()\n {\n // Form the full path with sub dirs for the new command\n // e.g. \"my-project/commands/my/new/Cmd.php\"\n $this->command_dir_path = $this->console->getConfig()->getBlacksmithCommandsPath() . DIRECTORY_SEPARATOR . $this->arg->getSubDirPath();\n\n if (!file_exists($this->command_dir_path)) {\n mkdir($this->command_dir_path, 0755, true);\n }\n }",
"protected function makeDirectory($path)\r\n {\r\n if (!is_dir(dirname($path))) {\r\n mkdir(dirname($path), 0777, true);\r\n }\r\n }",
"protected function makeDirectory($path)\r\n {\r\n if (!is_dir(dirname($path))) {\r\n mkdir(dirname($path), 0777, true);\r\n }\r\n }"
] | [
"0.7047838",
"0.6582252",
"0.6573644",
"0.6570274",
"0.6452161",
"0.64423656",
"0.64297956",
"0.6390685",
"0.6366765",
"0.6334541",
"0.6316199",
"0.62994957",
"0.629752",
"0.62854064",
"0.62601566",
"0.6251981",
"0.6251825",
"0.6251328",
"0.6238196",
"0.62336993",
"0.6232054",
"0.621973",
"0.6203034",
"0.61960495",
"0.6189337",
"0.6158175",
"0.6147642",
"0.61329377",
"0.612369",
"0.6114452",
"0.6100788",
"0.6092715",
"0.6077082",
"0.6077082",
"0.6052226",
"0.60240126",
"0.60142964",
"0.6013051",
"0.6007124",
"0.5992855",
"0.5992795",
"0.59759325",
"0.5962152",
"0.5945152",
"0.594204",
"0.5926673",
"0.5926664",
"0.59115565",
"0.59073794",
"0.5881572",
"0.5865717",
"0.5861826",
"0.5858181",
"0.5852517",
"0.5840438",
"0.58346456",
"0.58305496",
"0.5815522",
"0.57963747",
"0.578937",
"0.57840484",
"0.5782883",
"0.5778609",
"0.57763517",
"0.57648385",
"0.5744186",
"0.5733693",
"0.57319367",
"0.5721196",
"0.57058907",
"0.5695058",
"0.5685419",
"0.56768227",
"0.56635666",
"0.56598216",
"0.56529117",
"0.56324613",
"0.56016636",
"0.55933124",
"0.5592629",
"0.5589951",
"0.55723536",
"0.5560626",
"0.5560043",
"0.5559163",
"0.555642",
"0.55421656",
"0.55344385",
"0.5528659",
"0.5522742",
"0.5522142",
"0.55219823",
"0.550826",
"0.5505668",
"0.5504361",
"0.55043304",
"0.5497985",
"0.5497215",
"0.5490646",
"0.5490646"
] | 0.7137122 | 0 |
function updateAutoload Add a psr4 configuration to Config/Autoload.php file | protected function updateAutoload() {
$Autoload = new \Config\Autoload;
$psr4 = $Autoload->psr4;
if (isset($psr4[ucfirst($this->module_name)])){
return false;
}
$file = fopen(APPPATH . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR . 'Autoload.php','r');
if (!$file) {
CLI::error("Config/Autoload.php nor readable!");
return false;
}
$newcontent = '';
$posfound = false;
$posline = 0;
if (CLI::getOption('f')== '') {
$psr4Add = " '".ucfirst($this->module_name) . "' => ". 'APPPATH . ' ."'Modules\\" . ucfirst($this->module_name)."',";
} else {
$psr4Add = " '".ucfirst($this->module_name) . "' => ". 'ROOTPATH . ' . "'".$this->module_folderOrig."\\" . ucfirst($this->module_name)."',";
}
while (($buffer = fgets($file, 4096)) !== false) {
if ($posfound && strpos($buffer, ']')) {
//Last line of $psr4
$newcontent .= $psr4Add."\n";
$posfound = false;
}
if ($posfound && $posline > 3 && substr(trim($buffer),-1) != ',') {
$buffer = str_replace("\n", ",\n", $buffer);
}
if (strpos($buffer, 'public $psr4 = [')) {
$posfound = true;
$posline = 1;
//First line off $psr4
}
if ($posfound) {
$posline ++;
}
$newcontent .= $buffer;
}
$file = fopen(APPPATH . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR . 'Autoload.php','w');
if (!$file) {
CLI::error("Config/Autoload.php nor writable!");
return false;
}
fwrite($file,$newcontent);
fclose($file);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setupAutoload()\n {\n static::$autoload or spl_autoload_register(\n $this->psr4LoaderFor(__NAMESPACE__, __DIR__),\n true,\n true\n );\n\n static::$autoload = true;\n }",
"public function RegisterAutoload()\n {\n spl_autoload_register(array(__CLASS__,'autoload'));\n }",
"private function regenerate_autoloader() {\n\t\t$rm = $this->composer->getRepositoryManager();\n\t\t$this->composer->getAutoloadGenerator()->dump(\n\t\t\t$this->composer->getConfig(),\n\t\t\t$this->composer->getRepositoryManager()->getLocalRepository(),\n\t\t\t$this->composer->getPackage(),\n\t\t\t$this->composer->getInstallationManager(),\n\t\t\t'composer'\n\t\t);\n\t}",
"private static function libAutoload(): void\n {\n \\spl_autoload_register('self::autoload');\n }",
"public function registerAutoLoad() {\n spl_autoload_register(array($this, \"load\"), true, true);\n }",
"function clientAutoload() {\n\t\n\tforeach ($this->config->item('client_autoload') as $call=>$fileNames) {\n\t if (method_exists($this,$call) && count($fileNames)) {\n\t\tforeach ($fileNames as $f) {\n\t\t $this->$call($f);\n\t\t}\n\t }\n\t}\n\t\n }",
"protected function registerAutoload()\n {\n spl_autoload_register(function($class)\n {\n foreach ($this->foldersToAutoload as $folder)\n {\n if (file_exists(getcwd() . \"/$folder/$class.php\"))\n {\n /** @noinspection PhpIncludeInspection */\n require_once getcwd() . \"/$folder/$class.php\";\n }\n }\n });\n }",
"public static function registerAutoload()\n\t{\n\t\tspl_autoload_register(array('AgileProfiler', 'autoload'));\n\t}",
"public function registerAutoload()\n {\n return spl_autoload_register(array('Proem\\Loader', 'load'));\n }",
"private static function composerAutoload(): void\n {\n self::require(ROOT . '/vendor/autoload.php');\n }",
"private function setAutoLoader() {\n \n spl_autoload_register(array('self', 'autoLoader'));\n \n }",
"public static function AutoLoad(){\n spl_autoload_register(function ($file_name){\n $name = preg_replace('~(.*[\\\\\\\\]([A-Z]\\w+))~im', '$2', $file_name);\n MyAutoload::loadControllers($name);//'HomeController'\n MyAutoload::loadModules($name);//'Controller'\n MyAutoload::loadModules($name);//'Model'\n MyAutoload::loadModules($name);//'Config'\n MyAutoload::loadModels($name);//'Tasks'\n MyAutoload::loadRoutes();//'Tasks'\n });\n }",
"public static function autoload()\n {\n spl_autoload_register(array(__CLASS__,'load'));\n }",
"protected function _initAutoload()\n {\n // It is necessary to manually add all of the new components as they are created in the application architecture\n $nameSpaceToPath = array(\n// Example of Game package contained under module\n// 'Model_Game' => 'models/Game'\n );\n\n $autoLoaderResource = $this->getResourceLoader();\n\n /* The Autoloader resource comes with the following mappings to assume subdirectories under the module directory:\n forms/, models/, models/mapper, models/DbTable, plugins/, services/, and views/.\n Create references to the others (in this case, the \"controllers/\" directory since it contains the Abstract */\n $autoLoaderResource\n ->addResourceType('controller', 'controllers', 'Controller');\n\n // now loop through and load the mapper and DbTable for each of the model components\n foreach($nameSpaceToPath as $ns => $path) {\n $autoLoaderResource->addResourceType('mapper',$path.'/mappers',$ns.'_Mapper');\n $autoLoaderResource->addResourceType('DbTable',$path.'/DbTable',$ns.'_DbTable');\n }\n\n return $autoLoaderResource;\n }",
"function autoLoad() {\n\t$path = dirname(__FILE__);\n\n\t// Autoload manual important files\n\t$Autoload = array();\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'Utils' . DIRECTORY_SEPARATOR . 'lexa-xml-serialization.php';\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'Client' . DIRECTORY_SEPARATOR . 'Builder' . DIRECTORY_SEPARATOR . 'PartyBuilder.php';\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'ServiceConnection' . DIRECTORY_SEPARATOR . 'ServiceConnection.php';\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'ServiceConnection' . DIRECTORY_SEPARATOR . 'Communication.php';\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'Client' . DIRECTORY_SEPARATOR . 'Party.php';\n\n\n\tforeach ($Autoload as &$a) {\n\t\tif (file_exists($a)) {\n\t\t\trequire_once($a);\n\t\t}\n\t}\n\n\n\t$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);\n\tforeach ($objects as $name => $object) {\n\t\tif (substr($object->getBasename(), strpos($object->getBasename(), \".\")) == '.php') {\n\t\t\tif (!stristr($object->getBasename(), 'test')) {\n\t\t\t\trequire_once($object->getPath() . DIRECTORY_SEPARATOR . $object->getBasename());\n\t\t\t}\n\t\t}\n\t}\n}",
"protected function _initAutoload() {\r\n// \t\t\t'basePath' => APPLICATION_PATH,\r\n// \t\t\t'namespace' => '',\r\n// \t\t\t'resourceTypes' => array(\r\n// \t\t\t\t'model' => array(\r\n// \t\t\t\t\t'path' => 'models/',\r\n// \t\t\t\t\t'namespace' => 'Model_'\r\n// \t\t\t\t)\r\n// \t\t\t)\r\n// \t\t));\r\n\r\n\t\tZend_Loader::loadFile('Respon.php', LIBRARY_PATH . '/Base');\r\n\r\n\t}",
"private function setConfigurations(): void\n {\n if (file_exists($this->projectRootPath->getPath() . '/composer.json')) {\n $content = file_get_contents($this->projectRootPath->getPath() . '/composer.json');\n $content = json_decode($content, true);\n if (!empty($content[\"autoload\"][\"psr-4\"])) {\n foreach ($content[\"autoload\"][\"psr-4\"] as $namespace => $src) {\n $this->nameSpacesBase[] = $namespace . \"\\\\\";\n }\n }\n }\n }",
"public function auto_load() {\n\n spl_autoload_register(function ($class) {\n\n // Getting the file path for checking if it exists.\n\n require_once ROOT . '/app/controllers/' . $class . '.php';\n\n });\n }",
"public function buildAutoloadInformationFiles() {}",
"static function autoload()\r\n\t{\r\n\t\t\r\n\t}",
"public static function registerAutoloader(){\n\t\tspl_autoload_register(__NAMESPACE__ . \"\\\\Jolt::autoload\");\n\t}",
"public static function registerAutoloader()\n\t{\n\t\tspl_autoload_register(__NAMESPACE__.'\\\\Core::autoload');\n\t}",
"public static function register_autoloader()\n {\n }",
"public function onPostAutoloadDump(Event $event): void\n {\n /** @var \\Narrowspark\\Automatic\\Configurator $configurator */\n $configurator = $this->container->get(ConfiguratorContract::class);\n\n if (self::$configuratorsLoaded) {\n $configurator->reset();\n }\n\n $lock = $this->container->get(Lock::class);\n $vendorDir = $this->container->get('vendor-dir');\n $classMap = (array) $lock->get(self::LOCK_CLASSMAP);\n\n foreach ((array) $lock->get(ConfiguratorInstaller::LOCK_KEY) as $packageName => $classList) {\n foreach ($classMap[$packageName] as $class => $path) {\n if (! \\class_exists($class)) {\n require_once \\str_replace('%vendor_path%', $vendorDir, $path);\n }\n }\n\n /** @var \\Narrowspark\\Automatic\\Common\\Configurator\\AbstractConfigurator $class */\n foreach ($classList as $class) {\n $reflectionClass = new ReflectionClass($class);\n\n if ($reflectionClass->isInstantiable() && $reflectionClass->hasMethod('getName')) {\n $configurator->add($class::getName(), $reflectionClass->getName());\n }\n }\n }\n\n self::$configuratorsLoaded = true;\n }",
"protected function _initAutoload () {\n\t\t// configure new autoloader\n\t\t$autoloader = new Zend_Application_Module_Autoloader (array ('namespace' => 'Admin', 'basePath' => APPLICATION_PATH.\"/modules/admin\"));\n\n\t\t// autoload validators definition\n\t\t$autoloader->addResourceType ('Validate', 'validators', 'Validate_');\n\t}",
"public static function registerAutoloader() {\n spl_autoload_register(__NAMESPACE__ . \"\\\\Framework::autoload\");\n }",
"public function registerAutoload()\n\t{\n\t\treturn spl_autoload_register(array(&$this, 'autoload'));\n\t}",
"public function registerAutoloaders()\n {\n }",
"private function _initAutoloaderConfig()\n {\n require_once __DIR__ . '/Loader/AutoloaderFactory.php';\n \n AutoloaderFactory::factory(array(\n 'Spark\\Loader\\StandardAutoloader' => array(\n 'autoregister_framework' => true\n ),\n ));\n }",
"protected function composerAutoloadDev() :void\n {\n $file = app_path('composer.json');\n $contents = Storage::get($file);\n\n $json = json_decode($contents, true);\n $json['autoload-dev'] = [\n 'classmap' => [\n 'tests/'\n ]\n ];\n $json = json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n\n Storage::put($file, $json);\n }",
"public function addAutoloader()\n {\n if (! $this->autoloaderRegistered) {\n spl_autoload_unregister(array(Varien_Autoload::instance(), 'autoload'));\n require_once Mage::getBaseDir('lib') . '/Wallee/Sdk/autoload.php';\n spl_autoload_register(array(Varien_Autoload::instance(), 'autoload'));\n\n set_include_path(get_include_path() . PATH_SEPARATOR . Mage::helper('wallee_payment')->getGenerationDirectoryPath());\n\n spl_autoload_register(\n function ($class) {\n if (strpos($class, 'Wallee_Payment_Model_PaymentMethod') === 0) {\n $file = Mage::helper('wallee_payment')->getGenerationDirectoryPath() . DS . uc_words($class, DIRECTORY_SEPARATOR) . '.php';\n if (file_exists($file)) {\n require $file;\n }\n }\n }, true, true\n );\n $this->autoloaderRegistered = true;\n }\n }",
"protected function loadAutoloader()\n {\n new Autoloader();\n }",
"public static function __autoload()\n\t{\n\t\tself::$FPATH = dirname(__DIR__);\n\t\tself::$APATH = self::detect_project();\n\n\t\tspl_autoload_register(array(__CLASS__, 'load'));\n\n\t\tself::cache_files();\n\t\tself::import_initializers();\n\t}",
"function classAutoload($class_name) {\n if (file_exists( __DIR__ . '/includes/classes/' . $class_name . '.php')) {\n require_once __DIR__ . '/includes/classes/' . $class_name . '.php';\n }\n}",
"protected function _initAutoload() {\n\t\t$resourceLoader = new Zend_Loader_Autoloader_Resource(array(\n\t\t\t'basePath' => dirname(__FILE__),\n\t\t\t'namespace' => false\n\t\t));\n\t\t$resourceLoader->addResourceType('model', 'models', 'Model_');\n\t\t$resourceLoader->addResourceType('default-form', 'modules/default/forms', 'Form_');\n\t}",
"public static function init_autoload() {\n spl_autoload_register(function ($class) {\n self::autoload_path($class);\n });\n }",
"public function registerAutoloaders()\n {\n $loader = new Loader();\n \n $loader->setNamespaces(array(\n 'App\\Install\\Controllers' => __DIR__ . '/controllers/',\n 'App\\Install\\Tags' => __DIR__ . '/tags/'\n ));\n $loader->register();\n }",
"static function _shfw_autoloader()\n {\n\t\tinclude_once(BASEPATH.'config'.DIRECTORY_SEPARATOR.'autoload.php');\n\n\t\tif ( ! isset($autoload))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Autoload helpers.\n\t\tforeach ($autoload['helper'] as $type)\n\t\t{\t\t\t\n\t\t\tself::loadHelper($type);\n\t\t}\n\n\t\t// Autoload core components.\n\t\tforeach ($autoload['core'] as $type)\n\t\t{\t\t\t\n\t\t\tself::initCoreComponent($type);\n\t\t}\n\n\t\t/*\n\t\tif(SHIN_Core::$_benchmark){\n\t\t\tSHIN_Core::$_benchmark->mark('code_start');\n\t\t}\n\t\t*/\n\t\t\n\t\t// Autoload libraries.\n\t\tforeach ($autoload['libraries'] as $type)\n\t\t{\n\t\t\tself::loadLibrary($type, TRUE);\n\t\t}\n\n\t\t// Autoload models.\n\t\tforeach ($autoload['models'] as $type)\n\t\t{\n\t\t\tself::loadModel($type, TRUE);\n\t\t}\n\t}",
"public static function autoload()\n {\n if (file_exists(__DIR__ . '/Stringprep/vendor/autoload.php')) {\n require_once __DIR__ . '/Stringprep/vendor/autoload.php';\n } else {\n require_once __DIR__ . '/../../bundle/vendor/autoload.php';\n }\n }",
"private function _enableAutoloader()\n {\n Zend_Loader_Autoloader::getInstance()->pushAutoloader(array('P4Cms_Loader', 'autoload'));\n }",
"public function initializeConfiguration(){\n //initial Configured autoload\n if(count($GLOBALS['config']['autoload']))\n self::autoload($GLOBALS['config']['autoload']);\n\n\n }",
"public function getAutoloaderConfig()\n\t{\n\t}",
"static function getAutoload() {\n\t\treturn systemAutoload::getInstance();\n\t}",
"protected function _initAutoload() {\n $autoLoader = Zend_Loader_Autoloader::getInstance();\n\n $resourceLoader = new Zend_Loader_Autoloader_Resource(array(\n 'basePath' => APPLICATION_PATH,\n 'namespace' => '',\n 'resourceTypes' => array(\n 'model' => array(\n 'path' => 'models/',\n 'namespace' => 'Model_'\n ), \n ),\n ));\n \n \n $resourceLoader = new Zend_Loader_Autoloader_Resource(array(\n 'basePath' => APPLICATION_PATH,\n 'namespace' => '',\n 'resourceTypes' => array(\n 'model' => array(\n 'path' => 'models/Functions',\n 'namespace' => 'Model_'\n )\n ),\n ));\n \n // Return it so that it can be stored by the bootstrap\n return $autoLoader;\n }",
"function testPsr4() {\n\n // Prepare the class finder.\n $finder = new \\xautoload_ClassFinder_NamespaceOrPrefix();\n $loader = new \\xautoload_ClassLoader_NoCache($finder);\n\n $finder->registerNamespacePlugin('Drupal\\ex_ample\\\\', new \\xautoload_FinderPlugin_Psr4(), 'test://base/lib');\n\n $this->assertLoadClass($loader, 'Drupal\\ex_ample\\Psr4\\Foo_Bar', 'test://base/lib/Psr4/Foo_Bar.php');\n }",
"public static function autoload() {\n spl_autoload_register(function($class) {\n $prefix = __CLASS__ . '\\\\';\n if (strpos($class, $prefix) === 0) {\n // Remove vendor from name.\n $class = substr($class, strlen(__NAMESPACE__) + 1);\n // Convert namespace separator to directory ones.\n $class = str_replace('\\\\', DIRECTORY_SEPARATOR, $class);\n // Prefix with this file's directory.\n $class = __DIR__ . DIRECTORY_SEPARATOR . $class;\n\n require \"$class.php\";\n\n return true;\n }\n\n return false;\n });\n }",
"function __mashineAutoload($class_name)\n{\n if (preg_match(\"/([a-zA-Z0-9]*)ApiController$/\", $class_name, $matches)) {\n $api_path = preg_replace(\"/plugins.*/\", \"controllers\".DS.\"api\", __FILE__);\n\n $file = $api_path.DS.strtolower($matches[1]).\".php\";\n if (is_file($file)) {\n include $file;\n }\n }\n}",
"protected function _initAutoloader()\n {\n $loader = new StandardAutoloader();\n $loader->registerNamespace('Doctrine', PROJECT_PATH.'/library/Doctrine')\n ->registerNamespace('App', PROJECT_PATH.'/library/App')\n ->registerNamespace('Domain', PROJECT_PATH.'/library/Domain')\n ->registerNamespace('Gedmo', PROJECT_PATH.'/library/Doctrine/Extension/Gedmo');\n $loader->register();\n }",
"public function enableYiiAutoload()\n\t{\n\t // enable Yii autoloader\n\t spl_autoload_register(array('YiiBase','autoload'));\n\t}",
"function __autoload($className) {\n \trequire_once 'config.inc.php';\n require_once ROOT_PATH . '/includes/'. ucfirst($className) .'.class.php'; //自动加载 class 文件 \n}",
"function __autoload($class)\n {\n require_once('core/'.$class.'.php');\n }",
"public static function load()\n {\n spl_autoload_register(array('AutoLoader', 'autoloadGenericClasses'));\n spl_autoload_register(array('AutoLoader', 'autoloadPhpdocx'));\n spl_autoload_register(array('AutoLoader', 'autoloadLog4php'));\n spl_autoload_register(array('AutoLoader', 'autoloadZetaComponents'));\n spl_autoload_register(array('AutoLoader', 'autoloadTcpdf'));\n spl_autoload_register(array('AutoLoader', 'autoloadPdf'));\n spl_autoload_register(array('AutoLoader', 'autoloadDompdf'));\n spl_autoload_register(array('AutoLoader', 'autoloadMht'));\n }",
"function __autoload($classPupa){\n\n require 'class/'.$classPupa.'.php';\n \n}",
"public function enableSimpleSamlAutoload()\n\t{\n\t\t// set up for simple saml\n\t // temporary disable Yii autoloader\n\t spl_autoload_unregister(array('YiiBase','autoload'));\n\t\n\t // saml autoload \n\t require_once($this->simplesamlPath. '/lib/_autoload.php');\n\t}",
"protected function _initAutoload2() {\n $autoLoader = Zend_Loader_Autoloader::getInstance();\n $autoLoader->setFallbackAutoloader(true);\n return $autoLoader;\n }",
"protected function _initAutoload()\n\t{\n\t\t$config = $this->getOption('autoloader');\n\t\t$autoloader = new Zend_Loader_Autoloader_Resource($config);\n\n\t\treturn $autoloader;\n\t}",
"function __autoload($class_name) {include $class_name . '.php';}",
"function __autoload($class)\n{\n $fileName = __DIR__ . '/' . str_replace('\\\\', '/', $class) . '.php';\n include ($fileName);\n}",
"public function testAutoloadNewDependencies(): void {\n\n // Classes must not be loaded if they exist.\n $classLoader = $this->getMockBuilder(ClassLoader::class)\n ->onlyMethods([\n 'addClassMap',\n 'addPsr4',\n 'register',\n ])\n ->getMock();\n $classLoader->expects(self::never())\n ->method('addClassMap');\n $classLoader->expects(self::never())\n ->method('addPsr4');\n $classLoader->expects(self::never())\n ->method('register');\n\n new UpdateManager($this->composer, $this->io, $this->configUpdateManager->getConfig(), $classLoader);\n\n // Classes must be loaded if they do not exist.\n $classLoader = $this->getMockBuilder(ClassLoader::class)\n ->onlyMethods([\n 'addClassMap',\n 'addPsr4',\n 'register',\n ])\n ->getMock();\n $classLoader->expects(self::once())\n ->method('addClassMap');\n $classLoader->expects(self::once())\n ->method('addPsr4');\n $classLoader->expects(self::once())\n ->method('register');\n\n $this->fs->mkdir(\"$this->root/wd/vendor/nette/robot-loader\");\n $this->composer->getConfig()->merge([\n 'config' => ['vendor-dir' => \"$this->root/wd/vendor\"],\n ]);\n\n new class($this->composer, $this->io, $this->configUpdateManager->getConfig(), $classLoader) extends UpdateManager {\n\n protected const NEWLY_INTRODUCED_CLASSES = [\n 'classmap' => [\n 'FakeRobotLoader' => 'nette/robot-loader',\n ],\n 'psr4' => [\n 'FakeComments' => [\n 'package' => 't2l/comments',\n 'prefix' => 'Consolidation\\\\Comments\\\\',\n 'path' => 'src',\n ],\n ],\n ];\n\n };\n\n }",
"static public function autoload() {\n spl_autoload_register(array(__CLASS__, 'loader'));\n }",
"private function registerAutoloader() {\n\t\t\t// register autoloader\n\t\t\tspl_autoload_extensions(EXT);\n\t\t\tspl_autoload_register(array($this, 'autoload'));\n\t\t}",
"function __autoload($class) {\n require ($class . '.php');\n}",
"function __autoload($class){\n require_once($class.'.inc');\n}",
"protected static function ensureAutoloadInfoDirExists() {}",
"function autoload($class)\n{\n // if file does not exist in LIBS_PATH folder [set it in config/config.php]\n //require dirname( __FILE__ ).'/../classes/PHPLogin.php';\n}",
"function __autoload($class){\n /* This method looks for all the PHP files that begins with '$class' class name. */\n $classname = strtolower($class);\n if (file_exists(BASE_DIR.DS.'models'.DS.$classname.'.php')){\n // include the file\n require_once(BASE_DIR.DS.'models'.DS.$classname.'.php');\n }\n if (file_exists(BASE_DIR.DS.'controllers'.DS.$classname.'.php')){\n // include the file\n require_once(BASE_DIR.DS.'controllers'.DS.$classname.'.php');\n }\n if (file_exists(BASE_DIR.DS.'utilities'.DS.$classname.'.php')){\n // include the file\n require_once(BASE_DIR.DS.'utilities'.DS.$classname.'.php');\n }\n\n\n\n}",
"public function registerAutoloaders()\n {\n\n $loader = new Loader();\n\n $loader->registerNamespaces(array(\n 'Ns\\Core\\Controllers' => __DIR__ . '/controllers/',\n 'Ns\\Core\\Models' => __DIR__ . '/models/',\n 'Ns\\Core\\Libraries' => __DIR__ . '/libraries/',\n ));\n\n $loader->register();\n }",
"public function addPsr4AutoloadRule(string $namespace, string $path, bool $isDev = false): bool;",
"public function registerAutoloader() : void\n {\n require_once __DIR__ . '/../vendor/autoload.php';\n }",
"function my_autoloader($class) {\r\n\t require_once ($class.'.php');\r\n\t}",
"private static function autoLoader($namespace)\n {\n $filePath = explode('\\\\', $namespace);\n\n /**\n * To remove the Class name (Not class file name) from the end of the namespace.\n */\n array_pop($filePath);\n /**\n * to remove the root key from the beginning the namespace.\n */\n array_shift($filePath);\n \n /**\n * After taking and removing those stuffs, then we are converting namespace from array to an string .\n * using the directory separator that it can work perfectly in every OS (like: windows, linux, ...) .\n */\n $filePath = implode(DIRECTORY_SEPARATOR, $filePath);\n\n /**\n * Now we have just removed that root key from the beginning of the namespace that was extra and also\n * took the Class name (not its file name) from the namespace.\n * And now we have got the address to the class file from the root of the Framework.\n * \n * It means that with combining the (FILE_PATH) constant that gives us the absolute path to the Framework's root and having the address of the class name in the\n * Framework (that we it is) and adding the file extension to these things we can have the full path to that class that was called!\n */\n $filePath = FILE_PATH . $filePath . '.php';\n \n /*\n * We are checking to see whether that class exists or not,\n * If it exists then we are calling that class with using the (require_once) function.\n */\n if (is_readable($filePath))\n {\n require_once $filePath;\n self::registryInjection($namespace);\n\n return;\n }else\n {\n self::$registry->error->reportError(\"The Called Class File Does Not Exists! ({$filePath})\", __LINE__, __METHOD__, false);\n return;\n }\n return;\n }",
"public function __construct()\n {\n self::autoload();\n }",
"protected function _initAutoload()\n {\n $autoLoader = Zend_Loader_Autoloader::getInstance();\n $autoLoader->registerNamespace('App_');\n $resourceLoader = new Zend_Loader_Autoloader_Resource(array(\n 'basePath' => APPLICATION_PATH,\n 'namespace' => '',\n 'resourceTypes' => array(\n 'form' => array(\n 'path' => 'forms/',\n 'namespace' => 'Form_',\n ),\n 'model' => array(\n 'path' => 'models/',\n 'namespace' => 'Model_'\n )\n ),\n ));\n // Return it so that it can be stored by the bootstrap\n return $autoLoader;\n }",
"public static final function register()\n {\n\tspl_autoload_register('PathAutoload::loadClass');\n }",
"function do_autoload() {\n\tinit_files();\n}",
"function helper_autoloader($class)\n {\n\n }",
"function __autoload($class){\nrequire LIBS.$class.\".php\";\n}",
"function MyAutoload($className){\n $className=str_replace(\"\\\\\",\"/\",$className);\n $className=str_replace(\"App/\",\"\",$className);\n $class=\"{$className}.php\";\n include_once($class);\n}",
"function SuperheroServiceAutoload($class){\n require_once $class . '.php';\n}",
"public function registerAutoloader()\n {\n spl_autoload_register(array($this,'loadClass'),true, false);\n }",
"function miAutoload($class_name) {\r\n\tif(file_exists('controllers/' . $class_name . '.php')){\r\n\t\trequire_once 'controllers/' . $class_name . '.php';\r\n\t}else if(file_exists('models/' . strtolower($class_name) . 'Model.php')){\t\t\t\r\n\t\trequire_once 'models/'. strtolower($class_name) .'Model.php';\r\n\t}else echo \"No se puede cargar la clase \".$class_name;\r\n}",
"function __autoload($class)\n{\n $fileName = $class . '.php';\n //$fileName = __DIR__ . '/' . str_replace('\\\\', '/', $class) . '.php';\n include ($fileName);\n}",
"public static function autoload() {\n // autoload\n include('cache/classes.yml.php');\n foreach($return as $class) {\n require_once($class);\n }\n }",
"public function testAutoload()\n {\n $class = new Piw();\n $this->assertTrue($class->autoloaded());\n }",
"public function register() {\n spl_autoload_register([$this, 'autoLoad']);\n }",
"private function autoloader( $class ) {\r\n\r\n\t\t\t//BackWPup classes auto load\r\n\t\t\tif ( strstr( strtolower( $class ), 'backwpup_' ) ) {\r\n\t\t\t\t$dir = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR;\r\n\t\t\t\t$class_file_name = 'class-' . str_replace( array( 'backwpup_', '_' ), array( '', '-' ), strtolower( $class ) ) . '.php';\r\n\t\t\t\tif ( strstr( strtolower( $class ), 'backwpup_pro' ) ) {\r\n\t\t\t\t\t$dir .= 'pro' . DIRECTORY_SEPARATOR;\r\n\t\t\t\t\t$class_file_name = str_replace( 'pro-','', $class_file_name );\r\n\t\t\t\t}\r\n\t\t\t\tif ( file_exists( $dir . $class_file_name ) )\r\n\t\t\t\t\trequire $dir . $class_file_name;\r\n\t\t\t}\r\n\r\n\t\t\t// namespaced PSR-0\r\n\t\t\tif ( ! empty( self::$autoload ) ) {\r\n\t\t\t\t$pos = strrpos( $class, '\\\\' );\r\n\t\t\t\tif ( $pos !== FALSE ) {\r\n\t\t\t\t\t$class_path = str_replace( '\\\\', DIRECTORY_SEPARATOR, substr( $class, 0, $pos ) ) . DIRECTORY_SEPARATOR . str_replace( '_', DIRECTORY_SEPARATOR, substr( $class, $pos + 1 ) ) . '.php';\r\n\t\t\t\t\tforeach ( self::$autoload as $prefix => $dir ) {\r\n\t\t\t\t\t\tif ( $class === strstr( $class, $prefix ) ) {\r\n\t\t\t\t\t\t\tif ( file_exists( $dir . DIRECTORY_SEPARATOR . $class_path ) )\r\n\t\t\t\t\t\t\t\trequire $dir . DIRECTORY_SEPARATOR . $class_path;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} // Single class file\r\n\t\t\t\telseif ( ! empty( self::$autoload[ $class ] ) && is_file( self::$autoload[ $class ] ) ) {\r\n\t\t\t\t\trequire self::$autoload[ $class ];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//Google SDK Auto loading\r\n\t\t\t$classPath = explode( '_', $class );\r\n\t\t\tif ( $classPath[0] == 'Google' ) {\r\n\t\t\t\tif ( count( $classPath ) > 3 ) {\r\n\t\t\t\t\t$classPath = array_slice( $classPath, 0, 3 );\r\n\t\t\t\t}\r\n\t\t\t\t$filePath = self::get_plugin_data( 'plugindir' ) . '/vendor/' . implode( '/', $classPath ) . '.php';\r\n\t\t\t\tif ( file_exists( $filePath ) ) {\r\n\t\t\t\t\trequire $filePath;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}",
"public function autoload($class) {\n if (isset(static::$map[$class])){\n $pathInfo = static::$map[$class];\n Yaf_Loader::import(sprintf('%s%s',$pathInfo[0], $pathInfo[1]));\n } else if (strpos($class, 'Builder') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/views/builder/%s.php', APPLICATION_PATH, $class));\n } else if (strpos($class, 'Pagelet') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/pagelets/%s.php', APPLICATION_PATH, $class));\n } else if (strpos($class, 'Halo') === 0){\n Yaf_Loader::import(sprintf('%s/halo/%s.php',LIB_PATH,$class));\n } else if (strpos($class, 'Util') == strlen($class) - 4 || strpos($class, 'Utils') == strlen($class) - 5){\n Yaf_Loader::import(sprintf('%s/utils/%s.php',LIB_PATH,$class));\n } else if (strpos($class, 'Model') === strlen($class) - 5){\n Yaf_Loader::import(sprintf('%s/application/models/%s.php',APPLICATION_PATH,$class));\n } else if (strpos($class, 'Service') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/service/%s.php',APPLICATION_PATH,$class));\n } else if (strpos($class, 'HTMLPurifier') !== false){\n Yaf_Loader::import(sprintf('%s/htmlpurifier/HTMLPurifier.safe-includes.php',LIB_PATH));\n }else if (strpos($class, 'Api') === strlen($class) - 3){\n Yaf_Loader::import(sprintf('%s/application/Api/%s.php',APPLICATION_PATH,$class));\n }else if (strpos($class, 'Object') === strlen($class) - 6){\n Yaf_Loader::import(sprintf('%s/application/objects/%s.php',APPLICATION_PATH,$class));\n }else if (strpos($class, 'MemCache') === 0){\n// var_dump('================');\n// /Users/worker/php/wk/wcontact_cache/lib/wcontact/MemCacheBase.php\n Yaf_Loader::import(sprintf('%s/wzhaopin/%s.php',LIB_PATH, $class));\n }\n }",
"function __autoload($class_name)\n{\t\n require_once Conf::$DIRS['LIBS'].'class/'.$class_name.'.class.php';\t\n}",
"public static function load()\n {\n spl_autoload_register(array('AutoLoader', 'autoloadGenericClasses'));\n }",
"function my_autoloader($class)\n{\n $filename = BASE_PATH . '/'. str_replace('\\\\', '/', $class) . '.php';\n include($filename);\n}",
"function _autoload($class)\r {\r $class = str_replace(\"\\\\\", \"/\", $class);\r $class = str_replace('yqn/sdkmiddle/', 'src/', $class);\r $file = __DIR__ . '/../' . $class . '.php';\r require_once $file;\r }",
"protected function _initAutoload(){\n\t $autoLoader = Zend_Loader_Autoloader::getInstance();\n\t $autoLoader->registerNamespace('CMS_');\n\t $resourceLoader = new Zend_Loader_Autoloader_Resource(\n\t \tarray(\n\t\t\t 'basePath' => APPLICATION_PATH,\n\t\t\t 'namespace' => '',\n\t\t\t 'resourceTypes' => array(\n\t\t\t \t'form' => array(\n\t\t\t\t \t'path' => 'forms/',\n\t\t\t\t \t'namespace' => 'Form_',\n\t\t\t\t ),\n\t \t\t\t\n\t \t\t),\n\t \t)\n\t );\n\t // Return it so that it can be stored b the bootstrap\n\t return $autoLoader;\n\t }",
"protected function _ci_autoloader()\n {\n include(WEBPATH.'config/autoload.php');\n\n if ( ! isset($autoload))\n {\n return;\n }\n\n // Autoload packages\n if (isset($autoload['packages']))\n {\n foreach ($autoload['packages'] as $package_path)\n {\n $this->add_package_path($package_path);\n }\n }\n\n // Load any custom config file\n if (count($autoload['config']) > 0)\n {\n foreach ($autoload['config'] as $val)\n {\n $this->config($val);\n }\n }\n\n // Autoload helpers and languages\n foreach (array('helper', 'language') as $type)\n {\n if (isset($autoload[$type]) && count($autoload[$type]) > 0)\n {\n $this->$type($autoload[$type]);\n }\n }\n\n // Autoload drivers\n if (isset($autoload['drivers']))\n {\n $this->driver($autoload['drivers']);\n }\n\n // Load libraries\n if (isset($autoload['libraries']) && count($autoload['libraries']) > 0)\n {\n // Load the database driver.\n if (in_array('database', $autoload['libraries']))\n {\n $this->database();\n $autoload['libraries'] = array_diff($autoload['libraries'], array('database'));\n }\n\n // Load all other libraries\n $this->library($autoload['libraries']);\n }\n\n // Autoload models\n if (isset($autoload['model']))\n {\n $this->model($autoload['model']);\n }\n }",
"function commonwp_autoloader( $class ) {\n\t$pairs = [\n\t\t'WP_Temporary' => '/lib/wp-temporary/class-wp-temporary.php',\n\t\t'Temporary_Command' => '/lib/wp-temporary/cli/Temporary_Command.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Clean' => '/inc/Clean.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Expiration' => '/inc/Expiration.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Lock' => '/inc/Lock.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Main' => '/inc/Main.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\NPM' => '/inc/NPM.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Paths' => '/inc/Paths.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Privacy' => '/inc/Privacy.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Process' => '/inc/Process.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Queue' => '/inc/Queue.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Rewrite' => '/inc/Rewrite.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Singleton' => '/inc/Singleton.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\SRI' => '/inc/SRI.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Store' => '/inc/Store.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Utils' => '/inc/Utils.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\Versions' => '/inc/Versions.php',\n\t\t'dimadin\\WP\\Plugin\\commonWP\\WPCLI' => '/inc/WPCLI.php',\n\t\t'dimadin\\WP\\Library\\Backdrop\\Main' => '/lib/backdrop/inc/Main.php',\n\t\t'dimadin\\WP\\Library\\Backdrop\\Server' => '/lib/backdrop/inc/Server.php',\n\t\t'dimadin\\WP\\Library\\Backdrop\\Task' => '/lib/backdrop/inc/Task.php',\n\t];\n\n\tif ( array_key_exists( $class, $pairs ) ) {\n\t\tinclude __DIR__ . $pairs[ $class ];\n\t}\n}",
"function autoload($class_name)\n{\n $exp_arr = explode('_', $class_name);\n if (count($exp_arr) === 1) {\n $folder = 'core';\n } else {\n $n = array_pop($exp_arr);\n $folder = $n . ($n[strlen($n) - 1] == 's' ? 'es' : 's');\n }\n switch($folder) {\n case \"controllers\":\n $arr = explode('_', $class_name);\n $sub_folder = array_shift($arr);\n $class_file = PROTECTED_DIR . $folder . DS . PROJECT . DS . $sub_folder . DS . $class_name . '.php';\n break;\n case \"helpers\":\n case \"templates\":\n $class_file = PROTECTED_DIR . $folder . DS . PROJECT . DS . $class_name . '.php';\n break;\n default:\n $class_file = PROTECTED_DIR . $folder . DS . $class_name . '.php';\n break;\n }\n if (file_exists($class_file)) {\n require_once($class_file);\n }\n}",
"protected function _initAutoload() {\r\n $autoLoader = Zend_Loader_Autoloader::getInstance();\r\n $autoLoader->registerNamespace('CMS_');\r\n $resourceLoader = new Zend_Loader_Autoloader_Resource(array('basePath' => APPLICATION_PATH, 'namespace' => '', 'resourceTypes' => array('form' => array('path' => 'forms/', 'namespace' => 'Form_',), 'model' => array('path' => 'models/', 'namespace' => 'Model_'),),));\r\n // Return it so that it can be stored by the bootstrap\r\n return $autoLoader;\r\n }",
"function __autoload($class){\n\tif (file_exists(BASE_DIR.DS.'models'.DS.strtolower($class).'.php')){\n\t require_once(BASE_DIR.DS.'models'.DS.strtolower($class).'.php');\n\t} else if (file_exists(BASE_DIR.DS.'controllers'.DS.strtolower($class).'.php')){\n\t require_once(BASE_DIR.DS.'controllers'.DS.strtolower($class).'.php');\n\t} else if (file_exists(BASE_DIR.DS.'utilities'.DS.strtolower($class).'.php')){\n\t require_once(BASE_DIR.DS.'utilities'.DS.strtolower($class).'.php');\n\t}\n\n }",
"function __autoload($className) {\n require PATH_ZABBIX_API_CLASSES_DIRECTORY.'/'.$className.'.php';\n}",
"function __autoload($className){\n if (file_exists(\"core/$className.php\")){\n include_once \"core/$className.php\";\n }\n}",
"function __autoload($class)\n{\n var_dump(\"1. __autoload()\");\n include ucfirst($class).'.php';\n}"
] | [
"0.73756313",
"0.6944415",
"0.67408305",
"0.6566249",
"0.6505442",
"0.6478664",
"0.64503133",
"0.6431538",
"0.63965005",
"0.6395615",
"0.636389",
"0.62910134",
"0.6227085",
"0.62179303",
"0.61940163",
"0.6184938",
"0.6176568",
"0.6148622",
"0.6107102",
"0.6048718",
"0.60452217",
"0.60434884",
"0.6023322",
"0.6012716",
"0.6002111",
"0.5990636",
"0.59719425",
"0.593305",
"0.591644",
"0.59098965",
"0.5905165",
"0.58907014",
"0.5885308",
"0.5862257",
"0.5861915",
"0.5842215",
"0.579869",
"0.57949233",
"0.5783",
"0.5771181",
"0.57708883",
"0.5761054",
"0.5745105",
"0.57422894",
"0.574178",
"0.5736968",
"0.5732365",
"0.5729085",
"0.5712589",
"0.5707918",
"0.570583",
"0.568884",
"0.5682939",
"0.56792676",
"0.56302816",
"0.56274664",
"0.56212384",
"0.56202734",
"0.5618586",
"0.5618159",
"0.5615198",
"0.56037563",
"0.55956525",
"0.5592093",
"0.55898666",
"0.5579712",
"0.55774987",
"0.5576084",
"0.5569847",
"0.556898",
"0.5560666",
"0.5557313",
"0.5556677",
"0.5555494",
"0.55546373",
"0.55448514",
"0.5529111",
"0.5524718",
"0.55171484",
"0.5511141",
"0.5508934",
"0.5507871",
"0.55052865",
"0.54975075",
"0.5496616",
"0.54879427",
"0.5483615",
"0.5479785",
"0.5479032",
"0.5478594",
"0.5472675",
"0.54593575",
"0.54592055",
"0.5454411",
"0.5453971",
"0.5447138",
"0.54394734",
"0.543619",
"0.543347",
"0.5429219"
] | 0.7559754 | 0 |
Formulario para cargar calificaciones ./script/calificacion_form | public function main(){
$headers = (isset($_GET["headers"]))? $_GET["headers"] : "per_numero_documento, per_apellidos, per_nombres, per_genero, per_cuil, no_localidad, no_direccion, no_codigo_postal, per_email, per_telefono, no_escuela_fines_partido, no_escuela_fines_localidad, no_escuela_fines_institucion";
require_once("class/script/ProcesarInscripcionNacionForm.html");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ajax_calificaciones()\n\t\t{\n\t\t\tif($this->usuarios->autorizacion('calificaciones'))\n\t\t\t{\n\t\t\t\t$this->load->model('estudiantes');\n\t\t\t\t$rs_estudiantes = $this->estudiantes->get_datatables($this->session->userdata('idusuario'));\n\t\t\t\t$data = array();\n\t\t\t\tforeach ($rs_estudiantes->result_array() as $estudiante) {\n\t\t\t\t\t$row = array();\n\t\t\t\t\t$row[]=$estudiante[\"apellido\"];\n\t\t\t\t\t$row[]=$estudiante[\"nombre\"];\n\t\t\t\t\t$row[]=$estudiante[\"cedula\"];\n\t\t\t\t\t$row[]=date(\"d-m-Y\",strtotime($estudiante[\"fechanac\"]));\n\t\t\t\t\t$row[]=$estudiante[\"lugarnacimiento\"];\n\t\t\t\t\t$row[]=$estudiante[\"entidad\"];\n\t\t\t\t\t$acciones='<a href=\"'.site_url(array('user','estudiantes','editarestudiante',$estudiante[\"idestudiante\"])).'\" class=\"btn btn-info btn-xs\"><i class=\"fa fa-pencil\"></i> Editar </a>';\n\t\t\t\t\t$acciones=$acciones.'<a href=\"'.site_url(array('user','calificaciones','grados',$estudiante['idestudiante'])).'\" class=\"btn btn-success btn-xs\"><i class=\"fa fa-book\"> Calificaciones</i></a>';\n\t\t\t\t\t$row[] = $acciones;\n\t\t\t\t\t$data[] = $row;\n\t\t\t\t}\n\t\t\t\tif(!isset($_POST['draw'])){$_POST['draw']=0;}\n\t\t\t\t$result=$this->estudiantes->registros($this->session->userdata('idusuario'));\n\t\t\t\t$cantidad=$result->num_rows();\n\t\t\t\t$output = array(\n\t\t\t\t\t\t\t\t\"draw\" => $_POST['draw'],\n\t\t\t\t\t\t\t\t\"recordsTotal\" => $cantidad,\n\t\t\t\t\t\t\t\t\"recordsFiltered\" => $this->usuarios->count_filtered($this->session->userdata('idusuario')),\n\t\t\t\t\t\t\t\t\"data\" => $data,\n\t\t\t\t\t\t);\n\n\t\t\t\techo json_encode($output);\n\t\t\t}\n\t\t}",
"function fecha($name, $boton, $obligatorio, $mensaje) {\n echo \"<script type='text/javascript'>\";\n echo \"\n\t\t\tCalendar.setup({\n inputField : '\" . $name . \"', // id of the input field\n ifFormat : '%d-%m-%Y', // format of the input field\n button : '\" . $boton . \"', // trigger for the calendar (button ID)\n align : 'B2', // alignment (defaults to 'Bl')\n singleClick : true\n \t});\n\t\t\";\n echo \"var \" . $name . \" = new LiveValidation('\" . $name . \"');\";\n if ($obligatorio):\n echo \"$name.add( Validate.Presence);\";\n endif;\n if (empty($mensaje)):\n echo \"$name.add( Validate.Fecha );\";\n else:\n echo \"$name.add( Validate.Fecha, {failureMessage: '$mensaje!'} );\"; //asi es komo se ponen mensajes personalizados\n endif;\n echo \"</script>\";\n }",
"public function mostrarCalendarioCumpleaños(){\n\t\t$item1 = \"fch_nacimiento\";\n\t\tif($_POST[\"start\"] > $_POST[\"end\"] && $_POST[\"start\"] == 12){\n\t\t\t$inicio = 1;\n\t\t\t$fin = $_POST[\"end\"];\n\t\t}else if($_POST[\"start\"] > $_POST[\"end\"] && $_POST[\"end\"] == 1){\n\t\t\t$inicio = $_POST[\"start\"];\n\t\t\t$fin = 12;\n\t\t}else{\n\t\t\t$inicio = $_POST[\"start\"];\n\t\t\t$fin = $_POST[\"end\"];\n\t\t}\n $valor1 = $inicio.'|'.$fin;\n $item2 = $valor2 = $item3 = $valor3 = null;\n $entrada = \"calendarioCumpleaños\";\n $cumpleaños = ControladorTrabajador::ctrMostrarTrabajador($item1,$valor1,$item2,$valor2,$item3,$valor3,$entrada);\n if(count($cumpleaños) > 0){\n\t $datosJson = '[';\n\t\t\t\t \tfor ($i=0; $i < count($cumpleaños) ; $i++) {\n\t\t\t\t \t\t$fechaNacimiento = dateFormatCumpleanios($cumpleaños[$i][\"fch_nacimiento\"]);\n\t\t\t\t \t\t$datosJson .= '{\n\t\t\t\t\t\t\t\"nombre\" : \"'.$cumpleaños[$i][\"dsc_nombres\"].\" \".$cumpleaños[$i][\"dsc_apellido_paterno\"].\" \".$cumpleaños[$i][\"dsc_apellido_materno\"].'\",\n\t\t\t\t\t\t\t\"fecha\" : \"'.$fechaNacimiento.'\",\n\t\t\t\t\t\t\t\"imagen\" : \"'.$cumpleaños[$i][\"imagen\"].'\",\n\t\t\t\t\t\t\t\"cargo\" : \"'.$cumpleaños[$i][\"dsc_cargo\"].'\"\n\t\t\t\t\t\t},';\n\t\t\t\t\t}\t\t\t \t\n\t\t\t\t\t$datosJson = substr($datosJson, 0, -1);\n\t\t\t\t$datosJson .= ']';\t\n\t\t}else{\n\t\t\t$datosJson = '[\n\t\t\t\t{}\n\t\t\t]';\n\t\t}\n\t\techo $datosJson;\t\n\t}",
"function formHolidays() {\n\t\t$output = $formField = $deductionBox = \"\"; $status = 1;\n\t\t$this->schema = Info::DB_NAME;\n\t\t$getPopupValue[] = $fieldValue[] = \"\";\n\t\tif($this->popupFormID){\n\t\t\t$getPopupValue = $this->getValueDB([\"table\"=>$this->Params['table'],\"id\"=>$this->popupFormID]);\n\t\t\t$status = $getPopupValue['status'];\n\t\t}\n\t\t$varLists = ['holiday_type','set_date','title','description'];\n\t\tforeach($varLists as $var){\n\t\t\t$fieldValue[$var] = (isset($getPopupValue[$var]) && $this->popupFormID) ? $getPopupValue[$var] : \"\";\n\t\t}\n\t\t$holiday_type = $this->inputGroup(['label'=>'Type','type'=>'select','id'=>'holiday_type','name'=>'holiday_type','meta_key'=>'holiday_type','meta'=>'codebook','placeholder'=>'Type of Holiday','value'=>$fieldValue['holiday_type']]);\n\t\t$title = $this->inputGroup(['label'=>'Title','type'=>'text','id'=>'title','name'=>'title','placeholder'=>'Title/Name','value'=>$fieldValue['title']]);//$this->Params['first_name']\n\t\t$set_date = $this->inputGroup(['label'=>'Date','type'=>'date','id'=>'set_date','name'=>'','placeholder'=>'Date of Holiday','value'=>$fieldValue['set_date']]);//$this->Params['middle_name']\n\t\t$description = $this->inputGroup(['label'=>'Description','type'=>'text','id'=>'description','name'=>'description','title'=>'Description','placeholder'=>'Description/Notes','value'=>$fieldValue['description']]);//$getValue[0]['address']\n\t\t$popUpTitle = str_replace(\"_\",\" \",$this->Params['table']);\n\t\t$formField .= \"<div class='x_panel no-padding'><div class='box_title'><h2 class='left capitalize'>{$popUpTitle} Information Details</h2></div><div class='x_content no-padding'>\";\n\t\t$formField .= \"\n\t\t\t<div class=''>\n\t\t\t\t<div class='form-group no-padding item'>\n\t\t\t\t\t<div class='col-md-6 col-sm-6 col-xs-12 no-padding'>{$holiday_type}</div>\n\t\t\t\t\t<div class='col-md-6 col-sm-6 col-xs-12 no-padding'>{$set_date}</div>\n\t\t\t\t</div>\n\t\t\t\t<div class='form-group no-padding item'>\n\t\t\t\t\t<div class='col-md-6 col-sm-6 col-xs-12 no-padding'>{$title}</div>\n\t\t\t\t\t<div class='col-md-6 col-sm-6 col-xs-12 no-padding'>{$description}</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t</div>\n\t\t\";\n\t\t$output .= \"\n <form id='createRecords' data-toggle='validator' name='{$this->Params['meta']}' class='form-label-left input_mask' novalidate>\n\t\t\t\t<input type='hidden' name='action' id='action' value='createRecords' />\n\t\t\t\t<input type='hidden' name='table' id='table' value='{$this->Params['table']}' />\n\t\t\t\t<input type='hidden' name='set_date' id='this_date' value='{$fieldValue['set_date']}' />\n\t\t\t\t<input type='hidden' name='theID' id='theID' value='{$this->Params['value']}' />\n\t\t\t\t{$formField}\n\t\t\t</form>\n \";\n\t\t$output .= \"<script>\n\t\t\t$(document).ready(function() {\n\t\t\t\twebshims.setOptions('forms-ext', {replaceUI: 'auto', types: 'number'});webshims.polyfill('forms forms-ext');\n\t\t\t\t$('.select2_single').each(function() {\n\t\t\t\t\t$(this).select2({\n\t\t\t\t\t\tplaceholder: $(this).attr('placeholder'),\n\t\t\t\t\t\tallowClear: false\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\t$(':input').inputmask();\n\t\t\t\t$('input#set_date.date-picker').val(moment($('input#set_date.date-picker').val(),'YYYY/MM/DD').format('MMMM D'));\n\t\t\t});\n\t\t\t\n\t\t\t$('input#set_date.date-picker').daterangepicker({\n\t\t\t\tsingleDatePicker: true,\n\t\t\t\topens: 'right',\n\t\t\t\tcalender_style: 'picker_4',\n\t\t\t\tautoUpdateInput: false,\n\t\t\t\tlocale: {\n\t\t\t\t\tformat: 'MMMM D'\n\t\t\t\t}\n\t\t\t}, function (start, end, label) {\n\t\t\t\t$('input[name=set_date]').val(moment(end,'MMMM D').format('YYYY/MM/DD'));\n\t\t\t\tconsole.log(start.toISOString(), end.toISOString(), label);\n\t\t\t});\n\t\t\t\n\t\t\t$('input#set_date').on('apply.daterangepicker', function(ev, picker) {\n\t\t\t\t$(this).val(picker.startDate.format('MMMM D'));\n\t\t\t\t$('input[name=set_date]').val(picker.startDate.format('YYYY/MM/DD'));\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t</script>\";\n\t\treturn $output;\n\t}",
"function mostrarFormulario(){\r\n $this->consultaFacultades();\r\n }",
"function form_calendar($forms){\r\n\t$name = isset($forms['name']) ? $forms['name'] : rand(1000 , 9999 ) ;\r\n\t$class \t= isset( $forms['class'] ) ? $forms['class'] : $forms['name'] ;\r\n\t$value \t= isset( $forms['value'] ) ? $forms['value'] : \"\" ; \r\n\t\r\n\treturn \"<script>DateInput('\".$name.\"', true, 'YYYY-MM-DD', '\".$value.\"')</script> \";\r\n}",
"function evt__form_asignacion__agregar_dias (){\n $datos_form_asignacion=$this->dep('form_asignacion')->get_datos();\n print_r($datos_form_asignacion);\n $tipo=$datos_form_asignacion['tipo'];\n if(strcmp($tipo, 'Definitiva')==0){\n $mensaje=\" No se puede asociar fechas a asignaciones definitivas. \";\n toba::notificacion()->agregar($mensaje);\n \n }\n else{\n $fecha_inicio=$datos_form_asignacion['fecha_inicio'];\n $fecha_fin=$datos_form_asignacion['fecha_fin'];\n if(isset($fecha_inicio) && isset($fecha_fin)){\n $this->s__cargar_fechas=TRUE; //se debe poner en false cuando termina la operacion de carga\n if(!isset($tipo)){\n $datos_form_asignacion['tipo']='Periodo';\n }\n $this->s__datos_form_asignacion=$datos_form_asignacion;\n $this->set_pantalla('pant_extra');\n }\n else{\n toba::notificacion()->agregar(\" Debe especificar fecha de inicio y fin. \");\n \n }\n \n }\n \n //para restaurar el estado actual del formulario form_asignacion\n $this->s__datos_form_asignacion=$datos_form_asignacion;\n \n }",
"public function mostrarDatosComprobantesDeclarados(){\r\n\t\t$html = null;\t\t\r\n\r\n\t\t$month = date('m');\r\n \t$year = date('Y');\r\n \t$day = date(\"d\");\r\n\r\n\t\t$fecemi = date('Y-m-d');\r\n\r\n\t\t$canales=$_POST['canalesDeclarado'];\r\n\r\n\t\t$inicio = $_POST['fechainicioDeclarado'];\r\n\t\t$fin = $_POST['fechafinDeclarado'];\r\n\r\n\t\t$serie = $_POST['numeroSerieDeclarado'];\t\r\n\r\n\t\tif (substr($serie, 0, 1) == 'B') {\r\n\t\t\t//html de tabla dinámica que se va a generar\r\n\r\n\t\t\t$boletaSumaSoles = $this->comprobante_pago_mdl->getDatosSumaDecSoles($inicio, $fin, $canales, $serie);\r\n\t\t\t$boletaSumaSolesArray = json_decode(json_encode($boletaSumaSoles), true);\r\n\t\t\t$boletaSumaSolesstring = array_values($boletaSumaSolesArray)[0];\r\n\t\t\t$sumaS = $boletaSumaSolesstring['sumas'];\r\n\t\t\t$sumaDosS=number_format((float)$sumaS, 2, '.', ',');\r\n\r\n\t\t\t$boletaSumaDolares = $this->comprobante_pago_mdl->getDatosSumaDecDolares($inicio, $fin, $canales, $serie);\r\n\t\t\t$boletaSumaDolaresArray = json_decode(json_encode($boletaSumaDolares), true);\r\n\t\t\t$boletaSumaDolaresstring = array_values($boletaSumaDolaresArray)[0];\r\n\t\t\t$sumaD = $boletaSumaDolaresstring['sumad'];\r\n\r\n\t\t\t$sumaDosd=number_format((float)$sumaD, 2, '.', ',');\r\n\r\n\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Soles: S/. \".$sumaDosS.\"</b></span> <span class='label label-succes label-white middle'><b>Total de cobros Dólares: $ \".$sumaDosd.\"</b></span></H1>\";\r\n\r\n\t\t\t//html de tabla dinámica que se va a generar\r\n\t\t\t$html .= \"<br>\";\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t//$html .=\"<th>Id Comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha de Emisión</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>N° de comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Nombres y Apellidos</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>DNI</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Opciones</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t//\tfor ($i=0; $i < count($idPlan); $i++) {\r\n\r\n\t\t\t\t\t$boleta = $this->comprobante_pago_mdl->getDatosBoletaDeclarada($inicio, $fin, $serie);\r\n\r\n\t\t\t\t\tforeach ((array) $boleta as $b):\r\n\r\n\t\t\t\t\t\tif ($b->tipo_moneda=='PEN') {\r\n\t\t\t\t\t\t\t$moneda = 'S/. ';\r\n\t\t\t\t\t\t} elseif ($b->tipo_moneda=='USD') {\r\n\t\t\t\t\t\t\t$moneda = '$ ';\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$importe = $b->importe_total;\r\n\t\t\t\t\t\t$importe2=number_format((float)$importe, 2, '.', ',');\r\n\r\n\t\t\t\t\t\t$estado = $b->idestadocobro;\r\n\t\t\t\t\t\t$newDate = date(\"d/m/Y\", strtotime($b->fecha_emision));\r\n\r\n\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t//$html .= \"<td align='left'>\".$$b->idcomprobante.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$newDate.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->serie.\" - \".$b->correlativo.\"<input type='text' class='hidden' id='numSerie' name='numSerie[]' value='\".$b->serie.\"'></td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->contratante.\"<input type='text' class='hidden' id='idcomprobante' name='idcomprobante[]' value='\".$b->idcomprobante.\"'></td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->cont_numDoc.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".utf8_decode($b->nombre_plan).\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='center'>\".$moneda.$importe2.\"</td>\";\r\n\t\t\t\t\t\t\tif ($estado == 2) {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='danger'>\".$b->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'></td>\";\r\n\t\t\t\t\t\t\t} elseif ($estado == 3) {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='success'>\".$b->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t$html .=\"</td>\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= \"</tr>\";\r\n\r\n\t\t\t\t\tendforeach;\r\n\r\n\t\t\t\t\t//}\r\n\t\t\t\t\r\n\t\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t\t$html .= \"</table>\";\r\n\t\t\t$html .= \"</div>\";\r\n\t\t} elseif (substr($serie, 0, 1) == 'F') {\r\n\r\n\t\t\t$boletaSumaSoles = $this->comprobante_pago_mdl->getDatosSumaDecSoles($inicio, $fin, $canales, $serie);\r\n\t\t\t$boletaSumaSolesArray = json_decode(json_encode($boletaSumaSoles), true);\r\n\t\t\t$boletaSumaSolesstring = array_values($boletaSumaSolesArray)[0];\r\n\t\t\t$sumaS = $boletaSumaSolesstring['sumas'];\r\n\t\t\t$sumaDosS=number_format((float)$sumaS, 2, '.', ',');\r\n\r\n\t\t\t$boletaSumaDolares = $this->comprobante_pago_mdl->getDatosSumaDecDolares($inicio, $fin, $canales, $serie);\r\n\t\t\t$boletaSumaDolaresArray = json_decode(json_encode($boletaSumaDolares), true);\r\n\t\t\t$boletaSumaDolaresstring = array_values($boletaSumaDolaresArray)[0];\r\n\t\t\t$sumaD = $boletaSumaDolaresstring['sumad'];\r\n\r\n\t\t\t$sumaDosd=number_format((float)$sumaD, 2, '.', ',');\r\n\r\n\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Soles: S/. \".$sumaDosS.\"</b></span> <span class='label label-succes label-white middle'><b>Total de cobros Dólares: $ \".$sumaDosd.\"</b></span></H1>\";\r\n\r\n\t\t\t$html .=\"<hr>\";\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha para emisión</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>N° de comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Razon Social</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>RUC</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Opciones</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t\t//for ($i=0; $i < count($idPlan); $i++) {\r\n\r\n\t\t\t\t\t$factura = $this->comprobante_pago_mdl->getDatosFacturaDeclarada($inicio, $fin, $serie);\r\n\r\n\t\t\t\t\tforeach ((array)$factura as $f):\r\n\r\n\t\t\t\t\t\tif ($f->tipo_moneda=='PEN') {\r\n\t\t\t\t\t\t\t$moneda = 'S/. ';\r\n\t\t\t\t\t\t} elseif ($f->tipo_moneda=='USD') {\r\n\t\t\t\t\t\t\t$moneda = '$ ';\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$importeDos = $f->importe_total;\r\n\t\t\t\t\t\t$importe2=number_format((float)$importeDos, 2, '.', ',');\r\n\t\t\t\t\t\t$estado = $f->idestadocobro;\r\n\t\t\t\t\t\t$newDate = date(\"d/m/Y\", strtotime($f->fecha_emision));\r\n\r\n\t\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$newDate.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>\".$f->serie.\" - \".$f->correlativo.\"<input type='text' class='hidden' id='numSerie' name='numSerie' value='\".$f->serie.\"'></td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->razon_social_cli.\"<input type='text' class='hidden' id='idcomprobante' name='idcomprobante' value='\".$f->idcomprobante.\"'></td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->numero_documento_cli.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->nombre_plan.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>\".$moneda.$importe2.\"</td>\";\r\n\t\t\t\t\t\t\t\tif ($estado == 2) {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='danger'>\".$f->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'></td>\";\r\n\t\t\t\t\t\t\t\t} elseif ($estado == 3) {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='success'>\".$f->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$f->idcomprobante.\"/\".$canales.\"' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$f->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t\t$html .=\"</td>\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$html .= \"</tr>\";\r\n\r\n\t\t\t\t\tendforeach;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//}\r\n\r\n\t\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t\t$html .= \"</table>\";\r\n\t\t\t$html .= \"</div>\";\r\n\t\t}\r\n\r\n\t\techo json_encode($html);\r\n\t}",
"public function mostrarDatosComprobantes(){\r\n\t\t$html = null;\t\t\r\n\r\n\t\t$month = date('m');\r\n \t$year = date('Y');\r\n \t$day = date(\"d\");\r\n\r\n\t\t$data['fechaEmision'] = date('Y-m-d');\r\n\r\n\t\t$fecemi = $data['fechaEmision'];\r\n\r\n\t\t$canales=$_POST['canalesDos'];\r\n\t\t$datos['canalesDos'] = $canales;\r\n\r\n\t\t$inicio = $_POST['fechainicioDos'];\r\n\t\t//$fin = $_POST['fechafinDos'];\r\n\r\n\t\t$serie = $_POST['numeroSerie'];\t\r\n\t\t//$data['nameCheck'] = $_POST['nameCheck'];\r\n\t\t//$idPlan = $data['nameCheck'];\r\n\r\n\r\n\t\tif (substr($serie, 0, 1) == 'B') {\r\n\r\n\t\t\t$boletaSumaSoles = $this->comprobante_pago_mdl->getDatosSumaEmiSoles($inicio, $canales, $serie);\r\n\t\t\t$boletaSumaSolesArray = json_decode(json_encode($boletaSumaSoles), true);\r\n\t\t\t$boletaSumaSolesstring = array_values($boletaSumaSolesArray)[0];\r\n\t\t\t$sumaS = $boletaSumaSolesstring['sumas'];\r\n\t\t\t$sumaDosS=number_format((float)$sumaS, 2, '.', ',');\r\n\r\n\t\t\t$boletaSumaDolares = $this->comprobante_pago_mdl->getDatosSumaEmiDolares($inicio, $canales, $serie);\r\n\t\t\t$boletaSumaDolaresArray = json_decode(json_encode($boletaSumaDolares), true);\r\n\t\t\t$boletaSumaDolaresstring = array_values($boletaSumaDolaresArray)[0];\r\n\t\t\t$sumaD = $boletaSumaDolaresstring['sumad'];\r\n\r\n\t\t\t$sumaDosd=number_format((float)$sumaD, 2, '.', ',');\r\n\r\n\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Soles: S/. \".$sumaDosS.\"</b></span> <span class='label label-succes label-white middle'><b>Total de cobros Dólares: $ \".$sumaDosd.\"</b></span></H1>\";\r\n\r\n\t\t\t//html de tabla dinámica que se va a generar\r\n\t\t\t$html .= \"<br>\";\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t//$html .=\"<th>Id Comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha de Emisión</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>N° de comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Nombres y Apellidos</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>DNI</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Opciones</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t//\tfor ($i=0; $i < count($idPlan); $i++) {\r\n\r\n\t\t\t\t\t$boleta = $this->comprobante_pago_mdl->getDatosBoletaEmitida($inicio, $serie);\r\n\r\n\t\t\t\t\tforeach ((array) $boleta as $b):\r\n\r\n\t\t\t\t\t\t$importe = $b->importe_total;\r\n\t\t\t\t\t\t$importe2=number_format((float)$importe, 2, '.', ',');\r\n\r\n\t\t\t\t\t\t$estado = $b->idestadocobro;\r\n\t\t\t\t\t\t$newDate = date(\"d/m/Y\", strtotime($b->fecha_emision));\r\n\r\n\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t//$html .= \"<td align='left'>\".$$b->idcomprobante.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$newDate.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->serie.\" - \".$b->correlativo.\"<input type='text' class='hidden' id='numSerie' name='numSerie[]' value='\".$b->serie.\"'></td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->contratante.\"<input type='text' class='hidden' id='idcomprobante' name='idcomprobante[]' value='\".$b->idcomprobante.\"'></td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->cont_numDoc.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"<td align='left'>\".utf8_decode($b->nombre_plan).\"</td>\";\r\n\t\t\t\t\t\t\tif ($b->tipo_moneda == 'PEN') {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>S/. \".$importe2.\"</td>\";\r\n\t\t\t\t\t\t\t} elseif ($b->tipo_moneda == 'USD') {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>$ \".$importe2.\"</td>\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ($estado == 2) {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='danger'>\".$b->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t$html .=\"</td>\";\r\n\t\t\t\t\t\t\t} elseif ($estado == 3) {\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='success'>\".$b->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$b->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t$html .=\"</td>\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= \"</tr>\";\r\n\r\n\t\t\t\t\tendforeach;\r\n\r\n\t\t\t\t\t//}\r\n\t\t\t\t\r\n\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t$html .= \"</table>\";\r\n\t\t$html .= \"</div>\";\r\n\r\n\t\t} elseif (substr($serie, 0, 1) == 'F') {\r\n\r\n\r\n\t\t\t$boletaSumaSoles = $this->comprobante_pago_mdl->getDatosSumaEmiSoles($inicio, $canales, $serie);\r\n\t\t\t$boletaSumaSolesArray = json_decode(json_encode($boletaSumaSoles), true);\r\n\t\t\t$boletaSumaSolesstring = array_values($boletaSumaSolesArray)[0];\r\n\t\t\t$sumaS = $boletaSumaSolesstring['sumas'];\r\n\t\t\t$sumaDosS=number_format((float)$sumaS, 2, '.', ',');\r\n\r\n\t\t\t$boletaSumaDolares = $this->comprobante_pago_mdl->getDatosSumaEmiDolares($inicio, $canales, $serie);\r\n\t\t\t$boletaSumaDolaresArray = json_decode(json_encode($boletaSumaDolares), true);\r\n\t\t\t$boletaSumaDolaresstring = array_values($boletaSumaDolaresArray)[0];\r\n\t\t\t$sumaD = $boletaSumaDolaresstring['sumad'];\r\n\t\t\t$sumaDosd=number_format((float)$sumaD, 2, '.', ',');\r\n\r\n\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Soles: S/. \".$sumaDosS.\"</b></span> <span class='label label-succes label-white middle'><b>Total de cobros Dólares: $ \".$sumaDosd.\"</b></span></H1>\";\r\n\r\n\r\n\t\t\t$html .=\"<hr>\";\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha para emisión</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>N° de comprobante</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Razon Social</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>RUC</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Opciones</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t\t//for ($i=0; $i < count($idPlan); $i++) {\r\n\r\n\t\t\t\t\t$factura = $this->comprobante_pago_mdl->getDatosFacturaEmitida($inicio, $serie);\r\n\r\n\t\t\t\t\tforeach ((array)$factura as $f):\r\n\r\n\t\t\t\t\t\t$importeDos = $f->importe_total;\r\n\t\t\t\t\t\t$importe2=number_format((float)$importeDos, 2, '.', ',');\r\n\t\t\t\t\t\t$estado = $f->idestadocobro;\r\n\t\t\t\t\t\t$newDate = date(\"d/m/Y\", strtotime($f->fecha_emision));\r\n\r\n\t\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$newDate.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>\".$f->serie.\" - \".$f->correlativo.\"<input type='text' class='hidden' id='numSerie' name='numSerie' value='\".$f->serie.\"'></td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->razon_social_cli.\"<input type='text' class='hidden' id='idcomprobante' name='idcomprobante' value='\".$f->idcomprobante.\"'></td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->numero_documento_cli.\"</td>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->nombre_plan.\"</td>\";\r\n\t\t\t\t\t\t\t\tif ($f->tipo_moneda == 'PEN') {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center'>S/. \".$importe2.\"</td>\";\r\n\t\t\t\t\t\t\t\t} elseif ($f->tipo_moneda == 'USD') {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center'>$ \".$importe2.\"</td>\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif ($estado == 2) {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='danger'>\".$f->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$f->idcomprobante.\"/\".$canales.\"/F001' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$f->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t\t$html .=\"</td>\";\r\n\t\t\t\t\t\t\t\t} elseif ($estado == 3) {\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center' class='success'>\".$f->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"<ul class='ico-stack'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='ver PDF' id='pdfButton' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/generarPdf/\".$f->idcomprobante.\"/\".$canales.\"/F001' data-fancybox-width='950' data-fancybox-height='800' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-file-pdf-o bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"<div title='enviar PDF' id='pdfButtonEnviar' onclick=''>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"<a class='boton fancybox' href='\".base_url().\"index.php/ventas_cnt/enviarPdf/\".$f->idcomprobante.\"/\".$canales.\"' data-fancybox-width='750' data-fancybox-height='275' target='_blank'>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$html .= \"<i class='ace-icon fa fa-envelope bigger-120'></i>\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t$html .=\"</a>\";\r\n\t\t\t\t\t\t\t\t\t\t\t$html .=\"</div>\";\r\n\t\t\t\t\t\t\t\t\t\t$html .= \"</ul>\";\r\n\t\t\t\t\t\t\t\t\t$html .=\"</td>\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$html .= \"</tr>\";\r\n\r\n\t\t\t\t\tendforeach;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//}\r\n\r\n\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t$html .= \"</table>\";\r\n\t\t$html .= \"</div>\";\r\n\t\t}\r\n\r\n\t\techo json_encode($html);\r\n\t}",
"function cargar_formulario_032($req_no,$process,$activity,$cedula,$rol,$username){ \n $tninp032= consulta_datos_formulario_032($req_no); \n $solicitud= $tninp032->getReq_no();\n if(empty($solicitud)){\n $retval='<h1>Solicitud no existe</h1>';\n }else{ \n $adjunto= cargar_lista_adjuntos($req_no);\n $notificacion= cargar_lista_notificaciones($req_no);\n $retval='\n <script src=\"themes/js/eventos.js\"></script>\n \t<div class=\"display-2\">\n <h2 align=\"center\">'.substr($tninp032->getDcm_no(), 0, -4).' '.$tninp032->getDcm_nm().'</h2>\n\t\t</div>\n <div class=\"panel panel-warning\">\n <div class=\"panel-heading\">\n <h3 class=\"panel-title\">\n <a data-toggle=\"collapse\" href=\"#collapse1\">Mostrar Notificaciones Solicitadas</a>\n </h3>\n </div>\n <div id=\"collapse1\" class=\"panel-collapse collapse\">\n <div class=\"panel-body\">\n '.$notificacion.'\n </div> \n </div>\n </div>\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3>Datos de Solicitud</h3>\n </div>\n <div class=\"panel-body\">\n <div class=\"hidden\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\"> \n <input type=\"text\" class=\"form-control\" id=\"process\" readonly value=\"'.$process.'\" /> \n </div>\n\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\"> \n <input type=\"text\" class=\"form-control\" id=\"activity\" readonly value=\"'.$activity.'\" />\n </div>\n </div>\n <div class=\"hidden\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\"> \n <input type=\"text\" class=\"form-control\" id=\"cedula\" readonly value=\"'.$cedula.'\" /> \n </div>\n\n <div class=\"col-xs-1 form-group\">\n <input type=\"text\" class=\"form-control\" id=\"rol\" readonly value=\"'.$rol.'\" /> \n </div>\n\n <div class=\"col-xs-5 form-group\"> \n <input type=\"text\" class=\"form-control\" id=\"username\" readonly value=\"'.$username.'\" />\n </div>\n </div>\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Número de Solicitud</label> \n <input type=\"text\" class=\"form-control\" name=\"req_no\" id=\"req_no\" readonly value=\"'.$tninp032->getReq_no().'\" /> \n </div>\n\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Fecha de Solicitud</label> \n <input type=\"text\" class=\"form-control\" name=\"mdf_dt\" readonly value=\"'.$tninp032->getMdf_dt().'\" />\n </div>\n </div> \n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Ciudad de Solicitud</label> \n <input type=\"text\" class=\"form-control\" name=\"req_city_nm\" readonly value=\"'.$tninp032->getReq_city_nm().'\" /> \n </div>\n\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Número de Solicitud de Certificado Sanitario de Exportación</label> \n <input type=\"text\" class=\"form-control\" name=\"exp_sty_ctft_req_no\" readonly value=\"'.$tninp032->getExp_sty_ctft_req_no().'\" /> \n </div>\n </div>\t\t\t\t\t\t\t\t\n </div>\n\t\t</div>';\n \n $retval.='\t\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3>Datos de Solicitante</h3>\n </div>\n <div class=\"panel-body\">\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Clasificación del Solicitante</label> \n <input type=\"text\" class=\"form-control\" name=\"dclr_cl_cd\" readonly value=\"'.$tninp032->getDclr_cl_cd().'\" /> \n </div>\n\t\t\t\t\t\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Número de Identificación de la Empresa Solicitante</label> \n <input type=\"text\" class=\"form-control\" name=\"dclr_idt_no\" readonly value=\"'.$tninp032->getDclr_idt_no().'\" />\n </div>\n </div>\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Razón Social del Solicitante</label> \n <input type=\"text\" class=\"form-control\" name=\"dclr_nole\" readonly value=\"'.$tninp032->getDclr_nole().'\" />\n </div>\n </div>\n\t\t\t<div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Provincia de la Empresa Solicitante</label> \n <input type=\"text\" class=\"form-control\" name=\"dclr_prvhc_nm\" readonly value=\"'.$tninp032->getDclr_prvhc_nm().'\" /> \n </div>\n\t\t\t\t\t\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Cantón/Ciudad de la Empresa Solicitante</label> \n <input type=\"text\" class=\"form-control\" name=\"dclr_cuty_nm\" readonly value=\"'.$tninp032->getDclr_cuty_nm().'\" />\n </div>\n </div>\n <div class=\"col-xs-5 form-group\" style=\"padding:5px 0 0 30px;\">\n <label>Parroquia de la Empresa Solicitante</label> \n <input type=\"text\" class=\"form-control\" name=\"dclr_prqi_nm\" readonly value=\"'.$tninp032->getDclr_prqi_nm().'\" />\n </div>\n\t\t\t<div class=\"col-xs-11 form-group\" style=\"padding:5px 0 0 30px;\">\n <label>Dirección de la Empresa Solicitante</label> \n <input type=\"text\" class=\"form-control\" name=\"dclr_ad\" readonly value=\"'.$tninp032->getDclr_ad().'\" />\n </div>\n <div class=\"col-xs-11 form-group\" style=\"padding:5px 0 0 30px;\">\n <label>Nombre de Solicitante</label> \n <input type=\"text\" class=\"form-control\" name=\"dclr_nm\" readonly value=\"'.$tninp032->getDclr_nm().'\" />\n </div>\n <div class=\"col-xs-11 form-group\" style=\"padding:5px 0 0 30px;\">\n <label>Representante Legal del Solicitante</label> \n <input type=\"text\" class=\"form-control\" name=\"dclr_rpgp_nm\" readonly value=\"'.$tninp032->getDclr_rpgp_nm().'\" />\n </div> \t\t\t\t\t\t\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Teléfono del Solicitante</label> \n <input type=\"text\" class=\"form-control\" name=\"dclr_tel_no\" readonly value=\"'.$tninp032->getDclr_tel_no().'\" />\n </div> \n\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\t\t\t\t\t\t\t\n <div class=\"col-xs-5 form-group\">\n <label>Fax del Solicitante</label> \n <input type=\"text\" class=\"form-control\" name=\"dclr_fax_no\" readonly value=\"'.$tninp032->getDclr_fax_no().'\" /> \n </div> \n </div>\n\t\t\t<div class=\"col-xs-5 form-group\" style=\"padding:5px 0 0 30px;\">\n <label>Correo Electrónico del Solicitante</label> \n <input type=\"text\" class=\"form-control\" name=\"dclr_em\" readonly value=\"'.$tninp032->getDclr_em().'\" />\n </div>\t\t\t\t\t\t\n </div>\n </div>';\t\t\t\t \n\t\t\t\t\n $retval.='\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3>Datos de Exportador</h3>\n </div>\n <div class=\"panel-body\">\t\t\t\t\t\t\n\t\t\t<div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Clasificación del Exportador</label> \n <input type=\"text\" class=\"form-control\" name=\"expr_cl_cd\" readonly value=\"'.$tninp032->getExpr_cl_cd().'\" /> \n </div>\n\t\t\t\t\t\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Número de Identificación del Exportador</label> \n <input type=\"text\" class=\"form-control\" name=\"expr_idt_no\" readonly value=\"'.$tninp032->getExpr_idt_no().'\" />\n </div>\n </div>\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-11 form-group\">\n <label>Nombre del Exportador</label> \n <input type=\"text\" class=\"form-control\" name=\"expr_nm\" readonly value=\"'.$tninp032->getExpr_nm().'\" /> \n </div>\n </div>\n\t\t\t<div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Provincia</label> \n <input type=\"text\" class=\"form-control\" name=\"expr_prvhc_nm\" readonly value=\"'.$tninp032->getExpr_prvhc_nm().'\" /> \n </div>\n\t\t\t\t\t\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Cantón/Ciudad</label> \n <input type=\"text\" class=\"form-control\" name=\"expr_cuty_nm\" readonly value=\"'.$tninp032->getExpr_cuty_nm().'\" />\n </div>\n </div>\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\t\t\t\t\t\t\n <div class=\"col-xs-5 form-group\">\n <label>Parroquia</label> \n <input type=\"text\" class=\"form-control\" name=\"expr_prqi_nm\" readonly value=\"'.$tninp032->getExpr_prqi_nm().'\" />\n </div>\n </div>\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\t\t\t\t\t\t\n <div class=\"col-xs-11 form-group\">\n <label>Dirección</label> \n <input type=\"text\" class=\"form-control\" name=\"expr_ad\" readonly value=\"'.$tninp032->getExpr_ad().'\" />\n </div>\n </div>\t\t\t\t\t\t\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Teléfono del Exportador</label> \n <input type=\"text\" class=\"form-control\" name=\"expr_tel_no\" readonly value=\"'.$tninp032->getExpr_tel_no().'\" /> \n </div>\n\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Fax del Exportador</label> \n <input type=\"text\" class=\"form-control\" name=\"expr_fax_no\" readonly value=\"'.$tninp032->getExpr_fax_no().'\" />\n </div>\n </div>\n\t\t\t<div class=\"col-xs-5 form-group\" style=\"padding:5px 0 0 30px;\">\n <label>Correo Electrónico del Exportador</label> \n <input type=\"text\" class=\"form-control\" name=\"expr_em\" readonly value=\"'.$tninp032->getExpr_em().'\" />\n </div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n </div>\n\t\t</div>';\t\t\n\t\t\t\n\t$retval.='\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3>Datos de Importador</h3>\n </div>\n <div class=\"panel-body\">\n\t\t\t<div class=\"col-xs-11 form-group\" style=\"padding:5px 0 0 30px;\">\n <label>Nombre del Importador</label> \n <input type=\"text\" class=\"form-control\" name=\"impr_nm\" readonly value=\"'.$tninp032->getImpr_nm().'\" /> \n </div>\n\t\t\t<div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>País del Importador</label> \n <input type=\"text\" class=\"form-control\" name=\"impr_ntn_nm\" readonly value=\"'.$tninp032->getImpr_ntn_nm().'\" /> \n </div>\n\t\t\t\t\t\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Ciudad Importador</label> \n <input type=\"text\" class=\"form-control\" name=\"impr_city_nm\" readonly value=\"'.$tninp032->getImpr_city_nm().'\" />\n </div>\n </div>\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\t\t\t\t\t\t\n <div class=\"col-xs-11 form-group\">\n <label>Dirección del Importador</label> \n <input type=\"text\" class=\"form-control\" name=\"impr_ad\" readonly value=\"'.$tninp032->getImpr_ad().'\" />\n </div>\n </div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Teléfono del Importador</label> \n <input type=\"text\" class=\"form-control\" name=\"impr_tel_no\" readonly value=\"'.$tninp032->getImpr_tel_no().'\" /> \n </div>\n\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Fax del Importador</label> \n <input type=\"text\" class=\"form-control\" name=\"impr_fax_no\" readonly value=\"'.$tninp032->getImpr_fax_no().'\" />\n </div>\n </div>\n\t\t\t<div class=\"col-xs-5 form-group\" style=\"padding:5px 0 0 30px;\">\n <label>Correo Electrónico del Importador</label> \n <input type=\"text\" class=\"form-control\" name=\"impr_em\" readonly value=\"'.$tninp032->getImpr_em().'\" />\n </div>\t\t\t\t\n </div>\n\t\t</div>';\n\t\t\t\t\n $retval.='\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3>Datos de Fabricante</h3>\n </div>\n <div class=\"panel-body\">\t\t\t\t\t\t\n\t\t\t<div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Clasificación del Fabricante</label> \n <input type=\"text\" class=\"form-control\" name=\"pcs_cl_cd\" readonly value=\"'.$tninp032->getPcs_cl_cd().'\" /> \n </div>\n\t\t\t\t\t\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Número de Identificación del Fabricante</label> \n <input type=\"text\" class=\"form-control\" name=\"pcs_idt_no\" readonly value=\"'.$tninp032->getPcs_idt_no().'\" />\n </div>\n </div>\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-11 form-group\">\n <label>Nombre de Fabricante</label> \n <input type=\"text\" class=\"form-control\" name=\"pcs_nm\" readonly value=\"'.$tninp032->getPcs_nm().'\" /> \n </div>\n </div>\n\t\t\t<div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-11 form-group\">\n <label>Número de Autorización de Fabricante</label> \n <input type=\"text\" class=\"form-control\" name=\"pcs_atr_no\" readonly value=\"'.$tninp032->getPcs_atr_no().'\" /> \n </div>\n </div>\n\t\t\t<div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-11 form-group\">\n <label>Representante Legal de Fabricante</label> \n <input type=\"text\" class=\"form-control\" name=\"pcs_rpgp_nm\" readonly value=\"'.$tninp032->getPcs_rpgp_nm().'\" /> \n </div>\n </div>\n\t\t\t<div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Provincia</label> \n <input type=\"text\" class=\"form-control\" name=\"pcs_prvhc_nm\" readonly value=\"'.$tninp032->getPcs_prvhc_nm().'\" /> \n </div>\n\t\t\t\t\t\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Cantón/Ciudad</label> \n <input type=\"text\" class=\"form-control\" name=\"pcs_cuty_nm\" readonly value=\"'.$tninp032->getPcs_cuty_nm().'\" />\n </div>\n </div>\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\t\t\t\t\t\t\n <div class=\"col-xs-5 form-group\">\n <label>Parroquia</label> \n <input type=\"text\" class=\"form-control\" name=\"pcs_prqi_nm\" readonly value=\"'.$tninp032->getPcs_prqi_nm().'\" />\n </div>\n </div>\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\t\t\t\t\t\t\n <div class=\"col-xs-11 form-group\">\n <label>Dirección</label> \n <input type=\"text\" class=\"form-control\" name=\"pcs_ad\" readonly value=\"'.$tninp032->getPcs_ad().'\" />\n </div>\n </div>\t\t\t\t\t\t\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Teléfono del Exportador</label> \n <input type=\"text\" class=\"form-control\" name=\"pcs_tel_no\" readonly value=\"'.$tninp032->getPcs_tel_no().'\" /> \n </div>\n\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Fax del Exportador</label> \n <input type=\"text\" class=\"form-control\" name=\"pcs_fax_no\" readonly value=\"'.$tninp032->getPcs_fax_no().'\" />\n </div>\n </div>\n\t\t\t<div class=\"col-xs-5 form-group\" style=\"padding:5px 0 0 30px;\">\n <label>Correo Electrónico del Exportador</label> \n <input type=\"text\" class=\"form-control\" name=\"pcs_em\" readonly value=\"'.$tninp032->getPcs_em().'\" />\n </div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n </div>\n\t\t</div>';\t\t\n\t\t\t\t\n\t$retval.='\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3>Datos Generales</h3>\n </div>\n <div class=\"panel-body\">\n <div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Número de Certificado de Calidad</label> \n <input type=\"text\" class=\"form-control\" name=\"qlt_ctft_no\" readonly value=\"'.$tninp032->getQlt_ctft_no().'\" /> \n </div>\n </div>\n\t\t\t<div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Número de Certificado Sanitario</label> \n <input type=\"text\" class=\"form-control\" name=\"fht_crtfc_no\" readonly value=\"'.$tninp032->getFht_crtfc_no().'\" /> \n </div>\n\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Número de Factura Comercial</label> \n <input type=\"text\" class=\"form-control\" name=\"inv_no\" readonly value=\"'.$tninp032->getInv_no().'\" /> \n </div>\t\n </div>\n\t\t\t<div class=\"col-xs-11 form-group\" style=\"padding:5px 0 0 30px;\">\n <label>Detalle del Certificado</label> \n <input type=\"text\" class=\"form-control\" name=\"ctft_det\" readonly value=\"'.$tninp032->getCtft_det().'\" /> \n </div>\n\t\t\t<div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Resultado de Análisis de Antioxidante</label> \n <input type=\"text\" class=\"form-control\" name=\"atxd_stdy_rst_nm\" readonly value=\"'.$tninp032->getAtxd_stdy_rst_nm().'\" /> \n </div>\n </div>\n\t\t\t<div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Tipo de Producto</label> \n <input type=\"text\" class=\"form-control\" name=\"prdt_type_nm\" readonly value=\"'.$tninp032->getPrdt_type_nm().'\" /> \n </div>\n </div>\n\t\t\t<div class=\"col-xs-11 form-group\" style=\"padding:5px 0 0 30px;\">\n <label>Marca de Producto</label> \n <input type=\"text\" class=\"form-control\" name=\"prdt_bdmn\" readonly value=\"'.$tninp032->getPrdt_bdmn().'\" /> \n </div>\n\t\t\t<div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Acido Tiobarbiturico (TBA) expresado en mg/kg. max 5%</label> \n <input type=\"text\" class=\"form-control\" name=\"prdt_acido\" readonly value=\"'.$tninp032->getPrdt_acido().'\" /> \n </div>\n\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Acidez expresado como ácido Oleico mg/kg. max 5%</label> \n <input type=\"text\" class=\"form-control\" name=\"prdt_perox_index\" readonly value=\"'.$tninp032->getPrdt_acidez().'\" />\n </div>\n </div>\n\t\t\t<div class=\"row\" style=\"padding:5px 0 0 30px;\">\n <div class=\"col-xs-5 form-group\">\n <label>Indice de Peróxido meq de Oxígeno /kg. max 10%</label> \n <input type=\"text\" class=\"form-control\" name=\"prdt_acidez\" readonly value=\"'.$tninp032->getPrdt_perox_index().'\" /> \n </div>\n\n <div class=\"col-xs-1 form-group\">\n <!-- espacio entre columnas-->\n </div>\n\n <div class=\"col-xs-5 form-group\">\n <label>Humedad max 1%</label> \n <input type=\"text\" class=\"form-control\" name=\"prdt_humedad\" readonly value=\"'.$tninp032->getPrdt_humedad().'\" />\n </div>\n </div>\t\t\t\t\t\t\n </div>\n\t\t</div>';\n \n $retval.='\t\t\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3>Tipo de Analisis</h3>\n </div>\n <div class=\"panel-body\">\n <div class=\"[ form-group ]\">';\n if($tninp032->getAnls_type_cd_01()==\"true\"){ \n $retval.='<input type=\"checkbox\" onclick= \"return false\" name=\"fancy-checkbox-info\" id=\"fancy-checkbox-info\" checked/>\n <div class=\"[ btn-group ]\">\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-default active]\">\n Aspergillus\n </label>\n </div>'; \n }else{\n $retval.='<input type=\"checkbox\" onclick= \"return false\" name=\"fancy-checkbox-info\" id=\"fancy-checkbox-info\" autocomplete=\"off\" />\n <div class=\"[ btn-group ]\">\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-default active ]\">\n Aspergillus\n </label>\n </div>'; \n }\n \n if($tninp032->getAnls_type_cd_02()==\"true\"){ \n $retval.='<input type=\"checkbox\" onclick= \"return false\" name=\"fancy-checkbox-info\" id=\"fancy-checkbox-info\" checked/>\n <div class=\"[ btn-group ]\">\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-default active]\">\n Salmonella\n </label>\n </div>'; \n }else{\n $retval.='<input type=\"checkbox\" onclick= \"return false\" name=\"fancy-checkbox-info\" id=\"fancy-checkbox-info\" autocomplete=\"off\" />\n <div class=\"[ btn-group ]\">\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-default active ]\">\n Salmonella\n </label>\n </div>\n '; \n }\n if($tninp032->getAnls_type_cd_03()==\"true\"){ \n $retval.='<input type=\"checkbox\" onclick= \"return false\" name=\"fancy-checkbox-info\" id=\"fancy-checkbox-info\" checked/>\n <div class=\"[ btn-group ]\">\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-default active]\">\n Shiguella\n </label>\n </div>'; \n }else{\n $retval.='<input type=\"checkbox\" onclick= \"return false\" name=\"fancy-checkbox-info\" id=\"fancy-checkbox-info\" autocomplete=\"off\" />\n <div class=\"[ btn-group ]\">\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-default active ]\">\n Shiguella\n </label>\n </div>\n '; \n }\n if($tninp032->getAnls_type_cd_04()==\"true\"){ \n $retval.='<input type=\"checkbox\" onclick= \"return false\" name=\"fancy-checkbox-info\" id=\"fancy-checkbox-info\" checked/>\n <div class=\"[ btn-group ]\">\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-default active]\">\n Coliformes\n </label>\n </div>'; \n }else{\n $retval.='<input type=\"checkbox\" onclick= \"return false\" name=\"fancy-checkbox-info\" id=\"fancy-checkbox-info\" autocomplete=\"off\" />\n <div class=\"[ btn-group ]\">\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-default active ]\">\n Coliformes\n </label>\n </div>\n '; \n }\n if($tninp032->getAnls_type_cd_05()==\"true\"){ \n $retval.='<input type=\"checkbox\" onclick= \"return false\" name=\"fancy-checkbox-info\" id=\"fancy-checkbox-info\" checked/>\n <div class=\"[ btn-group ]\">\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-default active]\">\n Parasitos\n </label>\n </div>'; \n }else{\n $retval.='<input type=\"checkbox\" onclick= \"return false\" name=\"fancy-checkbox-info\" id=\"fancy-checkbox-info\" autocomplete=\"off\" />\n <div class=\"[ btn-group ]\">\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-default active ]\">\n Parasitos\n </label>\n </div>\n '; \n }\n if($tninp032->getAnls_type_cd_06()==\"true\"){ \n $retval.='<input type=\"checkbox\" onclick= \"return false\" name=\"fancy-checkbox-info\" id=\"fancy-checkbox-info\" checked/>\n <div class=\"[ btn-group ]\">\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-default active]\">\n Clostridios\n </label>\n </div>'; \n }else{\n $retval.='<input type=\"checkbox\" onclick= \"return false\" name=\"fancy-checkbox-info\" id=\"fancy-checkbox-info\" autocomplete=\"off\" />\n <div class=\"[ btn-group ]\">\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-default active ]\">\n Clostridios\n </label>\n </div>\n '; \n }\n \n $retval.=' </div>\n </div>\n </div>'; \n \n $retval.='\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3>Tipo de Requisito</h3>\n </div>\n <div class=\"panel-body\">\n <table class=\"table table-striped\"> \n <tr>\n <th>Casilla</th>\n <th>Requisito</th> \n </tr>\n ';\n \n if($tninp032->getNcdt_type_cd_01()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_01().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_01().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_02()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_02().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_02().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_03()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_03().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_03().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_04()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_04().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_04().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_05()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_05().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_05().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_06()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_06().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_06().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_07()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_07().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_07().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_08()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_08().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_08().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_09()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_09().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_09().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_10()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_10().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_10().'</td>\n </tr>'; \n }\n if($tninp032->getNcdt_type_cd_11()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_11().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_11().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_12()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_12().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_12().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_13()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_13().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_13().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_14()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_14().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_14().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_15()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_15().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_15().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_16()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_16().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_16().'</td>\n </tr>'; \n }\n \n if($tninp032->getNcdt_type_cd_17()==\"true\"){\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon-ok ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_17().'</td>\n </tr>';\n }else{\n $retval.='\n <tr>\n <td>\n <label for=\"fancy-checkbox-info\" class=\"[ btn btn-info ]\">\n <span class=\"[ glyphicon glyphicon ]\"></span>\n <span> </span>\n </label>\n </td>\n <td>'.$tninp032->getNcdt_type_nm_17().'</td>\n </tr>'; \n }\n \n $retval.=' \n </table>\n </div>\n\t\t</div>'; \n \n \n $retval.='\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3>Observaciones</h3>\n </div>\n <div class=\"panel-body\">\n <div class=\"col-xs-11 form-group\">\n <label>Observaciones del solicitante</label>\n <textarea class=\"form-control\" rows=\"5\" readonly name=\"dclr_rmk\">'.$tninp032->getDclr_rmk().'</textarea>\n </div>\n <div class=\"col-xs-11 form-group\">\n <label>Observaciones del Aprobador</label>\n <textarea class=\"form-control\" rows=\"5\" name=\"aprb_rmk\" maxlength=\"500\" id=\"aprb_rmk\"></textarea>\n </div>\n </div>\n\t\t</div>';\n \n $retval.='\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3>Documentos Adjuntos</h3>\n </div>\n <div class=\"panel-body\">\n '.$adjunto.'\n </div>\n\t\t</div>';\n \n $retval.='\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3>Acciones</h3>\n </div>\n <div class=\"panel-body\">\n <div class=\"funkyradio\">\n <div class=\"funkyradio-success\">\n <input type=\"radio\" name=\"radio\" id=\"aprobar\" value=\"1\"/>\n <label for=\"aprobar\">Aprobar</label>\n </div>\n <div class=\"funkyradio-warning\">\n <input type=\"radio\" name=\"radio\" id=\"subsanar\" value=\"2\"/>\n <label for=\"subsanar\">Subsanar</label>\n </div>\n <div class=\"funkyradio-danger\">\n <input type=\"radio\" name=\"radio\" id=\"rechazar\" value=\"3\"/>\n <label for=\"rechazar\">Rechazar</label>\n </div>\n <button type=\"button\" class=\"btn btn-default\" id=\"btn_enviar\">Enviar</button>\n </div>\n </div>\n </div>';\n }\n return $retval;\n \n}",
"protected function procesaFormulario($datos)\n {\n\n $result = array();\n $app = Aplicacion::getSingleton();\n \n $id = $datos['id'] ?? null;\n\n $title = $datos['title'] ?? null;\n if ( empty($title) ) {\n $result['title'] = \"El nombre de la película no puede quedar vacío.\";\n }\n\n $date_released = $datos['date_released'] ?? null;\n if ( empty($date_released) ) {\n $result['date_released'] = \"La fecha no puede quedar vacía.\";\n }\n\n $duration = $datos['duration'] ?? null;\n if (!is_numeric($duration)) {\n $result['duration'] = \"La duración debe ser un número\";\n } else if ( empty($duration) || $duration < 0 ) {\n $result['duration'] = \"La película debe tener una duración positiva\";\n }\n\n $country = $datos['country'] ?? null;\n if ( empty($country)) {\n $result['country'] = \"El país no puede quedar vacío\";\n }\n\n $plot = $datos['plot'] ?? null;\n if ( empty($plot)) {\n $result['plot'] = \"La película debe tener una trama\";\n }\n\n $link = $datos['link'] ?? null;\n $price = $datos['price'] ?? null;\n if (empty($link) && !empty($price)) {\n $result['link'] = \"Has añadido el precio, pero no el link. Añádelo\";\n } else if (!empty($link) && empty($price)) {\n $result['price'] = \"Has añadido el link, pero no el precio. Añádelo\";\n } else if (!empty($link) && !empty($price)) {\n if (!is_numeric($price)) {\n $result['price'] = \"El precio debe ser un número\";\n }else if ( $price < 2 ) {\n $result['price'] = \"El precio debe ser mayor que 0\";\n }\n }\n\n $image = $datos['image'] ?? null;\n $dir_subida = './img/peliculas/';\n $fichero_subido = $dir_subida . basename($_FILES['image']['name']);\n if (!move_uploaded_file($_FILES['image']['tmp_name'], $fichero_subido) && !empty($_FILES['image']['name'])) {\n $result['image'] = $_FILES['image']['name'].\"El fichero no se ha podido subir correctamente\";\n }\n\n $genres = $datos['genres'] ?? null;\n\n $actors = $datos['actors'] ?? null;\n\n $directors = $datos['directors'] ?? null;\n \n $prevPage = $datos['prevPage'] ?? null;\n\n if (count($result) === 0) {\n if ($app->usuarioLogueado() && ($app->esGestor() || $app->esAdmin())) {\n $pelicula = Pelicula::editar($id, $title, $_FILES['image']['name'], $date_released, $duration, $country, $plot, $link, $price);\n\n Pelicula::actualizarGeneros($pelicula, $genres);\n\n Pelicula::actualizarActoresDirectores($pelicula, $actors, $directors);\n if ( ! $pelicula ) {\n $result[] = \"La película ya existe\";\n } else {\n $result = \"{$prevPage}\";\n }\n }\n }\n return $result;\n }",
"public function GuardarCalificacion()\n {\n try {\n parse_str(file_get_contents(\"php://input\"), $datos);\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n $dbm->getConnection()->beginTransaction();\n\n $result = self::Calificar($datos, $dbm);\n $dbm->getConnection()->commit();\n return Api::Ok(\"Calificación actualizada.\", $result);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n $dbm->getConnection()->commit();\n }\n }",
"public function formuAction(){\t\n \t$cn = new Model_DbDatos_Datos();\n\t\t$fn = new Libreria_Pintar();\n\t\t$ar = new Libreria_ArraysFunctions();\n\n \t$codCarta = $this->_request->getParam('codCarta',''); \n\t\t\n\t\t\n\t\t//Cargando combos fiscalizadores\n\n\t\tunset($parametros);\n \t$parametros[] = array('@mquery',22);\n \t$parametros[] = array('@idCarta',$codCarta);\n\t\t$rowFicalizadores = $cn->ejec_store_procedura_sql('[SP_FISCA_CARTA_REQ]',$parametros);\n\n\t\t$fiscalizadoresCombo = $ar->RegistrosComboc($rowFicalizadores,0,1,'');\n\t\t$val[] = array('#cbNotificadores',$fn->ContenidoCombo($fiscalizadoresCombo,'[Seleccione]',''),'html');\n\t\t \t\n\n\t\t//Cargando cabecera del cargo de notificacion\t\t\n\t\tunset($parametros);\n\t\t$parametros[] = array('@mquery',20);\n \t$parametros[] = array('@idCarta',$codCarta);\n \t$rowCabecera = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_CARGO_NOTIFICA]',$parametros);\n\n \tif ($rowCabecera[0]) {\n \t\t$row = $rowCabecera[1][0]; \n\n \t\t$codCargoNotificacion = $row[0];\n \t\t$nroCargoNotificacion = $row[1].\" - \".$row[9];\n \t\t$codContrib = $row[2];\n \t\t$contribuyente = trim(utf8_encode( strtoupper($row[3].\" \".$row[4].\" \".$row[5])));\n \t\t$idTipoDocIdent = $row[6];\n \t\t$nroDocIdent = $row[7];\n \t\t$domicilioFiscal = strtoupper(utf8_encode( $row[8]));\n \t\t$anio = $row[9];\n \t\t$nroCartareq = $row[10].\" - \".$row[9];\n \t\n \t\t$val[] = array('#hcodCartaReq',$codCarta,'val');\n \t\t$val[] = array('#txtNroNotificacion',$nroCargoNotificacion,'val');\n \t\t$val[] = array('#hcodNotificacion',$codCargoNotificacion,'val');\n \t\t$val[] = array('#txtCodigoContribuyenteN',$codContrib,'val');\n \t\t$val[] = array('#txtContribuyenteN',$contribuyente,'val');\n \t\t$val[] = array('#hTipoDocIdent',$idTipoDocIdent,'val');\n \t\t$val[] = array('#hNroDocIdent',$nroDocIdent,'val');\n \t\t$val[] = array('#txtDomicilioFiscal',$domicilioFiscal,'val');\n \t\t$val[] = array('#txtAnioN',$anio,'val');\n \t\t$val[] = array('#txtNroCartaReqN',$nroCartareq,'val');\n\n \t\t//CARGANDO DATOS DE LA PERSONA QUIEN RECEPCIONA\n \t\tunset($parametros);\n\t\t\t$parametros[] = array('@mquery',21);\n\t \t$parametros[] = array('@idCargoNotFisca',$codCargoNotificacion);\n\t \t$rowDatosPersona = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_CARGO_NOTIFICA]',$parametros);\n\t\t\t\n\n\t \tif ($rowDatosPersona[0]) {\n\t \t\t\n\t \t\t$row = $rowDatosPersona[1][0];\n\n\t\t\t unset($parametros);\n\t\t\t\t$parametros[] = array('@mquery',7);\n\t\t \t$rowTDoc = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_T_DOC_IDEN]',$parametros);\n\t\t \t$row2 = $rowTDoc[1];\n\t\t \t\n\t\t \tforeach ($row2 as $f) {\n\t\t \t\tif ($f[0]==1) {\t$val[]= array('#hmaxDni',$f[2],'val');}\n\t\t \t\tif ($f[0]==5) {\t$val[]= array('#hmaxIdentidad',$f[2],'val');}\n\t\t \t\tif ($f[0]==9) {\t$val[]= array('#hmaxExtranjeria',$f[2],'val');}\n\t\t \t}\n\n\t \t\t$nomRecepciona = trim(utf8_encode($row[0]));\n\t \t\t$idTipoDocIdent = trim($row[1]);\n\t \t\t$nomTDocIden = trim(utf8_encode($row[2]));\n\t \t\t$nroDocIdent = trim($row[3]);\n\t \t\t$fechaNotifica = (!empty($row[4]) && !empty($row[5]) && !empty($row[6]))? $row[4].\"/\".$row[5].\"/\".$row[6] : '';\n\t \t\t$horaNotifica = trim($row[7]);\n\t \t\t$NegoIdentificar = trim($row[8]);\n\t \t\t$NegoFirmar = $row[9];\n\t \t\t$NegoRecibir = $row[10];\n\t \t\t$firma = $row[11];\n\t \t\t$idVinculo = $row[12];\n\t \t\t$vinculo = $row[13];\n\t \t\t$vinculo_otros = trim($row[14]);\n\n\t \t\t$val[] = array('#txtNomApeRecepciona',$nomRecepciona,'val');\n\t \t\tif($idTipoDocIdent==1){$evt[] = array('#chkDni','checked','true');}\n\t \t\tif($idTipoDocIdent==5){$evt[] = array('#chkIdentidad','checked','true');}\n\t \t\tif($idTipoDocIdent==9){$evt[] = array('#chkExtranjeria','checked','true');}\n\t \t\t$val[] = array('#txtNroDocIdent',$nroDocIdent,'val');\n\t \t\t$val[] = array('#dpFechaNotifica',$fechaNotifica,'val');\n\t \t\t$val[] = array('#txtHoraNotifica',$horaNotifica,'val');\n\t \t\tif($NegoIdentificar==1){$evt[] = array('#chkNegoIdentificar','checked','true');}\n\t \t\tif($NegoFirmar==1){$evt[] = array('#chkNegoFirmar','checked','true');}\n\t \t\tif($NegoRecibir==1){$evt[] = array('#chkNegoRecibir','checked','true');}\n\t \t\t$evt[] = array(( ($firma==1) ? \"#rdFirmaRecepcionaSi\" : \"#rdFirmaRecepcionaNo\"),\"checked\",\"true\");\n\t \t\tif($idVinculo==1){$evt[] = array('#chkTitular','checked','true');}\n\t \t\tif($idVinculo==2){$evt[] = array('#chkFamiliar','checked','true');}\n\t \t\tif($idVinculo==3){$evt[] = array('#chkVigilante','checked','true');}\n\t \t\tif($idVinculo==4){$evt[] = array('#chkEmpleado','checked','true');}\n\t \t\tif($idVinculo==5){$evt[] = array('#chkRepresentante','checked','true');}\n\t \t\tif($idVinculo==6){$evt[] = array('#chkVinculoOtros','checked','true');$val[] = array('#txtVinculoOtros',$vinculo_otros,'val');}\n\n\n\t \t\t//CARGANDO DATOS DEL CEDULON Y MOTIVOS DE NO ENTREGA\n\n\t \t\tunset($parametros);\n\t\t\t\t$parametros[] = array('@mquery',22);\n\t\t \t$parametros[] = array('@idCargoNotFisca',$codCargoNotificacion);\n\t\t \t$rowCedulonMovNoEntrega = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_CARGO_NOTIFICA]',$parametros);\n\t\t \t\n\t\t \tif ($rowCedulonMovNoEntrega[0]) {\n\t\t \t\t$row = $rowCedulonMovNoEntrega[1][0]; \n\n\t\t \t\t$codCedulon = trim($row[0]);\n\t\t \t\t$PersonaIncapaz = trim($row[1]);\n\t\t \t\t$DomicilioCerrado = trim($row[2]);\n\t\t \t\t$fechaCedulon = (!empty($row[3]) && !empty($row[4]) && !empty($row[5])) ? $row[3].\"/\".$row[4].\"/\".$row[5] : '' ;\n\t\t \t\t$horaCedulon = trim($row[6]);\n\t\t \t\t$direcccionIncorrecta = trim($row[7]);\n\t\t \t\t$direccionInexistente = trim($row[8]);\n\t\t \t\t$otrosMotNoEntrega = $row[9];\n\t\t \t\t$otrosValor = trim($row[10]);\n\t\t \t\t$codInmueble = trim($row[11]);\n\t\t \t\t$nroPisos = trim($row[12]);\n\t\t \t\t$color = trim($row[13]);\n\t\t \t\t$casa = trim($row[14]);\n\t\t \t\t$edificio = trim($row[15]);\n\t\t \t\t$PuertaMadera = trim($row[16]);\n\t\t \t\t$PuertaFierro = trim($row[17]);\n\t\t \t\t$SuminElect = trim($row[18]);\n\t\t \t\t$in_Otros = trim($row[19]);\n\t\t \t\t$in_OtrosValor = trim($row[20]);\n\n\t\t \t\t$val[] = array('#hcodCedulon',$codCedulon,'val');\n\t\t \t\tif($PersonaIncapaz==1){ $evt[] = array('#chkPersonaIncapaz','checked','true');}\n\t\t \t\tif($DomicilioCerrado==1){ $evt[] = array('#chkDomicilioCerrado','checked','true');}\n\t\t \t\t$val[] = array('#dpFechaCedulon',$fechaCedulon,'val');\n\t\t \t\t$val[] = array('#txtHoraCedulon',$horaCedulon,'val');\n\t\t \t\tif($direcccionIncorrecta==1){ $evt[] = array('#chkDireccionIncorrecta','checked','true');}\n\t\t \t\tif($direccionInexistente==1){ $evt[] = array('#chkDireccionInexistente','checked','true');}\n\t\t \t\tif($otrosMotNoEntrega==1){$evt[]=array('#chkMotNoEntregaOtros','checked','true');$val[] = array('#txtNoEntregaOtros',$otrosValor,'val');}\n\t\t \t\t\n\t\t \t\t$val[] = array('#hcodInmueble',$codInmueble,'val');\n\t\t \t\t$val[] = array('#txtNroPisos',$nroPisos,'val');\n\t\t \t\t$val[] = array('#txtColor',$color,'val');\n\t\t \t\tif($casa==1){ $evt[] = array('#chkCasa','checked','true');}\n\t\t \t\tif($edificio==1){ $evt[] = array('#chkEdificio','checked','true');}\n\t\t \t\tif($PuertaMadera==1){ $evt[] = array('#chkMadera','checked','true');}\n\t\t \t\tif($PuertaFierro==1){ $evt[] = array('#chkFierro','checked','true');}\n\t\t \t\t$val[] = array('#txtSuministroElectrico',$SuminElect,'val');\n\t\t \t\tif($in_Otros==1){$evt[]=array('#chkInmuebleOtros','checked','true');$val[] = array('#txtInmuebleOtros',$in_OtrosValor,'val');}\n\t\t \t\t\n\n\n\t\t \t\t//CARGA DE DATOS DE VISITA EFECTUADA\n\t\t \t\tunset($parametros);\n\t\t\t\t\t$parametros[] = array('@mquery',23);\n\t\t\t \t$parametros[] = array('@idCargoNotFisca',$codCargoNotificacion);\n\t\t\t \t$rowVisitaEfectuada = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_CARGO_NOTIFICA]',$parametros);\n\t\t\t \t\n\t\t\t \tif ($rowVisitaEfectuada[0]) {\n\t\t\t \t\t$row = $rowVisitaEfectuada[1][0]; \n\n\t\t\t \t\t$fechaVisita = (!empty($row[0]) && !empty($row[1]) && !empty($row[2])) ? $row[0].\"/\".$row[1].\"/\".$row[2] : '' ;\n\t\t\t \t\t$codNotificador = trim($row[3]);\n\t\t\t \t\t$dniNotificador = trim($row[4]);\n\t\t\t \t\t$firmaNotificador = trim($row[5]);\n\n\t\t\t \t\t$val[] = array('#dpFechaVisita',$fechaVisita,'val');\n\t\t\t \t\t$val[] = array('#cbNotificadores',$codNotificador.'-'.$dniNotificador,'val');\n\t\t\t \t\t$val[] = array('#txtdniNotificador',$dniNotificador,'val');\n\t\t\t \t\t$evt[] = array((($firmaNotificador==1) ? \"#rdFirmaNotSi\" : \"#rdFirmaNotNo\"),\"checked\",\"true\");\n\n\n\t\t\t \t}else{\n\t\t\t \t\techo utf8_encode($rowVisitaEfectuada[1]); \n\t\t\t \t}\n\n\t\t \t}else{\n\t\t\t\t\techo utf8_encode($rowCedulonMovNoEntrega[1]); \n\t\t \t} \n\n\t \t}else{\n\t \t\techo utf8_encode($rowDatosPersona[1]); \n\t \t}\n\n \t}else{\n \t\techo utf8_encode($rowCabecera[1]);\n \t}\n\n\t\t$evt[] = array('#contentBox6',\"tabs\",\"\");\t\n\t\t$evt[] = array('#contentBox7',\"tabs\",\"\");\t\n\t\t$evt[] = array('#contentBox8',\"tabs\",\"\");\t\t\t\t\n\t\t$evt[] = array('#tabsNotificacion',\"tabs\",\"\");\n\t\t$evt[] = array('#radioFirmaRecep',\"buttonset\",\"\");\n\t\t$evt[] = array('#radioFirmaNot',\"buttonset\",\"\");\n\t\t\n\t\t\n\n\t\t$fn->PintarEvento($evt);\n\t\t$fn->PintarValor($val);\n }",
"public function definition() {\n\t\t\tglobal $CFG, $DB;\t\n\t\t\n\t\t$mform = $this->_form; // Don't forget the underscore!\n\t\n\t\t$result= $DB->get_records_sql(\"SELECT DISTINCT `intensidad` FROM `mdl_ejercicios`\");\n\t\t$result_tren= $DB->get_records_sql(\"SELECT DISTINCT `categoria` FROM `mdl_ejercicios`\");\n\t\t$options= array();\n\t\tforeach($result as $rs)\n\t\t\t\t$options[$rs->intensidad] = $rs->intensidad;\n\t\t\n\t\t$options_tren= array();\n\t\tforeach ($result_tren as $rst)\n\t\t\t$options_tren[$rst->categoria]= $rst->categoria;\n\t\t$mform->addElement('header', 'header', 'Para crear una rutina aleatoria');\n\t\t\n\t\t$mform->addElement('select', 'intensidad', '¿Qué intensidad quieres?:',$options);\n\n\t\t//$mform->addElement('select', 'categoria', '¿Qué tren de tu cuerpo quieres trabajar?:',$options_tren);\n\t\t\n\t\t\n\t\t$buttonarray=array();\n\t\t$buttonarray[] = &$mform->createElement('submit', 'submitbutton', 'Buscar rutina');\n\t\t$buttonarray[] = &$mform->createElement('reset', 'resetbutton', 'Resetear');\n\t\t$buttonarray[] = &$mform->createElement('cancel', 'cancel', 'Cancelar');\n\t\t$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);\n\t\t$mform->addElement('hidden', 'end');\n\t\t$mform->setType('end', PARAM_NOTAGS);\n\t\t$mform->closeHeaderBefore('end');\n\t}",
"public function suma_compras_anio_mes_grafica($fecha){\n\n $conectar=parent::conexion();\n parent::set_names();\n \n //se usa para traducir el mes en la grafica\n //imprime la fecha por separado ejemplo: dia, mes y año\n $meses = array(\"Enero\",\"Febrero\",\"Marzo\",\"Abril\",\"Mayo\",\"Junio\",\"Julio\",\"Agosto\",\"Septiembre\",\"Octubre\",\"Noviembre\",\"Diciembre\");\n\n \n\n //SI EXISTE EL ENVIO POST ENTONCES SE MUESTRA LA FECHA SELECCIONADA\n if(isset($_POST[\"year\"])){\n\n $fecha=$_POST[\"year\"];\n\n $sql=\"SELECT YEAR(fecha_compra) as ano, MONTHname(fecha_compra) as mes, SUM(total) as total_compra_mes FROM compras WHERE YEAR(fecha_compra)=? and estado='1' GROUP BY MONTHname(fecha_compra) desc\";\n \n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$fecha);\n $sql->execute();\n\n $resultado= $sql->fetchAll();\n \n //recorro el array y lo imprimo\n foreach($resultado as $row){\n\n\n $ano= $output[\"mes\"]=$meses[date(\"n\", strtotime($row[\"mes\"]))-1];\n $p = $output[\"total_compra_mes\"]=$row[\"total_compra_mes\"];\n\n echo $grafica= \"{name:'\".$ano.\"', y:\".$p.\"},\";\n\n }\n\n\n } else {\n\n\n//sino se envia el POST, entonces se mostraria los datos del año actual cuando se abra la pagina por primera vez\n\n $fecha_inicial=date(\"Y\");\n\n\n $sql=\"SELECT YEAR(fecha_compra) as ano, MONTHname(fecha_compra) as mes, SUM(total) as total_compra_mes FROM compras WHERE YEAR(fecha_compra)=? and estado='1' GROUP BY MONTHname(fecha_compra) desc\";\n \n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$fecha_inicial);\n $sql->execute();\n\n $resultado= $sql->fetchAll();\n \n //recorro el array y lo imprimo\n foreach($resultado as $row){\n\n $ano= $output[\"mes\"]=$meses[date(\"n\", strtotime($row[\"mes\"]))-1];\n $p = $output[\"total_compra_mes\"]=$row[\"total_compra_mes\"];\n\n echo $grafica= \"{name:'\".$ano.\"', y:\".$p.\"},\";\n\n }//cierre del foreach\n\n\n }//cierre del else\n\n\n }",
"function mostrar_editar_datos_poliza($id_usuario_sesion, $tipo_sesion, $usuario_sesion, $id_ef_sesion, $conexion){\n?>\n<script type=\"text/javascript\" src=\"jui/js/source/jquery.ui.core.js\"></script>\n<script type=\"text/javascript\" src=\"jui/js/source/jquery.ui.widget.js\"></script>\n<script type=\"text/javascript\" src=\"jui/js/source/jquery.ui.datepicker.js\"></script>\n<script type=\"text/javascript\" src=\"jui/js/i18n/jquery.ui.datepicker-es.js\"></script>\n<script type=\"text/javascript\">\n $(function(){\n\t $(\"#txtFechaini\").datepicker({\n\t\t\tchangeMonth: true,\n\t\t\tchangeYear: true,\n\t\t\tshowButtonPanel: true,\n\t\t\tdateFormat: 'yy-mm-dd',\n\t\t\tyearRange: \"c-100:c+100\"\n\t });\n\t $(\"#txtFechafin\").datepicker({\n\t\t\tchangeMonth: true,\n\t\t\tchangeYear: true,\n\t\t\tshowButtonPanel: true,\n\t\t\tdateFormat: 'yy-mm-dd',\n\t\t\tyearRange: \"c-100:c+100\"\n\t }); \t\n\t\n\t $(\"#txtFechaini\").datepicker($.datepicker.regional[ \"es\" ]);\n\t $(\"#txtFechafin\").datepicker($.datepicker.regional[ \"es\" ]);\n\t \n\t //VALIDAMOS LOS CAMPOS DEL FORMULARIO\n\t $('#frmDatosPoliza').submit(function(e){\n\t\t var num_poliza = $('#txtPoliza').prop('value');\n\t\t var fecha_ini = $('#txtFechaini').prop('value');\n\t\t var fecha_fin = $('#txtFechafin').prop('value');\n\t\t //var selectProducto = $(\"#txtProducto option:selected\").prop('value');\n\t\t var sum=0;\n\t\t $(this).find('.required').each(function(){\n\t\t\t if(num_poliza!=''){\n\t\t\t\t if(num_poliza.match(/^[0-9A-Z\\s\\-]+$/)){\n\t\t\t\t\t $('#errorpoliza').hide('slow');\n\t\t\t\t }else{\n\t\t\t\t\t sum++; \n\t\t\t\t\t $('#errorpoliza').show('slow'); \n\t\t\t\t\t $('#errorpoliza').html('ingrese solo alfanumerico'); \n\t\t\t\t }\n\t\t\t }else{\n\t\t\t\t sum++;\n\t\t\t\t $('#errorpoliza').show('slow');\n\t\t\t\t $('#errorpoliza').html('ingrese el numero de poliza');\n\t\t\t }\n\t\t\t /*if(selectProducto!=''){\n\t\t\t\t $('#errorproducto').hide('slow');\n\t\t\t }else{\n\t\t\t\t sum++; \n\t\t\t\t $('#errorproducto').show('slow');\n\t\t\t\t $('#errorproducto').html('seleccione producto'); \n\t\t\t }*/\n\t\t\t if(fecha_ini!=''){\n\t\t\t\t $('#errorfechaini').hide('slow');\n\t\t\t }else{\n\t\t\t\t sum++;\n\t\t\t\t $('#errorfechaini').show('slow');\n\t\t\t\t $('#errorfechaini').html('ingrese la fecha');\n\t\t\t }\n\t\t\t if(fecha_fin!=''){\n\t\t\t\t $('#errorfechafin').hide('slow');\n\t\t\t }else{\n\t\t\t\t sum++;\n\t\t\t\t $('#errorfechafin').show('slow');\n\t\t\t\t $('#errorfechafin').html('ingrese la fecha');\n\t\t\t }\n\t\t });\n\t\t if(sum==0){\n\t\t\t \n\t\t }else{\n\t\t\t e.preventDefault(); \n\t\t }\n\t\t \n\t });\n\t \n\t $('#btnCancelar').click(function(e){\n\t\t var variable=$('#var').prop('value');\n\t\t var idcompania=$('#idcompania').prop('value');\n\t\t var id_ef=$('#id_ef').prop('value');\n\t\t $(location).attr('href', 'index.php?l=des_poliza&var='+variable+'&listarpolizas=v&idcompania='+idcompania+'&id_ef='+id_ef); \n\t });\n\t \n\t //VERIFICAMOS SI EL NUMERO DE POLIZA EXISTE\n\t $('#txtPoliza').blur(function(e){\n\t\t var num_poliza = $(this).val();\n\t\t var producto = $('#txtProducto').prop('value');\n\t\t var id_ef_cia = $('#id_ef_cia').prop('value');\n\t\t var id_poliza = $('#id_poliza').prop('value');\n\t\t //VERIFICAMOS SI LA CASILLA ESTA VACIA\n\t\t //e.preventDefault();\n\t\t if (num_poliza == \"\") {\n\t\t $('#errorpoliza').show('slow');\n\t\t\t $('#errorpoliza').html('ingrese numero de poliza');\n\t\t\t $(\"#btnGuardar\").attr(\"disabled\", true);\n\t\t\t $('#errorpoliza').focus();\n\t\t }else if(num_poliza.match(/^[0-9A-Z\\s\\-]+$/)){//VERIFICAMOS SI EL VALOR ES NUMERO ENTERO\n\t\t\t $('#errorpoliza').hide('slow');\n\t\t\t var dataString = 'num_poliza='+num_poliza+'&id_ef_cia='+id_ef_cia+'&producto='+producto+'&id_poliza='+id_poliza+'&opcion=buscar_numpoliza_add';\n\t\t\t //alert(dataString);\n\t\t\t $.ajax({\n\t\t\t\t\t async: true,\n\t\t\t\t\t cache: false,\n\t\t\t\t\t type: \"POST\",\n\t\t\t\t\t url: \"accion_registro.php\",\n\t\t\t\t\t data: dataString,\n\t\t\t\t\t success: function(datareturn) {\n\t\t\t\t\t\t\t//alert(datareturn);\n\t\t\t\t\t\t\tif(datareturn==1){\n\t\t\t\t\t\t\t $('#errorpoliza').hide('slow');\n\t\t\t\t\t\t\t $(\"#btnGuardar\").removeAttr(\"disabled\");\n\t\t\t\t\t\t\t}else if(datareturn==2){\n\t\t\t\t\t\t\t $('#errorpoliza').show('slow');\n\t\t\t\t\t\t\t $('#errorpoliza').html('el numero de poliza ya existe ingrese otra');\n\t\t\t\t\t\t\t $(\"#btnGuardar\").attr(\"disabled\", true); \n\t\t\t\t\t\t\t $('#errorpoliza').focus();\n\t\t\t\t\t\t\t e.stopPropagation();\n\t\t\t\t\t\t\t} \n\t\t\t\t\t }\n\t\t\t });\t\t\t \n\t\t }else{\n\t\t\t $('#errorpoliza').show('slow');\n\t\t\t $('#errorpoliza').html('ingrese solo alfanumericos');\n\t\t\t $(\"#btnGuardar\").attr(\"disabled\", true); \n\t\t\t $('#errorpoliza').focus();\n\t\t\t e.stopPropagation();\n\t\t }\n });\n\t \n\t $('#txtProducto').change(function(){\n\t\t var producto=$(this).prop('value');\n\t\t if(producto!=''){\n\t\t\t $('#txtPoliza').removeAttr(\"disabled\");\n\t\t\t /*var num_poliza = $('#txtPoliza').prop('value');\n\t\t\t var producto = $('#txtProducto option:selected').prop('value');\n\t\t\t var id_ef_cia = $('#id_ef_cia').prop('value');\n\t\t\t //VERIFICAMOS SI LA CASILLA ESTA VACIA\n\t\t\t //e.preventDefault();\n\t\t\t if (num_poliza == \"\") {\n\t\t\t\t $('#errorpoliza').show('slow');\n\t\t\t\t $('#errorpoliza').html('ingrese numero de poliza');\n\t\t\t\t $(\"#btnGuardar\").attr(\"disabled\", true);\n\t\t\t\t $('#errorpoliza').focus();\n\t\t\t }else if(num_poliza.match(/^[0-9A-Z\\s\\-]+$/)){//VERIFICAMOS SI EL VALOR ES NUMERO ENTERO\n\t\t\t\t $('#errorpoliza').hide('slow');\n\t\t\t\t var dataString = 'num_poliza='+num_poliza+'&id_ef_cia='+id_ef_cia+'&producto='+producto+'&opcion=buscar_numpoliza_add';\n\t\t\t\t //alert(dataString);\n\t\t\t\t $.ajax({\n\t\t\t\t\t\t async: true,\n\t\t\t\t\t\t cache: false,\n\t\t\t\t\t\t type: \"POST\",\n\t\t\t\t\t\t url: \"accion_registro.php\",\n\t\t\t\t\t\t data: dataString,\n\t\t\t\t\t\t success: function(datareturn) {\n\t\t\t\t\t\t\t\t//alert(datareturn);\n\t\t\t\t\t\t\t\tif(datareturn==1){\n\t\t\t\t\t\t\t\t $('#errorpoliza').hide('slow');\n\t\t\t\t\t\t\t\t $(\"#btnGuardar\").removeAttr(\"disabled\");\n\t\t\t\t\t\t\t\t}else if(datareturn==2){\n\t\t\t\t\t\t\t\t $('#errorpoliza').show('slow');\n\t\t\t\t\t\t\t\t $('#errorpoliza').html('el numero de poliza ya existe ingrese otra');\n\t\t\t\t\t\t\t\t $(\"#btnGuardar\").attr(\"disabled\", true); \n\t\t\t\t\t\t\t\t $('#errorpoliza').focus();\n\t\t\t\t\t\t\t\t e.stopPropagation();\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t }\n\t\t\t\t });\t\t\t \n\t\t\t }else{\n\t\t\t\t $('#errorpoliza').show('slow');\n\t\t\t\t $('#errorpoliza').html('ingrese solo alfanumericos');\n\t\t\t\t $(\"#btnGuardar\").attr(\"disabled\", true); \n\t\t\t\t $('#errorpoliza').focus();\n\t\t\t\t e.stopPropagation();\n\t\t\t }*/\n\t\t }else{\n\t\t\t $('#txtPoliza').attr(\"disabled\", true);\n\t\t }\n\t });\n\t \n\t $('#txtPoliza').keyup(function() {\n $(this).val($(this).val().toUpperCase());\n }); \n });\n</script>\n<?php \n\t$idpoliza = base64_decode($_GET['idpoliza']);\n\t$id_ef_cia = base64_decode($_GET['id_ef_cia']);\n\t$entidad = base64_decode($_GET['entidad']);\n $compania = base64_decode($_GET['compania']);\n\t\n\t//SACAMOS LOS DATOS DE LA BASE DE DATOS\n\t$select = \"select\n\t\t\t\t sp.id_poliza,\n\t\t\t\t sp.no_poliza,\n\t\t\t\t sp.fecha_ini,\n\t\t\t\t sp.fecha_fin,\n\t\t\t\t sp.producto,\n\t\t\t\t sp.id_ef_cia,\n\t\t\t\t efc.id_ef\n\t\t\t\tfrom\n\t\t\t\t s_poliza as sp\n\t\t\t\t inner join s_ef_compania as efc on (efc.id_ef_cia=sp.id_ef_cia)\n\t\t\t\t inner join s_compania as sc on (sc.id_compania=efc.id_compania)\n\t\t\t\twhere\n\t\t\t\t sp.id_ef_cia='\".$id_ef_cia.\"' and efc.activado=1 and sc.activado=1 and sp.id_poliza='\".$idpoliza.\"';\";\n\tif($rs = $conexion->query($select, MYSQLI_STORE_RESULT)){\n\t\t\t$num = $rs->num_rows;\n\t\t\t\n\t\t\t//SI EXISTE EL USUARIO DADO EN LA BASE DE DATOS, LO EDITAMOS\n\t\t\tif($num>0) {\n\t\t\t\t$fila = $rs->fetch_array(MYSQLI_ASSOC);\n\t\t\t\t$rs->free();\n\t\t\t\techo'<div class=\"da-panel collapsible\">\n\t\t\t\t<div class=\"da-panel-header\" style=\"text-align:right; padding-top:5px; padding-bottom:5px;\">\n\t\t\t\t\t<ul class=\"action_user\">\n\t\t\t\t\t\t<li style=\"margin-right:6px;\">\n\t\t\t\t\t\t <a href=\"?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($fila['id_ef']).'&producto_nombre='.$_GET['producto_nombre'].'&producto_code='.$_GET['producto_code'].'\" class=\"da-tooltip-s\" title=\"<span lang=\\'es\\'>Volver</span>\">\n\t\t\t\t\t\t <img src=\"images/retornar.png\" width=\"32\" height=\"32\"></a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t </div>'; \n\t\t\t\t\n\t\t\n\t\t\t\tif(isset($_POST['txtPoliza'])) $txtPoliza = $_POST['txtPoliza']; else $txtPoliza = $fila['no_poliza'];\n\t\t\t\tif(isset($_POST['txtFechaini'])) $txtFechaini = $_POST['txtFechaini']; else $txtFechaini = $fila['fecha_ini'];\n\t\t\t\tif(isset($_POST['txtFechaFin'])) $txtFechaFin = $_POST['txtFechaFin']; else $txtFechaFin = $fila['fecha_fin'];\n\t\t\t\tif(isset($_POST['txtProducto'])) $txtProducto = $_POST['txtProducto']; else $txtProducto = $fila['producto'];\n\t\t\t\t\t\t\n\t\t\t\t echo'<div class=\"da-panel\" style=\"width:600px;\">\n\t\t\t\t\t\t\t<div class=\"da-panel-header\">\n\t\t\t\t\t\t\t\t<span class=\"da-panel-title\">\n\t\t\t\t\t\t\t\t\t<img src=\"images/icons/black/16/pencil.png\" alt=\"\" />\n\t\t\t\t\t\t\t\t\t<b>'.$entidad.' - '.$compania.'</b> - <span lang=\"es\">Editar Póliza</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"da-panel-content\">\n\t\t\t\t\t\t\t\t<form class=\"da-form\" name=\"frmDatosPoliza\" action=\"\" method=\"post\" id=\"frmDatosPoliza\">\n\t\t\t\t\t\t\t\t\t<div class=\"da-form-row\" id=\"content-entidadf\">\n\t\t\t\t\t\t\t\t\t <label style=\"text-align:right;\"><b><span lang=\"es\">Producto</span></b></label>\n\t\t\t\t\t\t\t\t\t <div class=\"da-form-item small\">\n\t\t\t\t\t\t\t\t\t\t'.base64_decode($_GET['producto_nombre']).'\n\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"txtProducto\" name=\"txtProducto\" value=\"'.base64_decode($_GET['producto_code']).'\"/>\n\t\t\t\t\t\t\t\t\t </div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"da-form-row\">\n\t\t\t\t\t\t\t\t\t\t<label style=\"text-align:right;\"><b><span lang=\"es\">Nro Poliza</span></b></label>\n\t\t\t\t\t\t\t\t\t\t<div class=\"da-form-item large\">\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"textbox required\" type=\"text\" name=\"txtPoliza\" id=\"txtPoliza\" style=\"width: 200px;\" value=\"'.$txtPoliza.'\" autocomoplete=\"off\"/>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"errorMessage\" id=\"errorpoliza\"></span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"da-form-row\">\n\t\t\t\t\t\t\t\t\t\t<label style=\"text-align:right;\"><b><span lang=\"es\">Fecha Inicial</span></b></label>\n\t\t\t\t\t\t\t\t\t\t<div class=\"da-form-item large\">\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"textbox required\" type=\"text\" name=\"txtFechaini\" id=\"txtFechaini\" style=\"width: 200px;\" value=\"'.$txtFechaini.'\" readonly/>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"errorMessage\" id=\"errorfechaini\"></span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"da-form-row\">\n\t\t\t\t\t\t\t\t\t\t<label style=\"text-align:right;\"><b><span lang=\"es\">Fecha Final</span></b></label>\n\t\t\t\t\t\t\t\t\t\t<div class=\"da-form-item large\">\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"textbox required\" type=\"text\" name=\"txtFechafin\" id=\"txtFechafin\" style=\"width: 200px;\" value=\"'.$txtFechaFin.'\" readonly/>\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"errorMessage\" id=\"errorfechafin\"></span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"da-button-row\">\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"Guardar\" class=\"da-button green\" name=\"btnGuardar\" id=\"btnGuardar\" lang=\"es\"/>\n\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"var\" value=\"'.$_GET['var'].'\"/>\n\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"id_ef\" value=\"'.$fila['id_ef'].'\"/>\n\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"id_ef_cia\" value=\"'.$id_ef_cia.'\"/>\n\t\t\t\t\t\t\t\t\t\t<input type=\"hidden\" id=\"id_poliza\" value=\"'.$idpoliza.'\"/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>';\n\t\t\t\n\t\t\t} else {\n\t\t\t\t//SI NO EXISTE EL USUARIO DADO EN LA BASE DE DATOS, VOLVEMOS A LA LISTA DE USUARIOS\n\t\t\t\theader('Location: index.php?l=des_poliza&var='.$_GET['var']);\n\t\t\t}\n\t}else{\n\t\techo\"<div style='font-size:8pt; text-align:center; margin-top:20px; margin-bottom:15px; border:1px solid #C68A8A; background:#FFEBEA; padding:8px; width:600px;'>Error en la consulta: \".\"\\n \".$conexion->errno . \": \" .$conexion->error.\"</div>\";\n\t}\n}",
"function formulario(){\n\t\tglobal $main_menu, $usuarioid, $username, $ruta, $controller, $funcion, $subfuncion, $modulos_totales;\n\n\t\t$main_view=false;\n\t\t$data['username']=$username;\n\t\t$data['usuarioid']=$usuarioid;\n\t\t$data['modulos_totales']=$modulos_totales;\n\t\t$data['colect1']=$main_menu;\n\t\t$data['title']=$this->accion->get_title(\"$subfuncion\");\n\t\t$accion_id=$this->accion->get_id(\"$subfuncion\");\n\t\t$row=$this->usuario->get_usuario($usuarioid);\n\t\t$grupoid=$row->grupo_id;\n\t\t$puestoid=$row->puesto_id;\n\t\t$data['ruta']=$ruta;\n\t\t$data['controller']=$controller;\n\t\t$data['funcion']=$funcion;\n\t\t$data['subfuncion']=$subfuncion;\n\t\t$data['permisos']=$this->usuario_accion->get_permiso($accion_id, $usuarioid, $puestoid, $grupoid);\n\n\t\t//Validacion del arreglo del menu, usuarioid y permisos especificos\n\t\tif(is_array($data['colect1']) and $usuarioid>0 and $data['permisos']!= false and $this->session->userdata('logged_in') == TRUE){\n\n\t\t\t$main_view=true;\n\t\t\tif ($subfuncion==\"rep_general_recetas\"){\n\t\t\t\t//Cargar los datos para el formulario\n\t\t\t\t$data['frames']=1;\n\t\t\t\t$data['recetas'] = $this->receta->get_recetas_pdf();\n\t\t\t\tif ($data['recetas']){\n\t\t\t\t\t$this->load->view(\"produccion/rep_general_recetas_pdf\", $data);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo \"<html> <script>alert(\\\"No hay aun Registros de Recetas en la Base de Datos favor de verificar.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/produccion/menu';</script></html>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($subfuncion==\"rep_etiquetas_codigo_barras\"){\n\t\t\t\t$data['principal']=$ruta.\"/\".$subfuncion;\n\t\t\t\t$data['title']=\"Impresi�n de Etiquetas con C�digo de Barras\";\n\t\t\t\t$data['productos']=$this->producto->get_cproductos_etiquetas();\n\t\t\t}\n\t\t}\n\t\tif($main_view){\n\t\t\t//Llamar a la vista\n\t\t\t$this->load->view(\"ingreso\", $data);\n\t\t} else {\n\t\t\tredirect(base_url().\"index.php/inicio/logout\");\n\t\t}\n\t}",
"function muestraFormularioMetas(){\n $name = $titulo = $urlfolio = \"\";\n $folio = $random = 0;\n if($this->data['folio'] != \"\"){\n $tmp=explode('-',$this->data['folio']);\n if($this->opc == 9){\n $name=\"guardaAvance\";\n $arrayProyecto = $this->regresaDatosProyecto($tmp[0]);\n $folio = $tmp[0];\n $urlfolio=$this->data['folio'];\n $titulo=CAPTURAREPORTEDEMETAS;\n $random=rand(1,10000000);\n }\n else{\n $name=\"actualizaAvance\";\n $arrayProyecto = $this->regresaDatosProyecto($tmp[1]);\n $folio = $tmp[1];\n $urlfolio=$tmp[1].\"-\".$tmp[2];\n $random=$tmp[0];\n }\n $this->arrayNotificaciones = $this->notificaciones ();\n $titulo = $arrayProyecto['proyecto'];\n $resultados = $this->consultaActividades($this->pages->limit);\n $arrayDisabled = $this->recuperaPermisos($arrayProyecto['unidadResponsable_id'],$arrayProyecto['programa_id']); \n $trimestreId = $this->obtenTrimestre($arrayDisabled);\n $arrayUnidadOperativas=$this->catalogoUnidadesOperativas($this->db);\n\t\t\t$campoTrimestre=\"estatus_avance_entrega\";\n\t\t\tif($campoTrimestre > 1){\n\t\t\t\t$campoTrimestre=\"estatus_avance_entrega\".$campoTrimestre;\n\t\t\t}\n\t\t\t\n $this->buffer=\"\n <input type='hidden' name='noAtributos' id='noAtributos' value='\".( count($resultados) + 0).\"'>\n <input type='hidden' name='valueId' id='valueId' value='\".($this->arrayAvanceMetas['id'] + 0).\"'>\n <input type='hidden' name='folio' id='folio' value='\".$folio.\"'>\n <input type='hidden' name='random' id='random' value='\".$random.\"'>\n <input type='hidden' name='trimestreId' id='trimestreId' value='\".$trimestreId.\"'>\n <div class='panel panel-danger spancing'>\n <div class='panel-heading titulosBlanco'>\".$titulo.\"</div>\n <div class='panel-body'>\n <table align='center' border='0' class='table table-condensed'>\n <tr class='active alturaComponentesA'>\n <td class='tdleft' colspan='2' width='25%'>\".PROYECTO.\"</td>\n <td class='tdleft' colspan='2'>\".$arrayProyecto['proyecto'].\"</td>\n </tr>\n <tr class='alturaComponentesA'>\n <td class='tdleft' colspan='2' >\".UNIDADOPERATIVA.\"</td>\n <td class='tdleft' colspan='2'>\".$arrayUnidadOperativas[$arrayProyecto['unidadOperativaId']].\"</td>\n </tr>\n <tr class='alturaComponentesA'>\n <td class='tdleft' colspan='2' >\".TRIMESTRE.\"</td>\n <td class='tdleft' colspan='2'>\".$trimestreId.\"</td>\n </tr>\n \n </table>\n <table width='100%' class='table'>\n <tr>\n <td class='tdcenter fondotable' rowspan='2' width='30%'>\".ACTIVIDAD.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE1C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE2C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE3C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE4C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TOTAL.\"</td>\n <td class='tdcenter fondotable' rowspan='2' width='14%'>\".MEDIDA.\"</td>\n <td class='tdcenter fondotable' rowspan='2' width=' 8%'>\".ucfirst(substr(PONDERACION,0,4)).\"</td>\n <td class='tdcenter fondotable' rowspan='2' width=' 8%'>\".ucfirst(substr(TIPOACT,8,3)).\"</td>\n </tr>\n <tr>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n </tr>\";\n $contadorTab1=1;\n $contadorTab2=2;\n $contadorTab3=3;\n $contadorTab4=4; \n $contadorRen = $total = $totales = $rtotal = $rtotales = 0;\n $disabled_t1 = $disabled_t2 = $disabled_t3 = $disabled_t4 = \"\";\n $fondo_t1 = 'background-color:#ffff99;';\n $fondo_t2 = 'background-color:#ffff99;';\n $fondo_t3 = 'background-color:#ffff99;';\n $fondo_t4 = 'background-color:#ffff99;';\n if($arrayDisabled[1]['dis'] + 0 == 0){\n $disabled_t1=\" readonly ='true' \";\n $fondo_t1 = '';\n }\n if($arrayDisabled[2]['dis'] + 0 == 0){\n $disabled_t2=\" readonly ='true' \";\n $fondo_t2 = '';\n }\n if($arrayDisabled[3]['dis'] + 0 == 0){\n $disabled_t3=\" readonly ='true' \";\n $fondo_t3 = '';\n }\n if($arrayDisabled[4]['dis'] + 0 == 0){\n $disabled_t4=\" readonly ='true' \";\n $fondo_t4 = '';\n }\n $arrayEditable=array(1,3,4,6,7,8,9);\n \n foreach($resultados as $id => $resul){\n $rand = rand(1,99999999999999);\n $class=\"\";\n if($contador % 2 == 0)\n $class=\"active\";\n $campo=\"estatus_avance_entrega_t\".$trimestreId; \n $idEstatusActividad =$resul[$campo] ;\n $varTemporalId = $resul['id'].\"-\".$arrayProyecto['id'].\"-\".$trimestreId;\n $varTemporalIdE = $resul ['id'] . \"-\" . $arrayProyecto['id'].\"-\".$trimestreId.\"-\".$idEstatusActividad; \n $idact= $resul['id'];\n $totales = $totales + $this->arrayDatos[$idact][5] + 0;\n $tmp=\"\";\n \n if($resul['tipo_actividad_id'] != 0){\n $this->buffer.=\"\n <tr class=' $class alturaComponentesA'>\n <td class='tdleft' rowspan='2'>\".$resul['actividad'].\"</td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][1] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' tabindex='\".$contadorTab1.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab1.\"-1-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][1] + 0).\"' style='width:35px;$fondo_t1' \".$disabled_t1.\">\n </td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][2] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' \".$this->disabled.\" tabindex='\".$contadorTab2.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab2.\"-2-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][2] + 0).\"' style='width:35px;$fondo_t2' \".$disabled_t2.\"> \n </td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][3] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' \".$this->disabled.\" tabindex='\".$contadorTab3.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab3.\"-3-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][3] + 0).\"' style='width:35px;$fondo_t3' \".$disabled_t3.\">\n </td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][4] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' \".$this->disabled.\" tabindex='\".$contadorTab4.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab4.\"-4-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][4] + 0).\"' style='width:35px;$fondo_t4' \".$disabled_t4.\">\n </td>\n <td class='tdcenter' rowspan='2'>\n <span id='total\".$contadorRen.\"' class='totales'>\".number_format(($this->arrayDatos[$idact][1] + $this->arrayDatos[$idact][2] + $this->arrayDatos[$idact][3] + $this->arrayDatos[$idact][4] + 0),0,',','.').\"</span>\n </td>\n <td class='tdcenter' rowspan='2'>\n <span id='rtotal\".$contadorRen.\"' class='totales'>\".number_format($this->arrayAvanceMetas[$idact][1] + $this->arrayAvanceMetas[$idact][2] + $this->arrayAvanceMetas[$idact][3] +$this->arrayAvanceMetas[$idact][4],0,',','.').\"</span>\n </td>\n <td class='tdcenter'>\".$resul['medida'].\"</td>\n <td class='tdcenter'>\".$resul['ponderacion'].\"</td>\n <td class='tdcenter'>\".$resul['tipo_actividad_id'].\"</td>\n </tr>\n <tr>\n <td colspan='8' class='tdleft $class'>\".$this->regresaUltimoComentario($arrayProyecto['id'],$resul['id']).\"<br>\".$this->regresaNoAdjuntos($arrayProyecto['id'],$resul['id']).\"<span id='avance'></span></td>\";\n $rtotales = $rtotales + $this->arrayAvanceMetas[$idact][5]; \n if($this->session['rol'] == 1 || $this->session['rol'] >=3){\n $this->buffer.=\"<td class='tdcenter $class' colspan='3'>\"; \n if($this->session['rol'] == 1 || $this->session['rol'] >=4){\n $classb=\"mComentariosConsulta\";\n if(in_array($arrayProyecto[$campoTrimestre],$arrayEditable)){\n $classb=\"mComentarios\";\n }\n $this->buffer.=\"<button type='button' class='btn btn-success btn-sm $classb' id='\".$resul['proyecto_id'].\"-\".$resul['id'].\"-\".$trimestreId.\"'><span class='glyphicon glyphicon-pencil'></span> Comentarios</button>\";\n }\n if($this->session['rol'] >=3){\n $this->buffer.=\"<button type='button' class='btn btn-warning btn-sm masFile' id='m-\".$resul['proyecto_id'].\"-\".$resul['id'].\"-\".$trimestreId.\"'> Más</button>\";\n }\n $this->buffer.=\"</td>\";\n }\n if($this->session['rol'] == 2){\n $this->buffer.=\"\n <td class='tdcenter $class'><button type='button' class='btn btn-success btn-sm mComentariosConsulta' id='\".$resul['proyecto_id'].\"-\".$resul['id'].\"-\".$trimestreId.\"'><span class='glyphicon glyphicon-pencil'></span> Comentarios</button></td>\n <td class='tdcenter $class'>\n <button type='button' class='btn btn-default aprobadosavances' data-toggle='tooltip' data-placement='bottom'\n title='\".PROYECTOAPROBADO.\"' id='aaa-\".$varTemporalIdE.\"'><span class='glyphicon glyphicon-ok'></span>\n </button>\n </td>\n <td class='tdcenter $class'>\n <button type='button' class='btn btn-default noaprobadosavances' data-toggle='tooltip' data-placement='bottom'\n title='\".PROYECTONOAPROBADO.\"' id='ann-\".$varTemporalIdE.\"'><span class='glyphicon glyphicon-remove'></span>\n </button></td>\";\n }\n \n \n $this->buffer.=\"</tr><tr><td colspan='11'> </td>\";\n if( ($idEstatusActividad!= 3) && ($idEstatusActividad!= 6) && ($idEstatusActividad!= 9)){\n $this->buffer .= \"<td class='tdleft' colspan='3' id='v-\".$varTemporalIdE.\"' style='background-color:\" . $this->arrayNotificaciones [$idEstatusActividad] ['color'] . \";color:#000000;'>\" . $this->arrayNotificaciones [$idEstatusActividad] ['nom'] . \"</td>\";\n }\n else{\n $this->buffer .= \"<td class='tdleft verComentariosNoAprobados' colspan='3' id='v-\".$varTemporalIdE.\"' style='cursor:pointer;background-color:\" . $this->arrayNotificaciones [$idEstatusActividad] ['color'] . \";color:#000000;' data-toggle='tooltip' data-placement='bottom' title='\" . TOOLTIPMUESTRACOMENTARIOS . \"'>\" . $this->arrayNotificaciones [$idEstatusActividad] ['nom'] . \"</td>\";\n }\n $this->buffer .= \"</tr>\";\n $contadorTab1 = $contadorTab1 + 4;\n $contadorTab2 = $contadorTab2 + 4;\n $contadorTab3 = $contadorTab3 + 4;\n $contadorTab4 = $contadorTab4 + 4;\n $contadorRen++;\n $contador++;\n }\n }\n $contadorTab4++;\n \n /*$this->buffer.=\"<tr><td colspan='8'></td>\n <td class='tdleft'>Total:</td><td class='tdcenter'><span id='totales' class='totales'>\".($totales + 0).\"</span></td>\n <td class='tdcenter'><span id='rtotales' class='totales'>\".($rtotales + 0).\"</span></td>\n <td colspan='3'> </td></tr></table>*/\n $this->buffer.=\"</table>\n </div>\n <div class=\\\"central\\\"><br>\"; \n if( (in_array($arrayProyecto[$campoTrimestre],$arrayEditable)) or ($this->session['rol']<=2 or $this->session['rol']<=5) ){\n \n $this->buffer.=\"<button type='button' tabindex='\".$contadorTab4.\"' class='btn btn-success btn-sm' id='\".$name.\"' name='\".$name.\"'><span class='glyphicon glyphicon-floppy-saved'></span> \".AGREGAREPORTEMETA.\"</button> \";\n }\n $this->buffer.=\"<button type='button' class='btn btn-primary btn-sm'\n onclick=\\\"location='\".$this->path.\"aplicacion.php?aplicacion=\".$this->session ['aplicacion'].\"&apli_com=\".$this->session ['apli_com'].\"&opc=0'\\\">\".REGRESA.\"</button>\n </div>\".$this->procesando(4).\"<br></div>\";\n }else{\n header(\"Location: \".$this->path.\"aplicacion.php?aplicacion=\".$this->session ['aplicacion'].\"&apli_com=\".$this->session ['apli_com'].\"&opc=1\");\n } \n }",
"function getElementosPlus() {\t\n\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\n\t\t\n\t\t//Y GUARDANDO OS DATOS EN VARIABLES\n\t\tif (isset($_REQUEST['hora_inicio'])) {\n\t\t\t$hora_inicio = $_REQUEST['hora_inicio'];\n\t\t\t$minuto_inicio = $_REQUEST['minuto_inicio'];\n\t\t\t$hora_termino = $_REQUEST['hora_termino'];\n\t\t\t$minuto_termino = $_REQUEST['minuto_termino'];\n\t\t}else{\n\t\t\t$hora_termino = '23';\n\t\t\t$minuto_termino = '59';\n\t\t\t$hora_inicio = '00';\n\t\t\t$minuto_inicio = '00';\n\t\t}\n\n\t\tif (isset($_REQUEST['nodo_filtro'])) {\n\t\t\t$nodo_filtro = $_REQUEST['nodo_filtro'];\n\t\t\t$isset = 1;\n\t\t}else{\n\t\t\t$nodo_filtro = -1;\n\t\t\t$isset = 0;\n\t\t}\n\n\n\t\t//SE GUARDA DIA MES Y AÑO EN VARIABLE Y SE LE AGREGA LA HORA QUE SE PASA POR POST POR LOS INPUTS DEL FILTRO\n\t\t$fechainicioSinHora = date(\"Y-m-d\", strtotime($this->timestamp->getInicioPeriodo()));\n\t\t$fecha_inicio_filtro = $fechainicioSinHora.' '.$hora_inicio.':'.$minuto_inicio.':00';\n\t\t$fechaTerminoSinHora = date(\"Y-m-d\", strtotime($this->timestamp->getInicioPeriodo()));\n\t\t$fecha_termino_filtro = $fechaTerminoSinHora.' '.$hora_termino.':'.$minuto_termino.':59';\n\n\t\t//SI SE ACTIVA EL FILTRO SE GUARDA FECHA PASADA POR POST SINO LA FECHA ES LA DEL CALENDARIO\n\t\tif (isset($_REQUEST['hora_inicio'])) {\n\t\t\t$fecha_inicial = $fecha_inicio_filtro;\n\t\t\t$fecha_termino = $fecha_termino_filtro;\n\t\t}else{\n\t\t\t$fecha_inicial = $this->timestamp->getInicioPeriodo();\n\t\t\t$fecha_termino = $this->timestamp->getTerminoPeriodo();\n\t\t}\n\t\t$h1=($hora_inicio);\n\t\t$m1=($minuto_inicio);\n\t\t$h2=($hora_termino);\n\t\t$m2=($minuto_termino);\n\t\t//EN CASO DE HABER PAGINADO EL MONITOR SOLO SE CARGA LA FUNCIÓN getDetalleElementosPlus()\n\t\tif (isset($this->extra[\"monitor_id\"]) and isset($this->extra[\"pagina\"])) {\n\t\t\t$this->resultado = $this->resultado = $this->getDetalleElementosPlus($this->extra[\"monitor_id\"], $this->extra[\"pagina\"], 1, $fecha_inicial, $fecha_termino, $isset=1,$h1, $m1, $h2, $m2);\n\t\t\treturn;\n\t\t}\n\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT titulo, foo.nodo_id FROM (\".\n\t\t\t \"SELECT DISTINCT unnest(_nodos_id) AS nodo_id FROM _nodos_id(\".\n\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\tpg_escape_string($this->objetivo_id).\",'\".\n\t\t\t\tpg_escape_string($fecha_inicial).\"','\".\n\t\t\t\tpg_escape_string($fecha_termino).\"')) AS foo, nodo n \".\n\t\t\t \"WHERE foo.nodo_id=n.nodo_id ORDER BY orden\";\n\t\t$res =& $mdb2->query($sql);\n\t\tif (MDB2::isError($res)) {\n\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$datos_nodo = array();\n\t\twhile ($row = $res->fetchRow()) {\n\t\t\t$dato_nodo = ($row[\"titulo\"]);\n\t\t\t$datos_nodo[$row[\"nodo_id\"]] = $dato_nodo;\n\t\t}\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'contenedor_tabla_filtro.tpl');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_CONTENEDORES', 'lista_contenedores');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PATRONES_SCRIPT', 'lista_patrones_script');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_NODOS_FILTRO', 'lista_nodos_filtro');\n\t\t$T->setBlock('tpl_tabla', 'VALORES_FILTRO', 'valores_filtro');\n\t\t$T->setBlock('tpl_tabla', 'VALORES_SLIDER', 'valores_slider');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_MONITOREOS', 'bloque_monitoreos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_MONITOREOS_SCRIPT', 'bloque_monitoreos_script');\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\t$slider_inicio = ($hora_inicio * 60) + $minuto_inicio;\n\t\t$slider_termino = ($hora_termino * 60) + $minuto_termino;\n\n\t\t$new = (isset($_GET['new'])) ? $_GET['new'] : true;\n\n\t\t$T->setVar('__item_id', $this->__item_id);\n\n\t\t//SE PASAN LAS VARIABLES AL FILTRO QUE SE PASARON POR POST AL HACER EL FILTRADO\n\t\t$T->setVar('__nodo_selected', $nodo_filtro);\n\t\t$T->setVar('__isset', $isset);\n\n\t\t$T->setVar('valores_slider', '');\n\t\t$T->setVar('__valor_slider_inicio', $slider_inicio);\n\t\t$T->setVar('__valor_slider_termino', $slider_termino);\n\t\t$T->parse('valores_slider', 'VALORES_SLIDER', true);\n\n\t\t$T->setVar('valores_filtro', '');\n\t\t$T->setVar('__hora_inicio', $hora_inicio);\n\t\t$T->setVar('__minuto_inicio', $minuto_inicio);\n\t\t$T->setVar('__hora_termino', $hora_termino);\n\t\t$T->setVar('__minuto_termino', $minuto_termino);\n\t\t$T->parse('valores_filtro', 'VALORES_FILTRO', true);\n\n\t\t$T->setVar('lista_nodos_filtro', '');\n\t\tforeach ($datos_nodo as $nodo_id => $titulo_nodo) {\n\t\t\tif ($nodo_id != 0) {\n\t\t\t$T->setVar('__nodo_filtro', $titulo_nodo);\n\t\t\t$T->setVar('__nodoid_filtro', $nodo_id);\n\t\t\t}else{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$T->parse('lista_nodos_filtro', 'LISTA_NODOS_FILTRO', true);\n\t\t}\n\n\n\t\t$orden = 1;\n\t\t$cuenta_nodos = 0;\n\t\tforeach ($datos_nodo as $nodo_id => $titulo_nodo) {\n\t\t\tif (!isset($_REQUEST['nodo_filtro']) || $_REQUEST['nodo_filtro'] == -1) {\n\t\t\t\t$nodo_id_filtro = $nodo_id;\n\t\t\t\t$T->setVar('__contenido_id', 'elem_'.$nodo_id_filtro);\n\t\t\t\t$T->setVar('__display_filtro', $this->__item_id);\n\t\t\t\t$T->setVar('__contenido_tabla', $this->getDetalleElementosPlus($nodo_id_filtro, 1, $orden, $fecha_inicial, $fecha_termino, $isset,$h1, $m1, $h2, $m2, $cuenta_nodos));\n\t\t\t\t$T->parse('lista_contenedores', 'LISTA_CONTENEDORES', true);\n\t\t\t\t$orden++;\n\t\t\t}else{\n\t\t\t\tif ($_REQUEST['nodo_filtro'] == $nodo_id) {\n\t\t\t\t\t$nodo_id_filtro = $_REQUEST['nodo_filtro'];\n\t\t\t\t\t$T->setVar('__contenido_id', 'elem_'.$nodo_id_filtro);\n\t\t\t\t\t$T->setVar('__display_filtro', $this->__item_id);\n\t\t\t\t\t$T->setVar('__contenido_tabla', $this->getDetalleElementosPlus($nodo_id_filtro, 1, $orden, $fecha_inicial, $fecha_termino, $isset,$h1, $m1, $h2, $m2, $cuenta_nodos));\n\t\t\t\t\t$T->parse('lista_contenedores', 'LISTA_CONTENEDORES', true);\n\t\t\t\t\t$orden++;\n\t\t\t\t}else{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$cuenta_nodos++;\n\t\t}\n\t\t\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}",
"function mostrar_crear_poliza($id_usuario_sesion, $tipo_sesion, $usuario_sesion, $id_ef_sesion, $conexion){\n?>\n<script type=\"text/javascript\" src=\"jui/js/source/jquery.ui.core.js\"></script>\n<script type=\"text/javascript\" src=\"jui/js/source/jquery.ui.widget.js\"></script>\n<script type=\"text/javascript\" src=\"jui/js/source/jquery.ui.datepicker.js\"></script>\n<script type=\"text/javascript\" src=\"jui/js/i18n/jquery.ui.datepicker-es.js\"></script>\n<script type=\"text/javascript\">\n $(function(){\n\t $(\"#txtFechaini\").datepicker({\n\t\t\tchangeMonth: true,\n\t\t\tchangeYear: true,\n\t\t\tshowButtonPanel: true,\n\t\t\tdateFormat: 'yy-mm-dd',\n\t\t\tyearRange: \"c-100:c+100\"\n\t });\n\t $(\"#txtFechafin\").datepicker({\n\t\t\tchangeMonth: true,\n\t\t\tchangeYear: true,\n\t\t\tshowButtonPanel: true,\n\t\t\tdateFormat: 'yy-mm-dd',\n\t\t\tyearRange: \"c-100:c+100\"\n\t }); \t\n\t\n\t $(\"#txtFechaini\").datepicker($.datepicker.regional[ \"es\" ]);\n\t $(\"#txtFechafin\").datepicker($.datepicker.regional[ \"es\" ]);\n\t \n\t //VALIDAMOS LOS CAMPOS DEL FORMULARIO\n\t $('#frmDatosPoliza').submit(function(e){\n\t\t var num_poliza = $('#txtPoliza').prop('value');\n\t\t var fecha_ini = $('#txtFechaini').prop('value');\n\t\t var fecha_fin = $('#txtFechafin').prop('value');\n\t\t //var selectProducto = $(\"#txtProducto option:selected\").prop('value');\n\t\t var sum=0;\n\t\t $(this).find('.required').each(function(){\n\t\t\t if(num_poliza!=''){\n\t\t\t\t if(num_poliza.match(/^[0-9A-Z\\s\\-]+$/)){\n\t\t\t\t\t $('#errorpoliza').hide('slow');\n\t\t\t\t }else{\n\t\t\t\t\t sum++; \n\t\t\t\t\t $('#errorpoliza').show('slow'); \n\t\t\t\t\t $('#errorpoliza').html('ingrese solo alfanumerico'); \n\t\t\t\t }\n\t\t\t }else{\n\t\t\t\t sum++;\n\t\t\t\t $('#errorpoliza').show('slow');\n\t\t\t\t $('#errorpoliza').html('ingrese el numero de poliza');\n\t\t\t }\n\t\t\t /*if(selectProducto!=''){\n\t\t\t\t $('#errorproducto').hide('slow');\n\t\t\t }else{\n\t\t\t\t sum++; \n\t\t\t\t $('#errorproducto').show('slow');\n\t\t\t\t $('#errorproducto').html('seleccione producto'); \n\t\t\t }*/\n\t\t\t if(fecha_ini!=''){\n\t\t\t\t $('#errorfechaini').hide('slow');\n\t\t\t }else{\n\t\t\t\t sum++;\n\t\t\t\t $('#errorfechaini').show('slow');\n\t\t\t\t $('#errorfechaini').html('ingrese la fecha');\n\t\t\t }\n\t\t\t if(fecha_fin!=''){\n\t\t\t\t $('#errorfechafin').hide('slow');\n\t\t\t }else{\n\t\t\t\t sum++;\n\t\t\t\t $('#errorfechafin').show('slow');\n\t\t\t\t $('#errorfechafin').html('ingrese la fecha');\n\t\t\t }\n\t\t });\n\t\t if(sum==0){\n\t\t\t \n\t\t }else{\n\t\t\t e.preventDefault(); \n\t\t }\n\t\t \n\t });\n\t //VERIFICAMOS SI EL NUMERO DE POLIZA EXISTE\n\t $('#txtPoliza').blur(function(e){\n\t\t var num_poliza = $(this).val();\n\t\t var producto = $('#txtProducto').prop('value');\n\t\t var id_ef_cia = $('#id_ef_cia').prop('value');\n\t\t //VERIFICAMOS SI LA CASILLA ESTA VACIA\n\t\t //e.preventDefault();\n\t\t if (num_poliza == \"\") {\n\t\t $('#errorpoliza').show('slow');\n\t\t\t $('#errorpoliza').html('ingrese numero de poliza');\n\t\t\t $(\"#btnGuardar\").attr(\"disabled\", true);\n\t\t\t $('#errorpoliza').focus();\n\t\t }else if(num_poliza.match(/^[0-9A-Z\\s\\-]+$/)){//VERIFICAMOS SI EL VALOR ES NUMERO ENTERO\n\t\t\t $('#errorpoliza').hide('slow');\n\t\t\t var dataString = 'num_poliza='+num_poliza+'&id_ef_cia='+id_ef_cia+'&producto='+producto+'&opcion=buscar_numpoliza_add';\n\t\t\t //alert(dataString);\n\t\t\t $.ajax({\n\t\t\t\t\t async: true,\n\t\t\t\t\t cache: false,\n\t\t\t\t\t type: \"POST\",\n\t\t\t\t\t url: \"accion_registro.php\",\n\t\t\t\t\t data: dataString,\n\t\t\t\t\t success: function(datareturn) {\n\t\t\t\t\t\t\t//alert(datareturn);\n\t\t\t\t\t\t\tif(datareturn==1){\n\t\t\t\t\t\t\t $('#errorpoliza').hide('slow');\n\t\t\t\t\t\t\t $(\"#btnGuardar\").removeAttr(\"disabled\");\n\t\t\t\t\t\t\t}else if(datareturn==2){\n\t\t\t\t\t\t\t $('#errorpoliza').show('slow');\n\t\t\t\t\t\t\t $('#errorpoliza').html('el numero de poliza ya existe ingrese otra');\n\t\t\t\t\t\t\t $(\"#btnGuardar\").attr(\"disabled\", true); \n\t\t\t\t\t\t\t $('#errorpoliza').focus();\n\t\t\t\t\t\t\t e.stopPropagation();\n\t\t\t\t\t\t\t} \n\t\t\t\t\t }\n\t\t\t });\t\t\t \n\t\t }else{\n\t\t\t $('#errorpoliza').show('slow');\n\t\t\t $('#errorpoliza').html('ingrese solo alfanumericos');\n\t\t\t $(\"#btnGuardar\").attr(\"disabled\", true); \n\t\t\t $('#errorpoliza').focus();\n\t\t\t e.stopPropagation();\n\t\t }\n });\n\t \n\t $('#txtProducto').change(function(){\n\t\t var producto=$(this).prop('value');\n\t\t if(producto!=''){\n\t\t\t $('#txtPoliza').removeAttr(\"disabled\");\n\t\t }else{\n\t\t\t $('#txtPoliza').attr(\"disabled\", true);\n\t\t }\n\t });\n\t \n\t \n\t $('#btnCancelar').click(function(e){\n\t\t var variable=$('#var').prop('value');\n\t\t var idcompania=$('#idcompania').prop('value');\n\t\t var id_ef=$('#id_ef').prop('value');\n\t\t $(location).attr('href', 'index.php?l=des_poliza&var='+variable+'&listarpolizas=v&idcompania='+idcompania+'&id_ef='+id_ef); \n\t });\n\t \n\t $('#txtPoliza').keyup(function() {\n $(this).val($(this).val().toUpperCase());\n }); \n });\n\n</script>\n<?php \n //VARIABLES DE INICIO\n $id_ef_cia = base64_decode($_GET['id_ef_cia']);\n $id_ef = base64_decode($_GET['id_ef']);\n $entidad = base64_decode($_GET['entidad']);\n $compania = base64_decode($_GET['compania']); \n \n if(isset($_POST['txtPoliza'])) $txtPoliza = $_POST['txtPoliza']; else $txtPoliza = '';\n if(isset($_POST['txtFechaini'])) $txtFechaini = $_POST['txtFechaini']; else $txtFechaini = '';\n if(isset($_POST['txtFechaFin'])) $txtFechaFin = $_POST['txtFechaFin']; else $txtFechaFin = '';\n if(isset($_POST['txtProducto'])) $txtProducto = $_POST['txtProducto']; else $txtProducto = '';\n echo'<div class=\"da-panel collapsible\">\n\t\t<div class=\"da-panel-header\" style=\"text-align:right; padding-top:5px; padding-bottom:5px;\">\n\t\t\t<ul class=\"action_user\">\n\t\t\t\t<li style=\"margin-right:6px;\">\n\t\t\t\t <a href=\"?l=des_poliza&var='.$_GET['var'].'&listarpolizas=v&id_ef_cia='.$_GET['id_ef_cia'].'&entidad='.$_GET['entidad'].'&compania='.$_GET['compania'].'&id_ef='.$_GET['id_ef'].'&producto_nombre='.$_GET['producto_nombre'].'&producto_code='.$_GET['producto_code'].'\" class=\"da-tooltip-s\" title=\"<span lang=\\'es\\'>Volver</span>\">\n\t\t\t\t <img src=\"images/retornar.png\" width=\"32\" height=\"32\"></a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t </div>'; \t\t\n echo'<div class=\"da-panel\" style=\"width:600px;\">\n\t\t\t<div class=\"da-panel-header\">\n\t\t\t\t<span class=\"da-panel-title\">\n\t\t\t\t\t<img src=\"images/icons/black/16/pencil.png\" alt=\"\" />\n\t\t\t\t\t<b>'.$entidad.' - '.$compania.'</b>\n\t\t\t\t\t<div style=\"margin-left:20px;\" lang=\"es\">Agregar Nueva Póliza</div>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<div class=\"da-panel-content\">\n\t\t\t\t<form class=\"da-form\" name=\"frmDatosPoliza\" action=\"\" method=\"post\" id=\"frmDatosPoliza\">\n\t\t\t\t\t<div class=\"da-form-row\" id=\"content-entidadf\">\n\t\t\t\t\t <label style=\"text-align:right;\"><b><span lang=\"es\">Producto</span></b></label>\n\t\t\t\t\t <div class=\"da-form-item small\">\n\t\t\t\t\t\t'.base64_decode($_GET['producto_nombre']).'\n\t\t\t\t\t\t<input type=\"hidden\" name=\"txtProducto\" id=\"txtProducto\" value=\"'.base64_decode($_GET['producto_code']).'\"/>\n\t\t\t\t\t </div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"da-form-row\">\n\t\t\t\t\t\t<label style=\"text-align:right;\"><b><span lang=\"es\">No Póliza</span></b></label>\n\t\t\t\t\t\t<div class=\"da-form-item large\">\n\t\t\t\t\t\t\t<input class=\"textbox required\" type=\"text\" name=\"txtPoliza\" id=\"txtPoliza\" style=\"width: 200px;\" value=\"'.$txtPoliza.'\" autocomoplete=\"off\"/>\n\t\t\t\t\t\t\t<span class=\"errorMessage\" id=\"errorpoliza\" lang=\"es\"></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"da-form-row\">\n\t\t\t\t\t\t<label style=\"text-align:right;\"><b><span lang=\"es\">Fecha Inicial</span></b></label>\n\t\t\t\t\t\t<div class=\"da-form-item large\">\n\t\t\t\t\t\t\t<input class=\"textbox required\" type=\"text\" name=\"txtFechaini\" id=\"txtFechaini\" style=\"width: 200px;\" value=\"'.$txtFechaini.'\" readonly/>\n\t\t\t\t\t\t\t<span class=\"errorMessage\" id=\"errorfechaini\" lang=\"es\"></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"da-form-row\">\n\t\t\t\t\t\t<label style=\"text-align:right;\"><b><span lang=\"es\">Fecha Final</span></b></label>\n\t\t\t\t\t\t<div class=\"da-form-item large\">\n\t\t\t\t\t\t\t<input class=\"textbox required\" type=\"text\" name=\"txtFechafin\" id=\"txtFechafin\" style=\"width: 200px;\" value=\"'.$txtFechaFin.'\" readonly/>\n\t\t\t\t\t\t\t<span class=\"errorMessage\" id=\"errorfechafin\" lang=\"es\"></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t<div class=\"da-button-row\">\n\t\t\t\t\t <input type=\"submit\" value=\"Guardar\" class=\"da-button green\" name=\"btnGuardar\" id=\"btnGuardar\" lang=\"es\"/> \n\t\t\t\t\t <input type=\"hidden\" id=\"var\" value=\"'.$_GET['var'].'\"/>\n\t\t\t\t <input type=\"hidden\" id=\"id_ef_cia\" value=\"'.$id_ef_cia.'\"/>\n\t\t\t\t\t</div>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>';\n}",
"protected function generaCamposFormulario($datosIniciales)\n\t\t{\n\t\t\tif(empty($datosIniciales)){\n\t\t\t\t$html = '<fieldset>';\n\t\t\t\t$html.= '<legend>Rellene los datos para finalizar su compra: </legend>';\n\t\t\t\t$html.= '<p>Nombre: <input type=\"text\" name=\"nombre\" required>';\n\t\t\t\t$html.= ' Apellidos: <input type=\"text\" name=\"apellido\" required></p>';\n\t\t\t\t$html.= '<p>País: <input type=\"text\" name=\"pais\" required></p>';\n\t\t\t\t$html.= '<p>Dirección: <input type=\"text\" name=\"direccion\" required>';\n\t\t\t\t$html.=' Código postal: <input type=\"text\" name=\"cp\" required></p>';\n\t\t\t\t$html.= '<p>Localidad/Ciudad: <input type=\"text\" name=\"localidad\" required>';\n\t\t\t\t$html.= ' Provincia: <input type=\"text\" name=\"provincia\" required></p>';\n\t\t\t\t$html.= '<p>Teléfono: <input type=\"text\" name=\"telefono\" required></p>';\n\t\t\t\t$html.= '<p>Dirección de correo electrónico: <input type=\"text\" name=\"correo\" required></p>';\n\t\t\t\t$html.= '</fieldset>';\n\t\t\t\t$html .= '<div id=\"fc\"><fieldset>';\n\t\t\t\t$html.= '<legend> Rellene los datos de pago: </legend>';\n\t\t\t\t$html .='<p><input type=\"checkbox\" id=\"tipoV\" name=\"tipoT\" value=\"Visa\" >';\n\t\t\t\t$html .='<img src=\"img/visa.jpg\" class=\"visa\" style=\"width:8%; height:6%;\"/>';\n\t\t\t\t$html .='<input type=\"checkbox\" id=\"tipoMC\" name=\"tipoT\" value=\"MasterCard\" >';\n\t\t\t\t$html .='<img src=\"img/mastercard.png\" class=\"MasterCard\" style=\"width:5%; height:3%;\"/></p>';\n\t\t\t\t$html .='<p>Numero de tarjeta: <input type=\"text\" name=\"tarjeta\" required></p>';\n\t\t\t\t$html .='<p>Fecha de caducidad: <input type=\"text\" name=\"mesC\" required> / <input type=\"text\" name=\"añoC\" required> </p>';\n\t\t\t\t$html .='<p>CVV: <input type=\"text\" name=\"cvv\" required></p>';\n\t\t\t\t$html .='<?php echo \"La cantidad total a pagar es \"'. $_SESSION[\"totalCompra\"] .'\"€.\" ?>';\n\t\t\t\t$html.= '<p><input type=\"submit\" name=\"aceptar\" value=\"PAGAR\"></p>';\n\t\t\t $html.= '</fieldset></div>';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$html = '<fieldset>';\n\t\t\t\t$html.= '<legend> Rellene los datos para finalizar su compra: </legend>';\n\t\t\t\t$html.= '<p>Nombre: <input type=\"text\" name=\"nombre\" value=\"'.$datosIniciales['nombre'].'\" required>';\n\t\t\t\t$html.= ' Apellido: <input type=\"text\" name=\"apellido\" value=\"'.$datosIniciales['apellido'].'\" required></p>';\n\t\t\t\t$html.= '<p>País: <input type=\"text\" name=\"pais\" value=\"'.$datosIniciales['pais'].'\" required></p>';\n\t\t\t\t$html.= '<p>Dirección: <input type=\"text\" name=\"direccion\" value=\"'.$datosIniciales['direccion'].'\" required>';\n\t\t\t\t$html.=' Código postal: <input type=\"text\" name=\"cp\" value=\"'.$datosIniciales['cp'].'\" required></p>';\n\t\t\t\t$html.= '<p>Localidad/Ciudad: <input type=\"text\" name=\"localidad\" value=\"'.$datosIniciales['localidad'].'\" required>';\n\t\t\t\t$html.= ' Provincia: <input type=\"text\" name=\"provincia\" value=\"'.$datosIniciales['provincia'].'\" required></p>';\n\t\t\t\t$html.= '<p>Teléfono: <input type=\"text\" name=\"telefono\" value=\"'.$datosIniciales['telefono'].'\" required></p>';\n\t\t\t\t$html.= '<p>Dirección de correo electrónico: <input type=\"text\" name=\"correo\" value=\"'.$datosIniciales['correo'].'\" required></p>';\n\t\t\t $html.= '</fieldset>';\n\t\t\t\t$html .= '<div id=\"fc\"><fieldset>';\n\t\t\t\t$html.= '<legend> Rellene los datos de pago: </legend>';\n\t\t\t\t$html .='<p><input type=\"checkbox\" id=\"tipoV\" name=\"tipoT\" value=\"Visa\" >';\n\t\t\t\t$html .='<img src=\"img/visa.jpg\" class=\"visa\" style=\"width:8%; height:6%;\"/>';\n\t\t\t\t$html .='<input type=\"checkbox\" id=\"tipoMC\" name=\"tipoT\" value=\"MasterCard\" >';\n\t\t\t\t$html .='<img src=\"img/mastercard.png\" class=\"MasterCard\" style=\"width:5%; height:3%;\"/></p>';\n\t\t\t\t$html .='<p>Numero de tarjeta: <input type=\"text\" name=\"tarjeta\" required></p>';\n\t\t\t\t$html .='<p>Fecha de caducidad: <input type=\"text\" name=\"mesC\" required> / <input type=\"text\" name=\"añoC\" required> </p>';\n\t\t\t\t$html .='<p>CVV: <input type=\"text\" name=\"cvv\" required></p>';\n\t\t\t\t$html .='<?php echo \"La cantidad total a pagar es \"'. $_SESSION[\"totalCompra\"] .'\"€.\" ?>';\n\t\t\t\t$html.= '<p><input type=\"submit\" name=\"aceptar\" value=\"PAGAR\"></p>';\n\t\t\t $html.= '</fieldset></div>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}",
"function mostrarFormulario($tipo){\n $cod_proyecto = $this->proyecto[0][0]; \n $nom_proyecto = $this->proyecto[0][1]; \n $indice=$this->configuracion[\"host\"].$this->configuracion[\"site\"].\"/index.php?\";\n $ruta=\"pagina=admin_homologacionTransferenciaInterna\";\n $ruta.=\"&opcion=realizarHomologacionTransferenciaInterna\";\n $ruta.=\"&cod_proyecto=\".$cod_proyecto;\n \n\n ?>\n <script src=\"<? echo $this->configuracion[\"host\"]. $this->configuracion[\"site\"]. $this->configuracion[\"javascript\"] ?>/funciones.js\" type=\"text/javascript\" language=\"javascript\"></script>\n <form enctype='tipo:multipart/form-data,application/x-www-form-urlencoded,text/plain' method='POST' action='index.php' name='<? echo $this->formulario ?>'>\n \n <div align=\"center\" ><b><?echo \"HOMOLOGACIONES POR TRANSFERENCIA INTERNA - \".$cod_proyecto.\" \".$nom_proyecto; ?></b></div><hr>\n <table>\n <tr id=\"fila\" >\n <td class=\"sigma centrar\" colspan=\"6\" width=\"100%\">Seleccione el número de estudiantes:\n <select id=\"filas\" name=\"filas\" onchange=\"removeLastRow(),nuevaFila(document.getElementById('filas').value-1,<?echo $_REQUEST['cod_proyecto']?>)\">\n <?$opciones=1?>\n <option selected class=\"boton\" value=\"1\" onClick=\"removeLastRow(),nuevaFila(0,<?echo $_REQUEST['cod_proyecto']?>)\">1</option>\n <?for($opciones=5;$opciones<=50;$opciones+=5){?>\n <option id=\"<?echo $opciones-1?>\" class=\"boton\" value=\"<?echo $opciones?>\"><?echo $opciones?></option>\n <?}?>\n </select> \n <?//opciones para agregar 1 estudiante y opcion para borrar todas las filas?>\n <input type=\"button\" value=\"Adicionar filas\" onClick=\"nuevaFila(1,<?echo $_REQUEST['cod_proyecto']?>)\" alt=\"Adicionar\">\n <input type=\"button\" value=\"Reiniciar filas\" onClick=\"removeLastRow()\" alt=\"Remover\">\n <input type=\"button\" value=\"Borrar fila\" onClick=\"removeLastestRow()\" alt=\"Remover\">\n </td>\n </tr></table>\n <table id=\"tabla\" class=\"contenidotabla\" width=\"100%\">\n \n <?//opciones para agregar 5,10,15...50 estudiantes?>\n\n <thead class='sigma'>\n <th class='niveles centrar' > Código Actual</th>\n <th class='niveles centrar' > Estudiante</th>\n <th class='niveles centrar' > Código Proyecto Curricular Anterior</th>\n <th class='niveles centrar' > Proyecto Curricular Anterior</th>\n </thead>\n <tr >\n <td width=\"13%\" class='cuadro_plano centrar'>\n 1 <input type=\"text\" id=\"codEstudiante0\" name=\"codEstudiante[0]\" size=\"11\" onKeyPress=\"return solo_numero(event)\" onBlur=\"xajax_nombreEstudiante(document.getElementById('codEstudiante0').value,0,<? echo $cod_proyecto;?>)\">\n <input type=\"hidden\" name=\"opcion\" value=\"registrar\">\n <input type=\"hidden\" name=\"action\" value=\"<? echo $this->formulario ?>\">\n <input type=\"hidden\" name=\"tipo_homologacion\" value=\"estudiantes\">\n <input type=\"hidden\" name=\"cod_proyecto\" value=\"<? echo $cod_proyecto; ?>\">\n </td>\n <td width=\"20%\" class='cuadro_plano centrar'>\n <div id=\"div_nombreEstudiante0\" ></div>\n </td>\n <td width=\"17%\" class='cuadro_plano centrar'>\n <input type=\"text\" id=\"codProyectoAnt0\" name=\"codProyectoAnt[0]\" size=\"11\" maxlength='3' onKeyPress=\"return solo_numero(event)\" onBlur=\"xajax_nombreProyecto(document.getElementById('codProyectoAnt0').value,0)\">\n </td>\n \n </td>\n <td width=\"30%\" class='cuadro_plano centrar'>\n <div id=\"div_proyectoAnt0\" ></div>\n </td>\n\n </tr>\n </table>\n <table width=\"100%\">\n <tr>\n <td align=\"center\">\n <input type=\"button\" value=\"Registrar\" onclick=\"if(verificarFormulario(<?echo $this->formulario?>)){document.forms['<? echo $this->formulario?>'].submit()}else{false}\">\n </td>\n </tr>\n </table>\n </form>\n<?\n \n }",
"function formGenerate($action){\n $form=\"<form class='form-group' name='formularz' action='$action' method='post'>\";\n $form.=\"<fieldset><legend>Podgląd rezerwacji</legend>\";\n $form.=\"<label class='col-form-label' for='data'>Data:</label>\";\n $form.=\"<input type='date' name='data' id='data' min='2010-01-01' max='2020-12-31' value='\".date('Y-m-d').\"' required class='form-control' onchange='show_reservations_by_color()' onclick='show_reservations_by_color()'>\";\n $form.=\"</fieldset></form>\";\n return $form;\n}",
"public function mostrarDatos(){\r\n\t\t$html = null;\t\t\r\n\r\n\t\t$month = date('m');\r\n \t$year = date('Y');\r\n \t$day = date(\"d\");\r\n\r\n\t\t$data['fechaEmision'] = date('Y-m-d');\r\n\r\n\t\t$fecemi = $data['fechaEmision'];\r\n\r\n\t\t$canales=$_POST['canales'];\r\n\t\t$datos['canales'] = $canales;\r\n\r\n\t\t$inicio = $_POST['fechainicio'];\r\n\t\t$fin = $_POST['fechafin'];\r\n\r\n\t\t$data['documento'] = $_POST['documento'];\r\n\t\t$serie = $data['documento'];\r\n\r\n\t\t$idserie=$_POST['documento'];\r\n\r\n\t\tif (substr($serie, 0, 1) == 'B') {\r\n\r\n\t\t\t//html de tabla dinámica que se va a generar\r\n\t\t\t$html .= \"<hr>\";\r\n\t\t\t$boletaSuma = $this->comprobante_pago_mdl->getDatosSumaBoleta($inicio, $fin, $canales, $serie);\r\n\t\t\tforeach ($boletaSuma as $bs):\r\n\t\t\t\t$suma=$bs->suma;\r\n\t\t\t\t$sumaDos=number_format((float)$suma, 2, '.', ',');\r\n\t\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Boletas: S/. \".$sumaDos.\"</b></span></H1>\";\r\n\t\t\tendforeach;\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover' style='width:100%'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha de Cobro</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>N° de certificado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Nombres y Apellidos</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>DNI</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t\t\t$boleta = $this->comprobante_pago_mdl->getDatosBoleta($inicio, $fin, $canales, $serie);\r\n\t\t\t\t\t\tforeach ((array) $boleta as $b):\r\n\r\n\t\t\t\t\t\t\t$importe = $b->cob_importe;\r\n\t\t\t\t\t\t\t$importe = $importe/100;\r\n\t\t\t\t\t\t\t$importe2=number_format((float)$importe, 2, '.', ',');\r\n\t\t\t\t\t\t\t$newDate = date(\"d/m/Y\", strtotime($b->cob_fechCob));\r\n\r\n\t\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$newDate.\"<input type='text' class='hidden' id='fechaEmi' name='fechaEmi[]' value='\".$b->cob_fechCob.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->cert_num.\"<input type='text' class='hidden' id='numSerie' name='numSerie[]' value='\".$b->numero_serie.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->contratante.\"<input type='text' class='hidden' id='contratante' name='contratante[]' value='\".$b->cont_id.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->cont_numDoc.\"<input type='text' class='hidden' id='cobro' name='cobro[]' value='\".$b->cob_id.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->nombre_plan.\"<input type='text' class='hidden' id='idplan' name='idplan[]' value='\".$b->idplan.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='center'>S/. \".$importe2.\"<input type='text' class='hidden' id='importeTotal' name='importeTotal[]' value='\".$importe2.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$b->descripcion.\"</td>\";\r\n\t\t\t\t\t\t\t$html .= \"</tr>\";\r\n\r\n\t\t\t\t\t\tendforeach;\r\n\t\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t\t$html .= \"</table>\";\r\n\t\t\t$html .= \"</div>\";\r\n\r\n\t\t} elseif (substr($serie, 0, 1) == 'F') {\r\n\r\n\t\t\t$html .= \"<hr>\";\r\n\r\n\t\t\t$facturaSuma = $this->comprobante_pago_mdl->getDatosSumaFacturas($inicio, $fin, $canales, $serie);\r\n\t\t\tforeach ($facturaSuma as $fs):\r\n\t\t\t\t$suma=$fs->suma;\r\n\t\t\t\t$sumaDos=number_format((float)$suma, 2, '.', ',');\r\n\t\t\t\t$html .=\"<H1><span class='label label-succes label-white middle'><b>Total de cobros Facturas: S/. \".$sumaDos.\"</b></span></H1>\";\r\n\t\t\tendforeach;\r\n\r\n\t\t\t$html .= \"<div align='center' class='col-xs-12'>\";\r\n\t\t\t\t$html .= \"<table align='center' id='tablaDatos' class='table table-striped table-bordered table-hover'>\";\r\n\t\t\t\t\t$html .= \"<thead>\";\r\n\t\t\t\t\t\t$html .=\"<tr>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Fecha de emisión</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Razon Social</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Nombre Comercial</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>RUC</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Plan</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Importe (S/.)</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Cantidad</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Estado</th>\";\r\n\t\t\t\t\t\t\t$html .=\"<th>Seleccione</th>\";\r\n\t\t\t\t\t\t$html .=\"</tr>\";\r\n\t\t\t\t\t$html .= \"</thead>\";\r\n\t\t\t\t\t$html .= \"<tbody>\";\r\n\r\n\t\t\t\t\t\t$factura = $this->comprobante_pago_mdl->getDatosFacturas($inicio, $fin, $canales, $serie);\r\n\r\n\t\t\t\t\t\t$tot=0; \r\n\t\t\t\t\t\t$totcant=0;\r\n\r\n\t\t\t\t\t\tforeach ((array)$factura as $f):\r\n\r\n\t\t\t\t\t\t\t$importeDos = $f->cob_importe;\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$cant=$f->cant;\r\n\t\t\t\t\t\t\t$totcant=$totcant+$cant;\r\n\t\t\t\t\t\t\t$sub=$cant*$importeDos;\r\n\t\t\t\t\t\t\t$tot=$tot+$sub;\r\n\t\t\t\t\t\t\t$cant2=number_format((float)$cant, 0, '', ',');\r\n\t\t\t\t\t\t\t$importe2=number_format((float)$importeDos, 2, '.', '');\r\n\t\t\t\t\t\t\t$sub2=number_format((float)$sub, 2, '.', ''); \r\n\r\n\t\t\t\t\t\t\tif ($cant2 > 0) {\r\n\t\t\t\t\t\t\t\t$html .= \"<tr>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'><input class='form-control input-mask-date' type='date' id='fechaEmi' name='fechaEmi[]' required='Seleccione una fecha de inicio' value=\".$fecemi.\"></td>\";\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->razon_social_cli.\"<input type='text' class='hidden' id='numSerie' name='numSerie[]' value='\".$f->numero_serie.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->nombre_comercial_cli.\"<input type='text' class='hidden' id='empresa' name='empresa[]' value='\".$f->idclienteempresa.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->numero_documento_cli.\"</td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>\".$f->nombre_plan.\"<input type='text' class='hidden' id='idplan' name='idplan[]' value='\".$f->plan_id.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center'>S/. \".$importe2.\"<input type='text' class='hidden' id='importeTotal' name='importeTotal[]' value='\".$importe2.\"'></td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center'>\".$cant2.\"</td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='left'>Pendiente</td>\";\r\n\r\n\t\t\t\t\t\t\t\t\t$html .= \"<td align='center'>\";\r\n\t\t\t\t\t\t\t\t\t\t//$html .= \"<div class='form-check'>\";\r\n\t\t\t\t\t\t\t\t\t\t $html .= \"<input class='form-check-input' type='checkbox' name='checkPlan[]' value='\".$f->plan_id.\"' id='\".$f->plan_id.\"'>\";\r\n\t\t\t\t\t\t\t\t\t\t//$html .= \"</div>\";\r\n\t\t\t\t\t\t\t\t\t$html .= \"</td>\";\r\n\r\n\t\t\t\t\t\t\t\t$html .= \"</tr>\";\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tendforeach;\r\n\t\t\t\t\t$html .= \"</tbody>\";\r\n\t\t\t\t$html .= \"</table>\";\r\n\t\t\t$html .= \"</div>\";\r\n\t\t}\r\n\t\techo json_encode($html);\r\n\t}",
"public function create()\n {\n\n $cursos = Curso::opciones_campo_select();\n $periodos = Periodo::opciones_campo_select();\n\n $miga_pan = [\n ['url' => $this->aplicacion->app . '?id=' . Input::get('id'), 'etiqueta' => $this->aplicacion->descripcion],\n ['url' => 'NO', 'etiqueta' => 'Ingresar']\n ];\n\n return view('calificaciones.create', compact('cursos', 'periodos', 'miga_pan'));\n // Lo datos del formulario create se envía vía post al método calificar2\n }",
"function calcular()\n\t\t{\n\t\t\tif ($_SERVER['REQUEST_METHOD']=='POST') {\n\t\t\t//Guardamos en un arreglo lo que recibimos de la vista via POST\t\n\t\t\t\t//enviamos ala funcion insertPersons del Modelo de personas \n\t\t\t\t//el arreglo previamente recibido\n\t\t\t\t $listado = $this->_estadisticaModel->getActividades($_POST['fechai'],$_POST['fechaf']);\n\t\t\t\t $listado2 = $this->_estadisticaModel->getMateriales_x_actividades($_POST['fechai'],$_POST['fechaf']);\n\t\t\t\t $listado1 = $this->_estadisticaModel->getCantidad($_POST['fechai'],$_POST['fechaf']);\n\t\t\t\t $this->_view->_fechai = $_POST['fechai'];\n\t\t\t\t $this->_view->_fechaf = $_POST['fechaf'];\n\t\t\t\t $this->_view->_listado2 = $listado2;\n\t\t\t\t $this->_view->_listado = $listado;\n\t\t\t\t $this->_view->_listado1 = $listado1;\n\t\t\t\t $this->_view->render(\"estadistica\",'','',$this->_sidebar_menu);\n\t\t\t\t \n\t\t\t\t//redireccionamos al listado\n\t\t\t}else{\n\t\t\t\t//se muestra la ventana si no es via post\n\t\t\t\t$this->_view->render(\"insert\",'','',$this->_sidebar_menu);\n\t\t\t}\n\t\t\t\n\t\t}",
"function render(){\n\t\tinclude 'Header.php';\n?>\n<h2 style=\"color:white;\">Añadir partido:</h2>\n\t\t\t\t<div style=\"overflow-x:auto;color:white;\">\n\t\t\t\t\t<form name=\"anadirPARTIDO\" id=\"anadirCategoria\" action=\"./PARTIDOS_Controller.php?action=ADD\" method=\"POST\" enctype=\"multipart/form-data\" onsubmit=\"return encriptar()\">\n\t\t\t\t\t\t <table>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>Fecha:</td>\n\t\t\t\t\t\t\t\t<td><input class=\"form-est\" type=\"date\" id=\"fecha\" name=\"fecha\" placeholder=\"01/01/2018\" required></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>Pista:</td>\n\t\t\t\t\t\t\t\t<td><select class=\"form-est\" id=\"pista\" name=\"pista\">\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\tfor($j=0;$j<count($this->pistas);$j++){\n\t\t\t\t\t\t\t\t\t\techo \"<option value=\".$this->pistas[$j][\"nombre\"].\" >\".$this->pistas[$j][\"nombre\"].\"</option>\";\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t</select></td>\n\t\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td colspan=\"2\" align=\"center\"><input class=\"form-est\" type=\"submit\" id=\"insertar\" name=\"insertar\" value=\"Insertar\" ></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t </table>\n\t\t\t\t\t\t <p><a href=\"<?php echo $this->volver; ?>\"><img src=\"../Views/images/atras.png\" title=\"Atrás\" alt=\"Atrás\"></a></p>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\n\n<?php\t\t\n\tinclude 'Footer.php';\n\t}",
"public function CCCapturaCalificacionAlumno()\n {\n $filtros = $_REQUEST;\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n $entidad = CapturaCalificacionesController::CCCapturaCalificacionAlumnoProcess($filtros, $dbm);\n if (!$entidad) {\n return new View(\"Error interno\", Response::HTTP_BAD_REQUEST);\n } else {\n return new View($entidad, Response::HTTP_OK);\n }\n }",
"public function get_calendrier() {\r\n\r\n\t\tif(!empty($_SESSION['zone_vacs']) && $_SESSION['zone_vacs']!= 0)\r\n\t\t{\r\n\t\t$vacs = $_SESSION['zone_vacs'];\r\n\t\t$req = $this->dbh->query(\"SELECT * FROM semaine WHERE zone_semaine ='$vacs'\");\r\n\t\t$data = $req->fetchall();\r\n\r\n\t\t\tif(!empty($_GET['moisForm']))\r\n\t\t\t{\r\n\t\t\t\t$_SESSION['Mois'] = $_GET['moisForm'];\r\n\t\t\t}\r\n\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$_SESSION['Mois'] = date(\"n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\t\t$_SESSION['annéeEnCours'] = date(\"Y\");\r\n\t\t\t\t$_SESSION['année'] = date(\"Y\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif($_SESSION['Mois']>12)\r\n\t\t\t{\r\n\t\t\t\t$_SESSION['année']++;\r\n\t\t\t}\r\n\t\t\t$_SESSION['MoisForm'] = date(\"n\");\r\n\r\n\t\t$var3=date(\"w\", mktime(0,0,0,$_SESSION['Mois'],1,$_SESSION['année']));\r\n\t\t$var4=date(\"t\");$var6=date(\"d\");\r\n\t\t$jour = date(\"j\");\r\n\t\t$semaine=date(\"W\", mktime(0,0,0,$_SESSION['Mois'],1,$_SESSION['année']));\r\n\t\t$var7=date(\"w\", mktime(0,0,0,$_SESSION['Mois'],$jour,$_SESSION['année']));\r\n\t\t$mois=array(\"\",\"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Aout\", \"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\",\"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Aout\", \"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\");\r\n\t\tif ($var3==0) {$var3=7;}\r\n\t\techo\"<table border=0 style='font-size:15pt;font-family:verdana,arial,tahoma'>\\n\r\n\t\t<th colspan=7 align=center>\".$mois[$_SESSION['Mois']].\" \".$_SESSION['année'].\"</th>\r\n\t\t<tr>\\n<td>Lu</td><td>Ma</td><td>Me</td><td>Je</td><td>Ve</td><td>Sa</td><td>Di</td></tr>\\n<tr>\\n\";\r\n\t\t$i=1;\r\n\t\twhile ($i<$var3) { echo \"<td> </td>\";$i++; }\r\n\t\t$i=1;\r\n\r\n\t\twhile ($i<=$var4){\r\n\t\t$var5=($i+$var3-1)%7;\r\n\r\n\t\tif(basename($_SERVER['PHP_SELF']) == 'semaine.php' and empty($data)) {\r\n\t\t\t$var = '<td onClick=\"get_date('.date(\"W\", mktime(0,0,0,$_SESSION['Mois'],$i,$_SESSION['année'])).')\">';\r\n\t\t}\r\n\t\telseif(empty($data)) {\r\n\t\t\t$var = '<td>';\r\n\t\t}\r\n\t\telse {\r\n\t\t\tunset($var);\r\n\t\t\t$boucle = false;\r\n\t\t\tforeach($data as $elem) {\r\n\t\t\t\tif($elem['num_semaine'] == date(\"W\", mktime(0,0,0,$_SESSION['Mois'],$i,$_SESSION['année']))) {\r\n\t\t\t\t\t$var = '<td onClick=\"get_date('.date(\"W\", mktime(0,0,0,$_SESSION['Mois'],$i,$_SESSION['année'])).')\" bgcolor=\"#00FF00\">';\r\n\t\t\t\t\t$boucle = true;\r\n\t\t\t\t}\r\n\t\t\t\telseif(empty($var) and $boucle == false) {\r\n\t\t\t\t\t$var = '<td>';\r\n\t\t\t\t\tif(basename($_SERVER['PHP_SELF']) == 'semaine.php') {\r\n\t\t\t\t\t\t$var = '<td onClick=\"get_date('.date(\"W\", mktime(0,0,0,$_SESSION['Mois'],$i,$_SESSION['année'])).')\">';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$boucle = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\techo $var;\r\n\r\n\t\tif ($i==$var6) { \r\n\t\t\techo\"<span style='font-size:15pt;font-family:verdana,arial,tahoma'>$i</span>\"; \r\n\t\t}\r\n\t\telse if ($var5==0) { echo\"<span style='font-size:15pt;font-family:verdana,arial,tahoma'>$i</span>\"; }\r\n\t\telse { echo \"$i\"; \r\n\t\t}\r\n\t\techo\"</td>\\n\";\r\n\t\tif ($var5==0) { echo \"</tr>\\n<tr>\\n\"; }\r\n\t\t$i++;}\r\n\r\n\t\techo\"</tr></table>\\n\";\r\n\t\t?>\r\n\t\t\r\n\t\t\r\n\t\t<center>\r\n\t\t<form action=\"<?php echo basename($_SERVER['PHP_SELF']); ?>\" method=\"GET\">\r\n\t\t<?php if(!empty($_GET['site'])) { ?>\r\n\t\t<input type=\"hidden\" name=\"site\" value=\"<?php echo $_GET['site']; ?>\"/>\r\n\t\t<?php } ?>\r\n\t\t<p><select name=\"moisForm\">\r\n\t\t<?php\r\n\t\t$_SESSION['année'] = $_SESSION['annéeEnCours'];\r\n\t\tfor ($ii = 0; $ii < 13; $ii++) {\r\n\t\t$a = date(\"n\")+$ii;\r\n\t\t\t\t\t\t\r\n\t\t\t\tif($a==13)\r\n\t\t\t\t{\r\n\t\t\t\t\t\t\t$_SESSION['année']++;\r\n\t\t\t\t}\r\n\t\t\t\t\t\tif($a<12)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$_SESSION['année'] = $_SESSION['annéeEnCours'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t?>\r\n\r\n\t\t<option value=\"<?php echo $a;?>\"><?php echo $mois[$a].\" \".$_SESSION['année'];?></option>\r\n\r\n\t\t<?php\r\n\r\n\t\t} \r\n\r\n\t\t?> \r\n\t\t</select>\r\n\t\t<input type=\"submit\" value=\"Choisir le mois\" /></p>\r\n\t\t</form>\r\n\t\t</center>\r\n\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\tfunction get_date(nb) {\r\n\t\t\t\tdocument.getElementById('date').value = nb;\r\n\t\t\t}\r\n\t\t</script>\r\n\t\t\r\n\t\t\r\n\t\t<?php\r\n\t\t}\r\n\r\n\t}",
"public function crear(){\n\t\t\t\t\t\t\t\t$calidad = new calidad($_POST['data']);\n\t\t\t\t\t\t $calidadMapper = new calidadMapper();\n\t\t\t\t\t\t var_dump($calidadMapper->crearcalidad($calidad));\n\t\t\t\t\t\t\t}",
"public function groupes_ali_et_cal() {\n\t\tfunction dateenlettre($date) {\n\t\t\t$split = explode(\"-\",$date);\n\t\t\t$jour = $split[2];\n\t\t\t$mois = $split[1];\n\t\t\t$annee = $split[0];\n\t\t\t$newTimestamp = mktime(12,0,0,$mois,$jour,$annee);\n\t\t\t \n\t\t\t$Jour = array(\"Dimanche\",\"Lundi\",\"Mardi\",\"Mercredi\",\"Jeudi\",\"Vendredi\",\"Samedi\");\n\t\t\t$Mois = array(\"\",\"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Août\",\"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\");\n\t\t\t \n\t\t\treturn $Jour[date(\"w\", $newTimestamp)] . ' ' . $jour . ' ' . $Mois[date(\"n\", $newTimestamp)] . ' ' . $annee;\n\t\t}\n\t\t\n\t\t// Fonction qui renvoi le nombre de jours entre deux dates\n\t\tfunction jours($date1, $date2){\n\t\t\t$diff = abs($date1 - $date2); \n\t\t\t$retour = array();\n\t\t \n\t\t\t$tmp = $diff;\n\t\t\t$retour['second'] = $tmp % 60;\n\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['second']) /60 );\n\t\t\t$retour['minute'] = $tmp % 60;\n\t\t\t\n\t\t\t$tmp = floor( ($tmp - $retour['minute'])/60 );\n\t\t\t$retour['hour'] = $tmp % 24;\n\t\t\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['hour']) /24 );\n\t\t\t$retour['day'] = $tmp;\n\t\t\t\t \n\t\t\treturn $retour['day'];\n\t\t}\n\t\t\n\t\t\n\t\t$id = AuthComponent::user('id');\n\t\tsetlocale (LC_TIME, 'fr_FR.utf8','fra');\n\t\t$date = date('Y-m-d');\n\t\t\n\t\t$this->set('debut',null);\n\t\t$this->set('fin',null);\n\t\tif ($this->request->is('post')) {\n\t\t\t/* Vérification des informations envoyées */\n\t\t\t$message;\n\t\t\t$stop = false;\n\t\t\t$deb = $_POST['debut'];\n\t\t\t$fin = $_POST['fin'];\n\t\t\t\n\t\t\tif (!(preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$deb))) {\n\t\t\t\t$stop = true;\n\t\t\t\t$message = \"Erreur, la date de début est invalide, elle doit être sous format 'YYYY-MM-DD'\";\n\t\t\t} elseif (!(preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$fin))) {\n\t\t\t\t$stop = true;\n\t\t\t\t$message = \"Erreur, la date de fin est invalide, elle doit être sous format 'YYYY-MM-DD'\";\n\t\t\t} else {\n\t\t\t\tif ($deb > $date ) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date d'aujourd'hui\";\n\t\t\t\t} elseif ($fin > $date) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date d'aujourd'hui\";\n\t\t\t\t}\n\t\t\t\tif ($deb == $fin) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être égale à la date de fin\";\n\t\t\t\t} elseif ($deb > $fin) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date de fin\";\n\t\t\t\t}\n\t\t\t\t$this->set('debut',$deb);\n\t\t\t\t$this->set('fin',$fin);\n\t\t\t}\n\t\t\t/* fin vérif */\n\t\t\tif ($stop) {\n\t\t\t\t$this->Session->setFlash(__($message));\n\t\t\t} else {\n\t\t\t\t$fin = $fin . ' 23:59:59';\n\t\t\t\t$repas = $this->Suivialimentaire->find('all',array('conditions' => array('AND' => array(\n\t\t\t\t\t\t\t\tarray('id_user' => $id),\n\t\t\t\t\t\t\t\tarray('Suivialimentaire.created BETWEEN ? AND ?' => array($deb, $fin))\n\t\t\t\t)),'order' => array('Suivialimentaire.created DESC') ));\n\t\t\t\t$temp = $repas;\n\t\t\t\t$i = 0;\n\t\t\t\tforeach ($repas as $r) {\n\t\t\t\t\t$temp[$i]['Aliment']= $this->Aliment->find('first', array('conditions' => array('Aliment.id' => $r['Suivialimentaire']['id_aliment'])));\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t$repas = $temp;\n\t\t\t\t$cal = 0;\n\t\t\t\tforeach ($repas as $rep) {\n\t\t\t\t\tif (!empty($rep['Aliment'])) {\n\t\t\t\t\t\t$cal = $cal + ($rep['Aliment']['Donneesaliment'][1]['valmoy'] * $rep['Suivialimentaire']['quantite'] * $rep['Suivialimentaire']['portion']/100) * count(explode(\"@\",$rep['Suivialimentaire']['nomSA']));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$valsplit = explode(\"@\", $rep['Alimhorsclassification']['nutri']);\n\t\t\t\t\t\t$valresul = $valsplit[1];\n\t\t\t\t\t\t$cal = $cal + ($valresul * $rep['Suivialimentaire']['quantite'] * $rep['Suivialimentaire']['portion']/100) * count(explode(\"@\",$rep['Suivialimentaire']['nomSA']));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->set('repas',$repas);\n\t\t\t\t$this->set('cal',$cal);\n\t\t\t\t$time1 = strtotime($deb);\n\t\t\t\t$time2 = strtotime($fin);\n\t\t\t\t$e=jours($time1, $time2);\n\t\t\t\t$this->set('joursDiff',$e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"function evt__form_pase__modificacion($datos)\r\n\t{\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $datos['id_cargo']=$car['id_cargo'];\r\n \r\n \r\n //print_r($pase_nuevo);exit;\r\n if($this->dep('datos')->tabla('pase')->esta_cargada()){//es modificacion\r\n $pas=$this->dep('datos')->tabla('pase')->get();\r\n if($pas['tipo']<>$datos['tipo']){\r\n toba::notificacion()->agregar('no puede cambiar el tipo del pase', 'info'); \r\n }else{\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n }\r\n }else{//es alta de un pase nuevo\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n $pase_nuevo=$this->dep('datos')->tabla('pase')->get();\r\n $p['id_pase']=$pase_nuevo['id_pase'];\r\n $this->dep('datos')->tabla('pase')->cargar($p);//lo cargo para que se sigan viendo los datos en el formulario\r\n if($datos['tipo']=='T'){//si el pase es temporal\r\n //ingreso un cargo en la unidad destino\r\n //la ingresa con fecha de alta = desde\r\n $nuevo_cargo['id_persona']=$car['id_persona'];\r\n $nuevo_cargo['codc_carac']=$car['codc_carac'];\r\n $nuevo_cargo['codc_categ']=$car['codc_categ'];\r\n $nuevo_cargo['codc_agrup']=$car['codc_agrup'];\r\n $nuevo_cargo['chkstopliq']=$car['chkstopliq'];\r\n $nuevo_cargo['fec_alta']=$datos['desde'];\r\n $nuevo_cargo['pertenece_a']=$datos['destino'];\r\n $nuevo_cargo['generado_x_pase']=$pase_nuevo['id_pase']; \r\n $res=$this->controlador()->dep('datos')->tabla('cargo')->agregar_cargo($nuevo_cargo);\r\n if($res==1){\r\n toba::notificacion()->agregar('Se ha creado un nuevo cargo en el destino del pase', 'info');\r\n }\r\n \r\n }else{//pase definitivo entonces tengo que modificar la fecha del cargo en la unidad destino con la fecha de alta del definitivo\r\n $nuevafecha = strtotime ( '-1 day' , strtotime ( $datos['desde'] ) ) ;\r\n $nuevafecha = date ( 'Y-m-d' , $nuevafecha );\r\n //print_r($nuevafecha);exit;\r\n $salida=$this->controlador()->dep('datos')->tabla('cargo')->modificar_alta($datos['id_cargo'],$datos['destino'],$datos['desde']);\r\n //le coloca fecha de baja al cargo de la unidad origen\r\n $this->controlador()->dep('datos')->tabla('cargo')->finaliza_cargo($datos['id_cargo'],$nuevafecha);\r\n if($salida==1){\r\n toba::notificacion()->agregar('Se ha modificado la fecha del cargo generado a partir del pase temporal', 'info');\r\n }\r\n \r\n } \r\n }\r\n \r\n\t}",
"function main()\n\t\t{\n\t\t\tvalidarFormulario();\n\n\t\t\t//Ingreso el reclamo a la base de datos\n\t\t\tguardarReclamo();\n\n\t\t\t//Incluyo el formulario HTML.\n\t\t\tinclude('./formulario.html');\n\t\t}",
"function form_mostrar($conp,$nreg,$pg,$bo,$filtro,$arc){\n\t\t$mtipo_documento = new mtipo_documento();\n\t\t //Instanciamos en [$pa] la clase mpagina\n\t\t$pa = new mpaginacion();\n\t\t$txt = '';\n\t\t//Creamos el cuadro de buscar (filtros-Busquedas)\n\t\t$txt .= \"<table>\";\n\t\t\t//Una Fila\n\t\t\t$txt .= \"<tr>\";\n\t\t\t\t//1ra Columna - Formulario buscar\n\t\t\t\t$txt .= \"<td>\";\n\t\t\t\t\t$txt .= \"<form name='forfil' method='GET' action='\".$arc.\"'>\";\n\t\t\t\t\t\t$txt .= \"<input type='hidden' name='pg' value='\".$pg.\"' />\";\n\t\t\t\t\t\t//Campo de texto para escribir el dato a buscar\n\t\t\t\t\t\t$txt .= \"Buscar:<input type='text' name='filtro' value='\".$filtro.\"' placeholder='Ingrese El Nombre Del Empleado' onChange= 'this.form.submit();' />\";\n\t\t\t\t\t$txt .= \"</form>\";\n\t\t\t\t$txt .= \"</td>\";\n\t\t\t\t//2da Columna control de paginacion\n\t\t\t\t$txt .= \"<td align='right' style='padding-left: 10px;'>\";\n\t\t\t\t\t$bo = \"<input type='hidden' name='filtro' value='\".$filtro.\"' />\";\n\t\t\t\t\t//Llamamos el metodo de contar la cantida de paginas\n\t\t\t\t\t$txt .= $pa->spag($conp,$nreg,$pg,$bo,$arc);\n\t\t\t\t\t//Llamar los datos para completar la paginacion\n\t\t\t\t\t$result = $mtipo_documento->sel_tipo_documento($filtro,$pa->rvalini(),$pa->rvalfin());\n\t\t\t\t$txt .= \"</td>\";\n\t\t\t//Cierre Fila\n\t\t\t$txt .= \"</tr>\";\n\t\t$txt .= \"</table>\";\n\t\tif ($result) {\n\n\t\t$txt .= '<div class=\"cuad1\" style=\"width: 90%;\">';\n\t\t\t$txt .= '<table width=\"100%\" cellspacing=\"0px\" align=\"center\">';\n\t\t\t\t//Inicio de la (Cabecera_Tb)\t\t\t\n\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'id_tpdoc(s)';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'Tipo de Documento';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'extencion';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th></th>';\n\t\t\t\t\t$txt .= '<th></th>';\n\t\t\t\t$txt .= '</tr>';\n\t\t\t\t//Cierre de la (Cabecera_Tb)\n\t\t\t\tforeach ($result as $f) {\n\t\t\t\t//Inicio ROW - Datos de la tabla\n\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t$txt .= '<td align=\"center\">';\t\n\t\t\t\t\t\t$txt .= $f[\"id_tpdoc\"];\n\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t$txt .= '<td align=\"center\">';\t\n\t\t\t\t\t\t$txt .= $f[\"nom_tpdoc\"];\n\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t$txt .= '<td align=\"center\">';\t\n\t\t\t\t\t\t$txt .= $f[\"extencion\"];\n\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t//ICONOS-MOdificar (Boton)\n\t\t\t\t\t$txt .= '<td align=\"center\"><a href=\"home.php?pg=010&id_tpdoc='.$f[\"id_tpdoc\"].'\">\n\t\t\t\t\t\t<img src=\"img/actua.png\" title=\"Actualizar\"</a></td>';\n\t\t\t\t\t//ICONOS-Eliminar (Boton)\n\t\t\t\t\t$txt .= '<td align=\"center\"><a href=\"home.php?pg=010&del='.$f[\"id_tpdoc\"].'\">\n\t\t\t\t\t\t<img src=\"img/elemi.png\" title=\"Eliminar\"</a></td>';\n\t\t\t\t//Cierre ROW - Datos de la tabla\n\t\t\t\t$txt .= '</tr>';\n\t\t\t\t}\n\t\t\t$txt .= '</table>';\n\t\t$txt .= '</div>';\n\t\t}else{\n\t\t$txt.= '<div class=\"cuad\" style=\" width\": 90%;\">';\n\t\t $txt.= '<h3> No existen datos registrado en la base de datos...</h3>';\n\t\t $txt.='</div>';\n }\n\t\techo $txt;\n\t}",
"public function consultar_asistencia()\n\t{\n\t\t$this->seguridad_lib->acceso_metodo(__METHOD__);\n\n\t\t$datos['titulo_contenedor'] = 'Reportes';\n\t\t$datos['titulo_descripcion'] = 'Consultar asistencia';\n\t\t$datos['contenido'] = 'reportes/consulta_asistencia_form';\n\n\t\t$datos['form_action'] = 'Reportes/registros_asistencia';\n\n\t\t$datos['e_footer'][] = array('nombre' => 'DatePicker JS','path' => base_url('assets/datepicker/dist/js/bootstrap-datepicker.js'), 'ext' =>'js');\n\t\t$datos['e_footer'][] = array('nombre' => 'DatePicker Languaje JS','path' => base_url('assets/datepicker/dist/locales/bootstrap-datepicker.es.min.js'), 'ext' =>'js');\n\t\t$datos['e_header'][] = array('nombre' => 'DatePicker CSS','path' => base_url('assets/datepicker/dist/css/bootstrap-datepicker3.min.css'), 'ext' =>'css');\n\n\t\t$datos['e_footer'][] = array('nombre' => 'jQuery Validate','path' => base_url('assets/jqueryvalidate/dist/jquery.validate.js'), 'ext' =>'js');\n\t\t$datos['e_footer'][] = array('nombre' => 'jQuery Validate Language ES','path' => base_url('assets/jqueryvalidate/dist/localization/messages_es.js'), 'ext' =>'js');\n\n\t\t$datos['e_footer'][] = array('nombre' => 'Config Form JS','path' => base_url('assets/js/reportes/v_consultar_asistencia_form.js'), 'ext' =>'js');\n\n\t\t$this->template_lib->render($datos);\n\t}",
"public function formulario()\n {\n //\n }",
"function render(){\n\ninclude '../Views/Header.php';\n?>\n\n<script type=\"text/javascript\">\n \n <?php include '../Views/js/validacionesEVALUACION.js'; ?>\n\n</script>\n\n\n <section class=\"pagina\">\n <fieldset class=\"add\" style=\"width: 70%; margin-left: 15%\">\n <legend style=\"margin-left: 30%\"><?php echo $strings['Añadir evaluacion'] ?></legend>\n <form method=\"post\" name=\"ADD\" action=\"../Controllers/EVALUACION_Controller.php\" enctype=\"multipart/form-data\" >\n <div id=\"izquierda\">\n <label for=\"IdTrabajo\"><?php echo $strings['IdTrabajo'] ?>: </label>\n <input type=\"text\" name=\"IdTrabajo\" maxlength=\"6\" size=\"6\" onblur=\"validarIdTrabajo(this,6)\" ><div id=\"IdTrabajo\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_Alfanumerico']?></div> <div id=\"IdTrabajoVacio\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_vacio']?></div> \n </div>\n <div id=\"izquierda\">\n <label for=\"LoginEvaluador\"><?php echo $strings['LoginEvaluador'] ?>: </label>\n <input type=\"text\" name=\"LoginEvaluador\" maxlength=\"9\" size=\"9\" onblur=\"validarlogin(this,9)\" ><div id=\"LoginEvaluador\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_Alfanumerico']?></div> <div id=\"LoginEvaluadorVacio\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_vacio']?></div> \n </div>\n <div id=\"izquierda\">\n <label for=\"AliasEvaluado\"><?php echo $strings['AliasEvaluado'] ?>: </label>\n <input type=\"text\" name=\"AliasEvaluado\" maxlength=\"9\" size=\"9\" onblur=\"validarAlias(this,9)\" ><div id=\"AliasEvaluado\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_Alfanumerico']?></div> <div id=\"AliasEvaluadoVacio\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_vacio']?></div> \n </div>\n <div id=\"izquierda\">\n <label for=\"IdHistoria\"><?php echo $strings['IdHistoria']?>:</label>\n <input type=\"number\" name=\"IdHistoria\" maxlength=\"2\" size=\"2\" min=\"0\" max=\"99\" onblur=\"validarIdHistoria(this)\"><div id=\"IdHistoria\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_numeros']?></div> <div id=\"IdHistoriaMax\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_numerosRango']?> </div><div id=\"IdHistoriaVacio\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_vacio']?></div> \n </div>\n <div id=\"izquierda\"> \n <label for=\"CorrectoA\"><?php echo $strings['CorrectoA']?>: </label>\n <input type=\"number\" name=\"CorrectoA\" maxlength=\"1\" min=\"0\" max=\"1\" size=\"1\" onblur=\"validarCorrecto(this,0,1)\"><div id=\"CorrectoA\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_numeros']?></div><div id=\"CorrectoAMax\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_CorrectoA']?></div><div id=\"CorrectoAVacio\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_vacio']?></div> \n </div>\n <div id=\"izquierda\"> \n <label for=\"ComenIncorrectoA\"><?php echo $strings['ComenIncorrectoA']?>: </label>\n <textarea name=\"ComenIncorrectoA\" maxlength=\"300\" rows=\"6\" cols=\"50\" onblur=\"validarComentIncorrectoBuscar(this,300)\" style=\"margin-left: 10px; border-radius: 20px; border-top-left-radius: 0px; border-width: 2px; border-color: darkblue;\" ></textarea><div id=\"ComenIncorrectoA\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_Alfanumerico']?>\n </div>\n <div id=\"izquierda\"> \n <label for=\"CorrectoP\"><?php echo $strings['CorrectoP']?>: </label>\n <input type=\"number\" name=\"CorrectoP\" maxlength=\"1\" min=\"0\" max=\"1\" size=\"1\" onblur=\"validarCorrecto(this,0,1)\"><div id=\"CorrectoP\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_numeros']?></div><div id=\"CorrectoPMax\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_CorrectoA']?></div><div id=\"CorrectoPVacio\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_vacio']?></div>\n </div>\n <div id=\"izquierda\"> \n <label for=\"ComentIncorrectoP\"><?php echo $strings['ComentIncorrectoP']?>: </label>\n <textarea name=\"ComentIncorrectoP\" maxlength=\"300\" rows=\"6\" cols=\"50\" onblur=\"validarComentIncorrectoBuscar(this,300)\" style=\"margin-left: 10px; border-radius: 20px; border-top-left-radius: 0px; border-width: 2px; border-color: darkblue;\" ></textarea><div id=\"ComentIncorrectoP\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_Alfanumerico']?></div> \n </div>\n <div id=\"izquierda\"> \n <label for=\"OK\"><?php echo $strings['OK']?>: </label>\n <input type=\"number\" name=\"OK\" maxlength=\"1\" min=\"0\" max=\"1\" size=\"1\" onblur=\"validarOK(this,0,1)\" ><div id=\"OK\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_numeros']?></div><div id=\"OKMax\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_CorrectoA']?></div><div id=\"OKVacio\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_vacio']?></div> \n </div>\n\n <div class=\"acciones\" style=\"float: right; margin-left:0%; margin-right: 50%\">\n <a href=\"../Controllers/EVALUACION_Controller.php?action=ADD\"> <input type=\"image\" name=\"action\" value=\"ADD\" src=\"../Views/images/confirmar.png\" title=\"<?php echo $strings['Enviar Formulario'] ?>\" onclick=\"return validar('ADD')\"></a>\n </div>\n </form> \n <div class=\"acciones\" style=\"float: left;\">\n <a href=\"../Controllers/EVALUACION_Controller.php?action=ALL\"><input type=\"image\" src=\"../Views/images/back.png\" title=\"<?php echo $strings['Volver']?>\"></a>\n </div>\n </fieldset> \n </section>\n<?php\n include '../Views/Footer.php';\n }",
"function recuperar_datos() {\n\t\tglobal $nombre, $tipo ;\n\t\t\n\t\t\t$pers_id =(isset($_POST['id_marcas']) && !empty($_POST['id_marcas']))? $_POST['id_marcas']:\"\";\n\t\t\t$tipo =(isset($_POST['tipo']) && !empty($_POST['tipo']))? $_POST['tipo']:\"A\"; \t\n\n\t\t\t$nombre=(isset($_POST[\"nombre\"]) && !empty($_POST[\"nombre\"]))? $_POST[\"nombre\"]:\"\";\t\t\t\n\t\n\t\t}",
"public function mostrarservicios(){\n $mostrarservicios = $this->mostrar();\n require '../inicio/servicios.php';\n }",
"function configurar_formulario (toba_ei_formulario $form){\n switch ($this->s__tipo){\n case \"Definitiva\" : $this->cargar_form_definitivo($form); break;\n case \"Periodo\" : $this->cargar_form_periodo($form); break;\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ó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ón requerida que te proporcionará 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ó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ú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ú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ó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ó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ó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ón').'\" type=\"submit\" />\n\t\t\t\t\t\n\t\t\t\n\t\t</form>';\n\t}",
"function procesar_cambio ($datos){\n //validamos que no exista otro periodo, para ello tomamos la fecha actual y obtenemos todos los periodo \n //que existen con sus respectivos dias y verificamos que el espacio que se quiere cargar no este ocupado en esos \n //dias\n \n }",
"function mostrarEstudiantesProyecto($estudiantes,$codEstudiante){\n $cod_proyecto= $_REQUEST['cod_proyecto'];\n \n?>\n <form enctype='tipo:multipart/form-data,application/x-www-form-urlencoded,text/plain' method='POST' action='index.php' name='<? echo $this->formulario2 ?>'>\n <table id=\"tabla\" class=\"contenidotabla\" width=\"100%\">\n <div align=\"center\" ><b><?echo \"Estudiantes a Homologar por Pendientes - Cod. Proyecto \".$cod_proyecto; ?></b></div><hr>\n <?//opciones para agregar 5,10,15...50 estudiantes?>\n\n <thead class='sigma'>\n <th class='niveles centrar' > No.</th>\n <th class='niveles centrar' > Código Actual</th>\n <th class='niveles centrar' > Nombre</th>\n </thead>\n <?\n for($i=0;$i<count($estudiantes);$i++){\n $cod_estudiante = isset($estudiantes[$i]['COD_ESTUDIANTE'])?$estudiantes[$i]['COD_ESTUDIANTE']:''; \n $nombre = isset($estudiantes[$i]['NOMBRE'])?$estudiantes[$i]['NOMBRE']:''; \n ?>\n\n <tr >\n <td width=\"5%\" class='cuadro_plano centrar'><? echo $i+1;?></td>\n <td width=\"20%\" class='cuadro_plano centrar'><? echo $cod_estudiante;?></td>\n <td width=\"50%\" class='cuadro_plano'><? echo $nombre;?></td>\n </td>\n </tr>\n <?\n }\n ?>\n </table>\n <table width=\"100%\">\n <tr>\n <td align=\"center\">\n <input type=\"button\" value=\"Homologar\" onclick=\"document.forms['<? echo $this->formulario2?>'].submit()\"> \n <input type=\"hidden\" name=\"opcion\" value=\"registrar\">\n <input type=\"hidden\" name=\"action\" value=\"<? echo $this->formulario ?>\">\n <input type=\"hidden\" name=\"tipo_homologacion\" value=\"estudiantes\">\n <input type=\"hidden\" name=\"cod_proyecto\" value=\"<? echo $cod_proyecto; ?>\">\n </td>\n </tr>\n </table>\n </form>\n\n <?\n }",
"public static function form(){\n $fecha = mktime(date(\"Y\"), date(\"m\"), date(\"d\"));\n $tipoAct = 'Actividad'->'id_tipo_act';\n return ['nombre' => '', 'tipo_actividad' => '','fecha_desde' =>$fecha, 'fecha_hasta' =>$fecha,\n 'instancia' => '', 'puesto_mencion' =>'','inst_referente' => '',\n 'inst_oferente' => '', 'lugar' =>'','descripcion' =>''];\n\n }",
"function formCharts() {\n\t\t//$output .= $this->Params['meta'].' - '.$this->Params['value'].' : '.$this->Params['userID'];\n\t\t$accountingCode = $this->inputGroup(['label'=>'Accounting Code','type'=>'text','id'=>'code','name'=>'code','placeholder'=>'0-00000','value'=>$this->Params['value'],'required'=>'data-inputmask=\"\\'mask\\': \\'9-99999\\'\"']);\n\t\t$accountingTitle = $this->inputGroup(['label'=>'Accounting Title','type'=>'text','id'=>'title','name'=>'title','placeholder'=>'Accounting Title','value'=>'']);\n\t\t$accountingDescription = $this->inputGroup(['label'=>'Account Description','type'=>'textarea','id'=>'description','name'=>'description','placeholder'=>'Field Description','title'=>'Chart of account description','value'=>'']);\n\t\t$formField = \"<div class='x_panel no-padding'><div class='box_title'><h2 class='left'>Create Accounting Chart</h2></div><div class='x_content no-padding'>\";\n\t\t$formField .= \"<div class='half'><div class='form-group no-padding item'>{$accountingCode}</div><div class='form-group no-padding item'>{$accountingTitle}</div></div>\";\n\t\t$formField .= \"<div class='half'><div class='form-group no-padding item'>{$accountingDescription}</div></div>\";\n\t\t$formField .= \"</div></div>\";\n\n\t\t$output = \"\n <form id='createRecords' data-toggle='validator' name='{$this->Params['meta']}' class='form-label-left input_mask' novalidate>\n\t\t\t\t<input type='hidden' name='action' id='action' value='createRecords' />\n\t\t\t\t<input type='hidden' name='type' id='type' value='{$this->Params['value']}' />\n\t\t\t\t<input type='hidden' name='table' id='table' value='{$this->Params['table']}' />\n\t\t\t\t<input type='hidden' name='theID' id='theID' value='0' />\n\t\t\t\t{$formField}\n\t\t\t</form>\n \";\n\t\t$output .= \"<script>$(':input').inputmask();</script>\";\n\t\treturn $output;\n\t}",
"public static function formularioMarcas()\n {\n //Variable con los permisos del usuario\n $dato_tipo = Sentencias::Seleccionar(\"tipos_usuarios\", \"id\", array($_SESSION[\"tipo\"]), 0, null);\n\n //Variables de los campos de la tabla marcas\n $marca = null;\n\n \n\n //Se empiezan a validar los datos del formulario de marcas\n if(isset($_POST[\"formulario\"]))\n {\n //Se valida que no se dejen espacios vacios\n if($_POST[\"marca\"] != \"\")\n {\n //Se valida que la marca cumpla con los criterios\n if(Validaciones::alfanumerico($_POST[\"marca\"]) && Validaciones::longitud($_POST[\"marca\"], 20))\n {\n //Se divide en si es ingresar un registro o modificar uno existente\n //Aqui es donde se modifica el registro\n if(!empty($_GET[\"id_marca\"]))\n {\n //Se valida si el parametro es un numero\n if(is_numeric($_GET[\"id_marca\"]))\n {\n //Se divide entre solo actualizar marca, imagen y ambas a la vez\n //Aqui se actualiza el nombre y la imagen\n if(is_uploaded_file($_FILES[\"archivo\"][\"tmp_name\"]))\n {\n $img = $_POST[\"marca\"].time().\".jpg\";\n\n $campos_valores = array\n (\n 'marca' => $_POST[\"marca\"],\n 'imagen' => $img\n );\n\n $condiciones_parametros = array\n (\n 'id' => $_GET[\"id_marca\"]\n );\n\n Sentencias::Actualizar(\"marcas\", $campos_valores, $condiciones_parametros, 1, \"marcas.php\");\n move_uploaded_file($_FILES['archivo']['tmp_name'], \"../img/marcas/$img\");\n }\n\n //Aqui solo se actualizara el nombre\n else\n {\n $campos_valores = array\n (\n 'marca' => $_POST[\"marca\"]\n );\n\n $condiciones_parametros = array\n (\n 'id' => $_GET[\"id_marca\"]\n );\n\n Sentencias::Actualizar(\"marcas\", $campos_valores, $condiciones_parametros, 1, \"marcas.php\"); \n }\n }\n\n else\n {\n header(\"Location: marcas.php\");\n }\n }\n\n //Aqui es donde se agrega un nuevo registro\n else\n {\n //Se valida si ya se subio la imagen\n if(is_uploaded_file($_FILES[\"archivo\"][\"tmp_name\"]))\n {\n //Se validan los valores de la iamgen\n if(Validaciones::imagen($_FILES[\"archivo\"]))\n {\n $img = $_POST[\"marca\"].time().\".jpg\";\n $campos_valores = array\n (\n 'marca' => $_POST[\"marca\"],\n 'imagen' => $img\n );\n\n Sentencias::Insertar(\"marcas\", $campos_valores, 1, \"marcas.php\");\n move_uploaded_file($_FILES['archivo']['tmp_name'], \"../img/marcas/$img\");\n }\n\n else\n {\n Ventanas::Mensaje(2, \"La imagen no es valida\", null);\n }\n }\n\n else\n {\n Ventanas::Mensaje(2, \"Debe ingresar una imagen\", null);\n }\n }\n } \n\n else\n {\n Ventanas::Mensaje(2, \"El nombre de la marca no es valido\", null);\n }\n }\n\n else\n {\n Ventanas::Mensaje(2, \"No deje campos vacios\", null);\n }\n }\n\n //Renderiza el formulario de marcas\n echo\n (\"\n <form method='post' enctype='multipart/form-data' id='registro'>\n <div class='row'>\n <div class='container'>\n <div class='col s12 center-align'>\n <h4>Aqui puedes ingresar una nueva marca</h4>\n </div>\n <div class='input-field col s10 offset-s1'>\n <input id='marca' value='$marca' name='marca' type='text' class='validate' autocomplete='off'>\n <label for='marca' class='blue-text text-darken-4'>Nombre de la marca</label>\n </div>\n <div class='file-field input-field col s10 offset-s1'>\n <div class='btn blue darken-4'>\n <span>Imagen</span>\n <input type='file' name='archivo'>\n </div>\n <div class='file-path-wrapper'>\n <input class='file-path validate' type='text' placeholder='Seleccione una imagen para el usuario'>\n </div>\n </div>\n \");\n\n //Se renderiza el boton dependiendo de si es para crear o modificar\n if(empty($_GET[\"id_marca\"]))\n {\n //Se valida si tiene permisos para ingresar\n if($dato_tipo[\"marcas\"] == 2 || $dato_tipo[\"marcas\"] == 5 || $dato_tipo[\"marcas\"] == 6 || $dato_tipo[\"marcas\"] == 9)\n {\n echo\n (\"\n <div class='col s3 offset-s1'>\n <button name='formulario' class='waves-effect waves-light btn blue darken-4'>Ingresar marca</button>\n </div> \n \");\n } \n }\n\n else\n {\n //Se valida si tiene permisos para modificar\n if($dato_tipo[\"marcas\"] == 3 || $dato_tipo[\"marcas\"] == 5 || $dato_tipo[\"marcas\"] > 6)\n {\n echo\n (\"\n <div class='col s3 offset-s1'>\n <button name='formulario' class='waves-effect waves-light btn blue darken-4'>Actualizar marca</button>\n </div> \n \");\n } \n }\n\n echo\n (\" \n <div class='col s3'>\n <a href='marcas.php' class='waves-effect waves-light btn blue darken-4'>Limpiar campos</a>\n </div> \n </div>\n </div> \n </form>\n \");\n }",
"public function indexAction() {\n $this->view->count = 0;\n # formation en attente\n $model = new Application_Model_FormationMapper();\n $this->view->formations = $model->getCalendrierFormation($this->params['exercice']);\n $listeFormations = $this->view->formations;\n $this->view->calendrierActionFormation = array();\n $mois = Misc_Utils::getMoisAnnee();\n foreach ($listeFormations as $list) {\n # get mois formation\n /*$date = date_parse_from_format(\"Y-m-d\", $list['date_debut']);\n echo $m = $date['month'];*/\n $m = date(\"n\", strtotime($list['date_debut']));\n $this->view->calendrierActionFormation[$m][] = $list;\n $this->view->count++;\n }\n $this->view->exerciceYear = $this->params['exercice'];\n # Flash Message Add or update\n $fm = $this->getHelper('FlashMessenger')->getMessages();\n if($fm)\n $this->view->fm = $fm[0];\n }",
"function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}",
"private function viewFormulario()\n {\n if (count($camposDefinidos = array_map('trim', explode(';', $this->camposForm))) > 0) {\n $campo_formulario = File::get(base_path($this->templates['campo']));\n $form = File::get(base_path($this->templates['form']));\n $stringCampos = \"\";\n foreach ($camposDefinidos as $c) {\n if (count($c_ = array_map('trim', explode(':', $c))) == 2) {\n $stringCampos .= $campo_formulario;\n $stringCampos = str_replace('[{campo}]', $c_[0], $stringCampos);\n $stringCampos = str_replace('[{label}]', $c_[1], $stringCampos);\n $stringCampos = str_replace('[{tabela}]', $this->tabela, $stringCampos);\n } else {\n echo \"#FORMULARIO# Campo {$c} ignorado, por nao estar descrito corretamente... forma correta -> campo:label\\n\";\n }\n }\n\n $form = str_replace('[{campos_formulario}]', $stringCampos, $form);\n $form = str_replace('[{route_as}]', $this->routeAs, $form);\n $form = str_replace('[{tabela}]', $this->tabela, $form);\n File::put(base_path('resources/views/' . $this->tabela . \"/form.blade.php\"), $form);\n }\n }",
"function displayAppointmentList($list){\n if ($list==null){\n $contents='<p>Aucun rendez-vous n\\'a été programmé</p>';\n }\n else {\n $contents='<p>Liste des rendez-vous :</p>\n <form id=\"resultat_rdv\" name=\"resultat_rdv\">';\n $i=1;\n foreach($list as $line){\n $contents.='<fieldset>\n <legend>Rendez-vous '.$i.'</legend>\n <p><label>Nom du médecin: </label>\n <input type=\"text\" value=\"'.$line->nom_employe.'\" disabled /></p>\n <p><label>Date : </label>\n <input type=\"text\" value=\"'.$line->date_creneau.'\" disabled /></p>\n <p><label>Heure : </label>\n <input type=\"text\" value=\"'.$line->heure_creneau.'\" disabled /></p>\n <p><label>Prix : </label>\n <input type=\"text\" value=\"'.$line->prix_motif.'\" disabled /></p>\n <p><label>Statut : </label>\n <input type=\"text\" value=\"'.$line->statut_paiement.'\" disabled /></p>\n </fieldset>';\n $i++;\n }\n $contents.='</form>';\n }\n // $contentsError='';\n // require_once('gabarit_agent.php');\n return $contents;\n}",
"function form_mostrar($conp,$nreg,$pg,$bo,$filtro,$arc,$pefedi,$pefeli){\n\t\t$mempresa = new mempresa();\n\t\t$pa = new mpaginacion();\n\t\t$txt = '';\n\t\t//Creamos el cuadro de buscar (filtros-Busquedas)\n\t\t$txt .= \"<table>\";\n\t\t\t//Una Fila\n\t\t\t$txt .= \"<tr>\";\n\t\t\t\t//1ra Columna - Formulario buscar\n\t\t\t\t$txt .= '<td>';\n\t\t\t\t$txt .= '<form id=\"formfil\" name=\"frmfil\" method=\"GET\" action=\"'.$arc.'\" class=\"txtbold\">';\n\t\t\t\t$txt .= '<input name=\"pg\" type=\"hidden\" value=\"'.$pg.'\" />';\n\t\t\t$txt .= '<input class=\"search-box\" type=\"text\" name=\"filtro\" value=\"'.$filtro.'\" placeholder=\"Nombre De Empresa\"\n\t\t\t\t\tonChange=\"this.form.submit();\">';\n\t\t\t\t\t$txt .= '<label for=\"search-box\"><span class=\"glyphicon fas fa-search search-icon\"></span></label>';\n\t\t\t\t$txt .= '</form>';\n\t\t\t$txt .= '</td>';\n\t\t\t\t//2da Columna control de paginacion\n\t\t\t\t$txt .= \"<td align='right' style='padding-left: 10px;'>\";\n\t\t\t\t\t$bo = \"<input type='hidden' name='filtro' value='\".$filtro.\"' />\";\n\t\t\t\t\t//Llamamos el metodo de contar la cantida de paginas\n\t\t\t\t\t$txt .= $pa->spag($conp,$nreg,$pg,$bo,$arc);\n\t\t\t\t\t//Llamar los datos para completar la paginacion\n\t\t\t\t\t$result = $mempresa->sel_empresa($filtro,$pa->rvalini(),$pa->rvalfin());\n\t\t\t\t$txt .= \"</td>\";\n\t\t\t//Cierre Fila\n\t\t\t$txt .= \"</tr>\";\n\t\t$txt .= \"</table>\";\n\t\t\n\t\tif($result){\n\t\t$txt .= '<div class=\"cuad1\" style=\"width: 90%; \">';\n\t\t\t$txt .= '<table1 width=\"100%\" cellspacing=\"0px\" align=\"center\">';\n\t\t\t\t\t\t\t$txt .= \"<table class='table table-hover'>\";\n\t\t\t\t//Inicio de la (Cabecera_Tb)\t\t\n\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'Foto';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'Empresa';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th></th>';\n\t\t\t\t$txt .= '</tr>';\n\t\t\t\t//Cierre de la (Cabecera_Tb)\n\t\t\t\tforeach ($result as $f) {\n\t\t\t\t//Inicio ROW - Datos de la tabla\n\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t$txt .= '<td align=\"center\">';\n\t\t\t\t\t$txt .= '<img src=\"'.$f['logemp'].'\" width=\"25px\" />';\n\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t$txt .= \"<td class='active lefi'>\";\n\t\t\t\t\t$txt .= \"<span style='font-size: 20px;'><strong>\".$f['nitemp'].\" - \".$f['razsocialemp'].\"</strong></span>\";\n\t\t\t\t\t$txt .= \"<br><strong>Sede: </strong>\".$f['sedecentemp'];\n\t\t\t\t\t$txt .= \"<br><strong>Email: </strong>\".$f['emailemp'];\n\t\t\t\t\t$txt .= \"<br><strong>Telefono: </strong>\".$f['telemp'];\n\t\t\t\t\t$txt .= \"</td>\";\n\t\t\t\t\t\t//ICONOS-MOdificar (Boton)\n\t\t\t\t\t\t$txt .= \"<td class='warning' align='center'>\";\n\t\t\t\t\t\t$txt .= \"<a href='home.php?pg=002&idemp=\".$f['idemp'].\"'><ul class='social-icons icon-circle icon-zoom list-unstyled list-inline'><li><i class='fas fa-pen' title='Actualizar'></i></li></ul></a>\";\n\t\t\t\t\t\t//ICONOS-Eliminar (Boton)\n\t\t\t\t\t\t$txt .= \"<a href='home.php?pg=002&del=\".$f['idemp'].\"'><ul class='social-icons icon-circle icon-zoom list-unstyled list-inline'><li><i class='fas fa-times' title='Eliminar'></i></li></ul></td></a>\";\t\n\t\t\t\t\t\t$txt .= \"</td>\";\n\n\t\t\t\t//Cierre ROW - Datos de la tabla\n\t\t\t\t$txt .= '</tr>';\n\t\t\t\t}\n\t\t\t$txt .= '</table>';\n\t\t\t$txt .= '<BR>';\n\t\t\t\t\t$txt .= '<BR>';\n\t\t\t\t\t$txt .= '<BR>';\n\t\t$txt .= '</div>';\n\t\t}else{\n\t\t$txt .= '<div class=\"cuad\" style=\"width: 90%;\">';\n\t\t$txt .= '<h3>No existen datos registrado en la base de datos...</h3>';\n\t\t$txt .= '</div>';\t\t\n\t}\n\t\techo $txt;\n\t}",
"function mostrarFormularioProyecto(){\n include_once($this->configuracion[\"raiz_documento\"] . $this->configuracion[\"clases\"] . \"/html.class.php\");\n $html = new html();\n $this->verificar = \"seleccion_valida(\".$this->formulario2.\",'cod_proyecto')\";\n \n //$cod_proyecto = $this->proyecto[0][0]; \n //$nom_proyecto = $this->proyecto[0][1];\n $tmp_proyectos = $this->consultarProyectos();\n for($i=0;$i<count($tmp_proyectos);$i++) {\n $proyectos[$i][0]=$tmp_proyectos[$i]['CRA_COD'];\n $proyectos[$i][1]=$tmp_proyectos[$i]['NOMBRE'];\n }\n $_REQUEST['cod_proyecto']=isset($_REQUEST['cod_proyecto'])?$_REQUEST['cod_proyecto']:'';\n \n ?>\n <script src=\"<? echo $this->configuracion[\"host\"]. $this->configuracion[\"site\"]. $this->configuracion[\"javascript\"] ?>/funciones.js\" type=\"text/javascript\" language=\"javascript\"></script>\n <form enctype='tipo:multipart/form-data,application/x-www-form-urlencoded,text/plain' method='POST' action='index.php' name='<? echo $this->formulario2 ?>'>\n <table id=\"tabla\" class=\"contenidotabla\" width=\"100%\">\n <div align=\"center\" ><b><?echo \"HOMOLOGACIONES PENDIENTES POR PROYECTO CURRICULAR \"; ?></b></div><hr>\n <?//opciones para agregar 5,10,15...50 estudiantes?>\n\n <thead class='sigma'>\n <th class='niveles centrar' > Proyecto Curricular</th>\n </thead>\n <tr >\n <td width=\"20%\" class='cuadro_plano centrar'>\n <?\n $mi_cuadro = $html->cuadro_lista($proyectos, \"cod_proyecto\", $this->configuracion,$_REQUEST['cod_proyecto'], 0, FALSE, 1, \"\",400);\n echo $mi_cuadro ;\n ?>\n <input type=\"hidden\" name=\"opcion\" value=\"consultarProyecto\">\n <input type=\"hidden\" name=\"pagina\" value=\"<? echo $this->formulario2 ?>\">\n \n </td>\n \n </tr>\n </table>\n <table width=\"100%\">\n <tr>\n <td align=\"center\">\n <input type=\"button\" value=\"Homologar\" onclick=\"if(<? echo $this->verificar; ?>){document.forms['<? echo $this->formulario2?>'].submit()}else{false}\"> </td>\n </tr>\n </table>\n </form>\n<?\n\n }",
"function formulaire_periode($date_jour, $retour, $prim_an_stats) {\r\n\tinclude_spip('inc/date');\r\n\r\n\t$date = recup_date($date_jour);\r\n\r\n\t$aff = debut_boite_info(true)\r\n\t\t. \"<form action ='\" . generer_url_ecrire($retour) . \"' method='post'>\"\r\n\t\t. \"<div style='padding:3px;' align='center' ><b>\"\r\n\t\t. _T('actijour:jour_affiche_dpt') . \"</b><br /><br />\"\r\n\r\n\t\t. afficher_jour($date[2], \"name='jour' size='1' class='fondl' \", true)\r\n\t\t. afficher_mois($date[1], \"name='mois' size='1' class='fondl' \", true) . \"<br /><br />\"\r\n\t\t. acjr_afficher_annee($date[0], \"name='annee' size='1' class='fondl' \", $prim_an_stats) . \"<br /><br />\"\r\n\r\n\t\t. \"<input type='submit' class='fondo' value='\" . _T('actijour:text_bouton_afficher') . \"' />\"\r\n\t\t. \"</div>\"\r\n\t\t. \"</form>\"\r\n\t\t. fin_boite_info(true);\r\n\r\n\treturn $aff;\r\n}",
"function _GetFrm(){\n\t\t// Valido\n\t\tif(!isset($_POST['diagramacion']) || $_POST['diagramacion'] == 0){\n\t\t\t$this->Error .= \"Es requerido seleccionar una diagramación.\\n\";\n\t\t}\n\t\tif(trim($_POST['titulo']) == \"\"){\n\t\t\t$this->Error .= \"Es requerido especificar un título de noticia.\\n\";\n\t\t}\n\t\tif(trim($_POST['copete']) == \"\"){\n\t\t\t$this->Error .= \"Es requerido especificar un texto inicial de noticia.\\n\";\n\t\t}\n\t\tif(trim($_POST['cuerpo']) == \"\"){\n\t\t\t$this->Error .= \"Es requerido especificar un texto principal de noticia.\\n\";\n\t\t}\n\t\tif($this->Error == \"\"){\n\t\t\t// Cargo desde el formulario\n\t\t\t$this->Registro['id_noticia'] = $_POST['id_noticia'];\n\t\t\t$this->Registro['diagramacion'] = addslashes($_POST['diagramacion']);\n\t\t\t$this->Registro['titulo'] = addslashes($_POST['titulo']);\n\t\t\t$this->Registro['copete'] = addslashes($_POST['copete']);\n\t\t\t$this->Registro['cuerpo'] = stripslashes($_POST['cuerpo']);\n\t\t\t$this->Registro['visible'] = $_POST['visible'] ? 1 : 0;\n\t\t\tif($this->Registro['id_noticia'] == \"\"){\n\t\t\t\t$this->Registro['fecha_creacion'] = date('Y').\"-\".date('m').\"-\".date('d').\" \".date('H').\":\".date('i').\":00\";\n\t\t\t}\n\t\t}\n\t}",
"function nuevaCita()\n\t\t{\n\t\t\t$prefs['template'] = '\n\t\t\t{table_open}<table style=\"margin: 0 auto;\" cellpadding=\"1\" cellspacing=\"2\">{/table_open}\n\n\t\t\t{heading_row_start}<tr>{/heading_row_start}\n\t\t\t\n\t\t\t{heading_previous_cell}<th class=\"prev_sign\"><a onclick=\"cargar(\\'{previous_url}\\')\"><<</a></th>{/heading_previous_cell}\n\t\t\t{heading_title_cell}<th colspan=\"{colspan}\">{heading}</th>{/heading_title_cell}\n\t\t\t{heading_next_cell}<th class=\"next_sign\"><a onclick=\"cargar(\\'{next_url}\\')\">>></a></th>{/heading_next_cell}\n\t\t\t\n\t\t\t{heading_row_end}</tr>{/heading_row_end}\n\t\t\t\n\t\t\t//Deciding where to week row start\n\t\t\t{week_row_start}<tr class=\"week_name\" >{/week_row_start}\n\t\t\t//Deciding week day cell and week days\n\t\t\t{week_day_cell}<td >{week_day}</td>{/week_day_cell}\n\t\t\t//week row end\n\t\t\t{week_row_end}</tr>{/week_row_end}\n\t\t\t\n\t\t\t{cal_row_start}<tr>{/cal_row_start}\n\t\t\t{cal_cell_start}<td>{/cal_cell_start}\n\t\t\t\n\t\t\t{cal_cell_content}<a onclick=\"cargarCitasDisponibles(\\'{content}\\')\">{day}</a>{/cal_cell_content}\n\t\t\t{cal_cell_content_today}<div class=\"highlight\"><a onclick=\"cargarCitasDisponibles(\\'{content}\\')\">{day}</a></div>{/cal_cell_content_today}\n\t\t\t\n\t\t\t{cal_cell_no_content}{day}{/cal_cell_no_content}\n\t\t\t{cal_cell_no_content_today}<div class=\"highlight\">{day}</div>{/cal_cell_no_content_today}\n\t\t\t\n\t\t\t{cal_cell_blank} {/cal_cell_blank}\n\t\t\t\n\t\t\t{cal_cell_end}</td>{/cal_cell_end}\n\t\t\t{cal_row_end}</tr>{/cal_row_end}\n\t\t\t\n\t\t\t{table_close}</table>{/table_close}\n\t\t\t';\n\t\t\t\n\t\t\t$prefs['day_type'] = 'short';\n\t\t\t$prefs['start_day'] = 'monday';\n\t\t\t$prefs['show_next_prev'] = true;\n\t\t\t\n\t\t\t// Loading calendar library and configuring table template\n\t\t\t$this->load->library('calendar', $prefs);\n\t\t\t\n\t\t\t$year = $this->uri->segment(3) == \"\" ? date(\"Y\"): $this->uri->segment(3) ;\n\t\t\t$mes = $this->uri->segment(4) == \"\" ? date(\"m\"): $this->uri->segment(4);\n\t\t\t\n\t\t\t$data['especialidad'] = $this->PacienteModel->getTipoEspecialidad();\n\t\t\t\n\t\t\t//obtendo el primer dia del mes y el ultimo\n\t\t\t$fecha = date('Y-m-j',mktime(0, 0, 0, $mes, 1, $year));\n\t\t\t$fechaFin = strtotime ( '+1 month' , strtotime ( $fecha ) ) ;\n\t\t\t$fechaFin = date ( 'Y-m-j' , $fechaFin );\n\t\t\t\n\t\t\t$diasSemana = $this->PacienteModel->getCalendario();\n\t\t\t$cont = 0;\n\t\t\tforeach ($diasSemana as $value) {\n\t\t\t\t$diasSemanaArray[$cont] = $value->Dia;\n\t\t\t\t$cont++;\n\t\t\t}\n\t\t\t\n\t\t\t$cont = 1;\n\t\t\tfor($i=strtotime($fecha); $i<strtotime($fechaFin); $i+=86400){\n\t\t\t\tif (in_array(date(\"N\", $i), $diasSemanaArray) && time()<$i+86400) //comprobamos si el dia de la semana a comprobar esta en el horario\n\t\t\t \t$data['dias'][$cont] = \"Paciente/listarCitasDisponibles/\".date(\"d\", $i).\"/\".date(\"m\", $i).\"/\".date(\"Y\", $i);\n\t\t\t $cont++;\n\t\t\t}\n\t\t\t$cont = 1;\n\n\t\t\t$this->load->view('Paciente/nuevaCita', $data);\n\t\t}",
"public function form()\n {\n $key = $this->getKey();\n $form = new PHPWS_Form('schedule_form');\n\n if (isset($_REQUEST['js'])) {\n $form->addHidden('js', 1);\n }\n\n $form->addHidden('module', 'calendar');\n $form->addHidden('aop', 'post_schedule');\n $form->addHidden('sch_id', $this->id);\n\n $form->addText('title', $this->title);\n $form->setLabel('title', dgettext('calendar', 'Title'));\n $form->setSize('title', 40);\n\n $form->addTextArea('summary', $this->summary);\n $form->setLabel('summary', dgettext('calendar', 'Summary'));\n $form->useEditor('summary');\n\n if (PHPWS_Settings::get('calendar', 'personal_schedules')) {\n if (Current_User::allow('calendar', 'edit_public')) {\n $form->addRadio('public', array(0,1));\n $form->setLabel('public', array(dgettext('calendar', 'Private'),\n dgettext('calendar', 'Public')));\n $form->setMatch('public', (int)$this->public);\n } else {\n $form->addTplTag('PUBLIC', dgettext('calendar', 'Private'));\n $form->addHidden('public', 0);\n }\n } else {\n $form->addTplTag('PUBLIC', dgettext('calendar', 'Public'));\n $form->addHidden('public', 1);\n }\n\n $upcoming[0] = dgettext('calendar', 'Do not show upcoming events');\n $upcoming[1] = dgettext('calendar', 'Show upcoming week');\n $upcoming[2] = dgettext('calendar', 'Show next two weeks');\n $upcoming[3] = dgettext('calendar', 'Show upcoming month');\n\n $form->addSelect('show_upcoming', $upcoming);\n $form->setLabel('show_upcoming', dgettext('calendar', 'Show upcoming events'));\n $form->setMatch('show_upcoming', $this->show_upcoming);\n\n $form->addSubmit(dgettext('calendar', 'Save'));\n\n $template = $form->getTemplate();\n\n if (isset($_REQUEST['js'])) {\n $template['CLOSE'] = javascript('close_window', array('value' => dgettext('calendar', 'Cancel')));\n }\n\n $template['PUBLIC_LABEL'] = dgettext('calendar', 'Availability');\n return PHPWS_Template::process($template, 'calendar', 'admin/forms/edit_schedule.tpl');\n }",
"private function pantalla_edicion($modo,$datos='') {\r\n\t\t\t if($datos == ''){//para que por defecto en insertar salga el nombre del producto vacio y el precio igual a 0\r\n\t\t\t\tunset($datos);\r\n\t\t\t\t$datos['nombre'] = '';\r\n\t\t\t\t$datos['precio'] = 0;\r\n\t\t\t }\r\n\t\t\t ?>\r\n\t\t\t <!DOCTYPE html>\r\n\t\t\t\t<html>\r\n\t\t\t\t\t<head>\r\n\t\t\t\t\t\t<title>Área privada de Tienda online</title>\r\n\t\t\t\t\t\t<link href=\"/ejercicio_unidad9_hector_garcia/css/estilos.css\" rel=\"stylesheet\" type=\"text/css\">\r\n\t\t\t\t\t</head>\r\n\t\t\t\t\t<body>\r\n\t\t\t\t\t\t<div id=\"main\">\r\n\t\t\t\t<?php\r\n\t\t\t\t\t$this -> cabecera();\r\n\t\t\t\t?>\r\n\t\t\t\t\t\t\t<div id=\"contenido\">\r\n\t\t\t\t\t\t\t\t<h2>Ficha de producto</h2>\r\n\t\t\t\t\t\t\t\t<form method=\"post\" action=\"http://localhost:8080/ejercicio_unidad9_hector_garcia/\">\r\n\t\t\t\t<?php\r\n\t\t\t\t\tif ($modo == 'insertar') {\r\n\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"acc\" value=\"insertar_producto\">\r\n\t\t\t\t<?php\r\n\t\t\t\t\t} else {\r\n\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"id\" value=\"<?php echo (int)$datos['id']; ?>\">\r\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"acc\" value=\"modificar_producto\">\r\n\t\t\t\t<?php\r\n\t\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t<label class=\"etiqueta\" for=\"nombre\">Nombre</label>\r\n\t\t\t\t\t\t\t\t<div class=\"campo\"><input type=\"text\" name=\"nombre\" id=\"nombre\" value=\"<?php echo htmlentities($datos['nombre']); ?>\"></div>\r\n\t\t\t\t\t\t\t\t<label class=\"etiqueta\" for=\"precio\">Precio</label>\r\n\t\t\t\t\t\t\t\t<div class=\"campo\"><input type=\"text\" name=\"precio\" id=\"precio\" value=\"<?php echo number_format($datos['precio'],2,',','.'); ?>\"></div>\r\n\t\t\t\t\t\t\t\t<div class=\"botonera\"><button type=\"submit\">Guardar</button></div>\r\n\t\t\t\t\t\t\t\t</form>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</body>\r\n\t\t\t\t</html>\r\n\t\t<?php\r\n\t\t}",
"function mostrarFormulario(){\n\n echo \"<br><br>\";\n echo \"<h2>FORMULARIO PARA ALUMNOS</h2>\"; \n?>\n\n <form method=\"post\" action=\"<?php echo htmlspecialchars($_SERVER[\"PHP_SELF\"]);?>\">\n Matricula: <input type=\"text\" name=\"matricula\" value=\"<?php echo $this->matricula;?>\">\n <br><br>\n Nombre: <input type=\"text\" name=\"nombree\" value=\"<?php echo $this->nombre;?>\">\n <br><br>\n Carrera: <input type=\"text\" name=\"carreraa\" value=\"<?php echo $this->carrera;?>\">\n <br><br>\n <span class=\"error\">* <?php echo $this->nameErr;?></span>\n <br><br>\n E-mail: <input type=\"text\" name=\"email\" value=\"<?php echo $this->email;?>\">\n <span class=\"error\">* <?php echo $this->emailErr;?></span>\n <br><br>\n Telefono: <input type=\"tel\" name=\"telefonoo\"value=\"<?php echo $this->telefono;?>\">\n <br><br>\n <input type=\"submit\" name=\"submitt\" value=\"Submit\">\n </form>\n\n<?php\n }",
"function DadosExecucao() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_sq_menu = $_REQUEST['w_sq_menu'];\r\n\r\n $w_readonly = '';\r\n $w_erro = '';\r\n\r\n // Recupera os dados da solicitação\r\n $sql = new db_getSolicData; $RS_Solic = $sql->getInstanceOf($dbms,$w_chave,f($RS_Menu,'sigla'));\r\n\r\n // Verifica se há necessidade de recarregar os dados da tela a partir\r\n // da própria tela (se for recarga da tela) ou do banco de dados (se não for inclusão)\r\n if ($w_troca>'') {\r\n // Se for recarga da página\r\n $w_inicio = $_REQUEST['w_inicio'];\r\n $w_fim = $_REQUEST['w_fim'];\r\n $w_valor = $_REQUEST['w_valor'];\r\n } else {\r\n $w_inicio = FormataDataEdicao(f($RS_Solic,'inicio'));\r\n $w_fim = FormataDataEdicao(f($RS_Solic,'fim'));\r\n $w_valor = ((nvl(f($RS_Solic,'valor'),'')!='') ? formatNumber(f($RS_Solic,'valor')) : ''); \r\n } \r\n Cabecalho();\r\n head();\r\n Estrutura_CSS($w_cliente);\r\n // Monta o código JavaScript necessário para validação de campos e preenchimento automático de máscara,\r\n // tratando as particularidades de cada serviço\r\n ScriptOpen('JavaScript');\r\n CheckBranco();\r\n FormataData();\r\n SaltaCampo();\r\n FormataDataHora();\r\n FormataValor(); \r\n ValidateOpen('Validacao');\r\n switch (f($RS_Menu,'data_hora')) {\r\n case 0: Validate('w_fim','Término previsto','DATA',1,10,10,'','0123456789/'); break;\r\n case 1: Validate('w_fim','Término previsto','DATA',1,10,10,'','0123456789/'); break;\r\n case 2: Validate('w_fim','Término previsto','DATAHORA',1,17,17,'','0123456789/'); break;\r\n case 3: \r\n Validate('w_inicio','Início previsto','DATA',1,10,10,'','0123456789/'); \r\n Validate('w_fim','Término previsto','DATA',1,10,10,'','0123456789/');\r\n CompData('w_inicio','Início previsto','<=','w_fim','Término previsto');\r\n break;\r\n case 4:\r\n Validate('w_inicio','Início previsto','DATAHORA',1,17,17,'','0123456789/,: ');\r\n Validate('w_fim','Término previsto','DATAHORA',1,17,17,'','0123456789/,: ');\r\n CompData('w_inicio','Início previsto','<=','w_fim','Término previsto');\r\n break;\r\n } \r\n Validate('w_valor','Valor previsto','VALOR','',4,18,'','0123456789.,');\r\n ValidateClose();\r\n ScriptClose();\r\n ShowHTML('</head>');\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n switch (f($RS_Menu,'data_hora')) {\r\n case 0: BodyOpenClean('onLoad=\\'document.Form.w_fim.focus()\\';'); break;\r\n case 1: BodyOpenClean('onLoad=\\'document.Form.w_fim.focus()\\';'); break;\r\n case 2: BodyOpenClean('onLoad=\\'document.Form.w_fim.focus()\\';'); break;\r\n case 3: BodyOpenClean('onLoad=\\'document.Form.w_inicio.focus()\\';'); break;\r\n case 4: BodyOpenClean('onLoad=\\'document.Form.w_inicio.focus()\\';'); break;\r\n } \r\n Estrutura_Topo_Limpo();\r\n Estrutura_Menu();\r\n Estrutura_Corpo_Abre();\r\n Estrutura_Texto_Abre();\r\n ShowHTML('<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n // Exibe os dados da solicitação\r\n ShowHTML('<tr><td align=\"center\" bgcolor=\"#FAEBD7\" colspan=3><table border=1 width=\"100%\"><tr><td>');\r\n ShowHTML(' <TABLE WIDTH=\"100%\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr><td><table border=0 width=\"100%\">');\r\n ShowHTML(' <tr valign=\"top\">');\r\n ShowHTML(' <td>'.f($RS_Menu,'nome').':<b><br>'.f($RS_Solic,'sq_siw_solicitacao').'</td>');\r\n ShowHTML(' <td>Solicitante:<b><br>'.ExibePessoa('../',$w_cliente,f($RS_Solic,'solicitante'),$TP,f($RS_Solic,'nm_sol')).'</td>');\r\n ShowHTML(' <td>Setor solicitante:<b><br>'.ExibeUnidade('../',$w_cliente,f($RS_Solic,'sg_unidade_solic'),f($RS_Solic,'sq_unidade'),$TP).'</td>');\r\n ShowHTML(' <tr><td colspan=\"2\">Descrição:<b><br>'.f($RS_Solic,'descricao').'</td>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TABLE>');\r\n ShowHTML('</table>');\r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$w_pagina.$par,'F');\r\n ShowHTML(MontaFiltro('POST'));\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_menu\" value=\"'.$w_menu.'\">');\r\n \r\n ShowHTML('<tr><td>');\r\n ShowHTML(' <tr><td><table width=\"100%\" border=\"0\" bgcolor=\"'.$conTrBgColor.'\">');\r\n ShowHTML(' <tr><td colspan=\"3\"><font size=\"2\"><b>DADOS DA EXECUÇÃO<hr NOSHADE color=#000000 SIZE=1></b></font></td></tr>');\r\n ShowHTML(' <tr valign=\"top\">');\r\n switch (f($RS_Menu,'data_hora')) {\r\n case 0: ShowHTML(' <td><b><u>T</u>érmino previsto:</b><br><input '.$w_Disabled.' accesskey=\"T\" type=\"text\" name=\"w_fim\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_fim.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Data limite para que a execução da demanda esteja concluída.\">'.ExibeCalendario('Form','w_fim').'</td>'); break;\r\n case 1: ShowHTML(' <td><b><u>T</u>érmino previsto:</b><br><input '.$w_Disabled.' accesskey=\"T\" type=\"text\" name=\"w_fim\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_fim.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Data limite para que a execução da demanda esteja concluída.\">'.ExibeCalendario('Form','w_fim').'</td>'); break;\r\n case 2: ShowHTML(' <td><b><u>T</u>érmino previsto:</b><br><input '.$w_Disabled.' accesskey=\"T\" type=\"text\" name=\"w_fim\" class=\"STI\" SIZE=\"17\" MAXLENGTH=\"17\" VALUE=\"'.$w_fim.'\" onKeyDown=\"FormataDataHora(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,17,event);\" title=\"Data/hora limite para que a execução da demanda esteja concluída.\">'.ExibeCalendario('Form','w_fim').'</td>'); break;\r\n case 3: \r\n ShowHTML(' <td><b>Iní<u>c</u>io previsto:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_inicio\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_inicio.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Início previsto da demanda.\">'.ExibeCalendario('Form','w_inicio').'</td>'); \r\n ShowHTML(' <td><b><u>T</u>érmino previsto:</b><br><input '.$w_Disabled.' accesskey=\"T\" type=\"text\" name=\"w_fim\" class=\"STI\" SIZE=\"10\" MAXLENGTH=\"10\" VALUE=\"'.$w_fim.'\" onKeyDown=\"FormataData(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,10,event);\" title=\"Data limite para que a execução da demanda esteja concluída.\">'.ExibeCalendario('Form','w_fim').'</td>');\r\n break;\r\n case 4:\r\n ShowHTML(' <td><b>Iní<u>c</u>io previsto:</b><br><input '.$w_Disabled.' accesskey=\"C\" type=\"text\" name=\"w_inicio\" class=\"STI\" SIZE=\"17\" MAXLENGTH=\"17\" VALUE=\"'.$w_inicio.'\" onKeyDown=\"FormataDataHora(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,17,event);\" title=\"Data/hora de início previsto da demanda.\">'.ExibeCalendario('Form','w_inicio').'</td>');\r\n ShowHTML(' <td><b><u>T</u>érmino previsto:</b><br><input '.$w_Disabled.' accesskey=\"T\" type=\"text\" name=\"w_fim\" class=\"STI\" SIZE=\"17\" MAXLENGTH=\"17\" VALUE=\"'.$w_fim.'\" onKeyDown=\"FormataDataHora(this,event);\" onKeyUp=\"SaltaCampo(this.form.name,this,17,event);\" title=\"Data/hora limite para que a execução da demanda esteja concluída.\">'.ExibeCalendario('Form','w_fim').'</td>');\r\n break;\r\n } \r\n ShowHTML(' <td><b>Valo<u>r</u> previsto:</b><br><input '.$w_Disabled.' accesskey=\"O\" type=\"text\" name=\"w_valor\" class=\"STI\" SIZE=\"18\" MAXLENGTH=\"18\" VALUE=\"'.$w_valor.'\" style=\"text-align:right;\" onKeyDown=\"FormataValor(this,18,2,event);\" title=\"Informe o orçamento disponível para execução da demanda, ou zero se não for o caso.\"></td>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\" height=\"1\" bgcolor=\"#000000\"></TD></TR>');\r\n ShowHTML(' <tr><td align=\"center\" colspan=\"3\">');\r\n ShowHTML(' <input class=\"stb\" type=\"submit\" name=\"Botao\" value=\"Gravar\">');\r\n $sql = new db_getMenuData; $RS = $sql->getInstanceOf($dbms,$w_menu);\r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,f($RS,'link').'&w_copia='.$w_copia.'&O=L&SG='.f($RS,'sigla').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.MontaFiltro('GET')).'\\';\" name=\"Botao\" value=\"Abandonar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n \r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Estrutura_Texto_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Estrutura_Fecha();\r\n Rodape();\r\n}",
"public function extractionAction()\r\n {\r\n /**\r\n * 1. Définir la vue avec la Form pour saisir les critères\r\n */\r\n // Date de la dernière extraction\r\n $televes = new Pits_Model_DbTable_TEleves();\r\n $depuis = $televes->lastDateExtraction();\r\n // Définition du formulaire\r\n $configForm = new Zend_Config_Ini($this->_applicationPath . '/configs/forms.ini', 'extraction');\r\n $form = new Zend_Form($configForm->ap->extraction);\r\n $form->setAction($this->view->link('admin', 'extraction'))\r\n ->setDefaults(array('depuisJ' => Pits_Model_Format::date(\"dd/MM/YYYY\", $depuis),\r\n 'depuisH' => Pits_Model_Format::date('HH:mm:ss', $depuis)));\r\n $this->view->form = $form;\r\n \r\n /**\r\n * Traitement\r\n */\r\n if ($this->getRequest()->isPost() && $form->isValid($_POST)) {\r\n // Retrait des informations depuis les données en POST\r\n $values = $form->getValues();\r\n // date à partir de laquelle on fait l'extraction\r\n if (!empty($values['depuisJ'])) {\r\n if (empty($values['depuisH'])) $values['depuisH'] = '00:00:00';\r\n $depuis = Pits_Model_Format::date(\"YYYY-MM-dd HH:mm:ss\", $values['depuisJ'] . ' ' . $values['depuisH'], 'fr_FR');\r\n }\r\n /**\r\n * 2. Fixer la dateActuelle\r\n */\r\n $televes = new Pits_Model_DbTable_TEleves();\r\n $select = $televes->select();\r\n $dateExtraction = Pits_Model_Format::date(\"YYYY-MM-dd HH:mm:ss\");\r\n /**\r\n * 3. Marquer la dateExtraction\r\n */\r\n if (isset($depuis)) {\r\n $televes->update(array('dateExtraction' => $dateExtraction),\r\n array('datePaiement > ?' => $depuis, 'ficheValidee = ?' => 1,));\r\n $televes->update(array('dateExtraction' => $dateExtraction),\r\n array('dateModif > ?' => $depuis, 'ficheValidee = ?' => 1,));\r\n } else {\r\n $televes->update(array('dateExtraction' => $dateExtraction), array('ficheValidee = ?' => 1,));\r\n }\r\n /**\r\n * 4. Compte le nombre d'élèves à extraire\r\n */\r\n $nbEleves = $televes->nbEnfantsAExtraire($dateExtraction);\r\n /**\r\n * 5. Génération du flux temporaire (fichier si taille > 2MB)\r\n */\r\n $fd = fopen('php://temp', 'r+');\r\n $cols = $televes->info();\r\n fputcsv($fd, $cols['cols'], ';', '\"');\r\n unset($cols);\r\n /**\r\n * 6. Boucle de requêtes d'extraction\r\n */\r\n $where = $select->where('dateExtraction = ?', $dateExtraction);\r\n for ($bloc = 250, $j = 0; $j < ceil($nbEleves / $bloc); $j++) {\r\n $eleves = $televes->fetchAll($where->order(array('Nom', 'Prenom'))->limit($bloc, $bloc * $j))->toArray();\r\n foreach ($eleves as $eleve) {\r\n fputcsv($fd, $eleve, ';', '\"');\r\n }\r\n }\r\n rewind($fd);\r\n /**\r\n * 7. Exportation des données dans un fichier csv\r\n */\r\n $this->_helper->viewRenderer->setNoRender(true);\r\n $this->_helper->layout->disableLayout();\r\n $this->getResponse()->setHeader('Content-type', 'text/csv');\r\n $this->getResponse()->setHeader('Content-disposition','attachment; filename=\"pits-eleves.csv\"');\r\n $this->getResponse()->setBody(stream_get_contents($fd));\r\n fclose($fd);\r\n /*\r\n * 6. Marque les fiches extraites et démarque les fiches modifiées\r\n */\r\n $televes->update(array('ficheModifiee' => 0, 'ficheExtraite' => 1),\r\n array('dateExtraction = ?' => $dateExtraction));\r\n /**\r\n * 7. Retourne à admin/index\r\n */\r\n //$this->_redirect('/admin');\r\n }\r\n }",
"function mostrarFormulario()\r\n{\r\n\tglobal $use;\r\n\tglobal $priv;\r\n\r\n\tif(!isset($_GET['num_soc']))\r\n\t{\r\n\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"mostrarFormulario\",\r\n\t\t\t\t'descripcion'\t=>\"No se recibió num_soc como parametro de la función\"\r\n\t\t\t\t];\r\n\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use'));\t\r\n\t\treturn;\r\n\t}\r\n\r\n\t\r\n\tif(!isset($_GET['cod_servicio']))\r\n\t{\r\n\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"mostrarFormulario\",\r\n\t\t\t\t'descripcion'\t=>\"No se recibió cod_servicio como parametro de la función\"\r\n\t\t\t\t];\r\n\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t\r\n\t$numero_socio = $_GET['num_soc'];\r\n\t$cod_servicio = $_GET['cod_servicio'];\r\n\r\n\t$resultado = $GLOBALS['db']->select(\"SELECT * FROM socios, persona\r\n\t\t\t\t\t\t\t\t\t\tWHERE socios.numero_soc = '$numero_socio'\r\n\t\t\t\t\t\t\t\t\t\tAND socios.id_persona=persona.id_persona\");\r\n\r\n\t$id_persona;\r\n\tif($resultado)\r\n\t{\r\n\t\tdate_default_timezone_set('America/Argentina/Catamarca');\r\n\t\t$fecha['year']=date(\"Y\");\r\n\t\t$fecha['mon']=date(\"m\");\r\n\t\t$fecha['mday']=date(\"d\");\r\n\t\t$fecha['hours']=date(\"H\");\r\n\t\t$fecha['minutes']=date(\"i\");\r\n\t\tforeach($resultado as $res)\r\n\t\t{\r\n\t\t\t$persona =[\r\n\t\t\t\t\t'nro'\t\t=>\t$res['numero_soc'],\r\n\t\t\t\t\t'sexo'\t\t=>\t$res['sexo'],\r\n\t\t\t\t\t'nombre'\t=>\t$res['nombre'],\r\n\t\t\t\t\t'doc' \t\t=>\t$res['numdoc'],\r\n\t\t\t\t\t'tel' \t\t=>\t$res['tel_fijo'],\r\n\t\t\t\t\t'cel'\t\t=>\t$res['tel_cel'],\r\n\t\t\t\t\t'fecha' \t=>\t$fecha,\r\n\t\t\t\t\t'dom'\t\t=>\t$res['domicilio'],\r\n\t\t\t\t\t'nro_casa'\t\t=>\t$res['casa_nro'],\r\n\t\t\t\t\t'barrio'\t\t=>\t$res['barrio'],\r\n\t\t\t\t\t'localidad'\t\t=>\t$res['localidad'],\r\n\t\t\t\t\t'cod_postal'\t\t=>\t$res['codpostal'],\r\n\t\t\t\t\t'dpmto'\t\t=>\t$res['dpmto'],\r\n\t\t\t\t\t'cod_serv'\t=>\t$cod_servicio,\r\n\t\t\t\t\t'id_persona' => $res['id_persona']\r\n\t\t\t\t\t];\r\n\t\t\tif($res['numero_soc']==$res['soc_titula'])\r\n\t\t\t{\r\n\t\t\t\t$persona['doctit'] = $res['numdoc'];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$soc_titular=$res['soc_titula'];\r\n\t\t\t\t$resultado2 = $GLOBALS['db']->select(\"SELECT * FROM socios, persona\r\n\t\t\t\t\t\t\t\t\t\tWHERE socios.numero_soc='$soc_titular'\r\n\t\t\t\t\t\t\t\t\t\tAND persona.id_persona=socios.id_persona\");\r\n\t\t\t\tforeach($resultado2 as $res2)\r\n\t\t\t\t{\r\n\t\t\t\t\t$persona['doctit'] = $res2['numdoc'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$id_persona=$res['id_persona'];\r\n\t\t}\t\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"mostrarFormulario\",\r\n\t\t\t\t'descripcion'\t=>\"No se encontraron datos para el socio '$numero_socio'\"\r\n\t\t\t\t];\r\n\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t$resultado_historia = $GLOBALS['db']->select(\"SELECT * FROM historia_clinica\r\n\t\t\t\t\t\t\t\t\t\tWHERE id_persona='$id_persona'\");\r\n\tif($resultado_historia){\r\n\t\tforeach($resultado_historia as $res_historia){\r\n\t\t\t$historia =[\r\n\t\t\t\t\t'paperas'\t\t=>\t$res_historia['paperas'],\r\n\t\t\t\t\t'rubeola'\t\t=>\t$res_historia['rubeola'],\r\n\t\t\t\t\t'varicela'\t=>\t$res_historia['varicela'],\r\n\t\t\t\t\t'epilepsia' \t\t=>\t$res_historia['epilepsia'],\r\n\t\t\t\t\t'hepatitis' \t\t=>\t$res_historia['hepatitis'],\r\n\t\t\t\t\t'sinusitis'\t\t=>\t$res_historia['sinusitis'],\r\n\t\t\t\t\t'diabetes' \t=>\t$res_historia['diabetes'],\r\n\t\t\t\t\t'apendicitis'\t\t=>\t$res_historia['apendicitis'],\r\n\t\t\t\t\t'amigdalitis'\t\t=>\t$res_historia['amigdalitis'],\r\n\t\t\t\t\t'comidas'\t\t=>\t$res_historia['comidas'],\r\n\t\t\t\t\t'medicamentos'\t\t=>\t$res_historia['medicamentos'],\r\n\t\t\t\t\t'otras'\t\t=>\t$res_historia['otras'],\r\n\t\t\t\t\t];\r\n\t\t\t\t\t\r\n\t\t}\r\n\t}\r\n\telse{\r\n\t\t$historia =[\r\n\t\t\t\t'paperas'\t\t=>\t0,\r\n\t\t\t\t'rubeola'\t\t=>\t0,\r\n\t\t\t\t'varicela'\t=>\t0,\r\n\t\t\t\t'epilepsia' \t\t=>\t0,\r\n\t\t\t\t'hepatitis' \t\t=>\t0,\r\n\t\t\t\t'sinusitis'\t\t=>\t0,\r\n\t\t\t\t'diabetes' \t=>\t0,\r\n\t\t\t\t'apendicitis'\t\t=>\t0,\r\n\t\t\t\t'amigdalitis'\t\t=>\t0,\r\n\t\t\t\t'comidas'\t\t=>\t'',\r\n\t\t\t\t'medicamentos'\t\t=>\t'',\r\n\t\t\t\t'otras'\t\t=>\t'',\r\n\t\t\t\t];\r\n\t}\r\n\r\n\t$profesionales = $GLOBALS['db']->select(\"SELECT * FROM profesionales,persona_sistema\r\n\t\t\t\t\t\t\t\t\t\tWHERE profesionales.id_persona = persona_sistema.id_persona\");\r\n\r\n\tif(!$profesionales){\r\n\t\t$error=[\r\n\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t'funcion'\t\t=>\"mostrarFormulario\",\r\n\t\t\t'descripcion'\t=>\"No hay ningun profesional que pueda realizar la atención\"\r\n\t\t\t];\r\n\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\treturn;\r\n\t}\r\n\t\r\n\r\n\techo $GLOBALS['twig']->render('/Atenciones/nueva_atencion_formulario.html', compact('persona','historia','profesionales','use','priv'));\r\n}",
"function mostrarFormulario(){\n \n echo \"<br><br>\";\n echo \"<h2>FORMULARIO PARA PROFESORES</h2>\";\n?>\n\n <form method=\"post\" action=\"<?php echo htmlspecialchars($_SERVER[\"PHP_SELF\"]);?>\">\n noEmpleado: <input type=\"text\" name=\"noEmpleado\" value=\"<?php echo $this->noEmpleado;?>\">\n <br><br>\n Carrera: <input type=\"text\" name=\"carrera\" value=\"<?php echo $this->carrera;?>\">\n <br><br>\n Nombre: <input type=\"text\" name=\"nombre\" value=\"<?php echo $this->nombre;?>\">\n <br><br>\n <span class=\"error\">* <?php echo $this->nombreErr;?></span>\n <br><br>\n Telefono: <input type=\"tel\" name=\"telefono\"value=\"<?php echo $this->telefono;?>\">\n <br><br>\n <input type=\"submit\" name=\"submit\" value=\"Submit\">\n </form>\n\n<?php\n }",
"public function gerenciar(){\n\t\t\n\t\tset_tema('footerinc', load_js(array('data-table', 'table')), FALSE);\n\t\tset_tema('titulo', 'Registros de comentários');\n\t\tset_tema('conteudo', load_modulo('Comentarios', 'gerenciar'));\n\t\tload_template();\n\t}",
"function __construct($datos_formulario = NULL){\r\n?>\r\n\r\n<div class=\"inner-heading\">\r\n\t <div class=\"container\">\r\n\t <div class=\"row\">\r\n\t <div class=\"span12\">\r\n\t <h1 class=\"animated fadeInDown delay1\">Agregar <span>Grupo</span></h1> <!--El span sirve para colocar una palabra a resaltar en negritas--> \r\n\t <p class=\"animated fadeInDown delay2\"></p>\r\n\t </div>\r\n\t </div>\r\n\t </div>\r\n</div>\r\n<form id=\"form_grupo\" action=\"#\">\r\n\t<input type=\"hidden\" name=\"opc\" value=\"2\"/> <!-- La opcion del controlador a la que se va a llamar -->\r\n\t <input type=\"hidden\" name=\"gr_estado_aprobacion\" value=\"f\" /> \r\n\t\t<fieldset>\r\n\t\r\n\t<table>\r\n <th>Datos del Grupo</th>\r\n\t\t<tr>\r\n\t\t\t<td>Clave del grupo<span>*</span></td>\r\n\t\t\t<td><input type=\"text\" name=\"gr_nombre\" id=\"gr_nombre\" class=\"required\"></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td>Taller<span>*</span></td>\r\n\t\t\t<td><select name='ta_id' id=\"ta_id\" class=\"required\">\r\n\t\t\t\t<?php \r\n\t\t\t\t\t\tforeach($datos_formulario[\"taller\"] as $id_taller=>$valor){\r\n\t\t\t\t\t\t\techo \"<option value='$id_taller'>\".$valor.\"</option>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t?>\r\n\t\t\t</select></td>\r\n\t\t\t<td>Aulas</td>\r\n\t\t\t<td><select name='au_id' id=\"au_id\">\r\n\t\t\t\t<?php \r\n\t\t\t\t\t\tforeach($datos_formulario['aula'] as $id_aula => $valor){\r\n\t\t\t\t\t\t\techo \"<option value='$id_aula'>$valor</option>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t?>\r\n\t\t\t</select></td>\r\n\t\t\t</tr>\r\n\t\t\t<tr>\r\n\t\t\t<td>Docente<span>*</span></td>\r\n\t\t\t<td><select name='pr_id' id=\"pr_id\" class=\"required\">\r\n\t\t\t\t<?php \r\n\t\t\t\t\t\tforeach($datos_formulario['profesor'] as $id_profesor => $valor){\r\n\t\t\t\t\t\t\techo \"<option value='$id_profesor'>$valor</option>\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t?>\r\n\t\t\t</select></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t<td align=\"center\" >Fecha inicio</td>\r\n <td><input type=\"text\" id=\"gr_fecha_inicio\" name=\"gr_fecha_inicio\" class=\"required cal\" value=\"\" /></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t<td align=\"center\" >Fecha fin</td>\r\n <td><input type=\"text\" id=\"gr_fecha_fin\" name=\"gr_fecha_fin\" class=\"required cal\" value=\"\" /></td>\r\n\t\t</tr>\r\n\t\t\t</table>\r\n\t\t<table class=\"tab_form\">\r\n\t\t<tr> </tr>\r\n\t\t<tr><td>Los campos marcados con (<span>*</span>) son obligatorios</td></tr>\r\n\t\t<tr>\r\n\t\t<td>\r\n\t\t\t\t\t<input type=\"button\" value=\"Agregar\" id=\"btn_enviarForm\"/>\r\n\t\t\t\t</td>\r\n\t\t</tr>\r\n\t</table>\r\n\r\n\t</fieldset>\r\n</form>\r\n<div id=\"mensajes\"></div>\r\n\r\n<script type=\"text/javascript\" src=\"./webroot/js/function_calendario.js\">\r\n</script>\r\n\r\n<script>\r\n\r\n//validar campos que no este vacios\r\nfunction validar(formulario_id){\r\n\t$('label.error').remove();\r\n\tvar valido = true;\r\n\t$('#'+formulario_id+' .required').each(function(index,element){\t\r\n\t\tif( $(this).val() == null || $(this).val() == \"\"){\r\n\t\t\tvalido = false;\r\n\t\t\t$(this).after(\"<label class='error'>Campo Obligatorio*</label>\");\r\n\t\t}\r\n\t});\r\n\treturn valido;\r\n\t\r\n}\r\n\r\n$(document).ready(function(){\r\n\t/*Pantalla para mostrar mensajes a la hora de agregar**/\r\n\t$('#mensajes').dialog({\r\n\t\tautoOpen: false,\r\n\t\tmodal: true});\r\n\t//funcion evento onclick de agregar grupo\r\n\t$('#btn_enviarForm').click(function(){\r\n\t\tif(validar('form_grupo') == true){\r\n\t\t\t/*Serialize toma todos los datos del formulario**/\r\n\t\t\t$.get('controllers/gestionarGrupo/CtlGrupo.php',$('#form_grupo').serialize(),function(data){\r\n\t\t\t\t/**Data es el string que nos manda de respuesta el metodo**/\r\n\t\t\t\t\t$('#mensajes').append(data);\r\n\t\t\t\t\t$('#mensajes').dialog(\"open\");\r\n\t\t\t\t});//fin get\r\n\t\t}\r\n\t});\r\n\r\n}); \r\n</script>\r\n\r\n<?php \r\n\t}",
"function consultaFacultades() {\r\n include_once($this->configuracion[\"raiz_documento\"].$this->configuracion[\"clases\"].\"/html.class.php\");\r\n $this->html = new html();\r\n $facultades=$this->consultarFacultades();\r\n \r\n foreach ($facultades as $key=>$facultad) {\r\n $registro[$key][0]=$facultad['COD_FACULTAD'];\r\n $registro[$key][1]=$facultad['NOMBRE_FACULTAD'];\r\n }?>\r\n\t\t<form enctype='multipart/form-data' method='POST' action='index.php' name='<? echo $this->formulario?>'>\r\n <table width=\"100%\" align=\"center\" border=\"1\" cellpadding=\"10\" cellspacing=\"0\" >\r\n <tr>\r\n <td>Seleccione la Facultad: \r\n <?$mi_cuadro=$this->html->cuadro_lista($registro,'facultad',$this->configuracion,-1,\"\",FALSE,\"\",\"facultad\");\r\n echo $mi_cuadro;?>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td align=\"center\">\r\n <input type=\"hidden\" name=\"opcion\" value=\"consultaProyectos\">\r\n <input type=\"hidden\" name=\"action\" value=\"<? echo $this->bloque ?>\">\r\n <input class=\"boton\" type=\"button\" value=\"Continuar\" onclick=\"document.forms['<? echo $this->formulario?>'].submit()\">\r\n </td>\r\n </tr>\r\n </table>\r\n\t\t</form>\t\r\n <?\r\n \r\n \r\n }",
"function accion__grabar_periodo_evaluacion()\n {\n $anio_academico_hash = $this->validate_param('anio_academico_hash', 'post', validador::TIPO_TEXTO);\n $periodo_hash = $this->validate_param('periodo_hash', 'post', validador::TIPO_TEXTO);\n\n if (kernel::request()->isPost()) \n {\n try \n {\n $parametros = array();\n $parametros['anio_academico'] = $this->decodificar_anio_academico($anio_academico_hash);\n $parametros['periodo'] = $this->decodificar_periodo($periodo_hash, $parametros['anio_academico']);\n \n $periodos = $this->get_periodos_evaluacion($anio_academico_hash, $periodo_hash);\n\n foreach ($periodos as $periodo)\n {\n $parametros['orden'] = $periodo['ORDEN'];\n $daterange = 'daterange_'.$periodo['ORDEN'];\n $intervalo = $this->validate_param(\"$daterange\", 'post', validador::TIPO_TEXTO);\n $intervalo = explode('-', $intervalo);\n $parametros['fecha_inicio'] = $intervalo[0];\n\t\t\t\t\t$parametros['fecha_fin'] = $intervalo[1];\n if ($parametros['fecha_inicio'] != '' && $parametros['fecha_fin'] != '')\n {\n\t\t\t\t\t\t//Periodo de examen con suspension de clases (orden = 4)\n\t\t\t\t\t\tif ($parametros['orden'] == 4)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//hay que validar los dias de clase del periodo guardado con anteriordad\n\t\t\t\t\t\t\t$periodo_old = catalogo::consultar('evaluaciones_parciales', 'get_periodo', $parametros);\n\t\t\t\t\t\t\tif (isset($periodo_old['FECHA_INICIO']) && isset($periodo_old['FECHA_FIN']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$param['fecha_inicio'] = $periodo_old['FECHA_INICIO'];\n\t\t\t\t\t\t\t\t$param['fecha_fin'] = $periodo_old['FECHA_FIN'];\n $param['valido'] = 'S';\n kernel::log()->add_debug('set_validez_clases: ', $param);\n\t\t\t\t\t\t\t\tcatalogo::consultar('evaluaciones_parciales', 'set_validez_clases', $param);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//hay que ivalidar los dias de clase para que no compute la asitencia\n\t\t\t\t\t\t\t$parametros['valido'] = 'N';\n\t\t\t\t\t\t\tcatalogo::consultar('evaluaciones_parciales', 'set_validez_clases', $parametros);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcatalogo::consultar('evaluaciones_parciales', 'set_periodos_evaluacion', $parametros);\n }\n }\n \n $this->grabar_periodo_solicitud_fechas($parametros['anio_academico'], $parametros['periodo']);\n $this->grabar_fecha_ctr_correlat($parametros['anio_academico'], $parametros['periodo']);\n $mensaje = 'Se actualizaron correctamente los períodos de evaluación correspondientes al '.$parametros['periodo'].' del año '.$parametros['anio_academico'].'.';\n $this->set_anio_academico($anio_academico_hash);\n $this->set_periodo($periodo_hash);\n $this->set_mensaje($mensaje);\n }\n catch (\\Exception $e) \n {\n $mensaje = 'Error en la actualización.';\n $this->set_anio_academico($anio_academico_hash);\n $this->set_periodo($periodo_hash);\n $this->set_mensaje($e->getMessage().' - '.$mensaje);\n }\n }\n }",
"public function create()\n {\n //\n return view('calificaciones.create');\n }",
"public function consultar_inasistencia()\n\t{\n\t\t$this->seguridad_lib->acceso_metodo(__METHOD__);\n\n\t\t$datos['titulo_contenedor'] = 'Reportes';\n\t\t$datos['titulo_descripcion'] = 'Consultar inasistencia';\n\t\t$datos['contenido'] = 'reportes/consulta_inasistencia_form';\n\n\t\t$datos['form_action'] = 'Reportes/registros_inasistencia';\n\n\t\t$datos['e_footer'][] = array('nombre' => 'DatePicker JS','path' => base_url('assets/datepicker/dist/js/bootstrap-datepicker.js'), 'ext' =>'js');\n\t\t$datos['e_footer'][] = array('nombre' => 'DatePicker Languaje JS','path' => base_url('assets/datepicker/dist/locales/bootstrap-datepicker.es.min.js'), 'ext' =>'js');\n\t\t$datos['e_header'][] = array('nombre' => 'DatePicker CSS','path' => base_url('assets/datepicker/dist/css/bootstrap-datepicker3.min.css'), 'ext' =>'css');\n\n\t\t$datos['e_footer'][] = array('nombre' => 'jQuery Validate','path' => base_url('assets/jqueryvalidate/dist/jquery.validate.js'), 'ext' =>'js');\n\t\t$datos['e_footer'][] = array('nombre' => 'jQuery Validate Language ES','path' => base_url('assets/jqueryvalidate/dist/localization/messages_es.js'), 'ext' =>'js');\n\n\t\t$datos['e_footer'][] = array('nombre' => 'Config Form JS','path' => base_url('assets/js/reportes/v_consultar_inasistencia_form.js'), 'ext' =>'js');\n\n\t\t$this->template_lib->render($datos);\n\t}",
"function loadClienteForm(){\n\t\t$this->procedimiento='rec.ft_cliente_ime';\n\t\t$this->transaccion='REC_CLI_GET';//'\n\t\t$this->tipo_procedimiento='IME';//tipo de transaccion\n\n\t\t$this->setParametro('id_cliente','id_cliente','int4');\n\n\t\t$this->captura('v_valor','varchar');\n\t\t$this->captura('genero','varchar');\n\t\t$this->captura('ci','varchar');\n\t\t$this->captura('email','varchar');\n\t\t$this->captura('email2','varchar');\n\t\t$this->captura('direccion','varchar');\n\t\t$this->captura('celular','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('lugar_expedicion','varchar');\n\t\t$this->captura('apellido_paterno','varchar');\n\t\t$this->captura('telefono','varchar');\n\t\t$this->captura('ciudad_residencia','varchar');\n\t\t$this->captura('id_pais_residencia','int4');\n\t\t$this->captura('nacionalidad','varchar');\n\t\t$this->captura('barrio_zona','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('apellido_materno','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('nombre_completo1','text');\n\t\t$this->captura('nombre_completo2','text');\n\t\t$this->captura('pais_residencia','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t/*$this->captura('v_id_cliente','int4');\n\t\t$this->captura('v_genero','varchar');\n\t\t$this->captura('v_ci','varchar');\n\t\t$this->captura('v_email','varchar');\n\t\t$this->captura('v_direccion','varchar');\n\t\t$this->captura('v_celular','varchar');\n\t\t$this->captura('v_nombre','varchar');\n\t\t$this->captura('v_lugar_expedicion','varchar');\n\t\t$this->captura('v_apellido_paterno','varchar');\n\t\t$this->captura('v_telefono','varchar');\n\t\t$this->captura('v_ciudad_residencia','varchar');\n\t\t$this->captura('v_id_pais_residencia','int4');\n\t\t$this->captura('v_nacionalidad','varchar');\n\t\t$this->captura('v_barrio_zona','varchar');\n\t\t//$this->captura('estado_reg','varchar');\n\t\t$this->captura('v_apellido_materno','varchar');\n\t\t//$this->captura('id_usuario_ai','int4');\n\t\t//$this->captura('fecha_reg','timestamp');\n\t\t//$this->captura('usuario_ai','varchar');\n\t\t//$this->captura('id_usuario_reg','int4');\n\t\t//$this->captura('fecha_mod','timestamp');\n\t\t//$this->captura('id_usuario_mod','int4');\n\t\t//$this->captura('usr_reg','varchar');\n\t\t//$this->captura('usr_mod','varchar');\n\n\t\t$this->captura('v_completo','text');\n\t\t$this->captura('v_nombre_completo2','text');\n\t\t$this->captura('v_pais_residencia','varchar');*/\n\t\t//$this->captura('nombre','varchar');\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public function derivartemporalAction()\n {\n $form = $this->_form->getFrmDeriva();\n $form->setAction($this->view->baseUrlController . '/derivartemporal/');\n\n if ($this->_request->isPost()) { /* Si se ha submiteado el formulario, se procede a guardar los datos */\n \n /* Desactivo el auto renderizado */\n $this->disableAutoRender();\n\n /* Recibo datos del formulario */\n $formData = $this->_request->getPost(); \n\n /* Lleno el formulario con los datos recibidos por _POST */\n $form->populate($formData);\n\n $dependenciadestino_id = $form->dependenciadestino_id->getValue();\n $destinoArray = explode(\"-\", $dependenciadestino_id);\n $tipoDestino = $destinoArray[0];\n $destino_id = $destinoArray[1];\n \n if($tipoDestino == 'ofi') { /* Si se está derivando a una oficina */\n \n /* Verifico el valor del usuario destino */\n $usuariodestino_id = $formData['usuariodestino_id']; /* Como es un elemento que se a agregado con ajax y no se encuentra en el formulario, entonces debo obtener el dato directamente del $formdata */\n if($usuariodestino_id == ''){\n $usuariodestino_id = null;\n }\n\n /* Creo mi array */\n $data = array('usuario_id' => $this->_usuario->id,\n 'acciones' => $form->acciones->getValue(),\n 'dependenciadestino_id' => $destino_id,\n 'usuariodestino_id' => $usuariodestino_id);\n\n $movimiento = new Gidoc_Model_DerivotemporalMapper();\n try {\n $movimiento->save($data);\n } catch(Exception $ex) {\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n\n } else { /* Se está derivando a un grupo */ \n\n try {\n\n $this->_modelo->grabaDerivacionesDeGrupo($destino_id, $this->_usuario->id, $form->acciones->getValue());\n\n } catch(Exception $ex) {\n\n $message = $ex->getMessage();\n echo 'error|'.$message;\n }\n \n }\n \n } else { /* Se llama al formulario */\n \n $this->view->form = $form;\n $this->_helper->layout->disableLayout();\n $this->render('derivar');\n\n }\n }",
"public function get_form($metodo,$usuario,$form,$data=0,$ciclo=1,$codSubM=null,$cMet=\"\"){\n #traemos el formulario\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT fbArmaFormulario($form,$usuario,$data,$ciclo,$codSubM,$this->_modulo,'\".$cMet.\"') as formulario; \";\n $this->get_results_from_query();\n if(count($this->rows) >= 1){\n foreach ($this->rows as $pro=>$va) {\t\t\t\t\n $this->_formulario[] = $va;\n if($this->_formulario[0]['formulario'] == ''){\t\t\t\t\n $mensjFrm = getMenssage('danger','Ocurrio un error','No tiene permisos para acceder a esta opcion. ');\n $this->_formulario[0] = array('formulario'=>$mensjFrm);\n }\n }\n }\t\n #traemos el formulario modal\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT fbArmaFormularioModal($form,$usuario) as modal; \";\n $this->get_results_from_query();\n if(count($this->rows) >= 1){\n foreach ($this->rows as $pro=>$va) { \n $this->_formulario_modal[] = $va;\n if($this->_formulario_modal[0]['modal'] == ''){ \n $mensjFrm = '';\n $this->_formulario_modal[0] = array('modal'=>$mensjFrm);\n }\n }\n } \n #traemos la ayuda del form\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT fbArmaAyudaFormulario($form,$usuario,1) as formulario_ayuda\";\n $this->get_results_from_query();\n if (count($this->rows) >= 1) {\n foreach ($this->rows as $pro => $va) {\n $this->_formulario_ayuda[] = $va;\n if ($this->_formulario_ayuda[0]['formulario_ayuda'] == '') {\n $mensjFrm = getMenssage('info', 'Ocurrio un error', 'No hay ayuda registrada para este proceso,consulte al administrador del sistema. ');\n $this->_formulario_ayuda[0] = array('formulario_ayuda' => $mensjFrm);\n }\n }\n }\n #Traemos los botones por formulario y usuario\n ModeloFacturacion::get_boton($metodo,$usuario,$form,$cMet);\n }",
"function geraClasseDadosFormulario(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modelo1 = Util::getConteudoTemplate('class.Modelo.DadosFormulario.tpl');\n $modelo2 = Util::getConteudoTemplate('metodoDadosFormularioCadastro.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $nomeClasse = ucfirst($this->getCamelMode($aTabela['NOME']));\n\n $copiaModelo1 = $modelo1;\n $copiaModelo2 = $modelo2;\n\n # varre a estrutura dos campos da tabela em questao\n $camposForm = $aModeloFinal = array();\n foreach($aTabela as $oCampo){\n # recupera campo e tabela e campos (chave estrangeira)\n $nomeCampoOriginal = (string)$oCampo->NOME;\n $nomeCampo \t = $nomeCampoOriginal;\n //$nomeCampo \t = $nomeCampoOriginal;\n\n # monta parametros a serem substituidos posteriormente\n switch ((string)$oCampo->TIPO) {\n case 'date':\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = Util::formataDataFormBanco(strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"]))));\";\n break;\n\n case 'datetime':\n case 'timestamp':\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = Util::formataDataHoraFormBanco(strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"]))));\";\n break;\n\n default:\n if((int)$oCampo->CHAVE == 1)\n if((string)$aTabela['TIPO_TABELA'] != 'NORMAL')\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"])));\";\n else\n $camposForm[] = \"if(\\$acao == 2){\\n\\t\\t\\t\\$post[\\\"$nomeCampoOriginal\\\"] = strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"])));\\n\\t\\t}\";\n else\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"])));\";\n break;\n }\n }\n # monta demais valores a serem substituidos\n $camposForm = join($camposForm,\"\\n\\t\\t\");\n\n # substitui todas os parametros pelas variaveis ja processadas\n $copiaModelo2 = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo2);\n $copiaModelo2 = str_replace('%%ATRIBUICAO%%', $camposForm, $copiaModelo2);\n\n $aModeloFinal[] = $copiaModelo2;\n }\n\n $modeloFinal = str_replace('%%FUNCOES%%', join(\"\\n\\n\", $aModeloFinal), $copiaModelo1);\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\n if(!file_exists($dir)) \n mkdir($dir);\n\n $fp = fopen(\"$dir/class.DadosFormulario.php\",\"w\");\n fputs($fp, $modeloFinal);\n fclose($fp);\n return true;\t\n }",
"function Contenido(){\n \n $sql = 'SELECT id_planta codigo, descripcion from plantas WHERE activo = 1';\n $arrPlantas = $this->Consulta($sql);\n \n $html= '<section class=\"main-content-wrapper\">\n <div class=\"pageheader\">\n <h1>'.$this->_titulo.'</h1>\n <p class=\"description\">'.$this->_subTitulo.'</p>\n <div class=\"breadcrumb-wrapper hidden-xs\">\n <span class=\"label\">Estas Aquí:</span>\n <ol class=\"breadcrumb\">\n <li class=\"active\">Administrar Componentes</li>\n </ol>\n </div>\n </div>\n \n <div class=\"col-md-8\">\n <div class=\"panel panel-default panelCrear\">\n <div class=\"panel-heading\">\n <h3 class=\"panel-title\">COMPONENTES</h3>\n <div class=\"actions pull-right\">\n <i class=\"fa fa-expand\"></i>\n <i class=\"fa fa-chevron-down\"></i>\n <i class=\"fa fa-times\"></i>\n </div>\n </div>\n <div class=\"panel-body\">\n <form id=\"formCrear\" role=\"form\">\n <div class=\"form-group\">\n <label for=\"nombre\">Nombre Componente:</label>\n '.\n \n $this->create_input('text','descripcion','descripcion','Nombre del componente',false,'form-control required').\n $this->create_input('hidden',$this->PrimaryKey,$this->PrimaryKey,false,'0').\n $this->create_input('hidden','id_usuario','id_usuario',false,$_SESSION['id_usuario']).\n '\n \n </div>\n \n <div class=\"form-group\">\n <label for=\"id_cursos\">Planta:</label>\n '.$this->crearSelect('id_planta','id_planta',$arrPlantas,false,false,false,'class=\"form-control required\" onchange=\"traerCombo(this.value,\\'combo_id_secciones\\',\\'comboSeccion\\')\"').'\n \n \n </div>\n \n <div class=\"form-group\">\n <label for=\"id_cursos\">Seccion:</label>\n <span id=\"combo_id_secciones\"> -- </span>\n \n </div> \n \n \n <div class=\"form-group\">\n <label for=\"id_cursos\">Equipos:</label>\n <span id=\"combo_id_equipos\"> -- </span>\n </div>\n \n <div class=\"form-group\">\n <label for=\"id_cursos\">Codigo Empresa:</label>\n '.$this->create_input('text','codigo_empresa','codigo_empresa','Codigo de la empresa',false,'form-control required').'\n \n </div> \n \n <div class=\"form-group\">\n <label for=\"id_cursos\">Consecutivo:</label>\n '.$this->create_input('text','consecutivo','consecutivo','escriba consecutivo',false,'form-control required').'\n \n </div>\n \n <div class=\"form-group\">\n <label for=\"id_cursos\">Fabricante:</label>\n '.$this->create_input('text','id_fabricante','id_fabricante','cod fabricante',false,'form-control required').'\n \n </div>\n \n <div class=\"form-group\">\n <label for=\"id_cursos\">Temperatura Maxima:</label>\n '.$this->create_input('text','tempmaxima','tempmaxima','Temperatura Maxima ',false,'form-control required').'\n \n </div>'; \n if(\t$_SESSION[\"tipo_usuario\"]<>3){\n $html.='<button type=\"button\" id=\"guardarCurso\" class=\"btn btn-primary\">Guardar Componente</button>';\n }\n $html.='<div id=\"Resultado\" style=\"display:none\">RESULTADO</div>\n </form>\n </div>\n </div>\n </div> '.$this->tablaDatos().'\n \n </div>\n </div>\n </div> \n\n </section> '; \n return $html;\n \n }",
"public function addform() {\n require_once 'modeles/etudiant_modele.php';\n require_once 'vues/etudiants/etudiants_addform_vue.php';\n }",
"public static function componenteFecha( $nombre, $id, $defecto = \"0000-00-00\", $estiloClase = \"\", $conNom = false ){\n\t\tif( $defecto == \"0000-00-00\" ){\n\t\t\t$defecto = date(\"Y-m-d\");\n\t\t}\n\t\t\n\t\t$actual = strtotime($defecto);\n\t\t$newformat = date('Y-m-d',$actual);\n\t\t$defecto = $newformat;\n\t\t$anyo = date('Y',$actual);\n\t\t$mes = date('m',$actual) * 1;\n\t\t$dia = date('d',$actual) * 1;\n\t\t\n\t\t$ai = \"a_\" . $id;\n\t\t$mi = \"m_\" . $id;\n\t\t$di = \"d_\" . $id;\n\t\t\n\t\t$ani = ( $conNom ? \" name=\\\"a_\" . $nombre . \"\\\"\" : \"\");\n\t\t$mni = ( $conNom ? \" name=\\\"m_\" . $nombre . \"\\\"\" : \"\");\n\t\t$dni = ( $conNom ? \" name=\\\"d_\" . $nombre . \"\\\"\" : \"\");\n\t\t\n\t\t$jsCom = \"onkeyup=\\\"ut.ComponenteFecha('#\" . $id . \"', '#\" . $ai . \"', '#\" . $mi . \"', '#\" . $di . \"');\\\" \";\n\t\t$jsCom .= \"onchange=\\\"ut.ComponenteFecha('#\" . $id . \"', '#\" . $ai . \"', '#\" . $mi . \"', '#\" . $di . \"');\\\"\";\n\t\t\n\t\t$selAnyo = \"<select \" . $jsCom . $ani . \" id=\\\"\" . $ai . \"\\\" style=\\\"width: 55px;\\\" >\";\n\t\tfor ($i = ($anyo - 1); $i < date('Y', strtotime('+10 year')); $i++) {\n\t\t\t$sel = ($i == $anyo ? \"selected=\\\"selected\\\" \" : \"\");\n\t\t\t$selAnyo .= \"<option \" . $sel . \"value=\\\"\" . $i . \"\\\">\" . $i . \"</option>\";\n\t\t}\n\t\t$selAnyo .= \"</select>\";\n\t\t\n\t\t$selMes = \"<select \" . $jsCom . $mni . \" id=\\\"\" . $mi . \"\\\" style=\\\"width: 40px;\\\" >\";\n\t\tfor ($i = 1; $i <= 12; $i++) {\n\t\t\t$vlMes = (strlen( $i ) == 1 ? \"0\" . $i : $i );\n\t\t\t$sel = ($i == $mes ? \"selected=\\\"selected\\\" \" : \"\");\n\t\t\t$selMes .= \"<option \" . $sel . \"value=\\\"\" . $vlMes . \"\\\">\" . $vlMes . \"</option>\";\n\t\t}\n\t\t$selMes .= \"</select>\";\n\t\t\n\t\t$selDia = \"<select \" . $jsCom . $dni . \" id=\\\"\" . $di . \"\\\" style=\\\"width: 40px;\\\" >\";\n\t\tfor ($i = 1; $i <= 31; $i++) {\n\t\t\t$vlMes = (strlen( $i ) == 1 ? \"0\" . $i : $i );\n\t\t\t$sel = ($i == $dia ? \"selected=\\\"selected\\\" \" : \"\");\n\t\t\t$selDia .= \"<option \" . $sel . \"value=\\\"\" . $vlMes . \"\\\">\" . $vlMes . \"</option>\";\n\t\t}\n\t\t$selDia .= \"</select>\";\n\t\t\n\t\t\n\t\t$html = \"<table class=\\\"\" . $estiloClase . \"\\\" >\";\n\t\t$html .= \"\t<tbody>\";\n\t\t$html .= \"\t\t<tr>\";\n\t\t$html .= \"\t\t\t<th><label for=\\\"\" . $ai . \"\\\">Año</label></th>\";\n\t\t$html .= \"\t\t\t<th><label for=\\\"\" . $mi . \"\\\">Mes</label></th>\";\n\t\t$html .= \"\t\t\t<th><label for=\\\"\" . $di . \"\\\">Día</label></th>\";\n\t\t$html .= \"\t\t</tr>\";\n\t\t$html .= \"\t\t<tr>\";\n\t\t$html .= \"\t\t\t<td>\" . $selAnyo . \"</td>\";\n\t\t$html .= \"\t\t\t<td>\" . $selMes . \"</td>\";\n\t\t$html .= \"\t\t\t<td>\" . $selDia . \"</td>\";\n\t\t$html .= \"\t\t</tr>\";\n\t\t$html .= \"\t</tbody>\";\n\t\t$html .= \"</table>\";\n\t\t$html .= \"<input type=\\\"hidden\\\" name=\\\"\" . $nombre . \"\\\" id=\\\"\" . $id . \"\\\" value=\\\"\" . $defecto. \"\\\" />\";\n\t\treturn $html;\n\t}",
"function realizarHomologacionPendientes(){ \n $this->mostrarFormularioProyecto();\n }",
"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}",
"function cargar_formulario($datos_necesarios){\n if(isset($datos_necesarios['acta'])){\n $ar = array();\n \n $ar[0]['votos'] = $datos_necesarios['acta']['total_votos_blancos'];\n $ar[0]['id_nro_lista'] = -1;\n $ar[0]['nombre'] = \"VOTOS EN BLANCO\";\n \n $ar[1]['votos'] = $datos_necesarios['acta']['total_votos_nulos'];\n $ar[1]['id_nro_lista'] = -2;\n $ar[1]['nombre'] = \"VOTOS NULOS\";\n \n $ar[2]['votos'] = $datos_necesarios['acta']['total_votos_recurridos'];\n $ar[2]['id_nro_lista'] = -3;\n $ar[2]['nombre'] = \"VOTOS RECURRIDOS\";\n\n //obtener los votos cargados, asociados a este acta\n $votos = $this->dep('datos')->tabla($datos_necesarios['tabla_voto'])->get_listado_votos($datos_necesarios['acta']['id_acta']);\n \n if(sizeof($votos) > 0){//existen votos cargados\n $ar = array_merge($votos, $ar);\n \n }\n else{//no existen votos cargados\n $listas = $this->dep('datos')->tabla($datos_necesarios['tabla_listas'])->get_listas_a_votar($datos_necesarios['acta']['id_acta']);\n \n if(sizeof($listas)>0)//Existen listas\n $ar = array_merge($listas, $ar); \n \n }\n \n return $ar;\n }\n }",
"public function create(){\n \n $razas = Raza::get();\n include 'views/mascota/form_new.php';\n }",
"function mostrarDatosFacturaCliente($precioTotal,$cliente,$arrayPedidos){\r\n echo '<div id=\"parteIzquierdaTercera\">';\r\n echo '<h1>DATOS CLIENTE Y TOTAL FACTURA</h1>';\r\n $precioTotal = 0.0;\r\n //imprimimos cliente\r\n recorrerCliente($cliente);\r\n $precioTotal = calcularTotalPedidosClientes($arrayPedidos);\r\n //Enviamos la factura total por sesion\r\n $_SESSION['facturaTotal'] = $precioTotal;\r\n\r\n echo '<table>';\r\n echo '<tr><td class=\"precioTituloTotal\">TOTAL FACTURA</td><td class=\"precioTdTotal\">\r\n '.$precioTotal.'\r\n </td></tr>';\r\n echo '</table>';\r\n echo '<form name='.\"formularioCancelar\".' action='.\"CancelarConfirmar.php\".' method='.\"POST\".' >';\r\n echo '<table>';\r\n echo '<td><input type='.\"submit\".' value='.\"Cancelar pedido\".' name='.\"Cancelar\".' class='.\"centroBoton\".'></td>';\r\n echo '<td><input type='.\"submit\".' value='.\"Confirmar pedidos\".' name='.\"Confirmar\".' class='.\"centroBoton\".'></td>';\r\n echo '</table>';\r\n echo '</form>';\r\n echo '</div>';\r\n}",
"public function form()\n {\n $this->switch('auto_df_switch', __('message.tikuanconfig.auto_df_switch'));\n $this->timeRange('auto_df_stime', 'auto_df_etime', '开启时间');\n $this->text('auto_df_maxmoney', __('message.tikuanconfig.auto_df_maxmoney'))->setWidth(2);\n $this->text('auto_df_max_count', __('message.tikuanconfig.auto_df_max_count'))->setWidth(2);\n $this->text('auto_df_max_sum', __('message.tikuanconfig.auto_df_max_sum'))->setWidth(2);\n\n }",
"function clsRecordmc_c_mes_mc_calificacion1($RelativePath, & $Parent)\n {\n\n global $FileName;\n global $CCSLocales;\n global $DefaultDateFormat;\n $this->Visible = true;\n $this->Parent = & $Parent;\n $this->RelativePath = $RelativePath;\n $this->Errors = new clsErrors();\n $this->ErrorBlock = \"Record mc_c_mes_mc_calificacion1/Error\";\n $this->ReadAllowed = true;\n if($this->Visible)\n {\n $this->ComponentName = \"mc_c_mes_mc_calificacion1\";\n $this->Attributes = new clsAttributes($this->ComponentName . \":\");\n $CCSForm = explode(\":\", CCGetFromGet(\"ccsForm\", \"\"), 2);\n if(sizeof($CCSForm) == 1)\n $CCSForm[1] = \"\";\n list($FormName, $FormMethod) = $CCSForm;\n $this->FormEnctype = \"application/x-www-form-urlencoded\";\n $this->FormSubmitted = ($FormName == $this->ComponentName);\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\n $this->Button_DoSearch = new clsButton(\"Button_DoSearch\", $Method, $this);\n $this->s_numero = new clsControl(ccsTextBox, \"s_numero\", \"Numero\", ccsText, \"\", CCGetRequestParam(\"s_numero\", $Method, NULL), $this);\n $this->s_mc_calificacion_capc_mes = new clsControl(ccsListBox, \"s_mc_calificacion_capc_mes\", \"Mc Calificacion Capc Mes\", ccsInteger, \"\", CCGetRequestParam(\"s_mc_calificacion_capc_mes\", $Method, NULL), $this);\n $this->s_mc_calificacion_capc_mes->DSType = dsTable;\n $this->s_mc_calificacion_capc_mes->DataSource = new clsDBcnDisenio();\n $this->s_mc_calificacion_capc_mes->ds = & $this->s_mc_calificacion_capc_mes->DataSource;\n $this->s_mc_calificacion_capc_mes->DataSource->SQL = \"SELECT * \\n\" .\n\"FROM mc_c_mes {SQL_Where} {SQL_OrderBy}\";\n list($this->s_mc_calificacion_capc_mes->BoundColumn, $this->s_mc_calificacion_capc_mes->TextColumn, $this->s_mc_calificacion_capc_mes->DBFormat) = array(\"IdMes\", \"Mes\", \"\");\n $this->s_anio = new clsControl(ccsTextBox, \"s_anio\", \"Anio\", ccsInteger, \"\", CCGetRequestParam(\"s_anio\", $Method, NULL), $this);\n $this->s_SLO = new clsControl(ccsCheckBox, \"s_SLO\", \"SLO\", ccsInteger, \"\", CCGetRequestParam(\"s_SLO\", $Method, NULL), $this);\n $this->s_SLO->CheckedValue = $this->s_SLO->GetParsedValue(1);\n $this->s_SLO->UncheckedValue = $this->s_SLO->GetParsedValue(0);\n if(!$this->FormSubmitted) {\n if(!is_array($this->s_SLO->Value) && !strlen($this->s_SLO->Value) && $this->s_SLO->Value !== false)\n $this->s_SLO->SetValue(false);\n }\n }\n }",
"public function recargaCalendario(Request $request){\n\n\t\t$data=$this->carga_info($request, $request->nombre_obra, $request->mes, $request->year);\n \treturn json_encode($data);\n }",
"public function falla28_busqueda_fecha(){\n\t\t \n\t\t\t \n\t\t\t // Fecha que ingreso el usuario en formato DIA/MES/AÑO\n\t\t\t $fecha28 = date('Y-m-d',strtotime('-28 days', strtotime($_POST['fecha'])));\n\t\t\t \t$fecha33 = date('Y-m-d',strtotime('-33 days', strtotime($_POST['fecha'])));\n\t\t \n\t\t\t //Abre el mixer\n\t\t\t\t$datos_mixer = Mixer::where('Fecha_de_Carga','<=' ,$fecha28)\n\t\t\t\t\t\t\t ->where('Fecha_de_Carga','>=' ,$fecha33)\n\t\t\t\t\t\t\t ->groupBy('Numero_Carga')\t\n\t\t\t\t ->get();\n\t\t\t\t\n\t\t\t\t//Abre fallas con otro nombre . para comparar unicamente \n\t\t\t\t$datos_falla = Falla28::where('Fecha_Moldeo','<=',$fecha28)\n\t\t ->where('Fecha_Moldeo','>=' ,$fecha33)\n\t\t ->groupBy('Numero_Carga')\t\n\t\t\t\t ->get();\n\t\t \n\t\t \t\n\t\t\t\treturn view('falla28' , array(\n\t\t\t\t\t'mixer' => $datos_mixer ,\n\t\t\t\t\t'fecha_busqueda' => $_POST['fecha'] ,\n\t\t\t\t\t'comparaensayo' => $datos_falla \n\t\t\t\t\t//'res_nominal' => $res_nominal\n\n\t\t\t\t\t ));\n\n\t\t \n\t\t\t }",
"public function action_list_form_payment(){\n $param = \\Input::param();\n $cids = [];\n if(isset($param['p'])){\n parse_str(base64_decode($param['p']), $params);\n $petition_id = isset($params['petition_id'])?$params['petition_id']:null;\n $cids = explode(',', $petition_id);\n }\n\n $objPHPExcel = new \\PHPExcel();\n $objPHPExcel->getProperties()->setCreator('Vision')\n ->setLastModifiedBy('Vision')\n ->setTitle('Office 2007 Document')\n ->setSubject('Office 2007 Document')\n ->setDescription('Document has been generated by PHP')\n ->setKeywords('Office 2007 openxml php')\n ->setCategory('Form Payment File');\n $header = ['No','申請日','申請番号','内容','件名','金額','領収書','申請者','状況','確認日','修正後金額','最新処理者','振込日'];\n\n $query = \\DB::select('id','name')\n ->from('m_petition_status');\n $m_petition_status = $query->execute()->as_array('id','name');\n\n foreach($header as $i=>$v){\n $column = \\PHPExcel_Cell::stringFromColumnIndex($i);\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue($column.'1',$v);\n $objPHPExcel->getActiveSheet()->getStyle($column.'1')->applyFromArray($this->formatTitleHeader);\n switch($i+1){\n case 1:\n $width = 8;\n break;\n case 3:\n case 4:\n case 8:\n case 12:\n $width = 25;\n break;\n case 5:\n $width = 80;\n break;\n case 6:\n $width = 15;\n break;\n case 7:\n $width = 12;\n break;\n default:\n $width = 20;\n break;\n }\n $objPHPExcel->getActiveSheet()->getColumnDimension($column)->setWidth($width);\n }\n\n $i = $row = 0;\n foreach ($cids as $cid) {\n //======================== Begin Get Form From Other API ===============================\n $api_res = json_decode($this->rest->request('trequest/detail/' . $cid, 'get'));\n if($api_res->status == 'success'){\n $payment = $api_res->data;\n if(empty($payment)) continue;\n $mark = $payment->currency_symbol;\n $row = $i+2;\n\n $last_approval_user = null;\n foreach($payment->routes as $route){\n if($route->m_user_id == $payment->last_approve_user_id){\n $last_approval_user = $route->fullname;\n break;\n }\n }\n\n $objPHPExcel->setActiveSheetIndex()->setCellValue('A'.$row,$i+1)\n ->setCellValue('B'.$row,\\Vision_Common::system_format_date(strtotime($payment->date)))\n ->setCellValueExplicit('C'.$row,$payment->code,\\PHPExcel_Cell_DataType::TYPE_STRING)\n ->setCellValue('D'.$row,$payment->request_menu_name)\n ->setCellValue('E'.$row,$payment->name)\n ->setCellValue('F'.$row,$mark.number_format($payment->amount))\n ->setCellValue('G'.$row,$payment->receipt_flg?'要':'不要')\n ->setCellValue('H'.$row,$payment->user_create_form->fullname)\n ->setCellValue('I'.$row,$m_petition_status[$payment->m_petition_status_id])\n ->setCellValue('J'.$row,$payment->account_conf_date?\\Vision_Common::system_format_date(strtotime($payment->account_conf_date)):null)\n ->setCellValue('K'.$row,$mark.number_format($payment->cor_settlement_amount))\n ->setCellValue('L'.$row,$last_approval_user)\n ->setCellValue('M'.$row,$payment->transfer_date?\\Vision_Common::system_format_date(strtotime($payment->transfer_date)):null);\n $i++;\n }\n }\n\n $format = ['alignment'=>array('horizontal'=> \\PHPExcel_Style_Alignment::HORIZONTAL_CENTER,'wrap'=>true)];\n $objPHPExcel->getActiveSheet()->getStyle('A2:A'.$row)->applyFromArray($format);\n $objPHPExcel->getActiveSheet()->getStyle('B2:B'.$row)->applyFromArray($format);\n $objPHPExcel->getActiveSheet()->getStyle('G2:G'.$row)->applyFromArray($format);\n //set color title\n $objPHPExcel->getActiveSheet()->getStyle('A1:M1')->getFill()->setFillType(\\PHPExcel_Style_Fill::FILL_SOLID);\n $objPHPExcel->getActiveSheet()->getStyle('A1:M1')->getFill()->getStartColor()->setRGB('25a9cb');\n\n header(\"Last-Modified: \". gmdate(\"D, d M Y H:i:s\") .\" GMT\");\n header(\"Cache-Control: max-age=0\");\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"list-payment-'.date('Y-m-d').'.xls\"');\n $objWriter = \\PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n $objWriter->save('php://output');\n exit;\n }",
"function ToonFormulierAfspraak()\n{\n\n}",
"function render(){\n\n include '../Views/Header.php';\n\n?>\n\n<script type=\"text/javascript\"> \n <?php include '../Views/js/validacionesACCION.js' ?>\n</script>\n <section class=\"pagina\">\n\n <fieldset class=\"search\">\n <legend style=\"margin-left: 30%\"><?php echo $strings['Búsqueda de acciones']?></legend>\n\n \n <form method=\"post\" name=\"SEARCH\" action=\"../Controllers/ACCION_Controller.php\" enctype=\"multipart/form-data\" >\n \n \n <div id=\"izquierda\">\n <label for=\"IdAccion\"><?php echo $strings['Id de la accion']?>: </label>\n <input type=\"text\" name=\"IdAccion\" maxlength=\"6\" size=\"6\" onblur=\"javascript:void(validarIdAccionBuscar(this, 6))\" ><div id=\"IdAccion\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_Alfanumerico']?></div> <div id=\"IdAccionVacio\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_vacio']?></div> \n\n </div>\n\n <div id=\"izquierda\">\n <label for=\"NombreAccion\"><?php echo $strings['Nombre de la accion']?>: </label>\n <input type=\"text\" name=\"NombreAccion\" maxlength=\"60\" size=\"60\" onblur=\"javascript:void(validarNombreAccionBuscar(this, 60))\" ><div id=\"NombreAccion\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_Alfanumerico']?></div> <div id=\"NombreAccionVacio\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_vacio']?></div> \n </div>\n\n <div id=\"izquierda\">\n <label for=\"DescripAccion\"><?php echo $strings['Descripcion de la accion']?>: </label>\n <textarea name=\"DescripAccion\" maxlength=\"100\" rows=\"2\" cols=\"50\" onblur=\"javascript:void(validarDescripAccionBuscar(this, 100))\" style=\"margin-left: 10px; border-radius: 20px; border-top-left-radius: 0px; border-width: 2px; border-color: darkblue;\" ></textarea><div id=\"DescripAccion\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_Alfanumerico']?></div><div id=\"DescripAccionVacio\" class=\"oculto\" style=\"display:none\"><?php echo $strings['div_vacio']?></div> \n </div>\n \n <div class=\"acciones\" style=\"float: right; margin-left:0%; margin-right: 50%\">\n \n <a href=\"../Controllers/ACCION_Controller.php?action=SEARCH\"><input type=\"image\" name=\"action\" value=\"SEARCH\" action=\"#\" src=\"../Views/images/search.png\" title=\"<?php echo $strings['Buscar']?>\" onclick=\" return validar('SEARCH')\" ></a>\n </div>\n </form> \n <div class=\"acciones\" style=\"float: left;\">\n <a href=\"../Controllers/ACCION_Controller.php?action=ALL\"><input type=\"image\" src=\"../Views/images/back.png\" title=\"<?php echo $strings['Volver']?>\"></a>\n </div>\n </fieldset>\n\n </section>\n<?php\n\n include '../Views/Footer.php';\n\n\n }",
"function consultaProyectos() {\r\n if(!isset($_REQUEST['facultad'])||$_REQUEST['facultad']<0)\r\n {\r\n echo \"No se seleccionó facultad. Por favor regrese y seleccione una opción\";exit;\r\n }\r\n $facultad=$_REQUEST['facultad'];\r\n include_once($this->configuracion[\"raiz_documento\"].$this->configuracion[\"clases\"].\"/html.class.php\");\r\n $this->html = new html();\r\n $proyectos=$this->consultarProyectos($facultad);\r\n $registro[0][0]=10000+$facultad;\r\n $registro[0][1]=\"TODOS LOS PROYECTOS DE LA FACULTAD\";\r\n foreach ($proyectos as $key=>$proyecto) {\r\n $registro[$key+1][0]=$proyecto['COD_PROYECTO'];\r\n $registro[$key+1][1]=$proyecto['COD_PROYECTO'].\" - \".$proyecto['NOMBRE_PROYECTO'];\r\n }?>\r\n\t\t<form enctype='multipart/form-data' method='POST' action='index.php' name='<? echo $this->formulario?>'>\r\n <table width=\"100%\" align=\"center\" border=\"1\" cellpadding=\"10\" cellspacing=\"0\" >\r\n <tr>\r\n <td>Seleccione El Proyecto: \r\n <?$mi_cuadro=$this->html->cuadro_lista($registro,'codProyecto',$this->configuracion,-1,\"\",FALSE,\"\",\"codProyecto\");\r\n echo $mi_cuadro;?>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td align=\"center\">\r\n <input type=\"hidden\" name=\"opcion\" value=\"consultaEstudiantes\">\r\n <input type=\"hidden\" name=\"action\" value=\"<? echo $this->bloque ?>\">\r\n <input class=\"boton\" type=\"button\" value=\"Ejecutar Proceso\" onclick=\"document.forms['<? echo $this->formulario?>'].submit()\">\r\n </td>\r\n </tr>\r\n </table>\r\n\t\t</form>\t\r\n <?\r\n \r\n \r\n }",
"public function Consultar(){\n require_once 'view/include/cabecera_usuario.php';\n require_once 'view/mostrar_estadobien.php';\n require_once 'view/include/pie_mostrar.php';\n }",
"public function ajaxMostrarFichaControlPDF()\t{\n\n\t\t/*=============================================\n\t DATOS SECCION 1. DATOS DEL ESTABLECIMIENTO NOTIFICADOR\n\t =============================================*/\n\t\t\t\n\t\t$item = \"id_ficha\";\n\t\t$valor = $this->idFicha;\n\n\t\t$ficha = ControladorFichas::ctrMostrarDatosFicha($item, $valor);\n\n\t //TRAEMOS LOS DATOS DE DEPARTAMENTO\n\n\t $item = \"id\";\n\t $valor = $ficha[\"id_departamento\"];\n\t $departamento = ControladorDepartamentos::ctrMostrarDepartamentos($item, $valor);\n\n\t //TRAEMOS LOS DATOS DE ESTABLECIMIENTO\n\n\t $valor = $ficha[\"id_establecimiento\"];\n\t $establecimiento = ControladorEstablecimientos::ctrMostrarEstablecimientos($item, $valor);\n\n\t //TRAEMOS LOS CONSULTORIOS\n\n\t $valor = $ficha[\"id_consultorio\"];\n\t $consultorio = ControladorConsultorios::ctrMostrarConsultorios($item, $valor);\n\n\t //TRAEMOS LOS DATOS DE LOCALIDAD\n\n\t $valor = $ficha[\"id_localidad\"];\n\t\t$localidad = ControladorLocalidades::ctrMostrarLocalidades($item, $valor);\n \n\n\t /*=============================================\n\t DATOS SECCION 2. IDENTIFICACION DEL CASO/PACIENTE\n\t =============================================*/\n\n\t $item = \"id_ficha\";\n\t $valor = $this->idFicha;\n\n\t $pacienteAsegurado = ControladorPacientesAsegurados::ctrMostrarPacientesAsegurados($item, $valor);\n\t\t\t//TRAEMOS LOS DATOS DE DEPARTAMENTO\n\t $item = \"id\";\n\t $valor_depto = $pacienteAsegurado[\"id_departamento_paciente\"];\n\t $departamento_paciente = ControladorDepartamentos::ctrMostrarDepartamentos($item, $valor_depto);\t \n\n\t //TRAEMOS LOS DATOS DE PROVINCIA\n\n\t $valor_provincia = $pacienteAsegurado[\"id_provincia_paciente\"];\n\t $provincia_paciente = ControladorProvincia::ctrMostrarProvincia($item, $valor_provincia);\n\n\t\t//TRAEMOS LOS DATOS DE MUNICIPIO\n\n\t\t$valor_municipio = $pacienteAsegurado[\"id_municipio_paciente\"];\n\t\t$municipio_paciente = ControladorMunicipio::ctrMostrarMunicipio($item,$valor_municipio);\n\n\t //TRAEMOS LOS DATOS DE PAIS\n\n\t $valor_pais = $pacienteAsegurado[\"id_pais_paciente\"];\n\n\t $pais_procedencia = ControladorPaises::ctrMostrarPaises($item, $valor_pais);\n\n\t /*=============================================\n\t DATOS SECCION 5. DATOS EN CASO DE HOSPITALIZACIÓN Y/O AISLAMIENTO\n\t =============================================*/\n\n\t $item = \"id_ficha\";\n\t $valor = $this->idFicha;\n\n\t $hospitalizaciones_aislamientos = ControladorHospitalizacionesAislamientos::ctrMostrarHospitalizacionesAislamientos($item, $valor);\n\n\t /*=============================================\n\t DATOS SECCION 8. LABORATORIO\n\t =============================================*/\n\n\t $item = \"id_ficha\";\n\t $valor = $this->idFicha;\n\n\t $laboratorios = ControladorLaboratorios::ctrMostrarLaboratorios($item, $valor);\n\n\t // TRAEMOS LOS DATOS DE ESTABLECIMIENTO PARA LABORATORIO\n\n\t $item = \"id\";\n\t $valor = $laboratorios[\"id_establecimiento\"];\n\n\t $establecimiento_lab = ControladorEstablecimientos::ctrMostrarEstablecimientos($item, $valor);\n\n\t /*=============================================\n\t DATOS SECCION PERSONAL QUE NOTIFICA\n\t =============================================*/\n\n\t $item = \"id_ficha\";\n\t $valor = $this->idFicha;\n\n\t $persona_notificador = ControladorPersonasNotificadores::ctrMostrarPersonasNotificadores($item, $valor);\n\n\t\t// Extend the TCPDF class to create custom Header and Footer\n\n\t\t$pdf = new TCPDF('P', 'mm', 'letter', true, 'UTF-8', false);\n\n\t\t// set document information\n\t\t$pdf->SetCreator(PDF_CREATOR);\n\t\t$pdf->SetAuthor('CNS Cochabamba');\n\t\t$pdf->SetTitle('ficha-'.$valor);\n\t\t$pdf->SetSubject('Ficha Control y Seguimiento Covid-19 CNS');\n\t\t$pdf->SetKeywords('TCPDF, PDF, CNS, Reporte, Ficha Control Seguimiento,Covid-19');\n\n\t\t$pdf->setPrintHeader(false); \n\t\t$pdf->setPrintFooter(false);\n\n\t\t// set default monospaced font\n\t\t$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n\t\t// set margins\n\t\t$pdf->SetMargins(5, 5, 5, 0);\n\t\t$pdf->SetAutoPageBreak(true, 5); \n\t\t$pdf->SetHeaderMargin(5);\n\t\t$pdf->SetFooterMargin(5);\n\n\t\t// set image scale factor\n\t\t$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n\t\t// ---------------------------------------------------------\n\n\t\t// set font\n\t\t$pdf->SetFont('Helvetica', '', 8);\n\n\t\t$pdf->SetPrintFooter(false);\n\n\t\t// add a page\n\t\t$pdf->AddPage();\n\n\t\t$content = '';\n\n\t\t $content .= '\n\n\t\t <html lang=\"es\">\n\t\t\t\t<head>\n\n\t\t\t\t\t<style>\n\t\t\t\t\t\t\n\t\t\t\t\t\tbody {\n\t\t\t\t\t\t\tfont-size: 21px;\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.content div{\n\n\t\t\t\t\t\t\tline-height: 0px;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.bg-dark {\n\n\t\t\t\t\t\t\tbackground-color: #444;\n\t\t\t\t\t\t\tcolor: #fff;\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\tline-height: 0px;\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.bg-dark span {\n\n\t\t\t\t\t\t\tline-height: 7px;\n\t\t\t\t\t\t\tfont-weight: bold;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.font-weight-bold {\n\n\t\t\t\t\t\t\tfont-weight: bold;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.titulo {\n\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\tline-height: 3px;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.cod_ficha {\n\n\t\t\t\t\t\t\tmargin-top: 0px;\n\t\t\t\t\t\t\ttext-align: right;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttable {\n\n\t\t\t\t\t\t line-height: 6px;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.personas_contactos {\n\n\t\t\t\t\t\t\tline-height: 0px;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttd {\n\n\t\t\t\t\t\t margin-top: 0px;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tth {\n\n\t\t\t\t\t\t text-align: center;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.mensaje {\n\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\tline-height: 7px;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.laboratorios .mensaje {\n\n\t\t\t\t\t\t\tmargin-top: 0px;\n\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\tline-height: 0px;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t</style>\n\n\t\t\t\t</head>\n\n\t\t\t\t<body>\n\n\t\t\t\t\t<div class=\"content\" border=\"1\">\n\n\t\t\t\t\t\t<div style=\"line-height: 0px;\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<h3 class=\"titulo\" style=\"line-height: 4px;\">FICHA DE CONTROL Y SEGUIMIENTO<br>SOLICITUD DE ESTUDIOS DE LABORATORIO COVID-19</h3>\n\n\t\t\t\t\t\t\t<h4 class=\"cod_ficha\"></h4>\n\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class=\"datos_establecimiento\">\n\t\t\t\t\t \n\t\t\t\t\t <div class=\"bg-dark\">\n\n\t\t\t\t\t <span>1. DATOS DEL ESTABLECIMIENTO NOTIFICADOR</span>\n\t\t\t\t\t \n\t\t\t\t\t </div>\n\n\t\t\t\t\t <table>\n\t\t\t\t\t \t\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"400px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Establecimiento de Salud/Centro de Aislamiento:</label> '.$establecimiento[\"nombre_establecimiento\"].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t<td width=\"150px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Consultorio: </label> '.$consultorio[\"nombre_consultorio\"].'\n\t\t\t\t\t \t\t</td>\t\t\t \t\t\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table>\n\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"200px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Departamento:</label> '.$departamento[\"nombre_depto\"].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t<td width=\"200px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Municipio:</label> '.\"AQUI VA EL NOMBRE DEL MUNICIPIO\".'\n\t\t\t\t\t \t\t</td>\t\t\t\t\t \t\t\n\t\t\t\t\t \t\t<td width=\"200px\">';\n\n\t\t\t\t\t \t\tif ($ficha[\"fecha_notificacion\"] == \"0000-00-00\") {\n\t\t\t\t\t \t\t\t\n\t\t\t\t\t \t\t\t$content .=\n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\"> Fecha de Notificación:</label>';\n\n\t\t\t\t\t \t\t} else {\n\n\t\t\t\t\t \t\t\t$content .=\n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\"> Fecha de Notificación:</label> '.date(\"d/m/Y\", strtotime($ficha[\"fecha_notificacion\"]));\n\n\t\t\t\t\t \t\t}\n\n\t\t\t\t\t \t\t$content .=\n\t\t\t\t\t \t\t'</td>\n\t\t\t\t\t \t\t<td width=\"150px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Control:</label> '.$ficha[\"nro_control\"].' CONTROL\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t </div>\n\n\t\t\t\t\t <div class=\"paciente\">\n\t\t\t\t\t \n\t\t\t\t\t <div class=\"bg-dark py-1 text-center text-white\">\n\n\t\t\t\t\t <span>2. IDENTIFICACIÓN DEL CASO/PACIENTE</span>\n\t\t\t\t\t \n\t\t\t\t\t </div>\n\n\t\t\t\t\t <table>\n\t\t\t\t\t \t\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t\t\t\t<td width=\"250px\">\n\t\t\t\t\t\t\t\t\t<label class=\"font-weight-bold\">N° Carnet de Indentidad/ Cedula de extranjero/Pasaporte: </label> '.$pacienteAsegurado['nro_documento'].'\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t \t\t<td width=\"250px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Cod. Asegurado:</label> '.$pacienteAsegurado['cod_asegurado'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t<td width=\"250px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Cod. Afiliado:</label> '.$pacienteAsegurado['cod_afiliado'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t<td width=\"250px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Cod. Empleador:</label> '.$pacienteAsegurado['cod_empleador'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table>\n\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"800px\">\n\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Nombre Empleador:</label> '.$pacienteAsegurado['nombre_empleador'].'\n\t\t\t\t\t \t\t\t\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table>\n\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"350px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Apellido(s) y Nombre(s):</label> '.$pacienteAsegurado['paterno'].' '.$pacienteAsegurado['materno'].' '.$pacienteAsegurado['nombre'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t<td width=\"150px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Sexo:</label> '.$pacienteAsegurado['sexo'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table>\n\n\t\t\t\t\t \t<tr>\t\t\t\t\t \t\t\n\t\t\t\t\t \t\t<td width=\"250px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Fecha de Nacimiento:</label> '.date(\"d/m/Y\", strtotime($pacienteAsegurado['fecha_nacimiento'])).'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t<td width=\"100px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Edad:</label> '.$pacienteAsegurado['edad'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t<td width=\"250px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Teléfono:</label> '.$pacienteAsegurado['telefono'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t </div>\n\n\t\t\t\t\t <div class=\"hospitalizacion_aislamiento\">\n\t\t\t\t\t \n\t\t\t\t\t <div class=\"bg-dark py-1 text-center text-white\">\n\n\t\t\t\t\t <span>3. SEGUIMIENTO</span>\n\t\t\t\t\t \n\t\t\t\t\t </div>\n\n\t\t\t\t\t <table>\n\t\t\t\t\t \t\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"200px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">¿Han pasado 14 días desde la notificación?:</label> '.$hospitalizaciones_aislamientos['dias_notificacion'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t<td width=\"200px\">';\n\n\t\t\t\t\t \t\tif ($hospitalizaciones_aislamientos['dias_sin_sintomas'] == \"0\") {\n\t\t\t\t\t \t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\"> N° de días SIN sintomas:</label>';\n\n\t\t\t\t\t \t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\"> N° de días SIN sintomas:</label> '.date(\"d/m/Y\", strtotime($hospitalizaciones_aislamientos['dias_sin_sintomas']));\t\t\t\t\t \t\t\t\n\t\t\t\t\t \t\t}\n\n\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t'</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table>\n\t\t\t\t\t \t\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"200px\">';\n\n\t\t\t\t\t \t\tif ($hospitalizaciones_aislamientos['fecha_aislamiento'] == \"0000-00-00\") {\n\t\t\t\t\t \t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\"> Fecha de Aislamiento:</label>';\n\n\t\t\t\t\t \t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\"> Fecha de Aislamiento:</label> '.date(\"d/m/Y\", strtotime($hospitalizaciones_aislamientos['fecha_aislamiento']));\t\t\t\t\t \t\t\t\n\t\t\t\t\t \t\t}\n\n\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t'</td>\n\t\t\t\t\t \t\t<td width=\"300px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Lugar de Aislamiento: </label> '.$hospitalizaciones_aislamientos['lugar_aislamiento'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table>\n\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"200px\">';\n\n\t\t\t\t\t \t\tif ($hospitalizaciones_aislamientos['fecha_internacion'] == \"0000-00-00\") {\n\t\t\t\t\t \t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\"> Fecha de Internación:</label>';\n\n\t\t\t\t\t \t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\"> Fecha de Internación:</label> '.date(\"d/m/Y\", strtotime($hospitalizaciones_aislamientos['fecha_internacion']));\t\n\n\t\t\t\t\t \t\t}\n\n\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t'</td>\n\t\t\t\t\t \t\t<td width=\"400px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Establecimiento de salud de Internación:</label> '.$hospitalizaciones_aislamientos['establecimiento_internacion'].' \t\t\t\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table>\n\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"200px\">';\n\n\t\t\t\t\t \t\tif ($hospitalizaciones_aislamientos['fecha_ingreso_UTI'] == \"0000-00-00\") {\n\t\t\t\t\t \t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\"> Fecha de Ingreso a UTI:</label>';\n\n\t\t\t\t\t \t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\"> Fecha de Ingreso a UTI:</label> '.date(\"d/m/Y\", strtotime($hospitalizaciones_aislamientos['fecha_ingreso_UTI']));\t\n\n\t\t\t\t\t \t\t}\n\n\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t'</td>\n\t\t\t\t\t \t\t<td width=\"400px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Lugar de UTI:</label> '.$hospitalizaciones_aislamientos['lugar_ingreso_UTI'].' \t\t\t\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table>\n\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"200px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Ventilación mecánica</label> '.$hospitalizaciones_aislamientos['ventilacion_mecanica'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table>\n\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"650px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Tratamiento:</label> '.$hospitalizaciones_aislamientos['tratamiento'].','.$hospitalizaciones_aislamientos['tratamiento_otros'].' \n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t </div>\n\n\t\t\t\t\t <div class=\"laboratorios\">\n\t\t\t\t\t \n\t\t\t\t\t <div class=\"bg-dark py-1 text-center text-white\">\n\n\t\t\t\t\t <span>4. LABORATORIOS</span>\n\t\t\t\t\t \n\t\t\t\t\t </div>\n\n\t\t\t\t\t <table>\n\t\t\t\t\t \t\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"250px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Tipo de muestra tomada:</label> '.$laboratorios['tipo_muestra'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table>\n\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"450px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Nombre de Lab. que procesara la muestra:</label> '.$laboratorios['nombre_laboratorio'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t<td width=\"150px\">';\n\n\t\t\t\t\t \t\tif ($laboratorios['fecha_muestra'] == \"0000-00-00\") {\n\t\t\t\t\t \t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\">Fecha de toma de muestra:</label>';\n\n\t\t\t\t\t \t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\">Fecha de toma de muestra:</label> '.date(\"d/m/Y\", strtotime($laboratorios['fecha_muestra']));\t\n\n\t\t\t\t\t \t\t}\n\n\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t'</td>\n\t\t\t\t\t \t\t<td width=\"150px\">';\n\n\t\t\t\t\t \t\tif ($laboratorios['fecha_envio'] == \"0000-00-00\") {\n\t\t\t\t\t \t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\">Fecha de Envío:</label>';\n\n\t\t\t\t\t \t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\">Fecha de Envío:</label> '.date(\"d/m/Y\", strtotime($laboratorios['fecha_envio']));\t\n\n\t\t\t\t\t \t\t}\n\n\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t'</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table>\n\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"300px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\" style=\"line-height: 18px; margin-bottom: 0px;\">Responsable de Toma de Muestra:</label> '.$laboratorios['responsable_muestra'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t<td width=\"350px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\" style=\"line-height: 18px; margin-bottom: 0px;\">Firma y Sello</label>\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table>\n\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td colspan=\"2\" width=\"700px\">\n\t\t\t\t\t \t\t\t<label class=\"my-0 font-weight-bold\">Observaciones:</label> '.$laboratorios['observaciones_muestra'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"300px\">\n\t\t\t\t\t \t\t\t<label class=\"my-0 font-weight-bold\">Resultado:</label> '.$laboratorios['resultado_laboratorio'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t<td width=\"250px\">';\n\n\t\t\t\t\t \t\tif ($laboratorios['fecha_resultado'] == \"0000-00-00\") {\n\t\t\t\t\t \t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\">Fecha de Resultado:</label>';\n\n\t\t\t\t\t \t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t\t'<label class=\"font-weight-bold\">Fecha de Resultado:</label> '.date(\"d/m/Y\", strtotime($laboratorios['fecha_resultado']));\t\n\n\t\t\t\t\t \t\t}\n\n\t\t\t\t\t\t\t\t\t$content .= \n\t\t\t\t\t \t\t'</td>\n\t\t\t\t\t \t\t<td width=\"150px\">\n\t\t\t\t\t \t\t\t<h2 style=\"line-height: 0px;\">Cod Laboratorio '.$laboratorios['cod_laboratorio'].'</h2>\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <hr>\n\n\t\t\t\t\t <table>\n\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td colspan=\"2\" width=\"700px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">DATOS DEL PERSONAL QUE NOTIFICA</label>\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"350px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">APELLIDO(S) Y NOMBRE(S):</label> '.$persona_notificador['paterno_notificador'].' '.$persona_notificador['materno_notificador'].' '.$persona_notificador['nombre_notificador'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t<td width=\"350px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\">Teléfono:</label> '.$persona_notificador['telefono_notificador'].'\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table>\n\t\t\t\t\t \t\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"350px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\" style=\"line-height: 18px;\">Firma y Sello</label>\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t\t<td width=\"350px\">\n\t\t\t\t\t \t\t\t<label class=\"font-weight-bold\" style=\"line-height: 18px;\">Sello del EESS</label>\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t <table border=\"1\">\n\n\t\t\t\t\t \t<tr>\n\t\t\t\t\t \t\t<td width=\"714px\">\n\t\t\t\t\t \t\t\t<span class=\"mensaje font-weight-bold\">Este formulario tiene el carácter de declaración jurada que realiza el equipo de salud, contiene información sujeta a vigilancia epidemiológica, por esta razón debe ser llenada correctamente en las secciones necesarias y enviadas oprotunamente</span>\n\t\t\t\t\t \t\t</td>\n\t\t\t\t\t \t</tr>\n\n\t\t\t\t\t </table>\n\n\t\t\t\t\t </div>\n\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t</body>\n\n\t\t\t</html>';\n\t\t\t\n\t\t// Reconociendo la estructura HTML\n\t\t$pdf->writeHTML($content, true, 0, true, true);\n\n\t\t// Insertando el Logo\n\t\t$image_file = K_PATH_IMAGES.'cns-logo-simple.png';\n\n\t\t$pdf->Image($image_file, 13, 9, 13, '', 'PNG', '', 'T', false, 100, '', false, false, 0, false, false, false);\n\n\t\t// Estilos necesarios para el Codigo QR\n\t\t$style = array(\n\t\t 'border' => 0,\n\t\t 'vpadding' => 'auto',\n\t\t 'hpadding' => 'auto',\n\t\t 'fgcolor' => array(0,0,0),\n\t\t 'bgcolor' => false, //array(255,255,255)\n\t\t 'module_width' => 1, // width of a single module in points\n\t\t 'module_height' => 1 // height of a single module in points\n\t\t);\n\n\t\t//\tDatos a mostrar en el código QR\n\t\t$codeContents = 'COD. FICHA: '.$this->idFicha.\"\\n\";\n\n\t\t// insertando el código QR\n\t\t$pdf->write2DBarcode($codeContents, 'QRCODE,L', 190, 8 + $n, 15, 15, $style, 'N');\t\n\n\t\t$pdf->lastPage();\n\n\t\t$pdf->output('../temp/ficha-'.$valor.'.pdf', 'F');\n\t}",
"function form_disco($location, $extra=\"true\"){\n\t\n\tif(isset($_POST['nombre']))\n\t\t$nombre=$_POST['nombre'];\n\telse $nombre='';\n\n\tif(isset($_POST['precio']))\n\t\t$precio=$_POST['precio'];\n\telse $precio='';\n\tif(isset($_POST['fechapublicacion']))\n\t\t$fechapublicacion=$_POST['fechapublicacion'];\n\telse $fechapublicacion='';\n\tif(isset($_POST['imagen']))\n\t\t$imagen=$_POST['imagen'];\n\telse $imagen='';\n\tif(isset($_POST['descripcion']))\n\t\t$descripcion=$_POST['descripcion'];\n\telse $descripcion='';\n\t$action_form_disco=htmlspecialchars($_SERVER[\"PHP_SELF\"]);//es para que no aparezca el nombre de dashboard.php\n\n\techo <<<HTML\n\t<div align='center'>\t\n\t\t<div class='login'>\n\t\t\t<form method='post' action='$action_form_disco'>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<label for='nombre'>Nombre: </label>\n\t\t\t\t<input type='text' id='nombre' name='nombre' value='$nombre' required>\n\t\t\t\t<br>\n\t\t\t\t<label for='precio'>Precio: </label>\n\t\t\t\t<input type='text' id='precio' name='precio' value='$precio'>\n\t\t\t\t<br>\n\t\t\t\t<label for='fechapublicacion'>FechaPublicacion: </label>\n\t\t\t\t<input type='text' id='fechapublicacion' name='fechapublicacion' value='$fechapublicacion' >\n\t\t\t\t<br>\n\t\t\t\t<label for='imagen'>Imagen: </label><br>\n\t\t\t\t<textarea id='imagen' name='imagen' cols='50' rows='1'>$imagen</textarea>\n\t\t\t\t<br>\n\t\t\t\t<label for='descripcion'>Descripcion: </label><br>\n\t\t\t\t<textarea id='descripcion' name='descripcion' cols='50' rows='10'>$descripcion</textarea>\n\t\t\t\t<br>\n\t\t\t\t<label for='canciones'>Canciones: </label><br>\nHTML;\n\t\t\t\t\n\t\t\t\tif(isset($_POST[\"titulo\"]) && isset($_POST['duracion']))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$i=1;\n\t\t\t\t\tforeach(array_combine( $_POST[\"titulo\"], $_POST[\"duracion\"] ) as $titulo => $duracion)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"<input type='text' size='40' name='titulo$i' value='$titulo' >\";\n\t\t\t\t\t\techo \"<input type='text' size='40' name='duracion$i' value='$duracion' >\";\n\t\t\t\t\t\techo \"<br>\";\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\techo <<<HTML\n\t\t\t\t<input type='hidden' name='accion' value='discografia'>\n\t\t\t\t<input type='hidden' name='$location' value='$extra'>\n\t\t\t\t<input type='submit' value='Enviar'>\n\t\t\t\t\n\t\t\t\t<div id='inicioCancion'></div>\n\t\t\t</form>\nHTML;\n\t\t\tif($location!='disco_mod2')\n\t\t\t{\n\t\techo <<<HTML\n\t\t\t\t<button onclick='nuevaCancion()'>Nueva Cancion</button>\n\t\t\t<script>\n\t\t\t\t\n\t\t\t</script>\n\t\t\t\n\t\t\t<form method='post' action='$action_form_disco?accion=discografia#panel_control'>\n\t\t\t\t<input type='submit' name='cancelar' value='Cancelar'>\n\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\t\nHTML;\n\t\t\t}\n\t\t\t\n\n//print_r($_REQUEST);\n}",
"public function run()\n {\n DB::table('calificaciones')->delete() ;\n Calificacion::create([\n 'comentario' => 'Excepcional, me ha encanatado',\n 'valoracion' => 5,\n 'id_estudiante' => 'E031548795',\n 'id_tutor' => 'T125465709',\n ]);\n Calificacion::create([\n 'comentario' => 'Es fantástico llegar con dudas a clase que para tí son irresolubles y que Vicent en unos pocos minutos te deje todo los conceptos claros y con la sensación de que todo es más fácil de como viene en los libros. Es un crack. Me encanta como explica',\n 'valoracion' => 4,\n 'id_estudiante' => 'E032587419',\n 'id_tutor' => 'T034578101',\n ]);\n Calificacion::create([\n 'comentario' => 'Excelente clase! explica de forma detallada y con paciencia los conceptos fundamentales para la resolución de problemas de física.',\n 'valoracion' => 5,\n 'id_estudiante' => 'E17536842',\n 'id_tutor' => 'T784563984',\n ]);\n Calificacion::create([\n 'comentario' => 'Bien, explica muy bien.',\n 'valoracion' => 4,\n 'id_estudiante' => 'E920135782',\n 'id_tutor' => 'T098784562',\n ]);\n Calificacion::create([\n 'comentario' => 'UNA CLASE PRODUCTIVA EN TODO MOMENTO',\n 'valoracion' => 5,\n 'id_estudiante' => 'E013256984',\n 'id_tutor' => 'T034578101',\n ]);\n Calificacion::create([\n 'comentario' => 'Excelente en todos los sentidos, tanto en explicación como en comprensión de las dudas, se nota que domina de sobra el temario. Explica todo de una forma muy sencilla que ayuda a retener los conceptos. Recomiendo 100%!',\n 'valoracion' => 4,\n 'id_estudiante' => 'E013256985',\n 'id_tutor' => 'T175433246',\n ]);\n Calificacion::create([\n 'comentario' => '',\n 'valoracion' => 5,\n 'id_estudiante' => 'E031548795',\n 'id_tutor' => 'T125465709',\n ]);\n }",
"public function form()\n {\n $this->select('type', '计算类型')\n ->options(Interest::$typeMap)\n ->default(Interest::TYPE_FUTURE)->required();\n\n $this->number('value', '计算值')->required();\n $this->number('years', '存入年限')->required();\n $this->rate('rate', '年化利率')->required();\n }",
"public function cal()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Start up\n\t\t// -------------------------------------\n\n\t\t$this->get_first_day_of_week();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$disable = array(\n\t\t\t'categories',\n\t\t\t'category_fields',\n\t\t\t'custom_fields',\n\t\t\t'member_data',\n\t\t\t'pagination',\n\t\t\t'trackbacks'\n\t\t);\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'category',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'site_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => $this->data->get_site_id()\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'status',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => 'open'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date',\n\t\t\t\t//'default' => 'today'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_days',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => 1\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_weeks',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_months',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_years',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'time_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'time',\n\t\t\t\t'default' => '0000'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'time_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'time',\n\t\t\t\t'default' => '2359'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'day_limit',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => '10'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_limit',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => '0'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'first_day_of_week',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => $this->first_day_of_week\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'pad_short_weeks',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'bool',\n\t\t\t\t'default' => 'yes',\n\t\t\t\t'allowed_values' => array('yes', 'no')\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'enable',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'default' => '',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'allowed_values' => $disable\n\t\t\t)\n\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t// -------------------------------------\n\t\t// Do some voodoo on P\n\t\t// -------------------------------------\n\n\t\t$this->process_events_params();\n\n\t\t// -------------------------------------\n\t\t// Let's go build us a gosh darn calendar!\n\t\t// -------------------------------------\n\n\t\t$this->parent_method = __FUNCTION__;\n\n\t\treturn $this->build_calendar();\n\t}",
"function frmContinut() {\n\t\t$out = '';\n\t\t$out .= '\n\t\t<div id=\"div_info_produs\" style=\" font-weight:bold;color:red;\"> </div>\n\t\t'. $this -> continut_id() .'\n\t\t'. $this -> produs_id() .'\n\t\t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n\t\t<tr>\n\t\t\t<td>Cantitate</td>\n\t\t\t<td align=\"left\" >'. $this -> cantitate() .' </td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td align=\"left\" >UM:</td>\n\t\t\t<td align=\"left\" >\n\t\t\t<span id=\"div_frm_unitate_masura\"></span>\n\t\t\t</td>\n\t\t</tr>\t \t \n\t\t</table>\n\t\t<div align=\"right\">\n<input type=\"button\" name=\"btnSalveaza\" id=\"btnSalveazaComp\" value=\"Salveaza\" onClick=\"xajax_saveComponenta(xajax.getFormValues(\\'frm_bonuri_consum_continut\\'), $(\\'#bon_consum_id\\').val())\">\n\t\t<input type=\"button\" name=\"btnAnuleaza\" id=\"btnAnuleaza\" value=\"Anuleaza\" onClick=\"xajax_frmComponenta(0, $(\\'#bon_consum_id\\').val())\">\t\t</div>\n\t\t';\n\t\treturn $this -> frmInnerHtml($out);\n\t}",
"function form_editar(){\n\t\t// $this->fmt->class_pagina->crear_head_form(\"Editar Sistema\", $botones,\"\");// nombre, botones-left, botones-right\n\t\t$id = $this->id_item;\n\t\t$sql=\"select sis_id, sis_nombre, sis_descripcion, sis_tipo, sis_icono, sis_color, sis_activar, sis_orden from sistema\twhere sis_id='\".$id.\"'\";\n\t\t$rs=$this->fmt->query->consulta($sql,__METHOD__);\n\t\t$num=$this->fmt->query->num_registros($rs);\n\t\t\tif($num>0){\n\t\t\t\t$row=$this->fmt->query->obt_fila($rs);\n\t\t\t\t$fila_id=$row[\"sis_id\"];\n\t\t\t\t$fila_nombre=$row[\"sis_nombre\"];\n\t\t\t\t$fila_descripcion=$row[\"sis_descripcion\"];\n\t\t\t\t$fila_tipo=$row[\"sis_tipo\"];\n\t\t\t\t$fila_icono=$row[\"sis_icono\"];\n\t\t\t\t$fila_color=$row[\"sis_color\"];\n\t\t\t\t$fila_activar=$row[\"sis_activar\"];\n\t\t\t\t// $orden\n\t\t\t}\n $this->fmt->class_pagina->crear_head_form(\"Editar Sistema\", \"\",\"\");// nombre, botones-left, botones-right\n \t\t//echo \"<a href='javascript:location.reload()'><i class='icn-sync'></i></a>\";\n $id_form=\"form-editar\";\n\t\t?>\n\t\t<div class=\"body-modulo\">\n\t\t\t<form class=\"form form-modulo\" method=\"POST\" id=\"<?php echo $id_form?>\">\n\t\t\t\t<div class=\"form-group\" id=\"mensaje-login\"></div> <!--Mensaje form -->\n <div class=\"form-group\">\n\t\t\t\t\t<label>Nombre Sistema:</label>\n\t\t\t\t\t<div class=\"input-group controls input-icon-addon\">\n\t\t\t\t\t\t<span class=\"input-group-addon form-input-icon\"><i class=\"<?php echo $fila_icono; ?>\" style=\"color:<?php echo $fila_color; ?>\"></i></span>\n\t\t\t\t\t\t<input class=\"form-control input-lg color-border-gris-a color-text-gris form-nombre\" id=\"inputNombre\" name=\"inputNombre\" placeholder=\" \" value=\"<?php echo $fila_nombre; ?>\" type=\"text\" autofocus />\n <!-- <input type=\"hidden\" id=\"inputId\" name=\"inputId\" value=\"<?php echo $fila_id; ?>\" /> -->\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n <?php $this->fmt->form->input_form('Id:','inputId','',$fila_id,'','',''); ?>\n\t\t\t\t<div class=\"form-group form-descripcion\">\n\t\t\t\t\t<label>Descripción:</label>\n\t\t\t\t\t<textarea class=\"form-control\" rows=\"5\" id=\"inputDescripcion\" name=\"inputDescripcion\" placeholder=\"\"><?php echo $fila_descripcion; ?></textarea>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<label>Icono sistema:</label>\n\t\t\t\t\t<input class=\"form-control box-md-4\" id=\"inputIcono\" name=\"inputIcono\" placeholder=\"\" value=\"<?php echo $fila_icono; ?>\"/>\n <span class=\"input-link\"><a href=\"<?php echo _RUTA_WEB_NUCLEO; ?>includes/icons.php\" target=\"_blank\">ver iconos</a></span>\n </div>\n\t\t\t\t\t<div class=\"form-group form-group-color\">\n\t\t\t\t\t\t<label>Color</label>\n <?php\n \t\t\t\t\t if (empty($fila_color)){\n \t\t\t\t\t\t $color=\"#333333\";\n \t\t\t\t\t }else{\n \t\t\t\t\t\t $color= $fila_color;\n \t\t\t\t\t }\n //echo _RUTA_HOST;\n \t\t\t\t\t?>\n\t\t\t\t\t\t<input type=\"color\" class=\"form-control box-md-2\" id=\"inputColor\" name=\"inputColor\" value=\"<?php echo $color; ?>\" />\n\t\t\t\t\t \t<?php\n\t\t\t\t\t\t\trequire_once( _RUTA_NUCLEO.\"includes/color.php\");\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div>\n\n\t\t\t\t<div class=\"form-group form-fluid\">\n\t\t\t\t\t<label>Modulos: </label>\n <div class=\"group\">\n <?php echo $this->fmt->class_modulo->opciones_modulos($fila_id); ?>\n </div>\n\t\t\t\t</div>\n\n <?php\n //$this->fmt->form->input_check_form_bd(\"Permisos para Roles\",\"inputSistemasRoles\",\"rol_\",\"rol\",\"sis_rol_\",\"sistema_roles\",\"sis_rol_sis_id\",$fila_id,\"sis_rol_sis_id\",\"\",\"1\",\"1\")\n ?>\n\n\n\t\t\t\t<div class=\"form-group\">\n\t\t\t\t\t<label>Tipo Sistema: </label>\n\t\t\t\t\t<select class=\"form-control form-select\" name=\"inputTipo\" id=\"inputTipo\">\n\t\t\t\t\t\t<?php echo $this->opciones_tipo($fila_tipo); ?>\n\t\t\t\t\t</select>\n\t\t\t\t</div>\n <?php\n // $this->fmt->form->input_form(\"Orden:\",\"inputOrden\",\"\",$orden,\"box-md-2\");\n $this->fmt->form->radio_activar_form($fila_activar);\n\t\t\t\t\t$this->fmt->form->btn_actualizar($id_form,$this->id_mod,\"modificar\"); //$id_form,$id_mod,$tarea\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n $this->fmt->class_modulo->modal_script($this->id_mod);\n\t\t// $this->fmt->class_modulo->script_form(\"modulos/sistemas/sistemas.adm.php\",$this->id_mod);\n\t}",
"function calcular_cotizacion(){\n\t\t$producto=$_POST['producto'];\n\t\t$plan=$_POST['plan'];\n\t\t$temporada=$_POST['temp'];\n\t\t$fecha_llegada=$_POST['llegada'];\n\t\t\t$this->desde=$_POST['llegada'];\n\t\t$fecha_salida=$_POST['salida'];\n\t\t\t$this->hasta=$_POST['salida'];\n\t\t\n\t\t$sql=\"SELECT * FROM producto, temporadas2, habitaciones2 WHERE id_pro='$producto' AND temporadas2.id_alojamiento='$producto' AND temporadas2.id='$temporada' AND temporadas2.id=habitaciones2.id_temporada AND habitaciones2.id='$plan'\";\n\t\t\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\n\t\t//echo \"Noches: \".$noches;\n\t\t$arreglo_datos=\"\";\n\t\t$adultos=\"\"; $infantes=\"\"; $ninos=\"\";\n\t\t$i=1;\n\t\t$temp=\"\";\n\t\t$adultos+=$_POST['numero_adultos'.$i];\n\t\t\t$temp[]=$_POST['numero_adultos'.$i];\n\t\t$infantes+=$_POST['ninos_a'.$i];\n\t\t\t$temp[]=$_POST['ninos_a'.$i];\n\t\t$ninos+=$_POST['ninos_b'.$i];\n\t\t\t$temp[]=$_POST['ninos_b'.$i];\n\t\t$temp[]=$resultado['precio'];\n\t\t$temp[]=$resultado['precio_ninos'];\n\t\t$temp[]=$resultado['precio_ninos2'];\n\t\t$arreglo_dato[]=$temp;\n\t\t\n\t\t$this->listado=$arreglo_dato;\n\t\t$_SESSION['personas']=$arreglo_dato;\n\t\t//print_r($this->listado);\n\t\t\n\t\t$numero_personas=$adultos+$infantes+$ninos;\n\t\t$fee=1000;\n\t\n\t\t\t//cotizamos con precio completo\n\t\t\t$total_adulto=($resultado['precio']*$adultos);\n\t\t\t$total_infantes=($resultado['precio_ninos']*$infantes);\n\t\t\t$total_ninos=($resultado['precio_ninos2']*$ninos);\n\t\t\t\n\t\t\t$subtotal=$total_adulto+$total_infantes+$total_ninos;\n\t\t\t\t$this->subtotal=$subtotal;\n\t\t\t$comision=$fee;\n\t\t\t\t$this->comision=$comision;\n\t\t\t$total=$subtotal+$comision;\n\t\t\t\t$this->total=$total;\n\t\t\t\n\t\t\t/*echo \"Monto Adulto: \".$total_adulto.\"<br />\";\n\t\t\techo \"Monto Infantes: \".$total_infantes.\"<br />\";\n\t\t\techo \"Monto Niños: \".$total_ninos.\"<br />\";\n\t\t\techo \"Subtotal: \".$subtotal.\"<br />\";\n\t\t\techo \"Comision: \".$comision.\"<br />\";\n\t\t\techo \"Total: \".$total.\"<br /><br />\";*/\n\n\t\t\n\t\t$observaciones=$_POST['comentario'];\n\t\t$this->condiciones=$_POST['comentario'];\n\t\t$this->mensaje2=\"si\";\n\t}",
"public function Busca_producto()\n{\n\t$id_producto_venta = $this -> input -> post('id_producto_venta');\n\t$datos_producto = $this -> Modelo_productos -> Busca_producto($id_producto_venta);\n\n\techo\"<script type='text/javascript'>\n\t\t\t\t$('#id_producto_venta').val('\".$datos_producto -> id_producto_venta.\"');\n\t\t\t\t$('#laboratorio').val('\".$datos_producto -> descripcion.\"');\n\t\t\t\t$('#producto').val('\".$datos_producto -> producto.\" : \".$datos_producto -> concentrado.\" : \".$datos_producto -> presentacion.\" : \".$datos_producto -> clasificacion_terapeutica. \"');\n\t\t\t\t$('#no_de_lote').val('\".$datos_producto -> no_de_lote.\"');\n\t\t\t\t$('#registro_sanitario').val('\".$datos_producto -> registro_sanitario.\"');\t\n\t\t\t\t$('#precio_farmacia').val('\".$datos_producto -> precio_farmacia.\"');\t\n\t\t\t\t$('#precio_distribuidora').val('\".$datos_producto -> precio_distribuidora.\"');\t\n\t\t\t\t$('#precio_instituciones').val('\".$datos_producto -> precio_instituciones.\"');\n\t\t\t\t$('#fecha_de_vencimiento').val('\".$datos_producto -> fecha_de_vencimiento.\"');\t\t\t\t\t\n\t\t\t\t</script> \";\n}",
"function get_data_form(){\n\n\n\t$IdGrupo = '';\n\t$IdFuncionalidad = '';\n\t$IdAccion = '';\n\t$NombreGrupo = '';\n\t$NombreFuncionalidad = '';\n\t$NombreAccion = '';\n\t$action = '';\n\n\tif(isset($_REQUEST['IdGrupo'])){\n\t$IdGrupo = $_REQUEST['IdGrupo'];\n\t}\n\tif(isset($_REQUEST['IdFuncionalidad'])){\n\t$IdFuncionalidad = $_REQUEST['IdFuncionalidad'];\n\t}\n\tif(isset($_REQUEST['IdAccion'])){\n\t$IdAccion = $_REQUEST['IdAccion'];\n\t}\n\tif(isset($_REQUEST['action'])){\n\t$action = $_REQUEST['action'];\n\t}\n\tif(isset($_REQUEST['NombreGrupo'])){\n\t$NombreGrupo = $_REQUEST['NombreGrupo'];\n\t}\n\tif(isset($_REQUEST['NombreFuncionalidad'])){\n\t$NombreFuncionalidad = $_REQUEST['NombreFuncionalidad'];\n\t}\n\tif(isset($_REQUEST['NombreAccion'])){\n\t$NombreAccion = $_REQUEST['NombreAccion'];\n\t}\n\n\t$PERMISOS = new PERMISO_Model(\n\t\t$IdGrupo, \n\t\t$IdFuncionalidad, \n\t\t$IdAccion,\n\t\t$NombreGrupo,\n\t\t$NombreFuncionalidad,\n\t\t$NombreAccion);\n\n\treturn $PERMISOS;\n}",
"public function run()\n {\n\n $data = [\n '1' =>\t'Efectivo'\n ,'2' =>\t'Cheque nominativo'\n ,'3' =>\t'Transferencia electrónica de fondos'\n ,'4' =>\t'Tarjeta de crédito'\n ,'5' =>\t'Monedero electrónico'\n ,'6' =>\t'Dinero electrónico'\n ,'8' =>\t'Vales de despensa'\n ,'12' =>\t'Dación en pago'\n ,'13' =>\t'Pago por subrogación'\n ,'14' =>\t'Pago por consignación'\n ,'15' =>\t'Condonación'\n ,'17' =>\t'Compensación'\n ,'23' =>\t'Novación'\n ,'24' =>\t'Confusión'\n ,'25' =>\t'Remisión de deuda'\n ,'26' =>\t'Prescripción o caducidad'\n ,'27' =>\t'A satisfacción del acreedor'\n ,'28' =>\t'Tarjeta de débito'\n ,'29' =>\t'Tarjeta de servicios'\n ,'30' =>\t'Aplicación de anticipos'\n ,'31' =>\t'Intermediario pagos'\n ,'99' =>\t'Por definir'\n ];\n\n foreach ($data as $key => $value) {\n\n App\\Model\\Administracion\\Configuracion\\SysFormasPagosModel::create([\n 'clave' => $key\n ,'descripcion' => $value\n ]);\n\n }\n\n\n }",
"function acfe_import_dynamic_form($forms = false){\n return acfe_import_form($forms);\n}"
] | [
"0.629634",
"0.627192",
"0.6253319",
"0.6233084",
"0.622759",
"0.62248236",
"0.6201681",
"0.61968374",
"0.61660457",
"0.61593366",
"0.61583173",
"0.61518496",
"0.614133",
"0.6132718",
"0.6119181",
"0.6080822",
"0.6077439",
"0.60661465",
"0.6063388",
"0.6050833",
"0.6040374",
"0.60113925",
"0.60000706",
"0.59962004",
"0.59837246",
"0.59593034",
"0.5954003",
"0.5953144",
"0.5943795",
"0.590829",
"0.5895939",
"0.5870738",
"0.5870071",
"0.583237",
"0.5825495",
"0.5823829",
"0.58212614",
"0.5815925",
"0.58008015",
"0.5799702",
"0.5782321",
"0.5768004",
"0.57513595",
"0.57477957",
"0.57459736",
"0.57365036",
"0.5728738",
"0.5723795",
"0.5719902",
"0.5719066",
"0.57085574",
"0.5700315",
"0.5687372",
"0.5672316",
"0.56672215",
"0.5665192",
"0.5656297",
"0.56426424",
"0.5640158",
"0.5639312",
"0.5637718",
"0.5637359",
"0.56283385",
"0.56276166",
"0.56252366",
"0.5619302",
"0.560406",
"0.5602338",
"0.5601362",
"0.56003654",
"0.5595538",
"0.5588048",
"0.5585013",
"0.5570102",
"0.5569609",
"0.5569266",
"0.5568331",
"0.55660194",
"0.5564999",
"0.55602676",
"0.55602485",
"0.55590343",
"0.55568236",
"0.55562514",
"0.5555926",
"0.5555349",
"0.5547274",
"0.55463135",
"0.55409193",
"0.5536125",
"0.5533669",
"0.5533641",
"0.5523977",
"0.5518018",
"0.5512674",
"0.55069757",
"0.55067813",
"0.5502644",
"0.55008346",
"0.55008197",
"0.5495396"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
DB::table('transactions')->insert([
[ 'name' => 'Camden Bike Shop', 'amount' => -25, 'date' => '2021-08-18', 'created_at' => now(), 'updated_at' => now() ],
[ 'name' => 'INTEREST PAYMENT', 'amount' => 50, 'date' => '2020-09-12', 'created_at' => now(), 'updated_at' => now() ],
[ 'name' => 'Credit Card 2222', 'amount' => -21, 'date' => '2021-02-01', 'created_at' => now(), 'updated_at' => now() ],
[ 'name' => 'Burger Shop Ltd', 'amount' => -18.2, 'date' => '2021-04-15', 'created_at' => now(), 'updated_at' => now() ],
[ 'name' => 'Outdoor Leisure Ltd', 'amount' => -56, 'date' => '2020-06-11', 'created_at' => now(), 'updated_at' => now() ],
[ 'name' => 'Airlines Worldwide Booking', 'amount' => -225, 'date' => '2021-07-18', 'created_at' => now(), 'updated_at' => now() ],
[ 'name' => 'TV LICENSE MAY', 'amount' => -25, 'date' => '2021-05-01', 'created_at' => now(), 'updated_at' => now() ],
[ 'name' => 'From AC/55244727VIA MOBILE', 'amount' => 37.65, 'date' => '2021-02-24', 'created_at' => now(), 'updated_at' => now() ],
[ 'name' => 'Audible', 'amount' => -7.99, 'date' => '2021-08-01', 'created_at' => now(), 'updated_at' => now() ],
[ 'name' => 'Cafe Riva', 'amount' => -2.95, 'date' => '2021-08-06', 'created_at' => now(), 'updated_at' => now() ]
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
Execute the console command. | public function handle(): void
{
$this->info('Seeding data into the database...');
$this->seed('MmCmsDatabaseSeeder');
} | {
"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\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\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 // 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 $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\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\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 $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 $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 $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 $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\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 // 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 \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 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 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 $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 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 $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 {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }",
"public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\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()\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(Command $command);",
"public function handle(Command $command);",
"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 $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 //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\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 // 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 $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 if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\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 $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\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.6469971",
"0.64641356",
"0.6427384",
"0.6349752",
"0.63188183",
"0.62750113",
"0.6261585",
"0.6261214",
"0.6235854",
"0.6225116",
"0.6222161",
"0.6214144",
"0.6193531",
"0.6191337",
"0.6183868",
"0.61772275",
"0.61766857",
"0.6172786",
"0.6149171",
"0.6148903",
"0.61484134",
"0.61469173",
"0.6138112",
"0.61347705",
"0.61316174",
"0.61158997",
"0.6113888",
"0.6110495",
"0.6108539",
"0.61056405",
"0.6102598",
"0.61022663",
"0.61016774",
"0.6096468",
"0.6094955",
"0.60922974",
"0.6088507",
"0.6083433",
"0.6082336",
"0.6077499",
"0.60767883",
"0.6075641",
"0.6073871",
"0.6072606",
"0.60701466",
"0.60694647",
"0.60693175",
"0.6067332",
"0.6061484",
"0.6059711",
"0.6059688",
"0.60574067",
"0.60503477",
"0.6042625",
"0.6040687",
"0.6032303",
"0.60306066",
"0.602774",
"0.60255086",
"0.60207987",
"0.60190594",
"0.6018816",
"0.60144967",
"0.60144013",
"0.6014115",
"0.6011956",
"0.60092497",
"0.6007996",
"0.60079277",
"0.60061836",
"0.60051036",
"0.6001119",
"0.6001112",
"0.6000026",
"0.5999729",
"0.5991934",
"0.59873074",
"0.5987054",
"0.59868026",
"0.59868026",
"0.59856236",
"0.59836555",
"0.5980716",
"0.5976703",
"0.5976261",
"0.5973673",
"0.5969664",
"0.59683484",
"0.5966431",
"0.5965345",
"0.59645647",
"0.59615767",
"0.5960291",
"0.59555584",
"0.59549415",
"0.5952351",
"0.59519506",
"0.594845",
"0.5946748",
"0.5946337",
"0.5944945"
] | 0.0 | -1 |
Db storage constructor, need db adapter and db options | public function __construct(array $options = array())
{
if($options) {
$this->setOptions($options);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n\t$dibiConfig= dibi::getConnection()->getConfig();\n\t$dbname= isset($dibiConfig['dbname']) ? $dibiConfig['dbname'] : $dibiConfig['database'];\n\t$config= array(\n\t 'driver' => 'sqlite',\n\t 'profiler' => Environment::getConfig('perform')->storage_profiler,\n\t 'database' => realpath(Environment::getConfig('perform')->modelCache) . '/'. $dbname .'-storage.sdb',\n\t);\n\tparent::__construct($config, 'storage');\n\n\tif ( !$this->getDatabaseInfo()->hasTable('fields'))\n\t{\n\t $this->query('CREATE TABLE [fields] ([id] INTEGER NOT NULL PRIMARY KEY,\n\t\t[name] VARCHAR(100) NOT NULL, [table] VARCHAR(50) NOT NULL,\n\t\t[hash] VARCHAR(32) NOT NULL, [type] VARCHAR(50));\n\t\tCREATE UNIQUE INDEX [fields_idx] on [fields] ( [name], [table]);');\n\t}\n\n\tif ( !$this->getDatabaseInfo()->hasTable('tables'))\n\t{\n\t $this->query('CREATE TABLE [tables] ( [id] INTEGER NOT NULL PRIMARY KEY,\n\t\t[name] VARCHAR(100) NOT NULL UNIQUE, [hash] VARCHAR(32) NOT NULL);');\n\t}\n\n\tif ( !$this->getDatabaseInfo()->hasTable('views'))\n\t{\n\t $this->query('CREATE TABLE [views] ( [id] INTEGER NOT NULL PRIMARY KEY,\n\t\t[name] VARCHAR(100) NOT NULL UNIQUE, [hash] VARCHAR(32) NOT NULL);');\n\t}\n\n\tif ( !$this->getDatabaseInfo()->hasTable('indexes'))\n\t{\n\t $this->query('CREATE TABLE [indexes] ([id] INTEGER NOT NULL PRIMARY KEY,\n\t\t[name] VARCHAR(100) NOT NULL, [table] VARCHAR(50) NOT NULL,\n\t\t[hash] VARCHAR(32) NOT NULL, [unique] BOOLEAN);\n\t\tCREATE UNIQUE INDEX [indexes_idx] on [indexes] ( [name], [table]);');\n\t}\n }",
"public function initStorage() {\n if(empty($this -> _db)) {\n $db = new SQLite3('./prices.db');\n $this -> _db = $db;\n }\n \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 function __construct(){\n $this->db = new SQLite3(':memory:');\n //create table in db if it does now exist\n $this->db->exec('CREATE TABLE IF NOT EXISTS storage (name STRING, value INT);');\n }",
"public function getDb();",
"public function dbInstance();",
"public function __construct()\n {\n $this->db = Db::getInstance();\n }",
"function __construct()\n {\n $this->dataBase = new Database(\n Conf::get('pkg_db_host'),\n Conf::get('pkg_db_port'),\n Conf::get('pkg_db_user'),\n Conf::get('pkg_db_password'),\n Conf::get('pkg_db_name'),\n Conf::get('pkg_db_usefav_table'));\n }",
"public function __construct() {\n $this->db = database::getInstance();\n }",
"function __construct()\n {\n $this->_db = DB::getInstance();\n }",
"protected function getDatabase() {}",
"public function __construct()\r\n {\r\n require_once 'libs/db.php';\r\n $this->db = Db::singleton();\r\n }",
"public function __construct() {\n $this->_db = DB::getInstance();\n }",
"public function __construct() {\n $this->dbName = new DataBase($this->db);\n }",
"public function __construct() {\n\t\t$this->db = getDatabase();\n\t}",
"public static function init() {\n\t\tself::$_db = Storage::get('objects.database');\n\t}",
"public function __construct() {\r\n $this->db = new Database;\r\n }",
"public function __construct() {\r\n /* * * maybe set the db name here later ** */\r\n }",
"function __construct(){\n $this->_db = (new DataBaseServices())->connect();\n }",
"public function __construct(){\n $this->db = DB::getInstance();\n }",
"public function __construct()\n\t{\n\t\t$this->db = IEM::getDatabase();\n\t}",
"public function __construct(DbStorage $dbs)\n {\n $this->setStorage($dbs);\n }",
"public function __construct()\n {\n $this->_db = new \\DbHandler();\n }",
"function __construct($db) {\n $this->db = $db;\n }",
"public function __construct(){\n $this->_db = DB::getInstance();\n }",
"private function __construct()\n {\n\n $DB_SQLITE_FILE = env('APP_DB_FILE');\n $this->dbconn = new \\DB\\SQL('sqlite:'.$DB_SQLITE_FILE);\n }",
"public function __construct()\n {\n $this->_dbInstance = Database::getInstance();\n $this->_dbHandle = $this->_dbInstance->getConnection();\n }",
"function __construct(){\n\t\t\t$this->configDB=array(\n\t\t\t\t'driver' => 'Mysqli',\n\t\t\t\t'host' => '127.0.0.1',\n\t\t\t\t'username'=> 'root',\n\t\t\t\t'password'=> '',\n\t\t\t\t'dbname' => 'bd_sain',\n\t\t\t\t'driver_options' => array(\n\t\t\t\tPDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')\t\t\t\t\n\t\t\t);\n\t\t\t\t\n\t\t\t$this->db =new Adapter($this->configDB);\n\t\t}",
"public function __construct()\n\t{\n\t\t$this->dbInfo = new DbInfo();\n\t}",
"public function __construct() {\n\t\t$this->db = DB::getInstance();\n\t}",
"public function __construct() {\n\t\t$this->_db = Database::getInstance();\n\t}",
"public function __construct($db) {\n $this->db = $db;\n }",
"public function __construct($db=null)\n {\n $this->db = $db;\n }",
"public function __construct() {\n \n $this->tableName = \"db_database\";\n $this->setColumnsInfo(\"id\", \"int(11)\", 0);\n $this->setColumnsInfo(\"id_space\", \"int(11)\", 0);\n $this->setColumnsInfo(\"name\", \"varchar(250)\", \"\");\n $this->primaryKey = \"id\";\n }",
"public function __construct(){\r\n\r\n // Create connection with data base\r\n $this->_db = DB::get_Instance();\r\n }",
"public function __construct()\n {\n $this->storename = 'db.json';\n $this->expiration_time = 5;\n $this->set_storevalues();\n }",
"function __construct($db) {\r\n\t\t$this->db = $db;\r\n\t}",
"public function __construct($db)\n {\n $this->db = $db;\n }",
"public function __construct($db)\n {\n $this->db = $db;\n }",
"public function __construct()\n {\n parent::__construct();\n $this->db = \\App::getInstance()->getDatabase();\n }",
"function __construct($db = false) {\n if($db !== false) {\n $this->db = $db;\n } else {\n $this->db = parent::__construct();\n }\n }",
"public function __construct()\n {\n $this->db = new Database;\n }",
"public function __construct()\n {\n $this->db = new Database;\n }",
"public function __construct()\n {\n $this->db = \\Config\\Database::connect();\n }",
"public function __construct()\n {\n $this->_idField = $this->getIdField();\n $this->_tableName = $this->getTableName();\n\n if (!static::$_db) {\n static::$_db = Database::getInstance();\n }\n\n if (!static::$_schema) {\n static::$_schema = new Cache();\n }\n }",
"public function __construct(){\n $this->db = new Database;\n }",
"public function __construct($db) {\n $this->_db = $db;\n }",
"public function __construct() {\n parent::__construct();\n $this->db_reader = $this->load->database(\"db_reader\", TRUE);\n }",
"public function __construct()\n {\n if (!is_dir($this->backupStorage)) {\n mkdir($this->backupStorage, 0775, true);\n }\n $this->dbParams = $this->getDBParams();\n parent::__construct();\n }",
"public function __construct($db){\r\n $this->db = $db;\r\n }",
"public function __construct($storageType = null) {\n\n\t\tif($storageType == null) {\n\t\t\t\n\t\t\t$storageType = self::USE_DBASE;\n\t\t}\n\t\t\n\t\t$this->setStorageType($storageType);\n }",
"public function __construct(){\n $this->db = new Database;\n }",
"public function getFromDB() {}",
"public function __construct(){\r\n \r\n $this->db = parent::getInstance(); \r\n }",
"public function getDbAdapter();",
"function __construct(){\n\t\t\t$this->db = new Database();\n\t\t}",
"public function __construct(){\n //get the configuration for connection to database\n $data_base_opt = System\\Config::get_instance()->get_database_config();\n // receiving object for working with database\n $this->database = System\\Safe_SQL::get_instance($data_base_opt);\n }",
"public function __construct()\n {\n $this->db = DataBase::dbConnect();\n }",
"public function __construct()\r\n {\r\n $this->db = clsDB::getInstance();\r\n }",
"public function __construct()\n {\n $dbInstance= Database::getInstance();\n $this->db= $dbInstance->getdbConnection();\n }",
"public function __construct(){\n $this->db = new Base;\n }",
"public function __construct($db)\n {\n $this->db = $db;\n }",
"public function init()\n {\n $this->_db = Instance::ensure($this->_db, Connection::class);\n }",
"public function initStorage() {}",
"public function __construct($db) {\n $this->_db = $db;\n }",
"public function __construct($db) {\n $this->_db = $db;\n }",
"public function __construct()\n {\n $this->db = new Database();\n }",
"public function __construct()\n {\n $this->db = new Database();\n }",
"public function __construct()\n\t\t{\n\t\t\t$this->_db = new Database();\n\t\t}",
"public function database();",
"public function __construct() {\n $this->db = SPDO::singleton();\n }",
"function __construct($db, $id = false) {\n $this->db = $db;\n if ($id) {\n $this->id = $id;\n $this->load();\n }\n }",
"protected function _initDb()\n {\n /**\n * Boot the cache initialisation for use her.\n */\n $this->bootstrap('Cache');\n $this->_cache = $this->getResource('Cache');\n\n /**\n * Only attempt to cache the metadata if we have a cache available\n */\n if (!is_null($this->_cache)) {\n try {\n Zend_Db_Table_Abstract::setDefaultMetadataCache($this->_cache);\n } catch(Zend_Db_Table_Exception $e) {\n print $e->getMessage();\n }\n }\n\n $db = $this->getPluginResource('db')->getDbAdapter();\n\n /**\n * Set the default fetch mode to object throughout the application\n */\n $db->setFetchMode(Zend_Db::FETCH_OBJ);\n\n /**\n * Force the initial connection to handle error relating to caching etc.\n */\n try {\n $db->getConnection();\n } catch (Zend_Db_Adapter_Exception $e) {\n // perhaps a failed login credential, or perhaps the RDBMS is not running\n } catch (Zend_Exception $e) {\n // perhaps factory() failed to load the specified Adapter class\n }\n\n Zend_Db_Table::setDefaultAdapter($db);\n Zend_Registry::set('db', $db);\n\n return $db;\n }",
"protected function _initDbResource()\n {\n $registry = $this->getPluginResource('db');\n if (!$registry) {\n return;\n }\n\n //\n // options in configs/application\n $options = $registry->getOptions();\n\n if (array_key_exists('dsn', $options) && '' !== $options['dsn']) {\n $options['params'] = array_replace(\n $options['params'],\n $this->_parseDsn($options['dsn'])\n );\n }\n\n $registry->setOptions($options);\n }",
"public function __construct(){\r\n\r\n $db = new DB;\r\n\r\n $this->db = $db->get_connection();\r\n\r\n }",
"public function __construct()\n {\n $options = [\n //required\n 'username' => 'root',\n 'database' => 'mvc_porject',\n //optional\n 'password' => '',\n 'type' => 'mysql',\n 'charset' => 'utf8',\n 'host' => 'localhost',\n 'port' => '3306'\n ];\n $this->db = new Database($options);\n }",
"public function __construct()\n {\n global $db;\n $this->db = $db;\n }",
"public function __construct()\n {\n $this->db = new DB();\n }",
"public function __construct() {\r\n\t\t$this->_db = new DAL();\r\n\t}",
"public function __construct(&$db) {\n $this->db = $db;\n }",
"public function __construct(&$db) {\n $this->db = $db;\n }",
"public function __construct(&$db) {\n $this->db = $db;\n }",
"public function __construct() {\n\t\t$this->_app = Eden::i()->getActiveApp();\n\t\t$this->_database = $this->_app->getDatabase();\n\t}",
"public function __construct()\n\t{\n\t\t$this->db = MySQLdb::getInstance()->getDatabase();\n\t}",
"public function __construct()\n\t{\n\t\t$this->db = new Database();\n\t}",
"public function __construct(){\n $this->db = new Base;\n }",
"protected function initDatabaseRecord() {}",
"public function __construct(&$db)\r\n {\r\n $this->_db = $db;\r\n }",
"public function __construct() {\r\n $this->conn = PersistentManager::getInstance()->get_connection();\r\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 }",
"private function initDatabase() {\n \n \n \n }",
"function __construct() {\n $connector = new DbConnection();\n $conn = $connector->connect(); \n }",
"public function __construct()\n {\n $this->db = ConnectionClass::conn();\n }",
"public function __construct($db) {\n\t\t$this->db = $db;\n\t}",
"public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n \n $this->conn = $db;\n }",
"abstract protected function initDB();",
"public function __construct()\n {\n //add transaction to databse\n $this->db=new DB;\n }",
"function __construct() {\n if (!file_exists($this->path)) {\n $database = fopen($this->path, 'w');\n fclose($database);\n }\n }",
"function __construct($db){\n\t//\tparent::__construct();\n\t\n\t\t$this->_db = $db;\n\t}",
"public function __construct()\n\t{\n\n\t\ttry {\n\n\t\t\t$dsn = sprintf(\n\t\t\t\t'mysql:dbname=%s;host=%s;charset=utf8;',\n\t\t\t\tself::$dsn['database'],\n\t\t\t\tself::$dsn['hostname']\n\t\t\t);\n\n\t\t\tparent::__construct(\n\t\t\t\t$dsn,\n\t\t\t\tself::$dsn['username'],\n\t\t\t\tself::$dsn['password'],\n\t\t\t\tarray(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')\n\t\t\t);\n\n\t\t} catch (PDOException $e) {\n\n\t\t\tthrow new DatabaseException($e->getMessage());\n\n\t\t}//end try\n\n\t\tif (array_key_exists('cachelvl', self::$dsn) === false) {\n\n\t\t\tself::$dsn['cachelvl'] = self::CACHE_NORMAL;\n\n\t\t}\n\n\t\ttry {\n\n\t\t\t// Legacy fallback to prevent old applications from crashing.\n\t\t\tif (class_exists('Cache') === false) {\n\n\t\t\t\tinclude_once __DIR__.'/Cache.class.php';\n\n\t\t\t}\n\n\t\t\t$this->_cache = Cache::loadEngine('Memcached');\n\t\t\t$this->connections++;\n\n\t\t} catch (Exception $e) {\n\n\t\t\tthrow new DatabaseException($e->getMessage());\n\n\t\t}\n\n\t}",
"public function __construct($db) {\r\n\r\n $this->conn = $db;\r\n\r\n }"
] | [
"0.72114694",
"0.7198355",
"0.7116976",
"0.70444226",
"0.6896979",
"0.6836253",
"0.6789694",
"0.67853534",
"0.6778242",
"0.67767036",
"0.67073804",
"0.6691854",
"0.6653096",
"0.6649143",
"0.66291875",
"0.6624552",
"0.6612488",
"0.6609192",
"0.660856",
"0.6600792",
"0.65997016",
"0.6586408",
"0.6582878",
"0.6578323",
"0.6573987",
"0.65640426",
"0.65539217",
"0.65478176",
"0.6534362",
"0.6532795",
"0.65275776",
"0.65233433",
"0.6515315",
"0.6504207",
"0.6495902",
"0.64906317",
"0.6478541",
"0.64784163",
"0.64784163",
"0.64681274",
"0.6461151",
"0.6460696",
"0.6460696",
"0.6456176",
"0.6451179",
"0.6448897",
"0.6433518",
"0.64248306",
"0.64182305",
"0.64176697",
"0.6396293",
"0.6383915",
"0.6383304",
"0.6379115",
"0.6379039",
"0.6378467",
"0.63729405",
"0.637285",
"0.63683283",
"0.6363688",
"0.63614404",
"0.6355978",
"0.63543636",
"0.6350222",
"0.6348507",
"0.6348507",
"0.63469267",
"0.63469267",
"0.6346553",
"0.63423645",
"0.6338183",
"0.63315314",
"0.6321627",
"0.6319644",
"0.6318133",
"0.6312786",
"0.6309759",
"0.6307469",
"0.63032025",
"0.629578",
"0.629578",
"0.629578",
"0.6295448",
"0.6292596",
"0.6289464",
"0.628323",
"0.6281026",
"0.6276451",
"0.6272226",
"0.6272131",
"0.6272007",
"0.6264695",
"0.62626797",
"0.6254156",
"0.6250265",
"0.6240077",
"0.6238864",
"0.6238799",
"0.62372094",
"0.62309116",
"0.6220538"
] | 0.0 | -1 |
Test if has datas with $uid key | public function has($uid)
{
$options = $this->getOptions();
$stmt = $this->adapter->query(
sprintf('SELECT %s FROM %s WHERE %s = "%s"',
$options['column_value'],
$options['table'],
$options['column_key'],
$uid
), Adapter::QUERY_MODE_EXECUTE
);
return $stmt->count() > 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasUid(){\n return $this->_has(2);\n }",
"private function _exists($uid){\n $select = $this->select()\n ->from($this->_name,array('uid'))\n ->where('uid = ?', $uid);\n $row = $this->fetchRow($select);\n\t\t\n // Zend_Debug::dump($select->__toString());\n if($row){\n return true;\n }\n return false;\n \n }",
"public function exists($uid){\n return isset($this->db[$uid]);\n }",
"public function isUserIdExist($uid){\n\n $stmt = $this->con->prepare(\"SELECT uid FROM users WHERE uid = ?\");\n $stmt->bind_param(\"s\",$uid);\n $stmt->execute();\n $stmt->store_result();\n return $stmt->num_rows > 0;\n\n }",
"public function storageIdExists($uid)\n {\n $this->_cache->load($this->_cache_key, $this->_data_version);\n\n return array_key_exists($uid, $this->_cache->uids);\n }",
"function userid_exists($uid = '')\r\n\t{\r\n\t\tif(!is_numeric($uid))\r\n\t\t\treturn false;\r\n\t\t$this->db->where('id', $uid);\r\n\t\t$query = $this->db->get('users');\r\n\t\tif($query->num_rows == 1)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"protected function _exists($key,$typ,$uname){\r\n if($this->bag[0]->count($this->bag[1],array('key'=>$key,'type'=>$typ,'uname'=>$uname))!=1) return FALSE;\r\n return $this->bag[0]->load_field($this->bag[1],'id',array('key'=>$key,'type'=>$typ,'uname'=>$uname));\r\n }",
"public function userExists( $uid ){\n\t\t$dir = OC_Config::getValue( \"datadirectory\", OC::$SERVERROOT.\"/data\" ) . '/' . $uid . \"/files\";\n\t\treturn file_exists($dir);\n\t}",
"function findOneMatchUid($uid);",
"public function hasUserData(){\n return $this->_has(3);\n }",
"function userExists($uid)\r\n {\r\n return $this->UD->userExists($uid);\r\n }",
"public function hasUserData(){\n return $this->_has(2);\n }",
"public function hasUserData(){\n return $this->_has(2);\n }",
"public function hasUserData(){\n return $this->_has(2);\n }",
"public function hasUserData(){\n return $this->_has(2);\n }",
"function isEmpty($uid)\r\n{\r\n if (!empty($uid)) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}",
"public function exists() {\n\t\treturn !isset($userData);\n\t}",
"private function getUidZerroIsPresent() {\n $count = db_query(\"SELECT uid FROM {users} WHERE uid = 0\")->fetchAll();\n return (boolean) $count;\n }",
"function userExists($uid)\n\t{\n\t\t$check = $this->DB->database_select('users', 'uid', array('uid' => $uid));\n\t\treturn ($check == 0) ? false : true;\n\t}",
"static protected function eventExists($uid) {\n return array_key_exists($uid, self::$events);\n }",
"public function hasData($key = '');",
"public function isValidUid($uid);",
"public function findByUid($uid);",
"public function user_exists() {\n\t\t$user = $this->search(\"(uid=\".$this->user.\")\");\n\t\treturn $user !== false;\n\t}",
"function liuid_exists($liuid)\r\n\t{\r\n\t\t$this->db->where('liuid', $liuid);\r\n\t\t$this->db->limit('1');\r\n\t\t$query = $this->db->get('users');\r\n\r\n\t\treturn $query->num_rows();\r\n\t}",
"public function exists() {\n\t\tglobal $wpdb, $bp;\n\n\t\t// Check cache first\n\t\t$cached = wp_cache_get( $this->field_id, 'bp_xprofile_data_' . $this->user_id );\n\n\t\tif ( $cached && ! empty( $cached->id ) ) {\n\t\t\t$retval = true;\n\t\t} else {\n\t\t\t$retval = $wpdb->get_row( $wpdb->prepare( \"SELECT id FROM {$bp->profile->table_name_data} WHERE user_id = %d AND field_id = %d\", $this->user_id, $this->field_id ) );\n\t\t}\n\n\t\treturn apply_filters_ref_array( 'xprofile_data_exists', array( (bool)$retval, $this ) );\n\t}",
"function loaded_user(string $id): bool { return isset($this->users[$id]); }",
"function lukasid_exists($lid = '')\r\n\t{\r\n\t\t$this->db->where('lukasid', $lid);\r\n\t\t$query = $this->db->get('users');\r\n\t\tif($query->num_rows == 1)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"protected function hasData($key) {\n\t\t\treturn array_key_exists($key, $this->data);\n\t\t}",
"public function hasUserId(){\n return $this->_has(2);\n }",
"public function hasUserId(){\n return $this->_has(2);\n }",
"public function hasUserId(){\n return $this->_has(2);\n }",
"public function hasUserId(){\n return $this->_has(2);\n }",
"public function hasUserId(){\n return $this->_has(2);\n }",
"public static function exist($key) ;",
"public function hasData($key = null);",
"public function has() {\n\t\t$userid = $this->get();\n\t\treturn ! empty( $userid );\n\t}",
"private function exist($param = null) {\n // check if $param is number then get subscriber by id\n if(is_numeric($param)) {\n $user = $this->_db->query(\"SELECT * FROM subscribers WHERE u_id = ?\",\n array($param))->results();\n if(count($user)) {\n return true;\n }\n // if enter this else then the $param is string so get user by email\n } else {\n $user = $this->_db->query(\"SELECT * FROM subscribers WHERE u_email = ?\",\n array($param))->results();\n if(count($user)) {\n return true;\n }\n }\n\n return false;\n }",
"function user_id_exists($db, $user_id)\n{\n\t$sql = 'SELECT * FROM users where id=:id';\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':id'=>$user_id));\n\t$us = $st->fetchAll();\n\treturn (count($us) >= 1);\n}",
"function userIdExists($id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT * FROM users WHERE id = ?\",array($id));\n\t$num_returns = $query->count();\n\tif ($num_returns > 0){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}",
"public function hasAccid(){\n return $this->_has(1);\n }",
"function validateUser($id, $key)\n{\n\n if (!isset($id, $key)) return false;\n\n $valid_users = array(\n 'demo' => 'TEST_USER_SOFTWARE_KEY'\n );\n\n return (array_key_exists($id, $valid_users) && $valid_users[$id] == $key);\n}",
"private function evalexists($value, $data){\n\n\t\t\treturn (bool) $passed = (array_key_exists($value, $data)) ? true : false;\n\t\t}",
"function isDataExists($tableName, $id, $key) {\n $ci = & get_instance();\n $ci->load->database();\n if ($tableName && $id && $key) {\n $query = $ci->db->get_where($tableName, array($key => $id));\n return ($query->num_rows()) ? true : false;\n }\n return false;\n}",
"public function exist($key);",
"function checkUserIdBL() {\n\t $isExisting = false;\n\t // If the user exists\n\t if ( checkUserIdDAL($_POST['userId']) )\n\t {\n\t\t $isExisting = true;\n\t }\n\t return $isExisting;\n }",
"function exists($id)\n{\n\tif ($id && file_exists('datas/data')){\n\t\t$file = unserialize(file_get_contents('datas/data'));\n\t\tforeach ($file as $value){\n\t\t\tif(trim($value['nom']) === trim($id))\n\t\t\t\treturn true;\n\t\t}\n\t}\n return false;\n}",
"public function hasData($key = '') {\n if (empty($key) || !is_string($key)) {\n return !empty($this->_data);\n }\n return array_key_exists($key, $this->_data);\n }",
"private function checkEntryExists($lti_id, $user_id){\n $select = $this->db->query( 'SELECT entry FROM entries WHERE lti_id = :lti_id AND user_id = :user_id', array( 'lti_id' => $lti_id, 'user_id' => $user_id ) );\n while ( $row = $select->fetch() ) {\n\t\t return true;\n }\n\t\treturn false;\n\t}",
"public function hasDatas(){\n return $this->_has(5);\n }",
"public function fileIndexStatusIsTrueIfUidIsSet() {}",
"function userIdExists($id) {\n return valueExists('users', 'id', $id);\n}",
"function fav_check($id,$uid=NULL)\r\n\t{\r\n\t\tglobal $db;\r\n\t\t\r\n\t\t$id = mysql_clean($id);\r\n\t\t\r\n\t\tif(!$uid)\r\n\t\t\t$uid =userid();\r\n\t\t$results = $db->select(tbl($this->fav_tbl),\"favorite_id\",\" id='\".$id.\"' AND userid='\".$uid.\"' AND type='\".$this->type.\"'\");\r\n\t\tif(count($results)>0)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public function exist( $data, $id ) {\n\t\t$query = $this->db->select( '*' )\n\t\t ->from( $this->_table )\n\t\t ->where( $this->name, $data )\n\t\t ->where_not_in( $this->primary_key, $id )\n\t\t ->get();\n\t\t$num = $query->num_rows();\n\t\tif ( $num == 0 ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function suid_PageAccess($getID){\r\n\t\r\n\tif(\r\n\t!is_array($_SESSION['suid']) && $_SESSION['suid']==$getID\r\n\t|| is_array($_SESSION['suid']) && in_array($getID,$_SESSION['suid'])\r\n\t){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}",
"function userExist($mid=null, $mlogin=null)\r\n\t\t{\r\n\t\t\tglobal $PDO;\r\n\t\t\tif($mid==null) $conds=\"login='\".$mlogin.\"'\";\r\n\t\t\telse $conds=\"id=\".$mid.\" OR login='\".$mlogin.\"'\";\r\n\t\t\t$param = array(\r\n\t\t\t\t'champs'=>'id',\r\n\t\t\t\t'conditions'=>$conds\r\n\t\t\t\t);\r\n\r\n\t\t\ttry{\r\n\t\t\t\tif($this->trouver($param)!=null){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\telse{ return false; }\r\n\t\t\t}\r\n\t\t\tcatch (PDOException $e){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}",
"public function exists(){\n\n\t\treturn (!empty($this->_data)) ? true : false;\n\n\t}",
"private function check_ID($id){\r\n\r\n $query = \"SELECT FROM users WHERE oauth_uid = ?\";\r\n $data = $this->_db->get_Row($query, $id);\r\n\r\n return ($this->_db->count_Rows($data) > 0) ? true : false;\r\n }",
"public function hasGuid(){\n return $this->_has(1);\n }",
"function userexist($field, $value)\n\t\t{\n\t\t\t$value = \"'\".$value.\"'\";\n\t\t\t\n\t\t\t$sql = $this->conn_id->query(\"select * from users where \".$field.\" = \".$value );\n\t\t\t$r = $sql->fetchALL(PDO::FETCH_ASSOC);\n\t\t\tif(!empty($r))\n\t\t\t{\n\t\t\t\t$sql = $this->conn_id->query(\"select name,hash_key from users where \".$field.\" = \".$value );\n\t\t\t\t$r = $sql->fetchALL(PDO::FETCH_ASSOC);\n\t\t\t\treturn $r;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn FALSE;\n\t\t}",
"public function exists($key){return array_key_exists($key,$this->items_array);}",
"function userExists($userId) {\n return getSingleValue(\"SELECT COUNT(`id`) FROM `private_users` WHERE `id` =\" . escape(intval($userId)) . \" LIMIT 0, 1\");\n }",
"public function existsField($key){ return array_key_exists($key,$this->field_map); }",
"public function hasData(){\n return $this->_has(10);\n }",
"public function hasData(){\n return $this->_has(10);\n }",
"function isvalidUser($uid, $sqlConnection)\r\n{ $result = array();\r\n\t$sqlSuccess = get_sql_results($result, $sqlConnection,\r\n\t\t\t\"select * from uc_users \".\r\n\t\t\t\"where id = '$uid'\");\r\n\treturn $sqlSuccess;\r\n}",
"function exists($key) {\n\t\treturn array_key_exists($key,$this->item);\n\t}",
"protected function dataExists($key)\n\t{\n\t\treturn isset($this->originalData[$key]);\n\t}",
"public function hasData(){\n return $this->_has(1);\n }",
"public function exist($key)\n {\n return isset($this->_data[$key]);\n }",
"function usr_has_profile($db, $uid) {\n $rv=0;\n $q='SELECT flags from user WHERE id='.intval($uid).';';\n $res=$db->query($q);\n if ($res) {\n $d=$res->fetch(PDO::FETCH_ASSOC);\n if ($d['flags'] & 1 ) $rv|=2;\n }\n $q='SELECT ukey from auth WHERE user_id='.intval($uid).';';\n $res=$db->query($q);\n if ($res) {\n $d=$res->fetch(PDO::FETCH_ASSOC);\n if (!empty($d['ukey'])) $rv|=1;\n }\n return $rv;\n }",
"public static function exists($data) { \n\n\t\t$start = Dba::escape(inet_pton($data['start'])); \n\t\t$end = Dba::escape(inet_pton($data['end'])); \n\t\t$type = self::validate_type($data['type']); \n\t\t$user = $data['user'] ? Dba::escape($data['user']) : '-1'; \n\n\t\t$sql = \"SELECT * FROM `access_list` WHERE `start`='$start' AND `end` = '$end' \" . \n\t\t\t\"AND `type`='$type' AND `user`='$user'\"; \n\t\t$db_results = Dba::read($sql); \n\n\t\tif (Dba::fetch_assoc($db_results)) { \n\t\t\treturn true; \n\t\t} \n\n\t\treturn false; \n\n\t}",
"function candelbl($uid,$bid)\n{\n $minfo = mysql_fetch_array(mysql_query(\"SELECT bowner FROM ibwf_blogs WHERE id='\".$bid.\"'\"));\n if(ismod($uid))\n {\n return true;\n }\n if($minfo[0]==$uid)\n {\n return true;\n }\n \n return false;\n}",
"function user_is($id) {\n $query =\"SELECT EXISTS(SELECT id FROM users WHERE id = '$id')\";\n $result = $this->conn->query($query);\n\n if (!$result) die (\"Database access failed: \" . $this->conn->error);\n\n $result->data_seek(0);\n if ($result->fetch_array(MYSQLI_NUM)[0]) {\n $result->close();\n return true;\n } else {\n $result->close();\n return false;\n }\n }",
"function userExists()\n\t{\n\t\t$uid = mysql_real_escape_string($_POST[\"uid\"]);\n\n\t\t$query = \"\n\t\t\tSELECT *\n\t\t\tFROM user\n\t\t\tWHERE uid='$uid';\";\n\n\t\t$result = mysql_query($query) or die(\"db access error\" . mysql_error());\n\n\t\t$exists = (mysql_numrows($result) == 1) ? true : false;\n\n\t\treturn $exists;\n\t}",
"function IfPurchased($uid, $fid)\n{\n\t$result = mysql_query(\"SELECT * FROM purchases WHERE uid='$uid' and fid='$fid'\") or die('can not find any purchases');\n\tif(mysql_num_rows($result) == 0) {\t\n\t\treturn false;\t\n\t} else {\n\t\treturn true;\n\t}\n}",
"public function exists() {\n\t\tglobal $config;\n\t\t\n\t\tif(!empty($this->data['id']))\n\t\t\t$where = 'id = '.$this->data['id'];\n\t\telseif(!empty($this->data['fbid']))\n\t\t\t$where = 'fbid = '.$this->data['fbid'];\n\t\n\t\t$result = $config['database']->query(\"\n\t\t\tSELECT id\n\t\t\tFROM nuusers\n\t\t\tWHERE $where\n\t\t\tLIMIT 1\n\t\t\");\n\t\t\n\t\treturn $result->num_rows;\n\t}",
"function isUsernameUsed($username) {\r\n $users = retrieveUsers(0);\r\n\r\n // Check if username already exist\r\n foreach ($users as $user) {\r\n if($user['username'] == $username) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}",
"public function hasUseradditem(){\n return $this->_has(24);\n }",
"public function hasData(string $key): bool\n {\n return isset($this->data[$key]);\n }",
"function get($uid) {\n\t}",
"function getUserVariable( $name, $valuekey ) {\n $d = loadDB();\n \n $found = false;\n foreach ($d['users'] as $key => $user) {\n if (strcmp($name, $user['name']) == 0 || \n strcmp($name, $user['email']) == 0 ) {\n //unset($d['users'][$key]);\n if (array_key_exists($valuekey, $d['users'][$key])) {\n \t return $d['users'][$key][$valuekey];\n } else\n\t return FALSE;\n }\n }\n return FALSE;\n }",
"public function hasAccount($key);",
"static function exists($id) {\n $result = self::get($id);\n if (count($result) > 0) return true;\n return false;\n }",
"public function is_unique($id, $feild, $value)\r\n {\r\n $results = parent::get_by($feild, $value);\r\n if ($results == null) {\r\n return true;\r\n } else {\r\n if ($results->id == $id) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }",
"function uidExists($conn, $uid, $email) {\n $sql= \"SELECT * FROM users WHERE user_uid = ? OR user_email = ?;\";\n $stmt = mysqli_stmt_init($conn);\n if (!mysqli_stmt_prepare($stmt, $sql)) {\n header(\"location: ../signup.php?error=stmtfailed\");\n exit();\n }\n\n mysqli_stmt_bind_param($stmt, \"ss\", $uid, $email);\n mysqli_stmt_execute($stmt);\n\n $resultData = mysqli_stmt_get_result($stmt);\n\n if ($row = mysqli_fetch_assoc($resultData)) {\n return $row;\n }\n else {\n $result = false;\n return $result;\n }\n\n mysqli_stmt_close($stmt);\n}",
"public function hasId(){\r\n return $this->_has(5);\r\n }",
"public function hasItemdata(){\n return $this->_has(22);\n }",
"function checkAction($id)\n\t{\n\t\t$check = $this->DB->database_select('users', 'uid', array('username' => session_get('username'), 'uid' => $id), 1);\n\t\treturn ($check != 0);\n\t}",
"public function hasSnapshotData() {}",
"function exists($key);",
"private function checkIsExists(): bool\n {\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => [\n $this->table. '.listId' => $this->listId,\n $this->table. '.campaignId' => $this->campaignId,\n ]\n ]);\n\n return !is_null($id);\n }",
"function does_id_exist($data1, $data2)\r\n\t{\r\n\t\tglobal $db;\r\n\t\t$query = 'SELECT spotlight_post_id FROM gv_spotlight_post WHERE (spotlight_post_block = 0) AND (spotlight_post_id = ' . $data1 . ' AND member_id = ' . $data2 . ')';\r\n\t\t$result = mysql_query($query, $db) or die(mysql_error($db));\r\n\t\t\r\n\t\tif(mysql_num_rows($result) > 0)\r\n\t\t{\r\n\t\t\t$post_exists = 1;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t\t$post_exists = 0;\r\n\t\t}\r\n\t\treturn $post_exists;\r\n\t}",
"public function getUserById($uid=''){\n if($uid!=''){//se ID USUARIO for informado\n\n $sql = new Sql();\n $res = $sql->select('SELECT * FROM usuarios WHERE id_usuario = :id_usuario',array(':id_usuario'=>$uid));\n if(count($res)==0){//se nada encontrado\n return 0;\n }else{\n return $res[0];//se usuario encontrado (retorna um array associativo com os dados dele)\n }\n \n }else{//se ID USUARIO não informado RETORNA FALSE\n return false;\n } \n\n }",
"function exists() {\n\t return !empty($this->id);\n\t}",
"public function hasItemdata(){\n return $this->_has(6);\n }",
"function automsgs($uid)\n{\n $getval = mysql_fetch_array(mysql_query(\"SELECT automsgs FROM ibwf_users WHERE id='\".$uid.\"'\"));\n if($getval[0]=='1')\n {\n return true;\n }else\n {\n return false;\n }\n}",
"public function hasId(){\n return $this->_has(17);\n }",
"public function isRegistered(){\n return isset($this->data['id']);\n }",
"public function itemExists($key);"
] | [
"0.7343773",
"0.71314883",
"0.70246536",
"0.68971515",
"0.68569654",
"0.6812673",
"0.67980164",
"0.65110916",
"0.64926165",
"0.6451642",
"0.6442927",
"0.64296246",
"0.64296246",
"0.64296246",
"0.64296246",
"0.64195865",
"0.640065",
"0.6399793",
"0.63959926",
"0.63454956",
"0.6337024",
"0.630522",
"0.62636566",
"0.62411034",
"0.6237851",
"0.62183845",
"0.62100434",
"0.6204446",
"0.6198102",
"0.61805904",
"0.61805904",
"0.61805904",
"0.61805904",
"0.61805904",
"0.61755645",
"0.61259156",
"0.61039114",
"0.61010474",
"0.6082521",
"0.60596913",
"0.60493886",
"0.6039889",
"0.60073614",
"0.6005606",
"0.6004677",
"0.59725255",
"0.5960254",
"0.59576154",
"0.5952827",
"0.5933844",
"0.59148824",
"0.59110564",
"0.58963",
"0.58909273",
"0.5876209",
"0.5874665",
"0.5870994",
"0.58659977",
"0.586385",
"0.58505714",
"0.58463436",
"0.584379",
"0.5843577",
"0.5842863",
"0.5842863",
"0.58387846",
"0.58387077",
"0.5838464",
"0.58281094",
"0.5826343",
"0.5817334",
"0.5815429",
"0.5802083",
"0.5801025",
"0.5791262",
"0.5777474",
"0.5775839",
"0.57670456",
"0.57574695",
"0.57521635",
"0.5745139",
"0.57445335",
"0.5740881",
"0.573795",
"0.57343155",
"0.5731165",
"0.5721881",
"0.571777",
"0.5716443",
"0.57160795",
"0.57105565",
"0.5708505",
"0.57057524",
"0.570185",
"0.56963825",
"0.56858957",
"0.56767374",
"0.5674567",
"0.5673805",
"0.56727916"
] | 0.72107875 | 1 |
Read datas with $uid key | public function read($uid)
{
$options = $this->getOptions();
$stmt = $this->adapter->query(
sprintf('SELECT %s FROM %s WHERE %s = "%s"',
$options['column_value'],
$options['table'],
$options['column_key'],
$uid
), Adapter::QUERY_MODE_EXECUTE
);
if($stmt->count() == 0) {
return false;
}
$current = $stmt->current();
$datas = $current->getArrayCopy();
$contents = array_shift($datas);
return unserialize($contents);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get($uid) {\n\t}",
"function interface_ar_usr_data_get($uid,$pid,$mid)\n\t\t\t{\n\t\t\t\t$sql = 'SELECT ar.*, usr.usr as name FROM '. $this->tbl_usr_ar.' AS ar, '.$this->tbl_usr.' AS usr WHERE ar.mid='.$mid.' AND ar.pid = '.$pid.' AND ar.uid=usr.id AND usr.id = '.$uid;\n\t\t\t\t$usr_ar = $this->DB->query($sql);\n\t\t\t\t//-- wurden die rechte von anderer seite geerbet ?\n\t\t\t\t$inherit_pid = (int)$usr_ar->f('inherit_pid');\n\t\t\t\tif ($inherit_pid > 0 && $inherit_pid != $pid)\n\t\t\t\t{\n\t\t\t\t\t$inheritet_from = $this->_get_path_print($inherit_pid);\n\t\t\t\t}\t\n\t\t\t\twhile($usr_ar->next()) \n\t\t\t\t{\n\t\t\t\t\t$data['info']['usr'][$usr_ar->f('uid')] = array\n\t\t\t\t\t(\n\t\t\t\t\t\t'name' => $usr_ar->f('name'),\n\t\t\t\t\t\t'ar' => $usr_ar->f('ar'),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t}",
"public function findByUid($uid);",
"public function find($uid)\r\n\t{\r\n\t\t$this->db->select()\r\n\t\t\t->from($this->getSource())\r\n ->where(\"uid = ?\");\r\n \r\n\t\t$this->db->execute([$uid]);\r\n\t\treturn $this->db->fetchInto($this);\r\n\t}",
"function getUserById($uid)\n {\n $stmt = self::$_db->prepare(\"SELECT u.id_user AS id_user, u.username AS username, u.firstname AS firstname, u.lastname AS lastname,u.image AS image FROM user AS u\n WHERE u.id_user=:uid\");\n $stmt->bindParam(\":uid\", $uid);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }",
"public function fetchUserData($uid) {\n $this->db->query(\"SELECT * FROM users WHERE id = :id\");\n $this->db->bind(':id', $uid);\n \n $result = $this->db->single();\n \n return $result;\n }",
"function readByUid($case){\n\n // select all query\n if($case==0) {\n $query = \"SELECT * FROM users WHERE fb_uuid=?\";\n } else if($case==1) {\n $query = \"SELECT * FROM users WHERE google_uuid=?\";\n }\n \n \n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind id of product to be updated\n if($case==0) {\n $stmt->bindParam(1, $this->fb_uuid);\n } else if($case==1) {\n $stmt->bindParam(1, $this->google_uuid);\n }\n \n // execute query\n $stmt->execute();\n \n // get retrieved row\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n \n // set values to object properties\n $this->id = $row['id'];\n $this->user_type = $row['user_type'];\n $this->name = $row['name'];\n $this->apellido = $row['apellido'];\n $this->username = $row['username'];\n $this->telefono = $row['telefono'];\n $this->fecha_nac = $row['fecha_nac'];\n $this->email = $row['email'];\n $this->password = $row['password'];\n $this->image = $row['image'];\n $this->fb_uuid = $row['fb_uuid'];\n $this->google_uuid = $row['google_uuid'];\n }",
"public function getUserData($userId);",
"public function findInfoByUid($uid){\n\t\t$sql = \"SELECT `id`, `name`, `cellphone`, `address` FROM `info` WHERE `uid` = ?\";\n\t\t$res = $this->connect()->prepare($sql);\n\t\t$res->bind_param(\"s\", $uid);\n\t\t$res->execute();\n\t\t$res->bind_result($id, $name, $cellphone, $address);\n\t\tif($res->fetch()) {\n\t\t\t$info = new \\stdClass();\n\t\t\t$info->id = $id;\n\t\t\t$info->name = $name;\n\t\t\t$info->cellphone = $cellphone;\n\t\t\t$info->$address = $address;\n\t\t\treturn $info;\n\t\t}\n\t\treturn NULL;\n\t}",
"function findOneMatchUid($uid);",
"public function allReadForUser($userId);",
"public function get_profile($uid){\r\n $query = \"SELECT members.mem_id, users.uid\r\n FROM members\r\n INNER JOIN users ON members.fk_users_id = users.uid\r\n WHERE uid = $uid\";\r\n \r\n $result = $this->db->query($query) or die($this->db->error); \r\n $user_data = $result->fetch_array(MYSQLI_ASSOC);\r\n \r\n }",
"function patientuser($uid)\n{\n\t$uquery=\"SELECT password FROM users WHERE userid='$uid'\";\n\t$uresults=getdata($uquery);\n\treturn $uresults;\n}",
"public function get(Uid $uid)\n {\n return $this->offsetGet($uid->serialized);\n }",
"function get_uid($uid){\n\t\t$this->uid = $uid;\n\t}",
"public function get_notes($uid){\n $sql = \"SELECT * FROM notes WHERE uid = :uid\";\n $stmt = $this->conn->prepare($sql);\n $stmt->execute(\n [\n 'uid'=>$uid\n ]\n );\n\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n\n\n }",
"function getUserInfo($uid)\r\n {\r\n $info = $this->DB->database_select('users', '*', array('uid' => $uid), 1);\r\n return $info;\r\n }",
"function fetch_user_info($uid){\n \n $uid = (int)$uid;\n \n $link = mysqli_connect(\"localhost\", \"root\", \"\", \"formstack1\");\n \n $sql = \"SELECT * from `users` where `user_id` = $uid\";\n \n $result = mysqli_query($link, $sql);\n \n $row= mysqli_fetch_array($result);\n \n\treturn mysqli_fetch_assoc($result);\n\t\n\t}",
"function nursesdata($uid)\r\n{\r\n\t$pquery=\"SELECT * FROM nurses WHERE userid='$uid'\";\r\n\t$presults=getdata($pquery);\r\n\treturn $presults;\r\n}",
"public function readUserAuth(){\n $user = new \\Filebase\\Database([\n 'dir' => $this->getDataSource()\n ]);\n\n if ($user->has($this->username)) {\n $item = $user->get($this->username);\n $data = [\n 'result' => $item->auth,\n 'attribute' => [\n 'username' => $this->username\n ],\n 'status' => 'success',\n 'message' => 'Data found!'\n ];\n } else {\n $data = [\n 'status' => 'error',\n 'message' => 'User not found!'\n ];\n }\n return $data;\n }",
"public function getUserData($userId)\n {\n\n $db = $this->getDb();\n\n $sql = <<<SQL\nSELECT\n core_person_rowid as person_id,\n core_person_firstname as firstname,\n core_person_lastname as lastname,\n buiz_role_user_name as user_name\nFROM\n view_person_role\nWHERE\n buiz_role_user_rowid = {$userId}\n\nSQL;\n\n // gleich den Datensatz zurückgeben\n return $db->select($sql)->get();\n\n }",
"function get_user_information($uid, $cid) {\r\n $this->db->select(\"*\");\r\n $this->db->from('users');\r\n $this->db->where('cid', $cid);\r\n $this->db->where('uid', $uid);\r\n $query = $this->db->get();\r\n if ($query->num_rows >= 1) {\r\n return $query->row_array();\r\n }\r\n }",
"function getPageData($uid) {\n\t\treturn $this->sys_page->getPageOverlay( $this->sys_page->getPage( $uid ), $GLOBALS['TSFE']->sys_language_uid );\n\t}",
"function fetch_user_by_id($id) {\n if(!cache_isset('taxi_!uid_'.$id)) {\n if(cache_isset('taxi_uid_'.$id)) {\n return cache_get('taxi_uid_'.$id);\n } else {\n global $DB;\n connect_db();\n $result=$DB->users->findOne(['id'=>$id]);\n if(is_array($result)) {\n cache_set('taxi_uid_'.$id,$result);\n } else {\n cache_set('taxi_!uid_'.$id,true)\n }\n return $result;\n }\n }\n}",
"public static function loadByUid(\n $uid\n ) {\n return self::loadBySql(\"SELECT * FROM \".Config::DB_DB.\".\".Config::AUTH_TABLE.\" WHERE uid = '$uid'\");\n }",
"function get_info($uid, $what)\r\n\t{\r\n\t\t$this->db->select($what);\r\n\t\t$this->db->where('uid', $uid);\r\n\t\t$query = $this->db->get('users');\r\n\r\n\t\t$result = $query->result();\r\n\r\n\t\tif($query->num_rows() == 1)\r\n\t\t{\r\n\t\t\treturn $result[0]->$what;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"public function retrieve_user($user)\n{\t\t\n $uid=$user->__get('uid');\n\t$con = connect();\n\t$q1 = mysqli_query($con, \"SELECT * FROM user WHERE UId = '$uid'\");\n\treturn $q1;\n}",
"public function read(){\n\t\t$this->_getDAO(false);\n\t\tif($array = $this->dao->read($this->user->getID(), $this->ident)){\n\t\t\t$this->_setFromArray($array);\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function getUser($uid){\n \n $stmt = $this->con->prepare(\"SELECT fullname, phone_no, email, login_with, approval FROM users WHERE uid = ?\");\n $stmt->bind_param(\"s\", $uid);\n $stmt->execute();\n $stmt->bind_result($fullname, $phone_no, $email, $login_with,$approval);\n if($stmt->fetch()){ \n $user = array(); \n $user['uid'] = $uid; \n $user['fullname'] = $fullname; \n $user['phone_no'] = $phone_no; \n $user['email']=$email;\n $user['login_with']=$login_with;\n $user['approval']=$approval;\n return $user; \n }\n return null;\n }",
"public function loadByUserId($uid)\n {\n $record =& $this->getTable();\n if ($record->load_by_user_id((int)$uid)) {\n $this->id = $record->id;\n $this->userId = $record->user_id;\n $this->profileId = $record->profile_id;\n $this->paymentId = $record->payment_id;\n $this->shippingId = $record->shipping_id;\n }\n }",
"public function getDataWithTypeLeveluid() {}",
"abstract protected function fetchData( $identifier );",
"function getByUser($uid) {\n // Run the query and get the user details\n $query = sprintf(\"SELECT p.id,\n p.uid,\n p.typeid,\n p.amount,\n p.token,\n p.createdOn,\n pt.desc\n FROM Payments p\n INNER JOIN PaymentTypes pt ON pt.id = p.typeid\n WHERE p.uid=%u\n ORDER BY p.createdOn DESC\",\n $uid);\n\n $conn = \\DB\\getConnection();\n $result = $conn->query($query);\n\n return $result;\n}",
"public function read_by_id(){\n try {\n $userid = $this->id;\n\n // query to get specific users\n $this->_query = \"SELECT * FROM \" . $this->_dbtable . \" WHERE id=:userid\";\n\n\n // preparing query\n $statement = $this->_conn->prepare($this->_query);\n\n //binding params\n $statement->bindParam(\":userid\", $userid, PDO::PARAM_INT);\n\n // executing query\n $statement->execute();\n\n return $statement;\n }\n catch(PDOException $ex){\n echo \"Error\" . $ex->getMessage();\n }\n }",
"private function getAllUserId()\n {\n $input=$this->readFromLocalFile();\n $tempArray = json_decode($input);\n $userId = [];\n foreach($tempArray as $key=>$array)\n {\n if($array->type == 'user')\n {\n $userId[] = $array->id;\n }\n }\n return $userId;\n }",
"public function getUserById($uid=''){\n if($uid!=''){//se ID USUARIO for informado\n\n $sql = new Sql();\n $res = $sql->select('SELECT * FROM usuarios WHERE id_usuario = :id_usuario',array(':id_usuario'=>$uid));\n if(count($res)==0){//se nada encontrado\n return 0;\n }else{\n return $res[0];//se usuario encontrado (retorna um array associativo com os dados dele)\n }\n \n }else{//se ID USUARIO não informado RETORNA FALSE\n return false;\n } \n\n }",
"function getUserInfo($uid)\n {\n $rs = db()->select(\n 'user.username, user.password, attrib.*'\n , [\n '[+prefix+]manager_users user',\n 'INNER JOIN [+prefix+]user_attributes attrib ON ua.internalKey=user.id'\n ]\n , sprintf(\"user.id='%s'\", db()->escape($uid))\n );\n if (db()->count($rs) == 1) {\n $row = db()->getRow($rs);\n if (!isset($row['usertype'])) {\n $row['usertype'] = 'manager';\n }\n if (!isset($row['failedlogins'])) {\n $row['failedlogins'] = 0;\n }\n return $row;\n }\n return false;\n }",
"public static function findByUid($uid)\n {\n return self::where('uid', '=', $uid)->first();\n }",
"public static function findByUid($uid)\n {\n return self::where('uid', '=', $uid)->first();\n }",
"public function findByIdentifier(int $uid = 0): array\n {\n return $this->findByUid($uid);\n }",
"public function findByUid($uid)\n {\n return $this->findByIdentifier($uid);\n }",
"public function findByUid($uid)\n {\n return $this->findByIdentifier($uid);\n }",
"abstract protected function _read($id = NULL);",
"public function selectTaxDataByUid($uid) {\n \n // query preparation\n $select = 'NUMMER, STEUERSATZCODE, STEUERSATZPROZ, GUELTIGABTTMMJJJJ'.\n ($this->oldTaxTableExists() == true ? ', st.BEMERKUNG AS BEMERKUNG' : '').' ';\n $from = $this->getTableName('BHSTEUER').' bh'. \n ($this->oldTaxTableExists() == true ? ' LEFT JOIN '.$this->getTableName('STEUER').' st ON bh.STEUERSATZCODE LIKE st.CODE' : '');\n $where = 'bh.NUMMER = '.intval($uid);\n $groupBy = '';\n $orderBy = '';\n $limit = '';\n \n // exec query using TYPO3 DB API\n $res = $this->gsaDbObj->exec_SELECTquery($select, $from, $where, $groupBy, $orderBy, $limit);\n if ($res == false) {\n throw new tx_pttools_exception('Query failed', 1, $this->gsaDbObj->sql_error());\n }\n \n $a_row = $this->gsaDbObj->sql_fetch_assoc($res);\n $this->gsaDbObj->sql_free_result($res);\n \n // if enabled, do charset conversion of all non-binary string data \n if ($this->charsetConvEnabled == 1) {\n $a_row = tx_pttools_div::iconvArray($a_row, $this->gsaCharset, $this->siteCharset);\n }\n \n trace($a_row); \n return $a_row;\n \n }",
"function interface_ar_grp_data_get($gid,$pid,$mid)\n\t\t\t{\n\t\t\t\t$sql = 'SELECT ar.*, usr.usr as name FROM '. $this->tbl_usr_ar.' AS ar, '.$this->tbl_usr.' AS usr WHERE ar.mid='.$mid.' AND ar.pid = '.$pid.' AND ar.uid=usr.id AND usr.id = '.$uid;\n\t\t\t\t\n\t\t\t\t\t$sql = 'SELECT ar.*, grp.name FROM '. $this->tbl_grp_ar.' AS ar, '.$this->tbl_grp.' AS grp '.\n\t\t\t\t\t\t\t\t' WHERE ar.mid='.$mid.' AND ar.pid='.$pid.' AND ar.gid=grp.id AND grp.id = '.$gid;\n\t\t\t\t\n\t\t\t\t$usr_ar = $this->DB->query($sql);\n\t\t\t\t//-- wurden die rechte von anderer seite geerbet ?\n\t\t\t\t$inherit_pid = (int)$usr_ar->f('inherit_pid');\n\t\t\t\tif ($inherit_pid > 0 && $inherit_pid != $pid)\n\t\t\t\t{\n\t\t\t\t\t$inheritet_from = $this->_get_path_print($inherit_pid);\n\t\t\t\t}\t\n\t\t\t\twhile($usr_ar->next()) \n\t\t\t\t{\n\t\t\t\t\t$data['info']['usr'][$usr_ar->f('uid')] = array\n\t\t\t\t\t(\n\t\t\t\t\t\t'name' => $usr_ar->f('name'),\n\t\t\t\t\t\t'ar' => $usr_ar->f('ar'),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t}",
"public function readObject($_UUID) {\n $sql = \"SELECT * FROM spartandata WHERE UUID = '$_UUID'\";\n $dataEntry = self::$conn->query($sql);\n\n if ($dataEntry->num_rows > 0) {\n while ($row = $dataEntry->fetch_assoc()) {\n echo \" ID: \" . $row[\"ID\"] . \" UUID: \" . $row[\"UUID\"] . \" Color: \" . $row[\"Color\"] . \"<br>\";\n }\n } else {\n echo \"Element Not Found\";\n }\n }",
"private function getUserDataById($userId) {\n\n $sql = 'SELECT * FROM user_table WHERE user_id = ?';\n if ($statement = $this->db->prepare($sql)) {\n $statement->bind_param('s', $userId);\n $statement->execute();\n $result = $statement->get_result();\n $row = $result->fetch_array(MYSQLI_ASSOC);\n $statement->close();\n return $row;\n\n } else {\n ChromePhp::log('Error in getUserDataById');\n }\n }",
"public function getFiles($uid) {\n\n\t\t$uid = $_SESSION['userid'];\n\t\t$this->pdo = config_db::getConnected();\n\n\t\t$statement = $this->pdo->prepare(\"SELECT * FROM files f\n INNER JOIN user_files uf ON (uf.fileid = f.id)\n INNER JOIN users u ON (uf.uid = u.id)\n WHERE uf.uid = :uid\");\n\t\t$result = $statement->execute(array('uid' => $uid));\n\t\t$rows = $statement->fetchAll(PDO::FETCH_ASSOC);\n \n\t\t$fileinfo = array();\n\t\tforeach($rows as $row) {\n\t $fileinfo[] = $row;\n }\n\n\t\treturn $fileinfo;\n\t}",
"function LgetUserSessionTrackerRec($uid)\n{\n\t$userSessionRec = \"\";\n\tif (file_exists(\"../\" . SESSIONTRACKER)){\n\t\t// file exists\n\t\t$trackerFile = file(\"../\" . SESSIONTRACKER);\n\t\tfor( $i = 0; $i < sizeof($trackerFile); $i++ ){\n \t\t$pieces = explode(INTERNAL_DELIMITER, $trackerFile[$i]);\n\t\t\tif ( ($uid == $pieces[0]) ){\n\t\t\t\t// found record,\n\t\t\t\treturn $trackerFile[$i];\n \t\t}\n\t\t}\n\t}\n\n\treturn $userSessionRec;\n\n}",
"public static function getUserInfo($uid) {\n $info = array();\n \n if (!$json = @file_get_contents(self::$directory_url . '?uid=' . $uid . '&format=json')) {\n return $info;\n }\n \n if (!$json = json_decode($json, true)) {\n return $info;\n }\n \n $map = array(\n 'givenName' => 'first_name',\n 'sn' => 'last_name',\n 'mail' => 'email'\n );\n \n foreach ($map as $from => $to) {\n if (isset($json[$from][0])) {\n $info[$to] = $json[$from][0];\n }\n }\n \n return $info;\n }",
"public function getData() {\n\t\t$id = $this->user;\n\t\t$this->db->query( 'SELECT * FROM users WHERE crsid = :id' );\n\t\t$this->db->bind( ':id', $id );\n\t\t$row = $this->db->single();\n\n\t\tif ( ! $row[\"name\"] ) {\n\t\t\t$ds = ldap_connect( \"ldap.lookup.cam.ac.uk\" );\n\t\t\t$lsearch = ldap_search( $ds, \"ou=people,o=University of Cambridge,dc=cam,dc=ac,dc=uk\", \"uid=\" . $id . \"\" );\n\t\t\t$info = ldap_get_entries( $ds, $lsearch );\n\t\t\t$name = $info[0][\"cn\"][0];\n\t\t\t$this->db->query( 'UPDATE users SET name=:name WHERE crsid=:id' );\n\t\t\t$this->db->bind( ':id', $id );\n\t\t\t$this->db->bind( ':name', $name );\n\t\t\t$this->db->execute();\n\t\t\t$row[\"name\"] = $name;\n\t\t}\n\n\t\treturn $row;\n\t}",
"public function read ($id, &$data) {\r\n\t\t//Precondition: $ id not null\r\n\t\t$pdo = Database::connect();\r\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\t\t$sql = \"SELECT * FROM tdg_users where id = ?\";\r\n\t\t$q = $pdo->prepare($sql);\r\n\t\t$q->execute(array($id));\r\n\t\t$data = $q->fetch(PDO::FETCH_ASSOC);\r\n\t\tDatabase::disconnect();\r\n\t}",
"public function findByUid(int $uid = 0): array\n {\n /** @var \\TYPO3\\CMS\\Core\\Database\\Query\\QueryBuilder $queryBuilder */\n $queryBuilder = $this->getQueryBuilder();\n\n // default\n $queryBuilder->where(\n $queryBuilder->expr()->eq('uid',\n $queryBuilder->createNamedParameter(\n $uid, Connection::PARAM_INT\n )\n )\n );\n\n $queryBuilder->setMaxResults(1);\n $result = $this->_find($queryBuilder);\n return $result[0];\n }",
"function read($id)\n {\n }",
"public function findPhotoByUid($uid){\n $sql = \"SELECT `id` FROM `photo` WHERE `uid` = ?\";\n $res = $this->connect()->prepare($sql);\n $res->bind_param(\"s\", $uid);\n $res->execute();\n $res->bind_result($pid);\n if($res->fetch()) {\n return $pid;\n }\n return FALSE;\n }",
"public function get_information($uid)\n {\n $result = (new AccountTableControl())->select_rows_by_condition(['uid' => $uid]);\n\n if (count($result) < 1)\n return array();\n $result = $result[0];\n $result['class'] = (new SchoolClassTableControl())->getSchoolClassByUid($uid);\n $result['study'] = [];\n $result['study']['total'] = (new StudyDurationTableControl())->get_total_student_study_time($uid);\n $result['study']['this_month'] = (new StudyDurationTableControl())->get_this_month_study_time($uid);\n return $result;\n }",
"public function read_single_user() {\n //Create query\n $query = 'SELECT vendor_id, latitude, longitude, time, type FROM ' . $this->table_name . ' WHERE vendor_id = ?';\n\n //Prepare statement\n $stmt = $this->conn->prepare($query);\n //Clean lowercase.\n //Bind UID\n $stmt->bindParam(1, $this->vendor_id);\n\n //Execute query\n $stmt->execute();\n\n return $stmt;\n }",
"function getuserdetails($u_id)\n{\n\t$sql=\"select * from user_table where u_id=$u_id\";\n\tforeach($GLOBALS['db']->query($sql) as $row);\n\treturn $row;\n}",
"function getDeviceDetailsfunction($userId){\r\n global $pdo;\t\r\n\t\t$select = $pdo->prepare(\"SELECT device_registry.* \r\n FROM users \r\n LEFT JOIN device_registry ON users.device=device_registry.id \r\n\t\t\t\t WHERE users.id = ?\");\r\n\t\t$select->execute(array($userId));\r\n\t\t$result_array = $select->fetch(PDO::FETCH_ASSOC);\r\n\t\treturn $result_array;\r\n\t}",
"function get_owned_by_uid($uid) {\n\t\t$data = $this->db->query('SELECT event_id FROM event_owner WHERE owner_id='.$uid.'');\n\t\treturn $data->result();\n\t}",
"public function fetchByUid($uid){\n \t//Zend_Debug::dump($uid);die();\n \t$data = new LettingAgents_Object_AgentApplication();\n \t$select = $this->select()\n ->from($this->_name)\n\t\t\t->where('uid = ?', $uid);\n\t\t \n // die($select->__toString());\n $row = $this->fetchRow($select);\n if($row){\n\t \t$data->set_id($row['id']);\n\t $data->set_uid($row['uid']);\n\t $data->set_is_previous_client($row['is_previous_client']);\n\t $data->set_campaign_code($row['campaign_code']);\n\t $data->set_legal_name($row['legal_name']);\n\t $data->set_trading_name($row['trading_name']);\n\t $data->set_organisation_type($row['organisation_type']);\n\t $data->set_date_established($row['date_established']);\n\t $data->set_is_associated($row['is_associated']);\n\t $data->set_associated_text($row['associated_text']);\n\t $data->set_company_registration_number($row['company_registration_number']);\n\t $data->set_contact_name($row['contact_name']);\n\t $data->set_contact_number($row['contact_number']);\n\t $data->set_contact_email($row['contact_email']);\n\t $data->set_current_referencing_supplier($row['current_referencing_supplier']);\n\t $data->set_number_of_branches($row['number_of_branches']);\n\t $data->set_number_of_employees($row['number_of_employees']);\n\t $data->set_number_of_landlords($row['number_of_landlords']);\n\t $data->set_number_of_lets($row['number_of_lets']);\n\t $data->set_fax_number($row['fax_number']);\n\t $data->set_company_website_address($row['company_website_address']);\n\t \n\t return($data);\n }\n return false;\n \n \n }",
"function getUserData($idUser,$idData){\n\n $usr_q = listAll(\"user_det\", \"WHERE id_user = '$idUser' AND id_data = '$idData'\");\n\n $usr_data = mysql_fetch_object($usr_q);\n return $usr_data;\n\t\n}",
"function nurseuser($uid)\r\n{\r\n\t$uquery=\"SELECT password FROM users WHERE userid='$uid'\";\r\n\t$uresults=getdata($uquery);\r\n\treturn $uresults;\r\n}",
"public function getByUid(int $uid): array\n {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');\n $row = $queryBuilder->select('uid', 'pid', 'list_type', 'pi_flexform', 'sys_language_uid')\n ->from('tt_content')\n ->where(\n $queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($uid, \\PDO::PARAM_INT))\n )\n ->execute()\n ->fetch();\n if (!$row) {\n $row = [];\n }\n return $row;\n }",
"function load_mail($uid) {\n//\t\t\t\t\tarray($idMail))->row();\n//\t\tif ($mail->to_uid == $uid || $mail->from_uid == $uid) return $mail;\n//\t\telse return FALSE;\n\t\t$cuid = $this->user->uid();\n\t\treturn $this->db->query(\"SELECT * FROM Mail \n\t\t\t\t\tWHERE (from_uid=? AND to_uid=?) OR (from_uid=? AND to_uid=?)\n\t\t\t\t\tORDER BY idMail\",\n\t\t\t\t\tarray($uid, $cuid, $cuid, $uid))->result();\n\t}",
"function read($keys,$extra_cols='',$join='')\n\t{\n\t\tif (!parent::read($keys,$extra_cols,$join))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (($id = (int)$this->data[$this->db_key_cols[$this->autoinc_id]]) && $this->customfields &&\n\t\t\t($cfs = $this->read_customfields($id)))\n\t\t{\n\t\t\t$this->data = array_merge($this->data,$cfs[$id]);\n\t\t}\n\t\treturn $this->data;\n\t}",
"public function read($user_id = 0) {\r\n if ($user_id !== 0) {\r\n return $this->readByID($user_id);\r\n } else {\r\n return $this->readAll();\r\n }\r\n \r\n }",
"public function getUserInfo($uid) {\n // get user avatar information of song adder\n $_user_nickname = '';\n $_user_avatar_url = '';\n if (!empty(Yii::app()->params['user_default_setting']) && is_array(Yii::app()->params['user_default_setting'])) {\n $_user_nickname = Yii::app()->params['user_default_setting']['nickname'];\n $_user_avatar_url = Yii::app()->createAbsoluteUrl('//') . '/avatar/' . Yii::app()->params['user_default_setting']['avatarurl'];\n }\n $_user = PlatformUser::model()->findByPk($uid);\n if (!is_null($_user)) {\n $_auth_type = strtoupper($_user['auth_type']);\n if (in_array($_auth_type, $this->_other_auth_types)) {\n $_user_nickname = '';\n $_user_avatar_url = '';\n } else if ($_auth_type == ApiController::DEFAULT_AUTH_TYPE) {\n $_user_nickname = empty($_user->display_name) ? $_user_nickname : $_user->display_name;\n $_user_avatar_url = '';\n } else {\n $_user_nickname = empty($_user->display_name) ? $_user_nickname : $_user->display_name;\n $_user_avatar_url = empty($_user->avatar_url) ? $_user_avatar_url : $_user->avatar_url;\n }\n } else {\n $_user_nickname = '';\n $_user_avatar_url = '';\n }\n\n return array('uid' => intval($uid), 'nickname' => $_user_nickname, 'avatarurl' => $_user_avatar_url);\n }",
"public static function getUserInfo($uid)\n {\n $info = array();\n \n if (!$json = @file_get_contents(self::$directory_url . '?uid=' . $uid . '&format=json')) {\n return $info;\n }\n \n if (!$json = json_decode($json, true)) {\n return $info;\n }\n \n $map = array(\n 'givenName' => 'first_name',\n 'sn' => 'last_name',\n 'mail' => 'email'\n );\n \n foreach ($map as $from => $to) {\n if (isset($json[$from][0])) {\n $info[$to] = $json[$from][0];\n }\n }\n \n return $info;\n }",
"function get_data_by_id(){\n\t\tglobal $db;\n\t\t$data=array();\n\t\tif($this->id!=''){\n\t\t\t$sql=\"SELECT * FROM $this->table where id = ? \";\n\t\t\t$db->query($sql, array($this->id));\n\t\t\t$data=$db->fetch_assoc();\n\t\t\t}else{\n\t\t\t $data['id']='0'; $data['email']='';\n\t }\n return $data;\n\t}",
"public function getSomeDataByUserId($userId)\n {\n self::connectToDB(); /* Using DB connection */\n\n $this->sql = \"SELECT firstname, lastname, email, image_path FROM users WHERE id = ?\";\n\n try\n {\n $this->query = $this->handler->prepare($this->sql);\n $this->query->execute(array($userId));\n $this->result = $this->query->fetchAll(PDO::FETCH_ASSOC);\n\n /**\n * Closing DB connection\n */\n $this->query->closeCursor();\n $this->handler = null;\n\n return $this->result[0];\n }\n catch (Exception $e)\n {\n echo \"Error: query failure\";\n return false;\n }\n }",
"protected static function basicUserInfo($uid){\n\t\t$user = Usuario::find($uid);\n\t\t// Informacion compartida por todos los usuarios\n\t\t$userData['id'] \t\t= $user->id;\n\t\t$userData['names'] \t\t= $user->nombres;\n\t\t$userData['lastnames'] \t= $user->apellidos;\n\t\t$userData['full_name'] \t= $user->full_name;\n\t\t$userData['email']\t\t= $user->correo;\n\t\t$userData['gender'] \t= $user->genero_id == 1 ? 'Femenino' : 'Masculino';\n\t\t$userData['cellphone'] \t= $user->celular;\n\t\t$userData['terms_use'] \t= $user->terminos_uso == 1 ? true : false;\n\t\t$userData['birth_date'] = $user->fecha_nacimiento;\n\t\t$userData['created_at'] = $user->fecha_creacion->toDateTimeString();\n\t\t$userData['is_active'] = $user->activo;\n\t\t$userData['city'] \t\t= $user->city($user->ciudad_id);\n\t\t$userData['genre'] \t\t= $user->genre($user->genero_id);\n\t\t$userData['zone'] \t\t= $user->zone != NULL ? $user->zone->nombre : NULL;\n\t\t$userData['image'] \t= $user->image != NULL ? [\n\t\t\t\t\t\t\t\t'id'\t=> $user->image->id,\n\t\t\t\t\t\t\t\t'name'\t=> $user->image->nombre_archivo\n\t\t\t\t\t\t\t\t] : false;\n\t\t$userData['bio'] \t\t= $user->biography != NULL ? [\n\t\t\t\t\t\t\t\t'id'\t=> $user->biography->id,\n\t\t\t\t\t\t\t\t'name'\t=> $user->biography->descripcion\n\t\t\t\t\t\t\t\t] : false;\n\t\t$userData['role_id'] = $user->role($user->id)->rol_id;\n\t\treturn [$userData, $user];\n\t}",
"public function get_uid($user)\n{\t\t\n\t$uname = $user->__get('uname');\n\t$con = connect();\n\t$q1 = mysqli_query($con, \"SELECT * FROM user WHERE Uname = '$uname'\");\n\t$res = mysqli_fetch_array($q1);\n\t$uid= $res['UId'];\n\treturn $uid;\n}",
"abstract function getdata();",
"public function getByUid($uid)\n {\n $storage = array_values($this->storage);\n foreach ($storage as $item) {\n /* @var $galleryItem GalleryItem */\n $galleryItem = $item['obj'];\n\n if ((string) $uid === (string) $galleryItem->getUid()) {\n return $galleryItem;\n }\n }\n\n return null;\n }",
"public function getData( $sID )\n\t{\n\t\t$sSQL\t= \"SELECT * FROM \" . $this->table . \" WHERE usr='\" . $sID . \"' LIMIT 1\";\n\t\t\n\t\t$this->oDB->query( $sSQL );\n\t\t\n\t\treturn $this->member = $this->oDB->row();\n\t}",
"public function UserDataShort($nickname = '') {\n // return $this->userClass->UserDataShort($nickname);\n /*$root = $_SERVER['DOCUMENT_ROOT'];\n $visitor = $_SESSION['nickname'];\n $dirname = $root . '/users/_' . $nickname . '/';\n\n if ($nickname = ''){\n $userClassFile = glob('*.txt');\n } else {\n $userClassFile = glob($dirname . '*.txt');\n }\n $contents = file_get_contents($userClassFile['0']);\n return $owner = unserialize($contents);*/\n }",
"function getDoubanInfobyId($uid){\n global $db_php_path;\n require_once($db_php_path);\n $result = mysql_query(\"select doubanid,dname,dackey,dacsec from user where id='$uid';\");\n if(!$result){\n die(\"query error\".mysql_error());\n return;\n }\n $row = mysql_fetch_row($result);\n $a = array(\"doubanid\"=>$row[0],\"dname\"=>$row[1],\"dackey\"=>$row[2],\"dacsec\"=>$row[3]);\n return $a;\n}",
"private function read($key){\r\n}",
"public function get_admindetails($uid){\n \n \t\t$sql3=\"SELECT * FROM admin WHERE admin_id =$uid\";\n\t $result3 = mysqli_query($this->db,$sql3);\n\t $admin_data = mysqli_fetch_array($result3);\n\t $this->a_name= $admin_data['name'];\n $this->a_password= $admin_data['password'];\n $this->a_type= $admin_data['admin_type'];\n $this->a_journal_id= $admin_data['journal_id'];\n return true;\n \t}",
"public function findUserByUid($uid){\n $sql = \"SELECT `uid`, `nickname`, `openid` FROM `user` WHERE `uid` = ?\";\n $res = $this->connect()->prepare($sql);\n $res->bind_param(\"s\", $uid);\n $res->execute();\n $res->bind_result($uid, $nickname, $openid);\n if($res->fetch()) {\n $user = new \\stdClass();\n $user->uid = $uid;\n $user->nickname = $nickname;\n $user->openid = $openid;\n return $user;\n }\n return NULL;\n }",
"public function readByUser(){\n //select all query\n $query = \"SELECT * FROM \" . $this->table_name . \" WHERE id_user=:id_user\";\n\n //perpare query\n $stmt = $this->conn->prepare($query);\n\n //sanitize\n $this->id_user=htmlspecialchars(strip_tags($this->id_user));\n\n //bind given value\n $stmt->bindparam(\":id_user\", $this->id_user);\n\n $stmt->execute();\n\n return $stmt;\n }",
"public function getDataByDatabase()\n {\n $condition = [\n ['user_id', '>', '39454']\n ];\n db()->table('tp_users')->where($condition)->cache('userList', 60)->select();\n $data = Cache::get('userList');\n dump($data);die;\n }",
"public function get_user_details_id($view_id){\r\n $user = $this->collection->user->find( [ 'user_id' => $view_id ] );\r\n $name = '';\r\n $result = array();\r\n $flag = false;\r\n \r\n foreach ($user as $entry) {\r\n $flag = true;\r\n //$entry['name'];\r\n array_push($result,$entry);\r\n }\r\n if($flag){\r\n return $result;\r\n }\r\n else{\r\n return false;\r\n }\t\t\r\n\t}",
"public function getUserData($userID)\n {\n return Filesystem::getUserInformation($userID);\n }",
"public function read($key) {}",
"public function read($user, $ident);",
"public function getPostByUid($uid)\n\t{ //echo $uid;\n\t\t$userController = new UserController(); \t\t \n\t\t$roleController = new RoleController(); \n $data['otherUserTimelinePosted']=new ConnectionTimelinePost();\n\n $timelinePost['timeline_post'] =TimelinePost::whereIn('id', ConnectionTimelinePost::select('post_id')->where('posted_on_user_id','=',$uid)->get()) \n ->orwhere('user_id','=',$uid) \n ->orderBy('created_at','DESC') \n ->paginate(30);\n \n \n\t\t$userInfo = $userController->getUserInformationById($uid);\n if(sizeof($userInfo)>0){\n\t\t$timelinePost['user_name'] = $roleController->getRoleName($userInfo['role_id']).' '.$userInfo['name'];\n }\n\t\treturn $timelinePost;\n\t}",
"public static function getUser($uid)\n\t{\n\t\tif (!intval($uid)) return false;\n\t\treturn self::_getDao()->get(intval($uid));\n\t}",
"public function getRecord($uid,$did){\n\n\t\t// get database\n\t\t$db = JFactory::getDBo();\n\n\t\t$query = $db->getQuery(true);\n\t\t$query ->select('*')\n\t\t\t ->from($this->name)\n\t\t\t\t->where(array(\n\t\t\t\t\t'user_id='.(int)$uid,\n\t\t\t\t 'discount_id='.(int)$did\n\t\t\t\t ))\n\t\t\t\t->limit(1);\n\t\t$db->setQuery($query);\n\n\t\treturn $db->loadObject();\n\t}",
"public function getRecordByKeyUserId($userId, $key)\n\t{\n\t\t$sql =\n\t\t'\n\t\t\tSELECT\n\t\t\t\tfolder.* \n\t\t\tFROM\n\t\t\t\tfolder\n\t\t\tWHERE\n\t\t\t\tfolder.user_id = ' . $userId . '\n\t\t\t\t\tAND\n\t\t\t\tfolder.keyword = \\'' . $key . '\\'';\n\n\t\t$response = self::findBySql($sql)->one();\n\t\tif(isset($response) && $response != null) {\n\t\t\treturn $response;\n\t\t}\n\n\t\treturn NULL;\n\t}",
"public function getUserData($id){\n\n \t\t\n \t\t$q = \"SELECT * FROM user_table WHERE id='$id' \";\n\n \t\t$result = $this->connection->query($q);\n\n \t\tif($result->num_rows > 0){\n\n \t\t\t$row = mysqli_fetch_assoc($result);\n\n \t\t}\n\n \t\treturn $row;\n\n \t}",
"public static function getInfo($selected_uid) {\n\t$sql=<<<EOM\n\t select username, profile_fields as image\n\t from users\n\t where id = '$selected_uid'\n\t limit 1;\nEOM;\n $query = DB::query($sql);\n $result = $query->execute();\n return $result[0];\n }",
"function MyApp_Session_SID_Read($sid)\n {\n $this->Session=$this->Sql_Select_Hash\n (\n array\n (\n \"SID\" => $sid\n ),\n array(),\n TRUE,\n $this->GetSessionsTable()\n );\n }",
"public function init($uid) {\n\t\t$this['uid'] = $uid;\n\t\t$this->fetchDetails();\n\t}",
"function getDataFromId($id)\n {\n return $this->db->get_where('users', ['id' => $id])->row_array();\n }",
"public function getBindFd($uid)\n {\n $field = $this->setRedisField($uid);\n $data = $this->redisObj->hGet($this->redisTable, $field);\n\n\n return $data;\n }",
"function get_by_key($key,$id){\n\t\t$data = array();\n\t\t$sql = \"SELECT * FROM dinamic_media WHERE media_key='\".$key.\"' AND media_keyid=\".$id;\n\t\t$data = $this->mysql->get_data($sql,'clean');\n\t\treturn $data;\n\t}",
"function readByUserID($id){\n try {\n Log::info(\"Entering EducationDataService.readByUserID()\");\n \n //use the connection to create a prepared statement\n $stmt = $this->conn->prepare(\"SELECT * FROM `EDUCATION` WHERE USERS_ID = :id\");\n \n //Bind the variables to the SQL statement\n $stmt->bindParam(':id', $id);\n \n //execute the SQL statement\n $stmt->execute();\n \n //check is a row was returned\n if($stmt->rowCount() == 0){\n Log::info(\"Exiting EducationDataService.readByUserID() with returning null\");\n return null;\n }\n else{\n //create an education array\n $edu_array = array();\n \n //loop to get all the education data to put into the array\n while ($edu = $stmt->fetch(PDO::FETCH_ASSOC)){\n \n array_push($edu_array, $edu);\n \n }\n \n Log::info(\"Exiting EducationDataService.readByUserID() with returning a education array\");\n return $edu_array;\n }\n }\n catch (PDOException $e){\n Log::error(\"Exception: \", array(\"message\" => $e->getMessage()));\n throw new DatabaseException(\"Database Exception: \" . $e->getMessage(), 0, $e);\n }\n }",
"public function getUserData($userID)\n {\n return DB::table('users')->where('user_id', '=', $userID);\n }"
] | [
"0.7250458",
"0.70012474",
"0.6920825",
"0.656371",
"0.65244985",
"0.64885044",
"0.64695424",
"0.6227775",
"0.62047243",
"0.61790687",
"0.6177889",
"0.61372477",
"0.6105012",
"0.6088389",
"0.60429174",
"0.6037344",
"0.60302305",
"0.60037416",
"0.5989605",
"0.59487116",
"0.5943376",
"0.5928836",
"0.59230983",
"0.5895756",
"0.5894054",
"0.5876329",
"0.5866911",
"0.5855883",
"0.58546126",
"0.58478093",
"0.5840532",
"0.5812605",
"0.5801865",
"0.5797396",
"0.57917815",
"0.5791716",
"0.5779796",
"0.5778211",
"0.5778211",
"0.5752982",
"0.57524854",
"0.57524854",
"0.57413393",
"0.5733197",
"0.5731304",
"0.5723416",
"0.5720589",
"0.5700358",
"0.5693513",
"0.56908625",
"0.56837904",
"0.5682322",
"0.56797624",
"0.566246",
"0.56602514",
"0.5658187",
"0.5647155",
"0.56443936",
"0.5636082",
"0.56310666",
"0.5630246",
"0.56290877",
"0.5622768",
"0.5620518",
"0.5605425",
"0.5602456",
"0.56009555",
"0.5588731",
"0.5585252",
"0.55809766",
"0.5577459",
"0.5576022",
"0.55753183",
"0.557526",
"0.55742294",
"0.55634594",
"0.555665",
"0.5556344",
"0.5554635",
"0.5548992",
"0.55469036",
"0.5544285",
"0.55442566",
"0.554179",
"0.5533132",
"0.5529943",
"0.5525423",
"0.55180293",
"0.5517159",
"0.55156124",
"0.5515423",
"0.5513129",
"0.5512745",
"0.5511815",
"0.55098194",
"0.55081725",
"0.5506655",
"0.5505487",
"0.5501484",
"0.5499774"
] | 0.7194681 | 1 |
Write datas on $uid key | public function write($uid, $mixed)
{
$options = $this->getOptions();
$this->adapter->query(
sprintf('INSERT INTO %s (%s, %s) VALUES ("%s", %s)',
$options['table'],
$options['column_key'],
$options['column_value'],
$uid,
$this->adapter->getPlatform()->quoteValue(serialize($mixed))
), Adapter::QUERY_MODE_EXECUTE
);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function writeUID($uid)\n {\n $payload = '';\n $payload .= pack('V', $uid);\n\n $this->sendRequest(self::FUNCTION_WRITE_UID, $payload);\n }",
"public function setUid($uid);",
"function d4os_io_db_070_os_user_set_uid($uid, $uuid) {\n // check if key already exists\n $exists = db_result(db_query(\"SELECT count(*) FROM {d4os_ui_users} WHERE uid=%d AND UUID='%s'\", array($uid, $uuid)));\n if ($exists == 0) {\n db_query(\"INSERT INTO {d4os_ui_users} (uid, UUID) VALUES (%d, '%s')\", array($uid, $uuid));\n }\n}",
"public function setUid(?string $uid): void\n {\n $this->uid['value'] = $uid;\n }",
"public function set_uid($uid) {\n $this->uid = intval($uid);\n }",
"function setUID($uid) {\n\t\t$this->_uid = $uid;\n\t}",
"public function write($key, $data)\n {\n }",
"function get_uid($uid){\n\t\t$this->uid = $uid;\n\t}",
"public function setUid(?string $uid): void\n {\n $this->uid = $uid;\n }",
"function putData($username, $data) {\n\t\t$dbObject = getDatabase();\n\t\t\n\t\t// we need to check if the user exists, and if so put the data, if not create the data\n\t\t$sql = \"select * from users where users_username='$username'\";\n\t\t$res = $dbObject->query($sql);\n\t\tif($res->fetchColumn() > 0) {\n\t\t\t// do update\n\t\t\terror_log(\"doing userdata update\");\n\t\t\t$sql = \"update users set users_tokendata='$data' where users_username='$username'\";\n\t\t} else {\n\t\t\t// do insert\n\t\t\terror_log(\"doing user data create\");\n\t\t\t$sql = \"insert into users values (NULL, '$username', '', '', '$data', '')\";\n\t\t}\n\t\t\n\t\tif($dbObject->query($sql)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}",
"public function withUid($uid);",
"function UseMianZhanPai($uid)\r\r\n{\r\r\n\tif (!checkGoodsCount($uid,12,1))\r\r\n\t{\r\r\n\t\tthrow new Exception($GLOBALS['UseMianZhanPai']['no_MianZhanPai']);\r\r\n\t}\r\r\n\tsql_query(\"update sys_user set state=2 where uid='$uid'\");\r\r\n\t$usetime = 12 * 3600; //12小时免战\r\r\n\tsql_query(\"insert into mem_user_buffer (uid,buftype,endtime) values ('$uid','7',unix_timestamp()+$usetime) on duplicate key update endtime=unix_timestamp() + $usetime\");\r\r\n\treduceGoods($uid,12,1);\r\r\n}",
"public function userIdBind($uid, $fd)\n {\n $field = $this->setRedisField($uid);\n $result = $this->redisObj->hSet($this->redisTable, $field, $fd);\n\n return $result;\n }",
"public function store()\n\t{\n\t\tif (!is_numeric($this->get('uidNumber')))\n\t\t{\n\t\t\treturn $this->create();\n\t\t}\n\t\treturn $this->update();\n\t}",
"public function writeUsers()\n {\n \t// delete old keys\n \texec('rm ' . $this->getGitLocalRepositoryPath() . DIRECTORY_SEPARATOR . self::GITOLITE_KEY_DIR . '*.pub');\n \t\n foreach ($this->getUsers() as $user) {\n $this->writeFile(\n $this->getGitLocalRepositoryPath() . DIRECTORY_SEPARATOR .\n self::GITOLITE_KEY_DIR .\n $user->renderKeyFileName(),\n $user->getFirstKey()\n );\n }\n }",
"public function writeTmp($uid, $fid, $txt)\n {\n \t$time = time();\n $sql = \"INSERT INTO res_board_tmp values (:uid, :fid, :txt, :timeNow)\n ON DUPLICATE KEY\n UPDATE fid = :fid ,txt = :txt, create_time = :timeNow\";\n \n return $this->_wdb->query($sql, array('uid' => $uid, 'fid' => $fid, 'txt' => $txt, 'timeNow' => $time));\n }",
"function user_store_request($uid, $request){\n\t\t$queryText = 'INSERT INTO requests (sender_uid, request) VALUES (:sender_uid, :request)';\n\t\t\n\t\t$query = $this->connection->prepare($queryText);\n\t\t$query->execute(array(':sender_uid'=>$uid, ':request'=>$request));\n\t}",
"private function write($key,$value) {\r\n}",
"function _write($id, $data) {\n $access = time();\n\n $this->_destroy($id);\n return ee()->db->insert($this->table_name, array(\n 'id' => $id,\n 'data' => $data,\n 'access' => $access\n ));\n }",
"function storeDirect( $id_user, $value, $is_id, $no_overwrite, $int_userid=TRUE ) {\n\n\t\treturn true;\n\t}",
"function setData($sKey, $data, $iTTL = false)\r\n\t{\r\n\t if(file_exists($this->sPath . $sKey) && !is_writable($this->sPath . $sKey))\r\n\t return false;\r\n\r\n\t if(!($rHandler = fopen($this->sPath . $sKey, 'w'))) \r\n\t return false;\r\n\r\n fwrite($rHandler, '<?php $data=' . var_export($data, true) . '; ?>');\r\n fclose($rHandler);\r\n @chmod($this->sPath . $sKey, 0666);\r\n\r\n return true;\r\n\t}",
"function set($key,$data)\n\t{\n\t\t// Get file path\n\t\t$file_path = $this->get_file_path($key);\n\n\t\t// Add content to file\n\t\tfile_put_contents($file_path,serialize($data));\n\t}",
"public function setUser( $fuid, $key, $value ) {\n\t\t\t$this->settings[ $key . \"_\" . $fuid ] = $value;\n\t\t\tif ( $this->database->has( $this->get( \"db_prefix\", FALSE ) . \"settings_users\", array(\n\t\t\t\t\"AND\" => array(\n\t\t\t\t\t\"fuid\" => $fuid,\n\t\t\t\t\t\"var\" => $key\n\t\t\t\t)\n\t\t\t) )\n\t\t\t) {\n\t\t\t\treturn $this->database->update( $this->get( \"db_prefix\", FALSE ) . \"settings_users\", array( \"data\" => $value ), array(\n\t\t\t\t\t\"AND\" => array(\n\t\t\t\t\t\t\"fuid\" => $fuid,\n\t\t\t\t\t\t\"var\" => $key\n\t\t\t\t\t)\n\t\t\t\t) );\n\t\t\t} else {\n\t\t\t\treturn $this->database->insert( $this->get( \"db_prefix\", FALSE ) . \"settings_users\", array(\n\t\t\t\t\t\"fuid\" => $fuid,\n\t\t\t\t\t\"data\" => $value,\n\t\t\t\t\t\"var\" => $key\n\t\t\t\t) );\n\t\t\t}\n\t\t}",
"public function createUid()\n {\n $uid = uniqid();\n while (AutoEvent::where('uid', '=', $uid)->count() > 0) {\n $uid = uniqid();\n }\n $this->uid = $uid;\n }",
"function writeUserProfile($data, $uid) {\n\n\t// following code largely borrowed from edituser.php\n\t// values we receive:\n\t// name\n\t// email\n\t// viewemail\n\t// timezone_offset\n\t// password\n\t// vpass\n\t// attachsig\n\t// user_sig\n\t// umode\n\t// uorder\n\t// notify_method\n\t// notify_mode\n\n\tglobal $xoopsUser, $xoopsConfig;\n\t$config_handler =& xoops_gethandler('config');\n\t$xoopsConfigUser =& $config_handler->getConfigsByCat(XOOPS_CONF_USER);\n\n\tinclude_once XOOPS_ROOT_PATH . \"/language/\" . $xoopsConfig['language'] . \"/user.php\";\n\n\t$errors = array();\n if (!empty($data['uid'])) {\n $uid = intval($data['uid']);\n }\n\t\t\n if (empty($uid)) {\n\tredirect_header(XOOPS_URL,3,_US_NOEDITRIGHT);\n exit();\n } elseif(is_object($xoopsUser)) {\n\t\t\tif($xoopsUser->getVar('uid') != $uid) {\n\t\t\t\tredirect_header(XOOPS_URL,3,_US_NOEDITRIGHT);\n\t\t\t\texit();\t\n\t\t\t}\n }\n\n $myts =& MyTextSanitizer::getInstance();\n if ($xoopsConfigUser['allow_chgmail'] == 1) {\n $email = '';\n if (!empty($data['email'])) {\n $email = $myts->stripSlashesGPC(trim($data['email']));\n }\n if ($email == '' || !checkEmail($email)) {\n $errors[] = _US_INVALIDMAIL;\n }\n }\n $password = '';\n $vpass = '';\n if (!empty($data['password'])) {\n \t $password = $myts->stripSlashesGPC(trim($data['password']));\n }\n if ($password != '') {\n \t if (strlen($password) < $xoopsConfigUser['minpass']) {\n \t$errors[] = sprintf(_US_PWDTOOSHORT,$xoopsConfigUser['minpass']);\n }\n if (!empty($data['vpass'])) { \n \t $vpass = $myts->stripSlashesGPC(trim($data['vpass']));\n }\n \t if ($password != $vpass) {\n $errors[] = _US_PASSNOTSAME;\n \t }\n }\n if (count($errors) > 0) {\n echo '<div>';\n foreach ($errors as $er) {\n echo '<span style=\"color: #ff0000; font-weight: bold;\">'.$er.'</span><br />';\n }\n echo '</div><br />';\n } else {\n $member_handler =& xoops_gethandler('member');\n $edituser =& $member_handler->getUser($uid);\n $edituser->setVar('name', $data['name']);\n if ($xoopsConfigUser['allow_chgmail'] == 1) {\n $edituser->setVar('email', $email, true);\n }\n $user_viewemail = (!empty($data['user_viewemail'])) ? 1 : 0;\n $edituser->setVar('user_viewemail', $user_viewemail);\n if ($password != '') {\n $edituser->setVar('pass', md5($password), true);\n }\n $edituser->setVar('timezone_offset', $data['timezone_offset']);\n $attachsig = !empty($data['attachsig']) ? 1 : 0;\n\t $edituser->setVar('attachsig', $attachsig);\n $edituser->setVar('user_sig', xoops_substr($data['user_sig'], 0, 255));\n $edituser->setVar('uorder', $data['uorder']);\n $edituser->setVar('umode', $data['umode']);\n $edituser->setVar('notify_method', $data['notify_method']);\n $edituser->setVar('notify_mode', $data['notify_mode']);\n\n if (!$member_handler->insertUser($edituser)) {\n echo $edituser->getHtmlErrors();\n\t\t\t\t\t\texit();\n }\n }\n\n}",
"public function exportByUid($uid)\n {\n // TODO: Implement exportByUid() method.\n }",
"public function exportByUid($uid)\n {\n // TODO: Implement exportByUid() method.\n }",
"abstract public function write( $key, $value );",
"public function save($key, $data);",
"public function store($cid, $data);",
"function pushData($key, $data);",
"public function setObjectUid($uid)\n {\n $this->objectUid = $uid;\n }",
"function put($key, $data) {\n $fn = $this->name($key);\n file_put_contents($fn, serialize($data), LOCK_EX);\n }",
"function saveToRecord() {\n\t\t$fields_values = $this->toArray();\n\t\t$fields_values['tstamp'] = mktime();\n\t\t$fields_values['crdate'] = mktime();\n\t\tunset($fields_values['uid']);\n\t\t\n\t\t// If we have a non-zero UID, update an existing record, otherwise create a new record\n\t\tif($this->getUID()) {\n\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_wecassessment_result', 'uid=' . $this->getUID(), $fields_values);\n\t\t} else {\n\t\t\t$GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_wecassessment_result', $fields_values);\n\t\t\t$this->setUID($GLOBALS['TYPO3_DB']->sql_insert_id());\t\t\t\n\t\t}\n\t\t\n\t\t$answers = $this->getAnswers();\n\t\tforeach((array) $answers as $answer) {\n\t\t\t$answer->setResultUID($this->getUID());\n\t\t\t$answer->save();\n\t\t}\n\t\t\n\t\t// Blow up session data\n\t\ttx_wecassessment_sessiondata::storeSessionData(null, $this->getPID());\n\t\t\n\t\treturn $this->_uid;\n\t}",
"public function write($key, $value);",
"function write($id, $data, $next);",
"public function write($sessionId, $data);",
"public function update()\n {\n echo uniqid('km-');\n // $data = $this->Users_model->get_all();\n // foreach ($data as $datas) {\n // $d['users_id'] = uniqid('km-');\n // $this->Users_model->update_users($datas->users_email, $d);\n // }\n }",
"public function setRevisionUserId($uid);",
"public function setRevisionUserId($uid);",
"public function setRevisionUserId($uid);",
"public function setRevisionUserId($uid);",
"public function setRevisionUserId($uid);",
"public function write($uid, $uname, $time, $module, $ip)\n {\n $uid = (int)$uid;\n $ip = $this->db->quoteString($ip);\n if ($uid > 0) {\n $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('online') . ' WHERE online_uid=' . $uid;\n } else {\n $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix('online') . ' WHERE online_uid=' . $uid . ' AND online_ip=' . $ip;\n }\n list($count) = $this->db->fetchRow($this->db->queryF($sql));\n if ($count > 0) {\n $sql = 'UPDATE ' . $this->db->prefix('online') . ' SET online_updated=' . $time . ', online_module = ' . $module . ' WHERE online_uid = ' . $uid;\n if (0 == $uid) {\n $sql .= ' AND online_ip=' . $ip;\n }\n } else {\n $sql = sprintf('INSERT INTO %s (online_uid, online_uname, online_updated, online_ip, online_module) VALUES (%u, %s, %u, %s, %u)', $this->db->prefix('online'), $uid, $this->db->quoteString($uname), $time, $ip, $module);\n }\n if (!$this->db->queryF($sql)) {\n return false;\n }\n return true;\n }",
"public function setShareKey($path, $uid, $key) {\n\t\t$keyId = $uid . '.' . $this->shareKeyId;\n\t\treturn $this->keyStorage->setFileKey($path, $keyId, $key, Encryption::ID);\n\t}",
"private function _setUserData($userData){\n $this->_userData = $userData;\n }",
"public function write($sessionId, $data)\n {\n $this->cache->save($this->prefix . $sessionId, $data, $this->lifetime);\n }",
"public function identify($uid)\n {\n $this->apiuid = $uid;\n }",
"public function storeSelf() {\n trace('[METHOD] '.__METHOD__);\n\t\t$dataArray = $this->getDataArray();\n $this->set_uid(tx_ptgsaaccounting_orderCreditBalanceAccessor::getInstance()->storeOrderCreditBalanceData($dataArray));\n \n\n\t}",
"function storeHash($hash,$data,$ident)\t{\n\t\t$insertFields = array(\n\t\t\t'hash' => $hash,\n\t\t\t'content' => $data,\n\t\t\t'ident' => $ident,\n\t\t\t'tstamp' => time()\n\t\t);\n\t\t$GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_hash', 'hash=\"'.$GLOBALS['TYPO3_DB']->quoteStr($hash, 'cache_hash').'\"');\n\t\t$GLOBALS['TYPO3_DB']->exec_INSERTquery('cache_hash', $insertFields);\n\t}",
"function add_user(array $user){\n $json = file_get_contents(FILE_USERS);\n $user['id']= uniqid();\n // 2 convertir contenu en tableau\n $arrayuser = json_decode($json, true);\n // 3 ajouter new user\n $arrayuser[] = $user;\n // convertir le tableau en json\n $json =json_encode($arrayuser);\n file_put_contents(FILE_USERS, $json); \n}",
"function store( $id_user, $no_overwrite, $int_userid=TRUE ) {\n\n\t\treturn true;\n\t}",
"public function postUpdatePerson($uid)\n {\n \tif (!Bll_User::isAppUser($uid)) {\n \t $bllUser = new Bll_Island_User();\n\t\t\t$bllUser->joinUser($uid);\n }\n }",
"public function set($key, $data);",
"public function fdBind($uid, $fd)\n {\n $field = $this->setRedisField($fd, self::$classIndexFd);\n $result = $this->redisObj->hSet($this->redisTable, $field, $uid);\n\n\n return $result;\n }",
"public function sess_write()\r\r\n\t{\r\r\n\t\tif( ! $this->parent->check_write())\r\r\n\t\t{\r\r\n\t\t\t$_SESSION = array();\r\r\n\t\t\tforeach($this->parent->userdata as $key => $val)\r\r\n\t\t\t{\r\r\n\t\t\t\t$_SESSION[$key] = $val;\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$this->parent->track_write();\r\r\n\t\t}\r\r\n\t}",
"public function set(string $key, $data);",
"public function _write($data)\n {\n }",
"public function update_instance($uid,$data) { \n\n\t\t$uid \t= Dba::escape($uid); \n\t\t$host\t= $data['host'] ? Dba::escape($data['host']) : '127.0.0.1'; \n\t\t$port\t= $data['port'] ? Dba::escape($data['port']) : '6600'; \n\t\t$name\t= Dba::escape($data['name']); \n\t\t$pass\t= Dba::escape($data['password']); \n\n\t\t$sql = \"UPDATE `localplay_mpd` SET `host`='$host', `port`='$port', `name`='$name', `password`='$pass' WHERE `id`='$uid'\"; \n\t\t$db_results = Dba::query($sql); \n\n\t\treturn true; \n\n\t}",
"public function postUpdatePerson($uid)\n {\n $mbllgift = new Mbll_Kitchen_Gift();\n $mbllgift->addCampainGift($uid);\n \n //campain gift 2 add \n $mbllgift->addCampainGiftTwo($uid);\n }",
"function storeSessionData($sessionData, $pid) {\n\t\t$GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_wecassessment_pi1:' . $pid, $sessionData);\n\t\t$GLOBALS['TSFE']->fe_user->sesData_change = true;\n\t\t$GLOBALS['TSFE']->fe_user->storeSessionData();\t\t\n\t}",
"function onStoreRow( &$data )\r\n\t{\r\n\t\t$element =& $this->getElement();\r\n\t\tif ($data['rowid'] == 0 && !in_array( $element->name, $data )) {\r\n\t\t\t$user\t\t=& JFactory::getUser();\r\n\t\t\t$data[$element->name] = $user->get('id');\r\n\t\t}\r\n\t}",
"public function write( $key, $data, $group = '', $expire = 0 ) {\n\t\tif ( $this->_exists( $this->_key( $key, $group ) ) ) {\n\t\t\t$this->replace( $key, $data, $group, $expire );\n\t\t} else {\n\t\t\t$this->add( $key, $data, $group, $expire );\n\t\t}\n\t}",
"function save() {\n $conn = \\DB\\getConnection();\n\n $query = sprintf(\"INSERT INTO Payments (uid, typeid, token, amount)\n VALUES (%u, %u, '%s', %f)\",\n $this->uid, $this->typeid, $conn->escape_string($this->token), $this->amount);\n\n \n\n $result = $conn->query($query);\n\n // If this is a newly created user, then update the id with the\n // newly created one\n if (!isset($this->id)) {\n $this->id = $result->insert_id;\n }\n }",
"function _write($id, $sess_data)\n\t{\n\t\t//$row = DB::row(\"SELECT value FROM \" . DB::$db_prefix . \"_sessions WHERE sesskey = '\".$id.\"'\");\n\t\t$time = time()+parent::$sess_lifetime;\n\n\t\tDB::query(\"\n\t\t\tREPLACE INTO \" . DB::$db_prefix . \"_sessions\n\t\t\tVALUES (\n\t\t\t\t'\".$id.\"',\n\t\t\t\t'\".$time.\"',\n\t\t\t\t'\".addslashes($sess_data).\"',\n\t\t\t\t'\".$_SERVER['REMOTE_ADDR'].\"'\n\t\t\t)\n\t\t\");\n\n\t\treturn true;\n\t}",
"public function save($userId) {\n if ($this->commId() == 0) { $this->insertIntoDatabase($userId); } \n else { $this->updateDatabase($userId); }\n }",
"public function updateInfo($uid, $place, $data) {\r\n if($this -> testConnection()) {\r\n $req = \"UPDATE user_info WHERE 'uid'={$uid} SET {$place}={$data}\";\r\n if($this -> c -> query($req) === TRUE) {\r\n echo \"Record updated successfully.\";\r\n return TRUE;\r\n } else {\r\n echo \"Error updating record: \".$this -> c -> error;\r\n return FALSE;\r\n }\r\n } else echo \"Not connected to server.\";\r\n return FALSE;\r\n }",
"public function assign($UID, array $data, $timestamp)\n {\n $this->UID = $UID;\n if ($this->isExpired()) return false;\n $this->pull();\n $this->merge($data, $timestamp);\n return true;\n }",
"function store_data($data, $data_name)\n{\n /* @todo store the PUA data in its own table */\n update_option($data_name, serialize($data));\n}",
"private function _savePendingUserIdentity($userId)\n {\n $userData = new stdClass();\n $userData->{User::COLUMN_USERID} = $userId;\n $userData->sessionId = session_id();\n $userData->lastLogin = date('Y-m-d H:i:s');\n Zend_Auth::getInstance()->getStorage()->write($userData);\n }",
"public function __construct($uid)\n {\n //\n $this->uid = $uid;\n }",
"public function updateAccount($uid, array $data)\n {\n return parent::updateAccount($uid, $data);\n }",
"public function set_user_info($data){\n\t\t\treturn $result=$this->save($data);\n\t\t}",
"function auth_register_user($user){\n $users = json_read('data/users.json');\n $max = -1;\n foreach($users as $user_max){\n if($user_max->id > $max) $max = $user_max->id;\n }\n $new_id = $max + 1;\n $user->id = $new_id;\n $user->pword = password_hash($user->pword1, PASSWORD_DEFAULT);\n $user->pword1 = $user->pword2 = '';\n $users->$new_id = $user;\n json_write('data/users.json', $users);\n\n return $new_id;\n}",
"function add_user_meta($user_id, $meta_key, $meta_value, $unique = \\false)\n {\n }",
"public function write($id = NULL, $data = '') \n\t{\n\t\t/*\n\t\t * Case 2: We check to see if the session already exists. If it does\n\t\t * then we need to update it. If not, then we create a new entry.\n\t\t */\n// if($this->session_id && $this->session_id != $id)\n//\t\t{\n//\t \t$this->_conn->query(\"UPDATE {$this->table_name} SET data = '{$data}' WHERE {$this->primary_key} = '{$id}'\");\n//\t\t}\n//\t\telse\n//\t\t{\n//\t\t\t$this->_conn->query(\"INSERT INTO {$this->table_name}({$this->primary_key},data) VALUES('{$id}','{$data}')\");\n//\t\t}\n// return TRUE;\n\n\t\t$time = date('Y-m-d H:i:s', time());\n\t\t$this->_conn->query(\"REPLACE `{$this->table_name}` (`{$this->primary_key}`,`last_activity`,`data`) VALUES('{$id}','{$time}','{$data}')\");\n return TRUE;\n\t}",
"private function setData( $id, $pk, $uid, $dis, $trials, $active ) {\n\t\t$this->id = $id;\n\t\t$this->passkey = $pk;\n\t\t$this->user_id = $uid;\n\t\t$this->discount = $dis;\n\t\t$this->trials = $trials;\n\t\t$this->active = $active;\n\t\t$this->type_def = PasskeyType::get_type( $this->passkey );\n\t\t$this->type = $this->type['id'];\n\t}",
"function store($key, $data, $TTL = 0);",
"public function set(string $key, string $data) : void;",
"public function set($key, $data) {\n $this->ensure_path_exists();\n $filename = $key.'.cache';\n $file = $this->file_path_for_key($key, true);\n $result = $this->write_file($file, $this->prep_data_before_save($data));\n if (!$result) {\n // Couldn't write the file.\n return false;\n }\n // Record the key if required.\n if ($this->prescan) {\n $this->keys[$filename] = cache::now() + 1;\n }\n // Return true.. it all worked **miracles**.\n return true;\n }",
"function setUid($uid) {\n $this->checkChange();\n $this->uid = $uid;\n return $this;\n }",
"abstract public function write($data);",
"public static function write($id, $data){\n//\t\techo 'write'.$id.\"\\n<br>\";\n\t\t$db = RuntimeInfo::instance()->connections()->MySQL(RuntimeInfo::instance()->helpers()->Session()->getSessionConfig()->getHosts());\n\t\t$query='REPLACE INTO php_session VALUES ('.$db->escape($id).','.$db->escape(time()).','.$db->escape($data).')';\n\t\treturn $db->query($query);\n\t}",
"function add_question(array $user){\n $json = file_get_contents(FILE_QUESTION);\n $user['id']= uniqid();\n // 2 convertir contenu en tableau\n $arrayuser = json_decode($json, true);\n // 3 ajouter new user\n $arrayuser[] = $user;\n // convertir le tableau en json\n $json =json_encode($arrayuser);\n file_put_contents(FILE_QUESTION, $json); \n}",
"public function set_data($key, $data)\n\t{\n\t\t$this->_data[$key] = $data;\n\t}",
"public function setIdentifier($id)\n {\n $this->uid = (int)$id;\n }",
"public function setUid($value) {\n return $this->set(self::UID, $value);\n }",
"function update_usermeta($user_id, $meta_key, $meta_value)\n {\n }",
"function writeFile($data) {\n\t$my_file = \"users.json\";\n\t$users = [];\n\tif(file_exists($my_file)){\n\t\t$users = json_decode(file_get_contents($my_file), true);\n\t}\n\t$users[] = $data;\n\t$jsonData = json_encode($users);\n\tfile_put_contents($my_file, $jsonData);\n}",
"function saveUser($sVars)\n{\n require_once($_SERVER[\"DOCUMENT_ROOT\"].\"/config/config.php\");\n require_once($_SERVER[\"DOCUMENT_ROOT\"].\"/class/autoload.php\");\n\n // Récupérer les données\n $aData = json_decode($sVars,true);\n $db = new cMariaDb($Cfg);\n if( $aData[\"User\"][\"id\"] == 0 ){\n // id=0 > Ajoute\n $Columns = \"\";\n $Values = \"\";\n foreach( $aData[\"User\"] as $key => $value )\n {\n if( $key != \"id\"){\n $Columns .= $key.\",\";\n $Values .= \"'\".addslashes($value).\"',\"; \n }\n if( $key == \"sEmail\"){\n $Columns .= \"pMotPasse,\";\n $Values .= \"SHA1('\".$value.\"'),\";\n }\n }\n $Columns = substr($Columns,0,-1);\n $Values = substr($Values,0,-1);\n $sSQL = \"INSERT INTO sys_user ($Columns,dDateInscription) VALUES ($Values,CURRENT_TIMESTAMP);\";\n $aTmp = $db->Query($sSQL);\n $id = $db->getLastId();\n } else {\n $Set = \"\";\n foreach( $aData[\"User\"] as $key => $value )\n {\n if( $key != \"id\"){\n $Set .= $key.\"='\".addslashes($value).\"',\";\n }\n }\n $Set = substr($Set,0,-1);\n $id = $aData[\"User\"][\"id\"];\n $sSQL = \"UPDATE sys_user SET $Set WHERE id=$id;\";\n $aTmp = $db->Query($sSQL);\n }\n // Méthode pas très élégante, mais il faudrait faire un delta entre tableaux \n // et agir en conséquence... \n // On supprime tout et on insert\n // Sauvegarde des droits ($aData[\"Rights\"])\n $sSQL = \"DELETE FROM sys_user_rights WHERE idUser=$id\";\n $db->Query($sSQL);\n foreach($aData[\"Rights\"] as $Right) {\n $sSQL = \"INSERT INTO sys_user_rights SET idRights=$Right, idUser=$id;\";\n $db->Query($sSQL);\n }\n\n // $aRet = [\"Errno\" => 2, \n // \"ErrMsg\" => $sTmp, \n // \"SQL\" => $sSQL ];\n\n return [\"Errno\" => 0, \"ErrMsg\" => \"OK\", \"SQL\" => $sSQL ];\n\n header('content-type:application/json');\n echo json_encode($aRet); \n}",
"function update_testlog($uid,$tid,$ip){\n\n\tglobal $dbc;\n\tif( $sql = $dbc->query(\"insert into test_log SET uid ='$uid', topicid='$tid',ip='$ip'\") ){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n\n}",
"function set_userGroup($data, $oldId){\n $data_user = array();\n $data_group = array();\n $data_user['id'] = $data['id'];\n $data_user['username'] = $data['username'];\n $data_user['password'] = $data['password'];\n $data_user['email'] = $data['email'];\n\n $group = $data['group'];\n $data['group'] = selectRecord(TAB_GROUPS, \"role = '$group'\")['id'];\n $data_group['userId'] = $data['id'];\n $data_group['groupId'] = $data['group'];\n\n updateRecord(TAB_USR_ROLE, $data_group, \"userId = $oldId\");\n updateRecord(TAB_USERS, $data_user, \"id = $oldId\");\n $data_info = array();\n if($data['group'] == 1){\n $data_info = array();\n $data_info['employment'] = \"-\";\n $data_info['img_address'] = \"upload/user/user-default.png\";\n $data_info['user'] = $data['id'];\n insertRecord(TAB_PERSONALINFO, $data_info);\n }\n}",
"function __construct1($uid) {\n \n $this->uid = $uid;\n }",
"public function write($data);",
"public function write($data);",
"public function write($data);",
"public function write($data);",
"protected function insertAuth0User($userInfo, $uid) {\n\n db_insert('auth0_user')->fields(array(\n 'auth0_id' => $userInfo['user_id'],\n 'drupal_id' => $uid,\n 'auth0_object' => json_encode($userInfo)\n ))->execute();\n\n }",
"function setUniqueID($key) {\r\n\t\t$this->uniqueID = $key;\r\n\t}",
"function get($uid) {\n\t}"
] | [
"0.6845782",
"0.6705954",
"0.64606667",
"0.6413713",
"0.62279373",
"0.6209776",
"0.61816627",
"0.597941",
"0.5978474",
"0.5974801",
"0.59737754",
"0.577526",
"0.5748105",
"0.57348305",
"0.57336676",
"0.57095724",
"0.5698243",
"0.5688791",
"0.56834126",
"0.5663766",
"0.56630486",
"0.5662701",
"0.5612565",
"0.5593074",
"0.55715245",
"0.55541074",
"0.55541074",
"0.5543866",
"0.5523789",
"0.552038",
"0.5508192",
"0.5476566",
"0.54737484",
"0.5450118",
"0.54372245",
"0.54355943",
"0.5421901",
"0.5386911",
"0.53857195",
"0.53857195",
"0.53857195",
"0.53857195",
"0.53857195",
"0.53771216",
"0.5355267",
"0.5350762",
"0.5345848",
"0.53385127",
"0.5336543",
"0.53364486",
"0.5331395",
"0.5325012",
"0.53087926",
"0.53073454",
"0.53032476",
"0.5277336",
"0.5268525",
"0.5262796",
"0.52544105",
"0.52343154",
"0.52216685",
"0.5217551",
"0.5213528",
"0.5209853",
"0.5204523",
"0.5204491",
"0.52018625",
"0.5184404",
"0.51833314",
"0.5180854",
"0.51808345",
"0.51799357",
"0.5179862",
"0.51766586",
"0.5174198",
"0.5174094",
"0.5170593",
"0.51654196",
"0.5161098",
"0.5161058",
"0.5151098",
"0.51449305",
"0.51211524",
"0.5118511",
"0.5100691",
"0.5095487",
"0.50901914",
"0.50816387",
"0.50780696",
"0.50754464",
"0.50714207",
"0.5070068",
"0.50643975",
"0.5061205",
"0.5061205",
"0.5061205",
"0.5061205",
"0.50576746",
"0.50553894",
"0.5049152"
] | 0.6268523 | 4 |
Clear datas with $uid key | public function clear($uid = null)
{
$options = $this->getOptions();
if($uid) {
if(!$this->has($uid)) {
return false;
}
$stmt = $this->adapter->query(
sprintf('DELETE FROM %s WHERE %s = "%s"',
$options['table'],
$options['column_key'],
$uid
), Adapter::QUERY_MODE_EXECUTE
);
return true;
}
$stmt = $this->adapter->query(
sprintf('TRUNCATE TABLE %s', $options['table']),
Adapter::QUERY_MODE_EXECUTE
);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function clearLv($uid)\n {\n $tbName = $this->getTableName($uid);\n $n = $uid % 10;\n $sql = \"DELETE FROM $tbName WHERE uid=:uid AND bid=60131 \";\n $this->_wdb->query($sql, array('uid' => $uid));\n }",
"public function unsetUid(): void\n {\n $this->uid = [];\n }",
"public function reset()\n {\n $this->values[self::_UID] = null;\n $this->values[self::_USER_SUMMARY] = null;\n }",
"public function _clear($user_uid) {\r\n $registry->db = db::getInstance();\r\n $sth = $registry->db->prepare(\"update sys_users_verify set\r\n\t\t\t\t\t\t\t\t\t\tusv_status = 0,\r\n\t\t\t\t\t\t\t\t\t\tusv_token = ''\r\n\t\t\t\t\t\t\t\t\t\twhere usv_usr_uid= ? \");\r\n $sth->execute(array($user_uid));\r\n //$user = $sth->fetchAll();\r\n $user = $sth->rowCount();\r\n }",
"public function reset()\n {\n $this->values[self::_UID] = null;\n $this->values[self::_DPS] = null;\n }",
"protected function clearCachedUserData()\n {\n $user = Auth::user();\n\n if ($user) {\n $user->deleteUserData();\n }\n }",
"public static function cleanMyMixiUser($uid)\n {\n Bll_Cache::delete(self::getCacheKey('getMyMixiUser', $uid));\n }",
"public function clear(): void\n {\n $app = App::get();\n $list = $app->data->getList()\n ->filterBy('key', '.temp/cache/', 'startWith');\n foreach ($list as $item) {\n $app->data->delete($item->key);\n };\n }",
"public function actionClear()\n {\n //DELETE from xm_report_exam_question where user_id = 3181;\n //DELETE from xm_report_error_question where user_id = 3181;\n //DELETE from xm_report_task where user_id = 3181;\n //DELETE from xm_report_task_detail where user_id = 3181;\n //DELETE from xm_user_rate where uid = 3181;\n //DELETE from xm_report_user_data where user_id = 3181;\n $userId = Yii::$app->request->get('uid');\n Yii::$app->db->createCommand()->delete('xm_report_exam', \"user_id = {$userId}\")->execute();\n Yii::$app->db->createCommand()->delete('xm_report_exam_question', \"user_id = {$userId}\")->execute();\n Yii::$app->db->createCommand()->delete('xm_report_error_question', \"user_id = {$userId}\")->execute();\n Yii::$app->db->createCommand()->delete('xm_report_task', \"user_id = {$userId}\")->execute();\n Yii::$app->db->createCommand()->delete('xm_report_task_detail', \"user_id = {$userId}\")->execute();\n Yii::$app->db->createCommand()->delete('xm_user_rate', \"uid = {$userId}\")->execute();\n Yii::$app->db->createCommand()->delete('xm_report_user_data', \"user_id = {$userId}\")->execute();\n RedisService::deleteKey('wrong_record_uid_'.$userId);\n return $this -> success();\n }",
"public function reset() {\n\n\t\t$type = Dba::escape($this->type);\n\t\t$uid = Dba::escape($this->uid);\n\n\t\t$sql = \"DELETE FROM `image` WHERE `object_id`='$uid' AND `object_type`='$type'\";\n\t\t$db_results = Dba::write($sql);\n\n\t}",
"private function clearData()\n {\n $this->_data=array();\n }",
"public function clearAll($userId);",
"public function reset()\n {\n $this->values[self::_UID] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_HERO] = null;\n }",
"public function reset()\n {\n $this->values[self::_USERS] = array();\n $this->values[self::_HIRE_UIDS] = array();\n $this->values[self::_FROM] = null;\n }",
"public function reset()\n {\n $this->values[self::_USERID] = null;\n $this->values[self::_USER_SUMMARY] = null;\n }",
"public function deleteData()\n {\t\t\n \t$arrayId = $this->getAllUserId($this->readFromLocalFile());\n \tforeach($arrayId as $id)\n \t{\n \t\t$user = User::find()->where(['id' => $id])->one();\n \t\tif($user)\n \t\t{\n \t\t\t$user->delete();\n \t\t}\n \t}\n \t$this->deleteSelectedLocalItems('user');\n }",
"function edithistory_delete()\n{\n\tglobal $db, $mybb, $user;\n\t$db->update_query(\"edithistory\", array('uid' => 0), \"uid='{$user['uid']}'\");\n}",
"public function delete_uid($uid) {\r\n // security check must have been done before calling internal functions !\r\n $query = '\r\n -- delete all token for a user\r\n DELETE FROM `user_token` WHERE uid=:uid ;\r\n ';\r\n $this->dbh->execute($query, [':uid' => $uid ]);\r\n }",
"public function clearUserDropAward($uid)\n\t{\n\t $sql = \"UPDATE casino_user SET status=-1 WHERE status=0 AND uid=:uid \";\n\t $this->_wdb->query($sql,array('uid' => $uid));\n\t}",
"public function delData($key) {\n\t\tunset($this->_data[$key]);\n\t}",
"public function reset()\n {\n $this->values[self::_USER_ID] = null;\n $this->values[self::_SUMMARY] = null;\n }",
"private function clearSharedCache() {\n\t if( $this->mId ) {\n\t\t global $wgMemc;\n\t\t $wgMemc->delete( wfMemcKey( 'cedar_user', 'id', $this->mId ) );\n\t }\n }",
"public function clear()\n {\n $this->connection->del($this->key);\n\n if ($this->on_change) {\n call_user_func($this->on_change, []);\n }\n\n if ($this->on_clear) {\n call_user_func($this->on_clear, []);\n }\n }",
"public function reset()\n {\n $this->values[self::_UID] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_LEVEL] = null;\n $this->values[self::_AVATAR] = null;\n $this->values[self::_HEROES] = array();\n }",
"public function delete_data($param)\n\t{\n\t\t$query = \"DELETE FROM tb_users WHERE id = :id\";\n\t\tDB::connect()->query($query)->vars($param)->exec();\n\t}",
"private function clearHash($key) {\n if (array_key_exists($key, $this->_data)) unset($this->_data[$key]);\n if (array_key_exists($key, $this->_loaded_relatives)) unset($this->_loaded_relatives[$key]);\n }",
"public function clear_virtual_user_id();",
"public function clearUserDemoss()\n {\n $this->collUserDemoss = null; // important to set this to NULL since that means it is uninitialized\n }",
"public function clearData() {\n unset($this->data);\n }",
"function eraseUserById($var)\n {\n $bdd = connexMedoo();\n $bdd->delete(\"utilisateurs\", [\n 'id' => $var\n ]);\n }",
"public function resetData();",
"public function clearUID()\n {\n $this->uid = null;\n return $this;\n }",
"protected function clearPersistentData($key)\r\n {\r\n }",
"public function deleteUserKeys($uid) {\n\t\t$this->backupAllKeys('password_reset');\n\t\t$this->deletePublicKey($uid);\n\t\t$this->deletePrivateKey($uid);\n\t}",
"public function clear_data() {\n\n $token = $_POST['token'];\n $clear = isset( $_POST['clear'] ) ? $_POST['clear'] : null;\n $key = get_option( \"wpp_rand\" );\n\n if (\n current_user_can( 'manage_options' )\n && ( $token === $key )\n && $clear\n ) {\n\n global $wpdb;\n\n // set table name\n $prefix = $wpdb->prefix . \"popularposts\";\n\n if ( $clear == 'cache' ) {\n\n if ( $wpdb->get_var(\"SHOW TABLES LIKE '{$prefix}summary'\") ) {\n\n $wpdb->query(\"TRUNCATE TABLE {$prefix}summary;\");\n $this->flush_transients();\n\n echo 1;\n\n } else {\n echo 2;\n }\n\n } elseif ( $clear == 'all' ) {\n\n if ( $wpdb->get_var(\"SHOW TABLES LIKE '{$prefix}data'\") && $wpdb->get_var(\"SHOW TABLES LIKE '{$prefix}summary'\") ) {\n\n $wpdb->query(\"TRUNCATE TABLE {$prefix}data;\");\n $wpdb->query(\"TRUNCATE TABLE {$prefix}summary;\");\n $this->flush_transients();\n\n echo 1;\n\n } else {\n echo 2;\n }\n\n } else {\n echo 3;\n }\n } else {\n echo 4;\n }\n\n wp_die();\n\n }",
"public function unsetData($keys)\n\t{\n\t\tif(is_array($keys)) {\n\t\t\t$this->userData = array_diff_key($this->userData,array_flip($keys));\n\t\t} elseif(isset($this->userData[$keys])) {\n\t\t\tunset($this->userData[$keys]);\n\t\t}\n\n\t\t$this->autoSave AND $this->saveData();\n\t}",
"public function remove_all_data()\n\t{\n\t\t$this->_data = array();\n\t}",
"function lr_clear($pid) {\n list($ns, $x) = explode(':', $pid);\n list($rec, $sort) = explode('.', $x);\n $db = lr_connect( );\n $table = lr_make_table($db, $ns);\n\n if ($sort == '*') {\n $sql = \"DELETE FROM ?n WHERE (rec=?i);\";\n $db->query($sql, $table, $rec);\n } else {\n $sql = \"DELETE FROM ?n WHERE (rec=?i AND sort=?i);\";\n $db->query($sql, $table, $rec, $sort);\n }\n}",
"function unsetImage($uid,$table,$data,$path) {\n\t\n\t $this->db->select($data);\n $this->db->from($table);\n\t\t$this->db->where('uid',$uid);\n $query=$this->db->get();\t\t\n\t\tif($query->num_rows()>0)\n\t\t{\n\t\t $query=$query->result();\n\t\t $img=$query[0]->$data;\n @unlink($path.$img);\n\t\t}\t\n return true;\t\t\n\t}",
"public function clearIdentity()\n {\n $this->storage[$this->storageKey]=[];\n }",
"protected function clearRecordAuthCodes($table, $uid, $uidField)\n {\n $authCodes = $this->findByReferencedRecord($table, $uid, $uidField);\n foreach ($authCodes as $authCode) {\n $this->remove($authCode);\n }\n }",
"protected function _clearDataCache() {}",
"public function clear($key = null)\n\t{\n\t\tif (is_null($key))\n\t\t\t$this->data = array();\n\t\telse\n\t\t\tunset($this->data[$key]);\n\t}",
"public function clearCacheData(){\n $cacheKey = $this->getCacheKey();\n $this->clearCache($cacheKey);\n }",
"public function delete_instance($uid) {\n\n\n }",
"public function reset()\n {\n $this->values[self::_UID] = null;\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_JOB] = null;\n $this->values[self::_LAST_LOGIN] = null;\n $this->values[self::_ACTIVE] = null;\n $this->values[self::_JOIN_INSTANCE_TIME] = null;\n }",
"public function reset()\n {\n $this->values[self::_USER] = null;\n }",
"public function reset()\n {\n $this->values[self::_USER] = null;\n }",
"public function reset()\n {\n $this->values[self::_USER] = null;\n }",
"public function clearUserCohorts(int $uid)\n {\n DB::connection('moodle')->table('cohort_members')->where('userid', $uid)->delete();\n }",
"function del($ar){\n $p = new XParam($ar, array());\n $oid = $p->get('oid');\n $lnkuser = selectQuery('select lnkuser from '.$this->xset->getTable().' where KOID=\\''.$oid.'\\'')->fetch(PDO::FETCH_COLUMN);\n // satus du compte \n updateQuery('update '.$this->xset->getTable().' set STATUS=\\'INACTIVE\\' where KOID=\\''.$oid.'\\'');\n // date du users\n updateQuery('update USERS set DATET=\\''.date('Y-m-d').'\\' where KOID=\\''.$lnkuser.'\\'');\n }",
"public function clear()\n\t{\n\t\t$this->makeId();\n\t}",
"public function clear_cart_data_1($user_id)\n\t{\n\t\t$this->db->where(\"member_id\",$user_id);\n\t\t$this->db->delete(\"tbl_events_cart\");\n\t\t//echo $this->db->last_query();exit;\n\t}",
"public function emptyIdCache()\n {\n self::$userIdCache = [];\n }",
"public static function clearGameOverRankUser($uid)\n {\n Bll_Cache::delete(self::getCacheKey('getGameOverRankUserInFriend', $uid));\n Bll_Cache::delete(self::getCacheKey('getGameOverRankUserInAll', $uid));\n }",
"public static function Clear(){\n $user = !empty($_SESSION['user']) ? $_SESSION['user'] : '';\n $userId = !empty($_SESSION['userid']) ? $_SESSION['userid'] : '';\n if (!empty($user) && !empty($userId)){\n $db = Database::getConnection();\n if ($db->connect_error){\n //add some logging here\n return;\n }\n\n //remove all pulses\n $query = \"DELETE FROM \" . PULSE_TABLE . \" WHERE `user_id`=?\";\n $stmt = $db->prepare($query);\n $stmt->bind_param(\"i\", $userId);\n $stmt->execute();\n }\n }",
"function removeUsedKeyByid($id) {\r\n\t\t$query = \"DELETE FROM \".TBL_USED_KEYS.\" WHERE key_id = :key_id\";\r\n\t\t$stmt = $this->connection->prepare($query);\r\n\t\t$stmt->execute(array(':key_id' => $id));\r\n\t}",
"public function clear()\n {\n\n $this->synchronized = true;\n $this->id = null;\n $this->newId = null;\n $this->data = [];\n $this->savedData = [];\n $this->multiRef = [];\n\n }",
"public function clearMasterpassSessionData()\n {\n $customerSession = $this->getCustomerSession();\n $customerSession->unsetData(self::MASTERPASS_SESSION_KEY);\n }",
"public function clear()\n {\n $this->_data = [];\n }",
"public function clearApplicationData();",
"function deleteAllUserData()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$result = $ilDB->queryF(\"SELECT finished_id FROM svy_finished WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\t\t$active_array = array();\n\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t{\n\t\t\tarray_push($active_array, $row[\"finished_id\"]);\n\t\t}\n\n\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_finished WHERE survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getSurveyId())\n\t\t);\n\n\t\tforeach ($active_array as $active_fi)\n\t\t{\n\t\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_answer WHERE active_fi = %s\",\n\t\t\t\tarray('integer'),\n\t\t\t\tarray($active_fi)\n\t\t\t);\n\t\t\t$affectedRows = $ilDB->manipulateF(\"DELETE FROM svy_times WHERE finished_fi = %s\",\n\t\t\t\tarray('integer'),\n\t\t\t\tarray($active_fi)\n\t\t\t);\n\t\t}\n\t}",
"public function clear(string $key) : void;",
"public function eraseData()\n {\n $s = 'DELETE FROM `commitMessage` WHERE `user`=\"%s\"';\n $params = array($this->vcsLogin);\n $this->conn->query($s, $params);\n\n $s = 'DELETE FROM `work` WHERE `userID`=%d';\n $params = array($this->userID);\n $this->conn->query($s, $params);\n\n $s = 'DELETE FROM `patches` WHERE `userID`=%d';\n $params = array($this->userID);\n $this->conn->query($s, $params);\n\n $s = 'DELETE FROM `users` WHERE `userID`=%d';\n $params = array($this->userID);\n $this->conn->query($s, $params);\n }",
"public function __unset($key){\n if(isset($this->data[$key])){\n $this->data[$key] = null;\n }//if\n }",
"public function deleteData($id)\n {\n $this->db->where('id_user', $id);\n $this->db->delete('rumusan');\n }",
"public function clear () {\n //$prefix = $this->redis->getOptions()->__get('prefix')->getPrefix();\n foreach($this->redis->keys(\"*\") as $key) {\n $this->redis->del($key);\n }\n }",
"public function clear() {\n $this->_data = [];\n }",
"public function deleteData($key) {\r\n\t\tif (isset($this->templateData[$key])) {\r\n\t\t\tunset($this->templateData[$key]);\r\n\t\t}\r\n\t}",
"public function reset()\n {\n $this->values[self::_DPS] = null;\n $this->values[self::_DPS_USER] = null;\n $this->values[self::_ARRAY] = null;\n }",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function reset()\n {\n $this->values[self::_ID] = array();\n }",
"public function clearDataByType($type) {\n $sql = 'DELETE shadow_objects.*, shadow_object_relations.* FROM shadow_object_relations LEFT JOIN shadow_objects ON shadow_object_relations.real_object_id = shadow_objects.id WHERE shadow_objects.type = ?';\n $this->database->execute($sql, array($type));\n\n $sql = 'DELETE from `shadow_meta` WHERE type = ?';\n $this->database->execute($sql, array($type));\n }",
"protected function clearAllPersistentData()\r\n {\r\n }",
"protected function clear() {}",
"function clearType($type) {\n $keyGroups = array();\n $theKey = 'keyGroup' . ucfirst($type);\n if (isset($this->$theKey)) {\n $keyGroups = $this->$theKey;\n }\n\n $cache = Zend_Registry::get('cache');\n $keys = $cache->get('SITEKEYS');\n foreach ($keyGroups AS $keyGroup) {\n if (isset($keys[$keyGroup])) {\n foreach ($keys[$keyGroup] AS $singleKey) { \n $cache->remove($singleKey);\n } \n $keys[$keyGroup] = array();\n }\n }\n $cache->set($keys, 'SITEKEYS');\n }",
"public function unsetSelectionUidValues(): void\n {\n $this->selectionUidValues = [];\n }"
] | [
"0.73308444",
"0.7052343",
"0.664111",
"0.6588307",
"0.6502367",
"0.64626735",
"0.63634354",
"0.6318861",
"0.63055134",
"0.62844545",
"0.62447685",
"0.62361693",
"0.61989176",
"0.61975455",
"0.6171582",
"0.6164001",
"0.61329347",
"0.61133933",
"0.6100871",
"0.60891646",
"0.60847163",
"0.60797125",
"0.6071015",
"0.6052233",
"0.6049444",
"0.60439557",
"0.60137725",
"0.6010316",
"0.59947443",
"0.5981551",
"0.5977922",
"0.59723794",
"0.597166",
"0.59702724",
"0.5967311",
"0.59442973",
"0.59428406",
"0.5913811",
"0.5901689",
"0.5897088",
"0.58874613",
"0.58805454",
"0.5879989",
"0.58795846",
"0.5875735",
"0.5871003",
"0.58640605",
"0.5862735",
"0.5862735",
"0.58554184",
"0.5846408",
"0.5844296",
"0.58338773",
"0.5829832",
"0.5827495",
"0.5793923",
"0.57929415",
"0.5783387",
"0.57822853",
"0.5776201",
"0.5770858",
"0.5768894",
"0.5752969",
"0.5749569",
"0.57463545",
"0.57370096",
"0.5731639",
"0.573057",
"0.5718901",
"0.5714935",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5694005",
"0.5693573",
"0.56867445",
"0.5662038",
"0.56614435",
"0.56573516",
"0.56483144"
] | 0.6654336 | 2 |
Get max bloc allow | public function canAllowBlocsMemory($numBloc)
{
return true; // no limitation
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMaxValue();",
"public function getMaxValue();",
"public function getMaxLimit()\n {\n return $this->max_limit;\n }",
"function getMaxValue() { return $this->readMaxValue(); }",
"function getMaxValue() { return $this->readMaxValue(); }",
"function getMax() { return $this->readMaxValue(); }",
"public function getMaxUse(): int\n {\n return $this->max_use;\n }",
"public function getMaxValue()\n {\n return $this->get('MaxValue');\n }",
"public function getMaxAllowedPacket(): int\n {\n if (!isset($this->maxAllowedPacket))\n {\n $query = \"show variables like 'max_allowed_packet'\";\n $max_allowed_packet = $this->executeRow1($query);\n\n $this->maxAllowedPacket = $max_allowed_packet['Value'];\n\n // Note: When setting $chunkSize equal to $maxAllowedPacket it is not possible to transmit a LOB\n // with size $maxAllowedPacket bytes (but only $maxAllowedPacket - 8 bytes). But when setting the size of\n // $chunkSize less than $maxAllowedPacket than it is possible to transmit a LOB with size\n // $maxAllowedPacket bytes.\n $this->chunkSize = (int)min($this->maxAllowedPacket - 8, 1024 * 1024);\n }\n\n return (int)$this->maxAllowedPacket;\n }",
"public function getMaximumAttempts();",
"function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }",
"function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }",
"public function getMaxBaths();",
"function max() { return $this->max; }",
"public function getMax() {\n return $this->max;\n }",
"public function getMax()\n {\n return $this->_maxValue;\n }",
"public function getMaximumTransferable();",
"public function getMaxBesaveList(){\n return $this->_get(17);\n }",
"public function getMaxBeds();",
"public function get_limit();",
"function getLimit(){\n\t\t\treturn $this->limite;\n\t\t}",
"abstract public function maxMax(): int;",
"function exibeAtualMax(){\n $nmin= (($this->atual * $this->numpage) - $this->numpage)+1;\n return $nmax= ($this->numpage + $nmin)-1;\n }",
"public function getMaxOccupancy()\n {\n return $this->maxOccupancy;\n }",
"public function getMaximum()\n {\n return $this->max;\n }",
"public function getMaxAllowedPacket()\n\t{\n\t\treturn PHP_INT_MAX;\n\t}",
"public static function maxLevel()\n\t{\n\t\tif (!auth()->check()) return 0;\n\t\t$member = \\PanicHDMember::find(auth()->user()->id);\n\t\tif ($member->isAdmin()){\n\t\t\treturn 3;\n\t\t}elseif($member->isAgent()){\n\t\t\treturn 2;\n\t\t}else\n\t\t\treturn 1;\n\t}",
"public function getMaximum() {\r\n return $this->maximumvalue;\r\n }",
"public function getLimit() {}",
"public function getMaxPower() {\r\n return $this->getMemberCount() * $this->factionsLevel->getSettings()->maxPowerPerUser;\r\n }",
"public function getUsagelimit()\n {\n return $this->usagelimit;\n }",
"public function getMaxPerIp()\n {\n return $this->maxPerIp;\n }",
"public function getMaxLoad()\n {\n return $this->maxLoad;\n }",
"public function getMaxPlayers(): int;",
"public function getMaximum()\n {\n return $this->maximum;\n }",
"function getLimit() ;",
"public function getMaxPerUserId()\n {\n return $this->maxPerUserId;\n }",
"public function getAllowedMaxFileNumber() {\n return $this->allowedMaxFileNumber;\n }",
"public function maxCapacity() \r\n {\r\n return $this->maxCapacity;\r\n }",
"public function getMaximalIv(): int\n {\n return max($this->attack, $this->defense, $this->stamina);\n }",
"public function getMaxValueCharacteristic(){\n\t\t$maxValue = 1;\n\t\t\n\t\tforeach( $this->attributes as $key => $value ){\n\t\t\tif( $key!='knights_id' && $maxValue < $value ) $maxValue = $value; \n\t\t}\t\t\n\t\treturn $maxValue;\n\t}",
"public function usedVO2maxValue()\n {\n if (Configuration::VO2max()->useElevationCorrection()) {\n if ($this->Activity->vo2maxWithElevation() > 0) {\n return $this->Activity->vo2maxWithElevation();\n }\n }\n\n return $this->Activity->vo2maxByHeartRate();\n }",
"public function getMax(): int;",
"public function hasMaxVigor(){\r\n return $this->_has(25);\r\n }",
"public function getSlotMaxAttribute()\n {\n return ($this->trainer_slot_id ? $this->trainer_count * $this->slot_max_potential : $this->slot_max_potential);\n }",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getLimit();",
"public function getMax()\n {\n return $this->_fMax;\n }",
"protected function getLimit()\n {\n return (int)$this->getSettingsValue('limit');\n }",
"public static function get_max_value() {\n return self::MAX_VALUE;\n }",
"public function getMaxcount()\n {\n return $this->maxCount;\n }",
"public function getOverfillLimit()\n {\n return 20;\n }",
"public function getMaximumAmount()\n\t{\n\t\treturn ['amount' => 5000.00, 'currency' => 'EUR'];\n\t}",
"public function getMaxSize() : int{\n return $this->maxSize;\n }",
"public function get_copy_max(){ return $this->_copy_max;}",
"public function get_limit() {\n\t\t// This matches the maximum number of indexables created by this action.\n\t\treturn 4;\n\t}",
"public function get_limit() {\n\t\t$job_listing_limit = $this->get_job_listing_limit();\n\t\tif ( $job_listing_limit ) {\n\t\t\treturn $job_listing_limit;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"function _checkMaxQuantityLimt()\r\n {\r\n if ($this->data[$this->name]['buy_max_quantity_per_user'] >= $this->data[$this->name]['buy_min_quantity_per_user']) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public function getLimit() : int\n {\n return $this->limit;\n }",
"public function hasMaxBesave(){\n return $this->_has(17);\n }",
"public function getMaxSize(){\n return $this->maxSize;\n }",
"public function maxTries();",
"public function getMax();",
"function _checkMaxLimt()\r\n {\r\n if ($this->data[$this->name]['max_limit'] >= $this->data[$this->name]['min_limit']) {\r\n return true;\r\n }\r\n return false;\r\n }",
"function maxLoan(){\n\tglobal $driver;\n\t$sql\t=\t\"SELECT maxloan FROM settings\"; //Retrieve maximum loan amount to be given\n\tif($maxloan\t\t=\t$driver->perform_request($sql)):\n\t\t$row\t\t=\t$driver->load_data($maxloan);\n\t\t$maxloanamt\t=\t(($row['maxloan'])>0)?($row['maxloan']):500000;\n\telse:\n\t\tdie('<p class=\"error\">ERROR Retrieving Maximum Loan Amount.<br/>'.mysql_error().'</p>');\n\tendif;\n\treturn $maxloanamt; //The maximum amount to loan\n}",
"public function GetMaxSize ();",
"public function get_limit(){\r\n return $this->limit;\r\n }",
"public function getMaxSize(): int;",
"public function get_places_limit()\n\t{\n\t\treturn 2 + ($this->up->rank['number']-1) * 2;\n\t}",
"public function getMaxArea();",
"public function maxRangeSets(): int\n {\n return $this->maximumRangeSets;\n }",
"public function getLimit() {\n\t\treturn $this->limit;\n\t}",
"public function getMaxConfs()\n {\n return $this->max_confs;\n }",
"function GetMaxLists()\n\t{\n\t\tif (!$this->Admin() && !$this->ListAdmin()) {\n\t\t\treturn $this->group->limit_list;\n\t\t}\n\t\t\n\t\treturn -1;\n\t}",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit()\n {\n return $this->limit;\n }",
"public function getLimit() {\n return $this->limit;\n }",
"public function limit(): int\n {\n return $this->limit;\n }",
"public function getMaxStorage() {}",
"function getApiLimit() {\n\t\tif ( is_null( $this->apiLimits ) ) {\n\t\t\treturn 'max';\n\t\t}\n\t\treturn $this->apiLimits;\n\t}",
"abstract protected function getMaxParameter(): int;",
"public function getMaxSize(): int\n {\n return $this->maxSize;\n }",
"public function getMaxHops()\n {\n return $this->max_hops;\n }",
"public function hasMaxAnger(){\r\n return $this->_has(6);\r\n }",
"public function getAllowedMaxFileNumber()\n {\n $uploadField = $this->getUploadField();\n\n return $uploadField->getAllowedMaxFileNumber();\n }",
"public function getMaxSpeed() : int\n {\n return $this->maxSpeed;\n }",
"public function getLimit ()\r\n\t{\r\n\t\treturn $this->limit;\r\n\t}",
"private static function GetLimit() : int\n\t{\n\t\t// $detect = new \\Mobile_Detect();\n\t\t// if(self::IsMobileOrTablet())\n\t\t// \treturn self::GetMobileLimit();\n\t\t// else\n\t\treturn self::GetComputerLimit();\n\t}"
] | [
"0.70295036",
"0.70295036",
"0.694243",
"0.6926703",
"0.691577",
"0.6818449",
"0.67811376",
"0.6648444",
"0.66329193",
"0.66284513",
"0.66281825",
"0.66281825",
"0.6586082",
"0.655348",
"0.6542635",
"0.6534614",
"0.65255123",
"0.65134484",
"0.64656824",
"0.646541",
"0.64604485",
"0.64517933",
"0.64371294",
"0.6429933",
"0.64212275",
"0.63469803",
"0.6344671",
"0.6331626",
"0.63271743",
"0.631813",
"0.6317589",
"0.63145995",
"0.63073415",
"0.6304647",
"0.6299569",
"0.629594",
"0.6280885",
"0.6270736",
"0.6267617",
"0.6246556",
"0.62365854",
"0.6229561",
"0.62283194",
"0.6215168",
"0.62122566",
"0.6202568",
"0.6202568",
"0.6202568",
"0.6202568",
"0.6202568",
"0.618866",
"0.6184994",
"0.61844915",
"0.61790663",
"0.61772424",
"0.6164763",
"0.61602324",
"0.6154468",
"0.61513036",
"0.6151222",
"0.6147268",
"0.6135726",
"0.612515",
"0.612138",
"0.61204064",
"0.6093532",
"0.60878706",
"0.60788447",
"0.60725236",
"0.6071248",
"0.60680735",
"0.60589015",
"0.60394216",
"0.6031823",
"0.6024256",
"0.602323",
"0.60113704",
"0.6002879",
"0.6002879",
"0.6002879",
"0.6002879",
"0.6002879",
"0.6002879",
"0.6002879",
"0.6002879",
"0.6002879",
"0.6002879",
"0.6002879",
"0.6002879",
"0.6001291",
"0.6000887",
"0.59952736",
"0.59924227",
"0.5981059",
"0.5978726",
"0.59776574",
"0.5973403",
"0.59733194",
"0.5972071",
"0.5971532",
"0.5953156"
] | 0.0 | -1 |
Get the adapter options | protected function getOptions()
{
if(null === $this->options) {
throw new Exception\InvalidArgumentException('Db adapter options must be defined.');
}
return $this->options;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOptions() {}",
"public function getOptions() {}",
"public function getOptions() {}",
"protected function getOptions() {}",
"protected function getOptions() {}",
"protected function getOptions() {}",
"abstract public function getOptions();",
"public function getOptions()\r\n {\r\n }",
"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();",
"protected static abstract function getOptions();",
"function getOptions() {\n return array(\n 'ENGINE' => $this->getStorageEngine(), \n 'DEFAULT CHARSET' => $this->getCharacterSet(), \n 'COLLATE' => $this->getCollation(), \n );\n }",
"public final function getOptions()\n {\n return $this->_getOptions();\n }",
"protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }",
"protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}",
"protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}",
"protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}",
"protected function getOptions() {\n\t\treturn array();\n\t}",
"protected function getOptions()\n {\n return [\n ];\n }",
"protected function getOptions()\n {\n return [\n ];\n }",
"protected function getOptions()\n {\n return [\n ];\n }",
"protected function getOptions()\n {\n return [\n ];\n }",
"protected function getOptions()\n {\n return [\n ];\n }",
"protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"protected function _getOptions() { return array(); }",
"public function getOptions() \n {\n return $this->options;\n }",
"public function getOptions() {\n\n return $this->options;\n }",
"protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}",
"protected function getOptions()\n {\n return array(\n\n );\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions(){\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions()\n {\n return $this->options;\n }",
"public function getOptions() {\n return $this->options;\n }",
"public function getOptions() {\n return $this->options;\n }",
"protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"protected function getOptions()\n {\n return array();\n }",
"protected function getOptions()\n {\n return array();\n }",
"protected function getOptions()\n {\n return array();\n }",
"protected function getOptions()\n {\n return array();\n }",
"protected function getOptions()\n {\n return array();\n }",
"protected function getOptions()\n {\n return array();\n }",
"protected function getOptions()\n {\n return array();\n }",
"protected function getOptions()\n\t{\n\t\treturn array();\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array();\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array();\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array();\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array();\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array();\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array();\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array();\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array();\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array();\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array();\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array();\n\t}",
"protected function getOptions()\n\t{\n\t\treturn array();\n\t}",
"public function getOptions()\n {\n return $this->_options;\n }"
] | [
"0.77137345",
"0.77137345",
"0.7713057",
"0.76856977",
"0.7685208",
"0.7685208",
"0.76299685",
"0.7590041",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.7578236",
"0.75393033",
"0.74412405",
"0.74319553",
"0.74134874",
"0.7391382",
"0.7383027",
"0.73684907",
"0.73670167",
"0.7360465",
"0.7360465",
"0.7360465",
"0.7360465",
"0.7360465",
"0.73430413",
"0.73430413",
"0.73430413",
"0.73430413",
"0.73402226",
"0.73357964",
"0.7332228",
"0.7328087",
"0.7323939",
"0.73204714",
"0.73204714",
"0.7320456",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7318201",
"0.7314853",
"0.7314853",
"0.73093754",
"0.73093754",
"0.73093754",
"0.73093754",
"0.73093754",
"0.73093754",
"0.73093754",
"0.730851",
"0.730851",
"0.730851",
"0.730851",
"0.730851",
"0.730851",
"0.730851",
"0.7306459",
"0.7306459",
"0.7306459",
"0.7306459",
"0.7306459",
"0.7306459",
"0.7306459",
"0.7306459",
"0.7306459",
"0.7306459",
"0.7306459",
"0.7306459",
"0.7306459",
"0.7304493"
] | 0.7474843 | 25 |
Set the db adapter options | protected function setOptions(array $options)
{
if(
!array_key_exists('adapter', $options) ||
!array_key_exists('table', $options) ||
!array_key_exists('column_key', $options) ||
!array_key_exists('column_value', $options)
) {
throw new Exception\InvalidArgumentException(
'Db adapter options must be defined "adapter", "table", "column_key" and "column_value" keys.'
);
}
if(!$options['adapter'] instanceof Adapter) {
throw new Exception\InvalidArgumentException(
'Db adapter must be an instance of Zend\Db\Adapter\Adapter.'
);
}
$this->adapter = $options['adapter'];
$options['table'] = $this->adapter->getPlatform()->quoteIdentifier($options['table']);
$options['column_key'] = $this->adapter->getPlatform()->quoteIdentifier($options['column_key']);
$options['column_value'] = $this->adapter->getPlatform()->quoteIdentifier($options['column_value']);
$this->options = $options;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setOptions(array $options): DbConnectionConfigInterface;",
"protected function _setupDatabaseAdapter()\n {\n $zl = Zend_Registry::get('Zend_Locale');\n $this->_db = Zend_Registry::get('db4');\n\n parent::_setupDatabaseAdapter();\n }",
"public function getDbAdapter();",
"public function setAdapter(AdapterInterface $adapter);",
"public static function setDefaultAdapter (Zend_Db_Adapter_Abstract $db) {\n self::$db = $db;\n }",
"function HTTP_Session_Container_MDB2($options)\n {\n $this->_setDefaults();\n if (is_array($options)) {\n $this->_parseOptions($options);\n } else {\n $this->options['dsn'] = $options;\n }\n }",
"public function setOptions(array $options): AdapterInterface\n {\n $hydrator = $this->getHydrator();\n $hydrator->hydrate($this, $options);\n\n return $this;\n }",
"public function __construct() {\n $this->adapter = new PDOAdapter();\n }",
"public function setDatabaseConfig()\n {\n $this->_databaseConfig = Core_Model_Config_Json::getModulesDatabaseConfig();\n\n $this->_type = $this->_databaseConfig['type'];\n $this->_host = $this->_databaseConfig['host'];\n $this->_name = $this->_databaseConfig['name'];\n $this->_user = $this->_databaseConfig['user'];\n $this->_pass = $this->_databaseConfig['pass'];\n }",
"protected function _getDatabaseAdapter()\n {\n // initialize the Adapter\n $adapter = new TDProject_Core_Model_Auth_Adapter_Database(\n $this->getUsername(),\n $this->getPassword()\n );\n // add it to the internal array\n $this->_adapters[] = $adapter->setContainer($this->getContainer());\n }",
"public function setAdapterMethod($adapter);",
"public function setDatabaseConfiguration()\n\t{\n\t\tglobal $wpdb;\n $this->app['config']->set([\n 'database.connections.mysql' => [\n \t\t\t'driver' => 'mysql',\n \t\t\t'host' => DB_HOST,\n \t\t\t'database' => DB_NAME,\n \t\t\t'username' => DB_USER,\n \t\t\t'password' => DB_PASSWORD,\n \t\t\t'charset' => $wpdb->charset,\n \t\t\t'collation' => $wpdb->collate,\n \t\t\t'prefix' => $wpdb->prefix,\n \t\t\t'timezone' => '+00:00',\n \t\t\t'strict' => false,\n \t\t]\n ]);\n\t}",
"public function initOptions()\n {\n $this->setOption('className', '%CLASS%' . $this->getRelationName());\n }",
"protected function _initDbResource()\n {\n $registry = $this->getPluginResource('db');\n if (!$registry) {\n return;\n }\n\n //\n // options in configs/application\n $options = $registry->getOptions();\n\n if (array_key_exists('dsn', $options) && '' !== $options['dsn']) {\n $options['params'] = array_replace(\n $options['params'],\n $this->_parseDsn($options['dsn'])\n );\n }\n\n $registry->setOptions($options);\n }",
"public function setConnection(AdapterInterface $adapter);",
"public function __construct()\n {\n $this->option['dbname'] = 'live';\n\n parent::__construct();\n }",
"public function setOptions($options){\n\n\t}",
"protected function getOptions()\n {\n if(null === $this->options) {\n throw new Exception\\InvalidArgumentException('Db adapter options must be defined.');\n }\n return $this->options;\n }",
"protected function _initDb()\n {\n $this->bootstrap('configs');\n \n // combine application.ini & config.ini database settings\n $options = $this->getOptions();\n $dbSettings = $options['resources']['db'];\n $dbParams = Zend_Registry::get('config.config')->db->toArray();\n $dbSettings['params'] = array_merge($dbSettings['params'], $dbParams);\n \n $db = Zend_Db::factory($dbSettings['adapter'], $dbSettings['params']);\n if(!empty($dbSettings['isDefaultTableAdapter'])\n && (bool)$dbSettings['isDefaultTableAdapter']\n ) {\n Zend_Db_Table::setDefaultAdapter($db);\n }\n }",
"protected function configureOptions(): void\n {\n }",
"function __construct(){\n\t\t\t$this->configDB=array(\n\t\t\t\t'driver' => 'Mysqli',\n\t\t\t\t'host' => '127.0.0.1',\n\t\t\t\t'username'=> 'root',\n\t\t\t\t'password'=> '',\n\t\t\t\t'dbname' => 'bd_sain',\n\t\t\t\t'driver_options' => array(\n\t\t\t\tPDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')\t\t\t\t\n\t\t\t);\n\t\t\t\t\n\t\t\t$this->db =new Adapter($this->configDB);\n\t\t}",
"public function setAdapter(Adapter $adapter) : void\n {\n $this->adapter = $adapter;\n }",
"public function setDefaultAdapter() {\n\t\t$this->setAdapter(new Client());\n\t}",
"function getOptions() {\n return array(\n 'ENGINE' => $this->getStorageEngine(), \n 'DEFAULT CHARSET' => $this->getCharacterSet(), \n 'COLLATE' => $this->getCollation(), \n );\n }",
"abstract public function setOptions($options);",
"public function configureOptions();",
"public function __construct(array $options = null) {\n\t\tparent::__construct( $options );\n\t\t$this->setDbTable('Unit_Model_DbTable_RentSettings');\n\t}",
"public function setConnectionOverride(\\codename\\core\\database $db) {\r\n $this->db = $db;\r\n }",
"abstract public function setOptions($options = array());",
"public function setAdapterType($adapterType)\n {\n \t$this->adapterType = $adapterType;\n }",
"public static function setDefaultAdapter($adapter, $options = array()) \n {\n self::$_defaultAdapter = self::factory($adapter, $options);\n }",
"function _setDefaults()\n {\n $this->options['dsn'] = null;\n $this->options['table'] = 'sessiondata';\n $this->options['autooptimize'] = false;\n }",
"protected function _initDb(){\n $config = $this->getOptions();\n\n $db = Zend_Db::factory($config['resources']['db']['adapter'], $config['resources']['db']['params']);\n\n //set default adapter\n Zend_Db_Table::setDefaultAdapter($db);\n\n //save Db in registry for later use\n Zend_Registry::set(\"db\", $db);\n \n Zend_Controller_Action_HelperBroker::addPath(\n \t\tAPPLICATION_PATH .'/helpers');\n\t\t\n }",
"protected function initOptions()\n {\n }",
"public function setConfig($options);",
"protected function configure($options = array(), $attributes = array())\n {\n $this->addOption('format', '%isd% %mobile%');\n }",
"public function setOptions($options = []);",
"public function setAdapter(AdapterInterface $adapter)\r\n {\r\n\r\n }",
"public function __construct($_dbAdapter = NULL, $_options = array())\n {\n if (isset($_options[Config::FILESYSTEM_ENABLE_NOTIFICATIONS]) && true === $_options[Config::FILESYSTEM_ENABLE_NOTIFICATIONS]) {\n $this->_notificationActive = $_options[Config::FILESYSTEM_ENABLE_NOTIFICATIONS];\n }\n\n if (isset($_options[Config::FILESYSTEM_MODLOGACTIVE]) && true === $_options[Config::FILESYSTEM_MODLOGACTIVE]) {\n $this->_modlogActive = $_options[Config::FILESYSTEM_MODLOGACTIVE];\n } else {\n $this->_omitModLog = true;\n }\n\n\n parent::__construct($_dbAdapter, $_options);\n }",
"protected function addDbOption($isChild = false) {\r\n\t\t$this->addOption('db', null, InputOption::VALUE_OPTIONAL, $isChild ? 'This option will be automatically set based on entity manager' : 'Key of a database in application config (Helpful if using multiple connections with \"dbs.options\")', DoctrineMigrationsServiceProvider::DEFAULT_CONNECTION_NAME);\r\n\t}",
"protected function setDefaults()\n {\n $this->options['dsn'] = null;\n $this->options['table'] = 'sessiondata';\n $this->options['autooptimize'] = false;\n }",
"public static function ini()\n {\n switch (Config::get('database.driver')) {\n case 'mysql':\n self::$driver = new Schema\\MysqlSchema();\n break;\n }\n }",
"public function setAdapter(\\Phig\\AdapterInterface $adapter)\n\t{\n\t\t$this->adapter = $adapter;\n\t}",
"public static function setDefaultAdapter(DbAdapterInterface $dbAdapter = null): void {\r\n self::$defaultAdapter = $dbAdapter;\r\n }",
"public function setOptions($options) {\n\n $this->options = $options;\n }",
"public function __construct(\\Zend\\Db\\Adapter\\Adapter $db) {\n parent::__construct($db, 'link_provider');\n }",
"private function setOptions()\n {\n $this->clientId = $this->config['stravaSettings']['clientId'];\n $this->clientSecret = $this->config['stravaSettings']['clientSecret'];\n $this->redirectUri = $this->config['stravaSettings']['redirectUri'];\n $this->aprovalPrompt = $this->config['stravaSettings']['approval_prompt'];\n $this->scopes = $this->config['stravaSettings']['scopes'];\n }",
"public function __construct() {\n\t\t// conexao com o banco de dados\n\t\t$link = mysqli_connect ( 'localhost', 'bdr_api', 'bdr_api', 'bdr_api' );\n\t\tmysqli_set_charset ( $link, 'utf8' );\n\t\t\n\t\t$this->adapter = $link;\n\t}",
"public function getDbAdapter($name = 'default')\n {\n if (!isset($this->_dbadapters[$name])) {\n try {\n $this->_dbadapters[$name] = Wacow_Application_Resource::getDbAdapter($this->_dbOptions->$name);\n } catch (Exception $e) {\n throw $e;\n }\n\n if ('default' === $name) {\n Zend_Db_Table::setDefaultAdapter($this->_dbadapters[$name]);\n }\n\n if (!$this->_app->debugMode) {\n $metacacheStorage = 'File';\n $metacacheLifetime = null;\n $metacacheOptions = array('cache_dir' => ':cachePath/tablemeta');\n if (isset($this->_dbOptions->$name->metacache)) {\n $metacacheSettings = $this->_dbOptions->$name->metacache;\n $metacacheStorage = isset($metacacheSettings->storage) ? $metacacheSettings->storage : 'File';\n $metacacheLifetime = isset($metacacheSettings->lifetime) ? (int) $metacacheSettings->lifetime : null;\n if (isset($metacacheSettings->options)) {\n $metacacheOptions = $metacacheSettings->options;\n }\n }\n\n $setting = array(\n 'frontendName' => 'Core',\n 'backendName' => $metacacheStorage,\n 'frontendOptions' => array('lifetime' => $metacacheLifetime, 'automatic_serialization' => true,),\n 'backendOptions' => Wacow_Application::translatePath($metacacheOptions)->toArray(),\n );\n $cache = Wacow_Application_Resource::getCache($setting);\n\n Zend_Db_Table::setDefaultMetadataCache($cache);\n }\n }\n return $this->_dbadapters[$name];\n }",
"public function __construct($options = array()) {\n\t\t$defaults = array(\n\t\t\t'null' => FALSE,\n\t\t\t'blank' => FALSE,\n\t\t\t'db_column' => NULL,\n\t\t\t'db_index' => FALSE,\n\t\t\t'default' => NULL,\n\t\t\t'primary_key' => FALSE,\n\t\t\t'unique' => FALSE,\n\t\t);\n\n\t\tforeach ($defaults AS $opt_name => $default_value) {\n\t\t\tif (isset($options[$opt_name])) {\n\t\t\t\t$this->$opt_name = $opt_values[$opt_name];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->$opt_name = $default_value;\n\t\t\t}\n\t\t}\n\t}",
"public function getAdapterName()\n {\n return 'Db';\n }",
"public function __construct($adapter = null)\n {\n $this->adapter = $adapter;\n $this->createTable();\n }",
"function setOptions (array $options);",
"public function handler_ava_reset_db_options()\n\t\t{\n\t\t\tupdate_option( $this->opt_key_attachment_urls, array() );\n\t\t}",
"private function setSettings()\n {\n // Use faster compression if available\n if (Memcached::HAVE_IGBINARY) {\n $this->memcached->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_IGBINARY);\n } elseif (\\defined('Memcached::HAVE_MSGPACK') && Memcached::HAVE_MSGPACK) {\n $this->memcached->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_MSGPACK);\n }\n $this->memcached->setOption(Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT);\n $this->memcached->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);\n $this->memcached->setOption(Memcached::OPT_NO_BLOCK, true);\n $this->memcached->setOption(Memcached::OPT_TCP_NODELAY, true);\n $this->memcached->setOption(Memcached::OPT_COMPRESSION, false);\n $this->memcached->setOption(Memcached::OPT_CONNECT_TIMEOUT, 2);\n }",
"public function configure($options);",
"function set_db($db) {\n $this->db = $db;\n }",
"public function setOptions($options)\n {\n $this->options = $options;\n }",
"public function init()\n {\n parent::init();\n\n $this->setCollection($this->collectionName);\n $this->_options = array(\n 'fsync' => $this->fsync\n , 'safe' => $this->safe\n );\n if (!is_null($this->timeout))\n {\n $this->_options['timeout'] = $this->timeout;\n }\n }",
"public function setOptions(array $options = array());",
"public function setDb($db)\n {\n $this->db = $db;\n }",
"public function setQueryOptions(array $options): void {\n\t\tif(!isset($options['limit'])) $options['limit'] = 20;\n\t\tif(!isset($options['offset'])) $options['offset'] = false;\n\t\tif(!isset($options['sort'])) $options['sort'] = false;\n\t\tif(!isset($options['sortDirection'])) $options['sortDirection'] = false;\n\t\tif(!isset($options['groupby'])) $options['groupby'] = '';\n\n\t\t$this->_queryOptions = $options;\n\t}",
"public function setDatabase(Database_Config $databaseConfig);",
"public function setOptions(array $options);",
"public function setOptions(array $options);",
"public function setOptions(array $options);",
"public function setOptions(array $options);",
"public function setOptions(array $options);",
"public function setOptions(array $options);",
"public function setOptions(array $options);",
"public function setOptions(array $options);",
"public function set_options(Array $options);",
"function set_db(){\r\n\t\t$this->db=$this->db;\r\n\t}",
"public function setOptions()\n\t{\n\t\tupdate_option($this->optionVar, serialize($this->options));\n\t}",
"final public function db($db)\r\n\t{ //select db\r\n\r\n\t\t$this->db = $db;\r\n\t}",
"protected function BenchmarkDbLibrato($options) {\n $this->writeCsv = FALSE;\n }",
"public static function setTestAdapter(): void\n {\n self::$adapter = new KvkTestAdapter();\n }",
"public function setConnection()\r\n {\r\n $this->con = $this->db->getConnection();\r\n }",
"public function setAdapter($oDbAdapter)\n {\n CoreEntityModel::$oDbAdapter = $oDbAdapter;\n # User Permissions Table\n if (! isset(CoreEntityModel::$aEntityTables['user-permission'])) {\n CoreEntityModel::$aEntityTables['user-permission'] =\n new TableGateway('user_permission', CoreEntityModel::$oDbAdapter);\n }\n # User Index Table Columns\n if (! isset(CoreEntityModel::$aEntityTables['user-table-cols'])) {\n CoreEntityModel::$aEntityTables['user-table-cols'] =\n new TableGateway('user_table_column', CoreEntityModel::$oDbAdapter);\n }\n # User Form Tabs\n if (! isset(CoreEntityModel::$aEntityTables['user-form-tabs'])) {\n CoreEntityModel::$aEntityTables['user-form-tabs'] =\n new TableGateway('user_form_tab', CoreEntityModel::$oDbAdapter);\n }\n # User Form Fields\n if (! isset(CoreEntityModel::$aEntityTables['user-form-fields'])) {\n CoreEntityModel::$aEntityTables['user-form-fields'] =\n new TableGateway('user_form_field', CoreEntityModel::$oDbAdapter);\n }\n }",
"public function __construct($options = array()){ \r\n $this->setOptions($options);\r\n }",
"public function setDbalPlatformColumnOptions($context, DbalColumn $dbal_column, array &$dbal_column_options, $dbal_type, array $drupal_field_specs, $field_name);",
"private function _setDefaults(): void {\n\t\t// default query options\n\t\t$options['limit'] = 50;\n\t\t$options['offset'] = false;\n\t\t$options['sort'] = false;\n\t\t$options['sortDirection'] = false;\n\t\t$this->setQueryOptions($options);\n\t}",
"public function setAdapter($oDbAdapter) {\n CoreEntityModel::$oDbAdapter = $oDbAdapter;\n # User Permissions Table\n if(!isset(CoreEntityModel::$aEntityTables['user-permission'])) {\n CoreEntityModel::$aEntityTables['user-permission'] = new TableGateway('user_permission', CoreEntityModel::$oDbAdapter);\n }\n # User Index Table Columns\n if(!isset(CoreEntityModel::$aEntityTables['user-table-cols'])) {\n CoreEntityModel::$aEntityTables['user-table-cols'] = new TableGateway('user_table_column', CoreEntityModel::$oDbAdapter);\n }\n # User Form Tabs\n if(!isset(CoreEntityModel::$aEntityTables['user-form-tabs'])) {\n CoreEntityModel::$aEntityTables['user-form-tabs'] = new TableGateway('user_form_tab', CoreEntityModel::$oDbAdapter);\n }\n # User Form Fields\n if(!isset(CoreEntityModel::$aEntityTables['user-form-fields'])) {\n CoreEntityModel::$aEntityTables['user-form-fields'] = new TableGateway('user_form_field', CoreEntityModel::$oDbAdapter);\n }\n }",
"protected function _setOptions(&$sql, array $options) {\n\t\t\n\t\t// set order by\n\t\t\n\t\tif (isset($options['orderBy']) and is_array($options['orderBy'])) {\n\t\t\t\n\t\t\t// removing spaces to prevent SQL injections\n\t\t\t$options['orderBy'][0] = str_replace(' ', '', $options['orderBy'][0]);\n\t\t\t\n\t\t\t// set column\n\t\t\t$sql.= ' ORDER BY ' . $options['orderBy'][0];\n\t\t\t\n\t\t\t// set directions\n\t\t\tif (isset($options['orderBy'][1])) {\n\t\t\t\t$options['orderBy'][1] = str_replace(' ', '', $options['orderBy'][1]);\n\t\t\t\t$sql.= ' ' . $options['orderBy'][1];\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set limit\n\t\t\n\t\tif (isset($options['limitMax']) and isset($options['limitStart'])) {\n\t\t\t\n\t\t\t// ensure that these are numeric\n\t\t\t$options['limitMax'] = (integer) $options['limitMax'];\n\t\t\t$options['limitStart'] = (integer) $options['limitStart'];\n\t\t\t\n\t\t\t$sql.= ' LIMIT ' . $options['limitStart'] . ', ' . $options['limitMax'];\n\t\t\t\n\t\t} elseif (isset($options['limitMax'])) {\n\t\t\t\n\t\t\t// ensure that these are numeric\n\t\t\t$options['limitMax'] = (integer) $options['limitMax'];\n\t\t\t\n\t\t\t$sql.= ' LIMIT ' . $options['limitMax'];\n\t\t\t\n\t\t}\n\t}",
"private function __construct()\n {\n $driverName = $this->getConfigValue('driver') ? $this->getConfigValue('driver') : 'mysqli';\n switch (strtolower($driverName)) {\n case 'mysqli':\n $this->driver = new Driver\\Mysqli($this->getConfigValue());\n break;\n case 'mssql':\n $this->driver = new Driver\\Mssql($this->getConfigValue());\n break;\n }\n $this->utf = $this->driver->hasUTF();\n if ($this->utf) {\n $this->driver->setUTF();\n }\n }",
"public function setDbConnection($value)\n {\n $this->_db = $value;\n }",
"public function addAdapterConfig(string $name, string $class, array $options);",
"public function SetFromDB($db){\r\n\t\t$this->db=$db;\r\n\t}",
"abstract protected function createAdapter();",
"function Tree_OptionsDB( $dsn , $options=array() )\n {\n $res = $this->_connectDB( $dsn );\n if( !PEAR::isError($res) )\n {\n $this->dbh->setFetchmode(DB_FETCHMODE_ASSOC);\n }\n else\n {\n return $res;\n }\n\n $this->Tree_Options( $options ); // do options afterwards since it overrules\n }",
"protected function configure($options = array(), $attributes = array())\n {\n $this->addRequiredOption('model');\n $this->addOption('add_empty', false);\n $this->addOption('method', '__toString'); \n $this->addOption('key_method', 'getPrimaryKey');\n $this->addOption('order_by', array(\"ZoneLeft\",\"ASC\"));\n $this->addOption('query_methods', array());\n $this->addOption('criteria', null);\n $this->addOption('connection', null);\n $this->addOption('multiple', false);\n // not used anymore\n $this->addOption('peer_method', 'doSelect');\n\n parent::configure($options, $attributes);\n }",
"protected function _postConstruct()\n {\n $this->_adapters = (array) $this->_config['adapters'];\n }",
"public function setConnection() {\n\t\t$con = Config::get('librarydirectory::database.default');\n\t\tif ( $con && $con !== 'default' ) {\n\t\t\t$config = Config::get('librarydirectory::database.connections.'.$con);\n\t\t} else {\n\t\t\t$con = Config::get('database.default');\n\t\t\t$config = Config::get('database.connections.'.$con);\n\t\t}\n\t\tConfig::set('database.connections.'.$con, $config);\n\t}",
"public function getAdapter();",
"public function getAdapter();",
"public function __construct(\\Zend\\Db\\Adapter\\Adapter $db) {\n parent::__construct($db, 'facebook');\n }",
"protected function configure($options = array(), $attributes = array())\n {\n $this->addOption('date_format', 'f');\n }",
"public function setBackendOptions( array $backend ) {\n $this->_backendOptions = $backend;\n }",
"public function setOptions($options)\n {\n $this->options = $options;\n }",
"public function setOptions($options)\n {\n $this->options = $options;\n }"
] | [
"0.6705718",
"0.6310306",
"0.6225778",
"0.5997318",
"0.5966678",
"0.59628737",
"0.5923485",
"0.5908635",
"0.5891502",
"0.58901894",
"0.58620524",
"0.5860792",
"0.5835917",
"0.58231765",
"0.58178616",
"0.5810769",
"0.58008796",
"0.57981116",
"0.5790879",
"0.57748616",
"0.57653743",
"0.5754529",
"0.57545215",
"0.5727668",
"0.57211524",
"0.570801",
"0.57009035",
"0.56872344",
"0.56749594",
"0.56694895",
"0.56352895",
"0.56224155",
"0.5616109",
"0.5597235",
"0.5583975",
"0.55665857",
"0.5547683",
"0.5535205",
"0.55247253",
"0.5502421",
"0.55018204",
"0.5500445",
"0.5495152",
"0.5488756",
"0.5480589",
"0.54755116",
"0.545556",
"0.54532516",
"0.5439637",
"0.5435865",
"0.5424924",
"0.5424747",
"0.54230464",
"0.54206175",
"0.5415424",
"0.5410908",
"0.5409954",
"0.53838885",
"0.5374298",
"0.5373673",
"0.53725713",
"0.5369653",
"0.5362376",
"0.5359823",
"0.5359823",
"0.5359823",
"0.5359823",
"0.5359823",
"0.5359823",
"0.5359823",
"0.5359823",
"0.53552413",
"0.53550756",
"0.53131104",
"0.5312071",
"0.5309014",
"0.5308284",
"0.5305257",
"0.53034556",
"0.530225",
"0.5293843",
"0.52924275",
"0.5289847",
"0.5287559",
"0.5286361",
"0.5270354",
"0.52634877",
"0.5255784",
"0.525507",
"0.5253063",
"0.52464074",
"0.5237965",
"0.5235871",
"0.52340776",
"0.52340776",
"0.523241",
"0.52235794",
"0.5223301",
"0.52189654",
"0.52189654"
] | 0.68069464 | 0 |
Content we can convert from this software. | public static function canConvert()
{
return array(
'convert_forums_forums' => array(
'table' => 'forum',
'where' => NULL,
),
'convert_forums_topics' => array(
'table' => 'thread',
'where' => NULL,
),
'convert_forums_posts' => array(
'table' => 'post',
'where' => NULL,
),
'convert_attachments' => array(
'table' => 'attachment',
'where' => NULL
)
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract function getContent();",
"public function getContentEncoding();",
"abstract function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContent();",
"public function getContentEncoding()\n {\n }",
"public function getContent() {}",
"public function getContent() {}",
"public function getContent() {\n $content = '';\n\n if (Crypter::isCrypted($this->content)) {\n $content = Crypter::decrypt($this->content);\n }\n\n return $this->getExtractedContent($content);\n }",
"public function getContent() { return $this->content; }",
"public function getRawContent();",
"function getContent() ;",
"public function getContentObject() {}",
"public function contents();",
"function getContentCharset(){ return $this->_ContentCharset;}",
"abstract protected function content();",
"public function content();",
"public function getContent()\n {\n \t$content = $this->content;\n return $content;\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 }",
"public function getContent()\r\n {\r\n return $this->content;\r\n }",
"public abstract function getContentTransferEncoding();",
"public function getContent(): string\n {\n return strval($this->content);\n }",
"function get_content() {\r\n\t\treturn $this->content;\r\n\t}",
"abstract protected function getOriginalContent();",
"public function get_output_content();",
"public function getContent()\r\n {\r\n return $this->_content;\r\n }",
"protected function getContent() {\n return $this->content;\n }",
"function getContent()\n {\n return $this->content;\n\n }",
"public function getContent(){\n\t\treturn $this->content;\n\t}",
"public function getBinaryContent();",
"public function get_content() {\n return $this->content;\n }",
"public final function get_content()\n {\n }",
"public final function get_content()\n {\n }",
"public final function get_content()\n {\n }",
"public function extObjContent() {}",
"public function extObjContent() {}",
"public function getContent(): string;",
"public function getContent(): string;",
"public function getContent()\n {\n return $this->content;\n }",
"public function contents() { return $this->_m_contents; }",
"function getContent()\n {\n return $this->content;\n }",
"function getContent()\n {\n return $this->content;\n }",
"public function getContent(){\n\t\treturn $this->content? $this->content:$this->content = file_get_contents($this->getFullName());\n\t}",
"public function getContent()\n {\n return $this->_content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent() {\n return $this->content;\n }",
"public function getContentStream();",
"public function getContent() : string {\n return $this->content;\n }",
"public function getContent() {\r\n\t\treturn $this->content;\r\n\t}",
"public function getContent(): string\n {\n return $this->content->content();\n }",
"function GetContent () {\n return unserialize(base64_decode($this->hunt_content));\n }",
"function getContentObject() ;",
"public function getContent () {\r\n\t\treturn $this->content;\r\n\t}",
"public function getContent(): string\n {\n return $this->_content;\n }",
"public function getContent()\n {\n }",
"public function getContent(){ }",
"public function getContent(){ }",
"public function getContent() {\n\t\treturn $this->content;\n\t}",
"public function getContent() {\n\t\treturn $this->content;\n\t}",
"public function getContent() {\n\t\treturn $this->content;\n\t}",
"abstract public function getContent() : string;",
"public function getContent(): string\n {\n return $this->content;\n }",
"public function getContent(): string\n {\n return $this->content;\n }",
"public function getContent(): string\n {\n return $this->content;\n }"
] | [
"0.6901831",
"0.6815364",
"0.6813327",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6803403",
"0.6736484",
"0.6706173",
"0.6706173",
"0.66197234",
"0.65617913",
"0.6520716",
"0.6502201",
"0.64747447",
"0.64665484",
"0.6461197",
"0.6421191",
"0.6409197",
"0.6398735",
"0.6396997",
"0.6389084",
"0.63800496",
"0.63794225",
"0.6369474",
"0.6358084",
"0.63502914",
"0.6338504",
"0.6333059",
"0.63301265",
"0.6325323",
"0.63228035",
"0.63127834",
"0.6300307",
"0.6300307",
"0.6299171",
"0.6289526",
"0.62873983",
"0.62869954",
"0.62869954",
"0.62848413",
"0.6283262",
"0.62828785",
"0.62828785",
"0.6270226",
"0.62542945",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.6252562",
"0.62491125",
"0.6228823",
"0.6214646",
"0.62019575",
"0.6195637",
"0.61895674",
"0.61892885",
"0.6185981",
"0.6171578",
"0.6166525",
"0.61642617",
"0.61642617",
"0.61599994",
"0.61599994",
"0.61599994",
"0.61580193",
"0.6151558",
"0.6151558",
"0.6151558"
] | 0.0 | -1 |
Can we convert passwords from this software. | public static function loginEnabled()
{
return FALSE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function necesitaCambiarPassword();",
"public function getSecuredPassword();",
"public function getPW() {}",
"protected function getConfiguredPassword() {}",
"public function isPassword() {\n\t\t$pwArray = array(\n\t\t\t'password',\n\t\t\t'senha',\n\t\t\t'lozinka',\n\t\t\t'heslotajne',\n\t\t\t'helslo_tajne',\n\t\t\t'wachtwoord',\n\t\t\t'contrasena',\n\t\t\t'salasana',\n\t\t\t'motdepasse',\n\t\t\t'mot_de_passe',\n\t\t\t'passwort',\n\t\t\t'passord',\n\t\t\t'haslo',\n\t\t\t'senha',\n\t\t\t'parola',\n\t\t\t'naponb',\n\t\t\t'contrasena',\n\t\t\t'loesenord',\n\t\t\t'losenord',\n\t\t\t'sifre',\n\t\t\t'naponb',\n\t\t\t'matkhau',\n\t\t\t'mat_khau'\n\t\t);\n\t\treturn \\in_array($this->name, $pwArray);\n\t}",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function password_verifies() {\n\t\treturn AuthComponent::password($this->data[$this->alias]['old_password']) === $this->data[$this->alias]['password'];\n\t}",
"public function getPasswordAdapter();",
"public function getPassword() {}",
"public function comparePassword() {\r\n if ($this->data[$this->name]['Password'] !== $this->data[$this->name]['RetypePass']) {\r\n return FALSE;\r\n } else {\r\n return TRUE;\r\n }\r\n }",
"protected function getPasswords_Driver_ConvertPasswordService()\n {\n return $this->services['passwords.driver.convert_password'] = new \\phpbb\\passwords\\driver\\convert_password(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['passwords.driver_helper']) ? $this->services['passwords.driver_helper'] : $this->getPasswords_DriverHelperService()) && false ?: '_'});\n }",
"public function providerForValidPassword()\n {\n return [\n ['password1'],\n ['pass-word1'],\n ['Pass word'],\n ['Password1'],\n ['Pass1'],\n ['Pass1#!']\n ];\n }",
"public function getPassword()\n {\n $encrypted_pass = Mage::getStoreConfig('smsnotifier/main_conf/apipassword');\n\n return Mage::helper('core')->decrypt($encrypted_pass);\n\n }",
"public function olvidoPassword(){\n\t}",
"public function authenticationWithValidAsciiSpecialCharClassPassword() {}",
"public function authenticationWithValidAsciiSpecialCharClassPassword() {}",
"public function authenticationWithValidAsciiSpecialCharClassPassword() {}",
"public function canModifyPasswords()\n {\n return in_array($this->encryption, ['tls', 'ssl']);\n }",
"public function authenticationWithValidAlphaCharClassPassword() {}",
"public function authenticationWithValidAlphaCharClassPassword() {}",
"public function authenticationWithValidAlphaCharClassPassword() {}",
"public static function renderPassword();",
"function password_recovery()\n\t{\n\n\n\t}",
"public function authenticationWithValidLatin1UmlautCharClassPassword() {}",
"public function authenticationWithValidLatin1UmlautCharClassPassword() {}",
"public function authenticationWithValidLatin1UmlautCharClassPassword() {}",
"public function esig_mail_get_password() {\n\n $esig_options = get_option('esig_mail_options');\n $temp_password = $esig_options['smtp_settings']['password'];\n $password = \"\";\n if (!$temp_password) {\n return $password;\n }\n\n $decoded_pass = base64_decode($temp_password);\n\n if (base64_encode($decoded_pass) === $temp_password) { //it might be encoded\n $password = base64_decode($temp_password);\n } else { //not encoded\n $password = $temp_password;\n }\n return $password;\n }",
"function vPassword2() \r\n\t\t{\r\n\t\t\t# Check password strength\r\n\t\t\t$p = $p1;\r\n\t\t\t\r\n\t\t\tif( strlen($p) < 8 ) $reg_errors[] = \"Password too short!\";\r\n\t\t\t\r\n\t\t\tif( strlen($p) > 20 ) $reg_errors[] = \"Password too long!\";\r\n\t\t\t\r\n\t\t\tif( !preg_match(\"#[0-9]+#\", $p) ) $reg_errors[] = \"Password must include at least one number!\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif( !preg_match(\"#[a-z]+#\", $p) ) $reg_errors[] = \"Password must include at least one letter!\";\r\n\t\t\t\r\n\t\t\tif( !preg_match(\"#[A-Z]+#\", $p) ) $reg_errors[] = \"Password must include at least one CAPS!\";\r\n\t\t\t\r\n\t\t\t/* if( !preg_match(\"#\\W+#\", $p) ) $errors[] = \"Password must include at least one symbol!\"; */\t\r\n\t\t\t\r\n\t\t}",
"public function isPassword($password);",
"function get_password($usrid){\r\n\t\r\n}",
"public function getPassword(): string;",
"public function authenticationWithValidNumericCharClassPassword() {}",
"public function authenticationWithValidNumericCharClassPassword() {}",
"public function authenticationWithValidNumericCharClassPassword() {}",
"function getPassword(){\n\n}",
"function wp_validate_application_password($input_user)\n {\n }",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function checkPassword($value);",
"function password_security($tested_password){\r\n $isSecured = false;\r\n $contains_letter = preg_match('/[a-zA-Z]/', $tested_password);\r\n $contains_capital = preg_match('/[A-Z]/', $tested_password);\r\n $contains_digit = preg_match('/\\d/', $tested_password);\r\n $contains_special = preg_match('/[^a-zA-Z\\d]/', $tested_password);\r\n\r\n $contains_all = $contains_letter && $contains_capital && $contains_digit && $contains_special;\r\n\r\n if (strlen($tested_password) >= 8 && $contains_all == \"1\") {\r\n $isSecured = true;\r\n }\r\n return $isSecured;\r\n}",
"function check_passwords($username, $password1, $password2)\n{\n\treturn $password1 = $password2 = Raven::_pwd($username); // This is how Raven does passwords\n}",
"public function goodPasswordProvider()\n {\n return [\n ['ABi$B47es.Pfg3n9PjPi'],\n ['potence tipple would frisk shoofly'],\n ];\n }",
"protected function getInstallToolPasswordStatus() {}",
"function external_db_show_password_fields()\n{\n return 0;\n}",
"public function hasPassword() : bool;",
"function passwordGood($pass) {\n\t// default encoding/encoding specified in php.ini for nginx's php fpm module\n\t// is 'UTF-8'\n\t$len = mb_strlen($pass);\n\t//$len = strlen($pass);\n\t// original code of ($len >= 8 && $len <= 24) doesn't seem to work since I think\n\t// when true these return 1, when false they seem to return nothing, when printed empty string\n\t// be careful, these seem to return nothing or they don't print properly\n\t// this does work though :P\n\tif ( ( $len < 8 ) || ( $len > 24 ) ) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}",
"public function hasCrypt(): bool;",
"public function authenticationWithValidLatin1SpecialCharClassPassword() {}",
"public function authenticationWithValidLatin1SpecialCharClassPassword() {}",
"public function authenticationWithValidLatin1SpecialCharClassPassword() {}",
"public function provideValidatePassword()\n {\n return [\n [123456, 234567, true],\n [\"123457\", 234567, true],\n [\"12345v\", 234567, false],\n ['asdfgh', 'asdfgh', false]\n ];\n }",
"function check() {\r\n static $pass = NULL;\r\n if (is_null($pass)) {\r\n if (function_exists('crypt')) {\r\n $hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG';\r\n $test = crypt(\"password\", $hash);\r\n $pass = $test == $hash;\r\n } else {\r\n $pass = false;\r\n }\r\n }\r\n return $pass;\r\n }",
"public function password()\n {\n }",
"function _cek_password($str)\n{\n if ($str!=\"\") {\n if (pass_decrypt(profile(\"token\"),$str,profile(\"password\"))) {\n return true;\n }else {\n $this->form_validation->set_message('_cek_password', '* Password Salah');\n return false;\n }\n }else {\n return true;\n }\n}",
"public function getAuthPassword()\n {\n }",
"public function getAuthPassword()\n {\n }",
"public function getAuthPassword()\n {\n }",
"public function passwd() {\n\n $pass = $_POST['password'];\n\n $p = $this->inputmanager;\n\n return $p->passwdchk($pass);\n\n }",
"public function getPassword(): string\n {\n }",
"public function password($password);",
"function checkPassword($clientPassword){\r\n $pattern = '/^(?=.*[[:digit:]])(?=.*[[:punct:]])(?=.*[A-Z])(?=.*[a-z])([^\\s]){8,}$/';\r\n return preg_match($pattern, $clientPassword);\r\n }",
"public static function password($data=''){\n\t\t\treturn true;\n\t\t}",
"function checkPassword($pwd, $pwd2, $X_langArray) {\n\tglobal $errorField;\n\n\t//le due password devono coincidere\n\tif ($pwd != $pwd2){\n\t\t$errorField .= \"&pwd2ErrMsg=\".urlencode($X_langArray['SETTING_PWD_REPET_ERROR']);\n\t}\n\telse{\n\t\t//password vuota\n\t\tif (!isset($pwd2) || $pwd2 == ''){\n\t\t\t$errorField .= \"&pwd2ErrMsg=\".urlencode($X_langArray['RECOVER_PWD_EMPTY_PWD_ERR']);\n\t\t}\n\t\telse{\n\t\t\t//la password deve contenere almeno una maiuscola, una minuscola ed un nuemro tra 7 e 21 caratteri)\n\t\t\tif (!preg_match('/(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])/', $pwd2) ) {\n\t\t\t\t$errorField .= \"&pwd2ErrMsg=\".urlencode($X_langArray['GEN_IS_NOT_PWD_REG']);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (strlen($pwd2) < 6 || strlen($pwd2) > 20 ) {\n\t\t\t\t\t$errorField .= \"&pwd2ErrMsg=\".urlencode($X_langArray['OVERLAY_LOG_SIGN_PWD_LENGTH_ERR']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}",
"function temp_pass(){\n\treturn 'password199';\n}",
"function vPassword( $password )\r\n\t\t{\r\n\t\t\t\treturn preg_match( '/^(?=^.{8,}$)((?=.*[A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z]))^.*$/', $password );\r\n\t\t\t\t\r\n\t\t}",
"function password_is_hash($password)\r\n{\r\n $nfo = password_get_info($password);\r\n return $nfo['algo'] != 0;\r\n}",
"function wp_get_password_hint()\n {\n }",
"public function get_password($service_name = ''){\n\t\t\n\t\t$output = array();\n\t\texec('security 2>&1 >/dev/null find-generic-password -ga '.$service_name,$output);\n\t\t\t\t\n\t\tif($output[0] && $output[0] !=\"security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\"){\n\t\t\n\t\t\t$password = $output[0];\t\t\t\n\t\t\t$password = str_replace('\"', '',$password);\n\t\t\t$password = str_replace('password: ', '',$password);\n\t\t\t\n\t\t\treturn $password;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}",
"function password($pass)\n\t{\n\t\tif (strcmp($pass, AUCTION_PASSWORD))\n\t\t\texit(\"Wrong password\");\n\t}",
"abstract protected function getCrypt();",
"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 passwd_verify(string $password, string $hash): bool\n{\n return password_verify($password, $hash);\n}",
"public function get_pass() \n {\n return $this->pass;\n }",
"public function getPassword() : ?string ;",
"private function checkUserPassword($raw, $from_database) {\n $application_key = defined('APPLICATION_UNIQUE_KEY') ? APPLICATION_UNIQUE_KEY : LICENSE_KEY;\n\n // activeCollab 1.0\n if(version_compare($this->currentVersion(), '1.1', '<')) {\n if ($raw == $from_database) {\n \treturn true;\n } else {\n \treturn sha1($application_key . $raw) == $from_database;\n } // if\n\n // activeCollab 1.1 to activeCollab 3.1.17\n } elseif(version_compare($this->currentVersion(), '3.1.17', '<')) {\n return sha1($application_key . $raw) == $from_database;\n\n // activeCollab 3.1.17+\n } else {\n if(strlen($from_database) == 40) {\n return sha1($application_key . $raw) == $from_database; // We have old, SHA1 encoded value\n } else {\n return base64_encode(pbkdf2($raw, $application_key, 1000, 40)) == $from_database; // New one, encoded with PBKDF2\n } // if\n } // if\n\n }",
"function cryptPasswordDeCrypt( $cifer, $key )\r\n{\r\n\treturn base64_decode( $cifer );\r\n}",
"function rest_get_authenticated_app_password()\n {\n }",
"function generateEncryptedPassword($userinfo) {\r\n if (!class_exists('PasswordHash')) {\r\n require_once JFUSION_PLUGIN_PATH . DS . $this->getJname() . DS . 'PasswordHash.php';\r\n }\r\n $t_hasher = new PasswordHash(8, true);\r\n $check = $t_hasher->CheckPassword($userinfo->password_clear, $userinfo->password);\r\n\r\n if ($check) {\r\n //password is correct and return the phpbb3 password hash\r\n return $userinfo->password;\r\n } else {\r\n //no phpbb3 encryption used and return the phpbb2 password hash\r\n\t\t\t$password_old_format = addslashes($userinfo->password_clear);\r\n\r\n\t\t\tif ($t_hasher->CheckPassword($userinfo->password_clear, md5($this->utf8_to_cp1252($password_old_format)))) {\r\n\t\t\t\t//password is correct\r\n\t\t\t\treturn $userinfo->password;\r\n\t\t\t} elseif ($t_hasher->CheckPassword($userinfo->password_clear, md5($password_old_format))) {\r\n\t\t\t\t//password is correct\r\n\t\t\t\treturn $userinfo->password;\t\t\t\t\r\n\t\t\t} elseif (md5($this->utf8_to_cp1252($password_old_format)) === $userinfo->password) {\r\n\t\t\t\t//password is correct\r\n\t\t\t\treturn $userinfo->password;\t\t\t\t\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t//ah who cares lets just a md5 standar encryption\r\n\t\t\t\t$encrypt_password = md5($password_old_format);\r\n return $encrypt_password;\r\n\t\t\t}\t\t\t\t\r\n\r\n }\r\n }",
"function can_change_password() {\n\t\treturn false;\n\t}",
"public function encodePassword(string $raw): string;",
"function checkPassword($clientPassword)\n{\n $pattern = '/^(?=.*[[:digit:]])(?=.*[[:punct:]])(?=.*[A-Z])(?=.*[a-z])([^\\s]){8,}$/';\n return preg_match($pattern, $clientPassword);\n}",
"public function getPass();",
"private function generate_pass()\n {\n echo password_hash('admin', PASSWORD_BCRYPT);\n }",
"function oldPassword() {\n\t\t$fields = $this->_settings['fields'];\n\t\tif (\n\t\t\tSecurity::hash($this->model->data[$this->model->name][$fields['old_password']], null, true) \n\t\t\t== $this->model->field($fields['password'])\n\t\t) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function can_change_password() {\n return false;\n }",
"function isValidPassword2($password)\n{\n return checkLength($password) && specialChar($password) && containsUpperAndLower($password);\n}",
"function validate_pw($password, $hash){\n /* Regenerating the with an available hash as the options parameter should\n * produce the same hash if the same password is passed.\n */\n return crypt($password, $hash)==$hash;\n }",
"public function get_strPassword()\n {\n return $this->strPassword;\n }",
"private function getPassword(): string {\n return $this->password;\n }",
"public function testUpdatePasswordOnlyLowerCase(): void { }",
"function retrievePassword($id_utente) {\n\n $query = sprintf(\"SELECT password FROM scuola.utenti_scuola WHERE id_utente = %s\", $id_utente);\n\n // Perform Query\n $result = mysql_query($query);\n\n $row = mysql_fetch_assoc($result);\n $password = $row['password'];\n\n\n return base64_decode(base64_decode($password));\n }"
] | [
"0.69111556",
"0.6900377",
"0.67965615",
"0.6785959",
"0.6640222",
"0.6633359",
"0.6633359",
"0.6633359",
"0.6633359",
"0.6633359",
"0.6633359",
"0.6633359",
"0.6629538",
"0.6628975",
"0.66017205",
"0.66007954",
"0.6597756",
"0.6576423",
"0.6566525",
"0.6563496",
"0.6542723",
"0.6542723",
"0.6542723",
"0.6505535",
"0.64942646",
"0.64942646",
"0.64942646",
"0.64693475",
"0.64627725",
"0.64248925",
"0.64248925",
"0.64248925",
"0.641943",
"0.6412415",
"0.6408691",
"0.64044523",
"0.6384617",
"0.6379288",
"0.6379288",
"0.6379288",
"0.6368581",
"0.6351864",
"0.6322008",
"0.6322008",
"0.6322008",
"0.6322008",
"0.6322008",
"0.6322008",
"0.6302481",
"0.62903637",
"0.6277043",
"0.6260482",
"0.6259796",
"0.6240745",
"0.6238037",
"0.6227276",
"0.62265074",
"0.6225851",
"0.6225851",
"0.6225851",
"0.62131894",
"0.6206627",
"0.6195769",
"0.61842996",
"0.6180276",
"0.6180276",
"0.6180276",
"0.61785275",
"0.61443686",
"0.6118533",
"0.61024064",
"0.6092916",
"0.60821235",
"0.60813063",
"0.6077637",
"0.6064505",
"0.60634047",
"0.60597634",
"0.60533136",
"0.60465324",
"0.6045995",
"0.60423356",
"0.603946",
"0.60386235",
"0.6026587",
"0.60058445",
"0.5998845",
"0.59872127",
"0.5983031",
"0.59746426",
"0.5973753",
"0.5963875",
"0.5961779",
"0.5961539",
"0.59544325",
"0.5952277",
"0.59515405",
"0.5951012",
"0.5950998",
"0.59489155",
"0.5944402"
] | 0.0 | -1 |
Count Source Rows for a specific step | public function countRows( $table, $where=NULL )
{
switch( $table )
{
case 'forum':
return count( $this->fetchForums() );
break;
case 'thread':
return parent::countRows( 'node', array( "(contenttypeid=? OR contenttypeid=?) AND " . \IPS\Db::i()->in( 'parentid', array_keys( $this->fetchForums() ) ), $this->fetchType( 'Text' ), $this->fetchType( 'Poll' ) ) );
break;
case 'post':
return parent::countRows( 'node', array( \IPS\Db::i()->in( 'contenttypeid', array( $this->fetchType( 'Text' ), $this->fetchType( 'Gallery' ), $this->fetchType( 'Video' ), $this->fetchType( 'Link' ) ) ) ) );
break;
case 'attachment':
return parent::countRows( 'node', array( "contenttypeid=?", $this->fetchType( 'Attach' ) ) );
break;
default:
return parent::countRows( $table, $where );
break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getStepStatCounts();",
"protected function getIterationsCount()\n {\n return count($this->readerGroups->getGroup('source_documents'));\n }",
"function RowCount() {}",
"public function count()\n {\n return count($this->steps);\n }",
"public function count()\n\t\t{\n\t\t\treturn count($this->source);\n\t\t}",
"public function count() {\r\n\t\t//$src = Dbi_Source::GetModelSource($this);\r\n\t\t//return count($src->select($this->query()));\r\n\t\treturn count($this->source->select($this));\r\n\t}",
"function NumRows() {}",
"public function computeCount() {\n $count = 0;\n foreach ($this->sourceUrls as $url) {\n $reader = new $this->readerClass($url, $this->idField);\n foreach ($reader as $element) {\n $count++;\n }\n }\n\n return $count;\n }",
"public function numRows() : int\n {\n return count($this->samples);\n }",
"abstract public function getNumExecutedLines();",
"abstract public function NumRows();",
"public function getCount()\n\t{\n\t\treturn $this->data_source->count();\n\t}",
"public function getNumRows();",
"abstract public function getNumRows();",
"abstract public function getNumRows();",
"public function numOfRows();",
"public function getStepCount()\r\n {\r\n return count($this->_steps);\r\n }",
"public function countDataProvider() {}",
"protected function collectData()\n {\n if (count($this->importData) === count($this->settings)) {\n return count($this->importData);\n }\n\n $step = Input::get('step');\n if (!$step) {\n $step = 0;\n }\n\n $setting = $this->settings[$step];\n $data = $this->loadFile($setting['importSource']);\n\n $this->importData[] = array(\n 'setting' => $setting,\n 'data' => $data\n );\n\n $this->setSession();\n\n return ++$step;\n }",
"function numRows()\n {\n $this->getRows();\n return $this->row_counter;\n }",
"public function countLines();",
"public function getLineCount() {}",
"private function count_operation_rows()\n {\n // $license_rows = $license['rows'];\n\n // $constructse = $this->Header_model->get_data_list('license_constructs', array('status' => 1));\n // $constructse_rows = $constructse['rows'];\n\n // return ($license_rows + $constructse_rows);\n }",
"public abstract function row_count();",
"public function count(Dataset\\Selection $selection): int;",
"public function getRowsCount()\n {\n if (is_null($this->summaryRow)) {\n return count($this->rows);\n } else {\n return count($this->rows) + 1;\n }\n }",
"public function getStepsCountAttribute()\n {\n $result = MultipleRoomsStepStatus::find($this->attributes['multiple_room_id']);\n\n return 5 - (@$result->basics + @$result->description + @$result->location + @$result->photos + @$result->pricing + @$result->calendar);\n }",
"public function totalCount();",
"public function totalCount();",
"public function getNumRows()\n {\n \treturn $this->previouslyExecuted->num_rows;\n }",
"public function getTotalCount();",
"public function getTotalCount();",
"public function getTotalCount();",
"public abstract function GetNumRows();",
"public function getNumberOfRows();",
"public function getStep() : int;",
"abstract public function prepareTotalCount();",
"abstract protected function prepareTotalCount();",
"public function nbRows();",
"public function total_rows();",
"abstract public function countTable();",
"public function numberOfRows();",
"public function getScenarioStatCounts();",
"public function getLinesCount();",
"function Count($start=0,$slice=0) {\n \n $query=$this->initQuery($start,$slice,\"\",true);\n $this->res_type=\"TABLE\";\n $err = $this->basic_elem->exec_query($query);\n\n //\tprint \"$query $res_type $p_query<BR>\\n\";\n if ($err != \"\") return($err); \n\n $result = $this->basic_elem->fetch_array(0);\n return ($result[\"count\"]); \n }",
"public function getPointCount() {}",
"protected function getNumberOfSteps() {\n return $this->getLocalSessionValue(self::NUM_STEPS_VAR);\n }",
"public function getNumRows(){\n\t\treturn $this->instance->getNumRows();\n\t}",
"public function computeCount() {\n migrate_instrument_start('MigrateSourceMSSQL count');\n if ($this->connect()) {\n $result = mssql_query($this->countQuery);\n $count = reset(mssql_fetch_object($result));\n }\n else {\n // Do something else?\n $count = FALSE;\n }\n migrate_instrument_stop('MigrateSourceMSSQL count');\n return $count;\n }",
"public function CountRow()\n\t{\n\treturn HDB::hus()->Hcount(\"partdata\");\n\t}",
"public function _count();",
"protected function doCounts($source, $countSpec, &$dest)\n {\n // process count aggregate function\n foreach ($countSpec as $c)\n {\n $fieldName = $c['fieldName'];\n if(isset($c['temporary']) && $c['temporary'] === true)\n {\n if(!in_array($fieldName, $this->temporaryFields))\n {\n $this->temporaryFields[] = $fieldName;\n }\n }\n $applyRegex = (isset($c['regex'])) ? isset($c['regex']) : null;\n $count = 0;\n // just count predicates at current location\n if (isset($source[$c['property']]))\n {\n if (isset($source[$c['property']][VALUE_URI]) || isset($source[$c['property']][VALUE_LITERAL]))\n {\n if ($applyRegex != null)\n {\n $count = $this->applyRegexToValue($c['regex'],$source[$c['property']]);\n } else {\n $count = 1;\n }\n }\n else\n {\n if ($applyRegex != null)\n {\n foreach ($source[$c['property']] as $value)\n {\n if ($this->applyRegexToValue($c['regex'],$value)) {\n $count++;\n }\n }\n }\n else\n {\n $count = count($source[$c['property']]);\n }\n }\n }\n if (!isset($dest[$fieldName])) $dest[$fieldName] = 0;\n $dest[$fieldName] += $count;\n }\n }",
"public function CountRow()\n\t{\n\treturn HDB::hus()->Hcount(\"mtrbundle\");\n\t}",
"abstract public function countTotal();",
"public function processedCount() {\n $query = $this->connection->select($this->mapTable);\n $query->addExpression('COUNT(*)', 'count');\n $count = $query->execute()->fetchField();\n return $count;\n }",
"public function getNumberOfRows(){\r\n $this->setTable('subscribed');\r\n $table = $this->getTable();\r\n\r\n $sql = \"SELECT * FROM \" . $table;\r\n $stmt = $this->fetch()->query($sql);\r\n return $stmt->rowCount();\r\n }",
"public function countRows()\n {\n return count($this->rows);\n }",
"public function count(): int\n {\n return count($this->testCases);\n }",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"public function count() {}",
"function count(){}",
"public function numRows() : int\n\t{\n\t\treturn $this->handle->numRows($this->result);\n\t}",
"public function count()\n {\n if ($this->count === null) {\n $this->count = $this->dataSource->count();\n }\n return $this->count;\n }",
"public function testGetBatchesCount()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"public function count();",
"abstract public function count();",
"abstract public function count();",
"abstract public function count();",
"abstract public function count();"
] | [
"0.67793727",
"0.6328202",
"0.62837505",
"0.62521315",
"0.6177195",
"0.61550313",
"0.6105828",
"0.5960887",
"0.5906411",
"0.59016615",
"0.5882152",
"0.58612525",
"0.5855269",
"0.5851821",
"0.5851821",
"0.5844421",
"0.5821231",
"0.5789846",
"0.5775463",
"0.576414",
"0.57624054",
"0.57554984",
"0.5746833",
"0.5732132",
"0.57061917",
"0.5681335",
"0.5681144",
"0.5665582",
"0.5665582",
"0.56431943",
"0.5639505",
"0.5639505",
"0.5639505",
"0.5638178",
"0.5633909",
"0.56285346",
"0.56251645",
"0.5562483",
"0.5550764",
"0.55482465",
"0.5525561",
"0.5523511",
"0.5522628",
"0.5507956",
"0.5496396",
"0.5487709",
"0.5485291",
"0.5472484",
"0.5445656",
"0.54433066",
"0.5401567",
"0.5400331",
"0.5399374",
"0.5397257",
"0.5380052",
"0.53655744",
"0.5359182",
"0.53471345",
"0.53355694",
"0.53355694",
"0.53346723",
"0.53346723",
"0.53346723",
"0.53346723",
"0.53346723",
"0.53346723",
"0.53346723",
"0.53346723",
"0.53346723",
"0.53346723",
"0.53346723",
"0.533463",
"0.5332326",
"0.5327207",
"0.5324357",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.5317973",
"0.53177536",
"0.53177536",
"0.53177536",
"0.53177536"
] | 0.0 | -1 |
Can we convert settings? | public static function canConvertSettings()
{
return FALSE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _convertSettings(&$settings)\n {\n foreach ($settings as $item => $val) {\n\n if (substr($item, 0, 6) == 'allow_') {\n $settings[$item] = ($val == 0) ? false : true;\n }\n }\n\n $settings['exclude'] = explode(',', $settings['exclude']);\n if (strlen($settings['exclude'][0]) > 0) {\n $settings['exclude'] = array_merge($settings['exclude'], self::$exclude);\n } else {\n $settings['exclude'] = self::$exclude;\n }\n\n return $settings;\n }",
"public function sanitizeSettings($settings) {\n // Make sure 'enable_ads' isn't missing altogether when not checked\n if (!array_key_exists('enable_ads', $settings)) {\n $settings['enable_ads'] = '0';\n }\n return $settings;\n }",
"function wp_convert_widget_settings($base_name, $option_name, $settings)\n {\n }",
"public static function normalize_values($settings) {\n\t\treturn array_map(function($value) {\n\t\t\tif ($value === 'true') {\n\t\t\t\treturn true;\n\t\t\t} else if ($value === 'false') {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}, $settings);\n\t}",
"abstract public function settings(): array;",
"private function upgrade_settings()\n {\n $currentModVars = $this->getVars();\n $defVars = $this->getDefaultVars();\n\n foreach ($defVars as $key => $defVar) {\n if (array_key_exists($key, $currentModVars)) {\n $type = gettype($defVar);\n switch ($type) {\n case 'boolean':\n if (in_array($currentModVars[$key], ['yes', 'no'])) {\n $var = 'yes' === $currentModVars[$key] ? true : false;\n } else {\n $var = ((bool) ($currentModVars[$key]));\n }\n\n break;\n default:\n $var = $defVar;\n\n break;\n }\n if ('defaultPoster' === $key) {\n $var = 2; // not bolean anymore assume admin id but maybe guest?\n }\n }\n $this->setVar($key, $var);\n }\n\n return true;\n }",
"abstract public function get_settings();",
"function saveSettings() {\n\t\t//# convert class variables into an array and save using\n\t\t//# Wordpress functions, \"update_option\" or \"add_option\"\n\t\t//#convert class into array...\n\t\t$settings_array = array();\n\t\t$obj = $this;\n\t\tforeach (array_keys(get_class_vars(get_class($obj))) as $k){\n\t\t\tif (is_array($obj->$k)) {\n\t\t\t\t//serialize any arrays within $obj\n\t\t\t\tif (count($obj->$k)>0) {\n\t\t\t\t\t$settings_array[$k] = esc_attr(serialize($obj->$k));\n\t\t\t\t} else {\n\t\t\t\t\t$settings_array[$k] = \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$settings_array[$k] = \"{$obj->$k}\";\n\t\t\t}\n\t\t}\n\t\t//#save array to options table...\n\t\t$options_check = get_option('wassup_settings');\n\t\tif (!empty($options_check)) {\n\t\t\tupdate_option('wassup_settings', $settings_array);\n\t\t} else {\n\t\t\tadd_option('wassup_settings', $settings_array, 'Options for WassUp');\n\t\t}\n\t\treturn true;\n\t}",
"private function _validate_settings()\n\t{\n\n\t\treturn TRUE;\n\t}",
"public function import_settings($settings) {\n\t\t// A bug in UD releases around 1.12.40 - 1.13.3 meant that it was saved in URL-string format, instead of JSON\n\t\t$perhaps_not_yet_parsed = json_decode(stripslashes($settings['settings']), true);\n\n\t\tif (!is_array($perhaps_not_yet_parsed)) {\n\t\t\tparse_str($perhaps_not_yet_parsed, $posted_settings);\n\t\t} else {\n\t\t\t$posted_settings = $perhaps_not_yet_parsed;\n\t\t}\n\n\t\tif (!empty($settings['updraftplus_version'])) $posted_settings['updraftplus_version'] = $settings['updraftplus_version'];\n\n\t\t// Handle the settings name change of WebDAV and SFTP (Apr 2017) if someone tries to import an old settings to this version\n\t\tif (isset($posted_settings['updraft_webdav_settings'])) {\n\t\t\t$posted_settings['updraft_webdav'] = $posted_settings['updraft_webdav_settings'];\n\t\t\tunset($posted_settings['updraft_webdav_settings']);\n\t\t}\n\n\t\tif (isset($posted_settings['updraft_sftp_settings'])) {\n\t\t\t$posted_settings['updraft_sftp'] = $posted_settings['updraft_sftp_settings'];\n\t\t\tunset($posted_settings['updraft_sftp_settings']);\n\t\t}\n\n\t\t// We also need to wrap some of the options in the new style settings array otherwise later on we will lose the settings if this information is missing\n\t\tif (empty($posted_settings['updraft_webdav']['settings'])) $posted_settings['updraft_webdav'] = UpdraftPlus_Storage_Methods_Interface::wrap_remote_storage_options($posted_settings['updraft_webdav']);\n\t\tif (empty($posted_settings['updraft_googledrive']['settings'])) $posted_settings['updraft_googledrive'] = UpdraftPlus_Storage_Methods_Interface::wrap_remote_storage_options($posted_settings['updraft_googledrive']);\n\t\tif (empty($posted_settings['updraft_googlecloud']['settings'])) $posted_settings['updraft_googlecloud'] = UpdraftPlus_Storage_Methods_Interface::wrap_remote_storage_options($posted_settings['updraft_googlecloud']);\n\t\tif (empty($posted_settings['updraft_onedrive']['settings'])) $posted_settings['updraft_onedrive'] = UpdraftPlus_Storage_Methods_Interface::wrap_remote_storage_options($posted_settings['updraft_onedrive']);\n\t\tif (empty($posted_settings['updraft_azure']['settings'])) $posted_settings['updraft_azure'] = UpdraftPlus_Storage_Methods_Interface::wrap_remote_storage_options($posted_settings['updraft_azure']);\n\t\tif (empty($posted_settings['updraft_dropbox']['settings'])) $posted_settings['updraft_dropbox'] = UpdraftPlus_Storage_Methods_Interface::wrap_remote_storage_options($posted_settings['updraft_dropbox']);\n\n\t\techo json_encode($this->save_settings($posted_settings));\n\n\t\tdie;\n\t}",
"private function load_settings() {\n\t\t\n\t}",
"public static function filter_stashbox_register_settings( $settings ) {\n $settings['sb_domain_reminders'] = 'boolval';\n $settings['sb_domain_reminder_distance'] = 'stashbox_sanitize_array';\n $settings['sb_domain_reminder_count'] = 'intval';\n $settings['sb_domain_reminder_recipient'] = 'sanitize_email';\n return $settings;\n }",
"abstract public function getSettings();",
"function test_settings($settings)\n {\n //can even register results, so you can give errors or whatever if you want..\n geoAdmin::m('I\\'m sure the settings are just fine. (CHANGE THIS! FOR DEMONSTRATION ONLY)');\n\n return true;\n }",
"public static function parseSettings()\n\t{\n\t\t$settings = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['sd_googlemaps']);\n\n\t\tif (!is_array($settings)) {\n\t\t\t$settings = [];\n\t\t}\n\t\treturn $settings;\n\t}",
"function wp_is_ini_value_changeable($setting)\n {\n }",
"static function updateSettings( $settings )\n {\n unset( $GLOBALS['eZTextCodecInternalCharsetReal'] );\n unset( $GLOBALS['eZTextCodecHTTPCharsetReal'] );\n unset( $GLOBALS['eZTextCodecCharsetCheck'] );\n $GLOBALS['eZTextCodecInternalCharset'] = $settings['internal-charset'];\n $GLOBALS['eZTextCodecHTTPCharset'] = $settings['http-charset'];\n $GLOBALS['eZTextCodecMBStringExtension'] = $settings['mbstring-extension'];\n if ( function_exists( 'mb_internal_encoding' ) )\n {\n @mb_internal_encoding( $settings['internal-charset'] );\n }\n }",
"public static function convertSettings($settings)\n\t{\n\t\t$defaults = array(\n\t\t\t'field_pre_populate'\t=> 'n',\n\t\t\t'field_fmt'\t\t\t\t=> 'none',\n\t\t\t'field_list_items'\t\t=> array(),\n\t\t);\n\n\t\tif (isset($settings['options']) && is_array($settings['options']))\n\t\t{\n\t\t\t// Some values may be arrays if options list is separated in to groups,\n\t\t\t// we need to flatten the array\n\t\t\t$new_values = array();\n\t\t\t$iterator = new \\RecursiveIteratorIterator(new \\RecursiveArrayIterator($settings['options']));\n\t\t\tforeach ($iterator as $value)\n\t\t\t{\n\t\t\t\t$new_values[] = $value;\n\t\t\t}\n\n\t\t\t$defaults['field_list_items'] = implode(\"\\n\", $new_values);\n\t\t}\n\t\t// Switch celltype\n\t\telse if (isset($settings['off_label']) && isset($settings['on_label']))\n\t\t{\n\t\t\t$defaults['field_list_items'] = implode(\"\\n\", array($settings['off_label'], $settings['on_label']));\n\t\t}\n\n\t\treturn $defaults;\n\t}",
"abstract protected function loadSettings();",
"function get_settings()\n\t{\n\t\t$this->settings = array();\n\t\t\n\t\treturn true;\n\t}",
"public function sanitize_settings($input) {\n $output = $input;\n $output['db_version'] = $this->plugin->db_version();\n $output['debug'] = (bool) $input['debug'];\n\n return $output;\n }",
"function ffw_port_settings_sanitize( $input = array() ) {\n\n global $ffw_port_settings;\n\n parse_str( $_POST['_wp_http_referer'], $referrer );\n\n $output = array();\n $settings = ffw_port_get_registered_settings();\n $tab = isset( $referrer['tab'] ) ? $referrer['tab'] : 'general';\n $post_data = isset( $_POST[ 'ffw_port_settings_' . $tab ] ) ? $_POST[ 'ffw_port_settings_' . $tab ] : array();\n\n $input = apply_filters( 'ffw_port_settings_' . $tab . '_sanitize', $post_data );\n\n // Loop through each setting being saved and pass it through a sanitization filter\n foreach( $input as $key => $value ) {\n\n // Get the setting type (checkbox, select, etc)\n $type = isset( $settings[ $key ][ 'type' ] ) ? $settings[ $key ][ 'type' ] : false;\n\n if( $type ) {\n // Field type specific filter\n $output[ $key ] = apply_filters( 'ffw_port_settings_sanitize_' . $type, $value, $key );\n }\n\n // General filter\n $output[ $key ] = apply_filters( 'ffw_port_settings_sanitize', $value, $key );\n }\n\n\n // Loop through the whitelist and unset any that are empty for the tab being saved\n if( ! empty( $settings[ $tab ] ) ) {\n foreach( $settings[ $tab ] as $key => $value ) {\n\n // settings used to have numeric keys, now they have keys that match the option ID. This ensures both methods work\n if( is_numeric( $key ) ) {\n $key = $value['id'];\n }\n\n if( empty( $_POST[ 'ffw_port_settings_' . $tab ][ $key ] ) ) {\n unset( $ffw_port_settings[ $key ] );\n }\n\n }\n }\n\n // Merge our new settings with the existing\n $output = array_merge( $ffw_port_settings, $output );\n\n // @TODO: Get Notices Working in the backend.\n add_settings_error( 'ffw_port-notices', '', __( 'Settings Updated', 'ffw_port' ), 'updated' );\n\n return $output;\n\n}",
"function loadSettings($settings=array()) {\n\t\t//# load class variables with settings parameter or load\n\t\t//# wp_options if no parameter\n\t\tif (empty($settings) || count($settings) == 0) {\n\t\t\t$settings = $this->getSettings();\n\t\t}\n\t\tif (!empty($settings) && is_array($settings)) {\n\t\t\t$this->options2class($settings);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public static function get_allowed_settings()\n {\n }",
"protected function loadSettings() {}",
"protected function loadSettings() {}",
"protected function loadSettings() {}",
"public function loadSettings()\n {\n // old Alfred v4 settings\n $settings = \\Alfred\\getVariables(self::$settingsArgs);\n\n\n if (\\Alfred\\getAlfredVersion() >= 5) {\n $new_settings = \\Alfred\\getVariables(self::$settingsArgsV5);\n\n if (!empty($settings['language']) && $settings['language'] !== 'en_EN' && $new_settings['language'] !== 'en_EN') {\n $settings['language'] = $new_settings['language'];\n }\n if (empty($settings['language'])) {\n $settings['language'] = $new_settings['language'];\n }\n if (!empty($new_settings['timezone']) && $new_settings['timezone'] !== 'none') {\n $settings['time_zone'] = $new_settings['timezone'];\n }\n if (!empty($new_settings['base_currencies'])) {\n $settings['base_currency'] = str_replace(' ', '', $new_settings['base_currencies']);\n $settings['base_currency'] = explode(',', $settings['base_currency']);\n }\n if (!empty($new_settings['apikey_fixer'])) {\n $settings['fixer_apikey'] = $new_settings['apikey_fixer'];\n }\n if (!empty($new_settings['apikey_coinmarket'])) {\n $settings['coinmarket_apikey'] = $new_settings['apikey_coinmarket'];\n }\n if (!empty($new_settings['crypto_decimals'])) {\n $settings['crypto_decimals'] = $new_settings['crypto_decimals'];\n }\n if (!empty($new_settings['vat_value'])) {\n $settings['vat_percentage'] = $new_settings['vat_value'];\n }\n if (!empty($new_settings['pixels_base'])) {\n $settings['base_pixels'] = $new_settings['pixels_base'];\n }\n if (\n !empty($new_settings['date_format']) && $new_settings['date_format'] !== 'j F, Y, g:i:s a' ||\n empty($settings['time_format'])\n ) {\n $settings['time_format'] = $new_settings['date_format'];\n if (is_string($settings['time_format'])) {\n $settings['time_format'] = explode('|', $new_settings['date_format']);\n }\n }\n if (!empty($new_settings['number_output_format'])) {\n $settings['number_output_format'] = $new_settings['number_output_format'];\n }\n if (!empty($new_settings['currency_decimals'])) {\n $settings['currency_decimals'] = $new_settings['currency_decimals'];\n }\n }\n\n return $settings;\n }",
"public function saveExportSetting($settings)\r\n {\r\n\r\n }",
"function tptn_read_options() {\r\n\r\n\t// Upgrade table code\r\n\tglobal $tptn_db_version;\r\n\t$installed_ver = get_option( \"tptn_db_version\" );\r\n\r\n\tif( $installed_ver != $tptn_db_version ) tptn_install();\r\n\r\n\t$tptn_settings_changed = false;\r\n\t\r\n\t$defaults = tptn_default_options();\r\n\t\r\n\t$tptn_settings = array_map('stripslashes',(array)get_option('ald_tptn_settings'));\r\n\tunset($tptn_settings[0]); // produced by the (array) casting when there's nothing in the DB\r\n\t\r\n\tforeach ($defaults as $k=>$v) {\r\n\t\tif (!isset($tptn_settings[$k])) {\r\n\t\t\t$tptn_settings[$k] = $v;\r\n\t\t\t$tptn_settings_changed = true;\r\n\t\t}\r\n\t}\r\n\tif ($tptn_settings_changed == true)\r\n\t\tupdate_option('ald_tptn_settings', $tptn_settings);\r\n\t\r\n\treturn $tptn_settings;\r\n\r\n}",
"public function getJsonSettings()\n {\n return Mage::helper('core')->jsonEncode($this->_settings);\n }",
"abstract protected function define_my_settings();",
"public function save_settings($settings)\n {\n }",
"public function validate($settings)\n {\n return $settings;\n }",
"function convert_content_capableof($conversion) {\n global $settings;\n return is_array($settings['converters']) &&\n array_key_exists($conversion, $settings['converters']) &&\n function_exists($settings['converters'][$conversion]);\n}",
"function sa_register_settings() {\n\t// Register settings and call sanitation functions\n\tregister_setting( 'tsc_theme_options', 'sa_options', 'sa_validate_options' );\n}",
"public function setSettings() {\n $args = array(\n array(\n 'option_group' => 'pm_plugin_settings',\n 'option_name' => 'pm_plugin',\n 'callback' => array($this->callbacks_mgr, 'checkboxSanitize'),\n )\n );\n $this->settings->setSettings($args);\n }",
"public function grid_save_settings($settings)\n {\n $settings = $settings['rte'];\n\n return $settings;\n }",
"function translate_settings_using_i18n_schema($i18n_schema, $settings, $textdomain)\n {\n }",
"abstract protected function getSetting() ;",
"static public function save_setup_settings() {\n\n $data = WPP_F::parse_str( $_REQUEST[ 'data' ] );\n\n $_setup = array(\n 'api' => WPP_API_URL_STANDARDS,\n 'data' => $data,\n 'schema' => self::get_settings_schema()\n );\n\n $_current_settings = get_option('wpp_settings');\n\n $_modified_settings = WPP_F::extend( $_current_settings, $_setup['schema'] );\n\n //die( '<pre>' . print_r( $_modified_settings['field_alias'], true ) . '</pre>' );\n\n if( is_array( $_modified_settings['property_stats_groups'] ) ) {\n // $_modified_settings['property_stats_groups'] = array_unique( $_modified_settings['property_stats_groups'] );\n }\n\n // @note This kills c.rabbit.ci response via Varnish, perhaps some sort of log output somewhere.\n if( is_array( $_modified_settings['searchable_attributes'] ) ) {\n // $_modified_settings[ 'searchable_attributes' ] = array_unique( $_modified_settings[ 'searchable_attributes' ] );\n }\n\n // preserve field aliases\n $_modified_settings['field_alias'] = $_current_settings['field_alias'];\n\n $_modified_settings['_updated'] = time();\n\n update_option( 'wpp_settings', $_modified_settings );\n\n $posts_array = get_posts( array(\n 'posts_per_page' => 1,\n 'orderby' => 'date',\n 'order' => 'DESC',\n 'post_type' => 'property',\n 'post_status' => 'publish',\n 'suppress_filters' => true\n ) );\n\n $return[ 'props_single' ] = get_permalink( $posts_array[ 0 ]->ID );\n\n $return[ '_settings' ] = $data[ 'wpp_settings' ];\n\n self::flush_cache();\n\n wp_send_json( $return );\n\n }",
"public function parseSettings($settings) {\n # already array?\n if (!is_string($settings)) {\n return $settings;\n }\n $parts = explode(',', trim($settings));\n $s = array();\n foreach ($parts as $k => $v) {\n $kv = explode('=', trim($v));\n # convert all key values to lowercase to ease against simple typos\n $key = strtolower(trim($kv[0]));\n $s[$key] = trim($kv[1]);\n }\n return $s;\n }",
"function ffw_port_get_settings() {\n\n $settings = get_option( 'ffw_port_settings' );\n if( empty( $settings ) ) {\n\n // Update old settings with new single option\n\n $general_settings = is_array( get_option( 'ffw_port_settings_general' ) ) ? get_option( 'ffw_port_settings_general' ) : array();\n\n\n $settings = array_merge( $general_settings );\n\n update_option( 'ffw_port_settings', $settings );\n }\n return apply_filters( 'ffw_port_get_settings', $settings );\n}",
"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}",
"function settings($key = null, $default = null, $validate = true, $cast = true)\n {\n if (is_null($key)) {\n return app('Padosoft\\Laravel\\Settings\\SettingsManager');\n }\n return app('Padosoft\\Laravel\\Settings\\SettingsManager')->get($key, $default, $validate, $cast);\n }",
"public static function optionsframework_fields_saved_settings_filter( $settings ) {\n\t\t\treturn optionsframework_presets_data( 'wizard01' );\n\t\t}",
"function getSettings($settings) {\r\n $this->reduceSettings();\r\n return array_merge($settings, $this->settings_array);\r\n }",
"protected function assignExtensionSettings() {}",
"protected function fix_boolean_settings() {\n\t\tforeach ($this->boolean_settings as $setting) {\n\t\t\t$val = $this->get_setting($setting);\n\t\t\tif ($val) {\n\t\t\t\t$this->add_setting($setting, filter_var($val, FILTER_VALIDATE_BOOLEAN));\n\t\t\t}\n\t\t}\n\t}",
"public function prepare_json() { \n return json_encode($this->get_settings()); \n }",
"function save_settings(){\r\n if(isset($_POST['SKWPSB_IN_SUBMIT'])){\r\n $this->message = '';\r\n foreach($this->settingsList() as $key => $val){\r\n if($_POST['SKWPSB_IN_PLUGIN'] == $key){\r\n if(isset($this->recognizedPlugins[$key])){\r\n // Recognized plugin\r\n $foo = $this->recognizedPlugins[$key]['set_options'];\r\n if(function_exists($foo)){\r\n if($foo(stripslashes($_POST['SKWPSB_IN_CODE']))){\r\n $this->message = 'Settings successfully imported.';\r\n } else {\r\n $this->errorMessage = 'The plugin returned an error, make sure you copied the code correctly.';\r\n }\r\n return;\r\n } else {\r\n $this->errorMessage = 'The selected plugin is not responding correctly.';\r\n } return;\r\n } else {\r\n // Standard\r\n @$data = unserialize(stripslashes($_POST['SKWPSB_IN_CODE']));\r\n if(!$data || empty($data)){\r\n $this->errorMessage = 'Wrong code, make sure you copied it correctly.'.$_POST['SKWPSB_IN_CODE'];\r\n return;\r\n } else {\r\n update_option($key, $data);\r\n $this->message = 'Settings successfully imported.';\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n $this->errorMessage = 'You might not have selected any destination plugin.';\r\n }\r\n else if(isset($_POST['SKWPSB_EX_SUBMIT'])){\r\n foreach($this->settingsList() as $key => $val){\r\n if($_POST['SKWPSB_EX_PLUGIN'] == $key){\r\n if(isset($this->recognizedPlugins[$key])){\r\n // Recognized plugin\r\n $foo = $this->recognizedPlugins[$key]['get_options'];\r\n if(function_exists($foo)){\r\n $this->exportedSettings = $foo();\r\n $this->message = '<p>Use the code to import the settings to another blog.</p><p>Copy the code as it is, don\\'t add spaces or newlines.</p>';\r\n return;\r\n } else {\r\n $this->errorMessage = 'The selected plugin is not responding correctly.';\r\n } return;\r\n } else {\r\n // Standard\r\n $this->exportedSettings = $val;\r\n $this->message = '<p>Use the code to import the settings to another blog.</p><p>Copy the code as it is, don\\'t add spaces or newlines.</p>';\r\n return;\r\n }\r\n }\r\n }\r\n $this->errorMessage = 'You might not have selected any source plugin.';\r\n }\r\n }",
"function power_import_child_theme_settings() {\n\t$settings_saved = false;\n\t$config = power_get_config( 'child-theme-settings' );\n\n\tif ( ! $config ) {\n\t\treturn false;\n\t}\n\n\t// Validate all settings keys are strings.\n\t$all_keys = array_keys( $config );\n\t$string_keys = array_filter( $all_keys, 'is_string' );\n\tif ( count( $string_keys ) === 0 || count( $all_keys ) !== count( $string_keys ) ) {\n\t\treturn false;\n\t}\n\n\tforeach ( $config as $key => $value ) {\n\t\t$settings_saved = is_array( $value ) ? power_update_settings( $value, $key ) : update_option( $key, $value );\n\t}\n\n\treturn $settings_saved;\n}",
"public function getSettings();",
"function sanitize_settings($options)\n\t\t{\n\t\t\t// Setup array of valid options for return\n\t\t\t$valid_options = array();\n\t\t\t\n\t\t\t// Establish defaults\n\t\t\t$option_defaults = array(\n\t\t\t\t'analytics' => '',\n\t\t\t\t'google' => '',\n\t\t\t\t'pinterest' => ''\n\t\t\t);\n\t\t\t\n\t\t\t$option_types = array(\n\t\t\t\t'analytics' => 'html',\n\t\t\t\t'google' => 'text',\n\t\t\t\t'pinterest' => 'text'\n\t\t\t);\n\t\t\t\n\t\t\t// Merge pass options and the defaults\n\t\t\t$options = (array) wp_parse_args($options, $option_defaults);\n\t\t\t\n\t\t\t// Sanitize each value\n\t\t\tforeach ($option_types as $key => $type) {\n\t\t\t\t$valid_options[$key] = $this->sanitize_an_option($options[$key], $type);\n\t\t\t}\n\n\t\t\treturn $valid_options;\n\t\t}",
"function getSettings()\n\t{\n\t\treturn false;\n\t}",
"public function prepSettings($settings)\n\t{\n\t\tif (!isset($settings['defaults']))\n\t\t{\n\t\t\t$settings['defaults'] = array();\n\t\t}\n\n\t\treturn $settings;\n\t}",
"private function getSettings() {\n\t\t$code = (version_compare(VERSION, '3.0', '<') ? '' : $this->type . '_') . $this->name;\n\t\t\n\t\t$settings = array();\n\t\t$settings_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"setting WHERE `code` = '\" . $this->db->escape($code) . \"' ORDER BY `key` ASC\");\n\t\t\n\t\tforeach ($settings_query->rows as $setting) {\n\t\t\t$value = $setting['value'];\n\t\t\tif ($setting['serialized']) {\n\t\t\t\t$value = (version_compare(VERSION, '2.1', '<')) ? unserialize($setting['value']) : json_decode($setting['value'], true);\n\t\t\t}\n\t\t\t$split_key = preg_split('/_(\\d+)_?/', str_replace($code . '_', '', $setting['key']), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\t\t\t\n\t\t\t\tif (count($split_key) == 1)\t$settings[$split_key[0]] = $value;\n\t\t\telseif (count($split_key) == 2)\t$settings[$split_key[0]][$split_key[1]] = $value;\n\t\t\telseif (count($split_key) == 3)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]] = $value;\n\t\t\telseif (count($split_key) == 4)\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]] = $value;\n\t\t\telse \t\t\t\t\t\t\t$settings[$split_key[0]][$split_key[1]][$split_key[2]][$split_key[3]][$split_key[4]] = $value;\n\t\t}\n\t\t\n\t\treturn $settings;\n\t}",
"function register_settings() {\n register_setting( 'athen_tweaks', 'athen_tweaks', array( $this, 'admin_sanitize' ) ); \n }",
"public function update_settings( $settings ) {\n\n\t\t// Make sure that false is recorded since is true by default.\n\t\t$settings['default_site_timezone'] = ! empty( $settings['default_site_timezone'] ) ? true : false;\n\n\t\treturn $settings;\n\t}",
"private function buildSettings()\n {\n $settings = [];\n foreach($this->settings as $key=>$setting)\n {\n $split = explode(': ', $setting);\n $option = $split[0];\n unset($split[0]);\n $value = implode($split);\n $settings[$option] = $value;\n }\n $this->settings = $settings;\n }",
"private function reduceSettings() {\r\n foreach ($this->settings_array as $setting => $setto) {\r\n $this->settings_array[$setting] = $this->$setting;\r\n }\r\n }",
"protected function _setting_handle() {}",
"function make_compatible() {\n\t\t\tif ( $this->iscompat == true ) { \n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$options = get_option($this->adminOptionsName);\t\t\t\n\t\t\tif ( !empty($options) ) {\n\t\t\t\tif ( !isset($options['db_plugin_version']) || $options['db_plugin_version'] != $this->version_of_plugin ) {\n\t\t\t\t\t$options = $this->getAdminOptions(); // does the compatibiliy\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->theSettings = $options;\n\t\t\t$this->iscompat = true;\n\t\t\treturn;\n\t\t}",
"function validate_cpjr3_settings( $input ) {\n \n $output = array(); \n \n foreach( $input as $key => $value ) { \n \n if( isset( $input[$key] ) ) { \n \n $output[$key] = strip_tags( stripslashes( $input[ $key ] ) ); \n \n } \n \n } \n \n return apply_filters( 'validate_cpjr3_settings', $output, $input ); \n\n}",
"function save_settings(array $settings)\n {\n //if user is not active do not log changes\n if ($user = user()){\n $logs = [];\n foreach ($settings as $key => $value){\n //changed\n if (!settings($key) || settings($key) != $value){\n $old_val = settings($key);\n $logs[] = \"$user changed setting: '{$key}' from '{$old_val}' to '{$value}'\";\n }\n }\n }\n\n //sync settings and save\n \\Setting::set($settings);\n \\Setting::save();\n\n //log any changes\n if (!empty($logs))\n event(new \\App\\Events\\SettingsChanged($logs, $user));\n\n return $settings;\n }",
"function load_settings(){\n $ret = array();\n $c = $this->_files->readfile($this->_settings_file);\n if( $c !== false ){\n $c = explode( \"\\n\", eol($c));\n foreach( $c as $line ){\n //ignore a lot of stuff - quick hack for now\n if(substr($line, 0, 1) != '#'\n && trim($line) != ''\n && substr($line, 0, 4) != 'LANG'\n && substr($line, 0, 1) != '#'\n && substr($line, 0, 11) != 'export LANG'\n && substr($line, 0, 4) != 'bold'\n && substr($line, 0, 6) != 'normal' ){\n $set = explode('=', $line);\n $ret[$set[0]] = trim($set[1], '\"\\''); //this should now be one setting per key with setting name as key\n }\n }\n\n if( count($ret) > 0 ){\n $_SESSION['settings.conf'] = $ret;\n return $_SESSION['settings.conf'];\n }\n }else{\n unset($_SESSION['settings.conf']);\n return false;\n }\n }",
"public function init_settings() {\n\t\tparent::init_settings();\n\t\t$this->enabled = ! empty( $this->settings['enabled'] ) && 'yes' === $this->settings['enabled'] ? 'yes' : 'no';\n\t}",
"public function save_var_settings($settings) {\n\t\treturn $this->save_settings($settings);\n\t}",
"function options_sanitize($options){\r\n // do checks here \r\n //debugbreak(); \r\n if($options['reset'] == 'reset'){\r\n add_settings_error('reset_settings','reset_settings',__('Settings have been reset back to default values',$this->plugin_domain),'updated');\r\n return $this->get_options(true);\r\n }\r\n $options['clickable'] = $options['clickable'] == 'yes' ? 'yes' : 'no'; \r\n $options['dofollow'] = isset($options['dofollow']) ? 'on' : 'off'; \r\n $options['newwindow'] = isset($options['newwindow']) ? 'on' : 'off'; \r\n $options['del_options'] = isset($options['del_options']) ? 'on' : 'off';\r\n $options['del_table'] = isset($options['del_table']) ? 'on' : 'off';\r\n return $options;\r\n }",
"function favorites_handle_plugin_settings ($hook, $type, $return, $params) {\n\treturn serialize($params['value']);\n}",
"function _savesettings()\r\n {\r\n\t\t$settings = JRequest::getVar('settings');\r\n\r\n\t\tjimport('joomla.registry.registry');\r\n\t\t$reg = new JRegistry();\r\n\t\t$reg->loadArray($settings);\r\n\t\t\t\t\r\n\t\tif(JFusionConnect::isJoomlaVersion('1.6')) {\r\n\t\t\t$component =& JTable::getInstance('extension');\r\n\t\t\t$componentid = $component->find(array('type' => 'component','element' => 'com_jfusionconnect'));\r\n\t\t\t$component->load($componentid);\r\n\t\t\t\r\n\t\t\t$plugin =& JTable::getInstance('extension');\r\n\t\t\t$pluginid = $plugin->find(array('type' => 'plugin','element' => 'jfusionconnect'));\r\n\t\t\t$plugin->load($pluginid);\r\n\t\t\t$key='enabled';\r\n\t\t} else {\r\n\t\t\t$component =& JTable::getInstance('component');\r\n\t\t\t$component->loadByOption('com_jfusionconnect');\r\n\t\t\t\r\n\t\t\t$plugin =& JTable::getInstance('plugin');\r\n\t\t\t$plugin->_tbl_key = 'element';\r\n\t\t\t$plugin->load('jfusionconnect');\r\n\t\t\t$key='published';\r\n\t\t}\r\n\t\t$component->params = $reg->toString();\r\n\t\t$component->store();\r\n \tif ($settings['enabled']) {\r\n\t\t\t$plugin->$key = 1;\r\n\t\t} else {\r\n\t\t\t$plugin->$key = 0;\r\n\t\t}\r\n\t\t$plugin->store();\r\n }",
"function get_registered_settings()\n {\n }",
"protected function settingsValidate( $settings ) {\n\n\t\t\tif ( !isset( $_POST['initial_save'] ) || !$_POST['initial_save'] ) {\n\n\t\t\t\t$boolean_settings = apply_filters( 'muut_boolean_settings', array(\n\t\t\t\t\t'replace_comments',\n\t\t\t\t\t'use_threaded_commenting',\n\t\t\t\t\t'override_all_comments',\n\t\t\t\t\t'is_threaded_default',\n\t\t\t\t\t'show_online_default',\n\t\t\t\t\t'allow_uploads_default',\n\t\t\t\t\t'subscription_use_signed_setup',\n\t\t\t\t\t'use_custom_s3_bucket',\n\t\t\t\t\t'subscription_use_sso',\n\t\t\t\t\t'website_uses_caching',\n\t\t\t\t\t'enable_proxy_rewrites',\n\t\t\t\t\t'use_webhooks',\n\t\t\t\t) );\n\n\t\t\t\tforeach ( $boolean_settings as $boolean_setting ) {\n\t\t\t\t\t$settings[$boolean_setting] = isset( $settings[$boolean_setting] ) ? $settings[$boolean_setting] : '0';\n\t\t\t\t}\n\n\t\t\t\tif ( ( isset( $settings['forum_name'] ) && $settings['forum_name'] != muut()->getForumName() )\n\t\t\t\t\t|| ( isset( $settings['enable_proxy_rewrites'] ) && $settings['enable_proxy_rewrites'] != muut()->getOption( 'enable_proxy_rewrites' ) )\n\t\t\t\t\t|| ( isset( $settings['use_custom_s3_bucket'] ) && $settings['use_custom_s3_bucket'] != muut()->getOption( 'use_custom_s3_bucket' ) )\n\t\t\t\t\t|| ( isset( $settings['custom_s3_bucket_name'] ) && $settings['custom_s3_bucket_name'] != muut()->getOption( 'custom_s3_bucket_name' ) )\n\t\t\t\t\t|| ( isset( $settings['use_webhooks'] ) && $settings['use_webhooks'] != muut()->getOption( 'use_webhooks' ) )\n\t\t\t\t) {\n\t\t\t\t\tflush_rewrite_rules( true );\n\t\t\t\t\t$home_path = get_home_path();\n\t\t\t\t\t$htaccess_file = $home_path.'.htaccess';\n\n\t\t\t\t\tif ( ( !file_exists( $htaccess_file ) && !is_writable( $home_path ) ) || !is_writable( $htaccess_file ) ) {\n\t\t\t\t\t\tif ( get_option( 'permalink_structure', '') != '' ) {\n\t\t\t\t\t\t\t$error = array( 'field' => '', 'new_value' => '', 'name' => 'htaccess_permissions', 'message' => sprintf( __( 'It looks like the %sMuut Plugin%s doesn\\'t have permission to edit your .htaccess file. If you want to have content indexable under your website\\'s domain, you should head over to the bottom of your site\\'s %sPermalinks%s settings and copy the new code there to your .htaccess file.', 'muut' ), '<b>', '</b>', '<a href=\"' . admin_url( 'options-permalink.php' ) . '\">', '</a>' ) );\n\t\t\t\t\t\t\t$this->errorQueue[$error['name']] = $error;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If the Secret Key setting does not get submitted (i.e. is disabled), make sure to erase its value.\n\t\t\t\t$settings['subscription_secret_key'] = isset( $settings['subscription_secret_key'] ) ? $settings['subscription_secret_key'] : '';\n\t\t\t} else {\n\t\t\t\t$settings = apply_filters( 'muut_settings_initial_save', $settings );\n\t\t\t}\n\n\t\t\tforeach ( $settings as $name => &$value ) {\n\t\t\t\t$value = apply_filters( 'muut_validate_setting_' . $name, $value );\n\t\t\t\t$value = apply_filters( 'muut_validate_setting', $value, $name );\n\t\t\t}\n\n\t\t\treturn apply_filters( 'muut_settings_validated', $settings );\n\t\t}",
"abstract public function getTextSettings();",
"public function clean_settings($in)\n {\n $out = array();\n\n foreach (array('time', 'limit') as $k) {\n if (!empty($in[$k])) {\n $out[$k] = absint($in[$k]);\n }\n }\n\n $out['trust_proxy'] = empty($in['trust_proxy']) ? 'off' : 'on';\n\n return $out;\n }",
"function saveSettings() {\n\tglobal $settings;\n\n\tfile_put_contents(\"settings.json\",json_encode($settings));\n}",
"function _settings(&$model) {\n return $this->settings[$model->name];\n }",
"private function settingsAnalyzer()\n {\n require '../configuration/app.php';\n\n if ($external_server_settings['mode'] == 'on') {\n return $this->settings[] = $external_server_settings; \n }\n \n return $this->settings[] = $server_settings;\n }",
"public function save_settings()\n\t{\n\t\t// Create settings array.\n\t\t$settings = array();\n\n\t\t// Loop through default settings and check for saved values.\n\t\tforeach (ee()->simple_cloner_settings->_default_settings as $key => $value)\n\t\t{\n\t\t\tif(($settings[$key] = ee()->input->post($key)) == FALSE)\n\t\t\t{\n\t\t\t\t$settings[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\t// Serialize settings array and update the extensions table.\n\t\tee()->db->where('class', $this->class_name.'_ext');\n\t\tee()->db->update('extensions', array('settings' => serialize($settings)));\n\n\t\t// Create alert when settings are saved and redirect back to settings page.\n\t\tee('CP/Alert')->makeInline('simple-cloner-save')\n\t\t\t->asSuccess()\n\t\t\t->withTitle(lang('message_success'))\n\t\t\t->addToBody(lang('preferences_updated'))\n\t\t\t->defer();\n\n\t\tee()->functions->redirect(ee('CP/URL')->make('addons/settings/simple_cloner'));\n\t}",
"public function settings()\n\t{\n\t\t$settings = array(\n\t\t\t'user_id' \t=> '',\n\t\t\t'private_key' \t=> '',\n\t\t\t'debug'\t=> array('r',\n\t\t\t\tarray(\n\t\t\t\t\t'y' => lang('yes'),\n\t\t\t\t\t'n' => lang('no')\n\t\t\t\t),\n\t\t\t\t'n'\n\t\t\t)\n\t\t);\n\n\t\treturn $settings;\n\t}",
"function get_settings($in)\n{\n if (is_file($in))\n return include $in;\n return false;\n}",
"private function parseSettings($settings) {\n\t\t\tif (!is_numeric($settings['thread_limit']) ||\n\t\t\t\t!is_numeric($settings['random_count']) ||\n\t\t\t\t!is_numeric($settings['recent_count']))\n\t\t\t{\n\t\t\t\terror('Invalid configuration parameters.', true);\n\t\t\t}\n\n\t\t\t$settings['exclude'] = explode(' ', (string) $settings['exclude']);\n\t\t\t$settings['thread_limit'] = intval($settings['thread_limit']);\n\t\t\t$settings['random_count'] = intval($settings['random_count']);\n\t\t\t$settings['recent_count'] = intval($settings['recent_count']);\n\n\t\t\tif ($settings['thread_limit'] < 1 ||\n\t\t\t\t$settings['random_count'] < 1 ||\n\t\t\t\t$settings['recent_count'] < 1)\n\t\t\t{\n\t\t\t\terror('Invalid configuration parameters.', true);\n\t\t\t}\n\n\t\t\treturn $settings;\n\t\t}",
"function sanitised() {\n\t$sanitised = true;\n\n\tif (!file_exists(dirname(dirname(__FILE__)) . \"/settings.php\")) {\n\t\t// See if we are being asked to save the file\n\t\t$save_vars = get_input('db_install_vars');\n\t\t$result = \"\";\n\t\tif ($save_vars) {\n\t\t\t$rtn = db_check_settings($save_vars['CONFIG_DBUSER'],\n\t\t\t\t\t\t\t\t\t$save_vars['CONFIG_DBPASS'],\n\t\t\t\t\t\t\t\t\t$save_vars['CONFIG_DBNAME'],\n\t\t\t\t\t\t\t\t\t$save_vars['CONFIG_DBHOST'] );\n\t\t\tif ($rtn == FALSE) {\n\t\t\t\tregister_error(elgg_view(\"messages/sanitisation/dbsettings_error\"));\n\t\t\t\tregister_error(elgg_view(\"messages/sanitisation/settings\",\n\t\t\t\t\t\t\t\tarray(\t'settings.php' => $result,\n\t\t\t\t\t\t\t\t\t\t'sticky' => $save_vars)));\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t$result = create_settings($save_vars, dirname(dirname(__FILE__)) . \"/settings.example.php\");\n\n\n\t\t\tif (file_put_contents(dirname(dirname(__FILE__)) . \"/settings.php\", $result)) {\n\t\t\t\t// blank result to stop it being displayed in textarea\n\t\t\t\t$result = \"\";\n\t\t\t}\n\t\t}\n\n\t\t// Recheck to see if the file is still missing\n\t\tif (!file_exists(dirname(dirname(__FILE__)) . \"/settings.php\")) {\n\t\t\tregister_error(elgg_view(\"messages/sanitisation/settings\", array('settings.php' => $result)));\n\t\t\t$sanitised = false;\n\t\t}\n\t}\n\n\tif (!file_exists(dirname(dirname(dirname(__FILE__))) . \"/.htaccess\")) {\n\t\tif (!@copy(dirname(dirname(dirname(__FILE__))) . \"/htaccess_dist\", dirname(dirname(dirname(__FILE__))) . \"/.htaccess\")) {\n\t\t\tregister_error(elgg_view(\"messages/sanitisation/htaccess\", array('.htaccess' => file_get_contents(dirname(dirname(dirname(__FILE__))) . \"/htaccess_dist\"))));\n\t\t\t$sanitised = false;\n\t\t}\n\t}\n\n\treturn $sanitised;\n}",
"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}",
"function get_settings() {\n\t\treturn $this->settings;\n\t}",
"function gutenberg_capture_code_editor_settings( $settings ) {\n\tglobal $gutenberg_captured_code_editor_settings;\n\t$gutenberg_captured_code_editor_settings = $settings;\n\treturn false;\n}",
"public function dx_validate_settings( $input ) {\n\t\t\n\t\treturn $input;\n\t}",
"public function getSettings() : array;",
"public function getSettings() {\n return $this->settings == null ? array() : json_decode($this->settings, true);\n }",
"public function load_settings_values() {\n\t\t\tparent::load_settings_values();\n\n\t\t\tif ( false === $this->setting_option_values ) {\n\t\t\t\t$this->setting_option_values = array();\n\n\t\t\t\t// On the initial if we don't have saved values we grab them from the Custom Labels.\n\t\t\t\t$custom_label_settings = get_option( 'learndash_custom_label_settings', array() );\n\n\t\t\t\tif ( ( isset( $custom_label_settings['courses'] ) ) && ( ! empty( $custom_label_settings['courses'] ) ) ) {\n\t\t\t\t\t$this->setting_option_values['courses'] = learndash_get_custom_label_slug( 'courses' );\n\t\t\t\t}\n\n\t\t\t\tif ( ( isset( $custom_label_settings['lessons'] ) ) && ( ! empty( $custom_label_settings['lessons'] ) ) ) {\n\t\t\t\t\t$this->setting_option_values['lessons'] = learndash_get_custom_label_slug( 'lessons' );\n\t\t\t\t}\n\n\t\t\t\tif ( ( isset( $custom_label_settings['topic'] ) ) && ( ! empty( $custom_label_settings['topic'] ) ) ) {\n\t\t\t\t\t$this->setting_option_values['topics'] = learndash_get_custom_label_slug( 'topic' );\n\t\t\t\t}\n\n\t\t\t\tif ( ( isset( $custom_label_settings['quizzes'] ) ) && ( ! empty( $custom_label_settings['quizzes'] ) ) ) {\n\t\t\t\t\t$this->setting_option_values['quizzes'] = learndash_get_custom_label_slug( 'quizzes' );\n\t\t\t\t}\n\n\t\t\t\t// As we don't have existing values we want to save here and force the flush rewrite.\n\t\t\t\tupdate_option( $this->settings_section_key, $this->setting_option_values );\n\t\t\t\tlearndash_setup_rewrite_flush();\n\t\t\t}\n\n\t\t\t$this->setting_option_values = wp_parse_args(\n\t\t\t\t$this->setting_option_values,\n\t\t\t\tarray(\n\t\t\t\t\t'courses' => 'courses',\n\t\t\t\t\t'lessons' => 'lessons',\n\t\t\t\t\t'topics' => 'topic',\n\t\t\t\t\t'quizzes' => 'quizzes',\n\t\t\t\t)\n\t\t\t);\n\t\t}",
"public function convert();",
"public function settings($options = 'get'){\n\t\t// ensure settings are given\n\t\tif(is_array($options) && count($options) > 0){\n\t\t\t// loop through all settings given\n\t\t\tforeach ($options as $setting => $value) {\n\t\t\t\t// check for existence of desired variable\n\t\t\t\tif(property_exists('SiteCrawler', $setting)){\n\t\t\t\t\t// switch through all variables for validation\n\t\t\t\t\tswitch ($setting) {\n\t\t\t\t\t\t// check if desired value is a string\n\t\t\t\t\t\tcase 'url':\n\t\t\t\t\t\t\tif(gettype($value) === 'string'){\n\t\t\t\t\t\t\t\t// set variable, return true\n\t\t\t\t\t\t\t\t$this->{$value} = $value;\n\t\t\t\t\t\t\t\t$return[$setting] = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// return errors \n\t\t\t\t\t\t\t\t$return[$setting] = array('value'=>$value, 'error'=>'Given value was type '.gettype($value).', <em>string</em> required.');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// check if value is populated array\n\t\t\t\t\t\tcase 'file_types':\n\t\t\t\t\t\t\tif(gettype($value) === 'array' && count($value) > 0){\n\t\t\t\t\t\t\t\t// loop through array\n\t\t\t\t\t\t\t\tforeach ($value as $type) {\n\t\t\t\t\t\t\t\t\t// check if value is a string\n\t\t\t\t\t\t\t\t\tif(gettype($type) === 'string'){\n\t\t\t\t\t\t\t\t\t\t// set variable, return true\n\t\t\t\t\t\t\t\t\t\t$this->{$setting}[] = $type;\n\t\t\t\t\t\t\t\t\t\t$return[$setting][$type] = true;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// return errors if not string\n\t\t\t\t\t\t\t\t\t\t$return[$setting][$type] = array('value'=>$type, 'error'=>'Given value was type '.gettype($type).', <em>string</em> required.');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// remove duplicates from array\n\t\t\t\t\t\t\t\t$this->{$setting} = array_unique($this->$setting);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// return errors if not array\n\t\t\t\t\t\t\t\t$return[$setting] = array('value'=>$value, 'error'=>'Given value was type '.gettype($value).', <em>array</em> required.');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// check if value is populated array\n\t\t\t\t\t\tcase 'ignore_dirs':\n\t\t\t\t\t\t\tif (gettype($value) === 'array' && count($value) > 0) {\n\t\t\t\t\t\t\t\t// loop through array\n\t\t\t\t\t\t\t\tforeach ($value as $type) {\n\t\t\t\t\t\t\t\t\t// check if value is a string\n\t\t\t\t\t\t\t\t\tif(gettype($type) === 'string'){\n\t\t\t\t\t\t\t\t\t\t// set variable, return true\n\t\t\t\t\t\t\t\t\t\t$this->{$setting}[] = $type;\n\t\t\t\t\t\t\t\t\t\t$return[$setting][$type] = true;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// return errors if not string\n\t\t\t\t\t\t\t\t\t\t$return[$setting][$type] = array('value'=>$type, 'error'=>'Given value was type '.gettype($type).', <em>string</em> required.');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// remove duplicates from array\n\t\t\t\t\t\t\t\t$this->{$setting} = array_unique($this->$setting);\n\t\t\t\t\t\t\t// check if value is null\n\t\t\t\t\t\t\t} elseif(is_null($value)) {\n\t\t\t\t\t\t\t\t// set variable, return true\n\t\t\t\t\t\t\t\t$this->{$setting} = null;\n\t\t\t\t\t\t\t\t$return[$setting] = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// return errors if not array or null\n\t\t\t\t\t\t\t\t$return[$setting] = array('setting' => $setting, 'value' => $value, 'error' => 'Given $value was type '.gettype($value).', <em>array</em> or <em>null</em> required');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$return[$setting] = array('setting'=>$setting, 'value'=>$value, 'error'=>'Given setting does not exist or cannot be altered');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$return[$setting] = array('setting'=>$setting, 'value'=>$value, 'error'=>'Given setting does not exist or cannot be altered');\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// if $options is not an array, switch it to decide what to do\n\t\t\tswitch ($options) {\n\t\t\t\t// if $options is 'get', print all variables but $pages (usually empty), $visited and $links (could be massive), and $doc (DOMDocument object)\n\t\t\t\tcase 'get':\n\t\t\t\t\t// initiate a ReflectionClass object, gather properties\n\t\t\t\t\t$reflect = new ReflectionClass($this);\n\t\t\t\t\t$properties = $reflect->getProperties();\n\t\t\t\t\t// loop through properties, add to array\n\t\t\t\t\tforeach ($properties as $prop) {\n\t\t\t\t\t\t$name = $prop->getName();\n\t\t\t\t\t\tif($name !== 'pages' && $name !== 'links' && $name !== 'visited' && $name !== 'doc' && $name !== 'robot'){\n\t\t\t\t\t\t\t$return[$name] = $this->{$name};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($this->robot){\n\t\t\t\t\t\t\t$return['robot'] = $this->robot->settings();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}",
"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 get_settings()\n {\n }",
"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}",
"protected function _castValue ( $value ) {\n\t\t\tswitch ( $this->_settingType ) {\n\t\t\t\tcase self::TYPE_BOOLEAN: return $value == \"true\" ? true : false;\n\t\t\t\tcase self::TYPE_SWITCH: return $value ? \"on\" : \"off\";\n\t\t\t\tcase self::TYPE_INTEGER: return intval ( $value );\n\t\t\t\tcase self::TYPE_STRING: return \"$value\";\n\t\t\t\tdefault: return \"\";\n\t\t\t}\n\t\t}",
"public function applicationSettings(): array\n {\n if ($this->getUser() !== NULL) {\n $this->getUser()->locale = request()->header('locale', 'en');\n $this->getUser()->save();\n }\n if ($this->getDriver() !== NULL) {\n $this->getDriver()->locale = request()->header('locale', 'en');\n $this->getDriver()->save();\n }\n\n return [\n 'status' => 1,\n 'settings' => [\n 'minimum_order_weight' => Setting::get('minimum_order_weight', 1.0),\n 'cash_out_threshold' => Setting::get('cash_out_threshold', 1.0),\n 'support_email' => Setting::get('support_email'),\n 'mobile_phone' => Setting::get('mobile_phone'),\n 'land_line' => Setting::get('land_line'),\n 'twitter_account' => Setting::get('twitter_account'),\n 'facebook_account' => Setting::get('facebook_account'),\n 'instagram_account' => Setting::get('instagram_account'),\n 'privacy_policy' => Storage::url(Setting::get('privacy_policy')),\n 'terms_conditions' => Storage::url(Setting::get('terms_conditions')),\n 'address' => Setting::get('address', ''),\n 'brief' => Setting::get('brief', ''),\n 'faq' => Setting::get('faq', ''),\n ],\n ];\n }",
"public function getSettings($erps_id = 0)\t\r\n\t{ \r\n return parent::getSettings();\t\r\n \r\n\t}"
] | [
"0.7237023",
"0.62781686",
"0.6194147",
"0.6181555",
"0.5971173",
"0.59524965",
"0.59232116",
"0.5901699",
"0.58868",
"0.5862349",
"0.5831167",
"0.5825477",
"0.5814863",
"0.57985187",
"0.5780242",
"0.57667965",
"0.5748498",
"0.57260287",
"0.5725605",
"0.57029235",
"0.5691813",
"0.56793946",
"0.56714594",
"0.56705",
"0.56684977",
"0.56684977",
"0.56679755",
"0.5653758",
"0.5635695",
"0.56303537",
"0.5618426",
"0.5616062",
"0.5610583",
"0.55983615",
"0.55905503",
"0.55814713",
"0.5579022",
"0.55692023",
"0.5561604",
"0.5556868",
"0.5554758",
"0.55251616",
"0.5514269",
"0.5507864",
"0.5505882",
"0.5505686",
"0.5505588",
"0.5502936",
"0.54975855",
"0.54900324",
"0.5486951",
"0.548557",
"0.5482679",
"0.5482334",
"0.547431",
"0.5470729",
"0.5459644",
"0.5441122",
"0.5436961",
"0.5431927",
"0.54314464",
"0.5422872",
"0.5416452",
"0.54133904",
"0.5409654",
"0.5399577",
"0.5397036",
"0.5387139",
"0.53604233",
"0.53578967",
"0.53556454",
"0.53479433",
"0.53459597",
"0.5337416",
"0.53364825",
"0.53357273",
"0.53309214",
"0.5318167",
"0.5316902",
"0.53122014",
"0.53111744",
"0.53107744",
"0.53097683",
"0.5308078",
"0.5302104",
"0.5285892",
"0.52854955",
"0.5284431",
"0.5270234",
"0.5267441",
"0.5262714",
"0.5258671",
"0.52504647",
"0.5244343",
"0.52443",
"0.5238294",
"0.52356076",
"0.5235102"
] | 0.79969263 | 1 |
Finish Adds everything it needs to the queues and clears data store | public function finish()
{
/* @todo this needs to be a queue task */
foreach( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'forums_forums' ), 'IPS\forums\Forum' ) AS $forum )
{
$forum->setLastComment();
$forum->queued_topics = \IPS\Db::i()->select( 'COUNT(*)', 'forums_topics', array( 'forum_id=? AND approved=0', $forum->id ) )->first();
$forum->queued_posts = \IPS\Db::i()->select( 'COUNT(*)', 'forums_posts', array( 'forums_topics.forum_id=? AND forums_posts.queued=1', $forum->id ) )->join( 'forums_topics', 'forums_topics.tid=forums_posts.topic_id' )->first();
$forum->save();
}
/* Content Rebuilds */
\IPS\Task::queue( 'convert', 'RebuildContent', array( 'app' => $this->app->app_id, 'link' => 'forums_posts', 'class' => 'IPS\forums\Topic\Post' ), 2, array( 'app', 'link', 'class' ) );
\IPS\Task::queue( 'convert', 'RebuildFirstPostIds', array( 'app' => $this->app->app_id ), 2, array( 'app' ) );
\IPS\Task::queue( 'convert', 'DeleteEmptyTopics', array( 'app' => $this->app->app_id ), 4, array( 'app' ) );
return "Search Index Rebuild, Content Rebuild, Content Recount, Member Recount, and Private Message Rebuild tasks started.";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function persistQueuedDatabaseTransactions()\n {\n foreach ($this->queue as $key => $closure) {\n $closure($this);\n unset($this->queue[$key]);\n }\n }",
"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 dequeueItems() {\n $this->datasource()->stopTracking(array($this));\n _search_api_empty_cron_queue($this);\n }",
"public function finish( )\n {\n $this->clearDataBuffer();\n $this->free( );\n if ( underQL::$db_handle )\n @ mysql_close( underQL::$db_handle );\n }",
"public function FlushQueue()\n {\n do\n {\n $result = $this->FlushMsg();\n } while ($result);\n }",
"public function clearFinished();",
"public function purgeAllQueues()\n {\n $this->cleanup();\n }",
"public function autoPostOpenQueueItems()\n\t{\n\t\t$helper = Mage::helper('fw_queue');\n\t\tif($helper->isQueueEnabled())\n\t\t{\n\t\t\t$start = -microtime(true);\n\t\t\t$collection = Mage::getModel('fw_queue/queue')->getCollection();\n\t\t\t$collection->addFieldToSelect('*');\n\t\t\t$collection->addFieldToFilter('status', array(array('eq' => '1'),array('eq' => '4')));\n\t\t\tforeach($collection as $queue_item){\n\t\t\t\t$queue = Mage::getModel('fw_queue/queue')->load($queue_item->getId());\n\t\t\t\t$queue->process();\n\t\t\t}\n\t\t\t//CLEAN-UP AND STOP ERROR QUEUE ITEMS\n\t\t\t$expired = Mage::getModel('fw_queue/queue')->getCollection();\n\t\t\t$expired->addFieldToSelect('*');\n\t\t\t$expired->addFieldToFilter('status', array(array('eq' => '4')));\n\t\t\t$expired->addFieldToFilter('number_attempts', array(array('gteq' => '75')));\n\t\t\tforeach($expired as $expire_item){\n\t\t\t\t$queue = Mage::getModel('fw_queue/queue')->load($queue_item->getId());\n\t\t\t\t//STATUS_ABORTED_NOTIFIED = 5\n\t\t\t\t$queue->changeStatus('5');\n\t\t\t}\n\n\t\t\t//CLEAN-UP OLD ITEMS\n\t\t\t$date = date('Y-m-d H:i:s', time());\n\t\t\t$queueLastAttemptDate = strtotime ( '-90 day' , strtotime ( $date ) ) ;\n\t\t\t$queueLastAttemptDate = date ( 'Y-m-d H:i:s' , $queueLastAttemptDate );\n\n\t\t\ttry {\n\t\t\t\t$queueItems = Mage::getModel('fw_queue/queue')\n\t\t\t\t->getCollection()\n\t\t\t\t->addFieldToSelect('*')\n\t\t\t\t->addFieldToFilter('last_attempt', array('to' => $queueLastAttemptDate));\n\n\t\t\t\t$queueItems->getSelect()->limit(10000);\n\n\t\t\t\tforeach ($queueItems as $queueItem)\n\t\t\t\t{\n\t\t\t\t\t$queueItem->delete();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception $e){\n\t\t\t\tMage::logException($e->getMessage());\n\t\t\t}\n\t\t\t$totalTime = microtime(true) + $start;\n\t\t\t$span = gmdate(\"H:i:s\",$totalTime);\n\t\t\t$micro = substr($totalTime - floor($totalTime),2);\n\t\t\t$logLine = \"Queue executed in {$span}.{$micro}\\r\\n\";\n\t\t\tMage::Log($logLine,null,'fw_queue.log');\n\n\t\t\t//Dispatch Event to let fw_orderpublish know when queue is done running\n\t\t\t$eventData = array('queue_complete' => 'true');\n\t\t\tMage::dispatchEvent('fw_queue_run_complete');\n\t\t}\n\n\t}",
"public function clearQueue() {\n\n try {\n if (count(URLRequest::all()) > 0) { //Get the count of all the records in the database.\n URLRequest::truncate(); //Remove all records in the database.\n shell_exec('sudo rm -R /Stream && sudo mkdir /Stream'); //Remove the /Stream directory and then recreate it.\n return true;\n }\n return false;\n } catch (\\Exception $exception) {\n throw new \\Exception($exception);\n }\n\n }",
"public function deleteQueue();",
"public function __destruct(){\n\t\t$this->purgeQueue();\n\t}",
"public function commit() \n {\n $log = FezLog::get();\n $db = DB_API::get();\n \n if (!$this->_ids || count($this->_ids) == 0) {\n if ($this->size() == 0) {\n return; \n }\n }\n \n foreach ($this->_ids as $id => $action) {\n try {\n $db->beginTransaction();\n $sql = \"DELETE FROM \".$this->_dbtp.\"queue WHERE \".$this->_dbqp.\"id=? \".\n \"AND \".$this->_dbqp.\"op=?\";\n $db->query($sql, array($id, $action)); \n $sql = \"INSERT INTO \".$this->_dbtp.\"queue (\".$this->_dbqp.\"id,\".$this->_dbqp.\"op) VALUES (?,?)\";\n $db->query($sql, array($id, $action));\n $db->commit();\n }\n catch(Exception $ex) {\n $db->rollBack();\n $log->err($ex);\n return false;\n }\n unset($this->_ids[$id]);\n }\n\n // reset cached object ids\n $this->_ids = array();\n $this->triggerUpdate(); \n return true;\n }",
"public function flushDataStore()\n {\n $this->database->flushAll(); \n }",
"public static function emptyQueues()\n {\n //Get the tracks in all the queues\n $tracks = [];\n foreach (self::$queues as $queue) {\n $tracks = array_merge($tracks, self::getTracksInQueue($queue));\n }\n\n foreach ($tracks as $track) {\n self::removeRequestFromQueue($track['queue'], $track['requestid']);\n }\n }",
"public function doneWorking()\n\t{\n\t\t$this->currentJob = null;\n\t\tStat::incr('processed');\n\t\tStat::incr('processed:' . (string)$this);\n\t\tResque::redis()->del('worker:' . (string)$this);\n\t}",
"public function flush()\n\t{\n\t\t$this->items = array();\n\t\t$this->properties = array();\n\t}",
"public function queue() {\n\t\t$this->prepareMessage();\n\t\t$this->queueRepository->add($this->toArray());\n\t}",
"protected function processClearCacheQueue() {}",
"public function cleanupPersistentQueue()\n {\n\n $statusCheck = array(self::STATUS_WAITING => 10,\n self::STATUS_WORKING => 5,\n self::STATUS_QUEUE => 5);\n\n $limit = 100;\n\n $rsm = new ResultSetMappingBuilder($this->entityManager);\n $rsm->addRootEntityFromClassMetadata('Mmoreramerino\\\\GearmanBundle\\\\Entity\\\\QueueControl', 'qc');\n $rsm->addJoinedEntityFromClassMetadata('Mmoreramerino\\\\GearmanBundle\\\\Entity\\\\QueueStatus', 'qs', 'qc', 'queueStatus', array('id' => 'queue_status_id'));\n\n //Query by status, making sure that it have not been a stuck on the same status for a determinated time\n $nativeSql = \"SELECT qc.*, qs.*\n FROM Queue_Control qc\n JOIN Queue_Status qs ON qc.queue_status_id = qs.id\n WHERE\n (qc.queue_status_id = \" .(self::STATUS_WAITING).\" AND TIMESTAMPDIFF(MINUTE, qc.last_update_date, NOW() ) > {$statusCheck[self::STATUS_WAITING]}) OR\n (qc.queue_status_id = \" .(self::STATUS_WORKING).\" AND TIMESTAMPDIFF(MINUTE, qc.last_update_date, NOW() ) > {$statusCheck[self::STATUS_WORKING]}) OR\n (qc.queue_status_id = \" .(self::STATUS_QUEUE) .\" AND TIMESTAMPDIFF(MINUTE, qc.last_update_date, NOW() ) > {$statusCheck[self::STATUS_QUEUE]})\n LIMIT $limit\";\n\n $query = $this->entityManager->createNativeQuery($nativeSql, $rsm); //->setMaxResults($limit);\n\n $result = $query->getResult();\n\n foreach ($result as $job) {\n echo $job->getId().PHP_EOL;\n if ($job->getRetryCount() >= self::MAX_RETRY_COUNT ) {\n $this->updatePersistentQueueItem($job, self::STATUS_FAILED, 'The number of retries have been max out');\n continue;\n }\n\n $this->enqueueJob($job);\n\n $this->entityManager->detach($job);\n\n }\n\n\n }",
"protected function finalize(): void\n {\n $this->fire(WorkerDoneEvent::class);\n\n Log::debug(sprintf('Worker [%s] finalized.', $this->getAttribute('id')));\n }",
"public function flush()\n {\n $queueSize = count($this->queue);\n if ($queueSize > 0) {\n $this->logInfo('Flushing queue of size ' . $queueSize);\n $this->getTransport()->send($this->queue);\n $this->queue = array();\n }\n }",
"public function _destroy_queue() {\n\t\tglobal $wpdb;\n\n\t\t$status = \\SearchWP::$index->get_tables()['status']->table_name;\n\t\t$wpdb->query( $wpdb->prepare( \"\n\t\t\tDELETE FROM {$status}\n\t\t\tWHERE indexed IS NULL\n\t\t\tAND omitted IS NULL\n\t\t\tAND queued IS NOT NULL\n\t\t\tAND site = %d\",\n\t\t\tget_current_blog_id()\n\t\t) );\n\t}",
"public function flushItems()\n\t{\n\t\t$this->items = array();\n\t}",
"public function postFlush(): void\n {\n try {\n foreach ($this->createdObjects as $object) {\n $this->publishUpdate($object, $this->createdObjects[$object], 'create');\n }\n\n foreach ($this->updatedObjects as $object) {\n $this->publishUpdate($object, $this->updatedObjects[$object], 'update');\n }\n\n foreach ($this->deletedObjects as $object) {\n $this->publishUpdate($object, $this->deletedObjects[$object], 'delete');\n }\n } finally {\n $this->reset();\n }\n }",
"public function actionQueueReset()\n {\n if (Yii::$app->has('elasticsearch')) {\n\n }\n Yii::$app->db->createCommand()->update('{{%queue}}', ['done_at' => NULL, 'attempt' => NULL, 'reserved_at' => NULL], '')->execute();\n }",
"public function flush()\r\r\n\t{\r\r\n\t\t$this->_storage->flush();\r\r\n\t}",
"public function __destruct() {\n // scope of a foreach) but it has not reached its end, we must sync\n // the client with the queued elements that have not been read from\n // the connection with the server.\n $this->sync();\n }",
"public function Queues();",
"public function __destruct()\n {\n unset($this->queue);\n }",
"private function performQueueOperations()\n\t{\n\t\t//$this->queue_manager = high_risk\n\t\t$application_id = $this->application->getModel()->application_id;\n\t\t$qi = $this->queue_manager->getQueue(\"high_risk\")->getNewQueueItem($application_id);\n\t\t$this->queue_manager->moveToQueue($qi, \"high_risk\");\t\t\n\t}",
"protected function execute() \n {\n /** @var float */\n static $lastCleanUpTime = -999999999;\n\n $incCount = $this->_redis->getIncomingSize();\n if ($incCount > 0) {\n $this->log(\"$incCount elements in queue.\");\n $this->_redis->processMultiple($this->_redis->getIncoming(2000));\n }\n\n if ($this->_upTime() - $lastCleanUpTime > $this->ini['ttl']) {\n $this->_redis->cleanIndexes();\n $lastCleanUpTime = $this->_upTime();\n }\n }",
"public function finish()\n\t{\t\n\t\tfor($ix=0; $ix<$this->track_total; $ix++) {\n\t\t\t$this->track_ix = $ix;\n\t\t\t$this->loopEnd[$this->track_ix] = count($this->events[$this->track_ix]);\n\t\t}\n\t\t\n\t\t# Create loop of previously created data here\n\t\tfor($z=0;$z<$this->loop;$z++) {\n\t\t\tfor($ix=0; $ix<$this->track_total; $ix++) {\n\t\t\t\t$this->track_ix = $ix;\n\t\t\t\tfor($j=$this->loopStart[$this->track_ix];$j<$this->loopEnd[$this->track_ix];$j++) {\n\t\t\t\t\t$this->events[$this->track_ix][] = $this->events[$this->track_ix][$j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function flush()\n {\n $this->store()->flush();\n }",
"public static function tearDownAfterClass(): void\n {\n static::$queue = null; \n }",
"public function flush(): void\n {\n $this->logger = null;\n\n $this->connections = [];\n\n $this->dispatcher->forgetAll();\n }",
"protected function tearDown(): void\r\n {\r\n unset($this->queue);\r\n }",
"function edd_pup_clear_queue() {\n\n\tif ( ! wp_verify_nonce( $_REQUEST['nonce'], 'clear-queue-'.$_REQUEST['email'] ) ) {\n\t\techo 'noncefail';\n\t\texit;\n\t}\n\n\tglobal $wpdb;\n\n\t// Clear queue\n\tif ( $_POST['email'] == 'all' ) {\n\n\t\t// Build array of queued emails before clearing table\n\t\t$queueemails = edd_pup_queue_emails();\n\n\t\t// Build array of sent email data before clearing table\n\t\tforeach ( $queueemails as $email => $id ) {\n\t\t\t$recipients[$id] = edd_pup_check_queue( $id );\n\t\t}\n\n\t\t// Clear the database table\n\t\t$qr = $wpdb->query( \"TRUNCATE TABLE $wpdb->edd_pup_queue\" );\n\n\t} else {\n\n\t\t$recipients = edd_pup_check_queue( $_POST['email'] );\n\n\t\t// Delete the rows WHERE the specified email_id matches\n\t\t$qr = $wpdb->delete( \"$wpdb->edd_pup_queue\", array( 'email_id' => $_POST['email'] ), array( '%d' ) );\n\n\t}\n\n\t// If clear queue fails, bail out of function with error message, otherwise change post statuses\n\tif ( false === $qr ) {\n\t\twp_die( __( 'Error: could not complete database query.', 'edd-pup' ), __( 'Clear Queue Error', 'edd-pup' ) );\n\n\t} else {\n\n\t\tif ( !empty( $queueemails ) ) {\n\n\t\t\tforeach ( $queueemails as $email => $id ) {\n\t\t\t\t$post[] = wp_update_post( array( 'ID' => $id, 'post_status' => 'abandoned' ) );\n\t\t\t\tupdate_post_meta ( $id, '_edd_pup_recipients', $recipients[$id] );\n\t\t\t}\n\n\t\t} else if ( absint( $_POST['email'] ) != 0 ) {\n\n\t\t\t$post = wp_update_post( array( 'ID' => $_POST['email'], 'post_status' => 'abandoned' ) );\n\t\t\tupdate_post_meta ( $post, '_edd_pup_recipients', $recipients );\n\n\t\t} else {\n\n\t\t\twp_die( __( 'Error: Valid email ID not supplied.', 'edd-pup' ), __( 'Clear Queue Error', 'edd-pup' ) );\n\t\t}\n\t}\n\n\tdie();\n}",
"public function postFlush()\n {\n $fileSystem = new Filesystem();\n $fileSystem->remove($this->filesScheduledForDeletion);\n }",
"public function flush(): void\n {\n foreach ($this->eventRegistry->dequeueEvents() as $event) {\n $this->eventBus->dispatch($event);\n }\n }",
"public function finish()\n {\n parent::finish();\n\n $this->participant_list->finish();\n $this->set_variable( 'participant_list', $this->participant_list->get_variables() );\n $this->qnaire_list->finish();\n $this->set_variable( 'qnaire_list', $this->qnaire_list->get_variables() );\n }",
"public function queue_cleanup_personal_data() {\n\t\tself::$background_process->schedule_ended_subscription_anonymization();\n\t}",
"public function onPostDispatch()\n {\n /** @var Shipperhq_Shipper_Model_Storage[] $storageList */\n $storageList = Mage::helper('shipperhq_shipper')->storageManager()->getStorageObjects();\n foreach ($storageList as $storage) {\n if ($storage->hasDataChanges() && $storage->getId()) {\n $this->_saveStorageInstance($storage);\n }\n }\n }",
"public function flush()\n {\n $this->aliases = [];\n $this->bindings = [];\n $this->instances = [];\n }",
"public function clear()\n {\n $this->dataStorage = [];\n }",
"public function clear()\n {\n $this->batch = [];\n }",
"public function clear():void{\n $this->size = 0;\n $this->arrayQueue = -1;\n }",
"public function runQueue();",
"public function flushAll();",
"public function emptyQueue() {\n $this->client->zremrangebyscore(self::JOB_QUEUE_NAME, \"-inf\", \"inf\");\n $this->client->del(\"total_processing_time\");\n $this->client->del(\"num_jobs_processed\");\n }",
"public function clear(): void\n {\n $this->eventRegistry->dequeueEvents();\n }",
"public function flush(): void\n {\n parent::flush();\n\n $this->bootedCallbacks = [];\n $this->bootingCallbacks = [];\n $this->deferredServices = [];\n $this->serviceProviders = [];\n $this->loadServiceProviders = [];\n }",
"public function flush()\n {\n $this->memcache->flush();\n }",
"public function complete() {\n\t\t$this->indexable_helper->finish_indexing();\n\t}",
"public function flush()\n {\n $this->arrSettings = null;\n $this->section = null;\n $this->group = null;\n $this->changed = null;\n }",
"public function flush()\n {\n $this->manager->flush();\n }",
"public function flush(/* ... */)\n {\n $this->_storage = [[], [], []];\n $this->_event_history = [];\n $this->set_state(STATE_DECLARED);\n }",
"public function end() {\n $this->memcache->delete(PREFIX_LOCDATA.$this->getShareID());\n }",
"public function finishJob()\r\n {\r\n $this->done = true;\r\n }",
"public function flushAll() {\n\t\t$this->removeKeys();\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 $this->setParamaters();\n\t\t}",
"public function clear() {\n\t\t$this->backends = [];\n\t\t$this->initializedBackends = [];\n\t}",
"protected function _completeFlush() {\r\n\r\n }",
"public function flushBatch()\n\t{\n\t\tif ($this->batching)\n\t\t{\n\t\t\t$this->batching = FALSE;\n\t\t\t\n\t\t\t$this->statpro->endBatch();\n\t\t}\n\t}",
"protected function processComputingQueue()\n {\n if (!$this->computingQueue instanceof SplObjectStorage) {\n return;\n }\n\n foreach ($this->computingQueue as $entity) {\n $this->computeOrRecomputeEntityChangeSet($entity);\n }\n $this->computingQueue->removeAll($this->computingQueue);\n }",
"protected function finish() {}",
"function flush(){\n\t\t$this->last_result = array();\n\t\t$this->col_info = null;\n\t\t$this->last_query = null;\n\t}",
"public function clear()\n {\n $this->items = [];\n $this->saveItems();\n }",
"public function finished() {\n $this->setFinishedAt(new MongoDate());\n $this->save();\n }",
"public function execute()\n {\n foreach ($this->queue->pull(1000) as $message) {\n $this->process($message)->delete();\n }\n }",
"public function clearPending();",
"public function purgeAllQueues() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('purgeAllQueues', func_get_args()));\n }",
"public function purgeAllQueues() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('purgeAllQueues', func_get_args()));\n }",
"protected function _balanceQueues(){\n// $this->RUNNING = false;\n }",
"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}",
"public function finish() {\n # make cleanup procedures...\n return array('lastItem'=>$this->curPos, 'itemCount'=>$this->count, 'message'=>'Finished at '.date('H:i:s'));\n }",
"public function __destruct() {\n $this->flushMessages();\n }",
"public function clearWorkers()\n {\n $this->redis->del(self::$workerKey);\n $this->redis->del(self::$pausedWorkerKey);\n }",
"private function flush() {\n\t\t$this->_error = '';\n\t\t$this->_last_result = array();\n\t}",
"protected function end_bulk_operation() {\n\t\t\n\t\t// This will also trigger a term count.\n\t\twp_defer_term_counting( false );\n\t}",
"public function flush() {\n\t\t$this->last_result = null;\n\t\t$this->col_info = null;\n\t\t$this->last_query = null;\n\t}",
"public function finish() {}",
"public function finish() {}",
"public function clear()\n {\n $this->conn->flushDb();\n }",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"function flush() {\n\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\n\t\t}",
"public function flush(): void\n {\n $this->list = [];\n }",
"protected function end_bulk_operation() {\n\t\t// This will also trigger a term count.\n\t\twp_defer_term_counting( false );\n\t}",
"public function finish()\n {\n parent::finish();\n \n foreach( $this->get_record_list() as $record )\n {\n $db_site = $record->get_site();\n $db_region = $record->get_region();\n\n // assemble the row for this record\n $this->add_row( $record->id,\n array( 'site.name' => $db_site ? $db_site->name : 'any',\n 'city' => $record->city ? $record->city : 'any',\n 'region.name' => $db_region ? $db_region->name : 'any',\n 'postcode' => $record->postcode ? $record->postcode : 'any' ) );\n }\n\n $this->finish_setting_rows();\n }",
"public function flushData()\n\t{\n\t\t$class = get_class($this);\n\t\tunset($this->_data[$class]);\n\t}",
"public function pushToFareye() {\r\n Mage::getModel('marketplace/fareyedataqueue')->pushToFareye();\r\n }",
"function mailqueue_cleanup() {\nglobal $db, $jconf;\n\n\t$date_month_ago = date(\"Y-m-d H:i:s\", strtotime(' -1 month'));\n\t$date_year_ago = date(\"Y-m-d H:i:s\", strtotime(' -1 year'));\n\n\t$query = \"\n\t\tDELETE FROM\n\t\t\tmailqueue\n\t\tWHERE\n\t\t\t( status = 'sent' AND timestamp < '\" . $date_month_ago . \"' ) OR\n timestamp < '\" . $date_year_ago . \"'\";\n \n\ttry {\n\t\t$rs = $db->Execute($query);\n\t} catch (exception $err) {\n\t\t$debug->log($jconf['log_dir'], $jconf['jobid_maintenance'] . \".log\", \"[ERROR] SQL query failed. Query:\\n\\n\" . trim($query), $sendmail = true);\n\t\treturn false;\n\t}\n\n\treturn true;\n}",
"public function flush()\n {\n $keys = $this->cache->queryKeys();\n foreach ( $keys as $key ) {\n $this->cache->delete($key);\n }\n }",
"public function flush(): void\n {\n $this->issues = [];\n }",
"public function clearItems()\n\t{\n\t\t$this->storage->clear();\n\t}",
"public function removeAllTasks() {\n\t\t$this->tasks = new Tx_Extbase_Persistence_ObjectStorage();\n\t}"
] | [
"0.6576221",
"0.6387644",
"0.63784474",
"0.6209239",
"0.61493057",
"0.6130219",
"0.6126361",
"0.6118118",
"0.6072822",
"0.60596037",
"0.6039103",
"0.60250837",
"0.60042113",
"0.59973913",
"0.5979929",
"0.59755963",
"0.5927025",
"0.5924329",
"0.59145945",
"0.5900669",
"0.58879757",
"0.58753335",
"0.585644",
"0.5847419",
"0.58440393",
"0.58047163",
"0.57772326",
"0.576348",
"0.5739123",
"0.57386494",
"0.5736627",
"0.5725774",
"0.57186925",
"0.57097155",
"0.57078105",
"0.5686942",
"0.5681604",
"0.56804085",
"0.56678",
"0.56674206",
"0.5662005",
"0.5643897",
"0.5639945",
"0.56375396",
"0.5635716",
"0.56205285",
"0.5619318",
"0.56160694",
"0.5611102",
"0.5605355",
"0.55898726",
"0.5589174",
"0.5584226",
"0.5583681",
"0.5579573",
"0.5578689",
"0.5564463",
"0.55549705",
"0.5546746",
"0.55442935",
"0.55346143",
"0.55289656",
"0.55248314",
"0.55217826",
"0.550131",
"0.5499702",
"0.5498907",
"0.5497606",
"0.5489655",
"0.548726",
"0.5486548",
"0.5486548",
"0.547711",
"0.5472841",
"0.5461129",
"0.5460523",
"0.5458153",
"0.54551506",
"0.54491043",
"0.543025",
"0.542538",
"0.5425339",
"0.5424934",
"0.5424541",
"0.5424335",
"0.5424335",
"0.5424335",
"0.5424335",
"0.5424335",
"0.54241896",
"0.5423797",
"0.54200846",
"0.54085714",
"0.54053855",
"0.5404434",
"0.53988636",
"0.53978324",
"0.5394488",
"0.53942466",
"0.5384145"
] | 0.63428426 | 3 |
Returns a block of text, or a language string, that explains what the admin must do to start this conversion | public static function getPreConversionInformation()
{
return NULL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_default_additional_content()\n {\n\n return __('Hope to see you back soon.', 'subscriptio');\n }",
"public function get_default_additional_content()\n {\n\n return __('Thanks for reading.', 'subscriptio');\n }",
"public function getFromLanguage(): string;",
"public function content()\n\t{\n\t\t// Get current language\n $lang = Config::get('app.locale');\n if($lang == \"ar\")\n \tif($this->content_ar != \"\")\t\n\t\t\t\treturn nl2br($this->content_ar);\n\t\t\telse\n\t\t\t\treturn Lang::get('menu.under_construction');\n\t\telse\n\t\t\treturn nl2br($this->content);\n\t}",
"public function language();",
"public function language();",
"function getDescription() {\n return lang('Some description');\n }",
"private function get_main_description() {\n\t\treturn utf8_encode(file_get_contents($this->root . \"/description.\" .\n\t\t\t$this->lang . \".html\"));\n\t}",
"public function getInfoText($languageCode);",
"public function get_content_plain()\n {\n\n ob_start();\n RP_SUB_Help::include_template($this->template_plain, array_merge($this->template_variables, array('plain_text' => true)));\n return ob_get_clean();\n }",
"function format()\r\n\t{\r\n\t\treturn $this->text;\r\n\t}",
"public function get_text()\n {\n }",
"public function getBlockTypeDescription()\n {\n return t(\"Select Pages and Do stuff with them.\");\n }",
"public function getLanguage()\r\n {\r\n if ($this->getChatHelper()->getLanguage() == 'auto') {\r\n return null;\r\n }\r\n \r\n if ($this->getChatHelper()->getLanguage() == 'md') {\r\n return \"\\$zopim.livechat.setLanguage('\" . substr(Mage::app()->getLocale()->getLocale(),0,2).\"');\" . \"\\n\";\r\n }\r\n return \"\\$zopim.livechat.setLanguage('\" . $this->getChatHelper()->getLanguage() . \"');\" . \"\\n\";\r\n }",
"public static function text() {}",
"function get_text()\n {\n if ( !$this->_converted ) {\n $this->_convert();\n }\n\n return $this->text;\n }",
"public function text()\n {\n if ($this->text_translated) {\n return cms_trans($this->text_translated);\n }\n\n return $this->text;\n }",
"public function text() {}",
"public function text() {}",
"public function text() {}",
"function getExtraContent() {\n\t\treturn get_language_string($this->get(\"extracontent\"));\n\t}",
"public function getDescription() {\r\n\t\t$tmp_body = strip_tags($this -> body);\r\n\t\t$description = Engine_Api::_() -> ynblog() -> subPhrase($tmp_body, 150);\r\n\t\treturn $description;\r\n\t}",
"public function getBackOfficeLanguage();",
"public function getPopup() { \n if($this->blocks) {\n return $this->desc . \"<BR /> <BR />\" . \n \"<b>Blocks\" . \n ($this->charges > 0 ? \" \" . $this->charges . \" more\" : \"\") .\n ($this->blockActionTypes != \"all\" ? $this->blockActionTypes : \"\") . \" actions\" . \n ($this->blockChance < 1 ? \" with a chance of \" . floor($this->blockChance * 100) . \"%\" : \"\") . \n ($this->turns > 0 ? \" within the next \" . $this->turns . \" rounds\" : \"\") .\n \".\";\n }\n return $this->desc;\n }",
"public function getContextualPart()\n {\n return '';\n }",
"public function getBlockTypeDescription()\n {\n return t(\"Adds an intro title and a title\");\n }",
"public function getFormatContent(): string\n {\n $this->label = rtrim($this->label,';');\n return \"\\e[{$this->label}m{$this->content}\\e[0m\";\n }",
"public function getPanel(): string {\n\t\t$return = $e = $u = '';\n\t\t$h = 'htmlSpecialChars';\n\n\t\tforeach ($unique = $this->getWarnings() as $message) {\n\t\t\t$e .= '<tr><td>' . $h($message) . '</td></tr>';\n\t\t}\n\n\t\tforeach ($untranslated = $this->getUntranslated() as $message) {\n\t\t\t$u .= '<tr><td>' . $h($message) . '</td></tr>';\n\t\t}\n\n\t\tif ($e || $u) $return = '<h1>' . strtoupper($this->getLocale()) . ' language</h1><div class=\"nette-inner bckp-translation\">';\n\t\tif ($e) $return .= '<h2>Errors: ' . count($unique) . '</h2><table class=\"tracy-sortable\">' . $e . '</table>';\n\t\tif ($u) $return .= '<h2>Missing: ' . count($untranslated) . '</h2><table class=\"tracy-sortable\">' . $u . '</table>';\n\t\tif ($e || $u) $return .= '</div>';\n\t\treturn $return;\n\t}",
"protected function getTextBlock($file){\n $text=\"\";\n $orgfile=$file;\n \n $file=$this->cfg_fileprefix . $orgfile . \"_\" . $this->language . $this->cfg_extension;\n if(file_exists($file)){\n \n }\n else{\n $file=$this->cfg_fileprefix . $orgfile . \"_\" . $this->cfg_defaultlang . $this->cfg_extension;\n if($this->cfg_defaultlang!=$this->language && file_exists($file)){\n }\n else{\n $file=false;\n }\n }\n if($file){\n $text=file_get_contents($file);\n }\n return $text;\n }",
"function getDescription()\n {\n $description = '\n\t\tThis is the template installation type. Change this text within the file for this installation type.';\n return $description;\n }",
"public function __toString() {\n //by the different types of block\n //probably should do this with class inheritance, but for now a switch will do the job\n switch ($this->_type) {\n case \"text\":\n case \"math_number\":\n $retval = $this->fields['TEXT'];\n break;\n case \"static_text\":\n $retval = \"{$this->fields['static']}{$this->next}\";\n break;\n case \"expected\":\n $retval = \"formula\";\n break;\n case \"test\":\n $retval = \"test of {$this->values['range']} on {$this->values['sheet']} for \\\"{$this->values['expected']}\\\"\";\n break;\n case \"expectation\":\n $retval = \"{$this->statements['formula']}\";\n break;\n case \"cell_reference\":\n $retval = \"{$this->values['Column']}{$this->values['Row']}{$this->next}\";\n break;\n case \"row_offset\":\n $retval = \"(myrow+{$this->values['Offset']})\";\n break;\n case \"column_offset\":\n $offset = arr_get($this->values, \"offset\");\n $retval = \"(mycol+$offset)\";\n break;\n case \"workspace\":\n $retval = \"workspace{$this->root[0]}\";\n break;\n default:\n //no idea what this is, so lets just return the next thing if it is in a statement block\n $retval = \"{$this->next}\";\n }\n //there is a chance that something set retval to null, but we can only return a string.\n if (isset($retval)) {\n return $retval;\n } else {\n return \"\";\n }\n }",
"function GetAdminDescription()\n {\n return $this->Lang('moddescription');\n }",
"private static function getEnglish($textId)\n {\n switch ($textId)\n {\n case StringID::ServerSideRuntimeError: return \"Server-side runtime error\";\n case StringID::InsufficientPrivileges: return \"You do not have sufficient privileges to perform this action.\";\n case StringID::InvalidLogin: return \"This user does not exist or is not activated or the password is incorrect.\";\n case StringID::UploadUnsuccessful: return \"Upload failed. Try again or try submitting another file.\";\n case StringID::HackerError: return \"Unexpected error in reaction to input data. Please contact the administrator and give him as much information about the action you attempted as possible.\";\n\n case StringID::MailError: return \"E-mail could not be sent.\";\n case StringID::DatabaseError: return \"Database query was not successful.\";\n case StringID::InvalidInput: return \"Your input is incomplete or invalid. Please modify it in accordance with the displayed instructions.\";\n case StringID::FileSystemError: return \"A file system operation failed. The administrator should verify that correct access rights are set for relevant directories.\";\n case StringID::SessionInvalidated: return \"Your session has become invalid. Perhaps you were inactive for too long or the program was updated to a newer version. Please log out, refresh the page (Ctrl+F5) and log in again.\";\n\n case StringID::ProblemNameExists: return \"A problem with this name already exists.\";\n case StringID::GroupNameExists: return \"A group with this name already exists.\";\n case StringID::NoPluginUsed: return \"This problem has no automatic grading.\";\n case StringID::InvalidActivationCode: return \"This activation code does not exist.\";\n case StringID::NotAuthorizedForName: return \"hidden\";\n\n case StringID::YouCannotRemoveYourself: return \"You cannot remove yourself.\";\n case StringID::CannotRemoveBasicStudentType: return \"User type 'STUDENT' (ID 1) cannot be removed, because this type is automatically assigned to newly registered users.\";\n case StringID::CannotDeleteGradedSubmissions: return \"It is not permitted to delete a graded submission.\";\n\n\n case StringID::ReloadManifests_InvalidFolder: return \"In the database, this plugin does not have a correctly filled mainfile entry and will probably not work. Nothing was changed now.\";\n case StringID::ReloadManifests_MalformedXmlOrFileMissing: return \"The manifest XML file is missing or malformed. Nothing was changed now.\";\n case StringID::ReloadManifests_DescriptionMismatch: return \"Descriptions did not match. Database description amended.\";\n case StringID::ReloadManifests_IdentifierMismatch: return \"Plugin identifiers did not match. Database record amended.\";\n case StringID::ReloadManifests_ArgumentsMismatch: return \"Argument descriptions did not match. Database argument descriptions amended.\";\n case StringID::ReloadManifests_DatabaseCorrespondsToManifests: return \"All plugin descriptions in the database already matched the plugin descriptions in the manifests.\";\n\n case StringID::TestCannotContainQuestionsOfDifferentLectures: return \"A test cannot contain questions from two different lectures.\";\n case StringID::ChooseAtLeastOneQuestion: return \"At least one question must be chosen.\";\n case StringID::AttachmentBelongsToAnotherLecture: return \"One of the attachments to this question are associated with another lecture.\";\n\n case StringID::PluginNameAlreadyExists: return \"A plugin with this name already exists.\";\n case StringID::PluginFolderAlreadyExists: return \"There is already a folder with this plugin name.\";\n case StringID::UnzipUnsuccessful: return \"Unzipping the uploaded file failed.\";\n case StringID::BadlyFormedPlugin: return \"This plugin file is malformed, perhaps it's missing the manifest file, the main file or the manifest file is malformed.\";\n\n case StringID::AttachmentExists: return \"An attachment with this name already exists for this lecture.\";\n case StringID::ResetLinkDoesNotExist: return \"This password reset code is not present in the database. Perhaps it was overwritten by a newly generated one.\";\n case StringID::ResetLinkExpired: return \"More than 24 hours elapsed since this code was generated and it was therefore disabled. Please generate a new one.\";\n case StringID::UserNameExists: return \"This user name is already taken.\";\n\n case StringID::ThisSubmissionIsPlagiarism : return \"This submission is suspiciously similar to another one.\";\n case StringID::ThisSubmissionIsInnocent: return \"Similarity analysis: The system did not detect significant similarity to any other submission.\";\n case StringID::ThisHasYetToBeCheckedForPlagiarism : return \"Similarity analysis: This submission is queued for similarity analysis.\";\n case StringID::GradingRequested : return \"Grading requested by student!\";\n case StringID::CannotDeleteQuestionThatsPartOfATest: return \"The question cannot be deleted because it is part of a test. Delete the test first.\";\n case StringID::SubscriptionNotYetAccepted: return \"The tutor has yet to confirm your membership in this assignment's group.\";\n case StringID::CannotDeleteHandsoffSubmissions: return \"You cannot delete a submission if you requested its grading. You should contact your tutor by e-mail if you do not wish the submission to be graded.\";\n }\n throw new \\Exception(\"This string (\" . $textId . \") does not exist.\");\n }",
"function bot_wtc_gTxt($what) {\nglobal $event;\nif($event !== 'article') {\n\treturn;\n}\n\tglobal $language;\n\n\t$en_us = array(\n\t\t'install_message' => 'bot_wtc is not yet properly initialized. Use the button below to create the preferences table.',\n\t\t'upgrade_message' => 'bot_wtc must be upgraded. Use the button below to add the new fields to the preferences table.',\n\t\t'uninstall' => 'Uninstall',\n\t\t'uninstall_message' => 'Using the button below will remove all preferences from the db. <br />Use before a complete uninstall or to reset all preferences. ',\n\t\t'uninstall_confirm' => 'Are you sure you want to delete the preferences table?',\n\t\t'td_warning' => 'Columns cannot be moved relative to single items and vice-versa',\n\t\t'same_item_warning' => 'Oops! You are trying to move an item relative to itself',\n\t\t'combo_warning' => 'Oops! You tried to insert an incomplete rule',\n\t\t);\n\n\t$lang = array(\n\t\t'en-us' => $en_us\n\t\t);\n\n\t\t$language = (isset($lang[$language])) ? $language : 'en-us';\n\t\t$msg = (isset($lang[$language][$what])) ? $lang[$language][$what] : $what;\n\t\treturn $msg;\n}",
"public function helperText()\n {\n return \"\";\n }",
"public function get_description()\n {\n return 'Apply syntax highlighting to a block of coding which is pasted inside the Comcode [tt]code[/tt] tag as follows:\n\n[code=\"Comcode\"][codebox=\"language\"]the code goes here[/codebox][/code]\n\nBased off of [url=\"https://github.com/GeSHi/geshi-1.0\"]GeSHI 1.0[/url]. GeSHI 1.1 is still under active development at the time of writing, missing many highlighters present in 1.0.\n';\n }",
"private function begin() {\n return $this->formats['begin'];\n }",
"public function get_description()\n {\n return 'Show the top performing members in a community. The addon adds a [tt]main_stars[/tt] block that ranks members on how many points they have been given in a certain category (also it changes the points module to allow selection of such categories when giving points). It also adds a block to show recent points transfers. Finally, it adds a line to member\\'s profile screens that says how many topics they have created, and how many they have replied to, to give a reflection of whether they help more than they ask or vice-versa.\n\nUsage:\n[code=\"Comcode\"][block max=\"10\"]side_recent_points[/block][/code]\nand\n[code=\"Comcode\"][block=\"Helpful soul\"]main_stars[/block][/code]The [tt]POINTS_GIVE[/tt] ([tt]themes/default/templates_custom[/tt]) template contains hard-coded HTML that defines each kind of points category that can be used. It is likely you will want to put out one an instance of the [tt]main_stars[/tt] block for each category (using the syntax demonstrated above).';\n }",
"public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new \\BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### NOOBSLIDE FROM ARTICLE ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\t// Return no alias has been set\n\t\tif ($this->nSarticleAlias < 0)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\treturn parent::generate();\n\t}",
"function sensei_custom_lesson_quiz_text () {\n\t$text = \"Report What You Have Learned\";\n\treturn $text;\n}",
"function getDescription() {\n\t\treturn __('plugins.generic.autoApprovePublicationFormats.description');\n\t}",
"public function getUsage()\n {\n return Horde_Kolab_Cli_Translation::t(\" format - Handle the Kolab format (the default action is \\\"read\\\")\n\n - read TYPE [FILE|FOLDER UID PART]: Read a Kolab format file of the specified\n type. Specify either a direct file name\n or a combination of an IMAP folder, a UID\n within that folder and the specific part\n that should be parsed.\n\n\n\");\n }",
"public function generate()\n {\n if (TL_MODE == 'BE')\n {\n $objTemplate = new BackendTemplate('be_wildcard');\n\n $objTemplate->wildcard = '### NEWS LIST ###';\n $objTemplate->title = $this->headline;\n $objTemplate->id = $this->id;\n $objTemplate->link = $this->name;\n $objTemplate->href = 'contao/main.php?do=modules&act=edit&id=' . $this->id;\n\n return $objTemplate->parse();\n }\n\n $this->news_archives = $this->sortOutProtected(deserialize($this->news_archives, true));\n\n // Return if there are no archives\n if (!is_array($this->news_archives) || count($this->news_archives) < 1)\n {\n return '';\n }\n\n return parent::generate();\n }",
"public function subtitle()\n\t{\n\t\t// Get current language\n $lang = Config::get('app.locale');\n if($lang == \"ar\")\n\t\t\treturn nl2br($this->subtitle_ar);\n\t\telse\n\t\t\treturn nl2br($this->subtitle);\n\t}",
"static private function CreateLanguageMessage() {\n\t\tif (!IllaUser::loggedIn()) {\n\t\t\t$german_browser = (ereg('de', $_SERVER['HTTP_ACCEPT_LANGUAGE']) ? true : false);\n\t\t}else {\n\t\t\t$german_browser = IllaUser::german();\n\t\t}\n\t\tif (($german_browser && self::isEnglish()) || (!$german_browser && self::isGerman())) {\n\t\t\t$short_filename = substr_replace(basename($_SERVER['PHP_SELF']), '', 0, 2);\n\t\t\t$path = str_replace($short_filename, '', $_SERVER['PHP_SELF']);\n\t\t\t$path = substr_replace($path, '', - 2, 2);\n\n\t\t\tif (count($_GET) > 0) {\n\t\t\t\t$getparams = array();\n\t\t\t\tforeach ($_GET as $key => $value) {\n\t\t\t\t\t$getparams[] = htmlentities($key) . '=' . htmlentities($value);\n\t\t\t\t}\n\t\t\t\t$getparams = '?' . implode('&', $getparams);\n\t\t\t}else {\n\t\t\t\t$getparams = '';\n\t\t\t}\n\n\t\t\tif (self::isEnglish() && file_exists('de' . $short_filename)) {\n\t\t\t\tMessages::add('<a href=\"' . $path . 'de' . $short_filename . $getparams . '\" hreflang=\"de\">Deine bevorzugte Sprache scheint Deutsch zu sein. Klick hier um zur deutschen Fassung dieser Seite zu wechseln.</a>', 'note');\n\t\t\t\tMessages::add('<a href=\"' . $path . 'de' . $short_filename . $getparams . '\" hreflang=\"de\">Your favoured language seems to be German. Click here to view the German version of this page.</a>', 'note');\n\t\t\t} elseif (self::isGerman() && file_exists('us' . $short_filename)) {\n\t\t\t\tMessages::add('<a href=\"' . $path . 'us' . $short_filename . $getparams . '\" hreflang=\"us\">Deine bevorzugte Sprache scheint Englisch zu sein. Klick hier um zur englischen Fassung dieser Seite zu wechseln.</a>', 'note');\n\t\t\t\tMessages::add('<a href=\"' . $path . 'us' . $short_filename . $getparams . '\" hreflang=\"us\">Your favoured language seems to be English. Click here to view the English version of this page.</a>', 'note');\n\t\t\t}\n\t\t}\n\t}",
"public function get_text(): string\n {\n return $this -> text;\n }",
"function _format_text ($body) {\n\t\t// Stop here if text is empty\n\t\tif (empty($body)) return \"\";\n\t\t// If special code is \"on\" - process it\n\t\tif ($this->USE_BB_CODES) {\n\t\t\t$body = _class(\"bb_codes\")->_process_text($body);\n\t\t} else {\n\t\t\t$body = nl2br(_prepare_html($body, 0));\n\t\t}\n\t\treturn $body;\n\t}",
"function load_text() {\n if (empty($this->grade_grades_text)) {\n $this->grade_grades_text = grade_grades_text::fetch('itemid', $this->itemid, 'userid', $this->userid);\n }\n return $this->grade_grades_text;\n }",
"public function getDescription() {\n return $this->text;\n }",
"public function getBodyText();",
"function text($string, $node=\"\", $module=\"\", $lng=\"\", $firstfallback=\"\", $nodefaulttext=false)\n{\n\tatkdebug(\"Call to deprecated text() function\",DEBUG_WARNING);\n\tatkimport(\"atk.atklanguage\");\n\treturn atkLanguage::text($string, $module, $node, $lng, $firstfallback, $nodefaulttext);\n}",
"public function description()\n\t{\n\t\t$txt = array();\n\t\t$txt['wiki'] = 'Generates a link to a random page.';\n\t\t$txt['html'] = '<p>Generates a link to a random page.</p>';\n\t\treturn $txt['html'];\n\t}",
"public function getPublicBlock() {\n return '';\n }",
"public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new \\BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### WEEKLY MENUS ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&table=tl_module&act=edit&id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\treturn parent::generate();\n\t}",
"protected function myDescription()\n {\n return _t('OrderStep.SENTINVOICE_DESCRIPTION', 'Invoice gets sent to the customer via e-mail. In many cases, it is better to only send a receipt and sent the invoice to the shop admin only so that they know an order is coming, while the customer only sees a receipt which shows payment as well as the order itself.');\n }",
"public function get_message() {\n\t\t// translators: Placeholders refer to a file name, and a theme / plugin name (e.g. \"index.php\", \"Stream\")\n\t\treturn _x(\n\t\t\t'\"%1$s\" in \"%2$s\" updated',\n\t\t\t'1: File name, 2: Theme/plugin name',\n\t\t\t'stream'\n\t\t);\n\t}",
"public function getContenu(): string\n {\n return $this->contenu;\n }",
"public function getBlockTypeDescription()\n {\n return t(\"Title with an underline\");\n }",
"public function generate()\r\n {\r\n if (TL_MODE == 'BE')\r\n {\r\n $objTemplate = new \\BackendTemplate('be_wildcard');\r\n \r\n $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['bericht_list'][0]) . ' ###';\r\n $objTemplate->title = $this->headline;\r\n $objTemplate->id = $this->id;\r\n $objTemplate->link = $this->name;\r\n $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;\r\n \r\n return $objTemplate->parse();\r\n }\r\n \r\n return parent::generate();\r\n }",
"public function get_plain() \n\t{ \n\t\treturn $this->PLAIN; \n\t}",
"public static function renderText();",
"function atktext($string, $module=\"\",$node=\"\", $lng=\"\", $firstfallback=\"\", $nodefaulttext=false, $modulefallback=false)\n{\n\t\n\t// alcal: user can specify language on pdf's\n\tif(!is_array($string) && substr($string, 0, 4)=='pdf_'){\n\t\t$rawdata = atkGetUser('customlang');\n\t\t$unserialized = unserialize(base64_decode($rawdata));\n\t\t\n\t\tif($unserialized[$string]) return $unserialized[$string];\n\t}\n\n\tatkimport(\"atk.atklanguage\");\n\treturn atkLanguage::text($string, $module, $node, $lng, $firstfallback, $nodefaulttext,$modulefallback);\n}",
"protected function get_templates_text() {\n $text = '';\n foreach ($this->editors as $editor) {\n $text .= $this->$editor ? ' '. $this->$editor : '';\n }\n return trim($text);\n }",
"function emDisplayStartConversionMessage(&$params, &$tsObj) {\n\t\t$content = '';\n\n\t\t$this\n\t\t\t->getExtConf()\n\t\t\t->getPaths()\n\t\t\t->loadTemplate();\n\n\n\t\t\t// set Backend for admin only\n\t\tif (!empty ($_POST['data']['setAdminOnly'])) {\n\t\t\t$install = new t3lib_install();\n\t\t\t$install->allowUpdateLocalConf = 1;\n\t\t\t$install->updateIdentity = $this->extName;\n\n\t\t\t$lines = $install->writeToLocalconf_control();\n\t\t\t$install->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\\'BE\\'][\\'adminOnly\\']', 1);\n\t\t\t$install->writeToLocalconf_control($lines);\n\n\t\t\t\t// save setting in session\n\t\t\t$sessionData['setAdminOnly'] = $_POST['data']['setAdminOnly'];\n\t\t\t$GLOBALS['BE_USER']->setAndSaveSessionData($this->extKey, $sessionData);\n\t\t}\n\n\n\t\t\t// check: admin only setting in localconf\n\t\tif (empty ($GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly']) AND empty ($_POST['data']['setAdminOnly'])) {\n\t\t\t$type = 'error';\n\t\t\t$msg = array(\n\t\t\t\t'header' => $GLOBALS['LANG']->sL($this->locallangXML . ':em.adminOnlyMessageHeader'),\n\t\t\t\t'body' => $GLOBALS['LANG']->sL($this->locallangXML . ':em.adminOnlyMessageWarning'),\n\t\t\t);\n\t\t##\t$style = 'position: absolute; top:90px; right:10px; width: 300px; z-index: 10000;';\n\t\t\t$style = '';\n\t\t\t$content .= $this->displayMessage($type, $msg, $style) . '\n\t\t\t\t\t<dd>' . $GLOBALS['LANG']->sL($this->locallangXML . ':em.adminOnlyMessageSolution') . '</dd>\n\t\t\t\t\t<dd>\n\t\t\t\t\t\t<div id=\"userTS-updateMessage\" class=\"typo3-tstemplate-ceditor-row\">\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"data[setAdminOnly]\" value=\"0\" />\n\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"data[setAdminOnly]\" name=\"data[setAdminOnly]\" value=\"1\" checked=\"checked\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</dd>';\n\t\t}\n\n\t\t\t// check: extConf is set\n\t\t$countExtConf = count($this->extConf);\n\t\tif ($countExtConf == 0 AND !isset ($_POST['data'])) {\n\t\t\t$type = 'warning';\n\t\t\t$msg = array(\n\t\t\t\t'header' => $GLOBALS['LANG']->sL($this->locallangXML . ':em.updateMessageHeader'),\n\t\t\t\t'body' => $GLOBALS['LANG']->sL($this->locallangXML . ':em.updateMessageWarning'),\n\t\t\t);\n\t\t##\t$style = 'position: absolute; top:10px; right:10px; width: 300px; z-index: 10000;';\n\t\t\t$style = '';\n\t\t\t$content .= $this->displayMessage($type, $msg, $style);\n\t\t}\n\n\n\t\t\t// link to updater script\n\t\tif (empty ($content)) { // no errors\n\t\t\t$type = 'information';\n\t\t##\tif (t3lib_div::int_from_ver(TYPO3_version) < 4005000) {\n\t\t##\t\t$link = 'index.php?&id=0&CMD[showExt]=' . $this->extKey . '&SET[singleDetails]=updateModule';\n\t\t##\t} else {\n\t\t\t\t$link = 'mod.php?&id=0&M=tools_em&CMD[showExt]=' . $this->extKey . '&SET[singleDetails]=updateModule';\n\t\t##\t}\n\t\t\t$msg = array(\n\t\t\t\t'header' => $GLOBALS['LANG']->sL($this->locallangXML . ':em.updateMessageHeader'),\n\t\t\t\t'body' => '\n\t \t\t\t\t\t' . /*$GLOBALS['LANG']->sL($this->locallangXML . ':error.noTemplate') .*/ '<br />\n\t \t\t\t\t\t<a style=\"text-decoration:underline;\" href=\"' . $link . '\">\n\t \t\t\t\t\t' . $GLOBALS['LANG']->sL($this->locallangXML . ':em.updateMessageLink') . '</a>',\n\t\t\t);\n\t\t\t$content .= $this->displayMessage($type, $msg, $style);\n\n\t\t}\n\n\t\treturn $content;\n\t}",
"public function get_output()\n {\n $imported_file = basename($this->get_tmp_file());\n $current_user = wp_get_current_user();\n $author = $current_user->user_login;\n\n $message = __('imported file:', 'tainacan');\n $message .= \" <b> ${imported_file} </b><br/>\";\n $message .= __('target collections:', 'tainacan');\n $message .= \" <b>\" . implode(\", \", $this->get_collections_names()) . \"</b><br/>\";\n $message .= __('Imported by:', 'tainacan');\n $message .= \" <b> ${author} </b><br/>\";\n\n return $message;\n }",
"function description_vide(){\n\t\tglobal $infos_id;\n\t\tif($infos_id['description'] == \"\"){\n\t\t\treturn \"Aucune description\";\n\t\t}else{\n\t\t\treturn $infos_id['description'];\n\t\t}\n\t}",
"function load_t2s_text(){\n\tglobal $config, $t2s_langfile, $t2s_text_stand, $templatepath;\n\t\n\tif (file_exists($templatepath.'/lang/'.$t2s_langfile)) {\n\t\t$TL = parse_ini_file($templatepath.'/lang/'.$t2s_langfile, true);\n\t} else {\n\t\tLOGGING(\"For selected T2S language no translation file still exist! Please go to LoxBerry Plugin translation and create a file for selected language \".substr($config['TTS']['messageLang'],0,2),3);\n\t\texit;\n\t}\n\treturn $TL;\n}",
"protected function getLanguageIsoCodeOfContent(): string\n {\n $currentLanguageUid = $this->formData['databaseRow']['sys_language_uid'];\n if (is_array($currentLanguageUid)) {\n $currentLanguageUid = $currentLanguageUid[0];\n }\n $contentLanguageUid = (int)max($currentLanguageUid, 0);\n if ($contentLanguageUid) {\n $contentLanguage = $this->formData['systemLanguageRows'][$currentLanguageUid]['iso'];\n } else {\n $contentLanguage = $this->rteConfiguration['config']['defaultContentLanguage'] ?? 'en_US';\n $languageCodeParts = explode('_', $contentLanguage);\n if (isset($languageCodeParts[0]) && isset($languageCodeParts[1])) {\n $contentLanguage = strtolower($languageCodeParts[0]) . ($languageCodeParts[1]\n ? '_' . strtoupper($languageCodeParts[1]) : '');\n }\n // Find the configured language in the list of localization locales\n $locales = GeneralUtility::makeInstance(Locales::class);\n // If not found, default to 'en'\n if (!in_array($contentLanguage, $locales->getLocales(), true)) {\n $contentLanguage = 'en';\n }\n }\n return $contentLanguage;\n }",
"public function getDescription()\n\t{\n\t\tglobal $langs;\n\t\treturn $langs->trans(\"PasswordGenerationStandard\");\n\t}",
"public function rawMessage(){\n $return = array(\n 'message' => '',\n 'options' => array(),\n );\n if ($this->getWillLend() && $this->isItHome()) {\n $return['message'] = 'bibdk_holding_material_is_home';\n }\n else if (!$this->isItHome() && $this->getExpectedDelivery()) {\n $return['message'] = 'bibdk_holding_material_will_be_home @date';\n $return['options'] = array('@date' => format_date($this->getExpectedDelivery(), 'custom', 'd.m.Y'));\n }\n else if ($note = $this->hasNote()){\n $return['message'] = $note;\n }\n else if ($error = $this->getErrorMessage()) {\n $return['message'] = $error;\n }\n else {\n $return['message'] = 'bibdk_holding_someting_went_wrong';\n }\n\n return $return;\n }",
"public function lang(): string;",
"function _text($str) {\n $md5 = md5($str);\n $option_name = get_text_translation_option_name( $md5 );\n $org = esc_html($str);\n\n if ( !isset($_COOKIE['site-edit']) || $_COOKIE['site-edit'] != 'Y' || ! user()->admin() ) {\n $str = _getText($str, true);\n echo $str;\n }\n else {\n $str = _getText($str);\n echo \"\n<div class='translate-text' md5='$md5' original-text='$org' code='$option_name'><span class='dashicons dashicons-welcome-write-blog'></span>\n<div class='html-content'>$str</div>\n</div>\n\";\n }\n\n}",
"public static function getCommonErrorText()\n\t{\n\t\t$text = 'I don\\'t understand what are you want for me!';\n\t\t$text .= PHP_EOL . PHP_EOL;\n\t\t$text .= 'Start our campaign by by pressing \"Start campaign\" first if you still did not ';\n\t\t$text .= 'or just follow previous instructions carefully';\n\t\t\n\t\treturn $text;\n\t}",
"function ctools_node_language_ctools_acesss_summary($conf, $context) {\n $languages = array(\n 'current' => t('Current site language'),\n 'default' => t('Default site language'),\n 'no_language' => t('No language'),\n );\n $languages = array_merge($languages, locale_language_list());\n\n if (!isset($conf['language'])) {\n $conf['language'] = array();\n }\n\n $names = array();\n foreach (array_filter($conf['language']) as $language) {\n $names[] = $languages[$language];\n }\n\n if (empty($names)) {\n return t('@identifier is in any language', array('@identifier' => $context->identifier));\n }\n\n return format_plural(count($names), '@identifier language is \"@languages\"', '@identifier language is one of \"@languages\"', array('@languages' => implode(', ', $names), '@identifier' => $context->identifier));\n}",
"public function get_language()\n {\n }",
"public function getHeaderText()\r\n {\r\n $helper = Mage::helper('link');\r\n $model = Mage::registry('link_model');\r\n\r\n if ($model && $model->getId()) {\r\n return $helper->__('Edit Link');\r\n } else {\r\n return $helper->__('New Block');\r\n }\r\n }",
"public function getText(){\n return $this->TEXT;\n }",
"function get_lib_contenance(){\n return $this->contenance.\" L\";\n }",
"public function description() {\n return $this->t('I am garlic sandwich.');\n }",
"protected function get_description()\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 );\n\t\t}\n\t\treturn NULL;\n\t}",
"public function content() {\n return array(\n '#type' => 'markup',\n '#markup' => t('Hello world'),\n );\n }",
"function get_text($id, $language = '', $default = '')\n{\n if (empty($language))\n $language = get_config('language', 'main');\n\n $__langs__ = $GLOBALS[\"__LANGUAGE__{$language}__\"];\n\n return isset($__langs__[strtolower($id)]) ? __replace_cfgs($__langs__[strtolower($id)], 0, $language) : $default;\n}",
"public function getHeaderText()\n {\n return Mage::helper('jaro_bibleteacher')->__('Bible');\n }",
"function help()\n\t{\n\t\t$help['b'] = array();\n\t\t$help['i'] = array();\n\t\t\n\t\t$help['b'][] = 'Laisser une ligne vide entre chaque bloc <em>de même nature</em>.';\n\t\t$help['b'][] = '<strong>Paragraphe</strong> : du texte et une ligne vide';\n\t\t\n\t\tif ($this->getOpt('active_title')) {\n\t\t\t$help['b'][] = '<strong>Titre</strong> : <code>!!!</code>, <code>!!</code>, '.\n\t\t\t'<code>!</code> pour des titres plus ou moins importants';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_hr')) {\n\t\t\t$help['b'][] = '<strong>Trait horizontal</strong> : <code>----</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_lists')) {\n\t\t\t$help['b'][] = '<strong>Liste</strong> : ligne débutant par <code>*</code> ou '.\n\t\t\t'<code>#</code>. Il est possible de mélanger les listes '.\n\t\t\t'(<code>*#*</code>) pour faire des listes de plusieurs niveaux. '.\n\t\t\t'Respecter le style de chaque niveau';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_pre')) {\n\t\t\t$help['b'][] = '<strong>Texte préformaté</strong> : espace devant chaque ligne de texte';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_quote')) {\n\t\t\t$help['b'][] = '<strong>Bloc de citation</strong> : <code>></code> ou '.\n\t\t\t'<code>;:</code> devant chaque ligne de texte';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_fr_syntax')) {\n\t\t\t$help['i'][] = 'La correction de ponctuation est active. Un espace '.\n\t\t\t\t\t\t'insécable remplacera automatiquement tout espace '.\n\t\t\t\t\t\t'précédant les marques \";\",\"?\",\":\" et \"!\".';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_em')) {\n\t\t\t$help['i'][] = '<strong>Emphase</strong> : deux apostrophes <code>\\'\\'texte\\'\\'</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_strong')) {\n\t\t\t$help['i'][] = '<strong>Forte emphase</strong> : deux soulignés <code>__texte__</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_br')) {\n\t\t\t$help['i'][] = '<strong>Retour forcé à la ligne</strong> : <code>%%%</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_ins')) {\n\t\t\t$help['i'][] = '<strong>Insertion</strong> : deux plus <code>++texte++</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_del')) {\n\t\t\t$help['i'][] = '<strong>Suppression</strong> : deux moins <code>--texte--</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_urls')) {\n\t\t\t$help['i'][] = '<strong>Lien</strong> : <code>[url]</code>, <code>[nom|url]</code>, '.\n\t\t\t'<code>[nom|url|langue]</code> ou <code>[nom|url|langue|titre]</code>.';\n\t\t\t\n\t\t\t$help['i'][] = '<strong>Image</strong> : comme un lien mais avec une extension d\\'image.'.\n\t\t\t'<br />Pour désactiver la reconnaissance d\\'image mettez 0 dans un dernier '.\n\t\t\t'argument. Par exemple <code>[image|image.gif||0]</code> fera un lien vers l\\'image au '.\n\t\t\t'lieu de l\\'afficher.'.\n\t\t\t'<br />Il est conseillé d\\'utiliser la nouvelle syntaxe.';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_img')) {\n\t\t\t$help['i'][] = '<strong>Image</strong> (nouvelle syntaxe) : '.\n\t\t\t'<code>((url|texte alternatif))</code>, '.\n\t\t\t'<code>((url|texte alternatif|position))</code> ou '.\n\t\t\t'<code>((url|texte alternatif|position|description longue))</code>. '.\n\t\t\t'<br />La position peut prendre les valeur L ou G (gauche), R ou D (droite) ou C (centré).';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_anchor')) {\n\t\t\t$help['i'][] = '<strong>Ancre</strong> : <code>~ancre~</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_acronym')) {\n\t\t\t$help['i'][] = '<strong>Acronyme</strong> : <code>??acronyme??</code> ou '.\n\t\t\t'<code>??acronyme|titre??</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_q')) {\n\t\t\t$help['i'][] = '<strong>Citation</strong> : <code>{{citation}}</code>, '.\n\t\t\t'<code>{{citation|langue}}</code> ou <code>{{citation|langue|url}}</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_code')) {\n\t\t\t$help['i'][] = '<strong>Code</strong> : <code>@@code ici@@</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_footnotes')) {\n\t\t\t$help['i'][] = '<strong>Note de bas de page</strong> : <code>$$Corps de la note$$</code>';\n\t\t}\n\t\t\n\t\t$res = '<dl class=\"wikiHelp\">';\n\t\t\n\t\t$res .= '<dt>Blocs</dt><dd>';\n\t\tif (count($help['b']) > 0)\n\t\t{\n\t\t\t$res .= '<ul><li>';\n\t\t\t$res .= implode(' ;</li><li>', $help['b']);\n\t\t\t$res .= '.</li></ul>';\n\t\t}\n\t\t$res .= '</dd>';\n\t\t\n\t\t$res .= '<dt>Éléments en ligne</dt><dd>';\n\t\tif (count($help['i']) > 0)\n\t\t{\n\t\t\t$res .= '<ul><li>';\n\t\t\t$res .= implode(' ;</li><li>', $help['i']);\n\t\t\t$res .= '.</li></ul>';\n\t\t}\n\t\t$res .= '</dd>';\n\t\t\n\t\t$res .= '</dl>';\n\t\t\n\t\treturn $res;\t\n\t}",
"public function action_block_content_text( $block, $theme )\n\t{\n\t\treturn $block;\n\t}",
"public function getDefaultText()\n\t{\n\t\treturn $this->getViewState('DefaultText','');\n\t}",
"public function show()\n {\n //\n return 'Rosie can i have a dance';\n }",
"public function getReplacementText();",
"public function getDescription(): string;",
"public function getDescription(): string;",
"public function getDescription(): string;",
"public function getDescription(): string;",
"public function getDescription(): string;",
"public function getDescription(): string;",
"function subraya($text){\r\n return \"<u>$text</u>\";\r\n }",
"public function getDefaultContent(): string;",
"public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nAdvanced Collections in C#\nMAINHEADING;\n }",
"function MY_VERY_OWN_OM_Text($attr, $content = null) {\n\n\t$result = '<div style=\"display: flex; padding: 0px;\"><div class=\"oldEnglish\"><b><font color=\"gray\">ORIGINAL TEXT</font></b></div><div class=\"newEnglish\"><b><font color=\"gray\">MODERN TEXT</font></b></div></div>';\t\n\treturn $result;\n}",
"public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new \\BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['unsubscribe'][0]) . ' ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\t$this->nl_channels = deserialize($this->nl_channels);\n\n\t\t// Return if there are no channels\n\t\tif (!is_array($this->nl_channels) || count($this->nl_channels) < 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\treturn parent::generate();\n\t}",
"public function translated();",
"public function translated();"
] | [
"0.6035981",
"0.60063654",
"0.600208",
"0.5985686",
"0.5969547",
"0.5969547",
"0.5955295",
"0.5939409",
"0.5937101",
"0.5904537",
"0.58785474",
"0.5861015",
"0.5791256",
"0.5782372",
"0.5731492",
"0.57226825",
"0.5713832",
"0.57113844",
"0.57113844",
"0.57113844",
"0.5700249",
"0.5700211",
"0.5669656",
"0.5665315",
"0.5651882",
"0.564304",
"0.5624798",
"0.5621062",
"0.56067336",
"0.559496",
"0.5587638",
"0.55719745",
"0.5552723",
"0.5549089",
"0.553677",
"0.5534037",
"0.5526627",
"0.552412",
"0.5524063",
"0.5518115",
"0.5507468",
"0.5492349",
"0.5489347",
"0.54730254",
"0.54726654",
"0.5467527",
"0.5443213",
"0.5430802",
"0.5426401",
"0.54233533",
"0.5418001",
"0.54165405",
"0.5416438",
"0.5415498",
"0.5414711",
"0.5404485",
"0.5403333",
"0.53966856",
"0.5386947",
"0.5385489",
"0.5382383",
"0.53817165",
"0.5376864",
"0.53766614",
"0.5370667",
"0.537052",
"0.5367523",
"0.53609365",
"0.5358638",
"0.535305",
"0.53493273",
"0.534608",
"0.53444004",
"0.53443015",
"0.53369564",
"0.5335408",
"0.5333836",
"0.53336775",
"0.533201",
"0.53276587",
"0.53253883",
"0.53203887",
"0.53200376",
"0.5316115",
"0.5315618",
"0.5303279",
"0.53018737",
"0.5299124",
"0.5294132",
"0.5294132",
"0.5294132",
"0.5294132",
"0.5294132",
"0.5294132",
"0.5294079",
"0.5292298",
"0.52878505",
"0.52838707",
"0.5282972",
"0.52808124",
"0.52808124"
] | 0.0 | -1 |
List of conversion methods that require additional information | public static function checkConf()
{
return array( 'convert_attachments' );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getSupportedMethods(): array {}",
"public static function getAvailableConverters()\n {\n return [\n 'cwebp', 'vips', 'imagick', 'gmagick', 'imagemagick', 'graphicsmagick', 'wpc', 'ewww', 'gd'\n ];\n }",
"protected static function getNonEnumValueMethods(){\n\t\treturn array(\n\t\t\t'values',\n\t\t\t'valueOf' \n\t\t);\n\t}",
"public function mt_supportedMethods()\n {\n }",
"protected static function __getTypeHintAbleMethods()\n {\n return [];\n }",
"public function MethodExpectedSystemExtensionProvider()\n {\n return array(\n array(new Method(iconv('UTF-8', 'ASCII', 'rpc.system.date'))),\n array(new Method(iconv('UTF-8', 'ASCII', 'rpc.foo.bar'))),\n array(new Method(iconv('UTF-8', 'ASCII', 'rpc.foo'))),\n array(new Method('\"rpc\\u002Esystem\\u002Edate\"')),\n array(new Method('\"rpc\\u002Efoo\\u002Ebar\"')),\n array(new Method('\"rpc\\u002Efoo\"')),\n );\n }",
"public function getSupportedExtensions()\n {\n return array_keys($this->convertersByExtension);\n }",
"public static function canConvert()\n\t{\n\t\treturn array(\n\t\t\t'convert_forums_forums'\t=> array(\n\t\t\t\t'table'\t\t=> 'forum',\n\t\t\t\t'where'\t\t=> NULL,\n\t\t\t),\n\t\t\t'convert_forums_topics'\t=> array(\n\t\t\t\t'table'\t\t=> 'thread',\n\t\t\t\t'where'\t\t=> NULL,\n\t\t\t),\n\t\t\t'convert_forums_posts'\t=> array(\n\t\t\t\t'table'\t\t=> 'post',\n\t\t\t\t'where'\t\t=> NULL,\n\t\t\t),\n\t\t\t'convert_attachments'\t=> array(\n\t\t\t\t'table'\t\t=> 'attachment',\n\t\t\t\t'where'\t\t=> NULL\n\t\t\t)\n\t\t);\n\t}",
"static public function validMethodProvider()\n {\n return array(\n array('GET'),\n array('TRACE'),\n array('PROPFIND'),\n array('MKCOL'),\n array('X-MS-ENUMATTS'),\n );\n }",
"public static function canConvert()\n\t{\n\t\t/* Child classes must override this method */\n\t\tthrow new \\BadMethodCallException( 'nothing_to_convert' );\n\t}",
"public static function getSupportedMethods()\n {\n return [\n ];\n }",
"public static function getSupportedMethods()\n {\n return [\n ];\n }",
"public static function getSupportedMethods()\n {\n return [\n ];\n }",
"public function supportedFormats();",
"public function convert();",
"abstract protected function doActualConvert();",
"public function checkConvertability()\n {\n }",
"public static function get_supported_methods() {\n\t\treturn self::$supported_methods;\n\t}",
"public function MethodDecodeExpectedProvider()\n {\n return array(\n array(new Method('subtract'), '\"subtract\"'),\n array(new Method('update'), '\"update\"'),\n array(new Method('foobar'), '\"foobar\"'),\n );\n }",
"public function converterDetails()\n {\n return [\n 'name' => 'Unknown',\n 'description' => 'Unknown conversion service.'\n ];\n }",
"private function registerAttributeCastingList(): void\n {\n // Loops through all the class' methods, and loads the necessary ones in\n // the corresponding containers.\n foreach (\\get_class_methods($this) as $method) {\n // Loads casting mutators.\n if (\\strpos($method, self::$CASTPREFIX) === 0 && \\strlen($method) > \\strlen(self::$CASTPREFIX)) {\n $this->castList[] = $method;\n }\n }\n }",
"function getTypeConverter() ;",
"function methods()\n\t{\n\t\t$methods = array();\n\t\t$disabled_functions = explode(',', @ini_get('disable_functions'));\n\n\t\tif (@extension_loaded('ftp'))\n\t\t{\n\t\t\t$methods[] = 'ftp';\n\t\t}\n\n\t\tif (!in_array('fsockopen', $disabled_functions))\n\t\t{\n\t\t\t$methods[] = 'ftp_fsock';\n\t\t}\n\n\t\treturn $methods;\n\t}",
"private function getRuleToMethodMapping() {\n return array(\n 'compare_vowels' => \"applyCompareVowels\",\n 'arrr_bacon' => \"applyArrrBacon\",\n \"bacon_arrr\" => \"applyBaconArrr\",\n \"pattern\" => \"applyPattern\",\n \"match_making\" => \"applyMatchMaking\"\n );\n }",
"public static function supportedMethods()\n {\n return static::$supportedMethods;\n }",
"abstract protected function getConverterFactory();",
"public function applicable_formats() {\n return array('all'=>true);\n }",
"public function getAcceptExtensions();",
"abstract protected function getSupportedClasses();",
"function get_class_methods() {\n\t\t$args = func_get_args();\n\t\t$result=call_user_func_array(\"get_class_methods\", $args);\n\t\tif (is_array($result))\n\t\t\tforeach ($result as $key=>$value) {\n\t\t\t\t$result[$key]=strtolower($value);\n\t\t\t}\n\t\treturn $result;\n\t}",
"public abstract function getFieldConverterClass();",
"public function supports($method = '');",
"public function getExportFormats(): array;",
"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 function conversionTestingDataProvider() {}",
"public function getMethods(): array;",
"public function getMethods(): array;",
"public abstract function get_supported_datatypes();",
"function applicable_formats() {\n return array('all' => true);\n }",
"public function get_selector_conversion_mapping() {\n\t\treturn [];\n\t}",
"function applicable_formats()\r\n\t\t{\r\n\t\t\treturn array('all' => true);\r\n\t\t}",
"public static function canConvert()\n\t{\n\t\treturn array(\n\t\t\t'convert_cms_pages' => array(\n\t\t\t\t'table'\t\t\t\t=> 'xf_page',\n\t\t\t\t'where'\t\t\t\t=> NULL,\n\t\t\t)\n\t\t);\n\t}",
"public function applicable_formats() {\n return array('my' => true);\n }",
"function getSupportedSourceTypes() ;",
"public function getMethodDescriptors(): array;",
"public static function getSupportedOperators()\n {\n return \\array_keys(self::$transOpStr);\n }",
"public static function getDocumentMagicMethods() {}",
"public function getMethods();",
"public function getMethods();",
"public function getMethods();",
"private function getMethodClassMap()\n {\n return [\n 'account_channels' => \\XRPHP\\Api\\Anon\\Account\\AccountChannelsMethod::class,\n 'account_currencies' => \\XRPHP\\Api\\Anon\\Account\\AccountCurrenciesMethod::class,\n 'account_info' => \\XRPHP\\Api\\Anon\\Account\\AccountInfoMethod::class,\n 'account_lines' => \\XRPHP\\Api\\Anon\\Account\\AccountLinesMethod::class,\n 'account_objects' => \\XRPHP\\Api\\Anon\\Account\\AccountObjectsMethod::class,\n 'account_offers' => \\XRPHP\\Api\\Anon\\Account\\AccountOffersMethod::class,\n 'account_tx' => \\XRPHP\\Api\\Anon\\Account\\AccountTxMethod::class,\n 'gateway_balances' => \\XRPHP\\Api\\Anon\\Account\\GatewayBalancesMethod::class,\n 'noripple_check' => \\XRPHP\\Api\\Anon\\Account\\NorippleCheckMethod::class,\n 'ledger' => \\XRPHP\\Api\\Anon\\Ledger\\LedgerMethod::class,\n 'ledger_closed' => \\XRPHP\\Api\\Anon\\Ledger\\LedgerClosedMethod::class,\n 'ledger_current' => \\XRPHP\\Api\\Anon\\Ledger\\LedgerCurrentMethod::class,\n 'ledger_data' => \\XRPHP\\Api\\Anon\\Ledger\\LedgerDataMethod::class,\n 'ledger_entry' => \\XRPHP\\Api\\Anon\\Ledger\\LedgerEntryMethod::class,\n 'sign' => \\XRPHP\\Api\\Anon\\Transaction\\SignMethod::class,\n 'sign_for' => \\XRPHP\\Api\\Anon\\Transaction\\SignForMethod::class,\n 'submit' => \\XRPHP\\Api\\Anon\\Transaction\\SubmitMethod::class,\n 'submit_multisigned' => \\XRPHP\\Api\\Anon\\Transaction\\SubmitMultisignedMethod::class,\n 'transaction_entry' => \\XRPHP\\Api\\Anon\\Transaction\\TransactionEntryMethod::class,\n 'tx' => \\XRPHP\\Api\\Anon\\Transaction\\TxMethod::class,\n 'book_offers' => \\XRPHP\\Api\\Anon\\PathOrderBook\\BookOffersMethod::class,\n 'ripple_path_find' => \\XRPHP\\Api\\Anon\\PathOrderBook\\RipplePathFindMethod::class,\n 'channel_authorize' => \\XRPHP\\Api\\Anon\\PaymentChannel\\ChannelAuthorizeMethod::class,\n 'channel_verify' => \\XRPHP\\Api\\Anon\\PaymentChannel\\ChannelVerifyMethod::class,\n 'fee' => \\XRPHP\\Api\\Anon\\ServerInfo\\FeeMethod::class,\n 'server_info' => \\XRPHP\\Api\\Anon\\ServerInfo\\ServerInfoMethod::class,\n 'server_state' => \\XRPHP\\Api\\Anon\\ServerInfo\\ServerStateMethod::class,\n 'ping' => \\XRPHP\\Api\\Anon\\Utility\\PingMethod::class,\n 'random' => \\XRPHP\\Api\\Anon\\Utility\\RandomMethod::class\n ];\n }",
"protected function getSupportedFunctionNames() {\n return self::supportedFunctions;\n }",
"protected function getSupportedFunctionNames() {\n return self::supportedFunctions;\n }",
"protected function getSupportedFunctionNames() {\n return self::supportedFunctions;\n }",
"public function getMethods($class);",
"public function extensions();",
"public static function getAvailableMethods(): array\n {\n return array_diff(\n get_class_methods(static::class), // Custom methods\n get_class_methods(self::class), // Basic methods\n ['query'] // Except methods\n );\n }",
"public function getImplementedMethods() {\n\n $supported_methods = $this->getConfiguration()->get('supported-http-methods');\n\n if ( is_null($supported_methods) ) $supported_methods = self::$supported_methods;\n\n if ( method_exists($this, 'any') ) {\n\n return $supported_methods;\n\n }\n\n $implemented_methods = [];\n\n foreach ( $supported_methods as $method ) {\n\n if ( method_exists($this, strtolower($method)) ) array_push($implemented_methods, $method);\n\n }\n\n return $implemented_methods;\n\n }",
"private function getAvailableFormats()\n {\n return array(\n 'tab',\n 'xml',\n 'json',\n 'perl',\n 'php',\n 'vaml',\n 'html',\n );\n }",
"static function getmethods() {\n $a_methods = call_user_func(array('PluginFusioninventoryStaticmisc', 'task_methods'));\n $a_modules = PluginFusioninventoryModule::getAll();\n foreach ($a_modules as $data) {\n if (is_callable(array('Plugin'.ucfirst($data['directory']).'Staticmisc', 'task_methods'))) {\n $a_methods = array_merge($a_methods, \n call_user_func(array('Plugin'.ucfirst($data['directory']).'Staticmisc', 'task_methods')));\n }\n }\n return $a_methods;\n }",
"protected abstract function operatorTypes();",
"public static function getFormats() {\n return array(\n 'none',\n 'pretty',\n 'php',\n 'php-data',\n 'json-pretty',\n 'json-strict',\n 'serialize',\n 'shell',\n );\n }",
"public function extensions(): array;",
"function supports($format);",
"public function getSupportedFormats()\n {\n return array('json', 'xml');\n }",
"public function getAdapterMethod();",
"public function getValueFormatersNames(): array;",
"abstract public function convert($param1, $param2);",
"public function getMethods() {\n $list = array();\n $functions = $this->get('function');\n if (null != $functions) {\n foreach ($functions as $function) {\n $name = $function->getName();\n if ('__construct' != $name && $this->getName() != $name) {\n if ($function->accept()) {\n $list[] = $function;\n }\n }\n }\n }\n return $list;\n }",
"public function get_selector_conversion_mapping() {\n\t\treturn [\n\t\t\t'video' => [ 'amp-video', 'amp-youtube' ],\n\t\t];\n\t}",
"public function getSupportedSourceTypes() {}",
"function applicable_formats() {\n return array('course-view-wiki' => true, 'mod-wiki' => true);\n }",
"public function compatibility() : array;",
"public function getSupportedMimeTypes()\n {\n return array_keys($this->convertersByMimeType);\n }",
"public function getAllowedMethods()\n {\n return [$this->_code => __($this->getConfigData(self::SHIPPING_NAME))];\n }",
"public function get_supported_extensions() {\n return array();\n }",
"public function getFormat(): array;",
"protected function getAllAvailableMethods()\n {\n /* TODO get all available payment methods from toolbox */\n }",
"public function getMatchableExtensions();",
"public function getExtensions() {}",
"public function getExtensions() {}",
"protected function getCharsetConversion() {}",
"public function getMethods()\r\n {\r\n return $this->validMethods;\r\n }",
"protected function _getMethods()\n {\n $reflect = new ReflectionClass($this);\n $list = array();\n $methods = $reflect->getMethods();\n foreach ($methods as $method) {\n $name = $method->getName();\n if (substr($name, 0, 5) == 'bench') {\n $list[] = $name;\n }\n }\n return $list;\n }",
"public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'classification' => fn(ParseNode $n) => $o->setClassification($n->getEnumValue(WindowsQualityUpdateClassification::class)),\n 'isExpeditable' => fn(ParseNode $n) => $o->setIsExpeditable($n->getBooleanValue()),\n 'kbArticleId' => fn(ParseNode $n) => $o->setKbArticleId($n->getStringValue()),\n ]);\n }",
"public function getValidExtensions();",
"public function getMediaConversionNames(): array\n {\n $conversions = ConversionCollection::createForMedia($this);\n\n return $conversions->map(function (Conversion $conversion) {\n return $conversion->getName();\n })->toArray();\n }",
"public function getFunctions()\n {\n return array(\n 'date_format' => new \\Twig_Function_Method($this, 'getDateFormat'),\n 'date_time_format' => new \\Twig_Function_Method($this, 'getDateTimeFormat'),\n );\n }",
"public function registerMediaConversions(): void\n {\n $this->addMediaConversion(self::MEDIA_AVATAR_CONVERSION)\n ->performOnCollections(self::MEDIA_AVATARS_COLLECTION)\n ->width(self::MEDIA_AVATAR_SIZE)\n ->height(self::MEDIA_AVATAR_SIZE)\n ->optimize();\n }",
"public function applicable_formats() {\n return array('site-index' => true, 'course-view-*' => true);\n }",
"public function getSupportedFileExtensions() {}",
"protected function getAcceptedExtensions(): array\n {\n return array_keys($this->getConfigResolverAdapters());\n }",
"static function get_allowable_export_formats() {\n //currently, only PDF and CSV export formats are fully implemented\n return array(php_report::$EXPORT_FORMAT_PDF,\n php_report::$EXPORT_FORMAT_CSV);\n }",
"function populate_method_info() {\n\n $method_info = array();\n\n // get functions\n $all_functions = get_defined_functions();\n $internal_functions = $all_functions[\"internal\"];\n\n foreach ($internal_functions as $function) {\n // populate new method record\n $function_record = array();\n $function_record[CLASS_NAME] = \"Function\";\n $function_record[METHOD_NAME] = $function;\n $function_record[IS_TESTED] = \"no\";\n $function_record[TESTS] = \"\";\n $function_record[IS_DUPLICATE] = false;\n\n // record the extension that the function belongs to\n $reflectionFunction = new ReflectionFunction($function);\n $extension = $reflectionFunction->getExtension();\n if ($extension != null) {\n $function_record[EXTENSION_NAME] = $extension->getName();\n } else {\n $function_record[EXTENSION_NAME] = \"\";\n }\n // insert new method record into info array\n $method_info[] = $function_record;\n }\n\n // get methods\n $all_classes = get_declared_classes();\n foreach ($all_classes as $class) {\n $reflectionClass = new ReflectionClass($class);\n $methods = $reflectionClass->getMethods();\n foreach ($methods as $method) {\n // populate new method record\n $new_method_record = array();\n $new_method_record[CLASS_NAME] = $reflectionClass->getName();\n $new_method_record[METHOD_NAME] = $method->getName();\n $new_method_record[IS_TESTED] = \"no\";\n $new_method_record[TESTS] = \"\";\n\n $extension = $reflectionClass->getExtension();\n if ($extension != null) {\n $new_method_record[EXTENSION_NAME] = $extension->getName();\n } else {\n $new_method_record[EXTENSION_NAME] = \"\";\n }\n\n // check for duplicate method names\n $new_method_record[IS_DUPLICATE] = false;\n foreach ($method_info as &$current_record) {\n if (strcmp($current_record[METHOD_NAME], $new_method_record[METHOD_NAME]) == 0) {\n $new_method_record[IS_DUPLICATE] = true;\n $current_record[IS_DUPLICATE] = true;\n }\n }\n // insert new method record into info array\n $method_info[] = $new_method_record;\n }\n }\n\n return $method_info;\n}",
"function conversionRequired()\n {\n return $this->RequireConversion;\n }",
"public function serializers()\n {\n // Each entry represents a function call.\n return array(\n // Each entry represents an argument for the function call.\n array(new \\Nayru\\Serializer\\JsonConf),\n array(new \\Nayru\\Serializer\\Php)\n );\n }",
"public function get_desired_types();",
"public function getExtensions(): array;",
"public function getAllowedMethods()\n {\n return ['loomisrate' => __('Loomis')];\n }",
"public function dataTypeMap()\n {\n return config('codegenerator.eloquent_type_to_method');\n }",
"public function getSupportedTransformationClasses() {\n return [\n PagingTransformation::class,\n FilterTransformation::class,\n MultiSortTransformation::class,\n SummariseTransformation::class,\n JoinTransformation::class\n ];\n }"
] | [
"0.6111942",
"0.5987856",
"0.59049684",
"0.5877206",
"0.578705",
"0.5773593",
"0.5754583",
"0.5752932",
"0.57480043",
"0.5718193",
"0.5652733",
"0.5652733",
"0.5652733",
"0.55828595",
"0.5549828",
"0.5540852",
"0.55265826",
"0.55206674",
"0.5460336",
"0.54340875",
"0.5399659",
"0.53931516",
"0.5352157",
"0.53326136",
"0.5308664",
"0.5301684",
"0.52854276",
"0.5284903",
"0.52749366",
"0.5264707",
"0.52467257",
"0.52261657",
"0.5211033",
"0.51924646",
"0.51874655",
"0.51827794",
"0.51827794",
"0.5181487",
"0.5152553",
"0.51330274",
"0.51312095",
"0.5119482",
"0.5119187",
"0.51151377",
"0.5108323",
"0.5096945",
"0.5079762",
"0.5079582",
"0.5079582",
"0.5079582",
"0.5071569",
"0.50707865",
"0.50707865",
"0.50707865",
"0.5053722",
"0.503946",
"0.50286984",
"0.5011967",
"0.500877",
"0.50082344",
"0.49950793",
"0.49901447",
"0.4978796",
"0.4976155",
"0.49585488",
"0.49550432",
"0.49488524",
"0.4942454",
"0.49384108",
"0.492321",
"0.49178296",
"0.49176088",
"0.49138916",
"0.49121797",
"0.4906877",
"0.48925862",
"0.48899734",
"0.48726934",
"0.48699164",
"0.48654056",
"0.48644713",
"0.48641297",
"0.4863297",
"0.48473498",
"0.4844594",
"0.48373127",
"0.48314095",
"0.48246393",
"0.48241165",
"0.4823241",
"0.48193774",
"0.4819128",
"0.48112684",
"0.4810519",
"0.4810429",
"0.4796114",
"0.47932196",
"0.47929943",
"0.479022",
"0.4787231",
"0.47810295"
] | 0.0 | -1 |
Helper method to retrieve forums from nodes | protected function fetchForums()
{
$forums = array();
foreach( $this->db->select( '*', 'node', array( "node.nodeid<>2 AND closure.parent=? AND node.contenttypeid=?", $this->fetchType( 'Thread' ), $this->fetchType( 'Channel' ) ) )->join( 'closure', "closure.child = node.nodeid" ) AS $node )
{
$forums[$node['nodeid']] = $node;
}
return $forums;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_forum_list() {\n return $this->call('get_forum_list');\n }",
"public function forumNode()\n {\n if (!$this->forumNode)\n {\n $this->forumNode = eZContentObjectTreeNode::fetch(\n $this->attribute('node_id'),\n $this->languageCode()\n );\n }\n return $this->forumNode;\n }",
"public function get_forum() { // Declare \\Markguyver\\LivefyreImporter\\Data\\Livefyre\\Conversation->get_forum() function\n\t\t\treturn $this->forum;\n\t\t}",
"public function getAllForums() : array\r\n {\r\n // $result = $getAPI->getAllForums();\r\n\r\n $postdata = http_build_query(\r\n array(\r\n 'token' => $this->config['app-token'],\r\n 'getForumName' => $this->getForumName\r\n )\r\n );\r\n $opts = array('http' =>\r\n array(\r\n 'method' => 'POST',\r\n 'header' => 'Content-Type: application/x-www-form-urlencoded',\r\n 'content' => $postdata\r\n )\r\n );\r\n $context = stream_context_create($opts);\r\n $result = file_get_contents($this->config['endPoint'] .'GetAllForums', true, $context);\r\n\r\n $data = json_decode($result, true);\r\n if($data['statusCode'] == 'SUCCESS'){\r\n //TODO create message or change page locations\r\n return $data;\r\n }\r\n else if($data['statusCode'] == 'INVALID_TOKEN'){\r\n return [\"message\" => \"there was a problem with your request please contact system administrator.\"];\r\n }\r\n else{\r\n //TODO throw error with end user message\r\n return [\"message\" => \"there was a error processing your request please contact system administrator.\"];\r\n }\r\n }",
"public function getForumList() : array\r\n {\r\n $postdata = http_build_query(\r\n array(\r\n 'token' => $this->config['app-token'],\r\n 'getForumName' => $this->getForumName\r\n )\r\n );\r\n $opts = array('http' =>\r\n array(\r\n 'method' => 'POST',\r\n 'header' => 'Content-Type: application/x-www-form-urlencoded',\r\n 'content' => $postdata\r\n )\r\n );\r\n $context = stream_context_create($opts);\r\n $result = file_get_contents($this->config['endPoint'] .'GetForumList', true, $context);\r\n\r\n $data = json_decode($result, true);\r\n if($data['statusCode'] == 'SUCCESS'){\r\n //TODO create message or change page locations\r\n return $data;\r\n }\r\n else if($data['statusCode'] == 'INVALID_TOKEN'){\r\n return [\"message\" => \"there was a problem with your request please contact system administrator.\"];\r\n }\r\n else{\r\n //TODO throw error with end user message\r\n return [\"message\" => \"there was a error processing your request please contact system administrator.\"];\r\n }\r\n }",
"public function getForum()\n {\n // get articles\n $articles = Article::orderBy('updated_at', 'desc')->take(10)->get();\n\n // return view with articles\n return view('articles.forum', [\n 'articles' => $articles,\n 'article_type_hash' => $this->article_type_hash,\n ]);\n }",
"function Forum_showForums(&$PAGEDATA, &$forums) {\n\t$c='<div class=\"forums-list\"><div class=\"forums-list-intro\">'\n\t\t.'Forums on this page</div>';\n\tforeach($forums as $forum) {\n\t\t$c.='<div class=\"forum-forum\">'\n\t\t\t.'<a href=\"'.$PAGEDATA->getRelativeURL.'?forum-f='.$forum['id'].'\">'\n\t\t\t\t.$forum['name'].'</a></div>';\n\t}\n\t$c.='</div>';\n\treturn $c;\n}",
"function asForumTopics($data) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<tr class='__topic __tid{$data['tid']} <if test=\"!$data['_icon']['is_read']\">unread</if> expandable <if test=\"$data['approved'] != 1\"> moderated</if>' id='trow_{$data['tid']}' data-tid=\"{$data['tid']}\">\n\t<td class='col_f_icon short altrow'>\n\t\t{parse template=\"generateTopicIcon\" group=\"global_other\" params=\"$data['_icon'], $data['_unreadUrl']\"}\n\t</td>\n\t<td>\n\t\t<if test=\"archivedBadge:|:$this->registry->class_forums->fetchArchiveTopicType( $data ) == 'archived'\">\n\t\t\t<span class='ipsBadge ipsBadge_lightgrey'>{$this->lang->words['topic_is_archived']}</span>\n\t\t</if>\n\t\t<if test=\"hasPrefix:|:!empty($data['tags']['formatted']['prefix'])\">\n\t\t\t{$data['tags']['formatted']['prefix']}\n\t\t</if>\n\t\t<h4><a href='{parse url=\"showtopic={$data['tid']}<if test=\"isNewPostTR:|:$this->request['do']=='new_posts' OR $this->request['do']=='active'\">&view=getnewpost<else /><if test=\"resultIsPostTR:|:$data['pid'] AND $data['pid'] != $data['topic_firstpost']\">&view=findpost&p={$data['pid']}</if></if>&hl={$data['cleanSearchTerm']}\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['view_result']}'>{$data['_shortTitle']}</a></h4>\n\t\t<span class='desc blend_links'>\n\t\t\t<foreach loop=\"topicsForumTrail:$data['_forum_trail'] as $i => $f\">\n\t\t\t<if test=\"notLastFtAsForum:|:$i+1 == count( $data['_forum_trail'] )\"><span class='desc lighter'>{$this->lang->words['search_aft_in']}</span> <a href='{parse url=\"{$f[1]}\" template=\"showforum\" seotitle=\"{$f[2]}\" base=\"public\"}'>{$f[0]}</a></if>\n\t\t\t</foreach>\n\t\t</span>\n\t\t<span class='desc lighter blend_links toggle_notify_off'>\n\t\t\t<br />{$this->lang->words['aft_started_by']} {$data['starter']}, {parse date=\"$data['start_date']\" format=\"DATE\"}\n\t\t\t<if test=\"hasTags:|:count($data['tags']['formatted'])\">\n\t\t\t\t <img src='{$this->settings['img_url']}/icon_tag.png' /> {$data['tags']['formatted']['truncatedWithLinks']}\n\t\t\t</if>\n\t\t</span>\n\t\t<if test=\"multipages:|:isset( $data['pages'] ) AND is_array( $data['pages'] ) AND count( $data['pages'] )\">\n\t\t\t<ul class='mini_pagination toggle_notify_off'>\n\t\t\t<foreach loop=\"pages:$data['pages'] as $page\">\n\t\t\t\t\t<if test=\"haslastpage:|:$page['last']\">\n\t\t\t\t\t\t<li><a href=\"{parse url=\"showtopic={$data['tid']}&st={$page['st']}\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}\" title='{$this->lang->words['topic_goto_page']} {$page['page']}'>{$page['page']} {$this->lang->words['_rarr']}</a></li>\n\t\t\t\t\t<else />\n\t\t\t\t\t\t<li><a href=\"{parse url=\"showtopic={$data['tid']}&st={$page['st']}\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}\" title='{$this->lang->words['topic_goto_page']} {$page['page']}'>{$page['page']}</a></li>\n\t\t\t\t\t</if>\n\t\t\t</foreach>\n\t\t\t</ul>\n\t\t</if>\n\t\t<if test=\"bothSearchUnderTitle:|:IPSSearchRegistry::get('set.searchResultType') == 'both'\">\n\t\t\t<span class='desc lighter blend_links toggle_notify_off'>\n\t\t\t\t<br />{$this->lang->words['n_last_post_by']} {$data['last_poster']},\n\t\t\t\t<a href='{parse url=\"showtopic={$data['tid']}&view=getlastpost\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['goto_last_post']}'>{parse date=\"$data['_last_post']\" format=\"DATE\"}</a>\n\t\t\t</span>\n\t\t</if>\n\t\t<if test=\"isFollowedStuff:|:count($data['_followData'])\">\n\t\t\t{parse template=\"followData\" group=\"search\" params=\"$data['_followData']\"}\n\t\t</if>\n\t</td>\n\t<td class='col_f_preview __topic_preview'>\n\t\t<a href='#' class='expander closed' title='{$this->lang->words['view_topic_preview']}'> </a>\n\t</td>\n\t<td class='col_f_views'>\n\t\t<ul>\n\t\t\t<li>{parse format_number=\"$data['posts']\"} <if test=\"replylang:|:intval($data['posts']) == 1\">{$this->lang->words['reply']}<else />{$this->lang->words['replies']}</if></li>\n\t\t\t<li class='views desc'>{parse format_number=\"$data['views']\"} {$this->lang->words['views']}</li>\n\t\t</ul>\n\t</td>\n\t<td class='col_f_post'>\n\t\t{parse template=\"userSmallPhoto\" group=\"global\" params=\"$data\"}\n\t\t<ul class='last_post ipsType_small'>\n\t\t\t<if test=\"bothSearch:|:IPSSearchRegistry::get('set.searchResultType') == 'both'\">\n\t\t\t\t<li>{parse template=\"userHoverCard\" group=\"global\" params=\"$data\"}</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='{parse url=\"showtopic={$data['tid']}&view=getlastpost\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['goto_last_post']}'>{$this->lang->words['n_posted']} {parse date=\"$data['_post_date']\" format=\"DATE\"}</a>\n\t\t\t\t</li>\n\t\t\t<else />\n\t\t\t\t<li>{$data['last_poster']}</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href='{parse url=\"showtopic={$data['tid']}&view=getlastpost\" seotitle=\"{$data['title_seo']}\" template=\"showtopic\" base=\"public\"}' title='{$this->lang->words['goto_last_post']}'>{parse date=\"$data['_last_post']\" format=\"DATE\"}</a>\n\t\t\t\t</li>\n\t\t\t</if>\n\t\t</ul>\n\t</td>\n\t<if test=\"isFollowedStuff:|:count($data['_followData'])\">\n\t\t<td class='col_f_mod'>\n\t\t\t<input class='input_check checkall toggle_notify_on' type=\"checkbox\" name=\"likes[]\" value=\"{$data['_followData']['like_app']}-{$data['_followData']['like_area']}-{$data['_followData']['like_rel_id']}\" />\n\t\t</td>\n\t<else />\n\t\t<if test=\"isAdmin:|:$this->memberData['g_is_supmod']\">\n\t\t\t<td class='col_f_mod'>\n\t\t\t\t<if test=\"isArchivedCb:|:$this->request['search_app_filters']['forums']['liveOrArchive'] == 'archive'\">\n\t\t\t\t\t \n\t\t\t\t<else />\n\t\t\t\t\t<input type='checkbox' class='input_check topic_mod' id='tmod_{$data['tid']}' />\n\t\t\t\t</if>\n\t\t\t</td>\n\t\t</if>\n\t</if>\n</tr>\n<if test=\"$data['pid']\">\n<script type='text/javascript'>\nipb.global.searchResults[ {$data['tid']} ] = { pid: {parse expression=\"intval($data['pid'])\"}, searchterm:\"{$data['cleanSearchTerm']}\" };\n</script>\n</if>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}",
"function DisplayForums($parent_id, $forum_id, $title)\n {\n global $DB, $categoryid, $mainsettings, $userinfo, $usersystem;\n\n // SD313: check for view permission for usergroup (id enclosed in pipes!)\n // and moderation status of forums\n $forums_tbl = PRGM_TABLE_PREFIX.'p_forum_forums';\n $posts_tbl = PRGM_TABLE_PREFIX.'p_forum_posts';\n $topics_tbl = PRGM_TABLE_PREFIX.'p_forum_topics';\n $forum_id = (int)$forum_id;\n\n if(empty($parent_id) || !isset($this->conf->forums_cache['parents'][$parent_id])) // SD343: \"isset\"\n {\n $source = array($forum_id);\n }\n else\n {\n $parent_id = (int)$parent_id;\n $source = &$this->conf->forums_cache['parents'][$parent_id];\n }\n\n $output = '';\n $do_body = false;\n if(isset($source) && is_array($source))\n foreach($source as $fid)\n {\n $forum_arr = isset($this->conf->forums_cache['forums'][$fid]) ?\n (array)$this->conf->forums_cache['forums'][$fid] : false;\n if(!$forum_arr) continue;\n $forum_groups = sd_ConvertStrToArray($forum_arr['access_view'],'|');\n if(!$this->conf->IsSiteAdmin)\n {\n if(empty($forum_arr['online'])) continue;\n if(!empty($forum_groups) && !count(@array_intersect($userinfo['usergroupids'], $forum_groups)))\n continue;\n }\n\n if(!$do_body)\n {\n $output .= '\n <tbody>';\n $do_body = true;\n }\n\n $external = false;\n $target = '';\n if(!empty($forum_arr['is_category']))\n {\n $link = '#';\n }\n else\n if(empty($forum_arr['link_to']) || !strlen(trim($forum_arr['link_to'])))\n {\n //SD343 SEO Forum Title linking\n $link = $this->conf->RewriteForumLink($fid);\n }\n else\n {\n $external = true;\n $link = trim($forum_arr['link_to']);\n $target = strlen($forum_arr['target']) ? ' target=\"'.$forum_arr['target'].'\" ' : '';\n }\n\n // Display forum image\n $img_col = false;\n if(!empty($this->conf->plugin_settings_arr['display_forum_image']))\n {\n $image = false;\n if(!empty($forum_arr['image']) && !empty($forum_arr['image_h']) && !empty($forum_arr['image_w']))\n {\n $image = $forum_arr['image'].'\" alt=\"\" width=\"'.$forum_arr['image_w'].'\" height=\"'.$forum_arr['image_h'].'\" style=\"border:none\" />';\n }\n if($image) $image = '<img src=\"'.SDUserCache::$img_path.$image;\n $img_col = '<td class=\"col-forum-icon\"><a class=\"forum-title-link\" '.$target.'href=\"'.$link.'\">'. $image.'</a></td>';\n }\n\n $output .= '\n <tr>'.($img_col?$img_col:'').'\n <td class=\"col-forum-title\"><a class=\"forum-title-link\" '.$target.'href=\"'.$link.'\">'.\n (!$forum_arr['online'] ? '<img src=\"'.SDUserCache::$img_path.'lock.png\" alt=\"'.\n strip_alltags($this->conf->plugin_phrases_arr['forum_offline']).'\" />' : '').$forum_arr['title'].'</a>'.\n (strlen($forum_arr['description']) ? ' <p class=\"forum-description\">' . $forum_arr['description'].'</p>' : '');\n\n // Display sub-forums of current forum\n if(!empty($forum_arr['subforums']))\n {\n $sub_links = array();\n foreach($this->conf->forums_cache['parents'][$fid] as $subid)\n {\n $sub_output = '';\n $sub = $this->conf->forums_cache['forums'][$subid];\n if(!$this->conf->IsSiteAdmin)\n {\n if(empty($sub['online'])) continue;\n $subforum_groups = sd_ConvertStrToArray($sub['access_view'],'|');\n if(!empty($subforum_groups) && !count(@array_intersect($userinfo['usergroupids'], $subforum_groups)))\n continue;\n }\n\n $image = '';\n if(empty($sub['online']) && (empty($sub['link_to']) || !strlen(trim($sub['link_to']))))\n {\n $image = '<img src=\"'.SDUserCache::$img_path.'lock.png\" width=\"16\" height=\"16\" alt=\"'.\n htmlspecialchars($this->conf->plugin_phrases_arr['forum_offline'], ENT_COMPAT).'\" />';\n }\n else\n if(!empty($this->conf->plugin_settings_arr['display_forum_image']))\n {\n if(!empty($sub['image']) && !empty($sub['image_h']) && !empty($sub['image_w']))\n {\n $image = '<img src=\"'.SDUserCache::$img_path.$sub['image'].'\" alt=\"\" width=\"'.$sub['image_w'].'\" height=\"'.$sub['image_h'].'\" style=\"border:none\" />';\n }\n $descr = strip_tags(str_replace(array('<br>','<br />','"'),array(' ',' ',''), $sub['description']));\n }\n\n if(empty($sub['link_to']) || !strlen(trim($sub['link_to'])))\n {\n $target = '';\n //SD343 SEO Forum Title linking\n $link = $this->conf->RewriteForumLink($sub['forum_id']);\n }\n else\n {\n $link = trim($sub['link_to']);\n $target = strlen($sub['target']) ? ' target=\"'.$sub['target'].'\" ' : '';\n if(!$image)\n $image = '<img src=\"'.SDUserCache::$img_path.'arrow-right.png\" width=\"14\" height=\"14\" alt=\"\" />';\n }\n if($descr = strip_tags(str_replace(array('<br>','<br />','"'),array(' ',' ',' '), $sub['description'])))\n {\n $descr = 'title=\"'.htmlspecialchars($descr).'\" ';\n }\n $sub_output .= $image.'<a class=\"forum-sublink\" '.$target.$descr.'href=\"'.$link.'\">'.$sub['title'].'</a>';\n $sub_links[] = $sub_output;\n }\n if(!empty($sub_links))\n $output .= '\n <p class=\"sub-forums\">'.implode(', ',$sub_links).'</p>';\n unset($sub_links);\n }\n\n $output .= '\n </td>';\n if(!empty($mainsettings['enable_rss_forum']))\n {\n $output .= '\n <td class=\"col-rss\"><a title=\"RSS\" class=\"rss-icon\" href=\"forumrss.php?forum_id=' . $fid . '\">RSS</a></td>';\n }\n\n //SD342: add first 100 chars as link title for preview\n $post_hint = '';\n if(!empty($forum_arr['post_text']))\n $post_hint = SDForumConfig::GetBBCodeExtract($forum_arr['post_text']);\n\n $output .= '\n <td class=\"col-topic-count\">' . number_format($forum_arr['topic_count']) . '</td>\n <td class=\"col-post-count\">' . number_format($forum_arr['post_count']) . '</td>\n <td class=\"col-last-updated\"'.$post_hint.' style=\"cursor:normal\">';\n\n if(!empty($forum_arr['last_post_date']))\n {\n $thread_title = $forum_arr['last_topic_title'];\n //SD370: fetch prefix (if present and uncensored) and display it\n $thread_prefix = '';\n if(!empty($forum_arr['last_topic_id']))\n {\n if($prefix = $this->GetTopicPrefix($forum_arr['last_topic_id']))\n {\n $thread_prefix = str_replace('[tagname]', $prefix['tag'], $prefix['html_prefix']).' ';\n }\n unset($prefix);\n }\n\n if(strlen($thread_title) > 30)\n {\n $space_position = strrpos($thread_title, \" \") - 1;\n //SD343: respect utf-8\n if($space_position === false)\n $space_position = 30;\n else\n $space_position++;\n $thread_title = sd_substr($thread_title, 0, $space_position) . '...';\n }\n\n //SD343 SEO Forum Title linking\n $link = $forum_arr['last_topic_seo_url'];\n $output .= '<a class=\"jump-post-link\" href=\"'.$link.'\">'.$thread_prefix.trim($thread_title).'</a>';\n if(!empty($forum_arr['poster_id']))\n {\n $poster_id = (int)$forum_arr['poster_id'];\n //SD342: user caching\n $poster = SDUserCache::CacheUser($poster_id, $forum_arr['last_post_username'], false);\n $output .= '<br />'.$this->conf->plugin_phrases_arr['posted_by'].' '.$poster['profile_link'];\n }\n else\n {\n $output .= $forum_arr['last_post_username'];\n }\n $output .= '<br />\n ' . $this->conf->GetForumDate($forum_arr['last_post_date']);\n }\n\n $output .= '</td>\n </tr>';\n\n } //while\n\n if($do_body)\n {\n $output .= '\n </tbody>\n <!-- DisplayForums -->\n ';\n return $output;\n }\n return false;\n\n }",
"private function load_forums($id)\n {\n /*--------------------------------------------------------------------------\n * send the 8 most recent forums to the user who just connected to the group\n *-------------------------------------------------------------------------*/\n $forum_obj = new forum_mdl();\n return $forum_obj->get_forums($id,\"department\");\n }",
"public function show_forums()\n\t{\n\t\t// Navigation de la page\n\t\tif ($this->cat)\n\t\t{\n\t\t\t$this->nav = Forum::nav($this->cat, array(), $this);\n\t\t\tFsb::$tpl->set_vars(array(\n\t\t\t\t'U_LOW_FORUM' =>\t\tsid(ROOT . 'index.' . PHPEXT . '?p=low&id=' . $this->cat),\n\t\t\t));\n\t\t}\n\n\t\t// Derniere visite sur l'index ?\n\t\tif (Fsb::$mods->is_active('update_last_visit') && Fsb::$mods->is_active('last_visit_index') && Fsb::$session->id() <> VISITOR_ID && $last_visit = Http::getcookie('last_visit'))\n\t\t{\n\t\t\tFsb::$tpl->set_vars(array(\n\t\t\t\t'L_LAST_VISIT_INDEX' =>\t\tsprintf(Fsb::$session->lang('last_visit_index'), Fsb::$session->print_date($last_visit)),\n\t\t\t));\n\t\t}\n\n\t\t// Balise META pour la syndications RSS\n\t\tHttp::add_meta('link', array(\n\t\t\t'rel' =>\t\t'alternate',\n\t\t\t'type' =>\t\t'application/rss+xml',\n\t\t\t'title' =>\t\tFsb::$session->lang('rss'),\n\t\t\t'href' =>\t\tsid(ROOT . 'index.' . PHPEXT . '?p=rss&mode=index&cat=' . $this->cat),\n\t\t));\n\n\t\tFsb::$tpl->set_file('forum/forum_index.html');\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'IS_CAT' =>\t\t\t\t\t($this->cat) ? true : false,\n\n\t\t\t'U_MARKREAD_FORUMS' =>\t\tsid(ROOT . 'index.' . PHPEXT . '?markread=true' . (($this->cat) ? '&cat=' . $this->cat : '')),\n\t\t));\n\n\t\t// Sujets lus\n\t\t$forum_topic_read = (!Fsb::$session->is_logged()) ? array() : Forum::get_topics_read(1);\n\n\t\t// On recupere les forums, avec une jointure sur les messages lus pour voir si\n\t\t// le dernier message a ete lu ou non\n\t\t$result = Forum::query(($this->cat == null) ? '' : 'WHERE f.f_cat_id = ' . $this->cat);\n\n\t\t$can_display_subforum = false;\n\t\twhile ($forum = Fsb::$db->row($result))\n\t\t{\n\t\t\tif ($forum['f_parent'] == 0)\n\t\t\t{\n\t\t\t\t$parent_id = $forum['f_id'];\n\t\t\t\t$last_cat = $forum;\n\t\t\t\t$can_display_subforum = false;\n\t\t\t}\n\t\t\telse if (Fsb::$session->is_authorized($forum['f_id'], 'ga_view') && (Fsb::$cfg->get('display_subforums') || $forum['f_parent'] == $parent_id))\n\t\t\t{\n\t\t\t\t// On affiche la categorie\n\t\t\t\tif ($last_cat)\n\t\t\t\t{\n\t\t\t\t\tFsb::$tpl->set_blocks('cat', array(\n\t\t\t\t\t\t'CAT_ID' =>\t\t$forum['f_id'],\n\t\t\t\t\t\t'NAME' =>\t\thtmlspecialchars($last_cat['f_name']),\n\t\t\t\t\t\t'U_CAT' =>\t\tsid(ROOT . 'index.' . PHPEXT . '?cat=' . $last_cat['f_id']),\n\t\t\t\t\t));\n\t\t\t\t\t$last_cat = null;\n\t\t\t\t}\n\n\t\t\t\t// Forum lu ou non lu ?\n\t\t\t\t$is_read = (Fsb::$session->is_logged() && isset($forum_topic_read[$forum['f_id']]) && $forum_topic_read[$forum['f_id']] > 0) ? false : true;\n\n\t\t\t\t// On affiche le forum\n\t\t\t\tForum::display($forum, 'forum', 0, $is_read);\n\t\t\t\t\n\t\t\t\t$can_display_subforum = true;\n\t\t\t\t$sub_parent_id = $forum['f_id'];\n\t\t\t}\n\t\t\telse if ($can_display_subforum && Fsb::$session->is_authorized($forum['f_id'], 'ga_view') && !Fsb::$cfg->get('display_subforums') && $forum['f_parent'] == $sub_parent_id)\n\t\t\t{\n\t\t\t\t// Forum lu ou non lu ?\n\t\t\t\t$is_read = (Fsb::$session->is_logged() && isset($forum_topic_read[$forum['f_id']]) && $forum_topic_read[$forum['f_id']] > 0) ? false : true;\n\n\t\t\t\t// On affiche le sous forum\n\t\t\t\tForum::display($forum, 'subforum', 0, $is_read);\n\t\t\t}\n\t\t}\n\t\tFsb::$db->free($result);\n\t}",
"public function readforums($args=array())\n {\n $permcheck = (isset($args['permcheck'])) ? strtoupper($args['permcheck']): ACCESS_READ;\n if (!empty($permcheck) &&\n ($permcheck <> ACCESS_OVERVIEW) &&\n ($permcheck <> ACCESS_READ) &&\n ($permcheck <> ACCESS_COMMENT) &&\n ($permcheck <> ACCESS_MODERATE) &&\n ($permcheck <> ACCESS_ADMIN) &&\n ($permcheck <> 'NOCHECK') ) {\n return LogUtil::registerError($this->__('Error! The action you wanted to perform was not successful for some reason, maybe because of a problem with what you input. Please check and try again.'));\n }\n \n $where = '';\n if (isset($args['forum_id'])) {\n $where = \"WHERE tbl.forum_id='\". (int)DataUtil::formatForStore($args['forum_id']) .\"' \";\n } elseif (isset($args['cat_id'])) {\n $where = \"WHERE tbl.cat_id='\". (int)DataUtil::formatForStore($args['cat_id']) .\"' \";\n }\n \n if ($permcheck <> 'NOCHECK') {\n $permfilter[] = array('realm' => 0,\n 'component_left' => 'Dizkus',\n 'component_middle' => '',\n 'component_right' => '',\n 'instance_left' => 'cat_id',\n 'instance_middle' => 'forum_id',\n 'instance_right' => '',\n 'level' => $permcheck);\n } else {\n $permfilter = null;\n }\n \n $joininfo[] = array ('join_table' => 'dizkus_categories',\n 'join_field' => array('cat_title', 'cat_id'),\n 'object_field_name' => array('cat_title', 'cat_id'),\n 'compare_field_table'=> 'cat_id',\n 'compare_field_join' => 'cat_id');\n \n $orderby = 'a.cat_order, tbl.forum_order, tbl.forum_name';\n \n $forums = DBUtil::selectExpandedObjectArray('dizkus_forums', $joininfo, $where, $orderby, -1, -1, '', $permfilter);\n \n for ($i = 0; $i < count($forums); $i++) {\n // rename some fields for BC compatibility\n $forums[$i]['pop3_active'] = $forums[$i]['forum_pop3_active'];\n $forums[$i]['pop3_server'] = $forums[$i]['forum_pop3_server'];\n $forums[$i]['pop3_port'] = $forums[$i]['forum_pop3_port'];\n $forums[$i]['pop3_login'] = $forums[$i]['forum_pop3_login'];\n $forums[$i]['pop3_password'] = $forums[$i]['forum_pop3_password'];\n $forums[$i]['pop3_interval'] = $forums[$i]['forum_pop3_interval'];\n $forums[$i]['pop3_lastconnect'] = $forums[$i]['forum_pop3_lastconnect'];\n $forums[$i]['pop3_matchstring'] = $forums[$i]['forum_pop3_matchstring'];\n $forums[$i]['pop3_pnuser'] = $forums[$i]['forum_pop3_pnuser'];\n $forums[$i]['pop3_pnpassword'] = $forums[$i]['forum_pop3_pnpassword'];\n \n // we re-use the pop3_active field to distinguish between\n // 0 - no external source\n // 1 - mail\n // 2 - rss\n // now\n // to do: rename the db fields: \n $forums[$i]['externalsource'] = $forums[$i]['forum_pop3_active'];\n $forums[$i]['externalsourceurl'] = $forums[$i]['forum_pop3_server'];\n $forums[$i]['externalsourceport'] = $forums[$i]['forum_pop3_port'];\n $forums[$i]['pnuser'] = $forums[$i]['forum_pop3_pnuser'];\n $forums[$i]['pnpassword'] = $forums[$i]['forum_pop3_pnpassword'];\n }\n \n if (count($forums) > 0) {\n if (isset($args['forum_id'])) {\n return $forums[0];\n }\n }\n \n return $forums;\n }",
"public function actionIndex()\n\t{\n\t\t$forumId = $this->_input->filterSingle('node_id', XenForo_Input::UINT);\n\t\tif (empty($forumId))\n\t\t{\n\t\t\treturn parent::actionIndex();\n\t\t}\n\t\t\n\t\t\n\t\t$options = XenForo_Application::get('options');\n\t\tif (($forumId && $forumId != $options->cmfUserBlogsNode) || $this->_routeMatch->getResponseType() == 'rss' || $this->_input->filterSingle('user_id', XenForo_Input::UINT))\n\t\t{\n\t\t\treturn parent::actionIndex();\n\t\t}\n\t\t\n\t\t/** @var $ftpHelper XenForo_ControllerHelper_ForumThreadPost */\n\t\t$ftpHelper = $this->getHelper('ForumThreadPost');\n\t\t$forum = $ftpHelper->assertForumValidAndViewable(\n\t\t\t$forumId,\n\t\t\t$this->_getForumFetchOptions()\n\t\t);\n\t\t$forumId = $forum['node_id'];\n\n\t\t$visitor = XenForo_Visitor::getInstance();\n\t\t$userBlogModel = $this->_getUserBlogModel();\n\t\t$forumModel = $this->_getForumModel();\n\n\t\t$page = max(1, $this->_input->filterSingle('page', XenForo_Input::UINT));\n\t\t$usersPerPage = $options->cmfUserBlogsPerPage;\n\n\t\t$this->canonicalizeRequestUrl(\n\t\t\tXenForo_Link::buildPublicLink('forums', $forum, array('page' => $page))\n\t\t);\n\n\t\tlist($defaultOrder, $defaultOrderDirection) = $this->_getDefaultThreadSort($forum);\n\n\t\t// only default sort by last_post_date desc\n\t\t$order = $defaultOrder;\n\t\t$orderDirection = $defaultOrderDirection;\n\n\t\t//all threads and fake value for disabling \"mark read\"\n\t\t$displayConditions = array();\n\n\t\t$fetchElements = $this->_getThreadFetchElements(\n\t\t\t$forum, $displayConditions,\n\t\t\t$usersPerPage, $page, $order, $orderDirection\n\t\t);\n\t\t$threadFetchConditions = $fetchElements['conditions'];\n\t\t$threadFetchOptions = $fetchElements['options'] + array(\n\t\t\t'perPage' => $usersPerPage,\n\t\t\t'page' => $page,\n\t\t\t'order' => $order,\n\t\t\t'orderDirection' => $orderDirection\n\t\t);\n\t\tunset($fetchElements);\n\n\n\t\t$totalUserBlogs = $userBlogModel->countUserBlogs($threadFetchConditions);\n\t\t$this->canonicalizePageNumber($page, $usersPerPage, $totalUserBlogs, 'forums', $forum);\n\n\t\t$permissions = $visitor->getNodePermissions($forumId);\n\n\t\t// get the ordering params set for the header links\n\t\t$orderParams = array();\n\t\t$pageNavParams = $displayConditions;\n//\t\t$pageNavParams['order'] = ($order != $defaultOrder ? $order : false);\n//\t\t$pageNavParams['direction'] = ($orderDirection != $defaultOrderDirection ? $orderDirection : false);\n\t\t$pageNavParams['order'] = false;\n\t\t$pageNavParams['direction'] = false;\n\n\t\t$userBlogs = $userBlogModel->getNodeUserDataForListDisplay($forum, $threadFetchConditions, $threadFetchOptions, $permissions);\n\t\t$viewParams = array(\n\t\t\t'nodeList' => $userBlogs,\n\t\t\t'forum' => $forum,\n\t\t\t'nodeBreadCrumbs' => $ftpHelper->getNodeBreadCrumbs($forum, false),\n\n\t\t\t'canPostThread' => $forumModel->canPostThreadInForum($forum),\n\t\t\t'canSearch' => $visitor->canSearch(),\n\n\t\t\t//TODO Ignore List\n\t\t\t'ignoredNames' => array(), //$this->_getIgnoredContentUserNames($threads) + $this->_getIgnoredContentUserNames($stickyThreads),\n\n\t\t\t'order' => $order,\n\t\t\t'orderDirection' => $orderDirection,\n\t\t\t'orderParams' => $orderParams,\n\t\t\t'displayConditions' => $displayConditions,\n\n\t\t\t'pageNavParams' => $pageNavParams,\n\t\t\t'page' => $page,\n\t\t\t'blogsStartOffset' => ($page - 1) * $usersPerPage + 1,\n\t\t\t'blogsEndOffset' => ($page - 1) * $usersPerPage + count($userBlogs['nodesGrouped'][$forumId]),\n\t\t\t'blogsPerPage' => $usersPerPage,\n\t\t\t'totalBlogs' => $totalUserBlogs,\n\n\t\t\t'showPostedNotice' => $this->_input->filterSingle('posted', XenForo_Input::UINT)\n\t\t);\n\n\t\treturn $this->responseView('XenForo_ViewPublic_Forum_View', 'cmf_user_blog_view', $viewParams);\n\t}",
"final private function getAll(&$db)\n {\n $method = 'ForumMain->getAll()';\n\n // Switch\n $db->sql_switch('sketchbookcafe');\n\n // Get Categories\n $sql = 'SELECT id, name, description\n FROM forums\n WHERE iscategory=1\n AND isdeleted=0\n ORDER BY forum_order\n ASC';\n $result = $db->sql_query($sql);\n $rownum = $db->sql_numrows($result);\n\n // Set\n $this->categories_result = $result;\n $this->categories_rownum = $rownum;\n\n // Unset\n unset($result);\n unset($rownum);\n\n // Get Forums\n $sql = 'SELECT id, parent_id, name, description, total_threads, total_posts, last_thread_id \n FROM forums\n WHERE isforum=1\n AND isdeleted=0\n ORDER BY forum_order\n ASC';\n $result = $db->sql_query($sql);\n $rownum = $db->sql_numrows($result);\n\n // Set\n $this->forums_result = $result;\n $this->forums_rownum = $rownum;\n }",
"public function rss_forum()\n\t{\n\t\tif (!$this->id || !Fsb::$session->is_authorized($this->id, 'ga_view') || !Fsb::$session->is_authorized($this->id, 'ga_view_topics'))\n\t\t{\n\t\t\tDisplay::message('not_allowed');\n\t\t}\n\n\t\t// Liste des messages\n\t\t$sql = 'SELECT f.f_name, p.p_id, p.u_id, p.f_id, p.p_text, p.p_time, p.p_nickname, p.p_map, t.t_id, t.t_title, t.t_description, u.u_activate_email, u.u_email, u.u_auth\n\t\t\t\tFROM ' . SQL_PREFIX . 'forums f\n\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'topics t\n\t\t\t\t\tON f.f_id = t.f_id\n\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'posts p\n\t\t\t\t\tON p.p_id = t.t_first_p_id\n\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'users u\n\t\t\t\t\tON u.u_id = p.u_id\n\t\t\t\tWHERE t.f_id = ' . $this->id . '\n\t\t\t\t\tAND p.p_approve = 0\n\t\t\t\tORDER BY t.t_last_p_time DESC\n\t\t\t\tLIMIT 100';\n\t\t$this->check_caching($sql, 'rss_' . $this->id . '_');\n\t\t$result = Fsb::$db->query($sql, 'rss_' . $this->id . '_');\n\t\tif ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\t$this->rss->open(\n\t\t\t\thtmlspecialchars(Fsb::$cfg->get('forum_name') . Fsb::$session->getStyle('other', 'title_separator') . $row['f_name']),\n\t\t\t\thtmlspecialchars(sprintf(Fsb::$session->lang('rss_forum_name'), $row['f_name'])),\n\t\t\t\tFsb::$session->data['u_language'],\n\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=rss&mode=forum&id=' . $this->id),\n\t\t\t\t$row['p_time']\n\t\t\t);\n\n\t\t\t$parser = new Parser();\n\t\t\tdo\n\t\t\t{\n\t\t\t\t// Informations passees au parseur de message\n\t\t\t\t$parser_info = array(\n\t\t\t\t\t'u_id' =>\t\t\t$row['u_id'],\n\t\t\t\t\t'p_nickname' =>\t\t$row['p_nickname'],\n\t\t\t\t\t'u_auth' =>\t\t\t$row['u_auth'],\n\t\t\t\t\t'f_id' =>\t\t\t$row['f_id'],\n\t\t\t\t\t't_id' =>\t\t\t$row['t_id'],\n\t\t\t\t);\n\t\t\t\t$parser->parse_html = (Fsb::$cfg->get('activate_html') && $row['u_auth'] >= MODOSUP) ? true : false;\n\n\t\t\t\t$this->rss->add_entry(\n\t\t\t\t\tParser::title($row['t_title']),\n\t\t\t\t\thtmlspecialchars(($row['t_description']) ? $row['t_description'] : $parser->mapped_message($row['p_text'], $row['p_map'], $parser_info)),\n\t\t\t\t\t(($row['u_activate_email'] & 2) ? 'mailto:' . $row['u_email'] : Fsb::$cfg->get('forum_mail')) . ' ' . htmlspecialchars($row['p_nickname']),\n\t\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=topic&t_id=' . $row['t_id']),\n\t\t\t\t\t$row['p_time']\n\t\t\t\t);\n\t\t\t}\n\t\t\twhile ($row = Fsb::$db->row($result));\n\t\t}\n\t\t// Aucun sujet, on pioche donc directement les informations dans le forum\n\t\telse \n\t\t{\n\t\t\t$sql = 'SELECT f_id, f_name, f_text\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'forums\n\t\t\t\t\tWHERE f_id = ' . $this->id;\n\t\t\t$row = Fsb::$db->request($sql);\n\n\t\t\t$this->rss->open(\n\t\t\t\tParser::title($row['f_name']),\n\t\t\t\thtmlspecialchars($row['f_text']),\n\t\t\t\tFsb::$session->data['u_language'],\n\t\t\t\tsid(Fsb::$cfg->get('fsb_path') . '/index.' . PHPEXT . '?p=rss&mode=forum&id=' . $this->id),\n\t\t\t\tCURRENT_TIME\n\t\t\t);\n\t\t}\n\t}",
"function forumHandler() {}",
"public function getFaqs() {\r\n $result = $this -> db -> query (\r\n \"SELECT\r\n *\r\n FROM\r\n faqs\r\n \"\r\n );\r\n\r\n $return = array();\r\n \r\n if ($result ) {\r\n /* fetch associative array */\r\n while ($row = $result->fetch_assoc()) {\r\n $return['faq'][]['nodes'] = array (\"question\" => $row['question'],\r\n \"answer\" => $row['answer']\r\n );\r\n }\r\n\r\n /* free result set */\r\n $result->free();\r\n }\r\n \r\n return $return;\r\n }",
"public function index()\n {\n return Forum::all();\n }",
"public function forum()\n\t{\n\t\treturn $this->belongsTo('App\\Models\\Forum');\n\t}",
"function xthreads_buildcache_forums($fp) {\r\n\tglobal $cache;\r\n\t$forums = $cache->read('forums');\r\n\t$xtforums = array();\r\n\trequire_once MYBB_ROOT.'inc/xthreads/xt_phptpl_lib.php';\r\n\tfwrite($fp, '\r\n\t\tfunction xthreads_evalcacheForums($fid) {\r\n\t\t\tswitch($fid) {');\r\n\tforeach($forums as $fid => $forum) {\r\n\t\t$tplprefix = $forum['xthreads_tplprefix'];\r\n\t\txthreads_sanitize_eval($tplprefix);\r\n\t\t$langprefix = $forum['xthreads_langprefix'];\r\n\t\txthreads_sanitize_eval($langprefix);\r\n\t\t\r\n\t\t$settingoverrides = '';\r\n\t\tforeach(explode(\"\\n\", str_replace(\"{\\n}\", \"\\r\", str_replace(\"\\r\", '', $forum['xthreads_settingoverrides']))) as $override) {\r\n\t\t\t$kv = explode('=', str_replace(\"\\r\", \"\\n\", $override), 2);\r\n\t\t\tif(!isset($kv[1])) continue;\r\n\t\t\t$kv[0] = strtr($kv[0], array('\\\\' => '', '\\'' => ''));\r\n\t\t\txthreads_sanitize_eval($kv[1]);\r\n\t\t\t$settingoverrides .= '\\''.$kv[0].'\\' => \"'.$kv[1].'\", ';\r\n\t\t}\r\n\t\t\r\n\t\tif(!xthreads_empty($tplprefix) || !xthreads_empty($langprefix) || $settingoverrides !== '') // slight optimisation: only write if there's something interesting\r\n\t\t\tfwrite($fp, '\r\n\t\t\t\tcase '.$fid.': return array(\r\n\t\t\t\t\t\\'tplprefix\\' => '.(xthreads_empty($tplprefix) ? '\\'\\'' : 'array_map(\\'trim\\', explode(\\',\\', \"'.$tplprefix.'\"))').',\r\n\t\t\t\t\t\\'langprefix\\' => '.(xthreads_empty($langprefix) ? '\\'\\'' : 'array_map(\\'trim\\', explode(\\',\\', \"'.$langprefix.'\"))').',\r\n\t\t\t\t\t\\'settingoverrides\\' => '.($settingoverrides==='' ? '\\'\\'' : 'array('.$settingoverrides.')').',\r\n\t\t\t\t);');\r\n\t\t$xtforum = array(\r\n\t\t\t'defaultfilter_tf' => array(),\r\n\t\t\t'defaultfilter_xt' => array(),\r\n\t\t);\r\n\t\t\r\n\t\tforeach(explode(\"\\n\", str_replace(\"{\\n}\", \"\\r\", str_replace(\"\\r\", '', $forum['xthreads_defaultfilter']))) as $filter) {\r\n\t\t\t$kv = explode('=', str_replace(\"\\r\", \"\\n\", $filter), 2);\r\n\t\t\tif(!isset($kv[1])) continue;\r\n\t\t\t$kv[0] = strtr($kv[0], array('\\\\' => '', '\\'' => ''));\r\n\t\t\t//$kv[0] = urldecode($kv[0]); // - this is not necessary, since $kv[0] can never contain newlines or = signs\r\n\t\t\t$isarray = false;\r\n\t\t\tif($p = strrpos($kv[0], '[')) {\r\n\t\t\t\t$kv[0] = substr($kv[0], 0, $p);\r\n\t\t\t\t$isarray = true;\r\n\t\t\t}\r\n\t\t\tunset($filter_array);\r\n\t\t\tif(substr($kv[0], 0, 5) == '__xt_') {\r\n\t\t\t\t$kv[0] = substr($kv[0], 5);\r\n\t\t\t\tif(in_array($kv[0], array('uid','lastposteruid','icon','prefix')))\r\n\t\t\t\t\t$filter_array =& $xtforum['defaultfilter_xt'];\r\n\t\t\t} else {\r\n\t\t\t\tif(!isset($threadfield_cache))\r\n\t\t\t\t\t$threadfield_cache = xthreads_gettfcache($fid);\r\n\t\t\t\tif(isset($threadfield_cache[$kv[0]]) && $threadfield_cache[$kv[0]]['allowfilter'])\r\n\t\t\t\t\t$filter_array =& $xtforum['defaultfilter_tf'];\r\n\t\t\t}\r\n\t\t\tif(isset($filter_array)) {\r\n\t\t\t\txthreads_sanitize_eval($kv[1]);\r\n\t\t\t\tif($isarray)\r\n\t\t\t\t\t$filter_array[$kv[0]][] = $kv[1];\r\n\t\t\t\telse\r\n\t\t\t\t\t$filter_array[$kv[0]] = $kv[1];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tunset($forum['xthreads_tplprefix'], $forum['xthreads_langprefix'], $forum['xthreads_defaultfilter'], $forum['xthreads_settingoverrides']);\r\n\t\tif(!empty($xtforum)) $xtforums[$fid] = $xtforum;\r\n\t}\r\n\tfwrite($fp, '\r\n\t\t\t} return array(\\'tplprefix\\' => \\'\\', \\'langprefix\\' => \\'\\', \\'settingoverrides\\' => \\'\\');\r\n\t\t}\r\n\t\t\r\n\t\tfunction xthreads_evalcacheForumFilters($fid) {\r\n\t\t\tswitch($fid) {');\r\n\t\t\r\n\t{ // dummy brace\r\n\t\tforeach($xtforums as $fid => &$xtforum) {\r\n\t\t\t// check to see if everything is empty\r\n\t\t\t$allempty = true;\r\n\t\t\tforeach($xtforum as $k => &$filter)\r\n\t\t\t\tif(!empty($filter)) {\r\n\t\t\t\t\t$allempty = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tif($allempty) continue; // don't write anything if there's nothing interesting to write about\r\n\t\t\tfwrite($fp, '\r\n\t\t\t\tcase '.$fid.': return array(');\r\n\t\t\tforeach($xtforum as $k => &$filter) {\r\n\t\t\t\tfwrite($fp, '\r\n\t\t\t\t\t\\''.$k.'\\' => array(');\r\n\t\t\t\tforeach($filter as $n => &$v) {\r\n\t\t\t\t\tfwrite($fp, '\\''.$n.'\\' => ');\r\n\t\t\t\t\tif(is_array($v))\r\n\t\t\t\t\t\tfwrite($fp, 'array(\"'.implode('\",\"', $v).'\"),');\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tfwrite($fp, '\"'.$v.'\",');\r\n\t\t\t\t}\r\n\t\t\t\tfwrite($fp, '\r\n\t\t\t\t\t),');\r\n\t\t\t}\r\n\t\t\tfwrite($fp, '\r\n\t\t\t\t);');\r\n\t\t}\r\n\t}\r\n\t\r\n\tfwrite($fp, '\r\n\t\t\t} return array(\\'defaultfilter_tf\\' => array(), \\'defaultfilter_xt\\' => array());\r\n\t\t}');\r\n\t$cache->update('forums', $forums);\r\n}",
"function sql_recherche_donnees_forum ($idr, $idf, $ida, $idb, $ids) {\n\n\t// changer la table de reference s'il y a lieu (pour afficher_groupes[] !!)\n\tif ($ida) {\n\t\t$r = \"SELECT titre FROM spip_articles WHERE id_article = $ida\";\n\t\t$table = \"articles\";\n\t} else if ($idb) {\n\t\t$r = \"SELECT titre FROM spip_breves WHERE id_breve = $idb\";\n\t\t$table = \"breves\";\n\t} else if ($ids) {\n\t\t$r = \"SELECT nom_site AS titre FROM spip_syndic WHERE id_syndic = $ids\";\n\t\t$table = \"syndic\";\n\t} else if ($idr) {\n\t\t$r = \"SELECT titre FROM spip_rubriques WHERE id_rubrique = $idr\";\n\t\t$table = \"rubriques\";\n\t}\n\n\tif ($idf)\n\t\t$r = \"SELECT titre FROM spip_forum WHERE id_forum = $idf\";\n\n\tif ($r) {\n\t\tlist($titre) = spip_fetch_array(spip_query($r));\n\t\t$titre = supprimer_numero($titre);\n\t} else {\n\t\t$titre = _T('forum_titre_erreur');\n\t\t$table = '';\n\t}\n\n\t// quelle est la configuration du forum ?\n\tif ($ida)\n\t\tlist($accepter_forum) = spip_fetch_array(spip_query(\n\t\t\"SELECT accepter_forum FROM spip_articles WHERE id_article=$ida\"));\n\tif (!$accepter_forum)\n\t\t$accepter_forum = substr(lire_meta(\"forums_publics\"),0,3);\n\t// valeurs possibles : 'pos'teriori, 'pri'ori, 'abo'nnement\n\tif ($accepter_forum == \"non\")\n\t\treturn false;\n\n\treturn array ($titre, $table, $accepter_forum);\n}",
"public function getForum()\n {\n return $this->hasOne(Forum::class, ['id' => 'fk_forum']);\n }",
"public function topics()\n {\n return $this->hasMany('ForumTopic', 'forum_id', 'id');\n }",
"function cemhub_get_available_webforms() {\n $available_webforms = db_select('node', 'nd')\n ->fields('nd', array('title', 'nid'))\n ->condition('type', 'webform')\n ->execute()\n ->fetchAll();\n\n return $available_webforms;\n}",
"function get_searchable_forums()\n\t{\n\t\tglobal $ibforums, $std;\n\n\t\t$forum_array = array();\n\t\t$forum_string = \"\";\n\t\t$sql_query = \"\";\n\t\t$check_sub = 0;\n\n\t\t$cats = array();\n\t\t$forums = array();\n\n\t\t// If we have an array of \"forums\", loop\n\t\t// through and build our *SQL IN( ) statement.\n\n\t\t//------------------------------------------------\n\t\t// Check for an array\n\t\t//------------------------------------------------\n\n\t\tif (is_array($_REQUEST['forums']))\n\t\t{\n\n\t\t\tif (in_array('all', $_REQUEST['forums']))\n\t\t\t{\n\t\t\t\t//--------------------------------------------\n\t\t\t\t// Searching all forums..\n\t\t\t\t//--------------------------------------------\n\n\t\t\t\t$sql_query = \"SELECT\n\t\t\t\t\tid, read_perms, password\n\t\t\t\t FROM ibf_forums\";\n\n\t\t\t} else // NOT all forums\n\t\t\t{\n\t\t\t\t//--------------------------------------------\n\t\t\t\t// Go loopy loo\n\t\t\t\t//--------------------------------------------\n\n\t\t\t\tforeach ($_REQUEST['forums'] as $l)\n\t\t\t\t{\n\t\t\t\t\tif (preg_match(\"/^c_/\", $l))\n\t\t\t\t\t{\n\t\t\t\t\t\t$cats[] = intval(str_replace(\"c_\", \"\", $l));\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$forums[] = intval($l);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//--------------------------------------------\n\t\t\t\t// Do we have cats? Give 'em to Charles!\n\t\t\t\t//--------------------------------------------\n\n\t\t\t\tif (count($cats))\n\t\t\t\t{\n\t\t\t\t\t$sql_query = \"SELECT\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tread_perms,\n\t\t\t\t\t\tpassword,\n\t\t\t\t\t\tsubwrap\n\t\t\t\t\t FROM ibf_forums\n\t\t\t\t\t WHERE category IN(\" . implode(\",\", $cats) . \")\";\n\t\t\t\t\t$boolean = \"OR\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\t$sql_query = \"SELECT\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tread_perms,\n\t\t\t\t\t\tpassword,\n\t\t\t\t\t\tsubwrap\n\t\t\t\t\t FROM ibf_forums\";\n\t\t\t\t\t$boolean = \"WHERE\";\n\t\t\t\t}\n\n\t\t\t\tif (count($forums))\n\t\t\t\t{\n\t\t\t\t\tif ($ibforums->input['searchsubs'] == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql_query .= \" $boolean (id IN(\" . implode(\",\", $forums) . \") or parent_id IN(\" . implode(\",\", $forums) . \") )\";\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql_query .= \" $boolean id IN(\" . implode(\",\", $forums) . \")\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($sql_query == \"\")\n\t\t\t\t{\n\t\t\t\t\t// Return empty..\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//--------------------------------------------\n\t\t\t// Run query and finish up..\n\t\t\t//--------------------------------------------\n\n\t\t\t$stmt = $ibforums->db->query($sql_query);\n\n\t\t\twhile ($i = $stmt->fetch())\n\t\t\t{\n\t\t\t\tif ($this->check_access($i))\n\t\t\t\t{\n\t\t\t\t\t$forum_array[] = $i['id'];\n\t\t\t\t}\n\t\t\t}\n\t\t} else // ( is_array( $_REUEST['forums'] ) )\n\t\t{\n\t\t\t//--------------------------------------------\n\t\t\t// Not an array...\n\t\t\t//--------------------------------------------\n\n\t\t\tif ($ibforums->input['forums'] == 'all')\n\t\t\t{\n\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tread_perms,\n\t\t\t\t\t\tpassword\n\t\t\t\t\tFROM ibf_forums\");\n\n\t\t\t\twhile ($i = $stmt->fetch())\n\t\t\t\t{\n\t\t\t\t\tif ($this->check_access($i))\n\t\t\t\t\t{\n\t\t\t\t\t\t$forum_array[] = $i['id'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else // NOT ( $ibforums->input['forums'] == 'all' )\n\t\t\t{\n\t\t\t\tif ($ibforums->input['forums'] != \"\")\n\t\t\t\t{\n\t\t\t\t\t$l = $ibforums->input['forums'];\n\n\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t// Single Cat\n\t\t\t\t\t//--------------------------------------------\n\n\t\t\t\t\tif (preg_match(\"/^c_/\", $l))\n\t\t\t\t\t{\n\t\t\t\t\t\t$c = intval(str_replace(\"c_\", \"\", $l));\n\n\t\t\t\t\t\tif ($c)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\tread_perms,\n\t\t\t\t\t\t\t\tpassword\n\t\t\t\t\t\t\tFROM ibf_forums\n\t\t\t\t\t\t\tWHERE category=$c\");\n\n\t\t\t\t\t\t\twhile ($i = $stmt->fetch())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($this->check_access($i))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$forum_array[] = $i['id'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else // NOT ( preg_match( \"/^c_/\", $l ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t\t// Single forum\n\t\t\t\t\t\t//--------------------------------------------\n\n\t\t\t\t\t\t$f = intval($l);\n\n\t\t\t\t\t\tif ($f)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$qe = ($ibforums->input['searchsubs'] == 1)\n\t\t\t\t\t\t\t\t? \" OR parent_id=$f \"\n\t\t\t\t\t\t\t\t: \"\";\n\n\t\t\t\t\t\t\t$stmt = $ibforums->db->query(\"SELECT\n\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\tread_perms,\n\t\t\t\t\t\t\t\tpassword\n\t\t\t\t\t\t\tFROM ibf_forums\n\t\t\t\t\t\t\tWHERE id=$f\" . $qe);\n\n\t\t\t\t\t\t\twhile ($i = $stmt->fetch())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($this->check_access($i))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$forum_array[] = $i['id'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$forum_string = implode(\",\", $forum_array);\n\n\t\treturn $forum_string;\n\n\t}",
"function DisplayForumCategories()\n {\n global $DB, $categoryid, $mainsettings, $sdlanguage, $sdurl, $userinfo, $usersystem;\n\n //SD343: display optional tag cloud\n $forum_tags = false;\n if(!empty($this->conf->plugin_settings_arr['display_tagcloud']))\n {\n require_once(SD_INCLUDE_PATH.'class_sd_tags.php');\n SD_Tags::$maxentries = 30;\n SD_Tags::$plugins = $this->conf->plugin_id;\n SD_Tags::$tags_title = $sdlanguage['tags_title'];\n SD_Tags::$targetpageid = $categoryid;\n SD_Tags::$tag_as_param = 'tag';\n if($forum_tags = SD_Tags::DisplayCloud(false))\n {\n if(in_array($this->conf->plugin_settings_arr['display_tagcloud'],array(1,3)))\n {\n echo $forum_tags;\n }\n }\n }\n\n echo '\n <table border=\"0\" class=\"forums\" cellpadding=\"0\" cellspacing=\"0\" summary=\"layout\" width=\"100%\"><thead><tr>';\n if(!empty($this->conf->plugin_settings_arr['display_forum_image']))\n {\n echo '<th class=\"col-forum-icon\"> </th>';\n }\n echo '<th class=\"col-forum-title\">'.$this->conf->plugin_phrases_arr['column_forum'].'</th>';\n if(!empty($mainsettings['enable_rss_forum']))\n {\n echo '<th class=\"col-rss\"><a title=\"RSS\" class=\"rss-icon\" href=\"forumrss.php\">RSS</a></th>';\n }\n echo '<th class=\"col-topic-count\">'.$this->conf->plugin_phrases_arr['column_topics'].'</th>\n <th class=\"col-post-count\">'.$this->conf->plugin_phrases_arr['column_posts'].'</th>\n <th class=\"col-last-updated\">'.$this->conf->plugin_phrases_arr['column_last_updated'].'</th>\n </tr></thead>';\n\n if(isset($this->conf) && isset($this->conf->forums_cache['categories'])) //SD343\n foreach($this->conf->forums_cache['categories'] as $fid)\n {\n if(!isset($this->conf->forums_cache['forums'][$fid])) continue; //SD343\n $entry = $this->conf->forums_cache['forums'][$fid];\n\n if(!$this->conf->IsSiteAdmin)\n {\n if(empty($entry['online'])) continue;\n $entry_groups = sd_ConvertStrToArray($entry['access_view'],'|');\n if(!empty($entry_groups) && !count(@array_intersect($userinfo['usergroupids'], $entry_groups)))\n continue;\n }\n\n if(empty($entry['parent_forum_id']) && empty($entry['is_category']))\n {\n if($res = $this->DisplayForums(0,$fid,$entry['title']))\n {\n echo $res;\n }\n continue;\n }\n\n $output = '\n <tbody>\n <tr>\n <td colspan=\"6\" class=\"category-cell\">\n <div class=\"category-title-container\">';\n\n if(strlen($entry['title']))\n {\n $image = '';\n if(!empty($entry['image']) && !empty($entry['image_h']) && !empty($entry['image_w']))\n {\n $image = '<img src=\"'.SDUserCache::$img_path.$entry['image'].'\" alt=\"\" width=\"'.(int)$entry['image_w'].'\" height=\"'.(int)$entry['image_h'].'\" />';\n }\n $output .= '<span class=\"category-image\">'.($image?$image:' ').'</span> <span class=\"category-title\">'.$entry['title'].'</span>';\n if(strlen($entry['description']))\n {\n $output .= '\n <span class=\"category-description\">' . $entry['description']. '</span>';\n }\n }\n $output .= '\n </div>\n </td>\n </tr>\n </tbody>';\n\n if($res = $this->DisplayForums($fid,0,$entry['title']))\n {\n echo $output . $res;\n }\n\n } //foreach\n\n echo '\n </table>\n ';\n\n //SD343: display optional tag cloud\n if(!empty($forum_tags) && !empty($this->conf->plugin_settings_arr['display_tagcloud']) &&\n in_array($this->conf->plugin_settings_arr['display_tagcloud'],array(2,3)))\n {\n echo $forum_tags;\n }\n\n }",
"function searchResultsAsForum($results, $titlesOnly) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n{parse js_module=\"forums\"}\n<if test=\"asTawpiks:|:$titlesOnly\">\n<script type='text/javascript' src='{$this->settings['public_dir']}js/ips.forums.js'></script>\n<table class='ipb_table topic_list' id='forum_table'>\n</if>\n\t<if test=\"count($results)\">\n\t\t<if test=\"asPostsStart:|:!$titlesOnly\"><div class='ipsBox'></if>\n\t\t<foreach loop=\"NCresultsAsForum:$results as $result\">\n\t\t\t{$result['html']}\n\t\t</foreach>\n\t\t<if test=\"asPostsEnd:|:!$titlesOnly\"></div></if>\n\t</if>\n<if test=\"asTawpiks2:|:$titlesOnly\">\n\t</table>\n\t<if test=\"isAdminBottom:|:$this->memberData['g_is_supmod'] && $this->request['search_app_filters']['forums']['liveOrArchive'] != 'archive'\">\n\t\t<div id='topic_mod' class='moderation_bar rounded with_action clear'>\n\t\t\t<form id='modform' method=\"post\" action=\"{parse url=\"\" base=\"public\"}\">\n\t\t\t\t<fieldset>\n\t\t\t\t\t<input type=\"hidden\" name=\"app\" value=\"forums\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"module\" value=\"moderate\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"section\" value=\"moderate\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"do\" value=\"topicchoice\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"st\" value=\"{$this->request['st']}\" />\n\t\t\t\t\t<input type=\"hidden\" name=\"auth_key\" value=\"{$this->member->form_hash}\" />\n\t\t\t\t\t<input type='hidden' name='fromSearch' value='1' />\n\t\t\t\t\t<input type='hidden' name='returnUrl' id='returnUrl' value='{$this->request['returnUrl']}' />\n\t\t\t\t\t<input type=\"hidden\" name=\"modfilter\" value=\"{$this->request['modfilter']}\" />\n\t\t\t\t\t<input type=\"hidden\" value=\"{$this->request['selectedtids']}\" id='selectedtids' name=\"selectedtids\" />\n\t\t\t\t\n\t\t\t\t\t<select name=\"tact\" id='mod_tact'>\n\t\t\t\t\t\t<option value='approve'>{$this->lang->words['cpt_approve_f']}</option>\n\t\t\t\t\t\t<option value='pin'>{$this->lang->words['cpt_pin_f']}</option>\n\t\t\t\t\t\t<option value='unpin'>{$this->lang->words['cpt_unpin_f']}</option>\n\t\t\t\t\t\t<option value='open'>{$this->lang->words['cpt_open_f']}</option>\n\t\t\t\t\t\t<option value='close'>{$this->lang->words['cpt_close_f']}</option>\n\t\t\t\t\t\t<option value='move'>{$this->lang->words['cpt_move_f']}</option>\n\t\t\t\t\t\t<option value='merge'>{$this->lang->words['cpt_merge_f']}</option>\n\t\t\t\t\t\t<option value='delete'>{$this->lang->words['cpt_hide_f']}</option>\n\t\t\t\t\t\t<option value='sundelete'>{$this->lang->words['cpt_unhide_f']}</option>\n\t\t\t\t\t\t<option value='deletedo'>{$this->lang->words['cpt_delete_f']}</option>\n\t\t\t\t\t</select> \n\t\t\t\t\t<input type=\"submit\" name=\"gobutton\" value=\"{$this->lang->words['f_go']}\" class=\"input_submit alt\" id='mod_submit' />\n\t\t\t\t</fieldset>\n\t\t\t</form>\n\t\t\t<script type='text/javascript'>\n\t\t\t\t/* Set return string */\n\t\t\t\t$('returnUrl').value = $('urlString').value;\n\t\t\t\t$('modform').observe('submit', ipb.forums.submitModForm);\n\t\t\t\t$('mod_tact').observe('change', ipb.forums.updateTopicModButton);\n\t\t\t</script>\n\t\t</div>\n\t</if>\n<else />\n\t<script type='text/javascript' src='{$this->settings['public_dir']}js/ips.topic.js'></script>\n\t<script type=\"text/javascript\">\n\t\tipb.topic.inSection = 'searchview';\n\t</script>\n\t<if test=\"isAdmin:|:$this->memberData['g_is_supmod'] && $this->request['search_app_filters']['forums']['liveOrArchive'] != 'archive'\">\n\t<div id='topic_mod_2' class='moderation_bar rounded'>\n\t\t<form method=\"post\" id=\"modform\" name=\"modform\" action=\"{parse url=\"\" base=\"public\"}\">\n\t\t\t<fieldset>\n\t\t\t\t<input type=\"hidden\" name=\"app\" value=\"forums\" />\n\t \t\t\t<input type=\"hidden\" name=\"module\" value=\"moderate\" />\n\t \t\t\t<input type=\"hidden\" name=\"section\" value=\"moderate\" />\n\t \t\t\t<input type=\"hidden\" name=\"do\" value=\"postchoice\" />\n\t \t\t\t<input type=\"hidden\" name=\"auth_key\" value=\"{$this->member->form_hash}\" />\n\t \t\t\t<input type=\"hidden\" name=\"st\" value=\"{$this->request['st']}\" />\n\t \t\t\t<input type=\"hidden\" value=\"{$this->request['selectedpids']}\" name=\"selectedpidsJS\" id='selectedpidsJS' />\n\t\t\t\t<input type='hidden' name='fromSearch' value='1' />\n\t\t\t\t<input type='hidden' name='returnUrl' id='returnUrl' value='{$this->request['returnUrl']}' />\n\t\t\t\t<select name=\"tact\" class=\"input_select\" id='topic_moderation'>\n\t\t\t\t\t<option value='approve'>{$this->lang->words['cpt_approve']}</option>\n\t\t\t\t\t<option value='delete'>{$this->lang->words['cpt_hide']}</option>\n\t\t\t\t\t<option value='sundelete'>{$this->lang->words['cpt_undelete']}</option>\n\t\t\t\t\t<option value='deletedo'>{$this->lang->words['cpt_delete']}</option>\n\t\t\t\t\t<option value='merge'>{$this->lang->words['cpt_merge']}</option>\n\t\t\t\t\t<option value='split'>{$this->lang->words['cpt_split']}</option>\n\t\t\t\t\t<option value='move'>{$this->lang->words['cpt_move']}</option>\n\t\t\t\t</select> \n\t\t\t\t<input type=\"submit\" value=\"{$this->lang->words['jmp_go']}\" class=\"input_submit alt\" />\n\t\t\t</fieldset>\n\t\t</form>\n\t\t\n\t\t<script type='text/javascript'>\n\t\t\t/* Set return string */\n\t\t\t$('returnUrl').value = $('urlString').value;\n\t\t\t$('modform').observe('submit', ipb.topic.submitPostModeration );\n\t\t</script>\n\t</div>\n\t</if>\n\t<if test=\"disablelightbox:|:!$this->settings['disable_lightbox']\">\n\t\t{parse template=\"include_lightbox\" group=\"global\" params=\"\"}\n\t</if>\n</if>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}",
"public function getForumManager() {\n\t\treturn $this -> forumManager;\n\t}",
"public function articles()\n {\n return Board::where('news', 1)->first()->threads;\n }",
"function forum_get_child_posts_fast($parent, $forum_id) {\n global $CFG;\n \n $query = \"\n SELECT \n p.id, \n p.subject, \n p.discussion, \n p.message, \n p.created, \n {$forum_id} AS forum,\n p.userid,\n d.groupid,\n u.firstname, \n u.lastname\n FROM \n {$CFG->prefix}forum_discussions d\n JOIN \n {$CFG->prefix}forum_posts p \n ON \n p.discussion = d.id\n JOIN \n {$CFG->prefix}user u \n ON \n p.userid = u.id\n WHERE \n p.parent = '{$parent}'\n ORDER BY \n p.created ASC\n \";\n return get_records_sql($query);\n}",
"protected function getFeed_ForumsService()\n {\n return new \\phpbb\\feed\\forums(${($_ = isset($this->services['feed.helper']) ? $this->services['feed.helper'] : $this->getFeed_HelperService()) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, ${($_ = isset($this->services['content.visibility']) ? $this->services['content.visibility'] : $this->getContent_VisibilityService()) && false ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, 'php');\n }",
"function get_forum_posts($forum_id, array $options = array()) {\n $options['forum_id'] = $forum_id;\n return $this->call('get_forum_posts', $options);\n }",
"function get_forum_data($forum_ids)\r\n\t{\r\n\t\tglobal $auth, $config, $db, $phpbb_root_path, $phpEx, $user;\r\n\r\n\t\t$to_query = array();\r\n\r\n\t\tforeach ($forum_ids as $id)\r\n\t\t{\r\n\t\t\tif (!array_key_exists($id, $this->forum_data))\r\n\t\t\t{\r\n\t\t\t\t$to_query[] = $id;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (sizeof($to_query))\r\n\t\t{\r\n\t\t\t$sql = 'SELECT * FROM ' . FORUMS_TABLE . '\r\n\t\t\t\tWHERE ' . $db->sql_in_set('forum_id', $to_query);\r\n\t\t\t$result = $db->sql_query($sql);\r\n\t\t\twhile ($row = $db->sql_fetchrow($result))\r\n\t\t\t{\r\n\t\t\t\t$this->forum_data[$row['forum_id']] = $row;\r\n\t\t\t}\r\n\t\t\t$db->sql_freeresult($result);\r\n\t\t}\r\n\t}",
"public function getFavoriteForums()\n {\n return $this->favoriteForums;\n }",
"public function index()\n {\n $forums = Topics::where('forum_id', 1)->get();\n return view('forum.index', ['forums' => $forums]);\n }",
"public function displayForumImp()\r\n {\r\n $servername = \"localhost\";\r\n $username = \"root\";\r\n $password = \"\";\r\n\r\n $db = \"forumdb\";\r\n\r\n $table = \"forum\";\r\n\r\n $count=1;\r\n $frname=array();\r\n $frdesc=array();\r\n\r\n // Create connection\r\n $conn = new mysqli($servername, $username, $password, $db);\r\n\r\n // Check connection\r\n if ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n }\r\n else\r\n {\r\n $sql = \"SELECT * FROM $table WHERE sticky='1'\";\r\n $result = $conn->query($sql);\r\n\r\n if ($result->num_rows > 0)\r\n {\r\n // get data of each row\r\n while ($row = $result->fetch_assoc())\r\n {\r\n $frname[$count] = $row['forum_name'];\r\n $frdesc[$count] = $row['forum_desc'];\r\n\r\n $count++;\r\n }\r\n\r\n $CallClassBack = new forumCall();\r\n $CallClassBack->previewForum($frname, $frdesc);\r\n\r\n }\r\n else\r\n {\r\n //echo \"0 results\";\r\n echo \"Be the first the post!\";\r\n }\r\n $conn->close();\r\n }\r\n }",
"function target_add_forum($forum)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $forum['name']);\n\n\tif (!isset($GLOBALS['cat_map'][ $forum['cat_id'] ])) {\n\t\tpf('WARNING: Create category for uncategorized forum.');\n\t\t$cat_id = q_singleval('SELECT MAX(id)+1 from '. $GLOBALS['DBHOST_TBL_PREFIX'] .'cat');\n\t\tif (!$cat_id) $cat_id = 1;\n\t\ttarget_add_cat(array('id'=>$cat_id, 'name'=>'Uncategorized Forums', 'description'=>'', 'view_order'=>$cat_id));\n\t\t$GLOBALS['cat_map'][ $forum['cat_id'] ] = $cat_id;\n\t}\n\n\t$forum_opt = 16;\t// Set tag_style to BBCode.\n\tif (!empty($forum['post_passwd'])) {\n\t\t$forum_opt |= 4;\t// Enable passwd_posting.\n\t}\n\n\t$frm = new fud_forum();\n\t$frm->cat_id = $GLOBALS['cat_map'][ $forum['cat_id'] ];\n\t$frm->name = $forum['name'];\n\t$frm->descr = $forum['description'];\n\t$frm->view_order = $forum['view_order'];\n\t$frm->post_passwd = $forum['post_passwd'];\n\t$frm->url_redirect = $forum['url_redirect'];\n\t$frm->forum_opt = $forum_opt;\n\t$frm->max_attach_size = 0;\t// No limit.\n\t$frm->max_file_attachments = 5;\t// Sensible default.\n\t$id = $frm->add('LAST');\n\t$GLOBALS['forum_map'][ (int)$forum['id'] ] = $id;\n/*\nfud_use('forum_adm.inc', true);\nfud_use('groups_adm.inc', true);\nfud_use('groups.inc');\n$nf = new fud_forum;\n// $cat_id, $name, $descr, $parent, $url_redirect, $post_passwd, $forum_icon,\n// $forum_opt, $date_created, $message_threshold, $max_attach_size,\n// $max_file_attachments\n$nf->cat_id = $GLOBALS['cat_map'][$c->pid];\n$nf->name = $c->name;\n$nf->description = $c->description;\n$nf->view_order = $c->disporder;\n$nf->post_passwd = $c->password;\n// $nf->cat_opt = 1|2;\n$GLOBALS['forum_map'][$c->fid] = $nf->add('LAST');\n*/\n}",
"function Forum_showForum(&$PAGEDATA, &$id) {\n\tWW_addCSS('/ww.plugins/forum/frontend/forum.css');\n\t// { forum data\n\t$forum=dbRow('select * from forums where id='.$id);\n\tif (!$forum || !count($forum)) {\n\t\treturn '<em class=\"error\">Error: this forum does not exist!</em>';\n\t}\n\t$c='<h2 class=\"forum-name\">'.htmlspecialchars($forum['name']).'</h2>';\n\t// }\n\t// { subforums\n\t$subforums=dbAll('select * from forums where parent_id='.$id);\n\tif ($subforums && count($subforums)) {\n\t\treturn 'TODO: subforums';\n\t}\n\t// }\n\t// { threads\n\t$threads=dbAll(\n\t\t'select * from forums_threads '\n\t\t.'where forum_id='.$id.' order by last_post_date desc'\n\t);\n\tif ($threads && count($threads)) {\n\t\t$c.='<table id=\"forum-threads\">'\n\t\t\t.'<tr><th>Topics</th><th>Replies</th>'\n\t\t\t.'<th>Author</th><th>Last Post</th></tr>';\n\t\tforeach ($threads as $thread) {\n\t\t\t$user=User::getInstance($thread['creator_id']);\n\t\t\t$last_user=User::getInstance($thread['last_post_by']);\n\t\t\t$user_name=$user?$user->get('name'):'';\n\t\t\t$last_user_name=$last_user?$last_user->get('name'):'';\n\t\t\t$c.='<tr><td><a href=\"'.$PAGEDATA->getRelativeUrl()\n\t\t\t\t.'?forum-f='.$id.'&forum-t='.$thread['id'].'\">'\n\t\t\t\t.htmlspecialchars($thread['name']).'</td><td>'\n\t\t\t\t.($thread['num_posts']-1).'</td>'\n\t\t\t\t.'<td>'.htmlspecialchars($user_name).'</td><td>'\n\t\t\t\t.Core_dateM2H($thread['last_post_date'], 'datetime').', by '\n\t\t\t\t.htmlspecialchars($last_user_name).'</td></tr>';\n\t\t}\n\t\t$c.='</table>';\n\t}\n\telse {\n\t\t$c.='<div class=\"forum-no-threads\"><p>This forum has no threads in it.'\n\t\t\t.' Be the first to post to it!</p></div>';\n\t}\n\t// }\n\t// { post form\n\tif (isset($_SESSION['userdata']) && $_SESSION['userdata']['id']) {\n\t\t$c.='<div id=\"forum-post-submission-form\"><script defer=\"defer\">var forum_id='\n\t\t\t.$id.';</script></div>';\n\t\tWW_addScript('//cdn.ckeditor.com/4.4.3/standard/ckeditor.js');\n\t\tWW_addScript('//cdn.ckeditor.com/4.4.3/standard/adapters/jquery.js');\n\t\tWW_addScript('forum/frontend/forum.js');\n\t}\n\telse {\n\t\t$c.='<div class=\"forum-not-logged-in\">In order to post to this forum,'\n\t\t\t.' you must <a href=\"/_r?type=loginpage\">login'\n\t\t\t.'</a> first.</div>';\n\t}\n\t// }\n\treturn $c;\n}",
"public function viewforum(){\n $d = new ForumDAO();\n $d->id = (int) $_GET['f'];\n $d->fetchItem();\n\n $v = $this->getView();\n $v->assign('count',$d->count);\n\n //divide results into pages...\n $page = 0;\n if(isset($_GET['page'])){\n $page = (int) $_GET['page'];\n }\n\n $this->getView()->assign('page',$page);\n $perpage = 10;\n $v->assign('teemad',$d->fetchAll($d->id,$page,$perpage));\n\n $v->assign('forum',$d);\n $v->assign('user',$_SESSION['user']);\n $this->setTitle($d->title);\n $this->setFile('viewforum.haml');\n $this->render();\n }",
"function plugin_initconfig_forum()\n{\n global $CONF_FORUM, $_FORUM_DEFAULT, $_TABLES;\n\n if (is_array($CONF_FORUM) && (count($CONF_FORUM) > 1)) {\n $_FORUM_DEFAULT = array_merge($_FORUM_DEFAULT, $CONF_FORUM);\n }\n\n $c = config::get_instance();\n $n = 'forum';\n $o = 1;\n if (!$c->group_exists($n)) {\n $c->add('sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, $n);\n // ----------------------------------\n $t = 0;\n $c->add('tab_main', NULL, 'tab', 0, $t, NULL, 0, true, $n, $t);\n $c->add('fs_main', NULL, 'fieldset', 0, 0, NULL, 0, true, $n, $t);\n $c->add('registration_required', $_FORUM_DEFAULT['registration_required'], 'select', 0, 0, 0, $o++, true, $n, $t);\n $c->add('registered_to_post', $_FORUM_DEFAULT['registered_to_post'], 'select', 0, 0, 0, $o++, true, $n, $t);\n $c->add('allow_notification', $_FORUM_DEFAULT['allow_notification'], 'select', 0, 0, 0, $o++, true, $n, $t);\n $c->add('show_topicreview', $_FORUM_DEFAULT['show_topicreview'], 'select', 0, 0, 0, $o++, true, $n, $t);\n $c->add('allow_user_dateformat', $_FORUM_DEFAULT['allow_user_dateformat'], 'select', 0, 0, 0, $o++, true, $n, $t);\n $c->add('use_pm_plugin', $_FORUM_DEFAULT['use_pm_plugin'], 'select', 0, 0, 0, $o++, true, $n, $t);\n $c->add('show_topics_perpage', $_FORUM_DEFAULT['show_topics_perpage'], 'text', 0, 0, 0, $o++, true, $n, $t);\n $c->add('show_posts_perpage', $_FORUM_DEFAULT['show_posts_perpage'], 'text', 0, 0, 0, $o++, true, $n, $t);\n $c->add('show_messages_perpage', $_FORUM_DEFAULT['show_messages_perpage'], 'text', 0, 0, 0, $o++, true, $n, $t);\n $c->add('show_searches_perpage', $_FORUM_DEFAULT['show_searches_perpage'], 'text', 0, 0, 0, $o++, true, $n, $t);\n $c->add('showblocks', $_FORUM_DEFAULT['showblocks'], 'select', 0, 0, 6, $o++, true, $n, $t);\n $c->add('usermenu', $_FORUM_DEFAULT['usermenu'], 'select', 0, 0, 7, $o++, true, $n, $t);\n //$c->add('use_themes_template', $_FORUM_DEFAULT['use_themes_template'], 'select', 0, 0, 0, $o++, true, $n, $t);\n $c->add('likes_forum', $_FORUM_DEFAULT['likes_forum'], 'select', 0, 0, 41, $o++, true, $n, $t);\n $c->add('recaptcha', $_FORUM_DEFAULT['recaptcha'], 'select', 0, 0, 16, $o++, true, $n, $t);\n // ----------------------------------\n $t = 1;\n $c->add('tab_topicposting', NULL, 'tab', 0, $t, NULL, 0, true, $n, $t);\n $c->add('fs_topicposting', NULL, 'fieldset', 0, 1, NULL, 0, true, $n, $t);\n $c->add('show_subject_length', $_FORUM_DEFAULT['show_subject_length'], 'text', 0, 1, 0, $o++, true, $n, $t);\n $c->add('min_username_length', $_FORUM_DEFAULT['min_username_length'], 'text', 0, 1, 0, $o++, true, $n, $t);\n $c->add('min_subject_length', $_FORUM_DEFAULT['min_subject_length'], 'text', 0, 1, 0, $o++, true, $n, $t);\n $c->add('min_comment_length', $_FORUM_DEFAULT['min_comment_length'], 'text', 0, 1, 0, $o++, true, $n, $t);\n $c->add('views_tobe_popular', $_FORUM_DEFAULT['views_tobe_popular'], 'text', 0, 1, 0, $o++, true, $n, $t);\n $c->add('post_speedlimit', $_FORUM_DEFAULT['post_speedlimit'], 'text', 0, 1, 0, $o++, true, $n, $t);\n $c->add('allowed_editwindow', $_FORUM_DEFAULT['allowed_editwindow'], 'text', 0, 1, 0, $o++, true, $n, $t);\n $c->add('allow_html', $_FORUM_DEFAULT['allow_html'], 'select', 0, 1, 0, $o++, true, $n, $t);\n $c->add('post_htmlmode', $_FORUM_DEFAULT['post_htmlmode'], 'select', 0, 1, 0, $o++, true, $n, $t);\n $c->add('convert_break', $_FORUM_DEFAULT['convert_break'], 'select', 0, 1, 0, $o++, true, $n, $t);\n $c->add('use_censor', $_FORUM_DEFAULT['use_censor'], 'select', 0, 1, 0, $o++, true, $n, $t);\n $c->add('use_glfilter', $_FORUM_DEFAULT['use_glfilter'], 'select', 0, 1, 0, $o++, true, $n, $t);\n $c->add('use_geshi', $_FORUM_DEFAULT['use_geshi'], 'select', 0, 1, 0, $o++, true, $n, $t);\n $c->add('use_spamx_filter', $_FORUM_DEFAULT['use_spamx_filter'], 'select', 0, 1, 0, $o++, true, $n, $t);\n $c->add('show_moods', $_FORUM_DEFAULT['show_moods'], 'select', 0, 1, 0, $o++, true, $n, $t);\n $c->add('allow_smilies', $_FORUM_DEFAULT['allow_smilies'], 'select', 0, 1, 0, $o++, true, $n, $t);\n $c->add('use_smilies_plugin', $_FORUM_DEFAULT['use_smilies_plugin'], 'select', 0, 1, 0, $o++, true, $n, $t);\n $c->add('avatar_width', $_FORUM_DEFAULT['avatar_width'], 'text', 0, 1, 0, $o++, true, $n, $t);\n // ----------------------------------\n $t = 2;\n $c->add('tab_centerblock', NULL, 'tab', 0, $t, NULL, 0, true, $n, $t);\n $c->add('fs_centerblock', NULL, 'fieldset', 0, 2, NULL, 0, true, $n, $t);\n $c->add('show_centerblock', $_FORUM_DEFAULT['show_centerblock'], 'select', 0, 2, 0, $o++, true, $n, $t);\n $c->add('centerblock_homepage', $_FORUM_DEFAULT['centerblock_homepage'], 'select', 0, 2, 0, $o++, true, $n, $t);\n $c->add('centerblock_numposts', $_FORUM_DEFAULT['centerblock_numposts'], 'text', 0, 2, 0, $o++, true, $n, $t);\n $c->add('cb_subject_size', $_FORUM_DEFAULT['cb_subject_size'], 'text', 0, 2, 0, $o++, true, $n, $t);\n $c->add('centerblock_where', $_FORUM_DEFAULT['centerblock_where'], 'select', 0, 2, 5, $o++, true, $n, $t);\n // ----------------------------------\n $t = 3;\n $c->add('tab_sideblock', NULL, 'tab', 0, $t, NULL, 0, true, $n, $t);\n $c->add('fs_sideblock', NULL, 'fieldset', 0, 3, NULL, 0, true, $n, $t);\n $c->add('sideblock_numposts', $_FORUM_DEFAULT['sideblock_numposts'], 'text', 0, 3, 0, $o++, true, $n, $t);\n $c->add('sb_subject_size', $_FORUM_DEFAULT['sb_subject_size'], 'text', 0, 3, 0, $o++, true, $n, $t);\n $c->add('sb_latestpostonly', $_FORUM_DEFAULT['sb_latestpostonly'], 'select', 0, 3, 0, $o++, true, $n, $t);\n\n $c->add('fs_sideblock_settings', NULL, 'fieldset', 0, 5, NULL, 0, true, $n, $t);\n $c->add('sideblock_enable', $_FORUM_DEFAULT['sideblock_enable'], 'select', 0, 5, 0, $o++, true, $n, $t);\n $c->add('sideblock_isleft', $_FORUM_DEFAULT['sideblock_isleft'], 'select', 0, 5, 0, $o++, true, $n, $t);\n $c->add('sideblock_order', $_FORUM_DEFAULT['sideblock_order'], 'text', 0, 5, 0, $o++, true, $n, $t);\n $c->add('sideblock_topic_option',$_FORUM_DEFAULT['sideblock_topic_option'],'select', 0, 5, 15, $o++, true, $n, $t);\n $c->add('sideblock_topic', $_FORUM_DEFAULT['sideblock_topic'], '%select', 0, 5, NULL, $o++, true, $n, $t);\n\n $c->add('fs_sideblock_permissions', NULL, 'fieldset', 0, 6, NULL, 0, true, $n, $t);\n $new_group_id = 0;\n if (isset($_GROUPS['Forum Admin'])) {\n $new_group_id = $_GROUPS['Forum Admin'];\n } else {\n $new_group_id = DB_getItem($_TABLES['groups'], 'grp_id', \"grp_name = 'Forum Admin'\");\n if ($new_group_id == 0) {\n if (isset($_GROUPS['Root'])) {\n $new_group_id = $_GROUPS['Root'];\n } else {\n $new_group_id = DB_getItem($_TABLES['groups'], 'grp_id', \"grp_name = 'Root'\");\n }\n }\n }\n $c->add('sideblock_group_id', $new_group_id, 'select', 0, 6, NULL, $o++, true, $n, $t);\n $c->add('sideblock_permissions', $_FORUM_DEFAULT['sideblock_permissions'], '@select', 0, 6, 14, $o++, true, $n, $t);\n // ----------------------------------\n $t = 4;\n $c->add('tab_rank', NULL, 'tab', 0, $t, NULL, 0, true, $n, $t);\n $c->add('fs_rank', NULL, 'fieldset', 0, 4, NULL, 0, true, $n, $t);\n $c->add('level1', $_FORUM_DEFAULT['level1'], 'text', 0, 4, 0, $o++, true, $n, $t);\n $c->add('level2', $_FORUM_DEFAULT['level2'], 'text', 0, 4, 0, $o++, true, $n, $t);\n $c->add('level3', $_FORUM_DEFAULT['level3'], 'text', 0, 4, 0, $o++, true, $n, $t);\n $c->add('level4', $_FORUM_DEFAULT['level4'], 'text', 0, 4, 0, $o++, true, $n, $t);\n $c->add('level5', $_FORUM_DEFAULT['level5'], 'text', 0, 4, 0, $o++, true, $n, $t);\n $c->add('level1name', $_FORUM_DEFAULT['level1name'], 'text', 0, 4, 0, $o++, true, $n, $t);\n $c->add('level2name', $_FORUM_DEFAULT['level2name'], 'text', 0, 4, 0, $o++, true, $n, $t);\n $c->add('level3name', $_FORUM_DEFAULT['level3name'], 'text', 0, 4, 0, $o++, true, $n, $t);\n $c->add('level4name', $_FORUM_DEFAULT['level4name'], 'text', 0, 4, 0, $o++, true, $n, $t);\n $c->add('level5name', $_FORUM_DEFAULT['level5name'], 'text', 0, 4, 0, $o++, true, $n, $t);\n // ----------------------------------\n $t = 5;\n $c->add('tab_menublock', NULL, 'tab', 0, $t, NULL, 0, true, $n, $t);\n $c->add('fs_menublock_settings', NULL, 'fieldset', 0, 7, NULL, 0, true, $n, $t);\n $c->add('menublock_isleft', $_FORUM_DEFAULT['menublock_isleft'], 'select', 0, 7, 0, $o++, true, $n, $t);\n $c->add('menublock_order', $_FORUM_DEFAULT['menublock_order'], 'text', 0, 7, 0, $o++, true, $n, $t);\n }\n\n return true;\n}",
"function get_nodes()\n {\n\n \tif( !isset($this->cache['trees'][$this->tree_id]['nodes']))\n \t{\n \t\tee()->db->select('*');\n\t\t\tee()->db->from( $this->tree_table );\n\t\t\tee()->db->join('channel_titles', 'channel_titles.entry_id = '.$this->tree_table.'.entry_id', 'left');\n\t\t\tee()->db->join('statuses', 'statuses.status = channel_titles.status', 'left');\n \t\t$nodes = ee()->db->get()->result_array();\n\n \t\t// map field names => type\n\t\t\t$cf_map = array();\n\t\t\tforeach( $this->cache['trees'][$this->tree_id]['fields'] as $cf)\n\t\t\t{\n\t\t\t $cf_map[$cf['name']] = $cf['type'];\n\t\t\t}\n\n \t\t// reindex with node ids as keys\n \t\t$node_data = $entry_data = array();\n \t\tforeach($nodes as $node)\n \t\t{\n \t\t\t// if the node is associated with an entry\n \t\t\t// create another index for those\n \t\t\tif($node['entry_id'])\n \t\t\t{\n \t\t\t\t$entry_data[ $node['entry_id'] ] = $node['node_id'];\n \t\t\t}\n\n \t\t\tif($node['type'] != '')\n \t\t\t{\n \t\t\t\t$node['type'] = explode('|', $node['type']);\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\t$node['type'] = array();\n \t\t\t}\n\n \t\t\tif(!empty($node['field_data']))\n \t\t\t{\n \t\t\t\tee()->load->library('taxonomy_field_lib');\n \t\t\t\t$node['field_data'] = json_decode($node['field_data'], TRUE);\n \t\t\t\tforeach($node['field_data'] as $k => $v)\n \t\t\t\t{\n \t\t\t\t\t// this should apply to front end template parsing only \n \t\t\t\t\t$callers = debug_backtrace();\n \t\t\t\t\tif ( isset($callers[2]['function']) && $callers[2]['function'] == 'process_tags' && isset($cf_map[$k]))\n \t\t\t\t\t{\n \t\t\t\t\t\t\n \t\t\t\t\t\t$ft = ee()->taxonomy_field_lib->load($cf_map[$k]);\n \t\t\t\t\t\t// let the fieldtype change the final value\n \t\t\t$v = $ft->replace_value($v);\n \t\t\t// overwrite value\n \t\t\t$node['field_data'][$k] = $v;\n \t\t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\t}\n \t\t\t\t\t$node[$k] = $v;\n \t\t\t\t}\n \t\t\t}\n\n \t\t\t$node_data[ $node['node_id'] ] = $node;\n \t\t\t$node_data[ $node['node_id'] ]['url'] = $this->build_url($node);\n \t\t\t\n \t\t}\n\n \t\t$this->cache['trees'][$this->tree_id]['nodes']['by_node_id'] = $node_data;\n \t\t$this->cache['trees'][$this->tree_id]['nodes']['by_entry_id'] = $entry_data;\n \t}\n\n \treturn $this->cache['trees'][$this->tree_id]['nodes'];\n\n }",
"function print_forum_rules($forum)\n\t{\n\t\t$ruleshtml = \"\";\n\t\t$rules['fid'] = $forum['id'];\n\t\t\n\t\tif ( isset($forum['show_rules']) AND $forum['show_rules'] )\n\t\t{\n\t\t\t if ( $forum['show_rules'] == 2 )\n\t\t\t {\n\t\t\t\tif ( isset($this->vars['forum_cache_minimum']) AND $this->vars['forum_cache_minimum'] )\n\t\t\t\t{\n\t\t\t\t\t$tmp = $this->DB->simple_exec_query( array( 'select' => 'rules_title, rules_text', 'from' => 'forums', 'where' => \"id=\".$forum['id']) );\n\t\t\t\t\t$rules['title'] = $tmp['rules_title'];\n\t\t\t \t\t$rules['body'] = $tmp['rules_text'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$tmp = $this->DB->simple_exec_query( array( 'select' => 'rules_text', 'from' => 'forums', 'where' => \"id=\".$forum['id']) );\n\t\t\t \t\t$rules['body'] = $tmp['rules_text'];\n\t\t\t \t\t$rules['title'] = $forum['rules_title'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$ruleshtml = $this->compiled_templates['skin_global']->forum_show_rules_full($rules);\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t \tif ( isset( $this->vars['forum_cache_minimum'] ) AND $this->vars['forum_cache_minimum'] )\n\t\t\t\t{\n\t\t\t\t\t$tmp = $this->DB->simple_exec_query( array( 'select' => 'rules_title', 'from' => 'forums', 'where' => \"id=\".$forum['id']) );\n\t\t\t\t\t$rules['title'] = $tmp['rules_title'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t \t\t$rules['title'] = $forum['rules_title'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$ruleshtml = $this->compiled_templates['skin_global']->forum_show_rules_link($rules);\n\t\t\t }\n\t\t}\n\t\t\n\t\treturn $ruleshtml;\n\t}",
"public function get_forum_ids_and_titles() {\n\n\t\tif ( ! function_exists( 'bbp_get_forum_post_type' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$forums = new \\WP_Query( array(\n\t\t\t'post_type' => bbp_get_forum_post_type(),\n\t\t\t'post_status' => 'publish',\n\t\t\t'posts_per_page' => apply_filters( 'wpauwf_get_forum_ids_and_titles_posts_per_page', 20 ),\n\t\t\t'order' => 'ASC',\n\t\t\t'orderby' => 'ID',\n\t\t\t'update_post_meta_cache' => false,\n\t\t\t'update_post_term_cache' => false,\n\t\t) );\n\n\t\t// Bail if we don't have anything returned\n\t\tif ( ! isset( $forums->posts ) || ! is_array( $forums->posts ) || empty( $forums->posts ) ) {\n\t\t\treturn array();\n\t\t}\n\n\t\t// Sort our data into just what we need\n\t\t$data = array();\n\n\t\tforeach ( $forums->posts as $key => $forum_object ) {\n\n\t\t\t$this_forum_id = $forum_object->ID;\n\t\t\t$this_form_title = $forum_object->post_title;\n\n\t\t\t$data[ $this_forum_id ] = $this_form_title;\n\t\t}\n\n\t\treturn $data;\n\n\t}",
"public function show(forum $forum)\n {\n //\n }",
"function load_user_stuff()\n{\n if ((!array_key_exists('FORUM_DRIVER', $GLOBALS)) || ($GLOBALS['FORUM_DRIVER'] === null)) { // Second clause is for Quercus, as it pre-nulls referenced variables\n global $SITE_INFO, $FORUM_DRIVER, $SITE_DB, $FORUM_DB;\n\n require_code('forum_stub');\n\n if (empty($SITE_INFO['forum_type'])) {\n $SITE_INFO['forum_type'] = 'cns';\n }\n require_code('forum/' . $SITE_INFO['forum_type']); // So we can at least get user details\n $class = 'Forum_driver_' . filter_naughty_harsh($SITE_INFO['forum_type']);\n if (class_exists($class . '_sub')) {\n $class .= '_sub';\n }\n /** The active forum driver, through which member and forum interfacing should be done (apart from code that is explicitly only written as part of Conversr)\n *\n * @global object $FORUM_DRIVER\n */\n $FORUM_DRIVER = object_factory($class);\n if (($SITE_INFO['forum_type'] == 'cns') && (!is_on_multi_site_network()) && (!$GLOBALS['DEV_MODE'])) { // NB: In dev mode needs separating so we can properly test our boundaries\n $FORUM_DRIVER->connection = &$SITE_DB;\n } elseif ($SITE_INFO['forum_type'] != 'none') {\n $FORUM_DRIVER->connection = new DatabaseConnector(get_db_forums(), get_db_forums_host(), get_db_forums_user(), get_db_forums_password(), $FORUM_DRIVER->get_drivered_table_prefix());\n }\n $FORUM_DRIVER->MEMBER_ROWS_CACHED = array();\n /** The connection to the active forum database.\n *\n * @global object $FORUM_DB\n */\n $FORUM_DB = mixed();\n $GLOBALS['FORUM_DB'] = &$FORUM_DRIVER->connection; // Done like this to workaround that PHP can't put a reference in a global'd variable\n reload_lang_fields(false, 'f_member_custom_fields');\n }\n}",
"function get_thread_list($forum_id, $limit = 25, $start = 0) {\n return $this->call('get_thread_list', array('forum_id' => $forum_id, 'limit' => $limit, 'start' => 0));\n }",
"private function getFilteredForums() {\r\n \r\n $timer = Debug::GetTimer(); \r\n \r\n if (!isset($this->User->Guest) || !$this->User->Guest instanceof User) {\r\n return \"\";\r\n }\r\n \r\n $mckey = sprintf(\"forum.post.filter.user:%d\", $this->User->Guest->id);\r\n \r\n if ($forum_post_filter = $this->Redis->fetch($mckey)) {\r\n return $forum_post_filter;\r\n }\r\n \r\n $Forums = new Forums;\r\n $Index = new Index;\r\n \r\n $acl = $Forums->setUser($this->User->Guest)->getACL();\r\n \r\n $allowed_forums = array(); \r\n \r\n foreach ($Index->forums() as $row) {\r\n $Forum = new Forum($row['forum_id']);\r\n \r\n if ($Forum->setUser($this->User->Guest)->isAllowed(Forums::AUTH_READ)) {\r\n $allowed_forums[] = $Forum->id;\r\n }\r\n }\r\n \r\n $forum_filter = \"AND p.forum_id IN (\" . implode(\",\", $allowed_forums) . \")\";\r\n \r\n if (count($allowed_forums) === 0) {\r\n $this->Redis->save($mckey, \"\", strtotime(\"+1 week\"));\r\n return \"\";\r\n }\r\n \r\n $forum_post_filter = \"AND id NOT IN (SELECT l.id AS log_id\r\n FROM log_general AS l \r\n LEFT JOIN nuke_bbposts AS p ON p.post_id = l.value\r\n WHERE l.key = 'post_id' \r\n \" . $forum_filter . \")\";\r\n \r\n $this->Redis->save($mckey, $forum_post_filter, strtotime(\"+1 week\"));\r\n \r\n Debug::LogEvent(__METHOD__, $timer);\r\n \r\n return $forum_post_filter;\r\n }",
"public function detailforum($id_forum){\n\t\t$this->db->join('user','forum.id_user = user.id_user', \"LEFT\");\n\t\t$this->db->join('kategori_forum','forum.id_kategori_forum = kategori_forum.id_kategori_forum', \"LEFT\");\n\t\t$this->db->where('id_forum', $id_forum);\n\t\treturn $this->db->get('forum');\n\t}",
"protected function getFeed_ForumService()\n {\n return new \\phpbb\\feed\\forum(${($_ = isset($this->services['feed.helper']) ? $this->services['feed.helper'] : $this->getFeed_HelperService()) && false ?: '_'}, ${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['cache.driver']) ? $this->services['cache.driver'] : ($this->services['cache.driver'] = new \\phpbb\\cache\\driver\\file())) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, ${($_ = isset($this->services['content.visibility']) ? $this->services['content.visibility'] : $this->getContent_VisibilityService()) && false ?: '_'}, ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, 'php');\n }",
"function ftopics() {\n global $sql;\n \n $qry = $sql->select(\"SELECT s1.*,s2.`kattopic`,s2.`id` as `subid` \"\n . \"FROM `{prefix_forumthreads}` as `s1`, `{prefix_forumsubkats}` as `s2`, {prefix_forumkats} as `s3` \"\n . \"WHERE s1.`kid` = s2.`id` AND s2.`sid` = s3.`id` ORDER BY s1.`lp` DESC LIMIT 100;\");\n\n $f = 0; $ftopics = '';\n if($sql->rowCount()) {\n foreach($qry as $get) {\n if($f == settings::get('m_ftopics')) { break; }\n if(fintern($get['kid'])) {\n $lp = cnt(\"{prefix_forumposts}\", \" WHERE `sid` = ?\",\"id\",array($get['id']));\n $pagenr = ceil($lp/settings::get('m_fposts'));\n $page = !$pagenr ? 1 : $pagenr;\n $info = !settings::get('allowhover') == 1 ? '' : 'onmouseover=\"DZCP.showInfo(\\''.jsconvert(stringParser::decode($get['topic'])).'\\', \\''.\n _forum_kat.';'._forum_posts.';'._forum_lpost.'\\', \\''.stringParser::decode($get['kattopic']).';'.++$lp.';'.\n date(\"d.m.Y H:i\", $get['lp'])._uhr.'\\')\" onmouseout=\"DZCP.hideInfo()\"';\n \n $ftopics .= show(\"menu/forum_topics\", array(\"id\" => $get['id'],\n \"pagenr\" => $page,\n \"p\" => $lp,\n \"titel\" => cut(stringParser::decode($get['topic']),settings::get('l_ftopics')),\n \"info\" => $info,\n \"kid\" => $get['kid']));\n $f++;\n }\n }\n }\n\n return empty($ftopics) ? '<center style=\"margin:2px 0\">'._no_entrys.'</center>' : '<table class=\"navContent\" cellspacing=\"0\">'.$ftopics.'</table>';\n}",
"protected function openForum(){\n \t\t$dbug = $this->isDebug();\n \t\t\n \t\tif ($dbug) fb('Opening Forum','line '.__LINE__);\n \t\t\n \t\tif ($dbug) fb('Validating Id','line '.__LINE__);\n \t\t$this->validateForumId();\n \t\t\n \t\tif ($this->isError()) return;\n \t\t\n \t\t$id = $this->getId();\n\t\t$start = $this->getOption('start');\n\t\t\tif (!$start || !is_numeric($start)) $start = 0;\n\t\t\n\t\tif ($dbug) fb('Fetching Forum Info','line '.__LINE__);\n\t\t$this->retrieveForumInfo($id,$this->isDebug());\n\n\t\t$limit = $this->getOption('limit');\n\t\t\tif (!$limit || !is_numeric($limit)) $limit = $this->_default_limit;\n\t\t \t\n\t\tif ($dbug) fb('Fetching Forum Messages','line '.__LINE__);\n\t\t$this->retrieveMessages($id,$start,$limit,$this->isDebug());\n \t}",
"function _site_ws_all_articles($nid) {\n /*return array(\n \"hello\" => 'test',\n \"goodbye\" => \"forever\",\n \"php_cms\" => array(\n \"wordpress\",\n \"joomla\",\n \"drupal\",\n )\n );*/\n\n $data = array();\n if (isset($nid) && is_numeric($nid)) {\n $query = db_select('node', 'n');\n $query->leftJoin('field_data_body', 'b', 'n.nid = b.entity_id');\n $query->leftJoin('field_data_field_article_image', 'im', 'n.nid = im.entity_id');\n $query->leftJoin('field_data_field_article_attachments', 'a', 'n.nid = a.entity_id');\n\n $article = $query->fields('n')\n ->fields('b', array('body_value'))\n ->fields('im', array('field_article_image_fid'))\n ->fields('a', array('field_article_attachments_fid'))\n ->condition('n.type', 'article', '=')\n ->condition('n.nid', $nid, '=')\n ->condition('n.status', 0, '>')\n ->execute();\n while($result = $article->fetchAssoc()) {\n $result['url'] = '/'.drupal_get_path_alias('node/'.$result['nid']); // add url.\n $result['created'] = date ('Y-m-d', $result['created']); // format date.\n $data[] = $result;\n }\n return $data;\n }\n\n $query = db_select('node', 'n');\n $query->leftJoin('field_data_body', 'b', 'n.nid = b.entity_id');\n $query->leftJoin('field_data_field_article_image', 'im', 'n.nid = im.entity_id');\n $query->leftJoin('field_data_field_article_attachments', 'a', 'n.nid = a.entity_id');\n\n $articles = $query->fields('n')\n ->fields('b', array('body_value'))\n ->fields('im', array('field_article_image_fid'))\n ->fields('a', array('field_article_attachments_fid'))\n ->condition('n.type', 'article', '=')\n ->condition('n.status', 0, '>')\n ->execute();\n\n while($result = $articles->fetchAssoc()) {\n $result['url'] = '/'.drupal_get_path_alias('node/'.$result['nid']); // add url.\n $result['created'] = date ('Y-m-d', $result['created']); // format date.\n $data[] = $result;\n }\n\n return $data;\n}",
"public function actionGetforum($id = null) {\n $id = ($id == null) ? \\Yii::$app->request->get('id') : $id;\n\n echo json_encode(\n (is_numeric($id))\n ? BbiiForum::find()->where(['id' => $id])->asArray()->one()\n : ['error' => 'Unable to retrieve requested information.']\n );\n\n \\Yii::$app->end();\n }",
"function get_forum_type()\n{\n global $SITE_INFO;\n if (!isset($SITE_INFO['forum_type'])) {\n $SITE_INFO['forum_type'] = 'cns';\n }\n if ($SITE_INFO['forum_type'] === 'ocf') {\n $SITE_INFO['forum_type'] = 'cns'; // LEGACY\n }\n return $SITE_INFO['forum_type'];\n}",
"function getForumCategoryFields() {\n return array(\n 'nom',\n 'image',\n 'niveau',\n 'ordre'\n );\n}",
"public function markread_forums()\n\t{\n\t\tif ($this->cat)\n\t\t{\n\t\t\tForum::markread('cat', $this->cat);\n\t\t}\n\t\telse if ($this->forum)\n\t\t{\n\t\t\tForum::markread('forum', $this->forum);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tForum::markread('all');\n\t\t}\n\n\t\tHttp::redirect(ROOT . 'index.' . PHPEXT . '?p=index' . (($this->cat) ? '&cat=' . $this->cat : ''));\n\t}",
"function update_forum_cache()\n\t{\n\t\t$ignore_me = array( 'redirect_url', 'redirect_loc', 'rules_text', 'permission_custom_error', 'notify_modq_emails' );\n\t\t\n\t\tif ( isset($this->vars['forum_cache_minimum']) AND $this->vars['forum_cache_minimum'] )\n\t\t{\n\t\t\t$ignore_me[] = 'description';\n\t\t\t$ignore_me[] = 'rules_title';\n\t\t}\n\t\t\n\t\t$this->cache['forum_cache'] = array();\n\t\t\t\n\t\t$this->DB->simple_construct( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t'from' => 'forums',\n\t\t\t\t\t\t\t\t\t\t\t'order' => 'parent_id, position'\n\t\t\t\t\t\t\t\t ) );\n\t\t$this->DB->simple_exec();\n\t\t\n\t\twhile( $f = $this->DB->fetch_row() )\n\t\t{\n\t\t\t$fr = array();\n\t\t\t\n\t\t\t$perms = unserialize(stripslashes($f['permission_array']));\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Stuff we don't need...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( $f['parent_id'] == -1 )\n\t\t\t{\n\t\t\t\t$fr['id']\t\t\t\t = $f['id'];\n\t\t\t\t$fr['sub_can_post'] = $f['sub_can_post'];\n\t\t\t\t$fr['name'] \t\t = $f['name'];\n\t\t\t\t$fr['parent_id']\t = $f['parent_id'];\n\t\t\t\t$fr['show_perms']\t = $perms['show_perms'];\n\t\t\t\t$fr['skin_id']\t\t = $f['skin_id'];\n\t\t\t\t$fr['permission_showtopic'] = $f['permission_showtopic'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach( $f as $k => $v )\n\t\t\t\t{\n\t\t\t\t\tif ( in_array( $k, $ignore_me ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\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 ( $v != \"\" )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$fr[ $k ] = $v;\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$fr['read_perms'] \t= isset($perms['read_perms']) \t\t? $perms['read_perms'] \t\t: '';\n\t\t\t\t$fr['reply_perms'] \t= isset($perms['reply_perms']) \t\t? $perms['reply_perms'] \t: '';\n\t\t\t\t$fr['start_perms'] \t= isset($perms['start_perms']) \t\t? $perms['start_perms'] \t: '';\n\t\t\t\t$fr['upload_perms'] \t= isset($perms['upload_perms']) \t? $perms['upload_perms'] \t: '';\n\t\t\t\t$fr['download_perms'] \t= isset($perms['download_perms'])\t? $perms['download_perms'] \t: '';\n\t\t\t\t$fr['show_perms'] \t= isset($perms['show_perms']) \t\t? $perms['show_perms'] \t\t: '';\n\t\t\t\t\n\t\t\t\tunset($fr['permission_array']);\n\t\t\t}\n\t\t\t\n\t\t\t$this->cache['forum_cache'][ $fr['id'] ] = $fr;\n\t\t}\n\t\t\n\t\t$this->update_cache( array( 'name' => 'forum_cache', 'array' => 1, 'deletefirst' => 0, 'donow' => 0 ) );\n\t}",
"function Forum_show(&$PAGEDATA) {\n\t$view=0;\n\tif (isset($_REQUEST['forum-t'])) {\n\t\t$view=2;\n\t\t$thread_id=(int)$_REQUEST['forum-t'];\n\t}\n\telse if (isset($_REQUEST['forum-f'])) {\n\t\t$view=1;\n\t\t$forum_id=(int)$_REQUEST['forum-f'];\n\t}\n\tif ($view==0) {\n\t\t$forums=dbAll(\n\t\t\t'select * from forums where parent_id=0 and page_id='.$PAGEDATA->id\n\t\t);\n\t\tif (!$forums) {\n\t\t\tdbQuery(\n\t\t\t\t'insert into forums '.\n\t\t\t\t'values(0,'.$PAGEDATA->id.',0,\"default\", \"1\")'\n\t\t\t);\n\t\t\t$view=1;\n\t\t\t$forum_id=dbLastInsertId();\n\t\t}\n\t\telse {\n\t\t\tif (count($forums)==1) {\n\t\t\t\t$view=1;\n\t\t\t\t$forum_id=$forums[0]['id'];\n\t\t\t}\n\t\t}\n\t}\n\tswitch($view){\n\t\tcase 1: // { specific forum\n\t\t\t$c=Forum_showForum($PAGEDATA, $forum_id);\n\t\tbreak;\n\t\t// }\n\t\tcase 2: // { specific thread\n\t\t\t$c=Forum_showThread($PAGEDATA, $thread_id);\n\t\tbreak;\n\t\t// }\n\t\tdefault: // { show all forums\n\t\t\t$c=Forum_showForums($PAGEDATA, $forums);\n\t\t\t// }\n\t}\n\tif (!isset($PAGEDATA->vars['footer'])) {\n\t\t$PAGEDATA->vars['footer']='';\n\t}\n\treturn $PAGEDATA->render()\n\t\t.$c\n\t\t.$PAGEDATA->vars['footer'];\n}",
"public function getForumTopicList($debug_to_pass = '') {\n\n $this->db->select('ft.topic_id,ft.topic_title,ft.category_id,ft.topic_short_description,ft.topic_content,ft.posted_by,ft.posted_on,ft.status as ft_status,fc.category_id,fc.category_name,fc.page_description,u.user_name,u.user_id');\n $this->db->from('mst_forum_topics as ft');\n $this->db->join('mst_forum_categories as fc', 'ft.category_id = fc.category_id', 'inner');\n $this->db->join('mst_users as u', 'ft.posted_by=u.user_id', 'inner');\n// $this->db->join('trans_forum_comments as tfc', 'tfc.topic_id=ft.topic_id', 'inner');\n $this->db->where('ft.status', '1');\n// $this->db->where('tfc.status','1');\n $this->db->order_by('ft.topic_id desc');\n $query = $this->db->get();\n if ($debug_to_pass)\n echo $this->db->last_query();\n return $query->result_array();\n }",
"function forum_autoriser(){}",
"private function retrieveForumInfo($id,$log=false){\n\t\t$res = NewDao::getInstance()->select('forums',array('name','description'),array('id'=>$id),true,$log);\n\t\t\n\t\t$this->_name = $res['name'];\n\t\t$this->_desc = $res['description'];\n\t}",
"function forum_db_names() {\n //[primary id], [table name], [time created field name], [time modified field name]\n return array(\n array('id', 'forum_posts', 'created', 'modified', 'head', 'parent = 0'),\n array('id', 'forum_posts', 'created', 'modified', 'post', 'parent != 0')\n );\n}",
"function removeFromForums()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n // delete category assignments\r\n $db->query( \"DELETE FROM eZForum_ForumCategoryLink WHERE ForumID='$this->ID'\" );\r\n }",
"function getInGroup($groupID) {\n\t\tglobal $forumVariables;\n\t\t$process = new process;\n\t\t$forums = \"\";\n\t\t$db = new dbHandler();\t\t\t\t//Makes databasehandler to db\n\t\t$groupID = $db->SQLsecure($groupID);\n\t\t\n\t\trequire_once('permissionHandler.php');\n\t\t$permissions = new permissionHandler;\n\n\t\t//Get member permissions\n\t\t$permission = $permissions->permissions(\"view\");\n\t\n\t\t$i = 0;\t\t\t\t\t\t//Sets the conuntvariable to 0\n\t\t$last = \"\";\t\t\t\t//Variable for forumID in last loop\n\t\t\t\n\t\t$processForumName = \"\";\n\t\t$processInfoText = \"\";\n\t\t\n\t\t$sql = \"SELECT _'pfx'_forums.*, _'pfx'_posts.postID, _'pfx'_posts.madeBy, _'pfx'_posts.threadID, _'pfx'_posts.lastEdit AS lastPostDate, _'pfx'_members.memberID, _'pfx'_members.userName FROM ((_'pfx'_forums LEFT JOIN _'pfx'_posts ON _'pfx'_forums.lastPost = _'pfx'_posts.postID) LEFT JOIN _'pfx'_members ON _'pfx'_members.memberID = _'pfx'_posts.madeBy) WHERE _'pfx'_forums.groupID = '\".$groupID.\"' ORDER BY _'pfx'_forums.sort DESC\";\n\t\t$result = $db->runSQL($sql);\n\t\tif($db->numRows($result) == 0)\n\t\t\treturn false;\n\t\twhile($row = $db->fetchArray($result)) {\n\t\t\t$continue = false;\t\n\t\t\tforeach($permission as $element) {\n\t\t\t\tif($element['forumID'] == $row['forumID'] && !$element['permission'])\n\t\t\t\t\t$continue = true;\n\t\t\t}\n\t\t\tif($continue) {\t\t//Hide forum if user not has permission to see it \n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\n\t\t\t$forums[$i]['forumID'] = $row['forumID'];\t\t//Sets the forumIDs to each group in the three dimentional array\n\t\t\t$forums[$i]['forumName'] = $row['name'];\t\t//Sets the forumnames to each group in the three dimentional array\n\t\t\t$forums[$i]['forumLastEdit'] = $row['lastEdit'];\t//Sets the forum last edit to each group in the three dimentional array\n\t\t\t$forums[$i]['forumInfoText'] = $row['infoText'];\t//Sets the forum info text to each group in the three dimentional array\t\n\t\t\t$forums[$i]['forumGroupID'] = $row['groupID'];\t//Sets the forum group name to each group in the three dimentional array\n\t\t\t$forums[$i]['forumLocked'] = $row['locked'];\n\t\t\t\t\t\t\n\t\t\t$forums[$i]['forumCountPosts'] = $row['posts'];\n\t\t\t$forums[$i]['forumCountThreads'] = $row['threads'];\n\t\t\t\n\t\t\t$forums[$i]['forumLastPost'] = $row['lastPostDate'];\n\t\t\tif($forums[$i]['forumLastPost'] == \"0000-00-00 00:00:00\") //If date is null(default value) then put nothing to variable\n\t\t\t\t$forums[$i]['forumLastPost'] = \"\";\n\t\t\t$forums[$i]['forumLastPostUsername'] = $row['userName'];\n\t\t\t$forums[$i]['forumLastPostMemberID'] = $row['memberID'];\n\t\t\t$forums[$i]['forumLastPostThreadID'] = $row['threadID'];\n\t\t\t$forums[$i]['forumLastPostID'] = $row['postID'];\n\t\t\t\n\t\t\t$processForumName[$i] = $forums[$i]['forumName'];\n\t\t\t$processInfoText[$i] = $forums[$i]['forumInfoText'];\n\t\t\t\n\t\t\t$i++;\n\t\t}\n\t\tif(empty($forums))\n\t\t\treturn false;\n\t\t\n\t\tif($forumVariables['inlogged']) {\n\t\t\t$sqlNewPosts = \"SELECT _'pfx'_forums.forumID, COUNT( _'pfx'_posts.postID ) AS newPosts FROM _'pfx'_forums INNER JOIN _'pfx'_threads INNER JOIN _'pfx'_posts ON _'pfx'_forums.forumID = _'pfx'_threads.forumID ON _'pfx'_threads.threadID = _'pfx'_posts.threadID WHERE _'pfx'_posts.lastEdit > '\".$forumVariables['lastLoginDate'].\"' AND _'pfx'_posts.editedBy != '\".$forumVariables['inloggedMemberID'].\"' GROUP BY _'pfx'_forums.forumID\";\n\t\t\t$resultNewPosts = $db->runSQL($sqlNewPosts);\n\t\t\twhile($rowNewPosts = $db->fetchArray($resultNewPosts)) {\n\t\t\t\t$k = 0;\n\t\t\t\tforeach($forums as $forumsElements) {\n\t\t\t\t\tif($forumsElements['forumID'] == $rowNewPosts['forumID'])\n\t\t\t\t\t\t$forums[$k]['forumNewPosts'] = $rowNewPosts['newPosts'];\n\t\t\t\t\t$k++;\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$k = 0;\n\t\tforeach($forums as $forumsElements) {\n\t\t\tif(empty($forums[$k]['forumNewPosts']))\n\t\t\t\t$forums[$k]['forumNewPosts'] = 0;\t\t\n\t\t\t$k++;\t\n\t\t}\t\n\t\t\t\n\t\tif(!empty($processForumName) && !empty($processInfoText)) {\n\t\t\t$processForumName = $process->headline($processForumName);\n\t\t\t$processInfoText = $process->text($processInfoText);\n\n\t\t\t$k = 0;\n\t\t\tforeach($processForumName as $processForumNameElement) {\n\t\t\t\t$forums[$k]['forumName'] = $processForumNameElement;\n\t\t\t\t$k++;\n\t\t\t}\n\t\t\t$k = 0;\n\t\t\tforeach($processInfoText as $processInfoTextElement) {\n\t\t\t\t$forums[$k]['forumInfoText'] = $processInfoTextElement;\n\t\t\t\t$k++;\n\t\t\t}\n\t\t}\n\t\treturn $forums; //Returns an three dimentional array \n\t}",
"function caldol_hook_bbp_theme_before_forum_sub_forums(){\n\n\n\t\t\n\n\t\t//echo \"count: \" . bbp_get_forum_subforum_count() . \" --\";\n\n\t\t\n\n\t\t\n\n\t\t$subForumList = bbp_forum_get_subforums();\n\n\t\t\n\n\t\tif(sizeof($subForumList) > 1){\n\n\t\t\techo \"<ul style='margin-left: 20px;'>\";\n\n\t\tforeach($subForumList as $currForum){\n\n\t\t\t//print_r($currForum);\n\n\t\t\t// No link\n\n\t\t\t$retval = false;\n\n\t\t\t\t\n\n\t\t\t// Parse the arguments\n\n\t\t\t$r = bbp_parse_args( $args, array(\n\n\t\t\t\t\t'forum_id' => $currForum->ID,\n\n\t\t\t\t\t'user_id' => 0,\n\n\t\t\t\t\t'before' => '',\n\n\t\t\t\t\t'after' => '',\n\n\t\t\t\t\t'subscribe' => __( 'Subscribe', 'bbpress' ),\n\n\t\t\t\t\t'unsubscribe' => __( 'x', 'bbpress' )\n\n\t\t\t), 'get_forum_subscribe_link' );\n\n\t\t\t\t\n\n\t\t\t\n\n\t\t\t$isSubscribed = bbp_get_forum_subscription_link( $r);\n\n\t\t\t\n\n\t\t\t\t\n\n\t\t\tif(strpos($isSubscribed, 'is-subscribed') != 0){\n\n\t\t\t\n\n\t\t\techo \"<li class='bbp-topic-title'><a href='\" . bbp_get_forum_permalink($currForum->ID) . \"'>\" . $currForum->post_title . \"</a><span class='bbp-topic-action'> \" . $isSubscribed . \" </span></li>\";\n\n\t\t\t}\n\n\t\t\t//print_r($currForum);\n\n\t\t}\n\n\t\t\techo \"</ul>\";\n\n\t\t} // end > 1\n\n\t\t\n\n\t\t\n\n}",
"function ftopics()\n{\n global $db;\n\n $qry = db(\"SELECT s1.*,s2.kattopic,s2.id AS subid FROM \" . $db['f_threads'] . \" s1, \" . $db['f_skats'] . \" s2, \" . $db['f_kats'] . \" s3\n WHERE s1.kid = s2.id AND s2.sid = s3.id ORDER BY s1.lp DESC LIMIT 100\");\n\n $f = 0;\n $ftopics = '';\n if (_rows($qry)) {\n while ($get = _fetch($qry)) {\n if ($f == config('m_ftopics')) break;\n if (fintern($get['kid'])) {\n $lp = cnt($db['f_posts'], \" WHERE `sid` = '\" . $get['id'] . \"'\");\n $pagenr = ceil($lp / config('m_fposts'));\n\n if ($pagenr == 0) $page = 1;\n else $page = $pagenr;\n\n $info = config('allowhover') == 1 ? 'onmouseover=\"DZCP.showInfo(\\'' . jsconvert(re($get['topic'])) . '\\', \\'' . _forum_kat . ';' . _forum_posts . ';' . _forum_lpost . '\\', \\'' .\n re($get['kattopic']) . ';' . ++$lp . ';' . date(\"d.m.Y H:i\", $get['lp']) . _uhr . '\\')\" onmouseout=\"DZCP.hideInfo()\"' : '';\n $ftopics .= show(\"menu/forum_topics\", array(\"id\" => $get['id'],\n \"pagenr\" => $page,\n \"p\" => $lp,\n \"titel\" => cut(re($get['topic']), config('l_ftopics'), true, false),\n \"info\" => $info,\n \"kid\" => $get['kid']));\n $f++;\n }\n }\n }\n\n return empty($ftopics) ? '' : '<table class=\"navContent\" cellspacing=\"0\">' . $ftopics . '</table>';\n}",
"function recycle_forum_categories()\n\t{\n\t\t$table_forum = Database :: get_course_table(TABLE_FORUM);\n\t\t$table_forumcat = Database :: get_course_table(TABLE_FORUM_CATEGORY);\n\t\t$sql = \"SELECT fc.cat_id FROM \".$table_forumcat.\" fc LEFT JOIN \".$table_forum.\" f ON fc.cat_id=f.forum_category WHERE f.forum_id IS NULL\";\n\t\t$res = api_sql_query($sql,__FILE__,__LINE__);\n\t\twhile ($obj = mysql_fetch_object($res))\n\t\t{\n\t\t\t$sql = \"DELETE FROM \".$table_forumcat.\" WHERE cat_id = \".$obj->cat_id;\n\t\t\tapi_sql_query($sql,__FILE__,__LINE__);\n\t\t}\n\t}",
"function group_forum_crumbs() {\n\t\t\n\t\t// Setup the empty trail\n\t\t$forum_trail = array();\n\t\t\n\t\t// Group forum root\n\t\tif ( NULL == bp_action_variable() ) :\n\t\t\t$forum_trail[] = 'Forum';\n\t\t\n\t\t// Group forum subcomponent\n\t\telse :\n\t\t\t$forum_trail[] = '<a href=\"'. bp_get_group_permalink() .'forum/\" title=\"Group Forum\">Forum</a>';\n\t\t\t\n\t\t// Single Topic\n\t\tif ( bp_is_action_variable( 'topic' , 0 ) ) :\n\t\t\t$topic_info = apoc_get_group_topic_info();\n\t\t\t\t\t\n\t\t\t// Edit Topic\n\t\t\tif ( bp_is_action_variable( 'edit' , 2 ) ) :\n\t\t\t\t$forum_trail[] = '<a href=\"'. bp_get_group_permalink() .'forum/topic/' . $topic_info->url . '\" title=\"' . $topic_info->title . '\">' . $topic_info->title . '</a>';\n\t\t\t\t$forum_trail[] = 'Edit Topic';\n\t\t\t\t\n\t\t\telse :\n\t\t\t\t$forum_trail[] = $topic_info->title;\n\t\t\tendif; \n\t\t\t\n\t\t\t// Edit Reply\n\t\t\telseif ( bp_is_action_variable( 'reply' , 0 ) ) :\n\t\t\t\t$topic_info = apoc_get_group_reply_info();\n\t\t\t\t\n\t\t\t\tif ( bp_is_action_variable( 'edit' , 2 ) ) :\n\t\t\t\t\t$forum_trail[] = '<a href=\"'. bp_get_group_permalink() .'forum/topic/' . $topic_info->url . '\" title=\"' . $topic_info->title . '\">' . $topic_info->title . '</a>';\n\t\t\t\t\t$forum_trail[] = 'Edit Reply';\n\t\t\t\tendif;\n\t\t\tendif;\n\t\t\n\t\tendif;\n\t\t\n\t\t// Return the group forum crumbs\n\t\treturn $forum_trail;\n\t}",
"public function getNewsForumRoot()\n\t{\n\t\t$title = \"News\";\n\t\tif (false !== ($board = GWF_ForumBoard::getByTitle($title))) {\n\t\t\treturn $board;\n\t\t}\n\t\t\n\t\t$options = GWF_ForumBoard::GUEST_VIEW|GWF_ForumBoard::SCRIPT_LOCK;\n\t\treturn GWF_ForumBoard::createBoard($title, 'on '.GWF_SITENAME, 1, $options, 0);\n\t}",
"function apoc_get_group_forum_breadcrumbs() {\n\t$bp_trail = array();\n\t\n\t// Group Forum Root \n\tif ( NULL == bp_action_variable() ) :\n\t\t$bp_trail[] = 'Forum';\n\t\n\t// Topic \n\telse :\n\t\t$bp_trail[] = '<a href=\"'. bp_get_group_permalink() .'forum/\" title=\"Group Forum\">Forum</a>';\n\t\t\n\t\t// Single Topic\n\t\tif ( bp_is_action_variable( 'topic' , 0 ) ) :\n\t\t\t$topic_info = apoc_get_group_topic_info();\n\t\t\t\t\t\n\t\t\t// Edit Topic\n\t\t\tif ( bp_is_action_variable( 'edit' , 2 ) ) :\n\t\t\t\t$bp_trail[] = '<a href=\"'. bp_get_group_permalink() .'forum/topic/' . $topic_info->url . '\" title=\"' . $topic_info->title . '\">' . $topic_info->title . '</a>';\n\t\t\t\t$bp_trail[] = 'Edit Topic';\n\t\t\t\t\n\t\t\telse :\n\t\t\t\t$bp_trail[] = $topic_info->title;\n\t\t\tendif; \n\t\t\t\n\t\t// Edit Reply\n\t\telseif ( bp_is_action_variable( 'reply' , 0 ) ) :\n\t\t\t$topic_info = apoc_get_group_reply_info();\n\t\t\t\n\t\t\tif ( bp_is_action_variable( 'edit' , 2 ) ) :\n\t\t\t\t$bp_trail[] = '<a href=\"'. bp_get_group_permalink() .'forum/topic/' . $topic_info->url . '\" title=\"' . $topic_info->title . '\">' . $topic_info->title . '</a>';\n\t\t\t\t$bp_trail[] = 'Edit Reply';\n\t\t\tendif;\n\t\tendif;\n\t\t\n\tendif;\n\t\n\treturn $bp_trail;\n}",
"function warquest_lastest_forum_post() {\r\n\t\r\n\tglobal $mid;\r\n\tglobal $sid;\r\n\tglobal $player;\r\n\tglobal $config;\r\n\t\r\n\tglobal $page;\r\n\t\r\n\tif (warquest_db_query_pattern($player, PATTERN_FORUM_SORT)==0) {\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t$query = 'select b.tid, b.fid, b.description, a.date, c.pid as pid1, c.name as name1, ';\r\n\t$query .= 'c.country as country1, d.pid as pid2, d.name as name2, d.country as country2 ';\r\n\t$query .= 'from comment as a left join topic as b on a.tid=b.tid ';\r\n\t$query .= 'left join player c on a.pid1=c.pid left join player d on b.pid=d.pid ';\r\n\t$query .= 'where a.deleted=0 and b.deleted=0 order by a.id desc limit 1';\n\t\t\t\r\n\t$result = warquest_db_query($query);\t\r\n\t$data = warquest_db_fetch_object($result);\r\n\t\r\n\tif (isset($data->tid)) {\r\n\t\t$page .= '<div class=\"subparagraph\">'.t('HOME_LASTEST_FORUM_ITEM').'</div>';\r\n\t\t$page .= '<div class=\"box\">';\r\n\t\r\n\t\t$page .= '<table>';\r\n\t\r\n\t\t$page .= '<tr>';\r\n\t\r\n\t\t$page .= '<td width=\"75\">';\r\n\t\t$page .= '<b></b>';\r\n\t\t$page .= '</td>';\r\n\t\t\r\n\t\t$page .= '<td width=\"215\">';\r\n\t\t$page .= '</td>';\r\n\r\n\t\t$page .= '<td width=\"210\">';\r\n\t\t$page .= '</td>';\r\n\t\t\r\n\t\t$page .= '</tr>';\r\n\t\t\t\t\t\t\r\n\t\t$query = 'select id from comment where deleted=0 and tid='.$data->tid;\t\r\n\t\t$result = warquest_db_query($query);\r\n\t\t$count = warquest_db_num_rows($result);\r\n\t\t\t\t\t\t\t\r\n\t\t$page .= '<tr>';\r\n\t\t\t\r\n\t\t$page .= '<td>';\r\n\t\t$page .= warquest_link('mid='.MENU_FORUMS.'&sid='.PAGE_COMMENT.'&fid='.$data->fid.'&tid='.$data->tid,\r\n\t\t\twarquest_image('other/forum.png','width=\"64\" height=\"64\"'), 'forum1');\r\n\t\t$page .= '</td>';\r\n\t\t\t\t\r\n\t\t$page .= '<td valign=\"top\">';\r\n\t\t$page .= '<span class=\"topic\">';\r\n\t\t$page .= warquest_link('mid='.MENU_FORUMS.'&sid='.PAGE_COMMENT.'&fid='.$data->fid.'&tid='.$data->tid, \r\n\t\t\twarquest_parse_smilies($data->description),'forum2');\r\n\t\t$page .= '</span>';\t\r\n\t\t$page .= '<br/>';\r\n\t\t$page .= '<i>';\t\r\n\t\t$page .= t('TOPIC_CREATED_BY', player_format($data->pid2, $data->name2, $data->country2));\r\n\t\t$page .= '</i>';\r\n\t\t\t\r\n\t\t$page .= '</td>';\r\n\t\t\t\t\r\n\t\t$page .= '<td valign=\"top\">';\r\n\t\t$page .= health_format($count).' '.t('GENERAL_MESSAGES').' ';\r\n\t\t\t\r\n\t\t$page .= '<br/>';\r\n\t\t\t\r\n\t\tif (isset($data->date)) {\r\n\t\t\t$page .= '<br/><b>'.t('GENERAL_LAST_MESSAGE').'</b><br/>';\r\n\t\r\n\t\t\t$page .= warquest_ui_ago($data->date).' '.t('GENERAL_BY').' ';\r\n\t\t\t$page .= player_format($data->pid1, $data->name1, $data->country1);\r\n\t\t}\r\n\t\t$page .= '</td>';\r\n\t\t$page .= '</tr>';\r\n\t\t\t\t\r\n\t\t$page .= '</table>';\r\n\t\t\t\r\n\t\t$page .= '</div>';\r\n\t}\r\n}",
"function return_topic_list_data( $view_as_guest=0 )\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\t\t\n\t\t$topics = array();\n\t\t\n\t\t$this->ipsclass->init_load_cache( array( 'attachtypes' ) );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Set up\n\t\t//-----------------------------------------\n\n\t\t$this->topic_list_config['order_field'] = ( $this->topic_list_config['order_field'] == 'started' ) ? 'start_date' : $this->topic_list_config['order_field'];\n\t\t$this->topic_list_config['order_field'] = ( $this->topic_list_config['order_field'] == 'lastpost' ) ? 'last_post' : $this->topic_list_config['order_field'];\n\t\t$this->topic_list_config['forums'] = ( is_array( $this->topic_list_config['forums'] ) ) ? implode( \",\", $this->topic_list_config['forums'] ) : $this->topic_list_config['forums'];\n\t\t\n\t\t//-----------------------------------------\n\t\t// Fix up allowed forums\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->topic_list_config['forums'] )\n\t\t{\n\t\t\t# Init forums...\n\t\t\tif ( $view_as_guest )\n\t\t\t{\n\t\t\t\t$this->ipsclass->perm_id_array = explode( ',', $this->ipsclass->create_perms_from_group( $this->ipsclass->vars['guest_group'] ) );\n\t\t\t\t$this->ipsclass->forums->strip_invisible = 1;\n\t\t\t}\n\t\t\t\n\t\t\t$this->ipsclass->forums->forums_init();\n\t\t\t\n\t\t\t# Reset topics...\n\t\t\tif ( $this->topic_list_config['forums'] == '*' )\n\t\t\t{\n\t\t\t\t$_tmp_array \t\t\t\t\t = array();\n\t\t\t\t$this->topic_list_config['forums'] = '';\n\t\t\t\t\n\t\t\t\tforeach( $this->ipsclass->forums->forum_by_id as $id => $data )\n\t\t\t\t{\n\t\t\t\t\t$_tmp_forums[] = $id;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$_tmp_forums = explode( ',', $this->topic_list_config['forums'] );\n\t\t\t\t$_tmp_array \t\t\t\t\t = array();\n\t\t\t\t$this->topic_list_config['forums'] = '';\n\t\t\t}\n\t\t\t\n\t\t\tforeach( $_tmp_forums as $_id )\n\t\t\t{\n\t\t\t\tif ( $view_as_guest )\n\t\t\t\t{\n\t\t\t\t\tif ( ! $this->ipsclass->forums->forums_quick_check_access( $_id ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$_tmp_array[] = $_id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$_tmp_array[] = $_id;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->topic_list_config['forums'] = implode( ',', $_tmp_array );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get from the DB\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' => 't.*',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'topics' => 't' ),\n\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 't.approved=1 AND t.forum_id IN (0,'.$this->topic_list_config['forums'].')',\n\t\t\t\t\t\t\t\t\t\t\t 'order' => $this->topic_list_config['order_field'].' '.$this->topic_list_config['order_by'],\n\t\t\t\t\t\t\t\t\t\t\t\t 'limit' => array( $this->topic_list_config['offset'], $this->topic_list_config['limit'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t 'add_join' => array( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 0 => array( 'select' => 'p.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => array( 'posts' => 'p' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 't.topic_firstpost=p.pid',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 1 => array( 'select' => 'm.id as member_id, m.members_display_name as member_name, m.mgroup, m.email',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 'from' => array( 'members' => 'm' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"m.id=p.author_id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'select' => 'f.id as forum_id, f.name as forum_name, f.use_html',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 'from' => array( 'forums' => 'f' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"t.forum_id=f.id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'type' => 'left' ) )\n\t\t\t\t\t\t\t\t\t\t) );\n\t\t\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\n\t\twhile( $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\tif( $row['topic_hasattach'] )\n\t\t\t{\n\t\t\t\t$this->attach_pids[] = $row['pid'];\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Guest name?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$row['member_name'] = $row['member_name'] ? $row['member_name'] : $row['author_name'];\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Topic link\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$row['link-topic'] = $this->ipsclass->base_url.'showtopic='.$row['tid'];\n\t\t\t$row['link-forum'] = $this->ipsclass->base_url.'showforum='.$row['forum_id'];\n\t\t\t\n\t\t\t$topics[] = $row;\n\t\t}\n\t\t\n\t\tif( count( $this->attach_pids ) )\n\t\t{\n\t\t\t$final_attachments = array();\n\t\t\t\n\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'attachments',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"attach_rel_module='post' AND attach_rel_id IN (\".implode(\",\", $this->attach_pids).\")\"\n\t\t\t\t\t\t\t\t\t\t\t\t ) );\n\n\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\t\n\t\t\twhile ( $a = $this->ipsclass->DB->fetch_row() )\n\t\t\t{\n\t\t\t\t$final_attachments[ $a[ 'attach_pid' ] ][ $a['attach_id'] ] = $a;\n\t\t\t}\n\t\t\t\n\t\t\t$final_topics = array();\n\t\t\t\n\t\t\tforeach( $topics as $mytopic )\n\t\t\t{\n\t\t\t\t$this_topic_attachments = array();\n\t\t\t\t\n\t\t\t\tforeach ( $final_attachments as $pid => $data )\n\t\t\t\t{\n\t\t\t\t\tif( $pid <> $mytopic['pid'] )\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$temp_out = \"\";\n\t\t\t\t\t$temp_hold = array();\n\t\t\t\t\t\n\t\t\t\t\tforeach( $final_attachments[$pid] as $aid => $row )\n\t\t\t\t\t{\n\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t// Is it an image, and are we viewing the image in the post?\n\t\t\t\t\t\t//-----------------------------------------\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->ipsclass->vars['show_img_upload'] and $row['attach_is_image'] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( $this->ipsclass->vars['siu_thumb'] AND $row['attach_thumb_location'] AND $row['attach_thumb_width'] )\n\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t$this_topic_attachments[] = array( 'size' \t\t=> $this->ipsclass->size_format( $row['attach_filesize'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'method' \t=> 'post',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'id'\t\t=> $row['attach_id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'file'\t\t=> $row['attach_file'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'hits'\t\t=> $row['attach_hits'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_location'\t=> $row['attach_thumb_location'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=> 'thumb',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_x'\t=> $row['attach_thumb_width'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_y'\t=> $row['attach_thumb_height'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ext'\t\t=> $row['attach_ext'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this_topic_attachments[] = array( 'size' \t\t=> $this->ipsclass->size_format( $row['attach_filesize'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'method' \t=> 'post',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'id'\t\t=> $row['attach_id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'file'\t\t=> $row['attach_file'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'hits'\t\t=> $row['attach_hits'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_location'\t=> $row['attach_thumb_location'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=> 'image',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_x'\t=> $row['attach_thumb_width'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_y'\t=> $row['attach_thumb_height'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ext'\t\t=> $row['attach_ext'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\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\t$this_topic_attachments[] = array( 'size' \t\t=> $this->ipsclass->size_format( $row['attach_filesize'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'method' \t=> 'post',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'id'\t\t=> $row['attach_id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'file'\t\t=> $row['attach_file'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'hits'\t\t=> $row['attach_hits'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_location'\t=> $row['attach_thumb_location'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=> 'reg',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_x'\t=> $row['attach_thumb_width'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'thumb_y'\t=> $row['attach_thumb_height'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ext'\t\t=> $row['attach_ext'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif( count( $this_topic_attachments ) )\n\t\t\t\t{\n\t\t\t\t\t$mytopic['attachment_data'] = $this_topic_attachments;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$final_topics[] = $mytopic;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Return...\n\t\t//-----------------------------------------\n\t\t\t\t\n\t\tif( count( $final_topics ) )\n\t\t{\n\t\t\treturn $final_topics;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $topics;\n\t\t}\t\t\t\n\t}",
"public function authenticated_user_may_participate_in_forum_threads()\n {\n \t// Given we have an authenticated user.\n \t$user = factory('App\\User')->create();\n \t$this->be($user);\n \t// Given we have a thread.\n \t$thread = factory('App\\Thread')->create();\n \t// Given we have a reply.\n \t$reply = factory('App\\Reply')->make();\n \t// The user submits a reply.\n \t// $this->post('threads/'.$thread->id.'/replies', $reply->toArray()); also works\n \t$this->post($thread->path().'/replies', $reply->toArray());\n \t$this->get($thread->path())->assertSee($reply->body);\n }",
"public function posts()\n {\n return $this->hasMany('Efed\\Models\\ForumPost', 'topic_id', 'id');\n }",
"public function getTopicsList()\n {\n\n $topics = $this->forumRepo->getTopicsList();\n\n return View::make('forum.list', ['topics'=>$topics]);\n }",
"public function search($attributes) {\n return $this->queryNetForum($attributes);\n }",
"public function get_no_forums_message_markup() {\n\n\t\treturn __( 'There are currently no published forums with which to associate users.', 'wpauwf' );\n\n\t}",
"function drush_ti_amg_fw_topics_urls() {\n $batch = array();\n $batch_nodes = array();\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'node')->entityCondition('bundle', array('topic_page_child'), 'IN');\n $result = $query->execute();\n\n if ($result['node']) {\n $batch_nodes = array_keys($result['node']);\n }\n\n foreach ($batch_nodes as $nid) {\n $batch['operations'][] = array(\n '_ti_amg_fw_topics_do_drush_fix_urls',\n array(\n $nid,\n ),\n );\n }\n\n $batch['finished'] = '_ti_amg_fw_topics_do_drush_fix_urls_finished';\n batch_set($batch);\n drush_backend_batch_process();\n}",
"public function getNodes();",
"function index(){\n\t\t$sections = Sections::whereNull('sections_id')->get();\n\t\treturn view('forum.index')\n\t\t\t->with('forums', $sections);\n\t}",
"function getNodes()\n {\n }",
"function forum_get_discussions_fast($forum_id) {\n global $CFG, $USER;\n \n $timelimit='';\n if (!empty($CFG->forum_enabletimedposts)) {\n if (!((isadmin() and !empty($CFG->admineditalways)) || isteacher(get_field('forum', 'course', 'id', $forum_id)))) {\n $now = time();\n $timelimit = \" AND ((d.timestart = 0 OR d.timestart <= '$now') AND (d.timeend = 0 OR d.timeend > '$now')\";\n if (!empty($USER->id)) {\n $timelimit .= \" OR d.userid = '$USER->id'\";\n }\n $timelimit .= ')';\n }\n }\n \n $query = \"\n SELECT \n p.id, \n p.subject, \n p.discussion, \n p.message,\n p.created,\n d.groupid,\n p.userid, \n u.firstname, \n u.lastname\n FROM \n {$CFG->prefix}forum_discussions d\n JOIN \n {$CFG->prefix}forum_posts p \n ON \n p.discussion = d.id\n JOIN \n {$CFG->prefix}user u \n ON \n p.userid = u.id\n WHERE \n d.forum = '{$forum_id}' AND \n p.parent = 0\n $timelimit\n ORDER BY \n d.timemodified DESC\n \";\n return get_records_sql($query);\n}",
"public function latest_topics_main()\n \t{\n \t\t//-----------------------------------------\n \t\t// INIT\n \t\t//-----------------------------------------\n\n \t\t$attach_pids\t= array();\n \t\t$attach_posts\t= array();\n \t\t$forums\t\t\t= array();\n \t\t$rows\t\t\t= array();\n \t\t$output\t\t\t= array();\n\t\t$where_clause\t= array();\n \t\t$limit\t\t\t= $this->settings['latest_topics_main'] ? $this->settings['latest_topics_main'] : 3;\n \t\t$posts\t\t\t= intval($this->memberData['posts']);\n\n \t\t//-----------------------------------------\n \t// Grab articles new/recent in 1 bad ass query\n \t//-----------------------------------------\n\n \t\tforeach( explode( ',', $this->settings['portal_latest_topics_forums'] ) as $forum_id )\n \t\t{\n \t\t\tif( !$forum_id )\n \t\t\t{\n \t\t\t\tcontinue;\n \t\t\t}\n\n \t\t\t$forums[] = intval($forum_id);\n \t\t}\n \t\t\n \t\tif( !count($forums) )\n \t\t{\n \t\t\treturn;\n \t\t}\n\t\t\n\t\t/* Loop through the forums and build a list of forums we're allowed access to */\n\t\t$forumIdsOk = array();\n\t\n\t\tforeach( $this->registry->class_forums->forum_by_id as $id => $data )\n\t\t{\n\t\t\t/* Allowing this forum? */\n\t\t\tif ( ! in_array( $id, $forums ) )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t/* Can we read? */\n\t\t\tif ( ! $this->registry->permissions->check( 'read', $data ) )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/* Can read, but is it password protected, etc? */\n\t\t\tif ( ! $this->registry->class_forums->forumsCheckAccess( $id, 0, 'forum', array(), true ) )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( ! $data['can_view_others'] )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif ( $data['min_posts_view'] > $posts )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$forumIdsOk[] = $id;\n\t\t}\n\n\t\tif( !count($forumIdsOk) )\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t/* Add allowed forums */\n\t\t$where_clause[] = \"t.forum_id IN (\" . implode( \",\", $forumIdsOk ) . \")\";\n\n\t\t//-----------------------------------------\n\t\t// Will we need to parse attachments?\n\t\t//-----------------------------------------\n\t\t\n\t\t$parseAttachments\t= false;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Run query\n\t\t//-----------------------------------------\n\t\t\n\t\t$pinned = array();\n\t\t$unpinned = array();\n\t\t$all\t = array();\n\t\t$data = array();\n\t\t$count = 0;\n\t\t\n\t\tif( !$this->settings['portal_exclude_pinned'] )\n\t\t{\n\t\t\t/* Fetch all pinned topics to avoid filesort */\n\t\t\t$this->DB->build( array( 'select' => 't.tid, t.start_date',\n\t\t\t\t\t\t\t\t\t 'from' => 'topics t',\n\t\t\t\t\t\t\t\t\t 'where' => \"t.pinned=1 AND t.approved=1 AND t.state != 'link' AND \" . implode( ' AND ', $where_clause ),\n\t\t\t\t\t\t\t\t\t //'order' => 't.tid DESC',\n\t\t\t\t\t\t\t\t\t 'limit' => array ( $limit ) ) );\n\t\t\t\t\t\t\t\t\t\n\t\t\t$this->DB->execute();\n\t\t\t\n\t\t\twhile( $row = $this->DB->fetch() )\n\t\t\t{\n\t\t\t\t$pinned[ $row['start_date'] ] = $row['tid'];\n\t\t\t\t$all[ $row['start_date'] ] = $row['tid'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* Still need more? */\n\t\t\n\t\tif ( count( $pinned ) < $limit )\n\t\t{\n\t\t\t$pinnedWhere\t= $this->settings['portal_exclude_pinned'] ? \"\" : \"t.pinned=0 AND \";\n\t\t\t\n\t\t\t$this->DB->build( array( 'select' => 't.tid, t.start_date, t.last_post',\n\t\t\t\t\t\t\t\t\t 'from' => 'topics t',\n\t\t\t\t\t\t\t\t\t 'where' => $pinnedWhere . \"t.approved=1 AND t.state != 'link' AND \" . implode( ' AND ', $where_clause ),\n\t\t\t\t\t\t\t\t\t 'order' => 'tid DESC',\n\t\t\t\t\t\t\t\t\t 'limit' => array ( $limit - count( $pinned ) ) ) );\n\t\t\t\t\t\t\t\t\t\n\t\t\t$this->DB->execute();\n\t\t\t\n\t\t\twhile( $row = $this->DB->fetch() )\n\t\t\t{\n\t\t\t\t$unpinned[ $row['last_post'] ] = $row['tid'];\n\t\t\t\t$all[ $row['last_post'] ] = $row['tid'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* got anything? */\n\t\tif ( ! count( $all ) )\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->DB->build( array( \n\t\t\t\t\t\t\t\t'select'\t=> 't.*',\n\t\t\t\t\t\t\t\t'from'\t\t=> array( 'topics' => 't' ),\n\t\t\t\t\t\t\t\t'where'\t\t=> \"t.tid IN (\" . implode( \",\", array_values( $all ) ) . \")\",\n\t\t\t\t\t\t\t\t'add_join'\t=> array(\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'select'\t=> 'p.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t=> array( 'posts' => 'p' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t=> 'p.pid=t.topic_firstpost',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t=> 'left'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'select'\t=> 'f.id, f.name, f.name_seo, f.use_html',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t\t=> array( 'forums' => 'f' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t\t=> \"f.id=t.forum_id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=> 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'select'\t=> 'm.member_id, m.members_display_name, m.member_group_id, m.members_seo_name, m.mgroup_others, m.login_anonymous, m.last_visit, m.last_activity',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t\t=> array( 'members' => 'm' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t\t=> 'm.member_id=p.author_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=> 'left'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'select'\t=> 'pp.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from'\t\t=> array( 'profile_portal' => 'pp' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where'\t\t=> 'pp.pp_member_id=m.member_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type'\t\t=> 'left'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t)\t\t);\n\t\t\n\t\t$outer = $this->DB->execute();\n\t\t\n \t\t//-----------------------------------------\n \t\t// Loop through..\n \t\t//-----------------------------------------\n \t\t\n \t\twhile( $row = $this->DB->fetch($outer) )\n \t\t{\n\t\t\t$data[ $row['tid'] ] = $row;\n\t\t}\n\t\t\n\t\tkrsort( $unpinned );\n\t\tkrsort( $pinned );\n\t\t\n\t\tforeach( $unpinned as $date => $tid )\n\t\t{\n\t\t\tif ( count( $pinned ) < $limit )\n\t\t\t{\n\t\t\t\t$pinned[ $date ] = $tid;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$count++;\n\t\t}\n\t\t\n\t\t/* Now put it altogether */\n\t\tforeach( $pinned as $date => $tid )\n\t\t{\n \t\t\t//-----------------------------------------\n \t\t\t// INIT\n \t\t\t//-----------------------------------------\n \t\t\t\n\t\t\t$entry = $data[ $tid ];\n \t\t\t$bottom_string\t\t= \"\";\n \t\t\t$read_more\t\t\t= \"\";\n \t\t\t$top_string\t\t\t= \"\";\n \t\t\t$got_these_attach\t= 0;\n \t\t\t\n\t\t\tif( $entry['topic_hasattach'] )\n\t\t\t{\n\t\t\t\t$parseAttachments\t= true;\n\t\t\t}\n\n\t\t\t//-----------------------------------------\n\t\t\t// Parse the post\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tIPSText::getTextClass( 'bbcode' )->parse_smilies\t\t\t= $entry['use_emo'];\n\t\t\tIPSText::getTextClass( 'bbcode' )->parse_html\t\t\t\t= ( $entry['use_html'] and $entry['post_htmlstate'] ) ? 1 : 0;\n\t\t\tIPSText::getTextClass( 'bbcode' )->parse_nl2br\t\t\t\t= $entry['post_htmlstate'] == 2 ? 1 : 0;\n\t\t\tIPSText::getTextClass( 'bbcode' )->parse_bbcode\t\t\t\t= 1;\n\t\t\tIPSText::getTextClass( 'bbcode' )->parsing_section\t\t\t= 'topics';\n\t\t\tIPSText::getTextClass( 'bbcode' )->parsing_mgroup\t\t\t= $entry['member_group_id'];\n\t\t\tIPSText::getTextClass( 'bbcode' )->parsing_mgroup_others\t= $entry['mgroup_others'];\n\t\t\t$entry['post']\t= IPSText::getTextClass( 'bbcode' )->preDisplayParse( $entry['post'] );\n \t\t\t\n \t\t\t//-----------------------------------------\n \t\t\t// BASIC INFO\n \t\t\t//-----------------------------------------\n \t\t\t\n \t\t\t$real_posts\t\t\t= $entry['posts'];\n \t\t\t$entry['posts']\t\t= ipsRegistry::getClass('class_localization')->formatNumber(intval($entry['posts']));\n\n $entry\t= IPSMember::buildDisplayData( $entry );\n \n \t\t\t//-----------------------------------------\n\t\t\t// Attachments?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif( $entry['pid'] )\n\t\t\t{\n\t\t\t\t$attach_pids[ $entry['pid'] ] = $entry['pid'];\n\t\t\t} \t\t\t\n\n\t\t\tif ( IPSMember::checkPermissions('download', $entry['forum_id'] ) === FALSE )\n\t\t\t{\n\t\t\t\t$this->settings[ 'show_img_upload'] = 0 ;\n\t\t\t} \n \n $entry['share_links'] = IPSLib::shareLinks( $entry['title'], array( 'url' => $this->registry->output->buildSEOUrl( 'showtopic=' . $entry['tid'], 'publicNoSession', $entry['title_seo'], 'showtopic' ) ) );\n \t\t\t\n\t\t\t$rows[] = $entry;\n \t\t}\n \t\t\n \t\t$output = $this->registry->getClass('output')->getTemplate('portal')->articles( $rows );\n \t\t\n \t\t//-----------------------------------------\n \t\t// Process Attachments\n \t\t//-----------------------------------------\n \t\t\n \t\tif ( $parseAttachments AND count( $attach_pids ) )\n \t\t{\n\t\t\tif ( ! is_object( $this->class_attach ) )\n\t\t\t{\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Grab render attach class\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );\n\t\t\t\t$this->class_attach = new $classToLoad( $this->registry );\n\t\t\t\t\n\t\t\t\t$this->class_attach->attach_post_key = '';\n\n\t\t\t\tipsRegistry::getClass( 'class_localization' )->loadLanguageFile( array( 'public_topic' ), 'forums' );\n\t\t\t}\n\t\t\t\n\t\t\t$this->class_attach->attach_post_key\t= '';\n\t\t\t$this->class_attach->type\t\t\t\t= 'post';\n\t\t\t$this->class_attach->init();\n\t\t\n\t\t\t$output = $this->class_attach->renderAttachments( $output, $attach_pids );\n\t\t\t$output\t= $output[0]['html'];\n \t\t}\n \t\t\n \t\treturn $output;\n \t}",
"function phorum_mod_topic_poll_get_forumsettings($forum_id = NULL)\n{\n $PHORUM = $GLOBALS[\"PHORUM\"];\n\n if ($forum_id == NULL) {\n $forum_id = $PHORUM[\"forum_id\"];\n }\n\n if (isset($PHORUM[\"mod_topic_poll_settings_cache\"][$forum_id])) {\n return $PHORUM[\"mod_topic_poll_settings_cache\"][$forum_id];\n }\n\n $settings = isset($PHORUM[\"mod_topic_poll\"][$forum_id])\n ? $PHORUM[\"mod_topic_poll\"][$forum_id] : array();\n foreach ($PHORUM[\"mod_topic_poll_defaults\"] as $key => $val) {\n if (!isset($settings[$key])) {\n $settings[$key] = $val;\n }\n }\n\n $GLOBALS[\"PHORUM\"][\"mod_topic_poll_settings_cache\"][$forum_id] = $settings;\n return $settings;\n}",
"function forum_rss_feed_discussions($forum, $newsince=0) {\n\n global $CFG;\n\n $items = array();\n\n if ($newsince) {\n $newsince = \" AND p.modified > '$newsince'\";\n } else {\n $newsince = \"\";\n }\n\n if ($recs = get_records_sql (\"SELECT d.id AS discussionid, \n d.name AS discussionname, \n u.id AS userid, \n u.firstname AS userfirstname,\n u.lastname AS userlastname,\n p.message AS postmessage,\n p.created AS postcreated,\n p.format AS postformat\n FROM {$CFG->prefix}forum_discussions d,\n {$CFG->prefix}forum_posts p,\n {$CFG->prefix}user u\n WHERE d.forum = '$forum->id' AND\n p.discussion = d.id AND\n p.parent = 0 AND\n u.id = p.userid $newsince\n ORDER BY p.created desc\", 0, $forum->rssarticles)) {\n\n $item = NULL;\n $user = NULL;\n\n $formatoptions = new object;\n $formatoptions->trusttext = true;\n\n foreach ($recs as $rec) {\n unset($item);\n unset($user);\n $item->title = format_string($rec->discussionname);\n $user->firstname = $rec->userfirstname;\n $user->lastname = $rec->userlastname;\n $item->author = fullname($user);\n $item->pubdate = $rec->postcreated;\n $item->link = $CFG->wwwroot.\"/mod/forum/discuss.php?d=\".$rec->discussionid;\n $item->description = format_text($rec->postmessage,$rec->postformat,$formatoptions,$forum->course);\n $items[] = $item;\n }\n }\n return $items;\n }",
"function apoc_get_group_reply_info() {\n\n\tglobal $bp;\n\t$slug = $bp->action_variables[1];\n\t\n\tglobal $wpdb;\n\t$topic = $wpdb->get_row( \n\t\t$wpdb->prepare( \n\t\t\t\"SELECT post_title AS title, post_name AS url\n\t\t\tFROM $wpdb->posts \n\t\t\tWHERE ID = ( \n\t\t\t\tSELECT post_parent\n\t\t\t\tFROM $wpdb->posts\n\t\t\t\tWHERE post_name = %s )\",\n\t\t\t$slug )\n\t\t);\n\t\t\n\treturn( $topic );\n}",
"public static function GetAllByForumId($forum_id){\n global $db;\n $allPosts = $db->prepare('SELECT * FROM posts WHERE forum_id = :forum_id')->bindValue(':forum_id', $forum_id, PDO::PARAM_INT)->execute();\n $postList = array();\n while ($dataPost = $allPosts->fetch()){\n $newPost = new Post();\n $newPost->fill($dataPost);\n $postList[] = $newPost;\n }\n return $postList;\n }",
"function followedContentForumsWrapperForums($results) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<script type='text/javascript'>\n//<![CDATA[\n\tvar markerURL = ipb.vars['base_url'] + \"app=forums&module=ajax§ion=markasread&i=1\"; // Ajax URL so don't use &\n\tvar unreadIcon = \"<img src='{$this->settings['img_url']}/f_icon_read.png' />\";\n//]]>\n</script>\n<table class='ipb_table topic_list' id='forum_table'>\n\t<if test=\"count($results)\">\n\t\t<foreach loop=\"NCresultsAsForum:$results as $forum_data\">\n\t\t\t<tr class='<if test=\"$forum_data['_has_unread']\">unread</if>'>\n\t\t\t\t<td class='col_c_icon altrow'>\n\t\t\t\t\t<if test=\"$forum_data['_has_unread']\">\n\t\t\t\t\t\t<a id='forum_img_{$forum_data['id']}' href=\"{parse url=\"app=forums&module=forums&section=markasread&marktype=forum&forumid={$forum_data['id']}&returntoforumid={$this->request['f']}&i=1\" base=\"public\"}\" data-tooltip=\"{$this->lang->words['bi_markread']}\" class='forum_marker'><img src='{$this->settings['img_url']}/f_icon.png' /></a>\n\t\t\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\t\tipb.global.registerMarker( \"forum_img_{$forum_data['id']}\", \"{$forum_data['img_new_post']}\", markerURL + \"&forumid={$forum_data['id']}\" );\n\t\t\t\t\t\t</script>\n\t\t\t\t\t<else />\n\t\t\t\t\t\t<img src='{$this->settings['img_url']}/f_icon_read.png' />\n\t\t\t\t\t</if>\n\t\t\t\t</td>\n\t\t\t\t<td class='col_c_forum'>\n\t\t\t\t\t<h4><a href=\"{parse url=\"showforum={$forum_data['id']}\" seotitle=\"{$forum_data['name_seo']}\" template=\"showforum\" base=\"public\"}\" title='{$forum_data['name']}'>{$forum_data['name']}</a></h4>\n\t\t\t\t\t\n\t\t\t\t\t<if test=\"showSubForums:|:$forum_data['show_subforums'] AND count( $forum_data['subforums'] ) AND $forum_data['show_subforums']\">\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<ol class='ipsList_inline ipsType_small subforums toggle_notify_off' id='subforums_{$forum_data['id']}'>\n\t\t\t\t\t\t\t<foreach loop=\"subforums:$forum_data['subforums'] as $__id => $__data\">\n\t\t\t\t\t\t\t\t<if test=\"showSubForumsLit:|:$__data[3]\"><li class='unread'><else /><li></if>\n\t\t\t\t\t\t\t\t\t<a href=\"{parse url=\"showforum={$__data[0]}\" seotitle=\"{$__data[2]}\" template=\"showforum\" base=\"public\"}\" title='{$__data[1]}'>{$__data[1]}</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</foreach>\n\t\t\t\t\t\t</ol>\n\t\t\t\t\t</if>\n\t\t\t\t\t<if test=\"isFollowedStuff:|:count($forum_data['_followData'])\">\n\t\t\t\t\t\t{parse template=\"followData\" group=\"search\" params=\"$forum_data['_followData']\"}\n\t\t\t\t\t</if>\n\t\t\t\t</td>\n\t\t\t\t<td class='col_c_stats ipsType_small'>\n\t\t\t\t\t<strong>{$forum_data['topics']}</strong> {$this->lang->words['topics']}<br />\n\t\t\t\t\t<strong>{$forum_data['posts']}</strong> {$this->lang->words['replies']}\n\t\t\t\t</td>\n\t\t\t\t<td class='col_c_post'>\n\t\t\t\t\t<if test=\"hideLastInfo:|:$forum_data['hide_last_info']\">\n\t\t\t\t\t\t<ul class='last_post'>\n\t\t\t\t\t\t\t<li class='desc'>{$this->lang->words['f_protected']}</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t<else />\n\t\t\t\t\t\t<if test=\"hasphoto:|:$forum_data['pp_small_photo'] AND !$forum_data['hide_last_info']\">\n\t\t\t\t\t\t\t<a href='{parse url=\"showuser={$forum_data['last_poster_id']}\" template=\"showuser\" seotitle=\"{$forum_data['seo_last_name']}\" base=\"public\"}' class='ipsUserPhotoLink left'>\n\t\t\t\t\t\t\t\t<img src='{$forum_data['pp_small_photo']}' alt='{$this->lang->words['photo']}' class='ipsUserPhoto ipsUserPhoto_mini' />\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</if>\n\t\t\t\t\t\t<ul class='last_post ipsType_small'>\n\t\t\t\t\t\t\t<if test=\"!$forum_data['last_id']\">\n\t\t\t\t\t\t\t\t<li class='desc lighter'><em>{$this->lang->words['f_none']}</em></li>\n\t\t\t\t\t\t\t<else />\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a href='{parse url=\"showtopic={$forum_data['last_topic_id']}&view=getnewpost\" seotitle=\"{$forum_data['seo_last_title']}\" template=\"showtopic\" base=\"public\"}' title=\"{$this->lang->words['view_new_post']}\">\n\t\t\t\t\t\t\t\t\t\t{parse expression=\"IPSText::truncate( $forum_data['last_title'], 28)\"}\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<if test=\"lastPosterID:|:$forum_data['last_poster_id']\">\n\t\t\t\t\t\t\t\t\t<li>{$this->lang->words['by_ucfirst']} {parse template=\"userHoverCard\" group=\"global\" params=\"$forum_data\"}</li>\n\t\t\t\t\t\t\t\t</if>\n\t\t\t\t\t\t\t\t<if test=\"hideDateUrl:|:$forum_data['_hide_last_date']\">\n\t\t\t\t\t\t\t\t\t<li class='desc lighter'>{parse date=\"$forum_data['last_post']\" format=\"DATE\"}</li>\n\t\t\t\t\t\t\t\t<else />\n\t\t\t\t\t\t\t\t\t<li class='desc lighter blend_links'><a href='{parse url=\"showtopic={$forum_data['last_id']}&view=getlastpost\" base=\"public\" template=\"showtopic\" seotitle=\"{$forum_data['seo_last_title']}\"}' title='{$this->lang->words['view_last_post']}'>{parse date=\"$forum_data['last_post']\" format=\"DATE\"}</a></li>\n\t\t\t\t\t\t\t\t</if>\n\t\t\t\t\t\t\t</if>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</if>\n\t\t\t\t</td>\n\t\t\t\t<td class='col_f_mod'>\n\t\t\t\t\t<input class='input_check checkall toggle_notify_on' type=\"checkbox\" name=\"likes[]\" value=\"{$forum_data['_followData']['like_app']}-{$forum_data['_followData']['like_area']}-{$forum_data['_followData']['like_rel_id']}\" />\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</foreach>\n\t</if>\n</table>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}",
"protected function queryNetForum($attributes) {\n $ret = array();\n \n // Establish a connection and authenticate\n \n $NF = $this->instantiateNetForum($this->pluginCfg['serverurl']);\n $NF->connect($this->pluginCfg['serverurl'], $this->pluginCfg['username'], $this->pluginCfg['password']);\n \n // If more than one search attribute was provided, we'll OR the results\n \n if(!empty($attributes['cstkey'])) {\n $ret = array_merge($ret, $NF->queryByCustomerKey($attributes['cstkey'],\n $this->pluginCfg['query_events'],\n $this->pluginCfg['query_committees']));\n }\n \n if(!empty($attributes['mail'])) {\n // This appears to be an \"exact\" search\n \n // The UAT server injects a . into email addresses to make them undeliverable.\n // As a convenience, if we detect that we are configured against the UAT server\n // we'll inject the dot into the search string so the user doesn't need to.\n \n $searchEmail = $attributes['mail'];\n \n if($this->pluginCfg['serverurl'] == 'https://uat.netforumpro.com') {\n $searchEmail = str_replace('@', '@.', $attributes['mail']);\n }\n \n $ret = array_merge($ret, $NF->queryByEmail($searchEmail));\n }\n \n if(!empty($attributes['cn'])) {\n $ret = array_merge($ret, $NF->queryByName($attributes['cn']));\n }\n \n return $ret;\n }",
"public function topics() {\n\t\treturn $this->hasMany(Forum::getTopicClass(), \"section_id\")->orderBy(\"id\", \"desc\");\n\t}",
"public function show(Forum $forum)\n {\n return $forum;\n }",
"private function fetchThreads() {\n\t\t\t$query = '';\n\t\t\t$boards = listBoards(true);\n\n\t\t\tforeach ($boards as $b) {\n\t\t\t\tif (in_array($b, $this->settings['exclude']))\n\t\t\t\t\tcontinue;\n\t\t\t\t// Threads are those posts that have no parent thread\n\t\t\t\t$query .= \"SELECT *, '$b' AS `board` FROM ``posts_$b`` \" .\n\t\t\t\t\t\"WHERE `thread` IS NULL UNION ALL \";\n\t\t\t}\n\n\t\t\t$query = preg_replace('/UNION ALL $/', 'ORDER BY `bump` DESC', $query);\n\t\t\t$result = query($query) or error(db_error());\n\n\t\t\treturn $result->fetchAll(PDO::FETCH_ASSOC);\n\t\t}",
"public function run()\n {\n \n #foreach($this->toTruncate as $table) {\n # DB::table($table)->truncate();\n #}\n \n \n // Parent forum categories\n $general = $this->CreateCategory('General', 'General Discussion', 10);\n $nost = $this->CreateCategory('Odyssey', 'Nostalrius - PvE - Alliance', 20);\n $offtopic = $this->CreateCategory('Off Topic', 'Random Discussion', 30);\n \n // Subcategories\n $public = $this->CreateCategory('Public', 'Public Discussion', 10, $nost->id);\n $guild = $this->CreateCategory('Guild', 'Member only discussion', 20, $nost->id);\n $officer = $this->CreateCategory('Officers', 'Officer Discussion', 30, $nost->id);\n \n // Forums - General\n $this->CreateForum('News and Announcements', 'Important information regarding this site', 10, $general->id);\n $this->CreateForum('Feature Requests', 'Let us know what you would like to see', 20, $general->id);\n $this->CreateForum('General Discussion', 'For discussion related to the site as a whole', 30, $general->id);\n \n // Public\n $this->CreateForum('Guild News', 'Important updates regarding the guild', 10, $public->id);\n $this->CreateForum('Public Discussion', 'All Welcome!', 20, $public->id);\n $this->CreateForum('Rules and Guidelines', 'Things you should read', 30, $public->id);\n \n // Guild\n $this->CreateForum('Member Discussion', 'Private discussion', 10, $guild->id);\n $this->CreateForum('Strategies', 'Collection of strategies to be used', 20, $guild->id);\n $this->CreateForum('Off Topic', 'Post whatever', 30, $guild->id);\n \n // Officer\n $this->CreateForum('Officer Discussion', 'Management Only', 10, $officer->id);\n $this->CreateForum('Applications', 'Applications posted here for discussion', 20, $officer->id);\n \n //Off Topic\n $this->CreateForum('Off Topic', 'Randomness Encouraged', 10, $offtopic->id);\n }",
"function pnForum_pntables()\n{\n // Initialise table array\n $pntable = array();\n\n // Set the column names. Note that the array has been formatted\n // on-screen to be very easy to read by a user.\n\n $pnforum_categories = pnConfigGetVar('prefix') . '_pnforum_categories';\n $pntable['pnforum_categories'] = $pnforum_categories;\n $pntable['pnforum_categories_column'] = array('cat_id' => $pnforum_categories . '.cat_id',\n 'cat_title' => $pnforum_categories . '.cat_title',\n 'cat_order' => $pnforum_categories . '.cat_order');\n\n $pnforum_forum_mods = pnConfigGetVar('prefix') . '_pnforum_forum_mods';\n $pntable['pnforum_forum_mods'] = $pnforum_forum_mods;\n $pntable['pnforum_forum_mods_column'] = array('forum_id' => $pnforum_forum_mods . '.forum_id',\n 'user_id' => $pnforum_forum_mods . '.user_id');\n\n $pnforum_forums = pnConfigGetVar('prefix') . '_pnforum_forums';\n $pntable['pnforum_forums'] = $pnforum_forums;\n $pntable['pnforum_forums_column'] = array('forum_id' => $pnforum_forums . '.forum_id',\n 'forum_name' => $pnforum_forums . '.forum_name',\n 'forum_desc' => $pnforum_forums . '.forum_desc',\n 'forum_access' => $pnforum_forums . '.forum_access',\n 'forum_topics' => $pnforum_forums . '.forum_topics',\n 'forum_posts' => $pnforum_forums . '.forum_posts',\n 'forum_last_post_id' => $pnforum_forums . '.forum_last_post_id',\n 'cat_id' => $pnforum_forums . '.cat_id',\n 'forum_type' => $pnforum_forums . '.forum_type',\n 'forum_order' => $pnforum_forums . '.forum_order',\n 'forum_pop3_active' => $pnforum_forums . '.forum_pop3_active',\n 'forum_pop3_server' => $pnforum_forums . '.forum_pop3_server',\n 'forum_pop3_port' => $pnforum_forums . '.forum_pop3_port',\n 'forum_pop3_login' => $pnforum_forums . '.forum_pop3_login',\n 'forum_pop3_password' => $pnforum_forums . '.forum_pop3_password',\n 'forum_pop3_interval' => $pnforum_forums . '.forum_pop3_interval',\n 'forum_pop3_lastconnect' => $pnforum_forums . '.forum_pop3_lastconnect',\n 'forum_pop3_pnuser' => $pnforum_forums . '.forum_pop3_pnuser',\n 'forum_pop3_pnpassword' => $pnforum_forums . '.forum_pop3_pnpassword',\n 'forum_pop3_matchstring' => $pnforum_forums . '.forum_pop3_matchstring',\n 'forum_moduleref' => $pnforum_forums . '.forum_moduleref',\n 'forum_pntopic' => $pnforum_forums . '.forum_pntopic'\n );\n\n $pnforum_posts = pnConfigGetVar('prefix') . '_pnforum_posts';\n $pntable['pnforum_posts'] = $pnforum_posts;\n $pntable['pnforum_posts_column'] = array('post_id' => $pnforum_posts . '.post_id',\n 'topic_id' => $pnforum_posts . '.topic_id',\n 'forum_id' => $pnforum_posts . '.forum_id',\n 'poster_id' => $pnforum_posts . '.poster_id',\n 'post_time' => $pnforum_posts . '.post_time',\n 'poster_ip' => $pnforum_posts . '.poster_ip',\n 'post_msgid' => $pnforum_posts . '.post_msgid');\n\n $pnforum_posts_text = pnConfigGetVar('prefix') . '_pnforum_posts_text';\n $pntable['pnforum_posts_text'] = $pnforum_posts_text;\n $pntable['pnforum_posts_text_column'] = array('post_id' => $pnforum_posts_text . '.post_id',\n 'post_text' => $pnforum_posts_text . '.post_text');\n\n $pnforum_ranks = pnConfigGetVar('prefix') . '_pnforum_ranks';\n $pntable['pnforum_ranks'] = $pnforum_ranks;\n $pntable['pnforum_ranks_column'] = array('rank_id' => $pnforum_ranks . '.rank_id',\n 'rank_title' => $pnforum_ranks . '.rank_title',\n 'rank_min' => $pnforum_ranks . '.rank_min',\n 'rank_max' => $pnforum_ranks . '.rank_max',\n 'rank_special' => $pnforum_ranks . '.rank_special',\n 'rank_image' => $pnforum_ranks . '.rank_image',\n 'rank_style' => $pnforum_ranks . '.rank_style');\n\n $pnforum_subscription = pnConfigGetVar('prefix') . '_pnforum_subscription';\n $pntable['pnforum_subscription'] = $pnforum_subscription;\n $pntable['pnforum_subscription_column'] = array('msg_id' => $pnforum_subscription . '.msg_id',\n 'forum_id' => $pnforum_subscription . '.forum_id',\n 'user_id' => $pnforum_subscription . '.user_id');\n\n $pnforum_topics = pnConfigGetVar('prefix') . '_pnforum_topics';\n $pntable['pnforum_topics'] = $pnforum_topics;\n $pntable['pnforum_topics_column'] = array('topic_id' => $pnforum_topics . '.topic_id',\n 'topic_title' => $pnforum_topics . '.topic_title',\n 'topic_poster' => $pnforum_topics . '.topic_poster',\n 'topic_time' => $pnforum_topics . '.topic_time',\n 'topic_views' => $pnforum_topics . '.topic_views',\n 'topic_replies' => $pnforum_topics . '.topic_replies',\n 'topic_last_post_id' => $pnforum_topics . '.topic_last_post_id',\n 'forum_id' => $pnforum_topics . '.forum_id',\n 'topic_status' => $pnforum_topics . '.topic_status',\n 'topic_notify' => $pnforum_topics . '.topic_notify',\n 'sticky' => $pnforum_topics . '.sticky',\n 'sticky_label' => $pnforum_topics . '.sticky_label',\n 'poll_id' => $pnforum_topics . '.poll_id',\n 'topic_reference' => $pnforum_topics . '.topic_reference');\n\n\n $pnforum_users = pnConfigGetVar('prefix') . '_pnforum_users';\n $pntable['pnforum_users'] = $pnforum_users;\n $pntable['pnforum_users_column'] = array('user_id' => $pnforum_users . '.user_id',\n 'user_posts' => $pnforum_users . '.user_posts',\n 'user_rank' => $pnforum_users . '.user_rank',\n 'user_level' => $pnforum_users . '.user_level',\n 'user_lastvisit' => $pnforum_users . '.user_lastvisit',\n 'user_favorites' => $pnforum_users . '.user_favorites',\n 'user_post_order' => $pnforum_users . '.user_post_order');\n\n // new in 1.7.5\n $pnforum_topic_subscription = pnConfigGetVar('prefix') . '_pnforum_topic_subscription';\n $pntable['pnforum_topic_subscription'] = $pnforum_topic_subscription;\n $pntable['pnforum_topic_subscription_column'] = array('topic_id' => $pnforum_topic_subscription . '.topic_id',\n 'forum_id' => $pnforum_topic_subscription . '.forum_id',\n 'user_id' => $pnforum_topic_subscription . '.user_id');\n\n // new in 2.0.1\n $pnforum_forum_favorites = pnConfigGetVar('prefix') . '_pnforum_forum_favorites';\n $pntable['pnforum_forum_favorites'] = $pnforum_forum_favorites;\n $pntable['pnforum_forum_favorites_column'] = array('forum_id' => $pnforum_forum_favorites . '.forum_id',\n 'user_id' => $pnforum_forum_favorites . '.user_id');\n\n\n // Return the table information\n return $pntable;\n}",
"function getForumHolder() {\n\t\t$holders = DataObject::get(\"ForumHolder\");\n\t\tif($holders) {\n\t\t\tforeach($holders as $holder) {\n\t\t\t\tif($holder->canView()) return $holder;\n\t\t\t}\n\t\t}\n\n\t\t// no usable forums\n\t\t$messageSet = array(\n\t\t\t'default' => _t('Forum.LOGINTOPOST','You\\'ll need to login before you can post to that forum. Please do so below.'),\n\t\t\t'alreadyLoggedIn' => _t('Forum.NOPOSTPERMISSION','I\\'m sorry, but you do not have permission to this edit this profile.'),\n\t\t\t'logInAgain' => _t('Forum.LOGINTOPOSTAGAIN','You have been logged out of the forums. If you would like to log in again to post, enter a username and password below.'),\n\t\t);\n\n\t\treturn Security::permissionFailure($this, $messageSet);\n\t}",
"function printPosts($forumId) {\n\n global $array;\n\n foreach($array AS $row) {\n if($row['forum_id'] == $forumId)\n echo \"<li><a class='white-background-link' href='view_post.php?forum=\"\n . $forumId . \"&post=\" \n . $row[\"post_id\"] . \"'>\" \n . $row[\"post_title\"] . \"</a></li>\";\n }\n}",
"public function clearForumFavorites()\n {\n $this->favoriteForums->clear();\n }",
"public function getAllThreads($a_topic_id, $is_moderator = false)\n\t{\n\t\tglobal $ilDB, $ilUser;\n\n\t\t$this->threads = array();\n\t\t\n\t\t$data = array();\n\t\t$data_types = array();\n\n\t\t$query = 'SELECT thr_pk, MAX(pos_date) post_date, is_sticky, thr_date\n\t\t\t\t FROM frm_threads\n\t\t\t\t LEFT JOIN frm_posts ON pos_thr_fk = thr_pk';\n\t\t\n\t\tif (!$is_moderator) \n\t\t{\n\t\t\t$query .= ' AND (pos_status = %s \n\t\t\t\t\t\tOR (pos_status = %s \n\t\t\t\t\t\tAND pos_usr_id = %s))';\n\t\t\t\n\t\t\tarray_push($data_types, 'integer', 'integer', 'integer');\n\t\t\tarray_push($data, '1', '0', $ilUser->getId());\n\t\t\t\n\t\t}\n\t\t$query .= ' WHERE thr_top_fk = %s\n\t\t\t\t GROUP BY thr_pk, is_sticky, thr_date\n\t\t\t\t ORDER BY is_sticky DESC, post_date DESC, thr_date DESC';\n\t\t\n\t\n\t\tarray_push($data_types, 'integer');\n\t\tarray_push($data, $a_topic_id);\n\n\n\t\t$res = $ilDB->queryf($query, $data_types, $data);\n\n\t\twhile ($row = $ilDB->fetchObject($res))\n\t\t{\n\t\t\t\n\t\t\t$this->threads[] = new ilForumTopic($row->thr_pk);\n\t\t}\n\n\t\treturn $this->threads;\t\n\t}",
"function forumAdvancedSearchFilters($forums, $archivedPostCount=0, $topic) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<fieldset class='{parse striping=\"search\"}'>\n\t<span class='search_msg'>\n\t\t{$this->lang->words['s_forum_desc']}\n\t</span>\n\t<ul class='ipsForm_horizontal'>\n\t\t<if test=\"hasArchives:|:$archivedPostCount > 0\">\n\t\t\t<li class='ipsField clear'>\n\t\t\t\t<label class='ipsField_title' for='forums_display'>{$this->lang->words['fs_search_type_title']}</label>\n\t\t\t\t<p class='ipsField_content'>\n\t\t\t\t\t<input type='radio' name='search_app_filters[forums][liveOrArchive]' value='live' checked=\"checked\" /> {$this->lang->words['fs_search_type_live']} \n\t\t\t\t\t<input type='radio' name='search_app_filters[forums][liveOrArchive]' value='archive' /> {$this->lang->words['fs_search_type_archive']}\n\t\t\t\t</p>\n\t\t\t</li>\n\t\t</if>\n\t\t<li class='ipsField ipsField_select clear'>\n\t\t\t<if test=\"is_null( $topic )\">\n\t\t\t\t<label class='ipsField_title' for='forums_filter'>{$this->lang->words['find_forum']}</label>\n\t\t\t\t<p class='ipsField_content'>\n\t\t\t\t\t<select name='search_app_filters[forums][forums][]' class='input input_select' size='6' multiple='multiple'>\n\t\t\t\t\t\t{$forums}\n\t\t\t\t\t</select>\n\t\t\t\t</p>\n\t\t\t<else />\n\t\t\t\t<input type='hidden' name='cType' value='topic' />\n\t\t\t\t<input type='hidden' name='cId' value='{$topic['tid']}' />\n\t\t\t\t<label class='ipsField_title' for='topic_checkbox'>{$this->lang->words['find_topic']}</label>\n\t\t\t\t<p class='ipsField_content'>\n\t\t\t\t\t{$topic['title']}\n\t\t\t\t</p>\n\t\t\t</if>\n\t\t</li>\n\t\t<li class='ipsField clear'>\n\t\t\t<label class='ipsField_title' for='forums_display'>{$this->lang->words['s_forum_display']}</label>\n\t\t\t<p class='ipsField_content'>\n\t\t\t\t<input type='radio' name='search_app_filters[forums][noPreview]' value='0' /> {$this->lang->words['s_forum_asposts']} \n\t\t\t\t<input type='radio' name='search_app_filters[forums][noPreview]' value='1' checked=\"checked\" /> {$this->lang->words['s_forum_astopics']}\n\t\t\t</p>\n\t\t</li>\n\t\t<li class='ipsField clear'>\n\t\t\t<label class='ipsField_title' for='f_p_data'>{$this->lang->words['s_forum_stuff']}</label>\n\t\t\t<p class='ipsField_content'>\n\t\t\t\t{parse expression=\"sprintf( $this->lang->words['s_forum_stuff_2'], \"<input id='f_p_count' type='text' name='search_app_filters[forums][pCount]' class='input_text' style='vertical-align: middle; width:40px' size='5' value='' />\", \"<input id='f_p_views' type='text' name='search_app_filters[forums][pViews]' class='input_text' style='vertical-align: middle; width:40px' size='5' value='' />\")\"}\n\t\t\t</p>\n\t\t</li>\n\t</ul>\n</fieldset>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}",
"public function actionSocialForums()\r\n {\r\n /* @var $socialForumModel ThemeHouse_SocialGroups_Model_SocialForum */\r\n $socialForumModel = ThemeHouse_SocialGroups_SocialForum::getSocialForumModel();\r\n $forumWatchModel = $this->_getForumWatchModel();\r\n $visitor = XenForo_Visitor::getInstance();\r\n\r\n $socialForumsWatched = $forumWatchModel->getUserSocialForumWatchByUser($visitor['user_id']);\r\n\r\n $socialForumIds = array_keys($socialForumsWatched);\r\n\r\n $fetchOptions = array(\r\n 'join' => ThemeHouse_SocialGroups_Model_SocialForum::FETCH_SOCIAL_MEMBER |\r\n ThemeHouse_SocialGroups_Model_SocialForum::FETCH_AVATAR,\r\n 'readUserId' => $visitor['user_id']\r\n );\r\n\r\n $socialForums = $socialForumModel->getSocialForumsByIds($socialForumIds, $fetchOptions);\r\n\r\n foreach ($socialForums as &$socialForum) {\r\n $socialForum = $socialForumModel->prepareSocialForum($socialForum);\r\n }\r\n\r\n $viewParams = array(\r\n 'socialForums' => $socialForums,\r\n 'socialForumsWatched' => $socialForumsWatched\r\n );\r\n\r\n return $this->responseView('ThemeHouse_SocialGroups_ViewPublic_Watched_SocialForums', 'th_watch_social_forums_socialgroups', $viewParams);\r\n }"
] | [
"0.6809902",
"0.64836293",
"0.62971747",
"0.62333465",
"0.6196451",
"0.6077108",
"0.6073764",
"0.6012346",
"0.5999543",
"0.59736747",
"0.59313697",
"0.5922558",
"0.59117043",
"0.5878383",
"0.5867455",
"0.5851826",
"0.5819603",
"0.57968575",
"0.5795073",
"0.57663786",
"0.5745191",
"0.5718643",
"0.5660524",
"0.5625138",
"0.56206757",
"0.56160426",
"0.56045943",
"0.5590736",
"0.5586715",
"0.5566211",
"0.5565268",
"0.55650383",
"0.55408984",
"0.55245185",
"0.5501101",
"0.5471082",
"0.54701865",
"0.54641855",
"0.545781",
"0.543497",
"0.54328823",
"0.5430536",
"0.5429359",
"0.5412699",
"0.54103905",
"0.5384576",
"0.5380832",
"0.53708994",
"0.53587705",
"0.53548914",
"0.5347453",
"0.5341302",
"0.53210354",
"0.5311149",
"0.53079915",
"0.53031117",
"0.5302536",
"0.5300122",
"0.52894497",
"0.5284186",
"0.5257274",
"0.5256194",
"0.5252971",
"0.5245763",
"0.5232716",
"0.5230242",
"0.5225821",
"0.52134186",
"0.52125144",
"0.5204881",
"0.5183537",
"0.5176367",
"0.5167146",
"0.5164756",
"0.5161934",
"0.51579",
"0.5154779",
"0.5145821",
"0.51413876",
"0.5139487",
"0.51386166",
"0.51305985",
"0.51297486",
"0.5125044",
"0.51185054",
"0.51024354",
"0.5094823",
"0.5093294",
"0.50846845",
"0.5079392",
"0.5078534",
"0.50780135",
"0.50709105",
"0.5057667",
"0.50563306",
"0.50550586",
"0.50536805",
"0.5049587",
"0.50346124",
"0.50292665"
] | 0.7513412 | 0 |
Helper method to retrieve content type ids | protected function fetchType( $type )
{
if ( count( $this->typesCache ) )
{
return $this->typesCache[$type];
}
else
{
foreach( $this->db->select( '*', 'contenttype' ) AS $contenttype )
{
$this->typesCache[$contenttype['class']] = $contenttype['contenttypeid'];
}
return $this->typesCache[$type];
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function get_type_ids($type) {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->get_col($wpdb->prepare(\"SELECT `ID` FROM {$wpdb->posts} WHERE `post_type` = 'attachment' AND `post_status` = 'inherit' AND `post_mime_type` LIKE '%s/%%'\", $type));\n\t}",
"public function idTypes();",
"function get_custom_fied_ids($p_types) {\n\t\t\t$t_custom_field_table = db_get_table( 'mantis_custom_field_table' );\n\t\t\t$query = \"SELECT *\n\t\t\t\t\t FROM $t_custom_field_table\n\t\t\t\t\t ORDER BY name ASC\";\n\t\t\t$result = db_query_bound( $query );\n\t\t\t$t_row_count = db_num_rows( $result );\n\t\t\t$t_ids = array();\n\t\n\t\t\tfor( $i = 0;$i < $t_row_count;$i++ ) {\n\t\t\t\t$row = db_fetch_array( $result );\n\t\t\t\tforeach($p_types as $t_type) {\n\t\t\t\t\tif($row['type'] == $t_type) {\n\t\t\t\t\t\tarray_push( $t_ids, $row['id'] );\n\t\t\t\t\t}\n\t\t\t\t\t/* Else do nothing */\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn $t_ids;\n\t\t}",
"function &ListContentTypes()\n\t{\n\t\tglobal $gCms;\n\t\t$contenttypes =& $gCms->contenttypes;\n\t\t\n\t\tif (isset($gCms->variables['contenttypes']))\n\t\t{\n\t\t\t$variables =& $gCms->variables;\n\t\t\treturn $variables['contenttypes'];\n\t\t}\n\t\t\n\t\t$result = array();\n\t\t\n\t\treset($contenttypes);\n\t\twhile (list($key) = each($contenttypes))\n\t\t{\n\t\t\t$value =& $contenttypes[$key];\n\t\t\t$result[] = $value->type;\n\t\t}\n\t\t\n\t\t$variables =& $gCms->variables;\n\t\t$variables['contenttypes'] =& $result;\n\n\t\treturn $result;\n\t}",
"function getInitiateTypes()\n{\n $database = eZDB::globalDatabase();\n $res_array = array();\n $qry_array = array();\n\n $query= \"SELECT ID FROM eZClassified_InitiateType\";\n $database->array_query( $qry_array, $query );\n foreach ( $qry_array as $qry_item )\n {\n $res_array[] = $qry_item[\"ID\"];\n }\n return $res_array;\n}",
"private function getContentTypes() {\n return NodeType::loadMultiple();\n }",
"public static function getTypesById()\n {\n return array_flip(self::getTypes());\n }",
"function jgantt_dashboard_get_content_types() {\n $types = array();\n $result = db_query('SELECT d.node_type, d.configuration\n FROM {jgantt_dashboard} d WHERE d.status = :status', array(':status' => 1));\n\n foreach ($result as $record) {\n $types[$record->node_type] = $record;\n }\n return $types;\n}",
"public function getContentTypeId() : int\n {\n $rtn = $this->data['content_type_id'];\n\n return $rtn;\n }",
"public static function getContentTypes() {\n $contentTypes = Content::$contentTypes;\n return $contentTypes;\n }",
"function content_list_of($type_id, $category_id) {\n\n global $data_base, $env;\n\n if ($env == \"prod\") {\n\n $request = $data_base->prepare(\"\n SELECT content_id\n FROM imago_info_content \n WHERE type = ? \n AND category = ?\n AND env = ?\n AND ppv = 'no'\n ORDER BY content_id ASC\n \");\n\n $request->execute(array($type_id, $category_id, $env));\n }\n\n else {\n\n $request = $data_base->prepare(\"\n SELECT content_id\n FROM imago_info_content \n WHERE type = ? \n AND category = ?\n AND ppv = 'no'\n ORDER BY content_id ASC\n \");\n\n $request->execute(array($type_id, $category_id));\n\n }\n\n return $request->fetchAll(PDO::FETCH_COLUMN, 0);\n }",
"public function getIdentifiers($type = null)\n {\n if ($type === null) {\n return array_keys($this->map);\n\n } else {\n // Collect the data.\n $result = array();\n foreach ($this->map as $identifier => $file) {\n if ($file['type'] === $type) {\n // filter by type\n $result[] = $identifier;\n }\n }\n\n return $result;\n }\n }",
"public function getTypeIds()\n {\n return array(\n Enterprise_TargetRule_Model_Rule::RELATED_PRODUCTS,\n Enterprise_TargetRule_Model_Rule::UP_SELLS,\n Enterprise_TargetRule_Model_Rule::CROSS_SELLS\n );\n }",
"function admin_get_idtemplates()\n{\n global $app;\n\n $idtemplates = $app->bbs->idTemplates();\n $idtypes = $app->calibre->idTypes();\n $ids2add = [];\n foreach ($idtypes as $idtype) {\n if (empty($idtemplates)) {\n array_push($ids2add, $idtype['type']);\n } else {\n $found = false;\n foreach ($idtemplates as $idtemplate) {\n if ($idtype['type'] === $idtemplate->name) {\n $found = true;\n break;\n }\n }\n if (!$found) {\n array_push($ids2add, $idtype['type']);\n }\n }\n }\n foreach ($ids2add as $id2add) {\n $ni = new IdUrlTemplate();\n $ni->name = $id2add;\n $ni->val = '';\n $ni->label = '';\n array_push($idtemplates, $ni);\n }\n $app->getLog()->debug('admin_get_idtemplates ' . var_export($idtemplates, true));\n $app->render('admin_idtemplates.html', [\n 'page' => mkPage(getMessageString('admin_idtemplates'), 0, 2),\n 'templates' => $idtemplates,\n 'isadmin' => is_admin()]);\n}",
"function getExtIdCustomFieldCandidates() {\n // Mantis customFields types\n $mType_string = 0;\n $mType_numeric = 1;\n\n $query = \"SELECT * FROM `mantis_custom_field_table` WHERE `type` IN ($mType_string, $mType_numeric) ORDER BY name\";\n $result = SqlWrapper::getInstance()->sql_query($query);\n if (!$result) {\n throw new Exception(\"get ExtId candidates FAILED\");\n }\n\n $candidates = array();\n while ($row = mysql_fetch_object($result)) {\n $candidates[\"$row->id\"] = $row->name;\n }\n return $candidates;\n}",
"public function getContentTypes()\n {\n return $this->contentTypes;\n }",
"function lang_object_ids($ids_array, $type) {\n if(function_exists('icl_object_id')) {\n $res = array();\n foreach ($ids_array as $id) {\n $xlat = icl_object_id($id,$type,false);\n if(!is_null($xlat)) $res[] = $xlat;\n }\n return $res;\n } else {\n return $ids_array;\n }\n}",
"protected function getContentTypeOptions() {\n $contentTypes = $this->entityTypeManager->getStorage('node_type')->loadMultiple();\n $options = [];\n foreach ($contentTypes as $contentType) {\n $options[$contentType->id()] = $contentType->label();\n }\n return $options;\n }",
"public static function getContentTypes()\n {\n return self::$_contentTypes;\n }",
"private function loadContentTypes()\n\t\t{\n\t\t\t$query = $this->contentTypeQuery;\n\t\t\t$list = $this->bridge->packData($query);\n\t\t\t$this->contentTypes = $list;\n\t\t\t\n\t\t\t/*\n\t\t\t*\tgenerate new contentTypes [Folder, File]\n\n\t\t\t*/\n\n\t\t\tif (count($this->contentTypes) == 0)\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t*\tINSERT INTO contentType VALUES (null, 'Folder', null)\n\t\t\t\t*\tINSERT INTO contentType VALUES (null, 'File', null)\n\t\t\t\t*/\n\n\t\t\t\t$qrs = array();\n\t\t\t\tarray_push($qrs, [\"'Folder'\", \"'_'\"]);\n\t\t\t\tarray_push($qrs, [\"'File'\", \"'_'\"]);\n\n\t\t\t\t$ts = $this->logContentType($qrs);\n\t\t\t\t#var_dump($ts);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$r= 1;\n\t\t\t\t#var_dump($this->contentTypes);\n\t\t\t\t#$arrayName = array(0 => [\"'Folderr'\", \"null\"], );\n\t\t\t\t#$this->logContentType($arrayName);\n\t\t\t}\t\t\t\n\t\t}",
"function wpsp_lang_object_ids($ids_array, $type) {\n\tif(function_exists('icl_object_id')) {\n\t\t$res = array();\n\t\tforeach ($ids_array as $id) {\n\t\t\t$xlat = icl_object_id($id,$type,false);\n\t\t\tif(!is_null($xlat)) $res[] = $xlat;\n\t\t}\n\t\treturn $res;\n\t} else {\n\t\treturn $ids_array;\n\t}\n}",
"function &getAssociatedTypes() {\n\t\tif ($this->getIsGeneric()) { return array(); }\n\t\t\n\t\t$sTable = KTUtil::getTableName('document_type_fieldsets');\n $aQuery = array(\n \"SELECT document_type_id FROM $sTable WHERE fieldset_id = ?\",\n array($this->getId()),\n );\n $aIds = DBUtil::getResultArrayKey($aQuery, 'document_type_id');\n\t\t\n\t\t$aRet = array();\n\t\tforeach ($aIds as $iID) {\n\t\t $oType = DocumentType::get($iID);\n\t\t\tif (!PEAR::isError($oType)) { \n\t\t\t $aRet[] = $oType;\n\t\t\t}\n\t\t}\n\t\treturn $aRet;\n\t}",
"public static function getIds($contents)\n { \n $return = [];\n foreach ($contents as $value) \n {\n $return[] = $value->id;\n }\n return $return;\n }",
"protected function getTypes() {}",
"public static function getTypes();",
"function register_content_types() {\n\n}",
"public function getTypes();",
"public function getTypes();",
"public function getTypes();",
"public function getTypes();",
"public function get_custom_term_id_values( $type ) {\n\n\t\t$items = array();\n\t\t$terms = get_terms( $type, array('orderby' => 'name' ) );\n\t\tif ( is_array( $terms ) && ! is_wp_error( $terms ) ) {\n\t\t\tforeach ( $terms as $term ) {\n\t\t\t\t$items[$term -> name] = $term -> term_id;\n\t\t\t}\n\t\t}\n\t\treturn $items;\n\t}",
"public function get_content_item_ids() {\n\t\t$items = $this->get_content_items();\n\t\tif ( empty( $items ) ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// Map the IDs.\n\t\treturn array_map(\n\t\t\tfunction( $item ) {\n\t\t\t\treturn $item->get_data( 'post_id' );\n\t\t\t},\n\t\t\t$items\n\t\t);\n\t}",
"public function getContentTypeIdentifier()\n {\n return $this->contentTypeIdentifier;\n }",
"public function getResourceTypeIds();",
"function getPositionTypes()\n{\n $database = eZDB::globalDatabase();\n $res_array = array();\n $qry_array = array();\n\n $query= \"SELECT ID FROM eZClassified_PositionType\";\n $database->array_query( $qry_array, $query );\n foreach ( $qry_array as $qry_item )\n {\n $res_array[] = $qry_item[\"ID\"];\n }\n return $res_array;\n}",
"function dtm_get_wordpress_content_id( $post_type, $post_id ) {\n\t//$post_type = self::get_post_type( $post_type );\n\t//if ( WP_Base::is_toh() ) {\n\t//\tif ( in_array( $post_type, $accepted_post_type ) ) {\n\t//\t\treturn ( $post_id );\n\t//\t}\n\t//}\n\t$content_id = apply_filters( 'dtm_wordpress_content_id', '' );\n\n\treturn $content_id;\n}",
"public function getContentIdPool()\n {\n $aFilters = $this->getFilters();\n \n $oContentFinder = SGL_Finder::factory('content');\n \n if (array_key_exists('categoryId', $aFilters)) {\n $oContentFinder->addFilter('categoryId', $aFilters['categoryId']);\n }\n if (array_key_exists('typeId', $aFilters)) {\n $oContentFinder->addFilter('typeId', $aFilters['typeId']);\n }\n \n $aContent = $oContentFinder->retrieve();\n\n $aContentId = array();\n foreach ($aContent as $oContent) {\n $aContentId[] = $oContent->id;\n } \n return $aContentId;\n }",
"private function getEnabledEntityTypeBundles($entity_type_id) {\n $result = [];\n try {\n $entityTypes = $this->entityTypeManager->getStorage($entity_type_id)->loadMultiple();\n foreach ($entityTypes as $entityType) {\n // @todo check enabled\n $result[] = $entityType->id();\n }\n }\n catch (InvalidPluginDefinitionException $exception) {\n $this->messenger->addError($exception->getMessage());\n }\n return $result;\n }",
"public function getExttypes(){\n\t\t\t$db = JFactory::getDBO();\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select('distinct(type)');\n\t\t\t$query->from('#__extensions');\n\t\t\t$query->where('protected=0');\n\t\t\t$db->setQuery($query);\n\t\t\t$arrDatos = $db->loadRowList();\n\t\t\tif(!$arrDatos){\n\t\t\t\t$arrDatos= array();\n\t\t\t}\n\t\t\treturn $arrDatos;\n\t\t}",
"public function entityTypeId();",
"function getContentType();",
"public function getCustomTypeId();",
"public abstract function get_ids();",
"public function getAllfileTypeIds()\n {\n if (!isset($this->_allfileTypeIds)) {\n if ($this->_fetchedAllfileTypes) {\n $this->_allfileTypeIds = array_keys($this->_fileTypesById);\n } else {\n $this->_allfileTypeIds = craft()->db->createCommand()\n ->select('id')\n ->from('box_fileType')\n ->queryColumn();\n }\n }\n\n return $this->_allfileTypeIds;\n }",
"public static function getContentType()\n {\n return ['core', 'page'];\n }",
"function getTypeslist ()\r\n\t{\r\n\t\t$query = 'SELECT id, name'\r\n\t\t\t\t. ' FROM #__flexicontent_types'\r\n\t\t\t\t. ' WHERE published = 1'\r\n\t\t\t\t. ' ORDER BY name ASC'\r\n\t\t\t\t;\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$types = $this->_db->loadObjectList();\r\n\t\treturn $types;\r\n\t}",
"function get_section_post_types(){\n $id = vezba_get_option( 'ddlSections' );\n\n $section = wp_remote_get( 'http://www.iwa-network.org/wp-json/wp/v2/sections/'. $id );\n $body = wp_remote_retrieve_body( $section );\n $data = json_decode( $body, true );\n\n // Get all section post types\n foreach( $data as $key => $value ) {\n if( is_array( $value ) ) {\n $counter = 0;\n foreach( $value as $item ) {\n $links = $value['wp:post_type']; \n }\n }\n } \n return $links;\n}",
"static function getCustomizedPostsIdFromPostType($post_type){\n $publishedPostId = array();\n $parameter = self::generatePostsParameter($post_type);\n $posts_array = get_posts($parameter);\n\n for ($i=0; $i < count($posts_array) ; $i++) {\n array_push($publishedPostId,$posts_array[$i]->ID);\n }\n\n return $publishedPostId;\n }",
"function ctools_block_content_type_content_types() {\n $types = array();\n foreach (module_list() as $module) {\n $module_blocks = module_invoke($module, 'block', 'list');\n if ($module_blocks) {\n foreach ($module_blocks as $delta => $block) {\n // strip_tags used because it goes through check_plain and that\n // just looks bad.\n $info = array(\n 'title' => strip_tags($block['info']),\n );\n\n // Ask around for further information by invoking the hook_block() extension.\n $function = $module . '_ctools_block_info';\n if (!function_exists($function)) {\n $function = 'ctools_default_block_info';\n }\n $function($module, $delta, $info);\n\n // this check means modules can remove their blocks; particularly useful\n // if they offer the block some other way (like we do for views)\n if ($info) {\n $types[\"$module-$delta\"] = $info;\n }\n }\n }\n }\n return $types;\n}",
"public function testContentTypesItem()\n {\n $this->contentTypeListTest('products');\n $this->contentTypeListTest('blogs');\n $this->contentTypeListTest('app_flows');\n $this->contentTypeListTest('lists');\n $this->contentTypeListTest('user_reviews');\n $this->contentTypeListTest('boards');\n }",
"private function wpGetAllIds(\n callable $callback,\n string $post_type,\n array $args = [],\n ?int $expiration = null\n ): array {\n $paged = 0;\n $post_ids = [];\n do {\n $defaults = [\n 'fields' => 'ids',\n 'posts_per_page' => 100,\n 'no_found_rows' => false, // We need pagination & the count for all posts found.\n 'paged' => $paged++, // phpcs:ignore\n 'update_post_term_cache' => false,\n 'update_post_meta_cache' => false,\n ];\n $query = call_user_func($callback, $post_type, wp_parse_args($args, $defaults), $expiration);\n if ($query instanceof WP_Query && $query->have_posts()) {\n foreach ($query->posts as $id) {\n $post_ids[] = $id;\n }\n }\n } while ($query->max_num_pages > $paged);\n\n return $post_ids;\n }",
"function _muckypup_database_get_node_types () {\n\n\t$types = array ();\n\t$content_types = _node_types_build()->types;\n\n\tforeach ($content_types as $content_type) {\n\t\t$types[$content_type->type] = $content_type->name;\n\t}\n\n\treturn $types;\n}",
"public function getEntityTypeId();",
"public function retrieveEntityTypes()\n {\n return $this->start()->uri(\"/api/entity/type\")\n ->get()\n ->go();\n }",
"public function getTypes()\n {\n $types = PropertyType::all();\n $values = [];\n foreach ($types as $key) {\n $values[] = $key->id;\n }\n return $values;\n }",
"public function getIds();",
"public function getIds();",
"public function getIdType() {\n\t\treturn $this->id_type;\n\t}",
"public function typeId()\n {\n return config('entities.ids.' . $this->type);\n }",
"public function getIdType()\n {\n return $this->idType;\n }",
"function document_types () {\n $type_array = array ();\n $documents_query_raw = \"\n select \n document_types_id,\n type_description\n from \n \" . TABLE_DOCUMENT_TYPES . \"\n where\n type_visible = 'True'\n order by \n sort_order\n \";\n\n $documents_query = tep_db_query ($documents_query_raw);\n while ($documents = tep_db_fetch_array ($documents_query) ) {\n $type_array[] = array ('id' => $documents['document_types_id'],\n 'text' => $documents['type_description']\n );\n } // while ($documents\n\n return $type_array;\n}",
"public function getBlockTypes(){\n\t\n\t\tif( empty($this->_block_types) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 't.content_type_id AS value, t.content_type_name AS text' );\n\t\t\t$query->from( '#__zbrochure_content_types AS t' );\n\t\t\t$query->where( 't.content_type_published = 1' );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_block_types = $this->_db->loadObjectList();\n\n\t\t}\n\t\t\n\t\treturn $this->_block_types;\n\t\n\t}",
"public static function getContentType() {}",
"public function getContentType();",
"public function getContentType();",
"public function getContentType();",
"public function getContentType();",
"public function getContentType();",
"public function getContentType();",
"public function getContentType();",
"public function getContentType();",
"public function getContentType();",
"public function getTypes(): array;",
"public function getTypes(): array;",
"public function getTypeIdentifier();",
"public function testContentTypesLists()\n {\n $this->contentTypeItemTest('products');\n $this->contentTypeItemTest('blogs');\n $this->contentTypeItemTest('app_flows');\n $this->contentTypeItemTest('lists');\n $this->contentTypeItemTest('user_reviews');\n $this->contentTypeItemTest('boards');\n }",
"public function getIdShowTypes()\n {\n return $this->idShowTypes;\n }",
"public function getListeTypeContent () \n {\n $db = $this->getModel('db');\n $sql = \"SHOW TABLES LIKE '\" . $this->table_cms_contenu . \"_%'\";\n $stmt = $db->query($sql);\n for (true; $res = $db->fetch_assoc($stmt); true) {\n $liste_type_content[] = $res['Tables_in_' . Clementine::$config['clementine_db']['name'] . ' (' . $this->table_cms_contenu . '_%)']; \n }\n return $liste_type_content;\n }",
"public static function liste_id_type_salle() {\n\t\t\t$listeId = Array();\n\t\t\ttry {\n\t\t\t\t$pdoOptions[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;\n\t\t\t\t$bdd = new PDO('mysql:host='.DB_HOST.';dbname='.DB_NAME, DB_LOGIN, DB_PASSWORD, $pdoOptions);\n\t\t\t\t$bdd->query(\"SET NAMES utf8\");\n\t\t\t\t$req = $bdd->prepare(\"SELECT id FROM \".Type_Salle::$nomTable.\" ORDER BY nom\");\n\t\t\t\t$req->execute();\n\t\t\t\twhile ($ligne = $req->fetch()) {\n\t\t\t\t\tarray_push($listeId, $ligne['id']);\n\t\t\t\t}\n\t\t\t\t$req->closeCursor();\n\t\t\t}\n\t\t\tcatch (Exception $e) {\n\t\t\t\techo \"Erreur : \".$e->getMessage().\"<br />\";\n\t\t\t}\n\t\t\treturn $listeId;\n\t\t}",
"function contentTypes()\n {\n return new ContentTypes($this->accessToken, $this->spaceId, $this->cacher);\n }",
"public function getContentId($cont_type, $content_id)\n {\n\t $row = db::fetch(\"SELECT id FROM content WHERE content_type_machine_name = %v AND content_id = %i\", $cont_type, $content_id);\n\t return $row['id'];\n }",
"private function loadMimetypes() {\n\t\t$qb = $this->dbConnection->getQueryBuilder();\n\t\t$qb->select('id', 'mimetype')\n\t\t\t->from('mimetypes');\n\n\t\t$result = $qb->execute();\n\t\t$results = $result->fetchAll();\n\t\t$result->closeCursor();\n\n\t\tforeach ($results as $row) {\n\t\t\t$this->mimetypes[$row['id']] = $row['mimetype'];\n\t\t\t$this->mimetypeIds[$row['mimetype']] = $row['id'];\n\t\t}\n\t}",
"abstract public function getContentType();",
"public function get_attached_content_object_ids($type = self :: ATTACHMENT_NORMAL)\n {\n if (!is_array($this->attachment_ids[$type]))\n {\n $conditions = array();\n $conditions[] = new EqualityCondition(\n new PropertyConditionVariable(\n ContentObjectAttachment::class_name(),\n ContentObjectAttachment::PROPERTY_CONTENT_OBJECT_ID\n ),\n new StaticConditionVariable($this->get_id())\n );\n if ($type != self::ATTACHMENT_ALL)\n {\n $conditions[] = new EqualityCondition(\n new PropertyConditionVariable(\n ContentObjectAttachment::class_name(),\n ContentObjectAttachment::PROPERTY_TYPE\n ),\n new StaticConditionVariable($type)\n );\n }\n $condition = new AndCondition($conditions);\n\n $parameters = new DataClassDistinctParameters(\n $condition,\n new DataClassProperties(\n array(\n new PropertyConditionVariable(\n ContentObjectAttachment::class,\n ContentObjectAttachment::PROPERTY_ATTACHMENT_ID\n )\n )\n )\n );\n $this->attachment_ids[$type] = DataManager::distinct(ContentObjectAttachment::class_name(), $parameters);\n }\n\n return $this->attachment_ids[$type];\n }",
"public static function getIdNamePair() {\n\n\t\t$types = Array();\n\n\t\t$collection = QuestionType::all();\t\n\n\t\tforeach($collection as $questionType) {\n\t\t\t$types[$questionType->id] = $questionType->name;\n\t\t}\t\n\n\t\treturn $types;\t\n\t}",
"public abstract function getContentType();",
"public abstract function getContentType();",
"public function getZoteroItemTypes()\n {\n $sql = \"\n SELECT DISTINCT(et.text), e.id\n FROM `{$this->_db->prefix}element_texts` et\n JOIN `{$this->_db->prefix}elements` e\n ON et.element_id = e.id\n JOIN `{$this->_db->prefix}element_sets` es\n ON e.element_set_id = es.id\n WHERE e.name = '\" . self::$zoteroFields['itemType'][0] . \"'\n AND es.name = '\" . self::ELEMENT_SET_NAME . \"'\n ORDER BY et.text\";\n $results = $this->_db->fetchAll($sql);\n $zoteroItemTypes = array();\n foreach($results as $result) {\n $zoteroItemTypes[$result['text']] = $result['text'];\n }\n return $zoteroItemTypes;\n }",
"private function logContentType($load = array())\n\t\t{\n\t\t\t$ret = array();\n\t\t\tif (count($load) > 0)\n\t\t\t{\n\t\t\t\tforeach ($load as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$name = $value[0];\n\t\t\t\t\t$ext = $value[1];\n\t\t\t\t\t$loaded = False;\n\n\t\t\t\t\t/*\n\t\t\t\t\t*\tcheck values not in contentTypes\n\t\t\t\t\t*/\n\n\t\t\t\t\tforeach ($this->contentTypes as $keyy => $valuee)\n\t\t\t\t\t{\n\t\t\t\t\t\t#print $valuee['contentTypeName'].' '.$name.PHP_EOL;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$tmpName = \"'\".$valuee['contentTypeName'].\"'\";\n\t\t\t\t\t\t$tmpExt = \"'\".$valuee['extension'].\"'\";\n\t\t\t\t\t\tif (($valuee['contentTypeName'] == $name or $tmpName == $name) and ($valuee['extension'] == $ext or $tmpExt == $ext))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$loaded = True;\n\t\t\t\t\t\t\tarray_push($ret, $valuee['id']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif($loaded == False)\n\t\t\t\t\t{\n\t\t\t\t\t\t$qry = \"INSERT INTO contentType VALUES(null, $name, $ext)\";\n\t\t\t\t\t\t#print $qry.PHP_EOL;\n\t\t\t\t\t\t$this->bridge->execQuery($qry);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprint \"Ensure you provide arguments for processing\";\n\t\t\t}\n\n\t\t\t/*\n\t\t\t*\trefresh the list\n\t\t\t*/\n\n\t\t\t$query = $this->contentTypeQuery;\n\t\t\t$this->contentTypes=$this->bridge->packData($query);\n\n\t\t\t#print count($ret).' '.count($load).PHP_EOL;\n\n\t\t\tif (count($ret) == count($load))\n\t\t\t{\n\t\t\t\treturn $ret;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ret = $this->logContentType($load);\n\t\t\t\treturn $ret;\n\t\t\t}\n\t\t}",
"public function getcontentType();",
"public function getSearchContentTypes()\n {\n return array('conversation_message', 'conversation');\n }",
"protected function getEntityTypes() : array {\n $existingData = $this->entityTypeManager->getDefinitions();\n\n $entity_types = array_keys(array_intersect_key($this->reportData, $existingData));\n return array_diff($entity_types, [\n // TODO: Remove when crop type is exported.\n 'crop',\n 'update_helper_checklist_update',\n 'access_token',\n 'menu_link_content',\n 'redirect',\n 'shortcut',\n ]);\n }",
"function category_content_list_of($type_id, $category_id) {\n\n global $data_base, $env, $date;\n\n if ($env == \"prod\") {\n\n\t $request = $data_base->prepare(\"\n\t SELECT *\n\t FROM imago_info_content \n\t WHERE type = ? \n\t AND category = ?\n\t AND env = ? \n AND end_date > ?\n\t ORDER BY RAND() \n\t \");\n\n\t $request->execute(array($type_id, $category_id, \"prod\", $date));\n\t }\n\n\t else {\n\n\t $request = $data_base->prepare(\"\n\t SELECT *\n\t FROM imago_info_content \n\t WHERE type = ? \n\t AND category = ?\n AND end_date > ?\n\t ORDER BY RAND() \n\t \");\n\n\t $request->execute(array($type_id, $category_id, $date));\n\t }\n\n return $request->fetchAll(PDO::FETCH_ASSOC);\n }",
"function get_content_category_ids($str_ids){\n if(!$str_ids)\n return;\n $fs_table = FSFactory::getClass('fstable'); \n \n\t\t // search for category\n \n $query = \" SELECT id,alias\n FROM \".$fs_table -> getTable('fs_aq_categories').\"\n WHERE id IN (\".$str_ids.\")\n \";\n \n global $db;\n $sql = $db->query($query);\n $result = $db->getObjectList();\n $array_alias = array();\n if($result)\n\t foreach ($result as $item){\n\t \t$array_alias[$item -> id] = $item -> alias;\n\t }\n return $array_alias;\n\t\t}",
"private function createTestContentType() {\n $node_type = NodeType::create(\n array(\n 'type' => self::TEST_CONTENT_TYPE_ID,\n 'name' => self::TEST_CONTENT_TYPE_ID,\n )\n );\n $node_type->save();\n return $node_type->id();\n }",
"public function getIdentifiers();",
"function getFixedTypeId()\n{\n $fixedTypes = config('type.first_types');\n $ids = array_column($fixedTypes, 'id');\n\n $ids1 = $ids;\n array_map(function($value) use (&$ids1) {\n $ids1[] = \"\" . $value . \"\";\n }, $ids);\n\n return $ids1;\n}",
"public function getAllIds(): array;",
"public function get_desired_types();",
"public function getAllProductTypeIds()\n {\n if (!isset($this->_allProductTypeIds)) {\n $this->_allProductTypeIds = [];\n\n foreach ($this->getAllProductTypes() as $productType) {\n $this->_allProductTypeIds[] = $productType->id;\n }\n }\n\n return $this->_allProductTypeIds;\n }",
"private static function _get_active_content_types()\n\t{\n\t\t$data = get_option( CCTM::db_key );\n\t\tif ( !empty($data) && is_array($data) )\n\t\t{\n\t\t\t$known_post_types = array_keys($data);\n\t\t\t$active_post_types = array();\n\t\t\tforeach ($known_post_types as $pt)\n\t\t\t{\n\t\t\t\tif ( isset($data[$pt]['is_active']) && $data[$pt]['is_active'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$active_post_types[] = $pt;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $active_post_types;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t}"
] | [
"0.75671804",
"0.7402438",
"0.6798846",
"0.67205864",
"0.6578987",
"0.6527094",
"0.6400643",
"0.6381729",
"0.6357597",
"0.63409555",
"0.63313276",
"0.624094",
"0.6232733",
"0.62174785",
"0.6186374",
"0.618309",
"0.6145946",
"0.6134522",
"0.61297584",
"0.6114548",
"0.6091464",
"0.6083954",
"0.60836166",
"0.60831857",
"0.6068356",
"0.6065718",
"0.6062216",
"0.6062216",
"0.6062216",
"0.6062216",
"0.6051855",
"0.59797335",
"0.5967063",
"0.59622496",
"0.59523624",
"0.59477973",
"0.5933274",
"0.5932228",
"0.5923363",
"0.5912787",
"0.5912085",
"0.59066653",
"0.58979386",
"0.5896962",
"0.589399",
"0.58843666",
"0.588247",
"0.58813024",
"0.58741623",
"0.58687854",
"0.58669525",
"0.58490634",
"0.5832591",
"0.5832329",
"0.58099693",
"0.580194",
"0.580194",
"0.57967454",
"0.5795356",
"0.57811636",
"0.5762056",
"0.57602066",
"0.57584846",
"0.5756524",
"0.5756524",
"0.5756524",
"0.5756524",
"0.5756524",
"0.5756524",
"0.5756524",
"0.5756524",
"0.5756524",
"0.5756403",
"0.5756403",
"0.5748918",
"0.57398754",
"0.57144177",
"0.57110107",
"0.5706735",
"0.57059014",
"0.5697106",
"0.56970805",
"0.56814307",
"0.5673456",
"0.5673281",
"0.56721425",
"0.56721425",
"0.5665382",
"0.5658638",
"0.56487644",
"0.5626164",
"0.56235206",
"0.56165314",
"0.56131065",
"0.56097066",
"0.5606856",
"0.56043744",
"0.5594159",
"0.55914354",
"0.5583742",
"0.558148"
] | 0.0 | -1 |
Validate an email address. Provide email address (raw input) Returns true if the email address has the email address format and the domain exists. | function validEmail($email)
{
$isValid = true;
$atIndex = strrpos($email, "@");
if (is_bool($atIndex) && !$atIndex)
{
$isValid = false;
}
else
{
$domain = substr($email, $atIndex+1);
$local = substr($email, 0, $atIndex);
$localLen = strlen($local);
$domainLen = strlen($domain);
if ($localLen < 1 || $localLen > 64)
{
// local part length exceeded
$isValid = false;
}
else if ($domainLen < 1 || $domainLen > 255)
{
// domain part length exceeded
$isValid = false;
}
else if ($local[0] == '.' || $local[$localLen-1] == '.')
{
// local part starts or ends with '.'
$isValid = false;
}
else if (preg_match('/\\.\\./', $local))
{
// local part has two consecutive dots
$isValid = false;
}
else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain))
{
// character not valid in domain part
$isValid = false;
}
else if (preg_match('/\\.\\./', $domain))
{
// domain part has two consecutive dots
$isValid = false;
}
else if
(!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/',
str_replace("\\\\","",$local)))
{
// character not valid in local part unless
// local part is quoted
if (!preg_match('/^"(\\\\"|[^"])+"$/',
str_replace("\\\\","",$local)))
{
$isValid = false;
}
}
if ($isValid && !(checkdnsrr($domain,"MX") || checkdnsrr($domain,"A")))
{
// domain not found in DNS
$isValid = false;
}
}
return $isValid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ValidateEmail( $email ) {\n // Check if address is valid\n if( ! filter_var( $email, FILTER_VALIDATE_EMAIL ) )\n return false;\n\n // Break up into parts\n $parts = explode( '@', $email );\n $user = $parts[0];\n $domain = $parts[1];\n\n // Check if domain resolves\n if( ! checkdnsrr( $domain, 'MX' ) && ( ! checkdnsrr( $domain, 'A' ) || ! checkdnsrr( $domain, 'AAAA' ) ) )\n return false;\n\n return true;\n}",
"public static function validate_email($email) {\n\t\t// First, we check that there's one @ symbol, \n\t\t// and that the lengths are right.\n\t\tif (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n\t\t\t// Email invalid because wrong number of characters \n\t\t\t// in one section or wrong number of @ symbols.\n\t\t\treturn false;\n\t\t}\n\t\t// Split it into sections to make life easier\n\t\t$email_array = explode(\"@\", $email);\n\t\t$local_array = explode(\".\", $email_array[0]);\n\t\tfor ($i = 0; $i < sizeof($local_array); $i++) {\n\t\t\tif(!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&\n\t\t\t?'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\",\n\t\t\t$local_array[$i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Check if domain is IP. If not, \n\t\t// it should be valid domain name\n\t\tif (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\n\t\t\t$domain_array = explode(\".\", $email_array[1]);\n\t\t\tif (sizeof($domain_array) < 2) {\n\t\t\t\treturn false; // Not enough parts to domain\n\t\t\t}\n\t\t\tfor ($i = 0; $i < sizeof($domain_array); $i++) {\n\t\t\t\tif(!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|\n\t\t\t\t\t?([A-Za-z0-9]+))$\",\n\t\t\t\t$domain_array[$i])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public static function validate_email($email) {\n\t // First, we check that there's one @ symbol, \n\t // and that the lengths are right.\n\t if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n\t // Email invalid because wrong number of characters \n\t // in one section or wrong number of @ symbols.\n\t return false;\n\t }\n\t // Split it into sections to make life easier\n\t $email_array = explode(\"@\", $email);\n\t $local_array = explode(\".\", $email_array[0]);\n\t for ($i = 0; $i < sizeof($local_array); $i++) {\n\t if\n\t(!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&\n\t↪'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\",\n\t$local_array[$i])) {\n\t return false;\n\t }\n\t }\n\t // Check if domain is IP. If not, \n\t // it should be valid domain name\n\t if (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\n\t $domain_array = explode(\".\", $email_array[1]);\n\t if (sizeof($domain_array) < 2) {\n\t return false; // Not enough parts to domain\n\t }\n\t for ($i = 0; $i < sizeof($domain_array); $i++) {\n\t if\n\t(!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|\n\t↪([A-Za-z0-9]+))$\",\n\t$domain_array[$i])) {\n\t return false;\n\t }\n\t }\n\t }\n\t return true;\n\t}",
"function is_valid_email($address) {\n $fields = preg_split(\"/@/\", $address, 2);\n if ((!preg_match(\"/^[0-9a-z]([-_.]?[0-9a-z])*$/i\", $fields[0])) || (!isset($fields[1]) || $fields[1] == '' || !is_valid_hostname_fqdn($fields[1], 0))) {\n return false;\n }\n return true;\n}",
"function check_email_address($email) {\n # Check @ symbol and lengths\n if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n return false;\n }\n\n # Split Email Address into Sections\n $email_array = explode(\"@\", $email);\n $local_array = explode(\".\", $email_array[0]);\n\n # Validate Local Section of the Email Address\n for ($i = 0; $i < sizeof($local_array); $i++) {\n if (!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\", $local_array[$i])) {\n return false;\n }\n }\n\n # Validate Domain Section of the Email Address\n if (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\n $domain_array = explode(\".\", $email_array[1]);\n\n # Check the number of domain elements\n if (sizeof($domain_array) < 2) {\n return false;\n }\n\n # Sanity Check All Email Components\n for ($i = 0; $i < sizeof($domain_array); $i++) {\n if (!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$\", $domain_array[$i])) {\n return false;\n }\n }\n }\n\n # If All Validation Checks have Passed then Return True\n return true;\n }",
"function isValidEmail($email) {\n\n\t\t// First, we check that there's one @ symbol, and that the lengths are right\n\n\t\tif (!preg_match(\"/^[^@]{1,64}@[a-zA-z0-9].{1,255}$/\", $email)) {\n\t\t\t// Email invalid because wrong number of characters in one section, or wrong number of @ symbols.\n\t\t\treturn false;\n\t\t}\n\n\t\t// Split it into sections to make life easier\n\n\t\t$email_array = explode(\"@\", $email);\n\t\t$local_array = explode(\".\", $email_array[0]);\n\t\tfor ($i = 0; $i < sizeof($local_array); $i++) {\n\t\t\tif (!preg_match(\"/^(([A-Za-z0-9!#$%&'*+\\/=?^_`{|}~-][A-Za-z0-9!#$%&'*+\\/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$/\", $local_array[$i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (!preg_match(\"/^\\[?[0-9\\.]+\\]?$/\", $email_array[1])) { // Check if domain is IP. If not, it should be valid domain name\n\t\t\t$domain_array = explode(\".\", $email_array[1]);\n\t\t\tif (sizeof($domain_array) < 2) {\n\t\t\t\treturn false; // Not enough parts to domain\n\t\t\t}\n\n\t\t\tfor ($i = 0; $i < sizeof($domain_array); $i++) {\n\t\t\t\tif (!preg_match(\"/^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$/\", $domain_array[$i])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n }",
"function isValidEmail($addr)\n\t{\n\t\t//Called by validateInput().\n\t\t\n\t\t//Only one at-sign\n\t\t$atSplit = explode(\"@\",$addr);\n\t\tif(count($atSplit) != 2)\n\t\t\treturn false;\n\n\t\t$domain = $atSplit[1];\n\n\t\t//Only one period\n\t\t$pdSplit = explode('.',$domain);\n\t\tif(count($pdSplit) < 2)\n\t\t\treturn false;\n\t\t\t\n\t\t$suffix = $pdSplit[count($pdSplit) - 1];\n\t\t\n\t\t//Valid suffix\n\t\tswitch($suffix)\n\t\t{\n\t\t\tcase \"com\":\n\t\t\tcase \"net\":\n\t\t\tcase \"org\":\n\t\t\tcase \"gov\":\n\t\t\tcase \"co\":\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//Valid domain name\n\t\tif(preg_match('/[^\\-\\d\\w\\.]/',$domain))\n\t\t\treturn false;\n\t\t\t\n\t\t//Valid username\n\t\tif(preg_match('/[^\\-\\d\\w]/',$atSplit[0]))\n\t\t\treturn false;\n\t\t\n\t\t//First character is a letter\n\t\tif(preg_match('/[^A-Za-z]/',substr($atSplit[0],0,1)))\n\t\t\treturn false;\n\t\t\t\n\t\treturn true;\n\t}",
"function isValidEmail($addr)\n\t{\n\t\t//Called by validateInput().\n\t\t\n\t\t//Only one at-sign\n\t\t$atSplit = explode(\"@\",$addr);\n\t\tif(count($atSplit) != 2)\n\t\t\treturn false;\n\n\t\t$domain = $atSplit[1];\n\n\t\t//Only one period\n\t\t$pdSplit = explode('.',$domain);\n\t\tif(count($pdSplit) < 2)\n\t\t\treturn false;\n\t\t\t\n\t\t$suffix = $pdSplit[count($pdSplit) - 1];\n\t\t\n\t\t//Valid suffix\n\t\tswitch($suffix)\n\t\t{\n\t\t\tcase \"com\":\n\t\t\tcase \"net\":\n\t\t\tcase \"org\":\n\t\t\tcase \"gov\":\n\t\t\tcase \"co\":\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//Valid domain name\n\t\tif(preg_match('/[^\\-\\d\\w\\.]/',$domain))\n\t\t\treturn false;\n\t\t\t\n\t\t//Valid username\n\t\tif(preg_match('/[^\\-\\d\\w]/',$atSplit[0]))\n\t\t\treturn false;\n\t\t\n\t\t//First character is a letter\n\t\tif(preg_match('/[^A-Za-z]/',substr($atSplit[0],0,1)))\n\t\t\treturn false;\n\t\t\t\n\t\treturn true;\n\t}",
"function check_email_address($email) {\n\t$isValid = true;\n\t$atIndex = strrpos($email, \"@\");\n\tif (is_bool($atIndex) && !$atIndex) {\n\t\t$isValid = false;\n\t}\n\telse {\n\t\t$domain = substr($email, $atIndex+1);\n\t\t$local = substr($email, 0, $atIndex);\n\t\t$localLen = strlen($local);\n\t\t$domainLen = strlen($domain);\n\t\tif ($localLen < 1 || $localLen > 64) {\n\t\t\t// local part length exceeded\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if ($domainLen < 1 || $domainLen > 255) {\n\t\t\t// domain part length exceeded\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if ($local[0] == '.' || $local[$localLen-1] == '.') {\n\t\t\t// local part starts or ends with '.'\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if (preg_match('/\\\\.\\\\./', $local)) {\n\t\t\t// local part has two consecutive dots\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\n\t\t\t// character not valid in domain part\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if (preg_match('/\\\\.\\\\./', $domain)) {\n\t\t\t// domain part has two consecutive dots\n\t\t\t$isValid = false;\n\t\t}\n\t\telse if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n\t\tstr_replace(\"\\\\\\\\\",\"\",$local)))\n\t\t{\n\t\t // character not valid in local part unless \n\t\t // local part is quoted\n\t\t if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\n\t\t\t$isValid = false;\n\t\t }\n\t\t}\n\t\tif ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\n\t\t\t// domain not found in DNS\n\t\t\t$isValid = false;\n\t\t}\n\t}\n\treturn $isValid;\n}",
"function validate_email ($address) {\n return preg_match('/^[a-z0-9!#$%&\\'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\\'*+\\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i', $address);\n }",
"function validate_email($email, $domainCheck = false)\n{\n if (!empty($email))\n {\n if (preg_match('/^[a-zA-Z0-9\\._-]+\\@(\\[?)[a-zA-Z0-9\\-\\.]+'.\n '\\.([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$/', $email)) {\n if ($domainCheck && function_exists('checkdnsrr')) {\n list (, $domain) = explode('@', $email);\n if (checkdnsrr($domain, 'MX') || checkdnsrr($domain, 'A')) {\n return true;\n }\n return false;\n }\n return true;\n }\n }\n\n return false;\n}",
"function validEmail($email) {\n\t $isValid = true;\n\t $atIndex = strrpos($email, \"@\");\n\t\tif (is_bool($atIndex) && !$atIndex) {\n\t\t $isValid = false; \n\t\t} else {\n\t\t $domain = substr($email, $atIndex+1);\n\t\t $local = substr($email, 0, $atIndex);\n\t\t $localLen = strlen($local);\n\t\t $domainLen = strlen($domain);\n\t\t if ($localLen < 1 || $localLen > 64)\n\t\t {\n\t\t\t // local part length exceeded\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if ($domainLen < 1 || $domainLen > 255)\n\t\t {\n\t\t\t // domain part length exceeded\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if ($local[0] == '.' || $local[$localLen-1] == '.')\n\t\t {\n\t\t\t // local part starts or ends with '.'\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if (preg_match('/\\\\.\\\\./', $local))\n\t\t {\n\t\t\t // local part has two consecutive dots\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\n\t\t {\n\t\t\t // character not valid in domain part\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if (preg_match('/\\\\.\\\\./', $domain))\n\t\t {\n\t\t\t // domain part has two consecutive dots\n\t\t\t $isValid = false;\n\t\t }\n\t\t else if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n\t\t\t\t\t str_replace(\"\\\\\\\\\",\"\",$local)))\n\t\t {\n\t\t\t // character not valid in local part unless \n\t\t\t // local part is quoted\n\t\t\t if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\n\t\t\t\t str_replace(\"\\\\\\\\\",\"\",$local)))\n\t\t\t {\n\t\t\t\t$isValid = false;\n\t\t\t }\n\t\t }\n\t\t if ($isValid && !(checkdnsrr($domain,\"MX\"))) {\n\t\t\t // domain not found in DNS\n\t\t\t $isValid = false;\n\t\t }\n\t\t}\n\t return $isValid;\n\t}",
"public function is_valid_email()\r\n {\r\n // email address.\r\n\r\n return (!empty($this->address) && preg_match($this->re_email, $this->address));\r\n }",
"public static function validateEmailAddr($email)\n {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n }",
"public static function validateEmailAddr($email)\n {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n }",
"private function _legacy_email_is_valid($email) {\n\t\t$valid_address = true;\n\n\t\t$mail_pat = '^(.+)@(.+)$';\n\t\t$valid_chars = \"[^] \\(\\)<>@,;:\\.\\\\\\\"\\[]\";\n\t\t$atom = \"$valid_chars+\";\n\t\t$quoted_user='(\\\"[^\\\"]*\\\")';\n\t\t$word = \"($atom|$quoted_user)\";\n\t\t$user_pat = \"^$word(\\.$word)*$\";\n\t\t$ip_domain_pat='^\\[([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\]$';\n\t\t$domain_pat = \"^$atom(\\.$atom)*$\";\n\n\t\tif (preg_match(\"/$mail_pat/\", $email, $components)) {\n\t\t\t$user = $components[1];\n\t\t\t$domain = $components[2];\n\t\t\t// validate user\n\t\t\tif (preg_match(\"/$user_pat/\", $user)) {\n\t\t\t\t// validate domain\n\t\t\t\tif (preg_match(\"/$ip_domain_pat/\", $domain, $ip_components)) {\n\t\t\t\t\t// this is an IP address\n\t\t\t\t\tfor ($i=1;$i<=4;$i++) {\n\t\t\t\t\t\tif ($ip_components[$i] > 255) {\n\t\t\t\t\t\t\t$valid_address = false;\n\t\t\t\t\t\t\tbreak;\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// Domain is a name, not an IP\n\t\t\t\t\tif (preg_match(\"/$domain_pat/\", $domain)) {\n\t\t\t\t\t\t/* domain name seems valid, but now make sure that it ends in a valid TLD or ccTLD\n\t\t\t\t\t\tand that there's a hostname preceding the domain or country. */\n\t\t\t\t\t\t$domain_components = explode(\".\", $domain);\n\t\t\t\t\t\t// Make sure there's a host name preceding the domain.\n\t\t\t\t\t\tif (sizeof($domain_components) < 2) {\n\t\t\t\t\t\t\t$valid_address = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$top_level_domain = strtolower($domain_components[sizeof($domain_components)-1]);\n\t\t\t\t\t\t\t// Allow all 2-letter TLDs (ccTLDs)\n\t\t\t\t\t\t\tif (preg_match('/^[a-z][a-z]$/', $top_level_domain) != 1) {\n\t\t\t\t\t\t\t\t$tld_pattern = '';\n\t\t\t\t\t\t\t\t// Get authorized TLDs from text file\n\t\t\t\t\t\t\t\t$tlds = file(DIR_WS_INCLUDES.'tld.txt');\n\t\t\t\t\t\t\t\tforeach($tlds as $line) {\n\t\t\t\t\t\t\t\t\t// Get rid of comments\n\t\t\t\t\t\t\t\t\t$words = explode('#', $line);\n\t\t\t\t\t\t\t\t\t$tld = trim($words[0]);\n\t\t\t\t\t\t\t\t\t// TLDs should be 3 letters or more\n\t\t\t\t\t\t\t\t\tif (preg_match('/^[a-z]{3,}$/', $tld) == 1) {\n\t\t\t\t\t\t\t\t\t\t$tld_pattern .= '^'.$tld.'$|';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Remove last '|'\n\t\t\t\t\t\t\t\t$tld_pattern = substr($tld_pattern, 0, -1);\n\t\t\t\t\t\t\t\tif (preg_match(\"/$tld_pattern/\", $top_level_domain) == 0) {\n\t\t\t\t\t\t\t\t\t$valid_address = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$valid_address = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$valid_address = false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$valid_address = false;\n\t\t}\n\t\tif ($valid_address && ENTRY_EMAIL_ADDRESS_CHECK == 'true') {\n\t\t\tif (!checkdnsrr($domain, \"MX\") && !checkdnsrr($domain, \"A\")) {\n\t\t\t\t$valid_address = false;\n\t\t\t}\n\t\t}\n\t\treturn $valid_address;\n\t}",
"function isValidEmail($email) {\n\tif (C_RESTRICT_EMAIL_DOMAIN) {\n\t\t$domain = explode(\"@\", $email);\n\t\tif ($domain[1] === C_VALID_EMAIL_DOMAIN) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t} else {\n\t\treturn (true);\n\t}\n}",
"function valid_email_address($mail) {\n $user = '[a-zA-Z0-9_\\-\\.\\+\\^!#\\$%&*+\\/\\=\\?\\`\\|\\{\\}~\\']+';\n $domain = '(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.?)+';\n $ipv4 = '[0-9]{1,3}(\\.[0-9]{1,3}){3}';\n $ipv6 = '[0-9a-fA-F]{1,4}(\\:[0-9a-fA-F]{1,4}){7}';\n\n return preg_match(\"/^$user@($domain|(\\[($ipv4|$ipv6)\\]))$/\", $mail);\n}",
"public static function validate_email($email){\r\n if(!preg_match('/^[a-zA-Z0-9]*(|[-._][a-zA-Z0-9]*)\\@([a-z]*)[.]([a-z]{3,4})/', $email)) return FALSE;\r\n return TRUE;\r\n }",
"function validarEmail($email, $checkDomain = true){\n\tif (filter_var($email, FILTER_VALIDATE_EMAIL)){\n\t\t//Valida o dominio\n\t\tif($checkDomain){\n\t\t\t$dominio = explode('@',$email);\n\t\t\tif(!checkdnsrr($dominio[1],'A')){\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n }else{\n\t\treturn false;\n\t}\n}",
"function check_email_address($email) \n{\n // First, we check that there's one @ symbol, and that the lengths are right\n if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) \n {\n // Email invalid because wrong number of characters in one section, or wrong number of @ symbols.\n return false;\n }\n // Split it into sections to make life easier\n $email_array = explode(\"@\", $email);\n $local_array = explode(\".\", $email_array[0]);\n for ($i = 0; $i < sizeof($local_array); $i++) \n {\n if (!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\", $local_array[$i])) \n {\n return false;\n }\n }\n if (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) \n { // Check if domain is IP. If not, it should be valid domain name\n $domain_array = explode(\".\", $email_array[1]);\n if (sizeof($domain_array) < 2) \n {\n return false; // Not enough parts to domain\n }\n for ($i = 0; $i < sizeof($domain_array); $i++) \n {\n if (!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$\", $domain_array[$i])) \n {\n return false;\n }\n }\n }\n return true;\n}",
"public function isValidEmailDomain($email) {\n\n if(preg_match('/^\\w[-.\\w]*@(\\w[-._\\w]*\\.[a-zA-Z]{2,}.*)$/', $email, $matches)) {\n\n if(function_exists('checkdnsrr')) {\n if(checkdnsrr($matches[1] . '.', 'MX')) {\n return true;\n }\n if(checkdnsrr($matches[1] . '.', 'A')) {\n return true;\n }\n }\n }\n else{\n return true;\n }\n return false;\n }",
"function IsValidEmail($input) {\r\n $regex = '/^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.([a-zA-Z]{2,4})$/';\r\n\r\n if (preg_match($regex, $input)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}",
"public static function is_email($value) {\r\n\t\t$parts = explode('@', $value, 2);\r\n\t\t$local_part = array_shift($parts);\r\n\t\t$domain = array_shift($parts);\r\n\t\t\r\n\t\t$ret = self::is_domain($domain);\r\n\t\t// local part may be up to 64 characters \r\n\t\t$ret = $ret && (strlen($local_part) <= 64);\r\n\t\t// dot is not allowed at the end or beginning\r\n\t\t// There is also a rule that 2 or more dots are illegal like in '[email protected]'\r\n\t\t// Unfortunately: my neighbor's address IS [email protected]! And I can't lock my neighbor \r\n\t\t// out of the services I program, can I? \r\n\t\t$ret = $ret && (substr($local_part, 0, 1) !== '.');\r\n\t\t$ret = $ret && (substr($local_part, -1) !== '.');\r\n\t\t// Only a-z, A-Z, 0-9 and !#$%&'*+-/=?^_`{|}~ and . are allowed\r\n\t\t// (There is quoting and escaping, but we do not hear, we do not hear, we do not hear...)\r\n\t\t$pattern = \"@^[a-zA-Z0-9!#$%&'*+\\-/=?^_`{|}~.]+$@s\";\r\n\t\t$ret = $ret && preg_match($pattern, strtr($local_part, \"\\r\\n\", ' '));\r\n\t\t\r\n\t\treturn $ret;\r\n\t}",
"public function isValidEmail($email){\n\t //If this check fails, there's no need to continue\n\t if(!filter_var($email, FILTER_VALIDATE_EMAIL))\n\t {\n\t\t return false;\n\t }\n\t //extract host\n\t list($user, $host) = explode(\"@\", $email);\n\t //check, if host is accessible\n\t if (!checkdnsrr($host, \"MX\") && !checkdnsrr($host, \"A\"))\n\t {\n\t\t return false;\n\t }\n\t return true;\n\t}",
"function validate_email_format($email, $expected) {\n\t// Make sure the address is valid\n\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t// Takes domain part of email after '@'\n\t\t$domain = array_pop(explode('@', $email));\n\t\t// if domain matches expected\n\t\tif ($domain == $expected) {\n\t\t\treturn TRUE;\n\t } else return FALSE;\n\t} else return FALSE;\n}",
"function smcf_validate_email($email) {\r\n\t$at = strrpos($email, \"@\");\r\n\r\n\t// Make sure the at (@) sybmol exists and \r\n\t// it is not the first or last character\r\n\tif ($at && ($at < 1 || ($at + 1) == strlen($email)))\r\n\t\treturn false;\r\n\r\n\t// Make sure there aren't multiple periods together\r\n\tif (preg_match(\"/(\\.{2,})/\", $email))\r\n\t\treturn false;\r\n\r\n\t// Break up the local and domain portions\r\n\t$local = substr($email, 0, $at);\r\n\t$domain = substr($email, $at + 1);\r\n\r\n\r\n\t// Check lengths\r\n\t$locLen = strlen($local);\r\n\t$domLen = strlen($domain);\r\n\tif ($locLen < 1 || $locLen > 64 || $domLen < 4 || $domLen > 255)\r\n\t\treturn false;\r\n\r\n\t// Make sure local and domain don't start with or end with a period\r\n\tif (preg_match(\"/(^\\.|\\.$)/\", $local) || preg_match(\"/(^\\.|\\.$)/\", $domain))\r\n\t\treturn false;\r\n\r\n\t// Check for quoted-string addresses\r\n\t// Since almost anything is allowed in a quoted-string address,\r\n\t// we're just going to let them go through\r\n\tif (!preg_match('/^\"(.+)\"$/', $local)) {\r\n\t\t// It's a dot-string address...check for valid characters\r\n\t\tif (!preg_match('/^[-a-zA-Z0-9!#$%*\\/?|^{}`~&\\'+=_\\.]*$/', $local))\r\n\t\t\treturn false;\r\n\t}\r\n\r\n\t// Make sure domain contains only valid characters and at least one period\r\n\tif (!preg_match(\"/^[-a-zA-Z0-9\\.]*$/\", $domain) || !strpos($domain, \".\"))\r\n\t\treturn false;\t\r\n\r\n\treturn true;\r\n}",
"public static function ValidateAddress($address) {\n\t if (function_exists('filter_var')) { //Introduced in PHP 5.2\n\t if(filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) {\n\t return false;\n\t } else {\n\t return true;\n\t }\n\t } else {\n\t return preg_match('/^(?:[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\`\\{\\|\\}\\~]+\\.)*[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\`\\{\\|\\}\\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\\-](?!\\.)){0,61}[a-zA-Z0-9_-]?\\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\\[(?:(?:[01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.){3}(?:[01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\]))$/', $address);\n\t }\n\t}",
"function isValidMailAddress($address) {\n // enhancement made in 3.6x based on code by Quandary.\n if (preg_match('/^(?!\\\\.)(?:\\\\.?[-a-zA-Z0-9!#$%&\\'*+\\\\/=?^_`{|}~]+)+@(?!\\\\.)(?:\\\\.?(?!-)[-a-zA-Z0-9]+(?<!-)){2,}$/', $address)) {\n return 1;\n } else {\n return 0;\n }\n}",
"public static function validateEMAIL($email) {\n if (filter_var($email, FILTER_VALIDATE_EMAIL))\n return true;\n else\n return false; \n }",
"function validEmail($email)\n{\n $isValid = true;\n $atIndex = strrpos($email, \"@\");\n if (is_bool($atIndex) && !$atIndex) {\n $isValid = false;\n }\n else {\n $domain = substr($email, $atIndex+1);\n $local = substr($email, 0, $atIndex);\n $localLen = strlen($local);\n $domainLen = strlen($domain);\n if ($localLen < 1 || $localLen > 64) {\n // local part length exceeded\n $isValid = false;\n } else if ($domainLen < 1 || $domainLen > 255) {\n // domain part length exceeded\n $isValid = false;\n } else if ($local[0] == '.' || $local[$localLen-1] == '.') {\n // local part starts or ends with '.'\n $isValid = false;\n } else if (preg_match('/\\\\.\\\\./', $local)) {\n // local part has two consecutive dots\n $isValid = false;\n } else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\n // character not valid in domain part\n $isValid = false;\n } else if (preg_match('/\\\\.\\\\./', $domain)) {\n // domain part has two consecutive dots\n $isValid = false;\n } else if(!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n str_replace(\"\\\\\\\\\",\"\",$local))) {\n // character not valid in local part unless \n // local part is quoted\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\n str_replace(\"\\\\\\\\\",\"\",$local))) {\n $isValid = false;\n }\n } if ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\n // domain not found in DNS\n $isValid = false;\n }\n }\n return $isValid;\n}",
"private static function validEmail($email) {\n $atIndex = strrpos($email, \"@\");\n if (is_bool($atIndex) && !$atIndex) {\n return false;\n } else {\n $domain = substr($email, $atIndex+1);\n $local = substr($email, 0, $atIndex);\n $localLen = strlen($local);\n $domainLen = strlen($domain);\n if ($localLen < 1 || $localLen > 64) {\n // local part length exceeded\n return false;\n } else if ($domainLen < 1 || $domainLen > 255) {\n // domain part length exceeded\n return false;\n } else if ($local[0] == '.' || $local[$localLen-1] == '.') {\n // local part starts or ends with '.'\n return false;\n }\n else if (preg_match('/\\\\.\\\\./', $local)) {\n // local part has two consecutive dots\n return false;\n } else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\n // character not valid in domain part\n return false;\n } else if (preg_match('/\\\\.\\\\./', $domain)) {\n // domain part has two consecutive dots\n return false;\n } else if (\n !preg_match(\n '/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n str_replace(\"\\\\\\\\\",\"\",$local)\n ) ) {\n // character not valid in local part unless \n // local part is quoted\n if ( !preg_match(\n '/^\"(\\\\\\\\\"|[^\"])+\"$/',\n str_replace(\"\\\\\\\\\",\"\",$local)) ) {\n return false;\n }\n }\n if ( !( checkdnsrr($domain,\"MX\") \n || checkdnsrr($domain,\"A\") ) ) {\n // domain not found in DNS\n return false;\n }\n }\n return true;\n }",
"function isValidEmail($email) {\r\n\treturn preg_match(\"/^[a-zA-Z]\\w+(\\.\\w+)*\\@\\w+(\\.[0-9a-zA-Z]+)*\\.[a-zA-Z]{2,4}$/\", $email);\r\n}",
"function oos_validate_is_email($sEmail) {\n $bValidAddress = true;\n\n $mail_pat = '^(.+)@(.+)$';\n $valid_chars = \"[^] \\(\\)<>@,;:\\.\\\\\\\"\\[]\";\n $atom = \"$valid_chars+\";\n $quoted_user='(\\\"[^\\\"]*\\\")';\n $word = \"($atom|$quoted_user)\";\n $user_pat = \"^$word(\\.$word)*$\";\n $ip_domain_pat='^\\[([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\]$';\n $domain_pat = \"^$atom(\\.$atom)*$\";\n\n if (eregi($mail_pat, $sEmail, $components)) {\n $user = $components[1];\n $domain = $components[2];\n // validate user\n if (eregi($user_pat, $user)) {\n // validate domain\n if (eregi($ip_domain_pat, $domain, $ip_components)) {\n // this is an IP address\n \t for ($i=1;$i<=4;$i++) {\n \t if ($ip_components[$i] > 255) {\n \t $bValidAddress = false;\n \t break;\n \t }\n }\n } else {\n // Domain is a name, not an IP\n if (eregi($domain_pat, $domain)) {\n /* domain name seems valid, but now make sure that it ends in a valid TLD or ccTLD\n and that there's a hostname preceding the domain or country. */\n $domain_components = explode(\".\", $domain);\n // Make sure there's a host name preceding the domain.\n if (count($domain_components) < 2) {\n $bValidAddress = false;\n } else {\n $top_level_domain = strtolower($domain_components[count($domain_components)-1]);\n // Allow all 2-letter TLDs (ccTLDs)\n if (eregi('^[a-z][a-z]$', $top_level_domain) != 1) {\n $sTld = get_all_top_level_domains();\n if (eregi(\"$sTld\", $top_level_domain) == 0) {\n $bValidAddress = false;\n }\n }\n }\n } else {\n \t $bValidAddress = false;\n \t }\n \t}\n } else {\n $bValidAddress = false;\n }\n } else {\n $bValidAddress = false;\n }\n if ($bValidAddress && ENTRY_EMAIL_ADDRESS_CHECK == '1') {\n if (!checkdnsrr($domain, \"MX\") && !checkdnsrr($domain, \"A\")) {\n $bValidAddress = false;\n }\n }\n return $bValidAddress;\n }",
"public static function email_domain($email)\r\n {\r\n // If we can't prove the domain is invalid, consider it valid\r\n // Note: checkdnsrr() is not implemented on Windows platforms\r\n if ( ! function_exists('checkdnsrr'))\r\n return TRUE;\r\n\r\n // Check if the email domain has a valid MX record\r\n return (bool) checkdnsrr(preg_replace('/^[^@]+@/', '', $email), 'MX');\r\n }",
"public static function ValidateAddress($address) {\n if (function_exists('filter_var')) { //Introduced in PHP 5.2\n if(filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) {\n return false;\n } else {\n return true;\n }\n } else {\n return preg_match('/^(?:[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\`\\{\\|\\}\\~]+\\.)*[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\`\\{\\|\\}\\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\\-](?!\\.)){0,61}[a-zA-Z0-9_-]?\\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\\[(?:(?:[01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.){3}(?:[01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\]))$/', $address);\n }\n }",
"function email_check($email) {\n\tif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\treturn false; \n\t}\n\t$domain = explode(\"@\",$email);\n\tif (!checkdnsrr($domain[1], 'MX')) {\n\t\treturn false; \n\t}\n\treturn true;\n}",
"function email_is_valid($email) {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n }",
"function validate_email($email, $check_domain = \\true)\n {\n }",
"function bwm_validate_email($email) {\r\n\t$isValid = true;\r\n\t$atIndex = strrpos($email, \"@\");\r\n\tif (is_bool($atIndex) && !$atIndex) {\r\n\t $isValid = false;\r\n\t} else {\r\n $domain = substr($email, $atIndex+1);\r\n $local = substr($email, 0, $atIndex);\r\n $localLen = strlen($local);\r\n $domainLen = strlen($domain);\r\n if ($localLen < 1 || $localLen > 64) {\r\n // local part length exceeded\r\n $isValid = false;\r\n } else if ($domainLen < 1 || $domainLen > 255) {\r\n // domain part length exceeded\r\n $isValid = false;\r\n } else if ($local[0] == '.' || $local[$localLen-1] == '.') {\r\n // local part starts or ends with '.'\r\n $isValid = false;\r\n } else if (preg_match('/\\\\.\\\\./', $local)) {\r\n // local part has two consecutive dots\r\n $isValid = false;\r\n } else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\r\n // character not valid in domain part\r\n $isValid = false;\r\n } else if (preg_match('/\\\\.\\\\./', $domain)) {\r\n // domain part has two consecutive dots\r\n $isValid = false;\r\n } else if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n // character not valid in local part unless \r\n // local part is quoted\r\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n $isValid = false;\r\n }\r\n }\r\n if ($isValid && function_exists('checkdnsrr') && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\r\n // domain not found in DNS\r\n $isValid = false;\r\n }\r\n\t}\r\n\treturn $isValid;\r\n}",
"static public function validateEMail($email) {\n if (preg_match(\"/^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/i\", $email)) {\n return true;\n }\n else {\n return false;\n }\n }",
"private function isEmailValid($email)\n {\n //We could handle email format validation here\n }",
"public function validate($email)\n {\n if (!$email) {\n $this->pass();\n return $this;\n }\n \n $isValid = true;\n $atIndex = strrpos($email, '@');\n if (is_bool($atIndex) && !$atIndex) {\n $isValid = false;\n } else {\n $domain = substr($email, $atIndex + 1);\n $local = substr($email, 0, $atIndex);\n $localLen = strlen($local);\n $domainLen = strlen($domain);\n if ($localLen < 1 || $localLen > 64) {\n // local part length exceeded\n $isValid = false;\n } elseif ($domainLen < 1 || $domainLen > 255) {\n // domain part length exceeded\n $isValid = false;\n } elseif ($local[0] == '.' || $local[$localLen - 1] == '.') {\n // local part starts or ends with '.'\n $isValid = false;\n } elseif (preg_match('/\\\\.\\\\./', $local)) {\n // local part has two consecutive dots\n $isValid = false;\n } elseif (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\n // character not valid in domain part\n $isValid = false;\n } elseif (preg_match('/\\\\.\\\\./', $domain)) {\n // domain part has two consecutive dots\n $isValid = false;\n } elseif (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace('\\\\\\\\', '', $local))) {\n // character not valid in local part unless local part is quoted\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\n $isValid = false;\n }\n }\n \n // check to make sure it's a valid registered email address\n if ($isValid && !(checkdnsrr($domain, 'MX') || checkdnsrr($domain, 'A'))) {\n $isValid = false;\n }\n }\n \n if ($isValid) {\n $this->pass();\n } else {\n $this->fail();\n }\n return $this;\n }",
"function validEmail($email)\r\n{\r\n\t$isValid = true;\r\n\t$atIndex = strrpos($email, \"@\");\r\n\tif (is_bool($atIndex) && !$atIndex)\r\n\t{\r\n\t\t$isValid = false;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$domain = substr($email, $atIndex+1);\r\n\t\t$local = substr($email, 0, $atIndex);\r\n\t\t$localLen = strlen($local);\r\n\t\t$domainLen = strlen($domain);\r\n\t\tif ($localLen < 1 || $localLen > 64)\r\n\t\t{\r\n\t\t\t// local part length exceeded\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if ($domainLen < 1 || $domainLen > 255)\r\n\t\t{\r\n\t\t\t// domain part length exceeded\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if ($local[0] == '.' || $local[$localLen-1] == '.')\r\n\t\t{\r\n\t\t\t// local part starts or ends with '.'\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if (preg_match('/\\\\.\\\\./', $local))\r\n\t\t{\r\n\t\t\t// local part has two consecutive dots\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\r\n\t\t{\r\n\t\t\t// character not valid in domain part\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if (preg_match('/\\\\.\\\\./', $domain))\r\n\t\t{\r\n\t\t\t// domain part has two consecutive dots\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t\telse if\r\n\t\t(!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\r\n\t\t\t\tstr_replace(\"\\\\\\\\\",\"\",$local)))\r\n\t\t{\r\n\t\t\t// character not valid in local part unless\r\n\t\t\t// local part is quoted\r\n\t\t\tif (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\r\n\t\t\t\t\tstr_replace(\"\\\\\\\\\",\"\",$local)))\r\n\t\t\t{\r\n\t\t\t\t$isValid = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) \r\n\t\t{\r\n\t\t\t// domain not found in DNS\r\n\t\t\t$isValid = false;\r\n\t\t}\r\n\t}\r\n\treturn $isValid;\r\n}",
"protected function validEmail($email, $dnscheck = false) {\r\n\t\t$isValid = true;\r\n\t\t$atIndex = strrpos($email, \"@\");\r\n\t\tif (is_bool($atIndex) && !$atIndex) {\r\n\t\t\t$isValid = false;\r\n\t\t} else {\r\n\t\t\t$domain = substr($email, $atIndex+1);\r\n\t\t\t$local = substr($email, 0, $atIndex);\r\n\t\t\t$localLen = strlen($local);\r\n\t\t\t$domainLen = strlen($domain);\r\n\t\t\tif ($localLen < 1 || $localLen > 64) {\r\n\t\t\t\t// local part length exceeded\r\n\t\t\t\t$isValid = false;\r\n\t\t\t} else if ($domainLen < 1 || $domainLen > 255) {\r\n\t\t\t\t// domain part length exceeded\r\n\t\t\t\t$isValid = false;\r\n\t\t\t} else if ($local[0] == '.' || $local[$localLen-1] == '.') {\r\n\t\t\t\t// local part starts or ends with '.'\r\n\t\t\t\t$isValid = false;\r\n\t\t\t} else if (preg_match('/\\\\.\\\\./', $local)) {\r\n\t\t\t\t// local part has two consecutive dots\r\n\t\t\t\t$isValid = false;\r\n\t\t\t} else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\r\n\t\t\t\t// character not valid in domain part\r\n\t\t\t\t$isValid = false;\r\n\t\t\t} else if (preg_match('/\\\\.\\\\./', $domain)) {\r\n\t\t\t\t// domain part has two consecutive dots\r\n\t\t\t\t$isValid = false;\r\n\t\t\t} else if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\r\n\t\t\t\t// character not valid in local part unless \r\n\t\t\t\t// local part is quoted\r\n\t\t\t\tif (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\r\n\t\t\t\t\tstr_replace(\"\\\\\\\\\",\"\",$local)))\r\n\t\t\t\t{\r\n\t\t\t\t\t$isValid = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($isValid && $dnscheck && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\r\n\t\t\t\t// domain not found in DNS\r\n\t\t\t\t$isValid = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $isValid;\r\n\t}",
"private function validateEmail($email) {\n if (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }",
"public function verifyContainsEmail(): bool\n {\n $words = explode(' ', $this->input);\n foreach ($words as $word) {\n if (static::isValidEmail($word)) {\n return true;\n }\n }\n \n return false;\n }",
"public function isValidEmail($email) {\n\t\tif (preg_match(\"/^([a-zA-Z0-9]+)(@)([a-zA-Z0-9.]+)(.edu)$/\", $email, $output_array)){\n\t\t\tif(filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"function email_is_valid($email) {\r\n return preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i',$email);\r\n }",
"public function validateEmail($email) {\n if(!filter_var($email, FILTER_VALIDATE_EMAIL)){\n return false;\n }\n \n return true;\n }",
"function isValidEmailAddress($emailAddress)\n{\n return filter_var($emailAddress, FILTER_VALIDATE_EMAIL) !== false;\n}",
"public static function isValidEmail($email) {\n\t\t$email_apart = preg_split('/@/', $email);\n\n\t\tif (count($email_apart) <= 1) return false;\n\n\t\t$username = $email_apart[0];\n\t\t$hostname = $email_apart[1];\n\t\t$mxhosts = array();\n\t\t$dns = checkdnsrr($hostname);\n\t\t$mx = getmxrr($hostname, $mxhosts);\n\n\t\treturn ($dns && $mx && count($mxhosts) >= 1) ? true : false;\n\t}",
"function validate_email($email)\n\t{\n\t\t$regexp = \"^([_a-z0-9-]+)(\\.[_a-z0-9-]+)*@([a-z0-9-]+)(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$\";\n\t\t// Presume that the email is invalid\n\t\t$valid = false;\n\t\t// Validate the syntax\n\t\tif (eregi($regexp, $email)) {\n\t\t\tlist($username, $domaintld) = split(\"@\", $email);\n\t\t\t$OS = $this->os_type();\n\t\t\tif ($OS == 'Linux') {\n\t\t\t\tif (checkdnsrr($domaintld, \"MX\")) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn $valid;\n\t}",
"function is_email_valid($email) {\n\treturn filter_var($email, FILTER_VALIDATE_EMAIL);\n}",
"function isEmail($input) {\n // Matches Email addresses. (Found out how to break up a RedEx so that it can be nicly commited.)\n return (preg_match(\n \"~(^ ## Match starts at the beginning of the string.\n (?>[[:alnum:]._-])+ ## Matches any alpha numaric character plus the '.', '_', and '-'\n ## For the name part of an address. \n (?>@) ## Matches the at sign.\n (?>[[:alnum:]])+ ## Matches any alpha numaric character\n ## For the Place part of the address.\n \n (?> ## To match things like 'uk.com 'or just '.com'\n (?:\\.[[:alpha:]]{2,3}\\.[[:alpha:]]{2,3}) ## Matches a '.' then 2-3 alphabet characters\n ## then another '.' and 2-3 alphabet characters.\n | ## Or Matches\n (?:\\.[[:alpha:]]{2,3}) ## a single '.' then 2-3 alphabet characters.\n )\n $ ## Match to the end of the string.\n )~x\", $input));\n }",
"public static function IsValid ($address) {\n return preg_match(\"/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$/\", $address);\n }",
"private function email_Check_Validation($email){\r\n return (filter_var($email, FILTER_VALIDATE_EMAIL)) ? true : false;\r\n }",
"public static function ValidaEmailValido($email) {\n // if (!preg_match('/^([a-zA-Z0-9.-])*([@])([a-z0-9]).([a-z]{2,3})/', $email)) {\n // return false;\n // } else {\n //Valida o dominio\n \n $dominio = explode('@', $email);\nerror_reporting(0);\nini_set('display_errors', FALSE);\n try {\n if (!checkdnsrr($dominio[1], 'A')) {\n return false;\n } else {\n return true;\n } // Retorno true para indicar que o e-mail é valido\n } catch (Exception $ex) {\n return false;\n }\n \n // }\n }",
"protected function validate_email( $p_value ) {\n\t\t$email = trim($p_value);\n\n\t\t$isValid = true;\n\t\t$atIndex = strrpos($email, \"@\");\n\t\tif ( is_bool($atIndex) && !$atIndex ) {\n\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address missing a @\",null);\n\t\t} else {\n\t\t\t// get domain and local string\n\t\t\t$domain = substr($email, $atIndex + 1);\n\t\t\t$local = substr($email, 0, $atIndex);\n\t\t\t// get length of domain and local string\n\t\t\t$localLen = strlen($local);\n\t\t\t$domainLen = strlen($domain);\n\t\t\tif ( $localLen < 1 ) {\n\t\t\t\t// local part length exceeded\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ is missing\",null);\n\t\t\t} else if ( $localLen > 64 ) {\n\t\t\t\t// local part length exceeded\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ is more than 64 chars\",null);\n\t\t\t} else if ( $domainLen < 1 ) {\n\t\t\t\t// domain part length exceeded\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain missing\",null);\n\t\t\t} else if ( $domainLen > 255 ) {\n\t\t\t\t// domain part length exceeded\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain is more than 255 chars\",null);\n\t\t\t} else if ( $local[0] == '.' ) {\n\t\t\t\t// local part starts or ends with '.'\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address starts with '.'\",null);\n\t\t\t} else if ( $local[$localLen - 1] == '.' ) {\n\t\t\t\t// local part starts or ends with '.'\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ ends with '.'\",null);\n\t\t\t} else if ( preg_match('/\\\\.\\\\./', $local) ) {\n\t\t\t\t// local part has two consecutive dots\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ contains '..'\",null);\n\t\t\t} else if ( !preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain) ) {\n\t\t\t\t// character not valid in domain part\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain contains invalid character\",null);\n\t\t\t} else if ( preg_match('/\\\\.\\\\./', $domain) ) {\n\t\t\t\t// domain part has two consecutive dots\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain contains '..'\",null);\n\t\t\t} else if ( !preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$local)) ) {\n\t\t\t\t// character not valid in local part unless\n\t\t\t\t// local part is quoted\n\t\t\t\tif (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\n\t\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address prior to @ must be quoted due to special character\",null);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\")) ) {\n\t\t\t\t// domain not found in DNS\n\t\t\t\treturn $this->return_handler->results(400,$this->database_name . \":\" . $this->table_name . \" email address domain not found in DNS\",null);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->return_handler->results(200,\"\",null);\n\t}",
"private function isEmailValid($email){\n\t\treturn filter_var($email, FILTER_VALIDATE_EMAIL);\n\t}",
"public static function validateEmail($email) {\n\t\treturn filter_var($email, FILTER_VALIDATE_EMAIL);\n\t}",
"private function email_is_valid($address = '', $ignore_format = false)\n\t{\n\t\tif (!strlen($address))\n\t\t\treturn FALSE;\n\t\t\t\n\t\t//verify there is a valid email address in the string\n\t\tif (preg_match( '%[a-z0-9._-]+@[a-z0-9_-]+\\.[a-z.]+%is', $address ) <= 0)\n\t\t\treturn FALSE;\n\t\t\n\t\t//if ANY invalid email characters are found, assume it's the name encapsulated variant of the standard\n\t\tif (!$ignore_format)\n\t\t{\n\t\t\tif (preg_match( '%[^a-z0-9@._-]%is', $address ) > 0)\n\t\t\t{\n\t\t\t\t//ensure it matches the format of \n\t\t\t\tif (preg_match( '%.*\\s<[a-z0-9@.]+>%is', $address ) <= 0)\n\t\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}",
"function isEmailValid($email) {\n\treturn filter_var($email, FILTER_VALIDATE_EMAIL) && preg_match('/@.+\\./', $email);\n}",
"public static function isValidEmail($email){\n return (filter_var($email, FILTER_VALIDATE_EMAIL)) ? true : false;\n }",
"function is_email($addr)\n{\n $addr = strtolower(trim($addr));\n $addr = str_replace(\"@\",\"@\",$addr);\n if ( (strstr($addr, \"..\")) || (strstr($addr, \".@\")) || (strstr($addr, \"@.\")) || (!preg_match(\"/^[[:alnum:]][a-z0-9_.-]*@[a-z0-9][a-z0-9.-]{0,61}[a-z0-9]\\.[a-z]{2,6}\\$/\", stripslashes(trim($addr)))) ) {\n $emailvalidity = 0;\n } else {\n $emailvalidity = 1;\n }\n return $emailvalidity;\n}",
"public static function validateFormat(string $email): bool {\n\t\t$regExp = '/^([a-z0-9\\+_\\-]+)(\\.[a-z0-9\\+_\\-]+)*@([a-z0-9\\-]+\\.)+[a-z]{2,6}$/ix';\n\n\t\treturn (bool) preg_match($regExp, $email);\n\t}",
"function EmailValidation($email)\n{ \n $email = htmlspecialchars(stripslashes(strip_tags($email)));\n if(preg_match(\"/^([a-zA-Z0-9])+([a-zA-Z0-9\\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\\._-]+)+$/\",$email))\n {\n /*$domain = explode('@', $email);\n $domain = $domain[1];\n if(!checkdnsrr($domain,'MX'))\n {\n //return false;\n return true;\n }*/\n return true;\n }\n else\n {\n return false;\n }\n}",
"public static function validateEmail($email) {\n\t\tif (!empty($email)) {\n\t\t\tif (strlen($email) >= 8) {\n\t\t\t\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"function check_email ($email) {\n\t\n if (preg_match ('/^[-!#$%&\\'*+\\\\.\\/0-9=?A-Z^_{|}~]+' . '@' . '([-0-9A-Z]+\\.)+' . '([0-9A-Z]){2,4}$/i', trim ($email))) {\n \n return true;\n \n } else {\n \n return false;\n \n }\n}",
"function emailValidation($email)\n\t{\n\t\tif (!filter_var($email, FILTER_VALIDATE_EMAIL))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n \t}",
"public static function validateEmail($address, $real_check = true)\n {\n if(!preg_match('|^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$|i', $address)) {\n return false;\n }\n return true;\n }",
"public function validateEmailFormat($string)\n {\n if (strpos($string, '@') !== false && strpos($string, '.') !== false) {\n return true;\n }\n\n return false;\n }",
"public function validateEmail()\n {\n if (!isset($this->_data['email'])) {\n return false;\n }\n\n $response = filter_var($this->_data['email'], FILTER_VALIDATE_EMAIL);\n\n return ($response !== false);\n }",
"private function validateEmail($email)\n {\n //matches valid email address\n $p = '/^[\\w-]+(\\.[\\w-]+)*@[a-z0-9-]+'\n .'(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$/i';\n //if match found, return true, otherwise return false\n return(preg_match($p,$email)) ? TRUE : FALSE;\n }",
"public static function isValid($email)\n {\n return (boolean) preg_match(\n '/^(?!(?>(?1)\"?(?>\\\\\\[ -~]|[^\"])\"?(?1)){255,})(?!(?>(?1)\"?(?>\\\\\\[ -~]|[^\"])\"?(?1)){65,}@)' .\n '((?>(?>(?>((?>(?>(?>\\x0D\\x0A)?[\\t ])+|(?>[\\t ]*\\x0D\\x0A)?[\\t ]+)?)(\\((?>(?2)' .\n '(?>[\\x01-\\x08\\x0B\\x0C\\x0E-\\'*-\\[\\]-\\x7F]|\\\\\\[\\x00-\\x7F]|(?3)))*(?2)\\)))+(?2))|(?2))?)' .\n '([!#-\\'*+\\/-9=?^-~-]+|\"(?>(?2)(?>[\\x01-\\x08\\x0B\\x0C\\x0E-!#-\\[\\]-\\x7F]|\\\\\\[\\x00-\\x7F]))*' .\n '(?2)\")(?>(?1)\\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' .\n '(?>(?1)\\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' .\n '|(?!(?:.*[a-f0-9][:\\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' .\n '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' .\n '|[1-9]?[0-9])(?>\\.(?9)){3}))\\])(?1)$/isD',\n $email ?: ''\n );\n }",
"protected function _validateEmailFormat($email) {\n\t\t\t$email = strtolower(trim($email));\n\t\t\t$emailSplitCharacters = explode('@', $email);\n\t\t\t$validAlphaNumericCharacters = 'abcdefghijklmnopqrstuvwxyz1234567890';\n\t\t\t$validLocalCharacters = '.!#$%&\\'*+-/=?^_`{|}~' . $validAlphaNumericCharacters;\n\t\t\t$validLocalSpecialCharacters = ' (),:;<>@[]';\n\t\t\t$validDomainCharacters = '-.' . $validAlphaNumericCharacters;\n\n\t\t\tif (count($emailSplitCharacters) !== 2) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$localString = $emailSplitCharacters[0];\n\t\t\t$localStringCharacters = str_split($localString);\n\t\t\t$domainString = $emailSplitCharacters[1];\n\t\t\t$domainStringCharacters = str_split($domainString);\n\t\t\t$domainStringSplitCharacters = explode('.', $domainString);\n\n\t\t\tif (\n\t\t\t\tcount($domainStringSplitCharacters) < 2 ||\n\t\t\t\tstrlen(end($domainStringSplitCharacters)) < 2 ||\n\t\t\t\tstrstr(' .-', $lastLocalStringCharacter = end($localStringCharacters)) !== false ||\n\t\t\t\tstrstr(' .-', $firstLocalStringCharacter = reset($localStringCharacters)) !== false ||\n\t\t\t\tstrstr(' .-', $lastDomainStringCharacter = end($domainStringCharacters)) !== false ||\n\t\t\t\tstrstr(' .-', $firstDomainStringCharacter = reset($domainStringCharacters)) !== false ||\n\t\t\t\tstrpos($domainString, '-.') !== false ||\n\t\t\t\tstrpos($domainString, '.-') !== false ||\n\t\t\t\t$lastDomainStringCharacter == '-'\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t$lastLocalStringCharacter == '\"' &&\n\t\t\t\t$firstLocalStringCharacter == '\"'\n\t\t\t) {\n\t\t\t\t$validLocalCharacters .= $validLocalSpecialCharacters;\n\t\t\t\tarray_shift($localStringCharacters);\n\t\t\t\tarray_pop($localStringCharacters);\n\t\t\t\t$localString = implode('', $localStringCharacters);\n\t\t\t\t$localString = str_replace('\\\\' . '\\\\', ' \\\\' . '\\\\ ', $localString);\n\t\t\t\t$localString = str_replace('\\\"', ' \\\" ', $localString);\n\t\t\t\t$localStringCharacters = array();\n\t\t\t\t$localStringSplitCharacters = explode(' ', $localString);\n\n\t\t\t\tforeach ($localStringSplitCharacters as $key => $localStringSplitCharacter) {\n\t\t\t\t\t$localStringCharacters = array_filter(array_merge($localStringCharacters, !in_array($localStringSplitCharacter, array('\\\\' . '\\\\', '\\\"')) ? str_split($localStringSplitCharacter) : array()));\n\t\t\t\t}\n\t\t\t} elseif (\n\t\t\t\t(strpos($domainString, '..') !== false) ||\n\t\t\t\t(strpos($localString, '..') !== false) ||\n\t\t\t\t$localString[0] === '.' ||\n\t\t\t\t$localString[strlen($localString) - 1] === '.'\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t$invalidLocalCharacters = array_diff($localStringCharacters, str_split($validLocalCharacters)) ||\n\t\t\t\t$invalidDomainCharacters = array_diff($domainStringCharacters, str_split($validDomainCharacters))\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$response = $email;\n\t\t\treturn $response;\n\t\t}",
"function isValidEmail($email){\n\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\treturn true;\n\t}\n\telse {\n\t\treturn false;\n\t}\n}",
"function isValidEmail($email) {\n return strpos($email, \"@\") !== false;\n }",
"protected function validateEmail($value){\n\t\tif(!$value) return true;\n\t\treturn filter_var($value, FILTER_VALIDATE_EMAIL) !== false;\n\t}",
"function checkEmail($email)\n{\n // checks proper syntax\n if( !preg_match( \"/^([a-zA-Z0-9])+([a-zA-Z0-9\\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\\._-]+)+$/\", $email))\n return false;\n else\n \treturn true;\n}",
"protected function validateEmail($value) {\n if (filter_var($value, FILTER_VALIDATE_EMAIL))\n return true;\n $this->setError(t(\"Invalid e-mail address\"));\n return false;\n }",
"function is_valid_email($email)\n{\n if (is_null($email) || strlen($email) < 6)\n {\n return false;\n }\n $pattern = \"/^[_a-z0-9\\-]+(\\.[_a-z0-9\\-]+)*@[a-z0-9\\-]+(\\.[a-z0-9\\-]+)*(\\.[a-z]{2,4})$/\";\n return (preg_match($pattern, $email) == 1);\n}",
"public function isEmail($value, $validateDomain = FALSE) {\n\t\t$atom = \"[-a-z0-9!#$%&'*+/=?^_`{|}~]\"; // RFC 5322 unquoted characters in local-part\n\t\t$localPart = \"(?:\\\"(?:[ !\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]*|\\\\\\\\[ -~])+\\\"|$atom+(?:\\\\.$atom+)*)\"; // quoted or unquoted\n\t\t$chars = \"a-z0-9\\x80-\\xFF\"; // superset of IDN\n\t\t$domain = \"[$chars](?:[-$chars]{0,61}[$chars])\"; // RFC 1034 one domain component\n\t\t$validFormat = (bool) preg_match(\"(^$localPart@(?:$domain?\\\\.)+[-$chars]{2,19}\\\\z)i\", $value);\n\t\tif ($validateDomain) {\n\t\t\treturn $validFormat && $this->isValidEmailDomain($value);\n\t\t}\n\t\treturn $validFormat;\n\t}",
"public static function checkEmail($email)\n {\n if (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return true;\n }\n return false;\n }",
"public static function email($email){\n\t \n\t\tif (mb_strlen($email, 'UTF-8') > 254) \n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$expression = '/^[-_a-z0-9\\'+*$^&%=~!?{}]++(?:\\.[-_a-z0-9\\'+*$^&%=~!?{}]+)*+@(?:(?![-.])[-a-z0-9.]+(?<![-.])\\.[a-z]{2,6}|\\d{1,3}(?:\\.\\d{1,3}){3})$/iD';\n\t\treturn (bool) preg_match($expression, (string) $email);\n\t}",
"private function validateEmail($email)\n {\n /*\n if (!preg_match_all('/^[a-z0-9\\.\\_\\-@]*$/',$email)){\n $this->user_status_message='For email use letters,underscore,hyphen,numbers and periods.';\n return false;\n }\n */\n if (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n return true;\n } else {\n $this->user_status_message = 'Invalid email address.';\n return false;\n }\n }",
"public static function validateEmail($email) {\n // Matches valid email addresses\n //$p= '/^[\\w-]+(\\.[\\w-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$/i';\n // If a match is found, return TRUE, otherwise return FALSE\n return (preg_match(REG_VALID_EMAIL, $email)) ? TRUE : FALSE;\n }",
"protected function validateEmail($email) {\t\n\t $valid = (!filter_var($email, FILTER_VALIDATE_EMAIL)) ? FALSE : TRUE;\n\t \n\t return $valid;\n\t}",
"function check_email($emaildddress)\n{\n\t$goodchars = '^[A-Za-z0-9\\._-]+@([A-Za-z][A-Za-z0-9-]{1,62})(\\.[A-Za-z][A-Za-z0-9-]{1,62})+$';\n\n\t$isvalid = true;\n\tif(!ereg($goodchars,$emaildddress))\n\t{\n\t\t$isvalid = false;\n\t}\n\treturn $isvalid;\n}",
"function isEmail($email) {\n return (bool)preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i', $email);\n}",
"public static function validate($sEmailAddress, $bUseDNS = false)\n {\n if (preg_match(\"/.*?<(.*?)>/\", $sEmailAddress, $aMatch))\n {\n $sEmailAddress = $aMatch[1];\n }\n\n if (empty($sEmailAddress))\n {\n throw new \\Exception('Email address is empty');\n }\n\n if (strpos($sEmailAddress, ' ') !== false)\n {\n throw new \\Exception('Email address is *not* allowed to have spaces in it');\n }\n\n $iAtIndex = strrpos($sEmailAddress, \"@\");\n\n if (false === $iAtIndex)\n {\n throw new \\Exception(\"Email address does not contain an 'at sign' (@)\");\n }\n\n $sLocal = substr($sEmailAddress, 0, $iAtIndex);\n $sLocalLen = strlen($sLocal);\n\n if ($sLocalLen < 1)\n {\n throw new \\Exception(\"The 'local' part of the email address is empty\");\n }\n\n if ($sLocalLen > 64)\n {\n throw new \\Exception(\"The 'local' part of the email address is too long\");\n }\n\n $sDomain = substr($sEmailAddress, $iAtIndex + 1);\n $sDomainLen = strlen($sDomain);\n\n if ($sDomainLen < 1)\n {\n throw new \\Exception(\"The 'domain' part of the email address is empty\");\n }\n\n if ($sDomainLen > 255)\n {\n throw new \\Exception(\"The 'domain' part of the email address is too long\");\n }\n\n if ($sLocal[0] == '.')\n {\n throw new \\Exception(\"The 'local' part of the email address starts with a 'dot' (.)\");\n }\n\n if ($sLocal[$sLocalLen - 1] == '.')\n {\n throw new \\Exception(\"The 'local' part of the email address ends with a 'dot' (.)\");\n }\n\n if (preg_match('/\\\\.\\\\./', $sLocal))\n {\n throw new \\Exception(\"The 'local' part of the email address has two consecutive dots (..)\");\n }\n\n if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $sDomain))\n {\n throw new \\Exception(\"The 'domain' part of the email address contains invalid characters\");\n }\n\n if (preg_match('/\\\\.\\\\./', $sDomain))\n {\n throw new \\Exception(\"The 'domain' part of the email address has two consecutive dots (..)\");\n }\n\n $sSlashLight = str_replace(\"\\\\\\\\\", \"\", $sLocal);\n\n //these characters are invalid\n if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', $sSlashLight))\n {\n //unless the whole thing is quoted\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', $sSlashLight))\n {\n throw new \\Exception(\"The 'local' part of the email address contains invalid characters\");\n }\n }\n\n if ($bUseDNS)\n {\n if (!checkdnsrr($sDomain, \"MX\") && !checkdnsrr($sDomain, \"A\"))\n {\n throw new \\Exception(\"The 'domain' part of the email address has no valid DNS\");\n }\n }\n }",
"function validEmail($email)\r\n {\r\n return !empty($email) && preg_match(\"/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$/\", $email);\r\n }",
"private function isValidEmail(string $email): bool\n {\n return filter_var($email, FILTER_VALIDATE_EMAIL) !== false;\n }",
"static function IsEmail($email) {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n }",
"static function validEmail($email)\r\n {\r\n return !!preg_match(\"/^([a-z0-9\\+_\\-]+)(\\.[a-z0-9\\+_\\-]+)*@\r\n ([a-z0-9\\-]+\\.)+[a-z]{2,6}$/ix\", $email);;\r\n }",
"function check_email($email) {\r\n\r\n if (filter_var($email, FILTER_VALIDATE_EMAIL)) {\r\n return true;\r\n }\r\n return false;\r\n}",
"public function isValidEmail($variable) {\n if (filter_var($variable,FILTER_VALIDATE_EMAIL)) {\n return true;\n }\n return false;\n }",
"public function email($email)\n {\n return (bool)filter_var($email, FILTER_VALIDATE_EMAIL);\n }",
"function validate_email($email){\n\t\n\tif(empty($email)){\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\tif(count(explode('@',$email)) != 2){\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\telse {\n\t\t\n\t\t$words = explode('@',$email);\n\t\t\t$second = $words[1];\n\t\t\tif(count(explode('.',$email)) != 2){\n\t\t\t\n\t\t\treturn false;\n\t\t\n\t\t}\n\t\t\n\t}\n\t\treturn true;\n\t\n\t\n}",
"function isEmail($input){\n return preg_match('/[a-z0-9]@[a-z]{3,}\\.[a-z]{3}$/',$input);\n }"
] | [
"0.8379823",
"0.8265428",
"0.8246746",
"0.81822044",
"0.81489635",
"0.80396426",
"0.8012912",
"0.8012912",
"0.7898054",
"0.7897991",
"0.78524727",
"0.78385776",
"0.7829738",
"0.7825873",
"0.7825873",
"0.7795482",
"0.7752686",
"0.775141",
"0.7721953",
"0.77163994",
"0.76923156",
"0.7679786",
"0.7619347",
"0.75998986",
"0.7589366",
"0.7586023",
"0.7584765",
"0.7583056",
"0.75802845",
"0.75701356",
"0.75642323",
"0.7552577",
"0.75513864",
"0.75479275",
"0.75466496",
"0.75382584",
"0.75336426",
"0.7532209",
"0.75255173",
"0.7516759",
"0.74771947",
"0.7460298",
"0.7454552",
"0.74532795",
"0.7452247",
"0.74491453",
"0.74430096",
"0.74374866",
"0.7437067",
"0.7434305",
"0.74340606",
"0.7433334",
"0.74271274",
"0.742282",
"0.7421812",
"0.7421336",
"0.7411651",
"0.7407836",
"0.7383165",
"0.73783803",
"0.7376795",
"0.73734504",
"0.73708147",
"0.73547566",
"0.7351008",
"0.7345955",
"0.7338371",
"0.7330408",
"0.73270154",
"0.73182046",
"0.7317749",
"0.7309387",
"0.7308414",
"0.73080695",
"0.73027414",
"0.72780687",
"0.727758",
"0.72629106",
"0.7260334",
"0.7257276",
"0.72528213",
"0.724547",
"0.7244662",
"0.72442955",
"0.72387105",
"0.72266185",
"0.7226562",
"0.72250444",
"0.7220392",
"0.72174567",
"0.7212204",
"0.7208358",
"0.7206456",
"0.72060215",
"0.7203325",
"0.7201348",
"0.72002715",
"0.71976274",
"0.7197519",
"0.7195771"
] | 0.7510591 | 40 |
verify and validate the data | protected function import_data_into_interface_common($upload_path, $csv_filename)
{
$error_code = self::NO_ERROR;
$batch_id = 0;
$number_of_successes = 0;
$error_message = "";
$result = true;
$uploadedFile = $upload_path . "/" . $csv_filename;
$data = $this->get_import_service()->get_file_data($uploadedFile);
$number_of_rows_in_csv = sizeof((array) $data);
if (sizeof((array) $data) == 0)
{
$error_code = self::NO_DATA_IN_THE_FILE;
$error_message = "Upload File is empty";
}
else
{
$data_result = $this->get_import_service()->validate_import_data($data);
}
if ((sizeof($data_result) == 0) && ($error_code == self::NO_ERROR))
{
//create a new batch
if ($batch_id = $this->get_import_service()->create_new_batch($this->get_function_name(), 0, $csv_filename))
{
//insert all record to interface table
$import_result = $this->import_record($data, $batch_id);
if ($import_result["result"])
{
$number_of_successes = $import_result["number_of_successes"];
}
else
{
$error_code = self::ERROR_DURING_IMPORT_TO_INTERFACE;
$error_message .= "\n " . __METHOD__ . " " . __LINE__ . " Error during Import into interface \n" . $import_result["error_message"];
}
}
else
{
$error_code = self::CANNOT_CREATE_BATCH;
$error_message .= "\n create new batch error.";
}
}
return array("batch_id" => $batch_id
, "error_message" => $error_message
, "error_code" => $error_code
, "number_of_successes" => $number_of_successes
, "number_of_rows_in_csv" => $number_of_rows_in_csv
, "validate_result" => $data_result
, "is_fail_validation" => sizeof($data_result) ? TRUE : FALSE
, "data_from_csv" => $data
, "import_data" => $import_result["import_data"]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function validateData();",
"function isDataValid() \n {\n return true;\n }",
"abstract public function validateData($data);",
"public function checkData() {\n\t\t// e.g. numbers must only have digits, e-mail addresses must have a \"@\" and a \".\".\n\t\treturn $this->control->checkPOST($this);\n\t}",
"public function checkData() {\n\t\t// e.g. numbers must only have digits, e-mail addresses must have a \"@\" and a \".\".\n\t\treturn $this->control->checkPOST($this);\n\t}",
"public function validateData(){\n return true;\n }",
"public final function verifySetData(){\n\n foreach($this->data as $k => $v){\n $this->verifyData($k);\n }//foreach\n\n if(count($this->errors)){\n return false;\n }//if\n\n return true;\n\n }",
"public function isDataValid(): bool;",
"public function validateData($data): void;",
"abstract protected function validate($data);",
"private function validateData() {\r\n\r\n $requiredFields = array(\"v_code\" => \"Verification code not supplied\",\r\n \"psw1\" => \"Password field is empty\",\r\n \"psw2\" => \"Password field is empty\",);\r\n\r\n\r\n //0 means there is no error\r\n $error_status = \\VAL_NO_ERROR;\r\n\r\n /*\r\n Initialize error object that will be returned by this function\r\n */\r\n $error_obj = new stdClass();\r\n $error_obj->msg = \"\";\r\n $error_obj->field = \"\";\r\n $error_obj->code = 0;\r\n $error_obj->type = \\VAL_NO_ERROR;\r\n\r\n //check if required variables are defined\r\n foreach ($requiredFields as $key => $value) {\r\n $value = $this->request->request->get($key);\r\n if (empty( $value )) {\r\n $error_obj->field = $key;\r\n $error_obj->msg = $requiredFields[$key];\r\n $error_obj->type = \\VAL_FIELD_ERROR;\r\n\r\n //return after each field that is found wrong\r\n return $error_obj;\r\n }\r\n }\r\n\r\n $pass_1 = $this->request->request->get('psw1');\r\n $pass_2 = $this->request->request->get('psw2');\r\n\r\n //Check if emails match\r\n if (strcmp($pass_1, $pass_2) != 0) {\r\n $error_obj->field = \"psw2\";\r\n $error_obj->msg = \"Passwords are different\";\r\n $error_obj->type = \\VAL_FIELD_ERROR;\r\n\r\n return $error_obj;\r\n }\r\n\r\n /*\r\n Only check one password. If both passwords are thesame, we only need to check one of them.\r\n */\r\n if (!preg_match('/^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{6,}$/', $pass_1)) {\r\n $error_obj->field = \"psw1\";\r\n $error_obj->msg = \"Password must have a digit, lower and upper case charters. Min lenght is 6\";\r\n $error_obj->type = \\VAL_FIELD_ERROR;\r\n\r\n return $error_obj;\r\n }\r\n\r\n return $error_obj;\r\n }",
"public function isValid($data);",
"abstract public function isValid($data);",
"private function _validData($data){\n\t\t$columnsLen = array(\n\t\t\t\t\t\t\t'nro_pedido' => 6,\n\t\t\t\t\t\t\t'id_factura_pagos' => 1,\n\t\t\t\t\t\t\t'valor' => 1,\n\t\t\t\t\t\t\t'concepto' => 1,\n\t\t\t\t\t\t\t'fecha_inicio' => 0,\n\t\t\t\t\t\t\t'fecha_fin' => 0,\n\t\t\t\t\t\t\t'id_user' => 1\n\t\t);\n\t\treturn $this->_checkColumnsData($columnsLen, $data);\n\t}",
"public function validate($data): bool;",
"public function validate($data): bool;",
"public function validateData(){\n if(substr($this->user_id,0,5)!=$this->office_id){\n return false;\n }\n if(in_array($this->email,$this->getEmails())){\n return false;\n }\n return true; \n }",
"protected function validate_data_fields(){\n\t\tif(empty($this->RESPONSE)){throw new Exception(\"Response field not found\", 5);}\n\t\t\n\t\t// The remote IP address is also required\n\t\tif($this->validate_ip($this->REMOTE_ADDRESS)){throw new Exception(\"Renote IP address not set correctly\", 6);}\n\t}",
"abstract public function validate();",
"abstract public function validate();",
"private function validateData()\n {\n if (empty($this->nome)) {\n $this->errors->addMessage(\"O nome é obrigatório\");\n }\n\n if (!filter_var($this->email, FILTER_VALIDATE_EMAIL)) {\n $this->errors->addMessage(\"O e-mail é inválido\");\n }\n\n if (strlen($this->senha) < 6) {\n $this->errors->addMessage(\"A senha deve ter no minímo 6 caracteres!\");\n }\n if ($this->emailExiste($this->email, 'email')) {\n $this->errors->addMessage(\"Esse e-mail já está cadastrado\");\n }\n if ($this->emailExiste($this->usuario, 'usuario')) {\n $this->errors->addMessage(\"Esse usuário já está cadastrado\");\n }\n\n return $this->errors->hasError();\n }",
"function ValidateData()\n\t\t{\n\t\t\t$theValidator = new CValidator();\n\t\t\tif(!$this->arrValidator || !is_array($this->arrValidator) )\n\t\t\t{\n\t\t\t\t$this->arrValidator = array();\n\t\t\t}\n\t\t\tforeach($this->arrValidator as $key=>$value)\n\t\t\t{\n\t\t\t\tif($this->$key == '')\n\t\t\t\t{\n\t\t\t\t\t// Kiem tra xem co phai bat buoc khong?\n\t\t\t\t\tif(isset($this->arrRequired[$key]) && ($this->arrRequired[$key] == 1))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(!$theValidator->CheckPatt($value, $this->$key))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn(true);\n\t\t}",
"public function validate();",
"public function validate();",
"public function validate();",
"public function validate();",
"public function validate();",
"public function validate();",
"public function validate();",
"public function validate();",
"public function validate();",
"public function validate();",
"public function validate();",
"public function validate();",
"public function isDataValid() {\n if ($this->userExists())\n $this->_errors[] = 'username already taken';\n // username and password must match pattern\n else if (empty($this->_username) || !preg_match('/^[a-zA-Z0-9]{5,16}$/', $this->_username))\n $this->_errors[] = 'invalid username must be between 5 and 16 characters';\n else if (empty($this->_password) || !preg_match('/^[a-zA-Z0-9]{6,18}$/', $this->_password))\n $this->_errors[] = 'invalid password must be between 6 and 18 characters';\n\t\t else if (empty($this->_password) || $this->_password != $this->_password_confirm)\n $this->_errors[] = \"Password didn't match X\";\n // names must be between 2 and 22 characters\n else if (empty($this->_first_name) || !preg_match('/^[a-zA-Z0-9]{2,22}$/', $this->_first_name))\n $this->_errors[] = 'invalid first name must be between 2 and 22 characters';\n else if (empty($this->_last_name) || !preg_match('/^[a-zA-Z0-9]{2,22}$/', $this->_last_name))\n $this->_errors[] = 'invalid last name must be between 2 and 22 characters';\n //restricts day to 01-31, month to 01-12 and year to 1900-2099 (also allowing / - or . between the parts of the date) \n else if (empty($this->_dob) || !preg_match('/^(0?[1-9]|[12][0-9]|3[01])[\\/\\ ](0?[1-9]|1[0-2])[\\/\\ ](19|20)\\d{2}$/', $this->_dob))\n $this->_errors[] = 'invalid dod | must be DD/MM/YYYY format';\n else if (empty($this->_address))\n $this->_errors[] = 'invalid address';\n // checks if valid postal code\n else if (empty($this->_postcode) || !preg_match('/^(([A-PR-UW-Z]{1}[A-IK-Y]?)([0-9]?[A-HJKS-UW]?[ABEHMNPRVWXY]?|[0-9]?[0-9]?))\\s?([0-9]{1}[ABD-HJLNP-UW-Z]{2})$/', $this->_postcode))\n $this->_errors[] = 'invalid postcode | must be AA11 9AA format';\n // checks is valid email using regular expression\n else if (empty($this->_email) || !preg_match('/^[_\\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\\.)+[a-zA-Z]{2,6}$/', $this->_email))\n $this->_errors[] = 'invalid email';\n\n\n // return true or false \n return count($this->_errors) ? 0 : 1;\n }",
"protected function _validate() {\n\t}",
"function validate(array $data)\n\t{\n\t}",
"public static function validate() {}",
"private function checkData(){\n $this->datavalidator->addValidation('article_title','req',$this->text('e10'));\n $this->datavalidator->addValidation('article_title','maxlen=250',$this->text('e11'));\n $this->datavalidator->addValidation('article_prologue','req',$this->text('e12'));\n $this->datavalidator->addValidation('article_prologue','maxlen=3000',$this->text('e13'));\n $this->datavalidator->addValidation('keywords','regexp=/^[^,\\s]{3,}(,? ?[^,\\s]{3,})*$/',$this->text('e32'));\n $this->datavalidator->addValidation('keywords','maxlen=500',$this->text('e33'));\n if($this->data['layout'] != 'g' && $this->data['layout'] != 'h'){ //if article is gallery dont need content\n $this->datavalidator->addValidation('article_content','req',$this->text('e14'));\n }\n $this->datavalidator->addValidation('id_menucategory','req',$this->text('e15'));\n $this->datavalidator->addValidation('id_menucategory','numeric',$this->text('e16'));\n $this->datavalidator->addValidation('layout','req',$this->text('e17'));\n $this->datavalidator->addValidation('layout','maxlen=1',$this->text('e18'));\n if($this->languager->getLangsCount() > 1){\n $this->datavalidator->addValidation('lang','req',$this->text('e19'));\n $this->datavalidator->addValidation('lang','numeric',$this->text('e20'));\n }\n //if user cannot publish articles check publish values\n if($_SESSION[PAGE_SESSIONID]['privileges']['articles'][2] == '1') {\n $this->datavalidator->addValidation('published','req',$this->text('e21'));\n $this->datavalidator->addValidation('published','numeric',$this->text('e22'));\n $this->datavalidator->addValidation('publish_date','req',$this->text('e23'));\n }\n $this->datavalidator->addValidation('topped','req',$this->text('e24'));\n $this->datavalidator->addValidation('topped','numeric',$this->text('e25'));\n $this->datavalidator->addValidation('homepage','req',$this->text('e30'));\n $this->datavalidator->addValidation('homepage','numeric',$this->text('e31'));\n $this->datavalidator->addValidation('showsocials','req',$this->text('e26'));\n $this->datavalidator->addValidation('showsocials','numeric',$this->text('e27'));\n \n $result = $this->datavalidator->ValidateData($this->data);\n if(!$result){\n $errors = $this->datavalidator->GetErrors();\n return array('state'=>'error','data'=> reset($errors));\n }else{\n return true;\n }\n }",
"public function validate(array $data);",
"public function validate(array $data);",
"public function valid() {}",
"public function valid() {}",
"public function valid() {}",
"public function valid() {}",
"public function valid() {}",
"public function valid() {}",
"public function valid() {}",
"public function valid() {}",
"public function validate($data) {\n return true;\n }",
"abstract public function valid();",
"public function valid();",
"public function valid();",
"public function valid();",
"public function valid();",
"public function is_valid()\n {\n }",
"private function validateInputParameters($data)\n {\n }",
"public function is_valid()\n {\n }",
"private function validateData ($data){\n if(isset($data[\"nombres\"]) && !preg_match('/^[a-zA-ZáéíóúÁÉÍÓÚñÑ ]+$/',$data[\"nombres\"])){\n $json = array(\"status\"=>404, \"detalles\"=>\"Error, no se permiten numeros en el nombre del usuario\");\n print json_encode($json, true);\n return false;\n }\n if(isset($data[\"apellidos\"]) && !preg_match('/^[a-zA-ZáéíóúÁÉÍÓÚñÑ ]+$/',$data[\"apellidos\"])){\n $json = array(\"status\"=>404, \"detalles\"=>\"Error, no se permiten numeros en el apellido del usuario\");\n print json_encode($json, true);\n return false;\n }\n if(isset($data[\"email\"]) && !preg_match('/^(([^<>()\\[\\]\\\\.,;:\\s@”]+(\\.[^<>()\\[\\]\\\\.,;:\\s@”]+)*)|(“.+”))@((\\[[0–9]{1,3}\\.[0–9]{1,3}\\.[0–9]{1,3}\\.[0–9]{1,3}])|(([a-zA-Z\\-0–9]+\\.)+[a-zA-Z]{2,}))$/',$data[\"email\"])){\n $json = array(\"status\"=>404, \"detalles\"=>\"Error, el email no es valido\");\n print json_encode($json, true);\n return false;\n \n }\n if(isset($data[\"email\"])){\n $conn = clientesModels::validateEmail('clientes',$data[\"email\"]);\n if($conn != 0){\n $json = array(\"status\"=>404, \"detalles\"=>\"Error, El email {$data[\"email\"]} ya esta registrado\");\n print json_encode($json, true);\n return false;\n }\n }\n \n \n return true;\n }",
"public function validated();",
"public final function verifyData($key){\n\n unset($this->errors[$key]);\n\n if(!array_key_exists($key,$this->data)){\n\n if(!array_key_exists($key,$this->definition)){\n throw new \\Disco\\exceptions\\Exception(\"Field `{$key}` is not defined by this data model\");\n }//if\n\n //DEFAULT\n if(array_key_exists('default',$this->definition[$key])){\n $this->data[$key] = $this->definition[$key]['default'];\n }//if\n //REQUIRED\n else if($this->getDefinitionValue($key,'required')){\n return $this->setError($key,\"`{$key}` is required\");\n }//elif\n else {\n return false;\n }//el\n\n }//if\n\n //PREMASSAGE\n if(($massage = $this->getDefinitionValue($key,'premassage')) !== false){\n $this->data[$key] = $this->{$massage}($this->data[$key]);\n }//if\n\n $value = $this->data[$key];\n\n //REGEXP\n if(($regexp = $this->getDefinitionValue($key,'regexp')) !== false){\n if(($default = \\App::getCondition($regexp)) !== false && !\\App::matchCondition($default,$value)){\n return $this->setError($key);\n }//if\n if(!preg_match(\"/{$regexp}/\",$value)){\n return $this->setError($key);\n }//if\n $this->_postMassage($key,$value);\n return true;\n }//if\n\n //METHOD\n if(($method = $this->getDefinitionValue($key,'method')) !== false){\n if(!$this->{$method}($value)){\n return $this->setError($key);\n }//if\n $this->_postMassage($key,$value);\n return true;\n }//if\n\n //NULLABLE\n if($this->getDefinitionValue($key,'nullable') && $value === null){\n $this->_postMassage($key,$value);\n return true;\n }//if\n\n $type = $this->getDefinitionValue($key,'type');\n\n //TRUTHY\n if($type != 'boolean' && $this->getDefinitionValue($key,'truthy') && is_bool($value)){\n $this->_postMassage($key,$value);\n return true;\n }//if\n\n switch($type){\n\n case 'int':\n\n if(!$this->_isValidInt($key,$value)){\n return false;\n }//if\n\n break;\n\n case 'uint':\n\n if(!$this->_isValidInt($key,$value)){\n return false;\n }//if\n\n if($value < 0){\n return $this->setError($key,\"`{$key}` must be a positive integer\");\n }//if\n\n break;\n\n case 'float':\n\n if(!$this->_isValidFloat($key,$value)){\n return false;\n }//if\n\n break;\n\n case 'ufloat':\n\n if(!$this->_isValidFloat($key,$value)){\n return false;\n }//if\n\n if($value < 0){\n return $this->setError($key,\"`{$key}` must be a positive number\");\n }//if\n\n break;\n\n case 'string':\n\n if(!is_string($value)){\n return $this->setError($key,\"`{$key}` must be a string\");\n }//if\n\n if(($min = $this->getDefinitionValue($key,'minlen')) !== false && strlen($value) < $min){\n return $this->setError($key,\"`{$key}` must be greater than {$min} characters long\");\n }//if\n\n if(($max = $this->getDefinitionValue($key,'maxlen')) !== false && strlen($value) > $max){\n return $this->setError($key,\"`{$key}` must be less than {$max} characters long\");\n }//if\n\n break;\n\n case 'char':\n\n if(!is_string($value) || strlen($value) != 1){\n return $this->setError($key,\"`{$key}` must be a single character\");\n }//if\n\n break;\n\n case 'boolean': \n\n if(!is_bool($value)){\n return $this->setError($key,\"`{$key}` must be a boolean value\");\n }//if\n\n break;\n\n case 'array':\n\n if(!is_array($value)){\n return $this->setError($key,\"`{$key}` must be an array\");\n }//if\n\n break;\n\n case 'object':\n\n if(is_object($value)){\n if(($instanceof = $this->getDefinitionValue($key,'instanceof')) !== false && !$value instanceof $instanceof){\n return $this->setError($key,\"`{$key}` must be an instance of `{$instanceof}`\");\n }//if\n } //if\n else {\n return $this->setError($key,\"`{$key}` must be an object\");\n }//if\n\n break;\n\n case 'closure':\n\n if(!is_object($value) || !$value instanceof \\Closure){\n return $this->setError($key,\"`{$key}` must be a closure\");\n }//if \n\n break;\n\n default:\n return $this->setError($key);\n\n }//switch\n\n //IN\n if(($in = $this->getDefinitionValue($key,'in')) !== false && !in_array($value,$in)){\n $in = implode(', ',$in);\n return $this->setError($key,\"`{$key}` must be a value of `{$in}`\");\n }//if\n\n //NOTIN\n if(($in = $this->getDefinitionValue($key,'notin')) !== false && in_array($value,$in)){\n $in = implode(', ',$in);\n return $this->setError($key,\"`{$key}` must not be a value of `{$in}`\");\n }//if\n\n $this->_postMassage($key,$value);\n\n }",
"public function isValid($data)\n {\n $rules = array(\n 'fechaPartido'=> 'required',\n 'fecha_id' => 'required'\n \n \n );\n \n $validator = Validator::make($data, $rules);\n \n if ($validator->passes())\n {\n return true;\n }\n \n $this->errors = $validator->errors();\n \n return false;\n }",
"public function validate($data): array;",
"public function isValid() {\n\t\treturn !is_array($this->data) && count($this->data->getRawData()) > 0;\n\t}",
"public function validate($configData);",
"public function validateAndLoadData($data) {\n $this->email = $data['email'];\n\n\n return true;\n }",
"function validate($data)\n\t{\n\t\t\n\t\t$res[] = [\n\t\t\t'validity' => false,\n\t\t\t'type' => 'all',\n\t\t\t'message' => ''\n\t\t];\n\t\t//required check\n\t\tif(isset($data['required'])){\n\t\t\t$dataForCheck = $data['required'];\n\t\t\tforeach ($dataForCheck as $key => $value) {\n\t\t\t\tif($value != null && $value != '' && !empty($value) && !is_null($value))\n\t\t\t\t{\n\t\t\t\t\t$res[] = [\n\t\t\t\t\t\t'validity' => true,\n\t\t\t\t\t\t'type' => 'required',\n\t\t\t\t\t\t'message' => 'Success'\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$res[] = [\n\t\t\t\t\t\t'validity' => false,\n\t\t\t\t\t\t'type' => 'required',\n\t\t\t\t\t\t'message' => 'Some required fields are missing'\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $res;\n\t}",
"protected function validate()\n {\n }",
"public function validate($data) {\n $data = $this->gump->sanitize($data); // You don't have to sanitize, but it's safest to do so.\n\n $this->gump->validation_rules(array(\n 'user_id' => 'required|max_len,100',\n 'plan_id' => 'required|numeric',\n 'plan_start' => 'required|date',\n 'plan_end' => 'required|date',\n 'price' => 'required|numeric',\n 'vat' => 'numeric',\n 'price_total' => 'required|numeric'\n ));\n\n $this->gump->filter_rules(array(\n 'user_id' => 'trim|sanitize_string',\n 'plan_id' => 'trim|sanitize_string',\n 'plan_start' => 'trim|sanitize_string',\n 'plan_end' => 'trim|sanitize_string',\n 'price' => 'trim|sanitize_string',\n 'vat' => 'trim|sanitize_string',\n 'price_total' => 'trim|sanitize_string',\n ));\n\n $validated_data = $this->gump->run($data);\n if ($validated_data === false) {\n $errArr = $this->gump->get_readable_errors();\n $errString = \"\";\n foreach ($errArr as $k => $err) {\n $errString .= $err . '<br>';\n }\n throw new Exception($errString);\n } else {\n return $data;\n }\n }",
"public function valid(){ }",
"public function validateFormData($data) {\n\n $errors = array();\n\n // twitter name\n if (strlen($data['twitterName']) < 1 || strlen($data['twitterName']) > 100) {\n $errors['twitterName'] = 'Full name is required and must be less than 100 characters.';\n }\n\n // twitter username\n if (!preg_match(\"/^[a-zA-Z0-9_]+$/\", $data['twitterUsername']) || strlen($data['twitterUsername']) < 1 || strlen($data['twitterUsername']) > 15) {\n $errors['twitterUsername'] = 'Username must only use letters, numbers, underscores, and be 15 or fewer characters in length.';\n }\n\n // cron key\n if (!preg_match(\"/^[a-zA-Z0-9_]+$/\", $data['cronKey']) || strlen($data['cronKey']) < 1 || strlen($data['cronKey']) > 50) {\n $errors['cronKey'] = 'The cron key must only use letters, numbers, underscores, and be 50 or fewer characters in length.';\n }\n\n // timezone\n if (!date_default_timezone_set($data['timezone'])) {\n $errors['timezone'] = 'Not a valid timezone.';\n }\n\n // database prefix\n if (!preg_match(\"/^[a-zA-Z0-9_]+$/\", $data['databasePrefix']) || strlen($data['databasePrefix']) < 1 || strlen($data['databasePrefix']) > 15) {\n $errors['databasePrefix'] = 'The database prefix must only use letters, numbers, underscores, and be 15 or fewer characters in length.';\n }\n\n // do one last check to require all fields without a specific check\n $requiredFields = array('twitterName', 'twitterUsername', 'consumerKey', 'consumerSecret', 'oauthToken', 'oauthSecret', 'baseUrl', 'timezone', 'cronKey', 'databaseHost', 'databaseDatabase', 'databaseUsername', 'databasePassword', 'databasePrefix');\n foreach ($requiredFields as $field) {\n if (!isset($errors[$field]) && strlen(trim($data[$field])) < 1) {\n $errors[$field] = 'This field is required.';\n }\n }\n\n return (count($errors)) ? $errors : false;\n\n }",
"private function validateLicenseData()\n {\n\n // error_log('LicenseEmail : '.print_r($this->getLicenseEmail(), 1));\n // error_log('LicenseProduct : '.print_r($this->getLicenseProduct(), 1));\n // error_log('LicenseSecretKey : '.print_r($this->getLicenseSecretKey(), 1));\n }",
"public function checkDataSubmission() {\n\t\t$this->main('', array());\n }",
"public function validation();",
"protected function checkStructure()\n {\n $structure = $this->getStructure();\n\n foreach ($structure as $field => $opt) {\n if (!array_key_exists($field, $this->data)) {\n continue;\n }\n\n $value = Arr::get($this->data, $field);\n if (is_array($value)) {\n $this->errors[$field][] = Translate::get('validate_wrong_type_data');\n continue;\n }\n\n $value = trim($value);\n $length = (int)$opt->length;\n\n if (!empty($length)) {\n $len = mb_strlen($value);\n if ($len > $length) {\n $this->errors[$field][] = Translate::getSprintf('validate_max_length', $length);\n continue;\n }\n }\n\n if (!$opt->autoIncrement && $opt->default === NULL && !$opt->allowNull && $this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_not_empty');\n continue;\n }\n\n switch ($opt->dataType) {\n case 'int':\n case 'bigint':\n if (!$this->isEmpty($value) && (filter_var($value, FILTER_VALIDATE_INT) === false)) {\n $this->errors[$field][] = Translate::get('validate_int');\n continue 2;\n }\n break;\n\n case 'double':\n if (!is_float($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_double');\n continue 2;\n }\n break;\n\n case 'float':\n if (!is_numeric($value) && !$this->isEmpty($value)) {\n $this->errors[$field][] = Translate::get('validate_float');\n continue 2;\n }\n break;\n\n case 'date':\n case 'datetime':\n case 'timestamp':\n if (!$this->isEmpty($value) && !Validate::dateSql($value)) {\n $this->errors[$field][] = Translate::get('validate_sql_date');\n continue 2;\n }\n break;\n\n default:\n continue 2;\n break;\n\n }\n }\n }",
"abstract function check_data($formdata);",
"public abstract function validation();",
"public function verify();",
"public function Valid();",
"public function validateFormData() {\n\t\t\t\t\n\t\t\t\t//code to check mandatory fields\n\t\t\t\tif($this->name == '' || $this->email=='' || $this->password=='' || $this->cpassword==''|| $this->addr=='' || $this->mobile=='' || $this->licence != '1' || $this->logo['size'] == 0) {\n\t\t\t\t\t$this->response['status'] = 0;\n\t\t\t\t\t$this->response['message'] = 'Mandatory fields are missing';\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t//code to check password\n\t\t\t\tif($this->password != $this->cpassword) {\n\t\t\t\t\t$this->response['status'] = 0;\n\t\t\t\t\t$this->response['message'] = 'Password did not match confirm password';\n\t\t\t\t\treturn false;\t\n\t\t\t\t}\n\t\t\t\tif(strlen($this->password) < 6) {\n\t\t\t\t\t$this->response['status'] = 0;\n\t\t\t\t\t$this->response['message'] = 'Password length must be greater or equal to 6 characters';\n\t\t\t\t\treturn false;\t\n\t\t\t\t}\n\n\t\t\t\t//else return true\n\t\t\t\treturn true;\n\n\t\t\t}",
"function validateData($array){\n\t\t$errorFlag=true;\n\t\t$currentDate = getdate(); //get current date\n\t\tif (trim($array['FName'])==''){\n\t\t\t$this->appendErrorMsg(\"First Name is required\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\tif (trim($array['LName'])==''){\n\t\t\t$this->appendErrorMsg(\"Last Name is required\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\tif (trim($array['License_No'])==''){\n\t\t\t$this->appendErrorMsg(\"License number is required\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\tif (trim($array['Birthdate'])==''){\n\t\t\t$this->appendErrorMsg(\"Birthdate cannot be blank\");\n\t\t\t$errorFlag = false;\n\t\t} else if (!preg_match(\"/^[0-9]{4,4}[-][0-1]{1,2}?[0-9]{1,2}[-][0-3]{1,2}?[0-9]{1,2}$/\", $array['Birthdate'])){\n\t\t\t$this->appendErrorMsg(\"Date should be in the format yyyy-mm-dd\");\n\t\t\t$errorFlag = false;\n\t\t} else if (getAge($array['Birthdate'])<16 || getAge($array['Birthdate'])> 100){\n\t\t\t$this->appendErrorMsg(\"Sorry, we do not provide coverage to drivers under the age of 16 or over the age of 100\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\tif (trim($array['PostalCode'])==''){\n\t\t\t$this->appendErrorMsg(\"Postal Code is required\");\n\t\t\t$errorFlag = false;\n\t\t} else if (!preg_match(\"/^[A-Za-z]{1}\\d{1}[A-Za-z]{1}\\d{1}[A-Za-z]{1}\\d{1}$/\",$array['PostalCode'])){\n\t\t\t$this->appendErrorMsg(\"Postal Code should be in the format A1B2C3\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\tif (trim($array['Phone'])==''){\n\t\t\t$this->appendErrorMsg(\"Phone number is required\");\n\t\t\t$errorFlag = false;\n\t\t} else if (!preg_match(\"/^[0-9]{10}$/\",$array['Phone'])){\n\t\t\t$this->appendErrorMsg(\"Phone number must be in the format xxx-xxx-xxxx or xxxxxxxxx\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\tif (!preg_match(\"/^[0-9]{1,}$/\", $array['Years_Exp'])){\n\t\t\t$this->appendErrorMsg(\"Please input the number of Years of Experience\");\n\t\t\t$errorFlag = false;\n\t\t}\n\t\treturn $errorFlag;\n\t}",
"function validate()\n\t{\n\t\t$isValid = false;\n\t\t\n\t\tif(empty($this->data['username']))\n\t\t{\n\t\t\t\t$this->errors['username'] = \"Please enter a Username\";\n\t\t}\n\t\t\n\t\tif(empty($this->data['password']))\n\t\t{\n\t\t\t\t$this->errors['password'] = \"Please enter a password\";\n\t\t}\n\t\t\n\t\tif(empty($this->data['description']))\n\t\t{\n\t\t\t\t$this->errors['description'] = \"Please enter a description of yourself\";\n\t\t}\n\t\t\n\t\t\n\t\t//validate data elements in userData property\n\t\t//if an error exists, store to errors using column name as key\n\t\t\n\t\t if(empty($this->errors))\n\t\t{\n\t\t\t$isValid = true;\n\t\t}\n\t\t\n\t\treturn $isValid;\n\t}",
"function validateData($data) {\n $data = json_decode($data);\n $typesArr = [1, 2];\n\n if (!in_array((int)$data->type, $typesArr)) {\n return false;\n } else {\n $data->type = (int)$data->type;\n }\n\n if (empty($data->feedback)) {\n return false;\n }\n\n if ($data->type == 2 && !filter_var($data->url, FILTER_VALIDATE_URL)) {\n return false;\n }\n\n if (empty($data->name)) {\n $data->name = \"anonymous\";\n }\n\n if (empty($data->email)) {\n $data->email = \"anonymous\";\n }\n\n return $data;\n }",
"public function checkIntegrity();",
"public function validate()\n\t{\n\t\t$errors = array();\n\t\t\n\t\t//make sure user is logged in\n\t\tif (empty($this->userid)) \n\t\t{\n\t\t\t$errors['userid'] = true;\n\t\t}\n\t\t\n\t\t//verify all info is provided\n\t\tif (isset($this->title))\n\t\t\t$this->title = strip_tags($this->title);\n\t\telse\n\t\t\t$errors['title'] = true;\n\t\t\t\n\t\tif (isset($this->description))\n\t\t\t$this->description = strip_tags($this->description);\n\t\telse\n\t\t\t$errors['description'] = true;\n\t\t\t\n\t\tif (isset($this->content))\n\t\t\t$this->content = strip_tags($this->content, \"<br><b>\");\n\t\telse\n\t\t\t$errors['content'] = true;\n\t\t\t\n\t\tif (isset($this->location))\n\t\t\t$this->location = strip_tags($this->location);\n\t\telse\n\t\t\t$errors['location'] = true;\n\t\t\n\t\tif (!isset($this->category))\n\t\t\t$errors['category'] = true;\n\t\t\t\n\t\tif (!isset($this->enddatetime))\n\t\t\t$errors['enddatetime'] = true;\n\t\t\n\t\t\n\t\t//If we made it here, all is valid\n\t\tif (count($errors) > 0)\n\t\t\treturn $errors;\n\t\telse\n\t\t\treturn NULL;\n\t}",
"private function is_valid_field_data() {\n\t\t$data = rgpost( $this->get_input_name() );\n\n\t\tif ( empty( $data ) ) {\n\t\t\tgf_recaptcha()->log_debug( __METHOD__ . \"(): Input {$this->get_input_name()} empty.\" );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn gf_recaptcha()->get_token_verifier()->verify_submission( $data );\n\t}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function valid()\n {\n return $this->validateData();\n }",
"public static function validateData(): array\n {\n\n $data = self::sanitizeData();\n\n // check for name\n if (empty($data['fname'])) {\n $data['errorName'] = 'First name is blank';\n } elseif(strlen($data['fname']) < 2 || strlen($data['fname']) > 20) {\n $data['errorName'] = 'First name must be in range of 2-20 char...';\n }\n\n // check for lname\n if (empty($data['lname'])) {\n $data['errorLastName'] = 'Last name is blank';\n } elseif(strlen($data['lname']) < 2 || strlen($data['lname']) > 30) {\n $data['errorLastName'] = 'Last name must be in range of 2-30 char...';\n }\n\n // check for email\n if (empty($data['email'])) {\n $data['errorEmail'] = 'Email cannot be blank';\n }\n\n // check for gender\n if (empty($data['gender'])) {\n $data['errorGender'] = 'Gender must be selected';\n }\n\n // check for passwords\n\n if (empty($data['password']) || empty($data['cpassword'])) {\n $data['errorPassword'] = 'Password cannot be empty';\n } elseif(strlen($data['password']) < 5 || strlen($data['cpassword']) < 5) {\n $data['errorPassword'] = 'Password must be longer than 5 char...';\n }\n\n if ($data['password'] !== $data['cpassword']) {\n $data['errorPassword'] = 'Passowrd must be a same';\n } \n\n // check birtth\n if (empty($data['birthDate'])) {\n $data['errorBirth'] = 'Birth Date cannot be empty';\n }\n\n if (empty($data['profilePic'])) {\n $data['profilePic'] = '/images/profile.jpg';\n }\n\n if (empty($data['coverPic'])) {\n $data['coverPic'] = 'images/cover.png';\n }\n\n return $data;\n }",
"private function joinValidate($data)\n\t{\n\t\t/*\n\t\t [iam] => org\n\t\t[name] => Peter\n\t\t[email] => [email protected]\n\t\t[pw] => 12345\n\t\t[avatar] => 5427fb55f3a5d.jpg\n\t\t[phone] => 02261889971\n\t\t[lat] => 48.0649838\n\t\t[lon] => 7.885475300000053\n\t\t[str] => Bauerngasse\n\t\t[nr] => 6\n\t\t[plz] => 79211\n\t\t[country] => DE\n\t\t*/\n\t\t\n\t\t$check = true;\n\t\t\n\t\t$data['type'] = 0;\n\t\t\n\t\tif($data['iam'] == 'org')\n\t\t{\n\t\t\t$data['type'] = 1;\n\t\t}\n\t\t\n\t\tif($data['avatar'] != '')\n\t\t{\n\t\t\t$data['avatar'] = $this->resizeAvatar($data['avatar']);\n\t\t}\n\t\t\n\t\t$data['name'] = strip_tags($data['name']);\n\t\t$data['name'] = trim($data['name']);\n\t\t\n\t\t$data['surname'] = strip_tags($data['surname']);\n\t\t$data['surname'] = trim($data['surname']);\n\t\t\n\t\tif($data['name'] == '')\n\t\t{\n\t\t\treturn s('error_name');\n\t\t}\n\t\t\n\t\tif(!validEmail($data['email']))\n\t\t{\n\t\t\treturn s('error_email');\n\t\t}\n\t\t\n\t\tif($this->model->emailExists($data['email']))\n\t\t{\n\t\t\treturn s('email_exists');\n\t\t}\n\t\t\n\t\tif(strlen($data['pw']) < 5 && strlen($data['pw']) > 30)\n\t\t{\n\t\t\treturn s('error_password');\n\t\t}\n\t\t\n\t\t$data['gender'] = (int)$data['gender'];\n\t\t\n\t\tif($data['gender'] > 2 || $data['gender'] < 0)\n\t\t{\n\t\t\t$data['gender'] = 0;\n\t\t}\n\t\t\n\t\t$data['phone'] = $this->format_phone_number($data['phone']);\n\t\t$data['lat'] = floatval($data['lat']);\n\t\t$data['lon'] = floatval($data['lon']);\n\t\t$data['str'] = strip_tags($data['str']);\n\t\t$data['plz'] = preg_replace('[^0-9]', '', $data['plz']).'';\n\t\t$data['city'] = strip_tags($data['city']);\n\t\t$data['city'] = trim($data['city']);\n\t\t$data['country'] = strip_tags($data['country']);\n\t\t$data['country'] = strtolower($data['country']);\n\t\t$data['country'] = trim($data['country']);\n\t\t\n\t\treturn $data;\n\t\t\n\t}",
"private function validate() {\n $this->valid = (1 === count($this->marriages));\n }",
"public function valid()\n {\n }",
"public function valid()\n {\n }",
"public function valid()\n {\n }"
] | [
"0.8483991",
"0.7914387",
"0.7884471",
"0.76477545",
"0.76477545",
"0.7598221",
"0.7595752",
"0.75258005",
"0.7514903",
"0.7446818",
"0.7404333",
"0.7402551",
"0.73825496",
"0.7317151",
"0.71496665",
"0.71496665",
"0.7120719",
"0.7120067",
"0.7119345",
"0.7119345",
"0.7103914",
"0.7092063",
"0.7078327",
"0.7078327",
"0.7078327",
"0.7078327",
"0.7078327",
"0.7078327",
"0.7078327",
"0.7078327",
"0.7078327",
"0.7078327",
"0.7078327",
"0.7078327",
"0.7073655",
"0.7069652",
"0.7061605",
"0.70484495",
"0.70387745",
"0.702873",
"0.702873",
"0.6970879",
"0.6970879",
"0.6970879",
"0.6970879",
"0.6970879",
"0.6970879",
"0.6970879",
"0.6970879",
"0.6970189",
"0.6947152",
"0.6940729",
"0.6940729",
"0.6940729",
"0.6940729",
"0.69007564",
"0.6899766",
"0.68989706",
"0.68867606",
"0.686463",
"0.6863607",
"0.6844436",
"0.68293357",
"0.6827153",
"0.6813306",
"0.6795182",
"0.678665",
"0.67570496",
"0.6749206",
"0.67275584",
"0.67124736",
"0.6711992",
"0.670984",
"0.67016363",
"0.6679272",
"0.66725034",
"0.66646105",
"0.665261",
"0.663849",
"0.66359806",
"0.6634302",
"0.66331446",
"0.66317976",
"0.6625674",
"0.66019213",
"0.65955114",
"0.65954983",
"0.65953773",
"0.65953773",
"0.65942955",
"0.65942955",
"0.65942955",
"0.65942955",
"0.65942955",
"0.6572368",
"0.6567669",
"0.6567524",
"0.65528154",
"0.6549596",
"0.6549596",
"0.6549596"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
$faker = Faker\Factory::create();
$user = new User();
// Get User ids with roles (those can create posts)
$userIds = $user->select('id')->has('roles')->get();
// Set default image figure for body
$bodyImage = Image::make(database_path().'/seeds/images/logo.png')->widen(600, function ($constraint) {
$constraint->upsize();
});
$imageName = Str::random(32);
$bodyImagePath = "editor/{$imageName}.png";
Storage::disk('public')->put($bodyImagePath, $bodyImage->stream());
$bodyImageUrl = "/storage/$bodyImagePath";
// 200 random posts
/** @var \Illuminate\Database\Eloquent\Collection $posts */
$posts = factory(Post::class)->times(200)->create();
/** @var \Illuminate\Database\Eloquent\Collection $tags */
$tags = factory(Tag::class)->times(20)->create();
$publicDisk = Storage::disk('public');
$publicDisk->delete($publicDisk->files('posts'));
$posts->each(function (Post $post) use ($faker, $bodyImageUrl, $userIds, $tags) {
// Generate localized bodies
foreach (['en', 'fr'] as $locale) {
$post->translate($locale)->body = $this->generateBody($faker, $bodyImageUrl);
}
//Attach user
$post->user_id = $userIds->random()->id;
// Attach media
$i = mt_rand(1, 10);
$imageData = database_path()."/seeds/images/abstract-$i.jpg";
$media = MediaUploader::fromSource(fopen($imageData, 'rb'))
->toDestination('public', 'posts')
->useFilename(Str::random(32))
->upload();
$post->attachMedia($media, 'featured image');
$post->save();
// Set tags
$post->tags()->saveMany($tags->random($faker->numberBetween(1, 10)));
// Set metas
$post->meta()->save(factory(Meta::class)->make());
});
} | {
"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\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 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 // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n // 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 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 Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n // \\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(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 $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n // 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([\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 // $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 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 // $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 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\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 $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 {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n //\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(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n // $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\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n \\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 $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n // $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 \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 //$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 $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 // $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 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 // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $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 /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n 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 $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 // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }",
"public function run()\n {\n \t$roles = DB::table('roles')->pluck('id');\n \t$sexes = DB::table('sexes')->pluck('id');\n \t$faker = \\Faker\\Factory::create();\n\n \tforeach (range(1,20) as $item) {\n \t\tDB::table('users')->insert([\n \t\t\t'role_id' => $faker->randomElement($roles),\n \t\t\t'sex_id' => $faker->randomElement($sexes),\n \t\t\t'name' => $faker->firstName . ' ' . $faker->lastName,\n \t\t\t'dob' => $faker->date,\n \t\t\t'bio' => $faker->text,\n \t\t\t'created_at' => now(),\n \t\t\t'updated_at' => now()\n \t\t]);\n \t} \n }"
] | [
"0.80130625",
"0.79795986",
"0.79764974",
"0.79524934",
"0.7950615",
"0.79505694",
"0.7944086",
"0.7941758",
"0.7938509",
"0.79364634",
"0.79335415",
"0.7891555",
"0.78802574",
"0.78790486",
"0.7878107",
"0.7875447",
"0.78703815",
"0.7869534",
"0.7851931",
"0.7850407",
"0.7840015",
"0.78331256",
"0.7826906",
"0.78172284",
"0.7807776",
"0.78024083",
"0.78023773",
"0.7799859",
"0.77994525",
"0.77955437",
"0.7790015",
"0.77884936",
"0.7786196",
"0.77790534",
"0.7776279",
"0.7765613",
"0.7761798",
"0.7760838",
"0.7760613",
"0.7760611",
"0.7759328",
"0.7757682",
"0.775591",
"0.7752759",
"0.774942",
"0.7748997",
"0.7745014",
"0.7728245",
"0.7727775",
"0.77277344",
"0.7716621",
"0.77139914",
"0.7713781",
"0.77135956",
"0.7713254",
"0.7711222",
"0.7710622",
"0.7710614",
"0.77104497",
"0.77100515",
"0.770471",
"0.77039754",
"0.7703702",
"0.770327",
"0.7702392",
"0.7700962",
"0.7700507",
"0.7698413",
"0.76974845",
"0.7697178",
"0.7696662",
"0.76933604",
"0.76916313",
"0.76898587",
"0.7689098",
"0.76864886",
"0.76862013",
"0.76860833",
"0.7685714",
"0.7683389",
"0.76831365",
"0.7679125",
"0.76774627",
"0.767677",
"0.7676274",
"0.76719916",
"0.76704824",
"0.76679665",
"0.7667335",
"0.7667264",
"0.76645994",
"0.7662546",
"0.76618296",
"0.7660438",
"0.76583356",
"0.76564723",
"0.76530147",
"0.7651929",
"0.7651548",
"0.7651444",
"0.76511025"
] | 0.0 | -1 |
COPYRIGHT NOTICE WARNING T H I S F I L E I S N O T O P E N S O U R C E | function kanbanAddPrinc($line) {
$addInPrinc = '';
$kanbanFullWidthElement = Parameter::getUserParameter ( "kanbanFullWidthElement" );
if ($kanbanFullWidthElement == "on") {
if ($line ['idstatus']) {
$addInPrinc .= '<div style="float:left;margin-bottom:1px;margin-left:3px;margin-top:2px;height:21px;max-height:21px;overflow:hidden;white-space:nowrap;width:25%">' . colorNameFormatter ( SqlList::getNameFromId ( "Status", $line ['idstatus'] ) . '#split#' . SqlList::getFieldFromId ( "Status", $line ['idstatus'], 'color' ), $line ['id'] ) . '</div>';
}
if ($line ['idtargetproductversion']) {
$versionName = SqlList::getNameFromId ( "TargetProductVersion", $line ['idtargetproductversion'] );
if ($versionName == $line ['idtargetproductversion']) {
$versionName = SqlList::getNameFromId ( "ProductVersion", $line ['idtargetproductversion'] );
}
$addInPrinc .= '
<div title="'.i18n('colIdTargetProductVersion').'" style="float:left;" class="kanbanVersion" style="border:1px solid red;border-left:1px solid #e0e0e0;margin-left:5px;">
<div class="iconProductVersion16 iconProductVersion iconSize16" style="margin-left:10px;margin-top:5px;width:16px;height:16px;float:left"></div>
<div id="targetProductVersion' . $line ['id'] . '" style="float:left;margin:5px 0 0 2px;overflow:hidden;">
' . $versionName . '
</div>
</div>';
}
if (isset ($line['idactivity']) && $line['idactivity'] != 0) {
$addInPrinc .= '
<div title="'.((isset($line['WorkElement']))?i18n('colPlanningActivity'):i18n('colParentActivity')).'" style="float:left;">
<div class="iconActivity16 iconActivity iconSize16" style="margin-left:10px;margin-top:5px;width:16px;height:16px;float:left"></div>
<div class="kanbanActivity" style="margin:5px 0 0 2px;overflow:hidden;float:left;">
' . SqlList::getNameFromId ( "Activity", $line ['idactivity'] ) . '
</div>
</div>';
}
} else {
if ($line ['idstatus']) {
$addInPrinc .= '<div style="height:20px" >' . colorNameFormatter ( SqlList::getNameFromId ( "Status", $line ['idstatus'] ) . '#split#' . SqlList::getFieldFromId ( "Status", $line ['idstatus'], 'color' ), $line ['id'] ).'</div>';
}
if ($line ['idtargetproductversion']) {
$versionName = SqlList::getNameFromId ( "TargetProductVersion", $line ['idtargetproductversion'] );
if ($versionName == $line ['idtargetproductversion']) {
$versionName = SqlList::getNameFromId ( "ProductVersion", $line ['idtargetproductversion'] );
}
$addInPrinc .= '
<table style="margin: 2px;">
<tr title="'.i18n('colIdTargetProductVersion').'">
<td>
<div class="iconProductVersion16 iconProductVersion iconSize16" style="width:16px;height:16px;float:left"></div>
</td>
<td id="targetProductVersion' . $line ['id'] . '" style="float:left;overflow:hidden;max-width:120px;margin-left:2px;">
' . $versionName . '
</td>
</tr>
</table>';
}
if (isset ( $line ['idactivity'] )&& $line ['idactivity']!= 0) {
$addInPrinc .= '
<table style="margin: 2px;">
<tr title="'.((isset($line['WorkElement']))?i18n('colPlanningActivity'):i18n('colParentActivity')).'" >
<td>
<div class="iconActivity16 iconActivity iconSize16" style="width:16px;height:16px;float:left"></div>
</td>
<td style="float:left;overflow:hidden;max-width:120px;margin-left:2px;">
' . SqlList::getNameFromId ( "Activity", $line ['idactivity'] ) . '
</td>
</tr>
</table>';
}
}
return $addInPrinc;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_copyright()\n {\n }",
"public function get_copyright()\n {\n }",
"public function get_copyright()\n {\n }",
"private function __() {\n }",
"public function Copyright(){\n\t\treturn 'For The Win forums version 2.5 <br /> copyright © FTW Entertainment LLC, 2008-'.date(\"Y\").', all rights reserved.';\n\t}",
"private function __construct() {\n // Open source version.\n }",
"private function _i() {\n }",
"public function getCopyright() {}",
"public function helper()\n\t{\n\t\n\t}",
"public function library()\n\t{\n\t\n\t}",
"function modify_left_copyright() {\n \t ?><p>© <?php echo date('Y'); ?> AI Scripts <a href=\"<?php echo admin_url();?>\" title=\"Login to the backend of WordPress.\" />Login.</a></p>\n \t<?php\n }",
"public function getCopyright();",
"public function getCopyrightMessage();",
"public function get_licence()\n {\n return 'GPL';\n }",
"public function ex4()\n {\n }",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() {}",
"final private function __construct() {}",
"final private function __construct(){\r\r\n\t}",
"private function __construct( )\n {\n\t}",
"static function Describe() { return \"\"; }",
"function copyright($company, $year) {\n\tif ($year == date('Y')) {\n\t\t$date = $year;\n\t} else {\n\t\t$date = $year.' - '.date('Y');\n\t}\n\techo '© '.$date.' '.$company.'. All rights reserved.';\n}",
"public function truycapvao_private_cha(){\n }",
"public function getCode() {\n\n $licence = '/*\n * Auto Generated Code for HomeNet\n *\n * Copyright (c) 2011 HomeNet.\n *\n * This file is part of HomeNet.\n *\n * HomeNet is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * HomeNet is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with HomeNet. If not, see <http ://www.gnu.org/licenses/>.\n */';\n return $licence;\n }",
"private function __construct()\t{}",
"public function _strings_for_pot()\n {\n }",
"public function package()\n\t{\n\t\t\n\t}",
"final private function __construct()\n\t{\n\t}",
"private function static_things()\n\t{\n\n\t\t# code...\n\t}",
"private function metodo_privado() {\n }",
"final private function __construct()\n {\n }",
"final private function __construct()\n {\n }",
"private function __construct () \n\t{\n\t}",
"private function __construct () {}",
"public function get_licence()\n {\n return 'MIT License';\n }",
"private function __construct()\r\n {}",
"private final function __construct() {}",
"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 }",
"private function __construct()\n\t{\n\t\t\n\t}",
"final function __construct() { \n\t}",
"private function __construct() {\r\n\t\r\n\t}",
"function shIsMultilingual()\n{\n\tShlSystem_Log::debug('sh404sef', 'Using deprecated ' . __FUNCTION__ . ', removed as not applicable anymore');\n}",
"private function __construct()\r\r\n\t{\r\r\n\t}",
"function ms_file_constants()\n {\n }",
"private function setup()\r\n\t{ }",
"function btrClient_import() {\n return 'Not implemented yet.';\n}",
"private function __construct()\r\n\t{\r\n\t}",
"function __construct()\r\n\t{\t\t//Yeah bro! Freaking PhP yo..\r\n\t}",
"private function __construct() {\r\n\t\t\r\n\t}",
"public function main()\n\t{\n\t}",
"function beManaged()\n {\n }",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}"
] | [
"0.63560486",
"0.63549024",
"0.63543814",
"0.6328542",
"0.6294197",
"0.62579674",
"0.6203532",
"0.60756546",
"0.59848833",
"0.59504896",
"0.5890701",
"0.5823102",
"0.5812476",
"0.5807781",
"0.57602096",
"0.5754393",
"0.5754393",
"0.5754393",
"0.5736536",
"0.5736536",
"0.57349205",
"0.572392",
"0.5711988",
"0.570278",
"0.56942374",
"0.566146",
"0.5654151",
"0.5646707",
"0.5619665",
"0.5602679",
"0.557905",
"0.55614346",
"0.5556284",
"0.5556284",
"0.5554897",
"0.5545749",
"0.5530279",
"0.55232906",
"0.55195975",
"0.5518646",
"0.5518646",
"0.5518646",
"0.5518646",
"0.5518646",
"0.5518646",
"0.5517011",
"0.5513318",
"0.55123514",
"0.5509629",
"0.55090266",
"0.5506862",
"0.5497695",
"0.5491752",
"0.54811454",
"0.54742825",
"0.5461585",
"0.5460101",
"0.5457437",
"0.5455799",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737",
"0.5455737"
] | 0.0 | -1 |
This function for V5.5.2 compatibility, as equivalent does not exist yet in GeneralWork class | function kanbanImputationFormatter($value) {
return Work::displayImputation ( $value ) . ' ' . Work::displayShortImputationUnit ();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function work()\n {\n }",
"public function wasWorked();",
"public function work(): void;",
"public function work()\n {\n }",
"abstract protected function requiredOperations1(): void;",
"protected function fixSelf() {}",
"protected function fixSelf() {}",
"public function temporality();",
"function specialop() {\n\n\n\t}",
"private function _i() {\n }",
"public function getWorker();",
"public function getWorker();",
"protected function getSelfStatus() {}",
"protected function getSelfStatus() {}",
"public function inOriginal();",
"public abstract function compute();",
"abstract protected function mini(): string;",
"abstract protected function _process();",
"abstract protected function _process();",
"public function get__WORKFLOW__()\n {\n return $this->__WORKFLOW__;\n }",
"abstract protected function external();",
"public function getWorkEstimated()\n {\n return $this->work_estimated;\n }",
"public function getWorkers()\n {\n }",
"public function helper()\n\t{\n\t\n\t}",
"public function getW() {}",
"protected abstract function getWorkPackage($number);",
"abstract protected function doWorkChildImpl();",
"function getTask() ;",
"protected function func_default() {}",
"protected abstract function performImpl();",
"public function core();",
"public function work(Job $job);",
"public function work(Job $job);",
"public function operations();",
"public function f01()\n {\n }",
"public function getWorkerName()\n {\n return $this->work_name;\n }",
"public function getF() {}",
"function freeze() ;",
"function getSolution() {\n \techo \"getSolution was not implemented, this is a severe error!\";\n }",
"public function f02()\n {\n }",
"public function getWorkSpaceName()\r\n\r\n\t{\r\n\r\n\t\treturn $this->workSpaceName;\r\n\r\n \t}",
"function getFinal()\n {\n }",
"protected function getProgressHelper() {}",
"public function getWorksWith($jobwork) {\n if ($jobwork == 1)\n $workswith = VG_FULL;\n elseif ($jobwork == 2)\n $workswith = \"CHILDREN\";\n elseif ($jobwork == 3)\n $workswith = \"BOTH \".VG_FULL.\" AND CHILDREN\";\n else\n $workswith=\"NONE\";\n\n return $workswith;\n }",
"function upgrade_290()\n {\n }",
"public function extension() {}",
"private function _optimize() {}",
"abstract public function get_local_copy();",
"function needsExecution() ;",
"abstract public function getAlgorithmWithUnit(): AlgorithmWithUnit;",
"function process() ;",
"public function getXmp() {}",
"public function getXmp() {}",
"abstract protected function _run();",
"abstract protected function _run();",
"protected function _refine() {\n\n\t}",
"public static function dummy() {}",
"abstract protected function getRequirement(): string;",
"function get_working_plan($wr_plan){\r\n return get_times($wr_plan['start'],$wr_plan['ends']);\r\n }",
"function DB_get_minimum_work_type(){\n \n $connection = DB_get_connection();\n \n}",
"abstract protected function process();",
"abstract protected function process();",
"abstract protected function process();",
"abstract protected function process();",
"function retJBStats(){\n\t\tglobal $jbArr;\n\t\t\n\t\treturn;\n\t}",
"public function forWorker($payload);",
"public function getWorkSpaceId()\r\n\r\n\t{\r\n\r\n\t\treturn $this->workSpaceId;\r\n\r\n \t}",
"abstract protected function getSize(): int;",
"function yFirstCellular(): ?YCellular\n{\n return YCellular::FirstCellular();\n}",
"public function getAlternate() {}",
"public static function workType(): string\n {\n return 'type';\n }",
"public function getWorkerCount(): int;",
"function get_list_worksem_part()\n {\n $query = $this->db->get('fis_dworkshopseminar_feedbacks');\n return $query->result();\n }",
"function tripal_get_module_active_jobs ($modulename){\n $sql = \"SELECT * FROM {tripal_jobs} TJ \".\n \"WHERE TJ.end_time IS NULL and TJ.modulename = '%s' \";\n return db_fetch_object(db_query($sql,$modulename));\n\n}",
"function getFoldCost ($quantity, &$labor) {\n\tif ($_POST[\"fold\"] == \"fold\"){\n\t\t$foldLabor = HOUR * FOLDSETUP;\n\t\t$foldLabor += (($quantity * FOLDTIME) * HOUR);\n\t}\nelse {\n\t$foldLabor = 0;\n\t}\n$labor += $foldLabor;\n}",
"abstract protected function appliesTo(): string;",
"function run_job()\r\n\t{\r\n\t}",
"abstract public function getOriginalQty();",
"abstract protected function get_interval();",
"function calculateWeeklyNextExecutionDate($taskLastOccurenceDate,$taskTotalOccurenceCount,$taskStartDate, $taskEveryNumofWeeks, $taskWeekDayArray, $taskExeNumOfTimesInWeek, $taskTaskEndAfterOccurrences, $taskTaskEndByDate){ \r\r\n $today=date(\"Y-m-d\");\r\r\n $wkintervalday= $taskExeNumOfTimesInWeek * ($taskEveryNumofWeeks -1);\r\r\n $taskStartDate=date('Y-m-d', strtotime($taskStartDate));\r\r\n // $taskLastOccurenceDate=date('Y-m-d', strtotime($taskLastOccurenceDate));\r\r\n \r\r\n \r\r\n if($taskLastOccurenceDate!=\"0000-00-00\"){\r\r\n $taskNextExeChkDate= $taskLastOccurenceDate; \r\r\n }else{\r\r\n $taskNextExeChkDate= $taskStartDate; \r\r\n }\r\r\n $taskNextOccurenceDate=\"0000-00-00\";\r\r\n $datetime= strtotime($taskNextExeChkDate);\r\r\n $nxtChkDtYear= date(\"Y\",$datetime);\r\r\n $nxtChkDtWkNum= date(\"W\",$datetime);\r\r\n $nxtChkDtNum= date(\"N\",$datetime);\r\r\n $exdate=date(\"d-m\",$datetime); \r\r\n \r\r\n $currWkNum= date(\"W\");\r\r\n $currYear= date(\"Y\");\r\r\n \r\r\n \r\r\n // echo \"<br/> CHK DATE WK NUM : \".$nxtChkDtWkNum;\r\r\n // echo \"<br/> CURR DATE WK NUM : \".$currWkNum;\r\r\n if(($nxtChkDtWkNum >= $currWkNum && $nxtChkDtYear==$currYear) || ( $nxtChkDtYear > $currYear) || ($nxtChkDtWkNum == 1)){\r\r\n $is_exe_this_week=1;\r\r\n $week_exe_count=0; \r\r\n if(($exdate==\"31-12\" || $exdate==\"30-12\" || $exdate==\"29-12\" || $exdate==\"28-12\" || $exdate==\"27-12\" || $exdate==\"26-12\") && $nxtChkDtNum==1 && $taskLastOccurenceDate!=\"0000-00-00\"){\r\r\n $nxtChkDtYear=$nxtChkDtYear+1;\r\r\n }\r\r\n if($nxtChkDtNum==7){\r\r\n $stWknum=$nxtChkDtWkNum+($taskEveryNumofWeeks);\r\r\n if($stWknum < 10){\r\r\n $stWknum=\"0\".$stWknum;\r\r\n }\r\r\n $taskNextExeChkDate=date(\"Y-m-d\",strtotime(date(\"Y-m-d\", strtotime($nxtChkDtYear.'W'.$stWknum)))) ;\r\r\n }else{\r\r\n $taskNextExeChkDate=date(\"Y-m-d\",strtotime(date(\"Y-m-d\", strtotime($nxtChkDtYear.'W'.$nxtChkDtWkNum)))) ; \r\r\n }\r\r\n \r\r\n \r\r\n \r\r\n }else{\r\r\n $wkdiff= $currWkNum- $nxtChkDtWkNum;\r\r\n $stWknum=$nxtChkDtWkNum+($taskEveryNumofWeeks);\r\r\n // echo \"<br/> NXT DATE WK NUM : \".$stWknum; \r\r\n if($stWknum < 10){\r\r\n $stWknum=\"0\".$stWknum;\r\r\n }\r\r\n $taskNextExeChkDate=date(\"Y-m-d\",strtotime(date(\"Y-m-d\", strtotime(date(\"Y\").'W'.$stWknum)))) ;\r\r\n $is_exe_this_week=1; \r\r\n $week_exe_count=0; \r\r\n }\r\r\n \r\r\n // echo \"<br/> ** TASK START WK DATE : \".$taskNextExeChkDate;\r\r\n \r\r\n for($i=0; $i<= (7*$taskEveryNumofWeeks*2); $i++){\r\r\n $date = strtotime(date(\"Y-m-d\", strtotime($taskNextExeChkDate)) . \" +\".$i.\" day\"); \r\r\n $exeDate= date('Y-m-d', $date); \r\r\n $exeDateDay= date(\"N\",$date); \r\r\n if($taskWeekDayArray[$exeDateDay]==1){\r\r\n $is_executed=1;\r\r\n }else{\r\r\n $is_executed=0; \r\r\n } \r\r\n \r\r\n // $is_executed=isWeekDayExecution($exeDateDay); \r\r\n // echo \"<br/> Chk Date ---> \".$exeDate.\" : \";\r\r\n if($is_executed==1){ \r\r\n if($is_exe_this_week==1 ){ $week_exe_count++; \r\r\n \r\r\n if($week_exe_count == $taskExeNumOfTimesInWeek){\r\r\n if($wkintervalday==0) {\r\r\n $is_exe_this_week=1; \r\r\n }else{\r\r\n $is_exe_this_week=0; \r\r\n }\r\r\n \r\r\n $week_exe_count=0; \r\r\n } \r\r\n \r\r\n if($exeDate<= $taskLastOccurenceDate) {\r\r\n continue;\r\r\n }\r\r\n if($exeDate >= $today && $exeDate >= $taskStartDate) {\r\r\n $taskNextOccurenceDate=$exeDate; \r\r\n if($taskTaskEndAfterOccurrences!=0 && $taskTotalOccurenceCount >= $taskTaskEndAfterOccurrences){\r\r\n // $task_is_done=1; \r\r\n $taskNextOccurenceDate=\"0000-00-00\";\r\r\n }else if($taskTaskEndByDate!=\"0000-00-00\" && $exeDate > $taskTaskEndByDate){ \r\r\n $taskNextOccurenceDate=\"0000-00-00\";\r\r\n }\r\r\n break; \r\r\n } \r\r\n \r\r\n // echo \"<br/> ====> IS exe in this \".$is_exe_this_week.\" wk count \".$week_exe_count; \r\r\n \r\r\n }else{\r\r\n $week_exe_count++; \r\r\n if($week_exe_count >= $wkintervalday){\r\r\n $is_exe_this_week=1;\r\r\n $week_exe_count=0; \r\r\n } \r\r\n // echo \"<br/> ====> IS exe in this \".$is_exe_this_week.\" wk count \".$week_exe_count; \r\r\n }\r\r\n \r\r\n } \r\r\n \r\r\n } \r\r\n \r\r\n return $taskNextOccurenceDate;\r\r\n }",
"abstract protected function getAlgorithm();",
"function getOperand2() ;",
"function __return_null()\n {\n }",
"function upgrade_210()\n {\n }",
"public function custom()\n\t{\n\t}",
"function getSaddleCost (&$labor, &$rawCost, $quantity) {\nif ($_POST[\"saddle\"] == \"saddle\") {\n\t$saddleLabor = (($quantity/SADDLEPERHOUR) * HOUR);\n\t$saddleCost = ($quantity * STAPLE);\n\t}\nelse {\n\t$saddleLabor = 0;\n\t$saddleCost = 0;\n\t}\n$labor += $saddleLabor;\n$rawCost += $saddleCost;\n}",
"private function j() {\n }",
"protected abstract function applyNoArg();",
"function getDiff()\n {\n }",
"public function getWeightLimit()\n {\n }",
"public function extension();",
"public function needsReprocessing() {}",
"public function calculate();",
"public function calculate();",
"function beManaged()\n {\n }",
"public function f() {}",
"function getCuttingCost ($modSheets, &$labor, &$numStacks, $vertCuts, $horizCuts, $Nup) {\n\n//Determine number of stacks that have to be cut\n$numStacks = ceil($modSheets/250);\n\n//setup\n$cuttingLabor = HOUR*.0833;\n\n//Determine number of cuts needed\n$numCuts = (4 + $vertCuts + $horizCuts);\n\n//labor per stack\n$cuttingLabor += ((($numCuts*$numStacks)*.004333)*HOUR);\n\n$labor += $cuttingLabor;\n\n//setting new number of stacks post-cutting\n$numStacks = $numStacks*$Nup;\n\n}",
"public function getWorkshopId(){\n return 1;\n }",
"abstract public function otherfoo();",
"abstract protected function excel ();",
"public function apply();"
] | [
"0.61080694",
"0.58035576",
"0.5777616",
"0.57037896",
"0.55069625",
"0.54509974",
"0.54509974",
"0.5315362",
"0.52079844",
"0.51580524",
"0.51063734",
"0.51063734",
"0.5024626",
"0.5023106",
"0.5022807",
"0.5005247",
"0.49961483",
"0.4989861",
"0.4989861",
"0.49691188",
"0.4959999",
"0.49523512",
"0.4941341",
"0.4930683",
"0.4923852",
"0.49156708",
"0.4876264",
"0.48554993",
"0.48519224",
"0.48500013",
"0.48496255",
"0.48442456",
"0.48442456",
"0.48376086",
"0.48136294",
"0.48032114",
"0.47934115",
"0.47911194",
"0.4790189",
"0.47881824",
"0.47786918",
"0.47777262",
"0.47663835",
"0.47636673",
"0.47577754",
"0.4756697",
"0.47504118",
"0.47471714",
"0.4744048",
"0.47320938",
"0.4731637",
"0.47240096",
"0.47224903",
"0.47162855",
"0.47162855",
"0.4711762",
"0.47107682",
"0.47022942",
"0.46989202",
"0.46951428",
"0.46897522",
"0.46897522",
"0.46897522",
"0.46897522",
"0.46863475",
"0.46733743",
"0.4671801",
"0.46462184",
"0.46395198",
"0.463885",
"0.4638686",
"0.46371064",
"0.46342725",
"0.46240634",
"0.46119037",
"0.46077895",
"0.46068513",
"0.4600871",
"0.46006933",
"0.4597423",
"0.45932737",
"0.45926863",
"0.45908564",
"0.4588232",
"0.45871675",
"0.45840085",
"0.45838767",
"0.45836982",
"0.457901",
"0.45740372",
"0.45649403",
"0.45617336",
"0.4559788",
"0.4559788",
"0.45572507",
"0.4555745",
"0.45555416",
"0.4555302",
"0.45529625",
"0.45480835",
"0.4543634"
] | 0.0 | -1 |
Create a new component instance. | public function __construct(?string $headVariant = null)
{
$this->headVariant = $headVariant;
if ($this->headVariant) {
$this->attrs["class"][] = "thead-$this->headVariant";
}
$this->attrs["class"] = implode(" ", $this->attrs["class"]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function createComponent($name) {\n\t\trequire_once(\"component/\".$name.\"/\".$name.\".inc\");\n\t\t$c = new $name($name);\n\t\t$this->components[$name] = &$c;\n\t\t$this->{$name} = &$c;\n\t}",
"function componentBuilder() { $this->__construct(); }",
"public function make()\n {\n if (self::$newComponentCache === null) {\n self::$newComponentCache = new \\IvoPetkov\\BearFramework\\Addons\\HTMLServerComponents\\Internal\\Component();\n }\n return clone (self::$newComponentCache);\n }",
"public function createComponent() {\n $component = Component::createComponent();\n return \\Response::json($component);\n }",
"public function actionCreate()\n {\n $model = new Component;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Component'])) {\n $model->attributes = $_POST['Component'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->partnumberid));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }",
"private static function newComponent($component){\r\n\t\t\r\n\t $return = new script_component(self::$xml_file);\r\n $return->setFilename($component->jsfile);\r\n $return->setTitle($component->title);\r\n\t\t\t\t$return->setIntjs($component->intjs);\r\n $return->setDashboard($component['dashboard']);\r\n $return->setId($component['id']);\r\n $return->setIntmarkup($component->intmarkup);\r\n $return->setName($component->name);\r\n \r\n $ary = array();\r\n \r\n if (count($return->dependenicies) > 0) {\r\n foreach ($return->dependenicies->dependent as $dependent) {\r\n array_push($ary, array('filename'=>$dependent->filename, 'name'=>$dependent->name));\r\n }\r\n $return->dependicies($ary);\r\n }\r\n\t\treturn $return;\r\n\t\t\r\n\t}",
"public function makeComponent($class);",
"public function getComponent() {\r\n\t\t$parameters = func_get_args();\r\n\t\tif (count($paramters) < 1) {\r\n\t\t\tthrow new tx_auxo_exception('component parameter is missing');\r\n\t\t}\r\n\t\t\r\n\t\t$path = sprintf('%s/class.tx_%s.php', $this->interfaceLibraryPath, $this->interfaceExtension, $parameters[0]);\r\n\t\tif (!is_readable($path)) {\r\n\t\t\tthrow new tx_auxo_presentationException(sprintf('presentation component %s not supported', $parameters[0]));\r\n\t\t}\r\n\t\t\r\n\t\t$className = 'tx_' . $this->interfaceExtension . '_' . $parameters[0];\r\n\t\tunset($parameters[0]);\r\n\t\t\r\n\t\trequire_once($path);\r\n\t\t\r\n\t\tif (!class_exists($className)) {\r\n\t\t\tthrow new tx_auxo_presentationException(sprintf('presentation class %s is missing', $className));\r\n\t\t}\r\n\t\t\r\n\t\t$object = new $className();\r\n\t\t\r\n\t\tif (method_exists($object, '__construct')) {\r\n\t\t\treturn call_user_func_array($object, '__construct', $parameters);\r\n\t\t}\r\n\t\t\r\n\t\treturn $object;\r\n\t}",
"public function create()\n {\n return view('backend.components.create');\n }",
"static public function createComponent($name, array $children = array()) {\n\n $name = strtoupper($name);\n $class = 'Sabre\\\\VObject\\\\Component';\n\n if (isset(self::$componentMap[$name])) {\n $class.='\\\\' . self::$componentMap[$name];\n }\n return new $class($name, $children);\n\n }",
"final public static function getInstance($component_type_id, $data = array()) {\n $class_name = 'Component' . self::$valid_component_types[$component_type_id];\n return new $class_name($data);\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public function create() {\n\t \n }",
"protected function getDummyComponent()\n\t{\n\t\treturn new DummyComponent;\n\t}",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"public function Create()\n {\n parent::Create();\n\n // 1. Verfügbarer HarmonySplitter wird verbunden oder neu erzeugt, wenn nicht vorhanden.\n $this->ConnectParent(\"{03B162DB-7A3A-41AE-A676-2444F16EBEDF}\");\n\t\t\n\t\t$this->RegisterPropertyString(\"Name\", \"\");\n\t\t$this->RegisterPropertyInteger(\"DeviceID\", 0);\n\t\t$this->RegisterPropertyBoolean(\"BluetoothDevice\", false);\t\t\n }",
"public function create(){}",
"public function createComponent($name) {\n if (preg_match('([a-zA-Z0-9]+Form)', $name)) {\n \n // detect forms \n $classname = \"FrontModule\\\\Components\\\\Forms\\\\\" . ucfirst($name);\n if (class_exists($classname)) {\n $form = new $classname($this, $name);\n //$form->setTranslator($this->context->translator);\n return $form;\n }\n } else if (preg_match('([a-zA-Z0-9]+DataGrid)', $name)) {\n // detect datagrids\n $classname = \"FrontModule\\\\Components\\\\DataGrids\\\\\" . ucfirst($name);\n if (class_exists($classname)) {\n $datagrid = new $classname($this, $name);\n //$datagrid->setTranslator($this->context->translator);\n return $datagrid;\n }\n } else if (preg_match('([a-zA-Z0-9]+ConfirmDialog)', $name)) {\n // detect confrim dialogs\n $classname = \"FrontModule\\\\Components\\\\Dialogs\\\\\" . ucfirst($name);\n if (class_exists($classname)) {\n $dialog = new $classname($this, $name);\n //$dialog->setTranslator($this->context->translator);\n return $dialog;\n }\n } else {\n return parent::createComponent($name);\n }\n }",
"protected function createComponent($name)\n {\n $plugins = $this->context->plugins->getPlugins();\n if (in_array($name, $plugins)) {\n return new $name();\n }\n\n return parent::createComponent($name);\n }",
"public function create() {\r\n }",
"function create_component($type, $application = null)\r\n {\r\n if ($application == null)\r\n {\r\n $application = $this;\r\n }\r\n\r\n $manager_class = get_class($application);\r\n $application_component_path = $application->get_application_component_path();\r\n\r\n $file = $application_component_path . Utilities :: camelcase_to_underscores($type) . '.class.php';\r\n\r\n if (! file_exists($file) || ! is_file($file))\r\n {\r\n $message = array();\r\n $message[] = Translation :: get('ComponentFailedToLoad') . '<br /><br />';\r\n $message[] = '<b>' . Translation :: get('File') . ':</b><br />';\r\n $message[] = $file . '<br /><br />';\r\n $message[] = '<b>' . Translation :: get('Stacktrace') . ':</b>';\r\n $message[] = '<ul>';\r\n $message[] = '<li>' . Translation :: get($manager_class) . '</li>';\r\n $message[] = '<li>' . Translation :: get($type) . '</li>';\r\n $message[] = '</ul>';\r\n\r\n $application_name = Application :: application_to_class($this->get_application_name());\r\n\r\n $trail = BreadcrumbTrail :: get_instance();\r\n $trail->add(new Breadcrumb('#', Translation :: get('TypeName', null, self :: determine_namespace($this->get_application_name()))));\r\n\r\n Display :: header($trail);\r\n Display :: error_message(implode(\"\\n\", $message));\r\n Display :: footer();\r\n exit();\r\n }\r\n\r\n $class = $manager_class . $type . 'Component';\r\n require_once $file;\r\n\r\n if (is_subclass_of($application, 'common\\libraries\\SubManager'))\r\n {\r\n $component = new $class($application->get_parent());\r\n }\r\n else\r\n {\r\n $component = new $class($this->get_user());\r\n $component->set_parameters($this->get_parameters());\r\n }\r\n return $component;\r\n }",
"public function create() {}",
"public function createComponent()\n {\n return $this->createEmotionComponent(array(\n 'name' => 'Bilder',\n 'xtype' => 'emotion-media-widget',\n 'template' => 'image_widget',\n 'cls' => 'emotion-image-widget',\n 'description' => 'Einfaches Einkaufswelten-Element für Bilder' \n ));\n }",
"function _componentInitialize($instance) {\n $this->CI->ciwy->component_config[$instance]['containerId'] = $instance.'Container'; // Set the container_id value for the new instance\n $this->CI->ciwy->component_config[$instance]['outerContainer'] = $instance.'OuterContainer'; // Set the outer container_id value for the new instance\n $this->CI->ciwy->component_config[$instance]['inputAttributes'] = array(\n 'name' => $instance.'_input',\n 'id' => $instance.'_input',\n 'value' => '',\n 'maxlength' => '',\n 'size' => '',\n 'style' => '',\n );\n $this->CI->ciwy->component_config[$instance]['Config'] = array();\n log_message('debug', '[' . $this->CI->ciwy->library_name . '] New ' . $this->component_name . ' instance is ' . $instance . '.');\n return $instance;\n }",
"public function create()\n {}",
"public function create() {\n \n }",
"public function create() {\n \n }",
"public function create()\n {\n //TODO\n }",
"public static abstract function createInstance();",
"public function newInstance();",
"public function newInstance();",
"public function create(){\r\n\treturn new $this->class();\r\n }",
"public function create()\n\t {\n\t //\n\t }",
"public function create() {\n\n\t\t\n\t}",
"public static function createByComponents($components) {}",
"public function create() {\n\n\t}",
"public function create() {\n }",
"public function create() {\n }",
"public function create()\r\n\t{\r\n\t\t//\r\n\t}",
"public function create() {\n\t\t\t//\n\t\t}",
"function component_create( $args, $assoc_args ) {\n\t\n\t/**\n\t * Exit if we can't edit the filesystem\n\t */\n\tif ( ! WP_Filesystem() ) {\n\t\tWP_CLI::error( 'Unable to access filesystem' );\n\t\texit;\n\t}\n\t\n\t/**\n\t * Request component details\n\t */\n\t$far = array(); // array os strings to find and replace\n\t$exclude = array(); // files to exclude from scaffold\n\n\t$title = Util\\build_far( $far, array(\n\t\t'question' => 'Title [guess]:',\n\t\t'guess' => 'My Component',\n\t\t'find' => 'template-title',\n\t\t'default' => $assoc_args[ 'component_title' ] ?? '',\n\t) );\n\t$slug = Util\\build_far( $far, array(\n\t\t'question' => 'Slug [guess]:',\n\t\t'guess' => sanitize_title( $title ),\n\t\t'find' => 'template-slug',\n\t\t'default' => $assoc_args[ 'component_slug' ] ?? '',\n\t) );\n\t$dir = Util\\build_far( $far, array(\n\t\t'question' => 'Directory [guess]:',\n\t\t'guess' => $slug,\n\t\t'find' => '_template-component',\n\t\t'default' => $assoc_args[ 'component_dir' ] ?? '',\n\t) );\n\tUtil\\exclude( $exclude, array(\n\t\t'question' => 'Has front-end JavaScript? [y/N]',\n\t\t'guess' => 'n',\n\t\t'filename' => 'template-slug-script.js',\n\t\t'default' => $assoc_args[ 'has_js' ] ?? '',\n\t) );\n\t$has_template_part = Util\\exclude( $exclude, array(\n\t\t'question' => 'Has PHP template part? [y/N]',\n\t\t'guess' => 'n',\n\t\t'filename' => 'template-slug-markup.php',\n\t\t'default' => $assoc_args[ 'has_template_part' ] ?? '',\n\t) );\n\tUtil\\exclude( $exclude, array(\n\t\t'question' => 'Has admin CSS? [y/N]',\n\t\t'guess' => 'n',\n\t\t'filename' => 'template-slug-editor.css',\n\t\t'default' => $assoc_args[ 'has_admin_css' ] ?? '',\n\t) );\n\n\t/**\n\t * Identify paths/dirs (note all paths end with a trailing /)\n\t */\n\t$template_path = get_template_directory();\n\t$library_path = $template_path . '/assets/component-library/';\n\t$cli_path = $template_path . '/includes/cli/templates/';\n\t$template_dir = 'component';\n\t$component_path = $library_path . $dir . '/';\n\t\n\t/**\n\t * Create plugin directory\n\t */\n\tglobal $wp_filesystem;\n\t$wp_filesystem->mkdir( $component_path );\n\n\t// duplicate template's files (minus any we should exclude)\n\tcopy_dir( $cli_path . $template_dir, $component_path, $exclude );\n\n\t/**\n\t * Find and replace strings\n\t */\n\tUtil\\far( $component_path, $far );\n\n\t// loop through the component's directory and replace file prefixes\n\tUtil\\prefix( $component_path, 'template-slug', $slug );\n\n\t// report\n\tWP_CLI::success( 'Component created' );\n\tWP_CLI::line( WP_CLI::colorize( \"\\n%6%k What's next? %n\\n\" ) );\n\tWP_CLI::line( WP_CLI::colorize( \"%C ‣ Restart Parcel and refresh your browser to watch these new files\") );\n\tif ( $has_template_part ) {\n\t\tWP_CLI::line( WP_CLI::colorize( \"%C ‣ Include your template part somewhere:%n get_template_part( 'assets/component-library/$dir/$slug-markup' );\") );\n\t}\n\tWP_CLI::line( WP_CLI::colorize( \"%C ‣ Edit your new $title component:%n $component_path\") );\n\tWP_CLI::line( \"\\n\" );\n\n}",
"public function create()\r\n {\r\n }",
"public function create()\r\n {\r\n }",
"public function new()\n\t{\n\t\t//\n\t}",
"public function new()\n\t{\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function newInstance(): object;",
"protected function create() {\n\t}",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function getComponent()\n {\n }",
"public function create()\n\t\t{\n\t\t\t//\n\t\t}",
"public function create()\n\t\t{\n\t\t\t//\n\t\t}",
"public function create()\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function create()\n\t{\n\n\n\t\t//\n\t}",
"public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }",
"protected function createVueComponent()\n {\n $this->fileGenerateHelper('vue','vue');\n }",
"public function create() {\n //not implemented\n }",
"public function create()\n {\n }",
"public function create()\n {\n }",
"public function create()\r\n {\r\n \r\n }",
"public function createComponents() //:void\n {\n $viewFiles = glob($this->viewPath . '*.blade.php');\n\n if (is_array($viewFiles) && !empty($viewFiles)) {\n foreach ($viewFiles as $view) {\n $this->components[$this->getKey($view)] = (object) [\n 'key' => $this->getKey($view),\n 'html' => $this->renderView(\n $view,\n ['lang' => (object) $this->lang]\n )\n ];\n }\n }\n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }",
"public function create()\n {\n \n }"
] | [
"0.7047143",
"0.6538766",
"0.64724386",
"0.6461015",
"0.64434475",
"0.6316547",
"0.6294157",
"0.62726563",
"0.61914504",
"0.61295044",
"0.6091929",
"0.6052415",
"0.6052415",
"0.6052415",
"0.6048259",
"0.60458875",
"0.6039361",
"0.60253227",
"0.59891963",
"0.5977575",
"0.59761804",
"0.5937034",
"0.59319186",
"0.5914739",
"0.59113675",
"0.59091324",
"0.59085774",
"0.58980423",
"0.58980423",
"0.5889725",
"0.5887419",
"0.5886552",
"0.5886552",
"0.5885161",
"0.58828413",
"0.5882562",
"0.5882133",
"0.58630955",
"0.5833405",
"0.5833405",
"0.58175606",
"0.5816521",
"0.5807532",
"0.58024806",
"0.58024806",
"0.5792971",
"0.5792971",
"0.5789231",
"0.5789231",
"0.5789231",
"0.5789231",
"0.5789231",
"0.5789231",
"0.5789231",
"0.5789231",
"0.5789231",
"0.5789231",
"0.5789231",
"0.5789231",
"0.57747805",
"0.57747805",
"0.57747805",
"0.5760408",
"0.5753019",
"0.5751094",
"0.5751094",
"0.5751094",
"0.5751094",
"0.5751094",
"0.5751094",
"0.5751094",
"0.5751094",
"0.5751094",
"0.5751094",
"0.5751094",
"0.5749863",
"0.57257015",
"0.57257015",
"0.5723383",
"0.5723315",
"0.57105404",
"0.5705452",
"0.5704199",
"0.56958354",
"0.56958354",
"0.5695512",
"0.56950766",
"0.5688687",
"0.5688687",
"0.5688687",
"0.5688687",
"0.5688687",
"0.5688687",
"0.5688687",
"0.5688687",
"0.5688687",
"0.5688687",
"0.5688687",
"0.5688687",
"0.5688687",
"0.5688687"
] | 0.0 | -1 |
Get the view / contents that represent the component. | public function render()
{
return <<<'blade'
<thead {{$attributes->merge($attrs)}}>{{$slot}}</thead>
blade;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getViewComponent();",
"public function getView() {\n\t\treturn $this -> st_view;\n\t}",
"public function getView() {\n\t\treturn $this->view;\n\t}",
"public function getView() {\n\t\treturn $this->view;\n\t}",
"public function getView()\r\n {\r\n return $this->_controller->getView();\r\n }",
"public function getView() {\n return $this->setView();\n }",
"protected function getView()\n {\n return $this->view;\n }",
"public function getView()\n\t{\n\t\treturn $this->view;\n\t}",
"public function getView()\n {\n return $this->view;\n }",
"public function getView()\n {\n return $this->view;\n }",
"public function getView()\n {\n return $this->view;\n }",
"public function getView()\n {\n return $this->view;\n }",
"public function getView()\n {\n return $this->view;\n }",
"public function getView()\n {\n return $this->view;\n }",
"public function getView()\n {\n return $this->view;\n }",
"public function getView()\n {\n return $this->view;\n }",
"public function getView()\r\n {\r\n return $this->view;\r\n }",
"public function getView()\n\t{\n\t\treturn $this->client->getView();\n\t}",
"public function getView() {\r\n return $this->_view;\r\n }",
"public function getView()\n {\n return $this->getService('view');\n }",
"public function getView()\n {\n return $this->_view;\n }",
"public function getView()\n {\n return $this->_view;\n }",
"public function getView()\n {\n return $this->_view;\n }",
"public function getView()\n\t{\n\t\treturn $this->_view;\n\t}",
"public function getView(){\n\t\treturn $this->view;\n\t}",
"protected function getView()\n {\n $this->getBootstrap()->bootstrap('view');\n return $this->getBootstrap()->getResource('view');\n }",
"function getView() {\r\n return $this->view;\r\n }",
"function getView() {\n\t\treturn $this->View;\n\t}",
"public function getView() {\n \t\n \t// Return the current view\n \treturn $this->sView;\n }",
"public function getView()\n\t{\n\t\tif( !isset( $this->view ) ) {\n\t\t\tthrow new \\Aimeos\\Client\\Html\\Exception( sprintf( 'No view available' ) );\n\t\t}\n\n\t\treturn $this->view;\n\t}",
"private function getView()\n {\n if ($this->view) {\n return $this->view;\n }\n\n $this->view = $this->services->get(View::class);\n return $this->view;\n }",
"public function getView()\n {\n $view = App::$locator->view;\n if ($this->layout) {\n $view->setLayout($this->layout);\n }\n \n return $view;\n }",
"public function getView()\r\n {\r\n return parent::getView();\r\n }",
"public function getContent()\r\n {\r\n return $this->template;\r\n }",
"public function getView() {}",
"public function getView() {}",
"public function getView()\n {\n if ($this->_view === null) {\n $this->_view = Yii::$app->getView();\n }\n\n return $this->_view;\n }",
"static public function getView() {\n\t\treturn self::$defaultInstance;\n\t}",
"public function getView()\n\t{\n\t\tif(NULL === $this->_view) {\n\t\t\t$this->_view = agoractu_view::getInstance();\n\t\t}\n\t\treturn $this->_view;\n\t}",
"public function view()\n {\n return $this->view;\n }",
"public function view()\n {\n return $this->view;\n }",
"public function getView()\n {\n if (method_exists($this->module, 'getView')) {\n return $this->module->getView();\n }\n\n return parent::getView();\n }",
"public function getContent(){\n return $this->getPage();\n }",
"public function getView();",
"public function render(): mixed\n {\n return $this->view;\n }",
"public function getView()\n {\n if (!$this->view) {\n $this->view = Kerisy::$app->get('view');\n $this->view->setDirectory($this->getViewPath());\n }\n return $this->view;\n }",
"public function content(){\n\t\treturn mvc_service_Front::getInstance()->getCurrentActionHtml();\n\t}",
"public function getContent()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('content');\n }",
"public function Content()\n {\n return new View('dashboard1/Card1.tpl', [\n 'browsers' => $this->model->getBrowserVisits()\n ]);\n }",
"public function getView(){ }",
"public function viewTest()\n\t{\n\t\treturn $this->viewComponent;\n\t}",
"public function get_data() {\n return $this->_view;\n }",
"public function getView()\n {\n }",
"protected function view()\n {\n return $this->app['view'];\n }",
"protected function getRenderedContent()\n {\n try\n {\n return $this->getServiceLocator()\n ->get( 'RenderedContent' );\n }\n catch ( ServiceNotFoundException $ex )\n {\n return null;\n }\n }",
"public function getContent() {\r\n\t\treturn PzkParser::parseLayout($this->layout, $this, true);\r\n\t}",
"public function getView(): ViewInterface\n {\n return $this->view;\n }",
"private function _View() {\n\t \n // $this->_View;\n\t\t\t//$View = ClassRegistry::getObject('');\n\t\treturn $this->_View;\n\t}",
"protected function getView(){\n if(!$this->_view){\n $this->_view=new JView();\n }\n return $this->_view;\n }",
"public function getContent()\n {\n return $this->objOutput->getObjectRender()->overrideContent($this->output);\n }",
"public function getContent()\n {\n return $this->objOutput->getObjectRender()->overrideContent($this->output);\n }",
"public function getContent()\n {\n return $this->get(self::_CONTENT);\n }",
"public function getContent()\n {\n return $this->get(self::_CONTENT);\n }",
"public function getContent()\n {\n return $this->get(self::_CONTENT);\n }",
"public function _getView ()\n {\n if (null === $this->_view) {\n $this->_view = Zend_Layout::startMvc()->getView();\n }\n return $this->_view;\n }",
"public function render()\n {\n return $this->content;\n }",
"public function getView()\n {\n if (!$this->view) {\n $viewClass = $this->viewClass;\n $this->view = new $viewClass();\n\n $this->initializeViewAdditions();\n }\n\n return $this->view;\n }",
"public function getView()\n\t{\n\t\treturn View::make($this->viewName, [\n\t\t\t'items' => $this->items,\n\t\t]);\n\t}",
"public function getView()\n {\n return $this->cntView;\n }",
"public function get()\n {\n return $this->contents;\n }",
"public function render()\n {\n return view('components.testimony-component');\n }",
"public function getComponent()\n\t{\n\t\treturn $this->component;\n\t}",
"public function render()\n {\n return view('dwbtui::components.html');\n }",
"public function component()\n {\n return $this->component;\n }",
"public function getContent() {\n\t\treturn $this->current_content;\n\t}",
"protected static function getView()\n {\n return null;\n }",
"public function getContent () {\r\n\t\treturn $this->content;\r\n\t}",
"private function view()\n {\n if (isset(static::$view)) {\n return static::$view;\n }\n\n $classNamespace = $this->getModuleName();\n $className = $this->getComponentName();\n\n return \"{$classNamespace}::blocks.{$className}\";\n }",
"final public function render() {\n\t\treturn $this->_view->getBaseView()->element($this->_name, $this->_data, $this->_options);\n\t}",
"public function getContent()\n\t{\n\t\treturn $this->content_;\n\t}",
"public function getContent() {\n\t\treturn $this->content;\n\t}",
"public function getContent() {\n\t\treturn $this->content;\n\t}",
"public function getContent() {\n\t\treturn $this->content;\n\t}",
"public function getContent()\n {\n return file_get_contents($this->fullPath);\n }",
"protected function getContent() {\n return $this->content;\n }",
"public function getContent()\r\n {\r\n return $this->content;\r\n }",
"public function getContent() {\r\n\t\treturn $this->content;\r\n\t}",
"protected function renderContent()\n\t{\n\n\t\treturn $this->view->render($this->formView, [\n\t\t\t'model'=>$this->model,\n\t\t\t'mode'=>$this->mode,\n\t\t]);\n\t}",
"public function getContent() {\n return $this->content;\n }",
"public function content()\n {\n return $this->cache->get('content');\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }"
] | [
"0.7672361",
"0.7262671",
"0.72326016",
"0.72326016",
"0.7229296",
"0.7196396",
"0.71937174",
"0.7186604",
"0.71807253",
"0.71807253",
"0.71807253",
"0.71807253",
"0.71807253",
"0.71807253",
"0.71807253",
"0.71807253",
"0.71578777",
"0.71518224",
"0.71512854",
"0.71450925",
"0.7141394",
"0.7141394",
"0.7141394",
"0.71372116",
"0.7116618",
"0.70940363",
"0.70616645",
"0.70408213",
"0.69537866",
"0.6921558",
"0.6896167",
"0.68863416",
"0.68475884",
"0.68287545",
"0.6783811",
"0.6783811",
"0.677578",
"0.6760325",
"0.6757628",
"0.67172813",
"0.67172813",
"0.66932976",
"0.6674459",
"0.6657577",
"0.659025",
"0.65854603",
"0.6547338",
"0.65323997",
"0.6531143",
"0.6529103",
"0.6516281",
"0.65072244",
"0.6490052",
"0.6481586",
"0.6477603",
"0.64759785",
"0.64745307",
"0.64743185",
"0.64684063",
"0.64563656",
"0.64563656",
"0.6446417",
"0.6446417",
"0.6446417",
"0.6439566",
"0.64244205",
"0.6423487",
"0.64015913",
"0.6392134",
"0.63703984",
"0.63460416",
"0.63284713",
"0.63259166",
"0.6319992",
"0.6312655",
"0.63068634",
"0.6293576",
"0.6293413",
"0.6292735",
"0.6285335",
"0.6284266",
"0.6284266",
"0.6284266",
"0.6279658",
"0.6276015",
"0.626864",
"0.62665606",
"0.62663996",
"0.6251877",
"0.62514824",
"0.62513727",
"0.62513727",
"0.62513727",
"0.62513727",
"0.62513727",
"0.62513727",
"0.62513727",
"0.62513727",
"0.62513727",
"0.62513727",
"0.62513727"
] | 0.0 | -1 |
Displays a particular model. | public function run($id)
{
$this->controller=$this->getController();
$criteria =new CDbCriteria;
$criteria->condition="pet.id=:id";
$criteria->params=array(':id'=>$id);
$criteria->alias='pet';
$criteria->with=array('owner');
$model=$this->loadModel($criteria);
$this->controller->render('view',array(
'model'=>$model,
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionView() {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }",
"public function actionView()\n {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }",
"public function actionView()\n\t{\n\t\t$model = $this->loadModel();\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\tif (!($model = $this->loadModel()))\n\t\t\treturn;\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n {\n $id=(int)Yii::$app->request->get('id');\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }",
"public function actionView($id) {\n\t\t$model = $this->loadModel($id);\n\t\t\n\t\t$this->render('view', array(\n\t\t\t'model'\t\t\t\t\t\t\t\t\t\t\t\t\t\t=> $model,\n\t\t));\n\t}",
"public function actionView()\n {\n $id = Yii::$app->user->id;\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }",
"public function actionView($id)\n{\n$this->render('view',array(\n'model'=>$this->loadModel($id),\n));\n}",
"public function actionShow()\r\n\t{\r\n\t\t$this->render('show',array('model'=>$this->loadcontent()));\r\n\t}",
"public function show()\n {\n return $this->model;\n }",
"public function actionView($id) {\n\t\t$this->render('view', array(\n\t\t\t'model' => $this->loadModel($id),\n\t\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 actionView($id) {\n\t\t$model = $this->loadModel($id);\n\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionView($id) {\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id)\n\t{\n\t\t$this->render ( 'view', array (\n\t\t\t\t'model' => $this->loadModel ( $id )\n\t\t) );\n\t}",
"public function actionView()\r\n {\r\n $this->_userAutehntication();\r\n /*\r\n * Check if id was submitted via GET method \r\n */\r\n if(!isset($_GET['id']))\r\n $this->_sendResponse(500, 'Error: Parameter <b>id</b> is missing' );\r\n\r\n switch($_GET['model'])\r\n {\r\n /* Find respective model */\r\n case 'posts': \r\n $model = Post::model()->findByPk($_GET['id']);\r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Mode <b>view</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n if(is_null($model)) {\r\n $this->_sendResponse(404, 'No Post found with id '.$_GET['id']);\r\n } else {\r\n $this->_sendResponse(200, $this->_getEncodedData($_GET['model'], $model->attributes));\r\n }\r\n }",
"public function actionView($id)\r\n {\r\n $this->render('view', array(\r\n 'model' => $this->loadModel($id),\r\n ));\r\n }",
"public function actionView($id)\n\t{ \n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t}",
"public function actionView($id)\n {\n return $this->render('view', [\n 'model' => $this->findModel($id),\n //'model' => $this->findModel(Yii::$app->user->id),\n ]);\n }",
"public function actionView($id)\n\t{\n\n\t $this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n {\n $this->render('view', [\n 'model' => $this->loadModel($id),\n ]);\n }",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}"
] | [
"0.75535834",
"0.75532603",
"0.754276",
"0.7540083",
"0.74330944",
"0.74330944",
"0.74330944",
"0.74330944",
"0.74330944",
"0.73395175",
"0.71608204",
"0.7132329",
"0.7127545",
"0.7061625",
"0.7022342",
"0.6983588",
"0.6975484",
"0.69582117",
"0.69456965",
"0.6943839",
"0.6943839",
"0.6943839",
"0.6943839",
"0.6943839",
"0.6943839",
"0.6943839",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.691878",
"0.6917007",
"0.69108385",
"0.6909117",
"0.6900571",
"0.6881224",
"0.6881224",
"0.6881224",
"0.68751943",
"0.68740606",
"0.6873124",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006",
"0.68684006"
] | 0.0 | -1 |
Returns the data model based on the primary key given in the GET variable. If the data model is not found, an HTTP exception will be raised. | public function loadModel($criteria)
{
$model=Pet::model()->find($criteria);
if($model===null)
throw new CHttpException(404,'The requested page does not exist.');
return $model;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 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=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 loadModel($id)\n\t{\n\t\t$model=Dataset::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public static function Get($key) {\r\n\t\t$cls = get_called_class();\r\n\t\t$model = new $cls();\r\n\t\t$primary = $model->index('primary');\r\n\t\tif (is_null($primary)) {\r\n\t\t\tthrow new Exception(\"The schema for {$cls} does not identify a primary key\");\r\n\t\t}\r\n\t\tif (!is_array($key)) {\r\n\t\t\tif (count($primary['fields']) > 1) {\r\n\t\t\t\tthrow new Exception(\"The schema for {$cls} has more than one field in its primary key\");\r\n\t\t\t}\r\n\t\t\t$key = array(\r\n\t\t\t\t$primary['fields'][0] => $key\r\n\t\t\t);\r\n\t\t}\r\n\t\tforeach ($primary['fields'] as $field) {\r\n\t\t\tif (!isset($key[$field])) {\r\n\t\t\t\tthrow new Exception(\"No value provided for the {$field} field in the primary key for \" . get_called_class());\r\n\t\t\t}\r\n\t\t\t$model->where(\"{$field} = ?\", $key[$field]);\r\n\t\t}\r\n\t\t//$src = Dbi_Source::GetModelSource($model);\r\n\t\t$result = $model->select();\r\n\t\tif ($result->count()) {\r\n\t\t\tif ($result->count() > 1) {\r\n\t\t\t\tthrow new Exception(\"{$cls} returned multiple records for primary key {$id}\");\r\n\t\t\t}\r\n\t\t\t$record = $result[0];\r\n\t\t} else {\r\n\t\t\t$record = new Dbi_Record($model, null);\r\n\t\t\t$record->setArray($key, false);\r\n\t\t}\r\n\t\treturn $record;\r\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 }",
"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}",
"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 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 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 function loadModel($id)\r\n\t{\r\n\t\t$model=Klient::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"private function findModel($key)\n {\n if (null === $key) {\n throw new BadRequestHttpException('Key parameter is not defined in findModel method.');\n }\n\n $modelObject = $this->getNewModel();\n\n if (!method_exists($modelObject, 'findOne')) {\n $class = (new\\ReflectionClass($modelObject));\n throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\\\' .\n $class->getShortName().' class.');\n }\n\n $result = call_user_func([\n $modelObject,\n 'findOne',\n ], $key);\n\n if ($result !== null) {\n return $result;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Information::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"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}",
"public function __get($key)\n\t{\n\t\t// See if we are requesting a foreign key\n\t\tif (isset($this->_data[$key.'_id']))\n\t\t{\n\t\t\tif (isset($this->_lazy[$key])) // See if we've lazy loaded it\n\t\t\t{\n\t\t\t\t$model = AutoModeler::factory($key);\n\t\t\t\t$model->process_load($this->_lazy[$key]);\n\t\t\t\t$model->process_load_state();\n\t\t\t\treturn $model;\n\t\t\t}\n\n\t\t\t// Get the row from the foreign table\n\t\t\treturn AutoModeler::factory($key, $this->_data[$key.'_id']);\n\t\t}\n\t\telse if (isset($this->_data[$key]))\n\t\t\treturn $this->_data[$key];\n\t}",
"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 }",
"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 function loadModel($id)\n\t{\n\t\t$model=TBantuanData::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Consultor::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=Programa::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"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 loadModel($id)\n\t{\n\t\t$model=Respuestas::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Clap::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Recargas::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=Tshirt::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id){\n\t\t$model=Contact::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=KqxsBac::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Column::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Patient::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id){\n\t\t\n\t\t$model=XhTitle::model()->findByPk($id);\n\t\t\n\t\tif($model===null)\n\t\t\t\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t\n\t\treturn $model;\n\t\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=PPJadwaldokterM::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Results::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Materia::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Coordocs::model()->findByPk($id+0);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Employe::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Alumno::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Quote3::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = TblServer::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id) {\n $model = TblServer::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=DeedMaster::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Ios::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=Study::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Kzone::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pooja::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=StudentDocument::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,Yii::t('app','The requested page does not exist.'));\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Persona::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function getModelByPrimaryKey($action = null, $keyValue = null)\n {\n $keyName = $this->model->getKeyName();\n\n if ($keyValue == '_') {\n if ($this->request()->has(\"data.primaryKey.{$keyName}\")) {\n $keyValue = $this->request()->input(\"data.primaryKey.{$keyName}\");\n } elseif ($this->request()->has(\"data.old.{$keyName}\")) {\n $keyValue = $this->request()->input(\"data.old.{$keyName}\");\n } elseif ($this->request()->has('data.items')) {\n $items = $this->request()->input('data.items');\n if (Arr::has($items, $keyName)) {\n $keyValue = Arr::get($items, $keyName);\n } else {\n $first = Arr::first($items);\n if (Arr::has($first, $keyName)) {\n $keyValue = Arr::get($first, $keyName);\n }\n }\n }\n }\n\n $data = [$keyName => $keyValue];\n\n $r = $this->validateData($data, null, 'primaryKey', $action, [$keyName => ['includeUniqueRules' => false]]);\n if ($r !== true) {\n return $r;\n }\n\n $modelClass = get_class($this->model);\n if ($model = $modelClass::find($data[$keyName])) {\n return $model;\n }\n\n return CrudJsonResponse::error(CrudHttpErrors::TARGET_DATA_MODEL_NOT_FOUND, null, [\n 'action' => 'primaryKey',\n 'parent_action' => $action,\n 'target' => $data,\n ]);\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Entry::model()->with('entryAnswers')->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"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 function loadModel($id)\n\t{\n\t\t$model=ARTICULOS::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"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 loadModel($id)\n\t{\n\t\t$model=Knowledgecatalogue::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Package::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n {\n $model=Domain::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=ElBezQuests::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Basic_definition::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=PPDokrekammedisM::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Repository::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=RKPengirimanrmT::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Sale::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Korzet::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'A keresett tartalom nem található.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=DProcessoDisciplinar::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Fddemandreceipt::model()->findByPk((int) $id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Stone::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Store::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=PegawaiM::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Solicitudes::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Quotes::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The Requested Page Does Not Exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Docingresados::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'El enlace o direccion solicitado no existe');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pagosconceptos::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public abstract function find($primary_key, $model);",
"public function loadModel($id)\n\t{\n\t\t$model=CerDoc::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=JobSummary::model()->findByPk($id);\n \n \n \n \n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n {\n $model = InfoSpares::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function find($id){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Create a select query\n\t\t$query = \"SELECT \" . implode(\",\" , static::$columns).\" FROM \" . static::$tableName . \" WHERE id = :id\";\n\t\t//prepare the query\n\t\t$statement = $db->prepare($query);\n\t\t//bind the column id with :id\n\t\t$statement->bindValue(\":id\", $id);\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Put the associated row into a variable\n\t\t$record = $statement->fetch(PDO::FETCH_ASSOC);\n\n\t\t//If there is not a row in the database with that id\n\t\tif(! $record){\n\t\t\tthrow new ModelNotFoundException();\n\t\t}\n\n\t\t//put the record into the data variable\n\t\t$this->data = $record;\n\t}",
"public function loadModel($id)\n {\n $model=Seat::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id){\r\r\n\r\r\n\t $model=OrdenConsumo::model()->findByPk($id);\r\r\n\r\r\n\t if($model===null)\r\r\n\t throw new CHttpException(404,'The requested page does not exist.');\r\r\n\t return $model;\r\r\n\r\r\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=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($id)\n\t{\n\t\t$model=Pegawai::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Customer::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Cooperativepartner::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n {\n $model=Services::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Gejala::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"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}",
"public function loadModel($id)\n\t{\n\t\t$model=Topik::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Roomclosure::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=CollectionShop::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n {\n $model=Product::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=CitasReservada::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Ncr::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Student::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,Yii::t('common','The requested page does not exist.'));\n\t\treturn $model;\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 loadModel($id)\n\t{\n\t\t$model = Exam::model()->findByPk($id);\n\t\tif ($model === null)\n\t\t\tthrow new CHttpException(404, 'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Carrer::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Talonario::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pedido::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pedido::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Task::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Item::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Question::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}"
] | [
"0.6996477",
"0.6963233",
"0.6856193",
"0.6704138",
"0.6648857",
"0.6641502",
"0.6635867",
"0.6626205",
"0.6623007",
"0.66175824",
"0.66135395",
"0.6612504",
"0.6558181",
"0.65574646",
"0.6542536",
"0.6541095",
"0.6534296",
"0.65331244",
"0.6527437",
"0.65267116",
"0.6522443",
"0.64879304",
"0.6485056",
"0.6478685",
"0.64770067",
"0.644847",
"0.6441299",
"0.64374155",
"0.64317816",
"0.64313596",
"0.6428823",
"0.64288104",
"0.6427044",
"0.6426765",
"0.64123267",
"0.6412133",
"0.64072937",
"0.63948447",
"0.63948447",
"0.639207",
"0.63920605",
"0.6391316",
"0.63863933",
"0.63792247",
"0.63779837",
"0.63769305",
"0.6375361",
"0.6375098",
"0.6372224",
"0.63712597",
"0.6370786",
"0.63704747",
"0.6370239",
"0.6364749",
"0.63633734",
"0.6361709",
"0.6360619",
"0.6360411",
"0.63589936",
"0.6356885",
"0.6354105",
"0.6343862",
"0.6335678",
"0.63355213",
"0.6332622",
"0.63305813",
"0.6329704",
"0.6328517",
"0.63278997",
"0.63270485",
"0.6322456",
"0.63203",
"0.63193387",
"0.631748",
"0.6314646",
"0.6309444",
"0.630892",
"0.63079095",
"0.63079095",
"0.6307824",
"0.6306923",
"0.6304451",
"0.6300813",
"0.63003373",
"0.63003206",
"0.6296652",
"0.62958294",
"0.6294664",
"0.6293868",
"0.62913525",
"0.6291299",
"0.6289672",
"0.628892",
"0.628885",
"0.628771",
"0.6281713",
"0.6280927",
"0.6280927",
"0.6279838",
"0.62787414",
"0.6276112"
] | 0.0 | -1 |
Created by PhpStorm. User: sun rise Date: 4/8/2017 Time: 4:14 PM | function printChild($data)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function __() {\n }",
"final private function __construct(){\r\r\n\t}",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"public function ex4()\n {\n }",
"public function helper()\n\t{\n\t\n\t}",
"final private function __construct()\n {\n }",
"final private function __construct()\n {\n }",
"final function __construct() { \n\t}",
"private function __construct () {}",
"final private function __construct() {}",
"final private function __construct() {}",
"private function _i() {\n }",
"private function __construct() { }",
"private function __construct() { }",
"private function __construct() { }",
"private function __construct() { }",
"private function __construct() { }",
"private function __construct() { }",
"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 ;\n }",
"private function __construct() {\n \n }",
"private function __construct() {\n \n }",
"private function __construct() {\n \n }",
"private function __construct() {;}",
"private function __construct(){ }",
"private function __construct(){ }",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct()\r\n {\r\n }",
"private function __construct()\r\n {\r\n }",
"public function oops () {\n }",
"private function __construct()\r\n {}",
"private function __construct( )\n {\n\t}",
"private function j() {\n }",
"protected final function __construct() {}",
"public function __construct() {\n\t\t\n\t}"
] | [
"0.5996813",
"0.5887465",
"0.58478874",
"0.58478874",
"0.58478874",
"0.57580656",
"0.57305074",
"0.5726819",
"0.5726819",
"0.571392",
"0.57125854",
"0.57110804",
"0.57110804",
"0.569957",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5649943",
"0.5646114",
"0.5639058",
"0.5639058",
"0.5639058",
"0.5630189",
"0.5628427",
"0.5628427",
"0.5628156",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.5627998",
"0.56251305",
"0.56251305",
"0.5624881",
"0.5624881",
"0.56222415",
"0.561881",
"0.5618394",
"0.5608984",
"0.5590778",
"0.55868006"
] | 0.0 | -1 |
CASO 1 LLEGA TODO VACIO | public function index()
{
if($_POST['usuario'] == "" && $_POST['pass'] == ""){
$respuesta = array("error" => "Datos_vacio ");
}
// CASO 2 LLEGA EL CORREO Y NO EL SERIAL
if(($_POST['usuario'] != "") && ($_POST['pass'] == "")){
$correo_usuario = array("correo_contacto" => $_POST['usuario'],'eliminado'=>false);
$verificacion_correo = $this->Login_web_model->verificar_correo($correo_usuario);
if($verificacion_correo){
$respuesta = $verificacion_correo;
}else{
$respuesta = array("estado_login" => 0);
}
}
// CASO 3 LLEGA TODO
if($_POST['usuario'] != "" && $_POST['pass'] != ""){
$respuesta = array("etapa" => "segunda etapa");
$verificacion_final = $this->Login_web_model->buscar_membresia($_POST['usuario'], $_POST['pass']);
if($verificacion_final){
$respuesta = array("estado_login" => 4);
$cookie= array(
'name' => 'usuario',
'value' => $_POST['usuario'],
'expire' => '36000',
);
$this->input->set_cookie($cookie);
$cookie= array(
'name' => 'pass',
'value' => $_POST['pass'],
'expire' => '36000',
);
$this->input->set_cookie($cookie);
}else{
$respuesta = array("estado_login" => 3);
}
}
print_r(json_encode($respuesta));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 evt__1__entrada()\r\n\t{\r\n\t\t$this->pasadas_por_solapa[1]++;\r\n\t}",
"function palabraDescubierta($coleccionLetras){\n \n /*>>> Completar el cuerpo de la función, respetando lo indicado en la documentacion <<<*/\n}",
"public function traerCualquiera()\n {\n }",
"function existeLetra(/*>>> Completar parámetros <<<*/ ){\n \n /*>>> Completar cuerpo de la función <<<*/\n\n}",
"public function boleta()\n\t{\n\t\t//\n\t}",
"public function linea_colectivo();",
"public function AggiornaPrezzi(){\n\t}",
"public function criarBloco_1_Vazio()\n {\n $this->Sped->criarLinha('1', '1001', \"|1001|0|\");\n $this->Sped->criarLinha('1', '1010', \"|1010|N|N|N|N|N|N|N|N|N|N|N|N|N|\");\n $this->Sped->criarEncerramentoBloco('1', '1990', \"1990\");\n }",
"function RellenarTitulo()\r\n {\r\n $this->Imprimir('ANÁLSIS DE FALLAS DE DISTRIBUCIÓN');\r\n\r\n $this->Imprimir($this->convocatoria->getLugar(), 93, 10);\r\n\r\n $this->Imprimir(strftime(\"%A %d de %B de %Y\", strtotime($this->convocatoria->getFecha())) .\r\n ' - Hora: ' . $this->convocatoria->getHoraIni() . ' a ' .\r\n $this->convocatoria->getHoraFin(), 95, 10, 16);\r\n }",
"function cc_ho_vetrina($agenzia, $rif){\n\tglobal $invetrina;\n\t\n\t// $agenzia qua è il numero interno di Cometa\n\tif( isset( $invetrina[$agenzia] ) ){\t\t\n\t\t\n\t\tif ($invetrina[$agenzia]['imm'] == $rif) {\n\t\t\t// questo immobile è in vetrina\n\t\t\t$vetrina = '1';\n\t\t\tcc_import_immobili_error_log($rif.\" è in vetrina\");\n\t\t\t\n\t\t\t// vediamo se è lo stesso di quello che era già in vetrina o meno\n\t\t\t$oldrif = cc_get_rif_vetrina( substr($rif, 0, 2) );\n\t\t\tcc_import_immobili_error_log(\"oldrif: \".$oldrif);\n\t\t\t\n\t\t\t// se l'immobile attualemnte in vetrina non è questo tolgo quello attuale da vetrina\n\t\t\tif($oldrif != $rif) {\n\t\t\t\tcc_updateVetrina($oldrif); \n\t\t\t\tcc_import_immobili_error_log(\"Tolgo vetrina da \".$oldrif);\n\t\t\t}\n\t\t}else{\n\t\t\t$vetrina = '0';\n\t\t}\t\t\n\t\n\t}else{\n\t\t$vetrina = '0';\n\t}\n\t\n\treturn $vetrina;\n}",
"public function valorpasaje();",
"public function bExamen_l(){\r\n\t\t $c=0;\r\n $sql=\"select * from texamen where descripcion like'$this->descripcion%' and tipo='LABORATORIO' \";\r\n\t\t$cursor=parent::ejecuta_sql($sql);\t\t \r\n\t\tif($row= parent::proxima_tupla($cursor))\r\n\t\t {\r\n\t\t\t DO{\r\n\t\t\t \t$fila[$c][1]=$row[\"id_examen\"];\r\n\t\t\t\t$fila[$c][2]=$row[\"descripcion\"];\r\n\t\t\t\t$fila[$c][3]=$row[\"tipo\"];\r\n\t\t\t\t$c++;\r\n\t\t\t\t}while($row= parent::proxima_tupla($cursor));\r\n\t\t }\t\t\r\n\t\tif ( $fila>0 )\r\n\t\t\treturn $fila;\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t\t\t\r\n\t\t\tparent::cerrar_bd();\r\n }",
"function cariPosisi($batas){\nif(empty($_GET['halagenda'])){\n\t$posisi=0;\n\t$_GET['halagenda']=1;\n}\nelse{\n\t$posisi = ($_GET['halagenda']-1) * $batas;\n}\nreturn $posisi;\n}",
"function cariPosisi($batas){\nif(empty($_GET['halagenda'])){\n\t$posisi=0;\n\t$_GET['halagenda']=1;\n}\nelse{\n\t$posisi = ($_GET['halagenda']-1) * $batas;\n}\nreturn $posisi;\n}",
"public function abono();",
"function get_title_lectura($lectura)\n{\n $cadena = $lectura->libro_nombre . ' ' . $lectura->capitulo . ': ' . $lectura->inicio\n . '-' . $lectura->final;\n\n return $cadena;\n}",
"public static function getReceta(){\n return array(\"LENTEJA\"=>200, \"LONGANIZA VEGANA\"=>1);\n }",
"public static function metodo_estatico () {\n }",
"public function calcula13o()\n {\n }",
"public function calcula13o()\n {\n }",
"function fantacalcio_crea_news($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . 'ª giornata'));\n \n global $user;\n \n $competitions = get_competitions();\n\n $sql = \"SELECT * FROM {fanta_rounds_competitions} WHERE round = '%d'\";\n $result = db_query($sql, $vote_round);\n while ($row = db_fetch_object($result)) {\n $rounds[$row->c_id] = (!empty($row->round_label)) ? $row->round_label : $row->competition_round . \"ª giornata\";\n }\n \n $body = \"\";\n foreach ($rounds as $c_id => $round) {\n $body .= $round . \" \" . $competitions[$c_id]->name . \", \";\n }\n \n $main_c_id = variable_get(\"fantacalcio_main_competition\", 1);\n $main_competition = get_competition_name(variable_get(\"fantacalcio_main_competition\", 1));\n $body = substr($body, 0, -2) . \": Pronti i risultati\";\n $body .= \"<br/>\" . base_path(). \"calendario/\" . $main_competition . \"/\" . $rounds[$main_c_id];\n \n $title = \"Risultati \" . $vote_round . \"ª Giornata\";\n\n $news = (object) array('title'=> $title, 'body'=> $body, 'type' => 'news', 'uid' => $user->uid, 'language' => 'it');\n node_save($news);\n \n //rimuovi \"risultati provvisori\"\n db_query(\"UPDATE {fanta_rounds} SET status = 1 WHERE round = '%d'\", $vote_round);\n variable_set(\"fantacalcio_results_round\", ($vote_round + 1));\n \n return \"News creata\"; \n}",
"function analisaCaminho($lab, $qtdL, $qtdC, $pLI, $pCI, $pLF, $pCF, $pLA, $pCA){ \n if ($pLA == $pLF && $pCA == $pCF){\n exibelab($lab, $qtdL, $qtdC);\n }else{\n $lab[$pLA][$pCA] = 5;\n\n //define vizinhança\n for($c = -1; $c <= +1; $c++){\n for($l = -1; $l <= +1; $l++){\n $liA = $pLA+ $c; // linha atual\n $coA = $pCA+ $l; // coluna atual\n \n //verifica se está dentro dos limites\n if ( ($liA > 0 && $liA <=$qtdL-1) && ($coA > 0 && $coA <= $qtdC-1) ){ \n // verifica se EXISTE, e se é caminho ou saida\n if (isset($lab[$liA][$coA]) && ( $lab[$liA][$coA] == 0 || $lab[$liA][$coA] == 3 )){ \n // exclui diagonais\n if ($c * $l == 0){\n //exclui limites\n if ($lab[$liA][$coA] != 4){ \n analisaCaminho($lab, $qtdL, $qtdC, $pLI, $pCI, $pLF, $pCF, $liA,$coA);\n }\n }\n }\n } // fim limites\n \n }\n }\n // e se eu resetar o caminho aqui? \n }\n }",
"final function velcom(){\n }",
"function stringLetrasDescubiertas($coleccionLetras){\n $pal = \"\";\n \n /*>>> Completar el cuerpo de la función, respetando lo indicado en la documentacion <<<*/\n \n return $pal;\n}",
"function en_rojo($anio){\n $ar=array();\n $ar['anio']=$anio;\n $sql=\"select sigla,descripcion from unidad_acad \";\n $sql = toba::perfil_de_datos()->filtrar($sql);\n $resul=toba::db('designa')->consultar($sql);\n $ar['uni_acad']=$resul[0]['sigla'];\n $res=$this->get_totales($ar);//monto1+monto2=gastado\n $band=false;\n $i=0;\n $long=count($res);\n while(!$band && $i<$long){\n \n if(($res[$i]['credito']-($res[$i]['monto1']+$res[$i]['monto2']))<-50){//if($gaste>$resul[$i]['cred']){\n $band=true;\n }\n \n $i++;\n }\n return $band;\n \n }",
"function fantacalcio_trova_titolari($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . 'ª giornata'));\n\n $out = \"\";\n\n// $vote_round = get_last_votes();\n\n $teams = get_teams();\n $votes = get_votes($vote_round);\n $competitions = get_competitions();\n\n $pl_votes = array();\n foreach ($votes as $vote)\n $pl_votes[] = $vote->pl_id;\n\n $elenco_pl_ids = implode(',', $pl_votes);\n \n $sqlx = \"SELECT * FROM {fanta_rounds_competitions} \" .\n \"WHERE round = '%d'\";\n $resultx = db_query($sqlx, $vote_round);\n while ($row = db_fetch_array($resultx)) {\n\n $c_id = $row['c_id'];\n $competition_round = $row['competition_round'];\n \n $out .= \"<h3>\" . $competitions[$c_id]->name . \"</h3>\";\n \n //resetto i valori \n $sql = \"UPDATE {fanta_lineups} \n SET has_played = 0 \n WHERE round = '%d' \n AND c_id = '%d'\";\n $result = db_query($sql, $competition_round, $c_id);\n\n #titolari con voto\n $sql = \"UPDATE {fanta_lineups} \" .\n \"SET has_played = 1 \" .\n \"WHERE position = 1 \" .\n \"AND round = '%d' \" .\n \"AND c_id = '%d'\" .\n \"AND pl_id IN ($elenco_pl_ids)\";\n //echo $sql;\n $result = db_query($sql, $competition_round, $c_id);\n \n switch (variable_get(\"fantacalcio_riserve_fisse\", 0) ) {\n case 0: //riserve libere\n fantacalcio_get_titolari_riserve_libere($pl_votes, $competition_round, $c_id);\n break;\n case 1: //riserve fisse\n fantacalcio_get_titolari_riserve_fisse($pl_votes, $competition_round, $c_id);\n break;\n default:\n fantacalcio_get_titolari_riserve_fisse($pl_votes, $competition_round, $c_id);\n }\n\n #report\n $sql = \"SELECT count(*) AS n, t_id FROM {fanta_lineups} \" .\n \"WHERE has_played = 1 \" .\n \"AND c_id = '%d' \" .\n \"AND round = '%d'\" .\n \"GROUP BY t_id\";\n $result = db_query($sql, $c_id, $competition_round);\n $played = array();\n $i = 0;\n while ($row = db_fetch_array($result)) {\n $i++;\n $played[$i]['t_id'] = $row['t_id'];\n $played[$i]['n'] = $row['n'];\n }\n\n $players = get_players();\n\n $sql = \"SELECT * FROM {fanta_lineups} \" .\n \"WHERE c_id = '%d' \" .\n \"AND round = '%d'\";\n $result = db_query($sql, $c_id, $competition_round);\n $formazioni = array();\n while ($row = db_fetch_object($result)) {\n\n $role = $players[$row->pl_id]->role;\n\n if ($row->position == 1) $formazioni[$row->t_id][\"titolari\"][$role]++;\n if ($row->has_played == 1) $formazioni[$row->t_id][\"played\"][$role]++;\n }\n\n #riepilogo titolari squadre\n $header = array(\"Squadra\", \"N° Titolari\", \"Modulo Titolari\", \"Modulo Formazione\");\n\n $rows = array();\n foreach ($formazioni as $key => $value) {\n $n_titolari = array_sum($formazioni[$key][\"played\"]);\n\n $style = ($n_titolari == 11) ? \"\" : \"font-weight: bold; color: red;\";\n\n ksort($formazioni[$key][\"played\"]);\n ksort($formazioni[$key][\"titolari\"]);\n\n $rows[$key][] = $teams[$key]->name;\n $rows[$key][] = array(\"data\" => $n_titolari, \"style\" => $style);\n $rows[$key][] = implode(\"-\", $formazioni[$key][\"played\"]);\n $rows[$key][] = implode(\"-\", $formazioni[$key][\"titolari\"]);\n }\n $out .= theme_table($header, $rows);\n\n }\n\n return $out;\n\n}",
"function tipo_viajes($t = 0){\n\t\t$tipo_viajes = array(\"<span class=\\\"texto-claro\\\">No Capturado</span>\", \"Técnico\", \"Alto Nivel\");\n\t\treturn $tipo_viajes[$t];\n\t}",
"function setAgregarUnPais(){\n\t\t$this->comienza_con++;\n\t}",
"public function prepararSopa(){\n\n echo(\"Revuelva los ingredientes y deje cocinar por 20 minutos\");\n\n}",
"function hitungDenda(){\n\n return 0;\n }",
"function verMas()\t\r\n\t\t{\r\n\t\t\t\r\n\t\t\tglobal $use;\r\n\t\t\tglobal $priv;\r\n\r\n\t\t\t//NOTA: Para ver si funciona tienen que asociarle un adherente en la tabla socios, ya que en los datos de ejemplo todos son titulares\r\n\t\t\t//NOTA: Lo que hice fue: en tabla socios en numero_soc=00044 cambiar el campo soc_titula de manera que quede soc_titula=00277\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DEL ASOCIADO TITULAR----------------\r\n\t\t\t\r\n\t\t\t$numero_socio = $_GET['num_soc']; //Es el número del socio titular que debe ser tomado del PASO 1\r\n\t\t\t\r\n\r\n\t\t\t\t$resultadoTitular = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t\t\t\t\t\t FROM socios,persona \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\");\r\n\t\t\t\t\t\t\t\t\t \r\n\r\n\t\t\tif(!$resultadoTitular)\r\n\t\t\t{\r\n\t\t\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"verMas\",\r\n\t\t\t\t'descripcion'\t=>\"No se encuentra al titular $numero_socio\"\r\n\t\t\t\t];\r\n\t\t\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t///---FUNCIÓN PARA CALCULAR EDAD----\r\n\t\t\t\r\n\t\t\t$fecha=$resultadoTitular[0]['fecnacim'];\r\n\t\t\t$dias = explode(\"-\", $fecha, 3);\r\n\t\t\t\r\n\t\t\t// $dias[0] es el año\r\n\t\t\t// $dias[1] es el mes\r\n\t\t\t// $dias[2] es el dia\r\n\t\t\t\r\n\t\t\t// mktime toma los datos en el orden (0,0,0, mes, dia, año) \r\n\t\t\t$dias = mktime(0,0,0,$dias[1],$dias[2],$dias[0]);\r\n\t\t\t$edad = (int)((time()-$dias)/31556926 );\r\n\t\t\t$resultadoTitular[0]['edad']=$edad;\r\n\t\t\t\r\n\t\t\t///---FIN FUNCIÓN PARA CALCULAR EDAD----\r\n\t\t\t\r\n\t\t\t$estado[0]='1';\r\n\t\t\t$estado[1]='1';\r\n\t\t\t$estado[2]='1';\r\n\t\t\t$estado[3]='1';\r\n\t\t\t$estado[4]='1';\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS SERVICIOS DEL ASOCIADO TITULAR----------------\r\n\t\t\t\r\n\t\t\t//Por cuota\r\n\t\t\t$resultadoTitularServicios1 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,fme_adhsrv.codigo,fme_adhsrv.parentesco,fme_adhsrv.periodoini,fme_adhsrv.periodofin,fme_adhsrv.motivobaja,fme_adhsrv.documento\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.idmutual \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,fme_adhsrv,tar_srv \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.socnumero = socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.codigo = tar_srv.idmutual\");\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\tif(!$resultadoTitularServicios1)\r\n\t\t\t\t$estado[0]='0';\r\n\t\t\t\r\n\t\t\t//Por tarjeta\r\n\t\t\t$resultadoTitularServicios2 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.codigo AS codigotarsrv, tar_srvadherentes.codigo, tar_srvadherentes.parentesco \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,tar_srv, tar_srvadherentes \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n AND socios.numero_soc= socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.socnumero = socios.soc_titula \r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.codigo = tar_srv.codigo\");\r\n\t\t\t\r\n\t\t\tif(!$resultadoTitularServicios2)\r\n\t\t\t\t$estado[1]='0';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS ADHERENTES DEL ASOCIADO TITULAR CON APORTES POR CUOTA----------------\r\n\t\t\t\r\n\r\n\t\t $resultadoAdherentes1 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,fme_adhsrv.codigo,fme_adhsrv.parentesco,fme_adhsrv.periodoini,fme_adhsrv.periodofin,fme_adhsrv.motivobaja,fme_adhsrv.documento\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.idmutual \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,fme_adhsrv,tar_srv \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio'\r\n\t\t\t\t\t\t\t\t\t AND socios.numero_soc != socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.socnumero = socios.numero_soc \r\n\t\t\t\t\t\t\t\t\t AND fme_adhsrv.codigo = tar_srv.idmutual\");\r\n\t\t\t\r\n\t\t\tif(!$resultadoAdherentes1)\r\n\t\t\t\t$estado[2]='0';\r\n\t\t\t\r\n\t\t\t//---------------CONSULTA QUE DEVUELVE TODA LA INFO DE LOS ADHERENTES DEL ASOCIADO TITULAR CON APORTES POR TARJETA----------------\r\n\r\n\t\t\t$resultadoAdherentes2 = $GLOBALS['db']->select(\"SELECT socios.id_persona,socios.numero_soc,socios.beneficio,socios.fec_alt,socios.fec_baja,socios.lugar_pago,socios.soc_titula\r\n\t\t\t\t,persona.id_persona,persona.nombre,persona.numdoc,persona.cuil,persona.sexo,persona.fecnacim,persona.domicilio,persona.casa_nro,persona.barrio,persona.localidad,persona.codpostal\r\n\t\t\t\t,persona.dpmto,persona.tel_fijo,persona.tel_cel,persona.fec_alta AS fec_alta2,persona.fec_baja AS fec_baja2,persona.cbu,persona.banco,persona.usualta\r\n\t\t\t\t,tar_srv.nombre AS nombreplan,tar_srv.codigo AS codigotarsrv, tar_srvadherentes.codigo, tar_srvadherentes.parentesco \r\n\t\t\t\t\t\t\t\t\t FROM socios,persona,tar_srv, tar_srvadherentes \r\n\t\t\t\t\t\t\t\t\t WHERE socios.soc_titula = '$numero_socio'\r\n\t\t\t\t\t\t\t\t\t AND socios.numero_soc != socios.soc_titula\r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.socnumero = socios.numero_soc \r\n\t\t\t\t\t\t\t\t\t AND tar_srvadherentes.codigo = tar_srv.codigo\");\t\r\n\r\n\t\t\t\r\n\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\r\n\t\t\tif(!$resultadoAdherentes2)\r\n\t\t\t\t$estado[3]='0';\r\n\t\t\r\n\t\t \r\n\t\t\t//---------------CONSULTA QUE DEVUELVE EL LISTADO DE TODAS LAS ASISTENCIAS----------------\r\n\t\t\t\r\n\t\t\t//NOTA: Para que puedan ver si funciona o no hacer la prueba con el siguiente ejemplo:\r\n\t\t\t// En la tabla fme_asistencia modifiquen en cualquier lado y pongan alguno con doctitu = 06948018 (o busquen cualquier DNI de un socio titular y usen ese)\r\n\t\t\t// Cuando prueben el sistema vayan al ver más de Barrionuevo Samuel y van a ver el listado de atenciones que tiene asociado\r\n\t\t\t\r\n\t\t\t$asistencias = $GLOBALS['db']->select(\"SELECT fme_asistencia.doctitu, fme_asistencia.numdoc, fme_asistencia.nombre,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.fec_pedido, fme_asistencia.hora_pedido, fme_asistencia.dessit, fme_asistencia.fec_ate,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.sintomas, fme_asistencia.diagnostico, fme_asistencia.tratamiento, fme_asistencia.hora_aten,\r\n\t\t\t\t\t\t\t\t\t fme_asistencia.profesional\r\n\t\t\t\t\t\t\t\t\t FROM fme_asistencia, socios, persona \r\n\t\t\t\t\t\t\t\t\t WHERE soc_titula = '$numero_socio' \r\n\t\t\t\t\t\t\t\t\t AND socios.id_persona = persona.id_persona\r\n\t\t\t\t\t\t\t\t\t AND numero_soc = soc_titula\r\n\t\t\t\t\t\t\t\t\t AND persona.numdoc = fme_asistencia.doctitu\");\r\n\t\t\t\r\n\t\t\tif(!$asistencias)\r\n\t\t\t\t$estado[4]='0';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\techo $GLOBALS['twig']->render('/Atenciones/perfil.html', compact('resultadoTitular', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoTitularServicios1', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoTitularServicios2', \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoAdherentes1',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'resultadoAdherentes2',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'asistencias',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'estado','use','priv'));\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}",
"public function getLargura() \r\n\t{\r\n\t\treturn $this->iLargura;\r\n\t}",
"function tous_auteurs_date_passage() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\r\n\t// fixer le nombre de ligne du tableau (tranche)\r\n\t$fl = $GLOBALS['actijour']['nbl_aut'];\r\n\r\n\t// recup $vl dans URL\r\n\t$dl = intval(_request('vl'));\r\n\t$dl = ($dl + 0);\r\n\t// valeur de tranche affichꥍ\r\n\t$nba1 = $dl + 1;\r\n\r\n\t$p_st = _request('st');\r\n\tif (!$p_st) {\r\n\t\t$where_st = \"statut IN ('0minirezo','1comite','6forum')\";\r\n\t\t$p_st = 'tous';\r\n\t} else {\r\n\t\t$where_st = \"statut = \" . _q($p_st);\r\n\t}\r\n\r\n\t$q = sql_select(\"SQL_CALC_FOUND_ROWS id_auteur, statut, nom,\r\n\t\t\t\t\t\tDATE_FORMAT(en_ligne,'%d/%m/%y %H:%i') AS vu \"\r\n\t\t. \"FROM spip_auteurs \"\r\n\t\t. \"WHERE $where_st \"\r\n\t\t. \"ORDER BY en_ligne DESC,nom \"\r\n\t\t. \"LIMIT $dl,$fl\"\r\n\t);\r\n\r\n\t// recup nombre total d'entrees\r\n\t$nl = sql_select(\"FOUND_ROWS()\");\r\n\t$found = @sql_fetch($nl);\r\n\t$nb_auteurs = $found['FOUND_ROWS()'];\r\n\r\n\t$ifond = 0;\r\n\r\n\t$aff = '';\r\n\r\n\t# onglet select statut\r\n\t$lst_statut = array('tous', '0minirezo', '1comite', '6forum');\r\n\t$script = _request('exec');\r\n\r\n\t$aff .= debut_onglet();\r\n\tforeach ($lst_statut as $statut) {\r\n\t\t$aff .= onglet(_T('actijour:onglet_connect_' . $statut),\r\n\t\t\tgenerer_url_ecrire($script, 'st=' . ($statut == 'tous' ? '' : $statut)),\r\n\t\t\t$statut,\r\n\t\t\t($p_st == $statut ? $statut : ''), '');\r\n\t}\r\n\t$aff .= fin_onglet();\r\n\r\n\r\n\t# tableau\r\n\t#\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n\r\n\t$aff .= \"<table align='center' border='0' cellpadding='2' cellspacing='0' width='100%'>\\n\"\r\n\t\t. \"<tr><td colspan='3' class='verdana3 bold'>\" . _T('actijour:tous_date_connections')\r\n\t\t. \"</td></tr>\";\r\n\t# Tranches\r\n\t$aff .= \"<tr><td colspan='3' class='verdana3 bold'>\";\r\n\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t. tranches_liste_art($nba1, $nb_auteurs, $fl)\r\n\t\t. \"\\n</div>\\n\";\r\n\t$aff .= \"</td></tr>\";\r\n\r\n\twhile ($row = sql_fetch($q)) {\r\n\t\t$ifond = $ifond ^ 1;\r\n\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\r\n\t\t$aff .= \"<tr bgcolor='$couleur'>\"\r\n\t\t\t. \"<td width='5%'>\\n\"\r\n\t\t\t. bonhomme_statut($row) . \"</td>\\n\"\r\n\t\t\t. \"<td width='75%'>\"\r\n\t\t\t. \"<a class='verdana2 bold' href='\" . generer_url_ecrire(\"auteur_infos\", \"id_auteur=\" . $row['id_auteur']) . \"'>\"\r\n\t\t\t. entites_html($row['nom']) . \"</a>\\n\"\r\n\t\t\t. \"<td width='20%'>\\n\"\r\n\t\t\t. \"<div align='right' class='verdana1'>\" . $row['vu'] . \"</div>\\n\"\r\n\t\t\t. \"</td></tr>\\n\";\r\n\r\n\t}\r\n\t$aff .= \"</table>\\n\\n\";\r\n\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}",
"function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Scheda argomento\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}",
"function getMerezcoTarjeta(){\n\t\tif($this->numero_cambio >= 3)\n\t\t\t$necesito=2;\n\t\telse\n\t\t\t$necesito=1;\n\t\t\n\t\tif($necesito <= $this->sacar_tarjeta){\n\t\t\t$this->sacar_tarjeta=0;\n\t\t\treturn 1;\n\t\t}\n\t\telse{\n\t\t\t$this->sacar_tarjeta=0;\n\t\t\treturn 0;\n\t\t}\n\t}",
"function motivoDeAnulacionDesin(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNDS' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}",
"function venta($mysqli,$fecha,$ref,$monto16,$monto0,$iva,$tipo,$factu,$cte){\n\t\t//en todos los casos\n\t\t$table='diario';\n\t\t$tmonto=$monto16+$monto0;\n\t\t$montof=$tmonto+$iva;\n\t\t//inicializa variable resultados\n\t\t\t//calculo del costo de ventas\n\t\t $costoc=$mysqli->query(\"SELECT SUM(haber)FROM inventario WHERE tipomov = 2 AND idoc= $ref\");\n\t\t\t$row=mysqli_fetch_row($costoc);\n\t\t\t$costo=$row[0];\n\t\t\t$costoc->close();\t\n\t\t\t//si existe el costo de ventas?\n\t\t\tif($costo!=''){\n\t\t\t\ttry {\n\t\t\t\t\t$mysqli->autocommit(false);\n\t\t\t\t\t//abono a inventario 115.01\n\t\t\t\t\t$abono=\"115.01\";\n\t\t\t\t\toperdiario($mysqli,$abono,1,1,$ref,$costo,$fecha,$factu);\n\t\t\t\t\t//cargo a costo de ventas 501.01\n\t\t\t\t\t$cargo=\"501.01\";\n\t\t\t\t\toperdiario($mysqli,$cargo,1,0,$ref,$costo,$fecha,$factu);\n\t\t\t\t\t//abono a ventas segun tasa\n\t\t\t\t\t//ventas tasa general \n\t\t\t\t\t\t$abono=\"401.01\";\n\t\t\t\t\t\toperdiario($mysqli,$abono,1,1,$ref,$monto16,$fecha,$factu,$cte);\n\t\t\t\t\t//ventas tasa 0 \n\t\t\t\t\t\t$abono=\"401.04\";\n\t\t\t\t\t\toperdiario($mysqli,$abono,1,1,$ref,$monto0,$fecha,$factu,$cte);\n\t\t\t\t\t//movimientos por tipo de venta\n\t\t\t\t\t\tswitch($tipo){\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t//mostrador- cargo a caja y efectivo 101.01\n\t\t\t\t\t\t\t\t$cargo=\"101.01\";\n\t\t\t\t\t\t\t\toperdiario($mysqli,$cargo,1,0,$ref,$montof,$fecha,$factu);\n\t\t\t\t\t\t\t\t//iva trasladado cobrado 208.01\n\t\t\t\t\t\t\t\t$abono=\"208.01\";\n\t\t\t\t\t\t\t\toperdiario($mysqli,$abono,1,1,$ref,$iva,$fecha,$factu);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t//contado x ahora igual a anterior, luego se manda al cobro\n\t\t\t\t\t\t\t\t//mostrador- cargo a caja y efectivo 101.01\n\t\t\t\t\t\t\t\t$cargo=\"101.01\";\n\t\t\t\t\t\t\t\toperdiario($mysqli,$cargo,1,0,$ref,$montof,$fecha,$factu);\n\t\t\t\t\t\t\t\t//iva trasladado cobrado 208.01\n\t\t\t\t\t\t\t\t$abono=\"208.01\";\n\t\t\t\t\t\t\t\toperdiario($mysqli,$abono,1,1,$ref,$iva,$fecha,$factu);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t//credito cargo a clientes\n\t\t\t\t\t\t\t\t$cargo=\"105.01\";\n\t\t\t\t\t\t\t\toperdiario($mysqli,$cargo,1,0,$ref,$montof,$fecha,$factu,$cte);\n\t\t\t\t\t\t\t\t//iva trasladado no cobrado 209.01\n\t\t\t\t\t\t\t\t$abono=\"209.01\";\n\t\t\t\t\t\t\t\toperdiario($mysqli,$abono,1,1,$ref,$iva,$fecha,$factu);\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//efectuar la operacion\n\t\t\t\t\t$mysqli->commit();\n\t\t\t\t $resul=0;\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t//error en las operaciones de bd\n\t\t\t\t $mysqli->rollback();\n\t\t\t\t \t$resul=-2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t//no hay costo de ventas\n\t\t\t\t$resul=-1;\n\t\t\t}\n\t\t\n\t\t return $resul;\n}",
"function verificaJogoVelha($jogo){\n\t//valor 1 => jogador 1\n\t//valor 2 => jogador 2\n\t\n\tif($jogo[0] != 0){\n\t\t//primeira horizontal\n\t\tif($jogo[0] == $jogo[1] && $jogo[0] == $jogo[2]){\n\t\t\treturn $jogo[0];\n\t\t}\n\t\t//primeira vertical\n\t\telse if($jogo[0] == $jogo[3] && $jogo[0] == $jogo[6]){\n\t\t\treturn $jogo[0];\n\t\t}\n\t\t//primeira diagonal\n\t\telse if($jogo[0] == $jogo[4] && $jogo[0] == $jogo[8]){\n\t\t\treturn $jogo[0];\n\t\t}\n\t}\n\tif($jogo[2] != 0){\n\t\t//terceira vertical\n\t\tif($jogo[2] == $jogo[5] && $jogo[2] == $jogo[8]){\n\t\t\treturn $jogo[2];\n\t\t}\n\t\t//segunda diagonal\n\t\telse if($jogo[2] == $jogo[4] && $jogo[2] == $jogo[6]){\n\t\t\treturn $jogo[2];\n\t\t}\n\t}\n\tif($jogo[7] != 0){\n\t\t//terceira horizontal\n\t\tif($jogo[6] == $jogo[7] && $jogo[7] == $jogo[8]){\n\t\t\treturn $jogo[7];\n\t\t}\n\t\t//segunda vertical\n\t\telse if($jogo[1] == $jogo[7] && $jogo[4] == $jogo[7]){\n\t\t\treturn $jogo[7];\n\t\t}\n\t}\n\t//segunda horizontal\n\tif($jogo[3] != 0 && $jogo[3] == $jogo[4] && $jogo[3] == $jogo[5]){\n\t\treturn $jogo[3];\n\t}\n\t\n\tfor($i = 0; $i < 9; $i++){\n\t\tif($jogo[$i] == 0) break;\n\t}\n\t\n\tif($i == 9) return 'empate';\n\t\n\treturn false;\n}",
"function motivoDeAnulacion(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNRE' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}",
"function cl_contacorrenteregravinculo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"contacorrenteregravinculo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function adjudicarTodo(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_ADJTODO_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }",
"public function contrato()\r\n\t{\r\n\t}",
"public function llamadasVaciar( ) {\n $this->setComando(\"LLAMADAS\",\"VACIAR\");\n }",
"function motivoDeAnulacionDev(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNDV' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}",
"function revisions_annonces($id_annonce, $c=false) {\n\n// ** Champs normaux **\n\tif ($c === false) {\n\t\t// Si $c a sa valeur par defaut, alors on en fait un tableau,\n\t\t// que l'on remplit avec les nouvelles valeurs des differents champs\n\t\t$c = array();\n\t\tforeach (array(\n\t\t\t// Pour chacun de ces champs,\n\t\t\t'titre', 'lien', 'annonceur', 'peremption',\n\t\t\t'type', 'descriptif', 'source_lien', 'source_nom', 'statut'\n\t\t) as $champ)\n\t\t\t// on en recupere la nouvelle valeur (a condition qu'ils ne soient pas vides),\n\t\t\tif (($a = _request($champ)) !== null)\n\t\t\t\t// que l'on met dans le tableau $c\n\t\t\t\t$c[$champ] = $a;\n\t}\n\n\t// Si l'annonce est publiee, invalider les caches et demander sa reindexation\n\t// (indispensable pour mettre a jour l'annonce du cote public)\n\t// $t est le statut actuel de l'objet, que l'on recupere en premier lieu\n\t$t = sql_getfetsel(\"statut\", \"spip_vu_annonces\", \"id_annonce=$id_annonce\");\n\tif ($t == 'publie') {\n\t\t// Si le statut est publie, alors on indique que cette annonce devra etre invalidee\n\t\t$invalideur = \"id='id_annonce/$id_annonce'\";\n\t\t// et on demande une reindexation\n\t\t$indexation = true;\n\t}\n\t// On charge le fichier qui contient la fonction necessaire...\n\tinclude_spip('inc/modifier');\n\t// ... que l'on execute ensuite avec les parametres definis juste au dessus\n\tmodifier_contenu('annonce', $id_annonce,\n\t\tarray(\n\t\t\t'nonvide' => array('titre' => _T('info_sans_titre')),\n\t\t\t'invalideur' => $invalideur,\n\t\t\t'indexation' => $indexation\n\t\t),\n\t\t$c);\n\n\n// ** Un cas special : changer le statut ? **\n\t// On recupere pour commencer le statut actuel de la breve,\n\t$row = sql_fetsel(\"statut\", \"spip_vu_annonces\", \"id_annonce=$id_annonce\");\n\t// pour ensuite le stocker dans deux variables differentes\n\t$statut_ancien = $statut = $row['statut'];\n\t// Si un nouveau statut est demande, ET qu'il est different de l'actuel, \n\t// ?? a rajouter pour la suite : \"ET que nous avons les autorisations pour le changer\"\n\tif (_request('statut', $c) AND _request('statut', $c) != $statut) {\n\t\t// Alors $statut acquiere sa valeur nouvelle (vu au dessus avec $champs)\n\t\t$statut = $champs['statut'] = _request('statut', $c);\n\t}\n\n// ** Rendre effective la revision **\n\t// Si le tableau contenant les nouvelles valeurs est vide (rien a changer),\n\t// alors c'est termine !\n\tif (!$champs) return;\n\n\t// Si l'etape precedente est passee, alors on a des choses a faire.\n\t// On demande simplement une mise a jour de la table avec les nouvelles valeurs ($champs)\n\tsql_updateq('spip_vu_annonces', $champs, \"id_annonce=$id_annonce\");\n\n// ** Post-modifications **\n\t// Invalider les caches\n\tinclude_spip('inc/invalideur');\n\tsuivre_invalideur(\"id='id_annonce/$id_annonce'\");\n\n}",
"function cl_tarefa_lanc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tarefa_lanc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_habitcandidatointeresseprograma() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"habitcandidatointeresseprograma\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function content($valCherche, $chaine){\r\n $i=0;\r\n while(($i<laTaille($chaine)) && ($valCherche!=$chaine[$i])){\r\n $i++;\r\n }\r\n if($i==laTaille($chaine)){\r\n $retour = \"faux\";\r\n }\r\n else{\r\n $retour = \"vrai\";\r\n }\r\n return $retour;\r\n }",
"function cl_aguacoletorexporta() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacoletorexporta\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function matricularVehiculo(){\r\n $matricula _aleatoria = rand();\r\n\r\n $encontrado = false;\r\n for ($i=0; $i< count ($this->vehiculos) && ($encontrado==false); $i++) {\r\n if ($this->vehiculos[$i] != null) {\r\n if($this->vehiculos[$i]->getMatricula() =='') {}\r\n $this->vehiculos[$i]->getMatricula($matricula_aleatoria);\r\n $encontrado = true;\r\n $pos = $i;\r\n }\r\n }\r\n }",
"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 function hallo(){\n\t\treturn self::$no++.\" Hallo my name is \".$this->harga;\n\t}",
"function grafico_1_2( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t. \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t// var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, campo, actor, cantidad de menciones\n\t$i = -1;\n\tforeach($main as $k=>$v){\n\t\t// por ahora solo considero los dos posibles campos\n\t\t$tabla[ ++$i ] = [\n\t\t\t'ua' => $ua_nombre,\n\t\t\t'campo' => ( strpos( $v['id_campo'], '3' ) !== false ) ? 'oposicion' : 'oficialismo',\n\t\t\t'actor' => $v['apellido'] . ' ' . $v['nombre'],\n\t\t\t'cantidad' => $v['cantidad']\n\t\t\t];\n\t}\n\t// var_dump($tabla);\n\t\n\t// grafico\n\t$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];\n\t\n\t$oposicion = new StdClass(); // objeto vacio\n\t$oposicion->name = 'Oposicion';\n\t$oposicion->rank = 0;\n\t$oposicion->weight = 'LightBlue';\n\t$oposicion->id = 1;\n\t$oposicion->children = [];\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Campos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = [ $oficialismo, $oposicion ];\n\t\n\t$i_of = 0;\n\t$i_op = 0;\n\t\n\tforeach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}\n\t\n\t$oposicion->rank = $i_op;\n\t$oficialismo->rank = $i_of;\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n\t\n}",
"public function tipo_tarjeta();",
"public function obtenerViajesplusAbonados();",
"public function pasaje_abonado();",
"function NUMERO_LUNES_FECHA($_ARGS) {\r\n\t$_FECHA_EGRESO = FECHA_EGRESO($_ARGS);\r\n\t\r\n\tif (ESTADO($_ARGS) == \"A\") {\r\n\t\tif ($_ARGS['FECHA_INGRESO'] <= $_ARGS['DESDE']) {\r\n\t\t\tif ($_ARGS['FECHA_INGRESO'] < $_ARGS['HASTA']) list($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['HASTA']);\r\n\t\t\telse list($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']);\r\n\r\n\t\t\tlist($ap, $mp) = SPLIT('[/.-]', $_ARGS['PERIODO']); $periodo_inicio = \"01-$mp-$ap\";\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t$dia_inicio = 1;\r\n\t\t\t$dia_fin = DIAS_DEL_MES(\"$de-$me-$ae\");\r\n\t\t} else {\r\n\t\t\tlist($ae, $me, $de) = SPLIT('[/.-]', $_ARGS['HASTA']);\r\n\t\t\tlist($ai, $mi, $di) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']); $periodo_inicio = \"$di-$mi-$ai\";\t$diai = (int) $di;\r\n\t\t\t\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t\r\n\t\t\tif ($dia_semana == 1) {\r\n\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t} else {\r\n\t\t\t\tif ($dia_semana == 0) $restar_dia_semana = $diai - 7;\r\n\t\t\t\telse $restar_dia_semana = $diai - $dia_semana;\r\n\t\t\t\t\r\n\t\t\t\tif ($restar_dia_semana < 1) $dia_inicio = (int) $di;\r\n\t\t\t\telse {\r\n\t\t\t\t\t$diferencia_dias = $dia_semana - 1;\r\n\t\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t\t\t$dia_inicio -= $diferencia_dias;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$dia_fin = DIAS_DEL_MES(\"$de-$me-$ae\");\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tlist($ae, $me, $de) = SPLIT('[/.-]', $_FECHA_EGRESO);\r\n\t\t\r\n\t\tif ($_ARGS['FECHA_INGRESO'] <= $_ARGS['DESDE']) {\r\n\t\t\tlist($ap, $mp) = SPLIT('[/.-]', $_ARGS['PERIODO']); $periodo_inicio = \"01-$mp-$ap\";\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t$dia_inicio = 1;\r\n\t\t\t$dia_fin = (int) $de;\r\n\t\t} else {\t\r\n\t\t\tlist($ai, $mi, $di) = SPLIT('[/.-]', $_ARGS['FECHA_INGRESO']); $periodo_inicio = \"$di-$mp-$ap\";\t$diai = (int) $di;\r\n\t\t\t$primer_dia_semana = DIA_DE_LA_SEMANA($periodo_inicio);\r\n\t\t\t$dia_semana = $primer_dia_semana;\r\n\t\t\t\r\n\t\t\tif ($dia_semana == 1) {\r\n\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t} else {\r\n\t\t\t\tif ($dia_semana == 0) $restar_dia_semana = $diai - 7;\r\n\t\t\t\telse $restar_dia_semana = $diai - $dia_semana;\r\n\t\t\t\t\r\n\t\t\t\tif ($restar_dia_semana < 1) $dia_inicio = (int) $di;\r\n\t\t\t\telse {\r\n\t\t\t\t\t$diferencia_dias = $dia_semana - 1;\r\n\t\t\t\t\t$dia_inicio = (int) $di;\r\n\t\t\t\t\t$dia_inicio -= $diferencia_dias;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$dia_fin = (int) $de;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$lunes = 0;\r\n\tfor ($dia=$dia_inicio; $dia<=$dia_fin; $dia++) {\r\n\t\tif ($dia_semana == 7) $dia_semana = 0;\r\n\t\tif ($dia_semana == 1) $lunes++;\r\n\t\t$dia_semana++;\r\n\t}\r\n\treturn $lunes;\r\n}",
"public function run()\n {\n $nomes_jogos =['Diablo 3', 'Dishonored', 'Far Cry 3', 'Mortal Kombat', 'Resident Evil 6', 'Skyrim', 'Tomb Raider'];\n\n $desenvolvedor=['Blizzard', 'Arkane Studios', 'Ubisoft Montreal', 'Netherrealm Studios e ANDYN', 'Capcom', 'Bethesda Game Studios', 'Core Design e Crystal Dynamics'];\n\n $plataformas=['PC', 'PC, Xbox 360 e Playstation 3', 'PC, Xbox 360 e Playstation 3', 'Xbox 360, PlayStation 3, PlayStation Vita ,Microsoft Windows', 'PlayStation 3, Xbox 360, Microsoft Windows', 'PC, Xbox 360 e Playstation 3', 'PlayStation 3, Xbox 360, Microsoft Windows'];\n\n $lancamento=['15 de maio de 2012', '12 de outubro de 2012', '30 de novembro de 2012', '28 de Abril de 2011', '2 de outubro de 2012', '11 de novembro de 2011', ' Lançamento do primeiro Tomb Raider foi em 1996'];\n\n $genero=['RPG', 'Stealth, ação-aventura, tiro em primeira pessoa', 'Tiro em primeira pessoa, \"mundo aberto\"', 'Luta', 'Horror dramático, survival horror, tiro na terceira pessoa', 'RPG', 'Terror Ação, Aventura, tiro na terceira pessoa'];\n\n $modo_de_jogo=['Single player/Multiplayer', 'Single player', 'Single player/Multiplayer', 'Single player/Multiplayer', 'Single player/Multiplayer', 'Single player', 'Single player'];\n\n $classificacao=['+16', '+18', '+18', '+18', '+18', '+18', '+18'];\n\n $descricao=[\n \t'Diablo III segue a história de seu predecessor, Diablo II: Lord of Destruction, que superou expectativas. A história do novo jogo passa-se depois de vinte anos dos acontecimentos que marcaram o fim de Diablo II. Os demônios Diablo, Mephisto e Baal foram derrotados, mas quando um cometa cai na Terra exatamente no lugar onde Diablo foi confinado, os guerreiros são novamente convocados para defender a humanidade contra as chamas do Inferno. O estilo do jogo continua o mesmo, mas desta vez utilizando os recursos das novas tecnologias reproduzindo um mundo totalmente em 3D e interativo, podendo até destruir cenários. Os jogadores poderão escolher entre cinco classes disponíveis e se aventurar num mundo mágico e ameaçador que Diablo III proporciona, porém desta vez, com novas habilidades e equipamentos e com um nível de personalização de personagem mais apurado.',\n \t 'És o antigo guarda-costas de confiança da Imperatriz. Injustamente culpado pelo seu assassinato, e movido pela vingança, terás de te tornar um infame assassino, conhecido apenas pela perturbadora máscara que se tornou o teu cartão-de-visita. À medida que vagueias por um mundo destroçado pela peste e oprimido por um governo armado com estranhas tecnologias, a verdade por detrás da tua traição é tão obscura como as águas que rodeiam a cidade. As tuas escolhas determinarão o destino do mundo, mas, o que quer que aconteça, a tua antiga vida desapareceu para sempre.',\n \t '\"Para além dos limites da civilização encontra-se uma ilha, um lugar sem lei governado por pirataria e miséria humana, onde os escapes são apenas as drogas ou o cano de uma arma. Este é o lugar onde você se encontra, preso num lugar que esqueceu o certo do errado, um lugar que vive pelos princípios da violência. Descubra os segredos sangrentos da ilha e leva a luta ao inimigo; improvise e use o ambiente para sobreviver. Cuidado com a beleza e o mistério deste paraíso inexplorado e vive para superar os seus personagens cruéis e desesperados. Irá precisar de mais do que sorte para sobreviver\". ',\n \t 'O jogo retorna as suas raízes, com lutas com movimentação completamente 2D, mas gráficos em 3D, onde não há mais possibilidade de se esquivar dos golpes andando para os lados e é o jogo mais rápido da série. Ao invés do clássico controle com Soco e Chute, Alto e Baixo, terá um botão pra cada membro sendo Braço e Perna, Esquerda e Direita.\n\n\t\t\t\tO jogo conta com vários modos de jogo. O principal é o Kombate, onde permite lutas um contra um ou em duplas, permitindo até 4 jogadores lutarem na mesma partida. Outro modo de jogo é a Torre dos Desafios, que consiste em uma grande torre dividida em 300 partes, onde cada parte contém um desafio a ser completado com um personagem especifico. Alguns dos desafios que compões a torre são os Minigames Teste sua Força, em que o jogador deve apertar freneticamente os botões do controle com o objetivo de acumular força para quebrar certos objetos; o Teste seu Golpe, onde o jogador deve acumular uma quantidade muito precisa de força para quebrar somente o objeto que está em uma pilha; o Teste sua Sorte, onde uma roleta sorteia várias condições especiais para a luta; e o Teste sua Percepção, onde um objeto é escondido em um dos vários copos/crânios e são embaralhados e cabe ao jogador descobrir onde estão.\n\n\t\t\t\tDurante as lutas foram adicionados vários novos sistemas e alguns reformulados, como os combos, onde pode-se ligar quase todos os golpes tendo poucos golpes que não tem ligação ou combos já programados e alguns personagens podem usar armas durante eles. Além disso os combos podem ser ligados com o parceiro no modo Tag-Team, assim criando sequencias únicas com dois personagens. Ao jogo também foi adicionada uma barra, que é usada para fazer movimentos especiais. Ela dividida em 3 níveis que podem respectivamente tornar os golpes especiais mais fortes, revidar um golpe e o Movimento de Raio-X, um combo mostrando os danos causados pelos golpes diretamente nos ossos e órgãos dos adversários, podendo retirar até 50% da vida do oponente dependendo do personagem. E por fim também há os Golpes Finais, um movimento em que se faz uma sequência de botões para finalizar o oponente de uma forma violenta, além dos movimentos finais de cada personagem, há o Fatality de Arena ou Stage Fatality, agora inovado, ao invés de simplesmente desferir um uppercut no oponente, o jogador executa um movimento que o leva a uma morte consequente (Ex: Na floresta viva, ao invés de dar um gancho no oponente, o personagem o agarra pelo ombro e o braço e o arremessa na boca de uma árvore que mastiga até que as pernas quebrem e se desprendam do corpo). Há também a inclusão do famoso Babality, em que o oponente volta a ser um bebê chorão. (Ex: Reptile, quando é pego por um, torna-se um ovo de réptil e eclode, tornando-se um \"bebê-réptil\", começando a chorar e cuspir ácido).',\n \t\t\t\t'Resident Evil 6 (バイオハザード 6, título japonês: Biohazard 6), é um jogo de vídeo do género horror dramático/de sobrevivência jogado na terceira pessoa desenvolvido e publicado pela Capcom. Foi apresentado durante uma campanha de divulgação viral na página NoHopeLeft.com. Apesar do nome é o nono jogo da série principal Resident Evil e foi lançado em 2 de outubro de 2012 para PlayStation 3 e Xbox 360. A versão para Microsoft Windows foi lançada no dia 22 de março de 2013.\n\n\t\t\t\tA história é contada a partir das perspectivas de Chris Redfield, membro e fundador da BSAA traumatizado por ter falhado uma missão; Leon S. Kennedy, um sobrevivente de Raccoon City e agente especial do governo; Jake Muller, filho ilegítimo de Albert Wesker e associado de Sherry Birkin; e Ada Wong, uma agente solitária com ligações aos ataques bio-terroristas pela Neo-Umbrella.\n\n\t\t\t\tO conceito do jogo começou em 2009, mas começou a ser produzido no ano seguinte sobre a supervisão de Hiroyuki Kobayashi, que já tinha produzido Resident Evil 4. A equipa de produção acabou por crescer e tornou-se na maior de sempre a trabalhar num jogo da série Resident Evil.\n\n\t\t\t\tResident Evil 6 recebeu reacções negativas aquando do lançamento da demo devido aos problemas nos controlos e criticas muito diversas devido à mudança drástica da jogabilidade encontrada na versão final do jogo, sendo um ponto de elogio e também de critica nas diferentes análises.\n\n\t\t\t\tApesar de não ter sido bem recebido tanto pela imprensa especializada como pelos jogadores, a Capcom editou mais de 4,5 milhões de cópias e Resident Evil 6 tornou-se o jogo da série que mais vendeu inicialmente.',\n\n\t\t\t\t'Os acontecimentos deste jogo passam-se duzentos anos depois da, já quase esquecida, crise de Oblivion, no ano 201 da quarta era (4E 201) na província de Skyrim, no norte de Tamriel, e 30 anos após a mais recente Grande Guerra, onde Thalmors e Humanos lutaram arduamente, mas que quase extinguiu os humanos de Tamriel, e para evitar tal derrota, acordaram com os Thalmors, rendendo duas forças e sujeitando-se as suas exigências.\n\t\t\t\tSkyrim é a terra natal de um povo bravo chamados de Nords (nórdicos), onde além da Grande Guerra, irrompeu uma guerra civil após o assassinato do Alto Rei de Skyrim, Torygg. E diante de todas estas guerras e problemas, a província se encontra dividida: de um lado se quer a separação do Império que agora está em ruínas, e do outro lado se quer permanecer leal.', \n\t\t\t\t'Tomb Raider é uma série de jogos, histórias em quadrinhos e filmes tendo como protagonista a personagem Lara Croft. Desde o lançamento do primeiro Tomb Raider, em 1996, as séries tiveram um grande lucro e Lara transformou-se num dos principal ícone da indústria de video-jogos/vídeo games. O Guiness Book reconheceu Lara Croft como \"a heroína de video-jogo/vídeo game mais bem sucedida\" em 2006.\n\n\t\t\t\tSeis jogos da série foram desenvolvidos pela Core Design, e os três últimos pela Crystal Dynamics. Todos os jogos foram publicados pela Eidos Interactive, que mantém os direitos dos personagens e a marca registrada de Tomb Raider. Para o cinema, Lara Croft: Tomb Raider e Lara Croft Tomb Raider: The Cradle of Life foram produzidos, estrelando a atriz americana Angelina Jolie como Lara Croft. Todos os jogos Tomb Raider venderam mais de 30 milhões de unidades, fazendo uma das séries de video jogos mais vendidas de todos os tempos.'];\n\n\t\t\t\tfor ($i=0; $i < count($nomes_jogos); $i++) { \n\n\t\t\t\t\t$dados = [\n\t\t\t\t\t\t'nome_jogo' => $nomes_jogos[$i],\n\t\t\t\t\t\t'desenvolvedor' => $desenvolvedor[$i],\n\t\t\t\t\t\t'plataformas' => $plataformas[$i],\n\t\t\t\t\t\t'lancamento' => $lancamento[$i],\n\t\t\t\t\t\t'genero' => $genero[$i],\n\t\t\t\t\t\t'modo_de_jogo' => $modo_de_jogo[$i],\n\t\t\t\t\t\t'classificacao' => $classificacao[$i],\n\t\t\t\t\t\t'descricao' => $descricao[$i]\n\t\t\t\t\t];\n\n\t\t\t\t\tDB::table('ficha_tecnica')->insert($dados);\n\n\t\t\t\t}\n\n }",
"public function run()\n {\n //\n $tipos = [\n '0' => [\n 'nombre' => 'CONTROL DE PLAGAS BASICO SIN ROEDORES'\n ],\n '1' => [\n 'nombre' => 'CONTROL DE PLAGAS BASICO Y ROEDORES'\n ],\n '2' => [\n 'nombre' => 'CONTROL SOLO ROEDORES' \n ],\n '3' => [\n 'nombre' => 'CONTROL INSECTOS RASTREROS'\n ],\n '4' => [\n 'nombre' => 'CONTROL INSECTOS VOLADORES'\n ],\n '5' => [\n 'nombre' => 'CONTROL CHINCHES'\n ],\n '6' => [\n 'nombre' => 'CONTROL GARRAPATAS'\n ],\n '7' => [\n 'nombre' => 'CONTROL PULGAS'\n ],\n '8' => [\n 'nombre' => 'CONTROL TERMITAS'\n ],\n '9' => [\n 'nombre' => 'CONTROL ABEJAS'\n ],\n '10' => [\n 'nombre' => 'CONTROL AVISPAS'\n ],\n '11' => [\n 'nombre' => 'DESINFECCION'\n ],\n '12' => [\n 'nombre' => 'ESPOLVOREO ELECTRICO'\n ],\n '13' => [\n 'nombre' => 'NEBULIZACION'\n ],\n '14' => [\n 'nombre' => 'TERMONEBULIZACION'\n ],\n '15' => [\n 'nombre' => 'GASIFICACION'\n ],\n '16' => [\n 'nombre' => 'RETIRO DE RESIDUOS / DESCARPADO'\n ],\n '17' => [\n 'nombre' => 'INSTALACION ESTACIONES ROEDOR'\n ],\n '18' => [\n 'nombre' => 'CONTROL DE PLAGAS EN ZONAS COMUNES'\n ],\n '19' => [\n 'nombre' => 'CONTROL EN CASAS Y/O APARTAMENTOS'\n ],\n '20' => [\n 'nombre' => 'CONTROL EN CAJAS DE ALCANTARILLA'\n ],\n '21' => [\n 'nombre' => 'RUTA LAMPARAS CONTROL INSECTOS VOLADORES'\n ],\n '22' => [\n 'nombre' => 'RUTA ESTACIONES CONTROL ROEDORES'\n ],\n '22' => [\n 'nombre' => 'CONTROL CARACOLES'\n ],\n '23' => [\n 'nombre' => 'CONTROL DE PLAGAS BASICO RESIDENCIAL'\n ]\n ];\n\n DB::table('tipo_servicios')->insert($tipos);\n }",
"public function index(){\n //crea un arreglo y pone como dato lo que se va a mostrar en la vista \n $noticias = $this->noticia_modelo->traerParte(0,15);\n $datos = [\n 'titulo' => 'NotiFalso',\n 'noticias' => $noticias\n ];\n //inicia la vista \n $this->vista('paginas/inicio',$datos);\n }",
"function setCobrar($tarjeta1,$tarjeta2,$tarjeta3,$tarjeta4,$tarjeta5,$partida){\n\t$tarjetas=array(0=>$tarjeta1,1=>$tarjeta2,2=>$tarjeta3,3=>$tarjeta4,4=>$tarjeta5);\n\t$tarjeta_cambio;\n\t$veces_entre_foreach=0;\n\t$cantidad=0;\n\t\t\t//pregunta si el usuario saco tarjeta en la ronda, si no saco no puede cambiar ninguna de las que ya tiene(por esto ese if)\n\tif($partida->turno_usuario->getSaqueTarjeta() == 1){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tforeach($tarjetas as $tarjeta){\n\t\t\t\tif($tarjeta == 1){\n\t\t\t\t\tif($partida->turno_usuario->getTarjeta($veces_entre_foreach)!=NULL ){\n\t\t\t\t\t\t\t//solamente puede tomar una tarjeta, porque es cobrar, si hay mas de una seleccionadada cantidad de hace mas de 1 y el cambio no se realiza\n\t\t\t\t\t\tif($cantidad < 1){\n\t\t\t\t\t\t\t\t//digo que la tarjeta que esta en la posicion $avanzar_arreglo del usuario fue seleccionada\n\t\t\t\t\t\t\t$tarjeta_cambio=$partida->turno_usuario->getTarjeta($veces_entre_foreach);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$cantidad++;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\t$veces_entre_foreach++;\n\t\t\t}//foreach($tarjetas as $tarjeta){\n\t\t\t\n\t\t\t\t//si se selecciono una y solo una tarjeta\n\t\t\tif($cantidad == 1){\n\t\t\t\t\t//compruebo si la tarjeta esta en estado de ser cambiada\n\t\t\t\tif($tarjeta_cambio->getEstado() == 0 ){\n\t\t\t\t\t\t\n\t\t\t\t\t$id_pais=$tarjeta_cambio->getIdPais();\n\t\t\t\t\t\t//recorro todos los paises \n\t\t\t\t\tforeach($partida->paises as $pais){\t\n\t\t\t\t\t\t\t//compruebo si id del usuario en turno es igual al del propietario del pais que selecciona el foreach Y aparte compruebo que \n\t\t\t\t\t\t\t//el pais al que hace referencia la tarjeta sea el seleccionado por el foreach\n\t\t\t\t\t\tif($id_pais == $pais->getId() && $partida->turno_usuario->getId() == $pais->getPropietario()->getId() )\t{\n\t\t\t\t\t\t\t\t//cambio el estado de la tarjeta\n\t\t\t\t\t\t\t$tarjeta_cambio->setEstado(1);\n\t\t\t\t\t\t\t\t//le entrego al pais al que hace referencia 2 fichas\n\t\t\t\t\t\t\t$pais->setFichas(2);\n\t\t\t\t\t\t\t\t//reseteo el saco tarjeta, para que en la misma ronda no pueda cobrar dos tarjetas\n\t\t\t\t\t\t\t$partida->turno_usuario->setSaqueTarjetaReset();\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//if($cantidad == 1){\n\t\t\t\n\t}//if($partida->turno_usuario->getSaqueTarjeta() == 1){\t\n}",
"function dgd_testes_de_resistencia($nivel);",
"function motivoDeAnulacionAsig(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNAS' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}",
"function Linha(){\n\t\tswitch ($this->intBanco){\n\t\t\tcase INT_SQLSERVER:\n\t\t\t\t$this->rs = mssql_fetch_array($this->cursor);\n\t\t\t\t$a1 = $this->rs;\n\t\t\t\tbreak;\n\t\t\tcase INT_ORACLE:\n\t\t\t\t$a1 = oci_fetch_array ($this->cursor, OCI_BOTH);\n\t\t\t\t$this->rs = $a1;\n\t\t\t\tif ($this->rs == false){\n\t\t\t\t\t$this->liberaStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INT_POSTGRE:\n\t\t\t\t$this->rs = pg_fetch_array($this->cursor);\n\t\t\t\t$a1 = $this->rs;\n\t\t\t\tbreak;\n\t\t\tcase INT_MYSQL:\n\t\t\t\t$this->rs = mysql_fetch_array($this->cursor, MYSQL_BOTH);\n\t\t\t\t$a1 = $this->rs;\n\t\t\t\tbreak;\n\t\t}\n\t\t//echo \"Cria Linha <br />\";\n\t\treturn $a1;\n\t}",
"protected function creamosLienzo($ancho,$alto){\r\n\t\t$this->lienzoNuevaImagen=imagecreatetruecolor($ancho,$alto);\r\n\t}",
"public function passaAtributo(){\n\t\t$this->seletor = 0; // Por algum motivo que não quero investigar, a condicional for nñao está se comportando como eu esperava. Por isso estou usando while\n\t\t$this->alvo = file_get_contents($this->alvo);\n\t\t\twhile ($this->seletor < $this->atributos) { \n\n\t\t\t\t\t\t\t\t$dom = new DOMDocument();\n\t\t\t\t\t\t\t\t$dom->loadHTMLFile($this->modelo);\n\t\t\t\t\t\t\t\t$controle = 0; // Variável de controle\n\t\t\t\t\t\t\t\t// Consultando os links\n\t\t\t\t\t\t\t\t$links = $dom->getElementsByTagName($this->valores[$this->seletor]); // Seleione a tag de pesquisa atual\n\t\t\t\t\t\t\t\tforeach ($links as $link) {\n\t\t\t\t\t\t\t\t\t\t\t\tif ($controle == 0) { // Pega primeiro valor da class e assume como padrão (uma por tag)\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->tag = $this->valores[$this->seletor];\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->class = $link->getAttribute('class'); // Retorna tag do HTML com a nova class\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->alvo = str_replace(\"<$this->tag\", \"<$this->tag class='$this->class' \", $this->alvo);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t$controle++;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t/*echo \"<p>Executando...\".$this->valores[$this->seletor].\"\"; */\n\t\t\t\t$this->seletor++;\n\t\t\t}\n\t\t\techo \"<p>\".$this->alvo;\n\n\n\t}",
"public function id_tarjeta();",
"function cariPosisi($batas){\nif(empty($_GET['halpengumuman'])){\n\t$posisi=0;\n\t$_GET['halpengumuman']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengumuman']-1) * $batas;\n}\nreturn $posisi;\n}",
"function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\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 }",
"function cl_bensetiquetaimpressa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"bensetiquetaimpressa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function videoconferenciaLlamando( ) {\n $this->setComando(\"LLAMANDO\");\n }",
"public function obtener_colectivo();",
"function barra($nombre, $porcentaje) {\n $ancho = 1;\n\n //LARGO MÍNIMO\n $largo = 10;\n ?>\n <table width=\"50%\" border=\"1\" cellpadding=\"1\" cellspacing=\"0\" bordercolor=\"#E9E9E9\">\n <tr id=\"trtitulogris\">\n <td colspan=\"2\"><?php echo $nombre; ?></td>\n </tr>\n <tr>\n <td width=\"70%\"><img src=\"../../../../imagenes/punto.gif\" height=\"<?php echo $largo ?>\" width=\"<?php echo $porcentaje ?>%\" style=\"color:#FEF7ED\"></td>\n <td width=\"30%\"><?php echo round($porcentaje, 1) . \" %\"; ?></td>\n </tr>\n </table>\n <br>\n <?php\n }",
"public function alimentar()\n {\n }",
"function cl_sau_triagemavulsa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_triagemavulsa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function metodo() {\n // Funcion normal\n }",
"function inc_lien_dist($lien, $texte='', $class='', $title='', $hlang='', $rel='', $connect='', $env=array()) {\n\tstatic $u=null;\n\tif (!$u) $u=url_de_base();\n\t$typo = false;\n\n\t// Si une langue est demandee sur un raccourci d'article, chercher\n\t// la traduction ;\n\t// - [{en}->art2] => traduction anglaise de l'article 2, sinon art 2\n\t// - [{}->art2] => traduction en langue courante de l'art 2, sinon art 2\n\t// s'applique a tout objet traduit\n\tif ($hlang\n\tAND $match = typer_raccourci($lien)) { \n\t\t@list($type,,$id,,$args,,$ancre) = $match; \n\t\tif ($id_trad = sql_getfetsel('id_trad', 'spip_articles', \"id_article=$id\")\n\t\tAND $id_dest = sql_getfetsel('id_article', 'spip_articles',\n\t\t\t\"id_trad=$id_trad AND lang=\" . sql_quote($hlang))\n\t\t)\n\t\t\t$lien = \"$type$id_dest\";\n\t\telse\n\t\t\t$hlang = '';\n\t}\n\n\t$mode = ($texte AND $class) ? 'url' : 'tout';\n\t$lien = calculer_url($lien, $texte, $mode, $connect);\n\tif ($mode === 'tout') {\n\t\t$texte = $lien['titre'];\n\t\tif (!$class AND isset($lien['class'])) $class = $lien['class'];\n\t\t$lang = isset($lien['lang']) ?$lien['lang'] : '';\n\t\t$mime = isset($lien['mime']) ? \" type='\".$lien['mime'].\"'\" : \"\";\n\t\t$lien = $lien['url'];\n\t}\n\n\t$lien = trim($lien);\n\tif (strncmp($lien,\"#\",1) == 0) # ancres pures (internes a la page)\n\t\t$class = 'spip_ancre';\n\telseif (strncasecmp($lien,'mailto:',7)==0) # pseudo URL de mail\n\t\t$class = \"spip_mail\";\n\telseif (strncmp($texte,'<html>',6)==0) # cf traiter_lien_explicite\n\t\t$class = \"spip_url spip_out\";\n\telseif (!$class) $class = \"spip_out\"; # si pas spip_in|spip_glossaire\n\n\t// Si l'objet n'est pas de la langue courante, on ajoute hreflang\n\tif (!$hlang AND $lang!==$GLOBALS['spip_lang'])\n\t\t$hlang = $lang;\n\n\t$lang = ($hlang ? \" hreflang='$hlang'\" : '');\n\n\tif ($title) $title = ' title=\"'.attribut_html($title).'\"';\n\n\t// rel=external pour les liens externes\n\tif ((strncmp($lien,'http://',7)==0 OR strncmp($lien,'https://',8)==0)\n\t AND strncmp(\"$lien/\", $u ,strlen($u))!=0)\n\t\t$rel = trim(\"$rel external\");\n\tif ($rel) $rel = \" rel='$rel'\";\n\n\t// si pas de modele dans le texte du lien, on peut juste passer typo sur le texte, c'est plus rapide\n\t// les rares cas de lien qui encapsule un modele passe en dessous, c'est plus lent\n\tif (traiter_modeles($texte, false, '', $connect, null, $env)==$texte){\n\t\t$texte = typo($texte, true, $connect, $env);\n\t\t$lien = \"<a href=\\\"\".str_replace('\"', '"', $lien).\"\\\" class='$class'$lang$title$rel$mime>$texte</a>\";\n\t\treturn $lien;\n\t}\n\t# ceci s'execute heureusement avant les tableaux et leur \"|\".\n\t# Attention, le texte initial est deja echappe mais pas forcement\n\t# celui retourne par calculer_url.\n\t# Penser au cas [<imgXX|right>->URL], qui exige typo('<a>...</a>')\n\t$lien = \"<a href=\\\"\".str_replace('\"', '"', $lien).\"\\\" class='$class'$lang$title$rel$mime>$texte</a>\";\n\treturn typo($lien, true, $connect, $env);\n}",
"function cariPosisi($batas){\nif(empty($_GET['halgalerifoto'])){\n\t$posisi=0;\n\t$_GET['halgalerifoto']=1;\n}\nelse{\n\t$posisi = ($_GET['halgalerifoto']-1) * $batas;\n}\nreturn $posisi;\n}",
"public function hola1()\n {\n \n $prueba = UsuarioController::index();\n echo $prueba;\n\n /*\n $arr = [\n 'insert'=>true,\n 'update'=>false,\n 'delete'=>true,\n 'view'=>false\n ];\n $res = $this->hola2($arr);\n echo $res;*/\n }",
"function cariPosisi($batas){\nif(empty($_GET['halvideo'])){\n\t$posisi=0;\n\t$_GET['halvideo']=1;\n}\nelse{\n\t$posisi = ($_GET['halvideo']-1) * $batas;\n}\nreturn $posisi;\n}",
"function salva($vls){\n//sleep(2)tempo de espera de enivio da requisição;\n$mensagens = [];\n$contem_erros = false;\nif ($vls['descri'] == '') {\n\t$contem_erros = true;\n\t$mensagens['descri'] = 'A descrição está em branco';\n}\n\nif ($vls['marca'] == '') {\n\t$contem_erros = true;\n\t$mensagens['marca'] = 'A marca está em branco';\n}\nif ($vls['modelo'] == '') {\n $erros = true;\n $mensagens['modelo'] = \"O modelo esta em branco\";\n}\nif ($vls['tipov'] == '') {\n\t$contem_erros = true;\n\t$mensagens['tipov'] = 'O tipo de veículo está em branco';\n}\n\nif ($vls['quantp'] == '') {\n\t$contem_erros = true;\n\t$mensagens['quantp'] = 'A quantidade de passageiros está em branco';\n}\nif ($vls['vlvenda'] == '') {\n $erros = true;\n $mensagens['vlvenda'] = \"O valor de venda está em branco\";\n}\nif ($vls['vlcompra'] == '') {\n\t$contem_erros = true;\n\t$mensagens['vlcompra'] = 'O valor de compra está em branco';\n}\n\nif ($vls['dtcompra'] == '') {\n\t$contem_erros = true;\n\t$mensagens['dtcompra'] = 'A data de compra está em branco';\n}\nif ($vls['estato'] == '') {\n $erros = true;\n $mensagens['estato'] = \"O status do veículo esta em branco\";\n}\n if (! $contem_erros) {//se não conter erros executara o inserir\n $id = null;\n $campos = \"`id_car`, `descricao`, `marca`, `modelo`, `tipov`, `qntpass`, `vlvenda`, `vlcompra`, `datcompra`, `estato`\";\n $sql = \"INSERT INTO `carro` ($campos) VALUES (:id, :descri, :marca, :modelo, :tipov, :quantp, :vlvenda, :vlcompra, :dtcompra, :estato)\";\n $rs = $this->db->prepare($sql);\n$rs->bindParam(':id', $id , PDO::PARAM_INT);\n$rs->bindParam(':descri', $vls['descri'] , PDO::PARAM_STR);\n$rs->bindParam(':marca', $vls['marca'] , PDO::PARAM_STR);\n$rs->bindParam(':modelo', $vls['modelo'] , PDO::PARAM_STR);\n$rs->bindParam(':tipov', $vls['tipov'] , PDO::PARAM_STR);\n$rs->bindParam(':quantp', $vls['quantp'] , PDO::PARAM_STR);\n$rs->bindParam(':vlvenda', $vls['vlvenda'] , PDO::PARAM_STR);\n$rs->bindParam(':vlcompra', $vls['vlcompra'] , PDO::PARAM_STR);\n$rs->bindParam(':dtcompra', $vls['dtcompra'] , PDO::PARAM_STR);\n$rs->bindParam(':estato', $vls['estato'] , PDO::PARAM_STR);\n\n$result = $rs->execute();\n\n\nif ($result) {\n //passando vetor em forma de json\n $mensagens['sv'] = \"salvo com sucesso!\";\n \t echo json_encode([\n \t 'mensagens' => $mensagens,\n \t 'contem_erros' => false\n \t ]);//chama a funçaõ inserir na pagina acao.php\n\n }\n }else {\n\t// temos erros a corrigir\n\techo json_encode([\n\t\t'contem_erros' => true,\n\t\t'mensagens' => $mensagens\n\t]);\n}\n}",
"function exec_suivi() {\n\t$id_auteur = (int) _request('id_auteur');\n\t$id_article = (int) _request('id_article');\n\t$nouv_auteur = (int) _request('nouv_auteur');\n\t$contexte = array();\n\t$idper = '';\n\t$nom = '';\n\t$prenom = '';\n\t$statutauteur = '6forum';\n\t$inscrit = '';\n\t$statutsuivi = '';\n\t$date_suivi = '';\n\t$heure_suivi = '';\n\n\t//Addon fields\n\t$sante_comportement = '';\n\t$alimentation = '';\n\t$remarques_inscription = '';\n\t$ecole = '';\n\t$places_voitures = '';\n\t$brevet_animateur = '';\n\t$historique_payement = '';\n\t$extrait_de_compte = '';\n\t$statut_payement = '';\n\t$tableau_exception = '';\n\t$recus_fiche_medical = '';\n $facture = '';\n $adresse_facturation = '';\n\n\n\t//----------- lire DB ---------- AND id_secteur=2\n\t$req = sql_select('id_article,idact,titre,date_debut', 'spip_articles', \"id_article=$id_article\");\n\tif ($data = sql_fetch($req)) {\n $idact = $data['idact'];\n\t\t$titre = $data['titre'];\n $date_debut = $data['date_debut'];\n\t}\n\telse\n\t\t$id_article = 0;\n\n\t$req = sql_select('*', \n \"spip_auteurs AS A LEFT JOIN spip_auteurs_articles AS S ON S.id_auteur=$id_auteur AND S.id_article=$id_article AND S.inscrit<>''\", \"A.id_auteur=$id_auteur\");\n\tif ($data = sql_fetch($req)) {\n\t\t$idper = $data['idper'];\n\t\t$nom = $data['nom'];\n\t\t$prenom = $data['prenom'];\n\t\t$statutauteur = $data['statut'];\n\t\tif ($data['inscrit']) {\n\t\t\t$inscrit = 'Y';\n\t\t\t$statutsuivi = $data['statutsuivi'];\n\t\t\t$date_suivi = $data['date_suivi'];\n\t\t\t$heure_suivi = $data['heure_suivi'];\n\n\t\t\t$sante_comportement = $data['sante_comportement'];\n\t\t\t$alimentation = $data['alimentation'];\n\t\t\t$remarques_inscription = $data['remarques_inscription'];\n\t\t\t$ecole = $data['ecole'];\n\t\t\t$places_voitures = $data['places_voitures'];\n\t\t\t$brevet_animateur = $data['brevet_animateur'];\n\t\t\t$historique_payement = $data['historique_payement'];\n\t\t\t$extrait_de_compte = $data['extrait_de_compte'];\n\t\t\t$statut_payement = $data['statut_payement'];\n\t\t\t$tableau_exception = $data['tableau_exception'];\n\t\t\t$recus_fiche_medical = $data['recus_fiche_medical'];\n\t\t\t$prix_special = $data['prix_special'];\n $facture = $data['facture'];\n $adresse_facturation = $data['adresse_facturation'];\n\t\t}\n\t}\n\telse\n\t\t$id_auteur = 0;\n\n\t//-------- form soumis -----------\n\tif (_request('okconfirm') && $id_article && ($id_auteur || $nouv_auteur))\n\t\tif ($GLOBALS['connect_statut']!='0minirezo' || ! autoriser('modifier', 'article', $id_article))\n\t\t\t$contexte['message_erreur'] = 'Autorisation refusée';\n\t\telse {\n\t\t\t$statutsuivi = _request('statutsuivi');\n\t\t\t$date_suivi = _request('date_suivi');\n\t\t\t$heure_suivi = _request('heure_suivi');\n \n $sante_comportement = _request('sante_comportement');\n $alimentation = _request('alimentation');\n $remarques_inscription = _request('remarques_inscription');\n $ecole = _request('ecole');\n $places_voitures = _request('places_voitures');\n $brevet_animateur = _request('brevet_animateur');\n $extrait_de_compte = _request('extrait_de_compte');\n $historique_payement = str_replace(',', '.', _request('historique_payement'));\n $statut_payement = _request('statut_payement');\n $tableau_exception = _request('tableau_exception');\n $recus_fiche_medical = _request('recus_fiche_medical');\n $prix_special = _request('prix_special');\n $facture = _request('facture');\n $adresse_facturation = _request('adresse_facturation');\n\n\t\t\tinclude_spip('inc/date_gestion');\n\t\t\t$contexte['erreurs'] = array();\n\t\t\tif (@verifier_corriger_date_saisie('suivi', false, $contexte['erreurs']))\n\t\t\t\t$date_suivi = substr($date_suivi, 6, 4).'-'.substr($date_suivi, 3, 2).'-'.substr($date_suivi, 0, 2);\n\t\t\telse\n\t\t\t\t$contexte['message_erreur'] = 'Erreur';\n\n\t\t\tif (! $contexte['message_erreur'])\n\t\t\t\tif ($nouv_auteur) {\n\t\t\t\t\t$req = sql_select('A.id_auteur,id_article',\"spip_auteurs AS A LEFT JOIN spip_auteurs_articles AS S ON S.id_auteur=$nouv_auteur AND S.id_article=$id_article\", \"A.id_auteur=$nouv_auteur\");\n\t\t\t\t\tif ($data = sql_fetch($req)) {\n\t\t\t\t\t\t$id_auteur = $data['id_auteur'];\n\t\t\t\t\t\tif (! $data['id_article'])\n\t\t\t\t\t\t\tsql_insertq('spip_auteurs_articles', array('id_auteur'=>$id_auteur, 'id_article'=>$id_article, 'inscrit'=>'Y'));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$contexte['message_erreur'] = 'Erreur';\n\t\t\t\t\t\t$contexte['erreurs']['nouv_auteur'] = 'auteur ID inconnu';\n\t\t\t\t\t\t$id_auteur = 0;\n\t\t\t\t\t\t$inscrit = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif ($id_auteur && ! $contexte['message_erreur']) {\n\t\t\t\tsql_updateq('spip_auteurs_articles', \n array(\n \t\t'inscrit'=>'Y', \n \t\t'statutsuivi'=>$statutsuivi, \n \t\t'date_suivi'=>$date_suivi, \n \t\t'heure_suivi'=>$heure_suivi,\n \t'sante_comportement'=>$sante_comportement,\n \t'alimentation'=>$alimentation,\n \t'remarques_inscription'=>$remarques_inscription,\n \t'ecole'=>$ecole,\n \t'brevet_animateur'=>$brevet_animateur,\n \t'places_voitures'=>$places_voitures,\n \t'extrait_de_compte' => $extrait_de_compte,\n \t'historique_payement' => $historique_payement,\n \t'statut_payement' => $statut_payement,\n \t'tableau_exception' => $tableau_exception,\n \t'recus_fiche_medical' => $recus_fiche_medical,\n \t'prix_special' => $prix_special,\n 'facture' => $facture,\n 'adresse_facturation' => $adresse_facturation\n ), \"id_auteur=$id_auteur AND id_article=$id_article\");\n\n // On fait l'update de la date_validation via sql_update plutôt que sql_updateq.\n sql_update('spip_auteurs_articles', array('date_validation' => 'NOW()'), 'id_auteur='.sql_quote($id_auteur).' AND id_article='.sql_quote($id_article));\n\t\t\t\t$contexte['message_ok'] = 'Ok, l\\'inscription est mise à jour';\n\t\t\t\t$inscrit = 'Y';\n\n /*\n * Si c'est une nouvelle inscription faite par un admin, on envoie un mail\n */\n if (_request('new') == 'oui') {\n $p = 'Bonjour,'.\"\\n\\n\".'Voici une nouvelle inscription :'.\"\\n\\n\";\n $p .= 'Sexe : '.$data['codecourtoisie'].\"\\n\";\n $p .= 'Prénom : '.$prenom.\"\\n\";\n $p .= 'Nom : '.$nom.\"\\n\";\n $p .= 'e-mail : '.$data['email'].\"\\n\";\n $p .= 'Date naissance : '.$data['date_naissance'].\"\\n\";\n $p .= 'Lieu naissance : '.$data['lieunaissance'].\"\\n\";\n \n $p .= 'Adresse : '.$data['adresse'].\"\\n\";\n $p .= 'No : '.$data['adresse_no'].\"\\n\";\n $p .= 'Code postal : '.$data['codepostal'].\"\\n\";\n $p .= 'Localité : '.$data['localite'].\"\\n\";\n $p .= 'Téléphone : '.$data['tel1'].\"\\n\";\n $p .= 'GSM : '.$data['gsm1'].\"\\n\";\n $p .= 'Fax : '.$data['fax1'].\"\\n\";\n \n $p .= \"\\n*******\\n\\n\";\n \n $p .= 'Études en cours et établissement : '.$data['etude_etablissement'].\"\\n\";\n $p .= 'Profession : '.$data['profession'].\"\\n\";\n $p .= 'Demandeur d’emploi : '.$data['demandeur_emploi'].\"\\n\";\n $p .= 'Membre d’une association : '.$data['membre_assoc'].\"\\n\";\n $p .= 'Pratique : '.$data['pratique'].\"\\n\";\n $p .= 'Formations : '.$data['formation'].\"\\n\";\n $p .= 'Facture : '.$data['facture'].\"\\n\";\n $p .= 'Adresse de facturation : '.$data['adresse_facturation'].\"\\n\";\n $p .= 'Régime alimentaire : '.$alimentation.\"\\n\";\n $p .= 'Places dans votre voiture : '.$places_voitures.\"\\n\";\n $p .= 'Brevet d’animateur : '.$brevet_animateur.\"\\n\";\n $p .= 'Remarques : '.$remarques_inscription.\"\\n\";\n \n $p .= \"\\n*******\\n\\n\";\n \n $p .= 'id_auteur : '.$id_auteur.\"\\n\";\n $p .= 'Statut : '.$statutsuivi.\"\\n\";\n $p .= 'Action : '.$titre.\"\\n\";\n $p .= 'Dates : '.$date_debut.\"\\n\";\n $p .= 'id_article : '.$id_article.\"\\n\";\n $p .= \"\\n\".'-----'.\"\\n\";\n\n\n $envoyer_mail = charger_fonction('envoyer_mail','inc');\n \n $p = $envoyer_mail(\n $GLOBALS['meta']['email_webmaster'].', [email protected]',\n $GLOBALS['meta']['nom_site'].' : nouvelle inscription '.$data['idact'].'-'.$id_auteur, \n $p,\n $GLOBALS['meta']['email_webmaster']);\n \n }\n\n\n\t\t\t\tinclude_spip('inc/headers');\n\t\t\t\tredirige_par_entete(parametre_url('?exec=articles', 'id_article', $id_article, '&'));\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\t//-------- desinscrire -----------\n\tif (_request('noinscr') && $id_article && $id_auteur)\n\t\tif ($GLOBALS['connect_statut']!='0minirezo' || ! autoriser('modifier', 'article', $id_article))\n\t\t\t$contexte['message_erreur'] = 'Autorisation refusée';\n\t\telse {\n\t\t\tif ($statutauteur == '6forum')\n\t\t\t\tsql_delete('spip_auteurs_articles', \"id_auteur=$id_auteur AND id_article=$id_article\");\n\t\t\telse\n\t\t\t\tsql_updateq('spip_auteurs_articles', array('inscrit'=>''), \"id_auteur=$id_auteur AND id_article=$id_article\");\n\t\t\t$inscrit = '';\n\t\t\t$contexte['message_ok'] = 'Ok, la désinscription est faite';\n\t\t\tinclude_spip('inc/headers');\n\t\t\tredirige_par_entete(parametre_url('?exec=articles', 'id_article', $id_article, '&'));\n\t\t\texit();\n\t\t}\n\n\t//--------- page + formulaire ---------\n\t\t$commencer_page = charger_fonction('commencer_page', 'inc');\n\t\techo $commencer_page('Suivi des inscriptions', '', '');\n\n\t\techo '<br />',gros_titre('Suivi des inscriptions');\n\n\t\techo debut_gauche('', true);\n\t\techo debut_boite_info(true);\n\t\techo 'Suivi des inscriptions<br /><br />Explications',\"\\n\";\n\t\techo fin_boite_info(true);\n\n\t\techo debut_droite('', true);\n\n\t\tinclude_spip('fonctions_gestion_cemea');\n\t\tinclude_spip('prive/gestion_update_db');\n\n\t\techo debut_cadre_relief('', true, '', '');\n\n\t\t$contexte['id_article'] = $id_article;\n\t\t$contexte['id_auteur'] = $id_auteur;\n\t\t$contexte['idact'] = $idact;\n\t\t$contexte['titre'] = $titre;\n\t\t$contexte['idper'] = $idper;\n\t\t$contexte['nom'] = $nom;\n\t\t$contexte['prenom'] = $prenom;\n\t\t$contexte['inscrit'] = $inscrit;\n\t\t$contexte['statutsuivi'] = $statutsuivi;\n\t\t$contexte['date_suivi'] = $date_suivi;\n\t\t$contexte['heure_suivi'] = $heure_suivi;\n\n\t\t$contexte['sante_comportement'] = $sante_comportement;\n\t\t$contexte['alimentation'] = $alimentation;\n\t\t$contexte['remarques_inscription'] = $remarques_inscription;\n\t\t$contexte['ecole'] = $ecole;\n\t\t$contexte['places_voitures'] = $places_voitures;\n\t\t$contexte['brevet_animateur'] = $brevet_animateur;\n\t\t$contexte['extrait_de_compte'] = $extrait_de_compte;\n\t\t$contexte['historique_payement'] = str_replace('.', ',', $historique_payement);\n\t\t$contexte['statut_payement'] = $statut_payement;\n\t\t$contexte['tableau_exception'] = $tableau_exception;\n\t\t$contexte['recus_fiche_medical'] = $recus_fiche_medical;\n\t\t$contexte['prix_special'] = $prix_special;\n $contexte['facture'] = $facture;\n $contexte['adresse_facturation'] = $adresse_facturation;\n\n\t\t$contexte['editable'] = ' ';\n\n\t\t$milieu = recuperer_fond(\"prive/form_suivi\", $contexte);\n\t\techo pipeline('editer_contenu_objet',array('args'=>array('type'=>'auteurs_article','contexte'=>$contexte),'data'=>$milieu));\n\n\t\techo fin_cadre_relief(true);\n\t\techo fin_gauche();\n\t\techo fin_page();\n}",
"function Resumen() {\r\n\t\t/*RGB begin*/\r\n\t\tglobal $variables;\r\n\t\tif (!$variables)\r\n\t\t{\r\n\t\t\tchangeVariables();\r\n\t\t\t$variables = 1;\r\n\t\t}\r\n\t\t/*RGB end*/\r\n\t\r\n\t\tglobal $mis_puntos, $wcag1, $lst_A, $lst_AA, $lst_AAA, $resultados, $lang;\r\n\t\t$resultados = array();\r\n\t\t$letras = array('A' => 'lst_A', 'AA' => 'lst_AA', 'AAA' => 'lst_AAA');\r\n\r\n\t\tforeach ($letras as $p => $arr) {\r\n\t\t\tforeach ($$arr as $k => $v) {\r\n\t\t\t\tif (array_key_exists($v, $wcag1)) {\r\n\t\t\t\t\t$x = $p.$mis_puntos[$v];\r\n\t\t\t\t}\r\n\t\t\t\t/*RGB begin*/\r\n\t\t\t\tif($_SESSION['emag'] == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($v != 53 && $v != 56 && $v != 92 && $v != 72)\r\n\t\t\t\t\t\t$resultados[$x]++;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t$resultados[$x]++;\r\n\t\t\t\t/*RGB end*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->t_duda = $resultados['Aduda'] + $resultados['AAduda'] + $resultados['AAAduda'];\r\n\t\t$this->t_mal = $resultados['Amal'] + $resultados['AAmal'] + $resultados['AAAmal'];\r\n\t\t$this->t_parcial = $resultados['Aparcial'] + $resultados['AAparcial'] + $resultados['AAAparcial'];\r\n\t\t$this->t_nose = $resultados['Anose'] + $resultados['AAnose'] + $resultados['AAAnose'];\r\n\r\n\t\tif ($resultados['Aduda'] + $resultados['Anose'] + $resultados['Aparcial'] + $resultados['Amal'] == 0) {\r\n\t\t\tif ($resultados['AAduda'] + $resultados['AAnose'] + $resultados['AAparcial'] + $resultados['AAmal'] == 0) {\r\n\t\t\t\tif ($resultados['AAAduda'] + $resultados['AAAnose'] + $resultados['AAAparcial'] + $resultados['AAAmal'] == 0) {\r\n\t\t\t\t\t$ico_acc = 'AAA';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$ico_acc = 'AA';\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$ico_acc = 'A';\r\n\t\t\t}\r\n\t\t\t$this->accesibilidad = ' <img src=\"img/her_'.$ico_acc.'.gif\" alt=\"'.sprintf($lang['ico_hera_acc'], $ico_acc).'\" width=\"90\" height=\"30\" style=\"float:right\" />';\r\n\t\t}\r\n\t\t\r\n\t\t$this->myresults = $resultados;\r\n\r\n\t}",
"function lancar_notas_aluno($id_federado){\n //pegar movimentos da faixa candidata\n $dados['aluno']= $this->coordenador->get_aluno_faixa($id_federado);\n \n \n $id_faixa = $dados['aluno']['0']['ordem']+1;\n \n $dados['movimentos'] = $this->coordenador->movimentos($id_faixa);\n $dados['ultimo_evento'] = $this->coordenador->get_ultimo_evento($id_federado);\n \n// $this->funcoes->imprimir($dados['movimentos']);\n $this->load->view('header');\n $this->load->view('/coordenador/lancar_notas_aluno',$dados);\n $this->load->view('footer');\n \n //preparar o prontuário com notas do aluno\n //inclui-lo automáticamente no evento de graduação\n \n }",
"public function lectureContenu ()\n {\n\n //$metadata = simplexml_load_file(\"xmoddledata/metadata.xml\");\n\n // on Vérifie si le cours existe\n\n /* @TODO Partie à décommenter lorsque le module de navigation sera intégré au reste de l'application */\n\n // $nbrCours = $metadata->attributes()->nbrCours;\n // $isFound = false;\n // $i = 0;\n // for ($i = 0; $i < $nbrCours; $i++) {\n // if ($metadata->cours[$i]->attributes()->title == $title && $metadata->cours[$i]->attributes()->id == $id) {\n // $isFound = true;\n // break;\n // }\n // }\n\n // if ($isFound) {\n //$cours = simplexml_load_file(\"xmoddledata/\" . $metadata->cours[$i]->attributes()->id . \"_\" . $metadata->cours[$i]->attributes()->title . \"/description.xml\"); \n\n $description = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/description.xml');\n $notions = simplexml_load_file('xmoddledata/2_ModeleDeSupport2/descriptionNotions.xml');\n\n // Création d'un tableau associatif de notions avec l'id comme clé\n\n $notionsArray = $this->getNotions($notions);\n\n // Construction de la navigation\n $text_parties = \"\";\n $nav_parties = [];\n for ($i = 0; $i < $description->attributes()->nbrParties; $i++) {\n $text_parties = \"<div style='\";\n $text_parties .= $this->getStyle($description->partie[$i]->attributes());\n $text_parties .= \"'\";\n $text_parties .= \" id='\".$i.\"'>\";\n $nav_chapitres = [];\n $text_parties .= $description->partie[$i]->attributes()->title;\n $text_parties .= \"</div>\";\n $text_parties .= \"<br/><br/>\";\n $text_chapitres = \"\";\n for ($j = 0; $j < $description->partie[$i]->attributes()->nbrChapitres; $j++) {\n $text_chapitres .= \"<div style='\";\n $text_chapitres .= $this->getStyle($description->partie[$i]->chapitre[$j]->attributes());\n $text_chapitres .= \"'\";\n $text_chapitres .= \" id='\".$i.\"_\".$j.\"'>\";\n $nav_paragraphes = [];\n $text_chapitres .= $description->partie[$i]->chapitre[$j]->attributes()->title;\n $text_chapitres .= \"</div>\";\n $text_chapitres .= \"<br/><br/>\";\n $text_paragraphes = \"\";\n for ($k = 0; $k < $description->partie[$i]->chapitre[$j]->attributes()->nbrParagraphes; $k++) {\n // On renseigne le titre du paragraphe\n $text_paragraphes .= \"<div style='\";\n $text_paragraphes .= $this->getStyle($description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes());\n $text_paragraphes .= \"'\";\n // Ajout d'un ancre de navigation\n $text_paragraphes .= \" id='\".$i.\"_\".$j.\"_\".$k.\"'>\";\n $text_paragraphes .= $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n $text_paragraphes .= \"</div>\";\n $text_paragraphes .= \"<br/>\";\n // Navigation avec paragraphes\n $nav_paragraphes[\"\".$i.\"_\".$j.\"_\".$k] = $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->title;\n // On remplit les notions contenus dans le paragraphe\n for ($l = 0; $l < $description->partie[$i]->chapitre[$j]->paragraphe[$k]->attributes()->nbrNotions; $l++) {\n $text_paragraphes .= $notionsArray[\"\".$description->partie[$i]->chapitre[$j]->paragraphe[$k]->notion[$l]->attributes()->id];\n }\n }\n $text_chapitres .= $text_paragraphes;\n $nav_chapitres[\"\".$i.\"_\".$j] = $nav_paragraphes;\n }\n $text_parties .= $text_chapitres;\n $nav_parties[\"\".$i] = $nav_chapitres;\n }\n// dd($nav_parties);\n// dd($navigation);\n// dd($description);\n\n // Construction de la page web\n $titre = $description->attributes()->title;\n// dd($description);\n// forearch( $navigation->partie[] as $partie) {\n// dd($pantie);\n// }\n// dd($titre);\n\n\n // $notions = simplexml_load_file(\"../../../fichiersdestructuration/descriptionNotions.xml\");\n\n\n // $nbrNotions = $cours->attributes()->nbrNotions;\n // $notionsConvertis = array();\n // for ($i = 0; $i < $nbrNotions; $i++) {\n // $attributs = $cours->notion[$i]->attributes();\n // $style = \"\";\n // if ($attributs['font-weight'] != null) {\n // $style .= 'font-weight:' . $attributs['font-weight'] . \";\";\n // }\n // if ($attributs['font-size'] != null) {\n // $style .= 'font-size:' . $attributs['font-size'] . \";\";\n // }\n\n // if ($attributs['font-family'] != null) {\n // $style .= 'font-family:' . $attributs['font-family'] . \";\";\n // }\n\n // if ($attributs['color'] != null) {\n // $style .= 'color:' . $attributs['color'] . \";\";\n // }\n\n // if ($attributs['text-decoration'] != null) {\n // $style .= 'text-decoration:' . $attributs['text-decoration'] . \";\";\n // }\n\n // $text = \"\";\n // foreach ($cours->notion[$i]->children() as $child) {\n // $text .= $child->asXML();\n // }\n // $notionHtml = \"<div style='\";\n // $notionHtml .= $style;\n // $notionHtml .= \"'>\";\n // $notionHtml .= $text;\n // $notionHtml .= \"</div>\";\n\n\n // //dd(strval($text));\n // array_push($notionsConvertis, $notionHtml);\n\n // }\n // }else{\n // return view(\"/\");\n // }\n //$notions = $notionsConvertis;\n // return response()->json($notions,200);\n\n // return \"lecture cours\";\n return 0;\n }",
"function 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 matricular(Aluno $a){\n $this->alunos[] = $a;\n \n }",
"private function Llenar()\n {\n \ttry{\n\t \t$resultado = $this->novedades->GetParaWidget(5);\n\t\t\tif($resultado->num_rows > 0){\n\t\t\t\twhile($row = $resultado->fetch_array())\n\t\t {\n\t\t \t//titulo, vinculo //$t = $row[0]; //$v = $row[1];\n\t\t \t$this->Contenido .= \"<li>\" . (strlen($row[0])>35? substr($row[0],0,38) . \"...\": $row[0]) . \"</li>\";\n\t\t }\n\t\t\t\t$resultado->close();\n\t\t\t}\n\t \telse\n\t\t\t\t$this->Contenido -= \"No hay novedades.\";\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\t$this->Contenido .= \"Oooops! al parecer ocurrio algun error interno. Lo sentimos mucho :'( Vuelve a intentarlo en unos minutos!\";\n\t\t}\n $this->Contenido .= \"</ul></div>\";\n }",
"public function getLinha();",
"function cl_conplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function fTraeAuxiliar($pTip, $pCod){\n global $db, $cla, $olEsq;\n $slDato= substr($olEsq->par_Clave,4,2);\n if ($slDato == \"CL\") { // el movimiento se asocia al Cliente\n $iAuxi = $cla->codProv;\n }\n else {\n $iAuxi = NZ(fDBValor($db, \"fistablassri\", \"tab_txtData3\", \"tab_codTabla = '\" . $pTip . \"' AND tab_codigo = '\" . $pCod . \"'\" ),0);\n }\n//echo \"<br>aux\" . $olEsq->par_Clave. \" / \" .$slDato . \" $iAuxi <br>\";\n error_log(\" aux: \" . $iAuxi. \" \\n\", 3,\"/tmp/dimm_log.err\");\t\n return $iAuxi;\n}",
"function cariPosisi($batas){\nif(empty($_GET[halaman])){\n\t$posisi=0;\n\t$_GET[halaman]=1;\n}\nelse{\n\t$posisi = ($_GET[halaman]-1) * $batas;\n}\nreturn $posisi;\n}",
"public function traerTodo()\n {\n }",
"public function traerTodo()\n {\n }",
"public function traerTodo()\n {\n }",
"function cl_escolabase() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"escolabase\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"].\"?ed77_i_escola=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_escola\"].\"&ed18_c_nome=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed18_c_nome\"].\"&ed31_c_descr=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed31_c_descr\"].\"&ed77_i_base=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_base\"]);\n }",
"public function valordelospasajesplus();",
"function cl_conplanoconplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoconplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cariPosisi($batas){\nif(empty($_GET['halpengajar'])){\n\t$posisi=0;\n\t$_GET['halpengajar']=1;\n}\nelse{\n\t$posisi = ($_GET['halpengajar']-1) * $batas;\n}\nreturn $posisi;\n}"
] | [
"0.64588934",
"0.612671",
"0.6120627",
"0.5746031",
"0.5745488",
"0.5739498",
"0.5706695",
"0.56347805",
"0.5622952",
"0.56156737",
"0.56092125",
"0.5597714",
"0.5597302",
"0.5587932",
"0.5587932",
"0.5587777",
"0.5579265",
"0.55693555",
"0.55442125",
"0.5539298",
"0.5539298",
"0.5522325",
"0.55172837",
"0.5506249",
"0.55027497",
"0.5499269",
"0.5493405",
"0.5459275",
"0.5445518",
"0.5443288",
"0.5439399",
"0.5434473",
"0.542248",
"0.5418408",
"0.5408111",
"0.53922504",
"0.53839207",
"0.5356395",
"0.535194",
"0.53486365",
"0.5329733",
"0.5328769",
"0.5322921",
"0.5322293",
"0.53067434",
"0.53031725",
"0.529246",
"0.5292194",
"0.52917445",
"0.52909184",
"0.5287903",
"0.52864563",
"0.5286307",
"0.5284563",
"0.5277718",
"0.52765805",
"0.52763575",
"0.52759945",
"0.52756554",
"0.52735674",
"0.52729076",
"0.525349",
"0.525071",
"0.52471155",
"0.52440554",
"0.5243793",
"0.5241916",
"0.5239749",
"0.52385414",
"0.52360845",
"0.5233825",
"0.523324",
"0.522985",
"0.5228263",
"0.522482",
"0.52234066",
"0.5223327",
"0.5222452",
"0.5215185",
"0.5214159",
"0.52099305",
"0.5208745",
"0.5207996",
"0.52079844",
"0.52061534",
"0.5204394",
"0.5204124",
"0.51968694",
"0.5195651",
"0.51884717",
"0.51879394",
"0.5183812",
"0.5182894",
"0.5179168",
"0.51787376",
"0.51787376",
"0.51787376",
"0.51606494",
"0.51571375",
"0.5156268",
"0.5152746"
] | 0.0 | -1 |
Constructs a new instance | public function __construct($host = '127.0.0.1', $port = 6082, $secret = null) {
$this->host = $host;
$this->port = $port;
$this->secret = $secret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function newInstance();",
"public function newInstance();",
"public function construct()\n\t\t{\n\t\t}",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public function construct() {\n\n }",
"public function new()\n\t{\n\t\t//\n\t}",
"public function new()\n\t{\n\t\t//\n\t}",
"function _construct(){ }",
"static function create(): self;",
"function _construct() {\n \t\n\t\t\n\t}",
"final private function __construct() {}",
"final private function __construct() {}",
"public function new()\n {\n //\n }",
"public function new()\n {\n //\n }",
"public static function create() {\n\t\treturn new self();\n\t}",
"public function newInstance(): object;",
"public function create(){\r\n\treturn new $this->class();\r\n }",
"function __constructor(){}",
"private final function __construct() {}",
"public static function create()\n\t\t{\n\t\t\treturn new self();\n\t\t}",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"protected abstract function __construct();",
"final private function __construct() {\n\t\t\t}",
"public static function newInstance()\n {\n $instance = new self;\n return $instance;\n }",
"function __construct() {}",
"function __construct() {}",
"function __construct() {}",
"function __construct() {}",
"function __construct() {}",
"function __construct() {}",
"public static function create()\n\t{\n\t\treturn new self;\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() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}"
] | [
"0.80442375",
"0.80442375",
"0.78951794",
"0.7818187",
"0.7818187",
"0.7818187",
"0.77969486",
"0.77689713",
"0.77689713",
"0.77305233",
"0.7646569",
"0.7529315",
"0.745894",
"0.745894",
"0.73760384",
"0.73760384",
"0.7373616",
"0.73435026",
"0.733217",
"0.7322414",
"0.73211217",
"0.7298771",
"0.7297423",
"0.7297423",
"0.7297423",
"0.72731537",
"0.7263836",
"0.7216574",
"0.72119653",
"0.72119653",
"0.72119653",
"0.72119653",
"0.72119653",
"0.72119653",
"0.7211407",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72078604",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833",
"0.72076833"
] | 0.0 | -1 |
Gets a string representation of this server | public function __toString() {
return $this->host . ':' . $this->port;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function GetServerString() : STRING\r\n {\r\n switch(DRIVER)\r\n {\r\n case 'MySQL':\r\n return('mysql:host=' . HOST . ';dbname=' . DATABASE_NAME);\r\n default:\r\n return('mysql:host=' . HOST . ';dbname=' . DATABASE_NAME);\r\n }\r\n }",
"public function __toString() {\n return \"[\".$this->getName().\"] \".$this->getIp().\":\".$this->getPort();\n }",
"public function __toString() {\n return \"Host :\" . $this->host .\n \", Username :\" . $this->username .\n \", Password :\" . $this->password .\n \", Database :\" . $this->database;\n }",
"public function getAmavisServerRepresentation() : string {\n return \"$this->name \" . $this->getAmavisServerEmailRepresentation();\n }",
"public function toString()\n {\n return sprintf( '%s://%s:%s', $this->protocol, $this->ip, $this->port );\n }",
"public function __tostring()\n {\n $res = __CLASS__ . \": [{$this->code}]: {$this->message}\";\n $res.= ': ' . $this->_storage->id . '\\n';\n return $res;\n }",
"public function toString(): string\n {\n if ($this->isSingleHost()) {\n return $this->addrStr;\n } else {\n return $this->toCidrString();\n }\n }",
"public function toString() {\n return sprintf(\n \"%s@(jndi= %s) {\\n\".\n \" [Home ]: %s\\n\".\n \" [Remote]: %s\\n\".\n \"}\",\n $this->getClassName(),\n $this->jndiName,\n xp::stringOf($this->interfaces[HOME_INTERFACE]),\n xp::stringOf($this->interfaces[REMOTE_INTERFACE])\n );\n }",
"public function __toString()\r\n {\r\n return $this->scheme . '://' . $this->server . '/offering/' . $this->version . '/' . $this->offering .'/';\r\n }",
"public function __tostring(){\n\t\treturn $this->_base.\" - \".$this->_password.\" - \".$this->_server.\" - \".$this->_usuario;\n\t}",
"public function __toString()\n {\n $str = \"\\n---Remote Control---\\n\";\n for ($i=0; $i<=4; $i++) {\n $str .= \"\\nSlot[$i]\" . $this->onCommand[$i]->getName() . \" <===> \" . $this->offCommand[$i]->getName();\n }\n return $str;\n }",
"public function __toString()\n\t{\n\t\treturn (string) $this->response;\n\t}",
"public function toString()\n {\n return $this->cast('string');\n }",
"public function toString(): string\n\t{\n\t\t$aPkt = unpack('C*',$this->getData());\n\t\t$sReturn = \"Header | Type : \".$this->getPacketType().\" Port : \".$this->getPort().\" Control : \".$this->iCb.\" Pad : \".$this->iPadding.\" Seq : \".$this->iSeq.\" | Body |\".implode(\":\",$aPkt).\" |\";\n\t\treturn $sReturn;\t\n\t}",
"public function __toString()\n {\n if ($this->m_hostname && $this->m_community)\n {\n return implode(', ', snmpwalk($this->m_hostname, $this->m_community, null));\n } // if\n\n return \"\";\n }",
"public function getServerInfo()\n {\n return $this->sendServerCommand(\"serverinfo\");\n }",
"protected function getServer(string $key): string\n {\n return (true === isset($this->server[$key]))\n ? (string) $this->server[$key]\n : '';\n }",
"public function toString()\n\t{\n\t\treturn (string) $this;\n\t}",
"public function toString()\n\t{\n\t\treturn (string) $this;\n\t}",
"public function __toString(): string\n {\n return sprintf('%s:%s', $this->getChannel(), $this->getPath());\n }",
"public function __toString()\n {\n $domain = '';\n $domain .= $this->scheme ? $this->scheme . '://' : '';\n $domain .= $this->hostname;\n if ($this->port !== null) {\n switch ($this->scheme) {\n case 'http':\n $domain .= ($this->port !== 80 ? ':' . $this->port : '');\n break;\n case 'https':\n $domain .= ($this->port !== 443 ? ':' . $this->port : '');\n break;\n default:\n $domain .= (isset($this->port) ? ':' . $this->port : '');\n }\n }\n return $domain;\n }",
"public function toString() {\n\n\n $data = \"Information client: <ul>\";\n\n $data .= \"<li>Nom: \".$this->name.\"</li>\";\n\n $data .= \"<li>Age: \".$this->age.\"</li>\";\n\n $data .= \"</ul>\";\n\n return $data;\n\n }",
"public function __toString()\n {\n $headers = $this->headers();\n\n $buffer = [];\n foreach ($headers as $k => $v) {\n $buffer[] = $k . ': ' . $v;\n }\n\n return implode(\"\\t\", $buffer);\n }",
"public function getServerName()\n {\n return $this->get(self::_SERVER_NAME);\n }",
"public function __toString()\n {\n return $this->databaseName;\n }",
"public function __toString(): string\n {\n return $this->getBody();\n }",
"public function __toString()\n {\n return long2ip($this->ip);\n }",
"public function GetServer()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_my_server;\n }",
"public function toString() : string\n {\n return $this->address;\n }",
"public function __toString(): string\n {\n $result = [];\n foreach ($this->headers as $name => $value) {\n $result[] = $name . ': ' . $value;\n }\n\n return join(\"\\r\\n\", $result);\n }",
"private function getServerResponse() {\r\n\t\t$data = \"\";\r\n\t\twhile ( $str = fgets ( $this->conn, 4096 ) ) {\r\n\t\t\t$data .= $str;\r\n\t\t\tif (substr ( $str, 3, 1 ) == \" \") {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($this->debug)\r\n\t\t\techo $data . \"<br>\";\r\n\t\treturn $data;\r\n\t}",
"public function __toString() \n {\n $headers = $this->getHeaders();\n if (count($headers) > 0) {\n array_walk(\n $headers, function (&$value, $key) {\n $value = ($value !== null && $value !== false) ? sprintf(\"%s: %s\", $key, $value) : null;\n }\n );\n }\n\n return sprintf(\n \"%s %s\\n%s\\n\",\n $this->getMethod(),\n $this->getEndpoint(),\n implode(\"\\n\", array_filter($headers))\n );\n }",
"public function toString()\n {\n $data = $this->origin->data();\n $out = '';\n if (is_scalar($data) || is_null($data)) {\n $out = (string) $data;\n } elseif (is_object($data) && method_exists($data, '__toString')) {\n $out = (string) $data;\n }\n return $out;\n }",
"public function serialize(): string\n {\n return $this->toRawString();\n }",
"public function __toString()\n {\n return (string) $this->getBody();\n }",
"public function __toString() {\n $request = $this->method . ' ' . $this->path . ' ' . $this->protocol . \"\\r\\n\";\n\n foreach ($this->headers as $header) {\n $request .= (string) $header . \"\\r\\n\";\n }\n\n if ($this->getBody()) {\n $request .= \"\\r\\n\" . $this->getBody() . \"\\r\\n\";\n }\n\n return $request;\n }",
"public function __toString()\n {\n return (string) $this->exportTo(JadwalPeer::DEFAULT_STRING_FORMAT);\n }",
"public function __toString()\n {\n return (string) $this->exportTo(PoReceivingHeadTableMap::DEFAULT_STRING_FORMAT);\n }",
"public function toString()\n {\n return serialize($this->getData());\n }",
"function getServerName() {\n\n\t\t$this->client->query('GetServerName');\n\t\t$this->server->name = $this->client->getResponse();\n\t\treturn $this->server->name;\n\t}",
"public function toString() {\n return $this->getClassName().'('.$this->name.' ttl '.$this->ttl.' '.$this->address->toString().')';\n }",
"public function server()\r\n {\r\n return $this->server;\r\n }",
"public function toString()\n {\n return $this->__toString();\n }",
"public function __toString() {\r\n $ret = '';\r\n\r\n foreach($this->headers as $key => $value) {\r\n $ret .= $key . ': ' . $value . \"\\n\";\r\n }\r\n\r\n return rtrim($ret);\r\n }",
"public function toString()\n {\n $string = $this->headers->toString();\n $string .= $this->bodyToString();\n\n return $string;\n }",
"public function getToString()\n {\n return $this->toString();\n }",
"public function __toString()\n {\n return (string) $this->getServices();\n }",
"public function __toString() {\n return sprintf('HTTP/1.1 %d %s', $this->getStatus(), $this->getDescription());\n }",
"public function __toString()\n {\n return sprintf(\n '%s:%s#%s(%s)',\n $this->queue,\n $this->class,\n $this->id,\n empty($this->data) ? '' : json_encode($this->data)\n );\n }",
"public function __toString(): string\n {\n return $this->getResponse()->__toString();\n }",
"public function toString() : void\n {\n $out = serialize($this);\n \n }",
"private function getServerResponse() {\n\t\t$data=\"\";\n\t\twhile($str = fgets($this->conn,4096)) {\n\t\t\t$data .= $str;\n\t\t\tif(substr($str,3,1) == \" \") { break; }\n\t\t}\n\t\tif($this->debug) echo $data . \"<br>\";\n\t\treturn $data;\n\t}",
"public function __toString()\n\t{\n\t\treturn (string) $this->message;\n\t}",
"public function __toString()\n {\n return $this->getBody();\n }",
"public function toString()\n {\n return json_encode($this->config);\n }",
"public function getInfo()\n {\n return $this->getServer()->getInfo();\n }",
"public function __toString()\n\t{\n\t\treturn $this->requestAsString();\n\t}",
"public function toString() {\n\t\treturn serialize($this->_value);\n\t}",
"public function __toString(): string\n {\n return $this->toJson();\n }",
"public function __toString(): string\n {\n return $this->toJSON();\n }",
"public function __toString() : string\n {\n return $this->dsn;\n }",
"public function getServer()\n {\n return sprintf(\"mongodb://%s:%s@%s\", $this->config['user'], $this->config['password'], $this->config['host']);\n }",
"public function getHost(): string\n {\n return (string) $this->host;\n }",
"public function __toString()\n {\n $str = $this->getType().': ';\n\n if ($this->code != 0) {\n $str .= $this->code.': ';\n }\n\n return $str.$this->message;\n }",
"public function __toString()\n {\n return (string) $this->message;\n }",
"public function toString() {\n return sprintf(\n \"%s(version=%s encoding=%s)@{\\n %s\\n}\",\n $this->getClassName(),\n $this->version,\n $this->encoding,\n xp::stringOf($this->root, ' ')\n );\n }",
"public function __tostring() {\n\n\t\t\t//convet to string\n\t\t\treturn \"{\".\n\t\t\t\t\t\t\"id:\".$this->_id.\n\t\t\t\t\t\t\"type:\".$this->_type.\n\t\t\t\t\t\t\"path:\".$this->_path.\n\t\t\t\t\t\t\"name:\".$this->_name.\n\t\t\t\t\t\"}\";\n\n\t\t}",
"public function __toString()\n {\n return $this->rawHeaders . \"\\n\\n\" . $this->rawBody;\n }",
"public function to_string() { return $this->__toString(); }",
"public function __toString ( ) {\n\n return $this->getStream()->__toString();\n }",
"public function getServer() {\n\t\treturn (string) $this->photo['server'];\n\t}",
"public function __toString()\n {\n try {\n return (string) $this->configuration;\n } catch (Exception $exception) {\n return '';\n }\n }",
"public function toString() {\n return sprintf('%s { %s }', $this->getClassName(), $this->_conn->request->url->_info['url']);\n }",
"public function to_string() {\n\n\t\treturn $this->raw_response_json;\n\t}",
"public function toString()\n {\n return $this->name;\n }",
"public function __toString()\n {\n return $this->name . ' (' . $this->realm . ')';\n }",
"public function __toString() {\n\t\tif (!empty($this->message) and $this->errNum != 0) {\n\t\t\treturn 'Response: ' . $this->errNum . ': ' . $this->message;\n\t\t} else {\n\t\t\treturn 'Response: No Error: 0';\n\t\t}\n\t}",
"public function __tostring()\n {\n if ($this->isEmpty()) {\n return '';\n }\n\n return json_encode($this);\n }",
"public function getServer()\r\n {\r\n return $this->Server;\r\n }",
"public function toString()\n {\n return json_encode($this->obj);\n }",
"public function toString() {\n\t\treturn $this->name;\n\t}",
"public function toString(): string\n {\n return $this->getValue();\n }",
"public function __tostring()\n\t\t{\n\t\t\treturn (string) $this->ID;\n\t\t}",
"public function __toString()\n {\n $scheme = $this->getScheme();\n $authority = $this->getAuthority();\n $path = $this->getPath();\n $query = $this->getQuery();\n $fragment = $this->getFragment();\n\n return ($scheme ? $scheme . '://' : '') . $authority . $path . ($query ? '?' . $query : '') . ($fragment ? '#' . $fragment : '');\n }",
"public function __toString(): string\n {\n return $this->message;\n }",
"public function __toString()\n {\n return $this->_isSemantic ? (string)$this->_version : (string)$this->_versionString;\n }",
"public function __toString() {\n return (string) $this->buffer;\n }",
"public function toString() {\n $s= sprintf(\n \"%s@{\\n\".\n \" [name ] %s\\n\".\n \" [identifier ] %s\\n\".\n \" [wrapper ] %s\\n\",\n $this->getClassName(),\n $this->name,\n $this->identifier,\n $this->wrapper ? $this->wrapper->getClassName() : '(null)'\n );\n foreach (array_keys($this->values[HVAL_PERSISTENT]) as $key) {\n $s.= sprintf(\" [%-20s] %s\\n\", $key, xp::typeOf($this->values[$key]));\n }\n return $s.'}';\n }",
"public function toString(): string\n {\n return json_encode($this->store->getAll());\n }",
"public function getServer()\n {\n return $this->server;\n }",
"public function __toString()\n {\n return (string) $this->getContents();\n }",
"public function __toString()\n {\n return $this->body();\n }",
"public function toString() : string\n {\n return $this->value;\n }",
"public function __toString(): string\n {\n return sprintf(\n '%3d - %20s - %30s - %1d - %1d',\n $this->id,\n utf8_encode($this->username),\n utf8_encode($this->email),\n $this->enabled,\n $this->isAdmin\n );\n }",
"static function Name()\n {\n return self::Variable('SERVER_NAME');\n }",
"public function __toString()\n\t{\n\t\treturn $this->serialize();\n\t}",
"public function __toString() {\n\n $payload = (string) $this->payload;\n\n if (empty($payload) || $payload === \"{}\") {\n return (string) $this->header;\n }\n return sprintf('%s.%s', $this->header, $payload);\n }",
"public function toString()\n {\n return $this->getName();\n }",
"public function __toString(): string\n {\n return $this->output() . PHP_EOL;\n }",
"function toString() {\r\n\r\n\t\t$sb = 'ForwardConfig[';\r\n\t\t$sb .= 'name=';\r\n\t\t$sb .= $this->name;\r\n\t\t$sb .= ',path=';\r\n\t\t$sb .= $this->path;\r\n\t\t$sb .= ',redirect=';\r\n\t\t$sb .= $this->redirect;\r\n\t\t$sb .= ']';\r\n\t\treturn $sb;\r\n\r\n\t}"
] | [
"0.7205736",
"0.71613693",
"0.7022998",
"0.69365484",
"0.6842634",
"0.665858",
"0.6634126",
"0.66328466",
"0.6573421",
"0.6537226",
"0.6498204",
"0.6468685",
"0.6450126",
"0.6450028",
"0.6421601",
"0.6346564",
"0.634359",
"0.63338494",
"0.63338494",
"0.63306314",
"0.6305399",
"0.62711793",
"0.6268371",
"0.62348974",
"0.62197584",
"0.6219571",
"0.621932",
"0.62189263",
"0.62117535",
"0.6197752",
"0.61861485",
"0.6182484",
"0.6173978",
"0.61650455",
"0.6161573",
"0.615299",
"0.6148131",
"0.61455476",
"0.6142452",
"0.61388355",
"0.6137271",
"0.61346555",
"0.6101717",
"0.6100557",
"0.60993886",
"0.60986507",
"0.6092739",
"0.60921586",
"0.6080808",
"0.6080559",
"0.6074452",
"0.60699546",
"0.60696745",
"0.60633945",
"0.60612357",
"0.6052404",
"0.6049868",
"0.60442865",
"0.6042698",
"0.60395026",
"0.6039229",
"0.60353065",
"0.6032958",
"0.6032537",
"0.6027695",
"0.6021393",
"0.600871",
"0.6006476",
"0.6004305",
"0.59982103",
"0.59965724",
"0.5993342",
"0.5992973",
"0.59704405",
"0.59553105",
"0.5952976",
"0.59506184",
"0.5930109",
"0.5928549",
"0.59274083",
"0.59247315",
"0.5924255",
"0.5923412",
"0.59204227",
"0.59180754",
"0.59155536",
"0.5914193",
"0.5909746",
"0.5909226",
"0.5904157",
"0.5900072",
"0.5891331",
"0.5891221",
"0.58907396",
"0.5876339",
"0.5874364",
"0.5869995",
"0.58641016",
"0.58573866",
"0.58562535"
] | 0.7609525 | 0 |
Sets the log instance | public function setLog(Log $log) {
$this->log = $log;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setLogInstance(): void\n {\n $this->log_instance = QueryLogger::initializeQueryChainLog($this);\n }",
"private function _setLog($log)\n {\n $this->log = $log;\n return $this;\n }",
"protected static function configureInstance()\n\t{\n\t\t$logger = new Logger('Default');\n\t\t$logger->pushHandler(new StreamHandler(__DIR__.'/../../logs/app.log', Logger::DEBUG));\n\n\t\tself::$instance = $logger;\n\t}",
"public static function set($logger)\n {\n self::$instance = $logger;\n }",
"public function setLog(Applog $log)\n\t\t{\n\t\t\t$this->log = $log;\n\t\t}",
"public function log($log) {\n //$this->log = $log;\n }",
"public function setLogger(CsviHelperLog $log)\n\t{\n\t\t$this->log = $log;\n\t}",
"public function setLog($log)\n {\n $this->log = $log;\n\n return $this;\n }",
"private function set_log_type () {\n\t\t# check settings\n\t\t$this->log_type = $this->settings->log;\n\t}",
"public function __construct(){\n Logger::configure('../../loggingconfiguration.xml');\n // Fetch a logger, it will inherit settings from the root logger\n $this->log = Logger::getLogger(__CLASS__);\n }",
"protected function log()\n {\n\n $this->worker\n ->setInstance($this->instance);\n // If instance can be called\n if($this->worker->ping()) {\n $infos = $this->worker->getInfos();\n $createdAt = new \\DateTime();\n\n $log = $this->logManager->createNew();\n $log->setMemory($infos['Memory']['used_memory']);\n $log->setCpu($infos['CPU']['used_cpu_sys']);\n $log->setNbClients(sizeof($this->worker->getClients()));\n $log->setCreatedAt($createdAt);\n // Add log\n $this->instance->addLog($log);\n }\n }",
"public function setLogger(LoggerInterface $log);",
"function setLogger(&$logger) {\n\t\t$this->logger = $logger;\n\t}",
"function __construct()\n {\n $this->mylog = new mylog;\n }",
"public function __construct(Log $log)\n {\n $this->log = $log;\n }",
"public function setLogger( &$logger )\n {\n $this->_logger = $logger;\n }",
"public function setLogger(Logger $logger);",
"public function setLoger($_loger){\n\t\t$this->_loger = $_loger;\n\n\t\treturn $this;\n\t}",
"public final function withLog ()\n {\n\n $this->withLog = true;\n\n }",
"function setLogFile($logFile)\n {\n $this->logFile = $logFile;\n }",
"public function setLogger($logger){\n\t\t$this->_logger = $logger;\n\t}",
"public function setLogger(LoggerInterface $logger)\n {\n $this->instances->setEntry('logger',$logger);\n }",
"public function setLogger(Logger $logger)\n {\n $this->_logger = $logger;\n }",
"public function set_logger( $logger ) {\n\t\t$this->logger = $logger;\n\t}",
"function __construct() {\r\n\t\tparent::__construct();\r\n\t\t$this->log = Logger::getInstance();\r\n\t}",
"public function setLogger(DocBlox_Core_Log $log = null)\n {\n foreach ($this->behaviours as $behaviour) {\n $behaviour->setLogger($log);\n }\n }",
"public function __construct(){\n $this->clientLog = new Logger('client');\n $this->clientLog->pushHandler(new StreamHandler(storage_path('logs/client.log')), Logger::INFO);\n }",
"public function setLogger($logger);",
"public function __construct(Log $log)\n {\n parent::__construct();\n $this->log = $log;\n }",
"public function __construct(Log $log)\n {\n parent::__construct();\n $this->log = $log;\n }",
"function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t\t$this->log = Logger::getInstance();\r\n\t}",
"public function setLogging(ILoggingInterface $log_i)\r\n\t{\r\n\t\t$this->logging = $log_i;\r\n\t\t$this->logger = $this->logging->getLogger(str_replace('\\\\', '.', __CLASS__));\r\n\t\treturn $this;\r\n\t}",
"public static function set(LoggerInterface $logger)\n {\n self::$logger = $logger;\n }",
"private function setupLog()\n {\n $path = JFactory::getConfig()->get('log_path');\n\n $fileName = 'ecr_log.php';\n $entry = '';\n\n if('preserve' == JFactory::getApplication()->input->get('logMode')\n && JFile::exists($path.'/'.$fileName)\n )\n {\n $entry = '----------------------------------------------';\n }\n else if(JFile::exists($path.'/'.$fileName))\n {\n JFile::delete($path.'/'.$fileName);\n }\n\n JLog::addLogger(\n array(\n 'text_file' => $fileName\n , 'text_entry_format' => '{DATETIME}\t{PRIORITY}\t{MESSAGE}'\n , 'text_file_no_php' => true\n )\n , JLog::INFO | JLog::ERROR\n );\n\n if('' != $entry)\n JLog::add($entry);\n\n return $this;\n }",
"public function setLogger(Base_Log_Interface $logger);",
"public function __construct(Log $log)\n\t{\n\t\tparent::__construct();\n\n\t\t$this->log = $log;\n\t}",
"public function setLogger($logger)\r\n\t{ $this->logger = $logger;\r\n\t}",
"public function setLogger($logger)\n {\n $this->_logger = $logger;\n }",
"static public function set(string $loggerName = 'app', string $logPath = 'app.log')\n {\n if (static::$loggers[$loggerName]['instance']) {\n return static::$loggers[$loggerName]['instance'];\n }\n\t return static::$loggers[$loggerName]['instance'] = Loader::get(XCoreLog::class, $logPath);\n }",
"public function __construct()\n {\n self::$_logger = new Zend_Log(\n new Zend_Log_Writer_Stream(\n APPLICATION_PATH . '/../var/logs/system.log'\n )\n );\n }",
"protected function _initLog()\n {\n }",
"public function setLogger($logger)\n {\n $this->_logger = Horde_ActiveSync::_wrapLogger($logger);\n }",
"protected function setLogging($logging) {\n $this->logging = $logging;\n }",
"public static function setLogger($logger)\n {\n self::$_logger = $logger;\n }",
"final public function __construct() {\n $this->_logger = new public_logger();\n }",
"public static function setLogStructure( $logStructure ){\n\t\t\tself::$logStructure = ( string ) $logStructure;\n\t\t}",
"public function setlog($d = true){\n\t\t$this->log = $d;\n\t}",
"public function setLogger($logger)\n {\n $this->logger = $logger;\n if (@$this->server_info) $this->logConnection();\n }",
"private function __construct()\n {\n $levels = Conf::inst()->get('log.levels');\n $this->levels = $this->levelNames = array();\n foreach ($levels as $key => $name) {\n $this->levels[$name] = $key;\n $this->levelNames[] = $name;\n }\n\n $loggingLevel = Conf::inst()->get('log.level');\n $this->loggingLevel = $this->levels[$loggingLevel];\n $this->file = fopen(__DIR__ . \"/../log/\" . Conf::inst()->get('log.file'), \"a\");\n }",
"public function setLogFile($logFile)\n {\n $this->logFile = $logFile;\n }",
"function __construct() {\n $this->logging_enabled = false;\n }",
"public function setLogger($logger)\n {\n $this->logger = $logger;\n }",
"public function __construct(LogHistory $log)\n {\n parent::__construct();\n $this->log = $log;\n }",
"public static function setLogFile($logFile)\n {\n self::$logFile = $logFile;\n }",
"public function SetLogFile($file){\n\t\t$this->logFile = $file;\n\t\treturn $this;\n\t}",
"public function SetLogFile($file){\n\t\t$this->logFile = $file;\n\t\treturn $this;\n\t}",
"public function log($log);",
"public function __construct()\n {\n $this->log = new Log($this->logFileName);\n $this->middleware('auth');\n }",
"protected function initLogger(): void\n {\n $customPath = $this->context->getConfigurationService()->getLogPath();\n $severity = $this->context->getConfigurationService()->getLogSeverity();\n\n Logger::resetErrors();\n $this->logger = Logger::getInstance(__CLASS__, $customPath, $severity);\n }",
"public function setLogPath($logPath = 'logs') {\n $this->logger = new \\Katzgrau\\KLogger\\Logger($logPath, \\Psr\\Log\\LogLevel::DEBUG, array('filename' => 'joblog'));\n $this->logging_enabled = true;\n }",
"public function log()\n {\n if (!is_null($this->last_log)) {\n if (is_null($this->entity_manager)) {\n $this->entity_manager = $this->doctrine_registry->getEntityManager();\n }\n\n $this->entity_manager->persist($this->last_log);\n $this->entity_manager->flush();\n }\n\n return $this;\n }",
"private function initLogger()\n {\n $objectManager = ObjectManager::getInstance();\n if ($this->klevuLoggerFQCN && !($this->logger instanceof $this->klevuLoggerFQCN)) {\n $this->logger = $objectManager->get($this->klevuLoggerFQCN);\n }\n\n if (!($this->logger instanceof LoggerInterface)) {\n $this->logger = $objectManager->get(LoggerInterface::class);\n }\n }",
"public function setLogger(LoggerInterface $logger): void\n {\n $this->logger = $logger;\n\n $this->initEventLogger();\n }",
"public function getLoggerInstance()\n {\n return $this->logInstance;\n\n }",
"public function __construct(Log $logger)\n\t{\n\t\t$this->logger = $logger;\n\t}",
"public function __construct()\n {\n parent::__construct();\n \\Log::useDailyFiles(storage_path().'/logs/cron123.log');\n\n\t\t$this->logger = \\Log::getMonolog();\n\n\t\t\n }",
"static public function get_instance( )\n\t{\n\t\tif (is_null(self::$_instance)) {\n\t\t\tself::$_instance = new Log( );\n\t\t}\n\n\t\treturn self::$_instance;\n\t}",
"public function __construct(\\Monolog\\Logger $logger)\n {\n $this->_logger = $logger;\n }",
"protected function setLogMsg()\n {\n $sReferer = (!empty($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : 'NO HTTP REFERER';\n $sAgent = (!empty($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : 'NO USER AGENT';\n $sQuery = (!empty($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : 'NO QUERY STRING';\n\n $this->_sIp = self::getIp();\n\n $this->_sContents =\n 'Date: ' . date('Y/m/d') . \"\\n\" .\n 'IP: ' . $this->_sIp . \"\\n\" .\n 'QUERY: ' . $sQuery . \"\\n\" .\n 'Agent: ' . $sAgent . \"\\n\" .\n 'Referer: ' . $sReferer . \"\\n\" .\n 'LOGIN - Username: ' . $this->_sUsername . ' - Password: ' . $this->_sPassword . \"\\n\\n\\n\";\n\n return $this;\n }",
"public function __construct(LogQueue $log)\n {\n $this->log = $log;\n }",
"public function setResponse($log)\n {\n $this->log = $log;\n\n return $this;\n }",
"public function __construct()\n {\n $this->log = new Monolog('');\n $this->log->pushProcessor(new PsrLogMessageProcessor);\n\n $config = array_merge([\n 'type' => 'daily',\n 'level' => 'debug',\n 'max_files' => 5,\n 'app_file' => 'app.log',\n 'cli_file' => 'cli.log',\n 'permission' => 0664,\n ], config('logger', []));\n\n $file = storage_path('logs/' . $config[is_console() ? 'cli_file' : 'app_file']);\n $levels = $this->log->getLevels();\n $level = $levels[strtoupper($config['level'])];\n $format = \"[%datetime%] %level_name%: %message% %context%\\n\";\n\n switch ($config['type']) {\n case 'single':\n $this->log->pushHandler(\n $handler = new StreamHandler($file, $level, true, $config['permission'], false)\n );\n\n $handler->setFormatter(new LineFormatter($format, null, true, true));\n break;\n case 'daily':\n $this->log->pushHandler(\n $handler = new RotatingFileHandler($file, $config['max_files'], $level, true, $config['permission'], false)\n );\n $handler->setFormatter(new LineFormatter($format, null, true, true));\n break;\n case 'syslog':\n $this->log->pushHandler(\n new SyslogHandler(config('app.name', 'Pletfix'), LOG_USER, $level)\n );\n break;\n case 'errorlog':\n $this->log->pushHandler(\n $handler = new ErrorLogHandler(ErrorLogHandler::OPERATING_SYSTEM, $level)\n );\n $handler->setFormatter(new LineFormatter($format, null, true, true));\n break;\n default:\n throw new RuntimeException('Invalid log type in configuration \"app.log\".');\n }\n }",
"public function _initLog()\n {\n \t/* @var $log Zend_Log */\n \t$log = $this->getPluginResource('log')->getLog();\n \tZend_Registry::set('Zend_Log', $log);\n \treturn $log;\n \n }",
"protected function _initLog()\n {\n // make sure the db bootstrap is done\n $this->bootstrap('db');\n \n // add the logger\n $writer = new SG_Log_Writer_Db();\n $logger = new Zend_Log($writer);\n $logger->registerErrorHandler();\n Zend_Registry::set('SG_Logger', $logger);\n }",
"protected function setUp()\n {\n $this->object = new Log();\n }",
"public function setLogger(LoggerInterface $logger)\n\t{\n\t\t$this->logger = $logger;\n\t}",
"public function setLogger(LoggerInterface $logger)\n\t{\n\t\t$this->logger = $logger;\n\t}",
"function setDebugLog($debug_log) {\n $this->fields['debug_log'] = $debug_log;\n return $this;\n }",
"function setDebugLog($debug_log) {\n $this->fields['debug_log'] = $debug_log;\n return $this;\n }",
"function setDebugLog($debug_log) {\n $this->fields['debug_log'] = $debug_log;\n return $this;\n }",
"function setDebugLog($debug_log) {\n $this->fields['debug_log'] = $debug_log;\n return $this;\n }",
"function setDebugLog($debug_log) {\n $this->fields['debug_log'] = $debug_log;\n return $this;\n }",
"public function __construct(LoggerInterface $log)\n {\n parent::__construct();\n\n $this->log = $log;\n }",
"public function setLogger(LoggerInterface $logger):static;",
"public function setLogProject($project)\n {\n $this->logProject = $project;\n\n // REDCap must have a record_id when importing a new record. It does\n // not auto generate a new record_id on API Imports (or regular imports?),\n // even when the project is set to auto generate new record_ids.\n // Because multiple people may be using this application simultaneously,\n // it's not sufficient to simply use a timestamp. There is a risk that\n // even with the timestamp and a random number, logs might overwrite each\n // other, but I haven't found a better solution.\n $this->projectIdBase = time().'-'.rand(1, 9999).'-';\n $this->projectIndex = 0;\n $this->projectDate = date('g:i:s a d-M-Y T');\n }",
"function setCurrentTimeLog($TimeObject)\n\t{\n\t\t$this->Current_TimeLog = $TimeObject;\n\t}",
"public function __construct() {\n Log::useFiles(storage_path().'/logs/search.log');\n }",
"public function __construct()\n {\n $log_enhancer_channel_name = config('logging.bkstar123_log_enhancer.channel_name');\n $this->customLogger = Log::channel($log_enhancer_channel_name);\n }",
"public static function staticInit() {\n self::$logger = Logger::getLogger(__CLASS__);\n }",
"public static function staticInit() {\n self::$logger = Logger::getLogger(__CLASS__);\n }",
"public static function staticInit() {\n self::$logger = Logger::getLogger(__CLASS__);\n }",
"public function log($st): self\n {\n $args = \\func_get_args();\n foreach ($args as $a){\n X::log($a, 'db');\n }\n\n return $this;\n }",
"function setLogFile($sFilename)\n\t{\n\t\t$this->sLogFile = $sFilename;\n\t}",
"public function setLogger(Logger $logger): void\n {\n API::ffi()->ts_parser_set_logger($this->data, $logger);\n }",
"public function setLogger(LoggerInterface $logger)\n {\n $this->logger = $logger\n }",
"public function __construct() {\n $get_arguments = func_get_args();\n $number_of_arguments = func_num_args();\n\n if($number_of_arguments == 1){\n $this->logger = $get_arguments[0];\n }\n }",
"public function setLogger(LoggerInterface $logger)\n {\n $this->logger = $logger;\n }",
"public function setLogger(LoggerInterface $logger)\n {\n $this->logger = $logger;\n }",
"public function setLogger(LoggerInterface $logger)\n {\n $this->logger = $logger;\n }",
"public function setLogger(LoggerInterface $logger)\n {\n $this->logger = $logger;\n }"
] | [
"0.8322471",
"0.7328089",
"0.72294253",
"0.7228605",
"0.7155914",
"0.7099329",
"0.6887902",
"0.68365806",
"0.67171067",
"0.6703447",
"0.653512",
"0.64418817",
"0.64296293",
"0.6427446",
"0.64124346",
"0.6409742",
"0.63905984",
"0.6385901",
"0.63822573",
"0.63462514",
"0.62814",
"0.6268196",
"0.62680256",
"0.6266203",
"0.62659174",
"0.6234488",
"0.6218447",
"0.6217831",
"0.6214123",
"0.6214123",
"0.620598",
"0.6196543",
"0.6185949",
"0.61772656",
"0.61535376",
"0.612701",
"0.6100923",
"0.6100666",
"0.60966754",
"0.60886294",
"0.607354",
"0.60705256",
"0.60520834",
"0.60225",
"0.6017365",
"0.5998495",
"0.59893435",
"0.5968564",
"0.5960874",
"0.59355927",
"0.59354866",
"0.5933697",
"0.59322584",
"0.5922453",
"0.59176725",
"0.59176725",
"0.58907115",
"0.58899534",
"0.58754456",
"0.58754",
"0.58743924",
"0.5865483",
"0.5852669",
"0.5845181",
"0.5823747",
"0.5818306",
"0.5811137",
"0.58087325",
"0.5806766",
"0.5791733",
"0.57882917",
"0.5787641",
"0.57767653",
"0.5762977",
"0.57596314",
"0.5749981",
"0.5749981",
"0.57460874",
"0.57460874",
"0.57460874",
"0.57460874",
"0.57460874",
"0.5742495",
"0.573307",
"0.57288617",
"0.5721049",
"0.57134783",
"0.5712891",
"0.5685784",
"0.5685784",
"0.5685784",
"0.5680208",
"0.5674609",
"0.5672851",
"0.566526",
"0.5655375",
"0.5654349",
"0.5654349",
"0.5654349",
"0.5654349"
] | 0.74368733 | 1 |
Gets the host of this server | public function getHost() {
return $this->host;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function GetHost() {\n\n return $this->Host;\n }",
"public function getHost()\n {\n return isset($this->host) ? $this->host : '';\n }",
"public function getHost()\n {\n return $this->get('host');\n }",
"public static function getHost()\n {\n return self::$__host;\n }",
"public function host()\n\t{\n\t\treturn isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['SERVER_ADDR'];\n\t}",
"public function getHost()\n {\n return $this->host;\n }",
"public function getHost()\n {\n return $this->host;\n }",
"public function getHost()\n {\n return $this->host;\n }",
"public function getHost()\n {\n return $this->host;\n }",
"public function getHost()\n {\n return $this->host;\n }",
"public function getHost()\n {\n return $this->host;\n }",
"public function getHost()\n {\n return $this->host;\n }",
"public function getHost()\n {\n return $this->host;\n }",
"public function getHost()\n {\n return $this->host;\n }",
"public function getHost()\n {\n return $this->host;\n }",
"public function getHost()\n {\n return $this->_host;\n }",
"public function getHost(): string {\n return $this->host;\n }",
"public function getHost()\n {\n\n if (empty($this->_host))\n return '';\n\n return $this->_host;\n }",
"public function getHost()\n {\n return $this->wrapped->getHost();\n }",
"public function getHost()\n {\n return $this->server['HTTP_HOST'];\n }",
"public function getHost(): string\r\n {\r\n return $this->host;\r\n }",
"public function getHost(): string\n {\n return $this->configuration[ConfigurationInterface::HOST];\n }",
"public function getHost() {\r\n return (is_null($this->host)) ? null : $this->host;\r\n }",
"public function host()\n {\n return $this->globals->server()[\"HTTP_HOST\"];\n }",
"public function host()\n {\n return $this->connection->host();\n }",
"public function host()\n {\n return $this->host;\n }",
"public function getHost() {\n\n if (isset($this->host)) {\n return $this->host;\n }\n\n return 'localhost';\n }",
"public function getHost()\n {\n return $this->decode($this->host);\n }",
"public function getHost(): string\n {\n return (string) $this->host;\n }",
"public function getHost(): string\n {\n if (!empty($_SERVER['HTTP_HOST'])) {\n return $_SERVER['HTTP_HOST'];\n }\n\n return $_SERVER['SERVER_NAME'];\n }",
"public function getHost()\n {\n return $this->getConfig('host');\n }",
"public static function host() {\n\t\t$host = gethostbyaddr(self::ip());\n\t\treturn ($host == '') ? null : $host;\n\t}",
"public function host() {\n\t\treturn $this->getHeader('Host');\n\t}",
"public function getHost() {\n return $this->getConfig('host', $this->defaults['host']);\n }",
"public function getHost() {\n\t\treturn $this->netxHostname;\n\t}",
"public function getHost() {\n \n\n\t\treturn $_SERVER[\"HTTP_HOST\"];\n }",
"public function getHost(): string {\n return $this->context->host;\n }",
"public function getHost(): string\n {\n return (string)$this->getEnvKey('SERVER_NAME');\n }",
"public function getHost()\n\t{\n\t\t$host = null;\n\n\t\tif ($this->isUsingTrustedProxy() && $this->hasHeader(self::$trustedHeaderNames['client-host'])) {\n\t\t\t$hosts = explode(',', $this->getHeaderLine(self::$trustedHeaderNames['client-host']));\n\t\t\t$host = trim(end($hosts));\n\t\t}\n\n\t\tif (!$host) {\n\t\t\t$host = $this->getHeaderLine('HOST');\n\t\t}\n\n\t\tif (!$host) {\n\t\t\t$host = $this->getServerParam('SERVER_NAME');\n\t\t}\n\n\t\tif (!$host) {\n\t\t\t$host = $this->getServerParam('SERVER_ADDR');\n\t\t}\n\n\t\t// Remove the port number\n\t\t$host = strtolower(preg_replace(\"/:\\d+$/\", '', trim($host)));\n\t\t\n\t\t// Check for forbidden characters\n\t\t// Credit: Symfony HTTPFoundation\n\t\tif (!empty($host) && !empty(preg_replace(\"/(?:^\\[)?[a-zA-Z0-9-:\\]_]+\\.?/\", '', $host))) {\n\t\t\tthrow new InvalidArgumentException(\"Invalid host \\\"$host\\\"\");\n\t\t}\n\n\t\treturn $host;\n\t}",
"public static function getHost() {\n $port = $_SERVER['SERVER_PORT'];\n $s = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] ? 's' : '';\n $p = (($s && $port == \"443\") || (!$s && $port == \"80\")) ? '' : \":$port\";\n $host = \"http$s://\" . $_SERVER['HTTP_HOST'] . $p;\n OpenM_Log::debug(\"host: $host\", __CLASS__, __METHOD__, __LINE__);\n return $host;\n }",
"public function getHost()\n {\n $host = $this->getHostname();\n\n return sprintf('http%s://%s', ($this->isSSL() ? 's' : ''), $host);\n }",
"public function getHost()\n {\n return isset($this->urlParts['host']) ? $this->urlParts['host'] : NULL;\n }",
"public function getHost()\n {\n $host = $this->serverAttributes()['HTTP_HOST'];\n\n if (!$host) {\n return false;\n }\n\n return $host;\n }",
"public static function getHost() {\n\t\tif(!isset(self::$host)) {\n\t\t\tif(self::$trust && isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {\n \tself::$host = $_SERVER['HTTP_X_FORWARDED_HOST'];\n \t} else if(isset($_SERVER['HTTP_HOST'])) {\n \tself::$host = $_SERVER['HTTP_HOST'];\n \t} else if(isset($_SERVER['SERVER_NAME'])) {\n \tself::$host = $_SERVER['SERVER_NAME'];\n \t}\n\t }\n\t return self::$host;\n\t}",
"public function host() \n\t{\n\t\treturn $this->server( 'HTTP_X_FORWARDED_HOST', $this->server( 'HTTP_HOST', $this->server( 'SERVER_NAME' ) ) );\n\t}",
"public function get_hostname() {\n\t\treturn $this->hostname;\n\t}",
"public function getHost()\n {\n return $this->getTask()->getHost();\n }",
"public function getHost() : string\n {\n return $this->uri->getHost() ?: '';\n }",
"public function hostname()\n {\n return $this->globals->server()[\"SERVER_NAME\"];\n }",
"public function user_host()\n {\n return $this->server('HTTP_HOST');\n }",
"public function host() {\n if ($this->proxy_host)\n return $this->proxy_host;\n\n return '';\n }",
"public function getHost() {}",
"public function getHost() {}",
"public function getHostName()\n {\n return $this->_hostName;\n }",
"public function getHost() {\n $possible_host_sources = ['HTTP_X_FORWARDED_HOST', 'HTTP_HOST', 'SERVER_NAME'];\n $host = '';\n foreach ($possible_host_sources as $source) {\n if (!empty($host)) {\n break;\n }\n if (empty($_SERVER[$source])) {\n continue;\n }\n $url = esc_url_raw(wp_unslash($_SERVER[$source]));\n $scheme = wp_parse_url($url, PHP_URL_SCHEME);\n if (!$scheme) {\n $url = 'http://' . $url;\n }\n $host = wp_parse_url($url, PHP_URL_HOST);\n }\n return trim($host);\n }",
"public function getHost();",
"public function getHost();",
"public function getHost();",
"public function getHost();",
"public function getHost();",
"public function getHost();",
"public function getHost() {\n if (empty($this->uriParts['host'])) {\n return '';\n }\n return strtolower($this->uriParts['host']);\n }",
"final public function getHostname() {\n \t\treturn $this->host;\n }",
"public function hostname() {\n $host = $this->client(\"origin\")?? $this->client(\"host\")?? $this->uri(\"host\");\n $host = parse_url($host);\n\n return $host[\"host\"]?? $host[\"path\"];\n }",
"final public function getHost(): string {}",
"public function getHostname()\n {\n if (is_null($this->hostname)) {\n $server = provider::access('server');\n\n if ($server->isExist('HTTP_HOST') && $server->isValid('HTTP_HOST', validate::T_PRINTABLE)) {\n $this->hostname = $server->getValue('HTTP_HOST');\n }\n\n if ($this->hostname === false) {\n $this->hostname = '';\n }\n }\n\n return $this->hostname;\n }",
"protected function getHost() {\n\t\treturn ($this->router->getParam('HTTPS') ? 'https' : 'http') . '://' . $this->router->getParam('HTTP_HOST');\n\t}",
"public static function getUserHost()\n {\n return isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : null;\n }",
"public static function getHttpHost() {\n\t\treturn self::$httpHost;\n\t}",
"public function getHostname()\n {\n return $this->hostname;\n }",
"public function getHostname()\n {\n return $this->hostname;\n }",
"public function getHostname()\n {\n return $this->hostname;\n }",
"protected function getHttpHost()\r\n {\r\n return isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'cli';\r\n }",
"public function getHost(): string;",
"public function getHttpHost()\n {\n $host = $this->getServer('HTTP_HOST');\n if (!empty($host)) {\n return $host;\n }\n\n $scheme = $this->getScheme();\n $name = $this->getServer('SERVER_NAME');\n $port = $this->getServer('SERVER_PORT');\n\n if (null === $name) {\n return '';\n } elseif (($scheme == static::SCHEME_HTTP && $port == 80)\n || ($scheme == static::SCHEME_HTTPS && $port == 443)\n ) {\n return $name;\n } else {\n return $name . ':' . $port;\n }\n }",
"public function getHostname()\n {\n return $this->get(self::HOSTNAME);\n }",
"public static function serverIP() {\n return getHostByName(getHostName());\n }",
"public function getBaseHost()\n {\n return $this['base.host'];\n }",
"public function getHost() {\n return new Client($this->memcache, $this->shareData[\"host\"]);\n }",
"public function getUserHost()\n {\n return isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : null;\n }",
"public function getHost()\n {\n $result = null;\n $status = $this->getAttribute(\\PDO::ATTR_CONNECTION_STATUS);\n $spacePos = strpos($status, ' ');\n if ($spacePos !== false) {\n $result = substr($status, 0, $spacePos);\n }\n return $result;\n }",
"public function getHttpHost()\n {\n $scheme = $this->getScheme();\n $port = $this->getPort();\n\n if (('http' == $scheme && $port == 80) || ('https' == $scheme && $port == 443)) {\n return $this->getHost();\n }\n\n return $this->getHost() . ($port != '' ? ':' . $port : '');\n }",
"public function getHostname() {\r\n\t\treturn $this->hostname;\r\n\t}",
"protected function host()\n {\n return env( 'APP_HTTP_HOST' ) != \"\" ? env( 'APP_HTTP_HOST' ) : $this->input->getOption('host');\n }",
"public function getHOSTNAME()\n {\n return $this->HOSTNAME;\n }",
"public function host() {\n return $this->db['host'];\n }",
"public static function getHostName() {\n\t\t$server = gethostname();\n if(!empty($server) && ($pos = strpos($server,'.')) > 1) {\n $server = substr($server,0,$pos);\n }\n\t\treturn $server;\n\t}",
"public function getGearmanHost() : string\n {\n return $this->gearmanHost;\n }",
"Public Function getHostname() { Return $this->hostname; }",
"public function getHost()\n {\n return $this->partials['host'];\n }",
"public static function get_hostname() {\n\t\treturn '';\n\t}",
"public static function hostname()\n\t{\n\t\t$arr = self::_getConfigArray();\n\t\tif (is_empty($arr))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\treturn self::_getConfigArray()[0];\n\t}",
"public function get_hostname()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $postfix = new Postfix();\n $hostname = $postfix->get_hostname();\n\n return $hostname;\n }",
"function getIP() {\n return gethostbyname($this->host);\n }",
"public function getHost(): string\n {\n }",
"public function getHostNameIdentifier()\n {\n return $this->hostname;\n }",
"public function host() : string;",
"public function getAuthHost()\n {\n return $this->authHost;\n }",
"public function getHost()\n {\n }"
] | [
"0.84564376",
"0.84290963",
"0.84108114",
"0.8401438",
"0.83981484",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8383082",
"0.8369133",
"0.83463085",
"0.8334215",
"0.8332339",
"0.829366",
"0.82904583",
"0.8239915",
"0.8238795",
"0.822317",
"0.8184754",
"0.8178592",
"0.8172761",
"0.81662774",
"0.81357926",
"0.8124585",
"0.81191474",
"0.8067025",
"0.80336344",
"0.7999849",
"0.79838085",
"0.7956183",
"0.7934168",
"0.7901823",
"0.78957146",
"0.78778046",
"0.7870045",
"0.7827921",
"0.7801803",
"0.77902853",
"0.77895075",
"0.7766338",
"0.7751696",
"0.7740036",
"0.7739102",
"0.7723267",
"0.7709615",
"0.7668572",
"0.7668572",
"0.7644014",
"0.76367927",
"0.7635749",
"0.7635749",
"0.7635749",
"0.7635749",
"0.7635749",
"0.7635749",
"0.75764817",
"0.7570332",
"0.7551637",
"0.7516196",
"0.75066954",
"0.7500617",
"0.74965245",
"0.74633735",
"0.74625367",
"0.74625367",
"0.74625367",
"0.7459047",
"0.7455152",
"0.7425458",
"0.7378359",
"0.7361168",
"0.7355309",
"0.73512214",
"0.7342486",
"0.7332304",
"0.73305625",
"0.7316709",
"0.72855234",
"0.7258742",
"0.72438663",
"0.7237699",
"0.7235594",
"0.7210307",
"0.7183455",
"0.71512717",
"0.7140968",
"0.71309465",
"0.71039575",
"0.7061342",
"0.7046042",
"0.70443946",
"0.70384854",
"0.70321405"
] | 0.8390302 | 6 |
Gets the port of this server | public function getPort() {
return $this->port;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getPort()\n {\n return $_SERVER['SERVER_PORT'];\n }",
"public function GetPort() {\n\n return intval($this->GetRequestContext()->SERVER['SERVER_PORT']);\n }",
"function getServerPort() {\n\t\treturn $this->getParam(self::PARAM_SERVER_PORT);\n\t}",
"public function getServerPort()\n {\n return (int)$_SERVER['SERVER_PORT'];\n }",
"public static function getPort()\n {\n if (!isset(self::$_data[self::KEY_PORT]))\n {\n $_port = $_SERVER[\"SERVER_PORT\"];\n if (isset($_SERVER[\"HTTP_X_FORWARDED_PORT\"]) && strlen($_SERVER[\"HTTP_X_FORWARDED_PORT\"]) > 0)\n {\n $_port = $_SERVER[\"HTTP_X_FORWARDED_PORT\"];\n }\n self::setPort($_port);\n }\n\n return self::$_data[self::KEY_PORT];\n }",
"public function getPort()\n {\n if (null === $this->port) {\n $this->detectPort();\n }\n\n return $this->port;\n }",
"public function getPort()\n {\n return isset($this->port) ? $this->port : 0;\n }",
"public function getPort()\n {\n return isset($this->port) ? $this->port : 0;\n }",
"public function getPort()\n {\n return isset($this->urlParts['port']) ? $this->urlParts['port'] : NULL;\n }",
"public function getPort()\n {\n return $this->getConfig('port');\n }",
"public function getPort()\n {\n return $this->port;\n }",
"public function getPort()\n {\n return $this->port;\n }",
"public function getPort()\n {\n return $this->port;\n }",
"public function getPort()\n {\n return $this->port;\n }",
"public function getPort()\n {\n return $this->port;\n }",
"public function getPort()\n {\n return $this->port;\n }",
"public function getPort()\n {\n return $this->port;\n }",
"public function getPort()\n {\n return $this->port;\n }",
"public function getPort()\n {\n return $this->port;\n }",
"public function getPort()\n {\n return $this->port;\n }",
"public function getPort()\n {\n return $this->port;\n }",
"static function Port ()\n\t\t{\n\t\t\tif (php_sapi_name() === \"cli\")\n\t\t\t\treturn NULL;\n\t\t\treturn isset ($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : \"\";\n\t\t}",
"static function Port()\n {\n return self::Variable('SERVER_PORT');\n }",
"public function getRemotePort()\n {\n return $this->server['REMOTE_PORT'];\n }",
"public function getPort()\n {\n return $this->wrapped->getPort();\n }",
"public function getPort()\n {\n return $this->_port;\n }",
"public function getPort()\n {\n return $this->_port;\n }",
"public function getPort() : string\n {\n return $this->port;\n }",
"public function getPort(): int {\n return $this->context->port;\n }",
"public function getPort()\n {\n if (is_null($this->_port)) {\n $this->_port = !self::getIsSecureConnection() && isset($_SERVER['SERVER_PORT']) ? (int) $_SERVER['SERVER_PORT'] : 80;\n }\n\n return $this->_port;\n }",
"public function getPort()\r\n\t{\r\n\t\treturn $this->port;\r\n\t}",
"public function getPort()\n {\n $port = $this->serverAttributes()['REMOTE_PORT'];\n\n if (!$port) {\n return false;\n }\n\n return $port;\n }",
"public function getPort() {\n return $this->getConfig('port', $this->defaults['port']);\n }",
"public static function getPort() {\n\t if(!isset(self::$port)) {\n\t self::$port = isset($_SERVER['SERVER_PORT'])\n\t ? intval($_SERVER['SERVER_PORT'])\n\t : 80;\n\t }\n\t return self::$port;\n\t}",
"public function getServerPort()\n {\n $serverPort = $this->serverAttributes()['SERVER_PORT'];\n\n if (!$serverPort) {\n return false;\n }\n\n return $serverPort;\n }",
"public function getPort()\n\t{\n\t\treturn (int) $this->port;\n\t}",
"public function getPort()\n {\n return isset($this->Port) ? $this->Port : null;\n }",
"public function getPort()\n {\n return (int)$this->port;\n }",
"public function port()\n\t{\n\t\treturn $this->header('X-Forwarded-Port') ? (int)$this->header('X-Forwarded-Port') : (int)$this->server('SERVER_PORT');\n\t}",
"static public function getPort() {\n\t\treturn self::port;\n\t}",
"public function port() {\n if ($this->proxy_port)\n return $this->proxy_port;\n\n return '';\n }",
"public function getPort(): int\n\t{\n\t\treturn $this->iPort;\n\t}",
"public function getPort()\n {\n $value = $this->get(self::port);\n return $value === null ? (string)$value : $value;\n }",
"public function getPort()\n\t{\n\t\tif ($this->isUsingTrustedProxy()) {\n\t\t\tif ($this->hasHeader(self::$trustedHeaderNames[self::CLIENT_PORT])) {\n return (int) $this->getHeaderLine(self::$trustedHeaderNames[self::CLIENT_PORT]);\n } else if ($this->getHeaderLine(self::$trustedHeaderNames[self::CLIENT_PROTO]) === 'https') {\n\t\t\t\treturn 443;\n\t\t\t}\n\t\t}\n\n\t\tif ($this->hasServerParam('SERVER_PORT')) {\n\t\t\treturn (int) $this->getServerParam('SERVER_PORT');\n\t\t}\n\n\t\treturn (int) self::$standardPorts[$this->getHttpScheme()];\n\t}",
"protected function port()\n {\n return env( 'APP_HTTP_PORT' ) != \"\" ? env( 'APP_HTTP_PORT' ) : $this->input->getOption('port');\n }",
"public function port() {\n return $this->db['port'];\n }",
"public function getPort(): int {\n return (integer) $this->port;\n }",
"public function remotePort()\n {\n return $this->_remotePort;\n }",
"public function getPort(){\r\n return $this->Port;\r\n }",
"public function getPort() {}",
"public function getPortIdentifier()\n {\n return $this->port;\n }",
"public function getPort() {\n return @$this->attributes['port'];\n }",
"public function getPort() {\n\n if (empty($this->uriParts['port'])) {\n return NULL;\n }\n else {\n if ($this->getScheme()) {\n if ($this->uriParts['port'] == Constants::STANDARD_PORTS[$this->getScheme()]) {\n return null;\n }\n }\n return (int) $this->uriParts['port'];\n }\n }",
"final public function getPort(): int {}",
"public function getPort(): ?int {\n\t\treturn $this->port;\n\t}",
"public function getPort()\n {\n\n $scheme = $this->getScheme();\n if (empty($this->_port) || (\n (isset(self::$_defaultPorts[$scheme]) && $this->_port === self::$_defaultPorts[$scheme])\n )) {\n\n return null;\n }\n\n return $this->_port;\n }",
"public function defaultPort()\n {\n return getservbyname($this->scheme ? $this->scheme : 'http', 'tcp');\n }",
"public function getPort();",
"public function getPort();",
"public function getPort();",
"public function getPort();",
"protected function port()\n {\n // return env('APP_HTTP_PORT') != \"\" ? env('APP_HTTP_PORT') : $this->input->getOption('port');\n return env('TELSTAR_LOCAL_PORT') != \"\" ? env('TELSTAR_LOCAL_PORT') : $this->input->getOption('port');\n }",
"public function getPort(): int;",
"public function getPort() {\n\n if (isset($this->port)) {\n return $this->port;\n }\n\n return '27017';\n }",
"function getPort() {\n\t\treturn $this->getAttribute(DOMIT_RSS_ATTR_PORT);\n\t}",
"public function getPort() : ?int\n {\n $port = $this->uri->getPort();\n if ($port !== null) {\n return $port;\n }\n\n switch ($this->uri->getScheme()) {\n case 'http':\n case 'git+http':\n return 80;\n case 'https':\n case 'git+https':\n return 443;\n default:\n return null;\n }\n }",
"public function getPort(): int\n {\n }",
"public function getProxyPort();",
"public function getBasePort()\n {\n return (int)$this['base.port'];\n }",
"public function getOutgoingMailServerPort() {\n\t\treturn $this->og_mail_server_port;\n\t}",
"private function getPort ()\n\t\t{\n\t\t\t$server_config = $this->config['server'];\n\t\t\t$config_data = file( $this->config['server'] );\n\t\t\t$i=0;\n\t\t\twhile ( $i < count ( $config_data ) ) {\n\t\t\t\tif(strstr ( $config_data [$i] , \"port\" ) ) { /* line of port in server.conf */\n\t\t\t\t\t$buffer = explode (\" \" , $config_data[$i] ) ;\n\t\t\t\t\tif ( count ( $buffer ) == 2 ) \n\t\t\t\t\t\t$this->result['data']['port'] = trim($buffer[1]);\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn;\n\t\t}",
"public function getSecurePort()\n {\n if (is_null($this->_securePort)) {\n $this->_securePort = self::getIsSecureConnection() && isset($_SERVER['SERVER_PORT']) ? (int) $_SERVER['SERVER_PORT'] : 443;\n }\n\n return $this->_securePort;\n }",
"public function getDbPort(): string\n {\n return (string) Config::get('DB_PORT');\n }",
"public function getGearmanPort() : int\n {\n return $this->gearmanPort;\n }",
"public function getPort():? int;",
"public function getSshPort() : string {\n return $this->sshPort;\n }",
"protected function getConfiguredPort() {}",
"public static function getPort(): ?int {\r\n\r\n $port = $_SERVER['HTTP_X_FORWARDED_PORT'] ?? $_SERVER['SERVER_PORT'] ?? null;\r\n\r\n if(null !== $port) {\r\n return (int) $port;\r\n }\r\n\r\n return null;\r\n }",
"function getProxyPort() {\n\t\treturn $this->m_proxyPort;\n\t}",
"public function getSMTPServerPort() {\n if(!isset($this->smtpServerPort )) throw new Exception('SMTP user port not found');\n return $this->smtpServerPort;\n }",
"public function port() : ?int;",
"public function getDestinationPort()\n {\n return $this->destination_port;\n }",
"public function getDestinationPort()\n {\n return $this->destination_port;\n }",
"public function port($port);",
"public function port()\n {\n }",
"public function getMailPort() {\n return $this->mailPort;\n }",
"static public function getSecurePort() {\n\t\treturn self::ssl_port;\n\t}",
"public function getPortName()\n {\n return isset($this->port_name) ? $this->port_name : '';\n }",
"public function getPortName()\n {\n return isset($this->port_name) ? $this->port_name : '';\n }",
"public function originPort() {\n\t\treturn $this->getOriginPort();\n\t}",
"public function getPorts()\n {\n return $this->_ports;\n }",
"protected function getSocketEndPoint()\n {\n return 'tls://' . $this->getEndPoint() . ':' . self::PORT;\n }",
"public function getHostAndPort(): string\n {\n $host = $this->getHost();\n $port = $this->getPort();\n\n // Only append the port if it is non-standard.\n if (($port === 80 && $this->getScheme() === 'http') || ($port === 443 && $this->getScheme() === 'https')) {\n $port = '';\n } else {\n $port = ':' . $port;\n }\n\n return $host . $port;\n }",
"public function getSourcePort()\n {\n return $this->source_port;\n }",
"public function getSourcePort()\n {\n return $this->source_port;\n }",
"public function getDefaultPort() {\n return 3306;\n }",
"public function getWebFarePort()\n {\n return isset($this->WebFarePort) ? $this->WebFarePort : null;\n }",
"public function getStompPort()\n {\n return $this->stompPort;\n }",
"public function server()\r\n {\r\n return $this->server;\r\n }"
] | [
"0.8756641",
"0.8683198",
"0.864136",
"0.85305524",
"0.8361618",
"0.83243454",
"0.82971483",
"0.82971483",
"0.8256156",
"0.82558614",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.82490414",
"0.821955",
"0.82015383",
"0.81874484",
"0.8136547",
"0.81186515",
"0.81186515",
"0.8088967",
"0.80882144",
"0.8079381",
"0.803005",
"0.802331",
"0.80162567",
"0.79278755",
"0.79220694",
"0.78712934",
"0.78542954",
"0.78231865",
"0.77887374",
"0.77617353",
"0.77298915",
"0.7724423",
"0.7694178",
"0.7654688",
"0.7642946",
"0.75841975",
"0.7563667",
"0.7492672",
"0.7343543",
"0.73300475",
"0.729943",
"0.7277591",
"0.7275728",
"0.72703433",
"0.7255529",
"0.72414804",
"0.72410226",
"0.7230086",
"0.7230086",
"0.7230086",
"0.7230086",
"0.71887237",
"0.71846575",
"0.7146938",
"0.710032",
"0.70994604",
"0.6947111",
"0.69412655",
"0.6843756",
"0.6800632",
"0.6704914",
"0.66963226",
"0.66407603",
"0.6609345",
"0.6608669",
"0.65982705",
"0.6580965",
"0.6559827",
"0.6525597",
"0.6511467",
"0.6487317",
"0.6442583",
"0.6442583",
"0.6372076",
"0.6328863",
"0.63181",
"0.62791365",
"0.62381953",
"0.62381953",
"0.6222331",
"0.6198754",
"0.61689985",
"0.6119748",
"0.6111736",
"0.6111736",
"0.61070853",
"0.6105526",
"0.60969436",
"0.60842526"
] | 0.82372993 | 22 |
Sets the secret to authenticate with this server | public function setSecret($secret) {
$this->secret = $secret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setSecret($secret);",
"public function setSecret($secret);",
"public function setSecret($secret)\n {\n $this->secret = $secret;\n }",
"public function setSecret($secret)\n {\n $this->secret = $secret;\n }",
"public function setSecret($secret)\n {\n $this->secret = $secret;\n }",
"private function set_secret($secret) {\n\t\t$this->secret = $secret;\n\t}",
"public function setSecret($secret)\n\t{\n\t\t$this->secret = $secret;\n\t}",
"public function setClientSecret($secret)\n {\n $this->sharedSecret = $secret;\n }",
"private function _set_secret($secret) {\n\t\t$this->set_secret(bin2hex($secret));\n\t}",
"public function setSecret(string $secret) : self\n {\n $this->initialized['secret'] = true;\n $this->secret = $secret;\n return $this;\n }",
"public function setSecret($var)\n {\n GPBUtil::checkString($var, True);\n $this->secret = $var;\n\n return $this;\n }",
"public function setSecret(string $secret): self\n {\n $this->options['secret'] = $secret;\n return $this;\n }",
"public function setSecret(string $secret): self\n {\n $this->options['secret'] = $secret;\n return $this;\n }",
"public function setSecret($_secret): self\n {\n $this->_secret = $_secret;\n\n return $this;\n }",
"protected function setConsumerSecret($secret)\n {\n\t$this->consumerSecret = (string) $secret;\n }",
"public function setSharedSecret($val)\n {\n $this->_propDict[\"sharedSecret\"] = $val;\n return $this;\n }",
"public function setClientSecret($secret)\n\t{\n\t\tif (is_string($secret)) {\n\t\t\t$this->_values['client_secret'] = $secret;\n\t\t}\n\t}",
"public function setAppSecret($appSecret)\n {\n $this->appSecret = $appSecret;\n }",
"public function setToken($token, $token_secret) {}",
"public function setSecretKey($secretKey) {\n $this->secretKey = $secretKey;\n }",
"public function setSecret($secret)\n {\n $this->_secret = (string)$secret;\n\n return $this;\n }",
"public function setTokenSecret(string $tokenSecret): void\n {\n $this->setParam($this->tokenSecretParamKey, $tokenSecret);\n }",
"public function setSecretKey($secretKey)\n {\n $this->_secretKey = $secretKey;\n }",
"public function setSecret() {\r\n $rand = $this->psl['crypt/rand'];\n\n $this->secret = $rand->bytes(32);\r\n $cookieParam = session_get_cookie_params();\r\n setcookie(\r\n $this->keyCookie,\r\n base64_encode($this->secret),\r\n $cookieParam['lifetime'],\r\n $cookieParam['path'],\r\n $cookieParam['domain'],\r\n $cookieParam['secure'],\r\n $cookieParam['httponly']\r\n );\r\n return true;\r\n }",
"public function get_secret() {\r\n return $this->secret;\r\n }",
"public function setAuth($key, $secret)\n {\n $this->apiKey = $key;\n $this->apiSecret = $secret;\n }",
"public function setSecret($secret)\n {\n $this->secret = $secret;\n return $this;\n }",
"public function setClientSecret($clientSecret){\n $this->clientSecret = $clientSecret;\n }",
"public function setClientSecret($client_secret) {\n\t\t$this->client_secret = $client_secret;\n\t}",
"public static function setAuth($accessKey, $secretKey)\n\t{\n\t\tself::$__accessKey = $accessKey;\n\t\tself::$__secretKey = $secretKey;\n\t}",
"public function setSecret($secret)\n {\n $this->secret = $secret;\n\n return $this;\n }",
"public function setSecret($secret)\n {\n $this->secret = $secret;\n\n return $this;\n }",
"public function setSecret($value)\n {\n return $this->setParameter('secret', $value);\n }",
"public function getSecret()\n {\n return $this->secret;\n }",
"public function getSecret()\n {\n return $this->secret;\n }",
"public function getSecret()\n {\n return $this->secret;\n }",
"public function getSecret()\n {\n return $this->secret;\n }",
"public function getSecret() {\n return $this->secret;\n }",
"public function getClientSecret();",
"public function getClientSecret();",
"public function __construct($secret_key){\n $this->secret_key = $secret_key;\n }",
"public function create_secret() {\n\n\t\t$this->path = '/secret';\n\t}",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }",
"public function setClientSecret($value)\n {\n return $this->set('ClientSecret', $value);\n }"
] | [
"0.7609315",
"0.7609315",
"0.7529852",
"0.7529852",
"0.7529852",
"0.75132215",
"0.7421914",
"0.7283331",
"0.7230551",
"0.7011043",
"0.69321656",
"0.6857086",
"0.6857086",
"0.6749136",
"0.6720814",
"0.67170984",
"0.6714032",
"0.66639006",
"0.66427225",
"0.65793604",
"0.65476567",
"0.6465494",
"0.64047956",
"0.6396153",
"0.638708",
"0.6376833",
"0.63705903",
"0.63330805",
"0.6269963",
"0.6252139",
"0.6217442",
"0.6217442",
"0.62171793",
"0.6212392",
"0.6212392",
"0.6212392",
"0.6212392",
"0.6201552",
"0.61876386",
"0.61876386",
"0.61774784",
"0.616812",
"0.61219776",
"0.61219776",
"0.61219776",
"0.61219776",
"0.61219776",
"0.61219776",
"0.61219776",
"0.61219776",
"0.6120688",
"0.6120688",
"0.6120688",
"0.6120688",
"0.6120688",
"0.6120688",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6119296",
"0.6118644"
] | 0.75497496 | 2 |
Gets the secret for server authentication | public function getSecret() {
return $this->secret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getClientSecret(): string\n {\n return (string) data_get($this->args, 'credentials.secret');\n }",
"public function get_secret() {\r\n return $this->secret;\r\n }",
"public function getSecret();",
"public function getSecret();",
"public function getSecret();",
"public function getSecret();",
"public function getSecret();",
"public function getSharedSecret(): string;",
"public function getSecret() : string\n {\n return $this->secret;\n }",
"public function getSecret()\n {\n return $this->getParameter('secret');\n }",
"public function getSecret()\n {\n return $this->getConfig('secret');\n }",
"public function getSecret()\n {\n return $this->secret;\n }",
"public function getSecret()\n {\n return $this->secret;\n }",
"public function getSecret()\n {\n return $this->secret;\n }",
"public function getSecret()\n {\n return $this->secret;\n }",
"public function getSecret(): string;",
"public function getSecret()\n {\n return $this->_secret;\n }",
"public function getSecret()\n {\n return $this->_secret;\n }",
"public function getSecret()\n\t{\n\t\treturn $this->secret;\n\t}",
"protected function getClientSecret()\n {\n return $this->sharedSecret;\n }",
"public function get_client_secret() {\n return $this->get_option( 'client-secret', '' );\n }",
"public function getSecret()\n {\n // echo \"Secret is: \" . $this->secret;\n return $this->secret;\n }",
"public function getClientSecret();",
"public function getClientSecret();",
"public function getClientSecret(): string\n {\n return $this->configuration[ConfigurationInterface::CLIENT_SECRET];\n }",
"public function getAppSecret(): string;",
"public function get_clientsecret() {\n return $this->clientsecret;\n }",
"public function getClientSecret() : string\n {\n return $this->clientSecret;\n }",
"public function getClientSecret() : string\n {\n return $this->clientSecret;\n }",
"public function getSharedSecret()\n {\n return isset($this->shared_secret) ? $this->shared_secret : '';\n }",
"public function getTokenSecret(): string\n {\n return $this->getParam($this->tokenSecretParamKey);\n }",
"public function getAppSecret()\n {\n return $this->appSecret;\n }",
"public function getSecret() {\n return $this->accessSecret;\n }",
"public function get_access_secret()\n\t{\n return self::get_value( 'access_secret' );\n\t}",
"public function getClientSecret()\n\t{\n\t\treturn $this->_clientSecret;\n\t}",
"public function getClientSecret()\n {\n return $this->client_secret;\n }",
"public function getClientSecret()\n {\n return $this->client_secret;\n }",
"public function getSecretKey(): string\n {\n return $this->secretKey;\n }",
"public function getSecretId()\n {\n return $this->secret_id;\n }",
"function get_site_secret()\n {\n \t$secret = datalist_get('__site_secret__');\n \tif (!$secret) $secret = init_site_secret();\n \t\n \treturn $secret;\n }",
"public function secret() {\n\t\tif(is_null($this->secret))\n\t\t\tthrow new DataAuthenticatorException('Unable to find the secret key');\n\t\treturn $this->secret;\n\t}",
"public function getSecretKey()\n {\n return $this->secret_key;\n }",
"public function getSecretKey()\n {\n return $this->secret_key;\n }",
"public function getSecretKey()\n {\n return $this->secret_key;\n }",
"public function getSecretKey();",
"public function getAuthSecret()\n {\n return $this->apiSecret;\n }",
"public function getClientSecret()\n {\n return $this->clientSecret;\n }",
"public function getClientSecret()\n {\n return $this->clientSecret;\n }",
"public function getClientSecret()\n {\n return $this->clientSecret;\n }",
"public function getClientSecret()\n {\n return $this->clientSecret;\n }",
"public function getClientSecret() {\n return $this->clientSecret;\n }",
"public function getSecretKey()\n\t{\n\t\treturn $this->secret_key;\n\t}",
"public function getSecretKey()\n {\n return $this->getParameter('secretKey');\n }",
"protected function getSecretKey()\n {\n return $this->_secretKey;\n }",
"public function getSecret() {\n\t\tif (!empty($this->api_secret)) {\n\t\t\treturn $this->api_secret;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"protected function _getSecretKey()\n {\n return $this->_secretKey;\n }",
"public function getSecretID()\n {\n return $this->secretID;\n }",
"private function define_secret() {\n\t\t$secret = '';\n\t\treturn $secret;\n\t}",
"public function getSecret() {\n\t\treturn (string) $this->photo['secret'];\n\t}",
"public function get_oauth_token_secret() {\n\t\treturn $this->_oauth_token_secret;\n\t}",
"public function getSecretKey() {\n return $this->secretKey;\n }",
"public function getSecretKey()\n {\n return $this->secretKey;\n }",
"public function getSecretKey()\n {\n return $this->secretKey;\n }",
"public function getSecretKey()\n {\n return $this->secretKey;\n }",
"public static function getSecretKey()\n {\n $secretKey = YamlHelper::getValueFromParameters('mcrypt_secret');\n return $secretKey;\n }",
"private function _getSecretKey() {\n return \"hfd&*9997678g__vd45%%$3)(*kshdak\";\n }",
"public function getSharedSecret()\n {\n if (array_key_exists(\"sharedSecret\", $this->_propDict)) {\n return $this->_propDict[\"sharedSecret\"];\n } else {\n return null;\n }\n }",
"public function generateTwoFactorSecret()\n {\n return $this->start()->uri(\"/api/two-factor/secret\")\n ->get()\n ->go();\n }",
"public function get_consumer_secret()\n\t{\n\t\treturn $this->tokens['consumer_secret'];\n\t}",
"public function getSecret(): string {\n\n if ($this->secret) {\n return $this->secret;\n }\n\n // Get the secret from the databae\n if ($r = $this->user->secret2FA()) {\n return $r;\n }\n\n // Get the secret from file cache\n if ($r = $this->cache->get($this->user->id())) {\n return $this->secret = $r;\n }\n\n // Create a secret of 160 bits as a\n $this->secret = $this->tfa->createSecret(160);\n\n // Save the secret for 2 min that lets the user to scan the code\n $this->cache->set($this->user->id(), $this->secret, 2);\n\n return $this->secret;\n }",
"public function getMoipSecret() {\n return $this->getChaveValor('MOIP_APP_SECRET');\n }",
"public function getWebhookSecret();",
"public function get_api_secret(){\n\t\t$apisecret = array_key_exists( 'apisecret', $this->bvars) ? $this->bvars['apisecret'] : false;\n\t\tif (!$apisecret) {\n\t\t\t$this->get_errors()->add( new \\gcalc\\error( 10101 ) );\n\t\t\treturn 'anonymous-secret';\n\t\t}\n\t\treturn $apisecret;\n\t}",
"public function get_app_secret() {\n\n\t\t// Get plugin settings.\n\t\t$settings = $this->get_plugin_settings();\n\n\t\treturn rgar( $settings, 'customAppSecret' ) ? rgar( $settings, 'customAppSecret' ) : null;\n\n\t}",
"public function getBoxSecretKey() : string;",
"protected abstract function getSecretKey();",
"public function getApiKeySecret()\n {\n return $this->getParameter('apiKeySecret');\n }",
"public static function getSecretKey()\n {\n $key = \\QB::table(self::TABLE)->select('value')->where('name', '=', 'secret_key')->first();\n\n return $key->value;\n }",
"function rest_get_authenticated_app_password()\n {\n }",
"public function getApiSecret(){\n\t\treturn $this->apiSecret;\n\t}",
"protected function getConsumerSecret()\n {\n\treturn $this->consumerSecret;\n }",
"public function getConsumerSecret() {\n\t\treturn $this->selectedEndpoint['consumer_secret'];\n\t}",
"public function getConsumerSecret() {\n return $this->secret; \n }",
"public function getSecret()\n {\n if (! isset($this->secret)) {\n $this->secret = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getSecretQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->secret;\n }",
"public function httpPassword()\n\t{\n\t\treturn $this->server('PHP_AUTH_PW');\n\t}",
"public function getMoipAccountSecret() {\n return $this->getChaveValor('MOIP_ACCOUNT_SECRET');\n }",
"public function getSecretNumber()\n {\n return $this->secretNumber;\n }",
"public function getAdminClientSecret() {\n return $this->adminClientSecret;\n }",
"protected function _getSecret()\n {\n if (!isset($this->_config['secret'])) {\n throw new RuntimeException('Parameter \"secret\" not exists in config.');\n }\n\n return $this->_config['secret'];\n }",
"public function getSharedSecretHash()\n {\n return isset($this->shared_secret_hash) ? $this->shared_secret_hash : '';\n }",
"protected function _getSecretKey()\n {\n return Mage::getStoreConfig('payment/oggetto/secret_key');\n }",
"public function get_secrets() {\n\n\t\t$this->method = 'GET';\n\t\t$this->path = '/secret';\n\t}",
"public function getSecretKey()\n {\n return Mage::getStoreConfig(self::RECAPTCHA_SECRET_KEY);\n }",
"public function getClientSecret()\n {\n if (!$this->clientSecret) {\n $this->clientSecret = env('AUTH0_JWT_CLIENTSECRET');\n }\n\n return $this->clientSecret;\n }",
"public function getSecret($tid){}",
"public function getNewClientSecret()\n {\n return $this->newClientSecret;\n }",
"public function getSecuredPassword();",
"public function getMasterKeyPassword() {\n\t\t$password = $this->config->getSystemValue('secret');\n\t\tif (empty($password)){\n\t\t\tthrow new \\Exception('Can not get secret from ownCloud instance');\n\t\t}\n\n\t\treturn $password;\n\t}",
"protected function key()\n {\n return \"CLIENT_SECRET\";\n }",
"public function getSessionSecret() {\r\n\t\t$session = $this->getSession ();\r\n\t\tif (isset ( $session ['session_secret'] )) {\r\n\t\t\treturn $session ['session_secret'];\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}"
] | [
"0.80043083",
"0.780026",
"0.7757215",
"0.7757215",
"0.7757215",
"0.7757215",
"0.7757215",
"0.7711304",
"0.77110445",
"0.77043086",
"0.7687669",
"0.7685214",
"0.7685214",
"0.7685214",
"0.7685214",
"0.7684224",
"0.7668504",
"0.7668504",
"0.7634467",
"0.7596546",
"0.75962317",
"0.7559057",
"0.7543883",
"0.7543883",
"0.75011533",
"0.7358063",
"0.735649",
"0.7356379",
"0.7356379",
"0.7343479",
"0.72785693",
"0.72714746",
"0.72026324",
"0.71977055",
"0.71869826",
"0.7174154",
"0.7174154",
"0.71674746",
"0.7162017",
"0.7151788",
"0.712642",
"0.7094873",
"0.7057751",
"0.7057751",
"0.7030843",
"0.702263",
"0.701502",
"0.701502",
"0.701502",
"0.701502",
"0.6992417",
"0.6984672",
"0.6979595",
"0.69688356",
"0.69654495",
"0.6945781",
"0.6944828",
"0.6943779",
"0.6934896",
"0.6921061",
"0.6920308",
"0.68777955",
"0.68777955",
"0.68777955",
"0.68687844",
"0.68651426",
"0.68588334",
"0.68272024",
"0.6824553",
"0.6815587",
"0.681249",
"0.6811153",
"0.6801819",
"0.67755795",
"0.6743942",
"0.6732409",
"0.6730385",
"0.67171705",
"0.6700063",
"0.66953164",
"0.66445446",
"0.664282",
"0.6642737",
"0.6606234",
"0.65757775",
"0.6567788",
"0.6552469",
"0.6543408",
"0.65340966",
"0.65212864",
"0.6505086",
"0.64872795",
"0.6466839",
"0.6466705",
"0.6451246",
"0.6445302",
"0.64088726",
"0.638974",
"0.63884944",
"0.6373078"
] | 0.76061445 | 19 |
Gets whether the connection is active | public function isConnected() {
return $this->handle !== null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _isActive() {\n\t\treturn connection_status() === CONNECTION_NORMAL && !connection_aborted();\n\t}",
"public function isAlive() {\n\t\treturn (($this->active !== null) && $this->connections [$this->active]->isAlive ());\n\t}",
"public function hasConnection()\n {\n return $this->connection ? true : false;\n }",
"public function isConnected()\n {\n return isset($this->conn);\n }",
"public function isConnected() {\n\t\treturn isset($this->conn);\n\t}",
"public function isConnected() {\n\t\treturn isset($this->conn);\n\t}",
"public function isConnected()\n {\n return isset($this->connection);\n }",
"public function isConnected()\n {\n return $this->connection->isConnected();\n }",
"public function isConnection()\n {\n return ($this->_connection) ? true : false;\n }",
"public function isConnected()\n {\n return $this->_conn !== null;\n }",
"public function isConnectionOpen(): bool;",
"public function isConnected()\n {\n if ($this->db == null) {\n return false;\n }\n\n return $this->db->IsConnected();\n }",
"public function isConnected()\n {\n return $this->manager->isConnected();\n }",
"public function aim_connected()\r\n\t{\r\n\t\tif (is_resource($this->resource)) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tthrow new TACException('Unable to find active connection');\r\n\t\t}\r\n return false;\r\n\t}",
"public function isConnected()\n {\n return $this->getResource()->isConnected();\n }",
"public static function isConnected()\n\t{\n\t\treturn (self::$connection !== NULL) && self::$connection->isConnected();\n\t}",
"public function isConnected(){\n\n if (is_a($this->resourceId,\"mysqli\")) {\n return mysqli_ping($this->resourceId);\n }\n return false;\n }",
"public function isConnected()\n\t{\n\t\treturn $this->isConnected;\n\t}",
"public function IsConnected()\r\n\t{\r\n\t\treturn $this->_isConnected;\r\n\t}",
"function isConnected() {\n return $this->_connected;\n }",
"public function isConnected()\n {\n return $this->connected;\n }",
"public function isConnect()\n {\n return $this->bbb->isConnectionWorking();\n }",
"public function isConnected()\n {\n return $this->isConnected;\n }",
"final public function connected() {\n if (is_a($this->resourceId,\"mysqli\")) {\n return mysqli_ping($this->resourceId);\n }\n return false;\n }",
"public function IsConnected()\n {\n if (isset($this->db) && is_object($this->db) && $this->db->IsConnected()) {\n return true;\n }\n return false;\n }",
"public function isConnected()\n\t{\n\t\treturn $this->_connected;\n\t}",
"public function isConnected() {\n\n\t\tif (!$this->connection_opened) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\t$this->query('DO 1');\n\t\t} catch (Exception $e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\n\t}",
"public function isActive()\n\t{\n\t\treturn $this->isOpened();\n\t}",
"public function IsConnected()\r\n\t{\r\n\t\tif( gettype( $this->db_link ) == 'resource' )\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function isConnected()\n {\n return $this->mysqli->ping();\n }",
"function isConnected()\n\t{\n\t\tif($this->connected) return true;\n\t\telse\t\t return false;\n\t}",
"public function check_connection() {\n return $this->dbmail->is_connected();\n }",
"public function isConnected()\n\t{\n\t\treturn ( $this->_connected == true ) ? true : false;\n\t}",
"public function isConnected()\n {\n return (bool) $this->socket;\n }",
"public function getConnectionStatus()\n {\n $connection = $this->serverAttributes()['HTTP_CONNECTION'];\n\n if (!$connection) {\n return false;\n }\n\n return $connection;\n }",
"public function isConnected()\n\t{\n\t\treturn $this->isUser() || $this->isOrga();\n\t}",
"public function isConnected()\n {\n return !is_null($this->user);\n }",
"public function isTransactionActive()\n {\n return $this->conn->isTransactionActive();\n }",
"public function isConnected()\n {\n if($this->is_connected)\n {\n return true;\n }\n else{\n return false;\n }\n }",
"public function isActive(): bool\n {\n return $this->active;\n }",
"public function connected() : bool {\n return $this->connected;\n }",
"public function isConnected(): bool;",
"public function isConnected(): bool;",
"public function isConnected(): bool;",
"public function isConnected() {}",
"public function isConnected() {}",
"public function isConnected() {}",
"final public static function isConnected() {\n\t\treturn self::$blnConnected;\n\t}",
"public function isConnected()\n\t{\n\t\treturn isset( $this->pdo );\n\t}",
"public function is_page_active()\n\t{\n\t\treturn (bool) $this->_connection;\n\t}",
"public function isConnected()\n {\n return true;\n }",
"public function isConnected() {\n return $this->imap !== false;\n }",
"public function is_connected() {\n\t\treturn true;\n\t}",
"public function isConnected()\n {\n // We think we're still connected\n if ($this->isConnected) {\n // Check if this is really the case or if the database server has gone away for some reason\n // Using mysqlnd ping() does not reconnect (which we would not want anyway since charset etc would not be reinitialized that way)\n $this->isConnected = $this->link->ping();\n }\n return $this->isConnected;\n }",
"static public function is_connected()\n {\n return R::testConnection();\n }",
"public function connected() {\r\n\t\treturn $this->_phpseclib !== null;\r\n\t}",
"public function isActive() {\n\t\treturn $this->active;\n\t}",
"public function is_connected()\n {\n $result = @$this->mcache->getExtendedStats();\n $canconnect = false;\n\n if($result) {\n foreach($result as $server => $stats) {\n if($stats) {\n $canconnect = true;\n break;\n }\n }\n }\n \n return $canconnect;\n }",
"public function connected()\n {\n return ($this->connected === true);\n }",
"public function is_active(): bool;",
"public function isActive()\n {\n return (bool)$this->getValue(self::KEY_ACTIVE);\n }",
"public function is_ready()\n {\n ! $this->_connection && $this->connect();\n return (bool) $this->_connection;\n }",
"public static function isConnected() {\n return isset($_SESSION['userid']);\n }",
"public function isConnected()\n {\n if ($this->connect) {\n return $this->connect;\n }\n if (!empty($_SESSION[ 'token_connected' ])) {\n if (!($user = $this->getUserActivedToken($_SESSION[ 'token_connected' ]))) {\n return false;\n }\n\n $this->connect = $_SESSION[ 'token_connected' ] == $user['token_connected']\n ? $user\n : false;\n\n return $this->connect;\n }\n\n return false;\n }",
"private function getActiveConnection() \n {\n \n return $this->con;\n }",
"public function isConnected()\n {\n if ( !is_resource($this->_connectionChannel) ) {\n $this->_isConnected = false;\n return false;\n }\n $this->_isConnected = true;\n return true;\n }",
"public function isConnected() {\n if ($this->client) {\n $this->client->isConnected();\n }\n }",
"public function is_active();",
"public function isConnected();",
"public function isConnected();",
"public function isConnected();",
"public function isConnected();",
"public function isConnected();",
"public function isConnected();",
"public function isActive()\n\t{\n\t\treturn $this->status;\n\t}",
"public function isConnected():bool;",
"public function isActive()\n {\n return $this->active;\n }",
"public function isActive()\n {\n return $this->active;\n }",
"public function isActive()\n {\n return $this->active;\n }",
"public function isActive()\n {\n return $this->active;\n }",
"public function isActive()\n {\n return $this->active;\n }",
"public function isActive()\n {\n return $this->active;\n }",
"public function isActive()\n {\n return $this->active;\n }",
"public function isActive()\n {\n return $this->active;\n }",
"protected function isConnected(): bool\n {\n return is_resource($this->socket);\n }",
"public function isConnected ()\n {\n return ((bool) (EhrlichAndreas_Util_Object::isInstanceOf($this->_connection,'EhrlichAndreas_Pdo_Pdo') || EhrlichAndreas_Util_Object::isInstanceOf($this->_connection,'PDO')));\n }",
"public function connected()\n\t{\n\t\treturn $this->CLI->boolQuery($this->SqueezePlyrID.\" connected ?\");\n\t}",
"public function isActive(): bool\n {\n return $this->pdo->inTransaction();\n }",
"public function isActive()\n\t{\n\t\treturn $this->Status === 'active';\n\t}",
"public function isActive()\n {\n return $this->getStatus() == self::STATUS_ACTIVE;\n }",
"public function isActive() {\n return (bool) $this->getValue('active');\n }",
"public function getStatusConnection()\n {\n return $this->statusConnection;\n }",
"function getConnStatus() \n {\n\t\t\treturn $this->connectionStatus;\n\t\t}",
"function IsReady()\r\n\t{\r\n\t\treturn $this->IsConnected();\r\n\t}",
"private function active(): bool\n {\n return session_status() === \\PHP_SESSION_ACTIVE;\n }",
"public function isActive() {\n return $this->active;\n }",
"public function isActive()\n\t{\n\t\treturn $this->isActivated() && !$this->isBanned();\n\t}",
"function is_connected()\n {\n static $isConnected = null;\n if ($isConnected !== null) {\n return $isConnected;\n }\n $isConnected = false;\n $connection = env('IS_CONNECTED', true) ? @fsockopen('www.google.com', 80) : null;\n if ($connection) {\n fclose($connection);\n $isConnected = true;\n }\n\n return $isConnected;\n }",
"public function isConnected()\n\t{\n\t\t// TODO: Make this check the login functionality or something..!!\n\t\treturn true;\n\t}",
"public function isActive()\n {\n return (bool) ($this->_state == 'active');\n }"
] | [
"0.8236316",
"0.8038428",
"0.7936772",
"0.7906968",
"0.789573",
"0.789573",
"0.78881145",
"0.7851009",
"0.7766805",
"0.7753309",
"0.77489394",
"0.77210724",
"0.76745516",
"0.7654008",
"0.76388013",
"0.76293063",
"0.76172996",
"0.756997",
"0.7561609",
"0.7558891",
"0.75433534",
"0.753739",
"0.75341165",
"0.7527458",
"0.75111884",
"0.750029",
"0.7499886",
"0.7458677",
"0.7416978",
"0.74000514",
"0.7387004",
"0.73662853",
"0.7357736",
"0.7335489",
"0.7310319",
"0.7298191",
"0.72928584",
"0.72855276",
"0.72704446",
"0.7267526",
"0.7258448",
"0.7246489",
"0.7246489",
"0.7246489",
"0.7242675",
"0.7241445",
"0.7241445",
"0.72285557",
"0.72127986",
"0.7198612",
"0.71929497",
"0.71727866",
"0.7171475",
"0.7165104",
"0.7157393",
"0.71567124",
"0.71448034",
"0.71374303",
"0.7133705",
"0.71336865",
"0.71203554",
"0.7113039",
"0.71069014",
"0.71066153",
"0.7093525",
"0.70909077",
"0.7081882",
"0.70794",
"0.7067937",
"0.7067937",
"0.7067937",
"0.7067937",
"0.7067937",
"0.7067937",
"0.70561486",
"0.7051073",
"0.704199",
"0.704199",
"0.704199",
"0.704199",
"0.704199",
"0.704199",
"0.704199",
"0.704199",
"0.7036465",
"0.7029921",
"0.7009024",
"0.70001733",
"0.6954258",
"0.69438016",
"0.6937045",
"0.69183517",
"0.6913126",
"0.6901285",
"0.6893158",
"0.6879095",
"0.6870685",
"0.68666714",
"0.6849647",
"0.68413055"
] | 0.7367564 | 31 |
Connects to the varnish server | public function connect($timeout = 5) {
if ($this->isConnected()) {
return true;
}
$this->handle = @fsockopen($this->host, $this->port, $errorNumber, $errorMessage, $timeout);
if (!is_resource($this->handle)) {
$this->handle = null;
throw new VarnishException('Could not connect to ' . $this->host . ' on port ' . $this->port . ': ' . $errorMessage);
}
// set socket options
stream_set_blocking($this->handle, 1);
stream_set_timeout($this->handle, $timeout);
// connecting should give us the varnishadm banner with a 200 code, or
// 107 for auth challenge
$banner = $this->read($statusCode);
if ($statusCode === 107) {
if (!$this->secret) {
$this->disconnect();
throw new VarnishException('Could not connect to ' . $this->host . ' on port ' . $this->port . ': Authentication is required and there is no secret set, call setSecret() first');
}
try {
$challenge = substr($banner, 0, 32);
$challengeResponse = hash('sha256', $challenge . "\n" . $this->secret . $challenge . "\n");
$banner = $this->execute('auth ' . $challengeResponse, $statusCode, 200);
} catch (Exception $exception){
$this->disconnect();
throw new VarnishException('Could not connect to ' . $this->host . ' on port ' . $this->port . ': Authentication failed', 0, $exception);
}
}
if ($statusCode !== 200) {
$this->disconnect();
throw new VarnishException('Could not connect to ' . $this->host . ' on port ' . $this->port . ': Bad response');
}
return $banner;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect();",
"public function connect() {\n if ($this->client) {\n $this->client->connect();\n }\n }",
"protected function connect($config) {\n\t\t// set the Memcache plugin\n\t\t$this->_memcached = new Memcached;\n\n\t\t$this->_memcached->addServer($config['host'], $config['port'])\n\t\t\tor die('Could not connect to server');\n\n\t\t$this->_isConnected = true;\n\t}",
"protected function connect() {}",
"final public function p_connect() {\n \t$this->connect('', '', '', '', true);\n \t}",
"function ts3client_startConnection($serverConnectionHandlerID, $identity, $ip, $port, $nickname, $defaultChannelID, $defaultChannelPassword, $serverPassword) {}",
"function connect() {\n\n\t\t// only if logins are set ...\n\t\tif ($this->server->ip && $this->server->port && $this->server->login && $this->server->pass) {\n\n\t\t\t$this->console_text('[Aseco] Try to connect to server on {1}:{2}',\n\t\t\t\t$this->server->ip,\n\t\t\t\t$this->server->port);\n\n\t\t\t// connect to the server ...\n\t\t\tif (!$this->client->InitWithIp($this->server->ip, $this->server->port)) {\n\t\t\t\ttrigger_error('[' . $this->client->getErrorCode() . '] ' . $this->client->getErrorMessage());\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$this->console_text('[Aseco] Authenticated with username \\'{1}\\' and password \\'{2}\\'',\n\t\t\t\t$this->server->login, $this->server->pass);\n\n\t\t\t// logon the server ...\n\t\t\t$this->client->addCall('Authenticate', array($this->server->login, $this->server->pass));\n\n\t\t\t// enable callback system ...\n\t\t\t$this->client->addCall('EnableCallbacks', array(true));\n\n\t\t\t// start query ...\n\t\t\tif (!$this->client->multiquery()){\n\t\t\t\ttrigger_error('[' . $this->client->getErrorCode() . '] ' . $this->client->getErrorMessage());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->client->getResponse();\n\n\t\t\t// connection established ...\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\t// connection failed ...\n\t\t\treturn false;\n\t\t}\n\t}",
"public function connect(): void;",
"public function start () {\n $this->cache = new Memcache;\n $this->cache->addServer($this->server, $this->port);\n }",
"public function connect(): mixed;",
"public function index(){\n $redis = new Redis();\n// dump($redis);exit;\n $redis->connect('39.98.171.207',6379);\n echo \"Connection to server sucessfully\";\n exit;\n //查看服务是否运行\n echo \"Server is running: \" . $redis->ping();\n }",
"function connect() {\n $this->conn = imap_open('{'.$this->server.'/notls}', $this->user, $this->pass);\n }",
"static function connect(): void;",
"public function connect() {\n $this->connection = AMQPStreamConnection($this->server_ip, $this->server_port, $this->username, $this->password);\n }",
"public function connect($server, $username, $secret);",
"function msession_connect($host, $port)\n{\n}",
"public static function activate() {\n\t\tupdate_option( 'host_name', 'https://login.xecurify.com' );\n\t}",
"public function pconnect(): void\n {\n }",
"public function connect() {\n $this->getConnectionSocket();\n }",
"public function connect()\n {\n $this->_client = new SoapClient($this->_magentoHost);\n $this->_session = $this->_client->login($this->_apiUser, $this->_apiKey);\n }",
"public function connect(): void\n {\n }",
"public function connect_to_site() {\n\t\treturn false;\n\t}",
"function connect() {\n\n\t\t// only if logins are set\n\t\tif ($this->server->ip && $this->server->port && $this->server->login && $this->server->pass) {\n\t\t\t// log console message\n\t\t\t$this->console('Try to connect to MP dedicated server on {1}:{2} timeout {3}s',\n\t\t\t $this->server->ip, $this->server->port,\n\t\t\t ($this->server->timeout !== null ? $this->server->timeout : 0));\n\n\t\t\t// connect to the server\n\t\t\tif (!$this->client->InitWithIp($this->server->ip, $this->server->port, $this->server->timeout)) {\n\t\t\t\ttrigger_error('[' . $this->client->getErrorCode() . '] InitWithIp - ' . $this->client->getErrorMessage(), E_USER_WARNING);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// log console message\n\t\t\t$this->console(\"Try to authenticate with login '{1}' and password '{2}'\",\n\t\t\t $this->server->login, $this->server->pass);\n\n\t\t\t// check login\n\t\t\tif ($this->server->login != 'SuperAdmin') {\n\t\t\t\ttrigger_error(\"Invalid login '\" . $this->server->login . \"' - must be 'SuperAdmin' in config.xml !\", E_USER_WARNING);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// check password\n\t\t\tif ($this->server->pass == 'SuperAdmin') {\n\t\t\t\ttrigger_error(\"Insecure password '\" . $this->server->pass . \"' - should be changed in dedicated config and config.xml !\", E_USER_WARNING);\n\t\t\t}\n\n\t\t\t// log into the server\n\t\t\tif (!$this->client->query('Authenticate', $this->server->login, $this->server->pass)) {\n\t\t\t\ttrigger_error('[' . $this->client->getErrorCode() . '] Authenticate - ' . $this->client->getErrorMessage(), E_USER_WARNING);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// enable callback system\n\t\t\t$this->client->query('EnableCallbacks', true);\n\n\t\t\t// wait for server to be ready\n\t\t\t$this->waitServerReady();\n\n\t\t\t// connection established\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// connection failed\n\t\t\treturn false;\n\t\t}\n\t}",
"public function connect()\n {\n }",
"public function connect()\n {\n }",
"public function connect()\n {\n }",
"protected function connect()\n {\n $url = $this->createUrl(\"\");\n // create curl resource\n $this->connection = curl_init();\n\n // set url\n curl_setopt($this->connection, CURLOPT_URL, $url);\n\n //return the transfer as a string\n curl_setopt($this->connection, CURLOPT_RETURNTRANSFER, 1);\n\n }",
"public abstract function Connect();",
"public function connect()\n {\n $this->connection = new \\Memcached('chopra_sso');\n $serverList = $this->connection->getServerList();\n\n $serverExists = false;\n foreach ($serverList as $server) {\n if ($server['host'] === $this->memcachedHost && $server['port'] === (int)$this->memcachedPort) {\n $serverExists = true;\n }\n }\n\n if (!$serverExists) {\n $this->connection->resetServerList();\n $res = $this->connection->addServer($this->memcachedHost, $this->memcachedPort);\n if (!$res) {\n throw new \\MemcachedException('Can\\'t connect to memcache server.');\n }\n }\n $this->connection->setOption(\\Memcached::OPT_SERIALIZER, \\Memcached::SERIALIZER_PHP);\n }",
"function start()\n{\n global $ipfsutils, $staticFile, $urlpath, $avahi_type, $avahi_port, $avahi_desc;\n $ret = execute_program_detached($ipfsutils.\" startDaemon $avahi_port $avahi_type\");\n //$output = ptxt(\" \". print_r($ret['output'][0],1));\n\n // Announce the IPFS instance to the community cloud via any of the\n // available methods -including IPFS itself, if enabled-\n $pub_res = avahi_publish($avahi_type, $avahi_desc, $avahi_port, null);\n\n setFlash(txt(t('ipfs_flash_publish')) . ptxt($pub_res));\n return(array('type'=>'redirect','url'=>$staticFile.$urlpath));\n}",
"public abstract function connect();",
"function connect() {\n $fedora_user = new stdClass();\n $fedora_user->name = $this->config->fedora->username;\n $fedora_user->pass = $this->config->fedora->password;\n $this->fedora_connect = new FedoraConnection($fedora_user, $this->config->fedora->protocol . '://' . $this->config->fedora->host . ':' . $this->config->fedora->port . '/fedora');\n }",
"private function connect() {\n\t\tif (!$this->connected) {\n\t\t\t$this->socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\t\t\t$this->connected = @socket_connect($this->socket, $this->host, $this->port);\n\t\t}\n\t}",
"public function __construct()\n {\n Socket::$isServer = true;\n self::$server = new sockbase();\n self::$server->onmsg(__NAMESPACE__ . '\\SqlPool::inmsg');\n self::$server->dismsg(__NAMESPACE__ . '\\SqlPool::dis');\n $poolconf = ng169\\lib\\Option::get('pool');\n self::$pwd = $poolconf['pwd'];\n\n self::$server->start($poolconf['ip'], $poolconf['port']);\n\n // self::$server->start(\"127.0.0.1\", \"4563\");\n }",
"protected function connect()\n {\n $res = $this->memc->connect(MEMCACHE_HOST, 11211);\n $this->namespace = MEMCACHE_NAMESPACE;\n if (MEMCACHE_DEBUG) {\n if ($res) {\n Logger::write('Memcache::connect(): connected');\n } else {\n Logger::write('Memcache::connect(): connect FAILED!');\n }\n }\n }",
"public function connect()\r\n {\r\n $this->log( \"Connecting to {$this->_server}:{$this->_port}\" );\r\n \r\n // open the connection\r\n $this->_conn = fsockopen( $this->_server, $this->_port, $errno, $errstr, 10 );\r\n \r\n if ( $this->_conn )\r\n {\r\n $this->log( \"Connected.\" );\r\n \r\n // start processing the data\r\n $this->main();\r\n }\r\n }",
"public function connect() {\n\n\t\t$this->_httpq = new HttpQPlayer(conf('localplay_httpq_hostname'),conf('localplay_httpq_password'),conf('localplay_httpq_port'));\n\n\t\t// Test our connection by retriving the version\n\t\tif (!is_null($this->_httpq->version())) { return true; }\n\n\t\treturn false;\n\n\t}",
"private function connect() {\n\t\tif(strtolower(trim($this->secure)) == 'ssl') {\n\t\t\t$this->server = 'ssl://' . $this->server;\n\t\t}\n\t\t$this->conn = fsockopen($this->server, $this->port, $errno, $errstr, $this->timeout);\n\t\tif (substr($this->getServerResponse(),0,3)!='220') { return false; }\n\t\treturn true;\n\t}",
"function connect() {\n\n $this->conn = imap_open('{'.$this->server.'/notls}', $this->user, $this->pass);\n\n}",
"public static function init() {\n if (getenv('ENV') == 'HEROKU') {\n self::$client = new Client(getenv('REDIS_URL'));\n } else {\n self::$client = new Client([\n 'host' => '127.0.0.1',\n ]);\n }\n }",
"public function preconnect(): void\n {\n }",
"public function __construct()\n\t{\n\t\t$this->url = (config_item('server_is_ssl') ? 'https://' : 'http://').\n\t\t\t\t\t\tconfig_item('server_user').':'.config_item('server_pass').'@'.\n\t\t\t\t\t\tconfig_item('server_name').':'.config_item('server_port').'/';\n\n\t\tlog_message('debug', 'Bitcoin connection set, with URL '.$this->url);\n\t}",
"abstract public function connect();",
"abstract public function connect();",
"abstract public function connect();",
"abstract public function connect();",
"abstract public function connect();",
"abstract public function connect();",
"abstract public function connect();",
"function vncurl ($jobid, $password, $uname, $session=[])\n{\n global $_SERVER;\n $ret = ['code'=>0, 'message'=>'success', 'url'=>''];\n // get user's home\n exec('getent passwd '.$uname.' | cut -d: -f6', $r, $errno);\n if ($errno != 0) {\n $ret['code'] = 200;\n $ret['message'] = 'cannot find user home'; \n return $ret;\n }\n $home = $r[0];\n\n // get session file\n if (sizeof($session) == 0) {\n $s = myFile_Get_Contents($home.'/.vnc/session.'.$jobid);\n\n if ($s === FALSE) {\n $ret['code'] = 0;\n $ret['message'] = \"can't find session file\";\n $ret['url'] = 'url wait';\n return $ret;\n }\n\n $s1 = explode(' ', $s);\n $host = $s1[0];\n $sid = $s1[1];\n } else {\n $sid = $session['sid'];\n $host = $session['host'];\n }\n\n $p = hexdec(substr(hash('md5', $uname.$jobid), 0, 4));\n if ($p < 16000)\n $p += 16000;\n $r = [];\n $vncport = strval(5900 + intval($sid));\n $lport = $p;\n exec('source /var/www/html/env.sh;echo $CB_ENVDIR', $r, $errno);\n $conff = $r[0].'/vncsub.yaml';\n $hostsFile = $r[0].'/hosts';\n\n $pp = '';\n $ssl = 0;\n $novnc = 'vnc.html';\n $httpport = '80';\n $httpsport = '443';\n exec('hostname', $hs, $errno);\n $publicaddr = $_SERVER['SERVER_NAME'];\n $myhost = $hs[0]; //$_SERVER['SERVER_NAME'];\n\n if (file_exists($hostsFile) && ip2long($host) === FALSE) {\n /* convert $host to IP */\n exec('grep '.$host.' '.$hostsFile.' | cut -d\" \" -f1', $ipout, $errno);\n if (sizeof($ipout) > 0)\n $host = $ipout[0];\n }\n \n error_reporting(E_ERROR);\n if (file_exists($conff) && ($conf = yaml_parse_file($conff)) !== FALSE) {\n if (isset($conf['pp']) && is_writable($conf['pp']) &&\n is_dir($conf['pp']))\n $pp = $conf['pp'];\n if (isset($conf['novnc']))\n $novnc = strpos($conf['novnc'], 'lite') !== FALSE ?\n 'vnc_lite.html' : 'vnc.html';\n if (isset($conf['ssl']))\n $ssl = 1;\n if (isset($conf['http_port']))\n if ($ssl == 0)\n $httpport = strval($conf['http_port']);\n else\n $httpsport = strval($conf['http_port']);\n if (isset($conf['pubweb_ip']))\n $publicaddr = $conf['pubweb_ip'];\n }\n if ($pp != '') {\n if ($ssl == 0) {\n $http = 'http://';\n $entryPoints = ['web'];\n } else {\n $http = 'https://';\n $entryPoints = ['websecure'];\n $httpport = $httpsport;\n }\n $conffile = $pp.'/web';\n }\n $cmd = $r[0].'/skyformvnc/novnc/utils/websockify/websockify.py '.\n '-D --run-once --timeout=30 ';\n if ($pp != '') {\n if ($ssl == 0) {\n $http = 'http://';\n $entryPoints = ['web'];\n } else {\n $http = 'https://';\n $entryPoints = ['websecure'];\n $httpport = $httpsport;\n }\n $conffile = $pp.'/'.$uname.$jobid.'.yaml';\n $url = '/portal/novnc/'.$novnc.'?autoconnect=true&host='.$publicaddr.\n '&port='.$httpport.'&password='.$password.\n '&resize=remote&quality=9&path=web'.$lport;\n $tconf = ['http'=>['routers'=>[\n 'to-novnc'.$lport=>[\n 'entryPoints'=>$entryPoints,\n 'rule'=>'PathPrefix(`/web'.$lport.'`)',\n 'service'=>'novnc'.$lport\n #, 'tls'=>['passthrough'=>'true']\n ]],\n 'services'=>[\n 'novnc'.$lport=>[\n 'loadBalancer'=>[\n 'servers'=>[['url'=>$http.$myhost.':'.$lport.'/']]\n ]]]\n ]];\n if ($ssl != 0)\n $tconf['http']['routers']['to-novnc'.$lport]['tls'] =\n ['passthrough'=>'true'];\n #['certificates'=>[['certFile'=>'/etc/pki/tls/certs/ca.crt',\n # 'keyFile'=>'/etc/pki/tls/private/ca.key']]];\n if (!file_exists($conffile)) {\n yaml_emit_file($conffile, $tconf);\n sleep(1);\n }\n } else {\n $url = '/novnc/'.$novnc.'?autoconnect=true&host='.$publicaddr.\n '&port='.$lport.'&password='.$password.\n '&resize=remote&quality=9';\n }\n if ($ssl == 0) {\n $cmd2exe = $cmd.$myhost.':'.$lport.' '.$host.':'.$vncport.\" 2>&1\";\n } else {\n $cmd2exe = $cmd.'--cert=/etc/pki/tls/certs/ca.crt '.\n '--key=/etc/pki/tls/private/ca.key --ssl-only '.\n $myhost.':'.$lport.' '.$host.':'.$vncport.\" 2>&1\"; \n }\n $out = shell_exec($cmd2exe);\n $ret['url'] = $url;\n return $ret;\n}",
"public function connect() {\n\t\treturn true;\n\t}",
"abstract protected function connect();",
"abstract protected function connect();",
"abstract protected function connect();",
"function connect();",
"protected function connect() \n {\n $this->socket = @stream_socket_client(\n $this->host.':'.$this->port,\n $errorNumber,\n $errorDescription,\n $this->timeout ? $this->timeout : ini_get('default_socket_timeout')\n );\n if ($this->socket) {\n if ($this->password!==null) {\n $this->executeCommand('AUTH', array($this->password)); \n }\n $this->executeCommand('SELECT', array($this->db));\n } else {\n throw new Exception(\n 'Failed to connect to redis: '.$errorDescription,\n (int)$errorNumber\n );\n }\n }",
"public function connect()\n {\n $this->connection->connect();\n }",
"public function getServer();",
"public function getServer();",
"public function connect()\r\n\t{\r\n\t\t//$this->link = qracle_connect();\r\n\t}",
"protected function connect() {\n $this->connection = 'resource';\n echo $this->name . ' connected '.\"<br>\" ;\n }",
"function connect()\r\n {\r\n $this->db = mysqli_connect(\"localhost\", \"root\", \"\", \"gtamasterserver\");\r\n\r\n if(!$this->db)\r\n {\r\n echo \"Failed to connect to database\";\r\n exit();\r\n }\r\n\t\t\r\n\t\theader(\"X-Powered-By: PHP/\" . phpversion() . \" & gtamasterserver/1.1\");\r\n }",
"public function connect() {\n\t\n\t\t// First thing we do is create a socket stream using the server config data.\n\t\t$this->socket = @stream_socket_client('tcp://'.$this->server['chat']['host'].\n\t\t':'.$this->server['chat']['port']);\n\t\t// If we managed to open a connection, we need to do one or two things.\n\t\tif($this->socket !== false) {\n\t\t\t// First we set the stream to non-blocking, so the bot doesn't pause when reading data.\n\t\t\tstream_set_blocking($this->socket, 0);\n\t\t\t// Now we make our handshake packet. Here we send information about the bot/client to the dAmn server.\n\t\t\t$data = 'dAmnClient '.$this->server['chat']['version'].LBR;\n\t\t\t$data.= 'agent='.$this->Agent.LBR;\n\t\t\t$data.= 'bot='.$this->Client.LBR;\n\t\t\t$data.= 'owner='.$this->owner.LBR;\n\t\t\t$data.= 'trigger='.$this->trigger.LBR;\n\t\t\t$data.= 'creator=photofroggy/[email protected]'.LBR.chr(0);\n\t\t\t// This is were we actually send the packet! Quite simple really.\n\t\t\t@stream_socket_sendto($this->socket, $data);\n\t\t\t// Now we have to raise a flag! This tells everything that we are currently trying to connect through a handshake!\n\t\t\t$this->connecting = true;\n\t\t\t// Finally, exit before this if case exits, so we can do the stuff that happens when the socket stream fails.\n\t\t\treturn true;\n\t\t}\n\t\t// All we do here is display an error message and return false dawg.\n\t\t$this->Warning('Could not open connection with '.$this->server['chat']['host'].'.');\n\t\treturn false;\n\t\n\t}",
"public function connect(): void\n {\n if ($this->socket === null) {\n $this->socket = @fsockopen($this->host, $this->port, $errNo, $errStr);\n\n if (!$this->socket) {\n throw new FaktoryException('Unable to connect to server: ' . $errStr);\n }\n\n $hi = $this->read();\n\n if (strpos($hi, \"HI\") !== 0) {\n $this->disconnect();\n throw new FaktoryException('Did not receive HI from server');\n }\n\n $data = json_decode(substr($hi, 2), true);\n\n if ($data['v'] !== 2) {\n $this->disconnect();\n throw new FaktoryException('Unsupported server version ' . $data['v']);\n }\n\n $options = $this->workerOptions;\n $options['v'] = 2;\n\n $this->writeCommand('HELLO', json_encode($options));\n }\n }",
"abstract public function initClient();",
"function conexion()\n {\n session_start();\n $conexion = pg_connect( \"host=localhost port=5432 dbname=rutas user=postgres password=narcos\" )\n or die('No se ha podido conectar al servidor.');\n }",
"public function connect()\n\t{\n\t\t$this->isConnected = false;\n\n\t\t$this->connectInternal();\n\t}",
"public function host();",
"private function func_connect() {\n $this -> lnk = mysql_connect($this -> host, $this -> user, $this -> password, true) OR die('Could not connect to the database - Why: '.mysql_error());\n mysql_select_db($this -> database) OR die('Could not find database: '.mysql_error());\n }",
"abstract function connect();",
"public function open() {\n $host = Configure::read('RedisSession.hostname');\n $port = Configure::read('RedisSession.port');\n $password = Configure::read('RedisSession.password');\n $database = Configure::read('RedisSession.database');\n\n if ($host !== null && $port !== null) {\n $redis = new iRedisForRedisSession(array('hostname' => $host, 'port' => $port));\n }\n else {\n $redis = new iRedisForRedisSession();\n }\n if (!empty($password)) {\n $redis->auth($password);\n }\n if (!empty($database)) {\n $redis->select($database);\n }\n\n self::$store = $redis;\n }",
"public function handle() {\n $username = \"finance.app\";\n $passwd = \"Rmnuxtugxsnto4mx\";\n $client = new Client([\"cookies\" => true]);\n $jar = new \\GuzzleHttp\\Cookie\\CookieJar();\n $resp1 = $client->get(\"https://na.intra.sina.com.cn/portal/index_default.jsp\", [\n \"cookies\" => $jar,\n \"headers\" => [\n \"User-Agent\" => \"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0\",\n \"x-insight\" => \"x-insight\",\n \"Upgrade-Insecure-Requests\" => 1,\n \"Host\" => \"na.intra.sina.com.cn\",\n \"Accept\" => \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\",\n \"Accept-Language\" => \"zh-CN,en;q=0.8,zh;q=0.5,en-US;q=0.3\",\n \"Accept-Encoding\" => \"gzip, deflate\",\n \"Connection\" => \"keep-alive\",\n \"Cache-Control\" => \"max-age=0\",\n ],\n ]);\n $params = [\n \"appRootUrl\" => \"https://na.intra.sina.com.cn/portal/\",\n \"assignIpType\" => \"0\",\n \"basip\" => \"\",\n \"customPageId\" => \"0\",\n \"dcPwdNeedEncrypt\" => \"1\",\n \"entrance\" => \"null\",\n \"ifEnablePortalEntrace\" => \"true\",\n \"itUrlPortalShareKey\" => \"cqy56OhH6aJ5qMPHtteayw==\",\n \"itUrl\" => \"http://www.sina.com.cn\",\n \"language\" => \"\",\n \"loginVerifyCode\" => \"\",\n \"manualUrl\" => \"http://www.sina.com.cn\",\n \"manualUrlEncryptKey\" => \"cqy56OhH6aJ5qMPHtteayw==\",\n \"portalProxyIP\" => \"10.211.1.1\",\n \"portalProxyPort\" => \"50200\",\n \"pwdMode\" => \"0\",\n \"userDynamicPwddd\" => \"\",\n \"userName\" => $username,\n \"userPwd\" => base64_encode($passwd),\n \"userip\" => \"\",\n \"usermac\" => \"null\",\n \"userurl\" => \"\",\n \"wlannasid\" => \"\",\n \"wlanssid\" => \"\",\n ];\n $resp = $client->request(\"POST\", \"https://na.intra.sina.com.cn/portal/pws?t=li\", [\n \"form_params\" => $params,\n \"cookies\" => $jar,\n \"headers\" => [\n \"User-Agent\" => \"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0\",\n \"Referer\" => \"https://na.intra.sina.com.cn/portal/index_default.jsp\",\n \"X-Requested-With\" => \"XMLHttpRequest\",\n \"x-insight\" => \"x-insight\",\n \"Upgrade-Insecure-Requests\" => 1,\n \"Host\" => \"na.intra.sina.com.cn\",\n \"Accept\" => \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\",\n \"Accept-Language\" => \"zh-CN,en;q=0.8,zh;q=0.5,en-US;q=0.3\",\n \"Accept-Encoding\" => \"gzip, deflate, br\",\n \"Connection\" => \"keep-alive\",\n \"Cache-Control\" => \"max-age=0\",\n \"Content-Type\" => \"application/x-www-form-urlencoded; charset=UTF-8\"\n ],\n ]);\n $resp = strval($resp->getBody());\n dump(json_decode(urldecode(base64_decode($resp))));\n }",
"private static function get_connect(){\n static::$db = pg_connect(static::$host . \" \" . static::$port . \" \" . static::$database . \" \" . static::$user . \" \" . static::$pass);\n }",
"public function connexionIntervenantLogin(){\n }",
"protected function _construct()\n {\n $this->_init('varnish/cms_page_store');\n }",
"public function connect () : void {\n\t\t\t$this->dbConnection = mysqli_connect($this->servername, $this->username, $this->password, $this->dbName);\n\n\t\t\tif($this->dbConnection == false)\n\t\t\t{\n\t\t\t die(mysqli_connect_error());\n\t\t\t}\n\n\t\t}",
"public function connect()\n {\n $this->connection = new \\Memcached();\n $result = $this->connection->addServer($this->host, $this->port);\n\n if (!$result) {\n unset($this->connection);\n }\n\n return $result;\n }",
"public function connect()\n {\n if (!$this->isConnected()) {\n $this->manager->connect();\n }\n }",
"private function __construct()\n {\n $this->connect();\n }",
"public function connect(){ //connrct to database\r\t\tif ($this->connected==false){\r\t\t\tif ($this->pers){\r\t\t\t\t$this->handle=sqlite_popen($this->server);\r\t\t\t}else{\r\t\t\t\t$this->handle=sqlite_open($this->server);\r\t\t\t}\r\t\t\t\r\t\t\t//$this->engine = new SQLiteDatabase($this->server);\r\t\t\t$this->connected=true;\r\t\t}//\r\t}",
"public static function http_server(): void\n {\n sock::$type = 'http:server';\n sock::$host = '0.0.0.0';\n sock::$port = 80;\n $ok = sock::create();\n\n if (!$ok) exit('HTTP Server creation failed!');\n\n do {\n //IMPORTANT!!! Reset all data & read list & client list\n $data = $read = $client = [];\n\n //Accept new connection\n sock::accept($read, $client);\n\n //Read HTTP Request data\n $msg = sock::read($client);\n\n var_dump($msg);\n\n //Prepare simple data\n $key = key($client);\n $sock = current($client);\n\n $data[$key]['sock'] = $sock;\n\n $data[$key]['msg'] = 'Hello! I am a simple HTTP Server running under PHP~';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= 'Your request message was: ';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= trim(current($msg)['msg']);\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= 'Thanks for your test!';\n\n //Send to browser\n $result = sock::write($data, $client);\n\n var_dump($result);\n\n } while (true);\n }",
"public function connect() {\n if (!($this->connection = ssh2_connect($this->ssh_host, $this->ssh_port))) {\n throw new Exception('Cannot connect to server');\n }\n\n if (!ssh2_auth_password($this->connection, $this->ssh_auth_user, $this->ssh_auth_pass)) {\n throw new Exception('Autentication rejected by server');\n }\n\n //If connection passed, save the connection info in Session to use it when commands in\n $_SESSION['user_ssh'] = $this->ssh_auth_user;\n $_SESSION['ssh_host'] = $this->ssh_host;\n $_SESSION['ssh_port'] = $this->ssh_port;\n $_SESSION['ssh_auth_pass'] = $this->ssh_auth_pass;\n\n }",
"public function connexion() {\n\t\t$vue = new View(\"Connexion\");\n\t\t$vue->generer();\n\t}",
"function connect()\n {\n $this->db = new MysqliAdapter($this->config[$this->sectionName]);\n \n if (isset($this->config[$this->sectionName]['username']) && isset($this->config[$this->sectionName]['password']))\n {\n if (!$this->db->connect())\n {\n writeLog('Could not connect to server', E_USER_ERROR);\n exit;\n }\n writeLog(\"connect successfull\");\n } \n else \n {\n writeLog(\"no username or password\");\n $this->unauthorized();\n exit;\n }\n }",
"public static function connect() {\n if (isset($_SESSION['login'])) {\n $type = \"Vous êtes déjà connecté\";\n $dataView = ControllerView::prepMenu();\n require_once File::build_path(array('view', 'erreur.php'));\n } else {\n $pagetitle = 'Authentification';\n $view = 'connect';\n $connexionErreur = \"\";\n $dataView = ControllerView::prepMenu();\n require File::build_path(array('view', 'view.php'));\n }\n }",
"public function __construct() {\n $this->siteRoot = 'http://127.0.0.1';\n $this->driver = new GoutteDriver();\n $this->session = new Session($this->driver);\n }",
"public function connect()\n\t \t{\n\t \t$this->cnn = mysqli_connect($this->hostname,$this->username,$this->pass,$this->dbname);\n\n\n\t \t\tif(!$this->cnn)\n\t \t\t{\n\t \t\t\techo 'ket noi khong thanh cong';\n\t \t\t}\n\t \t\telse {\n\t \t\t\t\n\t \t\t}\n\n\t \t\t // echo '<script> alert(\"Connection success\");</script>';\n\t\t \t}",
"public function connect() {\n $this->debugBacktrace();\n $this->connection = mysqli_connect($this->server, $this->user, $this->password, $this->database); \n\n if (!$this->connection) {\n $mysqlError = mysqli_error($this->connection);\n die('ERROR CODE: ARPOASRUWWER412547');\n } \n }",
"protected function _connect() {\r\n\r\n\t\ttry {\r\n\t\t\t$this->_phpseclib = new \\Net_SSH2( $this->config('ssh.host'), $this->config('ssh.port'), $this->config('ssh.timeout') );\r\n\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\tthrow new \\Exception('Unable to connect to SSH server.');\r\n\t\t}\r\n\r\n\t}",
"function ssh_tunnel_call() : void\n{\n if (app()->environment('production')) {\n shell_exec(\"ssh -i /usr/home/hzkmbi/.ssh/id_rsa_adomino_com -f -N [email protected] -L 33306:127.0.0.1:3306 && echo 'Done'\");\n }\n}"
] | [
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.58205396",
"0.5793704",
"0.5756517",
"0.56693065",
"0.56374556",
"0.55457085",
"0.55101967",
"0.55098546",
"0.55064243",
"0.5502673",
"0.54596734",
"0.5459073",
"0.54427135",
"0.54312515",
"0.5406875",
"0.540141",
"0.5385244",
"0.53822297",
"0.5376642",
"0.53761464",
"0.53683996",
"0.5361823",
"0.53505474",
"0.5338672",
"0.5338672",
"0.5338672",
"0.53348583",
"0.532312",
"0.53176415",
"0.5313465",
"0.5306686",
"0.53027076",
"0.529179",
"0.52845263",
"0.527103",
"0.52623296",
"0.52525264",
"0.5248777",
"0.5238199",
"0.5232987",
"0.52329266",
"0.5212356",
"0.5211878",
"0.5211878",
"0.5211878",
"0.5211878",
"0.5211878",
"0.5211878",
"0.5211878",
"0.5198688",
"0.5138617",
"0.5137072",
"0.5137072",
"0.5137072",
"0.5103103",
"0.5100381",
"0.5089423",
"0.50848997",
"0.50848997",
"0.5082437",
"0.5075212",
"0.5061613",
"0.5053626",
"0.5050704",
"0.5007218",
"0.49969155",
"0.49808493",
"0.4972771",
"0.4971606",
"0.49647632",
"0.49512297",
"0.4948781",
"0.4948173",
"0.4942109",
"0.4939618",
"0.49362645",
"0.4928069",
"0.49270374",
"0.49270087",
"0.4923472",
"0.49190077",
"0.4918205",
"0.49167815",
"0.49158803",
"0.49152237",
"0.4900488",
"0.48956868",
"0.48907232",
"0.4887807",
"0.48862374"
] | 0.5321499 | 38 |
Disconnects from the Varnish server | public function disconnect() {
if ($this->isConnected()) {
fclose($this->handle);
$this->handle = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function disconnect();",
"public function disconnect();",
"public function disconnect();",
"public function disconnect();",
"public function disconnect();",
"public function disconnect();",
"public function disconnect();",
"public function disconnect();",
"public function disconnect(): void;",
"function Disconnect() {}",
"public function disconnect() {\n $this->exec('echo \"EXITING\" && exit;');\n $this->connection = null;\n }",
"function disconnect() ;",
"public function disconnect() {\n $this->exec('exit;');\n $this->connection = null;\n }",
"public function disconnect()\n {\n $this->client->close();\n }",
"abstract public function disconnect();",
"abstract public function disconnect();",
"abstract public function disconnect();",
"public function disconnect()\r\n {\r\n }",
"public function disconnect()\n\t{\n\t}",
"public function disconnect(): void\n {\n }",
"public function disconnect() {\n if ($this->client) {\n $this->client->disconnect();\n }\n }",
"public function disconnect() {\r\n\t\t//print_r( 'PhpseclibClient::disconnect()');\r\n\t\tif ($this->connected()) {\r\n\t\t\t$this->_disconnect();\r\n\t\t}\r\n\t}",
"public function quit(){\n try {\n $this->execute('quit', $statusCode, 500);\n } catch (VarnishException $exception) {\n\n }\n\n $this->disconnect();\n }",
"protected function disconnect() {\n $this->connection = null;\n echo $this->name . ' disconnected' .\"<br>\";\n }",
"public function disconnect()\n {\n $this->connection->disconnect();\n }",
"public static function disconnect()\n\t{\n\t\tself::getConnection()->disconnect();\n\t}",
"public static function disconnect() {\n\tself::$instance->disconnect();\n }",
"public function pdisconnect(): void\n {\n }",
"public function Disconnect () {\n $this->sendString('QUIT');\n\n fclose($this->pop_conn);\n }",
"public function disconnect()\n\t{\n\t\tself::$connected_client[self::$connection_params]->disconnect();\n\t\tself::$connected_client[self::$connection_params] = null;\n\t}",
"public function disconnect()\n\t{\n\t\t$this->disconnectInternal();\n\t}",
"public function disconnect() {\n\t\t@fclose ( $this->socket );\n\t}",
"public function disConnect();",
"public function disconnect()\n {\n $this->info(\"Disconnecting from @$this->alias\");\n ssh2_disconnect($this->connection);\n }",
"public function disconnect() {\n \n $this->con = null;\n \n }",
"protected function disconnect()\r\n {\r\n $this->log( \"Closing connection and shutting down.\" );\r\n \r\n fclose( $this->_conn );\r\n exit;\r\n }",
"public function disconnect()\n {\n parent::disconnect();\n\n unset($this->connection);\n }",
"public function disconnect(){\n\t\t$this->Connection = null;\n\t}",
"protected function disconnectIfConnected() {}",
"public function disconnect()\r\n {\r\n if ( $this->state != self::STATE_NOT_CONNECTED )\r\n {\r\n $this->connection->sendData( 'QUIT' );\r\n $this->connection->getLine(); // discard\r\n $this->state = self::STATE_UPDATE;\r\n\r\n $this->connection->close();\r\n $this->connection = null;\r\n $this->state = self::STATE_NOT_CONNECTED;\r\n }\r\n }",
"protected function _disconnect() {\n\t\t@fclose($this->socket);\n\t\t$this->socket = NULL;\n\t}",
"public function disconnect()\n {\n if ($this->m_connect) $this->m_connect->Disconnect();\n }",
"public function disconnect()\n\t{\n\t\t$this->_connection = null;\n\t}",
"public function test_squad_server_disconnect()\n {\n $this->assertNull($this->postScriptumServer->disconnect());\n }",
"public static function disconnect(){\n\t\tself::$cnx = NULL;\t\n\t\t\n\t}",
"public function disconnect() \n\t{\n\t\tunset($this->connection);\n\t}",
"public function disconnect() {\n if ( ! empty( $_GET['disconnect'] ) ) {\n update_option( self::INSTAGRAM_CODE, '' );\n update_option( self::INSTAGRAM_USER_ID, '' );\n update_option( self::INSTAGRAM_TOKEN, '' );\n update_option( self::INSTAGRAM_TOKEN_LONG_LIVED, '' );\n update_option( self::INSTAGRAM_TOKEN_LONG_LIVED_TIME, '' );\n update_option( self::FACEBOOK_CODE, '' );\n update_option( self::FACEBOOK_TOKEN, '' );\n update_option( self::CONNECTION_TYPE, '' );\n }\n\n return '';\n }",
"public function disconnect()\n {\n $this->cluster = null;\n }",
"public function quit()\n {\n $this->disconnect();\n }",
"public function disconnect($connection);",
"public function __destruct()\n\t{\n\t\tif ( null !== self::$connected_client[self::$connection_params] )\n\t\t{\n\t\t\t$this->disconnect();\n\t\t}\n\t}",
"abstract protected function dbDisconnect();",
"public function disconnect() : void\r\n {\r\n fclose($this->connection);\r\n }",
"function __DESTRUCT() {\n self::disconnect();\n }",
"function disconnect(){\n\t\t$this->dbconn = null;\n\t\t$this->logger->info('RECOLIN DB DB disconnected successfully');\n\t}",
"function disconnect ()\n {\n if ( $this->socket )\n {\n $this->writeFrame(new StompFrame('DISCONNECT'));\n }\n socket_shutdown($this->socket, 1);\n usleep(500);\n socket_shutdown($this->socket, 2);\n socket_close($this->socket);\n $this->socket = NULL;\n }",
"function DbDisconnect() { \n \t\t$this->close = @mysql_close($this->linkId) or die (\"Error in disconnecting to server: \".mysql_error()); \n\t}",
"public function testDisconnect()\n {\n $this->server->disconnect();\n\n # Check a standard disconnection\n $this->server->connect();\n $this->server->disconnect();\n\n # Ensure a second disconnect is cool\n $this->assertTrue($this->server->disconnect());\n }",
"public function __destruct() {\n // disconnect\n $this->host = null;\n }",
"function disconnect(Shard $shard, int $code, string $reason);",
"private function _disconnect()\n {\n //\tDisconnect\n $this->_db->conn = null;\n $this->_db->clear();\n }",
"function Disconnect() \r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"Disconnect()\\n\";\r\n\t\tif( $this->socket )\r\n\t\t\tfclose( $this->socket );\r\n\t}",
"function disconnectBL() {\n if ( !empty($_SESSION['userId']) )\n {\n echo 'Bye '.$_SESSION['userId'];\n session_destroy();\n }\n else\n {\n echo \"notConnected\";\n }\n }",
"public function __destruct() {\r\n\t\ttry {\r\n\t\t\t$this->disconnect();\r\n\t\t} catch (\\Exception $e) { // avoid fatal error on script termination\r\n\t\t}\r\n\t}",
"function disconnection()\n {\n session_start();\n session_destroy();\n header('Location: /backend/connection');\n return http_response_code(302);\n }",
"protected function connectionDestruct()\t{}",
"public function test_squad_server_disconnect()\n {\n $this->assertNull($this->btwServer->disconnect());\n }",
"public function test_squad_server_disconnect()\n {\n $this->assertNull($this->btwServer->disconnect());\n }",
"public static function disconnect() {\n mysqli_close(self::$link);\n }",
"function __destruct()\n {\n $this->disconnect();\n }",
"public function __destruct() {\n $this->disconnect();\n }",
"public function __destruct()\n {\n $this->disconnect(true);\n }",
"public function Desconecta()\n\t{\n\t\t$this->conn = null;\n\t}",
"public function __destruct()\n {\n $this->disconnect();\n }",
"public function __destruct()\n {\n $this->disconnect();\n }",
"function disconnect()\r\n {\r\n \r\n setcookie('pseudo', '');\r\n setcookie('pass', '');\r\n session_start();\r\n session_destroy();\r\n \r\n $postManager = new Writer\\Blog\\Model\\PostManager();\r\n $blog = new Writer\\Blog\\Model\\BlogManager;\r\n $posts = $postManager->getPosts();\r\n $infosBlog = $blog->getBlog();\r\n \r\n require('view/frontend/listPostsView.php');\r\n \r\n }",
"function __destruct() {\r\n\t\t$this->disconnect();\r\n\t}",
"protected function disconnect()\n {\n $this->pd = null;\n }",
"public function disconnect()\n\t{\n\t\tself::$connected_client[$this->profile]->disconnect();\n\t\tself::$connected_client[$this->profile] = null;\n\t}",
"function close() {\n\t\t$this->disconnect();\n\t}",
"public function __destruct()\n\t{\n\t\tforeach ( self::$connected_client as $client )\n\t\t{\n\t\t\t$client->disconnect();\n\t\t}\n\t}",
"public function __destruct(){\n\t\t$this->disconnect();\n\t}",
"public function __destruct()\n {\n try {\n $this->disconnect(true);\n } catch (Exception $e) {\n }\n }",
"public function __destruct() \n {\n $this->disconnect();\n }",
"public function __destruct()\r\n {\r\n if ( $this->state != self::STATE_NOT_CONNECTED )\r\n {\r\n $this->connection->sendData( 'QUIT' );\r\n $this->connection->getLine(); // discard\r\n $this->connection->close();\r\n }\r\n }",
"public function disconnect()\n\t{\n $this->neoeloquent->disconnect();\n\t}",
"abstract function disconnect($socket);",
"public function disconnect() {\n $this->db = null;\n }",
"function disconnect() {\n if ($this->isConntected()) {\n mysql_close($this->connectionId);\n }\n }",
"function Disconnect()\n {\n //SQL::CleanOverhead();\n mysql_close($this->LinkID);\n #$mysqli->close;\n }",
"public function disconnect(){\n\t\t$this->connected=false;\n\t\tif(is_file($this->cookiefile)){\n\t\t\tunlink($this->cookiefile);\n\t\t}\n\t\t$this->cookiefile=false;\n\t}",
"public function disconnect()\n {\n $this->execute('exit');\n \n return true;\n }",
"function __destruct(){\n\t\t$this->disconnect();\n\t}",
"function db_disconnect($link) // Colorize: green\n { // Colorize: green\n $link->close(); // Colorize: green\n }",
"function my_ssh_disconnect($reason, $message, $language) {\n printf(\"Server disconnected with reason code [%d] and message: %s\\n\",\n $reason, $message);\n}",
"public function disconnect(){\n\t\n\t//TODO: Custom Error reporting\n\ttry {\n\t\t\n\t\t\t$this->_db = NULL;\n\t\t\t}\n\tcatch(PDOException $e) {\n\t\t\t//xxx Custom Error thingy!!!\n\t\t\t_b($e->getMessage());\n\t\t}\n\t\t\t\t\n\t}",
"function ts3client_stopConnection($serverConnectionHandlerID, $quitMessage) {}",
"public function __destruct()\n\t{\n\t\t$this->disconnect();\n\t}",
"function disconnect()\n {\n @mysql_close( $this->link_id() );\n }",
"public function disconnect() {\n $this->db = null;\n }",
"function __destruct() {\n $this->Disconnect();\n unset($this);\n }"
] | [
"0.75459766",
"0.75459766",
"0.75459766",
"0.75459766",
"0.75459766",
"0.75459766",
"0.75459766",
"0.75459766",
"0.7341613",
"0.7239714",
"0.71829635",
"0.7096264",
"0.7093106",
"0.70779693",
"0.70310307",
"0.70310307",
"0.70310307",
"0.7028581",
"0.6955345",
"0.6946047",
"0.6903994",
"0.68954563",
"0.6862468",
"0.6765301",
"0.67621434",
"0.6722679",
"0.6718169",
"0.6710607",
"0.6699574",
"0.66985583",
"0.66664356",
"0.6586867",
"0.6565249",
"0.65410036",
"0.6512881",
"0.64920276",
"0.6474042",
"0.6465497",
"0.6463133",
"0.6453567",
"0.64439523",
"0.6424488",
"0.6407082",
"0.6375083",
"0.63640314",
"0.6341624",
"0.632641",
"0.63082814",
"0.6301899",
"0.6300852",
"0.62952125",
"0.6290352",
"0.6284342",
"0.62639076",
"0.6253992",
"0.62403095",
"0.6240175",
"0.6228999",
"0.61635506",
"0.61384034",
"0.61364436",
"0.61341006",
"0.6096928",
"0.6084061",
"0.60716146",
"0.6070657",
"0.60521466",
"0.60521466",
"0.60430616",
"0.6037841",
"0.60251456",
"0.6022709",
"0.6008774",
"0.59978426",
"0.59978426",
"0.59578156",
"0.59557307",
"0.59529936",
"0.59516215",
"0.5940608",
"0.59363014",
"0.5924605",
"0.5921056",
"0.5908342",
"0.5906193",
"0.590447",
"0.59014225",
"0.5895608",
"0.5893227",
"0.5889412",
"0.5882319",
"0.58814514",
"0.587729",
"0.58659333",
"0.585914",
"0.58467597",
"0.58298445",
"0.58282197",
"0.5824049",
"0.5823325",
"0.5821065"
] | 0.0 | -1 |
Reads from the server connection | protected function read(&$statusCode = null) {
// get bytes until we have either a response code and message length or
// an end of file.
// code should be on first line, so we should get it in one chunk
while (!feof($this->handle)) {
$response = fgets($this->handle, 1024);
if (!$response) {
$meta = stream_get_meta_data($this->handle);
if ($meta['timed_out']) {
throw new VarnishException('Could not read from ' . $this->host . ' on port ' . $this->port . ': Connection timed out');
}
}
if (preg_match('/^(\d{3}) (\d+)/', $response, $matches)) {
$statusCode = (int) $matches[1];
$responseLength = (int) $matches[2];
break;
}
}
if (is_null($statusCode)) {
throw new VarnishException('Could not read from ' . $this->host . ' on port ' . $this->port . ': No response status code received');
}
$response = '';
while (!feof($this->handle) && strlen($response) < $responseLength) {
$response .= fgets($this->handle, 1024);
}
return $response;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function readSocket()\n {\n $output = socket_read($this->socket, 2048);\n\n echo $output;\n socket_close($this->socket);\n }",
"public function getReadConnection() {}",
"public function read() {\n\t\tif ($this->active === null) {\n\t\t\tthrow new Swift_ConnectionException ( \"None of the connections set have been started\" );\n\t\t}\n\t\treturn $this->connections [$this->active]->read ();\n\t}",
"protected function _read()\n {\n $flags = ord(fread($this->_socket, 1));\n $info = stream_get_meta_data($this->_socket);\n\n if ($info['timed_out'] === true) {\n fclose($this->_socket);\n throw new Zend_TimeSync_Exception('could not connect to ' .\n \"'$this->_timeserver' on port '$this->_port', reason: 'server timed out'\");\n }\n\n $result = [\n 'flags' => $flags,\n 'stratum' => ord(fread($this->_socket, 1)),\n 'poll' => ord(fread($this->_socket, 1)),\n 'precision' => ord(fread($this->_socket, 1)),\n 'rootdelay' => $this->_getFloat(fread($this->_socket, 4)),\n 'rootdispersion' => $this->_getFloat(fread($this->_socket, 4)),\n 'referenceid' => fread($this->_socket, 4),\n 'referencestamp' => $this->_getTimestamp(fread($this->_socket, 8)),\n 'originatestamp' => $this->_getTimestamp(fread($this->_socket, 8)),\n 'receivestamp' => $this->_getTimestamp(fread($this->_socket, 8)),\n 'transmitstamp' => $this->_getTimestamp(fread($this->_socket, 8)),\n 'clientreceived' => microtime(true)\n ];\n\n $this->_disconnect();\n return $result;\n }",
"function read()\n {\n $response_content = '';\n if ($this->headers['Transfer-Encoding'] == 'chunked')\n {\n while ($chunk_length = hexdec(fgets($this->socket)))\n {\n $response_content_chunk = '';\n $read_length = 0;\n\n while ($read_length < $chunk_length)\n {\n $response_content_chunk .= fread($this->socket, $chunk_length - $read_length);\n $read_length = strlen($response_content_chunk);\n }\n\n $response_content .= $response_content_chunk;\n fgets($this->socket);\n }\n }\n else\n {\n while (!feof($this->socket))\n {\n $response_content .= fgets($this->socket, 128);\n }\n }\n return chop($response_content);\n fclose($this->socket);\n }",
"function Read($length=1) \r\n{ \r\nif(intval($length) <= 0) \r\n{ \r\n$this->LastError = \"Cannot read zero or less bytes\"; \r\nreturn null; \r\n} \r\n//** no connection is available to read from, no data can be read. \r\n\r\nelse if(!$this->isOpen()) \r\n{ \r\n$this->LastError = \"No connection available for reading\"; \r\nreturn null; \r\n} \r\nelse //** a valid connection identifier is available. \r\n{ \r\n$this->_SetTimeout(); //** ensure timeout is set. \r\nreturn fread($this->Socket, $length); //** attempt to read n-bytes. \r\n} \r\n}",
"public function read()\n {\n $this->response = $this->transport->read();\n return $this->response;\n }",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function read();",
"public function processRead()\n {\n if (feof($this->socket)) {\n $this->log('Client closed remote socket', Loggable::LEVEL_WARN);\n $this->disconnect();\n } else if ($this->securityMethod && !$this->cryptoComplete) {\n $this->log('Continuing crypto negotiation');\n\n $success = stream_socket_enable_crypto($this->socket, true, $this->securityMethod);\n if ($success === false) {\n $this->log('stream_socket_enable_crypto() failed: ' . $this->getLastSocketError(), Loggable::LEVEL_WARN);\n $this->trigger('error', $this, 'stream_socket_enable_crypto() failed: ' . $this->getLastSocketError());\n\n $this->disconnect();\n } else if ($success) {\n $this->log('Crypto negotiation complete');\n $this->cryptoComplete = true;\n\n $this->trigger('cryptoenabled', $this);\n }\n } else {\n $this->readDataIntoBuffer();\n\n if (!$this->handshake->isComplete()) {\n $this->shakeHands();\n } else {\n // keep processing until there are no complete frames left in the buffer\n while ($this->messageDecoder->processData($this->buffer));\n }\n }\n }",
"public function read($length) {\n\n $readArray = array($this->client);\n $writeArray = array();\n $errorArray = array();\n $count = swoole_client_select($readArray, $writeArray, $errorArray, 1);\n foreach($readArray as $client) {\n $data = $client->recv($length);\n }\n $dataArray = unpack(\"N\", $data);\n $length = $dataArray[1];\n $data = $length . substr($data, -$length);\n return $data;\n }",
"public function readStream();",
"function readSocket($socket, &$buffer)\n {\n \n return @socket_recv($socket, $buffer, $this->confReadLength, 0);\n }",
"public function getReadConnection()\n {\n return $this->_getReadAdapter();\n }",
"public function read() {\r\n }",
"private function read_reply() {\n\t\t\t$reply = fgets($this->connection);\n\t\t\t$status = substr($reply, 0, 1);\n\t\t\t$reply = trim(substr($reply, 1));\n\t\t\tswitch ($status) {\n\t\t\t\tcase '-': // error\n\t\t\t\t\tthrow new Exception($reply);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+': // single line\n\t\t\t\t\tif ($reply == 'OK') return true;\n\t\t\t\t\treturn $reply;\n\t\t\t\t\tbreak;\n\t\t\t\tcase ':': // integer\n\t\t\t\t\treturn (integer)$reply;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '$': // bulk\n\t\t\t\t\treturn $this->bulk_reply($reply);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\t$resp = array();\n\t\t\t\t\tfor ($i=0; $i < $reply; $i++) { \n\t\t\t\t\t\t$resp[$i] = $this->read_reply();\n\t\t\t\t\t}\n\t\t\t\t\treturn $resp;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Exception('Unexpected response');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"public function Read()\n\t{\n\t\treturn $this->OnRead();\n\t}",
"public function read(){\n \treturn ser_read();\n }",
"abstract public function read();",
"public function getReadConnectionService() {}",
"public function read() {\n\t\t\n\t}",
"public function onReadAvailable()\n\t{\n\t\t$s = @fread($this->stream, 0xffff);\n\n\t\tif ($s === false || @feof($this->stream)) {\n\t\t\t$this->close();\n\n\t\t} else {\n\t\t\t$this->readBuffer .= $s;\n\n\t\t\twhile (($l = strlen($this->readBuffer)) >= 8) {\n\t\t\t\t$frame = unpack(\"Cversion/Ctype/nrequestId/ncontentLength/CpaddingLength\", $this->readBuffer);\n\t\t\t\t$type = $frame[\"type\"];\n\t\t\t\t$requestId = $frame[\"requestId\"];\n\t\t\t\t$contentLength = $frame[\"contentLength\"];\n\t\t\t\t$paddingLength = $frame[\"paddingLength\"];\n\n\t\t\t\tif ($l < 8 + $contentLength + $paddingLength) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$this->contentBuffer = substr($this->readBuffer, 8, $contentLength);\n\t\t\t\t$this->readBuffer = substr($this->readBuffer, 8 + $contentLength + $paddingLength) ?: \"\";\n\n\t\t\t\tif ($frame[\"version\"] !== 1) {\n\t\t\t\t\t$this->handler->onError(\n\t\t\t\t\t\tnew ConnectionException(\"Protocol version mismatch. Expected 1, got {$frame[\"version\"]}.\"),\n\t\t\t\t\t\t$this\n\t\t\t\t\t);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($type === Constants::TYPE_PARAMS) {\n\t\t\t\t\t$this->onParamsFrame($requestId);\n\n\t\t\t\t} elseif ($type === Constants::TYPE_STDIN) {\n\t\t\t\t\t$this->onStdinFrame($requestId);\n\n\t\t\t\t} elseif ($type === Constants::TYPE_BEGIN_REQUEST) {\n\t\t\t\t\t$this->onBeginRequestFrame($requestId);\n\n\t\t\t\t} elseif ($type === Constants::TYPE_ABORT_REQUEST) {\n\t\t\t\t\t$this->onAbortRequestFrame($requestId);\n\n\t\t\t\t} elseif ($type === Constants::TYPE_GET_VALUES) {\n\t\t\t\t\tif ($requestId !== Constants::NULL_REQUEST_ID) {\n\t\t\t\t\t\t$this->closeWithError(\"Received frame GET-VALUES on non-null-request id channel.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->onGetValuesFrame();\n\t\t\t\t\t}\n\n\t\t\t\t} elseif ($type === Constants::TYPE_END_REQUEST) {\n\t\t\t\t\t$this->closeWithError(\"Received unexpected frame: END-REQUEST.\");\n\n\t\t\t\t} elseif ($type === Constants::TYPE_STDOUT) {\n\t\t\t\t\t$this->closeWithError(\"Received unexpected frame: STDOUT.\");\n\n\t\t\t\t} elseif ($type === Constants::TYPE_STDERR) {\n\t\t\t\t\t$this->closeWithError(\"Received unexpected frame: STDERR.\");\n\n\t\t\t\t} elseif ($type === Constants::TYPE_DATA) {\n\t\t\t\t\t$this->onDataFrame($requestId);\n\n\t\t\t\t} elseif ($type === Constants::TYPE_GET_VALUES_RESULT) {\n\t\t\t\t\t$this->closeWithError(\"Received unexpected frame: GET-VALUES-RESULT.\");\n\n\t\t\t\t} elseif ($type === Constants::TYPE_UNKNOWN_TYPE) {\n\t\t\t\t\t$this->contentBuffer = \"\";\n\n\t\t\t\t} else {\n\t\t\t\t\t$this->closeWithError(\"Unhandled request type #{$type}, closing connection.\");\n\t\t\t\t}\n\n\t\t\t\tif (!$this->closed && !empty($this->contentBuffer)) {\n\t\t\t\t\t$this->closeWithError(\"Content buffer hasn't been fully consumed.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function onRead();",
"public function read ()\n {\n return $this->read();\n }",
"function readHttpReq( &$conn ) {\n\t// Read up to 5 kB in one go.\n\t$req = @socket_read( $conn, 5120 );\n\treturn $req ? strstr( $req, \"\\n\", true ) : false;\n}",
"public function read() {\n\t\t// For head requests\n\t\tif ($this->isEmptyBody) {\n\t\t\t$this->close();\n\t\t\treturn \"\";\n\t\t}\n\n\t\t// Currently we don't support any content encodings like gzip or deflate\n\t\t// TODO: Implement this if needed\n\t\tif ($this->contentEncoding) {\n\t\t\tthrow new MOXMAN_Http_HttpClientException(\"Unsupported content encoding: \" . $this->contentEncoding);\n\t\t}\n\n\t\t// Read uncompressed chunk\n\t\t$data = $this->readChunk();\n\n\t\t// Close connection when there is no more data\n\t\tif ($data === \"\") {\n\t\t\t$this->close();\n\t\t}\n\n\t\treturn $data;\n\t}",
"public function read()\n {\n }",
"public function read($timeout = 500, $size = 8192)\n\t{\n\t\tif(is_resource($this->socket))\n\t\t{\n\t\t\t$loops = 0;\n\t\t\t$starttime = microtime(true);\n\t\t\t$read = array($this->socket);\n\t\t\t$null = null;\n\t\t\t\n\t\t\t/*$a = stream_get_meta_data($this->socket);\n\t\t\tprint_r($a);\n\t\t\t$result = stream_socket_recvfrom($this->socket, 1024);\n\t\t\t//die($result);\n\t\t\t*/\n\t\t\twhile(($t = $timeout * 1000 - (microtime(true) - $starttime) * 10000) > 0)\n\t\t\t{\n\t\t\t\t$s = stream_select($read, $null, $null, 0, $t);\n\t\t\t\tif(($s === false || $s <= 0) || ++$loops > 200)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\n\t\t\t\tif($size > 8192)\n\t\t\t\t{\n\t\t\t\t\t$buffer = '';\n\t\t\t\t\twhile(! feof($this->socket))\n\t\t\t\t\t{\n\t\t\t\t\t\t$buffer .= fgets($this->socket);\n\t\t\t\t\t}\n\t\t\t\t\t$result = trim($buffer);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$result = stream_socket_recvfrom($this->socket, $size);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t}\n\t}",
"function ReadLine() \r\n{ \r\n//** no connection is available to read from, no data can be read. \r\n\r\nif(!$this->isOpen()) \r\n{ \r\n$this->LastError = \"No connection available for reading\"; \r\nreturn null; \r\n} \r\n//** continue to read in data until a line ends with the newline character(s). \r\n//** This is safe as the 'fgets()' function will not read past a newline \r\n//** character. Ensure that the read buffer is at least the minumum size. If \r\n//** one iteration is complete and no data was read in the socket blocking \r\n//** expired. Stop reading at that point. \r\n\r\n$streamdata = \"\"; //** no data to start with. \r\n$sockethasexpired = false; //** initially no timeout experienced. \r\n\r\nwhile(!$this->_EndsWithNewLine($streamdata) && !$sockethasexpired) \r\n{ \r\n$this->_SetTimeout(); //** ensure socket timeout is set. \r\n\r\n$streamdata .= fgets($this->Socket, 23); // max(TcpClientMinBufferSize, \r\n//$this->ReceiveBufferSize)); \r\n\r\n//** if ever at the point where reading has occurred and no data is available \r\n//** a socket timeout has occurred. Exit the loop and set the error. \r\n\r\nif(strlen($streamdata) == 0) \r\n{ \r\n$sockethasexpired = true; \r\nreturn \"The read took longer than $this->Timeout ms\"; \r\n//$this->LastError = \"The read took longer than $this->Timeout ms\"; \r\n} \r\n} \r\nreturn $streamdata; //** return the data received, including newline. \r\n}",
"protected function _read($length) {\n $data = false;\n if (!feof($this->_socket)) {\n $data = fread($this->_socket, $length);\n }\n return $data;\n }",
"public function read()\n {\n }",
"function sock_read($i=0)\n\t{\n\t\t$s = fgets($this->sock,4096);\n\n\t\t$this->log($s);\n\t\tif($s=='')\n\t\t{\n\t\t\tif($i==30)\n\t\t\t{\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsleep(1);\n\t\t\t\treturn $this->sock_read($i+1);\n\t\t\t}\n\t\t}\n\t\treturn $s;\n\t}",
"function _PacketRead() {\n\t\t$retarray = array();\n\n\t\t//Fetch the packet size\n\t\twhile ($size = @fread($this->_Sock,4)) {\n\t\t\t$size = unpack('V1Size',$size);\n\t\t\t//Work around valve breaking the protocol\n\t\t\tif ($size[\"Size\"] > 4096) {\n\t\t\t\t//pad with 8 nulls\n\t\t\t\t$packet = \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\".fread($this->_Sock,4096);\n\t\t\t} else {\n\t\t\t\t//Read the packet back\n\t\t\t\t$packet = fread($this->_Sock, $size[\"Size\"]);\n\t\t\t}\n\n\t\t\tarray_push($retarray,unpack(\"V1ID/V1Response/a*S1/a*S2\",$packet));\n\t\t}\n\t\treturn $retarray;\n\t}",
"function read()\n {\n }",
"public function baseRead($socket)\n {\n while($buffer = fread($socket, self::READ_BUFFER_SIZE))\n {\n $this->_recvBuffer .= $buffer; \n }\n \n if($this->_recvBuffer)\n {\n if(!$this->onMessage)\n {\n return ;\n }\n \n // protocol has been set\n if($this->protocol)\n {\n $parser = $this->protocol;\n while($this->_recvBuffer)\n {\n // already know current package length \n if($this->_currentPackageLength)\n {\n // we need more buffer\n if($this->_currentPackageLength > strlen($this->_recvBuffer))\n {\n break;\n }\n }\n else\n {\n // try to get the current package length\n $this->_currentPackageLength = $parser::input($this->_recvBuffer, $this);\n // need more buffer\n if($this->_currentPackageLength === 0)\n {\n break;\n }\n elseif($this->_currentPackageLength > 0 && $this->_currentPackageLength <= self::$maxPackageSize)\n {\n // need more buffer\n if($this->_currentPackageLength > strlen($this->_recvBuffer))\n {\n break;\n }\n }\n // error package\n else\n {\n $this->close('error package. package_length='.var_export($this->_currentPackageLength, true));\n }\n }\n \n // recvived the whole data \n self::$statistics['total_request']++;\n $one_request_buffer = substr($this->_recvBuffer, 0, $this->_currentPackageLength);\n $this->_recvBuffer = substr($this->_recvBuffer, $this->_currentPackageLength);\n $this->_currentPackageLength = 0;\n try\n {\n call_user_func($this->onMessage, $this, $parser::decode($one_request_buffer, $this));\n }\n catch(Exception $e)\n {\n self::$statistics['throw_exception']++;\n echo $e;\n }\n }\n if($this->_status !== self::STATUS_CLOSED && feof($socket))\n {\n $this->destroy();\n return;\n }\n return;\n }\n self::$statistics['total_request']++;\n // protocol not set\n try \n {\n call_user_func($this->onMessage, $this, $this->_recvBuffer);\n }\n catch(Exception $e)\n {\n self::$statistics['throw_exception']++;\n echo $e;\n }\n $this->_recvBuffer = '';\n if($this->_status !== self::STATUS_CLOSED && feof($socket))\n {\n $this->destroy();\n return;\n }\n }\n else if(feof($socket))\n {\n $this->destroy();\n return;\n }\n }",
"private function receive() {\n\n\t\t$this->connect();\n\n\t\tif (!$this->connected) {\n\t\t\tthrow new LockException(\"OpenLock: Not connected to server\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$raw_header = \"\";\n\t\twhile (strlen($raw_header) < 4 && $read_data = socket_read($this->socket, 4 - strlen($raw_header))) {\n\t\t\t$raw_header .= $read_data;\n\t\t}\n\n\t\t$header = unpack(\"C*\", $raw_header);\n\t\t\n\t\t$ver = ord($raw_header[0]) >> 4;\n\t\t$op = ( ($header[1] & 0x0F) << 4 ) + ( ($header[2] & 0xF0) >> 4 );\n\t\t$plen = (($header[2] & 0x0F) << 16) + ($header[3] << 8) + $header[4];\n\t\t\n\t\t$payload = \"\";\n\t\twhile (strlen($payload) < $plen && $read_data = socket_read($this->socket, $plen - strlen($payload))) {\n\t\t\t$payload .= $read_data;\n\t\t}\n\t\t\n//\t\tprint \"RECV: VER[$ver] \" . decode_rep($op) . \" PLEN[$plen] \" . '::' . \" PAYLOAD[$payload]\\n\";\n\t\treturn array($op, $payload);\n\t}",
"public function read()\n {\n return $this->response;\n }",
"abstract function read();",
"function readFrame ()\n {\n $start = microtime( true );\n $data = $buf = '';\n \n $rc = socket_recv($this->socket, $buf, 1, 0);\n // rc === 0: EOF / FIN received\n // rc === false: RST received / connection forcefully closed by remote side\n \n if ( $rc === 0 || $rc === false )\n {\n // EOF / FIN recvd\n $this->reconnect();\n return $this->readFrame();\n }\n \n // Read until end of frame (\\0)\n while ( ord($buf) != 0 )\n {\n $data .= $buf;\n \n $rc = socket_recv($this->socket, $buf, 1, 0);\n \n if ( $rc === false || $rc === 0 )\n {\n $this->reconnect();\n return $this->readFrame();\n }\n }\n \n // Verify next byte is \\n\n $rc = socket_recv($this->socket, $buf, 1, 0);\n if ( $rc === false || $rc === 0 || ord($buf) != 10 )\n {\n $this->reconnect();\n return $this->readFrame();\n }\n \n list ($header, $body) = explode(\"\\n\\n\", $data, 2);\n $header = explode(\"\\n\", $header);\n $headers = array();\n \n $command = NULL;\n foreach ( $header as $v )\n {\n if ( isset($command) )\n {\n list ($name, $value) = explode(':', $v, 2);\n $headers[$name] = trim($value);\n } else\n {\n $command = $v;\n }\n }\n \n $frame = new StompFrame($command, $headers, trim($body));\n if ( isset($frame->headers['amq-msg-type']) && $frame->headers['amq-msg-type'] == 'MapMessage' )\n {\n return new MapMessage($frame);\n } else {\n return $frame;\n }\n }",
"abstract protected function read ();",
"private function readDataIntoBuffer()\n {\n $data = '';\n $read = [$this->socket];\n $write = $except = null;\n\n /* Note by DaveRandom:\n * This is a little odd. When I tested on Fedora, fread() was only returning\n * 1 byte at a time. Other systems (including another Fedora box) didn't do\n * this. This loop fixes the issue, and shouldn't negatively impact performance\n * too badly, as sane systems will only iterate once, all parsers are buffered.\n */\n do {\n $bytes = fread($this->socket, 8192);\n\n if ($bytes === false) {\n $this->log('Data read failed: ' . $this->getLastSocketError(), Loggable::LEVEL_ERROR);\n $this->trigger('error', $this, 'Data read failed');\n\n $this->disconnect();\n return;\n }\n\n $data .= $bytes;\n } while (stream_select($read, $write, $except, 0));\n\n $this->log('Got data from socket: ' . $data, Loggable::LEVEL_DEBUG);\n $this->buffer->write($data);\n }",
"private function readIntoBuffer()\n {\n $data = stream_socket_recvfrom($this->socket, self::$READ_BUFFER_SIZE);\n\n if ($data === '' || $data === false || !is_resource($this->socket) || feof($this->socket)) {\n $this->disconnect();\n return null;\n }\n\n $this->readBuffer->feed($data);\n }",
"protected function read($socket)\n {\n $response = fread($socket, 1387);\n $meta_data = stream_get_meta_data($socket);\n $length = (is_string($response) ? (strlen($response) == 1 ? 'character ' . ord($response) : strlen($response) . ' bytes') : json_encode($response));\n Logs::writeLog(Logs::DEBUG, $response === false ? \"Failed reading\" : \"Read $length\", $response);\n return (is_string($response) ? trim($response) : $response);\n }",
"public function read_master() : array\n {\n $buffers = array();\n\n while ($buff = fread($this->connection, 16384)) {\n $buffers[] = $buff;\n }\n\n return $buffers;\n }",
"public function read($len) {\n if (strlen($this->rbuffer_) > 0) {\n $ret = substr($this->rbuffer_, 0, $len);\n $this->rbuffer_ = substr($this->rbuffer_, $len);\n return $ret;\n }\n\n $data = $this->transport_->readAll(4);\n $array = unpack('Nlength', $data);\n $length = $array['length'];\n\n $this->rbuffer_ = $this->transport_->readAll($length);\n $ret = substr($this->rbuffer_, 0, $len);\n $this->rbuffer_ = substr($this->rbuffer_, $len);\n return $ret;\n }",
"public function getSocket();",
"public function read(&$error_string = NULL)\r\n {\r\n $data = \"\";\r\n\r\n do {\r\n // Read header\r\n $header = fread($this->connection, 2);\r\n if (!$header) {\r\n $error_string = \"Reading header from websocket failed.\";\r\n throw new ConnectionException($error_string);\r\n }\r\n\r\n $opcode = ord($header[0]) & 0x0F;\r\n $final = ord($header[0]) & 0x80;\r\n $masked = ord($header[1]) & 0x80;\r\n $payload_len = ord($header[1]) & 0x7F;\r\n\r\n // Get payload length extensions\r\n $ext_len = 0;\r\n if ($payload_len >= 0x7E) {\r\n $ext_len = 2;\r\n if ($payload_len == 0x7F)\r\n $ext_len = 8;\r\n $header = fread($this->connection, $ext_len);\r\n if (!$header) {\r\n $error_string = \"Reading header extension from websocket failed.\";\r\n throw new ConnectionException($error_string);\r\n }\r\n\r\n // Set extented paylod length\r\n $payload_len = 0;\r\n for ($i = 0; $i < $ext_len; $i++)\r\n $payload_len += ord($header[$i]) << ($ext_len - $i - 1) * 8;\r\n }\r\n\r\n // Get Mask key\r\n if ($masked) {\r\n $mask = fread($this->connection, 4);\r\n if (!$mask) {\r\n $error_string = \"Reading header mask from websocket failed.\";\r\n throw new ConnectionException($error_string);\r\n }\r\n }\r\n\r\n // Get payload\r\n $frame_data = '';\r\n while ($payload_len > 0) {\r\n $frame = fread($this->connection, $payload_len);\r\n if (!$frame) {\r\n $error_string = \"Reading payload from websocket failed.\";\r\n throw new ConnectionException($error_string);\r\n }\r\n $payload_len -= strlen($frame);\r\n $frame_data .= $frame;\r\n }\r\n\r\n // Handle ping requests (sort of) send pong and continue to read\r\n if ($opcode == 9) {\r\n // Assamble header: FINal 0x80 | Opcode 0x0A + Mask on 0x80 with zero payload\r\n fwrite($this->connection, chr(0x8A) . chr(0x80) . pack(\"N\", rand(1, 0x7FFFFFFF)));\r\n continue;\r\n\r\n // Close\r\n } elseif ($opcode == 8) {\r\n fclose($this->connection);\r\n\r\n // 0 = continuation frame, 1 = text frame, 2 = binary frame\r\n } elseif ($opcode < 3) {\r\n // Unmask data\r\n $data_len = strlen($frame_data);\r\n if ($masked)\r\n for ($i = 0; $i < $data_len; $i++)\r\n $data .= $frame_data[$i] ^ $mask[$i % 4];\r\n else\r\n $data .= $frame_data;\r\n } else\r\n continue;\r\n } while (!$final);\r\n\r\n return $data;\r\n }",
"private function getServerResponse() {\r\n\t\t$data = \"\";\r\n\t\twhile ( $str = fgets ( $this->conn, 4096 ) ) {\r\n\t\t\t$data .= $str;\r\n\t\t\tif (substr ( $str, 3, 1 ) == \" \") {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($this->debug)\r\n\t\t\techo $data . \"<br>\";\r\n\t\treturn $data;\r\n\t}",
"static function read($connection, $id)\n {\n }",
"private function getc() {\r\n\t\treturn fgetc($this->socket); \r\n\t}",
"function send_read($data){\n\t\n\t\t$address = gethostbyname($this->vars['host']);\n\t\t$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\t\t$result = socket_connect($socket, $address, $this->vars['port']);\n\n\t\t$transfer = json_encode($this->vars[function_list]);\n\t\t\n\t\t$count = strlen($transfer);\n\t\tprint \"abc\";\n\t\tsocket_send($socket,$count,strlen($count),MSG_DONTROUTE); #send length data to server\n\n\t\tsocket_recv($socket , $buf , 2 , MSG_WAITALL ); #become ack\n\n\t\tsocket_send($socket,$transfer,$count,MSG_DONTROUTE); #send data to server\n\t\t\n\t\tsocket_recv($socket , $count , 30 , MSG_WAITALL ); #income char lentgh\n\t\t\n\t\tsocket_send($socket,'ok',2,MSG_DONTROUTE); #send ack\n\t\t\n\t\tsocket_recv($socket , $buf , $count , MSG_WAITALL ); #income new data\n\n\t\t$returner = json_decode($buf,true);\n\t\tsocket_close($socket);\n\t\treturn($returner);\n\t\t\n\t}",
"function getresp()\r\n {\r\n \tif (!$this->_socket || !is_resource($this->_socket)) {\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n \t$response = \"\";\r\n\t\t$res = fread($this->_socket, 8000);\r\n\t\t preg_match_all('/^\\d{3}/m', $res, $response);\r\n\t\t/*do {\r\n \t\t$res = fgets($this->_socket, 512);\r\n \t\t$response .= $res;\r\n \t} while (substr($res, 3, 1) != \" \");\r\n \t*/\r\n\t\t\r\n \t//$this->debug(str_replace(\"\\r\\n\", \"\\n\", $response));\r\n \t$this->debug(str_replace(\"\\r\\n\", \"\\n\", $res));\r\n \treturn $response[0];\r\n }",
"public function getReadConnectionService(): string;",
"public function getReadTimeout()\n {\n return $this->readTimeout;\n }",
"public function getReadTimeout() {\n return $this->readTimeout;\n }",
"public function read($client)\n {\n $input = socket_read($client, $this->maxByteReadLength);\n\n if ($input === false) {\n throw new SocketException('Could not read input: ');\n }\n\n return trim($input);\n }",
"private function getServerResponse() {\n\t\t$data=\"\";\n\t\twhile($str = fgets($this->conn,4096)) {\n\t\t\t$data .= $str;\n\t\t\tif(substr($str,3,1) == \" \") { break; }\n\t\t}\n\t\tif($this->debug) echo $data . \"<br>\";\n\t\treturn $data;\n\t}",
"public function read(): string\n {\n $chunk = fgets($this->getSocket());\n\n if ($chunk === false || $chunk === '') {\n throw new FaktoryException('Error while reading line from the server.');\n }\n\n $prefix = $chunk[0];\n $payload = substr($chunk, 1, -2);\n\n switch ($prefix) {\n case '+':\n return $payload;\n\n case '$':\n $size = (int) $payload;\n\n if ($size === -1) {\n return '';\n }\n\n $bulkData = '';\n $bytesLeft = ($size += 2);\n\n do {\n $chunk = fread($this->getSocket(), min($bytesLeft, 4096));\n\n if ($chunk === false || $chunk === '') {\n throw new FaktoryException('Error while reading bytes from the server.');\n }\n\n $bulkData .= $chunk;\n $bytesLeft = $size - strlen($bulkData);\n } while ($bytesLeft > 0);\n\n return substr($bulkData, 0, -2);\n\n case ':':\n return $payload;\n\n case '-':\n throw new FaktoryException('Server returned an error: ' . $payload);\n\n default:\n throw new FaktoryException(\"Unknown response prefix: '$prefix'.\");\n }\n }",
"public function aim_recv()\r\n\t{\r\n\t\t$header = fread($this->resource, 6);\r\n if ($this->user['debug']) $this->aim_debug($header, AIM_RAW);\r\n\r\n\t\t// Need error checking here to prevent bad data\r\n\t\ttry {\r\n\t\t\tif (!$data = @unpack(\"aone/Ctwo/nthree/nfour\", $header)) {\r\n\t\t\t\t// This normally happens if you sign on elsewhere with the same name,\r\n // or, if the TOC server resets (AOL likes to do this alot).\r\n\t\t\t\tthrow new TACException('Connection to TOC server interrupted.');\r\n\t\t\t} \r\n\t\t} catch(TACException $ex) {\r\n\t\t\t$ex->display();\r\n\t\t}\r\n\r\n if ($this->user['debug']) print_r($data);\r\n\t\t$msg = fread($this->resource, $data['four']);\r\n\t\t$msg = implode('', unpack(\"a*done\", $msg));\r\n if ($this->user['debug']) var_dump($msg);\r\n\r\n // match incoming commands\r\n preg_match(\"/^([A-Z0-9_]{4,19})\\:(.*)/s\", $msg, $matches);\r\n @list($orig, $cmd, $args) = $matches;\r\n // send the command and arguments to our parser\r\n $this->parser->aim_parse_command($cmd, $args);\r\n // regain some memory\r\n unset($header, $orig, $data, $matches);\r\n\t}",
"public function read($count)\n {\n return fread($this->socket, $count);\n }",
"protected function read()\n {\n return true;\n }",
"private function readMessage()\n {\n $fromIp = \"\";\n $fromPort = 0;\n $msg = null;\n \n if (!@socket_recvfrom($this->socket, $msg, 65535, 0, $fromIp, $fromPort)) {\n $err_no = socket_last_error($this->socket);\n if ($err_no == 4) {\n \techo \"\\n\\nCaught SIGINT, quiting...\\n\";\n \t$this->keepRunning = false;\n }\n }\n\n if (!$msg) {\n \treturn false;\n }\n\n if ($this->fromIp === null && $this->fromPort === null) {\n \t$this->fromIp = $fromIp;\n \t$this->fromPort = $fromPort;\n } else if ($this->fromIp != $fromIp || $this->fromPort != $fromPort) {\n \tdie(sprintf(\"Error: sender changed from %s:%d to %s:%d, aborting...\\n\", $this->fromIp, $this->fromPort, $fromIp, $fromPort));\n }\n \n return [\n \t\"timestamp\"\t=> microtime(true),\n \t\"msg\" \t\t=> $msg,\n \t\"from_ip\" \t=> $fromIp,\n \t\"from_port\"\t=> $fromPort\n ];\n }",
"public function isRead()\n {\n return $this->isRead;\n }",
"protected function handleRead($read_sock)\n\t{\n\t\t// socket_read while show errors when the client is disconnected, so silence the error messages\n\t\t$data = @socket_read($read_sock, 1024, PHP_NORMAL_READ);\n\n\t\t// check if the client is disconnected\n\t\tif ($data === false)\n\t\t{\n\t\t\t// remove client for $this->clients array\n\t\t\t$key = array_search($read_sock, $this->clients);\n\t\t\tunset($this->clients[$key]);\n\t\t\techo \"client disconnected.\\n\";\n\t\t\t// continue to the next client to read from, if any\n\t\t\tcontinue;\n\t\t}\n\n\t\t// trim off the trailing/beginning white spaces\n\t\t$data = trim($data);\n\n\t\t// check if there is any data after trimming off the spaces\n\t\tif (!empty($data))\n\t\t{\t\n\t\t\t// send this to all the clients in the $this->clients array (except the first one, which is a listening socket)\n\t\t\tforeach ($this->clients as $send_sock)\n\t\t\t{\n\t\t\t\t// if its the listening sock or the client that we got the message from, go to the next one in the list\n\t\t\t\tif ($send_sock == $this->sock || $send_sock == $read_sock)\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// write the message to the client -- add a newline character to the end of the message\n\t\t\t\tsocket_write($send_sock, $data.\"\\n\");\n\t\t\t}\n\t\t}\n\t}",
"function readsockline($socket)\n{\n $line = '';\n while (true)\n {\n $byte = socket_read($socket, 1024);\n if ($byte == '')\n break;\n $line .= $byte;\n }\n\n return trim($line);\n}",
"public function testReadingSessionServer()\n {\n // Get the server\n $server = $this->getWorkingReader()->getSession()->getServer();\n\n // Validate server\n $this->assertSame('Unknown or offline', $server->getName());\n }",
"public function readByte()\n {;\n return fread($this->socket, 1);\n }",
"public function getIncomingData() {}",
"function processBody()\r\n\t{\r\n\t\t$failureCount = 0;\r\n\t\tif( $this->debug & DBGLOW ) echo \"processBody()\\n\";\r\n/*\t\tif( $this->responseHeaders['Content-Length'] ) \r\n\t\t{\r\n\t\t\t$length = $this->responseHeaders['Content-Length'];\r\n\t\t\t$data = fread( $this->socket, $length );\r\n\t\t\tif( $this->debug & DBGSOCK ) echo \"DBG.SOCK socket_read using Content-Length ($length)\\n\";\r\n\r\n\t\t} else {*/\r\n\r\n\t\t\t$data = \"\";\r\n\t\t\t$counter = 0;\r\n//\t\t\tsocket_set_blocking( $this->socket, false );\r\n\t\t\tdo{\r\n\t\t\t\t$status = socket_get_status( $this->socket );\r\n\t\t\t\tif( $status['eof'] == 1 ) {\r\n\t\t\t\t\tif( $this->debug & DBGSOCK ) echo \"DBG.SOCK status eof met, finished socket_read\\n\";\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif( $status['unread_bytes'] > 0 ) {\r\n\t\t\t\t\t$buffer = fread( $this->socket, $status['unread_bytes'] );\r\n\t\t\t\t\t$counter = 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$buffer = fread( $this->socket, 1024 );\r\n\t\t\t\t\t$failureCount++;\r\n\t\t\t\t\tusleep(2);\r\n\t\t\t\t}\r\n\t\t\t\t$data .= $buffer;\r\n\t\t\t\tif( $this->debug & DBGSOCK )\r\n\t\t\t\t\techo implode( \" | \", $status ), \"\\n\";\r\n\t\t\t\t\r\n\t\t\t} while( $status['unread_bytes'] > 0 || $counter++ < 10 );\r\n\r\n\t\t\tif( $this->debug & DBGSOCK ) {\r\n\t\t\t\techo \"DBG.SOCK Counter:$counter\\nRead failure #: $failureCount\\n\";\r\n\t\t\t\techo \" Socket status: \"; print_r($status);\r\n\t\t\t}\r\n//\t\t\tsocket_set_blocking( $this->socket, true );\r\n//\t\t}\r\n\t\treturn $data;\r\n\t}",
"public function read($length) {\n $this->waitForData();\n return $this->readData($length);\n }",
"private function readTo($prompt){\r\n\t\r\n\t\tif (!$this->socket){\r\n\t\t\tthrow new Exception(\"Telnet connection closed\"); \r\n\t\t}\r\n\t\t\r\n\t\t// clear the buffer \r\n\t\t$this->clearBuffer();\r\n\t\t\r\n\t\tdo{\r\n\t\t\t\r\n\t\t$c = $this->getc();\r\n\t\t\t\r\n\t\t\tif ($c === false){\r\n\t\t\t\tthrow new Exception(\"Couldn't find the requested : '\" . $prompt . \"', it was not in the data returned from server : '\" . $this->buffer . \"'\"); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Interpreted As Command\r\n\t\t\tif ($c == $this->IAC){\r\n\t\t\t\tif ($this->negotiateTelnetOptions()){\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// append current char to global buffer \r\n\t\t\t$this->buffer .= $c;\r\n\t\t\t\r\n\t\t\t// we've encountered the prompt. Break out of the loop\r\n\t\t\tif ((substr($this->buffer, strlen($this->buffer) - strlen($prompt))) == $prompt){\r\n\t\t\t\treturn self::TELNET_OK;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while($c != $this->NULL || $c != $this->DC1);\r\n\t}",
"public function readFrame()\n {\n $this->connect();\n return $this->frameFactory->createFromClientFrame($this->stomp->readFrame());\n }",
"function readData()\n {\n $this->current_row = false;\n $this->current_row_hash = false;\n $this->current_row_index = $this->offset - 1;\n $this->mapping = false;\n\n $this->mysqli = new mysqli( $this->host, $this->username, $this->password,\n $this->dbname, $this->port, $this->socket );\n\n /* check connection */\n if ( mysqli_connect_errno() )\n {\n printf( \"Connect failed: %s\\n\", mysqli_connect_error() );\n exit();\n }\n }",
"public function receiveData()\n {\n while (false !== ($data = socket_read($this->socket, 512))) {\n if ($data === '') {\n $this->reactor->removeReader($this->socket);\n \n call_user_func($this->callback, Response::fromString($this->buffer));\n return;\n }\n \n $this->buffer .= $data;\n }\n }",
"function readContent(){\n\n if (ftell($this->handle) == 0){\n $this->readLine();\n }\n $this->content = [];\n \n while ( ($read = $this->readLine()) !== FALSE){\n $this->content[] = $read;\n }\n }",
"private function getRead()\n {\n if (!$this->read) {\n shuffle($this->readConfigs);\n foreach ($this->readConfigs as $config) {\n /** @var \\Redis $redis */\n $redis = $config['redis'];\n try {\n $redis->connect($config['host'], $config['port'], $config['timeout']);\n $redis->setOption(Redis::OPT_SERIALIZER, $this->getSerializerValue());\n $this->read = $redis;\n break;\n }\n catch (\\RedisException $ex) {\n if ($this->logger) {\n $this->logger->warning('Failed to connect to a Redis read replica.', [\n 'exception' => $ex,\n 'host' => $config['host'],\n 'port' => $config['port'],\n ]);\n }\n }\n }\n\n // If we failed to connect to any read replicas, give up, and send back the last exception (if any)\n if (!$this->read) {\n throw new \\RedisException('Failed to connect to any Redis read replicas.', 0, isset($ex) ? $ex : null);\n }\n }\n\n return $this->read;\n }",
"public function getReadConnection(): AdapterInterface;",
"public function openRead() {\r\n return $this->open();\r\n }",
"protected function readFromRemote($connection)\n {\n $all_buffer = '';\n $total_len = 4;\n $head_read = false;\n while(1)\n {\n $buffer = fread($connection, 8192);\n if($buffer === '' || $buffer === false)\n {\n throw new \\Exception('readFromRemote fail');\n }\n $all_buffer .= $buffer;\n $recv_len = strlen($all_buffer);\n if($recv_len >= $total_len)\n {\n if($head_read)\n {\n break;\n }\n $unpack_data = unpack('Ntotal_length', $all_buffer);\n $total_len = $unpack_data['total_length'];\n if($recv_len >= $total_len)\n {\n break;\n }\n $head_read = true;\n }\n }\n return unserialize(substr($all_buffer, 4));\n }",
"public function fetchMessage()\n {\n if ($this->socket === null) {\n $this->socket = stream_socket_server(static::buildFullAddress($this->address));\n }\n return @stream_socket_accept($this->socket);\n }",
"public function readUntilEndOfStream() {}",
"public function read($length);",
"public function read($length);",
"public function read($length);",
"public function read_string() { return $this->read_bytes(); }",
"function read() {\n\t\t$_this =& AmfStream::getInstance();\n\t\treturn $_this->__stream;\n\t}",
"public function read($length)\n {\n }",
"public function read()\n {\n $this->seen();\n }",
"protected function main()\r\n {\r\n // save incomming data and chop the leading white space\r\n $this->_raw = chop( fgets( $this->_conn ) );\r\n \r\n $this->debug( '<- ' . $this->_raw );\r\n \r\n $data = explode( ' ', $this->_raw );\r\n \r\n // first make sure we are connected and registered on the server\r\n if ( ! $this->_loggedOn )\r\n {\r\n // if not logged on, wait with processing events till we can login\r\n if ( strstr( $this->_raw, \"Found your hostname\" ) )\r\n {\r\n // save the servername so we can use it to identify server notices\r\n $this->_serverName = substr( $data[0], 1 );\r\n \r\n // start login\r\n $this->login();\r\n }\r\n }\r\n else\r\n {\r\n $this->observe( $data );\r\n }\r\n \r\n // if we are still connecting continue monitoring the data\r\n if ( ! feof( $this->_conn ) )\r\n {\r\n $this->main();\r\n }\r\n else\r\n {\r\n // we are disconnected so remove the socket\r\n unset( $this->_conn );\r\n \r\n // reconnect if required\r\n if ( $this->_autoReconnect )\r\n {\r\n $this->reconnect();\r\n }\r\n else\r\n {\r\n $this->log( \"Disconnected from server.\" );\r\n \r\n exit;\r\n }\r\n }\r\n }",
"abstract public function RawConnection();",
"function read_data_packet($socket, &$buffer) {\n\tread_from_socket($socket, $countSize, 1);\n\t// read data length\n\tread_from_socket($socket, $readCount, $countSize);\n\t$expectedReadCount = $readCount;\n\t// read data\n $readCount = read_from_socket($socket, $buffer, $readCount);\n\tif ($readCount == $expectedReadCount)\n\t return $readCount;\n\telse\n\t return FALSE;\n}"
] | [
"0.744312",
"0.7302854",
"0.6833405",
"0.67738444",
"0.66387784",
"0.6620374",
"0.659791",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.65845406",
"0.64708674",
"0.6448179",
"0.62797433",
"0.62734294",
"0.6207628",
"0.62074876",
"0.62004143",
"0.6186758",
"0.6170016",
"0.61602575",
"0.61517376",
"0.6144198",
"0.61439586",
"0.61320996",
"0.61276436",
"0.612013",
"0.61141205",
"0.60924804",
"0.6087243",
"0.60788894",
"0.6066364",
"0.6051664",
"0.6046202",
"0.6045615",
"0.6026913",
"0.6018864",
"0.6013641",
"0.6008792",
"0.5989777",
"0.5907503",
"0.5882785",
"0.5854635",
"0.58526623",
"0.5847752",
"0.58369374",
"0.58276963",
"0.5766957",
"0.57660294",
"0.5759487",
"0.5748648",
"0.5730495",
"0.5723775",
"0.57211524",
"0.57137823",
"0.5705517",
"0.5704307",
"0.5657617",
"0.56465024",
"0.5630735",
"0.5630209",
"0.5622781",
"0.56211805",
"0.5616357",
"0.56161124",
"0.5608354",
"0.56050605",
"0.5596759",
"0.5586299",
"0.5576259",
"0.5571591",
"0.556115",
"0.5560436",
"0.55324626",
"0.5527814",
"0.5521317",
"0.55208147",
"0.55069566",
"0.54936117",
"0.54736096",
"0.5470208",
"0.5467576",
"0.5466905",
"0.5457914",
"0.5457914",
"0.5457914",
"0.54530007",
"0.5433767",
"0.54285806",
"0.54271495",
"0.541947",
"0.5419466",
"0.54189944"
] | 0.0 | -1 |
Writes to the server connection | protected function write($payload) {
if (!$payload) {
throw new VarnishException('Could not write to ' . $this->host . ' on port ' . $this->port . ': Empty payload provided');
}
$bytes = fwrite($this->handle, $payload);
if ($bytes !== strlen($payload)) {
throw new VarnishException('Could not write to ' . $this->host . ' on port ' . $this->port . ': Unable to write payload to the connection');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function onWriteConnection();",
"public function writeSocket()\n {\n socket_write($this->socket, $this->stringWithEquation, strlen($this->stringWithEquation));\n }",
"protected function _write($data)\n {\n $this->_connect();\n\n fwrite($this->_socket, $data);\n stream_set_timeout($this->_socket, Zend_TimeSync::$options['timeout']);\n }",
"protected function write()\n {\n $this->writeString($this->clientName);\n $this->writeString($this->clientVersion);\n $this->writeShort($this->protocolVersion);\n $this->writeString(''); // client id, unused.\n $this->writeString($this->database);\n $this->writeString($this->type);\n $this->writeString($this->username);\n $this->writeString($this->password);\n }",
"public function processWrite()\n {\n if (!$this->hasPendingWrite()) {\n return;\n }\n\n if (!$this->pendingWriteBuffer) {\n $this->pendingWriteBuffer .= array_shift($this->pendingWrites)->toRawData();\n }\n\n $this->log('Writing data to client, buffer contents: ' . $this->pendingWriteBuffer, Loggable::LEVEL_DEBUG);\n\n $bytesWritten = fwrite($this->socket, $this->pendingWriteBuffer);\n\n if ($bytesWritten === false) {\n $this->log('Data write failed', Loggable::LEVEL_ERROR);\n $this->trigger('error', $this, 'Data write failed');\n\n $this->disconnect();\n } else if ($bytesWritten > 0) {\n $this->pendingWriteBuffer = (string) substr($this->pendingWriteBuffer, $bytesWritten);\n }\n }",
"private function write($data)\n {\n $this->connection->write($data);\n }",
"public function write();",
"public function write();",
"function Write($data=null) \r\n{ \r\n//** no connection is available, zero bytes can be sent. \r\n\r\nif(!$this->isOpen()) \r\n{ \r\n$this->LastError = \"No connection available for writing\"; \r\nreturn 0; \r\n} \r\n$data = strval($data); //** ensure that data is available. \r\nif(strlen($data) == 0) //** no data to be sent. \r\nreturn 0; //** zero bytes were sent. \r\nelse //** connection and data, set timeout and send. \r\n{ \r\n//$this->_SetTimeout(); //** set timeout. \r\nreturn fwrite($this->Socket, $data, strlen($data)); //** write data. \r\n} \r\n}",
"protected function _write() {}",
"function sock_write($s)\n\t{\n\t\t@fputs($this->sock,\"$s\\n\");\n\t\t$this->log($s);\n\t\t\n\t}",
"private function write($data) {\n if (!fwrite($this->_socket, $data)) \n throw new Predis_ClientException(sprintf(\n 'An error has occurred while writing data %s on the network stream'),\n $data\n );\n }",
"public function write()\n {\n }",
"public function write($data) {\n $result = socket_write($this->communicationSocket, $data);\n $this->checkResult($result);\n }",
"public function getWriteConnection() {}",
"public function onWrite();",
"function tcp_write(&$info) {\n\t$sock=$info['sock'];\n\t$buf=&$info['buf'];\n\t$sockid=$info['sockid'];\n\tif (!isset($GLOBALS['SOCKETS'][$sockid])) return false; // shutdown this socket !\n\tif (!$buf) return true;\n\tif (defined('IN_ERROR')) {\n\t\tkill_socket($sockid);\n\t\treturn false;\n\t}\n\t$w=array($sock);\n\t$ret=socket_select($r=null,$w,$e=null,0);\n\tif ($ret===false) {\n\t\t// error !\n\t\t$GLOBALS['BtWindow']->gtk_error(socket_strerror(socket_last_error($sock)).' on socket_select [write]');\n\t\treturn;\n\t}\n\tif ($ret<=0) return true; // can't write yet !\n\t// ok, we can send data !\n\t$ret=@socket_write($sock,$buf);\n\tif ($ret===false) {\n//\t\t$GLOBALS['BtWindow']->gtk_error(socket_strerror(socket_last_error($sock)).' on socket_write');\n\t\techo 'Non-fatal error: '.socket_strerror(socket_last_error($sock)).\"\\n\";\n\t\tkill_socket($sockid);\n\t\treturn;\n\t}\n\t$GLOBALS['COUNTERS']['up']+=$ret;\n\t$GLOBALS['COUNT']['up']+=$ret;\n\t$buf=substr($buf,$ret);\n\tif ($buf===false) $buf='';\n\treturn true;\n}",
"abstract protected function _write();",
"abstract protected function write();",
"protected function write()\n {\n $this->writeString($this->database);\n $this->writeString($this->type);\n $this->writeString($this->storage);\n }",
"function write()\n {\n }",
"public function onWriteAvailable()\n\t{\n\t\tif (($written = @fwrite($this->stream, $this->writeBuffer)) === false) {\n\t\t\t$this->closeWithError(\"Could not write data to socket.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif ($written === 0) {\n\t\t\t$this->closeWithError(\"Broken pipe or closed connection.\");\n\t\t\treturn;\n\t\t}\n\n\t\t$this->writeBuffer = substr($this->writeBuffer, $written) ?: \"\";\n\n\t\tif (empty($this->writeBuffer)) {\n\t\t\t$this->flushing = false;\n\t\t\t$this->loop->removeWriteStream($this->stream);\n\t\t}\n\t}",
"public function write($data)\n {\n $this->attachedWebsocket->write($data);\n }",
"abstract public function write($data);",
"public function send()\n {\n fwrite($this->rStream, $this->sText);\n }",
"public function baseWrite()\n {\n $len = @fwrite($this->_socket, $this->_sendBuffer);\n if($len === strlen($this->_sendBuffer))\n {\n Worker::$globalEvent->del($this->_socket, EventInterface::EV_WRITE);\n $this->_sendBuffer = '';\n if($this->_status == self::STATUS_CLOSING)\n {\n $this->destroy();\n }\n return true;\n }\n if($len > 0)\n {\n $this->_sendBuffer = substr($this->_sendBuffer, $len);\n }\n else\n {\n if(feof($this->_socket))\n {\n self::$statistics['send_fail']++;\n $this->destroy();\n }\n }\n }",
"function Write($msg){\r\n $host = \"127.0.0.1\";\r\n $port = \"20205\";\r\n\t\t$sock = socket_create(AF_INET, SOCK_STREAM, 0); //socket openen.\r\n\t\t//socket_connect($sock, $host, $port);\r\n\r\n\t\t//socket_write($sock, $msg, strlen($msg)); //het versturen van de data in de vorm van ID,Value.\r\n\t\t//socket_close($sock); //socket verbinding beindigen.\t\t\r\n\t\t\r\n\t\t$jsonString = file_get_contents('/home/pi/actuator.json'); // actuatoren openen\r\n\t\t$data = json_decode($jsonString, true);\r\n\t\t$msg2 = explode(',', $msg); // bericht ui client splitten op kommas, \t\tbijvoorbeeld \"15,1\".\r\n\r\n\t\t$ID = $msg2[0]; // eerste deel is ID, \t\t\t\t\t\tbijvoorbeeld \"15\".\r\n\t\t$Value = $msg2[1]; // tweede deel is de aan te passen waarde, \tbijvoorbeeld \"1\".\r\n\t\t\r\n\t\t//print_r($data);\r\n\t\t$data[$ID] = $Value;\r\n\r\n\t\t$newJsonString = json_encode($data);\r\n\t\tfile_put_contents('/home/pi/actuator.json', $newJsonString); //uitgesplitste waarden naar actuator.json schrijven om geinterpreteerd te kunnen worden door De raspberry Pi.\r\n\r\n\t\t$msg = trim($msg);\r\n\t\techo \"Client Wrote:\\t\".$msg.\"\\n\\n\";\r\n }",
"public function write($data);",
"public function write($data);",
"public function write($data);",
"public function write($data);",
"public function _write($data)\n {\n }",
"public function write($s) {}",
"public function write($s) {}",
"public function write($s) {}",
"public function write($s) {}",
"public function write($s) {}",
"public function writeSocket($str) {\n\t\tif($this->compare_buf === false)\n\t\t\treturn;\n\n\t\t/* We should actually buffer here, but, what the heck, op5livestatus\n\t\t * outputs everything in one writeSocket anyway...\n\t\t*/\n\n\t\t/* Convert compare_buf to a string. Strip empty lines, and trim if only space */\n\t\t$exp = implode(\"\\n\",array_filter(array_map('trim',$this->compare_buf))).\"\\n\\n\";\n\t\t$this->test->assertEquals($str, $exp, $this->custom_error?$this->custom_error:'Query doesn\\'t match expected');\n\t}",
"public function send() {\n if (!$this->client) {\n return false;\n }\n\n $this->addInt8($this->value);\n\n Sockets::out($this->client, $this);\n return true;\n\n }",
"function handle_connect(&$server,&$client,$input)\r\n{\r\n SocketServer::socket_write_smart($client->socket,\"String? \",\"\");\r\n}",
"public function write($data)\n {\n $this->buffer .= $data;\n }",
"public function write($data) {\n\t}",
"public function write(): void\n {\n $this->writeAndReturnAffectedNumber();\n }",
"public function write()\n {\n $this->assertEquals('', $this->memoryOutputStream->getBuffer());\n $this->assertEquals(5, $this->memoryOutputStream->write('hello'));\n $this->assertEquals('hello', $this->memoryOutputStream->getBuffer());\n }",
"protected function _write() {\n\n if ( !empty( $this->rid ) && $this->rid instanceof ID ) {\n $this->cluster_id = $this->rid->cluster;\n $this->cluster_position = $this->rid->position;\n }\n\n $this->record->setRid( new ID( $this->cluster_id, $this->cluster_position ) );\n\n $this->_writeShort( $this->cluster_id );\n $this->_writeLong( $this->cluster_position );\n\n if( $this->_transport->getProtocolVersion() >= 23 ){\n $this->_writeBoolean( $this->update_content );\n }\n\n $this->_writeBytes( CSV::serialize( $this->record ) );\n $this->_writeInt( $this->record_version );\n $this->_writeChar( $this->record_type );\n $this->_writeBoolean( $this->mode );\n\n }",
"public function write($command, $end = \"\\r\\n\") {\n\t\tif ($this->active === null) {\n\t\t\tthrow new Swift_ConnectionException ( \"None of the connections set have been started\" );\n\t\t}\n\t\treturn $this->connections [$this->active]->write ( $command, $end );\n\t}",
"public function write(string $buffer)\n {\n if (!is_resource($this->socket)) {\n Bolt::error('Not initialized socket');\n return;\n }\n\n $size = mb_strlen($buffer, '8bit');\n $sent = 0;\n\n if (Bolt::$debug)\n $this->printHex($buffer);\n\n while ($sent < $size) {\n $sent = socket_write($this->socket, $buffer, $size);\n if ($sent === false) {\n $code = socket_last_error($this->socket);\n Bolt::error(socket_strerror($code), $code);\n return;\n }\n\n $buffer = mb_strcut($buffer, $sent, null, '8bit');\n $size -= $sent;\n }\n }",
"public function write($buffer)\n {\n }",
"function write($message)\n {\n if(!socket_write($this->_socket, $message)) {\n throw new SocketException(\"socket_write failed with error: \" . socket_strerror(socket_last_error()), socket_last_error());\n }\n }",
"abstract function write ($message);",
"public function write($data) {\r\n\t\t$res=fwrite($this->_handle, $data);\r\n\t\tif(!$res) {\r\n\t\t\tthrow new Curly_Stream_Exception('An error occured while writing data into the output stream');\r\n\t\t}\r\n\t\telse if($res!==strlen($data)) {\r\n\t\t\tthrow new Curly_Stream_Exception('Not all data was written to the output stream. Just '.$res.' bytes were written');\r\n\t\t}\r\n\t}",
"public function write($message);",
"function _Write($cmd, $s1='', $s2='') {\n\t\t$id = ++$this->_Id;\n\n\t\t// Put our packet together\n\t\t$data = pack(\"VV\",$id,$cmd).$s1.chr(0).$s2.chr(0);\n\n\t\t// Prefix the packet size\n\t\t$data = pack(\"V\",strlen($data)).$data;\n\n\t\t// Send packet\n\t\tfwrite($this->_Sock,$data,strlen($data));\n\n\t\t// In case we want it later we'll return the packet id\n\t\treturn $id;\n\t}",
"public function write($data)\n\t{\n\t\tif(is_resource($this->socket))\n\t\t{\n\t\t\treturn fwrite($this->socket, $data, strlen($data));\n\t\t}\n\t}",
"public function write() {\n\t\t$database = Registry::get(\"database\");\n\t\t$v = \"value='\" . $this -> value . \"'\";\n\t\t$statement = Registry::get(\"database\") -> query(\"UPDATE server.configs SET \" . $v . \" WHERE key_='\" . $this -> key . \"'\");\n\t}",
"public function write($data, $length){ }",
"protected function writeToRemote($data, $connection)\n {\n $buffer = serialize($data);\n $buffer = pack('N',4 + strlen($buffer)) . $buffer;\n $len = fwrite($connection, $buffer);\n if($len !== strlen($buffer))\n {\n throw new \\Exception('writeToRemote fail');\n }\n }",
"function write($message);",
"public function write($data)\n\t{\n\t\t$this->checkClosed();\n\n\t\tif (!is_string($data)){\n\t\t\treturn;\n\t\t}\n\n\t\twhile ('' !== $data) {\n\t\t\t$written = \\socket_write($this->socket, $data, \\strlen($data));\n\t\t\tif (false === $written) {\n\t\t\t\t$this->throwException();\n\t\t\t}\n\t\t\t$data = (string) \\substr($data, $written);\n\t\t}\n\t}",
"public function write(string $message);",
"public function send()\n {\n $this->jsonManager->domain = $this->uri;\n $this->jsonManager->port = $this->port;\n $this->jsonManager->online = $this->isOnline();\n $this->jsonManager->send();\n }",
"public function write($data, $eol = false)\n {\n if ($eol) {\n $buffer = $this->_buffer;\n $debug = $this->client_debug;\n $this->_buffer = '';\n\n $this->client_debug = true;\n\n if (fwrite($this->_stream, $buffer . $data . ($eol ? \"\\r\\n\" : '')) === false) {\n throw new Horde_Imap_Client_Exception(\n Horde_Imap_Client_Translation::r(\"Server write error.\"),\n Horde_Imap_Client_Exception::SERVER_WRITEERROR\n );\n }\n\n if ($debug) {\n $this->_params['debug']->client($buffer . $data);\n }\n } else {\n $this->_buffer .= $data;\n }\n }",
"public function writeAndClose();",
"public function write($bytes)\n {\n fwrite($this->rawSocket, $bytes);\n }",
"function _sendCmd($cmd)\n {\n $status = $this->_sock->getStatus();\n if (PEAR::isError($status) || $status['eof']) {\n return new PEAR_Error( 'Failed to write to socket: (connection lost!) ' );\n }\n if ( PEAR::isError( $error = $this->_sock->write( $cmd . \"\\r\\n\" ) ) ) {\n return new PEAR_Error( 'Failed to write to socket: ' . $error->getMessage() );\n }\n\n if( $this->_debug ){\n // C: means this data was sent by the client (this class)\n echo \"C:$cmd\\n\";\n }\n return true;\n }",
"private function writeCommand($command)\n { \n fwrite($this->smtpConnection, $command);\n }",
"public function write($buf);",
"private function write($buffer, $addNewLine = true){\r\n\t\r\n\t\tif (!$this->socket){\r\n\t\t\tthrow new Exception(\"Telnet connection closed\");\r\n\t\t}\r\n\t\r\n\t\t// clear buffer from last command\r\n\t\t$this->clearBuffer();\r\n\t\t\r\n\t\tif ($addNewLine == true){\r\n\t\t\t$buffer .= \"\\n\";\r\n\t\t}\r\n\t\t\r\n\t\tif (!fwrite($this->socket, $buffer) < 0){\r\n\t\t\tthrow new Exception(\"Error writing to socket\");\r\n\t\t}\r\n\t\t\r\n\t\treturn self::TELNET_OK;\r\n\t}",
"public function emit()\n {\n $this->sendHeaders();\n $this->sendBody();\n }",
"public function write($s)\n {\n $this->flushbits();\n $this->_out .= $s;\n }",
"public function write($bytes) {}",
"public function write($bytes) {}",
"function write($data)\n {\n eval(PUBSUB_MUTATE);\n if ($this->_finished_writing)\n {\n #errno = EBADF; # as if we were writing on a closed fd\n return -1;\n }\n $this->_outbuf .= $data;\n if (strlen($this->_outbuf))\n {\n # XXX: check for failure?\n $this->_evl->setInterestOnWritable($this->_outsock,\n $this->_wrapOnWritable);\n }\n return strlen($data);\n }",
"public function write($sessionId, $data);",
"public function write($bytes) {}",
"public function send($socket)\n\t{\n\t}",
"public function write()\r\n\t{\r\n\t\t\r\n\t\tif (headers_sent() OR $this->_destroyed)\r\n\t\t{\r\n\t\t\t// Session cannot be written when the headers are sent or when\r\n\t\t\t// the session has been destroyed\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\r\n\t\t// Set the last active timestamp\r\n\t\t$this->_data['last_active'] = time();\r\n\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn $this->_write();\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\t// Log & ignore all errors when a write fails\r\n\t\t\tKeke::$log->add(Log::ERROR, Keke_exception::text($e))->write();\r\n\t\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}",
"function write($data)\r\n {\r\n $this->string.=$data;\r\n return TRUE;\r\n }",
"function write($id, $data, $next);",
"public function getWriteConnection()\n {\n return $this->gateway->getWriteConnection();\n }",
"public static function tcp_server(): void\n {\n sock::$type = 'tcp:server';\n sock::$host = '0.0.0.0';\n sock::$port = 1000;\n $ok = sock::create();\n\n if (!$ok) exit('TCP Server creation failed!');\n\n //Set Client list alone\n $client = [];\n\n do {\n //Copy client list to read list\n $read = $client;\n\n //Listen to TCP port\n sock::listen($read);\n\n //Accept new connection\n sock::accept($read, $client);\n\n //Read TCP Data\n $msg = sock::read($read, $client);\n\n var_dump($msg);\n\n //Regroup data\n $data = [];\n\n //example: from message and send back to client\n foreach ($msg as $key => $value) {\n //Client socket resource\n $data[$key]['sock'] = $client[$key];\n //Message to be sent\n $data[$key]['msg'] = 'Hello, dear sender!';\n $data[$key]['msg'] .= PHP_EOL;\n $data[$key]['msg'] .= 'I received your message, and now send it back.';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= '====================================================================';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= $value['msg'];\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= '====================================================================';\n $data[$key]['msg'] .= PHP_EOL . PHP_EOL;\n $data[$key]['msg'] .= 'Thanks for your test!';\n }\n\n //Send data back and maintain clients\n $result = sock::write($data, $client);\n\n var_dump($result);\n\n } while (true);\n }",
"public function write($client, $output)\n {\n $out = socket_write($client, $output, strlen($output));\n\n if ($out === false) {\n throw new SocketException('Could not write output: ');\n }\n }",
"public function write(): bool\n {\n }",
"public function write(): bool\n {\n }",
"public function flush()\n {\n $this->out->flush();\n }",
"public function sendCommand($cmd) {\n $this->log($cmd);\n $cmd .= \"\\r\\n\";\n fwrite($this->getConnection(), $cmd);\n }",
"public function setWriteConnectionService($connectionService) {}",
"abstract public function flush ();",
"function write($string) {\n $string = (string)$string;\n $this->body[] = $string;\n $this->length += strlen($string);\n }",
"public static function flush() {\r\n if (!empty(self::$data)) {\r\n static $socket;\r\n if (!$socket) $socket = fsockopen('udp://' . self::$host, self::$port);\r\n fwrite($socket, implode(null, self::$data));\r\n self::$data = array();\r\n }\r\n }",
"public function send() {\r\n\t\t\t$this->sent = true;\r\n\t\t}",
"protected function write($data)\n {\n // @codeCoverageIgnoreStart\n return (int) fwrite($this->socket, $data);\n // @codeCoverageIgnoreEnd\n }",
"public function setWriteConnectionService(string $connectionService): void;",
"protected function _write($payload) {\n return @fwrite($this->_socket, $payload);\n }",
"public function write($buf) {\n $this->wbuffer_ .= $buf;\n }",
"public static function tcp_server(): void\n {\n sock::$type = 'tcp:server';\n sock::$host = '0.0.0.0';\n sock::$port = self::port;\n $ok = sock::create();\n\n if (!$ok) exit('TCP Server creation failed!');\n\n //Set Client list alone\n $client = [];\n\n do {\n //Copy client list to read list\n $read = $client;\n\n //Listen to TCP port\n sock::listen($read);\n\n //Accept new connection\n sock::accept($read, $client);\n\n //Read TCP Data\n $msg = sock::read($read, $client);\n\n var_dump($msg);\n\n $data = [];\n\n //example: from message and send back to client\n foreach ($client as $k => $v) {\n foreach ($msg as $key => $value) {\n $data[$k]['sock'] = $v;\n $data[$k]['msg'] = $key !== $k ? $value['msg'] : 'OK! ' . count($client) . ' players are online waiting!';\n }\n }\n\n //Send data back and maintain clients\n $result = sock::write($data, $client);\n\n var_dump($result);\n\n } while (true);\n }",
"public function write($string)\n {\n }",
"abstract public function write( $value );",
"abstract public function flush();",
"public function getWriteConnectionService() {}",
"public function write($data) {\n\t\tif ($this->dgram) {\n\t\t\treturn socket_sendto($this->parentSocket->fd, $data, strlen($data), $this->finished ? MSG_EOF : 0, $this->host, $this->port);\n\t\t}\n\t\treturn parent::write($data); // @todo\n\t}"
] | [
"0.7172523",
"0.71028346",
"0.6971355",
"0.69615334",
"0.69500494",
"0.68719786",
"0.6867148",
"0.6867148",
"0.67716634",
"0.6768597",
"0.66907245",
"0.6594412",
"0.6541986",
"0.6494172",
"0.64801955",
"0.64113516",
"0.63798153",
"0.6368996",
"0.6256829",
"0.6230924",
"0.6151823",
"0.6112439",
"0.610674",
"0.61058533",
"0.6096716",
"0.6079104",
"0.60530585",
"0.60015106",
"0.60015106",
"0.60015106",
"0.60015106",
"0.6000076",
"0.5985082",
"0.5985082",
"0.5983659",
"0.5983659",
"0.5983659",
"0.5961515",
"0.5949229",
"0.5946855",
"0.590565",
"0.58973867",
"0.5887308",
"0.58651084",
"0.58442366",
"0.5841914",
"0.5821822",
"0.5783674",
"0.5738259",
"0.5724198",
"0.5719537",
"0.57127506",
"0.5710104",
"0.5703147",
"0.5697886",
"0.5683303",
"0.56806576",
"0.5664018",
"0.56556225",
"0.5651377",
"0.5641781",
"0.5637323",
"0.562195",
"0.56158686",
"0.56014276",
"0.5596471",
"0.5581891",
"0.5574299",
"0.55686617",
"0.55675685",
"0.55238307",
"0.55238307",
"0.55219626",
"0.5521212",
"0.55198896",
"0.55182487",
"0.55152243",
"0.5509144",
"0.5498073",
"0.5494391",
"0.54789454",
"0.54668325",
"0.54293865",
"0.54293865",
"0.5423348",
"0.5417681",
"0.5400891",
"0.53786874",
"0.53665996",
"0.5365246",
"0.5358155",
"0.53526574",
"0.5349947",
"0.534663",
"0.53456956",
"0.53450483",
"0.5343658",
"0.5343318",
"0.5333283",
"0.5327677",
"0.53086865"
] | 0.0 | -1 |
Writes a command to the server and reads the response | public function execute($command, &$statusCode = null, $requiredStatusCode = 200) {
if (!$this->isConnected()) {
$this->connect();
}
if ($this->log) {
$this->log->logDebug('Executing command on ' . $this->host . ':' . $this->port, $command, self::LOG_SOURCE);
}
$this->write($command . "\n");
$response = $this->read($statusCode);
if ($this->log) {
$this->log->logDebug('Received response from ' . $this->host . ':' . $this->port, $statusCode, self::LOG_SOURCE);
}
if ($requiredStatusCode !== null && $statusCode !== $requiredStatusCode) {
$response = implode("\n > ", explode("\n", trim($response)));
throw new VarnishException('Could not execute command on ' . $this->host . ' with port ' . $this->port . ': Command `' . $command . '` returned code ' . $statusCode, 0, null, $response);
}
return $response;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function sendCommand($cmd) \n { \n \n $result = $this->write($cmd . \"\\r\\n\",strlen($cmd) + 2);\n if ($this->isError($result)) {\n return $result;\n }\n $response = $this->getReply();\n \n return $response;\n }",
"protected function _execute($request) {\n\t\tfwrite($this->socket, $request);\n\t\t$response = '';\n\t\twhile(!feof($this->socket))\n\t\t\t$response .= fgets($this->socket);\n\t\treturn $response;\n\t}",
"protected function sendCommand($command, $data = '')\n {\n fwrite($this->socket, pack('VV', $command, strlen($data)) . $data);\n return $this->receiveResponse();\n }",
"public function write($command, $end=\"\\r\\n\");",
"function _sendCmd($cmd)\n {\n $status = $this->_sock->getStatus();\n if (PEAR::isError($status) || $status['eof']) {\n return new PEAR_Error( 'Failed to write to socket: (connection lost!) ' );\n }\n if ( PEAR::isError( $error = $this->_sock->write( $cmd . \"\\r\\n\" ) ) ) {\n return new PEAR_Error( 'Failed to write to socket: ' . $error->getMessage() );\n }\n\n if( $this->_debug ){\n // C: means this data was sent by the client (this class)\n echo \"C:$cmd\\n\";\n }\n return true;\n }",
"public function exec($command) {\r\n\t\t\r\n\t\t$this->write($command);\r\n\t\t$this->waitPrompt();\r\n\t\treturn $this->getBuffer();\r\n\t}",
"public function exec($command)\n {\n $command = implode(' ', func_get_args());\n $this->_debugLog(trim($command), '>>>');\n\n socket_write($this->_socketHandler, str_replace(\"\\n\", '\\n', $command) . PHP_EOL);\n\n $buffer = '';\n socket_recv($this->_socketHandler, $buffer, 2048, 0);\n $buffer = $this->sanitize($buffer);\n $this->_debugLog(PHP_EOL . trim($buffer), '<<<');\n\n $resultData = explode(\"\\n\", trim($buffer));\n $lastLine = array_pop($resultData);\n\n list($code, $message) = explode(' ', $lastLine, 2);\n if (!$code || !$message) {\n throw new RawClientException('Error while parsing answer: ' . $lastLine);\n }\n\n $this->_resultCode = intval($code);\n $this->_resultData = $resultData;\n $this->_resultMessage = $message;\n\n $this->_debugLog(sprintf('Code - (%s)', trim($this->_resultCode)), '***');\n $this->_debugLog(sprintf('Message - (%s)', trim($this->_resultMessage)), '***');\n $this->_debugLog(PHP_EOL);\n\n return true;\n }",
"protected function send($cmd){\n $resp = [];\n //Clear any previous errors\n $this->error = '';\n $cmd = $cmd.\"\\n\";\n\n fwrite($this->connection, $cmd);\n\n while (!feof($this->connection)) {\n $line = fgets($this->connection, 1024);\n\n if(strncmp(MPDClient::OK, $line, strlen(MPDClient::OK)) === 0){\n break;\n }\n\n if(strncmp(MPDClient::ERR, $line, strlen(MPDClient::ERR)) === 0){\n $this->error = substr($line, strlen(MPDClient::ERR));\n break;\n }\n\n array_push($resp, trim($line)); \n }\n\n return $resp;\n }",
"public function sendCommand($cmd) {\n $this->log($cmd);\n $cmd .= \"\\r\\n\";\n fwrite($this->getConnection(), $cmd);\n }",
"function _Write($cmd, $s1='', $s2='') {\n\t\t$id = ++$this->_Id;\n\n\t\t// Put our packet together\n\t\t$data = pack(\"VV\",$id,$cmd).$s1.chr(0).$s2.chr(0);\n\n\t\t// Prefix the packet size\n\t\t$data = pack(\"V\",strlen($data)).$data;\n\n\t\t// Send packet\n\t\tfwrite($this->_Sock,$data,strlen($data));\n\n\t\t// In case we want it later we'll return the packet id\n\t\treturn $id;\n\t}",
"protected final function getResponse()\n {\n $this->response = \n $this->communicator->getResponse($this->buildCommand());\n }",
"public function send() {\n $tidy = new Tidy();\n $tidy->parseString($this->output, $this->tidyConfig);\n $tidy->cleanRepair();\n\n // Send the output string to the client\n echo $tidy;\n }",
"public function exec($command) {\n\n $this->write($command);\n $this->waitPrompt();\n return $this->getBuffer();\n }",
"private function doCommand($cmd, $timeout=10.0) {\n \n /* try to open the command port */\n \n $errno = 0;\n $errstr = \"\";\n $handle = fsockopen(\"tcp://localhost\", 5999, $errno, $errstr, $timeout); \n\n if(!$handle) {\n \n $this->error(\"doCommnand() - can't open command port ($errno): $errstr\");\n return false;\n }\n \n /* send the command */\n \n $cmd = trim($cmd).\"\\n\";\n \n if(!fwrite($handle, $cmd)) {\n $this->error(\"doCommnand() - can't send command.\");\n return false;\n }\n \n /* get the output */\n \n $output = \"\";\n \n while(!feof($handle)) {\n \n $output .= fgets($handle, 2048);\n }\n \n fclose($handle); \n\n /* pass back the lines of output as an array */\n \n return explode(\"\\n\", $output);\n }",
"public function send_cmd($request) {\n\t\t// make or get the socket filehandle\n\t\tif (!$this->init_socket() ) {\n\t\t\ttrigger_error (\"oSRS Error - Unable to establish socket: (\". $this->_socketErrorNum .\") \". $this->_socketErrorMsg, E_USER_WARNING);\n\t\t\tdie();\n\t\t}\n\n\t\t// Authenticate user\n\t\t$auth = $this->authenticate();\n\t\t\n\t\tif (!$auth) {\n\t\t\tif ($this->_socket) $this->close_socket();\n\t\t\ttrigger_error (\"oSRS Error - Authentication Error: \". $auth['error'], E_USER_WARNING);\n\t\t\tdie();\n\t\t}\n\n\t\t$this->send_data($request);\n\t\t$data = $this->read_data();\n \n $num_matches = preg_match('/<item key=\"response_code\">401<\\/item>/', $data, $matches);\n\n if ($num_matches > 0)\n trigger_error(\"oSRS Error - Reseller username or osrs_key is incorrect, please check your config file.\");\n \n\t\treturn $data;\n\t}",
"private static function telnetOp($command)\n {\n self::$ops[] = $command;\n if (empty(self::$telnet_handle)) {\n self::telnetStart();\n }\n\n fwrite(self::$telnet_handle, $command.\"\\n\");\n $response = '';\n $line = '';\n $empty_line_counter = 0;\n do {\n $response .= $line;\n $line = fgets(self::$telnet_handle, 1024); //Read a max of 1KB of data\n if (empty(trim($line))) {\n $empty_line_counter++;\n if ($empty_line_counter > 5) {\n break;\n }\n } else {\n $empty_line_counter = 0;\n }\n } while (trim($line) !== 'END');\n\n //Intentionally doesn't append END\n return trim($response);\n }",
"private function writeCommand($command)\n { \n fwrite($this->smtpConnection, $command);\n }",
"private function response() {\n $reply = trim(fgets($this -> __sock, 512));\n switch(substr($reply, 0, 1)) {\n /* Error reply */\n case '-':\n trigger_error('ERROR (' . trim($reply) . ')', E_USER_ERROR);\n /* Inline reply */\n case '+':\n $response = substr(trim($reply), 1);\n if($response === 'OK') $response = true;\n break;\n /* Bulk reply */\n case '$':\n $response = null;\n if($reply === '$-1') break;\n $read = 0;\n $size = intval(substr($reply, 1));\n if($size > 0) {\n do {\n $block_size = ($size - $read) > 1024 ? 1024 : ($size - $read);\n $r = fread($this -> __sock, $block_size);\n if($r === false)\n trigger_error('READ FROM SERVER ERROR', E_USER_ERROR);\n else {\n $read += strlen($r);\n $response .= $r;\n }\n } while($read < $size);\n }\n fread($this -> __sock, 2); /* CRLF */\n break;\n /* Multi-bulk reply */\n case '*':\n $count = intval(substr($reply, 1));\n if($count === -1) return null;\n $response = array();\n for($i = 0; $i < $count; $i++)\n $response[] = $this -> response();\n break;\n /* Integer reply */\n case ':':\n $response = intval(substr(trim($reply), 1));\n break;\n default:\n trigger_error('UNKNOWN RESPONSE ERROR', E_USER_ERROR);\n }\n return $response;\n }",
"public function client_send($data, $command = '')\n {\n }",
"public function respond() {\n\t\thttp_response_code($this->code);\n\n\t\t// Additional headers\n\t\tforeach ($this->head as $header) {\n\t\t\theader($header);\n\t\t}\n\n\t\t// Write the body\n\t\tforeach ($this->body as $toStringable) {\n\t\t\techo $toStringable;\n\t\t}\n\t}",
"public function doRaw($command)\n {\n $this->send($command);\n }",
"protected function clientCommand($command)\n {\n MPCMF_LL_DEBUG && error_log(\"==\\n+ waiting: \" . ($this->waiting ? 'yes' : 'no'));\n\n if(!$this->waiting) {\n MPCMF_LL_DEBUG && error_log(\"+ input: {$command}\");\n if(!preg_match('/(?<cmd>[a-z]+)\\s/i', $command, $match)) {\n MPCMF_LL_DEBUG && error_log(\"[!!!] UNKNOWN COMMAND: {$command}\");\n return;\n }\n $this->cmd = $match['cmd'];\n $this->processCommand();\n } else {\n $this->processPayload();\n }\n\n }",
"public function sendResponse();",
"private function writeData($command) {\n\t\t$data = pack('V', -1) . $command;\n\n\t\t$length = strlen($data);\n\n\t\treturn $length === fwrite($this->socket, $data, $length);\n\t}",
"private function get_command(){\n if (!isset($_POST['command'])) {\n die(\"No command received, no result\");\n }\n $this->command = $_POST['command'];\n }",
"function output() {\n if (isset($this->status)) {\n $this->send_header(sprintf('HTTP/1.1 %d %s',\n $this->status, $this->reason),\n TRUE,\n $this->status);\n }\n\n foreach ($this->headers as $k => $v) {\n $this->send_header(\"$k: $v\");\n }\n\n echo $this->body;\n }",
"public function sendProcess($command, $contentType = \"text/plain\")\n {\n $this['response']->setBody(new Stream(popen($command, 'r')));\n $this['response']->setHeader(\"Content-Type\", $contentType);\n }",
"private function sendCommand($command) {\n\t\t# Log the outbound message\n\t\tif($this->config['logging'] == 2) {\n\t\t\t$this->log(\"[SEND]: \".rtrim($command,\"\\r\\n\"));\n\t\t}\n\t\tif(substr($command,-4) != \"\\n\\r\") {\n\t\t\t$command = $command . \"\\n\\r\";\n\t\t}\n\t\t$writtenBytes = fwrite($this->socket, $command, strlen($command));\n\t\tif($writtenBytes < strlen($command)) {\n\t\t\tthrow new Exception(\"Attempted to write \".strlen($command).\" bytes, could only send {$writtenBytes} to socket\");\n\t\t}\n\t}",
"public function send()\n {\n fwrite($this->rStream, $this->sText);\n }",
"public function serveRequest()\n {\n $msg = $this->connection->read();\n if (!$msg) return;\n $this->connection->acknowledge($msg);\n \n $replyMsg = $this->act($msg);\n\n // write correlation id\n $replyMsg->setHeader(\"correlation-id\", $msg->getId());\n\n $this->connection->send($msg->getReplyTo(), $replyMsg);\t\t\n }",
"function putcmd($cmd, $arg = \"\")\r\n {\r\n \tif (!$this->_socket) {\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n \tif ($arg != \"\") {\r\n \t\t$cmd = $cmd.\" \".$arg;\r\n \t}\r\n \t\r\n \tfputs($this->_socket, $cmd.\"\\r\\n\");\r\n \t$this->debug(\"> \".$cmd.\"\\n\");\r\n \t\r\n \treturn TRUE;\r\n }",
"private function sendResponse(){\n\t\tif(!isset($this->rpcRequest->id)){ return; } // never respond to Notifications\n\n\t\t$response = new stdClass();\n\t\t$response->jsonrpc = \"2.0\";\n\t\t$response->id = $this->rpcRequest->id;\n\n\t\tif($this->responseError){\n\t\t\t$response->error = $this->responseError; // error response\n\t\t}else{\n\t\t\t$response->result = $this->responseResult; // normal response\n\t\t}\n\n\t\tif($this->rpcDebugLevel != self::LOG_NONE){\n\t\t\t$response->log = array();\n\t\t\tforeach($this->log as $msg){\n\t\t\t\tif($msg[\"level\"] <= $this->rpcDebugLevel){\n\t\t\t\t\t$response->log[] = $msg[\"message\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo $this->toJson($response);\n\t}",
"public function request($command)\n {\n $cmd = 'echo ' . ProcessUtils::escapeArgument($command) . ' | nc ' . ProcessUtils::escapeArgument($this->host) . ' ' . ProcessUtils::escapeArgument($this->port);\n\n $process = new Process($cmd, getcwd());\n $process->run();\n\n if (!$process->isSuccessful()) {\n return false;\n }\n\n return $process->getOutput();\n }",
"function smtp_command($cmd) \n {\n \tVWP::nowarn();\n $sock_data = @ socket_write($this->_socket, $cmd . \"\\r\\n\", strlen($cmd) + 2);\n VWP::noWarn(false);\n \n if ($sock_data === false) {\n \t$this->_smtp_msg = \"Unable to write to socket\";\n \treturn $this->report_error($this->_smtp_msg);\n }\n \n $this->_smtp_msg = \"\";\n $this->_smtp_code = false;\n $i = 0;\n \n while ($line = $this->smtp_getline()) {\n $i++;\n \n if ((strlen($line) > 3) && ($line[3] == \" \")) { \n $tmp = substr($line,0,3) + 0;\n $this->_smtp_msg .= substr($line,4); \n if ($tmp != 220) { \n $this->_smtp_code = $tmp;\n break;\n } \n } else {\n $this->_smtp_msg .= $line;\n } \n } \n return $this->_smtp_code; \n }",
"function command_query($sock, $input) {\n\t// extract key and value\n\tif ($input[0] != '\"' || ($pos = strpos($input, '\"', 1)) === false) {\n\t\tprint(\"\\tSyntax error\\n\");\n\t\treturn;\n\t}\n print \"input:$input #$pos\\n\";\n $query = substr($input, 1, $pos-1);\n print \"query: $query\\n\";\n\t// send the command\n\t$buffer = chr(1) . chr(mb_strlen($query, 'ascii')+1) . $query.chr(0);\n print(\"sending $buffer#\\n\");\n\tfwrite($sock, $buffer);\n\t$response = fread($sock, 1);\n\tif (ord($response) != 1) {\n\t\tprint(\"\\tERROR\\n\");\n\t\treturn;\n\t}\n\t$response = fread($sock, 4);\n\t$length = unpack('Nint', $response);\n\t$length = $length['int'];\n\t$value = null;\n\tif ($length > 0) {\n\t\t$value = fread($sock, $length);\n\t\tprint(\"$value\\n\");\n\t}\n}",
"function execute() {\n foreach($this -> queue as $queue) {\n for($written = 0; $written < strlen($queue); $written += $fwrite) {\n $fwrite = fwrite($this -> __sock, substr($queue, $written));\n if($fwrite === false or $fwrite <= 0)\n trigger_error('WRITE ERROR', E_USER_ERROR);\n }\n }\n // Read in the results from the pipelined commands\n $responses = array();\n for($i = 0; $i < count($this -> queue); $i++) {\n $responses[] = $this -> response();\n }\n // Clear the queue and return the response\n $this -> queue = array();\n if($this -> pipelined) {\n $this -> pipelined = false;\n return $responses;\n }\n return $responses[0];\n }",
"public function handle($command)\n {\n return $this->parseResponse($this->execute($command));\n }",
"private function sendSmdResponse(){\n\t\tglobal $RPC_CONFIG;\n\t\t$url = \"\";\n\t\t$app = \"\";\n\t\tif(isset($RPC_CONFIG)){\n\t\t\tif(array_key_exists(\"url\", $RPC_CONFIG)){\n\t\t\t\t$url = $RPC_CONFIG[\"url\"];\n\t\t\t}else{\n\t\t\t\t$s = (isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\";\n\t\t\t\t$server = trim($_SERVER[\"SERVER_NAME\"]);\n\t\t\t\t$base = trim($this->baseUrl);\n\t\t\t\t$url = \"http{$s}://{$server}{$base}\";\n\t\t\t}\n\t\t\t$app = array_key_exists(\"appName\", $RPC_CONFIG) ? $RPC_CONFIG[\"appName\"] . \" \" : \"\";\n\t\t}\n\n\t\t$smd = new stdClass();\n\t\t$smd->SMDVersion = \"2.0\";\n\t\t$smd->envelope = \"JSON-RPC-2.0\";\n\t\t$smd->transport = \"POST\";\n\t\t$smd->target = $this->baseUrl;\n\t\t$smd->id = $url;\n\t\t$smd->description = \"{$app}JSON-RPC 2.0 API\";\n\t\t$smd->services = $this->buildSmdServices();\n\n\t\techo $this->toJson($smd);\n\t}",
"private function sendCmd($cmd, $params='') {\r\n\r\n if (!is_resource($this->socket)) {\r\n return false;\r\n }\r\n\r\n fputs($this->socket, $cmd . ' ' . $params . \"\\n\");\r\n\r\n $msg = '';\r\n while (strpos($msg, 'msg=') === false) {\r\n $msg .= fread($this->socket, 8096);\r\n }\r\n\r\n if (strpos($msg, 'error id=2568') !== false) {\r\n $this->errors[] = '"<b>' . $cmd . '</b>" command failed! insufficient client permissions!';\r\n return false;\r\n }\r\n\r\n if (strpos($msg, 'msg=ok') === false) {\r\n return false;\r\n }\r\n else {\r\n return $msg;\r\n }\r\n }",
"protected function sendResponse() {}",
"private function getServerResponse() {\r\n\t\t$data = \"\";\r\n\t\twhile ( $str = fgets ( $this->conn, 4096 ) ) {\r\n\t\t\t$data .= $str;\r\n\t\t\tif (substr ( $str, 3, 1 ) == \" \") {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($this->debug)\r\n\t\t\techo $data . \"<br>\";\r\n\t\treturn $data;\r\n\t}",
"private function getServerResponse() {\n\t\t$data=\"\";\n\t\twhile($str = fgets($this->conn,4096)) {\n\t\t\t$data .= $str;\n\t\t\tif(substr($str,3,1) == \" \") { break; }\n\t\t}\n\t\tif($this->debug) echo $data . \"<br>\";\n\t\treturn $data;\n\t}",
"private function Send($Command, $Addition = '') {\n\t\t// pack the command into a binary string\n\t\t$Command = pack('c*', self::B1, self::B2, $Command, 0x01, 0x02, 0x03, 0x04).$Addition;\n\t\t// send the binary string to the server\n\t\tif(strlen($Command) !== @fwrite($this->Socket, $Command, strlen($Command)))\n\t\t\t// my attempt to not throw exceptions\n\t\t\treturn false;\n\t\t\t#throw new Exception('Failed to write on socket', 2);\n\n\t\t// listen what the server has to say now\n\t\t$Data = fread($this->Socket, 2048);\n\t\tif($Data === false)\n\t\t\t// my attempt to not throw exceptions\n\t\t\treturn false;\n\t\t\t#throw new Exception('Failed to read from socket', 3);\n\n\t\t// remove the first 5 unnecessary bytes (0x00, 0x01, 0x02, 0x03, 0x04) Status type and own ID token\n\t\treturn substr($Data, 5);\n\t}",
"public function write($command, $end = \"\\r\\n\") {\n\t\tif ($this->active === null) {\n\t\t\tthrow new Swift_ConnectionException ( \"None of the connections set have been started\" );\n\t\t}\n\t\treturn $this->connections [$this->active]->write ( $command, $end );\n\t}",
"public static function response($req, $out)\n {\n $chunksize = 65520;\n do {\n if (strlen($out) > $chunksize) {\n while (($ol = strlen($out)) > 0) {\n $l = min($chunksize, $ol);\n if (static::sendChunk($req, substr($out, 0, $l)) === false) {\n fwrite(STDOUT, \"send response failed.\\n\");\n break 2;\n }\n $out = substr($out, $l);\n }\n } elseif (static::sendChunk($req, $out) === false) {\n fwrite(STDOUT, \"send response failed.\\n\");\n break;\n }\n } while (false);\n static::endRequest($req, 0, 0);\n\n return true;\n }",
"public function emit()\n {\n $this->sendHeaders();\n $this->sendBody();\n }",
"public function sendResponse() {\n\n header('Content-Type: ' . SabreAMF_Const::MIMETYPE);\n $this->amfResponse->setEncoding($this->amfRequest->getEncoding());\n $this->amfResponse->serialize($this->amfOutputStream);\n echo($this->amfOutputStream->getRawData());\n\n }",
"public function cmd(Request $req)\n {\n $username = 'admin';\n $password = '3d2R';\n $ip = '10.1.1.200';\n $port = '22';\n\n $connection = ssh2_connect( $ip, $port);\n ssh2_auth_password($connection, $username, $password);\n $cisco = $req->get('cmd');\n $stream = ssh2_exec($connection, $cisco);\n $errorStream = ssh2_fetch_stream($stream, SSH2_STREAM_STDERR);\n stream_set_blocking($errorStream, true);\n stream_set_blocking($stream, true);\n $output = stream_get_contents($stream);\n $lignes = explode(\"\\n\", $output);\n foreach ( $lignes as $key => $ligne ) {\n if ($key < 1) continue;\n if (trim(preg_replace('/\\s\\s+/', ' ', $ligne)) == '\"\"\"' || trim(preg_replace('/\\s\\s+/', ' ', $ligne)) == 'Port') continue;\n }\n\n return response()->json([\n 'data' => $output\n ]);\n }",
"public function send()\n {\n http_response_code( $this->getResultCode() );\n echo $this->getBody();\n }",
"public function write($message)\n {\n $socket = $this->connect();\n\n foreach ((array) $message as $line) {\n fwrite($socket, $line);\n fwrite($socket, $this->eol);\n }\n\n $response = $this->read($socket);\n\n $this->disconnect($socket);\n\n return $response;\n }",
"public function command($cmd)\n {\n $response = $this->protocol->opQuery(\"{$this->name}.\\$cmd\", $cmd, 0, -1, 0);\n return $response['result'][0];\n }",
"protected function sendRequest()\n {\n // If a next token is set, then add it to the command\n if ($this->nextToken) {\n $this->command->set('page', $this->nextToken);\n }\n\n // Execute the command and parse the result\n $result = $this->command->execute();\n\n // Find the next token in the result metadata\n if (!isset($result['meta'])) {\n $this->nextToken = false;\n } else {\n $meta = $result['meta'];\n $nextPage = $meta['page'] + 1;\n $this->nextToken = $nextPage <= $meta['pages'] ? $nextPage : false;\n }\n\n // Return the actual result data\n return $result['words'];\n }",
"public function send()\r\n\t{\r\n\t\t$this->outputBody();\r\n\t\texit;\r\n\t}",
"private function __send_response(){\n http_response_code($this->response_code);\n if($this->_redirect) header(\"Location: \".Config::WEB_DIRECTORY.\"{$this->_redirect_location}\");\n elseif($this->_JSON){\n header('Content-Type: application/json; charset=UTF-8');\n print json_encode($this->_JSON_contents, JSON_PRETTY_PRINT);\n }elseif($this->_HTML){\n if($this->_HTML_load_view) $this->_template->render();\n } /** @noinspection PhpStatementHasEmptyBodyInspection */ else{\n // Do nothing\n }\n }",
"public function send() : void\n {\n \\http_response_code( $this->status );\n\n foreach ( $this->headers->all() as $name => $values ) {\n foreach ( $values as $index => $value ) {\n \\header( \"$name: $value\", $index === 0 );\n }\n }\n\n echo $this->content;\n }",
"public function reply()\n\t{\n\t\tif($this->return){\n\t\t\t$this->_reply(200, 'Ok', $this->return);\n\t\t}else{\n\t\t\t$this->_reply(200, 'Ok', $this->return);\n\t\t}\n\t\texit();\n\t}",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"public function send();",
"protected function pipeOut()\n {\n if (strpos($this->getFlags(), \"t\") !== false) return;\n if (!$this->isAlive()) throw new Swift_ConnectionException(\"The sendmail process is not alive and cannot be read from.\");\n $ret = \"\";\n $line = 0;\n while (true)\n {\n $line++;\n stream_set_timeout($this->pipes[1], $this->timeout);\n $tmp = @fgets($this->pipes[1]);\n if ($tmp === false)\n {\n throw new Swift_ConnectionException(\"There was a problem reading line \" . $line . \" of a sendmail SMTP response. The response so far was:<br />[\" . $ret . \"]. It appears the process has died.\");\n }\n $ret .= trim($tmp) . \"\\r\\n\";\n if ($tmp{3} == \" \") break;\n }\n fflush($this->pipes[1]);\n return $ret = substr($ret, 0, -2);\n }\n /**\n * Read a full response from the buffer (this is spoofed if running in -t mode)\n * @return string\n * @throws Swift_ConnectionException Upon failure to read\n */\n public function read()\n {\n if (strpos($this->getFlags(), \"t\") !== false)\n {\n switch (strtolower($this->request))\n {\n case null:\n return \"220 Greetings\";\n case \"helo\": case \"ehlo\":\n return \"250 hello\";\n case \"mail\": case \"rcpt\": case \"rset\":\n return \"250 ok\";\n case \"quit\":\n return \"221 bye\";\n case \"data\":\n $this->send = true;\n return \"354 go ahead\";\n default:\n return \"250 ok\";\n }\n }\n else return $this->pipeOut();\n }\n /**\n * Write a command to the process (leave off trailing CRLF)\n * @param string The command to send\n * @throws Swift_ConnectionException Upon failure to write\n */\n public function write($command, $end=\"\\r\\n\")\n {\n if (strpos($this->getFlags(), \"t\") !== false)\n {\n if (!$this->send && strpos($command, \" \")) $command = substr($command, strpos($command, \" \")+1);\n elseif ($this->send)\n {\n $this->pipeIn($command);\n }\n $this->request = $command;\n $this->send = (strtolower($command) == \"data\");\n }\n else $this->pipeIn($command, $end);\n }\n /**\n * Try to start the connection\n * @throws Swift_ConnectionException Upon failure to start\n */\n public function start()\n {\n $log = Swift_LogContainer::getLog();\n if ($log->hasLevel(Swift_Log::LOG_EVERYTHING))\n {\n $log->add(\"Trying to start a sendmail process.\");\n }\n if (!$this->getPath() || !$this->getFlags())\n {\n throw new Swift_ConnectionException(\"Sendmail cannot be started without a path to the binary including flags.\");\n }\n if ($log->hasLevel(Swift_Log::LOG_EVERYTHING))\n {\n $log->add(\"Trying to stat the executable '\" . $this->getPath() . \"'.\");\n }\n if (!@lstat($this->getPath()))\n {\n throw new Swift_ConnectionException(\n \"Sendmail cannot be seen with lstat(). The command given [\" . $this->getCommand() . \"] does not appear to be valid.\");\n }\n \n $pipes_spec = array(\n array(\"pipe\", \"r\"),\n array(\"pipe\", \"w\"),\n array(\"pipe\", \"w\")\n );\n \n $this->proc = proc_open($this->getCommand(), $pipes_spec, $this->pipes);\n\n if (!$this->isAlive())\n {\n throw new Swift_ConnectionException(\n \"The sendmail process failed to start. Please verify that the path exists and PHP has permission to execute it.\");\n }\n }\n /**\n * Try to close the connection\n */\n public function stop()\n {\n $log = Swift_LogContainer::getLog();\n if ($log->hasLevel(Swift_Log::LOG_EVERYTHING))\n {\n $log->add(\"Terminating sendmail process.\");\n }\n foreach ((array)$this->pipes as $pipe)\n {\n @fclose($pipe);\n }\n \n if ($this->proc)\n {\n proc_close($this->proc);\n $this->pipes = null;\n $this->proc = null;\n }\n }\n /**\n * Check if the process is still alive\n * @return boolean\n */\n public function isAlive()\n {\n return ($this->proc !== false\n && is_resource($this->proc)\n && is_resource($this->pipes[0])\n && is_resource($this->pipes[1])\n && $this->proc !== null);\n }\n /**\n * Destructor.\n * Cleans up by stopping any running processes.\n */\n public function __destruct()\n {\n $this->stop();\n }\n}",
"public function command(string $commandClassname, array $arguments = []): Response\n\t{\n\t\t$method = new ReflectionMethod($commandClassname, 'create');\n\t\t$commandString = $method->invoke(null, $arguments);\n\t\tif ($this->debug) {\n\t\t\techo 'COMMAND STRING IS: ' . $commandString . PHP_EOL;\n\t\t}\n\t\t$tag = sprintf('%08d', $this->commandTag);\n\t\t$imapCommand = \"{$tag} {$commandString}\\r\\n\";\n\t\t$lines = [];\n\n\t\t$this->socket->write($imapCommand);\n\n\t\twhile ($line = $this->socket->read()) {\n\t\t\t$lines[] = $line;\n\t\t\tif (str_starts_with($line, $tag)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$this->lastResponse = new Response($tag, $lines);\n\t\t$this->commandTag++;\n\n\t\tif ($this->debug) {\n\t\t\tforeach ($lines as $line) {\n\t\t\t\techo $line . PHP_EOL;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->lastResponse;\n\t}",
"public function send($command)\n {\n if(empty($command)) {\n return false;\n }\n\n try {\n $socket = $this->socket();\n\n if($socket) {\n socket_send($socket, $command, strlen($command), 0);\n socket_recv($socket, $return, config('clamavfileupload.clamd_sock_len'), 0);\n socket_close($socket);\n\n return trim($return);\n }\n } catch (\\ErrorException $e) {\n $this->message = $e->getMessage();\n }\n\n return false;\n }",
"public function send()\n {\n http_response_code($this->statusCode);\n $this->sendContent();\n }",
"public function aim_recv()\r\n\t{\r\n\t\t$header = fread($this->resource, 6);\r\n if ($this->user['debug']) $this->aim_debug($header, AIM_RAW);\r\n\r\n\t\t// Need error checking here to prevent bad data\r\n\t\ttry {\r\n\t\t\tif (!$data = @unpack(\"aone/Ctwo/nthree/nfour\", $header)) {\r\n\t\t\t\t// This normally happens if you sign on elsewhere with the same name,\r\n // or, if the TOC server resets (AOL likes to do this alot).\r\n\t\t\t\tthrow new TACException('Connection to TOC server interrupted.');\r\n\t\t\t} \r\n\t\t} catch(TACException $ex) {\r\n\t\t\t$ex->display();\r\n\t\t}\r\n\r\n if ($this->user['debug']) print_r($data);\r\n\t\t$msg = fread($this->resource, $data['four']);\r\n\t\t$msg = implode('', unpack(\"a*done\", $msg));\r\n if ($this->user['debug']) var_dump($msg);\r\n\r\n // match incoming commands\r\n preg_match(\"/^([A-Z0-9_]{4,19})\\:(.*)/s\", $msg, $matches);\r\n @list($orig, $cmd, $args) = $matches;\r\n // send the command and arguments to our parser\r\n $this->parser->aim_parse_command($cmd, $args);\r\n // regain some memory\r\n unset($header, $orig, $data, $matches);\r\n\t}",
"public function send()\n {\n if (function_exists('http_response_code')) {\n http_response_code($this->code);\n } else {\n header(' ', true, $this->code);\n }\n\n foreach ($this->headers as $name => $value) {\n header($name . ': ' . $value);\n }\n\n if (!is_null($this->content)) {\n echo $this->content;\n }\n }",
"public function answer ( )\n\t{\n\t\t$output_options = array(\n \"encoding\" => \"utf-8\"\n );\n\t\treturn str_replace( \"&#\", \"&#\", xmlrpc_server_call_method( $this->sh, file_get_contents( 'php://input'), NULL, $output_options ) );\n\t\t\n\t}",
"public function send()\r\n\t{\r\n\t\t$header = $this->buildHeader();\r\n\r\n\t\t$this->response = $this->connect($header);\r\n\r\n\t\treturn $this->getContent();\r\n\t}",
"function send_request_to_host($cmd_array, $host_data)\n{\n $socket = getsock($host_data['address'], $host_data['port']);\n \n if ($socket != null)\n {\n $cmd = json_encode($cmd_array);\n\n socket_write($socket, $cmd, strlen($cmd));\n $line = readsockline($socket);\n socket_close($socket);\n\n if (strlen($line) == 0)\n return null;\n\n if (substr($line,0,1) == '{')\n $data = json_decode($line, true);\n else\n return null;\n }\n else\n {\n return null;\n }\n\n return $data;\n}",
"public function exec($cmd) {\n if(!$this->connection) return(\"No connection\\n\");\n if(!($stream = ssh2_exec($this->connection, $cmd))) {\n die(\"SSH command failed\\n\");\n }\n stream_set_blocking($stream, true);\n $data = \"\";\n while ($buf = fread($stream, 4096)) {\n $data .= $buf;\n }\n fclose($stream);\n return $data;\n }",
"function sendcmd($in, $address, $service_port)\n{\n $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n if ($socket === false) {\n return \"socket_create() failed: reason: \" . socket_strerror(socket_last_error()) . \"\\n\";\n }\n\n $result = socket_connect($socket, $address, $service_port);\n if ($result === false) {\n return \"socket_connect() failed.\\nReason: ($result) \" . socket_strerror(socket_last_error($socket)) . \"\\n\";\n }\n \n socket_write($socket, $in, strlen($in));\n $mess = \"\";\n /*$next = \"\";*/\n sleep(1);\n \n /*$next = socket_read($socket, 4096);*/\n\t\n\twhile(0 != socket_recv($socket, $out, 4096, MSG_DONTWAIT)){ \n\tif($out != null) \n\t\t$mess .= $out; \n\t}; \n\t\n /*$mess .= $next;*/\n \n socket_close($socket);\n return $mess;\n}",
"final function send()\n {\n if (! $command = $this->Command )\n throw new \\Exception('No Command Is Specified.');\n\n\n // Alter Platform Commands\n $methodName = $command->getMethodName();\n $nameSpace = implode('_', $command->getNamespace());\n $alterCall = $nameSpace.'_'.$methodName;\n if (! method_exists($this, $alterCall) )\n throw new \\BadMethodCallException(sprintf(\n 'Method (%s) is not defined in Platform as (%s).'\n , $command->getMethodName()\n , $alterCall\n ));\n\n\n // Call Alternative Method Call Instead ...\n $r = $this->{$alterCall}( $command );\n if (! $r instanceof iResponse)\n throw new \\Exception(sprintf(\n 'Result from (%s) must be instance of iResponse. given: (%s).'\n , $alterCall, \\Poirot\\Std\\flatten($r)\n ));\n\n return $r;\n }",
"function read()\n {\n $response_content = '';\n if ($this->headers['Transfer-Encoding'] == 'chunked')\n {\n while ($chunk_length = hexdec(fgets($this->socket)))\n {\n $response_content_chunk = '';\n $read_length = 0;\n\n while ($read_length < $chunk_length)\n {\n $response_content_chunk .= fread($this->socket, $chunk_length - $read_length);\n $read_length = strlen($response_content_chunk);\n }\n\n $response_content .= $response_content_chunk;\n fgets($this->socket);\n }\n }\n else\n {\n while (!feof($this->socket))\n {\n $response_content .= fgets($this->socket, 128);\n }\n }\n return chop($response_content);\n fclose($this->socket);\n }",
"function _sendStringResponse($str)\n {\n $response='{' . $this->_getLineLength($str) . \"+}\\r\\n\" . $str ;\n return $this->_sendCmd($response);\n }",
"private function command($command, $multicall)\n\t{\n\t\t$message = new xmlrpcmsg($command, array(new xmlrpcval($this->hash, 'string')));\n\t\t\n\t\tif($multicall === true)\n\t\t{\n\t\t\t$return = $this->multicall->add($message, $this->hash);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result = $this->client->send($message);\n\t\t\t$return = $this->checkError($result);\n\t\t}\n\t\treturn $return;\n\t}",
"private function write($buffer, $addNewLine = true){\r\n\t\r\n\t\tif (!$this->socket){\r\n\t\t\tthrow new Exception(\"Telnet connection closed\");\r\n\t\t}\r\n\t\r\n\t\t// clear buffer from last command\r\n\t\t$this->clearBuffer();\r\n\t\t\r\n\t\tif ($addNewLine == true){\r\n\t\t\t$buffer .= \"\\n\";\r\n\t\t}\r\n\t\t\r\n\t\tif (!fwrite($this->socket, $buffer) < 0){\r\n\t\t\tthrow new Exception(\"Error writing to socket\");\r\n\t\t}\r\n\t\t\r\n\t\treturn self::TELNET_OK;\r\n\t}",
"public function outputStatus()\n {\n if ($this->responseStatus instanceof ResponseStatus) {\n header(sprintf('HTTP/1.1 %d %s', $this->responseStatus->httpStatusCode, $this->responseStatus->httpStatusMessage));\n }\n echo $this->body;\n }",
"public function cmd($command) {\n\n /** @var \\Klang\\App\\Service\\Shell\\Response $response */\n $response = new Service\\Shell\\Response();\n\n exec($command, $response->output, $response->exitCode);\n\n return $response;\n }",
"abstract public function response();",
"public function writeCommand(string $verb, ?string $data): string\n {\n fwrite($this->getSocket(), $verb . ' ' . $data . \"\\r\\n\");\n\n return $this->read();\n }",
"public function write();",
"public function write();",
"public function getCommandResponse()\n {\n return $this->readOneof(4);\n }",
"protected function runCommand($command)\n {\n $fp = tmpfile();\n $input = new StringInput($command);\n $output = new StreamOutput($fp);\n\n $this->app->run($input, $output);\n\n fseek($fp, 0);\n $output = '';\n while (!feof($fp)) {\n $output = fread($fp, 4096);\n }\n fclose($fp);\n\n return $output;\n }",
"function send_read($data){\n\t\n\t\t$address = gethostbyname($this->vars['host']);\n\t\t$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\t\t$result = socket_connect($socket, $address, $this->vars['port']);\n\n\t\t$transfer = json_encode($this->vars[function_list]);\n\t\t\n\t\t$count = strlen($transfer);\n\t\tprint \"abc\";\n\t\tsocket_send($socket,$count,strlen($count),MSG_DONTROUTE); #send length data to server\n\n\t\tsocket_recv($socket , $buf , 2 , MSG_WAITALL ); #become ack\n\n\t\tsocket_send($socket,$transfer,$count,MSG_DONTROUTE); #send data to server\n\t\t\n\t\tsocket_recv($socket , $count , 30 , MSG_WAITALL ); #income char lentgh\n\t\t\n\t\tsocket_send($socket,'ok',2,MSG_DONTROUTE); #send ack\n\t\t\n\t\tsocket_recv($socket , $buf , $count , MSG_WAITALL ); #income new data\n\n\t\t$returner = json_decode($buf,true);\n\t\tsocket_close($socket);\n\t\treturn($returner);\n\t\t\n\t}",
"public function send() {\r\n\t\t$this->sendHeaders ();\r\n\t\techo $this->getContent ();\r\n\t}",
"public function sendOutput($message,$type=2){\n\tif($type==1){\n\t\techo \"CON \".$message;\n\t}elseif($type==2){\n\t\techo \"END \".$message;\n\t}else{\n\t\techo \"END We faced an error\";\n\t}\n\texit;\n }",
"public function ping(){\n http_response_code(200);\n ob_end_flush();\n }",
"public function send_response($response) {\n global $OUTPUT;\n\n if ($response instanceof response_interface) {\n $response->send();\n } else if (!empty($response)) {\n echo $OUTPUT->header();\n echo $response;\n echo $OUTPUT->footer();\n }\n }",
"function Write($msg){\r\n $host = \"127.0.0.1\";\r\n $port = \"20205\";\r\n\t\t$sock = socket_create(AF_INET, SOCK_STREAM, 0); //socket openen.\r\n\t\t//socket_connect($sock, $host, $port);\r\n\r\n\t\t//socket_write($sock, $msg, strlen($msg)); //het versturen van de data in de vorm van ID,Value.\r\n\t\t//socket_close($sock); //socket verbinding beindigen.\t\t\r\n\t\t\r\n\t\t$jsonString = file_get_contents('/home/pi/actuator.json'); // actuatoren openen\r\n\t\t$data = json_decode($jsonString, true);\r\n\t\t$msg2 = explode(',', $msg); // bericht ui client splitten op kommas, \t\tbijvoorbeeld \"15,1\".\r\n\r\n\t\t$ID = $msg2[0]; // eerste deel is ID, \t\t\t\t\t\tbijvoorbeeld \"15\".\r\n\t\t$Value = $msg2[1]; // tweede deel is de aan te passen waarde, \tbijvoorbeeld \"1\".\r\n\t\t\r\n\t\t//print_r($data);\r\n\t\t$data[$ID] = $Value;\r\n\r\n\t\t$newJsonString = json_encode($data);\r\n\t\tfile_put_contents('/home/pi/actuator.json', $newJsonString); //uitgesplitste waarden naar actuator.json schrijven om geinterpreteerd te kunnen worden door De raspberry Pi.\r\n\r\n\t\t$msg = trim($msg);\r\n\t\techo \"Client Wrote:\\t\".$msg.\"\\n\\n\";\r\n }",
"public function run()\n { \n $output = (string) $this->get('router')->dispatch();\n $response = $this->get('response');\n $response->setBody($output);\n $response->send();\n\n }",
"public function processRequest() : \\Core\\Responses\\CLIResponse {\n return Response::create('CLIResponse');\n }",
"public function request()\n {\n $this->setParams();\n\n $jsondata = json_encode($this->getData(), JSON_UNESCAPED_SLASHES);\n\n if(!$this->is_JSON($jsondata)){\n $this->log(\"Sending parameters must be JSON.\",'Exiting process.');\n $this->error_message('Sending parameters must be JSON.');\n }\n $lenght = strlen($jsondata);\n if($lenght<=0){\n $this->log(\"Length must be more than zero.\",'Exiting process.');\n $this->error_message(\"Length must be more than zero.\");\n }else{\n $lenght = $lenght <= 999 ? \"0\" . $lenght : $lenght;\n }\n\n $this->response_json = $this->oxd_socket_request(utf8_encode($lenght . $jsondata));\n\n $this->response_json = str_replace(substr($this->response_json, 0, 4), \"\", $this->response_json);\n if ($this->response_json) {\n $object = json_decode($this->response_json);\n if ($object->status == 'error') {\n $this->error_message($object->data->error . ' : ' . $object->data->error_description);\n } elseif ($object->status == 'ok') {\n $this->response_object = json_decode($this->response_json);\n }\n } else {\n $this->log(\"Response is empty...\",'Exiting process.');\n $this->error_message('Response is empty...');\n }\n }",
"function _sendquery($ipport, $cmd) {\r\n\tlist($ip,$port) = explode(':', $ipport);\r\n\tif (!$port) $port = 27960;\r\n\t$retry = 0;\r\n\t$oldmqr = get_magic_quotes_runtime();\r\n\r\n\tif (!$this->_connectsocket($ip, $port)) {\r\n\t\ttrigger_error(\"Failed to connect to socket on $ip:$port\", E_USER_WARNING);\r\n\t\treturn FALSE;\r\n\t}\r\n\r\n\t$packets = array();\t\t\t\t\t// stores each packet seperately, so we can combine them afterwards\r\n\t$command = pack(\"N\", 0xFFFFFFFF) . $cmd . pack('x');\r\n\t$this->raw = \"\";\r\n\r\n\tif ($oldmqr) set_magic_quotes_runtime(0);\r\n\tif ($this->DEBUG) print \"DEBUG: Sending query to $ip:$port:\\n\" . $this->hexdump($command) . \"\\n\";\r\n\tfwrite($this->sock, $command, strlen($command));\r\n\r\n\t$expected = 0;\t\t\t\t\t\t// # of packets we're expecting\r\n\tdo {\r\n\t\t$packet = fread($this->sock, 1500);\r\n\t\tif (strlen($packet) == 0) {\r\n\t\t\t$retry++;\r\n\t\t\tif ($this->DEBUG) print \"DEBUG: Resending query $ip:$port:\\n\" . $this->hexdump($command) . \"\\n\";\r\n\t\t\tfwrite($this->sock, $command, strlen($command));\r\n\t\t\t$expected = 1;\r\n\t\t\tnext;\r\n\t\t}\r\n\r\n\t\tif ($this->DEBUG) print \"DEBUG: Received \" . strlen($packet) . \" bytes from $ip:$port:\\n\" . $this->hexdump($packet) . \"\\n\";\r\n\r\n\t\t$header = substr($packet, 0, 4);\t\t\t\t// get the 4 byte header\r\n\t\t$ack = @unpack(\"N1split\", $header);\r\n\t\t$split = sprintf(\"%u\", $ack['split']);\r\n\t\tif ($this->DEBUG) print \"DEBUG: ACK = \" . sprintf(\"0x%X\", $ack['split']) . \"\\n\";\r\n\t\tif ($split == 0xFeFFFFFF) {\t\t\t\t// we need to deal with multiple packets\r\n\t\t\t$packet = substr($packet, 4);\t\t\t\t// strip off the leading 4 bytes\r\n\t\t\t$header = substr($packet, 0, 5);\t\t\t// get the 'sub-header ack'\r\n\t\t\t$packet = substr($packet, 5);\t\t\t\t// strip off 32bit int ID, seq# and total packet#\r\n\t\t\t$info = @unpack(\"N1id/C1byte\", $header);\t\t// we don't really care about the ID\r\n\t\t\tif ($this->DEBUG) printf(\"DEBUG: Sub ACK: %X (%08b)\\n\", $info['byte'], $info['byte']);\r\n\t\t\tif (!$expected) $expected = $info['byte'] & 0x0F;\t// now we know how many packets to receive\r\n\t\t\t$seq = (int)($info['byte'] >> 4);\t\t\t// get the sequence number of this packet\r\n\t\t\t$packets[$seq] = $packet;\t\t\t\t// store the packet\r\n\t\t\t$expected--;\r\n\t\t} elseif ($split == 0xFFFFFFFF) {\t\t\t\t// we're dealing with a single packet\r\n\t\t\t$packets[0] = $packet;\r\n\t\t\t$expected = 0;\r\n\t\t}\r\n\t} while ($expected and $retry < $this->maxretries());\r\n\r\n\tfclose($this->sock);\r\n\tif ($oldmqr) set_magic_quotes_runtime(1);\r\n\tksort($packets, SORT_NUMERIC);\r\n\t$this->raw = implode('', $packets);\t\t\t\t// glue the packets together to make our final data string\r\n\treturn TRUE;\r\n}"
] | [
"0.71361345",
"0.6177091",
"0.616361",
"0.6146916",
"0.6042675",
"0.59985787",
"0.5965247",
"0.5947134",
"0.5870076",
"0.58602506",
"0.58569264",
"0.58536714",
"0.5832176",
"0.5819279",
"0.5791847",
"0.57824254",
"0.57355845",
"0.5688199",
"0.5683803",
"0.56774294",
"0.56651115",
"0.56433964",
"0.5616584",
"0.5593482",
"0.55492646",
"0.5533574",
"0.5533181",
"0.5529658",
"0.5512947",
"0.5502075",
"0.5488731",
"0.5488037",
"0.54811823",
"0.5451075",
"0.54463047",
"0.54400164",
"0.53975224",
"0.5383254",
"0.5357943",
"0.53576636",
"0.534516",
"0.53403175",
"0.5337304",
"0.5326901",
"0.5322877",
"0.53122497",
"0.5280604",
"0.5273759",
"0.5267563",
"0.5265537",
"0.5228795",
"0.5222454",
"0.51954854",
"0.5185576",
"0.51825315",
"0.51765585",
"0.5167085",
"0.5167085",
"0.5167085",
"0.5167085",
"0.5167085",
"0.5167085",
"0.5167085",
"0.5167085",
"0.5167085",
"0.5167085",
"0.5167085",
"0.51617986",
"0.5160104",
"0.51582",
"0.5154863",
"0.51453567",
"0.51361495",
"0.5122594",
"0.51189977",
"0.5116224",
"0.51130545",
"0.51122046",
"0.5107726",
"0.51071376",
"0.5105263",
"0.509591",
"0.5083166",
"0.50592995",
"0.5058142",
"0.50579995",
"0.50564516",
"0.50498366",
"0.50498366",
"0.50403875",
"0.5036834",
"0.5035862",
"0.50321144",
"0.5026378",
"0.50239736",
"0.50215924",
"0.4994854",
"0.4991623",
"0.4972368",
"0.49720508",
"0.49653834"
] | 0.0 | -1 |
Executes the quit command | public function quit(){
try {
$this->execute('quit', $statusCode, 500);
} catch (VarnishException $exception) {
}
$this->disconnect();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function quit();",
"protected function quit() {\n echo $this->promptMessage('bye') . PHP_EOL . PHP_EOL;\n exit;\n }",
"public function quit()\n {\n $this->sendServerCommand(\"quit\");\n }",
"function quit($exit_message = \"\")\n\t{\n\t\t$this->sendMessageToServer(\"QUIT $exit_message\");\n\t}",
"static function quit(){\n\t\t$args = func_get_args();\n\t\tcall_user_func_array(array(self,'out'),$args);\n\t\texit;\n\t}",
"public function quit()\n {\n $this->disconnect();\n }",
"public function quit() {\n if ($this->client) {\n $this->client->quit();\n }\n }",
"public function terminate()\n {\n $this->io->text(\"Shutting down..\");\n // TODO: Dispatch console.terminate event ..maybe..?\n exit();\n }",
"public function exit()\n {\n exit(0);\n }",
"public function quit($close_on_error = true)\n {\n }",
"function quit()\n\t{\n\t\tif( is_resource($this->connect_id) )\n\t\t{\n\t\t\t$this->put_data('QUIT');\n\t\t\tfclose($this->connect_id);\n\t\t\t\n\t\t\t$this->connect_id = NULL;\n\t\t}\n\t\t\n\t\tif( $this->save_log )\n\t\t{\n\t\t\t$mode = ( $this->erase_log ) ? 'w' : 'a';\n\t\t\t\n\t\t\tif( $fw = fopen($this->filelog, $mode) )\n\t\t\t{\n\t\t\t\t$log = 'Connexion au serveur ' . $this->pop_server . ' :: ' . date('d/M/Y H:i:s');\n\t\t\t\t$log .= \"\\r\\n~~~~~~~~~~~~~~~~~~~~\\r\\n\";\n\t\t\t\t$log .= $this->log . \"\\r\\n\\r\\n\";\n\t\t\t\t\n\t\t\t\tfwrite($fw, $log);\n\t\t\t\tfclose($fw);\n\t\t\t}\n\t\t}\n\t}",
"public function terminate();",
"function quit(&$irc, &$data)\n\t{\n\t\tglobal $pickup;\n\t\tglobal $users;\n\t\tglobal $irc;\n\t\tglobal $pickupchannel;\n\t\tglobal $pickup;\n\t\tglobal $pickupstatus;\n\n\t\t//Get data\n\t\t$nick = $data->nick;\n\t\t$qauth = $users->nicktoqauth($nick);\n\n\t\t//Remove from pickup\n\t\tif($pickup->is_added($qauth))\n\t\t{\n\t\t\t$pickup->rm_player($qauth);\n SetTopic();\n\t\t}\n\n\t\t//Mark the user out the channel\n\t\t$users->mark_outchannel($qauth);\n\t}",
"public function event_quit($who, $message)\r\n\t{\r\n\t\r\n\t}",
"public function shutdown();",
"public function shutdown();",
"public function actionQuit()\r\n\t\t{\r\n\t\t\t$varSession = self::actionGetListaSessions();\r\n\t\t\tself::actionAnularSession($varSession);\r\n\t\t\treturn $this->render('/menu/menuvertical2');\r\n\t\t}",
"public function executeOnShutdown();",
"public function quit($close_on_error = true)\n {\n $noerror = $this->sendCommand('QUIT', 'QUIT', 221);\n $err = $this->error; //Save any error\n if ($noerror or $close_on_error) {\n $this->close();\n $this->error = $err; //Restore any error from the quit command\n }\n return $noerror;\n }",
"function quit()\r\n {\r\n if ($this->_use_mod_ftp) {\r\n \t\tftp_quit($this->_socket);\r\n \t} else {\r\n \t $this->putcmd(\"QUIT\");\r\n \t //fclose($this->_socket);\r\n \t}\r\n \tif ($this->ok()) {\r\n \t\t$this->debug(\"Disconnected from remote host\\n\");\r\n \t\treturn TRUE;\r\n \t} else {\r\n \t\treturn FALSE;\r\n \t}\r\n }",
"public function doQuit($reason = null)\n {\n // Send a QUIT command to the server\n $this->send('QUIT', $reason);\n\n // Terminate the socket connection\n fclose($this->socket);\n\n // Remove the socket from the internal socket list\n unset($this->sockets[(string) $this->getConnection()->getHostmask()]);\n }",
"public function Terminate ();",
"function qa_exit($reason = null)\n{\n\tqa_report_process_stage('shutdown', $reason);\n\n\t$code = $reason === 'error' ? 1 : 0;\n\texit($code);\n}",
"abstract public function shutdown();",
"protected function quit(){\n $in = \"QUIT\" . $this->CRLF;\n fputs($this->smtp, $in, strlen($in));\n if ($this->getCode() != 221){\n return false;\n }\n return true;\n }",
"public function disconnect() {\n $this->exec('echo \"EXITING\" && exit;');\n $this->connection = null;\n }",
"public function Disconnect () {\n $this->sendString('QUIT');\n\n fclose($this->pop_conn);\n }",
"abstract function shutdown();",
"function shutdown() ;",
"abstract function shutdown ();",
"abstract function shutdown ();",
"function shutdown()\n{\n // here we can do any last operations\n // before the script is complete.\n\n echo 'Script executed with success', PHP_EOL;\n}",
"public function abort(Command $command);",
"public static function end()\r\n {\r\n self::singleton()->endScript();\r\n }",
"public function disconnect() {\n $this->exec('exit;');\n $this->connection = null;\n }",
"public function close()\n {\n Application::instance()->executeControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), \"close\",\n Application::PRIORITY_LAST);\n }",
"public function quit()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t/*注销cookie*/\n\t\t\tcookie('staffAccount', null);\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'success',\n\t\t\t\t'msg' => 'Quit successfully!'\n\t\t\t));\n\t\t\techo $json;\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}",
"public function shutdown() {}",
"public function shutdown() {}",
"public function shutdown() {}",
"public function shutdown() {}",
"public function shutdown() {}",
"abstract protected function _quit_transaction( $commit );",
"abstract public static function cleanShutDown();",
"public function shutdown(){\r\n\r\n\t}",
"public function Kill( $message = '' )\r\n\t{\r\n\t\tif( strlen( $message ) > 0 )\r\n\t\t{\r\n\t\t\texit( $message );\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\texit( $this->Error() );\r\n\t\t}\r\n\t}",
"function shutdown()\n {\n }",
"public function halt();",
"public function shutdown()\r\n {\r\n }",
"public function ShutdownCar()\r\n {\r\n echo \"<b><u>Command Received: Shutdown Engine</b></u><br />\";\r\n if($this->speed > 0)\r\n {\r\n echo \"Stopping prior to shutting down the engine... <br />\";\r\n $this->speed = 0;\r\n }\r\n $this->carEngine->stopEngine();\r\n echo $this->carName . \"'s engine has been shut down <br />\";\r\n }",
"public function shutdown ()\n {\n $this->_signalAllWorkers(SIGKILL);\n \n $this->_logger->info('Exiting...');\n $this->_shutdown = true;\n \n exit(1);\n }",
"public function onQuit()\n {\n $nick = trim($this->event->getNick());\n\n foreach ($this->store as $chan => $store) {\n if (isset($store[$nick])) {\n unset($this->store[$chan][$nick]);\n }\n }\n }",
"function finaliza() {\n\n parent::addComando(chr(27) . chr(64));\n //parent::addComando(chr(02)); \n }",
"public function selfClosing();",
"public function logout(): void\n\t{\n\t\t$this->command(LogoutCommand::class);\n\t\t$this->close();\n\t}",
"public function shutdown()\n {\n }",
"public function delete()\n {\n $this->deleteOnExit = true;\n }",
"public function testHandleQuitCommandWithDefaultMessage()\n {\n $event = Phake::mock('Phergie\\Irc\\Plugin\\React\\Command\\CommandEvent');\n Phake::when($event)->getNick()->thenReturn('nickname');\n\n $queue = Phake::mock('Phergie\\Irc\\Bot\\React\\EventQueueInterface');\n\n $plugin = new Plugin;\n $plugin->handleQuitCommand($event, $queue);\n\n Phake::verify($queue)->ircQuit('by request of nickname');\n }",
"public function shutdown() {\n\t\t$this->stop();\n\t}",
"public function quack() {\n\t\tprintln(\"Quack\");\n\t}",
"public function handle()\n\t{\n\t\tif ($this->confirm('This will clear data on selected tables, continue?')) {\n\t\t\t$mockupParticipants = $this->confirm('Mock up participants?');\n\t\t\t$mockupResults = $this->confirm('Mock up results?');\n\t\t\t$mockupRiskScreening = $this->confirm('Mock up risk screening?');\n\n\t\t\tif ($mockupParticipants) {\n\t\t\t\tif ($this->confirm('Data on all tables will be dropped, continue?')) {\n DB::statement(\"SET foreign_key_checks=0\");\n\t\t\t\t\tParticipantAnswer::truncate();\n AnswerAdditionalInput::truncate();\n\t\t\t\t\tQuestionaireResult::truncate();\n\t\t\t\t\tParticipant::truncate();\n DB::statement(\"SET foreign_key_checks=1\");\n\n\t\t\t\t\t$this->mockupParticipants();\n\t\t\t\t} else {\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($mockupResults) {\n\t\t\t\tif ($this->confirm('All results will be dropped, continue?')) {\n\t\t\t\t\t$this->mockupResults();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($mockupRiskScreening) {\n\t\t\t\tif ($this->confirm('All answers will be dropped, continue?')) {\n\t\t\t\t\t$this->mockupRiskScreening();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function quitar_inyect(){\n\tfix_request();\n\treturn true;\n}",
"public function actionQuitar()\n {\n $producto = Productoscarro::findOne(['id' => $_POST['producto']]);\n $uniforme = Uniformes::findOne(['id' => $producto->uniforme_id]);\n $cantidad = $producto->cantidad;\n if ($producto->delete()) {\n $uniforme->cantidad = $uniforme->cantidad + $cantidad;\n $secs = Secstocks::findOne(['uniforme_id' => $uniforme->id]);\n if ($secs !== null && $uniforme->cantidad > $secs->mp) {\n $uniforme->underss = true;\n $uniforme->save();\n }\n if ($uniforme->save()) {\n $carr = Carros::findOne(['id' => $producto->carro_id]);\n $carr->productos = $carr->productos - 1;\n $carr->save();\n }\n }\n // return true;\n }",
"public function kill();",
"public function executeOnShutdown()\n {\n \tif ( ! $this->obj['use_shutdown'] )\n \t{\n \t\t$this->is_shutdown \t\t= true;\n \t\treturn $this->execute();\n \t}\n \telse\n \t{\n \t\t$this->obj['shutdown_queries'][] = $this->cur_query;\n \t\t$this->cur_query = \"\";\n \t}\n }",
"abstract function preExit();",
"public function shutdown()\n {\n }",
"protected function shutdown()\n {\n }",
"public function shutdown()\n {\n \n }",
"public function handle()\n {\n// echo 'Shutdown...';\n }",
"public function onPlayerQuit(PlayerQuitEvent $event) {\n\t\t$event->setQuitMessage(\"\");\n\t\t$event->getPlayer()->removeQueued();\n\t}",
"public function end();",
"public function end();",
"public function end();",
"public function end();",
"public function shutdown() {\n\t\t\t//\n\t\t}",
"public function shutdown() {\r\n\t\tif($this->status == 'running') {\r\n\t\t\toutput('Shutting Down Blossom Server');\r\n\t\t\t$this->status = 'shutdown';\r\n\t\t\t$this->start_shutdown_time = time();\r\n\t\t\r\n\t\t\tforeach ($this->socket_array as $socket) {\r\n\t\t\t\tif(!$socket->live_past_shutdown) {\r\n\t\t\t\t\t$socket->trigger_remove();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->set_interval($this, 'check_shutdown', 1);\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\texit();\r\n\t\t}\r\n\t}",
"function __destruct() {\n //$this->mem->quit();\n }",
"public function testHandleQuitCommandWithCustomMessage()\n {\n $event = Phake::mock('Phergie\\Irc\\Plugin\\React\\Command\\CommandEvent');\n Phake::when($event)->getNick()->thenReturn('nickname');\n\n $queue = Phake::mock('Phergie\\Irc\\Bot\\React\\EventQueueInterface');\n\n $plugin = new Plugin(array('message' => 'because %s said so'));\n $plugin->handleQuitCommand($event, $queue);\n\n Phake::verify($queue)->ircQuit('because nickname said so');\n }",
"public function shutdown()\n {\n // do nothing here\n }",
"public function onShutdown();",
"public function onShutdown();",
"public function destroy()\n {\n //\n\t\treturn 'ini halaman destroy';\n }",
"function ts3client_stopConnection($serverConnectionHandlerID, $quitMessage) {}",
"public function loopExit($timeout = -1);",
"public function onQuit(PlayerQuitEvent $event){\r\n\t\t$i = $event->getPlayer()->getID();\r\n\t\tif(isset($this->selections[$i])){\r\n\t\t\tunset($this->selections[$i]);\r\n\t\t}\r\n\t\tif(isset($this->anchors[$i])){\r\n\t\t\tunset($this->anchors[$i]);\r\n\t\t}\r\n\t\tif(isset($this->macros[$i])){\r\n\t\t\tunset($this->macros[$i]);\r\n\t\t}\r\n\t}",
"public static function shutdown()\n {\n // Close output buffers\n //self::close_buffers(TRUE);\n\n // Run the output event\n Event::run('system.display', self::$output);\n\n // Render the final output\n self::render(self::$output);\n }",
"public function close_output() {\n echo \"]\";\n }",
"public function execute()\n {\n \n echo 'Hello World';\n exit;\n }",
"public function run()\n {\n if (!$this->isFriday()) {\n return;\n }\n\n $this->confirm($this->input, $this->output, $this->command->getHelper('question'));\n\n $this->jump($this->output);\n }",
"public function shutdown()\n {\n // Do nothing. Can be overridden by extending classes.\n }",
"public function send() {\n\t\t\texit(implode(\"\", func_get_args()));\n\t\t}",
"public function testExecute()\n {\n $commandTester = $this->createCommandTester(new DeleteCommand());\n $commandTester->execute([\n 'url' => 'my-queue-url',\n '--force' => true\n ]);\n\n $output = $commandTester->getDisplay();\n $this->assertContains('Done', $output);\n }",
"public function kill(): void;",
"public function end($status=0, $exit=true)\n {\n if($exit)\n exit($status);\n }",
"public function end() {}",
"public function end() {}",
"public function end() {}",
"public function killCommand()\n {\n $this->registry->set(Registry::DAEMON_KILL_KEY, time());\n $this->outputLine('Broadcast kill signal');\n }",
"public function terminate() {\n\n unset($this->controller);\n unset($this);\n exit;\n }"
] | [
"0.8214022",
"0.78064734",
"0.76865846",
"0.7510211",
"0.7143935",
"0.71009576",
"0.66810936",
"0.66387165",
"0.6486042",
"0.6418267",
"0.63395685",
"0.6163998",
"0.61318755",
"0.6090415",
"0.60793394",
"0.60793394",
"0.6031764",
"0.59552675",
"0.59497416",
"0.59443575",
"0.5932244",
"0.5931183",
"0.5885974",
"0.5883667",
"0.5863634",
"0.5816311",
"0.5796049",
"0.575639",
"0.57356143",
"0.57294536",
"0.57294536",
"0.5728985",
"0.5711058",
"0.56526977",
"0.56184125",
"0.5608405",
"0.55575013",
"0.5543051",
"0.5543051",
"0.5543051",
"0.5543051",
"0.5543051",
"0.5505517",
"0.5487461",
"0.5432144",
"0.5421042",
"0.5403808",
"0.53934664",
"0.5380839",
"0.53774834",
"0.5373782",
"0.5351742",
"0.5331331",
"0.53270257",
"0.53191847",
"0.53183144",
"0.5315543",
"0.53151155",
"0.5313127",
"0.5303024",
"0.52970743",
"0.52915794",
"0.5284125",
"0.528167",
"0.52684724",
"0.5267942",
"0.5267211",
"0.5266584",
"0.5252456",
"0.5249857",
"0.52488685",
"0.52393854",
"0.52393854",
"0.52393854",
"0.52393854",
"0.5225358",
"0.5219126",
"0.51896805",
"0.5182893",
"0.5181044",
"0.51711446",
"0.51711446",
"0.51521426",
"0.51452875",
"0.5137485",
"0.5127451",
"0.5117115",
"0.5112061",
"0.5110444",
"0.5104787",
"0.5102025",
"0.50966656",
"0.5093519",
"0.5092357",
"0.5087648",
"0.50850534",
"0.50850534",
"0.50850534",
"0.5080842",
"0.5048546"
] | 0.6993428 | 6 |
Checks if the cache process is running | public function isRunning() {
try {
$response = $this->execute('status');
if (strpos($response, 'Child in state ') !== 0) {
return false;
}
$state = trim(substr($response, 15));
return $state === 'running';
} catch (VarnishException $exception) {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 isExecutionRunning() {}",
"private function hasCache()\n {\n if (!$this->isActive()) {\n return false;\n }\n\n return !empty($this->getCache(false));\n }",
"protected function managerIsRunning() : bool\n {\n global $argv;\n $cliOutput = [];\n exec('ps x | grep ' . $argv[0], $cliOutput);\n $processCount = 0;\n if (empty($cliOutput)) {\n return false;\n }\n foreach ($cliOutput as $line) {\n if (strpos($line, 'grep') !== false) {\n continue;\n }\n if (strpos($line, '/bin/sh') !== false) {\n continue;\n }\n $processCount++;\n }\n return ($processCount > 1) ? true : false;\n }",
"public function hasRunning()\n {\n return $this->running !== null;\n }",
"public static function hasCache() {\n\t\treturn false;\n\t}",
"public function isCacheExists()\n {\n if(file_exists($this->cachedPath))\n return true;\n else\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 }",
"private function get_is_running(): bool\n\t{\n\t\treturn $this->status === self::STATUS_RUNNING;\n\t}",
"private function isCached()\n {\n return Cache::has($this->cacheKey());\n }",
"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 }",
"public function isRunning()\n {\n try {\n $result = shell_exec(sprintf('ps %d', $this->pid));\n if(count(preg_split(\"/\\n/\", $result)) > 2) {\n return true;\n }\n } catch(Exception $e) {}\n\n return false;\n }",
"public function hasCache(): bool\n {\n return isset($this->contents);\n }",
"public function is_process_running() {\n\n\t\t\tif ( ! class_exists( 'ActionScheduler' ) || ! is_callable( array( 'ActionScheduler', 'store' ) ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$csv_scheduler_status = '';\n\n\t\t\t$import_coupon_scheduler_status = '';\n\n\t\t\t$scheduler_running_statuses = array(\n\t\t\t\t'pending',\n\t\t\t\t'in-progress',\n\t\t\t);\n\n\t\t\tforeach ( $scheduler_running_statuses as $running_status ) {\n\t\t\t\t$csv_scheduler = ActionScheduler::store()->find_action( 'woo_sc_generate_coupon_csv', array( 'status' => $running_status ) );\n\t\t\t\tif ( $csv_scheduler ) {\n\t\t\t\t\t$csv_scheduler_status = $running_status;\n\t\t\t\t}\n\n\t\t\t\t$import_coupon_scheduler = ActionScheduler::store()->find_action( 'woo_sc_import_coupons_from_csv', array( 'status' => $running_status ) );\n\t\t\t\tif ( $import_coupon_scheduler ) {\n\t\t\t\t\t$import_coupon_scheduler_status = $running_status;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$is_process_running = ! empty( $csv_scheduler_status ) || ! empty( $import_coupon_scheduler_status );\n\n\t\t\treturn $is_process_running;\n\t\t}",
"public function isRunning(): bool;",
"public function isRunning()\n {\n if (OS::isWin()) {\n $cmd = \"wmic process get processid | findstr \\\"{$this->pid}\\\"\";\n $res = array_filter(explode(\" \", shell_exec($cmd)));\n return count($res) > 0 && $this->pid == reset($res);\n } else {\n return !!posix_getsid($this->pid);\n }\n }",
"public function isRunning() {\n return $this->getPidFile()->isRunning();\n }",
"public function isRunning() {\n\t\treturn (\"running\" == $this->status());\n\t}",
"public static function isCacheActive()\n {\n return (bool)static::$cacheActive;\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 }",
"static public function hasCache($key)\n {\n if (getenv('AMTEL_CACHE') == 'redis') {\n return Cache::store('redis')->has($key);\n } else {\n return false;\n }\n }",
"private function isProcessAlive(): bool {\n\t\treturn $this->application->process->alive($this->pid);\n\t}",
"function cacheObjectExists ()\n {\n return is_file($this->cacheObjectId);\n }",
"public function isRunning(): bool\n {\n return $this->handle && $this->handle->status !== ProcessStatus::ENDED;\n }",
"protected function _cached_exists()\n {\n return file_exists($this->cached_file);\n }",
"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 processIsRunning()\n {\n $command = \"ps -p {$this->pid}\";\n exec($command, $output);\n if (isset($output[1])) {\n //$this->log(\"Process {$this->pid} is running\");\n return true;\n }\n //$this->log(\"Process {$this->pid} has stopped\");\n return false;\n }",
"public function runTimeCacheExists($key)\n\t{\n\t\treturn array_key_exists($key, $this->runTimeCache);\n\t}",
"public function isRunning(int $pid): bool;",
"public function hasCache()\n {\n return (null !== $this->getCacheAdapter());\n }",
"public function isRunning()\n {\n return ($this->getStatus() == self::RUNNING);\n }",
"private static function hasCacheFile() {\r\n if (!isset(self::$_hasCacheFile)) {\r\n self::$_hasCacheFile = File::exists(ZEEYE_TMP_PATH . self::CACHE_FILE_PATH);\r\n }\r\n return self::$_hasCacheFile;\r\n }",
"function custom_rules_is_cron_running(){\n\t$cron_expires = db_query(\"SELECT `expire` FROM {semaphore} WHERE `name` = 'cron' LIMIT 1\")->fetchField();\n\n\tif ( $cron_expires && $cron_expires > microtime(TRUE) ) {\n\t\treturn TRUE;\n\t}\n\n\treturn FALSE;\n}",
"function isRunning()\n{\n global $ipfspath, $ipfsinfo;\n return(file_exists($ipfspath.$ipfsinfo));\n}",
"private function checkRunning()\n {\n $out = \"\\n Processos em andamento: \";\n foreach ($this->emAndamento as $key => $val) {\n $out .= '[' . $this->emAndamento[$key]['pid'] . '] ';\n if (!$this->isRunning($val['pid'])) {\n $this->done++;\n unset($this->emAndamento[$key]);\n }\n }\n return true;\n }",
"function isAvailable()\r\n\t{\r\n return $this->oMemcache == null ? false : true;\r\n }",
"public function getIsRunning();",
"public function isCached()\n\t{\n\t\treturn is_file($this->getCacheFile());\n\t}",
"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 }",
"public function isCached(): bool;",
"public function isCacheUsed()\n\t{\n\t\treturn $this->__isMainTree() and $this->use_cache;\n\t}",
"public function isWorking(): bool\n {\n if (($pid = $this->getAttribute('pid')) === null) {\n return false;\n }\n\n return $this->systemCommands()->isProcessRunning($pid);\n }",
"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 }",
"public function isCached()\n {\n if ($this->cache->has($this->cacheKey)) {\n return true;\n }\n\n return false;\n }",
"public function hasCacheStore(): bool;",
"public function isCached() {}",
"private function needsRestart()\n {\n if (PHP_SAPI !== 'cli' || !defined('PHP_BINARY')) {\n return false;\n }\n\n return !getenv(self::ENV_ALLOW) && $this->loaded;\n }",
"public function isRunningSchedulerWorker()\n {\n $pids = $this->redis->hKeys(self::$workerKey);\n $schedulerPid = $this->redis->get(self::$schedulerWorkerKey);\n\n if ($schedulerPid !== false && is_array($pids)) {\n if (in_array($schedulerPid, $pids)) {\n return true;\n }\n // Pid is outdated, remove it\n $this->unregisterSchedulerWorker();\n return false;\n }\n return false;\n }",
"public function isProcessRunning($pid)\r\n {\r\n return($pid !== '') && file_exists(\"/proc/$pid\");\r\n }",
"protected function checkCache()\n {\n if (file_exists(app()->getCachedConfigPath())) {\n Artisan::call('config:clear');\n Artisan::call('config:cache');\n return true;\n }\n return false;\n }",
"function should_cache() {\n return array_key_exists('cache', $this->options) && $this->options['cache'] === TRUE;\n }",
"function exists() {\n \n return !empty($this->cache);\n \n }",
"private function _isCached($key)\n {\n return Cache::has($key);\n }",
"private function _checkPidfile()\n {\n if (!file_exists(static::$pid))\n {\n return true;\n }\n\n $pid = (int)file_get_contents(static::$pid);\n\n if ($pid > 0 && posix_kill($pid, 0))\n {\n die(\"ArrowWorker hint : process is already started\".PHP_EOL);\n }\n else\n {\n die(\"ArrowWorker hint : process ended abnormally , Check your program.\" . self::$pid.PHP_EOL);\n }\n\n die('checking pid file error'.PHP_EOL);\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}",
"public static function cronIsRunning(){\n\t\t$utc_str = gmdate(\"M d Y H:i:s\", time());\n\t\t$utc = strtotime($utc_str);\n\t\treturn \\GO::config()->get_setting('cron_last_run') > $utc-300;\n\t}",
"private function isProcessRunning($pid)\n {\n // Warning: this will only work on Unix\n return ($pid !== '') && file_exists(\"/proc/$pid\");\n }",
"public static function isRunning()\n\t{\n\t\treturn MHTTPD::$running;\n\t}",
"public function isAlive(){\n\t\tif(!$this->_pid) return (bool) false;\n\t\t$return = false;\n\t\t$returnArray = array();\n\n\t\t$command = 'ps -o pid | grep '.$this->_pid;\n\t\texec($command,$returnArray);\n\n\t\tif($returnArray){\n\t\t\tif($returnArray[0] == $this->_pid){\n\t\t\t\t$return = true;\n\t\t\t}\n\t\t}\n\t\treturn (bool) $return;\n\t}",
"public function checkCache($key)\n {\n return $this->cache->exists($key);\n }",
"public static function getRunning()\n\t{\n\t\treturn false;\n\t}",
"public function isCacheEnabled(): bool\n {\n return Environment::CACHE_ENABLED;\n }",
"function processIsRunning(string $id) : bool\n {\n return trim(shell_exec(\"\n if [ -d /proc/$id ]\n then\n echo \\\"yes\\\"\n fi\n \")) == 'yes';\n }",
"public function can_cache() {\n return $this->valid;\n }",
"public function test()\n\t{\n\t\treturn (extension_loaded('memcache') && class_exists('Memcache'));\n\t}",
"public function hasCacheFactory(): bool\n {\n return isset($this->cacheFactory);\n }",
"public function isRunning() {\r\n return $this->_ticker->isRuning();\r\n }",
"public function isUseCache()\n {\n return $this->use_cache;\n }",
"public static function cache_exists($name) {\n if(self::$adapter === false)\n throw new rcException('The Cache system is not initialized');\n return self::$adapter->cache_exists($name);\n }",
"function cacheObjectLocked ()\n {\n return is_file($this->cacheObjectId.'.lock');\n }",
"public function isCacheEnabled(): bool\n {\n return Environment::CACHE_DISABLED;\n }",
"private function checkCache()\n {\n if ($this->createFolder()) {//if folder already exists\n\n $cache_time = time() - filemtime($this->cacheFile); //check to see how long since cached\n\n if ($cache_time > 60 * $this->cacheTime) {\n return true;//cache the file again\n }\n } else {\n $this->createFolder();\n return true;\n }\n }",
"public function isProcessRunning($pid)\n {\n // Warning: this will only work on Unix\n return ($pid !== '') && file_exists(\"/proc/$pid\");\n }",
"public function is_use_cache()\r\n {\r\n return $this->cache;\r\n }",
"public function isDownloadRunning()\n\t{\n\t\treturn($this->isPackageTaskRunning('downloadPoolPackages', 'startDownloadToPool'));\n\t}",
"public static function is_set_cache(): bool\n {\n return self::getConfigDB(self::cache);\n }",
"protected function isMemcachedUsed() {}",
"protected function isMemcachedUsed() {}",
"public function isCacheEnabled() {\n\t\treturn $this->cache;\n\t}",
"private function isActive()\n {\n if (defined('MUNICIPIO_FRAGMENT_CACHE') && !MUNICIPIO_FRAGMENT_CACHE) {\n return false;\n }\n\n return true;\n }",
"private function _isLocked(): bool {\n\t\t// Each server is responsible for keeping locks clean.\n\t\t// Allow a hook to enable inter-server connection, later\n\t\tif (!$this->isMyServer()) {\n\t\t\treturn $this->application->hooks->callArguments(__CLASS__ . '::server_is_locked', [\n\t\t\t\t$this->memberInteger('server'), $this->pid,\n\t\t\t], true);\n\t\t}\n\t\tif ($this->isMyPID()) {\n\t\t\t// My process, so it's not locked\n\t\t\treturn false;\n\t\t}\n\t\t// Is the process running?\n\t\tif ($this->application->process->alive($this->pid)) {\n\t\t\treturn true;\n\t\t}\n\t\t$this->application->logger->warning('Releasing lock from {server}:{pid} as process is dead', $this->members());\n\t\t$this->release();\n\t\treturn false;\n\t}",
"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}",
"public function isAvailable() {\n return (function_exists('apc_fetch') || function_exists('apcu_fetch')) &&\n ini_get('apc.enabled') &&\n (ini_get('apc.enable_cli') || php_sapi_name() != 'cli');\n }",
"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}",
"public function start()\n {\n if (!$this->isActive()) {\n return true;\n }\n\n if (!$this->hasCache()) {\n ob_start();\n return true;\n }\n\n $this->getCache(true);\n return false;\n }",
"public function isRunning() {\n\t\treturn $this->workflowActivitySpecification->isRunning();\n\t}",
"function isRunning($pid){\n try{\n $result = shell_exec(sprintf(\"ps %d\", $pid));\n if( count(preg_split(\"/\\n/\", $result)) > 2){\n return true;\n }\n }catch(Exception $e){}\n\n return false;\n}",
"public function is_cached($file_name){\n\t\t\n\t\t$file_name = $this->path . $file_name;\n\t\tif(file_exists($file_name) && (filemtime($file_name) + $this->cache_time >= time())) return true;\t\n\n\t\treturn false;\n\t}",
"public static function isAvailable()\n {\n return DIRECTORY_SEPARATOR === '/' && exec(\"which ps\") && exec(\"which kill\");\n }",
"public function hasCachedData(): bool\n {\n return !empty(static::$cachedData);\n }",
"public function getCacheable() : bool {\n return $this->cacheable;\n }",
"public function isProcessRunning($name)\n {\n $state = $this->getProcessState($name);\n // @see https://github.com/Supervisor/supervisor/blob/master/supervisor/states.py\n // RUNNING_STATES (BACKOFF is not optimal but listed there...)\n return ($state == self::PROCESS_STATE_RUNNING\n || $state == self::PROCESS_STATE_STARTING\n || $state == self::PROCESS_STATE_BACKOFF);\n }",
"public function objectcache_installed() {\n\t\treturn file_exists( W3TC_ADDIN_FILE_OBJECT_CACHE );\n\t}",
"public function isCacheEnabled()\n {\n return $this->cache;\n }",
"private function checkCacheFolder(){\n if (file_exists($this->folder_path)) {\n $this->cacheCreated = true;\n }else{\n $this->cacheCreated = false;\n }\n }",
"public function hasJob(): bool;",
"public function isLoadedFromCache()\n {\n return $this->loadedFromCache;\n }",
"public function exists() {\n\t\treturn file_exists($this->_pidFile);\n\t}",
"protected function checkSomePhpOpcodeCacheIsLoaded() {}",
"protected function isChildProcess()\n\t{\n\t\tglobal $isChildProcess;\n\n\t\treturn isset($isChildProcess) && $isChildProcess;\n\t}"
] | [
"0.7152174",
"0.70046157",
"0.69359684",
"0.69075584",
"0.68727475",
"0.6847973",
"0.6817171",
"0.67994845",
"0.67898166",
"0.6787649",
"0.6756975",
"0.6727746",
"0.6702912",
"0.66993916",
"0.66963696",
"0.6682679",
"0.66741467",
"0.6673283",
"0.66280645",
"0.6615424",
"0.6595349",
"0.65886426",
"0.6586441",
"0.658544",
"0.65835243",
"0.6572263",
"0.6571074",
"0.65596586",
"0.6548359",
"0.6542926",
"0.6515046",
"0.6450111",
"0.64480346",
"0.64477724",
"0.64410436",
"0.6429435",
"0.64064497",
"0.6400063",
"0.6392289",
"0.63882023",
"0.6360886",
"0.635299",
"0.6350255",
"0.6341376",
"0.63283163",
"0.6326612",
"0.6306573",
"0.6303639",
"0.6300187",
"0.6292549",
"0.6287976",
"0.6285939",
"0.62856716",
"0.62774634",
"0.6274572",
"0.62700146",
"0.6264033",
"0.62631744",
"0.623446",
"0.6228842",
"0.6227019",
"0.6221765",
"0.6197977",
"0.617126",
"0.61479706",
"0.61465",
"0.61223197",
"0.6121314",
"0.61192286",
"0.61158997",
"0.6113815",
"0.6104782",
"0.6102415",
"0.60873455",
"0.6057402",
"0.605093",
"0.6048646",
"0.6048646",
"0.60437506",
"0.60425806",
"0.60351634",
"0.60229474",
"0.60143554",
"0.60119104",
"0.60075694",
"0.59990364",
"0.5997033",
"0.59926367",
"0.5989234",
"0.59877247",
"0.598622",
"0.5976038",
"0.59759855",
"0.5968931",
"0.59651494",
"0.59615445",
"0.59561896",
"0.5931291",
"0.5930853",
"0.5929135"
] | 0.67008734 | 13 |
Starts the cache process | public function start() {
if ($this->isRunning()) {
return false;
}
$this->execute('start');
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function startCache() {}",
"function start_cache()\r\n\t{\r\n\t\t$this->db->start_cache();\r\n\t}",
"public function start () {\n $this->cache = new Memcache;\n $this->cache->addServer($this->server, $this->port);\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 }",
"protected function initCaches() {}",
"private function setCache()\n\t{\n\t\t$this->_cache = new Cache('./', array('prefix' => 'pageReader'));\n\t}",
"protected function initializeCache() {}",
"protected function initializeCache() {}",
"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}",
"abstract public function installMemcached();",
"function install_caches()\n\t{\n\t\t//-----------------------------------------\n\t\t// Get DB\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' );\t\t\n\t\t\n\t\t$this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_user'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pass'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_host'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pre'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->ipsclass->vars['mysql_codepage'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['sql_driver'] );\n\t\t//-----------------------------------------\n\t\t// Do Caches\n\t\t//-----------------------------------------\n\t\n\t\t$output = $this->install->cache_and_cleanup();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Next...\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->install->template->append( $this->install->template->install_progress( $output ) );\t\t\n\t\t$this->install->template->next_action = '?p=done';\n\t}",
"public function cache() {\r\n\t\t$this->resource->cache();\r\n\t}",
"private function get_cache() {\n exit(file_get_contents($this->cache_file));\n }",
"public function run() {\n\t\t$this->updateProjectCounterCache();\n\t\t$this->updateUserCounterCache();\n\t}",
"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}",
"function &createCache() {}",
"public function enableCaching()\n {\n $this->cache = true;\n }",
"public static function enableCaching(): void\n {\n static::$caching = true;\n }",
"function run()\n\t{\n\t\tif ((get_param('keep_lang',NULL)===NULL) || (get_param('keep_theme',NULL)===NULL))\n\t\t{\n\t\t\t// We need to run this for each language and for each theme\n\t\t\t$langs=find_all_langs();\n\t\t\trequire_code('themes2');\n\t\t\t$themes=find_all_themes();\n\t\t\tforeach (array_keys($langs) as $lang)\n\t\t\t{\n\t\t\t\tforeach (array_keys($themes) as $theme)\n\t\t\t\t{\n\t\t\t\t\tif (($theme=='default') || (has_category_access(get_member(),'theme',$theme)))\n\t\t\t\t\t{\n\t\t\t\t\t\t$where=array('c_theme'=>$theme,'c_lang'=>$lang);\n\t\t\t\t\t\t$count=$GLOBALS['SITE_DB']->query_value('cron_caching_requests','COUNT(*)',$where);\n\t\t\t\t\t\tif ($count>0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$url=get_base_url().'/data/cron_bridge.php?limit_hook=block_caching&keep_lang='.urlencode($lang).'&keep_theme='.urlencode($theme);\n\t\t\t\t\t\t\thttp_download_file($url,NULL,false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Force re-loading of values that we use to mark progress (as above calls probably resulted in changes happening)\n\t\t\tglobal $VALUES;\n\t\t\t$VALUES=$GLOBALS['SITE_DB']->query_select('values',array('*'));\n\t\t\t$VALUES=list_to_map('the_name',$VALUES);\n\n\t\t\treturn;\n\t\t}\n\n\t\t$where=array('c_theme'=>$GLOBALS['FORUM_DRIVER']->get_theme(),'c_lang'=>user_lang());\n\t\t$requests=$GLOBALS['SITE_DB']->query_select('cron_caching_requests',array('id','c_codename','c_map','c_timezone','c_is_bot','c_in_panel','c_interlock','c_store_as_tempcode'),$where);\n\t\tforeach ($requests as $request)\n\t\t{\n\t\t\t$GLOBALS['NO_QUERY_LIMIT']=true;\n\n\t\t\t$codename=$request['c_codename'];\n\t\t\t$map=unserialize($request['c_map']);\n\n\t\t\t$object=do_block_hunt_file($codename,$map);\n\t\t\tif (is_object($object))\n\t\t\t{\n\t\t\t\tglobal $LANGS_REQUESTED,$JAVASCRIPTS,$CSSS,$LANGS_REQUESTED,$DO_NOT_CACHE_THIS,$TIMEZONE_MEMBER_CACHE;\n\n\t\t\t\t$backup_langs_requested=$LANGS_REQUESTED;\n\t\t\t\t$backup_javascripts=$JAVASCRIPTS;\n\t\t\t\t$backup_csss=$CSSS;\n\t\t\t\tget_users_timezone();\n\t\t\t\t$backup_timezone=$TIMEZONE_MEMBER_CACHE[get_member()];\n\t\t\t\t$LANGS_REQUESTED=array();\n\t\t\t\t$JAVASCRIPTS=array('javascript'=>1,'javascript_thumbnails'=>1);\n\t\t\t\t$CSSS=array('no_cache'=>1,'global'=>1);\n\t\t\t\t$cache=$object->run($map);\n\t\t\t\t$TIMEZONE_MEMBER_CACHE[get_member()]=$backup_timezone;\n\t\t\t\t$cache->handle_symbol_preprocessing();\n\t\t\t\tif (!$DO_NOT_CACHE_THIS)\n\t\t\t\t{\n\t\t\t\t\tif (method_exists($object,'cacheing_environment'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$info=$object->cacheing_environment();\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$info=array();\n\t\t\t\t\t\t$info['cache_on']='array($map,$GLOBALS[\\'FORUM_DRIVER\\']->get_members_groups(get_member()))';\n\t\t\t\t\t\t$info['ttl']=60*24;\n\t\t\t\t\t}\n\t\t\t\t\t$ttl=$info['ttl'];\n\n\t\t\t\t\t$_cache_identifier=array();\n\t\t\t\t\t$cache_on=$info['cache_on'];\n\t\t\t\t\tif (is_array($cache_on))\n\t\t\t\t\t{\n\t\t\t\t\t\t$_cache_identifier=call_user_func($cache_on[0],$map);\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tif (($cache_on!='') && (!defined('HIPHOP_PHP')))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$_cache_on=eval('return '.$cache_on.';'); // NB: This uses $map, as $map is referenced inside $cache_on\n\t\t\t\t\t\t\tif (is_null($_cache_on)) return NULL;\n\t\t\t\t\t\t\tforeach ($_cache_on as $on)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$_cache_identifier[]=$on;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif (defined('HIPHOP_PHP')) return NULL;\n\t\t\t\t\t}\n\t\t\t\t\t$_cache_identifier[]=$request['c_timezone'];\n\t\t\t\t\t$_cache_identifier[]=$request['c_is_bot']==0;\n\t\t\t\t\t$_cache_identifier[]=strval($request['c_in_panel']);\n\t\t\t\t\t$_cache_identifier[]=strval($request['c_interlock']);\n\t\t\t\t\t$cache_identifier=serialize($_cache_identifier);\n\n\t\t\t\t\trequire_code('caches2');\n\t\t\t\t\tif ($request['c_store_as_tempcode']==1) $cache=make_string_tempcode($cache->evaluate());\n\t\t\t\t\tput_into_cache($codename,$ttl,$cache_identifier,$cache,array_keys($LANGS_REQUESTED),array_keys($JAVASCRIPTS),array_keys($CSSS),true);\n\t\t\t\t}\n\t\t\t\t$LANGS_REQUESTED+=$backup_langs_requested;\n\t\t\t\t$JAVASCRIPTS+=$backup_javascripts;\n\t\t\t\t$CSSS+=$backup_csss;\n\t\t\t}\n\n\t\t\t$GLOBALS['SITE_DB']->query_delete('cron_caching_requests',$request);\n\t\t}\n\t}",
"function start_caching()\n{\n\tglobal $cachefile;\n\n\t//There is a random string to the end of the $_GET Query String to\n\t//prevent IE from caching the Ajax request. The below line removes the random portion\n\t//of the query so we can cache the page properly in php\n\tif(stripos($cachefile, \"&rand=\")==true)\n\t\t$cachefile = substr($cachefile,0,stripos($cachefile, \"&rand=\"));\n\n\tif (file_exists($cachefile)) \n\t{\n\t\t// the page has been cached from an earlier request\n\t\t// output the contents of the cache file\n\t\tinclude($cachefile); \n\t\t// exit the script, so that the rest isnt executed\n\t\texit;\n\t}\n\telse\n\t\tob_start();\n}",
"public function start_cache()\n\t{\n\t\t$this->qb_caching = TRUE;\n\t\treturn $this;\n\t}",
"public function initializeCachingFramework() {}",
"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 }",
"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 }",
"function cache();",
"public function start() {\n $ctx = $this->getContext();\n $this->fetch($ctx);\n $this->parseContext($ctx);\n }",
"public static function getCacheControl() {}",
"public function prewarmCache()\n {\n //Now that installation is complete, we need to set this to false to have the caches build correctly\n $GLOBALS['installing'] = false;\n $this->log(\"Populating metadata cache\");\n $GLOBALS['app_list_strings'] = return_app_list_strings_language('en_us');\n require_once 'include/MetaDataManager/MetaDataManager.php';\n MetaDataManager::setupMetadata(array('base'), array('en_us'));\n $this->log(\"Metadata cache populated\");\n }",
"public function enableCache()\n\t{\n\t\t$this->_enableCache = true;\n\t}",
"public function updateCache();",
"public function setUpCache();",
"public static function cache()\n {\n $cache = Cache::instance('system');\n if (!$cache->get('config-autoload')) {\n $cache->set('config-autoload', self::$data);\n }\n }",
"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 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 enableCache() :void\n {\n Settings::setCache($this->cacheAdapter->buildCache());\n }",
"public function cache() {\n\t\tif (count($this->args) === 1) {\n\t\t\tif ($this->args[0] === 'webroot') {\n\t\t\t\t$this->args = array('css', 'js');\n\t\t\t} elseif ($this->args[0] === 'app') {\n\t\t\t\t$this->args = array_values($this->caches);\n\t\t\t}\n\t\t}\n\t\tforeach ($this->args as $key => $val) {\n\t\t\tif (array_key_exists($val, $this->caches)) {\n\t\t\t\t$this->args[$key] = $this->caches[$val];\n\t\t\t}\n\t\t}\n\n\t\t$this->out('Deleting cache files:');\n\n\t\tif (empty($this->args)) {\n\t\t\t$this->_empty(CACHE);\n\t\t\t$this->out('Complete cache dir emptied');\n\t\t\treturn;\n\t\t}\n\t\tforeach ($this->args as $arg) {\n\t\t\tif (in_array($arg, array('css', 'js'))) {\n\t\t\t\t$this->{$arg}();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!is_dir(CACHE . $arg)) {\n\t\t\t\t$this->err('No cache dir \\'' . $arg . '\\'');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$this->_empty(CACHE . $arg);\n\t\t\t$this->out('Cache \\'' . $arg . '\\' deleted');\n\t\t}\n\n\t\tif (empty($this->args)) {\n\t\t\t$this->engines();\n\t\t}\n\t}",
"public function enableCache()\n\t{\n\t\t$args = phpSmug::processArgs( func_get_args() );\n\t\t$this->cacheType = $args['type'];\n\n\t\t$this->cache_expire = ( array_key_exists( 'cache_expire', $args ) ) ? $args['cache_expire'] : '3600';\n\t\t$this->cache_table = ( array_key_exists( 'table', $args ) ) ? $args['table'] : 'phpsmug_cache';\n\n if ( $this->cacheType == 'db' ) {\n \t\trequire_once 'MDB2.php';\n\n\t\t\t$db =& MDB2::connect( $args['dsn'] );\n\t\t\tif ( PEAR::isError( $db ) ) {\n\t\t\t\t$this->cacheType = FALSE;\n\t\t\t\treturn \"CACHING DISABLED: {$db->getMessage()} {$db->getUserInfo()} ({$db->getCode()})\";\n\t\t\t}\n\t\t\t$this->cache_db = $db;\n\n\t\t\t$options = array( 'comment' => 'phpSmug cache', 'charset' => 'utf8', 'collate' => 'utf8_unicode_ci' );\n\t\t\t$fields = array( 'request' => array( 'type' => 'text', 'length' => '35', 'notnull' => TRUE ),\n\t\t\t\t\t\t\t 'response' => array( 'type' => 'clob', 'notnull' => TRUE ),\n\t\t\t\t\t\t\t 'expiration' => array( 'type' => 'integer', 'notnull' => TRUE )\n\t\t\t\t\t\t );\n\t\t\t$db->loadModule('Manager');\n\t\t\t$db->createTable( $this->cache_table, $fields, $options );\n\t\t\t$db->setOption('idxname_format', '%s'); // Make sure index name doesn't have the prefix\n\t\t\t$db->createIndex( $this->cache_table, 'request', array( 'fields' => array( 'request' => array() ) ) );\n\n if ( $db->queryOne( \"SELECT COUNT(*) FROM $this->cache_table\") > $this->max_cache_rows ) {\n\t\t\t\t$diff = time() - $this->cache_expire;\n $db->exec( \"DELETE FROM {$this->cache_table} WHERE expiration < {$diff}\" );\n $db->query( 'OPTIMIZE TABLE ' . $this->cache_table );\n }\n } elseif ( $this->cacheType == 'fs' ) {\n\t\t\tif ( file_exists( $args['cache_dir'] ) && ( is_dir( $args['cache_dir'] ) ) ) {\n\t\t\t\t$this->cache_dir = realpath( $args['cache_dir'] ).'/phpSmug/';\n\t\t\t\tif ( is_writeable( realpath( $args['cache_dir'] ) ) ) {\n\t\t\t\t\tif ( !is_dir( $this->cache_dir ) ) {\n\t\t\t\t\t\tmkdir( $this->cache_dir, 0755 );\n\t\t\t\t\t}\n\t\t\t\t\t$dir = opendir( $this->cache_dir );\n \twhile ( $file = readdir( $dir ) ) {\n \tif ( substr( $file, -6 ) == '.cache' && ( ( filemtime( $this->cache_dir . '/' . $file ) + $this->cache_expire ) < time() ) ) {\n \tunlink( $this->cache_dir . '/' . $file );\n \t}\n \t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->cacheType = FALSE;\n\t\t\t\t\treturn 'CACHING DISABLED: Cache Directory \"'.$args['cache_dir'].'\" is not writeable.';\n\t\t\t\t}\n\t\t\t} else \t{\n\t\t\t\t$this->cacheType = FALSE;\n\t\t\t\treturn 'CACHING DISABLED: Cache Directory \"'.$args['cache_dir'].'\" doesn\\'t exist, is a file or is not readable.';\n\t\t\t}\n\t\t}\n\t\treturn (bool) TRUE;\n }",
"protected function createAllCaches() {}",
"public static function getCache() {}",
"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 setup_cache() {\n // Set up non-persistent object caching groups\n wp_cache_add_non_persistent_groups( [ '_np_pedestal' ] );\n }",
"protected function getRuntimeCache() {}",
"public function setCaching($cache);",
"public function init()\n {\n parent::init();\n $this->_cache = new \\Memcache;\n $this->_cache->connect();\n }",
"public function getCache();",
"public function preCacheUpdate()\n\t{\n\t\t$this->template->assign('updateCache', true);\n\t}",
"function begin_cache($file) {\r\n clearstatcache();\r\n $cachename = \"cache_\" . basename($file) . \".html\";\r\n $spit = '/';\r\n if (strpos($file, '/') == false)\r\n $spit = '\\\\';\r\n $cachename_all = dirname($file) . $spit . $cachename;\r\n if (file_exists($cachename_all)) {\r\n // redirection policy\r\n redirection($cachename);\r\n }\r\n ob_start();\r\n}",
"public function __construct()\n {\n $this->initContrexxCaching();\n $this->initOPCaching();\n $this->initUserCaching();\n $this->getActivatedCacheEngines();\n }",
"protected function initializeWorkspacesCachingFramework() {}",
"function wp_start_object_cache()\n {\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}",
"private function youreMine ()\n {\n if ( CACHE_ENABLED === true ) {\n $status = $this->cache->fetch( CACHE_ID_RUNNING );\n if ( $status === \"DONE\" || $status === false ) {\n $running = false;\n $this->cache->save( CACHE_ID_RUNNING, \"STARTED\" );\n } else {\n $running = true;\n }\n } else {\n if( file_exists( RUNNING_FILE ) ) {\n if( file_get_contents( RUNNING_FILE ) === \"DONE\" ) {\n $running = false;\n $this->createLocal( \"file\", RUNNING_FILE, \"put\", \"STARTED\" );\n } else {\n $running = true;\n }\n } else {\n $running = false;\n $this->createLocal( \"file\", RUNNING_FILE, \"put\", \"STARTED\" );\n }\n }\n if ( $running === false ) {\n $contents = $this->recurse();\n if ( CACHE_ENABLED === true ) {\n foreach ( $contents as $content ){\n $dbx_cache_id = md5( \"dbxContent\" . $content[0] );\n list( $object, , $mtime, , $rev ) = $this->cache->fetch( $dbx_cache_id );\n if ( $object === null || $object !== null && $mtime < $content[2] ) {\n $content[4] = $rev;\n $metadata = $this->uploadFile( $content );\n $content[2] = $metadata['modified'];\n $content[4] = $metadata['rev'];\n $this->cache->save( $dbx_cache_id, $content );\n }\n }\n $this->cache->save( CACHE_ID_RUNNING, \"DONE\" );\n } else {\n foreach( $contents as $content ){\n $this->uploadFile( $content );\n }\n $this->createLocal( \"file\", RUNNING_FILE, \"put\", \"DONE\" );\n }\n }\n }",
"protected function prepareCache()\n {\n $oldUmask = umask(0);\n mkdir($this->cacheDirectory, 0777);\n mkdir($this->getObjectsDirectory(), 0777);\n\n $this->cacheInfo = array(\"objects\" => array());\n file_put_contents($this->cacheDirectory . self::CACHE_INFO_FILENAME, json_encode(array(\"cache\" => $this->cacheInfo)));\n @chmod($this->cacheDirectory . self::CACHE_INFO_FILENAME, 0666);\n umask($oldUmask);\n }",
"public function start()\n {\n if (!$this->isActive()) {\n return true;\n }\n\n if (!$this->hasCache()) {\n ob_start();\n return true;\n }\n\n $this->getCache(true);\n return false;\n }",
"protected function prepare()\n {\n $this->memcached = new \\Memcached();\n $this->memcached->addServer('127.0.0.1', 11211);\n }",
"public function start() {\n $this->getPidFile()->write($this->getPidManager()->getCurrent());\n $this->getIpc()->setVar('pid', $this->getPidManager()->getCurrent());\n $this->_run();\n }",
"public function start () {\n if (!$this->started) {\n $this->restart();\n }\n }",
"protected function getCacheManager() {}",
"protected function getCacheManager() {}",
"private function __construct()\n\t{\n\t\t$this->_loadCacheObj();\n\t\treturn;\n\t}",
"protected function load()\n {\n if ($this->cache->contains($this->getCacheKey())) {\n $this->map = $this->cache->fetch($this->getCacheKey());\n } else {\n $this->generateMap();\n }\n }",
"protected function loadFromCache() {}",
"protected static function getRuntimeCache() {}",
"final protected function startCache($cacheId = array())\n\t{\n\t\tif(!$this->getCacheNeed())\n\t\t\treturn true;\n\n\t\t$this->currentCache = Data\\Cache::createInstance();\n\n\t\treturn $this->currentCache->startDataCache(intval($this->arParams['CACHE_TIME']), $this->getCacheKey($cacheId));\n\t}",
"public function run()\n {\n Model::unguard();\n\n MagazineInformation::updateOrCreate(['title' => config('app.application_name'),], []);\n\n CacheHelper::forgetCache(SectionsCache::magazineInformation());\n }",
"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 cacheSetup()\n\t{\n\t\t// Generate the name\n\t\t$time = $this->modified;\n\t\t$extension = $this->type;\n\t\t$fileName = pathinfo($this->name, PATHINFO_FILENAME) . \".\" . md5($this->name . '.' . $time);\n\t\t$name = $fileName . \".\" . $extension;\n\n\t\t// Generate the cache file path\n\t\t$this->cacheFilePath = realpath(public_path() . '/' . $this->app['assets::config']['cache_path']) . '/' . $name;\n\n\t\t// Generate the cache file URL\n\t\t$this->cacheFileUrl = $this->app['assets::config']['cache_url'] . $name;\n\n\t\treturn $this->cacheFile = $name;\n\t}",
"public function start()\n {\n $this->fStarted = microtime(true);\n $this->iStartMemoryUsage = memory_get_usage();\n }",
"public function reloadCaches() {}",
"public function __construct()\r\n {\r\n if(!ctype_alnum($this->cache_name))\r\n {\r\n throw new \\RuntimeException(\"You need to set the cache name properly, it can only be alphnum!\");\r\n }\r\n \r\n $this->cache_file = DIR_SECURE_CACHE.'/'.$this->cache_name.'.cache';\r\n \r\n if( !is_readable( $this->cache_file ) )\r\n { \r\n $this->makeCache();\r\n $this->saveCache();\r\n }\r\n }",
"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 }",
"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}",
"abstract protected function cacheData();",
"public function saveToCacheForever();",
"function recache()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Components\n\t\t//-----------------------------------------\n\t\t\n\t\t$components = $this->ipsclass->load_class( ROOT_PATH.'sources/action_admin/components.php', 'ad_components' );\n\t\t$components->components_rebuildcache();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Forum Cache\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->update_forum_cache();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Group Cache\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->cache['group_cache'] = array();\n\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'groups'\n\t\t\t\t\t\t\t\t\t\t) );\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\n\t\twhile ( $i = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->cache['group_cache'][ $i['g_id'] ] = $i;\n\t\t}\n\t\t\n\t\t$this->ipsclass->update_cache( array( 'name' => 'group_cache', 'array' => 1, 'deletefirst' => 1 ) );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Settings\n\t\t//-----------------------------------------\n\t\t\n\t\t$settings = $this->ipsclass->load_class( ROOT_PATH.'sources/action_admin/settings.php', 'ad_settings' );\n\t\t$settings->setting_rebuildcache();\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />IPB caches updated....\" );\n\t}",
"protected static function getCacheManager() {}",
"public function start()\n {\n var_dump('start');\n while (!$this->stop) {\n $this->checkPid();\n $task = json_decode(Redis::init()->blpop('tasks'), true);\n\n if ($this->limit > count($this->pid) && $task) {\n $this->fork($task);\n } elseif (count($this->pid) >= $this->limit && $task) {\n Redis::init()->rpush('tasks', json_encode($task));\n sleep(1);\n } elseif (!$task) {\n echo 'Complited!' . PHP_EOL;\n $this->stop = true;\n }\n }\n }",
"public static function setCache($cache) {}",
"protected static function cache($cache)\n\t{\n\t\t// Active Smarty cache for a specified time or endless\n\t\tif ($cache > 0 OR $cache == -1)\n\t\t{\n\t\t\tstatic::$smarty->setCaching(true);\n\t\t\tstatic::$smarty->setCacheLifetime($cache);\n\t\t}\n\t\telse\n\t\t\tstatic::$smarty->setCaching(false);\n\t}",
"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 start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"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 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 }",
"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}",
"function init_page() {\n\n $this->is_logged_in = qa_get_logged_in_userid();\n $this->timer = microtime(true);\n $this->cache_file = $this->get_filename();\n\n if (CACHE_STATUS && $this->check_cache() && $this->do_caching()) {\n $this->get_cache();\n } else if (CACHE_STATUS && $this->do_caching()) {\n ob_start();\n } else {\n return;\n }\n }",
"public static function setCache($caching)\n{\nself::$caching=$caching;\n}",
"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 }",
"protected function getCacheModule() {}",
"function start()\n {\n $this->startService();\n $this->startSession();\n }",
"public function run($assets)\n\t{\n\t\tif(!$this->has())\n\t\t{\n\t\t\tCache::put($this->name(), $assets, $this->time);\n\t\t}\n\t}"
] | [
"0.8430688",
"0.7467501",
"0.71093416",
"0.6934674",
"0.6313365",
"0.63117063",
"0.6301312",
"0.6297417",
"0.6295729",
"0.62547016",
"0.6244509",
"0.61746436",
"0.61405724",
"0.61109895",
"0.6102061",
"0.60743874",
"0.60395235",
"0.5987336",
"0.59611315",
"0.5944025",
"0.5927825",
"0.5920768",
"0.5849888",
"0.58467656",
"0.5789785",
"0.57819504",
"0.57562643",
"0.5749002",
"0.5746333",
"0.57321525",
"0.5729593",
"0.57219696",
"0.57207674",
"0.57193214",
"0.5703125",
"0.56990385",
"0.5687927",
"0.5673603",
"0.5671775",
"0.56668466",
"0.56564695",
"0.5649196",
"0.56389177",
"0.5589468",
"0.558827",
"0.55760723",
"0.55705553",
"0.55660516",
"0.55586857",
"0.5557439",
"0.5553606",
"0.5547323",
"0.5530094",
"0.55297536",
"0.55191594",
"0.5518569",
"0.55178994",
"0.550921",
"0.5509153",
"0.54991096",
"0.54959583",
"0.54907125",
"0.5486366",
"0.5484542",
"0.5448582",
"0.5437904",
"0.5436937",
"0.54356384",
"0.5427905",
"0.54104656",
"0.53812045",
"0.53785443",
"0.53733444",
"0.53712136",
"0.5369501",
"0.5366204",
"0.5351385",
"0.5350661",
"0.5349155",
"0.53462124",
"0.53447384",
"0.53447384",
"0.53447384",
"0.53447384",
"0.53447384",
"0.53447384",
"0.53447384",
"0.53447384",
"0.53447384",
"0.53447384",
"0.53447384",
"0.53447384",
"0.53237116",
"0.5322309",
"0.5322285",
"0.5312138",
"0.5311335",
"0.5306923",
"0.5285667",
"0.52809227",
"0.5271212"
] | 0.0 | -1 |
Stops the cache process | public function stop() {
if (!$this->isRunning()) {
return false;
}
$this->execute('stop');
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function stopCache() {}",
"function stop_cache()\r\n\t{\r\n\t\t$this->db->stop_cache();\r\n\t}",
"public function stop_caching()\n {\n $this->log(1,__FUNCTION__,\"Stopping file cache, deleting file pointer and temp file\");\n if ($this->cache_fp) {\n fclose($this->cache_fp);\n $this->cache_fp = null;\n }\n \n if (file_exists($this->temp_cache_filename)) {\n if (unlink($this->temp_cache_filename) === FALSE)\n $this->log(2,__FUNCTION__,\"Cannot delete temporary cache file: [{$this->temp_cache_filename}]\");\n else\n $this->log(1,__FUNCTION__,\"Temporary cache file deleted\");\n }\n \n $this->cache_filename = $this->temp_cache_filename = null;\n }",
"protected function stopCaching()\n {\n $this->cache_ttl = 0;\n }",
"public function forgetCache();",
"public function stop();",
"public function stop();",
"public function stop();",
"public function stop();",
"public function stop();",
"public function stop();",
"public function stop();",
"public function stop();",
"public function stop() {}",
"public function shutdown() {\r\n\t\ttx_auxo_cache::shutdown();\t\r\n\t\t$this->triggerEvent('shutdown');\r\n\t}",
"public static function removeCache() {\n\t}",
"public function delete_cache()\r\n {\r\n $this->clear_file_cache();\r\n }",
"final protected function abortCache()\n\t{\n\t\tif(!$this->getCacheNeed())\n\t\t\treturn;\n\n\t\tif($this->currentCache == 'null')\n\t\t\tthrow new Main\\SystemException('Cache were not started');\n\n\t\t$this->currentCache->abortDataCache();\n\t\t$this->currentCache = null;\n\t}",
"private function destroyCache()\r\n\t{\r\n\t\t$memcache = new \\Memcached();\r\n\t\t$memcache->addServer('localhost', 11211);\r\n\t\t$key = md5(catalogProductList::MEMCACHED_FETCH_ALL);\r\n\t\t$cache_data = $memcache->delete($key);\r\n\t}",
"public function templateCacheStop(Opt_View $view)\n\t{\n\t\t$this->_cache->end();\n\t}",
"public function cache_delete()\n {\n }",
"public function stop()\n {\n if (!$this->isActive() || $this->hasCache()) {\n return false;\n }\n\n // Get output buffer and save to cache\n $return_data = ob_get_clean();\n\n if (!empty($return_data)) {\n $cacheArray = (array) wp_cache_get($this->postId, self::getKeyGroup());\n\n $cacheArray[$this->hash] = $return_data.$this->fragmentTag();\n\n wp_cache_delete($this->postId, self::getKeyGroup());\n\n wp_cache_add($this->postId, array_filter($cacheArray), self::getKeyGroup(), $this->ttl);\n }\n\n echo $return_data;\n return true;\n }",
"function wp_cache_close()\n {\n }",
"final protected function endCache($data = false)\n\t{\n\t\tif(!$this->getCacheNeed())\n\t\t\treturn;\n\n\t\tif($this->currentCache == 'null')\n\t\t\tthrow new Main\\SystemException('Cache were not started');\n\n\t\t$this->currentCache->endDataCache($data);\n\t\t$this->currentCache = null;\n\t}",
"public function end() {\n $this->memcache->delete(PREFIX_LOCDATA.$this->getShareID());\n }",
"public function stop() {\n\t\t$this->invoke(\"stop\");\n\t}",
"public function stop()\n {\n // Update worker state and set it as finished\n $this->update(['resume_token' => 0, 'has_finished' => true]);\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 stop()\n {\n }",
"public function stop()\n {\n // TODO: Implement stop() method.\n }",
"public function __destruct()\n\t\t{\n\t\t\t// caches. \n\t\t\t//$this->clean_cache();\n\t\t}",
"public function stop()\n {\n $className = str_replace(__NAMESPACE__ . '\\\\', '', get_called_class());\n\n if (!$this->started) {\n return;\n }\n\n $this->destroy();\n $this->started = false;\n Log::d($className . ' stopped.');\n }",
"public function stop()\r\n {\r\n\r\n }",
"public function removeCache() {\r\n $files = $this->caches;\r\n while (count($files) > 0) {\r\n @unlink(array_shift($files));\r\n }\r\n\r\n }",
"public function stop()\n\t{\n\t\t$this->data->directSet(\"state\", self::STATE_STOPPED);\n\t}",
"function unlockCacheObject ()\n {\n return unlink($this->cacheObjectId.'.lock');\n }",
"public function stop()\n {\n }",
"public function stop()\n {\n }",
"public function stop_cache()\n\t{\n\t\t$this->qb_caching = FALSE;\n\t\treturn $this;\n\t}",
"public function stop(): void;",
"public function stop(): void;",
"public function stop(): void;",
"public function stop(): void;",
"public function stop(): void;",
"abstract public function stop();",
"public function dettachCache()\n {\n if (!is_null($this->_cache)) {\n unset($this->_cache);\n }\n }",
"public function stop()\n {\n $this->mark('__stop');\n }",
"public function stop()\n {\n // Put your code here;\n }",
"function stopDownloadToPool()\n\t{\n\t\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\t\t$this->addInfoMessage($I18N_downloadAborted);\n\n\t\tSERVER_deleteFile($this->getPoolDir().'/lock');\n\n\t\tSERVER_killBackgroundJob('downloadPoolPackages');\n\t}",
"protected function stopTask() {}",
"function wp_cache_close()\r\n\t{\r\n\t\tglobal $wp_object_cache;\r\n\t\t$wp_object_cache->close();\r\n\t\treturn true;\r\n\t}",
"public function stop()\n {\n\n }",
"public function stop() {\n try {\n $pid = $this->getPidFile()->read();\n\n Logger::log(\"Killing THIS PID: \" . $pid, \\Zend_Log::WARN);\n posix_kill($pid, SIGTERM);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n $this->_exit();\n }",
"public function stop()\n {\n if (!$this->isOn) {\n return;\n }\n\n $this->dataset[$this->namespace] = xhprof_disable();\n $this->isOn = false;\n }",
"public function KillCacheAction(Request $request)\n {\n\n $fs = new Filesystem();\n $fs->remove($this->getParameter('kernel.cache_dir'));\n\n die('cache cleared successfully !');\n }",
"public static function stop()\n {\n self::$executionTime = round(abs(microtime(true) - $_ENV['W']['START_TIME']) * 1000, 0);\n }",
"public function removeFromCache()\n {\n Cache::tags('file')->forget(strtolower($this->alias));\n }",
"private function unlockConcurrentExecution()\n\t{\n\t\t$app = \\Bitrix\\Main\\Application::getInstance();\n\t\t$managedCache = $app->getManagedCache();\n\t\t$managedCache->clean($this->getLockTag());\n\t}",
"public function __destruct() {\n\t\tif (file_exists($this->fileName) && (!$this->cache)) {\n\t\t\tunlink($this->fileName);\n\t\t}\n\t}",
"protected function stopped()\n {\n $this->redis->zrem(Queue::redisKey($this->queue, 'running'), $this->payload);\n\n Stats::decr('running', 1);\n Stats::decr('running', 1, Queue::redisKey($this->queue, 'stats'));\n }",
"public function timer_stop()\n {\n }",
"public function disconnect()\n {\n if (MEMCACHE_ENABLED) {\n $this->memc->close();\n if (MEMCACHE_DEBUG) {\n Logger::write('Memcache::disconnect(): disconnected');\n }\n }\n }",
"public function stop()\n {\n if (OS::isWin()) {\n $cmd = \"taskkill /pid {$this->pid} -t -f\";\n } else {\n $cmd = \"kill -9 {$this->pid}\";\n }\n shell_exec($cmd);\n }",
"public function stop()\n {\n // nop\n }",
"public function clearCache() {}",
"public function clearCache() {}",
"public function stop()\n {/*{{{*/\n $this->_loop = false;\n }",
"private function _cacheCleanup()\n\t {\n\t\t$this->_db->exec(\n\t\t \"DELETE FROM `HTTPcache` WHERE \" .\n\t\t \"`datetime` < DATE_SUB(NOW(), INTERVAL \" . $this->_expiry . \" SECOND) OR `expiry` < NOW()\"\n\t\t);\n\t }",
"public function shutdown() {\n\t\t$this->stop();\n\t}",
"public function stop()\n {\n die;\n }",
"public function __destruct()\n\t{\n\t\tif(!is_null($this->memcache)) {\n\t\t\t$this->memcache->close();\n\t\t\t$this->memcache = null;\n\t\t}\n\t}",
"public function __destruct()\n {\n if ($this->cache instanceof Swift_KeyCache) {\n $this->cache->clearAll($this->cacheKey);\n }\n }",
"private static function CLEAR_CACHE() {\n\t\tclearstatcache();\n\t}",
"public function __destruct() {\n\t\t\tif( ( $memcache = $this->getMemcache() ) != null && !$this->isPersistent ) {\n\t\t\t\t$memcache->close();\n\t\t\t}\n\t\t}",
"public function invalidateCache(): void\n {\n $this->cacheExec = [];\n }",
"public function __destruct()\n {\n foreach ($this->changed as $change) {\n $this->saveCacheObject($this->cacheInfo[\"objects\"][$change][\"store\"]);\n }\n $oldUmask = umask(0);\n file_put_contents($this->cacheDirectory . self::CACHE_INFO_FILENAME, json_encode(array(\"cache\" => $this->cacheInfo)));\n @chmod($this->cacheDirectory . self::CACHE_INFO_FILENAME, 0666);\n umask($oldUmask);\n }",
"public function onStop();",
"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 function removeCache()\n {\n $this->getHttpClientBuilder()->removeCache();\n }",
"public function clearCache(){\n if(file_exists($this->file)){\n @unlink($this->file);\n }\n }",
"public function stop() {\n\t\tLogger::getRootLogger ()->info ( \"Stopping IPsec\" );\n\t\t$pid = file_exists ( self::PID_PATH ) ? Functions::shellCommand ( \"pgrep -F \" . self::PID_PATH ) : 0;\n\t\tif ($pid > 0) {\n\t\t\tFunctions::shellCommand ( \"/bin/kill {$pid}\" );\n\t\t}\n\t}",
"function stop();",
"public function clear_cache() {\n\t\tif (file_exists($this->cache_path)) {\n\t\t\tunlink($this->cache_path);\n\t\t}\n\t}",
"private function _invalidateCache($term) {\n\t\t// We could set its expiration to sometime in the past, but we'll just remove it outright.\n\t\t$this->db->delete('Cache', array('Term' => $term));\n\t}",
"public function stop()\n {\n $this->_timeStopInMicroSeconds = microtime(true);\n }",
"public function end() {\n $this->memcache->delete(PREFIX_SESSION.$this->sessionID);\n $targets = $this->getTargets();\n foreach ($targets as $share) {\n if ($share->exists()) {\n switch ($share->getType()) {\n case SHARE_TYPE_ALONE:\n $share->end();\n break;\n case SHARE_TYPE_GROUP:\n $share->clean();\n break;\n }\n }\n }\n }",
"public function deleteCache()\n\t{\n\t\treturn CacheBot::delete($this->getCacheKey());\n\t}",
"public function stop()\n {\n $this->loop->stop();\n }",
"abstract protected function clearCache();",
"public function stop() {\n\t\t// Setup\n\t\t$options = array(\n\t\t\t'appName' => 'cakedaemon',\n\t\t\t'logLocation' => TMP . \"logs\" . DS . 'cakedaemon.log'\n\t\t);\n\n\t\tSystem_Daemon::setOptions($options);\n\t\tSystem_Daemon::stopRunning();\n\t}",
"public function stop(){\n if($this->_id) $this->times[$this->_id] += microtime(true) - $this->_start;\n $this->_id = null;\n }",
"public function deleteCache($url){\n unlink($this->cacheFilename(($url)));\n }",
"public function clear_cache(): void;",
"public function close_cache_file()\n {\n $this->log(1,__FUNCTION__,\"Closing cache file, transferred {$this->tsize} bytes, {$this->tcount} buffers, {$this->dretry} retries\");\n if (!$this->cache_fp) {\n $this->log(1,__FUNCTION__,\"URL not cached, file pointer empty\");\n return;\n }\n\n $cl = $this->server_reply_headers['Content-Length'];\n $sz = ftell($this->cache_fp) - $this->cache_header_size;\n if ($sz != $cl) {\n $this->log(1,__FUNCTION__,\"Not fully downloaded [$sz/$cl]\");\n }\n else if (fflush($this->cache_fp) === FALSE || fclose($this->cache_fp) === FALSE) {\n $this->log(2,__FUNCTION__,\"Cannot close written cache file: [{$this->cache_filename}]\");\n }\n else if (rename($this->temp_cache_filename, $this->cache_filename) === FALSE) {\n $this->log(2,__FUNCTION__,\"Cannot rename temporary cache file: [{$this->temp_cache_filename}] to [{$this->cache_filename}]\");\n }\n else {\n $this->add_video($sz); // Add video to the db\n $this->add_to_stats(); // Calc stats\n $this->cache_fp = null;\n $this->log(1,__FUNCTION__,\"Close cached file: \".$this->cache_filename);\n }\n\n $this->close_temporary_transfer($this->cache_request); // Delete from temporary\n $this->stop_caching();\n }",
"protected function disableCache() {}",
"function wp_cache_close()\n{\n return true;\n}",
"function wp_cache_close()\n{\n return true;\n}",
"public static function stop() {\n\t\tself::$con->close();\n\t}",
"public function __destruct() {\n\t\tmemcache_close($this -> conn);\n\t}",
"public function stop()\n {\n $this->conversation = null;\n $this->notes = null;\n $this->command = null;\n $this->state = null;\n\n if (file_exists(APP_DIR . '/var/' . $this->id)) {\n unlink(APP_DIR . '/var/' . $this->id);\n }\n\n return true;\n }",
"private function stopTimer()\n\t{\n\t\t// Measure how many seconds it took to execute\n\t\t$this->executionSeconds = microtime(true) - $this->startMicroStamp;\n\n\t\t// Keep statistics\n\t\tself::$totalExecutionSeconds += $this->executionSeconds;\n\t}"
] | [
"0.871037",
"0.78200734",
"0.78157073",
"0.77028775",
"0.6857349",
"0.67905945",
"0.67905945",
"0.67905945",
"0.67905945",
"0.67905945",
"0.67905945",
"0.67905945",
"0.67905945",
"0.67442554",
"0.6726141",
"0.66337436",
"0.6608813",
"0.6586803",
"0.6561361",
"0.65508896",
"0.6518382",
"0.64974725",
"0.6491371",
"0.6452592",
"0.6421535",
"0.6383894",
"0.637677",
"0.63661206",
"0.63546956",
"0.63478786",
"0.63321596",
"0.63235384",
"0.6315882",
"0.6312181",
"0.63115895",
"0.62994367",
"0.6298326",
"0.62860835",
"0.62736785",
"0.6269345",
"0.6269345",
"0.6269345",
"0.6269345",
"0.6269345",
"0.625765",
"0.6233585",
"0.6233571",
"0.6228603",
"0.622317",
"0.616378",
"0.6160863",
"0.6159651",
"0.61525226",
"0.6146588",
"0.6119282",
"0.6101429",
"0.6100275",
"0.60994995",
"0.60990924",
"0.60865676",
"0.60849327",
"0.6070293",
"0.6053696",
"0.6052355",
"0.60491115",
"0.60491115",
"0.60466915",
"0.6026703",
"0.60259444",
"0.60127586",
"0.6006495",
"0.60025287",
"0.5985024",
"0.5976794",
"0.5976036",
"0.595629",
"0.5946873",
"0.59368443",
"0.5932426",
"0.5931022",
"0.5929036",
"0.5928207",
"0.5921815",
"0.59000784",
"0.5893523",
"0.58907974",
"0.5887311",
"0.58778846",
"0.5873332",
"0.5873275",
"0.5871881",
"0.58613396",
"0.5860547",
"0.5856412",
"0.58455586",
"0.5838035",
"0.5838035",
"0.5834755",
"0.5834402",
"0.5817392",
"0.58156484"
] | 0.0 | -1 |
Gets a list of all loaded configurations | public function getVclList() {
$list = array();
$response = $this->execute('vcl.list');
$lines = explode("\n", $response);
foreach ($lines as $line) {
$line = trim($line);
if (!$line) {
continue;
}
$tokens = explode(' ', $line);
$name = array_pop($tokens);
$list[$name] = $tokens[0] == 'active';
}
return $list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function allConfig() {\n return $this->getConfigAugment()->all();\n }",
"public static function getAll()\n {\n return self::$config;\n }",
"public static function all()\n {\n return self::$config;\n }",
"public function getAll()\n {\n return $this->config;\n }",
"public function all()\n {\n return $this->config;\n }",
"final public function getConfigs()\n {\n return $this->Config->getConfigs();\n }",
"public static function allConf() {\n\t\t\treturn (array)Configure::read( self::$confKey );\n\t\t}",
"public function getConfigurations()\n {\n return $this->configurations;\n }",
"public function listAll() : array\n {\n return \\Cache::remember('query_list_all_config', 60 * 60, function () {\n return $this->config->all()->pluck('value', 'name')->all();\n });\n }",
"public function configAll() {\n \n return $this->config;\n \n }",
"public function getConfigurations() {\n\t\treturn $this->configurations;\n\t}",
"private function get_configurations()\n {\n return [\n Configuration\\Comments::class,\n Configuration\\Editor::class,\n Configuration\\Media::class,\n Configuration\\Misc::class,\n Configuration\\Menu::class,\n Configuration\\Plugins::class,\n ];\n }",
"public function getAllConfigs()\r\n\t{\r\n\t\treturn $this->arrConfig;\r\n\t}",
"public static function &all(): array\n\t{\n\t\treturn static::$config;\n\t}",
"protected function loadConfigurations(): array\n {\n $config = [];\n\n foreach ($this->getConfigurationFiles() as $key => $file) {\n $config[$key] = require $file;\n }\n\n return $config;\n }",
"public function getAll(){\n\t\treturn $this->configValues;\n\t}",
"private function getAllConfig() {\n $this->user_panel->checkAuth();\n $this->config->findAll();\n }",
"public function getLoadedConfigFiles() {\n return $this->_files;\n }",
"private function lazy_get_config(): array\n\t{\n\t\treturn array_merge_recursive($this->configs['app'], $this->construct_options);\n\t}",
"protected static function get_configs() : array\n\t{\n\t\t$inc_paths = Kohana::include_paths();\n\n\t\t// Remove default configurations (SYSPATH)\n\t\tarray_pop($inc_paths);\n\n\t\t$configs = [];\n\n\t\t// Loop through paths\n\t\tforeach ($inc_paths as $inc_path)\n\t\t{\n\t\t\tforeach ((array)glob($inc_path.'/config/*.php') as $filename)\n\t\t\t{\n\t\t\t\t$filename = pathinfo($filename, PATHINFO_FILENAME);\n\n\t\t\t\tif (in_array($filename, (array)Kohana::$config->load('debug_toolbar.skip_configs'), TRUE))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( ! isset($configs[$filename]))\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$configs[$filename] = Kohana::$config->load($filename)->as_array();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception $e)\n\t\t\t\t\t{\n\t\t\t\t\t\t$configs[$filename] = NULL;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tksort($configs);\n\n\t\treturn $configs;\n\t}",
"public function getConfiguration(): array\n {\n return $this->configuration;\n }",
"public function getAllObjectConfigurations(): array\n {\n return $this->objects;\n }",
"public function list() {\n $this->store->listConfig();\n }",
"function configuration()\r\n {\r\n global $db;\r\n $default_conf = $this->default_configuration();\r\n $conf = $db->getAssoc('\r\n select configuration_key, configuration_value from !\r\n where module_key = ?\r\n ', false, array(TABLE_CONFIGURATION, $this->module_key()));\r\n return array_merge($default_conf, $conf);\r\n }",
"public function config(): array\n {\n return $this->config;\n }",
"final public function availableConfiguration(): array {\n\t\t$module_paths = $this->application->modulePath();\n\t\t$files = [];\n\t\t/* Walk all non-dot directories, looking for .module.json files */\n\t\t$options = [\n\t\t\tDirectory::LIST_RULE_FILE => [\n\t\t\t\t'#\\.module\\.json$#' => true, false,\n\t\t\t], Directory::LIST_RULE_DIRECTORY_WALK => [\n\t\t\t\t'#/\\.#' => false, true,\n\t\t\t], Directory::LIST_RULE_DIRECTORY => false, Directory::LIST_ADD_PATH => true,\n\t\t];\n\t\tforeach ($module_paths as $module_path) {\n\t\t\ttry {\n\t\t\t\t$files[$module_path] = Directory::listRecursive($module_path, $options);\n\t\t\t} catch (ParameterException) {\n\t\t\t}\n\t\t}\n\t\t$available = [];\n\t\tforeach ($files as $module_files) {\n\t\t\tforeach ($module_files as $module_file) {\n\t\t\t\t$module = trim(StringTools::removePrefix(dirname($module_file), $module_paths), '/');\n\t\t\t\t$available[$module] = $module_file;\n\t\t\t}\n\t\t}\n\t\treturn $available;\n\t}",
"public function brokerAll()\n {\n return self::getConfig(null, null, true);\n }",
"public function getConfigArray() {}",
"public function getConfiguration(): array;",
"public function getConfiguration(): array;",
"public function all()\n {\n $this->loadSettingsIfNotLoaded();\n\n return $this->settings;\n }",
"public function getConfigurationsMap()\n {\n $sel = $this->getAllConfigurations();\n $arr = array();\n foreach ($sel as $cf)\n $arr[$cf->identifier] = $cf->identifier;\n \n return $arr;\n }",
"public function getAll() {\n $data=[];\n\n foreach($this->settings AS $name=>$value) {\n $data[$name]=$this->get($name);\n }\n\n return $data;\n }",
"public function getConfig(): array\n {\n return $this->_config;\n }",
"protected function loadBundleConfiguration(): array\n {\n if($arrFiles = $this->getBundleConfigurationFiles())\n {\n return ImportController::importFiles($arrFiles, false);\n }\n\n return [[],[]];\n }",
"private function getAllOptions() {\n return $this->config[$this->context];\n }",
"function get_all_configuracion()\n {\n $configuracion = $this->db->query(\"\n SELECT\n *\n FROM\n `configuracion`\n ORDER BY num ASC\n \")->result_array();\n\n return $configuracion;\n }",
"protected function getFreshConfiguration()\n {\n $app = tap(Start::instance()->bootstrap()->getApplication(), function ($app) {\n $app->make(Kernel::class)->bootstrap();\n });\n\n return $app['config']->all();\n }",
"public function getConfiguration()\n {\n return self::$config_array;\n }",
"final public function available(): array {\n\t\treturn array_keys($this->availableConfiguration());\n\t}",
"public function getIterator(){\n\t\treturn $this->config->getAll();\n\t}",
"function get_all_configuracion()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('configuracion')->result_array();\n }",
"public function getConfiguration(): array\n {\n }",
"public function getAllElements()\n {\n return $this->config;\n }",
"function loadStepConfigs(): array;",
"public function getConfigurationValues() {}",
"public function getConfigurationValues() {}",
"public function getConfigurationValues() {}",
"public function getConfigurationValues() {}",
"public function getConfigFiles()\n {\n $configs = [];\n\n foreach ($this->getSearchPaths() as $alias) {\n $path = Yii::getAlias($alias);\n $files = FileHelper::findFiles($path, ['only' => ['*/' . self::CONFIG_FILE]]);\n\n foreach ($files as $file) {\n try {\n $config = require($file);\n $config['basePath'] = dirname($file);\n $configs[] = $config;\n } catch (Exception $e) {\n Yii::trace(\"Failed loading module config.php file for {$file}: {$e->getMessage()}\", __METHOD__);\n }\n }\n\n usort($configs, function ($configA, $configB) {\n if (isset($configA['weight'], $configB['weight'])) {\n return (int)$configA['weight'] > (int)$configB['weight'];\n }\n\n return 0;\n });\n }\n\n return $configs;\n }",
"public function load_options() {\n\t\treturn $this->get_config();\n\t}",
"public function getConfig(): array;",
"public function getConfig()\n {\n\n $config = [];\n\n $configFiles = [\n __DIR__ . '/config/module.config.php',\n __DIR__ . '/config/module.config.cache.php',\n __DIR__ . '/config/module.config.console.php',\n __DIR__ . '/config/module.config.forms.php',\n __DIR__ . '/config/module.config.imagestorage.php',\n __DIR__ . '/config/module.config.routes.php',\n ];\n\n // Merge all module config options\n foreach($configFiles as $configFile) {\n $config = \\Zend\\Stdlib\\ArrayUtils::merge($config, include $configFile);\n }\n\n return $config;\n }",
"public function getConfigItems()\n {\n return isset($this->ConfigItems) ? $this->ConfigItems : null;\n }",
"public function getConfig() : array {\n\t\treturn static::$options;\n\t}",
"public function all_configured($phpbb_relative = true)\n\t{\n\t\t$configured = array();\n\t\tforeach ($this->extensions as $name => $data)\n\t\t{\n\t\t\tif ($this->is_configured($name))\n\t\t\t{\n\t\t\t\tunset($data['metadata']);\n\t\t\t\t$data['ext_path'] = ($phpbb_relative ? $this->phpbb_root_path : '') . $data['ext_path'];\n\t\t\t\t$configured[$name] = $data;\n\t\t\t}\n\t\t}\n\t\treturn $configured;\n\t}",
"public static function checkAndGetConfig()\n {\n return array(\n include(sfContext::getInstance()->getConfigCache()->checkConfig('config/bb_code_parser_config.yml')),\n include(sfContext::getInstance()->getConfigCache()->checkConfig('config/bb_code_parser_tags.yml'))\n );\n }",
"public static function getAll(){\n\t\t\treturn Setting::find()->asArray()->all();\n\t\t}",
"public function getSettings(): array\n {\n $cmd = new ListSettings($this->repo->getRoot());\n $res = $this->runner->run($cmd, new ListSettings\\MapSettings());\n\n return $res->getFormattedOutput();\n }",
"public function getConfiguration() : SerializableCollection\n {\n return new SerializableCollection($this->configuration);\n }",
"public function getConfiguration()\n {\n $config = array(\n 'baseUrl' => $this->getScriptUrl(),\n 'locale' => $this->container->get('translator')->getLocale(),\n );\n\n if ($this->paths) {\n $config['paths'] = $this->paths;\n }\n\n if ($this->shim) {\n $config['shim'] = $this->shim;\n }\n\n if ($this->container->hasParameter('kernel.debug')\n && !$this->container->getParameter('kernel.debug')\n && $this->useAlmond) {\n $config['almond'] = true;\n }\n\n return array_merge($config, $this->options);\n }",
"protected function getConfigurationFiles()\n {\n $files = [];\n $path = $this->laravel->configPath();\n $found = Finder::create()->files()->name('*.php')->depth('== 0')->in($path);\n\n foreach ($found as $file) {\n $files[] = \\basename($file->getRealPath(), '.php');\n }\n\n return $files;\n }",
"protected function getFreshConfiguration()\n {\n $app = require $this->laravel->bootstrapPath('app.php');\n\n $app->make(Kernel::class)->bootstrap();\n $config = $app->make('config');\n\n $files = \\array_merge(\n $this->configToCache(), $this->getConfigurationFiles()\n );\n\n foreach ($files as $file) {\n $config[$file];\n }\n\n return $config->all();\n }",
"public function all()\n {\n // 返回各addon的绝对路径\n return array_unique(\n array_merge(\n $this->core(),\n $this->configured()\n )\n );\n }",
"private function getConfigurationTools() {\n\t\t$menu = new MenuBuilder();\n\n\t\t$this->insertSettingsMenuItem( $menu );\n\n\t\treturn $menu->getEntries();\n\t}",
"public function getListDbConnConfigs() {\n\t\treturn $this->_getConfigValueArray('configDBconn');\n\t}",
"public function getConfig() : array {\n return include __DIR__ . '/../config/module.config.php';\n }",
"protected static function getExtensionConfiguration(): array\n {\n return GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('lux');\n }",
"public function loadScaffoldSourceConfigurations() {\n return Utils::getConfigFiles($this->scaffolder->getConfigDir() . '/picture');\n }",
"public function getAll()\n {\n $this->_modules['core'][] = array (\n 'module' => 'Magento',\n 'codePool' => 'core',\n 'active' => 'true',\n 'version' => Mage::getVersion()\n );\n\n foreach (Mage::getConfig()->getModuleConfig() as $node) {\n foreach ($node as $module => $data) {\n if (!isset($data->codePool)) {\n continue;\n }\n $codePool = $data->codePool->asArray();\n if (empty($codePool)) {\n continue;\n }\n if (is_array($codePool)) {\n $codePool = implode('.', $codePool);\n }\n\n $this->_modules[$codePool][] = array (\n 'module' => $module,\n 'codePool' => $codePool,\n 'active' => $data->active,\n 'version' => $data->version\n );\n }\n }\n\n return $this->_modules;\n }",
"public function getAllConfigs(string $scope = null) : AssociativeArray;",
"public static function getAll () {\n\t\treturn self::$registered;\n\t}",
"protected abstract static function getConfig(): array;",
"public function getAllSettings()\n {\n return $this->settings;\n }",
"public function getAllConfigurations()\n {\n return $this->getTable();\n }",
"public function getConfiguration()\n {\n $allSettings = Configuration::getConfiguration();\n\n if ($allSettings === false) {\n $this->jsonError(['Empty settings list.'], 404);\n }\n\n return $this->jsonSuccess($allSettings);\n }",
"public function config()\n\t{\n\t\treturn [\n\t\t\t__DIR__ . '/../config/config.php',\n\t\t];\n\t}",
"private static function _getConfigArray()\n\t{\n\t\treturn explode('.', self::_getConfig());\n\t}",
"public function getLoadedModules() {}",
"protected function getConfigurationNodes(): array\n {\n return [];\n }",
"public static function loadAll();",
"public function index()\n {\n $configs = Config::all()->toArray();\n return array_reverse($configs);\n }",
"public function getLoadedProviders(): array\n {\n return $this->loadServiceProviders;\n }",
"public function getConfigs($path) {\n return Config::getInstance()->getElementsByPath($path);\n }",
"public function infosConfig(){\n $get_configuration_infos = \\App\\Helpers\\ConfigurationHelper\\Configuration::get_configuration_infos(1);\n return $get_configuration_infos;\n }",
"public function findAllLoaded() {}",
"public static function load()\n {\n $files = glob(BASEDIR . '/config/*.php');\n foreach ($files as $file){\n $key = str_replace('.php', '', basename($file));\n static::$values[$key] = include $file;\n }\n }",
"public static function grabAllLoad()\n {\n \n $load = Load::all();\n\n foreach ($load as $key => $value) {\n $load[$key] = $value->to_array();\n }\n\n return $load;\n }",
"function getConfigContents() {\n\t\treturn $this->configContents;\n\t}",
"static function getConfig() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_CONFIG);\n\t}",
"public function configuredChecks() {\n if ($this->checks === null) {\n $this->checks = [];\n foreach( $this->config as $driver => $checkConfig ) {\n // check if multiple or just one\n if (is_array($checkConfig)) {\n foreach( $checkConfig as $key => $config ) {\n $instance = $this->createInstance( $driver, $config );\n $instance->setInstanceName(is_string($key)?$key:$config);\n $this->checks[] = $instance;\n }\n } else {\n $instance = $this->createInstance( $driver, $checkConfig );\n $this->checks[] = $instance;\n }\n }\n }\n return $this->checks;\n }",
"protected function configurations(string $key): array\n {\n return $this['config'];\n }",
"public function getDeviceConfigs()\n {\n return $this->device_configs;\n }",
"public static function all()\n {\n return config('repeater-blocks.repeaters');\n }",
"private function loadConfig()\n {\n $files = scandir($this->configPath());\n $configs = [];\n\n foreach ($files as $file) {\n $filePath = $this->configPath() . DIRECTORY_SEPARATOR . $file;\n\n if (is_file($filePath)) {\n $config = [basename($file, '.php') => include $filePath];\n if (is_array($config)) {\n $configs = array_merge($configs, $config);\n }\n }\n }\n\n $this->config = $configs;\n }",
"abstract protected function configs(): array;",
"protected function getKernelConfiguration()\n {\n return [];\n }",
"public function getKeys() {\n\t\treturn $this->config->getKeys();\n\t}",
"public static function getConfig(){\n\t\tif(CoreConfig::$config == null){\n\t\t\t$query = \"SELECT module, name, value FROM config ORDER by module, name\";\n\t\t\t$table = DB::getTable($query);\n\t\t\tforeach($table as $row) {\n\t\t\t\tCoreConfig::$config[$row['module']][$row['name']] = $row['value'];\n\t\t\t}\n\t\t}\n\t\treturn CoreConfig::$config;\n\t}",
"public function getAllSettings()\n {\n return $this->settingsByLocale;\n }",
"public static function all()\n {\n return self::$list;\n }"
] | [
"0.8036041",
"0.7783054",
"0.77325016",
"0.7608611",
"0.7582914",
"0.75335866",
"0.74867505",
"0.74466544",
"0.74164027",
"0.7409937",
"0.7341855",
"0.7338377",
"0.7334342",
"0.7223175",
"0.7201228",
"0.7167118",
"0.7142817",
"0.70524186",
"0.7026163",
"0.6973699",
"0.68600076",
"0.68308866",
"0.68042314",
"0.67391455",
"0.67332923",
"0.67216957",
"0.667371",
"0.6649567",
"0.6626935",
"0.6626935",
"0.6625826",
"0.658416",
"0.6580748",
"0.65801924",
"0.65527785",
"0.6550387",
"0.652322",
"0.651102",
"0.65066683",
"0.64744806",
"0.64409435",
"0.64318144",
"0.64285874",
"0.6424153",
"0.64129275",
"0.63841707",
"0.63815415",
"0.63815415",
"0.63815415",
"0.63559765",
"0.6349114",
"0.6345172",
"0.6338693",
"0.6320851",
"0.6304985",
"0.6301105",
"0.6261807",
"0.62325597",
"0.6216997",
"0.62077737",
"0.61992896",
"0.61962056",
"0.6188261",
"0.6180793",
"0.6170927",
"0.6170616",
"0.61691797",
"0.6167665",
"0.6167575",
"0.6162579",
"0.6157692",
"0.61532253",
"0.614758",
"0.61438876",
"0.6139664",
"0.6138213",
"0.6137668",
"0.6123169",
"0.6118116",
"0.6115836",
"0.6107484",
"0.6101567",
"0.60891587",
"0.6083259",
"0.6080073",
"0.6077853",
"0.60755765",
"0.60494703",
"0.6041463",
"0.60367686",
"0.602569",
"0.60245246",
"0.60221946",
"0.6021611",
"0.6020672",
"0.60119975",
"0.60092735",
"0.60083616",
"0.6008067",
"0.60048705",
"0.60043985"
] | 0.0 | -1 |
Gets the VCL of the provided configuration | public function getVcl($name) {
return $this->execute('vcl.show ' . $name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function loadVclFromConfiguration($configuration, $name = null) {\n if (!$name) {\n $name = $this->generateConfigurationName();\n }\n\n $this->execute('vcl.inline ' . $name . \" << EOVCL\\n\" . $configuration . \"\\nEOVCL\");\n\n return $name;\n }",
"public function getCLSc() {\n\t\treturn $this->clsc;\n\t}",
"public function getVariantConfig();",
"public static function GetDetectionBySystemConfig () {\n\t\treturn static::$detectionBySystemConfig;\n\t}",
"public function getCLINICA()\r\n {\r\n return $this->CLINICA;\r\n }",
"public function getCLSa() {\n\t\treturn $this->clsa;\n\t}",
"abstract public function getKernel(): PlaisioKernel;",
"public function getVclList() {\n $list = array();\n\n $response = $this->execute('vcl.list');\n\n $lines = explode(\"\\n\", $response);\n foreach ($lines as $line) {\n $line = trim($line);\n if (!$line) {\n continue;\n }\n\n $tokens = explode(' ', $line);\n\n $name = array_pop($tokens);\n\n $list[$name] = $tokens[0] == 'active';\n }\n\n return $list;\n }",
"public static function getGlobalGVPC() {\n $configModel = new Configurations();\n return $configModel->get(\\Config::get('configurations.gvpc_key'));\n }",
"public function useVcl($name) {\n $this->execute('vcl.use ' . $name);\n }",
"function slcr_core_vc() {\n\treturn Slcr_Core_Vc::slcr_instance();\n}",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function loadComponent()\r\n {\r\n return $this->selectVersion($this->currentVersion);\r\n }",
"public function getConfig() {\n $configFiles = [\n 4 => 'laravel-haml::config',\n 5 => 'laravel-haml',\n 6 => 'haml'\n ];\n\n\t\t$key = $configFiles[$this->version()];\n\t\treturn $this->app->make('config')->get($key);\n\t}",
"function plex_config_get_current_version() {\n\treturn PLEX_CONFIG_CURRENT_VERSION;\n}",
"public function config_get(){\n\t\treturn $this->fb->exec('dhcp.config_get');\n\t}",
"public function loadVclFromFile($file, $name = null) {\n if (!$name) {\n $name = $this->generateConfigurationName();\n }\n\n $this->execute('vcl.load ' . $name . ' ' . $file);\n\n return $name;\n }",
"abstract protected function getConfig();",
"abstract public function getConfig();",
"function getConfiguration() ;",
"public function getCvv()\n {\n return $this->getParameter('cvv');\n }",
"public static function get() { return static::$slimConfiguration; }",
"public static function getConfiguration();",
"public function get_csc_result() {\n\n\t\treturn $this->cvv2;\n\t}",
"public function getCcv()\n {\n return $this->cvv;\n }",
"public function getVhost();",
"public function getCssCustomCatalog()\n {\n return Mage::getStoreConfig('splitprice/split_price_presentation/css_catalog');\n }",
"public function getCssCustomCatalog()\n {\n return $this->_scopeConfig->getValue('splitprice/split_price_presentation/css_catalog', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }",
"public function getCvv()\n {\n return $this->cvv;\n }",
"public function getBestMatchingConfigurationForAllFeatures() {}",
"public function get_config()\n\t{\n\t\treturn $this->cfg;\n\t}",
"public function getConfig() {}",
"public static function getConfigInstance()\n {\n if (!static::$config) {\n static::$config = new Config\\NativeConfig;\n }\n\n return static::$config;\n }",
"public function setCLINICA($CLINICA)\r\n {\r\n $this->CLINICA = $CLINICA;\r\n\r\n return $this;\r\n }",
"private function get_config() {\n if (isset($this->config)) {\n return $this->config;\n }\n\n $this->config = get_config('tool_coursebank');\n\n return $this->config;\n }",
"function getConfig() {\n\t\tif (null === $this->_config) {\n\t\t\t$sql = \"\n\t\t\t\tSELECT c.node_id FROM synd_inv_config c\n\t\t\t\tWHERE c.parent_node_id = \".$this->_db->quote($this->nodeId);\n\t\t\t$this->_config = (string)$this->_db->getOne($sql);\n\t\t\t$this->_node_onchange_internal();\n\t\t}\n\n\t\tif ('' == $this->_config || null === ($config = $this->_storage->getInstance($this->_config))) {\n\t\t\t$config = $this->appendChild($this->_storage->factory('config'));\n\t\t\t$this->_config = $config->nodeId;\n\t\t\t$this->_node_onchange_internal();\n\t\t}\n\n\t\treturn $config;\n\t}",
"public function getConfig()\n {\n return $this->traitGetConfig();\n }",
"public function getPvL()\n {\n return $this->pv_l;\n }",
"public function kernel()\n {\n return $this->_kernel;\n }",
"public function kernel()\n {\n return $this->_kernel;\n }",
"static function _getLibrary() {\n\t\treturn self::webiny()->getConfig()->get('bridges.image', self::$_library);\n\t}",
"public function getVBC()\n {\n return $this->vBC;\n }",
"public function getVBC()\n {\n return $this->vBC;\n }",
"public function getDetectionClass()\n {\n return $this->detection_class;\n }",
"public function getConfig()\n {\n return Mage::helper(\"meanbee_osd/config\");\n }",
"public function getHpvC()\n {\n return $this->hpv_c;\n }",
"public function getConfiguration();",
"public function getConfiguration();",
"public function getConfiguration();",
"public function getConfigTarget();",
"public static function CYCLIC_REFRESH()\n {\n return new Av1AdaptiveQuantMode(self::CYCLIC_REFRESH);\n }",
"public function GetConfigClass ();",
"function getConfig($config)\n{ \n return config(\"system.$config\");\n}",
"public function getEngine();",
"public function getEngine();",
"public function getEngine();",
"public function getHpvL()\n {\n return $this->hpv_l;\n }",
"public function getLocalConfiguration() {}",
"function vxml_get_config($engine) {\n\twriteVxmlConf();\t\n\t\n\t//Call to the function to change the TTS engine\n\tchangeTTSEngine();\n\t\n\t//Call to the function to change the ASR engine\n\tchangeMRCPEngine();\n\t\n\t//We write the dialplan\n\tglobal $ext;\n\t\n\tswitch($engine) {\n\t\tcase \"asterisk\": \n\t\t\t$vxmllist = getVxmlList(\"*\");\n\t\t\tforeach ($vxmllist as $vxml) {\n\t\t\t\t$ename = \"app-vxml-\".$vxml['id'];\n\t\t\t\t$ext->addSectionComment($ename, $vxml['name']);\n\t\t\t\t$ext->add($ename,'s','',new ext_vxml($vxml['name']));\n\t\t\t\t$ext->add($ename,'s','',new ext_goto($vxml['goto']));\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t}\n\treturn;\n\t\n}",
"function virtual_hosting_db_getvrootconfig($vroot)\n{\n $PHORUM = $GLOBALS[\"PHORUM\"];\n\n settype($vroot, \"int\");\n\n $rec = phorum_db_interact(\n DB_RETURN_ROW,\n \"SELECT virtualhost_config\n FROM {$PHORUM[\"forums_table\"]}\n WHERE forum_id = $vroot\"\n );\n\n if ($rec) {\n $return = @unserialize($rec[0]);\n if (is_array($return)) return $return;\n }\n\n return NULL;\n}",
"protected abstract static function getConfig(): array;",
"public function getConfigData($config)\r\n\t{\r\n \treturn Mage::getStoreConfig('payment/Query_Cielo_Cc/' . $config);\r\n\t}",
"public function getConfig(): array;",
"public function getActiveVcl(array $vclList = null) {\n if ($vclList === null) {\n $vclList = $this->getVclList();\n }\n\n foreach ($vclList as $name => $state) {\n if (!$state) {\n continue;\n }\n\n return $this->getVcl($name);\n }\n\n return null;\n }",
"public function getShowInCatalog()\n {\n return Mage::getStoreConfig('splitprice/split_price_presentation/show_catalog');\n }",
"public function getSvrPool()\n {\n return $this->get(self::SVR_POOL);\n }",
"public function getLivemode()\n {\n return $this->livemode;\n }",
"function getEngine();",
"public function getConfiguration(): array;",
"public function getConfiguration(): array;",
"public function getConfigLanguage() : Config{\n \t$cfg = $this->getConfig()->getAll();\n \treturn $this->getLanguage($cfg[\"language\"]);\n }",
"public function config()\n {\n return $this->context->getConfig();\n }",
"public function getShowInCatalog()\n {\n return $this->_scopeConfig->getValue('splitprice/split_price_presentation/show_catalog', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }",
"public function getConfiguration(): SdkConfiguration;",
"public static function getConfig() {\n if (!self::$_configInstance)\n new acs_config();\n \n return self::$_configInstance;\n }",
"public function getConfig() {\n if (is_null($this->getData(\"config\"))) {\n $this->setData(\"config\", Mage::getModel(\"cloudiq_callme/config\"));\n }\n\n return $this->getData(\"config\");\n }",
"function phpkd_vblvb_build()\n{\n\trequire_once(DIR . '/includes/adminfunctions_options.php');\n\n\tglobal $vbulletin;\n\n\t$vbulletin->phpkd_vblvb = array();\n\t$settings = $vbulletin->db->query_read(\"SELECT varname, value, datatype FROM \" . TABLE_PREFIX . \"phpkd_vblvb_setting\");\n\n\twhile ($setting = $vbulletin->db->fetch_array($settings))\n\t{\n\t\t$vbulletin->phpkd_vblvb[\"$setting[varname]\"] = phpkd_vblvb_validate_value($setting['value'], $setting['datatype'], true, false);\n\t}\n\n\tbuild_datastore('phpkd_vblvb', serialize($vbulletin->phpkd_vblvb), 1);\n\n\treturn $vbulletin->phpkd_vblvb;\n}",
"public function getPreviewConfiguration() {}",
"function plex_config_get_installed_version() {\n\treturn get_option( 'plex_config_version' );\n}",
"public function getCLAVE()\n {\n return $this->CLAVE;\n }",
"public function getConfigurationForCurrentRoleInstance()\n\t{\n\t\tif (!isset($_SERVER['RdRoleId'])) {\n\t\t\trequire_once 'Zend/Service/WindowsAzure/Diagnostics/Exception.php';\n\t\t\tthrow new Zend_Service_WindowsAzure_Diagnostics_Exception('Server variable \\'RdRoleId\\' is unknown. Please verify the application is running in Development Fabric or Windows Azure Fabric.');\n\t\t}\n\t\treturn $this->getConfigurationForRoleInstance($this->_getCurrentRoleInstanceId());\n\t}",
"public function getConfig ()\n {\n $config = Mage::getModel('socnet/network')\n ->getConfigByNetworkKey($this->getNetworkKey());\n return $config;\n }",
"public function getCvillage()\n {\n return $this->cvillage;\n }",
"public function getServerConfig();",
"public function getServerConfig();",
"function getConfig()\n {\n return $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/config\");\n }",
"public function useComparativeCourseCatalogView() {\n \t$this->useComparativeView();\n }",
"public function load_options() {\n\t\treturn $this->get_config();\n\t}",
"public function getConfig()\n {\n return $this->config;\n }",
"public function generateVcl($version)\n {\n $template = $this->vclTemplateLocator->getTemplate($version);\n return strtr($template, $this->getReplacements());\n }",
"public function getVBCST()\n {\n return $this->vBCST;\n }",
"public function getStatusLEDConfig()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_STATUS_LED_CONFIG, $payload);\n\n $payload = unpack('C1config', $data);\n\n return $payload['config'];\n }",
"public function getConfig(){\n return $this->config;\n }"
] | [
"0.5744419",
"0.5526279",
"0.5361364",
"0.51902497",
"0.4949216",
"0.49375418",
"0.4930432",
"0.4859281",
"0.48358038",
"0.4811929",
"0.46900862",
"0.46600547",
"0.46600547",
"0.46600547",
"0.46600547",
"0.46600547",
"0.46600547",
"0.46600547",
"0.46600547",
"0.4601317",
"0.45955643",
"0.4588665",
"0.45666617",
"0.45157686",
"0.450026",
"0.4496544",
"0.44960007",
"0.4480242",
"0.44652027",
"0.44107932",
"0.43711272",
"0.43661544",
"0.43660173",
"0.43543595",
"0.4348569",
"0.43338364",
"0.43294293",
"0.4320321",
"0.43130302",
"0.43105233",
"0.43087548",
"0.42951688",
"0.42872357",
"0.428096",
"0.42791158",
"0.42665938",
"0.42665938",
"0.425904",
"0.42429712",
"0.42429712",
"0.4242806",
"0.4239552",
"0.42381027",
"0.42365953",
"0.42365953",
"0.42365953",
"0.4235727",
"0.42321616",
"0.42310455",
"0.42307234",
"0.42291299",
"0.42291299",
"0.42291299",
"0.4226168",
"0.4224299",
"0.42235938",
"0.4219754",
"0.42153713",
"0.42096987",
"0.4208599",
"0.42046544",
"0.42026556",
"0.42004675",
"0.4192394",
"0.41869965",
"0.41756657",
"0.41756657",
"0.41719025",
"0.41692802",
"0.41672575",
"0.4164416",
"0.4162305",
"0.41577512",
"0.41532025",
"0.41520622",
"0.4141662",
"0.41361615",
"0.41304603",
"0.41288075",
"0.41280863",
"0.41276422",
"0.41276422",
"0.41265053",
"0.41244715",
"0.4121802",
"0.41180155",
"0.4117983",
"0.41093457",
"0.41045865",
"0.4103721"
] | 0.60544956 | 0 |
Gets the active VCL | public function getActiveVcl(array $vclList = null) {
if ($vclList === null) {
$vclList = $this->getVclList();
}
foreach ($vclList as $name => $state) {
if (!$state) {
continue;
}
return $this->getVcl($name);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCLSc() {\n\t\treturn $this->clsc;\n\t}",
"static function getCurrent() {\n\t\treturn self::$_ctrl;\n\t}",
"public function getVcl($name) {\n return $this->execute('vcl.show ' . $name);\n }",
"function slcr_core_vc() {\n\treturn Slcr_Core_Vc::slcr_instance();\n}",
"public function getActiveCanvas()\n {\n return $this->activeCanvas;\n }",
"public static function current() : self {\n\t\tif(self::$current === null) {\n\t\t\tif(strtoupper(substr(PHP_OS, 0, 3)) === \"WIN\") {\n\t\t\t\tself::$current = self::windows();\n\t\t\t} else {\n\t\t\t\tself::$current = self::unix();\n\t\t\t}\n\t\t}\n\t\treturn self::$current;\n\t}",
"public function loadComponent()\r\n {\r\n return $this->selectVersion($this->currentVersion);\r\n }",
"function getCurrentContext();",
"public static function current()\n {\n return self::$currentContext;\n }",
"public function GetActive ();",
"public function currentMode() {}",
"function getCurrent();",
"public function getVclList() {\n $list = array();\n\n $response = $this->execute('vcl.list');\n\n $lines = explode(\"\\n\", $response);\n foreach ($lines as $line) {\n $line = trim($line);\n if (!$line) {\n continue;\n }\n\n $tokens = explode(' ', $line);\n\n $name = array_pop($tokens);\n\n $list[$name] = $tokens[0] == 'active';\n }\n\n return $list;\n }",
"public function getActiveBackend()\n {\n \treturn $this->engine;\n }",
"static function getCurrent() {\n if (self::$current_lang === NULL) {\n self::setCurrentByLocal(Yii::$app->language);\n }\n return self::$current_lang;\n }",
"public function get_active_core(): core {\n\t\t\treturn $this::$active_core;\n\t\t}",
"public function kernel()\n {\n return $this->_kernel;\n }",
"public function kernel()\n {\n return $this->_kernel;\n }",
"public function getCurrent();",
"function get_current_lang() {\n\n\t\t$multilingual = bf_get_current_language_option_code();\n\n\t\tif ( ( $current = get_option( $this->option_panel_id . $multilingual . '-current' ) ) == true ) {\n\n\t\t\treturn $current;\n\n\t\t} else {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t}",
"public function getCurrentProduct()\n {\n return $this->_registry->registry('current_product');\n }",
"public function getCurrentProduct()\n {\n return $this->_registry->registry('current_product');\n }",
"public function getCurrentProduct()\n {\n return $this->_registry->registry('current_product');\n }",
"public function menu_get_active_help()\n {\n return menu_get_active_help();\n }",
"public function getCLSa() {\n\t\treturn $this->clsa;\n\t}",
"public function getKernel() {\n\t\treturn $this->kernel;\n\t}",
"protected function getCurrentRenderingContext() {}",
"public function getCurrentWorkspace() {}",
"public function getCurrent()\n {\n return $this->get(self::_CURRENT);\n }",
"public function current() {\n return current($this->components);\n }",
"public function getCurrent()\n\t{\n\t\treturn Mage::registry('current_product');\n\t}",
"public function current()\n {\n return current($this->GameComArray);\n }",
"public function getCLINICA()\r\n {\r\n return $this->CLINICA;\r\n }",
"public function display_current()\n\t{\n\t\treturn $this->CLI->stringQuery($this->SqueezePlyrID.\" display ? ?\");\n\t}",
"public function getVhost();",
"public static function getCurrent()\n\t{\n\t\tif (Application::hasInstance())\n\t\t{\n\t\t\t$application = Application::getInstance();\n\t\t\treturn $application->getContext();\n\t\t}\n\n\t\treturn null;\n\t}",
"public function getActive() {\n\t\treturn $this->active;\n\t}",
"function getActiveLayer() {return $this->_activelayer;}",
"public function get_active_instance() {\n\n\n }",
"public function getFramework() {\r\n\t\treturn $this->context->getState('framework');\r\n\t}",
"function getGui()\n {\n return $this->gui;\n }",
"public function get_active_instance() { \n\n\n\t}",
"public static function getCurrentPlatform() {\n\t\t$version = new JVersion();\n\t\t$filter = &JFilterInput::getInstance();\n\t\t$name = strtolower($filter->clean($version->PRODUCT, 'cmd'));\n\t\treturn Array('name'=>$name, 'version'=>$version->getShortVersion());\n\t}",
"public function getKernel()\n {\n return $this->kernel;\n }",
"public function getKernel()\n {\n return $this->kernel;\n }",
"public function getKernel()\n {\n return $this->kernel;\n }",
"public function getKernel()\n {\n return $this->kernel;\n }",
"public static function getCurrentInstance()\n\t{\n\t return self::$instance;\n\t}",
"function plex_config_get_current_version() {\n\treturn PLEX_CONFIG_CURRENT_VERSION;\n}",
"public static function getGlobalGVPC() {\n $configModel = new Configurations();\n return $configModel->get(\\Config::get('configurations.gvpc_key'));\n }",
"function getActive() {\n\t\treturn $this->_Active;\n\t}",
"function scl_activate()\n{\n //\n}",
"public function getOperatingContexts();",
"public function getWgactive () {\n\t$preValue = $this->preGetValue(\"wgactive\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->wgactive;\n\treturn $data;\n}",
"public function getActive() {\n return $this->_active;\n }",
"public function getCLS() {\n\t\treturn $this->cls;\n\t}",
"public function getLivemode()\n {\n return $this->livemode;\n }",
"public function getSystem() {\n\t\treturn $this->system;\n\t}",
"protected function getActiveMenu() {\n return $this->activeMenu;\n }",
"public function getActive() {\n\t\tif ($this->_active === null) {\n\t\t\tif ($menu = $this->app->system->application->getMenu('site') and $menu instanceof JMenu) {\n\t\t\t\t$this->_active = $menu->getActive();\n\t\t\t}\n\t\t}\n\t\treturn $this->_active;\n\t}",
"public static function current() {\r\n $help_name = strtolower(str_replace('HW_HELP_','', get_called_class()));\r\n return self::get($help_name)->plugin_help;\r\n }",
"function getActive() { return $this->_active; }",
"abstract public function getKernel(): PlaisioKernel;",
"public function getEnableGpuDriver()\n {\n return $this->enable_gpu_driver;\n }",
"protected function getActiveClient()\n\t{\n\n\t\t$method = new \\ReflectionMethod($this, 'getRunningClient');\n\t\t$method->setAccessible(TRUE);\n\n\t\treturn $method->invoke($this);\n\n\t}",
"protected function getCurrentWorkspace() {}",
"public function getOldActive()\n {\n return $this->oldActive;\n }",
"public function get_current_lang() {\n return \\Drupal::languageManager()->getCurrentLanguage()->getId();\n }",
"public function getClerib()\n {\n return $this->clerib;\n }",
"protected function _fcGetCurrentVersion() \n {\n return $this->_oFcpoHelper->fcpoGetIntShopVersion();\n }",
"public function getActive()\n {\n return $this->active;\n }",
"public function getActive()\n {\n return $this->active;\n }",
"public function getActive()\n {\n return $this->active;\n }",
"public function getActive()\n {\n return $this->active;\n }",
"public function getActive()\n {\n return $this->active;\n }",
"public function getActive()\n {\n return $this->active;\n }",
"public function getActive()\n {\n return $this->active;\n }",
"public function getActive()\n {\n return $this->active;\n }",
"public function getActive()\n {\n return $this->active;\n }",
"public function getActive()\n {\n return $this->active;\n }",
"public function getActive()\n {\n return $this->active;\n }",
"public function getActive()\n {\n return $this->active;\n }",
"public function getActive()\n {\n return $this->active;\n }",
"public function getActive()\n {\n return $this->get(self::_ACTIVE);\n }",
"public function getActiveLanguage(): string\n\t{\n\t\treturn $this->selectedLanguage ?? App::getLocale();\n\t}",
"public function getCurrentObject() {}",
"public function getSystem()\n {\n return $this->system;\n }",
"public function getSystem()\n {\n return $this->system;\n }",
"public function getSystem() {\n return $this->system;\n }",
"public function getCurrent()\n {\n return $this->cur;\n }",
"public function _current();",
"protected function get_context() {\n $contextclass = '\\local_elisprogram\\context\\\\'.$this->contextlevel;\n if ($this->contextlevel !== 'system' && class_exists($contextclass)) {\n $id = $this->required_param('id', PARAM_INT);\n return $contextclass::instance($id);\n } else {\n return context_system::instance();\n }\n }",
"public static function GetDetectionBySystemConfig () {\n\t\treturn static::$detectionBySystemConfig;\n\t}",
"public function demoActive()\n\t{\n\t\treturn $this->active;\n\t}",
"public function getCurrentState();",
"function get_current_screen()\n {\n }",
"public function getCurrent()\n {\n /**\n * Retrieve latest version number\n */\n $sql = new Sql($this->getAdapter());\n $select = $sql->select(self::VERSION_TABLE);\n $select->limit(1)->order(\"id DESC\");\n\n try {\n $row = $sql->prepareStatementForSqlObject($select)->execute()->current();\n } catch (\\Exception $exception) {\n return null;\n }\n\n return $row ? $row['version'] : null;\n }",
"public function getCurrent() {\r\n\t\treturn $this->current;\r\n\t}",
"static public function _MENU(){\n if (b_reg::$current_module == VM_MODULE) start_VM();\n return loader::_fromCache('APImenu_vm'); \n }",
"public function getCurrentCategory()\n {\n return $this->registry->registry('current_category');\n }"
] | [
"0.6245969",
"0.58224",
"0.5780133",
"0.55721927",
"0.5392609",
"0.53564936",
"0.5351906",
"0.53250235",
"0.5285609",
"0.52727723",
"0.5241129",
"0.52380776",
"0.5218034",
"0.5214025",
"0.52070737",
"0.51655436",
"0.5145567",
"0.5145567",
"0.51245314",
"0.5107603",
"0.5068774",
"0.5068774",
"0.5068774",
"0.5027956",
"0.5010109",
"0.50016505",
"0.5001549",
"0.49954486",
"0.499363",
"0.49925992",
"0.49895093",
"0.49821708",
"0.4970145",
"0.49658665",
"0.4946352",
"0.49455717",
"0.4941098",
"0.49394804",
"0.4936556",
"0.4936459",
"0.49339283",
"0.49311006",
"0.4924864",
"0.49167037",
"0.49167037",
"0.49167037",
"0.49167037",
"0.49127126",
"0.4912492",
"0.49123096",
"0.49069405",
"0.4902413",
"0.4888596",
"0.4887548",
"0.48775825",
"0.48730505",
"0.48655614",
"0.4865503",
"0.48630098",
"0.48593116",
"0.4850757",
"0.48426226",
"0.48405865",
"0.4840411",
"0.48283342",
"0.4818021",
"0.48112756",
"0.48099068",
"0.48031572",
"0.48012188",
"0.48004076",
"0.48004076",
"0.48004076",
"0.48004076",
"0.48004076",
"0.48004076",
"0.48004076",
"0.48004076",
"0.48004076",
"0.48004076",
"0.48004076",
"0.48004076",
"0.48004076",
"0.47983906",
"0.47929227",
"0.478672",
"0.4783941",
"0.4783941",
"0.478329",
"0.47713676",
"0.47711492",
"0.47662452",
"0.47661933",
"0.4757523",
"0.4754981",
"0.47486252",
"0.4747379",
"0.47358415",
"0.47340873",
"0.47260877"
] | 0.5613263 | 3 |
Compiles and loads a configuration file under the provided name | public function loadVclFromFile($file, $name = null) {
if (!$name) {
$name = $this->generateConfigurationName();
}
$this->execute('vcl.load ' . $name . ' ' . $file);
return $name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function loadConfiguration($name);",
"public function loadConfig(string $name)\n {\n $config = include $this->getConfigDir().$name.'.php';\n\n return $config;\n }",
"public abstract function loadConfig($fileName);",
"public function loadConfig( $name )\n {\n $configFile = realpath( getcwd().'/config' ) .'/'. trim(strtolower($name)).'.config.php';\n if ( file_exists($configFile) && is_readable($configFile) )\n {\n return $this->loadFile($configFile);\n } else {\n return $this->loadDrupal();\n }\n }",
"protected function loadConfiguration($name)\n {\n // TODO: Implement loadConfiguration() method.\n }",
"public function configure($name)\n {\n if (isset($this->loadedConfigurations[$name])) {\n return;\n }\n\n $this->loadedConfigurations[$name] = true;\n\n $paths = $this->getConfigurationPaths($name);\n\n $config = $this->make('config');\n\n foreach ($paths as $path) {\n $config->set(Arr::dot([\n $name => require $path,\n ]));\n }\n }",
"public function configure($name)\n {\n if (isset($this->loadedConfigs[$name])) {\n return;\n }\n\n $this->loadedConfigs[$name] = true;\n\n if ($path = $this->getConfigPath($name)) {\n $this->make('config')->set($name, require $path);\n }\n }",
"static public function load($filename) {\n\t\t$filename .= '.php';\n\n\t\tif (!file_exists($filename)) {\n\t\t\tthrow new \\Exception('Configuration file not found: ' . $filename);\n\t\t}\n\n\t\tinclude $filename;\n\n\t\tif (!isset($config)) {\n\t\t\tthrow new \\Exception('No variable $config found in ' . $filename);\n\t\t}\n\n\t\tself::$values = $config;\n\t}",
"protected function loadFile(string $filename)\n\t{\n\t\tif (!isset($this->configFileLoaded[$filename])) {\n\t\t\t/* config folder Stored locally already resolved. Done in __construct */\n\t\t\t$file = $this->configFolder . $filename . '.php';\n\n\t\t\tif (file_exists($file)) {\n\t\t\t\t$this->config[strtolower($filename)] = require $file;\n\t\t\t}\n\n\t\t\t$this->configFileLoaded[$filename] = true;\n\t\t}\n\t}",
"public function configure($name)\n {\n if (isset($this->loadedConfigurations[$name])) {\n return;\n }\n\n $this->loadedConfigurations[$name] = true;\n\n $path = $this->getConfigurationPath($name);\n\n if ($path) {\n $this->make('config')->set($name, require $path);\n }\n }",
"public static function fromFile($filename)\n {\n $pathinfo = pathinfo($filename);\n\n if (!isset($pathinfo['extension'])) {\n throw new \\Dang\\Exception\\RuntimeException(sprintf(\n 'Filename \"%s\" is missing an extension and cannot be auto-detected',\n $filename\n ));\n }\n \n $extension = strtolower($pathinfo['extension']);\n if ($extension !== 'php') {\n throw new \\Dang\\Exception\\RuntimeException(sprintf(\n 'Unsupported config file extension: .%s',\n $pathinfo['extension']\n ));\n } \n \n if (!is_file($filename) || !is_readable($filename)) {\n throw new \\Dang\\Exception\\RuntimeException(sprintf(\n \"File '%s' doesn't exist or not readable\",\n $filename\n ));\n }\n \n $config = include $filename;\n\n return new Config($config);\n }",
"public function compile(string $fileName)\n {\n $configFile = fopen($fileName, \"r\");\n if ($configFile) {\n $this->processConfigFile($configFile);\n fclose($configFile);\n } else {\n echo \"error\";\n }\n\n while(true) {\n $key = readline('Enter a key to retrieve the value from config or type exit to exit: ');\n if($key === \"exit\") {\n break;\n }\n\n if(array_key_exists($key, $this->compiled_values)) {\n $value = $this->compiled_values[$key];\n $value = is_bool($value) ? ( $value ? \"true\" : \"false\" ) : $value;\n echo $value.\"\\n\";\n } else {\n echo \"'$key' key does not exists in config\\n\";\n }\n\n }\n }",
"function loadFile($src){\n if(file_exists($src) && is_readable($src))\n {\n include $src;\n if(isset($CONFIG)) $this->add($CONFIG);\n }\n }",
"public function LoadConf($conf_name){\r\n\r\n\t\t$file = $this->conf['CONF'].$conf_name;\r\n\t\tif(is_file($file)){\r\n\r\n\t\t\t$res = require_once $file;\r\n\t\t\tif(is_array($res))\treturn $res;\r\n\t\t}else{\r\n\r\n\t\t\t$this->ShowErrorMsg('the requested config file was not found on this server');\r\n\t\t}\r\n\t}",
"public function load_config() {\n if (!isset($this->config)) {\n $name = $this->get_name();\n $this->config = get_config(\"local_$name\");\n }\n }",
"function horsaw_config( $name ) {\n\t$name = explode( '.', $name );\n\n\t$config_file_path = get_template_directory() . '/config/' . $name[0] . '.php';\n\t$config_contents = require $config_file_path;\n\n\tif ( ! isset( $config_contents[ $name[1] ] ) ) {\n\t\treturn false;\n\t}\n\n\treturn $config_contents[ $name[1] ];\n}",
"function load( $filename = NULL )\n\t{\n\t\tif ( is_file( $filename ) ) {\n\n\t\t} else {\n\t\t\tthrow new FileNotFound( 'config file not exist!' );\n\t\t}\n\t}",
"public static function load($mapName)\n {\n\n foreach (Conf::$confPath as $path) {\n\n if (!$this->source)\n $menuPath = $path.'/menu/'.$this->name.'/';\n else\n $menuPath = $path.'/menu/'.$this->source.'/';\n\n if (!file_exists($menuPath))\n continue;\n\n $folder = new LibFilesystemFolder($menuPath);\n\n foreach ($folder->getFiles() as $file)\n include $file->getName(true);\n\n // break after found data\n break;\n }\n\n }",
"private function loadConfig()\n {\n\n $this->config = include(__DIR__ . '/../../config/config.php');\n\n }",
"function loadConfigFile ($fileName) {\n\t\tif (file_exists ($fileName)) {\n\t\t\tif (is_readable ($fileName)) {\n\t\t\t\t$configItems = array ();\n\t\t\t\tinclude ($fileName);\n\t\t\t\t$this->loadConfigArray ($configItems);\n\t\t\t} else {\n\t\t\t\treturn new Error ('CONFIG_FILE_NOT_READABLE', $fileName);\n\t\t\t}\n\t\t} else {\n\t\t\treturn new Error ('CONFIG_FILE_NOT_FOUND', $fileName);\n\t\t}\n\t}",
"public static function load($name) {\n\t $name = str_replace(\"\\\\\", DS, $name);\n\t\t$imagineBase = \\Configure::read('Imagine.base');\n\t\tif (empty($imagineBase)) {\n\t\t\t$imagineBase = \\CakePlugin::path('Imagine') . 'Vendor' . DS . 'Imagine' . DS . 'lib' . DS;\n\t\t}\n\n\t\t$filePath = $imagineBase . $name . '.php';\n\t\tif (file_exists($filePath)) {\n\t\t\trequire_once($filePath);\n\t\t\treturn;\n\t\t}\n\n\t\t$imagineBase = $imagineBase . 'Image' . DS;\n\t\tif (file_exists($imagineBase . $name . '.php')) {\n\t\t\trequire_once($imagineBase . $name . '.php');\n\t\t\treturn;\n\t\t}\n\t}",
"public function testConfigurationFromFile()\n {\n $path = __DIR__ . '/files/file1.config.php';\n\n $configuration = Factory::fromFile($path);\n\n $this->assertInstanceOf(Configuration::class, $configuration);\n $this->assertEquals(include $path, $configuration->getInternalContainer());\n }",
"function config($name, $_) {\r\n $args = func_get_args();\r\n $data = include ROOT . 'config' . DIRECTORY_SEPARATOR . $name . '.php';\r\n array_shift($args);\r\n if (count($args)) {\r\n foreach ($args as $arg) {\r\n if (!array_key_exists($arg, $data)) break;\r\n $data = $data[$arg];\r\n }\r\n }\r\n return $data;\r\n}",
"public function load($name);",
"static function load($configName = self::CONFIG_DEFAULT)\n { \n $parserConfig = array();\n\n if (!empty($configName)) {\n $configJson = file_get_contents(self::_getConfigFilePath($configName));\n if ($configJson) {\n $parserConfig = json_decode($configJson, true);\n }\n }\n\n return $parserConfig;\n }",
"abstract protected function loadConfig();",
"static function _getConfigFilePath($configName)\n {\n return dirname(__FILE__).\"/Configs/$configName.json\";\n }",
"public function loadConfig($filename)\n {\n return $this->getConfig()->loadConfig($filename);\n }",
"public static function load($sourceFile, $force = false)\n {\n if (preg_match('/\\.php$/', $sourceFile)) {\n $stash = require $sourceFile;\n return new Config($stash);\n }\n $compiledFile = self::compile($sourceFile, $force);\n $stash = require $compiledFile;\n return new Config($stash, $sourceFile);\n }",
"private function load_config_file($file) {\n\n\t\t$file = PATH_THIRD.'dm_eeck/config/'.$file;\n\n\t\tif(file_exists($file)) {\n\t\t\trequire($file);\n\t\t\tif(isset($editor_config)) {\n\t\t\t\treturn $editor_config;\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t}",
"private function load_config_file($file) {\n\n\t\t$file = PATH_THIRD.'dm_eeck/config/'.$file;\n\n\t\tif(file_exists($file)) {\n\t\t\trequire($file);\n\t\t\tif(isset($editor_config)) {\n\t\t\t\treturn $editor_config;\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t}",
"function load_configs($file, $is_global = true)\n{\n\n if (substr($file, -5) != '.json') {\n throw new Exception('Invalid config file found in configs folder.');\n }\n\n $fname = strtolower(substr(basename($file), 0, - (strlen('.json'))));\n\n $GLOBALS[\"__CONFIG__{$fname}__\"] = json_decode(file_get_contents($file), true);\n}",
"function SM_loadConfigReader($rName, $user, $rFile='') {\n \n // globalize\n global $SM_siteManager;\n\n // rFile shouldn't be passed unless this is SMCONFIG calling us\n if ($rFile == '') {\n // find file\n $rFile = $SM_siteManager->findSMfile($rName.'_reader', 'configReaders', 'inc', true);\n }\n\n // include the file\n include_once($rFile);\n\n // found it, instantiate and return\n $className = 'SM_configReader_'.$rName;\n $reader = new $className();\n $reader->setUser($user);\n\n return $reader;\n}",
"private function LoadConfigFile(){\n $a = file_get_contents($this->RootDIR . 'config/main.json');\n $this->Config = json_decode($a, true);\n }",
"public function compileFile(\n $templateName,\n $templateBasedir,\n $templateDirectory,\n $templateFilepath,\n $parsedTemplateFilepath\n ) {\n\n\n // open the template\n $fp = fopen($templateFilepath, \"r\") or die(\"cannot open file $templateFilepath\");\n\n // lock the file\n if (flock($fp, LOCK_SH)) {\n\n // save the filepath in the info\n $this->templateInfo['template_filepath'] = $templateFilepath;\n\n // read the file\n $this->templateInfo['code'] = $code = fread($fp, filesize($templateFilepath));\n\n // xml substitution\n $code = preg_replace(\"/<\\?xml(.*?)\\?>/s\", /*<?*/ \"##XML\\\\1XML##\", $code);\n\n // disable php tag\n if (!$this->php_enabled)\n $code = str_replace(array(\"<?\", \"?>\"), array(\"<?\", \"?>\"), $code);\n\n // xml re-substitution\n $code = preg_replace_callback(\"/##XML(.*?)XML##/s\", function( $match ) {\n return \"<?php echo '<?xml \" . stripslashes($match[1]) . \" ?>'; ?>\";\n }, $code);\n\n $parsedCode = $this->compileTemplate($code, $isString = false, $templateBasedir, $templateDirectory, $templateFilepath);\n\n\n/* $parsedCode = \"<?php if(!class_exists('\\\\core\\\\rtpl\\\\RainbowTemplate')){exit;}?>\" . $parsedCode;*/\n\n\n // fix the php-eating-newline-after-closing-tag-problem\n/* $parsedCode = str_replace(\"?>\\n\", \"?>\\n\\n\", $parsedCode);*/\n\n // check if the cache is writable\n if (!is_writeable($this->cache->getCacheDir())) \n# if (!is_writable($this->config['cache_dir']))\n throw new \\core\\exceptions\\OperationNotPermittedException('Cache directory ' . $this->cache->getCacheDir() . 'doesn\\'t have write permission. Set write permission or set RAINTPL_CHECK_TEMPLATE_UPDATE to FALSE. More details on http://www.raintpl.com/Documentation/Documentation-for-PHP-developers/Configuration/');\n\n $this->cache->write($parsedTemplateFilepath, $parsedCode);\n\n // release the file lock\n flock($fp, LOCK_UN);\n }\n\n // close the file\n fclose($fp);\n }",
"private function loadConfig()\n {\n $files = scandir($this->configPath());\n $configs = [];\n\n foreach ($files as $file) {\n $filePath = $this->configPath() . DIRECTORY_SEPARATOR . $file;\n\n if (is_file($filePath)) {\n $config = [basename($file, '.php') => include $filePath];\n if (is_array($config)) {\n $configs = array_merge($configs, $config);\n }\n }\n }\n\n $this->config = $configs;\n }",
"protected function config($name) {\n return $this->configFactory->get($name);\n }",
"private function loadEnvironment(string $name) : void\n {\n $this->current[] = $name;\n $filename = $name;\n if (strlen($filename)) {\n $filename = \".$filename\";\n }\n if (file_exists(\"{$this->path}/.env$filename\")) {\n $filename = \".env$filename\";\n } else {\n // The config file does not exist. Instead of throwing an error,\n // we fail silently. This allows e.g. .env.test to exist on\n // developer machines, but not on production.\n return;\n }\n $env = new Parser(file_get_contents(\"{$this->path}/$filename\"));\n $vars = $env->getContent();\n foreach ($vars as $name => $value) {\n $this->setVariable($name, $value);\n }\n }",
"public function load($_file, $_name, $_array = FALSE) \n {\n // Lowercase the $name\n $_name = strtolower($_name);\n \n // Include file and add it to the $files array\n if(!file_exists($_file)) return FALSE;\n include( $_file );\n $this->files[$_name]['file_path'] = $_file;\n $this->files[$_name]['config_key'] = $_array;\n \n // Get defined variables\n $vars = get_defined_vars();\n if($_array != FALSE) $vars = $vars[$_array];\n \n // Unset the passes vars\n unset($vars['_file'], $vars['_name'], $vars['_array']);\n \n // Add the variables to the $data[$name] array\n if(count($vars) > 0)\n {\n foreach( $vars as $key => $val ) \n {\n if($key != 'this' && $key != 'data') \n {\n $this->data[$_name][$key] = $val;\n }\n }\n }\n return;\n }",
"public function __construct(string $fileName = \"config.cfg\")\n {\n if (empty($fileName)) {\n $this->fileName = defined(\"CONFIG\") ? CONFIG : $fileName;\n } else {\n if (file_exists($fileName)) {\n $this->fileName = $fileName;\n }\n }\n if (file_exists($this->fileName)) {\n $this->vars = parse_ini_file($this->fileName, true);\n }\n }",
"static public function build() {\n if (self::$built == TRUE) {\n return;\n }\n $lastFile = array_pop(debug_backtrace());\n $callingDirectory = dirname($lastFile['file']);\n $jsonPath = $callingDirectory . '/db.json';\n if (file_exists($jsonPath)) {\n $parsedJson = json_decode(file_get_contents($jsonPath), TRUE);\n print_r('Building with custom config ' . $jsonPath . PHP_EOL);\n }\n else {\n $jsonPath = __DIR__ . '/db.json';\n if (!file_exists($jsonPath)) {\n self::fail('Cannot locate default db.json file in ' . __DIR__);\n }\n $parsedJson = json_decode(file_get_contents($jsonPath), TRUE);\n }\n if (empty($parsedJson)) {\n self::fail('Invald Json found in ' . $jsonPath);\n }\n self::$config = $parsedJson;\n self::finalizeDbPath($callingDirectory);\n }",
"private function _loadConfig($filename)\n\t{\t\n\t\tif (!isset($config[$filename]))\n\t\t{\n\t\t\t$path = $this->pathToConfig . $filename . '.php';\n\t\t\tif (file_exists($path))\n\t\t\t{\n\t\t\t\trequire($this->pathToConfig . $filename . '.php');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Config file {$path} does not exist!\");\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * $config is the array found in ALL config files stored in $this->pathToConfig/\n\t\t */\n\t\treturn $config;\n\t}",
"public function load( $name ) {\n\n\t\t$name = $this->prepare_name( $name );\n\t\tif ( ! $name ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ( array( 'core', 'pro' ) as $main_dir ) {\n\n\t\t\tif ( ! is_dir( \"$this->dir/$main_dir\" ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ( array( 'controllers', 'models', 'views' ) as $sub_dir ) {\n\n\t\t\t\tif ( ! is_dir( \"$this->dir/$main_dir/$sub_dir\" ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$file = \"$this->dir/$main_dir/$sub_dir/$name.php\";\n\n\t\t\t\tif ( file_exists( $file ) ) {\n\t\t\t\t\tinclude $file;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public function evalFile(string $src): CompiledFile;",
"function loadConfigFiles(array $fileNames){\n foreach($fileNames as $fileName){\n $configPath = $this->configBasePath . $fileName . $this->suffix;\n if(file_exists($configPath)){\n require $configPath;\n }\n }\n }",
"public function compileConfigFiles(): void\n {\n if (null !== $this->files)\n {\n $this->msg('Files', self::MSG_HEAD);\n\n foreach ($this->files as $arrFile)\n {\n $filename = StringUtil::standardize($arrFile['name']);\n $content = $this->getFileContent($arrFile['path']);\n\n $this->msg('Compile file: ' . $arrFile['path']);\n\n // Add default import path\n $this->importPaths[] = $this->rootDir . '/' . \\dirname($arrFile['path']);\n\n // Compile content and save file\n $this->saveFile($this->compile($content)->getCss(), $filename);\n }\n }\n }",
"public static function load()\n {\n $files = glob(BASEDIR . '/config/*.php');\n foreach ($files as $file){\n $key = str_replace('.php', '', basename($file));\n static::$values[$key] = include $file;\n }\n }",
"public function __construct($fileName, $hasChain = false)\n {\n self::$fileName = $fileName;\n if (isset(self::$aConfiguration[$fileName])) {\n self::$aConfiguration[$fileName];\n } else {\n //Check the app / configs link\n if (file_exists(MVC_CONFIG . $fileName . \".php\")) {\n //Save file name and file content information in array form\n self::$aConfiguration[$fileName] = include MVC_CONFIG\n . $fileName . \".php\";\n } else {\n self::$aConfiguration[$fileName] = array();\n }\n }\n //Save the file contents as an array\n self::$aValue = self::$aConfiguration[$fileName];\n }",
"public static function loadConfig($configFile) {\n\t}",
"function read_config($file = false)\n{\n global $config, $databases;\n $ret = false;\n if (!$file) {\n $file = $config['config_file'];\n }\n // protect from including external files\n $search = array(':', 'http', 'ftp', ' ');\n $replace = array('', '', '', '');\n $file = str_replace($search, $replace, $file);\n\n if (is_readable($config['paths']['config'] . $file . '.php')) {\n // to prevent modern server from caching the new configuration we need to evaluate it this way\n clearstatcache();\n $f = implode('', file($config['paths']['config'] . $file . '.php'));\n $f = str_replace('<?php', '', $f);\n $f = str_replace('?>', '', $f);\n eval($f);\n $config['config_file'] = $file;\n $_SESSION['config_file'] = $config['config_file'];\n $ret = true;\n }\n\n return $ret;\n}",
"public function load()\n\t{\n\t\tif (file_exists(self::$configPath))\n\t\t{\n\t\t\t$this->config = json_decode(file_get_contents(self::$configPath), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->config = array();\n\t\t}\n\t}",
"public function parseFile($filename, $config = null, $encoding = null, $use_include_path = false) {}",
"public function load($filename)\n {\n return require $filename;\n }",
"function cache($filename, $loader) {\n global $app;\n if (!class_exists($loader)) throw new Exception('Class doesn\\'t exist');\n if (!is_subclass_of($loader, 'Symfony\\Component\\Config\\Loader\\LoaderInterface')) throw new Exception('The loader should implement LoaderInterface');\n $cachePath = $app['cache_path'].'/'.$filename.'.cache';\n $configCache = new Symfony\\Component\\Config\\ConfigCache($cachePath, true);\n if (!$configCache->isFresh()) {\n $locator = new Symfony\\Component\\Config\\FileLocator($app['config_path']);\n $configFile = $locator->locate($filename, null, true);\n $configLoader = new $loader($locator);\n $config = $configLoader->load($configFile);\n\n $resources = array(new Symfony\\Component\\Config\\Resource\\FileResource($configFile));\n $code = '<?php return ' . var_export($config, true) . \";\\n\";\n $configCache->write($code, $resources);\n }\n return require $cachePath;\n}",
"private static function loadConfig(string $file)\n {\n $ds = DIRECTORY_SEPARATOR;\n $basepath = __DIR__ . \"{$ds}configs\";\n $filePath = \"{$basepath}{$ds}{$file}.php\";\n\n if (!file_exists($filePath)) {\n throw new Exception(\"File {$file}.php not found\", 500);\n }\n\n return include $filePath;\n }",
"static function loadConfig() {\n\t\t$config = self::file($_SERVER[\"DOCUMENT_ROOT\"] . \"/../config.json\");\n\t\tif (!is_null($config))\n\t\t\tself::$config = json_decode($config);\n\t}",
"public static function compile($name)\n {\n try\n {\n lessc::ccompile(self::$less_folder.$name.'.less', self::$compile_folder.$name.'.css');\n }\n catch (exception $ex)\n {\n exit('lessc fatal error:<br />'.$ex->getMessage());\n }\n }",
"public static function config_load($name, $required = true)\n {\n if ($name === 'core') {\n // Load the application configuration file\n require APPPATH.'config/config'.EXT;\n\n if (! isset($config['site_domain'])) {\n // Invalid config file\n die('Your Kohana application configuration file is not valid.');\n }\n\n return $config;\n }\n\n if (isset(self::$internal_cache['configuration'][$name])) {\n return self::$internal_cache['configuration'][$name];\n }\n\n // Load matching configs\n $configuration = array();\n\n if ($files = self::find_file('config', $name, $required)) {\n foreach ($files as $file) {\n require $file;\n\n if (isset($config) and is_array($config)) {\n // Merge in configuration\n $configuration = array_merge($configuration, $config);\n }\n }\n }\n\n if (! isset(self::$write_cache['configuration'])) {\n // Cache has changed\n self::$write_cache['configuration'] = true;\n }\n\n return self::$internal_cache['configuration'][$name] = $configuration;\n }",
"public function readConfig() {\n if ( file_exists( $this->path . '/config/config.php' ) ) {\n require_once $this->path . '/config/config.php';\n }\n }",
"abstract public function load($filename);",
"private function configCommand(string $name): Result\n {\n $cmd = (new Get($this->repo->getRoot()));\n $cmd->name($name);\n\n return $this->runner->run($cmd);\n }",
"public function loadConfig($file) {\n $config = array();\n if (file_exists(PATH_CONFIGS . $file))\n include(PATH_CONFIGS . $file);\n if (!empty($config)) {\n foreach ($config as $name => $array) {\n $this->configs[$name] = $array;\n }\n }\n }",
"private function generateConfig()\n {\n if ('' == $this->config->getName()) {\n throw new \\InvalidArgumentException('No module name given');\n }\n $target = sprintf(\n '%s/app/code/%s/%s/%s/etc/config.xml',\n $this->config->getPath(),\n $this->config->getCodePool(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'config.xml', $target, array(\n 'config' => $this->config,\n ));\n \n \n $target = sprintf(\n '%s/app/etc/modules/%s_%s.xml',\n $this->config->getPath(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'Module.xml', $target, array(\n 'config' => $this->config,\n )); \n }",
"public function compile(File $file);",
"function load($filename){\n\n\t\t//Check if the input is valid\n\t\tif(!\\lib_validation\\validate($filename, LV_STRING))\n\t\t\treturn null;\n\t\t\n\t\t//Escape characters just to be safe \n\t\t$filename = addslashes($filename);\n\t\t\n\t\t//Convert namespace to a file path\n\t\t$filename = \"configs/\" . $filename . \".json\";\n\t\t\n\t\t//Checks if the file exists\n\t\tif(!file_exists($filename))\n\t\t\treturn null;\n\t\t\n\t\t//Load the file\n\t\t$json = file_get_contents($filename);\n\t\t\n\t\t//Parse the file\n\t\t$data = json_decode($json, true);\n\t\t\n\t\t//Return the results (associative array)\n\t\treturn $data;\n\t}",
"protected function setConfigurations()\n {\n if ($files = $this->getFiles('config'))\n {\n foreach ($files as $key => $filename)\n {\n $this->config->set(basename($filename, '.php'), require path('config').DIRECTORY_SEPARATOR.($filename));\n }\n }\n }",
"function load_config($path) {\n \n // Check path\n if(file_exists($path) == false) {\n throw new Exception(\"Unable to load configuration -- file not found: $path\");\n }\n \n // Check file\n if(is_file($path) == false) {\n throw new Exception(\"Unable to load configuration -- not a file: $path\");\n }\n \n // Check permissions\n if(is_readable($path) == false) {\n throw new Exception(\"Unable to load configuration -- access denied: $path\");\n }\n \n // Check size \n if(filesize($path) == 0) {\n throw new Exception(\"Unable to load configuration -- file is empty: $path\");\n }\n \n // Load parser\n require_once(YAML_PARSER);\n \n // Load config\n $config = Spyc::YAMLLoad($path);\n \n // Check result - if empty, throw an exception\n if(sizeof($config) == 0) {\n throw new Exception(\"Unable to load configuration -- parse error: $path\");\n }\n \n // General application options\n if(isset($config['info']['name'])) { $this->set_name($config['info']['name']); }\n if(isset($config['info']['admin email'])) { $this->set_admin_email($config['info']['admin email']); }\n if(isset($config['info']['admin name'])) { $this->set_admin_name($config['info']['admin name']); }\n if(isset($config['info']['base url'])) { $this->set_base_url($config['info']['base url']); }\n if(isset($config['info']['base directory'])) { $this->set_base_dir($config['info']['base directory']); }\n \n // Database\n if(isset($config['database']['name'])) { \n \n // Initialize db object\n $this->db = new StanfordDatabase();\n \n // Credentials\n if(isset($config['database']['name'])) { $this->db->set_database($config['database']['name']); }\n if(isset($config['database']['username'])) { $this->db->set_username($config['database']['username']); }\n if(isset($config['database']['password'])) { $this->db->set_password($config['database']['password']); }\n \n // Encryption\n if(isset($config['database']['use encryption'])) { $this->db->use_encryption($config['database']['use encryption']); }\n else { $this->db->use_encryption(false); }\n\n }\n \n // Use mysql sessions set to true\n if(isset($config['database']['use mysql sessions']) && $config['database']['use mysql sessions'] == true ) {\n \n // Check DB\n if($this->db instanceof StanfordDatabase) {\n \n // Enable MySQL sessions\n $this->db->setup_mysql_sessions();\n \n }\n else {\n \n // DB not configured\n throw new Exception(\"Cannot enable MySQL-based sessions -- database credentials not provided\"); \n \n }\n }\n \n // Logging\n if(isset($config['settings']['logging mode'])) {\n $this->util->set_error_reporting($config['settings']['logging mode']);\n }\n \n // Undo magic quotes\n if(isset($config['settings']['undo magic quotes']) && $config['settings']['undo magic quotes'] == true) {\n $this->util->undo_magic_quotes();\n }\n }",
"public function loadConfiguration()\n {\n \\Env::init();\n\n if (file_exists(SRC_ROOT . '/.env')) {\n $dotenv = new Dotenv(SRC_ROOT);\n $dotenv->load();\n $dotenv->required([\n 'DB_NAME',\n 'DB_USER',\n 'DB_PASSWORD',\n 'DB_HOST'\n ]);\n }\n\n define('APP_ENV', env('APP_ENV') ?: self::ENV_LIVE);\n\n if (!in_array(APP_ENV, $this->getAllowedEnvironments(), true)) {\n die('Invalid environment');\n }\n\n $configFileName = SRC_ROOT . '/config/env/' . APP_ENV . '.php';\n\n if (file_exists($configFileName)) {\n require $configFileName;\n }\n }",
"public function compileString($templateName, $templateBasedir, $templateFilepath, $parsedTemplateFilepath, $code) {\n\n // open the template\n $fp = fopen($parsedTemplateFilepath, \"w\");\n\n // lock the file\n if (flock($fp, LOCK_SH)) {\n\n // xml substitution\n $code = preg_replace(\"/<\\?xml(.*?)\\?>/s\", \"##XML\\\\1XML##\", $code);\n\n // disable php tag\n if (!$this->php_enabled)\n $code = str_replace(array(\"<?\", \"?>\"), array(\"<?\", \"?>\"), $code);\n\n // xml re-substitution\n $code = preg_replace_callback(\"/##XML(.*?)XML##/s\", function( $match ) {\n return \"<?php echo '<?xml \" . stripslashes($match[1]) . \" ?>'; ?>\";\n }, $code);\n\n $parsedCode = $this->compileTemplate($code, $isString = true, $templateBasedir, $templateDirectory = null, $templateFilepath);\n/* $parsedCode = \"<?php if(!class_exists('\\\\core\\\\rtpl\\\\RainbowTemplate')){exit;}?>\" . $parsedCode; */\n\n // fix the php-eating-newline-after-closing-tag-problem\n $parsedCode = str_replace(\"?>\\n\", \"?>\\n\\n\", $parsedCode);\n\n // create directories\n#ä if (!is_dir($this->config['cache_dir']))\n#ä mkdir($this->config['cache_dir'], 0755, true);\n\n // check if the cache is writable\n if (!is_writable($this->cache->getCacheDir()))\n throw new \\core\\exceptions\\OperationNotPermittedException('Cache directory ' . $this->cache->getCacheDir() . 'doesn\\'t have write permission. Set write permission or set RAINTPL_CHECK_TEMPLATE_UPDATE to false. More details on http://www.raintpl.com/Documentation/Documentation-for-PHP-developers/Configuration/');\n\n // write compiled file\n fwrite($fp, $parsedCode);\n\n // release the file lock\n flock($fp, LOCK_UN);\n }\n\n // close the file\n fclose($fp);\n }",
"function opcache_compile_file($file)\n{\n}",
"public function load() {\n\t\t$this->copyFromTemplateIfNeeded();\n\t\trequire $this->filePath;\n\t\t$this->vars = $vars;\n\t}",
"public function loadYamlConfig($filepath);",
"private function loadConfigFiles()\n { if (!$this->configFiles) {\n $this->configFiles[] = 'config.neon';\n }\n\n foreach ($this->configFiles as $file) {\n $this->configurator->addConfig($this->paths->getConfigDir().'/'.$file);\n }\n }",
"private function AddTemplate(string $name){\n\t\t$tfn=\\Config\\local_templates. mb_strtolower($name).'.php';\n\t\tif(!\\file_exists($tfn))\n\t\t\tthrow new \\Exception(\"Unable to locate template $name ($tfn)\");\n\t\trequire($tfn);\n\t}",
"private function load_config() {\n $this->config = new Config();\n }",
"function config(string $name)\n {\n return container_object(ConfigInterface::class)->get($name);\n }",
"protected function getConfigFromFile()\n {\n if (! file_exists(CONFIG_FILE)) {\n throw new RuntimeException('File ' . CONFIG_FILE . ' does not exist');\n }\n\n return include CONFIG_FILE;\n }",
"public static function compile($sourceFile, $force = false)\n {\n $compiledFile = ConfigCompiler::compiled_filename($sourceFile);\n if ($force || ConfigCompiler::test($sourceFile, $compiledFile)) {\n $config = ConfigCompiler::parse($sourceFile);\n if ($config === false) {\n throw new RuntimeException(\"Can't parse config file '$sourceFile'.\");\n }\n $config = ConfigPreprocessor::preprocess($config);\n ConfigCompiler::write($compiledFile, $config);\n }\n return $compiledFile;\n }",
"public function includeTemplate($name)\n {\n $path = $this->config->getTemplate($name);\n $this->includeFile($path);\n }",
"public static function load()\n {\n if(!self::$loaded)\n {\n $GLOBALS['_EZMVC_SYS_CONFIG'] = require __DIR__ . '/system.config.php'; //Load config file\n $GLOBALS['_EZMVC_SYS_CONFIG'] = is_array($GLOBALS['_EZMVC_SYS_CONFIG']) ? $GLOBALS['_EZMVC_SYS_CONFIG'] : []; //Make sure its an array\n\n $GLOBALS['_EZMVC_APP_CONFIG'] = require dirname(__DIR__) . '/app/config/app.config.php';\n $GLOBALS['_EZMVC_APP_CONFIG'] = is_array($GLOBALS['_EZMVC_APP_CONFIG']) ? $GLOBALS['_EZMVC_APP_CONFIG'] : [];\n }\n }",
"private static function loadConfigurationFile()\n {\n if(self::$ConfigurationData == null)\n {\n $file_contents = file_get_contents(CONFIGURATION_FILE);\n $json_data = json_decode($file_contents, true);\n\n if(empty($json_data))\n {\n throw new Exception(\"Invalid JSON data in the configuration file\");\n }\n\n self::$ConfigurationData = $json_data;\n }\n }",
"protected static function loadSingleExtLocalconfFiles() {}",
"function __construct()\r\n\t{\r\n\t\trequire './configs/configs.php';\r\n\t}",
"function __construct() {\n if (!file_exists($this->configuration_file_path)) {\n \n die(\"FATAL: Missing \" . $this->configuration_file_path . `pwd` );\n \n }\n \n $raw_contents = file_get_contents($this->configuration_file_path);\n\n\n //parse json object\n try {\n\n $this->Config = json_decode( $raw_contents );\n\n } catch (Exception $e) {\n\n die(\"FATAL: Bad configuration file? \");\n\n }\n \n\n }",
"private function load()\n {\n if (!file_exists($this->file)) {\n throw new Exception('config file not found');\n }\n // read contents of wordpress config\n // we can not require the configuration because it requires a shit load of other files\n $this->config = file_get_contents($this->file);\n }",
"public static function get($name, $default = null)\n {\n list($file_name) = explode('.', $name, 2);\n static::load($file_name);\n return \\Config::get('data::'.$name, $default);\n }",
"public function loadClass($name) {\r\n //array of classes to be laoded\r\n $classes = array(\r\n 'Config' => '../config/Config.php',\r\n 'Error' => '../validation/Error.php',\r\n 'Flash' => '../flash/Flash.php',\r\n 'NotFoundException' => '../exception/NotFoundException.php',\r\n 'JobValidator' => '../validation/JobValidator.php',\r\n 'UserCredentialsValidator' => '../validation/UserCredentialsValidator.php',\r\n 'Utils' => '../util/Utils.php',\r\n 'HeadTemplate' => '../layout/HeadTemplate.php',\r\n 'User' => '../model/User.php',\r\n 'Clinic' => '../model/Clinic.php',\r\n 'ClinicDao' => '../dao/ClinicDao.php',\r\n 'UserDao' => '../dao/UserDao.php',\r\n 'ClinicMapper' => '../mapping/ClinicMapper.php',\r\n 'UserMapper' => '../mapping/UserMapper.php',\r\n 'Dao' => '../dao/Dao.php',\r\n 'Job' => '../model/Job.php',\r\n 'JobDao' => '../dao/JobDao.php',\r\n 'JobMapper' => '../mapping/JobMapper.php',\r\n 'AccountValidator' => '../validation/AccountValidator.php');\r\n \r\n //Exception handler if class not found\r\n if (!array_key_exists($name, $classes)) {\r\n die('Class\"' . $name . '\"not found.');\r\n }\r\n require_once $classes[$name];\r\n \r\n }",
"function loadConfig(){\n $file = file_get_contents($this->config_dir, FILE_USE_INCLUDE_PATH);\n $urls = json_decode($file,TRUE);\n //not the best way but error handling\n if ($file == NULL || $urls == NUll ){\n print(\"Error reading the config file or it it is empty\");\n }\n else{\n $this->config_data = $urls;\n\n }\n }",
"protected function _load_config()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $config_file = new Configuration_File(self::APP_CONFIG);\n $this->config = $config_file->load();\n } catch (File_Not_Found_Exception $e) {\n // Not fatal\n }\n\n $this->is_loaded = TRUE;\n }",
"private static function loadAppConfig() {\n\t\t\t$appConfJson = file_get_contents(JIAOYU_PROJECT_HOME.\"/app/conf/config.json\");\n\t\t\ttry {\n\t\t\t\t$appConf = JsonUtils::decode($appConfJson);\n\t\t\t} catch (JsonException $e) {\n\t\t\t\tthrow new ConfigurationException(\"Error initializing app config: \".$e->getMessage());\n\t\t\t}\n\n\t\t\t// OK - now we can load up the config array from the file\n\t\t\tforeach ($appConf as $configKey => $configValue) {\n\t\t\t\tself::$config[$configKey] = $configValue;\n\t\t\t}\n\t\t}",
"public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }",
"public function load($file);",
"public function load($file);",
"public function load($file);",
"public function getConfigFilePath();",
"public function autoLoad($name){\n\t\t$path = NULL;\n\t\t$namespaceParts = explode('\\\\', $name);\n\t\t$pathTail = implode(DIRECTORY_SEPARATOR, $namespaceParts) . '.php';\n\t\t\n\t\t$tryPath = $this->rootPath . '/' . $pathTail;\n\t\t\n\t\tif(is_readable($tryPath)){\n\t\t\t$path = $tryPath;\n\t\t}\n\t\t\n\t\t// this must not throw an exception or do any kind of error as if it does\n\t\t// then when you use class_exists it will error instead of returning false\n\t\tif ($path) {\n\t\t\trequire_once($path); \n\t\t}\n\t}",
"protected function lowlevelConfigFix($name)\n {\n $distname = realpath(__DIR__ . '/../../app/config/' . $name . '.yml.dist');\n $ymlname = $this->config->getPath('config') . '/' . $name . '.yml';\n\n if (file_exists($ymlname) && !is_readable($ymlname)) {\n $error = sprintf(\n \"Couldn't read <code>%s</code>-file inside <code>%s</code>. Make sure the file exists and is readable to the user that the web server is using.\",\n htmlspecialchars($name . '.yml', ENT_QUOTES),\n htmlspecialchars($this->config->getPath('config'), ENT_QUOTES)\n );\n throw new BootException($error);\n }\n\n if (!file_exists($ymlname)) {\n // Try and copy from the .dist config file\n try {\n copy($distname, $ymlname);\n } catch (\\Exception $e) {\n $message = sprintf(\n \"Couldn't create a new <code>%s</code>-file inside <code>%s</code>. Create the file manually by copying\n <code>%s</code>, and optionally make it writable to the user that the web server is using.\",\n htmlspecialchars($name . '.yml', ENT_QUOTES),\n htmlspecialchars($this->config->getPath('config'), ENT_QUOTES),\n htmlspecialchars($name . '.yml.dist', ENT_QUOTES)\n );\n\n throw new BootException($message);\n }\n }\n }",
"public function __construct($config=false,$name=false) \n {\n $this->config = new Config($config);\n if($name){\n $this->get($name);\n }\n }",
"private function setupPHPConfigFiles()\n {\n foreach( glob('app/etc/*.php') as $file )\n {\n $key = str_replace('.php', null, basename($file));\n $data = include $file;\n \n $this->config->add($key, $data);\n }\n }",
"static function get($configName = self::CONFIG_DEFAULT)\n {\n $parserConfig = self::load(self::CONFIG_DEFAULT);\n\n if ($configName != self::CONFIG_DEFAULT) {\n $parserConfig = self::merge($parserConfig, $configName);\n }\n\n return $parserConfig;\n }"
] | [
"0.6871295",
"0.67754024",
"0.6772018",
"0.6446982",
"0.6294463",
"0.6248254",
"0.61582774",
"0.61212254",
"0.6071498",
"0.6065595",
"0.6056025",
"0.5957183",
"0.59344923",
"0.59075236",
"0.58885473",
"0.58843225",
"0.578367",
"0.57108635",
"0.57033646",
"0.56996876",
"0.56408346",
"0.5635185",
"0.5608698",
"0.5570893",
"0.55222225",
"0.5509147",
"0.5483607",
"0.5474908",
"0.54516226",
"0.5443731",
"0.5443731",
"0.5437135",
"0.5426866",
"0.5406236",
"0.5383142",
"0.53786784",
"0.5365495",
"0.53584564",
"0.53487104",
"0.53467226",
"0.53460413",
"0.53405786",
"0.53356004",
"0.5329014",
"0.53230286",
"0.5315658",
"0.5299312",
"0.5297252",
"0.5288705",
"0.52775264",
"0.5274056",
"0.52577674",
"0.5247617",
"0.52456963",
"0.5240367",
"0.5226827",
"0.522204",
"0.5206343",
"0.5199143",
"0.5170982",
"0.5163094",
"0.5158558",
"0.5150499",
"0.5149264",
"0.5148063",
"0.5145757",
"0.5139989",
"0.5131616",
"0.51168406",
"0.5115627",
"0.51143855",
"0.51132375",
"0.5098896",
"0.50881875",
"0.5086365",
"0.5080358",
"0.5078781",
"0.50754404",
"0.5072067",
"0.5065929",
"0.50554454",
"0.5045662",
"0.50446147",
"0.5030933",
"0.502875",
"0.5020835",
"0.5007513",
"0.4998604",
"0.4991354",
"0.4990277",
"0.49843147",
"0.49801287",
"0.49801287",
"0.49801287",
"0.49726847",
"0.4972568",
"0.49702588",
"0.49640605",
"0.4955811",
"0.49539214"
] | 0.5624215 | 22 |
Compiles and loads a configuration under the provided name | public function loadVclFromConfiguration($configuration, $name = null) {
if (!$name) {
$name = $this->generateConfigurationName();
}
$this->execute('vcl.inline ' . $name . " << EOVCL\n" . $configuration . "\nEOVCL");
return $name;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function loadConfiguration($name);",
"public function loadConfig(string $name)\n {\n $config = include $this->getConfigDir().$name.'.php';\n\n return $config;\n }",
"protected function loadConfiguration($name)\n {\n // TODO: Implement loadConfiguration() method.\n }",
"public function configure($name)\n {\n if (isset($this->loadedConfigurations[$name])) {\n return;\n }\n\n $this->loadedConfigurations[$name] = true;\n\n $paths = $this->getConfigurationPaths($name);\n\n $config = $this->make('config');\n\n foreach ($paths as $path) {\n $config->set(Arr::dot([\n $name => require $path,\n ]));\n }\n }",
"public function configure($name)\n {\n if (isset($this->loadedConfigs[$name])) {\n return;\n }\n\n $this->loadedConfigs[$name] = true;\n\n if ($path = $this->getConfigPath($name)) {\n $this->make('config')->set($name, require $path);\n }\n }",
"public function configure($name)\n {\n if (isset($this->loadedConfigurations[$name])) {\n return;\n }\n\n $this->loadedConfigurations[$name] = true;\n\n $path = $this->getConfigurationPath($name);\n\n if ($path) {\n $this->make('config')->set($name, require $path);\n }\n }",
"public function loadConfig( $name )\n {\n $configFile = realpath( getcwd().'/config' ) .'/'. trim(strtolower($name)).'.config.php';\n if ( file_exists($configFile) && is_readable($configFile) )\n {\n return $this->loadFile($configFile);\n } else {\n return $this->loadDrupal();\n }\n }",
"public abstract function loadConfig($fileName);",
"public function load_config() {\n if (!isset($this->config)) {\n $name = $this->get_name();\n $this->config = get_config(\"local_$name\");\n }\n }",
"protected function config($name) {\n return $this->configFactory->get($name);\n }",
"function horsaw_config( $name ) {\n\t$name = explode( '.', $name );\n\n\t$config_file_path = get_template_directory() . '/config/' . $name[0] . '.php';\n\t$config_contents = require $config_file_path;\n\n\tif ( ! isset( $config_contents[ $name[1] ] ) ) {\n\t\treturn false;\n\t}\n\n\treturn $config_contents[ $name[1] ];\n}",
"public function load($name);",
"function config(string $name)\n {\n return container_object(ConfigInterface::class)->get($name);\n }",
"protected function configFor($name)\n {\n // Return cached result\n if (array_key_exists($name, $this->configs ?? [])) {\n return $this->configs[$name];\n }\n\n $config = Config::inst()->get(Injector::class, $name);\n $this->configs[$name] = $config;\n return $config;\n }",
"function config($name, $_) {\r\n $args = func_get_args();\r\n $data = include ROOT . 'config' . DIRECTORY_SEPARATOR . $name . '.php';\r\n array_shift($args);\r\n if (count($args)) {\r\n foreach ($args as $arg) {\r\n if (!array_key_exists($arg, $data)) break;\r\n $data = $data[$arg];\r\n }\r\n }\r\n return $data;\r\n}",
"private function configCommand(string $name): Result\n {\n $cmd = (new Get($this->repo->getRoot()));\n $cmd->name($name);\n\n return $this->runner->run($cmd);\n }",
"public static function load($name) {\n\t $name = str_replace(\"\\\\\", DS, $name);\n\t\t$imagineBase = \\Configure::read('Imagine.base');\n\t\tif (empty($imagineBase)) {\n\t\t\t$imagineBase = \\CakePlugin::path('Imagine') . 'Vendor' . DS . 'Imagine' . DS . 'lib' . DS;\n\t\t}\n\n\t\t$filePath = $imagineBase . $name . '.php';\n\t\tif (file_exists($filePath)) {\n\t\t\trequire_once($filePath);\n\t\t\treturn;\n\t\t}\n\n\t\t$imagineBase = $imagineBase . 'Image' . DS;\n\t\tif (file_exists($imagineBase . $name . '.php')) {\n\t\t\trequire_once($imagineBase . $name . '.php');\n\t\t\treturn;\n\t\t}\n\t}",
"static function load($configName = self::CONFIG_DEFAULT)\n { \n $parserConfig = array();\n\n if (!empty($configName)) {\n $configJson = file_get_contents(self::_getConfigFilePath($configName));\n if ($configJson) {\n $parserConfig = json_decode($configJson, true);\n }\n }\n\n return $parserConfig;\n }",
"static public function load($filename) {\n\t\t$filename .= '.php';\n\n\t\tif (!file_exists($filename)) {\n\t\t\tthrow new \\Exception('Configuration file not found: ' . $filename);\n\t\t}\n\n\t\tinclude $filename;\n\n\t\tif (!isset($config)) {\n\t\t\tthrow new \\Exception('No variable $config found in ' . $filename);\n\t\t}\n\n\t\tself::$values = $config;\n\t}",
"abstract protected function loadConfig();",
"function config(string $name)\n {\n return app()->services()->config()->{$name};\n }",
"public function LoadConf($conf_name){\r\n\r\n\t\t$file = $this->conf['CONF'].$conf_name;\r\n\t\tif(is_file($file)){\r\n\r\n\t\t\t$res = require_once $file;\r\n\t\t\tif(is_array($res))\treturn $res;\r\n\t\t}else{\r\n\r\n\t\t\t$this->ShowErrorMsg('the requested config file was not found on this server');\r\n\t\t}\r\n\t}",
"public static function load($mapName)\n {\n\n foreach (Conf::$confPath as $path) {\n\n if (!$this->source)\n $menuPath = $path.'/menu/'.$this->name.'/';\n else\n $menuPath = $path.'/menu/'.$this->source.'/';\n\n if (!file_exists($menuPath))\n continue;\n\n $folder = new LibFilesystemFolder($menuPath);\n\n foreach ($folder->getFiles() as $file)\n include $file->getName(true);\n\n // break after found data\n break;\n }\n\n }",
"public function __construct($config=false,$name=false) \n {\n $this->config = new Config($config);\n if($name){\n $this->get($name);\n }\n }",
"public function compile(string $fileName)\n {\n $configFile = fopen($fileName, \"r\");\n if ($configFile) {\n $this->processConfigFile($configFile);\n fclose($configFile);\n } else {\n echo \"error\";\n }\n\n while(true) {\n $key = readline('Enter a key to retrieve the value from config or type exit to exit: ');\n if($key === \"exit\") {\n break;\n }\n\n if(array_key_exists($key, $this->compiled_values)) {\n $value = $this->compiled_values[$key];\n $value = is_bool($value) ? ( $value ? \"true\" : \"false\" ) : $value;\n echo $value.\"\\n\";\n } else {\n echo \"'$key' key does not exists in config\\n\";\n }\n\n }\n }",
"public function load( $name ) {\n\n\t\t$name = $this->prepare_name( $name );\n\t\tif ( ! $name ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ( array( 'core', 'pro' ) as $main_dir ) {\n\n\t\t\tif ( ! is_dir( \"$this->dir/$main_dir\" ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ( array( 'controllers', 'models', 'views' ) as $sub_dir ) {\n\n\t\t\t\tif ( ! is_dir( \"$this->dir/$main_dir/$sub_dir\" ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$file = \"$this->dir/$main_dir/$sub_dir/$name.php\";\n\n\t\t\t\tif ( file_exists( $file ) ) {\n\t\t\t\t\tinclude $file;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public function loadClass($name) {\r\n //array of classes to be laoded\r\n $classes = array(\r\n 'Config' => '../config/Config.php',\r\n 'Error' => '../validation/Error.php',\r\n 'Flash' => '../flash/Flash.php',\r\n 'NotFoundException' => '../exception/NotFoundException.php',\r\n 'JobValidator' => '../validation/JobValidator.php',\r\n 'UserCredentialsValidator' => '../validation/UserCredentialsValidator.php',\r\n 'Utils' => '../util/Utils.php',\r\n 'HeadTemplate' => '../layout/HeadTemplate.php',\r\n 'User' => '../model/User.php',\r\n 'Clinic' => '../model/Clinic.php',\r\n 'ClinicDao' => '../dao/ClinicDao.php',\r\n 'UserDao' => '../dao/UserDao.php',\r\n 'ClinicMapper' => '../mapping/ClinicMapper.php',\r\n 'UserMapper' => '../mapping/UserMapper.php',\r\n 'Dao' => '../dao/Dao.php',\r\n 'Job' => '../model/Job.php',\r\n 'JobDao' => '../dao/JobDao.php',\r\n 'JobMapper' => '../mapping/JobMapper.php',\r\n 'AccountValidator' => '../validation/AccountValidator.php');\r\n \r\n //Exception handler if class not found\r\n if (!array_key_exists($name, $classes)) {\r\n die('Class\"' . $name . '\"not found.');\r\n }\r\n require_once $classes[$name];\r\n \r\n }",
"protected static function _buildEngine(string $name): void\n {\n $registry = static::getRegistry();\n\n if (empty(static::$_config[$name]['className'])) {\n throw new InvalidArgumentException(\n sprintf('The `%s` cache configuration does not exist.', $name)\n );\n }\n\n $config = static::$_config[$name];\n\n try {\n $registry->load($name, $config);\n } catch (RuntimeException $e) {\n if (!array_key_exists('fallback', $config)) {\n $registry->set($name, new NullEngine());\n trigger_error($e->getMessage(), E_USER_WARNING);\n\n return;\n }\n\n if ($config['fallback'] === false) {\n throw $e;\n }\n\n if ($config['fallback'] === $name) {\n throw new InvalidArgumentException(sprintf(\n '`%s` cache configuration cannot fallback to itself.',\n $name\n ), 0, $e);\n }\n\n $fallbackEngine = clone static::pool($config['fallback']);\n assert($fallbackEngine instanceof CacheEngine);\n\n $newConfig = $config + ['groups' => [], 'prefix' => null];\n $fallbackEngine->setConfig('groups', $newConfig['groups'], false);\n if ($newConfig['prefix']) {\n $fallbackEngine->setConfig('prefix', $newConfig['prefix'], false);\n }\n $registry->set($name, $fallbackEngine);\n }\n\n if ($config['className'] instanceof CacheEngine) {\n $config = $config['className']->getConfig();\n }\n\n if (!empty($config['groups'])) {\n /** @var string $group */\n foreach ($config['groups'] as $group) {\n static::$_groups[$group][] = $name;\n static::$_groups[$group] = array_unique(static::$_groups[$group]);\n sort(static::$_groups[$group]);\n }\n }\n }",
"public static function fromFile($filename)\n {\n $pathinfo = pathinfo($filename);\n\n if (!isset($pathinfo['extension'])) {\n throw new \\Dang\\Exception\\RuntimeException(sprintf(\n 'Filename \"%s\" is missing an extension and cannot be auto-detected',\n $filename\n ));\n }\n \n $extension = strtolower($pathinfo['extension']);\n if ($extension !== 'php') {\n throw new \\Dang\\Exception\\RuntimeException(sprintf(\n 'Unsupported config file extension: .%s',\n $pathinfo['extension']\n ));\n } \n \n if (!is_file($filename) || !is_readable($filename)) {\n throw new \\Dang\\Exception\\RuntimeException(sprintf(\n \"File '%s' doesn't exist or not readable\",\n $filename\n ));\n }\n \n $config = include $filename;\n\n return new Config($config);\n }",
"private function loadConfig()\n {\n\n $this->config = include(__DIR__ . '/../../config/config.php');\n\n }",
"static function get($configName = self::CONFIG_DEFAULT)\n {\n $parserConfig = self::load(self::CONFIG_DEFAULT);\n\n if ($configName != self::CONFIG_DEFAULT) {\n $parserConfig = self::merge($parserConfig, $configName);\n }\n\n return $parserConfig;\n }",
"public function getServiceConfigByName($name);",
"private function load_config() {\n $this->config = new Config();\n }",
"public function loadConfiguration(): void\n {\n $config = $this->getConfig() + $this->defaults;\n $this->setConfig($config);\n\n $cb = $this->getContainerBuilder();\n\n $routingFilePath = $config['routingFile'];\n $neonRoutesLoader = $cb->addDefinition($this->prefix('neonRoutesLoader'));\n $neonRoutesLoader->setClass(NeonRoutesLoader::class)\n ->setArguments([Helpers::expand($routingFilePath, $cb->parameters), $config['autoInternalIds']]);\n\n $neonLocalesLoader = $cb->addDefinition($this->prefix('neonLocalesLoader'));\n $neonLocalesLoader->setClass(NeonLocalesLoader::class)\n ->setArguments([Helpers::expand($routingFilePath, $cb->parameters)]);\n\n $router = $cb->addDefinition($this->prefix('router'));\n $router->setClass(Router::class)\n ->addSetup('setAsSecured', [$config['isSecured']])\n ->addSetup('setFilesExtension', [$config['extension']]);\n }",
"protected function resolve($name)\n\t{\n\t\t$config = $this->getConfig($name);\n\n\t\tif (isset($this->customCreators[$config['driver']]))\n\t\t{\n\t\t\treturn $this->callCustomCreator($config);\n\t\t}\n\n\t\treturn $this->{\"create\".ucfirst($config['driver']).\"Driver\"}($config);\n\t}",
"protected function resolve($name)\n {\n $config = $this->getConfig($name);\n \n if (isset($this->customCreators[$config['driver']]))\n {\n return $this->callCustomCreator($config);\n }\n \n return $this->{\"create\".ucfirst($config['driver']).\"Driver\"}($config);\n }",
"public function __get ($name) {\t\t\n\t\tif ( $name=='config') {\n\t\t\treturn $this->config;\n\t\t}\n\t\treturn $this->load($name);\n\t}",
"public static function config_load($name, $required = true)\n {\n if ($name === 'core') {\n // Load the application configuration file\n require APPPATH.'config/config'.EXT;\n\n if (! isset($config['site_domain'])) {\n // Invalid config file\n die('Your Kohana application configuration file is not valid.');\n }\n\n return $config;\n }\n\n if (isset(self::$internal_cache['configuration'][$name])) {\n return self::$internal_cache['configuration'][$name];\n }\n\n // Load matching configs\n $configuration = array();\n\n if ($files = self::find_file('config', $name, $required)) {\n foreach ($files as $file) {\n require $file;\n\n if (isset($config) and is_array($config)) {\n // Merge in configuration\n $configuration = array_merge($configuration, $config);\n }\n }\n }\n\n if (! isset(self::$write_cache['configuration'])) {\n // Cache has changed\n self::$write_cache['configuration'] = true;\n }\n\n return self::$internal_cache['configuration'][$name] = $configuration;\n }",
"protected function loadFile(string $filename)\n\t{\n\t\tif (!isset($this->configFileLoaded[$filename])) {\n\t\t\t/* config folder Stored locally already resolved. Done in __construct */\n\t\t\t$file = $this->configFolder . $filename . '.php';\n\n\t\t\tif (file_exists($file)) {\n\t\t\t\t$this->config[strtolower($filename)] = require $file;\n\t\t\t}\n\n\t\t\t$this->configFileLoaded[$filename] = true;\n\t\t}\n\t}",
"private function loadEnvironment(string $name) : void\n {\n $this->current[] = $name;\n $filename = $name;\n if (strlen($filename)) {\n $filename = \".$filename\";\n }\n if (file_exists(\"{$this->path}/.env$filename\")) {\n $filename = \".env$filename\";\n } else {\n // The config file does not exist. Instead of throwing an error,\n // we fail silently. This allows e.g. .env.test to exist on\n // developer machines, but not on production.\n return;\n }\n $env = new Parser(file_get_contents(\"{$this->path}/$filename\"));\n $vars = $env->getContent();\n foreach ($vars as $name => $value) {\n $this->setVariable($name, $value);\n }\n }",
"private function generateConfig()\n {\n if ('' == $this->config->getName()) {\n throw new \\InvalidArgumentException('No module name given');\n }\n $target = sprintf(\n '%s/app/code/%s/%s/%s/etc/config.xml',\n $this->config->getPath(),\n $this->config->getCodePool(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'config.xml', $target, array(\n 'config' => $this->config,\n ));\n \n \n $target = sprintf(\n '%s/app/etc/modules/%s_%s.xml',\n $this->config->getPath(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'Module.xml', $target, array(\n 'config' => $this->config,\n )); \n }",
"static public function build() {\n if (self::$built == TRUE) {\n return;\n }\n $lastFile = array_pop(debug_backtrace());\n $callingDirectory = dirname($lastFile['file']);\n $jsonPath = $callingDirectory . '/db.json';\n if (file_exists($jsonPath)) {\n $parsedJson = json_decode(file_get_contents($jsonPath), TRUE);\n print_r('Building with custom config ' . $jsonPath . PHP_EOL);\n }\n else {\n $jsonPath = __DIR__ . '/db.json';\n if (!file_exists($jsonPath)) {\n self::fail('Cannot locate default db.json file in ' . __DIR__);\n }\n $parsedJson = json_decode(file_get_contents($jsonPath), TRUE);\n }\n if (empty($parsedJson)) {\n self::fail('Invald Json found in ' . $jsonPath);\n }\n self::$config = $parsedJson;\n self::finalizeDbPath($callingDirectory);\n }",
"public function load($name = '')\n {\n $returnStack = array();\n \n if (empty($name)) {\n $name = self::DEFAULTNAME . self::EXTENSION;\n }\n \n $config_ary = $this->getIo()->load($name,null);\n \n //support single or multiple connections\n if ($config_ary === NULL) {\n return NULL;\n } elseif(isset($config_ary[0]) && is_array($config_ary[0])) {\n foreach($config_ary as $c) {\n $returnStack[] = $this->populateEntity(new Entity(),$c);\n }\n } else {\n $returnStack[] = $this->populateEntity(new Entity(),$config_ary);\n }\n \n return $returnStack;\n \n }",
"public function loadJob($name);",
"public function _initConfig() {\r\n $this->config = Yaf\\Application::app()->getConfig();\r\n Yaf\\Registry::set(\"config\", $this->config);\r\n\r\n //申明, 凡是以Foo和Local开头的类, 都是本地类\r\n $this->loader = Yaf\\Loader::getInstance();\r\n $this->loader->registerLocalNamespace([\"fly\"]);\r\n }",
"function SM_loadConfigReader($rName, $user, $rFile='') {\n \n // globalize\n global $SM_siteManager;\n\n // rFile shouldn't be passed unless this is SMCONFIG calling us\n if ($rFile == '') {\n // find file\n $rFile = $SM_siteManager->findSMfile($rName.'_reader', 'configReaders', 'inc', true);\n }\n\n // include the file\n include_once($rFile);\n\n // found it, instantiate and return\n $className = 'SM_configReader_'.$rName;\n $reader = new $className();\n $reader->setUser($user);\n\n return $reader;\n}",
"function loadFile($src){\n if(file_exists($src) && is_readable($src))\n {\n include $src;\n if(isset($CONFIG)) $this->add($CONFIG);\n }\n }",
"public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }",
"public function autoLoad($name){\n\t\t$path = NULL;\n\t\t$namespaceParts = explode('\\\\', $name);\n\t\t$pathTail = implode(DIRECTORY_SEPARATOR, $namespaceParts) . '.php';\n\t\t\n\t\t$tryPath = $this->rootPath . '/' . $pathTail;\n\t\t\n\t\tif(is_readable($tryPath)){\n\t\t\t$path = $tryPath;\n\t\t}\n\t\t\n\t\t// this must not throw an exception or do any kind of error as if it does\n\t\t// then when you use class_exists it will error instead of returning false\n\t\tif ($path) {\n\t\t\trequire_once($path); \n\t\t}\n\t}",
"private function resolveConfig($name)\n {\n $config = $this->configs[$name];\n\n if (isset($config['extends'])) {\n $extended = $this->getConfig($config['extends']);\n\n if (isset($config[$this->serviceType]) && ($extended[$this->serviceType] != $config[$this->serviceType])) {\n throw new \\InvalidArgumentException(sprintf(\n '%s configuration for service \"%s\" cannot extend configuration for different service \"%s\"',\n $this->serviceType,\n $config[$this->serviceType],\n $extended[$this->serviceType]\n ));\n }\n\n unset($config['extends']);\n $config = array_merge(\n $extended->getArrayCopy(),\n $config\n );\n }\n\n if (!isset($config[$this->serviceType])) {\n throw new \\InvalidArgumentException(sprintf(\n '%s configuration must EITHER indicate its target %s service with the \"%s\" key or extend an existing configuration with the \"extends\" key.',\n $this->serviceType,\n $this->serviceType,\n $this->serviceType\n ));\n }\n\n $service = $this->getService($config[$this->serviceType]);\n\n $config = $this->mergeAndValidateConfig($service, $config);\n $this->resolvedConfigs[$name] = new Config($name, $config);\n }",
"function load_configs($file, $is_global = true)\n{\n\n if (substr($file, -5) != '.json') {\n throw new Exception('Invalid config file found in configs folder.');\n }\n\n $fname = strtolower(substr(basename($file), 0, - (strlen('.json'))));\n\n $GLOBALS[\"__CONFIG__{$fname}__\"] = json_decode(file_get_contents($file), true);\n}",
"protected function resolve($name)\n\t{\n\t\t$config = $this->getConfig($name);\n\n\t\tif (is_null($config)) {\n\t\t\tthrow new InvalidArgumentException(\"Language store [{$name}] is not defined.\");\n\t\t}\n\n\t\t$driverMethod = 'create'.ucfirst($config['driver']).'Driver';\n\n\t\tif (method_exists($this, $driverMethod)) {\n\t\t\treturn $this->{$driverMethod}($config);\n\t\t} else {\n\t\t\tthrow new InvalidArgumentException(\"Driver [{$config['driver']}] is not supported.\");\n\t\t}\n\t}",
"protected static function _initConfig($name, $config) {\n\t\t$defaults = array('temp_cache' => null,'token_cache' => null);\n\t\treturn parent::_initConfig($name, (array) $config + $defaults);\n\t}",
"function cache($filename, $loader) {\n global $app;\n if (!class_exists($loader)) throw new Exception('Class doesn\\'t exist');\n if (!is_subclass_of($loader, 'Symfony\\Component\\Config\\Loader\\LoaderInterface')) throw new Exception('The loader should implement LoaderInterface');\n $cachePath = $app['cache_path'].'/'.$filename.'.cache';\n $configCache = new Symfony\\Component\\Config\\ConfigCache($cachePath, true);\n if (!$configCache->isFresh()) {\n $locator = new Symfony\\Component\\Config\\FileLocator($app['config_path']);\n $configFile = $locator->locate($filename, null, true);\n $configLoader = new $loader($locator);\n $config = $configLoader->load($configFile);\n\n $resources = array(new Symfony\\Component\\Config\\Resource\\FileResource($configFile));\n $code = '<?php return ' . var_export($config, true) . \";\\n\";\n $configCache->write($code, $resources);\n }\n return require $cachePath;\n}",
"public function load()\n\t{\n\t\tif (file_exists(self::$configPath))\n\t\t{\n\t\t\t$this->config = json_decode(file_get_contents(self::$configPath), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->config = array();\n\t\t}\n\t}",
"public function loadVclFromFile($file, $name = null) {\n if (!$name) {\n $name = $this->generateConfigurationName();\n }\n\n $this->execute('vcl.load ' . $name . ' ' . $file);\n\n return $name;\n }",
"protected function get($name) {\n return $this->configuration->get($name);\n }",
"private function runConfig()\n {\n $configs = [\n [\n 'name' => 'sub_title',\n 'alias_name' => 'SubTitle',\n 'value' => 'SubTitle',\n ],\n [\n 'name' => 'title',\n 'alias_name' => 'Title',\n 'value' => 'Title',\n ],\n ];\n\n foreach ($configs as $config) {\n factory(Config::class)->create($config);\n }\n }",
"public static function load()\n {\n $files = glob(BASEDIR . '/config/*.php');\n foreach ($files as $file){\n $key = str_replace('.php', '', basename($file));\n static::$values[$key] = include $file;\n }\n }",
"public function locateConfigFor($name)\n {\n $config = $this->configFor($name);\n if (!$config) {\n return null;\n }\n\n // If config is in `%$Source` format then inherit from the named config\n if (is_string($config) && stripos($config ?? '', '%$') === 0) {\n $name = substr($config ?? '', 2);\n return $this->locateConfigFor($name);\n }\n\n // Return the located config\n return $config;\n }",
"public static function compile($name)\n {\n try\n {\n lessc::ccompile(self::$less_folder.$name.'.less', self::$compile_folder.$name.'.css');\n }\n catch (exception $ex)\n {\n exit('lessc fatal error:<br />'.$ex->getMessage());\n }\n }",
"private function fetchFromCache($name)\n {\n return $this->cache->getValue('conf_' . $name);\n }",
"public function testConfigurationFromFile()\n {\n $path = __DIR__ . '/files/file1.config.php';\n\n $configuration = Factory::fromFile($path);\n\n $this->assertInstanceOf(Configuration::class, $configuration);\n $this->assertEquals(include $path, $configuration->getInternalContainer());\n }",
"public function &get_conf_by_name($name)\n {\n $ret = false;\n if (isset($this->_conf_cached[$name])) {\n $ret = $this->_conf_cached[$name];\n }\n return $ret;\n }",
"public static function load($sourceFile, $force = false)\n {\n if (preg_match('/\\.php$/', $sourceFile)) {\n $stash = require $sourceFile;\n return new Config($stash);\n }\n $compiledFile = self::compile($sourceFile, $force);\n $stash = require $compiledFile;\n return new Config($stash, $sourceFile);\n }",
"public function includeBlock($name)\n {\n $path = $this->config->getBlock($name);\n $this->includeFile($path);\n }",
"public static function loadModule($name){\n if(is_array($name)){\n foreach($name as $module){\n if(isset(self::$modules[$module])) {\n self::exec(self::$modules[$module]);\n }\n }\n }\n // load a single resource.\n else if(isset(self::$modules[$name])){\n self::exec(self::$modules[$name]);\n }else{\n die('Unable to load module: ' . $name);\n }\n }",
"abstract public function loadConfig(array $config);",
"public static function get($name, $default = null)\n {\n list($file_name) = explode('.', $name, 2);\n static::load($file_name);\n return \\Config::get('data::'.$name, $default);\n }",
"protected function resolve($name)\n {\n $config = $this->getConfig($name);\n\n if (is_null($config)) {\n throw new InvalidArgumentException(\"Option store [{$name}] is not defined.\");\n }\n\n if (isset($this->customCreators[$config['driver']])) {\n return $this->callCustomCreator($config);\n } else {\n $driverMethod = 'create'.ucfirst($config['driver']).'Driver';\n\n if (method_exists($this, $driverMethod)) {\n return $this->{$driverMethod}($config);\n } else {\n throw new InvalidArgumentException(\"Driver [{$config['driver']}] is not supported.\");\n }\n }\n }",
"private static function createClass(string $name)\n\t{\n\t\tif (class_exists($name))\n\t\t{\n\t\t\treturn new $name();\n\t\t}\n\n\t\t$locator = Services::locator();\n\t\t$file = $locator->locateFile($name, 'Config');\n\n\t\tif (empty($file))\n\t\t{\n\t\t\t// No file found - check if the class was namespaced\n\t\t\tif (strpos($name, '\\\\') !== false)\n\t\t\t{\n\t\t\t\t// Class was namespaced and locateFile couldn't find it\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Check all namespaces\n\t\t\t$files = $locator->search('Config/' . $name);\n\t\t\tif (empty($files))\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Get the first match (prioritizes user and framework)\n\t\t\t$file = reset($files);\n\t\t}\n\n\t\t$name = $locator->getClassname($file);\n\n\t\tif (empty($name))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\treturn new $name();\n\t}",
"public function loadAlgorithm($algorithmName){\n $algorithmsDir = Config::$algorithmsDir;\n $algorithmSufix = Config::$algorithmSufix;\n $algorithmFile = \"$algorithmsDir/$algorithmName.$algorithmSufix\";\n if(!file_exists($algorithmFile)) die(\"Oops! ALGORITHM NOT EXISTS '$algorithmFile'\\n\");\n \n require_once $algorithmFile;\n if(!class_exists($algorithmName)) die(\"Oops! Algorithm class should be named as '$algorithmName'\");\n $this->algorithm = new $algorithmName($this->map);\n }",
"abstract public function generateConfiguration();",
"protected function configure()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../../config/knet.php', 'knet'\n );\n }",
"function __construct()\r\n\t{\r\n\t\trequire './configs/configs.php';\r\n\t}",
"public function loadConfiguration()\n {\n \\Env::init();\n\n if (file_exists(SRC_ROOT . '/.env')) {\n $dotenv = new Dotenv(SRC_ROOT);\n $dotenv->load();\n $dotenv->required([\n 'DB_NAME',\n 'DB_USER',\n 'DB_PASSWORD',\n 'DB_HOST'\n ]);\n }\n\n define('APP_ENV', env('APP_ENV') ?: self::ENV_LIVE);\n\n if (!in_array(APP_ENV, $this->getAllowedEnvironments(), true)) {\n die('Invalid environment');\n }\n\n $configFileName = SRC_ROOT . '/config/env/' . APP_ENV . '.php';\n\n if (file_exists($configFileName)) {\n require $configFileName;\n }\n }",
"public static function config();",
"private function AddTemplate(string $name){\n\t\t$tfn=\\Config\\local_templates. mb_strtolower($name).'.php';\n\t\tif(!\\file_exists($tfn))\n\t\t\tthrow new \\Exception(\"Unable to locate template $name ($tfn)\");\n\t\trequire($tfn);\n\t}",
"private function LoadConfigFile(){\n $a = file_get_contents($this->RootDIR . 'config/main.json');\n $this->Config = json_decode($a, true);\n }",
"private function loadConfig()\n {\n $files = scandir($this->configPath());\n $configs = [];\n\n foreach ($files as $file) {\n $filePath = $this->configPath() . DIRECTORY_SEPARATOR . $file;\n\n if (is_file($filePath)) {\n $config = [basename($file, '.php') => include $filePath];\n if (is_array($config)) {\n $configs = array_merge($configs, $config);\n }\n }\n }\n\n $this->config = $configs;\n }",
"public function loadConfig($filename)\n {\n return $this->getConfig()->loadConfig($filename);\n }",
"public function loadConfig($data);",
"protected function lowlevelConfigFix($name)\n {\n $distname = realpath(__DIR__ . '/../../app/config/' . $name . '.yml.dist');\n $ymlname = $this->config->getPath('config') . '/' . $name . '.yml';\n\n if (file_exists($ymlname) && !is_readable($ymlname)) {\n $error = sprintf(\n \"Couldn't read <code>%s</code>-file inside <code>%s</code>. Make sure the file exists and is readable to the user that the web server is using.\",\n htmlspecialchars($name . '.yml', ENT_QUOTES),\n htmlspecialchars($this->config->getPath('config'), ENT_QUOTES)\n );\n throw new BootException($error);\n }\n\n if (!file_exists($ymlname)) {\n // Try and copy from the .dist config file\n try {\n copy($distname, $ymlname);\n } catch (\\Exception $e) {\n $message = sprintf(\n \"Couldn't create a new <code>%s</code>-file inside <code>%s</code>. Create the file manually by copying\n <code>%s</code>, and optionally make it writable to the user that the web server is using.\",\n htmlspecialchars($name . '.yml', ENT_QUOTES),\n htmlspecialchars($this->config->getPath('config'), ENT_QUOTES),\n htmlspecialchars($name . '.yml.dist', ENT_QUOTES)\n );\n\n throw new BootException($message);\n }\n }\n }",
"public static function load()\n {\n if(!self::$loaded)\n {\n $GLOBALS['_EZMVC_SYS_CONFIG'] = require __DIR__ . '/system.config.php'; //Load config file\n $GLOBALS['_EZMVC_SYS_CONFIG'] = is_array($GLOBALS['_EZMVC_SYS_CONFIG']) ? $GLOBALS['_EZMVC_SYS_CONFIG'] : []; //Make sure its an array\n\n $GLOBALS['_EZMVC_APP_CONFIG'] = require dirname(__DIR__) . '/app/config/app.config.php';\n $GLOBALS['_EZMVC_APP_CONFIG'] = is_array($GLOBALS['_EZMVC_APP_CONFIG']) ? $GLOBALS['_EZMVC_APP_CONFIG'] : [];\n }\n }",
"protected function resolve($name)\n {\n $config = Arr::get($this->container['config']['cache'], 'stores');\n $config = $config[$name];\n\n if (is_null($config)) {\n throw new InvalidArgumentException(\"Cache store [{$name}] is not defined.\");\n }\n\n if (isset($this->customCreators[$config['driver']])) {\n return $this->callCustomCreator($config);\n } else {\n $driverMethod = 'create'.ucfirst($config['driver']).'Driver';\n\n if (method_exists($this, $driverMethod)) {\n return $this->{$driverMethod}($config);\n } else {\n throw new InvalidArgumentException(\"Driver [{$config['driver']}] is not supported.\");\n }\n }\n }",
"public static function get($name)\n {\n self::loadConfiguration();\n\n return self::$configuration[$name] ?? null;\n }",
"protected function resolve($name)\n {\n $config = $this->getConfig($name);\n\n return $this->getConnector($config['driver'])->connect($config);\n }",
"function load_config($path) {\n \n // Check path\n if(file_exists($path) == false) {\n throw new Exception(\"Unable to load configuration -- file not found: $path\");\n }\n \n // Check file\n if(is_file($path) == false) {\n throw new Exception(\"Unable to load configuration -- not a file: $path\");\n }\n \n // Check permissions\n if(is_readable($path) == false) {\n throw new Exception(\"Unable to load configuration -- access denied: $path\");\n }\n \n // Check size \n if(filesize($path) == 0) {\n throw new Exception(\"Unable to load configuration -- file is empty: $path\");\n }\n \n // Load parser\n require_once(YAML_PARSER);\n \n // Load config\n $config = Spyc::YAMLLoad($path);\n \n // Check result - if empty, throw an exception\n if(sizeof($config) == 0) {\n throw new Exception(\"Unable to load configuration -- parse error: $path\");\n }\n \n // General application options\n if(isset($config['info']['name'])) { $this->set_name($config['info']['name']); }\n if(isset($config['info']['admin email'])) { $this->set_admin_email($config['info']['admin email']); }\n if(isset($config['info']['admin name'])) { $this->set_admin_name($config['info']['admin name']); }\n if(isset($config['info']['base url'])) { $this->set_base_url($config['info']['base url']); }\n if(isset($config['info']['base directory'])) { $this->set_base_dir($config['info']['base directory']); }\n \n // Database\n if(isset($config['database']['name'])) { \n \n // Initialize db object\n $this->db = new StanfordDatabase();\n \n // Credentials\n if(isset($config['database']['name'])) { $this->db->set_database($config['database']['name']); }\n if(isset($config['database']['username'])) { $this->db->set_username($config['database']['username']); }\n if(isset($config['database']['password'])) { $this->db->set_password($config['database']['password']); }\n \n // Encryption\n if(isset($config['database']['use encryption'])) { $this->db->use_encryption($config['database']['use encryption']); }\n else { $this->db->use_encryption(false); }\n\n }\n \n // Use mysql sessions set to true\n if(isset($config['database']['use mysql sessions']) && $config['database']['use mysql sessions'] == true ) {\n \n // Check DB\n if($this->db instanceof StanfordDatabase) {\n \n // Enable MySQL sessions\n $this->db->setup_mysql_sessions();\n \n }\n else {\n \n // DB not configured\n throw new Exception(\"Cannot enable MySQL-based sessions -- database credentials not provided\"); \n \n }\n }\n \n // Logging\n if(isset($config['settings']['logging mode'])) {\n $this->util->set_error_reporting($config['settings']['logging mode']);\n }\n \n // Undo magic quotes\n if(isset($config['settings']['undo magic quotes']) && $config['settings']['undo magic quotes'] == true) {\n $this->util->undo_magic_quotes();\n }\n }",
"protected function initConfig()\n {\n $this->di->setShared('config', function () {\n $path = BASE_DIR . 'app/config/';\n\n if (!is_readable($path . 'config.php')) {\n throw new RuntimeException(\n 'Unable to read config from ' . $path . 'config.php'\n );\n }\n\n $config = include $path . 'config.php';\n\n if (is_array($config)) {\n $config = new Config($config);\n }\n\n if (!$config instanceof Config) {\n $type = gettype($config);\n if ($type == 'boolean') {\n $type .= ($type ? ' (true)' : ' (false)');\n } elseif (is_object($type)) {\n $type = get_class($type);\n }\n\n throw new RuntimeException(\n sprintf(\n 'Unable to read config file. Config must be either an array or Phalcon\\Config instance. Got %s',\n $type\n )\n );\n }\n\n if (is_readable($path . APPLICATION_ENV . '.php')) {\n $override = include_once $path . APPLICATION_ENV . '.php';\n\n if (is_array($override)) {\n $override = new Config($override);\n }\n\n if ($override instanceof Config) {\n $config->merge($override);\n }\n }\n\n return $config;\n });\n }",
"public function __invoke()\n {\n return new ConfigProvider(__DIR__ . '/../config/{{,*.}global,{,*.}local}.php');\n }",
"public function includeTemplate($name)\n {\n $path = $this->config->getTemplate($name);\n $this->includeFile($path);\n }",
"protected function build($name)\n {\n $stub = $this->files->get($this->getStub());\n\n return $this->replaceNamespace($stub, $name)->replaceClass($stub, $name);\n }",
"function load( $filename = NULL )\n\t{\n\t\tif ( is_file( $filename ) ) {\n\n\t\t} else {\n\t\t\tthrow new FileNotFound( 'config file not exist!' );\n\t\t}\n\t}",
"public function get(String $name=\"\"){\n\t\tif(isset($this->config[$name])){\n\t\t\treturn $this->config[$name];\n\t\t}\n\t\t\n\t\t// We need to split anyway if successful and sizeof is cheaper than a string search\n\t\t$split = explode(\"\\\\\",$name);\n\t\tif(sizeof($split) > 1){\n\t\t\tif(isset($this->config[$split[0]]) && isset($this->config[$split[0]][$split[1]])){\n\t\t\t\treturn $this->config[$split[0]][$split[1]];\n\t\t\t}\n\t\t}\n\t\t\n\t\tthrow new \\Exception($name.\" could not be found in config.json\");\n\t}",
"static function _getConfigFilePath($configName)\n {\n return dirname(__FILE__).\"/Configs/$configName.json\";\n }",
"protected static function _initConfig($name, $config) {\n\t\t$defaults = ['priority' => true];\n\t\treturn parent::_initConfig($name, $config) + $defaults;\n\t}",
"public function __construct()\n {\n parent::__construct();\n $this->config = config($this->configName);\n }",
"public static function autoload($name)\n {\n if (strpos($name, '_') === false) {\n // getting controller\n require $name . '.php';\n } else {\n if (strpos($name, 'Model') !== false) {\n $file = explode('_', $name);\n require_once APPLICATION_PATH . '/Models/' . $file[count($file) -1] . '.php';\n } else {\n $path = explode('_', $name);\n $file = array_pop($path);\n $dir = implode('/', $path);\n\n if (self::searchDirectory($dir)) {\n require_once $file . '.php';\n } else {\n //echo \"WRONG!\";\n }\n }\n }\n }",
"abstract protected function defineConfiguration();",
"function _biurnal_conf_set_conf_cache($name, $conf) {\n ctools_include('object-cache');\n $cache = ctools_object_cache_set('biurnal_conf', $name, $conf);\n}"
] | [
"0.73198724",
"0.6875873",
"0.67111087",
"0.6687737",
"0.6520377",
"0.6500504",
"0.64161485",
"0.61418456",
"0.6017183",
"0.5939565",
"0.58987314",
"0.5886726",
"0.5829407",
"0.57970047",
"0.5752321",
"0.5696186",
"0.56818664",
"0.5616723",
"0.5564937",
"0.55626833",
"0.5537686",
"0.5507277",
"0.5495139",
"0.54943013",
"0.54888505",
"0.5479238",
"0.5417673",
"0.54003006",
"0.5391103",
"0.53774923",
"0.53760904",
"0.53721565",
"0.53177726",
"0.53120524",
"0.53004634",
"0.52877957",
"0.5265078",
"0.52525604",
"0.52479494",
"0.52219737",
"0.52163327",
"0.52074355",
"0.51594347",
"0.5153375",
"0.5140657",
"0.51338553",
"0.5130684",
"0.5116875",
"0.5112118",
"0.51103497",
"0.5106381",
"0.51035976",
"0.5095804",
"0.50941473",
"0.509276",
"0.5077274",
"0.5060329",
"0.5046923",
"0.5045937",
"0.5044866",
"0.5030763",
"0.5024064",
"0.50238466",
"0.5012557",
"0.5011692",
"0.50071675",
"0.49925974",
"0.49697536",
"0.49582928",
"0.49537364",
"0.49478436",
"0.49461588",
"0.49412623",
"0.49323484",
"0.49270663",
"0.49226004",
"0.4915331",
"0.49139488",
"0.4913168",
"0.49125987",
"0.49118218",
"0.4907417",
"0.49062246",
"0.49033952",
"0.4894478",
"0.48906496",
"0.48875704",
"0.48860317",
"0.4883896",
"0.48751044",
"0.48731717",
"0.48708266",
"0.48707256",
"0.48683792",
"0.48578253",
"0.48514766",
"0.4847939",
"0.48395565",
"0.48391545",
"0.483878"
] | 0.5158133 | 43 |
Generates a new configuration name based on the provided parameters | protected function generateConfigurationName(array $vclList = null, $prefix = 'load') {
if (!$vclList) {
$vclList = $this->getVclList();
}
$index = 1;
foreach ($vclList as $name => $status) {
if (strpos($name, $prefix) !== 0) {
continue;
}
$nameIndex = substr($name, strlen($prefix));
if (!is_numeric($nameIndex)) {
continue;
}
if ($nameIndex >= $index) {
$index = $nameIndex + 1;
}
}
return $prefix . $index;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function getConfigName();",
"function gen_name($arg, $in){\n $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n $name = '';\n for ($i = 0; $i < CONFIG_RANDOM_LENGTH; $i++) {\n $name .= $chars[mt_rand(0, 60)];\n }\n switch($arg){\n case 'random':\n return $name.'.'.$in;\n break;\n case 'custom_original':\n return $name.'_'.$in;\n break;\n }\n}",
"abstract public function generateConfiguration();",
"public function getConfigName();",
"abstract protected function generateName();",
"protected function generate_key($name)\n {\n return \"_avia_builder_template_\".str_replace(\" \", \"_\", strtolower($name));\n }",
"protected function getConfigFileName() {\n return $this->sourceName.\"-\".$this->_cnfName;\n }",
"private function generateConfig()\n {\n if ('' == $this->config->getName()) {\n throw new \\InvalidArgumentException('No module name given');\n }\n $target = sprintf(\n '%s/app/code/%s/%s/%s/etc/config.xml',\n $this->config->getPath(),\n $this->config->getCodePool(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'config.xml', $target, array(\n 'config' => $this->config,\n ));\n \n \n $target = sprintf(\n '%s/app/etc/modules/%s_%s.xml',\n $this->config->getPath(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'Module.xml', $target, array(\n 'config' => $this->config,\n )); \n }",
"private static function _get_config_key()\n\t{\n\t\t$_action_name = '';\n\t\t$_class_name = '';\n\t\t// controller\n\t\tif (\\Input::server(\"SCRIPT_NAME\") == \"/index.php\") {\n\t\t\t$_obj_uri = new \\Uri();\n\t\t\t$_segments = $_obj_uri->get_segments();\n\t\t\t$_action_name = strtolower(array_pop($_segments));\n\t\t\t$_class_name = strtolower(array_pop($_segments));\n\t\t\tif ( ! empty($_segments))\n\t\t\t{\n\t\t\t\tif ($_segments[0] === 'api')\n\t\t\t\t{\n\t\t\t\t\treturn 'api';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// tasks\n\t\telse\n\t\t{\n\t\t\t$_oil_param = \\Cli::option(2);\n\n\t\t\tif ( strpos($_oil_param,\":\") === false )\n\t\t\t{\n\t\t\t\t$_class_name = $_oil_param;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlist($_class_name,$_action_name) = explode(\":\",\\Cli::option(\"2\"));\n\t\t\t}\n\t\t\tif ( empty($_action_name) ) $_action_name = \"run\";\n\t\t}\n\t\treturn $_class_name.\".\".$_action_name;\n\t}",
"function createConfigPairsFromName($pre, $params, $index)\n{\n $post = \"_name\";\n $prel = strlen($pre);\n $postl = strlen($post);\n $res = array();\n foreach($index as $k => $v)\n {\n if(isset($params[$pre . $k . $post]))\n\t{\n\t $res[$k] = $params[$pre . $k . $post];\n\t}\n }\n return $res;\n}",
"public function getConfigurationName(){\n\t\tif( empty( $this->_configuration_name ) ){\n\t\t\t$this->_configuration_name = self::CONFIGURATION_DEFAULT;\n\t\t}\n\t\treturn $this->_configuration_name;\n\t}",
"function generatePlaceHolderName($name)\r\n\t{\r\n\t\treturn ':'.$name;\r\n\t}",
"public function makeCacheKey($configKey, $parts = []);",
"public function name(): string {\n return 'config';\n }",
"protected function buildUniqueResourceName(Smarty $smarty, $resource_name, $is_config = false)\n {\n return get_class($this) . '#' . $this->segment . '#' . $resource_name;\n }",
"protected function getConfigName()\n {\n return 'hashids';\n }",
"protected function generateIdByName(): string\n {\n return \"auto_id_\" . $this->name;\n }",
"private function getDynamicParameter($name)\n {\n switch ($name) {\n case 'kernel.root_dir': $value = ($this->targetDirs[3].'/app'); break;\n case 'kernel.logs_dir': $value = ($this->targetDirs[2].'/logs'); break;\n case 'kernel.bundles_metadata': $value = array(\n 'FrameworkBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\FrameworkBundle',\n ),\n 'SecurityBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\SecurityBundle',\n ),\n 'TwigBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\TwigBundle',\n ),\n 'MonologBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/monolog-bundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\MonologBundle',\n ),\n 'SwiftmailerBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/swiftmailer-bundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\SwiftmailerBundle',\n ),\n 'DoctrineBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/doctrine/doctrine-bundle'),\n 'namespace' => 'Doctrine\\\\Bundle\\\\DoctrineBundle',\n ),\n 'SensioFrameworkExtraBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/sensio/framework-extra-bundle'),\n 'namespace' => 'Sensio\\\\Bundle\\\\FrameworkExtraBundle',\n ),\n 'AppBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/src/AppBundle'),\n 'namespace' => 'AppBundle',\n ),\n 'A2lixTranslationFormBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/a2lix/translation-form-bundle/A2lix/TranslationFormBundle'),\n 'namespace' => 'A2lix\\\\TranslationFormBundle',\n ),\n 'BazingaJsTranslationBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/willdurand/js-translation-bundle'),\n 'namespace' => 'Bazinga\\\\Bundle\\\\JsTranslationBundle',\n ),\n 'AsseticBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/assetic-bundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\AsseticBundle',\n ),\n 'TroopersAsseticInjectorBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/troopers/assetic-injector-bundle/Troopers/AsseticInjectorBundle'),\n 'namespace' => 'Troopers\\\\AsseticInjectorBundle',\n ),\n 'TroopersAlertifyBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/troopers/alertify-bundle/Troopers/AlertifyBundle'),\n 'namespace' => 'Troopers\\\\AlertifyBundle',\n ),\n 'FOSUserBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle'),\n 'namespace' => 'FOS\\\\UserBundle',\n ),\n 'FOSJsRoutingBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/friendsofsymfony/jsrouting-bundle'),\n 'namespace' => 'FOS\\\\JsRoutingBundle',\n ),\n 'JMSSerializerBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/jms/serializer-bundle/JMS/SerializerBundle'),\n 'namespace' => 'JMS\\\\SerializerBundle',\n ),\n 'LiipImagineBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/liip/imagine-bundle'),\n 'namespace' => 'Liip\\\\ImagineBundle',\n ),\n 'KnpMenuBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/knplabs/knp-menu-bundle'),\n 'namespace' => 'Knp\\\\Bundle\\\\MenuBundle',\n ),\n 'DoctrineBehaviorsBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/knplabs/doctrine-behaviors/src/Bundle'),\n 'namespace' => 'Knp\\\\DoctrineBehaviors\\\\Bundle',\n ),\n 'SncRedisBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/snc/redis-bundle'),\n 'namespace' => 'Snc\\\\RedisBundle',\n ),\n 'StofDoctrineExtensionsBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/stof/doctrine-extensions-bundle'),\n 'namespace' => 'Stof\\\\DoctrineExtensionsBundle',\n ),\n 'VictoireAnalyticsBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/AnalyticsBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\AnalyticsBundle',\n ),\n 'VictoireBlogBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\BlogBundle',\n ),\n 'VictoireBusinessEntityBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\BusinessEntityBundle',\n ),\n 'VictoireBusinessPageBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\BusinessPageBundle',\n ),\n 'VictoireCoreBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\CoreBundle',\n ),\n 'VictoireCriteriaBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\CriteriaBundle',\n ),\n 'VictoireFilterBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FilterBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\FilterBundle',\n ),\n 'VictoireFormBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/FormBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\FormBundle',\n ),\n 'VictoireI18nBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\I18nBundle',\n ),\n 'VictoireMediaBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\MediaBundle',\n ),\n 'VictoirePageBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\PageBundle',\n ),\n 'VictoireQueryBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/QueryBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\QueryBundle',\n ),\n 'VictoireSeoBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\SeoBundle',\n ),\n 'VictoireSitemapBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SitemapBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\SitemapBundle',\n ),\n 'VictoireTemplateBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\TemplateBundle',\n ),\n 'VictoireTwigBundle' => array(\n 'parent' => 'TwigBundle',\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TwigBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\TwigBundle',\n ),\n 'VictoireUIBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UIBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\UIBundle',\n ),\n 'VictoireUserBundle' => array(\n 'parent' => 'FOSUserBundle',\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\UserBundle',\n ),\n 'ViewReferenceBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/ViewReferenceBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\ViewReferenceBundle',\n ),\n 'VictoireWidgetBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\WidgetBundle',\n ),\n 'VictoireWidgetMapBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetMapBundle'),\n 'namespace' => 'Victoire\\\\Bundle\\\\WidgetMapBundle',\n ),\n ); break;\n case 'session.save_path': $value = ($this->targetDirs[3].'/app/../var/sessions/prod'); break;\n case 'router.resource': $value = ($this->targetDirs[3].'/app/config/routing.yml'); break;\n case 'assetic.read_from': $value = ($this->targetDirs[3].'/app/../web'); break;\n case 'assetic.write_to': $value = ($this->targetDirs[3].'/app/../web'); break;\n case 'victoire_core.base_paths': $value = array(\n 0 => ($this->targetDirs[3].'/app/../src'),\n 1 => ($this->targetDirs[3].'/app/../vendor/victoire'),\n 2 => ($this->targetDirs[3].'/app/../vendor/friendsofvictoire'),\n ); break;\n default: throw new InvalidArgumentException(sprintf('The dynamic parameter \"%s\" must be defined.', $name));\n }\n $this->loadedDynamicParameters[$name] = true;\n\n return $this->dynamicParameters[$name] = $value;\n }",
"private function getDynamicParameter($name)\n {\n switch ($name) {\n case 'kernel.root_dir': $value = ($this->targetDirs[3].'/src'); break;\n case 'kernel.project_dir': $value = $this->targetDirs[3]; break;\n case 'kernel.cache_dir': $value = $this->targetDirs[0]; break;\n case 'kernel.logs_dir': $value = ($this->targetDirs[2].'/log'); break;\n case 'kernel.bundles_metadata': $value = array(\n 'FrameworkBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/framework-bundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\FrameworkBundle',\n ),\n 'DoctrineCacheBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/doctrine/doctrine-cache-bundle'),\n 'namespace' => 'Doctrine\\\\Bundle\\\\DoctrineCacheBundle',\n ),\n 'DoctrineBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/doctrine/doctrine-bundle'),\n 'namespace' => 'Doctrine\\\\Bundle\\\\DoctrineBundle',\n ),\n 'DoctrineMigrationsBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/doctrine/doctrine-migrations-bundle'),\n 'namespace' => 'Doctrine\\\\Bundle\\\\MigrationsBundle',\n ),\n 'MakerBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/maker-bundle/src'),\n 'namespace' => 'Symfony\\\\Bundle\\\\MakerBundle',\n ),\n 'SecurityBundle' => array(\n 'parent' => NULL,\n 'path' => ($this->targetDirs[3].'/vendor/symfony/security-bundle'),\n 'namespace' => 'Symfony\\\\Bundle\\\\SecurityBundle',\n ),\n ); break;\n case 'kernel.secret': $value = $this->getEnv('APP_SECRET'); break;\n case 'session.save_path': $value = ($this->targetDirs[0].'/sessions'); break;\n case 'validator.mapping.cache.file': $value = ($this->targetDirs[0].'/validation.php'); break;\n case 'translator.default_path': $value = ($this->targetDirs[3].'/translations'); break;\n case 'debug.container.dump': $value = ($this->targetDirs[0].'/srcDevDebugProjectContainer.xml'); break;\n case 'doctrine.orm.proxy_dir': $value = ($this->targetDirs[0].'/doctrine/orm/Proxies'); break;\n case 'doctrine_migrations.dir_name': $value = ($this->targetDirs[3].'/src/Migrations'); break;\n default: throw new InvalidArgumentException(sprintf('The dynamic parameter \"%s\" must be defined.', $name));\n }\n $this->loadedDynamicParameters[$name] = true;\n\n return $this->dynamicParameters[$name] = $value;\n }",
"public function configureKey($hash, $component, $type, $format)\n {\n return sprintf('%s_%s_%s_%s', $hash, $component, $type, $format);\n }",
"public function configureKey($hash, $component, $type, $format)\n {\n return sprintf('%s_%s_%s_%s', $hash, $component, $type, $format);\n }",
"function makename($base, $att, $num) {\r\n return sprintf(\"%s[%s_%d]\", $base, $att, $num);\r\n }",
"public function generateConfigCommand()\n {\n $this->outputLine('Making the following config settings:');\n foreach ($this->configSettings as $key => $value) {\n $this->h5pFramework->setOption($key, $value);\n $this->outputLine(\"<b>$key:</b> $value\");\n }\n }",
"public function generate($name, array $parameters = array(), $absolute = false);",
"public function getName() {\n\t\treturn \"Config\";\n\t}",
"protected function getConfigName()\n {\n return 'bitbucket';\n }",
"protected function generateConfiguration()\n {\n if (!in_array($this->format, array('yml', 'xml', 'php'))) {\n return;\n }\n\n $target = sprintf(\n '%s/Resources/config/routing/%s.%s',\n $this->bundle->getPath(),\n strtolower(str_replace('\\\\', '_', $this->entity)),\n $this->format\n );\n\n $this->renderFile('rest/config/routing.'.$this->format.'.twig', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n ));\n }",
"public function generate(string $name, array $parameters = [], bool $absolute = false): string;",
"private function getConfigName($name)\n {\n return substr($name, strlen(self::SERVICE_PREFIX));\n }",
"private function generateCacheName(): string\n\t{\n\t\t$get = implode('-', $_GET);\n\t\t$name = $this->_resizeMode . $this->_imagePath . $this->_oldWidth . $this->_oldHeight . $this->_newWidth . $this->_newHeight . $get;\n\t\treturn md5($name) . '.' . $this->_extension;\n\t}",
"protected function buildClass($name)\n {\n $stub = parent::buildClass($name);\n\n $stub = str_replace('uri-key', Str::snake($this->argument('name'), '-'), $stub);\n\n return str_replace('dashboard-name', ucwords(Str::snake($this->argument('name'), ' ')), $stub);\n }",
"public function genFilename()\n {\n $filename = $this->getAssetableType().$this->assetable_id.'_';\n $filename .= uniqid();\n if(!empty($this->getThumbnailType())) $filename .= '_'.$this->getThumbnailType();\n $filename .= '.'.$this->uploadedFile->extension;\n $this->filename = $filename;\n }",
"public function createConfig()\n\t{\n\t}",
"protected function getConfigName(): string\n {\n return 'influxdb';\n }",
"public function getConfigDependencyName();",
"public function generateFileName() {\n $this->filename = ($this->getName(TRUE, TRUE, TRUE, \".\").\".xml\");\n\n return $this->filename;\n }",
"public function generate() {\n return 'namespace ' . $this->namespace;\n }",
"public function get_configuration_name() {\n\t\treturn $this->configuration_name;\n\t}",
"private function generateConfig() {\n $config_json = array(\n 'version' => '1.0.0',\n 'name' => $this->gateway_name,\n 'description' => '',\n 'authors' => [],\n 'currencies' => ['USD'],\n 'signup_url' => 'https://google.com'\n );\n\n foreach($config_json as $key => $value) {\n if($key == 'authors' && isset($this->config['authors'])) {\n foreach($this->config[\"authors\"] as $config_author) {\n $config_entry = array(\n \"name\" => \"\",\n \"url\" => \"\"\n );\n \n if(isset($config_author['name'])) {\n $config_entry[\"name\"] = $config_author['name'];\n \n if(isset($config_author[\"url\"])) {\n $config_entry[\"url\"] = $config_author['url'];\n }\n $config_json[\"authors\"][] = $config_entry;\n }\n }\n }\n else {\n if(isset($this->config[$key])) {\n $config_json[$key] = $this->config[$key];\n }\n }\n }\n\n return json_encode($config_json);\n }",
"public function getName() {\n\t\treturn $this->config->get('name');\n\t}",
"public function name() : string\n {\n return config('app.name');\n }",
"protected function getConfigName()\n {\n return 'google';\n }",
"protected function buildClass($name)\n {\n $namespace = $this->getNamespace($name);\n $default_replace = str_replace(\"use $namespace\\Controller;\\n\", '', parent::buildClass($name));\n //return str_replace(\"Now_Entity\", \"Creator_\" . $this->argument(\"name\"), $default_replace);\n return str_replace(\"Now_Entity\", $this->argument(\"name\"), $default_replace);\n }",
"protected function buildActionKey()\n {\n $name = $this->qualifyClass($this->getNameInput());\n\n if ($key = $this->option('key')) {\n $slug = Str::slug($key, '-');\n\n return $slug;\n }\n\n $slug = Str::slug(Str::snake(class_basename($name), '-'));\n\n return $slug;\n }",
"private function auto_name(){\n\n // the name starts from the class name Tbutton1 etc\n // toString inherits method from Tcontrol\n // which inherits from Object\n \n $prefix=toString($this);\n // get current count\n $counter=count($this->names);\n // create name\n $name=$prefix.'_'.$counter;\n \n return $name;\n }",
"private function createCacheFileName($params) {\n $parts = pathinfo($this->imgPath);\n $fileExtension = $parts['extension'];\n $this->saveAs = is_null($params['save_as']) ? $fileExtension : $params['save_as'];\n $quality_ = is_null($params['quality']) ? null : \"_q{$params['quality']}\";\n $cropToFit_ = is_null($params['crop_to_fit']) ? null : \"_cf\";\n $dirName = preg_replace('/\\//', '-', dirname($params['src']));\n $cacheFileName = IMAGE_CACHE_PATH . \"-{$dirName}-{$parts['filename']}_{$params['width']}_{$params['height']}{$quality_}{$cropToFit_}.{$this->saveAs}\";\n $cacheFileName = preg_replace('/^a-zA-Z0-9\\.-_/', '', $cacheFileName);\n if($this->verbose) { $this->createVerbose(\"Cache file is: {$cacheFileName}\"); }\n return $cacheFileName;\n \n }",
"protected function getConfigName()\n {\n return 'github';\n }",
"protected function buildFileName()\n\t{\n\t\t$upscale = $this->upscale ? 'upscale' : 'noupscale';\n\t\treturn $this->namePrefix . '-' . $this->width . 'x' . $this->height . '-' . $upscale . '-' . $this->quality . '-' . $this->imageName;\n\t}",
"private function _createConfigs()\r\n {\r\n $languages = $this->context->language->getLanguages();\r\n\t\t\t\r\n foreach ($languages as $language){\r\n $title[$language['id_lang']] = 'Specials products';\r\n }\r\n $response = Configuration::updateValue('FIELD_SPECIALPLS_NBR', 6);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_TITLE', $title);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_VERTICAL', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_COLUMNITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MAXITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MEDIUMITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MINITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLL', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLLDELAY', 4000);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAUSEONHOVER', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAGINATION', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_NAVIGATION', 0);\r\n\r\n return $response;\r\n }",
"public function generateDBName($usingScenarios, $dbNameChecksumPart): string;",
"public function getName() \n { \n return $this->getType().\"_\".substr(md5(implode($this->getParameters())), 0, 20);\n }",
"public function create_folder_name(){\n // create folder name\n return $this->config['prefix'].$this->user['code'];\n }",
"public function createCacheName($joinPoint) {\n\t\treturn sprintf('%s-%s', $this->convertValue($joinPoint->getClassName()), $this->convertValue($joinPoint->getMethodName()));\n\t}",
"private function _createConfigs()\r\n {\r\n $languages = $this->context->language->getLanguages();\r\n\r\n foreach ($languages as $language){\r\n $title[$language['id_lang']] = '';\r\n }\r\n $response = Configuration::updateValue($this->name . '_TITLE', $title);\r\n $response &= Configuration::updateValue($this->name . '_MAXITEM', 5);\r\n $response &= Configuration::updateValue($this->name . '_MINITEM', 2);\r\n $response &= Configuration::updateValue($this->name . '_AUTOSCROLL', 0);\r\n $response &= Configuration::updateValue($this->name . '_AUTOSCROLLDELAY', 5000);\r\n $response &= Configuration::updateValue($this->name . '_PAUSEONHOVER', 0);\r\n $response &= Configuration::updateValue($this->name . '_PAGINATION', 0);\r\n $response &= Configuration::updateValue($this->name . '_NAVIGATION', 0);\r\n $response &= Configuration::updateValue($this->name . '_MANTITLE', 0);\r\n\r\n return $response;\r\n }",
"protected function buildClass($name)\n {\n $this->line(\"<info>Creating</info> \" . $this->getNameInput());\n\n $controllerNamespace = $this->getNamespace($name);\n\n $replace = [];\n\n if ($this->option('service')) {\n $replace = $this->buildServiceReplacements($replace);\n }\n\n if ($this->option('base')) {\n $replace = $this->buildBaseReplacements($replace);\n }\n\n if ($this->option('otp')) {\n $replace = $this->buildOtpReplacements($replace);\n }\n\n $replace[\"use {$controllerNamespace}\\Controller;\\n\"] = '';\n\n return str_replace(\n array_keys($replace), array_values($replace), parent::buildClass($name)\n );\n }",
"protected function getDefaultName($config)\n {\n if (empty($config['name'])) {\n $config['name'] = isset($config['property']) ? \n $config['property'] : '';\n }\n return $config['name'];\n }",
"function make_name($length){\n return substr(str_repeat(md5(rand()), ceil($length/32)), 0, $length);\n }",
"private function createName() : string\n {\n return md5(uniqid()). $this->file->getClientOriginalName(). '.'.$this->file->guessExtension();\n }",
"public static function createCacheKey($prefix, $params, $values) {\r\n\t\t\t$retVal = [ $prefix ];\r\n\t\t\tforeach ($params as $param) {\r\n\t\t\t\t$value = Url::Get($param, 'null', $values);\r\n\t\t\t\tif (is_array($value)) {\r\n\t\t\t\t\t$value = implode(',', $value);\r\n\t\t\t\t}\r\n\t\t\t\t$retVal[] = $value;\r\n\t\t\t}\r\n\t\t\treturn implode('_', $retVal);\r\n\t\t}",
"protected function configure() {\n $this->setName('lando');\n }",
"public function getName()\n {\n return $this->getConfig ( 'name' );\n }",
"private function generateParameterName(\\ReflectionParameter $parameter)\n {\n $name = $parameter->getName();\n if ($name === '...' && version_compare(PHP_VERSION, '5.6', 'lt')) {\n $name = 'x' . dechex(crc32($name));\n }\n\n return '$' . $name . $parameter->getPosition();\n }",
"public function getUniqueName()\n {\n \t// load the identifiers\n $identifier = $this->getIdentifier();\n $aspectClassName = get_class($this->getPointcut()->getAspect());\n $interceptWithMethod = $this->getPointcut()->interceptWithMethod();\n\t\t// return the concatenated unique name\n return \"$identifier::$aspectClassName::$interceptWithMethod\";\n }",
"public function writeConfig() {\n $mergedTemplate = $this->mergeTemplate();\n file_put_contents(\"{$this->settings['paths']['hostConfigDir']}/{$this->params['name']}.cfg\", $mergedTemplate);\n file_put_contents(\"{$this->settings['paths']['hostTrackDir']}/{$this->params['type']}.inf\", \"{$this->params['name']}:{$this->params['instanceId']}\" . PHP_EOL, FILE_APPEND);\n $this->logChange();\n }",
"protected function getNewProjectName() {\n\t\tdo {\n\t\t\t$t_name = $this->getName() . '_' . rand();\n\t\t\t$t_id = $this->client->mc_project_get_id_from_name( $this->userName, $this->password, $t_name );\n\t\t} while( $t_id != 0 );\n\t\treturn $t_name;\n\t}",
"protected function createPrefix(): string\n {\n return date('Y-m-d_h-i') . '-' . GeneralUtility::makeInstance(Random::class)->generateRandomHexString(16);\n }",
"public function generateFileName()\n {\n $d = new \\DateTime();\n\n return strtoupper($this->fileName).\"_\" . $d->format(\"Y-m-d\");\n }",
"function optionsframeproject_option_name() {\n\n\t// This gets the theme name from the stylesheet\n\t$themename = wp_get_theme();\n\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\n\t$optionsframeproject_settings = get_option( 'optionsframework' );\n\t$optionsframeproject_settings['id'] = $themename;\n\tupdate_option( 'optionsframework', $optionsframeproject_settings );\n}",
"private function setFixedNames() {\r\n $fixedClassName = (isset($this->defaults[\"prefix\"]) && !empty($this->defaults[\"prefix\"])) ? $this->defaults[\"prefix\"] . '/' : '';\r\n if(isset($this->params[\"controller\"])) {\r\n $explodeFold = explode(\"/\", $this->params[\"controller\"]);\r\n for($i = 0; $i < count($explodeFold); $i++) {\r\n $fixedClassName .= implode(\"\", array_map(\"ucfirst\", array_map(\"strtolower\", explode(\"-\", $explodeFold[$i]))));\r\n $fixedClassName .= $i == (count($explodeFold) - 1) ? '' : '/';\r\n }\r\n } else {\r\n $fixedClassName .= $this->defaults[\"controller\"];\r\n }\r\n $fixedMethodName = isset($this->params[\"action\"]) ? implode(\"\", array_map(\"ucfirst\", array_map(\"strtolower\", explode(\"-\", $this->params[\"action\"])))) : $this->defaults[\"action\"];\r\n\r\n\r\n $this->fixedNames = array(\r\n \"className\" => $fixedClassName,\r\n \"methodName\" => $fixedMethodName\r\n );\r\n //Merge with defaults\r\n $this->params = array_merge($this->defaults, $this->params);\r\n //Prefix is not a param. So remove it.\r\n unset($this->params[\"prefix\"]);\r\n }",
"public function getName()\n {\n return $this->getConfig('name');\n }",
"function config($name, $_) {\r\n $args = func_get_args();\r\n $data = include ROOT . 'config' . DIRECTORY_SEPARATOR . $name . '.php';\r\n array_shift($args);\r\n if (count($args)) {\r\n foreach ($args as $arg) {\r\n if (!array_key_exists($arg, $data)) break;\r\n $data = $data[$arg];\r\n }\r\n }\r\n return $data;\r\n}",
"protected function configure()\n {\n $this->setName('generate-currency-amount-map')\n ->setDescription('Generates a mapping of all the currencies and their respective amount minor units');\n }",
"public function set_appname()\n\t{\n\t\t$appname = (string) ee()->config->item('newrelic_app_name');\n\n\t\t// -------------------------------------------\n\t\t//\tHidden Configuration Variable\n\t\t//\t- newrelic_app_name => Change application name that appears in\n\t\t//\t the New Relic dashboard\n\t\t// -------------------------------------------*/\n\t\tif ( ! empty($appname))\n\t\t{\n\t\t\t$appname .= ' - ';\n\t\t}\n\n\t\t// -------------------------------------------\n\t\t//\tHidden Configuration Variable\n\t\t//\t- newrelic_include_version_number => Whether or not to include the version\n\t\t// number with the application name\n\t\t// -------------------------------------------*/\n\t\t$version = (ee()->config->item('newrelic_include_version_number') == 'y') ? ' v'.APP_VER : '';\n\n\t\tnewrelic_set_appname($appname.APP_NAME.$version);\n\t}",
"public function name($name = null)\n {\n $name = isset($this->config['name'])\n ? $this->config['name']\n : $name;\n\n return parent::name($name);\n }",
"protected function buildClass($name)\n {\n $rawName = $this->getNameInput();\n\n return str_replace(\n [\n 'DummyModel',\n 'dummyModel',\n 'DummyCategory',\n 'DummyPackage',\n 'DummyAuthor',\n 'DummyLicence',\n 'DummyLink',\n ],\n [\n $rawName,\n strtolower($rawName),\n config('handlerGenerator.category'),\n config('handlerGenerator.package'),\n config('handlerGenerator.author'),\n config('handlerGenerator.license'),\n config('handlerGenerator.link'),\n ],\n parent::buildClass($name)\n );\n }",
"protected function configure()\n {\n $this->setName('appconfig')\n ->setDescription('Create appserver.io Config')\n ->addArgument('application-name', InputOption::VALUE_REQUIRED, 'config application name')\n ->addArgument('namespace', InputOption::VALUE_REQUIRED, 'namespace for the project')\n ->addArgument('directory', InputOption::VALUE_REQUIRED, 'webapps root directory')\n ->addOption('routlt-version', 'rl', InputOption::VALUE_OPTIONAL, 'the routlt version to use', '~2.0');\n }",
"protected function buildClass($name)\n {\n $replace = [];\n\n if ($this->option('primary')) {\n $replace['DummyPrimaryKey'] = $this->option('primary');\n }\n\n $replace['DummySubject'] = $this->option('subject') ?: strtolower($name);\n\n $lastBlueprintNamespace = array_last(explode('/', $this->blueprintRelativeDirectory));\n $lastBlueprintNamespace = $lastBlueprintNamespace ?\n \"{$lastBlueprintNamespace}\\\\\" :\n '';\n\n list($hostBlueprintClass, $hostPrimaryKey) = $this->splitString(($this->option('host') ?: ''), ':', 2, '');\n $replace['DummyHostBlueprintClass'] = $hostBlueprintClass ? \"{$lastBlueprintNamespace}{$hostBlueprintClass}::class\" : '';\n $replace['DummyHostKeyField'] = $hostPrimaryKey;\n\n list($guestBlueprintClass, $guestPrimaryKey) = $this->splitString(($this->option('guest') ?: ''), ':', 2, '');\n $replace['DummyGuestBlueprintClass'] = $guestBlueprintClass ? \"{$lastBlueprintNamespace}{$guestBlueprintClass}::class\" : '';\n $replace['DummyGuestKeyField'] = $guestPrimaryKey;\n\n if ($hostBlueprintClass !== '' || $guestBlueprintClass !== '') {\n $replace['DummyBlueprintImport'] = PHP_EOL . 'use ' . $this->convertPathToNamespace($this->blueprintRelativeDirectory, $this->rootNamespace());\n } else {\n $replace['DummyBlueprintImport'] = '';\n }\n\n return str_replace(\n array_keys($replace), array_values($replace), parent::buildClass($name)\n );\n }",
"public function getName()\n {\n return 'invoiceconfig';\n }",
"private function setFileName(){\n if($this->customFileName !== ''){\n $prefix = $this->customFileName.'_';\n $this->finalFileName = uniqid($prefix).'.'.$this->fileExt;\n }else{\n $this->finalFileName = basename($this->fileName, \".\".$this->fileExt ).md5(microtime()).'.'.$this->fileExt;\n } \n }",
"public function getConfigKey()\n {\n // TODO: Implement getConfigKey() method.\n return \"miamiohsbehatensu\";\n }",
"protected function getConfigName()\n {\n return 'realtime';\n }",
"private function runConfig()\n {\n $configs = [\n [\n 'name' => 'sub_title',\n 'alias_name' => 'SubTitle',\n 'value' => 'SubTitle',\n ],\n [\n 'name' => 'title',\n 'alias_name' => 'Title',\n 'value' => 'Title',\n ],\n ];\n\n foreach ($configs as $config) {\n factory(Config::class)->create($config);\n }\n }",
"function optionsframework_option_name() {\n\t\t$themename = get_option( 'stylesheet' );\n\t\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\t\n\t\t$optionsframework_settings = get_option('optionsframework');\n\t\t$optionsframework_settings['id'] = $themename;\n\t\tupdate_option('optionsframework', $optionsframework_settings);\n\t}",
"public function generatorNameProvider()\n {\n return [[\"a string\"]];\n }",
"private function createConfigurationDefinition()\n {\n $id = $this->getServiceId('configuration');\n if (!$this->container->has($id)) {\n $definition = new Definition(self::CONFIGURATION);\n $definition\n ->setFactory([new Reference('ekyna_admin.pool_factory'), 'createConfiguration'])\n// ->setFactoryService('ekyna_admin.pool_factory')\n// ->setFactoryMethod('createConfiguration')\n ->setArguments([\n $this->prefix,\n $this->resourceName,\n $this->options['entity'],\n $this->buildTemplateList($this->options['templates']),\n $this->options['event'],\n $this->options['parent']\n ])\n ->addTag('ekyna_admin.configuration', [\n 'alias' => sprintf('%s_%s', $this->prefix, $this->resourceName)]\n )\n ;\n $this->container->setDefinition($id, $definition);\n }\n }",
"public function createRandName($old){\n\n $new = '';\n srand((double)microtime() * 1000000);\n $char_list = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $char_list .= \"abcdefghijklmnopqrstuvwxyz\";\n $char_list .= \"1234567890\";\n\n for ($i = 0; $i < 8; $i++) {\n\n $new .= substr($char_list, (rand() % (strlen($char_list))), 1);\n\n }\n\n $array = explode('.', $old);\n $ext = strtolower(end($array));\n\n $name = $new . '.' . $ext;\n\n return $new;\n\n }",
"private function getParameterName($serviceName, $configName)\n {\n return sprintf('%s.%s.%s', $this->getAlias(), $serviceName, $configName);\n }",
"public function inputName($key)\n {\n if (empty($this->config)) {\n return $key;\n }\n\n $prefix = $this->has('prefix', $this->config);\n\n if ($prefix === null) {\n return $key;\n }\n \n return $prefix.'['.$key.']';\n }",
"protected function getTaskConfigurationSlug()\n {\n return $this\n ->getTask()\n ->getTaskConfigurationSlug();\n }",
"protected function buildClass($name)\n {\n $key = $this->buildActionKey();\n\n return str_replace(\n [\n 'DummyKey',\n ],\n [\n $key,\n ],\n parent::buildClass($name)\n );\n }",
"public static function transferConfigName(string $project, string $transferConfig): string\n {\n return self::getPathTemplate('transferConfig')->render([\n 'project' => $project,\n 'transfer_config' => $transferConfig,\n ]);\n }",
"public function settingsIdentifier() {\n\n // build the settings string\n return implode('-', array(\n ($this->options['width']) ? $this->options['width'] : 0,\n ($this->options['height']) ? $this->options['height'] : 0,\n ($this->options['upscale']) ? $this->options['upscale'] : 0,\n ($this->options['crop']) ? $this->options['crop'] : 0,\n $this->options['blur'],\n $this->options['grayscale'],\n $this->options['quality']\n ));\n\n }",
"private function getConfigFileName($object)\n\t{\n\t\treturn $this->getConfigDir().get_class($object).'.php';\n\t}",
"protected function generateCacheKeyBase($name)\n {\n return str_replace(array('\\\\'), '', $name);\n }",
"private function buildControllerNameWithNamespace() : void\n\t{\n\t\t$this->controllerName = '\\\\' . $this->namespace . '\\\\Controllers\\\\' . $this->request->getControllerName() . '\\\\Controller';\n\t}",
"public function configure()\n {\n $this->setName('parameters:debug')\n ->setDescription('Displays currently defined parameters of the application')\n ;\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}",
"function app_name()\n {\n return config('app.name');\n }",
"function app_name()\n {\n return config('app.name');\n }",
"function app_name()\n {\n return config('app.name');\n }"
] | [
"0.651391",
"0.6360943",
"0.62005675",
"0.60765904",
"0.5994257",
"0.57764405",
"0.5776308",
"0.5770065",
"0.57074434",
"0.5675868",
"0.5660657",
"0.5639647",
"0.55484253",
"0.55220383",
"0.5513771",
"0.5478603",
"0.5433559",
"0.5408336",
"0.53948826",
"0.535456",
"0.535456",
"0.5348637",
"0.53215784",
"0.53188246",
"0.5315984",
"0.52932686",
"0.52756506",
"0.52493656",
"0.5233752",
"0.5232932",
"0.5224942",
"0.5222313",
"0.521292",
"0.5195703",
"0.5184785",
"0.5179919",
"0.5172137",
"0.5171105",
"0.5137464",
"0.51356435",
"0.513191",
"0.51276433",
"0.5114631",
"0.5108216",
"0.50999856",
"0.5086959",
"0.5085631",
"0.5083493",
"0.50806683",
"0.5047467",
"0.50419027",
"0.50390804",
"0.5033232",
"0.5017005",
"0.50140685",
"0.50123763",
"0.5008384",
"0.5008125",
"0.49942604",
"0.4991627",
"0.4989172",
"0.4974322",
"0.4955531",
"0.49528962",
"0.49375597",
"0.4934199",
"0.4924822",
"0.49236894",
"0.4922353",
"0.4920919",
"0.49166226",
"0.49147454",
"0.49116123",
"0.4899219",
"0.4889101",
"0.48812285",
"0.48787677",
"0.48767754",
"0.487198",
"0.48580888",
"0.48530984",
"0.48466572",
"0.4843464",
"0.48432207",
"0.48431563",
"0.48387522",
"0.4838376",
"0.48324123",
"0.48217118",
"0.48183405",
"0.48177677",
"0.4814199",
"0.48058742",
"0.4804792",
"0.47963455",
"0.47939226",
"0.47878838",
"0.47874492",
"0.47874492",
"0.47874492"
] | 0.54243916 | 17 |
Switches to the named configuration | public function useVcl($name) {
$this->execute('vcl.use ' . $name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function loadConfiguration($name);",
"abstract protected function defineConfiguration();",
"protected function configure()\n {\n $this\n ->setName('repo:switch')\n ->setAliases(['switch'])\n ->addOption('id', null, InputOption::VALUE_OPTIONAL, 'The ID of the repo to switch to')\n ->setDescription('Switch to a different repo context, you may optionally pass Repo Name');\n }",
"function getConfiguration() ;",
"function instance_allow_config()\r\n\t\t{\r\n\t\t\r\n\t\t}",
"abstract public function getConfigName();",
"protected function getConfiguration() {}",
"protected function _setConfig()\n {\n if ($this->_system) {\n $config = $this->_system . DIRECTORY_SEPARATOR . 'config.php';\n } else {\n $config = false;\n }\n\n // manually look for a --config argument that overrides the default\n $found = false;\n foreach ($this->_argv as $val) {\n if ($val == '--config') {\n // found the argument\n $found = true;\n // reset the default in preparation for the next argument\n $config = false;\n continue;\n }\n \n if ($found && substr($val, 0, 1) != '-') {\n $config = $val;\n break;\n }\n \n if (substr($val, 0, 9) == '--config=') {\n $found = true;\n $config = substr($val, 9);\n break;\n }\n }\n \n // if there was a --config but no param, that's a failure\n if ($found && ! $config) {\n echo \"Please specify a config file path after the --config option.\" . PHP_EOL;\n exit(1);\n }\n \n // was there a config file at all?\n if ($config) {\n $realpath = realpath($config);\n if ($realpath) {\n $this->_config = $realpath;\n $text = \"Using config file '$realpath'.\" . PHP_EOL;\n } else {\n echo \"Could not resolve real path to config file '$config'.\" . PHP_EOL;\n exit(1);\n }\n } else {\n $text = \"Not using a config file.\" . PHP_EOL;\n }\n \n if ($this->_verbose) {\n echo $text;\n }\n }",
"public function getConfiguration();",
"public function getConfiguration();",
"public function getConfiguration();",
"abstract public function configure();",
"function processConfiguration() ;",
"function onInit(&$man) {\r\n\t\t$config = $man->getConfig();\r\n\r\n\t\t// Override option\r\n\t\t$config['somegroup.someoption'] = true;\r\n\r\n\t\treturn true;\r\n\t}",
"function before_edit_configuration() { }",
"function config($name, $_) {\r\n $args = func_get_args();\r\n $data = include ROOT . 'config' . DIRECTORY_SEPARATOR . $name . '.php';\r\n array_shift($args);\r\n if (count($args)) {\r\n foreach ($args as $arg) {\r\n if (!array_key_exists($arg, $data)) break;\r\n $data = $data[$arg];\r\n }\r\n }\r\n return $data;\r\n}",
"public function testCustomConfiguration() {\n\t\t$old = Router::config();\n\t\t$config = ['classes' => [\n\t\t\t'route' => 'my\\custom\\Route',\n\t\t\t'configuration' => 'lithium\\net\\http\\Configuration'\n\t\t], 'unicode' => true];\n\n\t\tRouter::config($config);\n\t\t$this->assertEqual($config, Router::config());\n\n\t\tRouter::config($old);\n\t\t$this->assertEqual($old, Router::config());\n\t}",
"public function getServiceConfigByName($name);",
"public function loadConf($name) {\n\t\t$options = \\Config::get ( 'laravel-menu::settings' );\n\t\t$name = strtolower ( $name );\n\t\t\n\t\tif (isset ( $options [$name] ) && is_array ( $options [$name] )) {\n\t\t\treturn array_merge ( $options ['default'], $options [$name] );\n\t\t}\n\t\t\n\t\treturn $options ['default'];\n\t}",
"function sloodle_set_config($name, $value)\n {\n // If in debug mode, ensure the name is prefixed appropriately for Sloodle\n if (defined('SLOODLE_DEBUG') && SLOODLE_DEBUG) {\n if (substr_count($name, 'sloodle_') < 1) {\n exit (\"ERROR: sloodle_set_config(..) called with invalid value name \\\"$name\\\". Expected \\\"sloodle_\\\" prefix.\");\n }\n }\n // Use the standard Moodle config function, ignoring the 3rd parameter (\"plugin\", which defaults to NULL)\n return set_config(strtolower($name), $value);\n\t}",
"public function _on_configuring($config)\n {\n }",
"abstract protected function configure();",
"abstract protected function configure();",
"abstract protected function saveConfiguration($name, $value);",
"protected function configure()\n {\n $this\n ->setName('config:open')\n ->setDescription('Opens the config')\n ->configureGlobal();\n }",
"abstract protected function define_my_settings();",
"public function getConfiguration() {}",
"public function getConfiguration() {}",
"public function defaultConfig();",
"public function set()\n\t{\n\t\t$options = $this->arguments->getOpts();\n\n\t\tif (empty($options))\n\t\t{\n\t\t\tif ($this->output->isInteractive())\n\t\t\t{\n\t\t\t\t$options = array();\n\t\t\t\t$option = $this->output->getResponse('What do you want to configure [name|email|etc...] ?');\n\n\t\t\t\tif (is_string($option) && !empty($option))\n\t\t\t\t{\n\t\t\t\t\t$options[$option] = $this->output->getResponse(\"What do you want your {$option} to be?\");\n\t\t\t\t}\n\t\t\t\telse if (empty($option))\n\t\t\t\t{\n\t\t\t\t\t$this->output->error(\"Please specify what option you want to set.\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->output->error(\"The {$option} option is not currently supported.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->output = $this->output->getHelpOutput();\n\t\t\t\t$this->help();\n\t\t\t\t$this->output->render();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (Config::save($options))\n\t\t{\n\t\t\t$this->output->addLine('Saved new configuration!', 'success');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->output->error('Failed to save configuration');\n\t\t}\n\t}",
"public function setDefaultDriver($name)\n {\n $this->app['config']['option.default'] = $name;\n }",
"public function getConfigTarget();",
"public static function getConfiguration();",
"function toggle_preference( $pName, $pValue = NULL, $pPackageName = NULL ) {\n\tglobal $_REQUEST, $gBitSystem, $gBitSmarty;\n\n\tif( isset( $pValue ) && $pValue == \"on\" ) {\n\t\t$prefValue='y';\n\t} elseif( isset( $pValue ) && $pValue != \"n\" && strlen( $pValue ) == 1 ) {\n\t\t$prefValue=$pValue;\n\t} else {\n\t\t$prefValue='n';\n\t}\n\t$gBitSystem->storeConfig( $pName, $prefValue, $pPackageName );\n}",
"abstract protected function preConfigure();",
"public function set_config($name, $value) {\n $settingspluginname = 'assessmentsettings';\n $this->load_config();\n if ($value === null) {\n unset($this->config->$name);\n } else {\n $this->config->$name = $value;\n }\n set_config($name, $value, \"local_$settingspluginname\");\n }",
"abstract protected function _updateConfiguration();",
"public function loadConf($name) {\n\t\t\n\t\t$options = config('laravel-menu.settings');\n\t\t$name = strtolower($name);\n\t\t\n\t\tif( isset($options[$name]) && is_array($options[$name]) ) {\n\t\t\treturn array_merge($options['default'], $options[$name] );\n\t\t}\n\n\t\treturn $options['default'];\n\t}",
"abstract public function configure_method_settings();",
"protected function loadConfiguration($name)\n {\n // TODO: Implement loadConfiguration() method.\n }",
"public static function wrongConfigigurationProvider() {}",
"public function configureOptions();",
"abstract protected function switchOnBySuiteName($name);",
"protected function configure()\n {\n $this\n ->addDefaults()\n ->setName('maintenance')\n ->setDescription('Run maintenance on all Skylab projects')\n ->setHelp(<<<EOT\nThe <info>maintenance</info> command will run the maintenance commands of all skeletons on a project. Most notably, it\nwill create the apache config files and make sure the the databases are available.\n\n<info>php skylab.phar maintenance</info>\n\nEOT\n );\n }",
"public static function config();",
"function instance_allow_config() {\n return true;\n }",
"function getConfig($config)\n{ \n return config(\"system.$config\");\n}",
"private function runConfig()\n {\n $configs = [\n [\n 'name' => 'sub_title',\n 'alias_name' => 'SubTitle',\n 'value' => 'SubTitle',\n ],\n [\n 'name' => 'title',\n 'alias_name' => 'Title',\n 'value' => 'Title',\n ],\n ];\n\n foreach ($configs as $config) {\n factory(Config::class)->create($config);\n }\n }",
"protected function _config_mapper($param)\n { \n \tif($this->sh_Options){\n \t\t// post init customization variables.\n \t\t$this->sh_Options = array_merge((array)$this->sh_Options, (array)$param);\n \t} else {\n \t\t// constructor initialization with default values from config file.\n \t\t$this->sh_Options = $param;\n \t}\n }",
"function blogslog_switch_options() {\n $arr = array(\n 'on' => esc_html__( 'Enable', 'blogslog' ),\n 'off' => esc_html__( 'Disable', 'blogslog' )\n );\n return apply_filters( 'blogslog_switch_options', $arr );\n }",
"public function getConfig($name = '', $default = null);",
"private function configure()\n {\n if ($this->config->get('speed_analyzer.enabled') === null) {\n $this->config->save('speed_analyzer.enabled', true);\n $this->config->save('speed_analyzer.reports.log_sql_queries', true);\n }\n }",
"public function setConnection() {\n\t\t$con = Config::get('librarydirectory::database.default');\n\t\tif ( $con && $con !== 'default' ) {\n\t\t\t$config = Config::get('librarydirectory::database.connections.'.$con);\n\t\t} else {\n\t\t\t$con = Config::get('database.default');\n\t\t\t$config = Config::get('database.connections.'.$con);\n\t\t}\n\t\tConfig::set('database.connections.'.$con, $config);\n\t}",
"protected function getEditableConfigNames() {\n return ['d8_demo.weather_config'];\n }",
"protected function configure()\n {\n $this->addDatabaseConfig();\n $this->addVariantConfig();\n $this->addOption(\n 'override',\n null,\n InputOption::VALUE_NONE,\n 'Allow overriding an existing database'\n );\n $this->addOption(\n 'wait',\n 'w',\n InputOption::VALUE_NONE,\n 'Wait for the server to be ready'\n );\n $this->addOption(\n 'migrate',\n null,\n InputOption::VALUE_NONE,\n \"Do not fail if the database exists, but perform a\\nmigration, instead\"\n );\n }",
"public function config_choose()\n {\n // Find all categories\n $hooks = find_all_hooks('systems', 'config');\n $categories = array();\n foreach (array_keys($hooks) as $hook) {\n require_code('hooks/systems/config/' . filter_naughty_harsh($hook));\n $ob = object_factory('Hook_config_' . filter_naughty_harsh($hook));\n $option = $ob->get_details();\n if ((is_null($GLOBALS['CURRENT_SHARE_USER'])) || ($option['shared_hosting_restricted'] == 0)) {\n if (!is_null($ob->get_default())) {\n $category = $option['category'];\n if (!isset($categories[$category])) {\n $categories[$category] = 0;\n }\n $categories[$category]++;\n }\n }\n }\n\n // Show all categories\n $categories_tpl = new Tempcode();\n ksort($categories);\n foreach ($categories as $category => $option_count) {\n // Some are skipped\n if (get_forum_type() != 'cns') {\n if ($category == 'USERS') {\n continue;\n }\n if ($category == 'FORUMS') {\n continue;\n }\n }\n if (has_no_forum()) {\n if ($category == 'FORUMS') {\n continue;\n }\n }\n\n // Put together details...\n\n $url = build_url(array('page' => '_SELF', 'type' => 'category', 'id' => $category), '_SELF');\n\n $_category_name = do_lang('CONFIG_CATEGORY_' . $category, null, null, null, null, false);\n if (is_null($_category_name)) {\n attach_message(do_lang_tempcode('CAT_NOT_FOUND', escape_html($category), 'OPTION_CATEGORY'), 'warn');\n\n $category_name = make_string_tempcode($category);\n } else {\n $category_name = do_lang_tempcode('CONFIG_CATEGORY_' . $category);\n }\n\n $description = do_lang_tempcode('CONFIG_CATEGORY_DESCRIPTION__' . $category);\n\n $count = do_lang_tempcode('CATEGORY_SUBORDINATE_2', escape_html(integer_format($option_count)));\n\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '6ba2b09432d06e7502c71e7aac2d3527',\n 'COUNT' => $count,\n 'NAME' => $category_name,\n 'TITLE' => '',\n 'DESCRIPTION' => $description,\n 'URL' => $url,\n )));\n }\n\n $categories_tpl->attach(do_template('COMCODE_SUBTITLE', array(\n '_GUID' => '7fde99ae81367fb7405e94b6731a7d9x',\n 'TITLE' => do_lang('DEEPER_CONFIGURATION'),\n 'LEVEL' => '2',\n )));\n\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '6fde99ae81367fb7405e94b6731a7d9a',\n 'COUNT' => null,\n 'TITLE' => '',\n 'URL' => build_url(array('page' => '_SELF', 'type' => 'base'), '_SELF'),\n 'NAME' => do_lang_tempcode('BASE_CONFIGURATION'),\n 'DESCRIPTION' => do_lang_tempcode('DOC_BASE_CONFIGURATION'),\n )));\n\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '7fde99ae81367fb7405e94b6731a7d9a',\n 'COUNT' => null,\n 'TITLE' => '',\n 'URL' => build_url(array('page' => '_SELF', 'type' => 'xml_fields'), '_SELF'),\n 'NAME' => do_lang_tempcode('FIELD_FILTERS'),\n 'DESCRIPTION' => do_lang_tempcode('DOC_FIELD_FILTERS'),\n )));\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '8fde99ae81367fb7405e94b6731a7d9a',\n 'COUNT' => null,\n 'TITLE' => '',\n 'URL' => build_url(array('page' => '_SELF', 'type' => 'xml_breadcrumbs'), '_SELF'),\n 'NAME' => do_lang_tempcode('BREADCRUMB_OVERRIDES'),\n 'DESCRIPTION' => do_lang_tempcode('DOC_BREADCRUMB_OVERRIDES'),\n )));\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '9fde99ae81367fb7405e94b6731a7d9a',\n 'COUNT' => null,\n 'TITLE' => '',\n 'URL' => build_url(array('page' => '_SELF', 'type' => 'upgrader'), '_SELF'),\n 'NAME' => do_lang_tempcode('FU_UPGRADER_TITLE'),\n 'DESCRIPTION' => do_lang_tempcode('FU_UPGRADER_INTRO'),\n )));\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '0fde99ae81367fb7405e94b6731a7d9a',\n 'COUNT' => null,\n 'TITLE' => '',\n 'URL' => build_url(array('page' => '_SELF', 'type' => 'backend'), '_SELF'),\n 'NAME' => do_lang_tempcode('_FEEDS'),\n 'DESCRIPTION' => comcode_to_tempcode(do_lang('OPML_INDEX_DESCRIPTION')),\n )));\n $categories_tpl->attach(do_template('INDEX_SCREEN_FANCIER_ENTRY', array(\n '_GUID' => '1fde99ae81367fb7405e94b6731a7d9a',\n 'COUNT' => null,\n 'TITLE' => '',\n 'URL' => build_url(array('page' => '_SELF', 'type' => 'code_editor'), '_SELF'),\n 'NAME' => do_lang_tempcode('CODE_EDITOR'),\n 'DESCRIPTION' => do_lang_tempcode('DOC_CODE_EDITOR'),\n )));\n\n // Wrapper\n return do_template('INDEX_SCREEN_FANCIER_SCREEN', array(\n '_GUID' => 'c8fdb2b481625d58b0b228c897fda72f',\n 'TITLE' => $this->title,\n 'PRE' => paragraph(do_lang_tempcode('CHOOSE_A_CONFIG_CATEGORY')),\n 'CONTENT' => $categories_tpl,\n 'POST' => '',\n ));\n }",
"public function config_set()\n {\n require_code('input_filter_2');\n rescue_shortened_post_request();\n\n require_code('caches3');\n\n global $CONFIG_OPTIONS_CACHE;\n\n $category = get_param_string('id', 'MAIN');\n\n if (cms_srv('REQUEST_METHOD') != 'POST') {\n warn_exit(do_lang_tempcode('INTERNAL_ERROR'));\n }\n\n // Make sure we haven't locked ourselves out due to URL Scheme support\n if (\n (post_param_string('url_scheme', 'RAW') != 'RAW') &&\n (substr(cms_srv('SERVER_SOFTWARE'), 0, 6) == 'Apache') &&\n (\n (!file_exists(get_file_base() . '/.htaccess')) ||\n (stripos(file_get_contents(get_file_base() . '/.htaccess'), 'RewriteEngine on') === false) ||\n ((function_exists('apache_get_modules')) && (!in_array('mod_rewrite', apache_get_modules()))) ||\n (http_download_file(get_base_url() . '/pg/keymap', null, false, true) != '') && ($GLOBALS['HTTP_MESSAGE'] == '404')\n )\n ) {\n warn_exit(do_lang_tempcode('BEFORE_MOD_REWRITE'));\n }\n\n // Make sure we haven't just locked staff out\n if (addon_installed('staff')) {\n $new_site_name = substr(post_param_string('site_name', ''), 0, 200);\n if (($new_site_name != '') && (get_option('is_on_sync_staff') === '1')) {\n $admin_groups = array_merge($GLOBALS['FORUM_DRIVER']->get_super_admin_groups(), $GLOBALS['FORUM_DRIVER']->get_moderator_groups());\n $staff = $GLOBALS['FORUM_DRIVER']->member_group_query($admin_groups, 100);\n if (count($staff) < 100) {\n foreach ($staff as $row_staff) {\n $member = $GLOBALS['FORUM_DRIVER']->mrow_id($row_staff);\n if ($GLOBALS['FORUM_DRIVER']->is_staff($member)) {\n $sites = get_cms_cpf('sites');\n $sites = str_replace(', ' . get_site_name(), '', $sites);\n $sites = str_replace(',' . get_site_name(), '', $sites);\n $sites = str_replace(get_site_name() . ', ', '', $sites);\n $sites = str_replace(get_site_name() . ',', '', $sites);\n $sites = str_replace(get_site_name(), '', $sites);\n if ($sites != '') {\n $sites .= ', ';\n }\n $sites .= $new_site_name;\n $GLOBALS['FORUM_DRIVER']->set_custom_field($member, 'sites', $sites);\n }\n }\n }\n }\n }\n\n // Empty thumbnail cache if needed\n if (function_exists('imagetypes')) {\n if ((!is_null(post_param_string('thumb_width', null))) && (post_param_string('thumb_width') != get_option('thumb_width'))) {\n erase_thumb_cache();\n }\n }\n\n // Empty language cache if needed\n if ((!is_null(post_param_string('yeehaw', null))) && (post_param_string('yeehaw') != get_option('yeehaw'))) {\n erase_cached_language();\n }\n\n // Find all options in category\n $hooks = find_all_hooks('systems', 'config');\n $options = array();\n foreach (array_keys($hooks) as $hook) {\n require_code('hooks/systems/config/' . filter_naughty_harsh($hook));\n $ob = object_factory('Hook_config_' . filter_naughty_harsh($hook));\n $option = $ob->get_details();\n if ($category == $option['category']) {\n if ((is_null($GLOBALS['CURRENT_SHARE_USER'])) || ($option['shared_hosting_restricted'] == 0)) {\n if (!is_null($ob->get_default())) {\n $option['ob'] = $ob;\n $options[$hook] = $option;\n }\n }\n }\n }\n\n // Add in special ones\n if ($category == 'SITE') {\n $options['timezone'] = array('shared_hosting_restricted' => 0, 'type' => 'special');\n }\n\n // Go through all options on the page, saving\n foreach ($options as $name => $option) {\n // Save\n if ($option['type'] == 'float') {\n $_value = post_param_string($name, '');\n $value = ($_value == '') ? '' : float_unformat($_value);\n } elseif ($option['type'] == 'tick') {\n $value = strval(post_param_integer($name, 0));\n } elseif ($option['type'] == 'date') {\n $date_value = post_param_date($name);\n $value = is_null($date_value) ? '' : strval($date_value);\n } elseif ((($option['type'] == 'forum') || ($option['type'] == '?forum')) && (get_forum_type() == 'cns')) {\n $value = post_param_string($name);\n if (is_numeric($value)) {\n $value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forums', 'f_name', array('id' => post_param_integer($name)));\n }\n if (is_null($value)) {\n $value = '';\n }\n } elseif (($option['type'] == 'forum_grouping') && (get_forum_type() == 'cns')) {\n $value = post_param_string($name);\n if (is_numeric($value)) {\n $value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_forum_groupings', 'c_title', array('id' => post_param_integer($name)));\n }\n if (is_null($value)) {\n $value = '';\n }\n } elseif ((($option['type'] == 'usergroup') || ($option['type'] == 'usergroup_not_guest')) && (get_forum_type() == 'cns')) {\n $_value = $GLOBALS['FORUM_DB']->query_select_value_if_there('f_groups', 'g_name', array('id' => post_param_integer($name)));\n if (is_null($_value)) {\n $value = '';\n } else {\n $value = get_translated_text($_value);\n }\n } else {\n $value = post_param_string($name, '');\n }\n\n // Hard-coded special options\n if ($name == 'timezone') {\n set_value('timezone', $value);\n } else {\n // If the option was changed\n $old_value = get_option($name);\n if (($old_value != $value) || (!isset($CONFIG_OPTIONS_CACHE[$name]['c_set'])) || ($CONFIG_OPTIONS_CACHE[$name]['c_set'] == 0)) {\n set_option($name, $value);\n }\n }\n }\n\n // Clear some caching\n erase_comcode_page_cache();\n erase_block_cache();\n //persistent_cache_delete('OPTIONS'); Done by set_option / erase_persistent_cache\n erase_persistent_cache();\n erase_cached_templates(false, null, TEMPLATE_DECACHE_WITH_CONFIG);\n\n // Show it worked / Refresh\n $redirect = get_param_string('redirect', null);\n if ($redirect === null) {\n $url = build_url(array('page' => '_SELF', 'type' => 'browse'), '_SELF'); // , 'type' => 'category', 'id' => $category\n } else {\n $url = make_string_tempcode($redirect);\n }\n return redirect_screen($this->title, $url, do_lang_tempcode('SUCCESS'));\n }",
"public function cfg_setup()\n\t{\n\t\t$this->cfg = AppConfig::get()[\"app\"];\n\t\t$this->cfg[\"app_name\"] = $this->cfg[\"name\"];\n\n\t}",
"public function configure();",
"protected function defaultConfig()\n\t{\n\t\t$this->config=array(\n\t\t\t'code'=>'1',\n\t\t\t'scanning'=>\"\",\n\t\t\t'scanCodes'=>array()\n\t\t);\n\t}",
"public function load_config() {\n if (!isset($this->config)) {\n $name = $this->get_name();\n $this->config = get_config(\"local_$name\");\n }\n }",
"public function configure() {\r\n\t\r\n\t}",
"public function getConfigName();",
"public function specialization() {\n if ($this->config === null) {\n $this->config = new stdClass();\n }\n // Set always show_dedication config settings to avoid errors.\n if (!isset($this->config->show_dedication)) {\n $this->config->show_dedication = 0;\n }\n }",
"public function filterConfig($target);",
"private function configure(): void\n {\n if (!$this->app->configurationIsCached()) {\n $this->mergeConfigFrom(__DIR__ . '/../config/paket.php', 'paket');\n }\n }",
"public function config(array $opts);",
"protected function onConfigChange($name, $value)\n {\n }",
"function chevereto_config($config_key) {\n\tglobal $config;\n\treturn $config[$config_key];\n}",
"public function writeConfig() {\n $mergedTemplate = $this->mergeTemplate();\n file_put_contents(\"{$this->settings['paths']['hostConfigDir']}/{$this->params['name']}.cfg\", $mergedTemplate);\n file_put_contents(\"{$this->settings['paths']['hostTrackDir']}/{$this->params['type']}.inf\", \"{$this->params['name']}:{$this->params['instanceId']}\" . PHP_EOL, FILE_APPEND);\n $this->logChange();\n }",
"static function set_config() {\n\t\tif ( file_exists( self::childpath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::childpath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'wpgrade-config' . EXT;\n\t\t}\n\t}",
"function config($key){\n\t$app = \\Jolt\\Jolt::getInstance();\n\treturn $app->option($key);\n}",
"function config(string $name)\n {\n return app()->services()->config()->{$name};\n }",
"function load_config()\n\t{\n\t\t$sql = \"SELECT * FROM config\";\n\n\t\t$dbdata = $this->conn->prepare($sql);\n\t\t$dbdata->execute();\n\n\t\tforeach ($dbdata->fetchAll(PDO::FETCH_OBJ) as $conf) {\n\t\t\tif ($conf->value == 'true') {\n\t\t\t\t$conf->value = true;\n\t\t\t} elseif ($conf->value == 'false') {\n\t\t\t\t$conf->value = false;\n\t\t\t}\n\n\t\t\t$this->config->set($conf->param, $conf->value);\n\t\t}\n\t}",
"public function setDefaultDriver($name)\n {\n $this->configurations['driver'] = $name;\n }",
"public function setConfiguration( $configuration_name ){\n\t\t$success = false;\n\t\tswitch( $configuration_name ){\n\t\t\tcase self::CONFIGURATION_CUSTOM :\n\t\t\tcase self::CONFIGURATION_BASIC_LTI :\n\t\t\tcase self::CONFIGURATION_PUBLICATION :\n\t\t\tcase self::CONFIGURATION_COMMON_CARTRIDGE :\n\t\t\tcase self::CONFIGURATION_THIN_COMMON_CARTRIDGE :\n\t\t\tcase self::CONFIGURATION_LTI_BASIC_OUTCOMES :\n\t\t\t\t$this->_configuration_name = $configuration_name;\n\t\t\t\t$success = true;\n\t\t}\n\t\treturn $success;\n\t}",
"function _set_config_param($name,$value)\r\n\t{\r\n\t\t$this->db->query(\"update m_config_params set value = ? where name = ? limit 1\",array($value,$name));\r\n\t}",
"function instance_allow_config() {\n\n return false;\n }",
"function setDefaultOverrideOptions() {\n\tglobal $fm_module_options;\n\t\n\t$config = null;\n\t$server_os_distro = isDebianSystem($_POST['server_os_distro']) ? 'debian' : strtolower($_POST['server_os_distro']);\n\t\n\tswitch ($server_os_distro) {\n\t\tcase 'debian':\n\t\t\t$config = array(\n\t\t\t\t\t\t\tarray('cfg_type' => 'global', 'server_serial_no' => $_POST['SERIALNO'], 'cfg_name' => 'pid-file', 'cfg_data' => '/var/run/named/named.pid')\n\t\t\t\t\t\t);\n\t}\n\t\n\tif (is_array($config)) {\n\t\tif (!isset($fm_module_options)) include(ABSPATH . 'fm-modules/' . $_SESSION['module'] . '/classes/class_options.php');\n\t\t\n\t\tforeach ($config as $config_data) {\n\t\t\t$fm_module_options->add($config_data);\n\t\t}\n\t}\n}",
"protected function configure()\n {\n $this->setName('state:list')\n ->setDescription('List states of a stated class')\n ->addArgument(\n 'path',\n InputOption::VALUE_REQUIRED,\n 'Path of the stated class'\n );\n }",
"abstract public function postConfigure();",
"public function onConfig(array $config = []);",
"protected function config($name) {\n return $this->configFactory->get($name);\n }",
"public function testComAdobeGraniteCompatrouterImplSwitchMappingConfig()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.granite.compatrouter.impl.SwitchMappingConfig';\n\n $crawler = $client->request('POST', $path);\n }",
"public static function setup($name,$value = \"\") {\n if(!is_array($name)) {\n if($name == \"storage\") {\n self::$storage = $value;\n }\n\n self::$config[$name] = $value;\n } else {\n foreach($name as $n=>$value) {\n self::setup($n,$value);\n }\n }\n\n }",
"public function instance_allow_config() {\n return true;\n }",
"abstract public function getConfig();",
"public function processConfiguration() {}",
"protected function configure()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../../config/knet.php', 'knet'\n );\n }",
"protected function configure() {\n $this->setName('lando');\n }",
"public function config()\n {\n }",
"protected function configure()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/dashkit.php', 'dashkit'\n );\n }",
"private function mergeDefaultSettings(){\n\t\t//Get a copy of the default configuration.\n\t\t$defaultConfig = $this->getDefaultConfig();\n\t\t//Check for a 'general' section\n\t\tif(array_key_exists('general', $this->configuration)){\n\t\t\t//If it exists, compare the default keys to the loaded config for missing values\n\t\t\t$missingGeneral = array_diff_key($defaultConfig['general'], $this->configuration['general']);\n\t\t\t//Iterate through the missing values and attach them to the running configuration.\n\t\t\tif(count($missingGeneral) > 0){\n\t\t\t\tforeach($missingGeneral as $key=>$parameter){\n\t\t\t\t\t$this->configuration['general'][$key] = $parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//Section doesn't exist, so we need to set it to the defaults.\n\t\t\t$this->configuration['general'] = $defaultConfig['general'];\n\t\t}\n\t\t//Check for a 'options' section\n\t\tif(array_key_exists('options', $this->configuration)){\n\t\t\t//If it exists, compare the default keys to the loaded config for missing values\n\t\t\t$missingOptions = array_diff_key($defaultConfig['options'], $this->configuration['options']);\n\t\t\t//Iterate through the missing values and attach them to the running configuration.\n\t\t\tif(count($missionOptions) > 0){\n\t\t\t\tforeach($missingOptions as $key=>$parameter){\n\t\t\t\t\t$this->configuration['options'][$key] = $parameter;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t//Section doesn't exist, so we need to set it to the defaults.\n\t\t\t$this->configuration['options'] = $defaultConfig['options'];\n\t\t}\n\t}",
"protected function setConfigurations()\n {\n if ($files = $this->getFiles('config'))\n {\n foreach ($files as $key => $filename)\n {\n $this->config->set(basename($filename, '.php'), require path('config').DIRECTORY_SEPARATOR.($filename));\n }\n }\n }",
"public function configure() {\n\t\t}",
"private function getDefaultFromConfigFor($name) {\n list($module, $settingName) = explode('::', $name);\n return mconfig(\"$module.settings.$settingName.default\", '');\n }",
"public function instance_allow_config() {\n return false;\n }",
"public function testChangeConfig()\n\t{\n\t\t$configurator = new \\App\\ConfigFile('module', 'OSSMail');\n\t\t$configurator->set('product_name', 'YetiForce_Test');\n\t\t$configurator->set('default_host', ['ssl://imap.gmail.com', 'ssl://imap.YT_Test.com']);\n\t\t$configurator->create();\n\t\t$this->assertSame('YetiForce_Test', \\App\\Config::module('OSSMail', 'product_name'));\n\t\t$this->assertCount(0, array_diff(\\App\\Config::module('OSSMail', 'default_host'), ['ssl://imap.gmail.com', 'ssl://imap.YT_Test.com']));\n\t}",
"protected function getEditableConfigNames()\n {\n return ['config.view_bank'];\n }",
"public function set_config($name, $value) {\n $pluginname = $this->get_name();\n $this->load_config();\n if ($value === null) {\n unset($this->config->$name);\n } else {\n $this->config->$name = $value;\n }\n set_config($name, $value, \"local_$pluginname\");\n }",
"function my_config($index = '') \n\t{\t\n\t\tglobal $CI;\n\n\t\treturn $CI->my_config->item($index); \n\t}"
] | [
"0.5968062",
"0.5875431",
"0.58097655",
"0.5740011",
"0.56293976",
"0.56111985",
"0.55548614",
"0.55527353",
"0.55207914",
"0.55207914",
"0.55207914",
"0.55204713",
"0.55134296",
"0.55021745",
"0.5496422",
"0.5495768",
"0.54722154",
"0.5441757",
"0.5438678",
"0.5406841",
"0.5381865",
"0.53769743",
"0.53769743",
"0.53534585",
"0.5345826",
"0.5344647",
"0.53179735",
"0.531656",
"0.5301284",
"0.52955747",
"0.5272135",
"0.52634734",
"0.5260646",
"0.52535737",
"0.5249876",
"0.5227156",
"0.5190596",
"0.5188437",
"0.518492",
"0.5182723",
"0.5178584",
"0.5174522",
"0.51666176",
"0.51536155",
"0.51515627",
"0.51423645",
"0.51381755",
"0.5132793",
"0.5131996",
"0.512109",
"0.5119817",
"0.511938",
"0.5117542",
"0.5117415",
"0.5115522",
"0.5114842",
"0.51145273",
"0.5112467",
"0.51042247",
"0.51041055",
"0.50999236",
"0.50943285",
"0.50863624",
"0.50844145",
"0.50776726",
"0.5073548",
"0.50694484",
"0.5061264",
"0.5058246",
"0.50494355",
"0.50482094",
"0.504814",
"0.5046753",
"0.5044599",
"0.5044366",
"0.5043151",
"0.50313985",
"0.5017222",
"0.5009902",
"0.50069165",
"0.5006021",
"0.5004566",
"0.50030607",
"0.49958026",
"0.49950254",
"0.49889746",
"0.49842113",
"0.49810016",
"0.49790832",
"0.49788854",
"0.49761623",
"0.49742854",
"0.49741152",
"0.49683312",
"0.49675992",
"0.4965433",
"0.49572238",
"0.49514902",
"0.49469194",
"0.49446872",
"0.4943774"
] | 0.0 | -1 |
Loads and switches the current configuration from the provided file | public function loadAndUseVclFromFile($file, $name = null) {
$name = $this->loadVclFromFile($file, $name);
$this->useVcl($name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract function loadConfig($fileName);",
"public function loadConfig($file)\n {\n $options = [];\n try {\n $loader = new PhpConfig();\n $options = $loader->read($file);\n } catch (\\Exception $e) {\n Log::warning($e->getMessage());\n }\n\t\t$this->config('options', $options);\n\t}",
"public function load_config($file = '')\n {\n return $this->{$this->_driver}->load_config($file);\n }",
"public function loadConfig($file) {\n $config = array();\n if (file_exists(PATH_CONFIGS . $file))\n include(PATH_CONFIGS . $file);\n if (!empty($config)) {\n foreach ($config as $name => $array) {\n $this->configs[$name] = $array;\n }\n }\n }",
"public function load()\n {\n $ini = APP_DIR.'config/'.ENVIRONMENT.'.ini';\n\n if(!file_exists($ini))\n Clockwork::throwError('Could not load config ('.$ini.')');\n\n $this->data = parse_ini_file($ini, true);\n \n $this->setValues();\n }",
"public function load()\n\t{\n\t\tif (file_exists(self::$configPath))\n\t\t{\n\t\t\t$this->config = json_decode(file_get_contents(self::$configPath), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->config = array();\n\t\t}\n\t}",
"private function loadConfig()\n {\n\n $this->config = include(__DIR__ . '/../../config/config.php');\n\n }",
"abstract protected function loadConfig();",
"private function LoadConfigFile(){\n $a = file_get_contents($this->RootDIR . 'config/main.json');\n $this->Config = json_decode($a, true);\n }",
"function SM_config($file, $tryCache=true) {\n\n // configure\n $this->_smoConfigure();\n\n // load the config file\n $this->loadSite($file, $tryCache);\n \n }",
"public static function read_config_file($file)\n\t{\n\t\tif (!file_exists($file) || !is_readable($file))\n\t\t{\n\t\t\tdie('<p>The Salve configuration file could not be found or is inaccessible. Check your configuration.</p>');\n\t\t}\n\n\t\trequire($file);\n\t}",
"public function load_config() {\n if (!isset($this->config)) {\n $name = $this->get_name();\n $this->config = get_config(\"local_$name\");\n }\n }",
"static function loadConfig() {\n\t\t$config = self::file($_SERVER[\"DOCUMENT_ROOT\"] . \"/../config.json\");\n\t\tif (!is_null($config))\n\t\t\tself::$config = json_decode($config);\n\t}",
"function read_config($file = false)\n{\n global $config, $databases;\n $ret = false;\n if (!$file) {\n $file = $config['config_file'];\n }\n // protect from including external files\n $search = array(':', 'http', 'ftp', ' ');\n $replace = array('', '', '', '');\n $file = str_replace($search, $replace, $file);\n\n if (is_readable($config['paths']['config'] . $file . '.php')) {\n // to prevent modern server from caching the new configuration we need to evaluate it this way\n clearstatcache();\n $f = implode('', file($config['paths']['config'] . $file . '.php'));\n $f = str_replace('<?php', '', $f);\n $f = str_replace('?>', '', $f);\n eval($f);\n $config['config_file'] = $file;\n $_SESSION['config_file'] = $config['config_file'];\n $ret = true;\n }\n\n return $ret;\n}",
"function load($file = '', $use_sections = FALSE, $fail_gracefully = FALSE)\n {\n $file = ($file == '') ? 'config' : str_replace(EXT, '', $file);\n\n if (in_array($file, $this->is_loaded, TRUE))\n {\n return TRUE;\n }\n\n // {{{ Matchbox\n\n $ci = &get_instance();\n $module = $ci->matchbox->argument(3);\n\n if (!$filepath = $ci->matchbox->find('config/' . $file . EXT, $module)) {\n if ($fail_gracefully === true) {\n return false;\n }\n\n show_error('The configuration file ' . $file . EXT . ' does not exist.');\n }\n\n include($filepath);\n\n // }}}\n\n if ( ! isset($config) OR ! is_array($config))\n {\n if ($fail_gracefully === TRUE)\n {\n return FALSE;\n }\n show_error('Your '.$file.EXT.' file does not appear to contain a valid configuration array.');\n }\n\n if ($use_sections === TRUE)\n {\n if (isset($this->config[$file]))\n {\n $this->config[$file] = array_merge($this->config[$file], $config);\n }\n else\n {\n $this->config[$file] = $config;\n }\n }\n else\n {\n $this->config = array_merge($this->config, $config);\n }\n\n $this->is_loaded[] = $file;\n unset($config);\n\n log_message('debug', 'Config file loaded: config/'.$file.EXT);\n return TRUE;\n }",
"private function load()\n {\n if (!file_exists($this->file)) {\n throw new Exception('config file not found');\n }\n // read contents of wordpress config\n // we can not require the configuration because it requires a shit load of other files\n $this->config = file_get_contents($this->file);\n }",
"public static function config($_file) {\n\t\t// Generate hash code for config file\n\t\t$_hash='php.'.self::hashCode($_file);\n\t\t$_cached=Cache::cached($_hash);\n\t\tif ($_cached && filemtime($_file)<$_cached['time'])\n\t\t\t// Retrieve from cache\n\t\t\t$_save=gzinflate(Cache::fetch($_hash));\n\t\telse {\n\t\t\tif (!file_exists($_file)) {\n\t\t\t\t// .ini file not found\n\t\t\t\tself::$global['CONTEXT']=$_file;\n\t\t\t\ttrigger_error(self::TEXT_Config);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Map sections to framework methods\n\t\t\t$_map=array('global'=>'set','routes'=>'route','maps'=>'map');\n\t\t\t// Read the .ini file\n\t\t\tpreg_match_all(\n\t\t\t\t'/\\s*(?:\\[(.+?)\\]|(?:;.+?)*|(?:([^=]+)=(.+?)))(?:\\v|$)/s',\n\t\t\t\t\tfile_get_contents($_file),$_matches,PREG_SET_ORDER\n\t\t\t);\n\t\t\t$_cfg=array();\n\t\t\t$_ptr=&$_cfg;\n\t\t\tforeach ($_matches as $_match) {\n\t\t\t\tif ($_match[1]) {\n\t\t\t\t\t// Section header\n\t\t\t\t\tif (!isset($_map[$_match[1]])) {\n\t\t\t\t\t\t// Unknown section\n\t\t\t\t\t\tself::$global['CONTEXT']=$_section;\n\t\t\t\t\t\ttrigger_error(self::TEXT_Section);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$_ptr=&$_cfg[$_match[1]];\n\t\t\t\t}\n\t\t\t\telseif ($_match[2]) {\n\t\t\t\t\t$_csv=array_map(\n\t\t\t\t\t\tfunction($_val) {\n\t\t\t\t\t\t\t// Typecast if necessary\n\t\t\t\t\t\t\treturn is_numeric($_val) ||\n\t\t\t\t\t\t\t\tpreg_match('/^(TRUE|FALSE)\\b/i',$_val)?\n\t\t\t\t\t\t\t\t\teval('return '.$_val.';'):$_val;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tstr_getcsv($_match[3])\n\t\t\t\t\t);\n\t\t\t\t\t// Convert comma-separated values to array\n\t\t\t\t\t$_match[3]=count($_csv)>1?$_csv:$_csv[0];\n\t\t\t\t\tif (preg_match('/(.+?)\\[(.*?)\\]/',$_match[2],$_sub)) {\n\t\t\t\t\t\tif ($_sub[2])\n\t\t\t\t\t\t\t// Associative array\n\t\t\t\t\t\t\t$_ptr[$_sub[1]][$_sub[2]]=$_match[3];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t// Numeric-indexed array\n\t\t\t\t\t\t\t$_ptr[$_sub[1]][]=$_match[3];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t// Key-value pair\n\t\t\t\t\t\t$_ptr[$_match[2]]=$_match[3];\n\t\t\t\t}\n\t\t\t}\n\t\t\tob_start();\n\t\t\tforeach ($_cfg as $_section=>$_pair) {\n\t\t\t\t$_func=$_map[$_section];\n\t\t\t\tforeach ($_pair as $_key=>$_val)\n\t\t\t\t\t// Generate PHP snippet\n\t\t\t\t\techo 'F3::'.$_func.'('.\n\t\t\t\t\t\tvar_export($_key,TRUE).','.\n\t\t\t\t\t\t($_func=='set' || !is_array($_val)?\n\t\t\t\t\t\t\tvar_export($_val,TRUE):self::listArgs($_val)).\n\t\t\t\t\t');'.\"\\n\";\n\t\t\t}\n\t\t\t$_save=ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\t// Compress and save to cache\n\t\t\tCache::store($_hash,gzdeflate($_save));\n\t\t}\n\t\t// Execute cached PHP code\n\t\teval($_save);\n\t\tif (self::$global['ERROR'])\n\t\t\t// Remove from cache\n\t\t\tCache::remove($_hash);\n\t}",
"public function loadYamlConfig($filepath);",
"public static function loadConfig($configFile) {\n\t}",
"private function load_config_file($file) {\n\n\t\t$file = PATH_THIRD.'dm_eeck/config/'.$file;\n\n\t\tif(file_exists($file)) {\n\t\t\trequire($file);\n\t\t\tif(isset($editor_config)) {\n\t\t\t\treturn $editor_config;\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t}",
"private function load_config_file($file) {\n\n\t\t$file = PATH_THIRD.'dm_eeck/config/'.$file;\n\n\t\tif(file_exists($file)) {\n\t\t\trequire($file);\n\t\t\tif(isset($editor_config)) {\n\t\t\t\treturn $editor_config;\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t}",
"private function loadIni(){\n if(file_exists($this->fullPath.$this->iniFile)) {\n $arCfg = parse_ini_file($this->fullPath.$this->iniFile);\n $this->loadConfigs($arCfg);\n }\n }",
"public function load($file);",
"public function load($file);",
"public function load($file);",
"public function load($file = '', $useSections = false){\n\t\t$file = SpanArt::$CONF_PATH.\"{$file}.php\";\n\t\tif((!$this->isLoad($file)) && file_exists($file)){\n\t\t\trequire($file);\n\t\t\t//$this->file = $file;\n\t\t\tarray_push($this->file, $file);\n\t\t\tif($useSections){\n\t\t\t\t$this->config[$file] = array_merge($this->config[$file], $config);\n\t\t\t}else{\n\t\t\t\t$this->config = array_merge($this->config, $config);\n\t\t\t}\n\t\t}else{\n\t\t\t//ver de disparar un error o tirar u log..\n\t\t}\n\t}",
"public function readConfig() {\n if ( file_exists( $this->path . '/config/config.php' ) ) {\n require_once $this->path . '/config/config.php';\n }\n }",
"private function loadConfig()\n {\n $files = scandir($this->configPath());\n $configs = [];\n\n foreach ($files as $file) {\n $filePath = $this->configPath() . DIRECTORY_SEPARATOR . $file;\n\n if (is_file($filePath)) {\n $config = [basename($file, '.php') => include $filePath];\n if (is_array($config)) {\n $configs = array_merge($configs, $config);\n }\n }\n }\n\n $this->config = $configs;\n }",
"protected function _load_config()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $config_file = new Configuration_File(self::APP_CONFIG);\n $this->config = $config_file->load();\n } catch (File_Not_Found_Exception $e) {\n // Not fatal\n }\n\n $this->is_loaded = TRUE;\n }",
"function load_config() {\n\t\t$conf_file = @file_get_contents( LDAP_LOGIN_PATH.'data.dat' );\n\t\tif ($conf_file!==false)\n\t\t{\n\t\t\t$this->config = unserialize($conf_file);\n\t\t}\n\t}",
"static public function load($filename) {\n\t\t$filename .= '.php';\n\n\t\tif (!file_exists($filename)) {\n\t\t\tthrow new \\Exception('Configuration file not found: ' . $filename);\n\t\t}\n\n\t\tinclude $filename;\n\n\t\tif (!isset($config)) {\n\t\t\tthrow new \\Exception('No variable $config found in ' . $filename);\n\t\t}\n\n\t\tself::$values = $config;\n\t}",
"private static function loadConfig(string $file)\n {\n $ds = DIRECTORY_SEPARATOR;\n $basepath = __DIR__ . \"{$ds}configs\";\n $filePath = \"{$basepath}{$ds}{$file}.php\";\n\n if (!file_exists($filePath)) {\n throw new Exception(\"File {$file}.php not found\", 500);\n }\n\n return include $filePath;\n }",
"private function apiConfigFromFile(string $file = null)\r\n {\r\n $file = is_null($file) ? getenv(\"HOME\") . \"config.json\" : $file;\r\n if (empty($this->api_key) === false || empty($this->api_secret) === false) {\r\n return;\r\n }\r\n if (file_exists($file) === false) {\r\n echo \"Unable to load config from: \" . $file . PHP_EOL;\r\n echo \"API KEY or SECRET not found\" . PHP_EOL;\r\n return;\r\n }\r\n $contents = json_decode(file_get_contents($file), true);\r\n $this->api_key = isset($contents['api-key']) ? $contents['api-key'] : \"\";\r\n $this->api_secret = isset($contents['api-secret']) ? $contents['api-secret'] : \"\";\r\n }",
"public function __construct(string $fileName = \"config.cfg\")\n {\n if (empty($fileName)) {\n $this->fileName = defined(\"CONFIG\") ? CONFIG : $fileName;\n } else {\n if (file_exists($fileName)) {\n $this->fileName = $fileName;\n }\n }\n if (file_exists($this->fileName)) {\n $this->vars = parse_ini_file($this->fileName, true);\n }\n }",
"public function loadFromFile($file)\n {\n \n }",
"function load_configs($file, $is_global = true)\n{\n\n if (substr($file, -5) != '.json') {\n throw new Exception('Invalid config file found in configs folder.');\n }\n\n $fname = strtolower(substr(basename($file), 0, - (strlen('.json'))));\n\n $GLOBALS[\"__CONFIG__{$fname}__\"] = json_decode(file_get_contents($file), true);\n}",
"abstract protected function loadConfiguration($name);",
"function load_config($path) {\n \n // Check path\n if(file_exists($path) == false) {\n throw new Exception(\"Unable to load configuration -- file not found: $path\");\n }\n \n // Check file\n if(is_file($path) == false) {\n throw new Exception(\"Unable to load configuration -- not a file: $path\");\n }\n \n // Check permissions\n if(is_readable($path) == false) {\n throw new Exception(\"Unable to load configuration -- access denied: $path\");\n }\n \n // Check size \n if(filesize($path) == 0) {\n throw new Exception(\"Unable to load configuration -- file is empty: $path\");\n }\n \n // Load parser\n require_once(YAML_PARSER);\n \n // Load config\n $config = Spyc::YAMLLoad($path);\n \n // Check result - if empty, throw an exception\n if(sizeof($config) == 0) {\n throw new Exception(\"Unable to load configuration -- parse error: $path\");\n }\n \n // General application options\n if(isset($config['info']['name'])) { $this->set_name($config['info']['name']); }\n if(isset($config['info']['admin email'])) { $this->set_admin_email($config['info']['admin email']); }\n if(isset($config['info']['admin name'])) { $this->set_admin_name($config['info']['admin name']); }\n if(isset($config['info']['base url'])) { $this->set_base_url($config['info']['base url']); }\n if(isset($config['info']['base directory'])) { $this->set_base_dir($config['info']['base directory']); }\n \n // Database\n if(isset($config['database']['name'])) { \n \n // Initialize db object\n $this->db = new StanfordDatabase();\n \n // Credentials\n if(isset($config['database']['name'])) { $this->db->set_database($config['database']['name']); }\n if(isset($config['database']['username'])) { $this->db->set_username($config['database']['username']); }\n if(isset($config['database']['password'])) { $this->db->set_password($config['database']['password']); }\n \n // Encryption\n if(isset($config['database']['use encryption'])) { $this->db->use_encryption($config['database']['use encryption']); }\n else { $this->db->use_encryption(false); }\n\n }\n \n // Use mysql sessions set to true\n if(isset($config['database']['use mysql sessions']) && $config['database']['use mysql sessions'] == true ) {\n \n // Check DB\n if($this->db instanceof StanfordDatabase) {\n \n // Enable MySQL sessions\n $this->db->setup_mysql_sessions();\n \n }\n else {\n \n // DB not configured\n throw new Exception(\"Cannot enable MySQL-based sessions -- database credentials not provided\"); \n \n }\n }\n \n // Logging\n if(isset($config['settings']['logging mode'])) {\n $this->util->set_error_reporting($config['settings']['logging mode']);\n }\n \n // Undo magic quotes\n if(isset($config['settings']['undo magic quotes']) && $config['settings']['undo magic quotes'] == true) {\n $this->util->undo_magic_quotes();\n }\n }",
"private static function load_settings($settings_file) {\n self::$settings = spyc_load_file($settings_file);\n }",
"public static function load_settings_file($filename)\n {\n // Turn on output buffering to prevent accidental output.\n ob_start();\n include($filename);\n ob_get_clean();\n \n // We should now have an array $s with which to merge\n // the current settings.\n if (!empty($s)) {\n static::load_settings($s);\n }\n }",
"private function read_config() {\n\t\t$sections = parse_ini_file($this->config['conf'], true);\n\t\tforeach ($sections as $sectionk => $sectionv) {\n\t\t\tforeach ($sectionv as $key => $var)\n\t\t\t\t$this->config[$sectionk . '.' . $key] = $var;\n\t\t}\n\t}",
"function loadConfigFile ($fileName) {\n\t\tif (file_exists ($fileName)) {\n\t\t\tif (is_readable ($fileName)) {\n\t\t\t\t$configItems = array ();\n\t\t\t\tinclude ($fileName);\n\t\t\t\t$this->loadConfigArray ($configItems);\n\t\t\t} else {\n\t\t\t\treturn new Error ('CONFIG_FILE_NOT_READABLE', $fileName);\n\t\t\t}\n\t\t} else {\n\t\t\treturn new Error ('CONFIG_FILE_NOT_FOUND', $fileName);\n\t\t}\n\t}",
"private static function loadConfigurationFile()\n {\n if(self::$ConfigurationData == null)\n {\n $file_contents = file_get_contents(CONFIGURATION_FILE);\n $json_data = json_decode($file_contents, true);\n\n if(empty($json_data))\n {\n throw new Exception(\"Invalid JSON data in the configuration file\");\n }\n\n self::$ConfigurationData = $json_data;\n }\n }",
"public function loadConfig($filename)\n {\n return $this->getConfig()->loadConfig($filename);\n }",
"public static function load()\n {\n $files = glob(BASEDIR . '/config/*.php');\n foreach ($files as $file){\n $key = str_replace('.php', '', basename($file));\n static::$values[$key] = include $file;\n }\n }",
"private function load_config() {\n $this->config = new Config();\n }",
"public function loadConfig()\n {\n return parse_ini_file(\n DIR_ROOT . '/config.ini', False\n );\n }",
"public function readConfigFile(): void\n {\n $configPath = __DIR__ . '/../../.config';\n if (!file_exists($configPath)) {\n echo \"Could not find .config\\n\";\n die;\n }\n $lines = preg_split('/[\\r\\n]+/', file_get_contents($configPath));\n foreach ($lines as $line) {\n if (empty($line)) {\n continue;\n }\n if (substr($line, 0, 1) == '#') {\n continue;\n }\n $kv = preg_split(\"/=/\", $line);\n $key = $kv[0];\n $value = $kv[1];\n $this->data[$key] = $value;\n }\n }",
"public static function load()\n {\n if(!self::$loaded)\n {\n $GLOBALS['_EZMVC_SYS_CONFIG'] = require __DIR__ . '/system.config.php'; //Load config file\n $GLOBALS['_EZMVC_SYS_CONFIG'] = is_array($GLOBALS['_EZMVC_SYS_CONFIG']) ? $GLOBALS['_EZMVC_SYS_CONFIG'] : []; //Make sure its an array\n\n $GLOBALS['_EZMVC_APP_CONFIG'] = require dirname(__DIR__) . '/app/config/app.config.php';\n $GLOBALS['_EZMVC_APP_CONFIG'] = is_array($GLOBALS['_EZMVC_APP_CONFIG']) ? $GLOBALS['_EZMVC_APP_CONFIG'] : [];\n }\n }",
"private function load()\n {\n if ($this->sites) {\n return;\n }\n $data = Yaml::parse(file_get_contents($this->file));\n $this->sites = $data['sites'];\n }",
"function loadConf($id, $file=CONFERENCES)\n{\n\t$confs = getJSON($file);\n\t$index = searchIndex($confs, $id);\n\t$result = NULL;\n\t\n\tif($index >= 0){\n\t\t$result = $confs[$index];\n\t}\n\treturn $result;\n}",
"public function load_config() {\n if (!isset($this->config)) {\n $settingspluginname = 'assessmentsettings';\n $this->config = get_config(\"local_$settingspluginname\");\n }\n }",
"function parseConfig() {\n\n\t\t// Make sure our config file exists\n\t\tif(!file_exists(CONFIGPATH . $this->_options['configFile'])) {\n\t\t\tdie('Unable to find <b>'. CONFIGPATH . $this->_options['configFile'] .'</b> file, please check your application configuration');\n\t\t}\n\n\t\t// Switch the file extension\n\t\tswitch(PPI_Helper::getFileExtension($this->_options['configFile'])) {\n\t\t\tcase 'ini':\n\t\t\t\treturn new PPI_Config_Ini(parse_ini_file(CONFIGPATH . $this->_options['configFile'], true, INI_SCANNER_RAW), $this->_options['configBlock']);\n\n\t\t\tcase 'xml':\n\t\t\t\tdie('Trying to load a xml config file but no parser yet created.');\n\t\t\t\tbreak;\n\n\t\t\tcase 'php':\n\t\t\t\tdie('Trying to load a php config file but no parser yet created.');\n\t\t\t\tbreak;\n\n\t\t}\n\t}",
"private function _loadConfig($options) {\n\n $conf_file = NULL;\n if (isset($options ['config'])) {\n $conf_file = $options ['config'];\n } else if (isset($options ['c'])) {\n $conf_file = $options ['c'];\n }\n\n if ($conf_file !== NULL && !file_exists($conf_file)) {\n $this->log(\"file does not exists\", self::ERROR);\n exit;\n }\n\n if ($conf_file !== NULL && file_exists($conf_file)) {\n $this->_config = parse_ini_file($conf_file, true);\n return $this;\n }\n }",
"protected function _load_config()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $config_file = new Configuration_File(self::FILE_CONFIG);\n $rawdata = $config_file->load();\n } catch (File_Not_Found_Exception $e) {\n // Not fatal, set defaults below\n } catch (Engine_Exception $e) {\n throw new Engine_Exception($e->get_message(), CLEAROS_WARNING);\n }\n\n if (isset($rawdata['allow_shell']) && preg_match(\"/(true|1)/i\", $rawdata['allow_shell']))\n $this->config['allow_shell'] = TRUE;\n else\n $this->config['allow_shell'] = FALSE;\n\n if (isset($rawdata['theme_mode']) && !empty($rawdata['theme_mode']))\n $this->config['theme_mode'] = $rawdata['theme_mode'];\n else\n $this->config['theme_mode'] = 'normal';\n\n if (isset($rawdata['theme']) && !empty($rawdata['theme']))\n $this->config['theme'] = $rawdata['theme'];\n else\n $this->config['theme'] = 'default';\n\n $this->is_loaded = TRUE;\n }",
"protected function loadFile(string $filename)\n\t{\n\t\tif (!isset($this->configFileLoaded[$filename])) {\n\t\t\t/* config folder Stored locally already resolved. Done in __construct */\n\t\t\t$file = $this->configFolder . $filename . '.php';\n\n\t\t\tif (file_exists($file)) {\n\t\t\t\t$this->config[strtolower($filename)] = require $file;\n\t\t\t}\n\n\t\t\t$this->configFileLoaded[$filename] = true;\n\t\t}\n\t}",
"function loadSite($file, $tryCache=true, $replace=false) {\n\n // if we dont have a reader yet, make it\n if ($this->cfgReader == NULL) {\n global $SM_rootDir;\n $this->cfgReader = SM_loadConfigReader('SMCONFIG', $this, $SM_rootDir.SM_SMCONFIG_READER_FILE);\n }\n\n // set replace\n $this->cfgReader->addDirective('replace',$replace);\n $tryCache = $tryCache && $this->cfgReader->useCache(); \n\n if ($tryCache) {\n\n // XXX this may not return the correct results if you have two different config objects that load the \n // same base file, and then the same consecutive file where one objects uses replace and one doesn't\n // we never do that so i'm ignoreing that case\n $this->fileLoadList .= $file;\n if (xcache_isset($this->fileLoadList)) {\n $this->debugLog(\"loading cached xsm file: {$this->fileLoadList}\");\n $this->sectionList = unserialize(xcache_get($this->fileLoadList));\n if ($this->sectionList)\n return;\n // if we get here, we couldn't unserialize, so fall through\n }\n\n }\n\n // fall through. either caching is off, cache didn't exist, or cache was stale\n // read in config, setting my properties at the same time\n $this->cfgReader->readConfigXML($file);\n \n // should we cache the config file?\n if ($tryCache) {\n xcache_set($this->fileLoadList, serialize($this->sectionList), $this->cfgReader->directive['cacheTTL']);\n }\n\n }",
"function loadConfig(){\n $file = file_get_contents($this->config_dir, FILE_USE_INCLUDE_PATH);\n $urls = json_decode($file,TRUE);\n //not the best way but error handling\n if ($file == NULL || $urls == NUll ){\n print(\"Error reading the config file or it it is empty\");\n }\n else{\n $this->config_data = $urls;\n\n }\n }",
"function loadConfig( $file, $options = array( 'mode' => 'w' ) )\n\t{\n\t\t//\tolder version accpeted only a string as mode parameter\n\t\tif( !is_array( $options ) )\n\t\t\t$options\t=\tarray(\n\t\t\t\t\t\t\t\t'mode'\t=>\t$mode\n\t\t\t\t\t\t\t);\n\n\t\t//\tdo not append => clear old config\n\t\tif( $options['mode'] == 'w' )\n\t\t\t$this->conf\t\t\t=\tarray();\n\n\t\t//\tno filetype given, extract from filename\n\t\tif( isset( $options['filetype'] ) && !empty( $options['filetype'] ) )\n\t\t\t$filetype\t=\t$options['filetype'];\n\t\telse\n\t\t\t$filetype\t=\t$this->_getFiletype( $file );\n\n\t\t$path\t\t\t=\t$this->getFullPath( $file );\n\n\t\tif( patErrorManager::isError( $path ) )\n\t\t\treturn\t$path;\n\n\t\t$reader\t\t=\t&$this->_getDriver( $filetype, 'Reader' );\n\n\t\tif( patErrorManager::isError( $reader ) )\n\t\t\treturn\t$reader;\n\n\t\t$result\t\t=\t$reader->loadConfigFile( $path, $options );\n\n\t\tif( !is_array( $result ) )\n\t\t\treturn\t$result;\n\n\t\tif( empty( $this->conf ) )\n\t\t\t$this->conf\t=\t$result['config'];\n\t\telse\n\t\t\t$this->conf\t=\tarray_merge( $this->conf, $result['config'] );\n\n\t\treturn\ttrue;\n\t}",
"protected function loadConfig($file)\n {\n if (!(file_exists($file) && is_readable($file))) {\n throw new Exception(sprintf(\"File %s not exist or not readable!\", self::CONFIG_FILE_NAME));\n }\n\n $config = json_decode(file_get_contents($file), true);\n\n if (!is_array($config)\n || !array_key_exists(static::GENERAL_CONFIG_KEY, $config)\n || (!array_key_exists(static::PHP_CONTAINERS_CONFIG_KEY, $config)\n || !is_array($config[static::PHP_CONTAINERS_CONFIG_KEY]))\n ) {\n throw new Exception(sprintf(\"Invalid configuration in %s!\", $file));\n }\n\n $this->config = $config;\n\n return $this;\n }",
"function load( $filename = NULL )\n\t{\n\t\tif ( is_file( $filename ) ) {\n\n\t\t} else {\n\t\t\tthrow new FileNotFound( 'config file not exist!' );\n\t\t}\n\t}",
"public static function load()\n {\n $entries = Configuration::get();\n \n foreach ($entries as $entry) {\n self::$config[$entry->id] = unserialize($entry->value);\n }\n }",
"function getConfig($file) {\n echo $config;\n $config = parse_ini_file($file, true);\n if (! $config) {\n fatal(\"Configuration file missing or incorrect.\"); \n }\n return $config;\n }",
"public function readConfig() {\n \t// Read the current configuration file\n \t$this->setConfig(parse_ini_file($this->getConfigFile(), true));\n \t// Return instance \n \treturn $this;\n }",
"function __loadConfig($plugin,$file) {\n // still support config values of v2.3 elements\n if (count(explode('.', $file)) > 0) {\n $file = str_replace('.', '_', $file);\n }\n \n // load config from app config folder\n if (Configure::load($file) === false) {\n // load config from plugin config folder\n if( $plugin ){\n\t if (Configure::load($plugin.'.'.$file) === false) {\n\t echo '<p>Error: The '.$file.'.php could not be found in your app/config or app/plugins/comment/config folder. Please create it from the default comment/config/default.php.</p>';\n\t }\n\t }else\n\t {\n\t if (Configure::load($file) === false) {\n\t echo '<p>Error: The '.$file.'.php could not be found in your app/config or app/plugins/comment/config folder. Please create it from the default comment/config/default.php.</p>';\n\t }\t \n\t }\n }\n }",
"protected function initConfig()\n {\n $this->di->setShared('config', function () {\n $path = BASE_DIR . 'app/config/';\n\n if (!is_readable($path . 'config.php')) {\n throw new RuntimeException(\n 'Unable to read config from ' . $path . 'config.php'\n );\n }\n\n $config = include $path . 'config.php';\n\n if (is_array($config)) {\n $config = new Config($config);\n }\n\n if (!$config instanceof Config) {\n $type = gettype($config);\n if ($type == 'boolean') {\n $type .= ($type ? ' (true)' : ' (false)');\n } elseif (is_object($type)) {\n $type = get_class($type);\n }\n\n throw new RuntimeException(\n sprintf(\n 'Unable to read config file. Config must be either an array or Phalcon\\Config instance. Got %s',\n $type\n )\n );\n }\n\n if (is_readable($path . APPLICATION_ENV . '.php')) {\n $override = include_once $path . APPLICATION_ENV . '.php';\n\n if (is_array($override)) {\n $override = new Config($override);\n }\n\n if ($override instanceof Config) {\n $config->merge($override);\n }\n }\n\n return $config;\n });\n }",
"private static function loadAppConfig() {\n\t\t\t$appConfJson = file_get_contents(JIAOYU_PROJECT_HOME.\"/app/conf/config.json\");\n\t\t\ttry {\n\t\t\t\t$appConf = JsonUtils::decode($appConfJson);\n\t\t\t} catch (JsonException $e) {\n\t\t\t\tthrow new ConfigurationException(\"Error initializing app config: \".$e->getMessage());\n\t\t\t}\n\n\t\t\t// OK - now we can load up the config array from the file\n\t\t\tforeach ($appConf as $configKey => $configValue) {\n\t\t\t\tself::$config[$configKey] = $configValue;\n\t\t\t}\n\t\t}",
"public function testConfigurationFromFile()\n {\n $path = __DIR__ . '/files/file1.config.php';\n\n $configuration = Factory::fromFile($path);\n\n $this->assertInstanceOf(Configuration::class, $configuration);\n $this->assertEquals(include $path, $configuration->getInternalContainer());\n }",
"function getConfig($file) {\n\t\t$config\t= parse_ini_file($file, true);\n\t\tif (! $config) {\n\t\t\t fatal(\"Configuration file missing or incorrect.\"); \n\t\t}\n\t return $config;\n\t}",
"private function loadConfig() {\n $config = array();\n\n $this->config = $config;\n if (file_exists(__DIR__ . '/../config.php')) {\n require_once(__DIR__. '/../config.php');\n $this->config = array_merge($this->config, $config);\n //TODO check for required config entries\n } else {\n //TODO handle this nicer\n $this->fatalErr('NO_CFG', 'Unable to load config file');\n }\n\n if (array_key_exists('THEME', $this->config)) {\n $this->pageLoader->setTheme($this->config['THEME']);\n }\n }",
"public function loadFile($file)\n\t{\n\t\t$file = str_replace('..', '', $file);\n\t\t$syspath = SYSPATH.'ee/EllisLab/ExpressionEngine/Config/'.$file.'.php';\n\t\t$userpath = SYSPATH.'user/config/'.$file.'.php';\n\n\t\t$out = array();\n\n\t\tif (file_exists($syspath))\n\t\t{\n\t\t\t$out = include $syspath;\n\t\t}\n\n\t\tif (file_exists($userpath))\n\t\t{\n\t\t\t$userout = include $userpath;\n\t\t\t$out = array_replace_recursive($out, $userout);\n\t\t}\n\n\t\treturn $out;\n\t}",
"protected function setConfigurations()\n {\n if ($files = $this->getFiles('config'))\n {\n foreach ($files as $key => $filename)\n {\n $this->config->set(basename($filename, '.php'), require path('config').DIRECTORY_SEPARATOR.($filename));\n }\n }\n }",
"public function loadConfiguration()\n {\n \\Env::init();\n\n if (file_exists(SRC_ROOT . '/.env')) {\n $dotenv = new Dotenv(SRC_ROOT);\n $dotenv->load();\n $dotenv->required([\n 'DB_NAME',\n 'DB_USER',\n 'DB_PASSWORD',\n 'DB_HOST'\n ]);\n }\n\n define('APP_ENV', env('APP_ENV') ?: self::ENV_LIVE);\n\n if (!in_array(APP_ENV, $this->getAllowedEnvironments(), true)) {\n die('Invalid environment');\n }\n\n $configFileName = SRC_ROOT . '/config/env/' . APP_ENV . '.php';\n\n if (file_exists($configFileName)) {\n require $configFileName;\n }\n }",
"protected function loadConfig() {\n $json = new JSON();\n $viewConfig = $json->readFile(__SITE_PATH . \"\\\\config\\\\view.json\");\n $this->meta_info = $viewConfig['meta'];\n $this->js_files = $viewConfig['javascript'];\n $this->css_files = $viewConfig['css'];\n }",
"public static function run ($file) {\n $instance = new self;\n $instance->template = file_get_contents($file);\n $instance->printConfiguration();\n }",
"public static function fileConfig($resource)\n {\n self::$config = new Config($resource, new ConfigLoader());\n self::$config->load();\n self::$config->configure();\n }",
"function getConfig($file) {\n $config = parse_ini_file($file, true);\n if (! $config) {\n echo \"Fatal: Configuration file missing or incorrect.\\n\";\n exit(1);\n }\n return $config;\n }",
"function config(string $file, string $path = '')\n {\n if($path == ''){\n if(defined('LARAPRESS_PATH')){\n $path = LARAPRESS_PATH . '/config/';\n }\n }\n\n if(!is_string($path))\n return;\n\n $configFile = $path . $file . '.php';\n if(file_exists($configFile)){\n $array = include($configFile);\n\n if(!is_array($array))\n return;\n\n return $array;\n }\n }",
"public function testConfigFromSingleFile()\n {\n $cfg = new Configuration();\n $cfg->setBaseDirectories($this->dirs);\n $config = $cfg->load(\"view\");\n\n $this->assertInternalType(\"array\", $config);\n $this->assertArrayHasKey(\"file\", $config);\n $this->assertArrayHasKey(\"config\", $config);\n $this->assertArrayNotHasKey(\"items\", $config);\n $this->assertContains(\"a view\", $config[\"config\"]);\n }",
"public static function load(array $arguments, string $file = self::DEFAULT_FILE_PATH)\n {\n // Generate default config instance.\n self::$config = new Config();\n self::setOption('php_version', phpversion());\n\n // If received file name is valid file, parses this file.\n if (is_file($file)) {\n Logger::getInstance()->info('Load: '.$file);\n $config_yaml = Yaml::parse(file_get_contents($file));\n if (is_iterable($config_yaml)) {\n foreach ($config_yaml as $key => $value) {\n // `format` can not be specified from the configuration file.\n if ($key === 'format') {\n throw new InvalidConfigOptionException('`format` is an invalid option in config file.');\n }\n self::setOption($key, $value);\n }\n // If object is not iterable, It judges that this configuration file is invalid.\n } else {\n throw new InvalidConfigFilePathException('`'.$file.'` is not a valid YAML.');\n }\n // If the configuration file name does not exist and is not the default, throw an exception.\n } elseif ($file !== self::DEFAULT_FILE_PATH) {\n throw new InvalidConfigFilePathException('`'.$file.'` is not found.');\n // If the configuration file name does not exist and is the default, does not throw an exception.\n } else {\n Logger::getInstance()->info(self::DEFAULT_FILE_PATH.' is not found.');\n }\n\n // If the arguments are given, set it.\n if ($arguments['php-version']) {\n self::setOption('php_version', $arguments['php-version']);\n }\n if ($arguments['ignore-tools']) {\n self::setOption('ignore_tools', $arguments['ignore-tools']);\n }\n if ($arguments['only-tools']) {\n self::setOption('only_tools', $arguments['only-tools']);\n }\n if ($arguments['ignore-paths']) {\n self::setOption('ignore_paths', $arguments['ignore-paths']);\n }\n if ($arguments['extensions']) {\n self::setOption('extensions', $arguments['extensions']);\n }\n if ($arguments['vendor']) {\n self::setOption('vendor', $arguments['vendor']);\n }\n if ($arguments['format']) {\n self::setOption('format', $arguments['format']);\n }\n\n // Append ignore tools based on only tools\n if (!empty(self::$config->only_tools)) {\n $ignore_tools = array_filter(ToolBox::VALID_TOOLS, function ($tool) {\n return !in_array($tool, self::$config->only_tools, true);\n });\n self::$config->ignore_tools = array_unique(array_merge(self::$config->ignore_tools, $ignore_tools));\n }\n\n // If disabled vendor flag, add `vendor` directory to ignore paths.\n if (!self::$config->vendor) {\n self::$config->ignore_paths[] = 'vendor';\n }\n\n // Resolve ignore_paths to file name and reset.\n self::$config->ignore_paths = array_map(function ($path) {\n return realpath($path);\n }, Loader::dig(self::$config->ignore_paths, self::$config));\n\n Logger::getInstance()->info('PHP version: '.self::$config->php_version);\n Logger::getInstance()->info('Ignore tools: '.var_export(self::$config->ignore_tools, true));\n Logger::getInstance()->info('Ignore paths: '.var_export(self::$config->ignore_paths, true));\n Logger::getInstance()->info('Extensions: '.var_export(self::$config->extensions, true));\n Logger::getInstance()->info('Vendor: '.var_export(self::$config->vendor, true));\n Logger::getInstance()->info('Format: '.self::$config->format);\n }",
"public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }",
"public function loadConfig($data);",
"private function loadHookConfig() {\r\n if (!is_readable(self::CONFIG_FILE)) {\r\n throw new \\Slackbot\\Exception\\ConfigException('Missing config file ' . self::CONFIG_FILE);\r\n }\r\n \r\n $config = parse_ini_file(self::CONFIG_FILE, true);\r\n\t\tforeach ($config as $sectionName => $settings) {\r\n\t\t\tif (isset($settings['token'])) {\r\n\t\t\t\tforeach ($this->hooks as $hookName => $hook) {\r\n\t\t\t\t\tif ($hookName === $sectionName) {\r\n\t\t\t\t\t\t$hook->addTokens((array)$settings['token']);\r\n\t\t\t\t\t\tbreak;\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}",
"abstract protected function loadSettings();",
"public function load()\n {\n $this->settings = get_option($this->optionName);\n }",
"private function load($file) {\n $yml = new \\Yaml($file);\n $data = $yml->parse();\n\n $this->name = \\a::get($data, 'name', NULL);\n $this->theme = \\a::get($data, 'theme', \\c::get('theme', 'grass'));\n $this->eventdate = \\a::get($data, 'eventdate', NULL);\n $this->intro = \\a::get($data, 'intro', NULL);\n $this->storeFields(\\a::get($data, 'fields', FALSE));\n $this->action = \\a::get($data, 'action', NULL);\n }",
"static function Load($directory, $configuration_file)\n {\n self::$settings = array();\n\n self::$directory = $directory;\n\n self::$file = self::$directory . \"/$configuration_file\";\n\n if(file_exists(self::$file))\n {\n self::$settings = parse_ini_file(self::$file, true);\n }\n }",
"function __construct() {\n if (!file_exists($this->configuration_file_path)) {\n \n die(\"FATAL: Missing \" . $this->configuration_file_path . `pwd` );\n \n }\n \n $raw_contents = file_get_contents($this->configuration_file_path);\n\n\n //parse json object\n try {\n\n $this->Config = json_decode( $raw_contents );\n\n } catch (Exception $e) {\n\n die(\"FATAL: Bad configuration file? \");\n\n }\n \n\n }",
"public function setAppConfigFile($file)\n\t{\n\t\t$this->_appConfigFile = $file;\n\t}",
"protected function loadSettings() {}",
"protected function loadSettings() {}",
"protected function loadSettings() {}",
"protected function Init() \n {\n // Load the APP config.php and add the defined vars\n $this->load($this->files['app']['file_path'], 'app');\n \n // Load the core.config.php and add the defined vars\n $this->load($this->files['core']['file_path'], 'core', 'config');\n \n // Load the database.config.php and add the defined vars\n $this->load($this->files['db']['file_path'], 'db', 'DB_configs');\n }",
"function setConfig($jsonFile) {\n $this->config = new Config($jsonFile);\n }",
"public static function fromFile($filename)\n {\n $pathinfo = pathinfo($filename);\n\n if (!isset($pathinfo['extension'])) {\n throw new \\Dang\\Exception\\RuntimeException(sprintf(\n 'Filename \"%s\" is missing an extension and cannot be auto-detected',\n $filename\n ));\n }\n \n $extension = strtolower($pathinfo['extension']);\n if ($extension !== 'php') {\n throw new \\Dang\\Exception\\RuntimeException(sprintf(\n 'Unsupported config file extension: .%s',\n $pathinfo['extension']\n ));\n } \n \n if (!is_file($filename) || !is_readable($filename)) {\n throw new \\Dang\\Exception\\RuntimeException(sprintf(\n \"File '%s' doesn't exist or not readable\",\n $filename\n ));\n }\n \n $config = include $filename;\n\n return new Config($config);\n }",
"public function load($files)\n\t{\n\t\t// multiple files\n\t\tif (strpos($files, ',')) {\n\t\t\t$filesList = explode(',', $files);\n\t\t}\n\t\telse { // single file\n\t\t\t$filesList[] = $files;\n\t\t}\n\n\t\tforeach($filesList as $file) {\n\t\t\t$file = trim($file);\n\n\t\t\t// default to BP./app/config/ dir\n\t\t\tif (substr($file, 0, 1 ) != \"/\") {\n\t\t\t\t$file = BP.'/app/config/'.$file;\n\t\t\t}\n\n\t\t\t// convert file into array\n\t\t\tif (file_exists($file)) {\n\t\t\t\t$config = parse_ini_file($file, true);\n\n\t\t\t\t// if it has sections, remove the config_title array that gets created\n\t\t\t\t// $configTitle = $config['config_title'];\n\t\t\t\t// unset($config['config_title']);\n\t\t\t\t// add the array using the config title as a key to the items array\n\n\t\t\t\tif (!is_array($config)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// has section headings\n\t\t\t\tif (is_array($config[key($config) ])) {\n\t\t\t\t\tforeach($config as $section => $values) {\n\t\t\t\t\t\t$this->container['config']->{$section} = (object)$values;\n\t\t\t\t\t}\n\t\t\t\t} else { // does not have sections\n\t\t\t\t\tforeach($config as $key => $value) {\n\t\t\t\t\t\t$this->container['config']->{$key} = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function loadFile($src){\n if(file_exists($src) && is_readable($src))\n {\n include $src;\n if(isset($CONFIG)) $this->add($CONFIG);\n }\n }",
"private function load_settings() {\n\t\t\n\t}",
"public function __construct() {\n $iniPath=\"/etc/lxd_sync.conf\";\n if(!file_exists($iniPath)) die(\"LXD-SYNC:[FATAL] Configuration File not Found : {$iniPath}\");\n $this->_CONFIG = parse_ini_file($iniPath, true);\n}",
"function readConfigXML($fileName) {\n\n $this->currentFile = $fileName;\n $this->_getFileXML($fileName);\n $this->_parseXML();\n }",
"protected function _setConfig()\n {\n if ($this->_system) {\n $config = $this->_system . DIRECTORY_SEPARATOR . 'config.php';\n } else {\n $config = false;\n }\n\n // manually look for a --config argument that overrides the default\n $found = false;\n foreach ($this->_argv as $val) {\n if ($val == '--config') {\n // found the argument\n $found = true;\n // reset the default in preparation for the next argument\n $config = false;\n continue;\n }\n \n if ($found && substr($val, 0, 1) != '-') {\n $config = $val;\n break;\n }\n \n if (substr($val, 0, 9) == '--config=') {\n $found = true;\n $config = substr($val, 9);\n break;\n }\n }\n \n // if there was a --config but no param, that's a failure\n if ($found && ! $config) {\n echo \"Please specify a config file path after the --config option.\" . PHP_EOL;\n exit(1);\n }\n \n // was there a config file at all?\n if ($config) {\n $realpath = realpath($config);\n if ($realpath) {\n $this->_config = $realpath;\n $text = \"Using config file '$realpath'.\" . PHP_EOL;\n } else {\n echo \"Could not resolve real path to config file '$config'.\" . PHP_EOL;\n exit(1);\n }\n } else {\n $text = \"Not using a config file.\" . PHP_EOL;\n }\n \n if ($this->_verbose) {\n echo $text;\n }\n }"
] | [
"0.7713522",
"0.71087664",
"0.70565194",
"0.70129234",
"0.69128776",
"0.6743333",
"0.6736381",
"0.67231077",
"0.66333693",
"0.66282004",
"0.65462947",
"0.6535089",
"0.6475792",
"0.6441505",
"0.6426538",
"0.64181024",
"0.63876945",
"0.63726336",
"0.6369758",
"0.63600165",
"0.63600165",
"0.6339513",
"0.6331794",
"0.6331794",
"0.6331794",
"0.631556",
"0.6282544",
"0.62811565",
"0.6271595",
"0.62656224",
"0.6230637",
"0.62299156",
"0.62283754",
"0.62283325",
"0.6226286",
"0.62202996",
"0.62200594",
"0.62158394",
"0.62125194",
"0.6210567",
"0.62091815",
"0.61766756",
"0.6176283",
"0.61736536",
"0.61576396",
"0.6153391",
"0.6146308",
"0.61432576",
"0.6133382",
"0.61033136",
"0.6087871",
"0.6081811",
"0.60733926",
"0.60671914",
"0.60631245",
"0.6056919",
"0.6046903",
"0.6045281",
"0.6043134",
"0.60399944",
"0.6030356",
"0.6019115",
"0.6017932",
"0.6012292",
"0.6008798",
"0.6006583",
"0.6006489",
"0.59934926",
"0.5990465",
"0.59816897",
"0.5979587",
"0.59790856",
"0.5972588",
"0.59678835",
"0.5960555",
"0.59572256",
"0.59427124",
"0.5917574",
"0.5903908",
"0.58935416",
"0.58934355",
"0.58879995",
"0.5880692",
"0.5879668",
"0.5860374",
"0.58519405",
"0.5850249",
"0.5833851",
"0.58318496",
"0.5829923",
"0.5829923",
"0.5828873",
"0.5800972",
"0.5791524",
"0.57870466",
"0.5784156",
"0.57806975",
"0.575349",
"0.5729675",
"0.57289237",
"0.5723222"
] | 0.0 | -1 |
Discards a previously loaded configuration | public function discardVcl($name) {
$this->execute('vcl.discard ' . $name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function resetConfiguration()\n {\n static::$config = null;\n Registry::clear();\n }",
"public function testGettingUnsetConfigurationKey()\n {\n AbstractConfigurationInstance::$allowedKeys = ['SXOtJQme'];\n static::assertNull((new AbstractConfigurationInstance())->get('SXOtJQme'));\n }",
"public static function reset()\n {\n self::$config = null;\n self::$configLoaded = false;\n }",
"protected function removeFromConfig()\n {\n $path = $this->getConfigPath();\n $config = require($path);\n\n if (isset($config[$this->moduleId])) {\n unset($config[$this->moduleId]);\n }\n $this->writeArrayToFile($this->getConfigPath(), $config);\n }",
"public function deleteObsoleteConfigs();",
"public static function clear()\n {\n self::$config = array();\n }",
"protected function removeObsoleteLocalConfigurationSettings() {}",
"protected function reset()\n {\n $this->config = array();\n $this->pathsToIgnore = array();\n }",
"public static function removeAllConfig()\n {\n foreach (self::CONFIG as $configKey) {\n Configuration::deleteByName($configKey);\n }\n }",
"public function deactivate()\n {\n $this->op->request('DELETE', '/api/prom/configs/deactivate', [\n 'headers' => [\n 'X-Scope-OrgID' => $this->consumerId,\n ]\n ]);\n }",
"function _biurnal_conf_clear_conf_cache($name) {\n ctools_include('object-cache');\n ctools_object_cache_clear('biurnal_conf', $name);\n}",
"public function clearConfig()\n {\n $this->_xcoobee->getStore()->clearStore();\n }",
"protected function removeConfigOptions() {\r\n\t\t$definition = $this->getDefinition();\r\n\r\n\t\t$definition->setOptions(array_diff_key($definition->getOptions(), array('db-configuration' => '', 'configuration' => '')));\r\n\t}",
"public function testConfigReset()\n {\n\n Config::setKind('house');\n Config::setLocale('RU');\n Config::setSkip(3);\n\n Config::reset();\n\n $this->assertEquals(null, Config::get('kind'));\n $this->assertEquals(null, Config::get('skip'));\n $this->assertEquals(null, Config::get('lang'));\n\n }",
"protected function deleteConfiguration(){\n Configuration::deleteByName($this->name.'_settings');\n }",
"public function removeConfiguration(string $name): void\n\t{\n\t\tunset($this->configurations[$name]);\n\t}",
"private function removeOldConfigurationKeys()\n {\n foreach ($this->oldConfigurationKeys as $configuration) {\n Configuration::deleteByName($configuration);\n }\n }",
"public function cleanUpOldRunningConfigurations() {}",
"function remove(){\n tep_db_query(\"delete from \" . TABLE_CONFIGURATION . \" where configuration_key in ('\" . implode(\"', '\", $this->keys()) . \"')\");\n }",
"function remove()\t{\r\n\t\ttep_db_query(\"delete from IXcore.\" . TABLE_CONFIGURATION . \" where configuration_key in ('\" . implode(\"', '\", $this->keys()) . \"')\");\r\n\t}",
"public static function reload()\n {\n self::$config = null;\n self::init();\n }",
"abstract protected function deleteConfiguration($name);",
"public function clearConfigurationCacheCommand() {\n\t\t$this->cacheApiService->clearConfigurationCache();\n\t\t$message = 'Configuration cache has been cleared.';\n\t\t$this->logger->info($message);\n\t\t$this->outputLine($message);\n\t}",
"public function uninstall()\n\t{\n\t\treturn parent::uninstall() && Configuration::deleteByName('STRIPE_PUBLIC_KEY_TEST') && Configuration::deleteByName('STRIPE_CAPTURE_TYPE') && Configuration::deleteByName('STRIPE_PUBLIC_KEY_LIVE')\n\t\t&& Configuration::deleteByName('STRIPE_MODE') && Configuration::deleteByName('STRIPE_PRIVATE_KEY_TEST') && Configuration::deleteByName('STRIPE_PRIVATE_KEY_LIVE') &&\n\t\tConfiguration::deleteByName('STRIPE_SAVE_TOKENS') && Configuration::deleteByName('STRIPE_SAVE_TOKENS_ASK') && Configuration::deleteByName('STRIPE_CHARGEBACKS_ORDER_STATUS') &&\n\t\tConfiguration::deleteByName('STRIPE_PENDING_ORDER_STATUS') && Configuration::deleteByName('STRIPE_PAYMENT_ORDER_STATUS') && Configuration::deleteByName('STRIPE_WEBHOOK_TOKEN');\n\t\t\n\t}",
"function remove() {\n global $db;\n $db->Execute(\"delete from \" . TABLE_CONFIGURATION . \" where configuration_key in ('\" . implode(\"', '\", $this->keys()) . \"')\");\n }",
"function remove() \r\n {\r\n $tbl = new Payment_Config;\r\n $tbl->delete('where `module_key`=?', array($this->module_key()));\r\n }",
"function remove() {\r\n global $db;\r\n $db->Execute(\"delete from \" . TABLE_CONFIGURATION . \" where configuration_key in ('\" . implode(\"', '\", $this->keys()) . \"')\");\r\n }",
"protected function tearDown() {\r\n\t\tunset ( $this->configReader );\r\n\t}",
"public static function reset()\n {\n self::$config = [];\n self::init();\n return self::read();\n }",
"public static function config_clear($group)\n {\n // Remove the group from config\n unset(self::$configuration[$group], self::$internal_cache['configuration'][$group]);\n\n if (! isset(self::$write_cache['configuration'])) {\n // Cache has changed\n self::$write_cache['configuration'] = true;\n }\n }",
"public function reset()\n {\n $this->call('cache:clear');\n copy(\n storage_path('app/example.config.json'),\n storage_path('app/config.json')\n );\n $this->info('Reset Completed!');\n }",
"function clear_integration_settings() {\n\tglobal $db;\n\t\n\t$config_fields = get_db_schema();\n\t$key_names = array();\n\tforeach ($config_fields as $config_field) {\n\t\t$key_names[] = 'wpu_' . $config_field;\n\t}\n\t\n\t$sql = 'DELETE FROM ' . CONFIG_TABLE . '\n\t\t\tWHERE ' . $db->sql_in_set('config_name', $key_names);\n\t$db->sql_query($sql);\n\n}",
"public function tearDown()\n {\n $this->objectManager->create(\n \\Magento\\Config\\Test\\TestStep\\SetupConfigurationStep::class,\n ['configData' => $this->configData, 'rollback' => true]\n )->run();\n }",
"public function clearBlacklist()\n {\n $this->blacklist = [];\n }",
"protected function clearCache()\n {\n $result = $this->cache->clean([\\Magento\\Framework\\App\\Config::CACHE_TAG]);\n $this->logger->debug(\n ' Config cache cleared with result: ' . ($result ? '[OK]' : '[ERROR]')\n );\n }",
"function resetConfig() {\n global $db;\n global $lang;\n\n if(configEnabled() == true) {\n\n if($res = $db->query('TRUNCATE `'.$lang[\"config_db_name\"].'`.`'.$lang[\"config_table_name\"].'`')) {\n\n if($res = $db->query(\"INSERT IGNORE INTO `\".$lang[\"config_db_name\"].\"`.`\".$lang[\"config_table_name\"].\"` (`id`, `key`, `val`) VALUES \".getKeys())) {\n return \"Reset\";\n } else {\n return \"Cannot insert rows. Error: \".$db->error;\n }\n\n } else {\n return \"Cannot truncate. Error: \".$db->error;\n }\n\n } else {\n // return \"Config never been initialized.\";\n // instead of returning that error, initalize and try again\n $pc = prepConfig();\n if($pc == \"Ready\") {\n resetConfig();\n } else {\n return \"Initialization error: \".$pc;\n }\n }\n }",
"protected function afterConfigurationSet()\n {\n }",
"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 function tearDown()\n {\n if ($this->configData) {\n $this->objectManager->create(\n 'Magento\\Config\\Test\\TestStep\\SetupConfigurationStep',\n ['configData' => $this->configData, 'rollback' => true]\n )->run();\n }\n }",
"public function remove() {\n $f = new File(self::CONFIG_FILE_PATH);\n $f->remove();\n }",
"public function phpunit_remove_stores() {\n $this->configstores = array();\n }",
"public function tearDown()\n {\n unset($this->_configXML);\n }",
"function disableConfigurableSwatches()\n\t {\n\t \t $configModel = new Mage_Core_Model_Config();\n\t \t $configModel->saveConfig('configswatches/general/enabled', \"0\", 'default', 0);\n\t \t $configModel->saveConfig('configswatches/general/swatch_attributes', \"\", 'default', 0);\n\t }",
"public function clearDiscovery();",
"function clearConfigSession()\n {\n \t//clear session db info\n\t\t$this->setGeneralSession('db_name', '');\n\t\t$this->setGeneralSession('db_username', '');\n\t\t$this->setGeneralSession('db_password', '');\n\t\t$this->setGeneralSession('status', '');\n }",
"function freeze() {\r\n\r\n\t\t$this->configured = True;\r\n\r\n\t}",
"function freeze() {\r\n\r\n\t\t$this->configured = True;\r\n\r\n\t}",
"function module_remove($config_id){\n\t\t\t$this->EE->db->delete('br_config', array('config_id' => $config_id)); \n\t\n\t\t// Remove any custom configuration \n\t\t// data that the module has\n\t\t\t$this->EE->db->delete('br_config_data', array('config_id' => $config_id)); \n\t}",
"public function disableKeys()\n {\n $this->config->each(function ($item, $key) {\n $this->disable($key);\n });\n }",
"public function uninstall()\n {\n $this->deleteConfig();\n GPCCore::unregister($this->getPluginName());\n }",
"protected function tearDown()\n {\n $this->resetMage();\n Mage::getConfig();\n }",
"public function unauthorize () {\n\t\t$this->_plugin->setting(self::token_setting, NULL);\n\t}",
"public static function deactivate() {\n delete_option('haa_admin_area');\n delete_option('haa_secret_key');\n\n unregister_setting('permalink', 'haa_admin_area');\n }",
"public static function reset()\n {\n self::$toLoad = array();\n }",
"public function unpopulate();",
"function remove() {\r\n global $db;\r\n $db->Execute(\"delete from \" . TABLE_CONFIGURATION . \" where configuration_key LIKE 'MODULE\\_PAYMENT\\_NOCHEX%'\");\r\n $this->notify('NOTIFY_PAYMENT_NOCHEX_UNINSTALLED');\r\n }",
"public function discard()\n {\n $this->channel->basic_reject(\n $this->tag(),\n false\n );\n }",
"public function deleteConfigs()\n {\n foreach ($this->fields_form as $k => $f) {\n foreach ($f['form']['input'] as $i => $input) {\n if (isset($input['ignore']) && $input['ignore'] == true) {\n continue;\n }\n Configuration::deleteByName($input['name']);\n }\n }\n\n $this->deleteCustomConfigs();\n\n return true;\n }",
"public function uninstall()\n {\n /**\n * Drop Becopay order table\n */\n $this->__dropBecopayTable();\n\n //delete configuration records\n foreach ($this->config['configuration'] as $config)\n Configuration::deleteByName(BECOPAY_PREFIX . $config['name']);\n\n return parent::uninstall();\n }",
"function cfg_del(...$args)\n{\n\tglobal $CONFIG;\n\tswitch( count($args) )\n\t{\n\t\tcase 1: unset($CONFIG[$args[0]]); break;\n\t\tcase 2: unset($CONFIG[$args[0]][$args[1]]); break;\n\t\tcase 3: unset($CONFIG[$args[0]][$args[1]][$args[2]]); break;\n\t\tcase 4: unset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]]); break;\n\t\tcase 5: unset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]]); break;\n\t\tcase 6: unset($CONFIG[$args[0]][$args[1]][$args[2]][$args[3]][$args[4]][$args[5]]); break;\n\t\tdefault: WdfException::Raise(\"Illegal argument count: \".count($args));\n\t}\n}",
"public function unsetProvider();",
"public function tear_down() {\n\t\tforeach ( static::$original_options as $option => $original_value ) {\n\t\t\tupdate_option( $option, $original_value );\n\t\t}\n\n\t\tparent::tear_down();\n\t}",
"function discard($k = NULL) {\n $this->_use($k);\n }",
"protected function disableSecretKey()\n {\n $config = $this->fixtureFactory->create(\n \\Magento\\Config\\Test\\Fixture\\ConfigData::class,\n ['dataset' => 'secret_key_disable']\n );\n $config->persist();\n }",
"function instance_allow_config() {\n\n return false;\n }",
"function configRestore($presets){\n\t\t\t\tglobal $scope_id;\n\t\t\t\t$resource = Mage::getSingleton('core/resource');\n\t\t\t\t$writeConnection = $resource->getConnection('core_write');\n\t\t\t\t$dbname = (string)Mage::getConfig()->getNode('global/resources/default_setup/connection/dbname');\n\t\t\t\tforeach($presets as $preset){\n\t\t\t\t\tforeach($preset as $section => $value){\n\t\t\t\t\t\t$query = \"DELETE FROM `\".$dbname.\"`.`core_config_data` WHERE scope_id = \".$scope_id.\" AND path = '\".$section.\"'\";\n\t\t\t\t\t\t$writeConnection->query($query);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$query = \"DELETE FROM `\".$dbname.\"`.`core_config_data` WHERE scope_id = \".$scope_id.\" AND path = 'meigee_harbour_appearance/presets/preset'\";\n\t\t\t\t$writeConnection->query($query);\n\t\t\t}",
"function serendipity_removeObsoleteVars() {\nglobal $serendipity;\n\n $config = serendipity_parseTemplate(S9Y_CONFIG_TEMPLATE);\n foreach($config as $category) {\n foreach($category['items'] as $item) {\n /* Remove trash */\n if (!serendipity_checkConfigItemFlags($item, 'remove')) {\n serendipity_remove_config_var($item['var'], 0);\n }\n }\n }\n}",
"public function IVS_Store_deactivation(){\n\t\t\t\t$this->db_connection->query(\"DROP TABLE IF EXISTS ivs_store_configurations\");\n\t\t\t}",
"function unregister()\n\t{\n\t\t$args=func_get_args();\n\t\t$path=$command=implode('/',$args);\n\t\t\n\t\t// load the conf file if it exists\n\t\t$conffile=PATH_APP.'conf/commands.js';\n\t\tif (file_exists($conffile))\n\t\t\t$conf=json_decode(file_get_contents($conffile),true);\nprint_r($conf);die;\n\t\tif (isset($conf[$command]))\n\t\t{\n\t\t\tunset($conf[$command]);\n\t\t\tfile_put_contents($conffile,json_encode($conf));\n\t\t}\n\t}",
"function remove($name) {\n\t\t$this->_settings->remove($name);\n\t}",
"public function deleteConfig($key) {\n\t $config = Mage::getConfig();\n\t $config->deleteConfig($key);\n\t}",
"public static function remove(string $key)\n {\n if (!self::$configLoaded) {\n self::loadConfig();\n }\n\n unset(self::$config[$key]);\n }",
"public function resetMetricConfiguration()\n {\n $em = $this->getDoctrine()->getManager();\n $repository = $this->getDoctrine()->getRepository(MetricConfiguration::class);\n $backup = $repository->find(1);\n\n $configuration = new MetricConfiguration();\n $configuration->setId(2);\n $configuration->setLimited($backup->getLimited());\n $configuration->setMaxLength($backup->getMaxLength());\n $configuration->setRoundPrecision($backup->getRoundPrecision());\n $em->merge($configuration);\n $em->flush();\n }",
"public function reset(): void\n {\n /** @var array<string, mixed> $fieldsFromConfig */\n $fieldsFromConfig = config('alert.fields', []);\n\n $this->fields = $fieldsFromConfig;\n }",
"public static function mo_api_authentication_deactivate() {\n\t\tdelete_option( 'host_name' );\n\t\tdelete_option( 'new_registration' );\n\t\tdelete_option( 'mo_api_authentication_admin_phone' );\n\t\tdelete_option( 'mo_api_authentication_verify_customer' );\n\t\tdelete_option( 'mo_api_authentication_admin_customer_key' );\n\t\tdelete_option( 'mo_api_authentication_admin_api_key' );\n\t\tdelete_option( 'mo_api_authentication_new_customer' );\n\t\tdelete_option( 'customer_token' );\n\t\tdelete_option( 'mo_api_auth_message' );\n\t\tdelete_option( 'mo_api_authentication_registration_status' );\n\t\tdelete_option( 'mo_api_authentication_current_plugin_version' );\n\t}",
"public function setConfiguration(UnleashConfiguration $configuration): void\n {\n }",
"public function deleteConfig() {\n\t\tif(!$this->_configId) throw new Exception(lang('error_126'));\n\t\tif(!$this->db->query(\"DELETE FROM \"._WE_CREDITSYS_.\" WHERE config_id = ?\", array($this->_configId))) {\n\t\t\tthrow new Exception(lang('error_142'));\n\t\t}\n\t}",
"public function testAuthorizeConfigCacheEmpty()\n\t{\n\t\t$service = $this->createBuilder();\n\t\t$builderCache = $service->getCacheAdapter();\n\t\t$testingConf = [\n\t\t\t'someConf' => true\n\t\t];\n\n\t\t$builderCache->setItem(AnnotationBuilder::CACHE, serialize($testingConf));\n\n\t\t$service->getAuthorizeConfig();\n\n\t\t$this->assertEquals($testingConf, unserialize($builderCache->getItem(AnnotationBuilder::CACHE)));\n\n\t\t// clear settings\n\t\t$builderCache->setItem(AnnotationBuilder::CACHE, null);\n\t}",
"function reloadConfig() {\n\t\treturn $this->_config = PommoAPI :: configGetBase(TRUE);\n\t}",
"private function _deleteConfigs()\r\n {\r\n $response = Configuration::deleteByName('FIELD_FEATUREDPSL_TITLE');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_VERTICAL');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_COLUMNITEM');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_MAXITEM');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_MEDIUMITEM');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_MINITEM');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_AUTOSCROLL');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_PAGINATION');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_NAVIGATION');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_AUTOSCROLLDELAY');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_PAUSEONHOVER');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_NBR');\r\n $response &= Configuration::deleteByName('FIELD_FEATUREDPSL_CAT');\r\n\r\n return $response;\r\n }",
"public function instance_allow_config() {\n return false;\n }",
"public function down()\n {\n // Remove config entries.\n foreach (words('CLIENT_ID CLIENT_SECRET AUTHORIZATION_CODE ACCESS_TOKEN CALLBACK_URL') as $entry) {\n Config::get()->delete('VIMEO_' . $entry);\n }\n }",
"public function unregisterContextFromConfig()\n {\n $wiff = WIFF::getInstance();\n if ($wiff === false) {\n $this->errorMessage .= sprintf(\"Could not get wiff instance.\");\n return sprintf(\"Could not get wiff instance.\");\n }\n\n $xml = $wiff->loadContextsDOMDocument();\n if ($xml === false) {\n $this->errorMessage .= sprintf(\"Error loading 'contexts.xml': %s\", $wiff->errorMessage);\n return $this->errorMessage;\n }\n\n $xpath = new DOMXpath($xml);\n\n $contextNodeList = $xpath->query(sprintf(\"/contexts/context[@name='%s']\", $this->name));\n if ($contextNodeList->length <= 0) {\n $this->errorMessage .= sprintf(\"Could not find a context with name '%s'!\", $this->name);\n return sprintf(\"Could not find a context with name '%s'!\", $this->name);\n }\n if ($contextNodeList->length > 1) {\n $this->errorMessage .= sprintf(\"There is more than one context with name '%s'!\", $this->name);\n return sprintf(\"There is more than one context with name '%s'!\", $this->name);\n }\n $contextNode = $contextNodeList->item(0);\n\n $xml->documentElement->removeChild($contextNode);\n\n $ret = $wiff->commitDOMDocument($xml);\n if ($ret === false) {\n $this->errorMessage .= sprintf(\"Error saving contexts.xml '%s': %s\", $wiff->contexts_filepath, $wiff->errorMessage);\n return sprintf(\"Error saving contexts.xml '%s': %s\", $wiff->contexts_filepath, $wiff->errorMessage);\n }\n\n return \"\";\n }",
"public function resetData()\n {\n return reset($this->configuration);\n }",
"public function reset()\r\n {\r\n $this->_session->remove($this->_branchKey);\r\n $this->_session->remove($this->_stepsKey);\r\n $this->_session->remove($this->_timeoutKey);\r\n }",
"public function testDrop(): void\n {\n $result = TransportFactory::getConfig('debug');\n $this->assertIsArray($result, 'Should have config data');\n TransportFactory::drop('debug');\n $this->assertNull(TransportFactory::getConfig('debug'), 'Should not exist.');\n }",
"private function loadConfiguration()\n {\n if (!Configuration::configurationIsLoaded()) {\n Configuration::loadConfiguration();\n }\n }",
"private function _deleteConfigs()\r\n {\r\n $response = Configuration::deleteByName($this->name . '_TITLE');\r\n $response &= Configuration::deleteByName($this->name . '_MAXITEM');\r\n $response &= Configuration::deleteByName($this->name . '_MINITEM');\r\n $response &= Configuration::deleteByName($this->name . '_AUTOSCROLL');\r\n $response &= Configuration::deleteByName($this->name . '_PAGINATION');\r\n $response &= Configuration::deleteByName($this->name . '_NAVIGATION');\r\n $response &= Configuration::deleteByName($this->name . '_AUTOSCROLLDELAY');\r\n $response &= Configuration::deleteByName($this->name . '_PAUSEONHOVER');\r\n $response &= Configuration::deleteByName($this->name . '_MANTITLE');\r\n\r\n return $response;\r\n }",
"public static function disableCaching(): void\n {\n static::$currencies = [];\n static::$caching = false;\n }",
"private function _unsetSetup()\n\t{\n\t\tforeach ( $this->_setup as $setup )\n\t\t{\n\t\t\t$setup->disconnect();\n\t\t}\n\n\t\t$this->_setup = null;\n\t\t$this->_setup = array();\n\t}",
"public function reset()\n {\n $this->values[self::_IS_ATTACKED] = null;\n }",
"protected function deleteConfiguration($name)\n {\n // TODO: Implement deleteConfiguration() method.\n }",
"public function deactivate_devmode() {\r\n\t\t$this->options->set( 'cloudflare_devmode', 'off' );\r\n\t\t$this->options_api->set( 'settings', $this->options->get_options() );\r\n\t}",
"public function uninstallHook()\n\t{\n\t\t$ok =\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_PUB_KEY) &&\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_PUB_KEY_HASH);\n\t\t\tdelete_option(CommentsEncryptMain::OPTION_STORE_AVATAR_HASHES)\n\t\t;\n\t}",
"public function deactivateAll(){\n $config = LiteBriteConfig::where('is_active','=',true)->update(['is_active' => false]);\n return;\n }",
"public function unsetEnabled(): void\n {\n $this->enabled = [];\n }",
"public function flushCache()\n {\n Yii::$app->cache->delete(self::CACHE_CONFIGS);\n }",
"public function reset()\n {\n $this->values[self::_MAIL_CFG_ID] = null;\n $this->values[self::_PARAMS] = array();\n }",
"public function disable() {}",
"public function purge(): void\n {\n $this->boot();\n $this->configuration->eventDispatcher()->dispatch(new Clear($this));\n }"
] | [
"0.64341813",
"0.63732797",
"0.63386405",
"0.6329775",
"0.62328535",
"0.6228032",
"0.6093658",
"0.6039816",
"0.60111994",
"0.5988797",
"0.59027976",
"0.5898758",
"0.5874383",
"0.58121353",
"0.5809512",
"0.5760367",
"0.56995976",
"0.56962067",
"0.56877416",
"0.56514263",
"0.5644341",
"0.56009376",
"0.55989695",
"0.5593142",
"0.55868757",
"0.5578953",
"0.5573443",
"0.55295366",
"0.55014694",
"0.5411694",
"0.54012996",
"0.5368944",
"0.5309702",
"0.5297547",
"0.5283558",
"0.52790964",
"0.5277511",
"0.5274376",
"0.52631634",
"0.52400166",
"0.5239109",
"0.5226151",
"0.5224376",
"0.52197826",
"0.5216054",
"0.5199721",
"0.5199721",
"0.519892",
"0.51925516",
"0.5172364",
"0.51692104",
"0.5168304",
"0.51662856",
"0.5162578",
"0.51482123",
"0.514288",
"0.5123501",
"0.5115204",
"0.5110959",
"0.5106435",
"0.510096",
"0.50848216",
"0.5080583",
"0.5078973",
"0.5078474",
"0.50765085",
"0.50763196",
"0.5073235",
"0.5072385",
"0.5071667",
"0.5070434",
"0.50678694",
"0.50675005",
"0.506709",
"0.5047179",
"0.504621",
"0.50169516",
"0.50124097",
"0.5011565",
"0.5009432",
"0.5007088",
"0.50062764",
"0.50040096",
"0.5002727",
"0.4998616",
"0.49962637",
"0.4994197",
"0.49895865",
"0.4989132",
"0.49890777",
"0.4978301",
"0.4965411",
"0.496278",
"0.4952124",
"0.4949129",
"0.4947963",
"0.4946781",
"0.49416405",
"0.49389884",
"0.49327508"
] | 0.4973982 | 91 |
Gets the last panic | public function getPanic() {
$panic = $this->execute('panic.show', $statusCode);
if ($statusCode == 300) {
return false;
}
return $panic;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_last_error() {\n\t\treturn $this->errors[count($this->errors - 1)];\n\t}",
"public static function getLastReportedException() {\n return self::$lastReported;\n }",
"final public function getLast() {\n\t\treturn null;\n\t}",
"public function get_last_error() {\n\t\treturn $this->last_error;\n\t}",
"protected function getLastError()\n {\n return error_get_last();\n }",
"public function get_last_error() {\n return $this->last_error;\n }",
"public function getLastLog () {\n return end($this->log);\n }",
"public function getLast()\n\t{\n\t\treturn $this->last;\n\t}",
"public function get_last_error() {\n\t\treturn $this->_error;\n\t}",
"public function lastError()\n {\n return $this->error;\n }",
"public function getLastEvent()\n {\n $events = $this->getEvents();\n if (count($events) > 0) {\n return $events[count($events) - 1];\n }\n\n return null;\n }",
"function lastError();",
"public function getLast()\n {\n $k = count($this);\n if ($k > 0) {\n return $this[$k - 1];\n }\n }",
"public function lastHealthMessage() {\n return $this->health_messages()\n ->orderBy('timestamp', 'desc')\n ->first();\n }",
"public function getLastResponse() {\n\t\treturn $this -> data['lastResponse'];\n\t}",
"function last ()\n {\n return $this->A ? array_slice ($this->A, -1)[0] : null;\n }",
"public function last()\n {\n return $this->fixedArray->offsetGet($this->currentSize - 1);\n }",
"#[Pure]\n public function getLastLog() : ?Log\n {\n return $this->lastLog;\n }",
"public function getLastTrace() {\n return $this->last_trace;\n }",
"public function get_last_logon() \n {\n return $this->last_logon;\n }",
"public function getLastSoapFault() {\n\t\treturn $this->lastSoapFault;\n\t}",
"public function last() {\n\t\treturn $this->valueForKey($this->lastKey());\n\t}",
"public function getLastBase() {\n\n if (\n ($bases = $this->getBases())\n && (is_array($bases))\n )\n return $bases[intval(count($bases)-1)];\n //===\n\n\n return NULL;\n //===\n\n }",
"public function lastNotify()\n {\n return $this->notifications()->first();\n }",
"public function getLastIp()\n\t{\n\t\treturn $this->last_ip;\n\t}",
"public function get_last_error()\n {\n return $this->_error;\n }",
"public function last()\n {\n return \\count($this->data) > 0 ? $this->data[\\count($this->data) - 1] : null;\n }",
"final public function getLastEvent()\n\t\t{\n\n\t\t\treturn $this->getEventByTimeAlgo(\"last_event\");\n\n\t\t}",
"public function getLastLogin()\n {\n return $this->get(self::_LAST_LOGIN);\n }",
"public function getLastLogin()\n {\n return $this->get(self::_LAST_LOGIN);\n }",
"function last_response() {\n\t\treturn $this->last_response;\n\t}",
"public function getF5last() {\n\t\treturn $this->container['f5last'];\n\t}",
"public function getLastEvent()\n {\n return $this->_lastEvent;\n }",
"public function last(): mixed\n {\n return array_last($this->data);\n }",
"public function lastProbeRequest() {\n return $this->probe_requests()\n ->orderBy('ts', 'desc')\n ->first();\n }",
"public function getLast()\n {\n $this->update();\n $count = sizeof($this->data);\n if (isset($this->data[$count - 1])) {\n return $this->updateValueIfNeeded($this->data, $count - 1);\n }\n return null;\n }",
"public function getLastTick()\n {\n return $this->lastTick;\n }",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"protected function getLastDBError(\\MongoDB\\Database $db) {\n return $db->command([\n 'getLastError' => 1\n ])->toArray()[0];\n }",
"public function getLast();",
"public function getLast();",
"public function getLastErrorMessage()\n {\n return $this->lastErrorMessage;\n }",
"protected function getLastLogEntryMessage() {}",
"public function last()\n {\n $copy = $this->array;\n return end($copy);\n }",
"public function last() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_pop( $result );\n\t}",
"public function getLastError() { return end($this->_traiat_errors); }",
"public function get_last_response(){\n\t\treturn $this->response_data;\n\t}",
"public function lastError()\r\n\t{\r\n\t\treturn @mssql_get_last_message();\r\n\t}",
"public function getError()\n {\n return imap_last_error();\n }",
"function lastErrno();",
"public function getLast(): int {\n return $this->last;\n }",
"public static function getLastAttempted(){\n return \\Illuminate\\Auth\\Guard::getLastAttempted();\n }",
"public function getLastDryOff()\n {\n return $this->last_dryoff;\n }",
"public function last(): mixed;",
"public function last(): mixed;",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"function tideways_last_detected_exception()\n{\n}",
"public static function last($array) {\n if (count($array) == 0) {\n return null;\n }\n $keys = array_keys($array);\n return $array[$keys[count($keys) - 1]];\n }",
"public function lastMessage()\n {\n return $this->messages()\n ->take(1);\n }",
"public function getError() {\n return imap_last_error();\n }",
"public function getLastResponse()\n\t{\n\t\treturn $this->__getLastResponse();\n\t}",
"public function last()\n {\n return end($this->storage);\n }",
"public function lastResponse()\n\t{\n\t\treturn $this->_source->lastResponse();\n\t}",
"public function getLastResponse() {\n\t\treturn $this->lastResponse;\n\t}",
"public function getLastResponse() {\n\t\treturn $this->lastResponse;\n\t}"
] | [
"0.6506351",
"0.63914037",
"0.63289905",
"0.6272127",
"0.6153776",
"0.6144254",
"0.6109948",
"0.6101054",
"0.59913146",
"0.59873897",
"0.595506",
"0.5942636",
"0.5933513",
"0.5932883",
"0.59187907",
"0.5889106",
"0.5861533",
"0.5861108",
"0.58606446",
"0.58544946",
"0.58540463",
"0.5846815",
"0.584035",
"0.583726",
"0.58128834",
"0.5808504",
"0.5767166",
"0.5756079",
"0.57523245",
"0.57523245",
"0.5750931",
"0.5735027",
"0.5732517",
"0.57088524",
"0.56951946",
"0.569445",
"0.5674243",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56720966",
"0.56583357",
"0.56336987",
"0.56336987",
"0.5631646",
"0.56288135",
"0.5611243",
"0.5610618",
"0.55987424",
"0.55894375",
"0.558697",
"0.5572818",
"0.5568752",
"0.55671865",
"0.5566543",
"0.55636364",
"0.5549935",
"0.5549935",
"0.55387086",
"0.55387086",
"0.55387086",
"0.55387086",
"0.55387086",
"0.55387086",
"0.55387086",
"0.55387086",
"0.55387086",
"0.55387086",
"0.55387086",
"0.55387086",
"0.55387086",
"0.55387086",
"0.55387086",
"0.55387086",
"0.5524602",
"0.55225104",
"0.55196905",
"0.55142546",
"0.55018383",
"0.5500304",
"0.54970235",
"0.54878885",
"0.54878885"
] | 0.61708856 | 4 |
Clears the last panic | public function clearPanic() {
$this->execute('panic.clear');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_EXIT] = Down_ErrorInfo_Exit::noneed;\n }",
"public function clear()\n {\n $this->log = [];\n }",
"public function reset()\n {\n $this->values[self::_EXCAVATE] = null;\n }",
"protected function clearError()\n {\n $this->lastError = null;\n }",
"public function clearExceptions()\r\r\n {\r\r\n $this->exceptions = array();\r\r\n }",
"public static function clear() : void\n {\n static::$stack = array();\n \n }",
"private function clear_log()\n {\n if ($this->_log && is_array($this->_log)) {\n $this->_log = array();\n }\n }",
"function error_clear_last(){\n\t// var_dump or anything else, as this will never be called because of the 0\n\tset_error_handler('var_dump', 0);\n\t@$error_clear_tmp523457901;\n\trestore_error_handler();\n\n\tvar_dump(error_get_last());\n}",
"protected function clear() {}",
"public function reset()\n {\n $this->values[self::_INFO] = null;\n }",
"private function clearLog() {\n $this -> log = array();\n $this -> log[\"success\"] = array();\n $this -> log[\"failure\"] = array();\n }",
"public function clear() {}",
"public function clear() {}",
"public function clear() {}",
"public function clear() {}",
"public function reset()\n {\n $this->values[self::ERRMSG] = null;\n $this->values[self::RET] = null;\n }",
"public function clearTempLog(): void\n {\n $this->tempLog = '';\n }",
"function ClearError() \r\n{ \r\n$this->LastError = null; \r\n}",
"public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_ADDR] = null;\n }",
"function clear() {\n\t\txdebug_stop_code_coverage();\n\t}",
"public function clear()\n {\n try {\n $this->imagick->clear();\n $this->imagick->destroy();\n } catch (Exception $e) {\n\n }\n }",
"function clear() {}",
"public function reset() {\n $this->values[self::ERR_NO] = null;\n $this->values[self::ERR_MSG] = null;\n $this->values[self::CONTENTS] = array();\n }",
"function clear() {}",
"public function clear() {\n $this->_errors = array();\n }",
"public function reset() /*void*/\n {\n foreach(array_keys($_SESSION[self::KEY]) as $key)\n {\n unset($_SESSION[self::KEY][$key]);\n }\n $_SESSION[self::ERRORS] = array();\n $this->notice(null);\n }",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function clear_log() {\r\n\t\t@unlink( $this->file );\r\n\t}",
"public function clearStack() {}",
"public function clear( );",
"public static function clearCapturedErrors() {\n self::$capturedErrors = array();\n }",
"public function clear () {\n \n }",
"public static function clearLog() \n\t{\n\t\ttry {\n\t\t\tVCDClassFactory::getInstance('logSQL')->clearLog();\n\t\t} catch (Exception $ex) {\n\t\t\tthrow $ex;\n\t\t}\n\t}",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function clear() {\n\t\t$this->array = array();\n\t}",
"final public function purgeLog() {\n $this->log = array();\n }",
"public static function clear()\n {\n AlertCollection::getInstance()->clear();\n }",
"public function clearError() {\n $this->errors = array();\n }",
"protected function clear()\n {\n $this->error = '';\n $this->success = false;\n }",
"public function reset()\n {\n $this->values[self::_LAST_RESET_TIME] = null;\n $this->values[self::_TODAY_FREE_SWEEP_TIMES] = null;\n }",
"protected function _clearAndOutput() {}",
"public function clear_log()\n\t{\n\t\tfile_put_contents( NHS_LOG_FILE );\n\t}",
"public function reset()\n {\n $this->values[self::_LAST_CHANGE] = null;\n $this->values[self::_TODAY_TIMES] = null;\n }",
"function clear(){\r\n\t\t$_SESSION[self::_KEY_][get_class($this)]->reset();\r\n\t}",
"public function reset() {\n $this->_events->reset();\n }",
"public function reset()\n {\n $this->values[self::_RET] = null;\n }",
"public function reset()\n {\n $this->values[self::_RET] = null;\n }",
"public function reset()\n {\n $this->values[self::_BASE] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function reset()\n {\n $this->values[self::_BASE] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function reset()\n {\n $this->values[self::_BASE] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function reset()\n {\n $this->values[self::_GUILD_LOG] = array();\n }",
"public function reset()\n {\n Alternative::truncate();\n Perhitungan::truncate();\n return back();\n }",
"public function reset() {\n $this->values[self::ERROR] = null;\n $this->values[self::LINE_INFO_LIST] = array();\n $this->values[self::TICKET_ORDER_INFO] = null;\n }",
"public function clear() {\n\t}",
"private function reset()\r\n {\r\n $this->last_response = null;\r\n $this->last_request = null;\r\n }",
"public function clear(): void;"
] | [
"0.629562",
"0.62381667",
"0.6087309",
"0.6073643",
"0.60643715",
"0.6013155",
"0.5992769",
"0.5945287",
"0.5941233",
"0.5936783",
"0.59355295",
"0.5891133",
"0.5891133",
"0.5891133",
"0.5891133",
"0.58668864",
"0.5859087",
"0.58491504",
"0.5827192",
"0.5811038",
"0.57933146",
"0.57773775",
"0.57672054",
"0.5764329",
"0.5761209",
"0.57526904",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.57454973",
"0.5731515",
"0.5731515",
"0.5731515",
"0.5731515",
"0.5731515",
"0.5731515",
"0.5731515",
"0.5730884",
"0.5730884",
"0.5730884",
"0.57098544",
"0.57030046",
"0.5693251",
"0.56893396",
"0.56648237",
"0.5661235",
"0.565912",
"0.565912",
"0.565912",
"0.565912",
"0.565912",
"0.565912",
"0.565912",
"0.565912",
"0.565912",
"0.565912",
"0.565912",
"0.565912",
"0.5652556",
"0.5642914",
"0.56338215",
"0.563197",
"0.56056404",
"0.5604717",
"0.56037426",
"0.55824655",
"0.5575811",
"0.5574219",
"0.5574087",
"0.55675423",
"0.55675423",
"0.55643785",
"0.55643785",
"0.55643785",
"0.55643016",
"0.5551327",
"0.5534035",
"0.55164087",
"0.551486",
"0.550978"
] | 0.8144025 | 0 |
Bans (purges) the cached objects which match the provided expression | public function ban($expression) {
$this->execute('ban ' . $expression);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function checkRelatedInCache($productName)\n{\n return S::of(function (Cacher $cache) use ($productName) {\n return [$cache->get($productName), $cache];\n });\n}",
"static function clearMemory($olderThan=null,$matchingExp=null){\n\t\tif( null === $olderThan && null===$matchingExp){\n\t\t\tself::$_instances = array();\n\t\t\treturn true;\n\t\t}\n\n\t\tforeach(self::$_instances as $i){\n\t\t\tif( (null===$olderThan || $i->cacheTime < $olderThan) && (null==$matchingExp || preg_match($matchingExp,$i->name)) )\n\t\t\t\tself::dropInstance($i->name);\n\t\t}\n\t\treturn true;\n\t}",
"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}",
"private function warmCache()\n {\n $cached_tables = config('ninja.cached_tables');\n\n foreach ($cached_tables as $name => $class) {\n if (! Cache::has($name)) {\n // check that the table exists in case the migration is pending\n if (! Schema::hasTable((new $class())->getTable())) {\n continue;\n }\n if ($name == 'payment_terms') {\n $orderBy = 'num_days';\n } elseif ($name == 'fonts') {\n $orderBy = 'sort_order';\n } elseif (in_array($name, ['currencies', 'industries', 'languages', 'countries', 'banks'])) {\n $orderBy = 'name';\n } else {\n $orderBy = 'id';\n }\n $tableData = $class::orderBy($orderBy)->get();\n if ($tableData->count()) {\n Cache::forever($name, $tableData);\n }\n }\n }\n }",
"public function getCacheExp();",
"static function cached_all(){\n return static::get_cache();\n }",
"public function find($expression1, $expression2 = null){\n $ors = func_get_args();\n $objects = $this->items;\n foreach($this->items as $index => $item){\n $remove = true;\n $c = 0;\n foreach($ors as $val){\n foreach($val as $path => $value){\n if($value != parent::_find($path, $item)){\n break;\n }elseif($c == count($ors) - 1){\n $remove = false;\n break 2;\n }\n $c++;\n }\n }\n if($remove){\n unset($objects[$index]);\n }\n }\n return (new ArrayList($this->type))->set($objects);\n }",
"public function warmUpCache(): void\n {\n $this->cache = [];\n foreach ($this->entityAliasResolvers as [$serviceId, $expression]) {\n /** @var EntityAliasResolver $entityAliasResolver */\n $entityAliasResolver = $this->container->get($serviceId);\n $entityAliasResolver->warmUpCache();\n }\n }",
"public function getFromCache() {}",
"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 }",
"function wp_cache_get_multi($groups)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->get_multi($groups);\n}",
"public function bustCache($key = \"*\")\n {\n if ($key === '*') {\n $this->cache = [];\n } else {\n unset($this->cache[$key]);\n }\n return $this->_store();\n }",
"public function cleanLookupCache(){\n\t\t$this->lookup = [];\n\t}",
"public function getObjFromCache($key);",
"protected abstract function filter();",
"function wp_cache_get($key, $group = '', $force = false, &$found = null)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->get($key, $group, $force, $found);\n}",
"function wp_cache_get($key, $group = '', $force = false, &$found = null)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->get($key, $group, $force, $found);\n}",
"function clean_assignments_cache() {\n cache_remove_by_pattern('object_assignments_*');\n cache_remove_by_pattern('object_assignments_*_rendered');\n cache_remove_by_pattern('user_assignments_*');\n }",
"function cache();",
"public static function get_object_from_cache_or_db($object_key, $classname ){\n\t\t$query_list = Model_Kiwi::get_object_from_apc_mem_cache($object_key) ;\n\n\t\tif(!$query_list) {\n\t\t\t$model_name = Model_Kiwi::get_modelname($classname) ;\n\t\t\t$query_list = $model_name::find('all') ;\n\t\t}\n\t\t\n\t\treturn $query_list ;\n\t}",
"function get_cache_bust_tags(): array\n {\n return cache('tags_for_cache_busting', []);\n }",
"public function getCacheReferencedObjects() {}",
"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 find($conditions = null, $fields = array(), $order = null, $recursive = null) {\r\n\t\tif (Configure::read('Cache.disable') === false && Configure::read('Cache.check') === true && isset($fields['cache']) && $fields['cache'] !== false) {\r\n\t\t\t$key = $fields['cache'];\r\n\t\t\t$expires = '+1 hour';\r\n\t\t\t\r\n\t\t\tif (is_array($fields['cache'])) {\r\n\t\t\t\t$key = $fields['cache'][0];\r\n\t\t\t\t\r\n\t\t\t\tif (isset($fields['cache'][1])) {\r\n\t\t\t\t\t$expires = $fields['cache'][1];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Set cache settings\r\n\t\t\tCache::config('sql_cache', array(\r\n\t\t\t\t'prefix' \t=> strtolower($this->name) .'-',\r\n\t\t\t\t'duration'\t=> $expires\r\n\t\t\t));\r\n\t\t\t\r\n\t\t\t// Load from cache\r\n\t\t\t$results = Cache::read($key, 'sql_cache');\r\n\t\t\t\r\n\t\t\tif (!is_array($results)) {\r\n\t\t\t\t$results = parent::find($conditions, $fields, $order, $recursive);\r\n\t\t\t\tCache::write($key, $results, 'sql_cache');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $results;\r\n\t\t}\r\n\t\t\r\n\t\t// Not cacheing\r\n\t\treturn parent::find($conditions, $fields, $order, $recursive);\r\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 cacheFetch() {\n //$data = cache_get($this->id, 'cache');;\n $data = NULL;\n if ($data) {\n foreach ($this->properties as $prop) {\n if (isset($data->data[$prop]) && !empty($data->data[$prop])) {\n $this->$prop = $data->data[$prop];\n }\n }\n }\n }",
"function Atv_getRepoKegiatanAll(): object\n{\n return Cache::remember('repo-kegiatan-all', (60 * 60 * 2/* 2 hours */), function () {\n return Kegiatan::all()->map->kegiatanResourceMap();\n });\n}",
"public function memCached() { return true; }",
"function getTariffPlans()\n{\n return cache()->remember('i.tariffPlans', getCacheILifetime('tariffPlans'), function () {\n return \\App\\Models\\Rate::with([\n 'currency'\n ])\n ->get()\n ->map(function($item) {\n return $item->toArray();\n });\n });\n}",
"public function dettachCache()\n {\n if (!is_null($this->_cache)) {\n unset($this->_cache);\n }\n }",
"function &createCache() {}",
"function clean_object_term_cache($object_ids, $object_type)\n {\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 object_cache_reset() {\n\tglobal $ts_object_cache;\n\n\treturn $ts_object_cache->reset();\n}",
"public function cacheGet() {\n }",
"function wp_cache_get($key, $group = '', $force = \\false, &$found = \\null)\n {\n }",
"protected static function cacheExsits($key)\n {\n \t$class = get_called_class();\n \treturn isset(BaseEntityAbstract::$_entityCache[$class]) && isset(BaseEntityAbstract::$_entityCache[$class][$key]);\n }",
"function wp_clear_object_cache() {\n\tglobal $wpdb, $wp_object_cache;\n\n\t$wpdb->queries = array(); // or define( 'WP_IMPORTING', true );\n\n\tif ( ! is_object( $wp_object_cache ) ) {\n\t\treturn;\n\t}\n\n\t$wp_object_cache->group_ops = array();\n\t$wp_object_cache->stats = array();\n\t$wp_object_cache->memcache_debug = array();\n\t$wp_object_cache->cache = array();\n\n\tif ( is_callable( $wp_object_cache, '__remoteset' ) ) {\n\t\t$wp_object_cache->__remoteset(); // important\n\t}\n}",
"function test_object_refs() {\n\t\t$key = rand_str();\n\t\t$object_a = new stdClass;\n\t\t$object_a->foo = 'alpha';\n\t\t$this->cache->set( $key, $object_a );\n\t\t$object_a->foo = 'bravo';\n\t\t$object_b = $this->cache->get( $key );\n\t\t$this->assertEquals( 'alpha', $object_b->foo );\n\t\t$object_b->foo = 'charlie';\n\t\t$this->assertEquals( 'bravo', $object_a->foo );\n\n\t\t$key = rand_str();\n\t\t$object_a = new stdClass;\n\t\t$object_a->foo = 'alpha';\n\t\t$this->cache->add( $key, $object_a );\n\t\t$object_a->foo = 'bravo';\n\t\t$object_b = $this->cache->get( $key );\n\t\t$this->assertEquals( 'alpha', $object_b->foo );\n\t\t$object_b->foo = 'charlie';\n\t\t$this->assertEquals( 'bravo', $object_a->foo );\n\t}",
"abstract protected function clearCache();",
"abstract protected function getCacheClass();",
"public function cache_gc() {\n // TO DO!!!!!\n }",
"public function getCache();",
"function _get_non_cached_ids($object_ids, $cache_group)\n {\n }",
"public function testRegularCaching2()\n {\n $this->smarty->error_unassigned = Smarty::UNASSIGNED_EXCEPTION;\n $this->smarty->caching = true;\n /*\n foreach (Smarty_Resource_Source::$_resource_cache as $tpl) {\n $tpl->cleanPointer();\n unset($tpl);\n }\n */\n Smarty::$_resource_cache = array();\n try {\n $tpl = $this->smarty->createTemplate('string:{$vars = [1,2,3,4,5]}{foreach $vars as $var}{$v = $var}{nocache}{$v}{/nocache}{/foreach}');\n $tpl->fetch();\n } catch (Smarty_Exception $e) {\n $this->assertEquals(\"Unassigned template variable 'v'\", $e->getMessage());\n\n return;\n }\n\n $this->fail(\"Exception not thrown\");\n }",
"public static function bustAndReloadCache($key = '*')\n {\n $cache = new Cache(ProactionClient::prefix(), ProactionRedis::getInstance());\n $cache->bustCache($key);\n $cache->process();\n }",
"public function purge($expr);",
"function removeMatchingItem($exp){\n\t\tcacheItem::clearMemory(null,$exp);\n\t\t$names = $this->db->select_col(self::$tableName,'name');\n\t\tif( ! empty($names)){\n\t\t\t$rem = array();\n\t\t\tforeach( $names as $name ){\n\t\t\t\tif( preg_match($exp,$name) )\n\t\t\t\t\t$rem[] = $name;\n\t\t\t}\n\t\t\tif( ! empty($rem) )\n\t\t\t\treturn $this->db->delete(self::$tableName,array('WHERE name IN (?)',$rem));\n\t\t}\n\t\treturn true;\n\t}",
"private function refreshCache()\n\t{\n\t\t$this->lookupCache = array();\n\n\t\tif ($this instanceof IComponentContainer) {\n\t\t\tforeach ($this->getComponents() as $component) {\n\t\t\t\tif ($component instanceof self) {\n\t\t\t\t\t$component->refreshCache();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static function clearCache() {\n static::$cachedChecks = [];\n }",
"public function isCached() {}",
"public function getTargetPostsWithCachePaginate(){\n\n $cacheKey = \"{$this->getCacheKey(Auth::user()->email)}.posts\";\n\n return \\Cache::store('redis')\n ->remember($cacheKey, Carbon::now()->addMinutes(15), function (){\n return ['latest'=> $this->getLatestPostsWithPaginate(),\n 'oldest' => $this->getOldestPostsWithPaginate(),\n 'rand' => $this->getRandPostsWithPaginate()\n ];\n });\n }",
"public function filter();",
"function clear_object_cache() {\n\tglobal $wpdb, $wp_object_cache;\n\n\t$wpdb->queries = [];\n\n\tif ( ! is_object( $wp_object_cache ) ) {\n\t\treturn;\n\t}\n\n\t$wp_object_cache->group_ops = [];\n\t$wp_object_cache->stats = [];\n\t$wp_object_cache->memcache_debug = [];\n\t$wp_object_cache->cache = [];\n\n\tif ( method_exists( $wp_object_cache, '__remoteset' ) ) {\n\t\t$wp_object_cache->__remoteset();\n\t}\n}",
"public function clearCache()\n {\n $this->pathsCache = array();\n $this->filterCache = array();\n return $this;\n }",
"public function _cache_refresh_all()\n {\n }",
"protected function analyzeCachingTables() {}",
"public function testCaching2()\n {\n $this->smarty->caching = true;\n /*\n foreach (Smarty_Resource_Source::$_resource_cache as $tpl) {\n $tpl->cleanPointer();\n unset($tpl);\n }\n */\n Smarty::$_resource_cache = array();\n $tpl = $this->smarty->createTemplate('string:{$vars = [1,2,3,4,5]}{foreach $vars as $var}{$v = $var cachevalue}{nocache}{$v}{/nocache}{/foreach}');\n $this->assertEquals('12345', $tpl->fetch());\n }",
"public function should_suggest_persistent_object_cache()\n {\n }",
"public function getAll($cache = true) {}",
"public function cache(): object\n {\n return $this->baseApp($this)->loadCache();\n }",
"protected function getRuntimeCache() {}",
"protected function removeExpiredCacheEntries() {}",
"public function getCacheLookups()\n {\n return $this->cacheLookups;\n }",
"final public function rebuild_cache($cache_name = null) {\n\n\t\t\t// if we want to rebuild specific kind of cache or all of it\n\t\t\t$rebild_cache = (!is_null($cache_name) && array_key_exists($cache_name, $this->cache)) ? array($cache_name => $this->cache[$cache_name]) : $this->cache;\n\n\t\t\tforeach ($rebild_cache as $name => $options) {\n\t\t\t\tif (!array_key_exists('fields', $options)) continue;\n\n\t\t\t\t$options = array_merge(array('conditions' => null, 'order' => null, 'limit' => null), $options);\n\n\t\t\t\t// find if the array of fields is multidimensional array - so we got to consider the the associations\n\t\t\t\tif (count($options['fields']) == count($options['fields'], 1)) {\n\t\t\t\t\t// no multidimensional array so no associations\n\t\t\t\t\t$associations = array();\n\t\t\t\t\t// keys to fetch are all 'fields' elements\n\t\t\t\t\t$keys = array_combine($options['fields'], $options['fields']);\n\t\t\t\t} else {\n\t\t\t\t\t// filter the associations out\n\t\t\t\t\t$associations = array_filter($options['fields'], 'is_array');\n\t\t\t\t\t// get only the fields which are no associations\n\t\t\t\t\t$keys = array_diff_key($options['fields'], $associations);\n\t\t\t\t\t// keys to fetch from main object\n\t\t\t\t\t$keys = array_combine($keys, $keys);\n\t\t\t\t}\n\n\t\t\t\t$store = array();\n\t\t\t\t// we loop through all locales\n\t\t\t\tforeach (Config()->LOCALE_SHORTCUTS as $lang) {\n\t\t\t\t\t$this->set_locale($lang);\n\t\t\t\t\t// preserve index for better cache structure\n\t\t\t\t\t$preserve_index = $this->preserve_index;\n\t\t\t\t\t$this->preserve_index = true;\n\t\t\t\t\t// find all elements according to conditions, order and limit\n\t\t\t\t\t$items = $this->find_all($options['conditions'], $options['order'], $options['limit']);\n\t\t\t\t\t// return preserve index to its original state\n\t\t\t\t\t$this->preserve_index = $preserve_index;\n\n\t\t\t\t\tforeach ($items as $id => $item) {\n\t\t\t\t\t\t// fetch the coresponding fields from each item\n\t\t\t\t\t\t$values = array();\n\t\t\t\t\t\tforeach($keys as $k) {\n\t\t\t\t\t\t $values[$k] = $item->$k;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// store them according to i18n settings\n\t\t\t\t\t\tif ($this->is_i18n == true) {\n\t\t\t\t\t\t\t$store[$lang][$id] = $values;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$store[$id] = $values;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// loop through associations and fetch their data\n\t\t\t\t\t\tforeach ($associations as $association => $fields) {\n\t\t\t\t\t\t\t// fetch the coresponding fields from each association\n\t\t\t\t\t\t\t$values = array_intersect_key((array)($item->$association()), array_combine($fields, $fields));\n\t\t\t\t\t\t\tif (empty($values)) continue;\n\t\t\t\t\t\t\t// store them according to i18n settings\n\t\t\t\t\t\t\tif ($this->is_i18n == true) {\n\t\t\t\t\t\t\t\t$store[$lang][$id][$association] = $values;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$store[$id][$association] = $values;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// write cache\n\t\t\t\t$cache_with_model = Inflector::tableize($this->get_class_name()) . '_' . $name;\n\t\t\t\t$cache_file = Config()->ROOT_PATH . 'cache/site/' . $cache_with_model . '.cache';\n\t\t\t\t$file = fopen($cache_file, \"w\");\n\t\t\t\t@flock($file, LOCK_EX);\n\t\t\t\tfwrite($file, \"<?php\\n\\$this->cached_results['\" . $cache_with_model . \"'] = \" . var_export($store, true) . \";\\n?>\");\n\t\t\t\t@flock($file, LOCK_UN);\n\t\t\t\tfclose($file);\n\t\t\t\t@chmod($cache_file, 0666);\n\t\t\t}\n\n\t\t\t// return back to original locale\n\t\t\t$this->set_locale(Registry()->locale);\n\t\t}",
"public function testGetDoesNotUseCacheObjectForSecondCall()\n {\n $cache = Mockery::mock('\\Imdb\\Cache');\n $cache->shouldReceive('get')->once()->andReturn('test');\n\n $pages = new Pages(new Config(), $cache, new Logger(false));\n\n $result = $pages->get('/');\n\n $this->assertEquals('test', $result);\n\n $result2 = $pages->get('/');\n\n $this->assertEquals('test', $result2);\n }",
"private function loadMatchUnMatchedCollection()\n {\n foreach ($this->mergeCollection as $key => $item) {\n $search = $this->baseCollection;\n foreach ($this->pivots as $basePivot => $mergePivot) {\n $search = $search->whereIn($basePivot, $item->$mergePivot);\n }\n\n $found = $search->first();\n\n if (!$found) {\n $this->report->unmatched()->push($item);\n } else {\n $this->report->matched()->push($found);\n }\n\n }\n }",
"public static function cached($_name) {\n\t\t$_name=self::resolve($_name);\n\t\t$_hash='var.'.self::hashCode(self::remix($_name));\n\t\treturn Cache::cached($_hash);\n\t}",
"protected function getMemoryCache() {}",
"function retrieveRelated($productName)\n{\n return S::of(function (Cacher $cache) use ($productName) {\n // do some database work\n $products = ['iPhone 5', 'iPhone 6s'];\n\n return [$products, $cache->put($productName, $products)];\n });\n}",
"function apc_cache_pre_get_keyword($args) {\n\tglobal $ydb;\n\t$keyword = $args[0];\n\t$use_cache = isset($args[1]) ? $args[1] : true;\n\t\n\t// Lookup in cache\n\tif($use_cache && apc_exists(apc_cache_get_keyword_key($keyword))) {\n\t\t$ydb->infos[$keyword] = apc_fetch(apc_cache_get_keyword_key($keyword)); \t\n\t}\n}",
"public function filterProvider()\n {\n $entity1 = $this->createMock(EntityInterface::class);\n $entity2 = $this->createMock(EntityInterface::class);\n $entity3 = $this->createMock(EntityInterface::class);\n $entity4 = $this->createMock(EntityInterface::class);\n $entity5 = $this->createMock(EntityInterface::class);\n $entity6 = $this->createMock(EntityInterface::class);\n\n $entity1->foo = 'bar';\n $entity2->foo = 123;\n $entity4->foo = '123';\n $entity5->foo = ['1230'];\n $entity6->foo = [1234, 123, 'teta'];\n\n $entities = [$entity1, $entity2, $entity3, $entity4, $entity5, $entity6];\n\n $filter = function($entity) {\n return isset($entity->foo) && $entity->foo == 123;\n };\n\n return [\n [$entities, ['foo' => 123], false, [1 => $entity2, 3 => $entity4, 5 => $entity6]],\n [$entities, ['foo' => 123], true, [1 => $entity2, 5 => $entity6]],\n [$entities, $filter, false, [1 => $entity2, 3 => $entity4]],\n [$entities, $filter, true, [1 => $entity2, 3 => $entity4]],\n [$entities, [], false, $entities],\n [$entities, [], true, $entities],\n [[], ['foo' => 123], true, []],\n [[], ['foo' => 123], false, []],\n [[], $filter, true, []],\n [[], $filter, false, []],\n ];\n }",
"function loadCacheObject ()\n {\n if (!$this->cacheObjectLocked()) {\n $return = $this->cacheObjectContents($this->cacheObjectId);\n } else {\n $return = $this->loadLockedObject();\n }\n\n return $return;\n }",
"function wp_cache_get( $key, $group = '', $force = false, &$found = null ) {\n\t\treturn false;\n\t}",
"function eve_api_get_page_cache($name) {\n ctools_include('object-cache');\n $cache = ctools_object_cache_get('eve_api', $name);\n\n // If the cached object doesn't exist yet, create an empty object.\n if (!$cache) {\n $cache = new stdClass();\n $cache->locked = ctools_object_cache_test('eve_api', $name);\n }\n\n return $cache;\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 find(\n\t\t$_criteria=NULL,\n\t\t$_order=NULL,\n\t\t$_limit=NULL,\n\t\t$_ttl=0) {\n\t\t\treturn $this->lookup('*',$_criteria,NULL,$_order,$_limit,$_ttl);\n\t}",
"function maybe_tagged_cache(array|string $names = 'taxonomies'): TaggedCache|CacheManager\n {\n try {\n return Cache::tags($names);\n } catch (Exception) {\n return cache();\n }\n }",
"private function fromCache($x, $y)\n {\n return $this->cache[$x][$y];\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 }",
"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}",
"protected function loadFromCache() {}",
"public function testFilter() {\n $data = $this->expanded;\n\n $match1 = $data;\n $match2 = $data;\n unset($match1['empty'], $match2['empty'], $match1['one']['two']['three']['false'], $match1['one']['two']['three']['null']);\n\n $this->assertEquals($match1, Hash::filter($data));\n $this->assertEquals($match2, Hash::filter($data, false));\n\n $data = array(\n 'true' => true,\n 'false' => false,\n 'null' => null,\n 'zero' => 0,\n 'stringZero' => '0',\n 'empty' => array(),\n 'array' => array(\n 'false' => false,\n 'null' => null,\n 'empty' => array()\n )\n );\n\n $this->assertEquals(array(\n 'true' => true,\n 'zero' => 0,\n 'stringZero' => '0'\n ), Hash::filter($data));\n }",
"public static function disableCaching(): void\n {\n static::$currencies = [];\n static::$caching = false;\n }",
"function searchRelated($productName)\n{\n // TODO: 1. try use doM\n // TODO: 2. try implement getOrElse\n return checkRelatedInCache($productName)\n ->bind(function (Maybe\\Maybe $products) use ($productName) {\n switch (get_class($products)) {\n case Maybe\\Just::class:\n return S\\value($products->extract());\n case Maybe\\Nothing::class:\n return retrieveRelated($productName);\n }\n });\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}",
"private function setup_cache() {\n // Set up non-persistent object caching groups\n wp_cache_add_non_persistent_groups( [ '_np_pedestal' ] );\n }",
"function wp_using_ext_object_cache($using = \\null)\n {\n }",
"private function _refresh_cache(){\n\t\t\tclear_cache_for_special_values_directory( array(\n\t\t\t\t\"permanent\" => true,\n\t\t\t\t\"directory_name\" => $this->table_name,\n\t\t\t) );\n\t\t\t\n\t\t\tunset( $this->class_settings['user_id'] );\n\t\t\t$this->class_settings[ 'do_not_check_cache' ] = 1;\n\t\t\t$this->class_settings[ 'current_record_id' ] = 'pass_condition';\n\t\t\t$this->_get_discount();\n\t\t}",
"public function cached() : Query {\n $this->_executed = true;\n return $this;\n }",
"public function getCacheInvalidator();",
"public function clearCache(): void\n {\n $this->cache = [];\n foreach ($this->entityAliasResolvers as [$serviceId, $expression]) {\n /** @var EntityAliasResolver $entityAliasResolver */\n $entityAliasResolver = $this->container->get($serviceId);\n $entityAliasResolver->clearCache();\n }\n }",
"public function filtering();",
"protected function billed()\n {\n return $this->builder->where('billed', true);\n }",
"private function inCache()\n\t{\n\t\t$content = $this->_cache->retrieve($this->redditid); //faster if we have it in cache already\n\t\treturn $content;\n\t}",
"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 function wasCached();",
"function wp_cache_replace($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->replace($key, $value, $group, $expiration);\n}",
"protected static function getRuntimeCache() {}",
"public static function purgeCaches() {}",
"public function lazy();"
] | [
"0.49858633",
"0.4962006",
"0.4936239",
"0.48198456",
"0.48090404",
"0.4764583",
"0.47414848",
"0.47315356",
"0.4667644",
"0.46592084",
"0.4653988",
"0.46442997",
"0.46230814",
"0.46156648",
"0.46076035",
"0.45869455",
"0.45869455",
"0.45849377",
"0.45609215",
"0.45608068",
"0.45434177",
"0.4539951",
"0.45137632",
"0.44928953",
"0.44627023",
"0.44573942",
"0.44551957",
"0.44528708",
"0.44431636",
"0.4422789",
"0.44103983",
"0.44029567",
"0.440223",
"0.43881974",
"0.43867975",
"0.438402",
"0.43791795",
"0.43715096",
"0.43695",
"0.43694463",
"0.4365939",
"0.4363662",
"0.436098",
"0.43390426",
"0.43296367",
"0.43283114",
"0.43207338",
"0.43195432",
"0.43190628",
"0.43073258",
"0.4307178",
"0.43038145",
"0.43008506",
"0.4299743",
"0.42699122",
"0.4268841",
"0.42605612",
"0.42457974",
"0.42413148",
"0.42300752",
"0.4229959",
"0.4229771",
"0.42221683",
"0.4220093",
"0.42154518",
"0.4205111",
"0.42038232",
"0.42035842",
"0.4200664",
"0.41981456",
"0.41910282",
"0.41899014",
"0.41872782",
"0.4186245",
"0.4184348",
"0.41829017",
"0.41820246",
"0.41815963",
"0.41809365",
"0.41756862",
"0.4175",
"0.417142",
"0.41700947",
"0.41655275",
"0.416544",
"0.4163168",
"0.41591617",
"0.41529033",
"0.4149151",
"0.41361845",
"0.41338658",
"0.41338354",
"0.41317222",
"0.41253674",
"0.4123937",
"0.41222256",
"0.41222188",
"0.41207975",
"0.41176873",
"0.41145504",
"0.4111505"
] | 0.0 | -1 |
Bans (purges) an URL and all pages underneath it | public function banUrl($url, $recursive = false) {
$parts = parse_url($url);
$host = $parts['host'];
if (!isset($parts['host'])) {
throw new VarnishException('Invalid URL provided: no host set');
}
if (isset($parts['port'])) {
$host .= ':' . $parts['port'];
}
if (isset($parts['path'])) {
$path = $parts['path'];
} else {
$path = '/';
}
if (isset($parts['query'])) {
$path .= '?' . $parts['query'];
} elseif (substr($url, -1) == '?') {
$path .= '?';
}
$host = $this->escapeForRegex($host);
$path = $this->escapeForRegex($path);
$expression = 'req.http.host ~ "^(?i)' . $host . '$" && req.url ~ "^' . $path . (!$recursive ? '$' : '') . '"';
return $this->ban($expression);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function findPageUrls();",
"private function filterUrl($url){\n\t\t\n\t\t// Get the global config\n\t\tglobal $CrawlerConfig;\n\t\t\n\t\t// Make sure the URL isn't \"#\"\n\t\tif(substr($url, 0, 1) == \"#\") return false;\n\t\t\n\t\tif(substr($url, 0, 2) == \"//\") $url = \"http:\".$url;\n\t\t\n\t\t// If it's already valid, nothing else needs to be done\n\t\tif(filter_var($url, FILTER_VALIDATE_URL)) return $url;\n\t\t\n\t\t// If it's a partial path, generate full path\n\t\tif(substr($url, 0, 1) == \"/\"){\n\t\t\t\n\t\t\t// Glue pieces together\n\t\t\t$turl = $CrawlerConfig['BASE_URL'].$url;\n\t\t\t\n\t\t\t// If it worked, return it\n\t\t\tif(filter_var($turl, FILTER_VALIDATE_URL)) return $turl;\n\t\t}\n\t\t\n\t\t// Temporary URL var\n\t\t$turl = rtrim($this->current_location,\"/\").\"/\".ltrim($url,\"/\");\n\t\t\n\t\t// Try one more time\n\t\tif(filter_var($turl, FILTER_VALIDATE_URL)) return $turl;\n\t\t\n\t\treturn false;\n\t}",
"function get_url_content($url=''){\n\n get_clean_url($url);\n show_route_content();\n \n enable_url_aliases();\n \n //~ echo $_GET['fetched-url'];\n //~ echo '<br>';\n //~ print_r($_GET['clean-url']);\n //~ print_r($_SESSION);\n}",
"function sanitize_trackback_urls($to_ping)\n {\n }",
"private function extract_pages(){\r\n $dom = new DOMDocument();\r\n @$dom->loadHTMLFile($this->get_sitemap_url());\r\n $dOMXPath = new DOMXPath($dom);\r\n foreach ($dOMXPath->query(\"//urlset/url/loc\") as $node) {\r\n $this->add_page($node->nodeValue);\r\n }\r\n\t}",
"public function crawl()\n\t{\n \t// truncate any non-existant pages\n\t\t$this->resetIndex();\n\n\t\t// create a temporary table for incrementing counts\n\t\t$this->createTempTable();\n\n\t\t// add initial URL to crawl list\n\t\t$this->addRequest($this->startUrl);\n\n\t\t// begin crawling the url\n\t\t$this->crawlUrls();\n\n\t\t// update url counts and remove the temp table\n\t\t$this->finalizeUrlCounts();\n\t}",
"function spider($url)\n {\n global $http_urls;\n $url_array = array();\n\n //判断url是否有效,这个方法效率太低,不能用\n /*$array = get_headers($url,1); \n if(preg_match('/200/',$array[0])){ \n echo \"<pre/>\";\n print_r($array);\n }\n else\n {\n echo \"无效url资源!\";\n }*/\n $first_content = file_get_contents($url);\n $second_content = file_get_contents($url);\n \n $first_pattern = \"/^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$/\";\n $second_pattern = \"/http:\\/\\/[a-zA-Z0-9\\.]+/\";\n \n preg_match_all($first_pattern, $first_content, $first_match);\n preg_match_all($second_pattern, $second_content, $second_match);\n \n $result1 = array_unique($first_match[0]);\n $result2 = array_unique($second_match[0]);\n \n $final_urls = array_merge($result1, $result2);\n \n //print_r($final_urls);\n \n for($n = 0; $n < count($final_urls); $n++)\n {\n //echo $final_urls[$i].\"<br/>\";\n if(@file_get_contents($final_urls[$n])) $http_urls[] = $final_urls[$n];\n //spider($final_urls[$i]);\n }\n //print_r($http_urls);\n //spider($final_urls[0]);\n //parser($url);\n }",
"public function crawl(){\n\t\t\t$this->collectUrls();\n\t\t}",
"function crawlUrl($url) {\n\n global $alreadyCrawled;\n global $stillCrawling;\n\n $parser = new DomDocumentParser($url);\n $linkList = $parser->getLinkTags();\n\n foreach ($linkList as $link) {\n $href = $link->getAttribute(\"href\");\n\n // ingore when the <a> href value contains a # instead of a valid link\n if (strpos($href, \"#\") !== false) {\n continue;\n }\n // ignore when the <a> href value starts with \"javascript:\"\n else if (substr($href, 0, 11) == \"javascript:\") {\n continue;\n }\n\n $href = convertRealtiveToAbsoluteUrl($href, $url);\n \n // skip links which are not any type of relative url and does not get converted\n if ($href == -1) {\n continue;\n }\n\n if (!in_array($href, $alreadyCrawled)) {\n $alreadyCrawled[] = $href; // append to the already crawled so we don't visit next time\n $stillCrawling[] = $href;\n\n getUrlDetails($href);\n }\n //else return; // just stop FOR NOW when duplicate to avoid infinite loop\n }\n\n // remove already crawled url\n array_shift($stillCrawling);\n\n //recursively perform the same operation on every site\n foreach ($stillCrawling as $site) {\n crawlUrl($site);\n }\n}",
"public function start()\n {\n $this->unvisitedUrl[] = $this->baseUrl;\n $counter = count($this->unvisitedUrl);\n\n while (($counter > 0) && ($url = array_shift($this->unvisitedUrl))) {\n $this->crawl($url);\n\n $counter = count($this->unvisitedUrl);\n }\n }",
"function darksnow_url_grabber() {\n\tif ( ! preg_match( '/<a\\s[^>]*?href=[\\'\"](.+?)[\\'\"]/is', get_the_content(), $matches ) )\n\t\treturn false;\n\n\treturn esc_url_raw( $matches[1] );\n}",
"function wp_extract_urls($content)\n {\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 request_not_found(&$url, $page) {\n if(substr($url, -1) != '/') {\n $page = \\femto\\Page::resolve($url.'/');\n if($page) {\n header('Location: '.$page['url'], true, 301);\n exit();\n }\n }\n}",
"function virustotalscan_scan_url($message)\r\n{\r\n\tglobal $mybb;\r\n // in momentul in care se apeleaza aceasta functie toate testele au fost facute\r\n // altfel se incepe scanarea prin construirea cheii\r\n $key = $mybb->settings['virustotalscan_setting_key'];\r\n // se parseaza eventuale legaturi\r\n $message = preg_replace('#<a href=\"(.*?)\"(.*?)>(.*?)</a>#s', virustotalscan_check_url('\\1', '\\3', '\\2', $key), $message);\r\n // dupa prelucrari se iese din functie\r\n return;\r\n}",
"public static function scan($url)\n\t{\n\t array_push(self::$siteMapUrls, $url);\n\n\t // Get the initial data\n\t $html = siteMap::getUrl($url);\n\n\t // Break it up\n\t $a1 = explode (\"<a\", $html);\n\n\t foreach ($a1 as $key => $val) {\n\t\t\t$parts = explode (\">\", $val);\n\t\t\t$a = $parts[0];\n\t\t\t$aparts = explode (\"href=\", $a);\n\t\t\tif(!isset($aparts[1])) { continue; }\n\t\t\t$hrefparts = explode (\" \", $aparts[1]);\n\t\t\t$hrefparts2 = explode (\"#\", $hrefparts[0]);\n\t\t\t$href = str_replace (\"\\\"\", \"\", $hrefparts2[0]);\n\t\t\t\n\t\t\t//var_dump($href);\n\t\t\tif($href == \"\") { \t\t\t\tcontinue; }\n\t\t\tif(strstr($href,\"Notice:\")) { \tcontinue; }\n\t\t\tif(strstr($href,\"'\")) { \t\tcontinue; }\n\t\t\t$href = str_replace(\" \", \"\", $href);\n\n\t\t\t// get the href\n\t\t\tif ((substr ($href, 0, 7) != \"http://\") && \n\t\t\t (substr ($href, 0, 8) != \"https://\") &&\n\t\t\t (substr ($href, 0, 6) != \"ftp://\")) {\n\t\t\t if ($href[0] == '/') {\n\t\t\t\t\t$href = self::$siteMapUrls[0].$href;\n\t\t\t } else {\n\t\t\t\t\t$href = siteMap::path($url) . $href;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If the href is the domain then do it...\n\t\t\tif (substr($href, 0, strlen (self::$siteMapUrls[0])) == self::$siteMapUrls[0]) {\n\t\t\t if ((!in_array ($href, self::$siteMapUrls))) {\n\t\t\t\t\techo $href.\"\\n\";\n\t\t\t\t\tsiteMap::scan($href);\n\t\t\t }\n\t\t\t}\n\t }\n\t}",
"function boinkIt($url){\r\n\t\t// Ensure &s are taken care of\r\n\t\tif($url == ''){\r\n\t\t\t$url = '/';\r\n\t\t}else{\r\n\t\t\t$url = str_replace( \"&\", \"&\", $url );\r\n\t\t}\r\n\t\tif($this->vars['redirect'] == 'location'){\r\n\t\t\t@header(\"Location: \".$url);\r\n\t\t}elseif($this->vars['redirect'] == 'refresh'){\r\n\t\t\t@header(\"Refresh: 0;url=\".$url);\r\n\t\t}elseif($this->vars['header_redirect'] == 'html'){\r\n\t\t\techo(\"<html><head><meta http-equiv='refresh' content='0; url=$url'></head><body></body></html>\");\r\n\t\t}\r\n\t\texit();\r\n\t}",
"public function crawl()\n {\n foreach ($this->urlQueue as $k => $url) {\n echo \"\\n[\" . $k . \"] \" . $url;\n ob_flush();\n flush();\n \n $parser = $this->getParser($url);\n if ($parser !== false) {\n $links = $this->getLinksOnPage($url, $parser);\n $this->urlQueue->addFromArray($links);\n }\n }\n \n echo print_r($this->urlQueue, true);\n }",
"function cldcwhitehallURL() {\n return \"./?page=cl_dc_whitehall\";\n}",
"public static function sitemap($_url='/') {\n\t\t$_map=&F3::$global['SITEMAP'];\n\t\tif (array_key_exists($_url,$_map) && $_map[$_url]['status']!==NULL)\n\t\t\t// Already crawled\n\t\t\treturn;\n\t\tpreg_match('/^http[s]*:\\/\\/([^\\/$]+)/',$_url,$_host);\n\t\tif (!empty($_host) && $_host[1]!=$_SERVER['SERVER_NAME']) {\n\t\t\t// Remote URL\n\t\t\t$_map[$_url]['status']=FALSE;\n\t\t\treturn;\n\t\t}\n\t\tF3::$global['QUIET']=TRUE;\n\t\tF3::mock('GET '.$_url);\n\t\tF3::run();\n\t\t// Check if an error occurred or no HTTP response\n\t\tif (F3::$global['ERROR'] || !F3::$global['RESPONSE']) {\n\t\t\t$_map[$_url]['status']=FALSE;\n\t\t\t// Reset error flag for next page\n\t\t\tunset(F3::$global['ERROR']);\n\t\t\treturn;\n\t\t}\n\t\t$_doc=new XMLTree('1.0',F3::$global['ENCODING']);\n\t\tif ($_doc->loadHTML(F3::$global['RESPONSE'])) {\n\t\t\t// Valid HTML; add to sitemap\n\t\t\tif (!$_map[$_url]['level'])\n\t\t\t\t// Web root\n\t\t\t\t$_map[$_url]['level']=0;\n\t\t\t$_map[$_url]['status']=TRUE;\n\t\t\t$_map[$_url]['mod']=time();\n\t\t\t$_map[$_url]['freq']=0;\n\t\t\t// Cached page\n\t\t\t$_hash='url.'.F3::hashCode('GET '.$_url);\n\t\t\t$_cached=Cache::cached($_hash);\n\t\t\tif ($_cached) {\n\t\t\t\t$_map[$_url]['mod']=$_cached['time'];\n\t\t\t\t$_map[$_url]['freq']=$_SERVER['REQUEST_TTL'];\n\t\t\t}\n\t\t\t// Parse all links\n\t\t\t$_links=$_doc->getElementsByTagName('a');\n\t\t\tforeach ($_links as $_link) {\n\t\t\t\t$_ref=$_link->getAttribute('href');\n\t\t\t\t$_rel=$_link->getAttribute('rel');\n\t\t\t\tif (!$_ref || $_rel && preg_match('/nofollow/',$_rel))\n\t\t\t\t\t// Don't crawl this link!\n\t\t\t\t\tcontinue;\n\t\t\t\tif (!array_key_exists($_ref,$_map))\n\t\t\t\t\t$_map[$_ref]=array(\n\t\t\t\t\t\t'level'=>$_map[$_url]['level']+1,\n\t\t\t\t\t\t'status'=>NULL\n\t\t\t\t\t);\n\t\t\t}\n\t\t\t// Parse each link\n\t\t\tarray_walk(array_keys($_map),'self::sitemap');\n\t\t}\n\t\tunset($_doc);\n\t\tif (!$_map[$_url]['level']) {\n\t\t\t// Finalize sitemap\n\t\t\t$_depth=1;\n\t\t\twhile ($_ref=current($_map))\n\t\t\t\t// Find depest level while iterating\n\t\t\t\tif (!$_ref['status'])\n\t\t\t\t\t// Remove remote URLs and pages with errors\n\t\t\t\t\tunset($_map[key($_map)]);\n\t\t\t\telse {\n\t\t\t\t\t$_depth=max($_depth,$_ref['level']+1);\n\t\t\t\t\tnext($_map);\n\t\t\t\t}\n\t\t\t// Create XML document\n\t\t\t$_xml=simplexml_load_string(\n\t\t\t\t'<?xml version=\"1.0\" encoding=\"'.\n\t\t\t\t\tF3::$global['ENCODING'].'\"?>'.\n\t\t\t\t'<urlset xmlns=\"'.\n\t\t\t\t\t'http://www.sitemaps.org/schemas/sitemap/0.9'.\n\t\t\t\t'\"/>'\n\t\t\t);\n\t\t\t$_host='http://'.$_SERVER['SERVER_NAME'];\n\t\t\tforeach ($_map as $_key=>$_ref) {\n\t\t\t\t// Add new URL\n\t\t\t\t$_item=$_xml->addChild('url');\n\t\t\t\t// Add URL elements\n\t\t\t\t$_item->addChild('loc',$_host.$_key);\n\t\t\t\t$_item->addChild('lastMod',date('c',$_ref['mod']));\n\t\t\t\t$_item->addChild('changefreq',\n\t\t\t\t\tself::frequency($_ref['freq']));\n\t\t\t\t$_item->addChild('priority',\n\t\t\t\t\tsprintf('%1.1f',1-$_ref['level']/$_depth));\n\t\t\t}\n\t\t\t// Send output\n\t\t\tF3::$global['QUIET']=FALSE;\n\t\t\tif (PHP_SAPI!='cli' && !headers_sent())\n\t\t\t\theader(F3::HTTP_Content.': application/xhtml+xml; '.\n\t\t\t\t\t'charset='.F3::$global['ENCODING']);\n\t\t\t$_xml=dom_import_simplexml($_xml)->ownerDocument;\n\t\t\t$_xml->formatOutput=TRUE;\n\t\t\techo $_xml->saveXML();\n\t\t}\n\t}",
"function process_urls($urls) {\n\tif (count($urls) > 0) {\n\t\techo '<p>Getting url:'.$urls[0].', '. count($urls) .' remaining</p>';\n\t\tget_url_info($urls[0], $urls);\n\t}\n}",
"public function crawl_page($url, $depth = 5){\n $seen = array();\n if(($depth == 0) or (in_array($url, $seen))){\n return;\n } \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n $result = curl_exec ($ch);\n curl_close ($ch);\n if( $result ){\n $stripped_file = strip_tags($result, \"<a>\");\n preg_match_all(\"/<a[\\s]+[^>]*?href[\\s]?=[\\s\\\"\\']+\".\"(.*?)[\\\"\\']+.*?>\".\"([^<]+|.*?)?<\\/a>/\", $stripped_file, $matches, PREG_SET_ORDER ); \n foreach($matches as $match){\n $href = $match[1];\n if (0 !== strpos($href, 'http')) {\n $path = '/' . ltrim($href, '/');\n if (extension_loaded('http')) {\n $href = http_build_url($href , array('path' => $path));\n } else {\n $parts = parse_url($href);\n $href = $parts['scheme'] . '://';\n if (isset($parts['user']) && isset($parts['pass'])) {\n $href .= $parts['user'] . ':' . $parts['pass'] . '@';\n }\n $href .= $parts['host'];\n if (isset($parts['port'])) {\n $href .= ':' . $parts['port'];\n }\n $href .= $path;\n }\n }\n $this->crawl_page($href, $depth - 1);\n }\n} \n return $matches;\n}",
"function boink_it($url)\n\t{\n\t\t// Ensure &s are taken care of\n\t\t\n\t\t$url = str_replace( \"&\", \"&\", $url );\n\t\t\n\t\tif ($this->vars['header_redirect'] == 'refresh')\n\t\t{\n\t\t\t@header(\"Refresh: 0;url=\".$url);\n\t\t}\n\t\telse if ($this->vars['header_redirect'] == 'html')\n\t\t{\n\t\t\t$url = str_replace( '&', '&', str_replace( '&', '&', $url ) );\n\t\t\techo(\"<html><head><meta http-equiv='refresh' content='0; url=$url'></head><body></body></html>\");\n\t\t\texit();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t@header(\"Location: \".$url);\n\t\t}\n\t\texit();\n\t}",
"public function getBillPageHtml($url) {\n $ch = curl_init();\n $timeout = 10;\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n $response = curl_exec($ch);\n curl_close($ch);\n\n // Just focus on the main content (stripping the header)\n $matches = array();\n preg_match(\"/\\<div class=\\\"LegContent\\\"\\>(.*)\\<\\/div\\>/s\", $response, $matches);\n $html = $matches[0];\n \n // Remove this clear div and all the footer stuff after it\n $html = preg_replace(\"/\\<div class=\\\"LegNavClear\\\"\\>.*/s\", '', $html);\n \n // No links please, we're hackers.\n $html = preg_replace(\"/\\<a(.*?)href=\\\"(.*?)\\\"(.*?)\\>/s\", '', $html);\n $html = preg_replace(\"/\\<a\\/\\>/s\", '', $html);\n \n return $html;\n }",
"private function analyzeURL() {\n\t\tif (!$this->_isAnalyzed) {\n\t\t\t// Don't call this method twice!\n\t\t\t$this->_isAnalyzed = true;\n\t\t\t$this->_isAnalyzing = true;\n\t\t\t\n\t\t\ttry {\n\t\t\t\ttry {\n\t\t\t\t\t$trunkURL = new URL(Config::getEmptyURLPrefix());\n\t\t\t\t} catch (FormatException $e) {\n\t\t\t\t\tthrow new CorruptDataException('The url prefix is not a valid url: '.\n\t\t\t\t\t\tConfig::getEmptyURLPrefix());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// The request url might not be a valid url...\n\t\t\t\ttry {\n\t\t\t\t\t$requestURL = new URL($this->_url);\n\t\t\t\t} catch (FormatException $e) {\n\t\t\t\t\t$this->_pageNode = new PageNotFoundNode(new StructurePageNode(), '');\n\t\t\t\t\t$this->_relativeRequestURL = '';\n\t\t\t\t\t$this->_isAnalyzing = false;\n\t\t\t\t\t$this->_project = Project::getOrganization();\n\t\t\t\t\t$this->_language = Language::getDefault();\n\t\t\t\t\t$this->_edition = Edition::COMMON;\n\t\t\t\t\treturn; \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// We can't use the URL class here because the template contains\n\t\t\t\t// characters ({ and }) that are now allowed in a url\n\t\t\t\tpreg_match('/[^:]+\\:\\/\\/(?P<host>[^\\/]+)(?<path>.*)/i',\n\t\t\t\t\tConfig::getURLTemplate(), $matches);\n\t\t\t\t$templateHost = $matches['host'];\n\t\t\t\t$templatePath = $matches['path'];\n\t\t\t\t\t\n\t\t\t\t// Goes through all elements and checks if they match to any available\n\t\t\t\t// template.\n\t\t\t\t// Returns the index of the element after the last used one\n\t\t\t\t$walker = function($elements, $templates, $trunkElements,\n\t\t\t\t\t$breakOnFailure, $state)\n\t\t\t\t{\n\t\t\t\t\tif (count($trunkElements)) {\n\t\t\t\t\t\tif (count($elements) > count($trunkElements))\n\t\t\t\t\t\t\tarray_splice($elements, -count($trunkElements));\n\t\t\t\t\t\tif (count($templates) > count($trunkElements))\n\t\t\t\t\t\t\tarray_splice($templates, -count($trunkElements));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor ($i = 0; $i < count($elements); $i++) {\n\t\t\t\t\t\t$element = $elements[$i];\n\t\t\t\t\t\tforeach ($templates as $templateKey => $template) {\n\t\t\t\t\t\t\t// Check if the lement matches the template. Test the strongest\n\t\t\t\t\t\t\t// defined template at first.\n\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\tswitch ($template) {\n\t\t\t\t\t\t\t\tcase '{edition}':\n\t\t\t\t\t\t\t\t\tswitch ($element) {\n\t\t\t\t\t\t\t\t\t\tcase 'mobile':\n\t\t\t\t\t\t\t\t\t\t\t$state->edition = Edition::MOBILE;\n\t\t\t\t\t\t\t\t\t\t\t$ok = true;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'print':\n\t\t\t\t\t\t\t\t\t\t\t$state->edition = Edition::PRINTABLE;\n\t\t\t\t\t\t\t\t\t\t\t$ok = true;\n\t\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\tbreak;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcase '{language}':\n\t\t\t\t\t\t\t\t\t$lang = Language::getByName($element);\n\t\t\t\t\t\t\t\t\tif ($lang) {\n\t\t\t\t\t\t\t\t\t\t$state->language = $lang;\n\t\t\t\t\t\t\t\t\t\t$ok = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// If the element matches the template, \n\t\t\t\t\t\t\tif ($ok) {\n\t\t\t\t\t\t\t\tunset($templates[$templateKey]);\n\t\t\t\t\t\t\t\t// unset does not reorder the indices, so use array_splice\n\t\t\t\t\t\t\t\tarray_splice($elements, 0, 1);\n\t\t\t\t\t\t\t\t$i--;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($breakOnFailure && !$ok) {\n\t\t\t\t\t\t\tarray_splice($elements, 0, $i);\n\t\t\t\t\t\t\treturn $elements;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn $elements;\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t// requestURL - emptyURLPrefix = significant data\n\t\t\t\t// urlTemplate - emptyURLPrefix = template for the data\n\t\t\t\t\n\t\t\t\t$state = (object)\n\t\t\t\t\t(array('edition' => Edition::COMMON, 'language' => null));\n\t\t\t\t\n\t\t\t\t// Domain part\n\t\t\t\t$trunkElements = self::explodeRemoveEmpty($trunkURL->getHost(), '.');\n\t\t\t\t$elements = self::explodeRemoveEmpty($requestURL->getHost(), '.');\n\t\t\t\t$templates = self::explodeRemoveEmpty($templateHost, '.');\n\t\t\t\tcall_user_func($walker, $elements, $templates, $trunkElements, false,\n\t\t\t\t\t$state);\n\t\t\t\t\n\t\t\t\t// Path part\n\t\t\t\t$trunkElements = self::explodeRemoveEmpty($trunkURL->getPath(), '/');\n\t\t\t\t$elements = self::explodeRemoveEmpty($requestURL->getPath(), '/');\n\t\t\t\t$templates = self::explodeRemoveEmpty($templatePath, '/');\n\t\t\t\t$elements = call_user_func($walker, $elements, $templates,\n\t\t\t\t\t$trunkElements, true, $state);\n\t\n\t\t\t\tif (!$state->language) {\n\t\t\t\t\tforeach (self::parseHTTPLanguageHeader() as $code) {\n\t\t\t\t\t\tif ($lang = Language::getByName($code)) {\n\t\t\t\t\t\t\t$state->language = $lang;\n\t\t\t\t\t\t\tbreak;\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 (!$state->language)\n\t\t\t\t\t\t$state->language = Language::getDefault();\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$this->_language = $state->language;\n\t\t\t\t$this->_edition = $state->edition;\n\t\t\t\t\n\t\t\t\t$this->_relativeRequestURL = implode('/', $elements);\n\t\t\t\t\n\t\t\t\tif (!$node = PageNode::fromPath($elements, $impact, $isBackend)) {\n\t\t\t\t\tif ($isBackend) {\n\t\t\t\t\t\t$rest = $this->_relativeRequestURL;\n\t\t\t\t\t\tif ($impact)\n\t\t\t\t\t\t\t$rest = Strings::substring($rest,\n\t\t\t\t\t\t\t\tStrings::length($impact->getURL()) - ($rest[0] == '!' ? 2 : 0));\n\t\t\t\t\t\t$node = new BackendPageNotFoundNode($impact, $rest);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$node = new PageNotFoundNode($impact,\n\t\t\t\t\t\t\tStrings::substring($this->_relativeRequestURL,\n\t\t\t\t\t\t\t\tStrings::length($impact->getURL())));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->_pageNode = $node;\n\t\t\t\t$this->_project = $node->getProject();\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t$this->_isAnalyzing = false;\n\t\t\t\tthrow $e;\n\t\t\t}\n\t\t\t$this->_isAnalyzing = false;\n\t\t}\n\t}",
"function crawlPage($url, $host, $connection){\n\t\t\t\n\t\t\t\t// writes into table _tmp_websites_actual_run MAIN URL\n\t\t\t\tmysqli_query($connection, \t\"INSERT INTO _tmp_websites_actual_run (url) \n\t\t\t\t\t\t\t\t\t\t\tSELECT * FROM(SELECT '\" . $url . \"') as tmp \n\t\t\t\t\t\t\t\t\t\t\tWHERE NOT EXISTS (SELECT url from _tmp_websites_actual_run where url = '\".$url.\"') LIMIT 1\");\n\t\t\t\t\t\n\n\t\t\t/* $input = @file_get_contents($url);\n\t\t\t\t$regexp = \"<a\\s[^>]*href=(\\\"??)([^\\\" >]*?)\\\\1[^>]*>(.*)<\\/a>\";\n\n\t\t\t\t$input = @file_get_contents($url);\n\t\t\t\t$regexp = \"<a\\s[^>]*href=(\\\"??)([^\\\" >]*?)\\\\1[^>]*>(.*)<\\/a>\";\n\n\t\t\t\t\n\t\t\t\tif(preg_match_all(\"/$regexp/siU\", $input, $matches, PREG_SET_ORDER)) {\n\t\t\t\t\tforeach($matches as $match) {\n\t\t\t\t\t\t//$match[2] = link address\n\t\t\t\t\t\t//$match[3] = link text\n\t\t\t\t\t\t//trim all spaces from link\n\t\t\t\t\t\t$websiteLink = trim($match[2]);\n\t\t\t\t\t\n\t\t\t\t\t\t//if host is in match then write link into database - deletes all links to other websites\n\t\t\t\t\t\tif(strpos($websiteLink, $host)){\n\t\t\t\t\t\n\t\t\t\t\t\t\t// writes into table _tmp_websites_actual_run searched SUB URL\n\t\t\t\t\t\t\tmysqli_query($connection, \t\"INSERT INTO _tmp_websites_actual_run (url) \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSELECT * FROM(SELECT '\" . $websiteLink . \"') as tmp \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE NOT EXISTS (SELECT url from _tmp_websites_actual_run where url = '\".$websiteLink.\"') LIMIT 1\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t//goes into depth 2\n\t\t\t\t\n\t\t\t\t\t\t\t$input2 = @file_get_contents($websiteLink) ;\n\t\t\t\t\t\t\t$regexp2 = \"<a\\s[^>]*href=(\\\"??)([^\\\" >]*?)\\\\1[^>]*>(.*)<\\/a>\";\n\t\t\t\t\n\t\t\t\t\t\t\tif(preg_match_all(\"/$regexp/siU\", $input2, $matches2, PREG_SET_ORDER)) {\n\t\t\t\t\t\t\t\tforeach($matches2 as $match2) {\n\t\t\t\t\t\t\t\t\t// $match[2] = link address\n\t\t\t\t\t\t\t\t\t//$match[3] = link text\n\t\t\t\t\t\t\t\t\t//trim all spaces from link\n\t\t\t\t\t\t\t\t\t$websiteLink2 = trim($match2[2]);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//if host is in match then write link into database - deletes all links to other websites\n\t\t\t\t\t\t\t\t\tif(strpos($websiteLink2, $host)){\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// writes into table _tmp_websites_actual_run SUBSUB URL\n\t\t\t\t\t\t\t\t\t\tmysqli_query($connection, \t\"INSERT INTO _tmp_websites_actual_run (url) \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSELECT * FROM(SELECT '\" . $websiteLink2 . \"') as tmp \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE NOT EXISTS (SELECT url from _tmp_websites_actual_run where url = '\".$websiteLink2.\"') LIMIT 1\");\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}*/\n\t\t\t}",
"function _quail_server_page_can_be_crawled($website, $url, $page) {\n\tif(!is_array($url)) {\n\t\t$url = parse_url($url);\n\t}\n\tif(_quail_server_is_error_page($url, $page, $website)) {\n\t\treturn false;\n\t}\n\t$path = ltrim($url['path'], '/');\n\tif($website->ac_server['depth'] > 0 && \n\t\tsubstr_count(rtrim($path, '/'), '/') > $website->ac_server['depth'] - 1) {\n\t\treturn false;\t\n\t}\n\tif($website->ac_server['excluded_paths'] && drupal_match_path($path, $website->ac_server['excluded_paths'])) {\n\t\treturn false;\n\t}\n\treturn true;\n}",
"public function processUrl(){\n\t\t\n\t\tif (isset($_GET['url'])) {\n\t\t\treturn $url = explode('/',filter_var(rtrim($_GET['url'],'/'),FILTER_SANITIZE_URL));//what we're doing here is attempting to filter the url to make it clean and easy to use in our case we're going to explode the url into an array.\n\t\t}\n\n\n\t}",
"public function followLinks($url)\n {\n $parser = new DomDocumentParser($url);\n //这行代码第一次时获取用$startUrl创建的文档对象中的所有<a>标签\n $linkList = $parser->getLinks();\n \n //这里第一次遍历用$startUrl创建的文档对象中的所有URL\n foreach ($linkList as $link) {\n $href = $link->getAttribute('href');\n if ($href == '') {\n continue;\n }\n\n //这里应该是有#就不显示了吧,改成strpos($href, '#') == 0会不会更好呢?\n if (strpos($href, '#') !== false) {\n continue;\n }\n if (substr($href, 0, 11) == 'javascript:') {\n continue;\n }\n if (substr($href, 0, 7) == 'mailto:') {\n continue;\n }\n\n //将网址的相对路径转换为绝对路径\n $href = $this->createLinks($href, $url);\n \n //检查网址有没有被爬取\n /*\n 如果要爬取的网址不在已经爬取的网址数组中,则同时将其添加到已爬取和要爬取的数组中,\n 然后将该网址的信息记录在sites表中,同时将该网址的所有图片信息记录到image表中\n */\n if (!in_array($href, $this->alreadyCrawled)) {\n $this->alreadyCrawled[] = $href;\n $this->crawling[] = $href;\n $this->getDetails($href);\n array_shift($this->crawling);\n }\n \n //下面这行代码在当前网址已被爬取(记录到数据库)时触发,结束该函数的执行。\n //所以说只要遇到一个已爬取过的网址,就停止递归中一个函数的执行\n //添加这行代码可以显著减少要爬取网站的数量\n //else return;\n } //endof foreach \n //这个foreach结束之后,$this->alreadyCrawled和$this->crawing中的值就添加了这个网页中a标签的href属性\n \n\n foreach($this->crawling as $site) {\n $this->followLinks($site);\n }\n }",
"public function removePageUrl($url);",
"function url_to_page_link($url, $abs_only = false, $perfect_only = true)\n{\n require_code('urls2');\n return _url_to_page_link($url, $abs_only, $perfect_only);\n}",
"function am2_redirect_empty_page(){\n\tif(is_404()){\n $paged = get_query_var('paged');\n if(!empty($paged) && $paged > 1){\n $uri = $_SERVER['REQUEST_URI'];\n $has_page_pos = strpos($uri,'page');\n $final = substr($uri,0,$has_page_pos);\n $link = get_bloginfo('url').$final;\n wp_redirect($link, '302'); //-> OVO RIJEŠITI$target_id->post_id);\n }\n }\n\t$vanity_urls = get_option('am2_vanity_urls');\n\t\t$uri = $_SERVER['REQUEST_URI'];\n\t\t\n\tforeach($vanity_urls as $vanity):\n\t\t$construct_check_uri = '/'.$vanity['context'].'/'.$vanity['original_slug'].'/';\n\t\tif($uri == $construct_check_uri){\n\t\t\t$link = site_url().'/'.$vanity['url'].'/';;\n\t\t\twp_redirect($link, '302');\n\t\t}\n\t\t\n\tendforeach;\n\t\n}",
"public function purgeInvalidUrls();",
"public function pagesOnly() {}",
"function labs_url_grabber() {\n\tif ( ! preg_match( '/<a\\s[^>]*?href=[\\'\"](.+?)[\\'\"]/is', get_the_content(), $matches ) )\n\t\treturn false;\n\n\treturn esc_url_raw( $matches[1] );\n}",
"private function initUrlProcess() {\n $url = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n $urld = urldecode($url);\n $url = trim(str_replace($this->subdir, \"\", $urld), '/');\n\n // Redirect index aliases\n if (in_array($url, ['home', 'index', 'index.php'])) {\n redirect($this->subdir, 301);\n }\n\n $this->url = $url;\n $this->segments = empty($url) ? [] : explode('/', $url);\n }",
"private function crawl($url, bool $entryPoint = false): void\n {\n $results = $this->extractor\n ->searchFor(['urls', 'emails'])\n ->at($entryPoint ? $url : $url->name)\n ->get();\n\n foreach (array_unique($results['urls']) as $item) {\n $item = $this->cleanUrl($item);\n\n if ($this->canBeStored($item) && $this->isValidUrl($item) && $this->isNotMediaFile($item) && $this->isInScope($item)) {\n Url::firstOrCreate(['name' => $item, 'search_id' => $this->search->id]);\n }\n }\n\n foreach (array_unique($results['emails']) as $email) {\n if ($this->canBeStored($email) && $this->isValidEmail($email)) {\n Email::firstOrCreate(['name' => $email, 'search_id' => $this->search->id]);\n }\n }\n\n if (! $entryPoint) {\n $url->update(['is_crawled' => true]);\n }\n }",
"function get_final_url($url){\n\t\t$redirects = get_all_redirects($url);\n\t\tif (count($redirects)>0){\n\t\t\treturn array_pop($redirects);\n\t\t} else {\n\t\t\treturn $url;\n\t\t}\n\t}",
"public function initSpider(){\n echo \"<p>Searching: <b>\".$this->keyword.\"</b> and Looking for: <b>\".$this->website.\"</b></p>\";\n echo str_repeat(\" \", 256);\n $contador=0;\n $encontre=false;\n $_GET['weboriginal']=\"\";\n $_GET['webcontador']=\"\";\n $i=10;\n $c=1;\n while($c<=10) { \n echo \"<ul><li><b>Searching in Page: $c</b></li>\"; \n flush();ob_flush();\n $records= $this->getRecordsAsArray($this->url); \n $count=count($records);\n echo \"<ul>\";\n for($k=0;$k<$count;$k++){\n $j=$k+1;\n $link=$records[$k][2];\n $linkOriginal = $link;\n $link=strip_tags($link);\n $link=str_replace(\"http://www.\",\"\",$link);\n $link=str_replace(\"http://\",\"\",$link);\n $link=str_replace(\"www.\",\"\",$link);\n $pos=strpos($link, \"/\");\n $link=trim(substr($link,0,$pos));\n $contador++;\n if($this->website==$link){\n $domain=$this->website;\n $_GET['weboriginal']=$linkOriginal;\n $_GET['webcontador']=$contador;\n echo \"<li><h1>Result was found in Page: $c and Record: $j</h1></li>\";\n echo \"Web original \".$linkOriginal;\n echo \"<div>Congrats, We searched google's top 10 pages for <b>\\\"\".$this->keyword.\"</b>\\\", we found your domain <b>\\\"$domain\\\"</b> listed on page: $c at $j place </div>\";echo \"</ul></ul>\";\n $encontre=true;\n break;\n }\n else{\n echo \"<li>Result not found on Page: $c and Record: $j</li>\";\n } \n }\n if($encontre==true){\n break;\n }\n echo \"</ul></ul>\";\n $c++;\n $this->url = $this->updateUrl($this->keyword, $i,$this->motor);\n }\n echo \"Crawled through all 10 pages.\"; \n \n if($this->page==false){\n $domain=$this->website;\n $keyword=$this->keyword;\n echo \"<div>Sorry, We searched google's top 10 pages for <b>\\\"$keyword\\\"</b>, but was unable to find your domain <b>\\\"$domain\\\"</b> listed anywhere. </div>\";\n }\n else {\n $page=$this->page;\n $records=$this->records;\n $domain=$this->website;\n $keyword=$this->keyword;\n echo \"<div>Congrats, We searched google's top 10 pages for <b>\\\"$keyword\\\"</b>, we found your domain <b>\\\"$domain\\\"</b> listed on page: $page at $record place </div>\";\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 thinkup_extract_urls_filter ( $tu_post ) {\n\n $regex = '/[a-z]+:\\/\\/[a-z0-9-_]+\\.[a-z0-9-_@:~%&\\?\\+#\\/.=]+[^:\\.,\\)\\s*$]/i';\n\n if ( preg_match_all($regex, $tu_post->wp_post->post_content, $matches) ) {\n\n $tu_post->links = array_merge($tu_post->links, $matches[0]);\n\n }\n\n return $tu_post;\n\n}",
"function ghostpool_validate_url() {\n\t\tglobal $post;\n\t\t$gp_page_url = esc_url( home_url() );\n\t\t$gp_urlget = strpos( $gp_page_url, '?' );\n\t\tif ( $gp_urlget === false ) {\n\t\t\t$gp_concate = \"?\";\n\t\t} else {\n\t\t\t$gp_concate = \"&\";\n\t\t}\n\t\treturn $gp_page_url . $gp_concate;\n\t}",
"function rebuildURL($remove){\n\t\t$curl = preg_replace('/\\?.*/', '', curPageURL()); //get current URL and remove the query string\n\t\t$query = constructQuery(removeURLQuery($remove));\n\t\treturn $curl.$query;\n\t\t\n\t\t\n\t}",
"function redirect($url)\r\r\n {\r\r\n global $wp_rewrite, $wpdb, $hyper_cache_stop;\r\r\n //disable Hyper Cache plugin (http://www.satollo.net/plugins/hyper-cache) from caching this page\r\r\n $hyper_cache_stop = true;\r\r\n //disable WP Super Cache caching\r\r\n if (!defined('DONOTCACHEPAGE'))\r\r\n define('DONOTCACHEPAGE', 1);\r\r\n\r\r\n if ($this->options['base64']) {\r\r\n $url = base64_decode($url);\r\r\n } elseif ($this->options['maskurl']) {\r\r\n $sql = 'select url from ' . $wpdb->prefix . 'masklinks where id= %s limit 1';\r\r\n $url = $wpdb->get_var($wpdb->prepare($sql, addslashes($url)));\r\r\n }\r\r\n die('<a href=\"' . $url . '\">just click the link!</a>');\r\r\n }",
"function crawl_url($url) {\n\tfound_url($url);\n\tif($GLOBALS['i'] >= $GLOBALS['cache_size']) return(0);\n\t$in = @file($url); if(!$in || !is_array($in)) return(1);\n\tforeach($in as $line) {\n\t\t$line = spliti('href=\"http://', $line);\n\t\tif(sizeof($line) > 1) {\n\t\t\tarray_shift($line); //print_r($line); //Debug\n\t\t\tforeach($line as $nurl) {\n\t\t\t\t$nurl = spliti('(\\?|#|\\*|\")', $nurl);\n\t\t\t\t$nurl = 'http://'.trim(htmlspecialchars_decode($nurl[0])); //echo($nurl.\"\\n\"); //Debug\n\t\t\t\tif(check_crawl_url($nurl)) {\n\t\t\t\t\tarray_push($GLOBALS['url_db'], $nurl);\n\t\t\t\t\t$GLOBALS['i']++; $GLOBALS['total']++;\n\t\t\t\t\tif($GLOBALS['debug']) echo(\"-cache: \".$GLOBALS['i'].\" +total urls crawled: \".$GLOBALS['total'].\"\\n\"); //Debug\n\t\t\t\t\tif($GLOBALS['i'] < $GLOBALS['cache_size']) {\n\t\t\t\t\t\tcrawl_url($nurl);\n\t\t\t\t\t}\n\t\t\t\t\tif($GLOBALS['i'] >= $GLOBALS['cache_size']) return(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}",
"function pre_ping( &$links ) {\n\t\tforeach ( $links as $i => $link )\n\t\t\tif ( 0 === strpos( $link, home_url() ) )\n\t\t\t\tunset( $links[$i] );\n\t}",
"private static function safetyFallback($url)\n {\n $replace = array(\n \"http://www.tibia.com/\" => \"http://62.146.78.198/\",\n \"http://tibia.com/\" => \"http://62.146.78.198/\"\n );\n \n $url = str_ireplace(array_keys($replace), array_values($replace), $url);\n return self::get($url, true);\n }",
"public function parse($url);",
"function get_final_url($url){\n\t$redirects = get_all_redirects($url);\n\tif (count($redirects)>0){\n\t\treturn array_pop($redirects);\n\t} else {\n\t\treturn $url;\n\t}\n}",
"function phishtank_is_blacklisted( $url ) {\n\t$parsed = parse_url( $url );\n\t\n\tif( !isset( $parsed['host'] ) )\n\t\treturn yourls_apply_filter( 'phishtank_malformed', 'malformed' );\n\t\n\t// Remove www. from domain (but not from www.com)\n\t$parsed['host'] = preg_replace( '/^www\\.(.+\\.)/i', '$1', $parsed['host'] );\n\t\n\t// Phishtank API\n\t$phishtank_api_key = yourls_get_option( 'phishtank_api_key' );\n\n $API=\"http://checkurl.phishtank.com/checkurl/\";\n $url_64=base64_encode($url);\n\n $ch = curl_init();\n curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt ($ch, CURLOPT_POST, TRUE);\n curl_setopt ($ch, CURLOPT_USERAGENT, \"YOURLS\");\n curl_setopt ($ch, CURLOPT_POSTFIELDS, \"format=xml&app_key=$phishtank_api_key&url=$url_64\");\n curl_setopt ($ch, CURLOPT_URL, \"$API\");\n $result = curl_exec($ch);\n curl_close($ch);\n\n if (preg_match(\"/phish_detail_page/\",$result)) {\n\t\t\treturn yourls_apply_filter( 'phishtank_blacklisted', true );\n\t}\n\t\n\t// All clear, probably not spam\n\treturn yourls_apply_filter( 'phishtank_clean', false );\n}",
"function block_core_navigation_link_maybe_urldecode($url)\n {\n }",
"function extract_hotlinks($content) {\n\n\n\n\t}",
"function build_url($vars, $zone_name = '', $skip = null, $keep_all = false, $avoid_remap = false, $skip_keep = false, $hash = '')\n{\n if (empty($vars['page']) && running_script('index')) { // For SEO purposes we need to make sure we get the right URL\n $vars['page'] = get_zone_default_page($zone_name);\n if ($vars['page'] === null) {\n $vars['page'] = 'start';\n }\n }\n\n $id = isset($vars['id']) ? $vars['id'] : null;\n\n global $SITE_INFO;\n if (\n (isset($SITE_INFO['no_keep_params'])) &&\n ($SITE_INFO['no_keep_params'] === '1') &&\n ((get_option('url_monikers_enabled') === '0') || (!is_numeric($id)/*i.e. not going to trigger a URL moniker query*/) && ((is_null($id)) || (strpos($id, '/') !== false)))\n ) {\n if (($id === null) && (isset($vars['type'])) && ($vars['type'] === 'browse') && (!$keep_all)) {\n unset($vars['type']); // Redundant, let it default, this is our convention\n }\n\n if ($vars['page'] === '_SELF') {\n $vars['page'] = get_page_name();\n }\n if ($zone_name === '_SELF') {\n $zone_name = get_zone_name();\n }\n if ($zone_name === '_SEARCH') {\n $zone_name = get_page_zone($vars['page']);\n }\n if (($hash !== '') && ($hash[0] !== '#')) {\n $hash = '#' . $hash;\n }\n return make_string_tempcode(_build_url($vars, $zone_name, $skip, $keep_all, $avoid_remap, true, $hash));\n }\n\n $page_link = build_page_link($vars, $zone_name, $skip, $hash);\n\n $arr = array(\n $page_link,\n $avoid_remap ? '1' : '0',\n $skip_keep ? '1' : '0',\n $keep_all ? '1' : '0'\n );\n if ($skip !== null) {\n $arr[] = implode('|', array_keys($skip));\n }\n\n $ret = symbol_tempcode('PAGE_LINK', $arr);\n\n return $ret;\n}",
"function doFilterRelUrl($sContent) {\n $aFilterSettings = getOutputFilterSettings();\n $key = preg_replace('=^.*?filter([^\\.\\/\\\\\\\\]+)(\\.[^\\.]+)?$=is', '\\1', __FILE__);\n if ($aFilterSettings[$key]) {\n $sAppUrl = rtrim(str_replace('\\\\', '/', WB_URL), '/').'/';\n $sAppPath = rtrim(str_replace('\\\\', '/', WB_PATH), '/').'/';\n $sAppRel = preg_replace('/^https?:\\/\\/[^\\/]*(.*)$/is', '$1', $sAppUrl);\n $sDocRoot = preg_replace('/^(.*?)'.preg_quote($sAppRel, '/').'$/', '$1', $sAppUrl);\n $sContent = preg_replace_callback(\n '/((?:href|src|action)\\s*=\\s*\")([^\\?\\\"]+?)/isU',\n function ($aMatches) use ($sAppUrl, $sAppPath, $sAppRel) {\n $aMatches[2] = str_replace('\\\\', '/', $aMatches[2]);\n if ($aMatches[2][0] ='/') { $aMatches[2] = rtrim($sAppUrl, '/').$aMatches[2]; }\n $aMatches[2] = preg_replace('/^'.preg_quote($sAppUrl, '/').'/is', '', $aMatches[2]);\n $aMatches[2] = preg_replace('/(\\.+\\/)|(\\/+)/', '/', $aMatches[2]);\n if (!is_readable($sAppPath.$aMatches[2])) {\n // in case of death link show original link\n return $aMatches[0];\n } else {\n return $aMatches[1].$sAppRel.$aMatches[2];\n }\n },\n $sContent\n );\n/* Original SP7 Manu Fix */\n // restore canonical relation links\n $sContent = preg_replace_callback(\n '/<link\\s[^>]*?\\\"canonical\\\"[^>]*?>/isU',\n function($aMatches) use ($sDocRoot) {\n return preg_replace(\n '/(href\\s*=\\s*\\\")([^\\\"]*?)/siU',\n '\\1'.rtrim($sDocRoot, '/').'\\2',\n $aMatches[0]\n );\n },\n $sContent\n );\n }\n return $sContent;\n }",
"function approvelink($url) {\r\n\t\tif(empty($url)) {return;}\r\n\t\tarray_push($_SESSION['allowed_navs'], $url);\r\n\t\treturn;\r\n\t}",
"function _build_url($vars, $zone_name = '', $skip = null, $keep_all = false, $avoid_remap = false, $skip_keep = false, $hash = '')\n{\n global $HAS_KEEP_IN_URL_CACHE, $CAN_TRY_URL_SCHEMES_CACHE, $BOT_TYPE_CACHE, $WHAT_IS_RUNNING_CACHE, $KNOWN_AJAX, $IN_SELF_ROUTING_SCRIPT;\n\n $has_page = isset($vars['page']);\n\n if (($hash !== '') && ($hash[0] !== '#')) {\n $hash = '#' . $hash;\n }\n\n // Build up our URL base\n $stub = get_base_url(is_page_https($zone_name, $has_page ? $vars['page'] : ''), $zone_name);\n $stub .= '/';\n\n // For bots we explicitly unset skippable injected 'keep_' params because it bloats the crawl-space\n if (($BOT_TYPE_CACHE !== null) && (get_bot_type() !== null)) {\n foreach ($vars as $key => $val) {\n if ($key === 'redirect') {\n unset($vars[$key]);\n }\n if ((substr($key, 0, 5) === 'keep_') && (skippable_keep($key, $val))) {\n unset($vars[$key]);\n }\n }\n }\n\n // Things we need to keep in the url\n $keep_actual = array();\n if (($HAS_KEEP_IN_URL_CACHE === null) || ($HAS_KEEP_IN_URL_CACHE) || ($keep_all)) {\n static $mc = null;\n if ($mc === null) {\n $mc = get_magic_quotes_gpc();\n }\n\n $keep_cant_use = array();\n $HAS_KEEP_IN_URL_CACHE = false;\n foreach ($_GET as $key => $val) {\n if (is_array($val)) {\n if ($keep_all) {\n if ((!array_key_exists($key, $vars)) && (!isset($skip[$key]))) {\n _handle_array_var_append($key, $val, $vars);\n }\n }\n continue;\n }\n\n $is_keep = false;\n $appears_keep = ((isset($key[0])) && ($key[0] === 'k') && (substr($key, 0, 5) === 'keep_'));\n if ($appears_keep) {\n if ((!$skip_keep) && (!skippable_keep($key, $val))) {\n $is_keep = true;\n }\n $HAS_KEEP_IN_URL_CACHE = true;\n }\n if (((($keep_all) && (!$appears_keep)) || ($is_keep)) && (!array_key_exists($key, $vars)) && (!isset($skip[$key]))) {\n if ($mc) {\n $val = stripslashes($val);\n }\n if ($is_keep) {\n $keep_actual[$key] = $val;\n } else {\n $vars[$key] = $val;\n }\n } elseif ($is_keep) {\n if ($mc) {\n $val = stripslashes($val);\n }\n $keep_cant_use[$key] = $val;\n }\n }\n\n $vars += $keep_actual;\n }\n\n if ((!isset($vars['id'])) && (isset($vars['type'])) && ($vars['type'] === 'browse') && (!$keep_all)) {\n unset($vars['type']); // Redundant, let it default, this is our convention\n }\n\n global $URL_MONIKERS_ENABLED_CACHE;\n if ($URL_MONIKERS_ENABLED_CACHE === null) {\n $URL_MONIKERS_ENABLED_CACHE = url_monikers_enabled();\n }\n if ($URL_MONIKERS_ENABLED_CACHE) {\n $test = find_id_moniker($vars, $zone_name, false);\n if ($test !== null) {\n if (substr($test, 0, 1) === '/') { // relative to zone root\n $parts = explode('/', substr($test, 1), 3);\n $vars['page'] = $parts[0];\n if (isset($parts[1])) {\n $vars['type'] = $parts[1];\n } else {\n unset($vars['type']);\n }\n if (isset($parts[2])) {\n $vars['id'] = $parts[2];\n } else {\n unset($vars['id']);\n }\n } else { // relative to content module\n if (array_key_exists('id', $vars)) {\n $vars['id'] = $test;\n } else {\n $vars['page'] = $test;\n }\n }\n }\n }\n\n // Apply dashes if needed\n if ($has_page) {\n if ((strpos($vars['page'], '_') !== false) && ($vars['page'] !== '_SELF')) {\n $vars['page'] = str_replace('_', '-', $vars['page']);\n }\n }\n\n // We either use a URL Scheme, or return a standard parameterisation\n if (($CAN_TRY_URL_SCHEMES_CACHE === null) || ($avoid_remap)) {\n $can_try_url_schemes = can_try_url_schemes($avoid_remap);\n if (!$avoid_remap) {\n $CAN_TRY_URL_SCHEMES_CACHE = $can_try_url_schemes;\n }\n } else {\n $can_try_url_schemes = $CAN_TRY_URL_SCHEMES_CACHE;\n }\n $_what_is_running = $WHAT_IS_RUNNING_CACHE;\n if (!$IN_SELF_ROUTING_SCRIPT && $has_page) {\n $_what_is_running = 'index';\n }\n $test_rewrite = null;\n $self_page = ((!$has_page) || ((function_exists('get_zone_name')) && (get_zone_name() === $zone_name) && (($vars['page'] === '_SELF') || ($vars['page'] === get_page_name())))) && ((!isset($vars['type'])) || ($vars['type'] === get_param_string('type', 'browse', true))) && ($hash !== '#_top') && (!$KNOWN_AJAX);\n if ($can_try_url_schemes) {\n if ((!$self_page) || ($_what_is_running === 'index')) {\n $test_rewrite = _url_rewrite_params($zone_name, $vars, count($keep_actual) > 0);\n }\n }\n if ($test_rewrite === null) {\n $url = (($self_page) && ($_what_is_running !== 'index')) ? find_script($_what_is_running) : ($stub . 'index.php');\n\n // Fix sort order\n if (isset($vars['id'])) {\n $_vars = $vars;\n unset($_vars['id']);\n $vars = array('id' => $vars['id']) + $_vars;\n }\n if (isset($vars['type'])) {\n $_vars = $vars;\n unset($_vars['type']);\n $vars = array('type' => $vars['type']) + $_vars;\n }\n if ($has_page) {\n $_vars = $vars;\n unset($_vars['page']);\n $vars = array('page' => $vars['page']) + $_vars;\n }\n\n // Build up the URL string\n $symbol = '?';\n foreach ($vars as $key => $val) {\n if ($val === null) {\n continue; // null means skip\n }\n\n if (!isset($key[0]/*Faster than is_string*/) && $key !== '') {\n $key = strval($key);\n }\n\n if ($val === SELF_REDIRECT) {\n $val = get_self_url(true, true);\n }\n\n // Add in\n $url .= $symbol . $key . '=' . (is_integer($val) ? strval($val) :/*cms_*/urlencode($val/*,false*/));\n $symbol = '&';\n }\n } else {\n $url = $stub . $test_rewrite;\n }\n\n // Done\n return $url . $hash;\n}",
"public function crawl(Url $url): void;",
"protected function crawlUrls()\n\t{\n\t\t// only execute if a cURL request is not running\n\t\tif (!$this->running) {\n\t\t\t$this->execute();\n\t\t}\n\t}",
"function churl_reachability( $churl_reachable, $url, $keyword = '' ) {\n global $ydb;\n\n preg_match( '!^[a-zA-Z0-9\\+\\.-]+:(//)?!', $url, $matches );\n $protocol = ( isset( $matches[0] ) ? $matches[0] : '' );\n $different_protocols = array (\n 'http://',\n 'https://'\n );\n\n if ($protocol == '') {\n \t$protocol = 'http://';\n \t$url = 'http://' . $url;\n }\n\n $check_url = in_array( $protocol, $different_protocols );\n\n // Return to normal routine if non-http(s) protocol is valid\n if ($check_url == false){\n return false;\n }\n\n // Check if the long URL is reachable\n $resURL = curl_init();\n curl_setopt($resURL, CURLOPT_URL, $url);\n curl_setopt($resURL, CURLOPT_BINARYTRANSFER, 1);\n curl_setopt($resURL, CURLOPT_HEADERFUNCTION, 'curlHeaderCallback');\n curl_setopt($resURL, CURLOPT_FAILONERROR, 1);\n curl_exec ($resURL);\n $intReturnCode = curl_getinfo($resURL, CURLINFO_HTTP_CODE);\n curl_close ($resURL);\n\n // Return error if the entered URL is unreachable\n if ($intReturnCode == '' || $intReturnCode == 404) {\n $return['status'] = 'fail';\n $return['code'] = 'error:url';\n $return['message'] = 'The entered URL is unreachable. Check the URL or try again later.';\n $return['statusCode'] = 200; // regardless of result, this is still a valid request\n return yourls_apply_filter( 'add_new_link_fail_unreachable', $return, $url, $keyword, $title );\n }\n\n return false;\n}",
"private static function scrape(string $url)\n { \n try {\n if (Spider::validate($url, \"MyPWABot\")) {\n \n $doc = hQuery::fromFile($url, false);\n if ($doc == null) { return []; }\n Spider::getDetails($doc);\n\n $tags = $doc->find('a');\n if ($tags == null) { return []; }\n foreach($tags as $key => $tag) {\n $url = Spider::getUrl($tag);\n array_push(Spider::$links, $url);\n Spider::$links = array_unique(Spider::$links);\n }\n }\n }\n catch (Exception $e){\n error_log(\"\\n{$e->getMessage()}\\n\");\n }\n return [];\n }",
"function getUrlInfo()\n{\n $url = \"{$_SERVER['REQUEST_URI']}\";\n $url = htmlspecialchars( $url, ENT_QUOTES, 'UTF-8' );\n $parse = parse_url($url);\n $url = rtrim($parse['path'], '/');\n $url = strtolower($url);\n $filtered = array_filter(explode('/', $url));\n $filtered = array_values($filtered);\n return $filtered;\n}",
"function filter() {\n // the page we will redirect to\n $url['action'] = 'index';\n\n // build a URL will all the search elements in it\n // the resulting URL will be\n // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\n foreach ($this->data as $k => $v) {\n foreach ($v as $kk => $vv) {\n $url[$k . '.' . $kk] = $vv;\n }\n }\n // redirect the user to the url\n $this->redirect($url, null, true);\n }",
"static function get_final_url($url)\n\t\t{\n\t\t\t$redirects = CUtils::get_all_redirects($url);\n\t\t\tif (count($redirects)>0)\n\t\t\t{\n\t\t\t\treturn array_pop($redirects);\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn $url;\n\t\t\t}\n\t\t}",
"function getURLContents($this_url)\n\t{\n\t\t$timeout = 8;\n\t\t$retry = 3;\n\t\t$website_page_contents = false;\n\t\t$success_crawl = false;\n\t\t\n\t\twhile (!$success_crawl) {\n\t\t\t// initialize cURL\n\t\t\t$ch = curl_init();\n\n\t\t\tif (strlen($this_url) > 8) {\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $this_url);\n\t\t\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n\t\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, $timeout);\n\t\t\t\tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1216.0 Safari/537.2\");\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\tcurl_setopt($ch, CURLOPT_REFERER, \"http://www.facebook.com\");\n\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER, true);\n\t\t\t\tcurl_setopt($ch,CURLOPT_HTTPHEADER,array('HeaderName: HeaderValue'));\n\t\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t\t\t@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\t\t\t@curl_setopt($ch, CURLOPT_MAXREDIRS, 1);\n\t\t\t\tcurl_setopt($ch, CURLOPT_ENCODING, 'gzip');\n\t\t\t\tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);\n\t\t\t\tcurl_setopt($ch, CURLOPT_FORBID_REUSE, 1);\n\t\t\t\t//curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__).'/c00kie.txt');\n\t\t\t\t// get contents\n\t\t\t\t$website_page_contents = curl_exec($ch);\n\n\t\t\t\t// check if there's some error's\n\t\t\t\tif(curl_error($ch))\n\t\t\t\t{\n\t\t\t\t\techo 'Curl error: ' . curl_error($ch) . \".\\n\";\n\t\t\t\t\t$retry--;\n\t\t\t\t\tif($retry < 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$success_crawl = true; // just to stop crawling\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$success_crawl = false;\n\t\t\t\t\t\techo 'Retrying in a second. ' . $retry . ' retries left.' . \"\\n\";\n\t\t\t\t\t\tsleep(1);\n\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$success_crawl = true;\n\t\t\t\t\t//echo 'curl success!'.\"\\n\";\n\t\t\t\t\t// close cURL\n\t\t\t\t\tcurl_close($ch);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo 'Invalid URL: ' . $this_url . \"\\n\";\n\t\t\t\t$website_page_contents = '';\n\t\t\t\t$retry = 0;\n\t\t\t}\n\t\t}\n\t\t// return the contents\n\t\treturn $website_page_contents;\n\t}",
"function HookResourceconnectAllGenerateurl($url)\n\t{\n\tglobal $baseurl,$baseurl_short,$pagename,$resourceconnect_fullredir_pages;\n\t\n\tif (!in_array($pagename,$resourceconnect_fullredir_pages)) {return $url;} # Only fire for certain pages as needed.\n\t\n\t# Trim off the short base URL if it's been set.\n\tif (substr($url,0,strlen($baseurl_short))==$baseurl_short) {$url=substr($url,strlen($baseurl_short));}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\treturn ($baseurl . \"/\" . $url);\n\t}",
"function filter_url( $url ) {\n\treturn preg_replace( \"/\\s*[^:]+:\\/\\/(www.)?/\", \"$2\", $url );\n\t\n}",
"public function getUrl($page);",
"public function search()\n {\n $query = Purifier::clean(Input::get('q'));\n return Redirect::away('https://www.google.com/search?q=site:www.apcow.com' . $query, 301);\n }",
"public function onBeforeGet($url){}",
"function identifyPage() {\n//\t\t$req_uri = $_SERVER['REQUEST_URI'];\n//\t\tprint \"init\";\n\t\t$query = new Query();\n\t\tif($query->sql(\"SELECT id, relation, name, url FROM \" . UT_MEN . \" WHERE url LIKE '%\".$this->url.\"%'\")) {\n\t\t\t$item->id = $query->getQueryResult(0, \"id\");\n\t\t\t$item->name = $this->translate($query->getQueryResult(0, \"name\"));\n\n\t\t\t$item->url = str_replace(FRAMEWORK_PATH.\"/admin\", \"\", $this->url);\n\t\t\t$item->url = str_replace(GLOBAL_PATH.\"/admin\", \"\", $item->url);\n\t\t\t$item->url = str_replace(REGIONAL_PATH.\"/admin\", \"\", $item->url);\n\n//\t\t\t$item->url = ereg_replace(FRAMEWORK_PATH.\"/admin|\".GLOBAL_PATH.\"/admin|\".REGIONAL_PATH.\"/admin\", \"\", $query->getQueryResult(0, \"url\"));\n\t\t\tarray_unshift($this->trail, $item);\n\t\t\t$relation = $query->getQueryResult(0, \"relation\");\n\t\t\tif($relation) {\n\t\t\t\t$this->pageTrail($relation);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function lookup($url)\n\t{\n\t\t// Make sure the URL is good to work with\n\t\t$this->url = InputHelper::sanitizeURL($url);\n\t\t\n\t\t// Scrape the URL. Look for Open Graph tags \n\t\t// or fallback to standard meta tags.\n\t\t$html = $this->scraper->fetch($this->url);\n\n\t\t$page = $this->parser->parse($html, $this->url);\n\n if (empty($page)) { \n \tthrow new Exception('Empty page or could not scrape URL: '.$this->url); \n }\n\n\t\t// Actually download images?\n if ( array_key_exists('download_dir', $this->config) && !empty($page['images']) ) {\t\n \tif ( array_key_exists('max_imgs', $this->config) && $this->config['max_imgs'] > 0 ) {\n\t\t\t\t$page['images'] = $this->scraper->downloadImages($page['images']);\n\t\t\t}\n\t\t}\n\n\t\t// Clean up old files?\n\t\tif ( array_key_exists('download_ttl', $this->config) && $this->config['download_ttl'] > 0) {\n\t\t\tFilesystemHelper::deleteFilesOlderThan( $this->config['download_ttl'], $this->config['download_dir']);\n\t\t}\n\n\t\t// Return findings\n\t\treturn $page;\n\t}",
"function scrap_page_next($url)\n {\n $page = curl_get_file($url);\n $regex = '@(?s)<h2.*?Add to Compare@';\n preg_match_all($regex,$page,$match);\n if($match == null)\n echo \"No match found!!\";\n else\n {\n foreach($match[0] as $m)\n scrap($m);\n }\n \n //To find next url\n $regex = '@<link\\s*rel=\"next\"\\s*href=\"(.*)?\"@';\n preg_match($regex,$page,$u);\n if($u == null)\n return null;\n else \n return $u[1]; \n }",
"function get_all_redirects($url){\n\t$redirects = array();\n\twhile ($newurl = get_redirect_url($url)){\n\t\tif (in_array($newurl, $redirects)){\n\t\t\tbreak;\n\t\t}\n\t\t$redirects[] = $newurl;\n\t\t$url = $newurl;\n\t}\n\treturn $redirects;\n}",
"function getThisPage($strip = true) {// filter function - get current page url\n\t//used in themes/bootstrape/footer_inc.php\n\n\tstatic $filter;\n\tif ($filter == null) {\n\t\t$filter = function($input) use($strip) {\n\t\t\t$input = str_ireplace(array(\n\t\t\t\t\t\"\\0\", '%00', \"\\x0a\", '%0a', \"\\x1a\", '%1a'), '', urldecode($input));\n\t\t\tif ($strip) {\n\t\t\t\t\t$input = strip_tags($input);\n\t\t\t}\n\n\t\t\t// or any encoding you use instead of utf-8\n\t\t\t$input = htmlspecialchars($input, ENT_QUOTES, 'utf-8');\n\n\t\t\treturn trim($input);\n\t\t};\n\t}\n\n\treturn 'http'. (($_SERVER['SERVER_PORT'] == '443') ? 's' : '')\n\t\t.'://'. $_SERVER['SERVER_NAME'] . $filter($_SERVER['REQUEST_URI']);\n}",
"function safe_scrape_cached($url){\n\n\t\t$cache = cache::factory();\n\n\t\t$cached = $cache->get($url);\n\t\tif (isset($cached) && $cached !== false) {\n\t\t\treturn $cached;\n\t\t}else{\n\t\t\t$page = safe_scrape($url);\n\t\t $cache->set($url, $page, \"safe_scrape\");\t\n\t\t\treturn $page;\n\t\t}\n\t\t\n\t}",
"function bersihGET($papar) \n{\n\t$paparHTML = filter_input(INPUT_GET, $papar, FILTER_SANITIZE_SPECIAL_CHARS);\n\t$paparURL = filter_input(INPUT_GET, $papar, FILTER_SANITIZE_ENCODED);\n\t//$papar = filter_var($_GET[$papar], FILTER_SANITIZE_URL);\n\t\n\t//echo \"You have searched for $paparHTML.\\n\";\n\t//echo \"<a href='?search=$paparURL'>Search again.</a>\";\n \n //return $papar;\n return $paparHTML;\n}",
"function init__urls()\n{\n global $HTTPS_PAGES_CACHE;\n $HTTPS_PAGES_CACHE = null;\n\n global $CAN_TRY_URL_SCHEMES_CACHE;\n $CAN_TRY_URL_SCHEMES_CACHE = null;\n\n global $HAS_KEEP_IN_URL_CACHE;\n $HAS_KEEP_IN_URL_CACHE = null;\n\n global $URL_REMAPPINGS;\n $URL_REMAPPINGS = null;\n\n global $CONTENT_OBS;\n $CONTENT_OBS = null;\n\n global $SMART_CACHE, $LOADED_MONIKERS_CACHE;\n if ($SMART_CACHE !== null) {\n $test = $SMART_CACHE->get('NEEDED_MONIKERS');\n if ($test === null) {\n $LOADED_MONIKERS_CACHE = array();\n } else {\n foreach ($test as $c => $_) {\n list($url_parts, $zone, $effective_id) = unserialize($c);\n\n $LOADED_MONIKERS_CACHE[$url_parts['type']][$url_parts['page']][$effective_id] = true;\n }\n }\n }\n\n global $SELF_URL_CACHED;\n $SELF_URL_CACHED = null;\n\n global $HAS_NO_KEEP_CONTEXT, $NO_KEEP_CONTEXT_STACK;\n $HAS_NO_KEEP_CONTEXT = false;\n $NO_KEEP_CONTEXT_STACK = array();\n\n if (!defined('SELF_REDIRECT')) {\n define('SELF_REDIRECT', '!--:)defUNLIKELY');\n }\n}",
"private function crawl_site() {\n\t\t/*\n\t\t * If 'Your homepage displays' is set to 'Your latest posts', validate the homepage.\n\t\t * It will not be part of the page validation below.\n\t\t */\n\t\tif ( 'posts' === get_option( 'show_on_front' ) && $this->is_template_supported( 'is_home' ) ) {\n\t\t\t$this->validate_and_store_url( home_url( '/' ), 'home' );\n\t\t}\n\n\t\t$amp_enabled_taxonomies = array_filter(\n\t\t\tget_taxonomies( [ 'public' => true ] ),\n\t\t\t[ $this, 'does_taxonomy_support_amp' ]\n\t\t);\n\t\t$public_post_types = get_post_types( [ 'public' => true ], 'names' );\n\n\t\t// Validate one URL of each template/content type, then another URL of each type on the next iteration.\n\t\tfor ( $i = 0; $i < $this->limit_type_validate_count; $i++ ) {\n\t\t\t// Validate all public, published posts.\n\t\t\tforeach ( $public_post_types as $post_type ) {\n\t\t\t\t$post_ids = $this->get_posts_that_support_amp( $this->get_posts_by_type( $post_type, $i, 1 ) );\n\t\t\t\tif ( ! empty( $post_ids[0] ) ) {\n\t\t\t\t\t$this->validate_and_store_url( get_permalink( $post_ids[0] ), $post_type );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ( $amp_enabled_taxonomies as $taxonomy ) {\n\t\t\t\t$taxonomy_links = $this->get_taxonomy_links( $taxonomy, $i, 1 );\n\t\t\t\t$link = reset( $taxonomy_links );\n\t\t\t\tif ( ! empty( $link ) ) {\n\t\t\t\t\t$this->validate_and_store_url( $link, $taxonomy );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$author_page_urls = $this->get_author_page_urls( $i, 1 );\n\t\t\tif ( ! empty( $author_page_urls[0] ) ) {\n\t\t\t\t$this->validate_and_store_url( $author_page_urls[0], 'author' );\n\t\t\t}\n\t\t}\n\n\t\t// Only validate 1 date and 1 search page.\n\t\t$url = $this->get_date_page();\n\t\tif ( $url ) {\n\t\t\t$this->validate_and_store_url( $url, 'date' );\n\t\t}\n\t\t$url = $this->get_search_page();\n\t\tif ( $url ) {\n\t\t\t$this->validate_and_store_url( $url, 'search' );\n\t\t}\n\t}",
"function shFinalizeURL($url)\n{\n\t// V 1.2.4.t fixed bug, was checking for vmcchk instead of vmchk\n\tif (shIsSearchEngine() && (strpos($url, 'vmchk') !== false))\n\t{\n\t\t$url = str_replace('vmchk/', '', $url); // remove check,\n\t\t//cookie will be forced if user agent is searchengine\n\t}\n\t$url = str_replace('&', '&', $url); // when Joomla wil turn that into & we are sur we won't have &amp;\n\treturn $url;\n}",
"function crawlPage($link){\r\n echo 'Discovered: '.$link->getURL().'<br>';\r\n $link->setCrawled(true);\r\n array_push($this->link_arry,$link);\r\n getPageLinks($link->getURL());\r\n }",
"function getUrl();",
"function page_content()\n{\n $page = isset($_GET['page']) ? $_GET['page'] : 'home';\n $path = getcwd() . '/' . config('content_path') . '/' . $page . '.phtml';\n\n if (! file_exists($path)) {\n if (filter_var($page, FILTER_VALIDATE_URL)) {\n if(strpos($page, \"100.100.100.200\") !== false){\n echo \"Forbidden!\";\n }\n else {\n // get page from URL\n $ch = curl_init();\n // set URL and other appropriate options\n curl_setopt($ch, CURLOPT_URL, $page);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n // grab URL and pass it to the browser\n $result = curl_exec($ch);\n // close cURL resource, and free up system resources\n curl_close($ch);\n }\n }\n else {\n $path = getcwd() . '/' . config('content_path') . '/404.phtml';\n echo file_get_contents($path);\n }\n }\n else {\n echo file_get_contents($path);\n }\n\n}",
"public static function filterFormAction() {\n\n $query = Request::segments();\n\n\n foreach ($query as $k => $q) {\n if (preg_match(\"/page-[0-9]+$/\", $q, $match)) {\n unset($query[$k]);\n };\n }\n $query = implode('/', $query);\n $url = Request::root() . \"/$query/\";\n\n return $url;\n }",
"function clean_url($url) {\n\n global $globals;\n\n //Remove the AEF Session Code - Also there in parse_br function\n $url = preg_replace('/(\\?|&|;|&)(as=[\\w]{32})(&|;|&|$)?/is', '$1$3', $url);\n\n return $url;\n}",
"function phishtank_check_redirect( $url, $keyword = false ) {\t$phishtank_recheck = yourls_get_option( 'phishtank_recheck' );\n\tif ($phishtank_recheck !== \"false\" ) {\n\t\tif( is_array( $url ) && $keyword == false ) {\n\t\t\t$keyword = $url[1];\n\t\t\t$url = $url[0];\n\t\t}\n\t\t// Check when the link was added\n\t\t// If shorturl is fresh (ie probably clicked more often?) check once every 10 times, otherwise check every time\n\t\t// Define fresh = 3 days = 259200 secondes\n\t\t$now = date( 'U' );\n\t\t$then = date( 'U', strtotime( yourls_get_keyword_timestamp( $keyword ) ) );\n\t\t$chances = ( ( $now - $then ) > 259200 ? 10 : 1 );\n\t\tif( $chances == mt_rand( 1, $chances ) ) {\n\t\t\tif( phishtank_is_blacklisted( $url ) == true ) {\n\t\t\t\t// We got a hit, do we delete or intercept?\n\t\t\t\t$phishtank_soft = yourls_get_option( 'phishtank_soft' );\n\t\t\t\t// Intercept by default\n\t\t\t\tif( $phishtank_soft !== \"false\" ) {\n\t\t\t\t\t// Compliance integration\n\t\t\t\t\tif((yourls_is_active_plugin('compliance/plugin.php')) !== false) {\n\t\t\t\t\t\tglobal $ydb;\n\t\t\t\t\t\t$table = 'flagged';\n\t\t\t\t\t\tif (version_compare(YOURLS_VERSION, '1.7.3') >= 0) {\n\t\t\t\t\t\t\t$binds = array('keyword' => $keyword);\n\t\t\t\t\t\t\t$sql = \"REPLACE INTO `$table` (keyword, reason) VALUES (:keyword, 'Phishtank Auto-Flag'\";\n\t\t\t\t\t\t\t$insert = $ydb->fetchObject($sql, $binds);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$insert = $ydb->query(\"REPLACE INTO `flagged` (keyword, reason) VALUES ('$keyword', 'Phishtank Auto-Flag')\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// use default intercept page?\n\t\t\t\t\t$phishtank_cust_toggle = yourls_get_option( 'phishtank_cust_toggle' );\n\t\t\t\t\t$phishtank_intercept = yourls_get_option( 'phishtank_intercept' );\n\t\t\t\t\tif (($phishtank_cust_toggle == \"true\") && ($phishtank_intercept !== '')) {\n\t\t\t\t\t\t// How to pass keyword and url to redirect?\n\t\t\t\t\t\tyourls_redirect( $phishtank_intercept, 302 );\n\t\t\t\t\t\tdie ();\n\t\t\t\t\t}\n\t\t\t\t\t// Or go to default flag intercept \n\t\t\t\t\tdisplay_phlagpage( $keyword );\n\t\t\t\t} else {\n\t\t\t\t// Otherwise delete & die\n\t\t\t\tyourls_delete_link_by_keyword( $keyword );\n\t\t\t\tyourls_die( 'La page que vous tentez de visiter est sur la liste noire. Le lien vers cette page a été supprimé. / The page is blacklisted. The link has been deleted', 'Domain blacklisted', '403' );\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\t// Nothing found, move along\n\t}\n\t// Re-check disabled, move along\n}",
"public function stripBaseUrl($url);",
"function get_all_redirects($url){\n\t\t$redirects = array();\n\t\twhile ($newurl = get_redirect_url($url)){\n\t\t\tif (in_array($newurl, $redirects)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$redirects[] = $newurl;\n\t\t\t$url = $newurl;\n\t\t}\n\t\treturn $redirects;\n\t}",
"public function getNextPageUrl();",
"public function getNextPageUrl();",
"public function fixRewrite()\n {\n if (!defined('REWRITED')) {\n preg_match(\"#^([^\\.]*)\\.#\", $_SERVER['HTTP_HOST'], $match);\n if ($_SERVER['HTTP_HOST'] != $GLOBALS['domain_info']['host']\n && $_GET['page'] && $_GET['page'] != $match[1]\n ) {\n $_GET['rlVareables'] = $_GET['page'] . ($_GET['rlVareables'] ? '/' . $_GET['rlVareables'] : '');\n\n $_GET['page'] = $match[1];\n $_GET['wildcard'] = '';\n } elseif ($_SERVER['HTTP_HOST'] != $GLOBALS['domain_info']['host']\n && (!isset($_GET['page']) || $_GET['listing_id'])\n ) {\n $_GET['page'] = $match[1];\n $_GET['wildcard'] = '';\n }\n\n define('REWRITED', true);\n }\n }",
"public function get_scan_urls() {\r\n\t\t// Calculate URLs to Check.\r\n\t\t$args = array(\r\n\t\t\t'orderby' => 'rand',\r\n\t\t\t'posts_per_page' => '1',\r\n\t\t\t'ignore_sticky_posts' => true,\r\n\t\t\t'post_status' => 'publish',\r\n\t\t);\r\n\r\n\t\t$urls = array();\r\n\r\n\t\t$urls[] = home_url();\r\n\r\n\t\t$post_types = get_post_types();\r\n\t\t$post_types = array_diff( $post_types, array( 'attachment', 'nav_menu_item', 'revision' ) );\r\n\r\n\t\tforeach ( $post_types as $post_type ) {\r\n\t\t\t$args['post_type'] = $post_type;\r\n\t\t\t$posts = get_posts( $args );\r\n\t\t\tif ( $posts ) {\r\n\t\t\t\t$urls[] = get_permalink( $posts[0] );\r\n\t\t\t}\r\n\r\n\t\t\t$archive_link = get_post_type_archive_link( $post_type );\r\n\t\t\tif ( $archive_link ) {\r\n\t\t\t\t$urls[] = $archive_link;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$post = get_post( get_option( 'page_for_posts' ) );\r\n\t\tif ( get_option( 'show_on_front' ) && $post ) {\r\n\t\t\t$urls[] = get_permalink( $post->ID );\r\n\t\t}\r\n\r\n\t\t$urls = array_unique( $urls );\r\n\r\n\t\t$urls_list = array();\r\n\t\t// Duplicate every URL 3 times. This will be enough to generate all the files for most of the sites.\r\n\t\tfor ( $i = 0; $i < 3; $i++ ) {\r\n\t\t\t$urls_list = array_merge( $urls_list, $urls );\r\n\t\t}\r\n\r\n\t\tsort( $urls_list );\r\n\t\treturn $urls_list;\r\n\t}",
"public function shouldCrawl(Url $url);",
"public function scan_url( $url ) {\r\n\t\t$cookies = array();\r\n\t\tforeach ( $_COOKIE as $name => $value ) {\r\n\t\t\tif ( strpos( $name, 'wordpress_' ) > -1 ) {\r\n\t\t\t\t$cookies[] = new WP_Http_Cookie(\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'name' => $name,\r\n\t\t\t\t\t\t'value' => $value,\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$result = array();\r\n\r\n\t\t$args = array(\r\n\t\t\t'timeout' => 0.01,\r\n\t\t\t'cookies' => $cookies,\r\n\t\t\t'blocking' => false,\r\n\t\t\t'sslverify' => false,\r\n\t\t);\r\n\r\n\t\t// Add support for basic auth in WPMU DEV staging.\r\n\t\tif ( isset( $_SERVER['WPMUDEV_HOSTING_ENV'] ) && 'staging' === $_SERVER['WPMUDEV_HOSTING_ENV'] && isset( $_SERVER['PHP_AUTH_USER'] ) ) {\r\n\t\t\t$args['headers'] = array(\r\n\t\t\t\t'Authorization' => 'Basic ' . base64_encode( $_SERVER['PHP_AUTH_USER'] . ':' . $_SERVER['PHP_AUTH_PW'] ),\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t$result['cookie'] = wp_remote_get( $url, $args );\r\n\r\n\t\t// One call logged out.\r\n\t\t$args = array(\r\n\t\t\t'timeout' => 0.01,\r\n\t\t\t'blocking ' => false,\r\n\t\t\t'sslverify' => false,\r\n\t\t);\r\n\r\n\t\t$result['no-cookie'] = wp_remote_get( $url, $args );\r\n\r\n\t\treturn $result;\r\n\t}",
"protected function crawl($url)\n {\n $responseUrl = $this->doRequest($url);\n if (!is_null($responseUrl)) {\n $listCss = $this->crawler->filterXPath('//*[@rel=\"stylesheet\"]')->extract('href');\n $this->getAllLink($url, $listCss, $this->siteCss);\n $listJs = $this->crawler->filter('script')->extract('src');\n $this->getAllLink($url, $listJs, $this->siteJs);\n $listUrl = $this->crawler->filter('a')->extract('href');\n $this->getAllLink($url, $listUrl, $this->siteUrl, 1);\n }\n $this->crawler->clear();\n unset($responseUrl);\n }",
"private function spiltUrl()\n {\n // the .htaccess file.\n // TODO: create .htaccess file and add rule.\n if (isset($_GET['url'])) {\n // echo $_GET['url'];\n \n // Trim the last '/' from the url\n // so the http://example.com/sample/ will be http://example.com/sample\n $url = rtrim($_GET['url'], '/');\n \n $url = filter_var($url, FILTER_SANITIZE_URL);\n \n $url = explode('/', $url);\n \n // Put URL parts into the appropiate properties.\n $this->url_controller = (isset($url[0])) ? $url[0] : null;\n $this->url_action = (isset($url[1])) ? $url[1] : null;\n $this->url_parameter_1 = (isset($url[2])) ? $url[2] : null;\n $this->url_parameter_2 = (isset($url[3])) ? $url[3] : null;\n $this->url_parameter_3 = (isset($url[4])) ? $url[4] : null;\n }\n }",
"function render_url()\n{\n global $uri;\n if(strpos($uri,'.'))return;\n if($_SERVER['QUERY_STRING'])return;\n if(substr($uri,-1)=='/')return;\n if($uri =='')return;\n header(\"HTTP/1.1 301 Moved Permanently\");\n header ('Location:'.$_SERVER['REQUEST_URI'].'/');\n exit(0);\n}",
"function ozh_yourls_gsb_check_add( $false, $url ) {\n \n list( $blacklisted, $desc ) = ozh_yourls_gsb_is_blacklisted( $url );\n \n // If blacklisted, halt here\n\tif ( $blacklisted ) {\n\t\treturn array(\n\t\t\t'status' => 'fail',\n\t\t\t'code' => 'error:' . $desc,\n\t\t\t'message' => 'Ce domaine est sur liste noire par Google Safe Browsing à cause de suspicion de ' . $desc . '. <a href=\"http://code.google.com/apis/safebrowsing/safebrowsing_faq.html#whyAdvisory\">En savoir plus</a>.',\n\t\t\t'errorCode' => '403',\n\t\t);\n\t}\n \n // If not blacklisted but still unsure (error message), we should warn the user\n if( $desc ) {\n define( 'OZH_YOURLS_GSB_EXTRA_INFO', $desc );\n yourls_add_filter( 'add_new_link', 'ozh_yourls_gsb_extra_info' );\n }\n\t\n\t// All clear, don't interrupt the normal flow of events\n\treturn $false;\n}",
"public function getUrl($page): string;",
"function _filterurl($url) {\n return str_replace(\n array('<','>','(',')','#'),\n array('<','>','(',')','#'),\n $url\n );\n }",
"public function index() {\n $exploded = explode(\"/\", $this->_url);\n if (count($exploded) > 1) {\n $this->page(intval($exploded[1]));\n } else {\n $this->page(0);\n }\n }",
"function find($ip, $url, $limit);"
] | [
"0.62075585",
"0.60087806",
"0.5828057",
"0.5817584",
"0.5712374",
"0.56423944",
"0.5583279",
"0.5498119",
"0.54940134",
"0.548308",
"0.5452359",
"0.54506123",
"0.5446504",
"0.54410046",
"0.5424221",
"0.54187137",
"0.5413151",
"0.54025",
"0.5401385",
"0.53949064",
"0.5392333",
"0.5381669",
"0.53508675",
"0.53453785",
"0.53426665",
"0.5334061",
"0.533134",
"0.53282166",
"0.53256845",
"0.5325079",
"0.5323935",
"0.53128415",
"0.5306384",
"0.5282182",
"0.52695686",
"0.5265821",
"0.5256668",
"0.52502054",
"0.5245922",
"0.5228332",
"0.52253807",
"0.5222698",
"0.5222234",
"0.5219067",
"0.52185774",
"0.5203935",
"0.5201605",
"0.51948035",
"0.51896507",
"0.5185797",
"0.51853985",
"0.51806647",
"0.51739866",
"0.51695746",
"0.51485425",
"0.51466674",
"0.5137038",
"0.5136216",
"0.51361704",
"0.51340103",
"0.512106",
"0.5095323",
"0.5084549",
"0.5082286",
"0.5078984",
"0.50779825",
"0.50734097",
"0.5067317",
"0.5064916",
"0.50564176",
"0.5055272",
"0.5048842",
"0.5047617",
"0.5047514",
"0.5026794",
"0.5025035",
"0.5023066",
"0.50209576",
"0.5018189",
"0.50097597",
"0.5009192",
"0.49941108",
"0.4984126",
"0.4982971",
"0.49812385",
"0.49802694",
"0.4980212",
"0.49767235",
"0.49767235",
"0.49744493",
"0.4973087",
"0.4971702",
"0.4965911",
"0.49634686",
"0.49605238",
"0.4956944",
"0.49497932",
"0.4946719",
"0.49459937",
"0.49416345",
"0.49370542"
] | 0.0 | -1 |
Escapes a scalar value to use as regex | protected function escapeForRegex($regex) {
// $regex = str_replace('.', '\\.', $regex);
$regex = str_replace('?', '\\\\?', $regex);
$regex = str_replace('[', '\\\\[', $regex);
$regex = str_replace(']', '\\\\]', $regex);
$regex = str_replace('*', '([\\\\w\\\\-])*', $regex);
return $regex;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function escape($value);",
"public function escape($value);",
"public static function escape($value) {}",
"abstract public function escapeString($value);",
"public abstract function escapeString($value);",
"function checkRealEscapeString($value);",
"public function escape($stringValue);",
"public function escapeString(string $value): string;",
"public function quote_literal($value)\n\t{\n\t\tif (is_object($value) OR is_string($value))\n\t\t\treturn $this->escape($value);\n\n\t\treturn parent::quote_literal($value);\n\t}",
"public static function escape($value) {\n return slDatabaseManager::getConnection()->escape($value);\n }",
"public function escape($value)\n\t{\n\t\tswitch(gettype($value))\n\t\t{\n\t\t\tcase 'NULL':\n\t\t\t\t$value = 'NULL';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'boolean':\n\t\t\t\t$value = $this->escapeBoolean($value);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'integer':\n\t\t\tcase 'double':\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$value = '\\''.$this->escapeStr($value).'\\'';\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $value;\n\t}",
"function backslashit($value)\n {\n }",
"public function quote_literal($value)\n\t{\n\t\tif (is_object($value) OR is_string($value))\n\t\t\treturn $this->escape_literal($value);\n\n\t\treturn parent::quote_literal($value);\n\t}",
"public function escape($value)\n {\n // SQL standard is to use single-quotes for all values\n return \"'$value'\";\n }",
"public function escape($value) {\n $connection = $this -> connect();\n return $connection -> real_escape_string(trim($value));\n }",
"public function escape_value($value){\n if($this->real_escape_string_e){\n if($this->magic_quotes_a){\n $value = stripcslashes($value);\n }\n $value = mysql_real_escape_string($value);\n }\n if(!$this->magic_quotes_a){\n $value = addslashes($value);\n }\n return $value;\n }",
"public function escapeValue($value): string {\n\t\treturn $this->sqlAdapter->escapeValue($value);\n\t}",
"public function escape($string);",
"public function escape($string);",
"public function quote($value){\n $connection = $this -> connect();\n return pg_escape_literal($value);\n }",
"function escape($value) {\n\t\treturn $this->mysql_client->escape_string($value);\n\t}",
"public function escape_value($value) {\n\n\t\t if($this->real_escape_string) { // PHP v4.3.0 or higher\n\t\t// undo any magic quote effects so mysql_real_escape_string can do the work\n\t\tif($this->magic_quotes_active) { $value = stripslashes($value); }\n\t\t\t$value = mysqli_real_escape_string($this->connection, $value);\n\t\t} else { // before PHP v4.3.0\n\t\t// If magic quotes aren't already on then add slases manually\n\t\tif(!$this->magic_quotes_active) { $value = addslashes($value); }\n\t\t// if magic quotes are active, then teh slashes already exist\n\t\t}\n\t\treturn $value;\n\t}",
"protected function escapeString($value)\n {\n return $this->entityManager->getConnection()->quote($value);\n }",
"public abstract function escape($string);",
"public function escape($value) {\n\t\treturn ($this->connection)\n\t\t\t? pg_escape_string($this->connection, $value)\n\t\t\t: pg_escape_string($value);\n\t}",
"public function escapeValue($value)\n {\n if ($value instanceof DateTime) {\n return $this->escapeDateTime($value);\n }\n\n if ($value instanceof Expression) {\n return (string)$value;\n }\n\n $type = is_object($value) ? get_class($value) : gettype($value);\n $method = [ $this, 'escape' . ucfirst($type) ];\n\n if (is_callable($method)) {\n return call_user_func($method, $value);\n } else {\n throw new NotScalar('$value has to be scalar data type. ' . gettype($value) . ' given');\n }\n }",
"function escapeString($string) {\nreturn preg_replace('/([\\,;])/','\\\\\\$1', $string);\n}",
"public function escapeString($stringToEscape);",
"function escapeForRegex($pattern)\n{\n\t$escaped='';\n\t$escapechars = array(\"/\",\"?\",'\"', \"(\", \")\", \"'\",\"*\",\".\",\"[\",\"]\");\n\tfor ($counter = 0; $counter<strlen($pattern);$counter++)\n\t{\n\t\t$curchar = substr($pattern, $counter, 1);\n\t\tif (in_array($curchar,$escapechars))\n\t\t$escaped .= \"\\\\\";\n\t\t$escaped.=$curchar;\n\t}\n\treturn $escaped;\n}",
"protected function escape( $value )\n\t{\n\t\treturn e( $value );\n\t}",
"abstract public function escapeString($string);",
"function sc_php_escape($value) {\n\tif (is_string($value));\n\t// strip out slashes IF they exist AND magic_quotes is on\n\tif (get_magic_quotes_gpc() && (strstr($value,'\\\"') || strstr($value,\"\\\\'\"))) $value = stripslashes($value);\t\n\t// escape string to make it safe for mysql\n\treturn addslashes($value);\n}",
"public function escapeString($string);",
"abstract public function escape_string( $str );",
"public function addSlashes(&$value){\nreturn $value = \"'$value'\";\n}",
"public function escape($value)\n {\n return $this->mysqli->escape_string($value);\n }",
"public static function escape($s) {}",
"protected static function _escapeChar($matches) {}",
"public static function escapeString($val)\n {\n $toRepl = self::getReservedSymbols();\n \n $with = array();\n \n foreach($toRepl as $char)\n {\n $with[] = \"\\\\$char\";\n }\n\n return str_replace($toRepl, $with, $val);\n }",
"public function escape($value)\n\t{\n\t //$this->ping();\n\t $this->_connection OR $this->connect();\n\n\t if (($value = $this->_connection->real_escape_string((string) $value)) === false) {\n\t throw new DatabaseException($this->_connection->error, $this->_connection->errno);\n\t }\n\n\t // SQL standard is to use single-quotes for all values\n\t\treturn \"'$value'\";\n\t}",
"public function escapeField($string);",
"protected function escape($value): string\n {\n $value = strtr(\n $value,\n [\n '%' => '\\%',\n '_' => '\\_',\n '\\\\' => '\\\\\\\\',\n ]\n );\n\n return '%' . $value . '%';\n }",
"public function escapeIdentifier(string $value): string;",
"static public function real_escape_string($s) { return self::escape($s); }",
"function escape( $val ) {\r\n\r\n\t\tif( !$this->connected )\r\n\t\t\t$this->connect();\r\n\r\n return $this->socket->real_escape_string($val);\r\n\r\n\t}",
"abstract protected function _escape($s);",
"protected function escapePhrase($value) {\n\t\t$pattern = '/(\"|\\\\\\)/';\n\t\t$replace = '\\\\\\$1';\n\n\t\treturn preg_replace($pattern, $replace, $value);\n\t}",
"protected abstract function escape($string);",
"public static function escape($val){\n\t\t\tswitch(gettype($val)){\n\t\t\t\tcase 'array': case 'object':\n\t\t\t\t\t$val=(array)$val;\n\t\t\t\t\tforeach($val as $k=>$v)\n\t\t\t\t\t\t$val[$k]=self::escape($v);\n\t\t\t\t\treturn $val;\n\t\t\t\tcase 'string':\n\t\t\t\t\treturn mysql_real_escape_string($val);\n\t\t\t\tcase 'NULL':\n\t\t\t\t\treturn 'NULL';\n\t\t\t\tcase 'boolean':\n\t\t\t\t\treturn $val ? 'TRUE' : 'FALSE';\n\t\t\t\tdefault:\n\t\t\t\t\treturn strval($val); \n\t\t\t}\n\t\t}",
"function escape($value) {\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);\n}",
"protected function _escape($value){\n // если magic_quotes_gpc включена - используем stripslashes\n if (get_magic_quotes_gpc()) {\n $value = stripslashes($value);\n }\n // Если переменная - число, то экранировать её не нужно\n // если нет - то окружем её кавычками, и экранируем\n if (!is_numeric($value) && (strtoupper($value) !== 'NULL') ) {\n $value = \"'\" . mysql_real_escape_string($value) . \"'\";\n }\n return $value;\n }",
"function sql_real_escape_string($val,$dbh=NULL)\n {\n $s = sql_quote_string($val, $dbh);\n return (string) substr($s, 1, strlen($s) -2 );\n// return addslashes($val);\n }",
"public function addEscape($func);",
"public function escape($text);",
"function mysql_escape(&$value)\r\n\t{\r\n\t\t$value = mysql_real_escape_string($value);\r\n\t}",
"public static function escape($som) {}",
"function aQuote($matches){\n// print \"matches:\\n\";\n// print_r($matches);\n// print \"\\n\";\n\n $matches[1] = str_replace('**' , '', $matches[1]);\n list($type, $val) = preg_split('/:/', $matches[1]);\n\n switch($type){\n case 'localVar':\n return \"\\\". \\${$val} .\\\"\";\n break;\n case 'fieldVal':\n return \"\\\". dbQuote(\\$data['{$val}']) .\\\"\";\n break;\n case 'fieldChkVal':\n return \"\\\". dbQuote(\\$data['{$val}'], 'bool') .\\\"\";\n break;\n case 'fieldDateVal':\n return \"\\\". dbQuote(\\$data['{$val}'], 'date') .\\\"\";\n break;\n case 'fieldDateTimeVal':\n return \"\\\". dbQuote(\\$data['{$val}'], 'datetime') .\\\"\";\n break;\n case 'fieldIntVal':\n return \"\\\". dbQuote(\\$data['{$val}'], 'int') .\\\"\";\n break;\n case 'fieldMoneyVal':\n return \"\\\". dbQuote(\\$data['{$val}'], 'money') .\\\"\";\n break;\n case 'UserID':\n return \"\\\".\\$User->PersonID.\\\"\";\n break;\n case 'PR-ID':\n return \"\\\".\\$recordID.\\\"\";\n break;\n case 'RecordID':\n return \"\\\".\\$recordID.\\\"\";\n break;\n default:\n return $val;\n }\n\n //return \"replaced\";\n}",
"function addslashes_strings_only($value)\n {\n }",
"public static function escapeRegex( $regex )\n {\n return str_replace( self::$_REGEX_UNESCAPED, self::$_REGEX_ESCAPED, str_replace( self::$_REGEX_ESCAPED, self::$_REGEX_UNESCAPED, $regex ) );\n }",
"private function escapeString(string $value): string\n {\n return str_replace(\"'\", \"''\", $value);\n }",
"static function escapeRegexReplacement($string)\n\t{\n\t\t$string = str_replace('\\\\', '\\\\\\\\', $string);\n\t\t$string = str_replace('$', '\\\\$', $string);\n\t\treturn $string;\n\t}",
"public function Escape($value)\n {\n $this->connect();\n if($value===null)\n {\n $value='NULL';\n } else if(!is_numeric($value))\n {\n $value=\"'\".mysqli_real_escape_string(self::$_link, $value).\"'\";\n }\n return $value;\n }",
"public static function quote( $value ) {\n\t\t# Quote \\ here, because it needs always escaping\n\t\t$value = addcslashes( $value, '\\\\' );\n\n\t\t# For readability\n\t\t$single = \"'\";\n\t\t$double = '\"';\n\t\t$quote = $single;\n\n\t\t# It is safe to use '-quoting, unless there is '-quote in the text\n\t\tif ( strpos( $value, $single ) !== false ) {\n\t\t\t# In case there is no variables that need to be escaped, just use \"-quote\n\t\t\tif ( strpos( $value, $double ) === false && !preg_match( '/\\$[^0-9]/', $value ) ) {\n\t\t\t\t$quote = $double;\n\t\t\t# Something needs quoting, pick the quote which causes less quoting\n\t\t\t} else {\n\t\t\t\t$doubleEsc = substr_count( $value, $double ) + substr_count( $value, '$' );\n\t\t\t\t$singleEsc = substr_count( $value, $single );\n\n\t\t\t\tif ( $doubleEsc < $singleEsc ) {\n\t\t\t\t\t$quote = $double;\n\t\t\t\t\t$extra = '$';\n\t\t\t\t} else {\n\t\t\t\t\t$extra = '';\n\t\t\t\t}\n\n\t\t\t\t$value = addcslashes( $value, $quote . $extra );\n\t\t\t}\n\t\t}\n\n\t\treturn $quote . $value . $quote;\n\t}",
"protected function escape($value, $type='literal') \n\t{\n\t\tswitch($type) {\n\t\t\tcase 'uri':\n\t\t\t\t$value = str_replace(array('<', '>'), array('%3C', '%3E'), $value);\n\t\t\tdefault:\n\t\t\t\t$value = str_replace('\"', '\"\"', $value);\n\t\t}\n\n\t\treturn $value;\n\t}",
"abstract public function quoteString($value);",
"public function escapeLike($string);",
"function esc(String $value){\n global $conn;\n $val = trim($value); // remove empty space sorrounding string\n $val = mysqli_real_escape_string($conn, $value);\n return $val;\n }",
"public function placeholder_escape()\n {\n }",
"function html_escape($v) {\n\treturn escape($v, TRUE);\n}",
"function escs(String $value)\n{\n // bring the global db connect object into function\n global $conn;\n\n $val = trim($value); // remove empty space sorrounding string\n $data = stripslashes($val);\n $data = htmlspecialchars($data);\n $val = mysqli_real_escape_string($conn, $value);\n\n return $data;\n}",
"function escapeSimple($string) {\n return $this->dbH->quote($string);\n }",
"function escape ($val, $charset = 'UTF-8') {\n\treturn htmlspecialchars ($val, ENT_QUOTES, $charset);\n}",
"public function insertEscaped(...$field_values);",
"protected static function _escape($value) {\n if (!is_string($value)) {\n return $value;\n }\n\n return htmlspecialchars($value, ENT_QUOTES, 'UTF-8');\n }",
"public function escape($value)\n\t{\n\t\tif(is_int($value))\n\t\t\treturn $value;\n\t\telse if(is_float($value))\n\t\t\treturn str_replace(',', '.', ''.$value);\n\t\telse\n\t\t\treturn $this->escapeString($value);\n\t}",
"public function escape(string $str): string;",
"function escape($string)\n\t{\n\t\treturn pg_escape_string($string);\n\t}",
"function esc($value)\n{\n return htmlentities($value);\n}",
"public function escape($data) {\n return $this->wjdb->real_escape_string($data);\n }",
"function escape_by_ref(&$string){\n\t\t$string = $this->escape($string);\n\t}",
"function escape($value){//XSS attacks protection\n return htmlspecialchars($value , ENT_QUOTES,'UTF-8');\n }",
"static protected function _quote($value)\n {\n if (is_int($value)) {\n return $value;\n } elseif (is_float($value)) {\n return sprintf('%F', $value);\n }\n return \"'\" . addcslashes($value, \"\\000\\n\\r\\\\'\\\"\\032\") . \"'\";\n }",
"public function escapeLikeValue($value, $options = array()) {\n $value = str_replace('\\\\', '\\\\\\\\', $value);\n\n $from = array();\n $to = array();\n if (empty($options['allow_symbol_mask'])) {\n $from[] = '_';\n $to[] = '\\_';\n }\n if (empty($options['allow_string_mask'])) {\n $from[] = '%';\n $to[] = '\\%';\n }\n if ($from) {\n $value = str_replace($from, $to, $value);\n }\n\n if (isset($options['position'])) {\n switch ($options['position']) {\n case 'any':\n $value = '%' . $value . '%';\n break;\n case 'start':\n $value = $value . '%';\n break;\n case 'end':\n $value = '%' . $value;\n break;\n }\n }\n return $value;\n }",
"public static function escapeSolrValue($string)\n\t{\n\t\t$match = array('#', '&', '\\\\', '/', '+', '-', '&', '|', '!', '(', ')', '{', '}', '[', ']', '^', '~', '*', '?', ':', ';', '\"'); // The #, &, and \" is apparently CHAOS specific.\n\t\t$replace = array('\\\\ ', '\\\\ ', '\\\\\\\\', '\\\\/', '\\\\+', '\\\\-', '\\\\&', '\\\\|', '\\\\!', '\\\\(', '\\\\)', '\\\\{', '\\\\}', '\\\\[', '\\\\]', '\\\\^', '\\\\~', '\\\\*', '\\\\?', '\\\\:', '\\\\;', '\\\\\"');\n\t\t$string = str_replace($match, $replace, $string);\n\t\treturn $string;\n\t}",
"function ps_escape_string($str, $as_token = false, $esc_quotes = false) {\n $s = '';\n foreach (str_split($str) as $c) {\n if (($i = strpos(\"\\n\\r\\t\\10\\f\\\\()\", $c)) !== false)\n $c = '\\\\' . 'nrtbf\\\\()'[$i]; // postscript escapes, see PLRM 3.2.2 Literals\n elseif (($o = ord($c)) < 0x20 || $o >= 0x7F)\n $c = sprintf('\\\\%03o', $o); // control & non-ASCII\n elseif ($esc_quotes && $c == '\"')\n $c = '\\\\042'; // octal escape \" (for gs v9 parameters)\n $s .= $c;\n }\n return $as_token ? \"($s)\" : $s;\n}",
"function escapeString( $value )\r\n\t{\r\n die(\"method \" . __METHOD__ . \" is not implemented\" . Diagnostics::trace());\r\n\t}",
"public function _real_escape($data)\n {\n }",
"private function escape_string($in_string)\n {\n // $str = $in_string;\n return preg_replace('([%;])', '\\\\\\1', $in_string);\n //return $in_string;\n }",
"function like_escape($text)\n {\n }",
"public function escape($data) {\r\n\t\treturn $this->connection->real_escape_string ( $data );\r\n\t}",
"static public function SQLFix( $value )\r\n\t{\r\n\t\treturn @addslashes( $value );\r\n\t}",
"private function escape ($string, $regex='@', $reconnect_attempt = FALSE) {\n\t\tif ($reconnect_attempt) {\n\t\t\t// If the connection is lost, try to reconnect.\n\t\t\tif ( !isset( $this->dbcon ) || ! $this->dbcon ) {\n\t\t\t\t$this->db_connect();\n\t\t\t}\n\t\t}\n\t\tif (is_string($string)) {\n\t\t\t$string = mysqli_real_escape_string($this->dbcon, $string);\n\t\t\t// $string = addcslashes($string, '%_');\n\t\t\t$string = \"'\" . str_replace('@', $string, $regex) . \"'\";\n\t\t}\n\t\treturn $string;\n\t}",
"function escape($variable) {\n\n\tglobal $db;\n\n\treturn mysqli_real_escape_string($db, $variable);\n}",
"function esc(String $value)\n{\n\t// bring the global db connect object into function\n\tglobal $conn;\n\n\t$val = trim($value); // remove empty space sorrounding string\n\t$data = stripslashes($val);\n\t$data = htmlspecialchars($data);\n\t$val = mysqli_real_escape_string($conn, $value);\n\n\treturn $data;\n}",
"function escaped_str($string)\n{\n $safe_string = Database::getInstance()->getConnection()->real_escape_string($string);\n return $safe_string;\n}",
"function esc(String $value){\n\t// bring the global db connect object into function\n\tglobal $connection;\n\t// remove empty space sorrounding string\n\t$val = trim($value); \n\t$val = mysqli_real_escape_string($connection, $value);\n\treturn $val;\n}",
"protected function _quote($value) {\n if (is_int($value)) {\n return $value;\n } elseif (is_float($value)) {\n return sprintf('%F', $value);\n }\n return \"'\" . addcslashes($value, \"\\000\\n\\r\\\\'\\\"\\032\") . \"'\";\n }",
"abstract public function escapeStr($str, $like = false);",
"function escape($data) {\n\t\tif ( !isset($data) ) return '';\n if ( is_numeric($data) ) return $data;\n\n $non_displayables = array(\n '/%0[0-8bcef]/', // url encoded 00-08, 11, 12, 14, 15\n '/%1[0-9a-f]/', // url encoded 16-31\n '/[\\x00-\\x08]/', // 00-08\n '/\\x0b/', // 11\n '/\\x0c/', // 12\n '/[\\x0e-\\x1f]/' // 14-31\n );\n \n foreach ( $non_displayables as $regex )\n $data = preg_replace( $regex, '', $data );\n $search = array(\"\\\\\", \"\\x00\", \"\\n\", \"\\r\", \"'\", '\"', \"\\x1a\");\n $replace = array(\"\\\\\\\\\",\"\\\\0\",\"\\\\n\", \"\\\\r\", \"\\'\", '\\\"', \"\\\\Z\");\n\n return str_replace($search, $replace, $data);\n\t}",
"static protected function escape($value, $charset = 'utf-8'){\r\n\t\tif (!is_string($value)){\r\n\t\t\treturn $value;\r\n\t\t}\r\n\t\treturn htmlspecialchars($value, ENT_QUOTES, $charset);\r\n\t}"
] | [
"0.78104746",
"0.78104746",
"0.77733785",
"0.7506301",
"0.74634993",
"0.7024305",
"0.69628465",
"0.6868516",
"0.6866481",
"0.68594885",
"0.6818358",
"0.6777312",
"0.67533654",
"0.6728062",
"0.6723901",
"0.66510224",
"0.658681",
"0.6584252",
"0.6584252",
"0.6577824",
"0.65624815",
"0.65235966",
"0.6491739",
"0.647673",
"0.6446027",
"0.64402115",
"0.64360636",
"0.6428713",
"0.63898695",
"0.63806754",
"0.6377581",
"0.6368943",
"0.6360139",
"0.6344369",
"0.63440114",
"0.6330877",
"0.6326727",
"0.63214314",
"0.6302738",
"0.6284833",
"0.6277035",
"0.6265491",
"0.62646514",
"0.62363803",
"0.622398",
"0.62217885",
"0.61904097",
"0.6168587",
"0.61676025",
"0.6164277",
"0.6162494",
"0.6143",
"0.61368173",
"0.613316",
"0.61220104",
"0.6120576",
"0.61041105",
"0.60861593",
"0.6075775",
"0.6058263",
"0.6056899",
"0.60408777",
"0.60379875",
"0.60240793",
"0.6010126",
"0.60085166",
"0.60074854",
"0.60051864",
"0.59966445",
"0.5990085",
"0.59862965",
"0.59777606",
"0.5950043",
"0.5949065",
"0.5949008",
"0.59333146",
"0.59289235",
"0.58961374",
"0.5895945",
"0.5885481",
"0.58837897",
"0.5881352",
"0.5876464",
"0.5874097",
"0.5865999",
"0.5855737",
"0.58494955",
"0.58377033",
"0.5835866",
"0.58353245",
"0.58347535",
"0.58295596",
"0.58281827",
"0.58221",
"0.58064574",
"0.58003515",
"0.5798116",
"0.57978874",
"0.57930636",
"0.57892054"
] | 0.6350078 | 33 |
Bans (purges) multiple URLs | public function banUrls(array $urls, $recursive = false) {
foreach ($urls as $url) {
$this->banUrl($url, $recursive);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateAllShortURLs(){\n\t\t\tglobal $db;\n\t\t\t\n\t\t\t// We need to get the longURL and drawLink() to match...\n\t\t\tif($urls = $db->get_results(\"SELECT * FROM shorturls WHERE guid<=''\") ){\n\t\t\t\tforeach($urls as $url){\n\t\t\t\t\t// So now we have all of the unassigned urls...\n\t\t\t\t\t// ??????\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"function process_urls($urls) {\n\tif (count($urls) > 0) {\n\t\techo '<p>Getting url:'.$urls[0].', '. count($urls) .' remaining</p>';\n\t\tget_url_info($urls[0], $urls);\n\t}\n}",
"public function get_scan_urls() {\r\n\t\t// Calculate URLs to Check.\r\n\t\t$args = array(\r\n\t\t\t'orderby' => 'rand',\r\n\t\t\t'posts_per_page' => '1',\r\n\t\t\t'ignore_sticky_posts' => true,\r\n\t\t\t'post_status' => 'publish',\r\n\t\t);\r\n\r\n\t\t$urls = array();\r\n\r\n\t\t$urls[] = home_url();\r\n\r\n\t\t$post_types = get_post_types();\r\n\t\t$post_types = array_diff( $post_types, array( 'attachment', 'nav_menu_item', 'revision' ) );\r\n\r\n\t\tforeach ( $post_types as $post_type ) {\r\n\t\t\t$args['post_type'] = $post_type;\r\n\t\t\t$posts = get_posts( $args );\r\n\t\t\tif ( $posts ) {\r\n\t\t\t\t$urls[] = get_permalink( $posts[0] );\r\n\t\t\t}\r\n\r\n\t\t\t$archive_link = get_post_type_archive_link( $post_type );\r\n\t\t\tif ( $archive_link ) {\r\n\t\t\t\t$urls[] = $archive_link;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$post = get_post( get_option( 'page_for_posts' ) );\r\n\t\tif ( get_option( 'show_on_front' ) && $post ) {\r\n\t\t\t$urls[] = get_permalink( $post->ID );\r\n\t\t}\r\n\r\n\t\t$urls = array_unique( $urls );\r\n\r\n\t\t$urls_list = array();\r\n\t\t// Duplicate every URL 3 times. This will be enough to generate all the files for most of the sites.\r\n\t\tfor ( $i = 0; $i < 3; $i++ ) {\r\n\t\t\t$urls_list = array_merge( $urls_list, $urls );\r\n\t\t}\r\n\r\n\t\tsort( $urls_list );\r\n\t\treturn $urls_list;\r\n\t}",
"function multi_curl(&$tasks){\n\n $header = array();\n $header[] = 'Authorization: '.TOKEN;\n\n // страны, содержимое которых надо получить\n $urls = array(\"https://api.ittour.com.ua/module/params/338?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/318?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/320?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/372?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/434?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/39?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/16?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/332?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/376?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/378?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/334?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/23?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/60?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/321?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/75?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/69?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/330?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/323?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/76?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/1082?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/9?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/90?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/324?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/91?entity=hotel\",\n \"https://api.ittour.com.ua/module/params/442?entity=hotel\",\n //поиск регионов\n \"https://api.ittour.com.ua/module/params\"\n );\n\n// инициализируем \"контейнер\" для отдельных соединений (мультикурл)\n $cmh = curl_multi_init();\n\n// массив заданий для мультикурла\n $tasks = array();\n// перебираем наши урлы\n foreach ($urls as $url) {\n // инициализируем отдельное соединение (поток)\n $ch = curl_init($url);\n // если будет редирект - перейти по нему\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n // возвращать результат\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // возвращать http-заголовок\n curl_setopt($ch, CURLOPT_HTTPHEADER , $header);\n // таймаут соединения\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);\n // таймаут ожидания\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n // добавляем дескриптор потока в массив заданий\n $tasks[$url] = $ch;\n // добавляем дескриптор потока в мультикурл\n curl_multi_add_handle($cmh, $ch);\n }\n\n// количество активных потоков\n $active = null;\n// запускаем выполнение потоков\n do {\n $mrc = curl_multi_exec($cmh, $active);\n }\n while ($mrc == CURLM_CALL_MULTI_PERFORM);\n\n// выполняем, пока есть активные потоки\n while ($active && ($mrc == CURLM_OK)) {\n // если какой-либо поток готов к действиям\n if (curl_multi_select($cmh) != -1) {\n // ждем, пока что-нибудь изменится\n do {\n $mrc = curl_multi_exec($cmh, $active);\n // получаем информацию о потоке\n $info = curl_multi_info_read($cmh);\n // если поток завершился\n if ($info['msg'] == CURLMSG_DONE) {\n $ch = $info['handle'];\n // ищем урл страницы по дескриптору потока в массиве заданий\n $url = array_search($ch, $tasks);\n // забираем содержимое\n $tasks[$url] = json_decode(curl_multi_getcontent($ch), true);\n // удаляем поток из мультикурла\n curl_multi_remove_handle($cmh, $ch);\n // закрываем отдельное соединение (поток)\n curl_close($ch);\n }\n }\n while ($mrc == CURLM_CALL_MULTI_PERFORM);\n }\n }\n\n // закрываем мультикурл\n\n curl_multi_close($cmh);\n\n return $tasks;\n}",
"function drush_ti_amg_fw_topics_urls() {\n $batch = array();\n $batch_nodes = array();\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'node')->entityCondition('bundle', array('topic_page_child'), 'IN');\n $result = $query->execute();\n\n if ($result['node']) {\n $batch_nodes = array_keys($result['node']);\n }\n\n foreach ($batch_nodes as $nid) {\n $batch['operations'][] = array(\n '_ti_amg_fw_topics_do_drush_fix_urls',\n array(\n $nid,\n ),\n );\n }\n\n $batch['finished'] = '_ti_amg_fw_topics_do_drush_fix_urls_finished';\n batch_set($batch);\n drush_backend_batch_process();\n}",
"public function purgeInvalidUrls();",
"public function filter() {\n\t\t$args = func_get_args();\n\t\t$out = new CMS_Navigation3_LinkSet();\n\t\tforeach($this->links as $link) {\n\t\t\t$valid = true;\n\t\t\tforeach($args as $arg) {\n\t\t\t\tif (is_string($arg)&&$arg[0]=='!') {\n\t\t\t\t\t$arg = substr($arg,1);\n\t\t\t\t\tif ($link[$arg]) $valid = false;\n\t\t\t\t}\n\t\t\t\telse if (!$link[$arg]) $valid = false;\n\t\t\t}\t\n\t\t\tif ($valid) $out->links[] = $link;\n\t\t}\n\t\treturn $out;\n\t}",
"function get_urls($count, $start, $urls, $filter) {\n\tif ($start < $count) {\n\t\t$sparql = new EasyRdf_Sparql_Client(esc_attr(get_option( 'endpoint')));\n\t\t$result = $sparql->query(\n\t\t\t'SELECT distinct ?url ?date WHERE {\n\t\t\t\t ?url rdf:type <http://schema.org/CreativeWork>;\n\t\t\t\t '.$filter.'\n\t\t\t\t}\n\t\t\t\tORDER BY DESC(?date)\n\t\t\t\tLIMIT 50\n\t\t\t\tOFFSET ' . $start\n\t\t);\n\t\tforeach ($result as $row) {\n\t\t\techo '<br/>adding to array: '. $row->url;\n\t\t\tarray_push($urls, $row->url);\n\t\t}\n\t\tget_urls($count, $start += 50, $urls, $filter);\n\t} else {\n\t\tprocess_urls($urls);\t\n\t}\n\t\n\t\n}",
"public function isUrlAllowRulesWithUrlsProvider()\r\n {\r\n return array(\r\n array(\r\n array(),\r\n '/url',\r\n true\r\n ),\r\n array(\r\n array(\r\n 'googleBot' => array(\r\n 'disallow' => array(\r\n '/url'\r\n ),\r\n ),\r\n ),\r\n '/url',\r\n true\r\n ),\r\n array(\r\n array(\r\n '*' => array(),\r\n ),\r\n '/url',\r\n true\r\n ),\r\n array(\r\n array(\r\n '*' => array(\r\n 'disallow' => array(\r\n '/url/2',\r\n ),\r\n ),\r\n ),\r\n '/url',\r\n true\r\n ),\r\n array(\r\n array(\r\n '*' => array(\r\n 'disallow' => array(\r\n '/url/2',\r\n ),\r\n ),\r\n ),\r\n '/url/2',\r\n false\r\n ),\r\n array(\r\n array(\r\n '*' => array(\r\n 'allow' => array(\r\n '/url/test2',\r\n ),\r\n 'disallow' => array(\r\n '/url',\r\n ),\r\n ),\r\n ),\r\n '/url',\r\n false\r\n ),\r\n array(\r\n array(\r\n '*' => array(\r\n 'allow' => array(\r\n '/url/test2',\r\n ),\r\n 'disallow' => array(\r\n '/url',\r\n ),\r\n ),\r\n ),\r\n '/url/any',\r\n false\r\n ),\r\n array(\r\n array(\r\n '*' => array(\r\n 'allow' => array(\r\n '/url/specificPath',\r\n ),\r\n 'disallow' => array(\r\n '/',\r\n ),\r\n ),\r\n ),\r\n '/url/specificPath',\r\n true\r\n ),\r\n );\r\n }",
"private function loadURLs() {\r\n $status = $this->statusIsAvailable($this->getStatus()) ? $this->getStatus() : 'test';\r\n\r\n\tforeach ($this->_url as $scriptname => $modes)\r\n\t{\r\n\t\t$this->url[$scriptname] = $modes[$status];\r\n\t}\r\n }",
"function findPageUrls();",
"function sanitize_trackback_urls($to_ping)\n {\n }",
"function make_urls() {\n $url = '/search/' . $this->id . '/';\n $this->append_urls('self', $url);\n }",
"protected function crawlUrls()\n\t{\n\t\t// only execute if a cURL request is not running\n\t\tif (!$this->running) {\n\t\t\t$this->execute();\n\t\t}\n\t}",
"protected function completeAllUrls(&$rows) {\n foreach ($rows as &$row) {\n $row['url'] = $this->completeUrl($row['url']);\n }\n }",
"static function matchUrl($_non404=True){\n\t\t$cBindA = $_non404? self::$bindA : self::$bind404A;\n\n\t\t//collect detected url's\n\t\t$bondA = [];\n\t\tforeach ($cBindA as $cBind)\n\t\t\tif ($cBind->match())\n\t\t\t\t$bondA[] = $cBind;\n\n\t\tif (!count($bondA))\n\t\t\treturn;\n\t\t\n\t\treturn $bondA;\n\t}",
"private function loadURLs()\r\n\t{\r\n\t\t$status = $this->statusIsAvailable($this->getStatus()) ? $this->getStatus() : 'test';\r\n\r\n\t\tforeach ($this->url as $scriptname => $modes)\r\n\t\t\t$this->url_script[$scriptname] = $modes[$status];\r\n\t}",
"function filter() {\n // the page we will redirect to\n $url['action'] = 'index';\n\n // build a URL will all the search elements in it\n // the resulting URL will be\n // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\n foreach ($this->data as $k => $v) {\n foreach ($v as $kk => $vv) {\n $url[$k . '.' . $kk] = $vv;\n }\n }\n // redirect the user to the url\n $this->redirect($url, null, true);\n }",
"public function multipleLinks(array $links);",
"private function enrich_additional_urls(array $urls): array {\n return f\\unique(f\\concat(\n $urls,\n $this->fetch_password_protected_posts(),\n $this->fetch_yoast_noindex_posts()\n ));\n }",
"function spider($url)\n {\n global $http_urls;\n $url_array = array();\n\n //判断url是否有效,这个方法效率太低,不能用\n /*$array = get_headers($url,1); \n if(preg_match('/200/',$array[0])){ \n echo \"<pre/>\";\n print_r($array);\n }\n else\n {\n echo \"无效url资源!\";\n }*/\n $first_content = file_get_contents($url);\n $second_content = file_get_contents($url);\n \n $first_pattern = \"/^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$/\";\n $second_pattern = \"/http:\\/\\/[a-zA-Z0-9\\.]+/\";\n \n preg_match_all($first_pattern, $first_content, $first_match);\n preg_match_all($second_pattern, $second_content, $second_match);\n \n $result1 = array_unique($first_match[0]);\n $result2 = array_unique($second_match[0]);\n \n $final_urls = array_merge($result1, $result2);\n \n //print_r($final_urls);\n \n for($n = 0; $n < count($final_urls); $n++)\n {\n //echo $final_urls[$i].\"<br/>\";\n if(@file_get_contents($final_urls[$n])) $http_urls[] = $final_urls[$n];\n //spider($final_urls[$i]);\n }\n //print_r($http_urls);\n //spider($final_urls[0]);\n //parser($url);\n }",
"public function badUrlProvider() {\n\n $badRedirects[\"ip: 127.0.0.1\"] = array(\"http://127.0.0.1\", false);\n\n // Anything that resolves to zero needs to be tested carefully due to falsiness\n $badRedirects[\"ip: 0\"] = array(\"http://0/data.json\", false);\n\n // Hex is bad\n $badRedirects[\"ip: hex\"] = array(\"http://0x7f000001/data.json\", false);\n\n // So is octal\n $badRedirects[\"ip: octal\"] = array(\"http://0123/data.json\", false);\n\n // We don't like mixed hex and octal either\n $badRedirects[\"ip: mixed hex/octal/decimal\"] = array(\"http://0x7f.0x0.0.0/data.json\", false);\n\n // We don't even like dotted-quads\n $badRedirects[\"ip: dotted-quad\"] = array(\"http://111.22.34.56/data.json\", false);\n\n // Don't you come around here with any of that IPv6 crap\n $badRedirects[\"ipv6: localhost\"] = array(\"http://[::1]\", false);\n\n // Domains that resolve to IPv4 localhost? NFW.\n $badRedirects[\"localhost.ip4\"] = array(\"https://localhost.ip4/\", [['type' => 'A', 'ip' => '127.0.0.1']]);\n\n // Domains that resolve to IPv6 localhost? Get out!\n $badRedirects[\"localhost.ip6\"] = array(\"https://localhost.ip6:443\", [['type' => 'AAAA', 'ipv6' => '::1']]);\n\n // Domains that resolve to IPv6 addresses that represent IPv4 private ranges? Not on our watch!\n $badRedirects[\"localhost2.ip6\"] = array(\"http://localhost2.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:127.0.0.1']]);\n $badRedirects[\"private1.ip6\"] = array(\"https://private1.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:192.168.1.18']]);\n $badRedirects[\"private2.ip6\"] = array(\"https://private2.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:10.0.0.1']]);\n $badRedirects[\"private3.ip6\"] = array(\"http://private3.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:127.0.0.2']]);\n\n // Domains that resolve to IPv6 link-local adddresses? Hell no!\n $badRedirects[\"linklocal.ip6\"] = array(\"https://linklocal.ip6/\", [['type' => 'AAAA', 'ipv6' => 'fe80::']]);\n\n return $badRedirects;\n }",
"function thinkup_extract_urls_filter ( $tu_post ) {\n\n $regex = '/[a-z]+:\\/\\/[a-z0-9-_]+\\.[a-z0-9-_@:~%&\\?\\+#\\/.=]+[^:\\.,\\)\\s*$]/i';\n\n if ( preg_match_all($regex, $tu_post->wp_post->post_content, $matches) ) {\n\n $tu_post->links = array_merge($tu_post->links, $matches[0]);\n\n }\n\n return $tu_post;\n\n}",
"function fread_all_url($data = array()) {\n\t$data = array_filter($data);\n\t$data = array_values($data);\n\t//print_r($data);\n\t$user_agent = \"Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)\";\n\t$ch = array();\n\t$jml = count($data);\n\tif ($jml>0) {\n\t\t$mh = curl_multi_init();\n\t\tfor ($i=0; $i<$jml; $i++) {\n\t\t\t$ch[$i] = curl_init();\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_USERAGENT, $user_agent);\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_ENCODING,'gzip,deflate'); // for faster loading\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_HTTPGET, 1 );\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_RETURNTRANSFER, 1 );\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_FOLLOWLOCATION , 1 );\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_URL, $data[$i] );\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_REFERER, \"\" );\n\t\t\tif (preg_match(\"/https/is\", $data[$i])) curl_setopt( $ch[$i], CURLOPT_SSL_VERIFYPEER, false);\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_CONNECTTIMEOUT,20); // timeout on connect\n\t\t\tcurl_setopt( $ch[$i], CURLOPT_MAXREDIRS,10);\n\t\t\tcurl_multi_add_handle($mh,$ch[$i]);\n\t\t}\n\t\t$running = NULL;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\t$mrc = curl_multi_exec($mh,$running);\n\t\t\t} catch (Exception $e) {\n\t\t\t\tif (curl_errno()) {\n\t\t\t\t\t$hasil = false;\n\t\t\t\t\t$running = false;\n\t\t\t\t}\n\t\t\t}\n\t\t} while($running > 0 || $mrc == CURLM_CALL_MULTI_PERFORM);\n\t\twhile ($running && $mrc == CURLM_OK) {\n\t\t\tif (curl_multi_select($mh) != -1) {\n\t\t\t\tdo {\n\t\t\t\t\t//usleep(10000);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$mrc = curl_multi_exec($mh, $running);\n\t\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t\tif (curl_errno()) {\n\t\t\t\t\t\t\t$hasil = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t} while ($mrc == CURLM_CALL_MULTI_PERFORM);\n\t\t\t}\n\t\t}\n\t\tif (!isset($hasil))\t {\n\t\t\t$hasil = array();\n\t\t\tfor ($i=0; $i<$jml; $i++) {\n\t\t\t\t$hasil[$i] = curl_multi_getcontent($ch[$i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// REMOVE single handle\n\t\tfor ($i=0; $i<$jml; $i++) {\n\t\t\tcurl_multi_remove_handle($mh, $ch[$i]);\n\t\t}\n\t\tcurl_multi_close($mh);\n\t\treturn $hasil;\n\t}\n}",
"function recommend_urls($valid_user, $popularity = 1) \n{\n // If they have a URL in common with other users, they may like\n // other URLs that these people like\n $conn = db_connect();\n\n // find other matching users\n // with a url the same as you\n // as a simple way of excluding people's private pages, and\n // increasing the chance of recommending appealing URLs, we\n // specify a minimum popularity level\n // if $popularity = 1, then more than one person must have\n // a URL before we will recomend it\n\n // The IN operator allows us to specify multiple values in a WHERE clause.\n // The IN operator is a shorthand for multiple OR conditions.\n\n // The SELECT DISTINCT basically returns the rest of the users\n\n // The final SELECT returns urls\n\n $query = \"SELECT url\n FROM bookmarks\n WHERE username IN\n (SELECT DISTINCT(b2.username)\n FROM bookmarks b1, bookmarks b2\n WHERE b1.username = '\".$valid_user.\"'\n AND b1.username != b2.username\n AND b1.url = b2.url)\n AND url NOT IN\n (SELECT url\n FROM bookmarks\n WHERE username = '\".$valid_user.\"')\n GROUP BY url\n HAVING COUNT(url) > \".$popularity;\n\n if (!($result = $conn->query($query))) {\n throw new Exception('<p>Could not find any bookmarks to recommend.</p>');\n }\n\n if ($result->num_rows == 0) {\n throw new Exception('<p>Could not find any bookmarks to recommend.</p>');\n }\n\n $urls = array();\n // Build an array of the relevant urls\n for ($count=0; $row = $result->fetch_object(); $count++) {\n $urls[$count] = $row->url;\n }\n\n return $urls;\n}",
"function doBatchLookups() {\n\t\t$this->mResult->seek( 0 );\n\t\t$revIds = array();\n\t\t$batch = new LinkBatch();\n\t\t# Give some pointers to make (last) links\n\t\tforeach ( $this->mResult as $row ) {\n\t\t\tif ( isset( $row->rev_parent_id ) && $row->rev_parent_id ) {\n\t\t\t\t$revIds[] = $row->rev_parent_id;\n\t\t\t}\n\t\t\tif ( isset( $row->rev_id ) ) {\n\t\t\t\tif ( $this->contribs === 'newbie' ) { // multiple users\n\t\t\t\t\t$batch->add( NS_USER, $row->user_name );\n\t\t\t\t\t$batch->add( NS_USER_TALK, $row->user_name );\n\t\t\t\t}\n\t\t\t\t$batch->add( $row->page_namespace, $row->page_title );\n\t\t\t}\n\t\t}\n\t\t$this->mParentLens = Revision::getParentLengths( $this->mDbSecondary, $revIds );\n\t\t$batch->execute();\n\t\t$this->mResult->seek( 0 );\n\t}",
"function _make_url_clickable_cb($matches)\n {\n }",
"private function enrich_additional_urls(array $urls): array\n {\n return f\\unique(\n f\\concat(\n $urls,\n $this->fetch_password_protected_posts(),\n $this->fetch_yoast_noindex_posts()\n )\n );\n }",
"public function getUrls(): array;",
"public function getUrls(): array;",
"public function getUrls()\r\n {\r\n }",
"public function get_allowed_urls()\n {\n }",
"function _build_url($vars, $zone_name = '', $skip = null, $keep_all = false, $avoid_remap = false, $skip_keep = false, $hash = '')\n{\n global $HAS_KEEP_IN_URL_CACHE, $CAN_TRY_URL_SCHEMES_CACHE, $BOT_TYPE_CACHE, $WHAT_IS_RUNNING_CACHE, $KNOWN_AJAX, $IN_SELF_ROUTING_SCRIPT;\n\n $has_page = isset($vars['page']);\n\n if (($hash !== '') && ($hash[0] !== '#')) {\n $hash = '#' . $hash;\n }\n\n // Build up our URL base\n $stub = get_base_url(is_page_https($zone_name, $has_page ? $vars['page'] : ''), $zone_name);\n $stub .= '/';\n\n // For bots we explicitly unset skippable injected 'keep_' params because it bloats the crawl-space\n if (($BOT_TYPE_CACHE !== null) && (get_bot_type() !== null)) {\n foreach ($vars as $key => $val) {\n if ($key === 'redirect') {\n unset($vars[$key]);\n }\n if ((substr($key, 0, 5) === 'keep_') && (skippable_keep($key, $val))) {\n unset($vars[$key]);\n }\n }\n }\n\n // Things we need to keep in the url\n $keep_actual = array();\n if (($HAS_KEEP_IN_URL_CACHE === null) || ($HAS_KEEP_IN_URL_CACHE) || ($keep_all)) {\n static $mc = null;\n if ($mc === null) {\n $mc = get_magic_quotes_gpc();\n }\n\n $keep_cant_use = array();\n $HAS_KEEP_IN_URL_CACHE = false;\n foreach ($_GET as $key => $val) {\n if (is_array($val)) {\n if ($keep_all) {\n if ((!array_key_exists($key, $vars)) && (!isset($skip[$key]))) {\n _handle_array_var_append($key, $val, $vars);\n }\n }\n continue;\n }\n\n $is_keep = false;\n $appears_keep = ((isset($key[0])) && ($key[0] === 'k') && (substr($key, 0, 5) === 'keep_'));\n if ($appears_keep) {\n if ((!$skip_keep) && (!skippable_keep($key, $val))) {\n $is_keep = true;\n }\n $HAS_KEEP_IN_URL_CACHE = true;\n }\n if (((($keep_all) && (!$appears_keep)) || ($is_keep)) && (!array_key_exists($key, $vars)) && (!isset($skip[$key]))) {\n if ($mc) {\n $val = stripslashes($val);\n }\n if ($is_keep) {\n $keep_actual[$key] = $val;\n } else {\n $vars[$key] = $val;\n }\n } elseif ($is_keep) {\n if ($mc) {\n $val = stripslashes($val);\n }\n $keep_cant_use[$key] = $val;\n }\n }\n\n $vars += $keep_actual;\n }\n\n if ((!isset($vars['id'])) && (isset($vars['type'])) && ($vars['type'] === 'browse') && (!$keep_all)) {\n unset($vars['type']); // Redundant, let it default, this is our convention\n }\n\n global $URL_MONIKERS_ENABLED_CACHE;\n if ($URL_MONIKERS_ENABLED_CACHE === null) {\n $URL_MONIKERS_ENABLED_CACHE = url_monikers_enabled();\n }\n if ($URL_MONIKERS_ENABLED_CACHE) {\n $test = find_id_moniker($vars, $zone_name, false);\n if ($test !== null) {\n if (substr($test, 0, 1) === '/') { // relative to zone root\n $parts = explode('/', substr($test, 1), 3);\n $vars['page'] = $parts[0];\n if (isset($parts[1])) {\n $vars['type'] = $parts[1];\n } else {\n unset($vars['type']);\n }\n if (isset($parts[2])) {\n $vars['id'] = $parts[2];\n } else {\n unset($vars['id']);\n }\n } else { // relative to content module\n if (array_key_exists('id', $vars)) {\n $vars['id'] = $test;\n } else {\n $vars['page'] = $test;\n }\n }\n }\n }\n\n // Apply dashes if needed\n if ($has_page) {\n if ((strpos($vars['page'], '_') !== false) && ($vars['page'] !== '_SELF')) {\n $vars['page'] = str_replace('_', '-', $vars['page']);\n }\n }\n\n // We either use a URL Scheme, or return a standard parameterisation\n if (($CAN_TRY_URL_SCHEMES_CACHE === null) || ($avoid_remap)) {\n $can_try_url_schemes = can_try_url_schemes($avoid_remap);\n if (!$avoid_remap) {\n $CAN_TRY_URL_SCHEMES_CACHE = $can_try_url_schemes;\n }\n } else {\n $can_try_url_schemes = $CAN_TRY_URL_SCHEMES_CACHE;\n }\n $_what_is_running = $WHAT_IS_RUNNING_CACHE;\n if (!$IN_SELF_ROUTING_SCRIPT && $has_page) {\n $_what_is_running = 'index';\n }\n $test_rewrite = null;\n $self_page = ((!$has_page) || ((function_exists('get_zone_name')) && (get_zone_name() === $zone_name) && (($vars['page'] === '_SELF') || ($vars['page'] === get_page_name())))) && ((!isset($vars['type'])) || ($vars['type'] === get_param_string('type', 'browse', true))) && ($hash !== '#_top') && (!$KNOWN_AJAX);\n if ($can_try_url_schemes) {\n if ((!$self_page) || ($_what_is_running === 'index')) {\n $test_rewrite = _url_rewrite_params($zone_name, $vars, count($keep_actual) > 0);\n }\n }\n if ($test_rewrite === null) {\n $url = (($self_page) && ($_what_is_running !== 'index')) ? find_script($_what_is_running) : ($stub . 'index.php');\n\n // Fix sort order\n if (isset($vars['id'])) {\n $_vars = $vars;\n unset($_vars['id']);\n $vars = array('id' => $vars['id']) + $_vars;\n }\n if (isset($vars['type'])) {\n $_vars = $vars;\n unset($_vars['type']);\n $vars = array('type' => $vars['type']) + $_vars;\n }\n if ($has_page) {\n $_vars = $vars;\n unset($_vars['page']);\n $vars = array('page' => $vars['page']) + $_vars;\n }\n\n // Build up the URL string\n $symbol = '?';\n foreach ($vars as $key => $val) {\n if ($val === null) {\n continue; // null means skip\n }\n\n if (!isset($key[0]/*Faster than is_string*/) && $key !== '') {\n $key = strval($key);\n }\n\n if ($val === SELF_REDIRECT) {\n $val = get_self_url(true, true);\n }\n\n // Add in\n $url .= $symbol . $key . '=' . (is_integer($val) ? strval($val) :/*cms_*/urlencode($val/*,false*/));\n $symbol = '&';\n }\n } else {\n $url = $stub . $test_rewrite;\n }\n\n // Done\n return $url . $hash;\n}",
"public static function merge_items($urls, $start = 0, $end = 0, $limit = 0)\n {\n }",
"function ViewUrlsByTag( $f_szTags = '' ) {\n\tglobal $db;\n\n\t$g_szTag = $f_szTags;\n\n\t$script = $_SERVER['PHP_SELF'];\n\t$szBasePath = rtrim(dirname($script), '/') . '/';\n\n\t$mobile = isset($_GET['mobile']) || ( isset($_SERVER['HTTP_USER_AGENT']) && is_int(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mobi')) );\n\n\t// $arrInTags = explode(' ', $g_szTag);\n\t// $szWhereClause = 1 == count($arrInTags) ? \"(l_tags.tag = '\".$arrInTags[0].\"')\" : \"(l_tags.tag = '\".implode(\"' OR l_tags.tag = '\", $arrInTags).\"')\";\n\n\tif ( '~new' == $g_szTag ) {\n\t\t$szQuery = 'SELECT * FROM l_urls ORDER BY id DESC LIMIT 250;';\n\t}\n\telse {\n\t\t$tags = unaliasTags(preg_split('#[\\/\\s]+#', $g_szTag));\n\t\t$and = !strstr($g_szTag, \"/\");\n\n\t\t$szQuery = $db->replaceholders('\n\t\t\tSELECT u.*, COUNT(1) as matching\n\t\t\tFROM l_links l, l_tags t, l_urls u\n\t\t\tWHERE l.url_id = u.id AND l.tag_id = t.id AND t.tag in (?)\n\t\t\tGROUP BY u.id\n\t\t', array($tags));\n\t\tif ( $and ) {\n\t\t\t$szQuery .= $db->replaceholders(' HAVING matching = ?', array(count($tags)));\n\t\t}\n\t\t$szQuery .= ' ORDER BY u.id DESC';\n\t}\n\n\t$arrUrls = $db->fetch($szQuery)->all();\n\n\trequire 'tpl.index.php';\n\n}",
"public static function urls($text = '') {\n\t\t$matches = [];\n\t\t$regex = '/' . self::REGEX_MATCH_TAG . '|' . self::REGEX_CHAR_BACK . self::REGEX_URL . '/i';\n\t\tpreg_match_all($regex, $text, $matches);\n\t\t$results = array_filter($matches[2]);\n\t\treturn array_unique($results);\n\t}",
"public function getShares($url);",
"function update_refurls()\n{\n\tglobal $database;\n\n\t// IF URL IS NOT EMPTY\n\t$referring_url = $_SERVER[\"HTTP_REFERER\"];\n\tif(strpos(strtolower($referring_url), strtolower($_SERVER[\"HTTP_HOST\"])) !== FALSE) { return; }\n\n\tif( $referring_url )\n {\n\t // IS URL ALREADY IN DATABASE? IF YES, ADD TO HITS. IF NO, ADD NEW ROW\n\t $referring_url = str_replace(\"http://www.\", \"http://\", $referring_url);\n\t $database->database_query(\"\n INSERT INTO se_statrefs\n (statref_hits, statref_url)\n VALUES\n ('1', '{$referring_url}')\n\t\t\tON DUPLICATE KEY UPDATE\n statref_hits=statref_hits+1\n \");\n \n\t // IF 1000 ROWS REACHED, DELETE ONE TO MAKE ROOM\n\t $refurl_totalrows = $database->database_num_rows($database->database_query(\"SELECT statref_id FROM se_statrefs\"));\n \n\t if( $refurl_totalrows > 1000 )\n $database->database_query(\"DELETE FROM se_statrefs WHERE statref_hits='1' ORDER BY statref_id ASC LIMIT 1\");\n\t}\n}",
"public function crawl(){\n\t\t\t$this->collectUrls();\n\t\t}",
"public function testRejectAutomatchUrlUsingGET()\n {\n }",
"function virustotalscan_scan_url($message)\r\n{\r\n\tglobal $mybb;\r\n // in momentul in care se apeleaza aceasta functie toate testele au fost facute\r\n // altfel se incepe scanarea prin construirea cheii\r\n $key = $mybb->settings['virustotalscan_setting_key'];\r\n // se parseaza eventuale legaturi\r\n $message = preg_replace('#<a href=\"(.*?)\"(.*?)>(.*?)</a>#s', virustotalscan_check_url('\\1', '\\3', '\\2', $key), $message);\r\n // dupa prelucrari se iese din functie\r\n return;\r\n}",
"function ozh_yourls_gsb_check_add( $false, $url ) {\n \n list( $blacklisted, $desc ) = ozh_yourls_gsb_is_blacklisted( $url );\n \n // If blacklisted, halt here\n\tif ( $blacklisted ) {\n\t\treturn array(\n\t\t\t'status' => 'fail',\n\t\t\t'code' => 'error:' . $desc,\n\t\t\t'message' => 'Ce domaine est sur liste noire par Google Safe Browsing à cause de suspicion de ' . $desc . '. <a href=\"http://code.google.com/apis/safebrowsing/safebrowsing_faq.html#whyAdvisory\">En savoir plus</a>.',\n\t\t\t'errorCode' => '403',\n\t\t);\n\t}\n \n // If not blacklisted but still unsure (error message), we should warn the user\n if( $desc ) {\n define( 'OZH_YOURLS_GSB_EXTRA_INFO', $desc );\n yourls_add_filter( 'add_new_link', 'ozh_yourls_gsb_extra_info' );\n }\n\t\n\t// All clear, don't interrupt the normal flow of events\n\treturn $false;\n}",
"function url($array = false, $keep=false, $validate = true, $SiteUrlOnEmptyParamSet = false, $getAliases = true) {\n if(is_string($array) && !is_numeric($array) && strtolower(substr($array, 0, 4)) == 'www.') return 'http://'.$array;\n\n $pass = array();\n if($array == false) $array = array();\n if(!is_array($array)) $array = array('id' => $array);\n if($keep === true) {\n $keep = $_GET->keys();\n }\n elseif($keep !== false && !is_array($keep)) $keep = array($keep);\n if(!is_array($keep)) $keep = array();\n foreach($_REQUEST as $g => $v) {\n if(!in_array($g, $keep)) continue;\n elseif(is_array($v)) {\n foreach($v as $a => $b) {\n if(!empty($b)) $pass[$g][$a] = $b;\n }\n }\n else $pass[$g] = $v;\n }\n $parts = array_merge($pass,$array);\n $validParts = array();\n foreach($parts as $key => $val) {\n if($key == '#') continue;\n if(!$validate || ($_REQUEST->validate($key, $val) || $_GET->validate($key, $val))) {\n $validParts[$key] = $val;\n }\n }\n $url = '';\n //FIXME: Config\n // Short-URL\n if(true && isset($validParts['id'])) {\n global $Controller;\n if(is_numeric($validParts['id']) && $getAliases) {\n if($obj = $Controller->get($validParts['id'], OVERRIDE))\n if($alias = $obj->alias) $validParts['id'] = $alias;\n } elseif(is_object($validParts['id'])) {\n if($alias = $validParts['id']->alias) $validParts['id'] = $alias;\n else $validParts['id'] = $validParts['id']->ID;\n }\n $url = '/'.($validParts['id'] != 'frontpage'?$validParts['id']:'');\n unset($validParts['id']);\n }\n $query = http_build_query($validParts,'','&');\n if(!empty($query)) $url .= '?'.$query;\n if(isset($array['#'])) $url.='#'.$array['#'];\n if((!empty($url) || $SiteUrlOnEmptyParamSet) && $SiteUrlOnEmptyParamSet != -1) {\n global $SITE;\n $url = $SITE->URL.$url;\n }\n return $url;\n}",
"function churl_reachability( $churl_reachable, $url, $keyword = '' ) {\n global $ydb;\n\n preg_match( '!^[a-zA-Z0-9\\+\\.-]+:(//)?!', $url, $matches );\n $protocol = ( isset( $matches[0] ) ? $matches[0] : '' );\n $different_protocols = array (\n 'http://',\n 'https://'\n );\n\n if ($protocol == '') {\n \t$protocol = 'http://';\n \t$url = 'http://' . $url;\n }\n\n $check_url = in_array( $protocol, $different_protocols );\n\n // Return to normal routine if non-http(s) protocol is valid\n if ($check_url == false){\n return false;\n }\n\n // Check if the long URL is reachable\n $resURL = curl_init();\n curl_setopt($resURL, CURLOPT_URL, $url);\n curl_setopt($resURL, CURLOPT_BINARYTRANSFER, 1);\n curl_setopt($resURL, CURLOPT_HEADERFUNCTION, 'curlHeaderCallback');\n curl_setopt($resURL, CURLOPT_FAILONERROR, 1);\n curl_exec ($resURL);\n $intReturnCode = curl_getinfo($resURL, CURLINFO_HTTP_CODE);\n curl_close ($resURL);\n\n // Return error if the entered URL is unreachable\n if ($intReturnCode == '' || $intReturnCode == 404) {\n $return['status'] = 'fail';\n $return['code'] = 'error:url';\n $return['message'] = 'The entered URL is unreachable. Check the URL or try again later.';\n $return['statusCode'] = 200; // regardless of result, this is still a valid request\n return yourls_apply_filter( 'add_new_link_fail_unreachable', $return, $url, $keyword, $title );\n }\n\n return false;\n}",
"function urls($data)\r\n{\r\n $result = array();\r\n if (is_array($data)) {\r\n if (isset($data['href']))\r\n $result[] = $data['href']; else\r\n foreach ($data as $d)\r\n if (is_array($d))\r\n $result[] = $d['href']; else\r\n $result[] = $d;\r\n } else $result[] = $data;\r\n\r\n // Make URLs full\r\n $result2 = array();\r\n global $last_url, $last_base;\r\n $last_domain = substr($last_url, 0, strpos($last_url, '/', 10));\r\n if ($p = strpos($last_url,'?'))\r\n $last_php = substr($last_url,0,$p);\r\n else $last_php = $last_url;\r\n\r\n foreach ($result as $url) {\r\n $url = trim($url);\r\n if (!$url)\r\n continue;\r\n $url = str_replace('./','',$url);\r\n if (substr($url,0,2)=='//') $url = 'http:'.$url;\r\n if (strpos($url, '://') === false)\r\n if ($url[0] == '/')\r\n $url = $last_domain . $url;\r\n elseif ($url[0] == '?') $url = $last_php . $url;\r\n else $url = $last_base . $url;\r\n // Check for right donor\r\n //if (strpos(domain($url),$GLOBALS['instruction']['host'])===false) continue;\r\n $result2[] = $url;\r\n }\r\n $r = $result2;\r\n\r\n if (DEV)\r\n xlogc('urls', $r, $data);\r\n\r\n return $r;\r\n}",
"public function get() {\n\n\t\t$args = func_get_args();\n\n\t\tif( empty( $args ) ) {\n\n\t\t\t$networks = $this->_networks;\n\n\t\t} else {\n\t\t\t$networks = array();\n\n\t\t\tforeach ( $args as $network ) {\n\n\t\t\t\tif( in_array( $network, $this->_networks) ) {\n\t\t\t\t\t$networks[] = $network;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$urls = array();\n\n\t\tforeach ( $networks as $network ) {\n\t\t\t$url = call_user_func( array( $this, str_replace( '-', '_', $network ) ) );\n\n\t\t\tif( $url ) {\n\t\t\t\t$urls[ $network ] = $url;\n\t\t\t}\n\t\t}\n\n\t\treturn $urls;\n\t}",
"function applyBulkLinkAction($action,$checked) {\r\n\t$linkNum=sizeof($checked);\r\n\tif($action==\"clear-selected\") {\r\n\t\tforeach ($checked as $linkid) {\r\n\t\t\tclearLink($linkid);\r\n\t\t}\r\n\t\twpbar_message($linkNum.' external link stats cleared!');\r\n\t}\r\n\tif($action==\"delete-selected\") {\r\n\t\tforeach ($checked as $linkid) {\r\n\t\t\tdeleteLink($linkid);\r\n\t\t}\r\n\t\twpbar_message($linkNum.' external link stats deleted!');\r\n\t}\r\n\tif($action==\"apply-nofollow\") {\r\n\t\tforeach ($checked as $linkid) {\r\n\t\t\tapplyNofollow($linkid);\r\n\t\t}\r\n\t\twpbar_message('Nofollow applied to '.$linkNum.' external links!');\r\n\t}\r\n\tif($action==\"remove-nofollow\") {\r\n\t\tforeach ($checked as $linkid) {\r\n\t\t\tremoveNofollow($linkid);\r\n\t\t}\r\n\t\twpbar_message('Nofollow removed from '.$linkNum.' external links!');\r\n\t}\r\n\tif($action==\"show-wpbar\") {\r\n\t\tforeach ($checked as $linkid) {\r\n\t\t\tapplyShowWpBar($linkid);\r\n\t\t}\r\n\t\twpbar_message($linkNum.' external links with show The Wordpress Bar!');\r\n\t}\r\n\tif($action==\"redirect-source\") {\r\n\t\tforeach ($checked as $linkid) {\r\n\t\t\tredirectToSource($linkid);\r\n\t\t}\r\n\t\twpbar_message($linkNum.' external links redirect to source!');\r\n\t}\r\n}",
"function urls_geodiv_dist($i, $entite, $args='', $ancre='') {\n\t$contexte = $GLOBALS['contexte']; // recuperer aussi les &debut_xx\n\n\tif (is_numeric($i))\n\t\treturn _generer_url_geodiv($entite, $i, $args, $ancre);\n\n\t// traiter les injections du type domaine.org/spip.php/cestnimportequoi/ou/encore/plus/rubrique23\n\tif ($GLOBALS['profondeur_url']>0 AND $entite=='sommaire'){\n\t\treturn array(array(),'404');\n\t}\n\t$url = $i;\n\n\t// Decoder l'url html, page ou standard\n\t$objets = 'article|breve|rubrique|mot|auteur|site|syndic|media|cat|tag|collection|album';\n\tif (preg_match(\n\t',^(?:[^?]*/)?('.$objets.')([0-9]+)(?:\\.html)?([?&].*)?$,', $url, $regs)\n\tOR preg_match(\n\t',^(?:[^?]*/)?('.$objets.')\\.php3?[?]id_\\1=([0-9]+)([?&].*)?$,', $url, $regs)\n\tOR preg_match(\n\t',^(?:[^?]*/)?(?:spip[.]php)?[?]('.$objets.')([0-9]+)(&.*)?$,', $url, $regs)) {\n\t\tswitch ($regs[1]){\n\t\t\tcase 'media':\n\t\t\t\t$regs[1] = 'article';\n\t\t\t\tbreak;\n\t\t\tcase 'cat':\n\t\t\t\t$regs[1] = 'rubrique';\n\t\t\t\tbreak;\n\t\t\tcase 'tag':\n\t\t\t\t$regs[1] = 'mot';\n\t\t\t\tbreak;\n\t\t\tcase 'album':\n\t\t\t\t$regs[1] = 'collection';\n\t\t\t\tbreak;\n\t\t}\n\t\t$type = preg_replace(',s$,', '', table_objet($regs[1]));\n\t\t$_id = id_table_objet($regs[1]);\n\t\t$id_objet = $regs[2];\n\t\t$suite = $regs[3];\n\t\t$contexte[$_id] = $id_objet;\n\t\tif ($type == 'syndic') $type = 'site';\n\t\treturn array($contexte, $type, null, $type);\n\t}\n\n}",
"protected function process($urls) {\n // by default assume no match\n $match = false;\n \n // loop through list of URL regex patterns to find a match - \n // processing stops as soon as a match is found so URL patterns \n // should be ordered with the most important first\n foreach ($urls as $regEx => $dest) {\n $requestVars = array();\n \n // does the current URL match - if so capture matched sub-groups\n if (preg_match(\"#^$regEx(\\?.*)?$#\", $this->get_request_uri(), $this->requestVars)) {\n // the first match is the full URL - we not really \n // interested in that so drop\n array_shift($requestVars);\n \n // rule could be simple mapping to action or more complex \n // details containing mapping type etc\n if (is_array($dest)) {\n // if complex form a mapping type must be present (action, redirect, sub-patterns etc)\n if (!empty($dest['type'])) {\n switch ($dest['type']) {\n // sets name of action in class property\n case 'action':\n if (!empty($dest['action'])) {\n $this->set_action($dest['action'], $this->requestVars);\n } else {\n throw new HaploNoActionDefinedException(\"No action defined for $regEx.\");\n }\n break;\n // performs http redirect (301, 302, 404 etc)\n case 'redirect':\n if (!empty($dest['url'])) {\n if (!empty($dest['code'])) {\n $this->redirect($dest['url'], $dest['code']);\n } else {\n $this->redirect($dest['url']);\n }\n } else {\n throw new HaploNoRedirectUrlDefinedException(\"No redirect URL defined for $regEx.\");\n }\n break;\n case 'sub-patterns':\n // process sub URL patterns - this allows one to create sub pattern matches under \n // a base pattern for efficency reasons\n $subPatterns = array();\n \n foreach ($dest['sub-patterns'] as $subRegEx => $subDest) {\n $subPatterns[$regEx.$subRegEx] = $subDest;\n }\n $this->process($subPatterns);\n break;\n default:\n throw new HaploActionTypeNotSupportedException(\"Action type not supported for $regEx. Should be one of 'action', 'redirect' or 'sub-patterns'.\");\n }\n } else {\n throw new HaploNoActionDefinedException(\"No action type defined for $regEx. Should be one of 'action', 'redirect' or 'sub-patterns'.\");\n }\n } else {\n $this->set_action($dest);\n }\n \n $match = true;\n // we don't want to continue processing patterns if a matching one has been found\n break;\n }\n }\n \n // if none of the URL patterns matches look for a default 404 action\n if (!$match) {\n // send http 404 error header\n header('HTTP/1.1 404 Not Found');\n \n // check for existence of a 404 action\n if (file_exists(\"$this->actionsPath/page-not-found.php\")) {\n $this->set_action('page-not-found');\n } else {\n throw new HaploNoDefault404DefinedException(\"No default 404 action found. Add a file named page-not-found.php to $this->actionsPath/ to suppress this message.\");\n }\n }\n \n return $match;\n }",
"function match(){\n\t\t$varsA = [];\n\n\t\tforeach ($this->urlA as $cUrl) {\n\t\t\tswitch (self::URLType($cUrl)){\n\t\t\t\tcase (self::UrlFN): //return variables array\n\t\t\t\t\t$fRes = $cUrl();\n\t\t\t\t\tif (!$fRes)\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\tif (is_array($fRes))\n\t\t\t\t\t\t$varsA = array_merge($varsA, $fRes);\n\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tcase self::UrlPath: //return variables are regex matches\n// -todo 138 (check, bind) +1: check for regex exploit\n\t\t\t\t\t$cRegex = str_replace('/', '\\/', $cUrl);\n\n\t\t\t\t\t$cRes = [];\n\t\t\t\t\tif (!preg_match(\"/^$cRegex$/\", KiUrl::path(True), $cRes))\n\t\t\t\t\t\treturn;\n\t\t\t\t\t$varsA = array_merge($varsA, self::cleanIdx($cRes));\n\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tcase self::UrlArgs:\n\t\t\t\t\t$found = False;\n\n\t\t\t\t\tforeach (KiUrl::args()->all() as $cName => $cVal) {\n\t\t\t\t\t\t$cRes = [];\n\t\t\t\t\t\tif (!preg_match(\"/^\\\\$cUrl$/\", \"?$cName=$cVal\", $cRes))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t$varsA = array_merge($varsA, self::cleanIdx($cRes));\n\n\t\t\t\t\t\t$found = True;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!$found)\n\t\t\t\t\t\treturn;\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tcase self::UrlTrue:\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tdefault:\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$this->varsA = $varsA;\n\n\t\treturn True;\n\t}",
"public function links() {\n\t\tif(isset($_POST['id'])) $this->query_str = $_POST['id'];\n\t\telse return;\n\n\t\t$raw = null;\n\n\t\t//check if jar exists\n\t\tif(file_exists('../executable/app.jar')) $raw = shell_exec('cd ../executable/ && java -jar app.jar links ' . escapeshellarg($this->query_str));\n\t\telse return;\n\n\t\t$this->results = json_decode($raw);\n\n\t}",
"function submitlinks($URI, $formvars=\"\", $formfiles=\"\")\n\t{\n\t\tif($this->submit($URI,$formvars, $formfiles))\n\t\t{\t\t\t\n\t\t\tif($this->lastredirectaddr)\n\t\t\t\t$URI = $this->lastredirectaddr;\n\t\t\tif(is_array($this->results))\n\t\t\t{\n\t\t\t\tfor($x=0;$x<count($this->results);$x++)\n\t\t\t\t{\n\t\t\t\t\t$this->results[$x] = $this->_striplinks($this->results[$x]);\n\t\t\t\t\tif($this->expandlinks)\n\t\t\t\t\t\t$this->results[$x] = $this->_expandlinks($this->results[$x],$URI);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->results = $this->_striplinks($this->results);\n\t\t\t\tif($this->expandlinks)\n\t\t\t\t\t$this->results = $this->_expandlinks($this->results,$URI);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}",
"public function getQueryUrls($limit=NULL) {\n $a = self::getQueryUrl();\n $b = self::getHashes();\n\t$QueryUrls = array();\n\t$limit = (NULL!==$limit && is_numeric($limit)) ? (int)$limit : 0; \n\t$c = 0;\n\t//Foreach hash key value...\n\tforeach ( $b as $k => $v ) { \n\t //...that is a string with length > 0...\n\t\tif ( is_string($v) AND strlen($v) > 0 ) {\n\t\t\t//...format a query string. \n\t\t\t$rs = sprintf(tbr::QUERY_STRING, $v, $a);\n\t\t\t//Then, foreach available toolbar hostname...\n\t\t\tforeach ( $this->GTB_SERVER['host'] as $host ) {\n\t\t\t\t//...append any available top level domain... \n\t\t\t\tforeach ($this->GTB_SERVER['tld'] as $tld) {\n\t\t\t\t\t$tbUri = 'http://'. $host . $tld . tbr::SERVER_PATH . $rs;\n\t\t\t\t\tif ( $c < $limit || $limit == 0 ) {\n\t\t\t\t\t\t$QueryUrls[] = $tbUri;\n\t\t\t\t\t}\n\t\t\t\t\t$c++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} \n\treturn (sizeof($QueryUrls)>0) ? $QueryUrls : FALSE;\n }",
"function pre_ping( &$links ) {\n\t\tforeach ( $links as $i => $link )\n\t\t\tif ( 0 === strpos( $link, home_url() ) )\n\t\t\t\tunset( $links[$i] );\n\t}",
"public function autoGather(Request $request)\n {\n// dd($heads);\n\n //获取所要采集的分类页的网址\n // $siteName = Gather::where('auto', '是')->get()->toArray()['site_name'];\n\n $gather = Gather::where('auto', '是')->get()->toArray();\n\n\n foreach ($gather as $g) {\n $siteName = $g['site_name'];\n $categoryUrl = $g['category_url'];\n $categoryKeyword = explode(',', $g['category_keyword']);\n $time_selector = $g['time_selector'];\n $titleSelector = $g['title_selector'];\n $contentUrlSelector = $g['content_url_selector'];\n $previewImgSelector = $g['preview_img_selector'];\n $docTitle = $g['doc_title'];\n $docContent = $g['doc_content'];\n $categorySite = [];\n\n foreach ($categoryKeyword as $cK) {\n array_push($categorySite, 'http://' . $siteName . $categoryUrl . '/' . $cK);\n }\n //dd($categorySite);\n foreach ($categorySite as $cS) {\n if ($time_selector) {\n $rules = array(\n 'title' => array($titleSelector, 'text'),\n 'content_url' => array($contentUrlSelector, 'href'),\n 'time' => array($time_selector, 'text'),\n 'preview_img' => array($previewImgSelector, 'src'),\n );\n\n } else {\n $rules = array(\n 'title' => array($titleSelector, 'text'),\n 'content_url' => array($contentUrlSelector, 'href'),\n 'preview_img' => array($previewImgSelector, 'src'),\n );\n }\n\n\n $html = $cS;\n\n $data = array_slice(QueryList::Query($html, $rules)->data, 0, 10);\n\n // dd($data);\n // dd(!$this->isDomain($data[0]['content_url']));\n if (!$this->isDomain($data[0]['content_url'])) {//判断获取的链接是否包含域名,如果没有域名则添加\n foreach ($data as &$d) {\n $d['content_url'] = 'http://' . $siteName . $d['content_url'];\n\n }\n // dd($data);\n }\n\n\n // dd(date(\"Y/m/d\"));\n if ($time_selector) {\n foreach ($data as $k => $v) {\n if ($v['time'] !== date(\"Y/m/d\")) {//只保留当天的\n unset($data[$k]);\n }\n }\n }\n // dd($data);\n $dataOnlyTitle = [];\n\n foreach ($data as $k => $v) {//只保留title,方便判断是否已经采集了该文章\n array_push($dataOnlyTitle, array('title' => $v['title']));\n\n }\n\n // dd($dataOnlyTitle);\n // dd($data);\n foreach ($dataOnlyTitle as $k => $v) {\n $validator = Validator::make($v, ['title' => 'required|exists:docs,title'], ['title.exists' => '文档已经存在', 'required' => '标题不能为空']);\n\n if ($validator->passes()) {\n unset($dataOnlyTitle[$k]);\n }\n\n }\n // dd($dataOnlyTitle);\n $finalData = [];\n // dd($data);\n foreach ($data as $k => $v) {\n if ($this->deep_in_array($v['title'], $dataOnlyTitle)) {\n $t = QueryList::Query($v['content_url'], array(\n 'title' => array($docTitle, 'text'),\n 'content' => array($docContent, 'html'),\n ))->data;\n // dd($t);\n $t[0]['from'] = $v['content_url'];\n $t[0]['preview_img'] = $v['preview_img'];\n $t[0]['status'] = 'wait_for_verify';\n array_push($finalData, $t[0]);\n }\n\n }\n\n // dd($finalData);\n\n\n foreach ($finalData as &$fD) {\n\n // $fD['preview_img']\n// $this-> downloadImage($fD['preview_img'],'/public/upload/image/'. date('Ymd').'/'.date('YmdHis') . mt_rand(100, 999));\n $d=date('Ymd');\n $c=$this-> downloadImage($fD['preview_img'],base_path().'/public/upload/image/'.$d.'/'.date('YmdHis'),$d);\n if($c){\n // dd($c['filepath']);\n $fD['preview_img']=URL::asset(substr($c['filepath'],13));\n };\n Doc::create($fD);\n // dd($fD);\n\n }\n// dd($finalData);\n\n\n }\n\n }\n\n// $categoryUrl = Gather::where('auto', '是')->first()->toArray()['category_url'];\n// $categoryKeyword = explode(',', Gather::where('auto', '是')->first()->toArray()['category_keyword']);\n// $categorySite = [];\n//\n// foreach ($categoryKeyword as $cK) {\n// array_push($categorySite, 'http://' . $siteName . $categoryUrl . '/' . $cK);\n// }\n\n\n // dd(1);\n\n\n// $id = $request->input('id');\n// $url = $request->input('url');\n//\n// $gather = Gather::where('id', $id)->first();\n// $title = $gather->toArray()['doc_title'];\n// $content = $gather->toArray()['doc_content'];\n//\n// $rules = array(\n// 'title' => array($title, 'text'),\n// 'content' => array($content, 'html'),\n// );\n//\n// $html = $url;\n//\n// $data = QueryList::Query($html, $rules)->data;\n////打印结果\n// return response()->json(['code' => 1, 'msg' => '采集成功', 'gatheredData' => $data[0]]);\n\n\n// ignore_user_abort(true);//关掉浏览器,PHP脚本也可以继续执行.\n// set_time_limit(0);// 通过set_time_limit(0)可以让程序无限制的执行下去\n// ini_set('memory_limit', '512M'); // 设置内存限制\n// ob_end_clean(); // 清空缓存\n// ob_start(); // 开始缓冲数据\n// date_default_timezone_set('Asia/Shanghai');//设置时区\n//\n////\n//// while(1){\n//// echo str_repeat(\" \",1024); // 写满IE有默认的1k buffer\n//// ob_flush(); // 将缓存中的数据压入队列\n//// flush(); // 输出缓存队列中的数据\n//// echo \"now time is \".date('h:i:s'); // 打印数据,其实是先将数据存入了缓存中\n//// usleep(1000000); //延迟一秒(暂停一秒)\n//// }\n\n }",
"public function fetchAll(array $urlList);",
"abstract public function get_url_update();",
"function getAllURLsForSearch($connection){\t\n\t\t\t$allURLsOfWebsite = array();\n\t\t\t$urlsSearched = array();\n\t\t\t$urlsMain = array();\n\t\t\t\n\t\t\t$result = mysqli_query($connection, \"SELECT url FROM _tmp_websites_actual_run\" );\n\t\t\t$result2 = mysqli_query($connection,\"SELECT url FROM _websites_searched\");\n\t\t\t$result3 = mysqli_query($connection,\"SELECT url FROM _websites\");\n\n\t\t\twhile($row = mysqli_fetch_array($result))\n\t\t\t{\n\t\t\t\t$allURLsOfWebsite[] = $row['url'];\n\t\t\t}\n\t\t\t\n\t\t\twhile($row = mysqli_fetch_array($result2))\n\t\t\t{\n\t\t\t\t$urlsSearched[] = $row['url'];\n\t\t\t}\n\t\t\t\n\t\t\twhile($row = mysqli_fetch_array($result3))\n\t\t\t{\n\t\t\t\t$urlsMain[] = $row['url'];\n\t\t\t}\n\t\t\t\n\t\t\tforeach($allURLsOfWebsite as $key=>$url){\n\t\t\t\tif((in_array($url,$urlsSearched)) && (!in_array($url, $urlsMain))){\n\t\t\t\t\tunset($allURLsOfWebsite[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $allURLsOfWebsite;\n\t\t}",
"public function collectUrls() {\n\t\t\t$this->addUrlsToCrawlArray(self::$seedUrls);\n\t\t\tif (count(self::$crawlXpath) != 0 && self::$dataXpath != \"\") {\n\t\t\t\t$length = count(self::$crawlXpath);\n\t\t\t\tfor($i=0; $i<$length; $i++) {\n\t\t\t\t\t$crawlXpathToUse = self::$crawlXpath[$i];\n\t\t\t\t\t$urlsToCrawlThisRun = self::$urlsToCrawl[$i];\n\t\t\t\t\t$crawledUrlsThisRun = array();\n\t\t\t\t\tforeach ($urlsToCrawlThisRun as $url) {\n\t\t\t\t\t\techo(\"Crawling: \". $url.\"<br>\");\n\t\t\t\t\t\t$xml = $this->getPageHtml($url);\n\t\t\t\t\t\techo\"have page content\".\"<br>\";\n\t\t\t\t\t\t$Xpath = new DOMXpath($xml);\n\t\t\t\t\t\techo\"using xpath: \". $crawlXpathToUse.\"<br>\";\n\t\t\t\t\t\t$urlsFromXpathNodeList = $Xpath->evaluate($crawlXpathToUse);\n\t\t\t\t\t\techo\"xpath evaluated.\";\n\t\t\t\t\t\t$urlsFromXpathArray = array();\n\t\t\t\t\t\t$length = $urlsFromXpathNodeList->length;\n\t\t\t\t\t\tfor($j=0; $j<$length; $j++) {\n\t\t\t\t\t\t\tarray_push($urlsFromXpathArray, $urlsFromXpathNodeList->item($j)->textContent);\n\t\t\t\t\t\t\t$this->addCrawlUrlToDb($urlsFromXpathNodeList->item($j)->textContent);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tarray_push(self::$urlsToCrawl, $urlsFromXpathArray);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t} else if (count(self::$crawlXpath) == 0 && self::$dataXpath != \"\") {\n\t\t\t\n\t\t\t} else {\n\t\t\t\techo \"Data xPath not provided. Returning.\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"public function maping() {\n\n if(count($this->parse->domHtml->find('a'))){\n foreach ($this->parse->domHtml->find('a') as $element) {\n $link = new LinkBot(new HrefBot($element->href));\n\n if(!empty($link->link->getParseUrl()['host'])) {\n $host = $link->link->getParseUrl()['host'];\n } else {\n $host = false;\n }\n\n if (BotUrlHelper::isSameSite($host, $this->parse->request->getHost()) &&\n !BotUrlHelper::isRepeat($element->href, $this->parse->request->getUrls())) {\n\n //start connect\n $this->parse->request->setConnectTimeout(time());\n $link->startConnect($this->parse->request->getConnectTimeout());\n\n $countImg = 0;\n if (BotUrlHelper::url_exists($link->link->getLink())) {\n $countImg = count($this->parse->domHtml->getImgs());\n }\n\n //end connect\n $this->parse->request->setTimeout(time());\n $link->endConnect($this->parse->request->getTimeout());\n\n $this->parse->request->addUrl($element->href);\n\n $this->data[] = (object)[\n 'url' => $link->link->getLink(),\n 'countImg' => $countImg,\n 'end' => $link->end,\n 'start' => $link->start\n ];\n }\n unset($link);\n }\n }\n\n foreach ($this->parse->request->getUrls() as $url) {\n $this->analise($url);\n }\n \n }",
"public function provideUrl(): Generator\n {\n yield [''];\n yield ['/'];\n yield ['/products/123'];\n }",
"private function getUrls() {\n\t\t// reassign the array because of a php bug (solved later with php 5.2.x @see: http://bugs.php.net/39449)\n\t\t$arr = $this->formData;\n\n\t\t// build bas URL for replacement variables\n\t\t$protocol\t= 'http'\n . ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ? 's' : '' )\n . '://';\n\t\t$url\t\t= $_SERVER['HTTP_HOST'] . dirname( $_SERVER['PHP_SELF'] ) . '/';\n $url = str_replace( '//', '/', $url ); // some server add 2 /\n $url = $protocol . $url . 'index.php?route=payment/directebanking/';\n\n\t\tif( $this->_param['successUrlStd'] ) {\n\t\t\t$arr['user_variable_0'] = $url . 'success'\n\t\t\t. '&transaction=-TRANSACTION-&security_criteria=-SECURITY_CRITERIA-'\n\t\t\t. '&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['successUrl'] ) {\n\t\t\t\t$arr['user_variable_0'] = $this->_param['successUrl'];\n\t\t\t}\n\t\t}\n\n\t\tif( $this->_param['cancelUrlStd'] ) {\n\t\t\t$arr['user_variable_1'] = $url . 'cancel'\n\t\t\t. '&transaction=-TRANSACTION-&order_id=-USER_VARIABLE_3-&pid=-PROJECT_ID-';\n\t\t}else{\n\t\t\tif( $this->_param['cancelUrl'] ) {\n\t\t\t\t$arr['user_variable_1'] = $this->_param['cancelUrl'];\n\t\t\t}\n\t\t}\n\n\t\t// and reassign again\n\t\t$this->formData = $arr;\n\n\t\tunset( $arr );\n\t}",
"public function testPromoteAutomatchUrlUsingGET()\n {\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}",
"private function from_urls($from_urls) {\n if (is_array($from_urls)) {\n $this->from_urls = $from_urls;\n }\n return $this->from_urls;\n }",
"function ciniki_linkchecker_tenantCheckLinks(&$ciniki, $tnid) {\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'hooks', 'getActiveModules');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectAdd');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'linkchecker', 'private', 'getHeaders');\n\n //\n // Get the list of modules enabled for the tenant\n //\n $rc = ciniki_tenants_hooks_getActiveModules($ciniki, $tnid, array());\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $tenant_modules = array_keys($rc['modules']);\n\n //\n // Update the modules indexes\n //\n $objects = array();\n foreach($tenant_modules as $module) {\n list($pkg, $mod) = explode('.', $module);\n $rc = ciniki_core_loadMethod($ciniki, $pkg, $mod, 'hooks', 'linkcheckerList');\n if( $rc['stat'] == 'ok' ) {\n $fn = $rc['function_call'];\n $rc = $fn($ciniki, $tnid, array());\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['objects']) ) {\n $objects = array_merge($objects, $rc['objects']);\n }\n } \n }\n\n //\n // Load existing objects\n //\n $strsql = \"SELECT id, \"\n . \"CONCAT_WS('.', object, object_id) AS oid, \"\n . \"object, \"\n . \"object_id, \"\n . \"url, \"\n . \"new_url, \"\n . \"http_status, \"\n . \"last_http_status, \"\n . \"last_check, \"\n . \"num_errors \"\n . \"FROM ciniki_linkchecker_urls \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryIDTree');\n $rc = ciniki_core_dbHashQueryIDTree($ciniki, $strsql, 'ciniki.linkchecker', array(\n array('container'=>'objects', 'fname'=>'oid', 'fields'=>array('id', 'object', 'object_id', \n 'url', 'new_url', 'http_status', 'last_http_status', 'last_check', 'num_errors')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.linkchecker.5', 'msg'=>'Unable to lookup existing objects', 'err'=>$rc['err']));\n }\n $existing_objects = isset($rc['objects']) ? $rc['objects'] : array();\n\n //\n // Check each object\n //\n error_reporting(E_ERROR);\n $dt = new DateTime('now', new DateTimezone('UTC'));\n foreach($objects as $oid => $object) {\n //\n // Keep track of updates\n //\n if( isset($existing_objects[$oid]) ) {\n $obj = $existing_objects[$oid];\n if( $object['url'] != $obj['url'] ) {\n $obj['url'] = $object['url'];\n $obj['new_url'] = '';\n }\n $obj['last_check'] = $dt->format('Y-m-d H:i:s');\n } else {\n $obj = array(\n 'object' => $object['object'],\n 'object_id' => $object['object_id'],\n 'url' => $object['url'],\n 'http_status' => 0,\n 'last_http_status' => 0,\n 'last_check' => $dt->format('Y-m-d H:i:s'),\n 'num_errors' => 0,\n );\n }\n $rc = ciniki_linkchecker_getHeaders($ciniki, $tnid, $object['url']);\n if( $rc['stat'] == 'ok' && preg_match('/facebook.com/', $object['url']) && preg_match(\"/HTTP.* 302 Found/\", $rc['headers'][0], $matches) ) {\n error_log('facebook: ' . $object['url']);\n $obj['http_status'] = 200;\n $obj['new_url'] = '';\n } elseif( $rc['stat'] == 'ok' && isset($rc['headers'][0]) && preg_match(\"/HTTP.* ([0-9][0-9][0-9]) (.*)/\", $rc['headers'][0], $matches) ) {\n $obj['http_status'] = $matches[1];\n } elseif( $rc['stat'] == 'fail' ) {\n $obj['http_status'] = 80;\n } else {\n $obj['http_status'] = 90;\n }\n $num_redirects = 0;\n while( $rc['stat'] != 'fail' && $obj['http_status'] != 200 && isset($rc['headers']['Location']) && $rc['headers']['Location'] != '' ) {\n error_log('redirect');\n $num_redirects++;\n if( $num_redirects > 10 ) {\n //\n // \n $obj['http_status'] = 70;\n print \"Redirect Loop: \" . $object['url'] . \"\\n\";\n break;\n }\n $obj['new_url'] = $rc['headers']['Location'];\n $rc = ciniki_linkchecker_getHeaders($ciniki, $tnid, $rc['headers']['Location']);\n }\n if( $num_redirects > 10 ) {\n continue;\n }\n\n //\n // Update/Add the object\n //\n if( isset($existing_objects[$oid]) ) {\n $updates = array();\n foreach(['url', 'new_url', 'http_status', 'last_http_status', 'last_check', 'num_errors'] as $field) {\n if( $obj[$field] != $existing_objects[$oid][$field] ) {\n $updates[$field] = $obj[$field];\n }\n }\n if( count($updates) > 0 ) {\n print_r($updates);\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.linkchecker.url', $existing_objects[$oid]['id'], $updates, 0x04);\n if( $rc['stat'] != 'ok' && $rc['stat']) {\n return $rc;\n }\n }\n } else { \n print_r($obj);\n $rc = ciniki_core_objectAdd($ciniki, $tnid, 'ciniki.linkchecker.url', $obj, 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n }\n }\n \n return array('stat'=>'ok');\n}",
"function privacy_ping_filter($sites)\n {\n }",
"public function testDemoteAutomatchUrlUsingGET()\n {\n }",
"function replace_links($content) {\r\n\tpreg_match_all(\"/<a\\s*[^>]*>(.*)<\\/a>/siU\", $content, $matches);\r\n\t//preg_match_all(\"/<a\\s[^>]*>(.*?)(</a>)/siU\", $content, $matches);\t\r\n\t$foundLinks = $matches[0];\r\n\t$wpbar_options = get_option(\"wpbar_options\");\r\n\t\r\n\tforeach ($foundLinks as $theLink) {\r\n\t\t$uri = getAttribute('href',$theLink);\r\n\t\tif($wpbar_options[\"validateURL\"]) {\r\n\t\t\tif(!isWhiteListed(get_domain($uri)) && !isSociable($theLink) && isValidURL($uri)) {\r\n\t\t\t\t$uid = isInDB($uri);\r\n\t\t\t\t$nofollow = is_nofollow($uid) ? \"rel='nofollow'\" : \"\";\r\n\t\t\t\t$content=str_replace(\"href=\\\"\".$uri.\"\\\"\",\"title='Original Link: \".$uri.\"' \".$nofollow.\" href=\\\"\".get_option('home').\"/?\".$uid.\"\\\"\",$content);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif(!isWhiteListed(get_domain($uri)) && !isSociable($theLink)) {\r\n\t\t\t\t$uid = isInDB($uri);\r\n\t\t\t\t$nofollow = is_nofollow($uid) ? \"rel='nofollow'\" : \"\";\r\n\t\t\t\t$content=str_replace(\"href=\\\"\".$uri.\"\\\"\",\"title='Original Link: \".$uri.\"' \".$nofollow.\" href=\\\"\".get_option('home').\"/?\".$uid.\"\\\"\",$content);\r\n\t\t\t}\r\n\t\t}\r\n\t}\t\r\n\treturn $content;\r\n}",
"abstract public function run($uriMatches = []):void;",
"public function testGetAutomatchUrlsUsingPOST()\n {\n }",
"function maps_actual_url($url, $uriapp = NULL){\n //Elimino el primer caracter si es igual a \"/\"\n if(substr($url, 0, 1) == \"/\"){\n $url= substr($url, 1);\n } \n //Separa la url pasada y la uri en partes para poder analizarlas\n $partes_url= explode(\"/\", $url);\n \n //Saco de la uri actual los parametros\n $uri_explode= explode(\"?\", URIAPP);\n if($uriapp != NULL){\n $uri_explode= explode(\"?\", $uriapp);\n }\n $uri_front= $uri_explode[0];\n //Separo la uri actual\n $partes_uri_actual= explode(\"/\", $uri_front); \n $mapea= TRUE; \n //Analiza que url-uri tiene mas elementos\n if(count($partes_url) >= count($partes_uri_actual)){\n //Si el tamano de la url es igual o mayor que la uri actual uso el for recorriendo las partes de la url\n $count_partes_uri= count($partes_url);\n for($i= 0; $i < $count_partes_uri; $i++) {\n if(count($partes_uri_actual) >= ($i + 1)){\n //Si hay un * no me importa que viene despues, mapea todo, no deberia haber nada despues\n if($partes_url[$i] != \"*\"){\n $pos_ocurrencia= strpos($partes_url[$i], \"*\");\n if($pos_ocurrencia != FALSE){\n $parte_url= explode(\"*\", $partes_url[$i]);\n $parte_url= $parte_url[0];\n if(strlen($partes_uri_actual[$i]) >= strlen($parte_url)){\n $parte_uri_actual= substr($partes_uri_actual[$i], 0, strlen($parte_url));\n if($parte_url == $parte_uri_actual){\n break;\n }\n else{\n $mapea= FALSE;\n break;\n }\n }\n else{\n $mapea= FALSE;\n break;\n }\n }\n //Si alguna esta vacia no compara el mapeo con () y voy directo a la comparacion\n if(empty($partes_url[$i]) || empty($partes_uri_actual[$i])){\n //Si no coinciden las partes no mapean\n if($partes_url[$i] != $partes_uri_actual[$i]){\n $mapea= FALSE;\n break;\n }\n }\n else{\n //Si la parte de la uri empieza con ( y termina con ) puede ir cualquier string ahi por lo que pasa directamente esta parte de la validacion\n if(! ($partes_url[$i]{0} == \"(\" and $partes_url[$i]{strlen($partes_url[$i]) -1} == \")\")){\n //Si no contiene ( y ) debe mapear\n //Si no coinciden las partes no mapean\n if($partes_url[$i] != $partes_uri_actual[$i]){\n $mapea= FALSE;\n break;\n }\n }\n }\n }\n else{\n break;\n }\n }\n else{\n //La uri actual no tiene mas partes y no hay coincidencia completa\n $mapea= FALSE;\n break;\n }\n } \n }\n else{\n //Si el tamano de la url pasada es menor que la uri uso el for recorriendo las partes de la uri\n $count_partes_uri_actual= count($partes_uri_actual);\n for($i= 0; $i < $count_partes_uri_actual; $i++){\n if(count($partes_url) >= ($i + 1)){ \n //Si hay un * no me importa que viene despues, mapea todo, no deberia haber nada despues\n if($partes_url[$i] != \"*\"){\n $pos_ocurrencia= strpos($partes_url[$i], \"*\");\n if($pos_ocurrencia != FALSE){\n $parte_url= explode(\"*\", $partes_url[$i]);\n $parte_url= $parte_url[0];\n if(strlen($partes_uri_actual[$i]) >= strlen($parte_url)){\n $parte_uri_actual= substr($partes_uri_actual[$i], 0, strlen($parte_url));\n if($parte_url == $parte_uri_actual){\n break;\n }\n else{\n $mapea= FALSE;\n break;\n }\n }\n else{\n $mapea= FALSE;\n break;\n }\n }\n //Si alguna esta vacia no compara el mapeo con () y voy directo a la comparacion\n if(empty($partes_url[$i]) || empty($partes_uri_actual[$i])){\n //Si no coinciden las partes no mapean\n if($partes_url[$i] != $partes_uri_actual[$i]){\n $mapea= FALSE;\n break;\n }\n }\n else{\n //Si la parte de la uri empieza con ( y termina con ) puede ir cualquier string ahi por lo que pasa directamente esta parte de la validacion\n if(! ($partes_url[$i]{0} == \"(\" and $partes_url[$i]{strlen($partes_url[$i]) -1} == \")\")){\n //Si no contiene ( y ) debe mapear \n //Si no coinciden las partes no mapean\n if($partes_url[$i] != $partes_uri_actual[$i]){\n $mapea= FALSE;\n break;\n }\n }\n }\n }\n else{\n break;\n }\n }\n else{\n //La url pasada no tiene mas partes y no hay coincidencia completa\n $mapea= FALSE;\n break;\n }\n }\n } \n return $mapea;\n }",
"public function productByUrlAction()\n {\n $search = \"http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\n $words = explode('/', $search);\n $lastWord = array_pop($words);\n $vars['products'] = $this->model->getProductsBySearch($lastWord);\n $this->view->render('Riding Gear', $vars);\n }",
"protected function isActiveByUrls()\r\n {\r\n if (!$this->urls_activate) {\r\n return false;\r\n }\r\n\r\n //Check by string if string given\r\n if (!is_array($this->urls_activate)) {\r\n return request()->path() == $this->urls_activate || request()->url() == $this->urls_activate;\r\n }\r\n\r\n //Check by array if array given\r\n return in_array(request()->path(), $this->urls_activate) || request()->url() == $this->urls_activate;\r\n }",
"function get_set_links($idx,$total,$batch,$url) {\n\n\t$conj = ( strchr($url,'?') ) ? '&' : '?';\n\t\n\t// remove any idx= in the URL string\n\t$url = preg_replace('/&idx=([0-9]+)/', '', $url);\n\t\n\t// rewind link\n\t $first = ( !$idx || $idx < $batch ) ? '' : '« <a href=\"'.$url .'\">first</a> ';\n\n\t# set prev link\n\t$prev = ( !$idx || $idx == 0 ) ? 'prev' : '<a href=\"'.$url.$conj.'idx='.($idx-$batch).'\">prev</a>';\n\t\n\t// fast forward link\n\t$last = ( $total > 10 * $batch ) ? ' <a href=\"'.$url.$conj.'idx='. (floor($total/$batch) * $batch) .'\">last</a> »' : '';\n\n\t# set next link\n\t$next = ( ($total - $idx) <= $batch ) ? 'next' : '<a href=\"'.$url.$conj.'idx='. ($idx + $batch ) .'\">next</a>';\n\t\n\t// check upper limit for links\n\t$upper = min ( 10, floor($total/$batch) );\n\n\tif ($total > $batch) {\n\t\tfor ($i = ( $idx/$batch ); $i < ( $idx/$batch ) + $upper; $i++) {\n\t\t\tif (($i*$batch) == $idx)\n\t\t\t\t$links .= ' <strong>'.($i+1).'</strong>';\n\t\t\telse\n\t\t\t\t$links .= ' <a href=\"'.$url.$conj.'idx='.($i*$batch).'\">'.($i+1).'</a>';\n\t\t}\n\t\t\n\t\treturn \"$first < $prev :: $links :: $next > $last\";\n\t\t\n\t} else {\n\t\treturn \"\";\n\t\n\t}\n\n\t\n\n}",
"public function list(){\n\n $urls = Urls::all();\n \n $capturas = array();\n foreach($urls as $key=>$val){\n $status = $this->status_url($val['url']);\n $conteudo = $this->content_url($val['url']);\n /* bem simples. salva os dados no banco */\n $capturas[] = array('conteudo' => $conteudo, 'status' => $status, 'url_id' => $val['id']);\n }\n\n $this->salvar($capturas);\n }",
"function __construct($urls){\n\t\t$mh = curl_multi_init();\n\t\tforeach($urls as $i => $url)\n\t\t{\t\t\t\n\t\t\t$ch[$i] = curl_init($url);\n\t\t\tcurl_setopt($ch[$i], CURLOPT_RETURNTRANSFER, 1);\n\t\t\tcurl_setopt($ch[$i], CURLINFO_HEADER_OUT, 1);\n\t\t\tcurl_setopt($ch[$i], CURLOPT_HEADER, 1);\n\t\t\tcurl_setopt($ch[$i], CURLOPT_NOBODY, 1);\n\t\t\tcurl_setopt($ch[$i], CURLOPT_FOLLOWLOCATION, 1);\n\t\t\tcurl_multi_add_handle($mh, $ch[$i]);\n\t\t}\n\t\t\n\t\t// execute all queries simultaneously, and continue when all are complete\n\t\t$running = null;\n\t\tdo {\n\t\t\t$execReturnValue = curl_multi_exec($mh, $running);\n\t\t} while ($running);\n\t\t\n\t\t\n\t\t// Check for any errors\n\t\tif ($execReturnValue != CURLM_OK) {\n\t\t trigger_error(\"Curl multi read error $execReturnValue\\n\", E_USER_WARNING);\n\t\t}\n\t\t\n\t\t// Extract the content\n\t\tforeach($urls as $i => $url)\n\t\t{\n\t\t\t// Check for errors\n\t\t\t$curlError = curl_error($ch[$i]);\n\t\t\t\n\t\t\tif($curlError == \"\") {\n\t\t\t\t// If no errors, response header info is stored in array\n\t\t\t\t\n\t\t\t\t$this->urlResults[] = $this->parseURL($url, curl_getinfo($ch[$i]));\n\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t// Store cURL errors in array\n\t\t\t\t$this->errors[$url] = \"Curl error on handle $i: $curlError\";\n\t\t\t}\n\t\t\t\n\t\t\t// Remove and close the handle\n\t\t\tcurl_multi_remove_handle($mh, $ch[$i]);\n\t\t\tcurl_close($ch[$i]);\n\t\t}\n\t\t\n\t\t// Clean up the curl_multi handle\n\t\tcurl_multi_close($mh);\n\t\n\t}",
"public function testUrlGenerationWithUrlFilter(): void\n {\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/{lang}/{controller}/{action}/*');\n $request = new ServerRequest([\n 'params' => [\n 'plugin' => null,\n 'lang' => 'en',\n 'controller' => 'Posts',\n 'action' => 'index',\n ],\n ]);\n Router::setRequest($request);\n\n $calledCount = 0;\n Router::addUrlFilter(function ($url, $request) use (&$calledCount) {\n $calledCount++;\n $url['lang'] = $request->getParam('lang');\n\n return $url;\n });\n Router::addUrlFilter(function ($url, $request) use (&$calledCount) {\n $calledCount++;\n $url[] = '1234';\n\n return $url;\n });\n $result = Router::url(['controller' => 'Tasks', 'action' => 'edit']);\n $this->assertSame('/en/Tasks/edit/1234', $result);\n $this->assertSame(2, $calledCount);\n }",
"public function IsUrlAllowWithSpecificUserAgentProvider()\r\n {\r\n return array(\r\n array(\r\n array(\r\n '*' => array(\r\n 'disallow' => array(\r\n '/fr/'\r\n ),\r\n ),\r\n ),\r\n '/fr/page2',\r\n 'MyUserAgent',\r\n false\r\n ),\r\n );\r\n }",
"function phishtank_check_redirect( $url, $keyword = false ) {\t$phishtank_recheck = yourls_get_option( 'phishtank_recheck' );\n\tif ($phishtank_recheck !== \"false\" ) {\n\t\tif( is_array( $url ) && $keyword == false ) {\n\t\t\t$keyword = $url[1];\n\t\t\t$url = $url[0];\n\t\t}\n\t\t// Check when the link was added\n\t\t// If shorturl is fresh (ie probably clicked more often?) check once every 10 times, otherwise check every time\n\t\t// Define fresh = 3 days = 259200 secondes\n\t\t$now = date( 'U' );\n\t\t$then = date( 'U', strtotime( yourls_get_keyword_timestamp( $keyword ) ) );\n\t\t$chances = ( ( $now - $then ) > 259200 ? 10 : 1 );\n\t\tif( $chances == mt_rand( 1, $chances ) ) {\n\t\t\tif( phishtank_is_blacklisted( $url ) == true ) {\n\t\t\t\t// We got a hit, do we delete or intercept?\n\t\t\t\t$phishtank_soft = yourls_get_option( 'phishtank_soft' );\n\t\t\t\t// Intercept by default\n\t\t\t\tif( $phishtank_soft !== \"false\" ) {\n\t\t\t\t\t// Compliance integration\n\t\t\t\t\tif((yourls_is_active_plugin('compliance/plugin.php')) !== false) {\n\t\t\t\t\t\tglobal $ydb;\n\t\t\t\t\t\t$table = 'flagged';\n\t\t\t\t\t\tif (version_compare(YOURLS_VERSION, '1.7.3') >= 0) {\n\t\t\t\t\t\t\t$binds = array('keyword' => $keyword);\n\t\t\t\t\t\t\t$sql = \"REPLACE INTO `$table` (keyword, reason) VALUES (:keyword, 'Phishtank Auto-Flag'\";\n\t\t\t\t\t\t\t$insert = $ydb->fetchObject($sql, $binds);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$insert = $ydb->query(\"REPLACE INTO `flagged` (keyword, reason) VALUES ('$keyword', 'Phishtank Auto-Flag')\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// use default intercept page?\n\t\t\t\t\t$phishtank_cust_toggle = yourls_get_option( 'phishtank_cust_toggle' );\n\t\t\t\t\t$phishtank_intercept = yourls_get_option( 'phishtank_intercept' );\n\t\t\t\t\tif (($phishtank_cust_toggle == \"true\") && ($phishtank_intercept !== '')) {\n\t\t\t\t\t\t// How to pass keyword and url to redirect?\n\t\t\t\t\t\tyourls_redirect( $phishtank_intercept, 302 );\n\t\t\t\t\t\tdie ();\n\t\t\t\t\t}\n\t\t\t\t\t// Or go to default flag intercept \n\t\t\t\t\tdisplay_phlagpage( $keyword );\n\t\t\t\t} else {\n\t\t\t\t// Otherwise delete & die\n\t\t\t\tyourls_delete_link_by_keyword( $keyword );\n\t\t\t\tyourls_die( 'La page que vous tentez de visiter est sur la liste noire. Le lien vers cette page a été supprimé. / The page is blacklisted. The link has been deleted', 'Domain blacklisted', '403' );\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\t// Nothing found, move along\n\t}\n\t// Re-check disabled, move along\n}",
"function get_all_redirects($url){\n\t$redirects = array();\n\twhile ($newurl = get_redirect_url($url)){\n\t\tif (in_array($newurl, $redirects)){\n\t\t\tbreak;\n\t\t}\n\t\t$redirects[] = $newurl;\n\t\t$url = $newurl;\n\t}\n\treturn $redirects;\n}",
"public function exampleUrlsForTokenAnonymization() {}",
"public function catchImageUrls($suchbegriff) {\r\n \r\n $db = Db::getInstance();\r\n $suchId = uniqid();\r\n $db->query(\"INSERT INTO Suche (Such_Id, Suchbegriff, Soziales_Medium) VALUES ('$suchId', '$suchbegriff', 'Twitter')\");\r\n \r\n \t//Such nach dem Suchbegriff auf den Seite von Twitter\r\n $keyword = urlencode($suchbegriff); \r\n $url = \"https://twitter.com/search?q=\" . $keyword; \r\n \r\n \t//Erhalten von Seiteninhalt\r\n $html = file_get_contents($url); \r\n \r\n \t//Erhalten von Bildurl \r\n preg_match_all('!http[s]?:\\/\\/pbs\\.twimg\\.com\\/media\\/[^:]+\\.(jpg|png|gif)!i', $html, $matches); \r\n $res = array_values(array_unique($matches[0]));\r\n \r\n \t//speichern von Bildurl in Datenbank\r\n foreach ($res as $key => $value) { \r\n $db = Db::getInstance();\r\n $bildId = uniqid();\r\n $db->query(\"INSERT INTO Bild (Bild_Id, Link) VALUES ('$bildId', '$value')\");\r\n $db->query(\"INSERT INTO Bild_has_Suche (Bild_Bild_Id, Suche_Such_Id) VALUES ('$bildId', '$suchId')\");\r\n }\r\n \r\n \treturn $res;\r\n }",
"function __construct($urls)\n {\n\t$mh = curl_multi_init();\n\tforeach( $urls as $i => $url ){\n\t $ch[$i] = curl_init($url);\n\t curl_setopt($ch[$i], CURLOPT_RETURNTRANSFER, 1);\n\t curl_multi_add_handle($mh, $ch[$i]);\n\t}\n\n\t// Start performing the request\n\tdo {\n\t\t$execReturnValue = curl_multi_exec($mh, $runningHandles);\n\t} while ($execReturnValue == CURLM_CALL_MULTI_PERFORM);\n\t// Loop and continue processing the request\n\twhile ($runningHandles && $execReturnValue == CURLM_OK) {\n\t // Wait forever for network\n\t $numberReady = curl_multi_select($mh);\n\t if ($numberReady != -1) {\n\t\t// Pull in any new data, or at least handle timeouts\n\t\tdo {\n\t\t $execReturnValue = curl_multi_exec($mh, $runningHandles);\n\t\t} while ($execReturnValue == CURLM_CALL_MULTI_PERFORM);\n\t }\n\t}\n\n\t// Check for any errors\n\tif ($execReturnValue != CURLM_OK) {\n\t trigger_error(\"Curl multi read error $execReturnValue\\n\", E_USER_WARNING);\n\t}\n\n\t// Extract the content\n\tforeach( $urls as $i => $url ) {\n\t // Check for errors\n\t $curlError = curl_error($ch[$i]);\n\t if( $curlError == \"\" ) {\n\t\t$res[$i] = curl_multi_getcontent($ch[$i]);\n\t } else {\n\t \treturn false\n\t }\n\t // Remove and close the handle\n\t curl_multi_remove_handle($mh, $ch[$i]);\n\t curl_close($ch[$i]);\n\t}\n\t// Clean up the curl_multi handle\n\tcurl_multi_close($mh);\n }",
"public function requests($urls, array $params = array())\n {\n foreach ($urls as $url) {\n $result = $this->requestOne($url, $params);\n\n if ($result) {\n return $result;\n } elseif ($this->sender->shouldRetry() == false) {\n return false;\n }\n }\n\n return false;\n }",
"public function getUrls($web, $keys = [])\n {\n // $keys= [ '.html']; //patrones a buscar en url de publicaciones\n // Patrones de fecha:\n // {{Y}} = Ejemplos: 1999 o 2003\n // {{y}} = Ejemplos: 99 o 03\n // {{m}} = 01 hasta 12\n // {{n}} = 1 hasta 12\n\n list($keysAnd, $keysOr) = explode('|', $keys);\n\n $keysAnd = explode(',', $keysAnd);\n $keysOr = explode(',', $keysOr);\n\n $keysAux = [];\n //reemplazo de patrones\n foreach ($keysAnd as $key) {\n $key = str_replace('{{Y}}', date('Y'), $key);\n $key = str_replace('{{y}}', date('y'), $key);\n $key = str_replace('{{m}}', date('m'), $key);\n $key = str_replace('{{n}}', date('n'), $key);\n $keysAux[] = $key;\n }\n\n $keysAnd = $keysAux;\n\n //print_r($keys);die();\n\n $principal = explode('//', $web);\n $http = $principal[0];\n\n if (stripos($principal[1], '/')) {\n $principal = explode('/', $principal[1]);\n $principal = $http.'//'.$principal[0];\n } else {\n $principal = $principal[1];\n $principal = $http.'//'.$principal;\n }\n\n // Optenemos la web, el html\n $file = $this->getWebHtml($web);\n\n $regex = '/https?\\:\\/\\/[^\\\" ]+/i';\n\n //se extraen todos las urls en el html\n preg_match_all($regex, $file, $matches);\n $matches = $matches[0];\n\n $dom = new DOMDocument();\n @$dom->loadHTML($file);\n\n //segunda extraccion de las urls en el html\n $tags = $dom->getElementsByTagName('a');\n foreach ($tags as $tag) {\n $matches[] = $tag->getAttribute('href');\n }\n\n $urls = [];\n foreach ($matches as $url) {\n $save = true;\n\n foreach ($keysOr as $key) {\n //etiquetas requeriadas, al menos una\n if (stripos(' '.$url, $key)) {\n $save = true;\n break;\n }\n\n $save = false;\n }\n\n foreach ($keysAnd as $key) {\n //etiquetas obligatorias\n if (!stripos(' '.$url, $key)) {\n $save = false;\n break;\n }\n }\n\n //se eliminan # del la url\n if (stripos($url, '#')) {\n $url = explode('#', $url);\n $url = $url[0];\n }\n\n //se comprueba que no sea la raiz\n if (stripos(' '.$url, '//')) {\n $urlAux = explode('//', $url);\n if (!stripos(' '.$urlAux[1], '/')) {\n $save = false;\n }\n }\n\n if (!stripos(' '.$url, 'http://')) {\n //no contiene link principal\n\n $url = $principal.'/'.ltrim($url, '/');\n } elseif (!stripos(' '.$url, $principal)) { //eliminando link externos\n $save = false;\n }\n\n if (!in_array($url, $urls) && $save) { //evitando repeticiones\n\n $urls[] = $url;\n }\n }\n\n return $urls;\n }",
"private function filterDomains(Sequence $urls) : Sequence\n {\n return (empty($this->options->domains))\n ? $urls\n : $urls->filter(function ($url) {\n $urlHost = (string) $url->getPart('host');\n if (empty($urlHost)) {\n return true;\n }\n // if the host name has been checked before, use the stored result\n if ($this->domainAcceptedCache->hasKey($urlHost)) {\n return $this->domainAcceptedCache->get($urlHost);\n }\n // not cached, do matching\n $accepted = false;\n // empty domains->accept means accept all\n if (empty($this->options->domains['accept'])) {\n $accepted = true;\n } else { // otherwise check acceptance\n foreach ($this->options->domains['accept'] as $acceptedDomain) {\n if ($this->isDomainMatch($acceptedDomain, $urlHost)) {\n $accepted = true;\n break;\n }\n }\n }\n // there's still a chance the domain will be rejected\n if (!empty($this->options->domains['reject'])) {\n foreach ($this->options->domains['reject'] as $rejectedDomain) {\n if ($this->isDomainMatch($rejectedDomain, $urlHost)) {\n $accepted = false;\n break;\n }\n }\n }\n $this->domainAcceptedCache->put($urlHost, $accepted);\n return $accepted;\n });\n }",
"function trigger_https()\n\t{\n\t\t$exclude_url_list = array();\n\t\t//$exclude_url_list[] = '/(.*)js$/';\n\t\tforeach ($exclude_url_list as $exclude_url) {\n\t\t\tif(preg_match($exclude_url, uri_string()))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t \n\t\t// switch to HTTPS for these urls\n\t\t$ssl_url_list = array();\n\t\t$ssl_url_list[] = '/(.*)contact(.*)$/';\n\t \n\t\tforeach ($ssl_url_list as $ssl_url) {\n\t\t\tif(preg_match($ssl_url, uri_string()))\n\t\t\t{\n\t\t\t\tforce_ssl();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t \n\t\t// still here? switch to HTTP (if necessary)\n\t\tremove_ssl();\n\t}",
"public function getUriList();",
"function _polylang_allowlist_tsf_urls( $allowlist ) {\n\t$allowlist[] = [ 'file' => 'autodescription/inc' ];\n\treturn $allowlist;\n}",
"public function followLinks($url)\n {\n $parser = new DomDocumentParser($url);\n //这行代码第一次时获取用$startUrl创建的文档对象中的所有<a>标签\n $linkList = $parser->getLinks();\n \n //这里第一次遍历用$startUrl创建的文档对象中的所有URL\n foreach ($linkList as $link) {\n $href = $link->getAttribute('href');\n if ($href == '') {\n continue;\n }\n\n //这里应该是有#就不显示了吧,改成strpos($href, '#') == 0会不会更好呢?\n if (strpos($href, '#') !== false) {\n continue;\n }\n if (substr($href, 0, 11) == 'javascript:') {\n continue;\n }\n if (substr($href, 0, 7) == 'mailto:') {\n continue;\n }\n\n //将网址的相对路径转换为绝对路径\n $href = $this->createLinks($href, $url);\n \n //检查网址有没有被爬取\n /*\n 如果要爬取的网址不在已经爬取的网址数组中,则同时将其添加到已爬取和要爬取的数组中,\n 然后将该网址的信息记录在sites表中,同时将该网址的所有图片信息记录到image表中\n */\n if (!in_array($href, $this->alreadyCrawled)) {\n $this->alreadyCrawled[] = $href;\n $this->crawling[] = $href;\n $this->getDetails($href);\n array_shift($this->crawling);\n }\n \n //下面这行代码在当前网址已被爬取(记录到数据库)时触发,结束该函数的执行。\n //所以说只要遇到一个已爬取过的网址,就停止递归中一个函数的执行\n //添加这行代码可以显著减少要爬取网站的数量\n //else return;\n } //endof foreach \n //这个foreach结束之后,$this->alreadyCrawled和$this->crawing中的值就添加了这个网页中a标签的href属性\n \n\n foreach($this->crawling as $site) {\n $this->followLinks($site);\n }\n }",
"public function getBuurlinks($mtLinkpoolId,$randomizer,$aantal) {\n $buurlinks = $this->getDataAccessObject()\n ->getBuurlinks($mtLinkpoolId,$randomizer,$aantal);\n return $buurlinks;\n }",
"function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent)\n {\n }",
"protected function generateUrls()\n\t{\n\t\t// Video URL array\n\t\t$videoUrl = $this->videoUrl;\n\n\t\t// Array for URLs\n\t\t$urls\t= [];\n\n\t\t$query\t= '';\n\n\t\t$keywords = $this->keywords;\n\n\t\t// Check if there is at least one keyword\n\t\tif(count($keywords) < 1) return false;\n\n\t\t// Setup dev key\n\t\t$devKey = (! is_null($this->developerKey)) ? '&key=' . $this->developerKey : null;\n\n\t\t// Loop keywords\n\t\tforeach($keywords as $keyword)\n\t\t{\n\t\t\t// Check keyword string length\n\t\t\tif(strlen($keyword) < 4) continue;\n\n\t\t\tforeach($this->modList as $modword)\n\t\t\t{\n\t\t\t\t$query = str_replace('-', ' ', Str::slug($modword . ' ' . $keyword));\n\n\t\t\t\t$urls[] = $videoUrl . urlencode($query) . $devKey;\n\t\t\t}\n\t\t}\n\n\t\t// Update the URLs\n\t\t$this->urls = $urls;\n\n\t\treturn $urls;\n\t}",
"function find($ip, $url, $limit);",
"public function getRedirects();",
"public function auto_purge_by_url( $post, $purge_urls, $lang ) {\r\n\t\tif ( ! current_user_can( 'rocket_purge_cloudflare_cache' ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$cf_cache_everything = $this->cloudflare->has_page_rule( 'cache_everything' );\r\n\r\n\t\tif ( is_wp_error( $cf_cache_everything ) || ! $cf_cache_everything ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Add home URL and feeds URLs to Cloudflare clean cache URLs list.\r\n\t\t$purge_urls[] = get_rocket_i18n_home_url( $lang );\r\n\t\t$feed_urls = [];\r\n\t\t$feed_urls[] = get_feed_link();\r\n\t\t$feed_urls[] = get_feed_link( 'comments_' );\r\n\r\n\t\t// this filter is documented in inc/functions/files.php.\r\n\t\t$feed_urls = apply_filters( 'rocket_clean_home_feeds', $feed_urls );\r\n\t\t$purge_urls = array_unique( array_merge( $purge_urls, $feed_urls ) );\r\n\r\n\t\t// Purge CloudFlare.\r\n\t\t$this->cloudflare->purge_by_url( $post, $purge_urls, $lang );\r\n\t}",
"public function getHotels(){\n\n if (isset($_GET) && !empty($_GET)) {\n\n $validUrl = $this->targetUrl.$this->getParameters(); // create full Url (target Url string + parameters String) \n\n $response = $this->getResponse($validUrl); //call function that sent request and return response & save the result in $response .\n\n return $this->responseHandler($response); // call function that checking the response ,and return array of offers .\n\n }else{\n return false; \n }\n }",
"function _nbabanner_get_banners($randomise = false)\n{\n $banners = nbacontent_get_vocabulary('nbabanner', true);\n \n $filteredBanners = array_filter($banners, function($ele) {\n return $ele->nbabanner_link_live['und'][0]['value'] == 1;\n });\n \n if ($randomise === true) {\n shuffle($filteredBanners);\n }\n \n return $filteredBanners;\n}",
"function doFilterRelUrl($sContent) {\n $aFilterSettings = getOutputFilterSettings();\n $key = preg_replace('=^.*?filter([^\\.\\/\\\\\\\\]+)(\\.[^\\.]+)?$=is', '\\1', __FILE__);\n if ($aFilterSettings[$key]) {\n $sAppUrl = rtrim(str_replace('\\\\', '/', WB_URL), '/').'/';\n $sAppPath = rtrim(str_replace('\\\\', '/', WB_PATH), '/').'/';\n $sAppRel = preg_replace('/^https?:\\/\\/[^\\/]*(.*)$/is', '$1', $sAppUrl);\n $sDocRoot = preg_replace('/^(.*?)'.preg_quote($sAppRel, '/').'$/', '$1', $sAppUrl);\n $sContent = preg_replace_callback(\n '/((?:href|src|action)\\s*=\\s*\")([^\\?\\\"]+?)/isU',\n function ($aMatches) use ($sAppUrl, $sAppPath, $sAppRel) {\n $aMatches[2] = str_replace('\\\\', '/', $aMatches[2]);\n if ($aMatches[2][0] ='/') { $aMatches[2] = rtrim($sAppUrl, '/').$aMatches[2]; }\n $aMatches[2] = preg_replace('/^'.preg_quote($sAppUrl, '/').'/is', '', $aMatches[2]);\n $aMatches[2] = preg_replace('/(\\.+\\/)|(\\/+)/', '/', $aMatches[2]);\n if (!is_readable($sAppPath.$aMatches[2])) {\n // in case of death link show original link\n return $aMatches[0];\n } else {\n return $aMatches[1].$sAppRel.$aMatches[2];\n }\n },\n $sContent\n );\n/* Original SP7 Manu Fix */\n // restore canonical relation links\n $sContent = preg_replace_callback(\n '/<link\\s[^>]*?\\\"canonical\\\"[^>]*?>/isU',\n function($aMatches) use ($sDocRoot) {\n return preg_replace(\n '/(href\\s*=\\s*\\\")([^\\\"]*?)/siU',\n '\\1'.rtrim($sDocRoot, '/').'\\2',\n $aMatches[0]\n );\n },\n $sContent\n );\n }\n return $sContent;\n }"
] | [
"0.58035636",
"0.5692264",
"0.56242085",
"0.5523581",
"0.5510424",
"0.54702544",
"0.54508966",
"0.5435036",
"0.5358921",
"0.5340162",
"0.53369623",
"0.5252068",
"0.5250543",
"0.5238363",
"0.521881",
"0.5212904",
"0.51484644",
"0.51149285",
"0.51099074",
"0.51096994",
"0.50943524",
"0.50911236",
"0.5088437",
"0.50768393",
"0.5058319",
"0.50362855",
"0.50342983",
"0.50154847",
"0.50130516",
"0.50130516",
"0.50039",
"0.49927047",
"0.4975695",
"0.49746478",
"0.4967756",
"0.49666584",
"0.49562886",
"0.4946696",
"0.49205717",
"0.49174157",
"0.49128446",
"0.4908427",
"0.48952693",
"0.4892418",
"0.4892356",
"0.4890507",
"0.4885353",
"0.4884529",
"0.48835963",
"0.48732764",
"0.4863719",
"0.4863619",
"0.48635355",
"0.48623893",
"0.4856669",
"0.48550072",
"0.48521808",
"0.48487136",
"0.48418832",
"0.48398075",
"0.4830902",
"0.48276478",
"0.48274088",
"0.4824529",
"0.48232087",
"0.48091456",
"0.4807879",
"0.47998187",
"0.47950962",
"0.47934082",
"0.47859716",
"0.47846994",
"0.47817102",
"0.476902",
"0.47676906",
"0.47640082",
"0.47606868",
"0.47541356",
"0.47449538",
"0.47429183",
"0.47314134",
"0.47290975",
"0.47235152",
"0.47220153",
"0.47107708",
"0.4708914",
"0.47067586",
"0.4701394",
"0.46950686",
"0.4692097",
"0.46877596",
"0.46813267",
"0.46763387",
"0.46699208",
"0.46686414",
"0.46630192",
"0.46586818",
"0.46586117",
"0.46551457",
"0.4655043"
] | 0.51624995 | 16 |
/ Functions we used | function check_input($data, $problem='')
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
{
show_error($problem);
}
return $data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function helper()\n\t{\n\t\n\t}",
"function functions() {\n \n }",
"private function _i() {\n }",
"public function operations();",
"function process() ;",
"public function core();",
"private function aFunc()\n {\n }",
"public function access();",
"private function __() {\n }",
"final function velcom(){\n }",
"abstract protected function external();",
"function getInfo();",
"function DiscountConstructFunctions()\n\t{\t\n\t}",
"private function static_things()\n\t{\n\n\t\t# code...\n\t}",
"public function ogs()\r\n {\r\n }",
"abstract function fromexp();",
"function specialop() {\n\n\n\t}",
"public function CBfunctions() {}",
"function initialize() ;",
"abstract public function information();",
"function getStatus() ;",
"function getStatus() ;",
"function getStatus() ;",
"abstract protected function _process();",
"abstract protected function _process();",
"private function public_hooks()\n\t{\n\t}",
"public function nadar()\n {\n }",
"public function boleta()\n\t{\n\t\t//\n\t}",
"function fix() ;",
"public function func_search() {}",
"abstract public function getFunctions();",
"function extract()\n {\n }",
"function custom_construction() {\r\n\t\r\n\t\r\n\t}",
"public function temporality();",
"private function j() {\n }",
"function function_map() { \n\n $map = array();\n\n\t\t/* Required Functions */\n $map['add'] = 'add_songs';\n $map['delete'] = 'delete_songs';\n $map['play'] = 'play';\n $map['stop'] = 'stop';\n $map['get'] = 'get_songs';\n $map['status']\t\t\t= 'get_status';\n $map['connect'] = 'connect';\n\t\t \n\t\t\n\t\t/* Recommended Functions */\n\t\t$map['next']\t\t\t= 'next';\n\t\t$map['prev']\t\t\t= 'prev';\n\t\t$map['pause']\t\t\t= 'pause';\n\t\t$map['volume_set'] = 'volume_set';\n\t\n\t\t/* Optional Functions */\n\t\t$map['delete_all'] \t= 'clear_playlist';\n\t\t$map['shutdown'] \t= 'xbmc_shutdown';\n\n return $map;\n\n\t}",
"public function acp();",
"public function custom()\n\t{\n\t}",
"function __construct() ;",
"static function defineFunctions()\n\t{\n\t\tif ( !function_exists('json_decode') ) {\n\t\t\tfunction json_decode($content, $assoc=false){\n\t\t\t\tif ( $assoc ){\n\t\t\t\t\t$json = new Pie_Json(SERVICES_JSON_LOOSE_TYPE);\n\t\t\t\t} else {\n\t\t\t\t\t$json = new Pie_Json;\n\t\t\t\t}\n\t\t\t\treturn $json->decode($content);\n\t\t\t}\n\t\t}\n\n\t\tif ( !function_exists('json_encode') ) {\n\t\t\tfunction json_encode($content){\n\t\t\t\t$json = new Services_JSON;\n\t\t\t\treturn $json->encode($content);\n\t\t\t}\n\t\t}\n\t}",
"function processData() ;",
"public static function main(){\n\t\t\t\n\t\t}",
"function handle() ;",
"public function library()\n\t{\n\t\n\t}",
"function main()\n{\n //getRequestidhl();\n\t //getRequestidlap();\n\t getRequestidpl();\n\n\t\n}",
"abstract protected function _preProcess();",
"public function oops () {\n }",
"protected function init()\n\t{\n\t\t\n\t}",
"public function main()\r\n {\r\n \r\n }",
"abstract protected function data();",
"public function masodik()\n {\n }",
"abstract public function getPasiekimai();",
"public function andar()\n {\n }",
"public function serch()\n {\n }",
"public function abono();",
"private function __construct()\t{}",
"function metodo() {\n // Funcion normal\n }",
"private static function support()\n {\n require_once static::$root.'Support'.'/'.'FunctionArgs.php';\n }",
"protected function _init()\r\n\t{\r\n\t}",
"public function get_data()\n\t\t{\t\t// Should there be a common method for this?\n\t\t}",
"protected function _process() {}",
"protected function _process() {}",
"protected function _process() {}",
"protected function _process() {}",
"public abstract function Ataca();",
"protected function _refine() {\n\n\t}",
"public function AggiornaPrezzi(){\n\t}",
"function PrimaryReturn($otype){\r\n}",
"function getDescription() ;",
"function count() ;",
"private function method1()\n\t{\n\t}",
"function getFrom();",
"public function methods();",
"protected function func_default() {}",
"function lcs()\n {\n }",
"abstract protected function attributes();",
"function factures_autoriser(){}",
"function getOverview() ;",
"function init()\r\n \t{\r\n \t}",
"public static function declarations()\n {\n \n }",
"function getParameters();",
"function getParameters();",
"private function method2()\n\t{\n\t}",
"abstract protected function setup_info();",
"private function setup()\r\n\t{ }",
"function _construct() {\n \t\n\t\t\n\t}",
"abstract protected function exportFunctions();",
"function dft (){\n\t\tglobal $u;\n\t\tglobal $i;\n\t\tglobal $n;\n\t\tglobal $e;\n\t\t$u = \"user\";\n\t\t$i = \"default.png\";\n\t\t$n = \"name\";\n\t\t$e = \"email\";\n\t}",
"abstract public function infoAll();",
"public function demo();",
"public function demo();",
"public function init() {\t\t\n\n }",
"public function f02()\n {\n }",
"function infoDictionary() {}",
"abstract protected function requiredOperations1(): void;",
"function get_data()\n {\n }",
"final private function __construct(){\r\r\n\t}",
"protected function test9() {\n\n }",
"abstract public function states();",
"public function ex4()\n {\n }",
"public function aaa() {\n\t}"
] | [
"0.6575307",
"0.6151331",
"0.5894376",
"0.5765292",
"0.5764337",
"0.56575006",
"0.56268084",
"0.56066835",
"0.54962057",
"0.54802763",
"0.5472431",
"0.5454853",
"0.5443845",
"0.54331094",
"0.5382601",
"0.53815985",
"0.5379629",
"0.5368885",
"0.53597885",
"0.5359137",
"0.5350264",
"0.5348875",
"0.5348875",
"0.5336877",
"0.5336877",
"0.53355545",
"0.53171366",
"0.5316078",
"0.52933556",
"0.5291576",
"0.52889735",
"0.527482",
"0.52730495",
"0.52657247",
"0.5252958",
"0.5250511",
"0.5242247",
"0.5239307",
"0.52352047",
"0.52226907",
"0.52175045",
"0.52067214",
"0.52063614",
"0.5203252",
"0.519363",
"0.5185825",
"0.51857096",
"0.51763904",
"0.51760936",
"0.5175144",
"0.5172984",
"0.51727176",
"0.5166438",
"0.5164806",
"0.5159221",
"0.5155208",
"0.515208",
"0.51366377",
"0.5130473",
"0.51231515",
"0.5122562",
"0.5122562",
"0.5122562",
"0.5122562",
"0.51221144",
"0.51189744",
"0.5113571",
"0.5112736",
"0.51075053",
"0.51073295",
"0.51038724",
"0.5097213",
"0.5072892",
"0.5067014",
"0.5061745",
"0.5058422",
"0.50568044",
"0.5055293",
"0.5054939",
"0.50518733",
"0.5049687",
"0.5049687",
"0.5047194",
"0.50466615",
"0.5046259",
"0.5042717",
"0.50409156",
"0.50245774",
"0.501348",
"0.5010853",
"0.5010853",
"0.50102586",
"0.5009074",
"0.50085247",
"0.50064355",
"0.5002219",
"0.50016105",
"0.5000661",
"0.49995846",
"0.4996705",
"0.49922833"
] | 0.0 | -1 |
Returns Database Logins for a website | public function getDBLogins($domain_id)
{
$sth = self::getConnection()->prepare(
"SELECT DISTINCT `group` FROM `data` WHERE `domain`=:id AND `group` LIKE 'database%' ORDER BY `group` ASC"
);
$sth->bindValue(":id", $domain_id, PDO::PARAM_INT);
$sth->execute();
$databases = array();
$sthData = self::getConnection()->prepare(
"SELECT `name`,`value` FROM `data` WHERE `domain`=:id AND `group` LIKE :group"
);
$sthData->bindValue(":id", $domain_id, PDO::PARAM_INT);
$sthData->bindParam(":group", $group, PDO::PARAM_STR);
while ($group = $sth->fetchColumn()) {
$sthData->execute();
if(preg_match("/^database(\\d+)$/i", $group, $matches)){
$dbnum = $matches[1];
}else{
$dbnum = 0;
}
$result = $sthData->fetchAll(PDO::FETCH_KEY_PAIR);
$databases[] = array(
'id' => $dbnum,
'group' => $group,
'domain' => $domain_id,
'Hostname' => $result['Hostname'],
'Username' => $result['Username'],
'Password' => $result['Password'],
'Database' => $result['Database'],
'URL' => $result['URL'],
'dbtype' => $result['Database Type'],
);
}
return $databases;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_logins() {\n $sql = 'SELECT\n id,\n firstName,\n lastName,\n email,\n password\n FROM\n logins\n ORDER BY \n id\n DESC limit \n 0,10\n ';\n\n $query = $this->data->prepare($sql);\n $query->execute();\n\n return $query->fetchAll();\n }",
"public function getAllLogins() {\n $this->db->cache = false;\n if (!$this->db->from($this->table)->select('login')->all()) {\n return [];\n }\n return $this->db->from($this->table)->select('login')->all();\n }",
"static function sql_wp_list_table_login_builder() {\n\t\tglobal $wpdb;\n\t\t$current_blog_id = get_current_blog_id();\n\n\t\tif ( is_multisite() ) {\n\t\t\t$sql = \"SELECT id, title, structure, css, date FROM {$wpdb->base_prefix}pp_login_builder WHERE blog_id = 0 OR blog_id = $current_blog_id\";\n\t\t}\n\t\telse {\n\t\t\t$sql = \"SELECT id, title, structure, css, date FROM {$wpdb->base_prefix}pp_login_builder\";\n\t\t}\n\t\t$result = $wpdb->get_results(\n\t\t\t$sql,\n\t\t\t'ARRAY_A'\n\t\t);\n\n\t\treturn $result;\n\t}",
"public function getLogOn() {\n $conn = $this->getConnection();\n $getQuery = \"SELECT * from logon group by username\";\n $q = $conn->prepare($getQuery);\n $q->execute();\n return $q->fetchAll();\n }",
"function get_logins() {\n if ( is_user_logged_in() ) {\n global $wpdb;\n $table_name_logs = $wpdb->prefix . 'heartbeattimelogger_logs';\n\n $user_id;\n // $_COOKIE[\"uid\"]\n if ( isset( $_POST[\"uid\"] ) ) {\n $user_id = $_POST[\"uid\"];\n } else {\n error_log('No uid presente en el $_POST');\n }\n\n // Obtener o crear el registro de tiempo del usuario si existe.\n $logins = $wpdb->get_results( \"SELECT userid, ip_add, datetime FROM $table_name_logs ORDER BY userid;\");\n\t \n wp_send_json_success( $logins );\n\n }\n }",
"public function iN_SocialLoginsList() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_social_logins \") or die(myqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}",
"public function getAllFromLogin()\n {\n $sql = \"SELECT * FROM login;\";\n $res = $this->db->executeFetchAll($sql);\n\n return $res;\n }",
"private function getLoginInfos()\r\n\t\t{\t\r\n\t\t\t$request = \"SELECT * FROM `bpcms_users` WHERE Username='\".$this->logInfos['username'].\"'\";\r\n\t\t\t$request = mysql_query($request);\r\n\t\t\t$result = mysql_fetch_assoc($request);\r\n\t\t\t\r\n\t\t\treturn $result;\r\n\t\t}",
"public function iN_SocialLogins() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_social_logins WHERE s_status = '1'\") or die(myqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query)) {\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}",
"public function social_logins() {\n return IWJ_Social_Logins::instance();\n }",
"public function getDailyLogin()\n {\n return $this->get(self::_DAILY_LOGIN);\n }",
"public function getLogins()\n {\n if(!\\Sentry::check()) {\n return $this->render('auth/login.html', $this->data());\n }else {\n return $this->redirect('admin/home');\n }\n }",
"static public function getLogin() {\n //resultat : chaîne de caractère qui correspond au login \n return self::$databases['login'];\n }",
"function mysql_auth_user_list()\n{\n return dbFetchRows(\"SELECT * FROM `users`\");\n}",
"function getAllAdminLogins() {\n $request = $_GET;\n $result = $this->Administration_login_model->get_all_administration_logins($request, array());\n echo json_encode($result);\n exit;\n }",
"public function getWebsites($login)\n {\n $this->login = $login;\n $this->getWebsitesView();\n $this->getWebsitesAdmin();\n return $this->site_ids;\n }",
"function get_logsignins($filter, $filtertypes, $debug = false) {\n\t\t$q = (new QueryBuilder())->table('log_signin');\n\t\t$q->order('date DESC');\n\n\t\tif (!empty($filter)) {\n\t\t\t$q->generate_filters($filter, $filtertypes);\n\t\t}\n\t\t$sql = DplusWire::wire('database')->prepare($q->render());\n\n\t\tif ($debug) {\n\t\t\treturn $q->generate_sqlquery($q->params);\n\t\t} else {\n\t\t\t$sql->execute($q->params);\n\t\t\treturn $sql->fetchAll();\n\t\t}\n\t}",
"protected function getSites()\n {\n\t$kinst = $_REQUEST['kinst'] ;\n\tif( !$kinst )\n\t{\n\t print( \"Site query failed, must specify an instrument\\n\" ) ;\n\t exit( 0 ) ;\n\t}\n\n\t// need to connect to the database here in order to run the\n\t// function mysql_real_escape_string\n\t$isconnected = $this->cedarconnect() ;\n\tif( $isconnected != \"good\" )\n\t{\n\t print( \"$isconnected\\n\" ) ;\n\t exit( 0 ) ;\n\t}\n\n\t$kinst = mysql_real_escape_string( trim( $kinst ) ) ;\n\n\t$query = \"SELECT DISTINCT id FROM tbl_site WHERE kinst=$kinst\" ;\n\t//print( \"$query\\n\" ) ;\n\n\t$result = parent::dbquery( $query ) ;\n\t$num_rows = mysql_num_rows( $result ) ;\n\tif( $num_rows != 0 )\n\t{\n\t while( $line = mysql_fetch_row( $result ) )\n\t {\n\t\tif( $line )\n\t\t{\n\t\t $colnum = 0 ;\n\t\t foreach( $line as $value )\n\t\t {\n\t\t\tif( $colnum > 0 ) echo \",\" ;\n\t\t\techo $value ;\n\t\t\t$colnum++ ;\n\t\t }\n\t\t echo \"\\n\" ;\n\t\t}\n\t }\n\t}\n\n\tparent::dbclose( $result ) ;\n }",
"function get_list_of_websites($session_id) {\n\t\n\t// get the user_id (and check validity of session) based on session_id\n\t$user_id = get_user_id(make_safe($session_id));\n\t\n\n\t\n\tif ($user_id) {\n\t\t\n\t\t$query = \"SELECT * FROM \" . $GLOBALS['db_name'] . \".websites WHERE user_id = '$user_id' ORDER BY domain ASC\";\n\t\t$result = $GLOBALS['db_connection'] -> query($query);\n\t\t\n\t\tif ($result -> num_rows > 0) {\n\t\t\t\n\t\t\t$sites = array();\n\t\t\t\n\t\t\twhile($row = $result -> fetch_assoc()) {\n\t\t\t\t$sites[] = array('site_id' => $row['site_id'], 'domain' => $row['domain']);\n\t\t\t}\n\t\t\t\n\t\t\treturn $sites;\n\t\t\t\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t} else {\n\t\treturn \"Invalid Session\";\n\t}\n}",
"function loginLogger()\n {\n $remote = quote_content($_SERVER['REMOTE_ADDR']);\n $forwar = quote_content($_SERVER['HTTP_X_FORWARDED_FOR']);\n $uagent = quote_content($_SERVER['HTTP_USER_AGENT']);\n $day = date(\"Y-m-d\");\n\t $time = date(\"H:i:s\");\n $type = \"admin\";\n\n $query = \" INSERT INTO log_acesso (login, ip1, ip2, ip3, dia, hora, tipo) \";\n $query.= \" VALUES (?, ?, ?, ?, ?, ?, ?)\";\n\n $q = $this->_con->prepare($query);\n $uname = $this->_object->getUName();\n $q->bindParam(1, $uname);\n $q->bindParam(2, $remote);\n $q->bindParam(3, $forwar);\n $q->bindParam(4, $uagent);\n $q->bindParam(5, $day);\n $q->bindParam(6, $time);\n $q->bindParam(7, $type);\n\n return $q->execute();\n }",
"public static function getlist(){\n $sql = new Sql();\n \n return $sql->select(\"SELECT * FROM tb_usuarios ORDER BY deslogin\");\n }",
"function doLogin()\n {\n\n //var_dump($sql);exit;\n /*if($res){*/\n //存入session\n /*session_start();\n $_SESSION['user'] = json_encode($res);*/\n\n //展示数据库\n $sql = 'show databases;';\n $res = $GLOBALS['data']->query($sql)->fetchAll();\n foreach ($res as $k=>$v){\n $res[$k] = $v['Database'];\n }\n //var_dump($res);exit;\n\n include \"views/homePage.html\";\n /*}*/\n }",
"function index() {\n\t\t$this->paginate['Login']['fields'] = array_keys($this->Login->getColumnTypes());\n\n\t\t$logins = $this->paginate('Login');\n\n\t\t$logins = Set::extract('/Login/.', $logins);\n\t\t$this->set(compact('logins'));\t\n\t}",
"function getAllSites(){\n\n if ($this->connection) {\n $rows = $this->connection->query(\"SELECT * FROM `sites`\");\n\n $this->checkError();\n\n $result = $rows->fetchAll();\n\n return $result;\n }\n }",
"public function user_logs(Request $request)\n { \n return DB::select('SELECT * FROM authentication_log WHERE authenticatable_id = '.$request->user()->id);\n }",
"function getDailyConnection() {\n $query = \"SELECT day(when_registered) as giorno, month(when_registered) as mese, \" .\n \" year(when_registered) as anno , count(*) as connessioni\" .\n \" FROM scuola.utenti_logger WHERE msg_type = 'LOGIN_SUCCESS'\" .\n \" GROUP BY day(when_registered)\" .\n \" ORDER BY when_registered\";\n $connections = array();\n if ($this->connectToMySqlWithParams('localhost:3307', 'root', 'myzconun')) {\n\n $result = mysql_query($query);\n\n if (!$result) {\n\n $msg = mysql_error();\n setcookie('message', mysql_errno() . ': ' . mysql_error());\n //mysql_freeresult();\n } else {\n $i = 1;\n while ($row = mysql_fetch_row($result)) {\n $connections[$i] = array(\n 'giorno' => $row[0],\n 'mese' => $row[1],\n 'anno' => $row[2],\n 'connessioni' => $row[3]);\n $i++;\n }\n }\n\n //mysql_freeresult();\n $this->closeConnection();\n\n return $connections;\n }\n return NULL;\n }",
"public function getLogin();",
"public function getLogin();",
"public function getLogin();",
"public function getAllUsers(){\n\t\n\t\t$db = new Database();\n\t\t$conn= $db->getConn();\n\t\t$rs = $conn->query(\"select * from login\");\n\t\t$num_of_row = $rs->num_rows;\n\t\tif($num_of_row >0){\n\t\t\twhile($row = $rs->fetch_assoc()){\n\t\t\t\t$users[]=array('username'=>$row['username'],'password'=>sha1($row['password']),'email'=>$row['email'],'user_type'=>$row['user_type']);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $users;\n\t}",
"private static function queryLoginHistories($order = 'asc', $limit = 0) {\n global $wpdb;\n\n $sql = \"SELECT * FROM \" . self::tableName() . \" order by logged_in_at \" . $order;\n if (!empty($limit)) {\n $sql .= \" limit \" . $limit;\n }\n\n return $wpdb->get_results($sql);\n }",
"function cek_login($table,$where){\n\t\treturn $this->db->get_where($table,$where); //cek database\n\t}",
"public static function fetchSites() {\n $db = new PDO(DB_SERVER, DB_USER, DB_PW);\n // 2. Prepare the query\n $sql = 'SELECT * FROM site_endpoint';\n $statement = $db->prepare($sql);\n // 3. Run the query\n $success = $statement->execute();\n // 4. Handle the results\n $arr = [];\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n $theSite = new Site($row);\n array_push($arr, $theSite);\n }\n return $arr;\n }",
"private function get_siteadmins() {\n global $DB;\n $sql = \"SELECT rgt.userid, rgt.gmail\n FROM mdl_repository_gdrive_tokens rgt\n JOIN mdl_config cfg\n ON cfg.name = 'siteadmins'\n WHERE find_in_set(rgt.userid, cfg.value) > 0;\";\n $siteadmins = $DB->get_records_sql($sql);\n return $siteadmins;\n }",
"public function admin_get_dbs() {}",
"private function getFailedLogins() {\n $last_logins = array();\n $cron_interval = $this->config('acquia_connector.settings')->get('spi.cron_interval');\n\n if (\\Drupal::moduleHandler()->moduleExists('dblog')) {\n $result = db_select('watchdog', 'w')\n ->fields('w', array('message', 'variables', 'timestamp'))\n ->condition('w.message', 'login attempt failed%', 'LIKE')\n ->condition('w.timestamp', REQUEST_TIME - $cron_interval, '>')\n ->condition('w.message', array(\n \"UPGRADE.txt\",\n \"MAINTAINERS.txt\",\n \"README.txt\",\n \"INSTALL.pgsql.txt\",\n \"INSTALL.txt\",\n \"LICENSE.txt\",\n \"INSTALL.mysql.txt\",\n \"COPYRIGHT.txt\",\n \"CHANGELOG.txt\",\n ), 'NOT IN')\n ->orderBy('w.timestamp', 'DESC')\n ->range(0, 10)\n ->execute();\n\n foreach ($result as $record) {\n $variables = unserialize($record->variables);\n if (!empty($variables['%user'])) {\n $last_logins['failed'][$record->timestamp] = Html::escape($variables['%user']);\n }\n }\n }\n return $last_logins;\n }",
"function get_userdatabylogin($user_login)\n {\n }",
"public function getOnlineUsers($debug_to_pass = '') {\n\n $this->db->select('slog.log_id,slog.user_id,slog.last_login,slog.last_activity,slog.last_logout,u.user_name,u.profile_picture');\n $this->db->from('p784_user_sign_in_log as slog');\n $this->db->join('p784_mst_users as u', 'slog.user_id=u.user_id', 'inner');\n $this->db->where('slog.last_logout', '0000-00-00 00:00:00');\n $this->db->group_by('slog.user_id');\n $this->db->order_by('slog.last_logout desc');\n $query = $this->db->get();\n if ($debug_to_pass)\n echo $this->db->last_query();\n return $query->result_array();\n }",
"public function getCompanyWithUniqueLogins();",
"function get_list_of_visitor_html($database = \"\"){\n\t\n\t\t$output = '';\n\t\t\n\t\t$sql =\"SELECT * FROM visitor\";\n\t\t\n\t\ttry{\n\t\t\t$query = $database->prepare($sql);\n\t\t\t$query ->execute();\n\t\t\t\n\t\t\t$output .= $this ->build_html_table_top();\n\t\t\t\n\t\t\twhile($visitorsDetails = $query ->fetch()){\n\t\t\n\t\t\t\t$output .= $this ->build_visitor_table_row_html($visitorsDetails[\"dateVisited\"],\n\t\t\t\t$visitorsDetails[\"os\"], $visitorsDetails[\"browser_name\"],\n\t\t\t\t$visitorsDetails[\"browser_version\"], $visitorsDetails[\"domainName\"],\n\t\t\t\t$visitorsDetails[\"ipAddress\"], $visitorsDetails[\"refererPage\"],\n\t\t\t\t$visitorsDetails[\"requestPage\"], $visitorsDetails[\"user\"],\n\t\t\t\t$visitorsDetails[\"filename\"], $visitorsDetails[\"phpSelf\"]);\n\t\t\t}\n\t\t\t\n\t\t\t$output .= $this ->build_html_table_bottom();\n\t\t\t\n\t\t} catch(PDOException $error){\n\t\t\n\t\t\techo 'Error with query. '.$error->getMessage();\n\t\t}\n\t\t\n\t\treturn $output;\n\t\t\n\t}",
"public function SelectCredencials() {\n \n $query = $this->conection->query(\"SELECT nuser,npass,ip FROM Admin\");\n $result = array();\n while ($rst = $this->conection->result($query)) {\n\n $temp=null;\n $user = $rst[\"nuser\"]; \n $pass = $rst[\"npass\"]; \n $ip = $rst[\"ip\"]; \n $temp=new Admin($user, $pass, $ip);\n \n array_push($result, $temp);\n }\n \n $this->conection->free($query);\n return $result;\n\n \n }",
"public static function all() {\n try {\n $db = Database::getInstance();\n $sql = \"SELECT username, is_admin, token, token_expiration FROM `User`\";\n $stmt = $db->prepare($sql);\n $stmt->execute();\n \n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n } catch (PDOException $e) {\n exitError(500, \"Internal error.\");\n }\n }",
"function getAllUsers()\r\n{\r\n global $dbh;\r\n\r\n // define the query\r\n $sql = \"SELECT email FROM loginCredentials\";\r\n\r\n // prepare the statement\r\n $statement = $dbh->prepare($sql);\r\n\r\n // execute the statement\r\n $statement->execute();\r\n\r\n // Return the result\r\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n return $result;\r\n}",
"public function listUsers()\n {\n global $db;\n $user_db_data = array();\n $cache = Cache::getInstance();\n // $cache->flush();\n if($cache->exists(\"user_info_data\"))\n {\n $user_db_data = $cache->get(\"user_info_data\");\n } else { \n $e = $db->prepare(\"SELECT * FROM user_info\");\n $e->execute();\n $user_data = $e->fetchAll(); \n // cache will clear in every 1 min.\n $cache->set(\"user_info_data\", $user_data, 60 * 60 * 0.1);\n $user_db_data = $user_data;\n }\n return $user_db_data;\n }",
"function login(){\n\t\t$apikey = $this->get_api_key();\n\t\t$apisecret = $this->get_api_secret();\n\t\t$authorization = $this->get_authorization();\n\t\t$user = new \\gcalc\\db\\api_user( $apikey, $apisecret, $authorization );\n\t\tif ( $user->login() ) {\n\t\t\t$credetials = $user->get_credentials();\t\t\t\t\n\t\t} else {\n\t\t\t$credetials = array(\n\t\t\t\t'login' => 'anonymous',\n\t\t\t\t'access_level' => 0\n\t\t\t);\n\t\t}\n\t\treturn $credetials;\n\t}",
"function index() {\n\t\t$username = $this->session->userdata('username');\t\n\t\t$this -> db -> select('*');\n\t\t$this -> db -> from('sys_user');\n\t\t$this -> db -> where('username !=', $username);\n\t\t$query = $this -> db -> get();\t\n\t\treturn $query;\n\t}",
"function getSitesList(){\n $result = db_select('fossee_website_index','n')\n ->fields('n',array('site_code','site_name'))\n ->range(0,50)\n //->condition('n.uid',$uid,'=')\n ->execute();\n\n return $result;\n\n}",
"private function _countLogin ()\r\n {\r\n $date = date(\"Y-m-d H:i:s\");\r\n $sql = \"UPDATE `admin` SET `last_login` = '$date', `number_logins` = `number_logins` + 1 WHERE `username` = '{$this->_username}'\";\r\n mysql_query($sql, db_c());\r\n \r\n $ip = (getenv('HTTP_X_FORWARDED_FOR') ? getenv('HTTP_X_FORWARDED_FOR') : getenv('REMOTE_ADDR'));\r\n $sql = \"INSERT INTO `_log` (`date`, `activity`, `info`) VALUES ('$date', 'admin_login', 'user={$this->_username};IP={$ip}')\";\r\n mysql_query($sql, db_c());\r\n }",
"function handle_logins()\n{\n if (get_param_integer('httpauth', 0) == 1) {\n require_code('users_inactive_occasionals');\n force_httpauth();\n }\n $username = trim(post_param_string('login_username', ''));\n if (($username != '') && ($username != do_lang('GUEST'))) {\n require_code('users_active_actions');\n handle_active_login($username);\n }\n\n // If it was a log out\n $page = get_param_string('page', ''); // Not get_page_name for bootstrap order reasons\n if (($page == 'login') && (get_param_string('type', '', true) == 'logout')) {\n require_code('users_active_actions');\n handle_active_logout();\n }\n}",
"public function getPage()\r\n {\r\n $sql = sprintf(\r\n \"SELECT\r\n user_login.user_login_id AS userLoginID,\r\n user_login.user_id AS userID,\r\n user_login.ip AS ip,\r\n user_login.user_agent AS shortUserAgent,\r\n DATE_FORMAT(\r\n user_login.date, '%%m-%%d-%%y (%%h:%%i %%p)'\r\n ) AS date,\r\n user_login.date AS dateSort,\r\n user_login.host AS hostname,\r\n user.first_name AS firstName,\r\n user.last_name AS lastName\r\n FROM\r\n user_login\r\n LEFT JOIN user\r\n ON user_login.user_id = user.user_id\r\n WHERE\r\n user_login.successful = %s\r\n AND\r\n user.is_test_user = 0\r\n AND\r\n user_login.site_id = %s\r\n AND\r\n user.site_id = %s\r\n ORDER BY\r\n %s %s\r\n LIMIT %s, %s\",\r\n ($this->_successful ? '1' : '0'),\r\n $this->_siteID,\r\n $this->_siteID,\r\n $this->_sortBy,\r\n $this->_sortDirection,\r\n $this->_thisPageStartRow,\r\n $this->_rowsPerPage\r\n );\r\n\r\n $rs = $this->_db->getAllAssoc($sql);\r\n\r\n foreach ($rs as $rowIndex => $row)\r\n {\r\n if (empty($row['hostname']))\r\n {\r\n if (ENABLE_HOSTNAME_LOOKUP)\r\n {\r\n $rs[$rowIndex]['hostname'] = @gethostbyaddr($row['ip']);\r\n if (empty($rs[$rowIndex]['hostname']))\r\n {\r\n $rs[$rowIndex]['hostname'] = '(unresolvable)';\r\n }\r\n\r\n $this->updateHostName($row['userLoginID'], $row['hostname']);\r\n }\r\n else\r\n {\r\n $rs[$rowIndex]['hostname'] = $row['ip'];\r\n }\r\n }\r\n\r\n if ($row['hostname'] == '(unresolvable)')\r\n {\r\n $rs[$rowIndex]['hostname'] = '';\r\n }\r\n\r\n $rs[$rowIndex]['shortUserAgent'] = implode(\r\n ' ', BrowserDetection::detect($row['shortUserAgent'])\r\n );\r\n }\r\n\r\n return $rs;\r\n }",
"public function getAdditionalLogins( $site_id = null )\n\t{\n\t\tglobal $db;\n\t\t\n\t\t$clause = '';\n\t\tif ( ! empty( $site_id ) ) {\n\t\t\t$site_id = intval( $site_id );\n\t\t\t$clause = \"AND site_id\";\n\t\t}\n\t\t\n\t\t$query = \"SELECT * FROM \".TABLE_AGENT_ADD_LOGINS.\" AS al\n\t\t\tLEFT JOIN \".TABLE_AGENT_ADD_LOGINS_TO_SITES.\" AS ls\n\t\t\t\tON al.add_id = ls.add_id\n\t\t\tWHERE agent_id = '{$this->id}'\n\t\t\t{$clause}\n\t\t\";\n\t\t$additional_logins = $db->fetchAll( $query );\n\t\t\n\t\tif ( ! empty( $additional_logins ) && is_array( $additional_logins ) ) {\n\t\t\t$additional_logins = array();\n\t\t}\n\t\t\n\t\treturn $additional_logins;\n\t}",
"function getUsers($conn){\n\n\t$sql = \"SELECT Username, UserId, Email, AccessLevel FROM user\";\n\n\t$sth = $conn->prepare($sql);\n\t$sth->execute();\n\t\n\t$rows = array();\n\t\n\twhile($r = $sth->fetch(PDO::FETCH_ASSOC)) {\n\t\t$rows[] = $r;\n\t}\n\treturn $rows;\n}",
"protected function getDisplayedLoginsCount(): int {\n return 100;\n }",
"public function login(){\n $query = \"SELECT * FROM users where username = '$this->username' && password = '$this->password' \";\n $pdo = new Connection();\n $pdo = $pdo->open();\n $results = $pdo->query($query);\n $rows = [];\n foreach($results->fetchAll() as $row){\n $rows[] = new User($row['username'], null, $row['id']);\n }\n return $rows;\n }",
"function get_daysignins($day, $debug = false) {\n\t\t$day = empty(date('Y-m-d', strtotime($day))) ? date('Y-m-d') : date('Y-m-d', strtotime($day));\n\t\t$q = (new QueryBuilder())->table('log_signin');\n\t\t$q->where($q->expr(\"DATE(date) = STR_TO_DATE([], '%Y-%m-%d')\", [$day]));\n\t\t$q->order('date DESC');\n\n\t\t$sql = DplusWire::wire('database')->prepare($q->render());\n\n\t\tif ($debug) {\n\t\t\treturn $q->generate_sqlquery($q->params);\n\t\t} else {\n\t\t\t$sql->execute($q->params);\n\t\t\t$sql->setFetchMode(PDO::FETCH_CLASS, 'SigninLog');\n\t\t\treturn $sql->fetchAll();\n\t\t}\n\t}",
"function cek_login($tabel,$where) {\n\t\t$login = $this->db->get_where('user',$where);\n\t\treturn $login;\n\t}",
"public function listLoginAction() {\n $em = $this->getDoctrine()->getManager();\n\n $logins = $em->getRepository('RocketfireAgenceMainBundle:Login')->findAll();\n\n return $this->render('RocketfireAgenceMainBundle:Login:index.html.twig', [\n 'logins' => $logins,\n ]);\n }",
"function get_list_of_visitor_browsercap_html($database = \"\"){\n\t\n\t\t$output = '';\n\t\t\n\t\t$sql =\"SELECT * FROM visitor WHERE browser_version = 0\";\n\t\t \n\t\ttry{\n\t\t\t$query = $database->prepare($sql);\n\t\t\t$query ->execute();\n\t\t\t\n\t\t\t$output .= $this ->build_html_table_top();\n\t\t\t\n\t\t\twhile($visitorsDetails = $query ->fetch()){\n\t\t\t\t\n\t\t\t\t$output .= $this ->build_visitor_table_row_html($visitorsDetails[\"dateVisited\"],\n\t\t\t\t$visitorsDetails[\"os\"], $visitorsDetails[\"browser_name\"],\n\t\t\t\t$visitorsDetails[\"browser_version\"], $visitorsDetails[\"domainName\"],\n\t\t\t\t$visitorsDetails[\"ipAddress\"], $visitorsDetails[\"refererPage\"],\n\t\t\t\t$visitorsDetails[\"requestPage\"], $visitorsDetails[\"user\"],\n\t\t\t\t$visitorsDetails[\"filename\"], $visitorsDetails[\"phpSelf\"]);\n\t\t\t}\n\t\t\t\n\t\t\t$output .= $this ->build_html_table_bottom();\n\t\t\t\n\t\t} catch(PDOException $error){\n\t\t\n\t\t\techo 'Error with query. '.$error->getMessage();\n\t\t}\n\t\t\n\t\treturn $output;\n\t\t\n\t}",
"public function getWebsitesAdmin()\n {\n $res = $this->searchAdmin();\n if ($res) {\n array_push($this->site_ids, array('access' => 'admin', 'ids' => array()));\n if ($res['count'] > 0) {\n foreach ($res as $r) {\n if (is_array($r)) {\n array_push($site_ids[1]['ids'], $this->getSiteId($r[strtolower($this->to_get_admin)][0]));\n }\n }\n }\n }\n }",
"public function getActiveUsers($connection,$loginId){\n $query = \"SELECT * FROM forum_users WHERE userLive = '1' AND id != '$loginId' \";\n // echo $query; die();\n $result1 = $connection->query($query);\n return $result1;\n }",
"function track_logins($vars) {\n\tinsert_query(\"mod_tbllogins\", array(\"clientid\"=>$vars['userid'], \"ip\"=>$_SERVER['REMOTE_ADDR']));\n \n\t// Trim logins to 30 latest (couldn't get the SQL Helper to work on this DELETE query)\n\tmysql_query(\"DELETE FROM mod_tbllogins WHERE clientid = '\". $vars['userid'] .\"' AND date NOT IN (SELECT * FROM (SELECT date FROM mod_tbllogins WHERE clientid = '\". $vars['userid'] .\"' ORDER BY date DESC LIMIT 30) alias)\");\n}",
"static function getUsers()\n\t{\n\t\t$dataBase = self::dbConnect();\n\t\t$request = $dataBase->query('SELECT login, email FROM users');\n\n\t\treturn $request;\n\t}",
"public function cekLogin($data) {\r\n\t\t\t$query=\t$this->db->query(\"select * from ms_user where user_name='\".$data['username'].\"' and password='\".$data['password'].\"'\");\r\n return $query;\r\n }",
"public function all_user_connected() {\n try\n {\n $max_last_ping = time() - 31;\n $stmt = $this->db->prepare(\"SELECT * FROM connected_user WHERE last_ping > :last_ping\");\n $stmt->execute(array(\n 'last_ping' => $max_last_ping\n ));\n\n while($result = $stmt->fetch()) {\n $listid[] = $result['id_user'];\n }\n \n return $listid;\n }\n catch(PDOException $e) {\n die('<h1>ERREUR LORS DE LA CONNEXION A LA BASE DE DONNEE. <br />REESAYEZ ULTERIEUREMENT</h1>');\n }\n }",
"public function index()\n {\n $logins = Login::all();\n return view('logins.index',['logins' => $logins]);\n }",
"function search_connected_usersfive() {\n global $DB;\n $sql = \"SELECT COUNT(*) AS usuarios_conectados\n FROM {user}\n WHERE lastaccess > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 5 MINUTE));\";\n $connecteduser = $DB->get_record_sql($sql);\n return $connecteduser->usuarios_conectados;\n}",
"function cek_login($table,$where){ \n return $this->db->get_where($table,$where);\n }",
"public function getGroupsListForUserLoginLog()\n\t{\n\t\t$db = Zend_Db_Table::getDefaultAdapter();\n\t\t$query = \"select g.id,g.group_name,(select count(*) from main_userloginlog where group_id = g.id) cnt\n from main_groups g where g.isactive = 1\";\n\t\t$result = $db->query($query);\n\t\t$group_arr = array();\n\t\twhile($row = $result->fetch())\n\t\t{\n\t\t\t$group_arr[$row['id']]['group_name'] = $row['group_name'];\n\t\t\t$group_arr[$row['id']]['cnt'] = $row['cnt'];\n\t\t}\n\n\t\treturn $group_arr;\n\t}",
"function get_db_session_data()\r\n\t{\r\n\t\t$query = $this->mongo_db->select('user_data')->get('ci_sessions');\r\n\t\t$user = array(); /* array to store the user data we fetch */\r\n\t\tforeach ($query->result() as $row)\r\n\t\t{\r\n\t\t $udata = unserialize($row->user_data);\r\n\t\t /* put data in array using username as key */\r\n\t\t $user['user_name'] = $udata['user_name']; \r\n\t\t $user['is_logged_in'] = $udata['is_logged_in']; \r\n\t\t}\r\n\t\treturn $user;\r\n\t}",
"function _terminatur_data_get_db_creds($site, $destination, $db_user, $db_pass, $db_host, $db_port) {\n $db_url = 'mysql://' . $db_user . ':' . $db_pass . '@' . $db_host . ':' . $db_port . '/' . $site['machine-name'] . TERMINATUR_DB_SUFFIX;\n // Check to see if code exists\n if (is_dir($destination . $site['machine-name'])) {\n // Validate settings file if applicable\n if (file_exists($destination . $site['machine-name'] . TERMINATUR_DEFAULT_DEFAULT_DIR . \"settings.php\")) {\n $settings_file = $destination . $site['machine-name'] . TERMINATUR_DEFAULT_DEFAULT_DIR . \"settings.php\";\n if (!$databases = _terminatur_settings_validate($settings_file)) {\n $databases = array();\n $databases = _terminatur_data_parse_db_url($db_url, NULL);\n if (!$databases = _terminatur_settings_build($settings_file, $databases)) {\n return FALSE;\n }\n }\n // This means we should have a legit settings file with legit db creds\n // Let's build a local alias for it\n // Build alias callback function\n $get_alias_func = '_terminatur_alias_add_' . TERMINATUR_ENV;\n $get_alias_func($site, $destination);\n return $databases;\n }\n elseif (file_exists($destination . $site['machine-name'] . TERMINATUR_DEFAULT_DEFAULT_DIR . \"default.settings.php\")) {\n // Sometimes settings.php is gitignored so we should instantiate one and try again\n copy($destination . $site['machine-name'] . TERMINATUR_DEFAULT_DEFAULT_DIR . \"default.settings.php\", $destination . $site['machine-name'] . TERMINATUR_DEFAULT_DEFAULT_DIR . \"settings.php\");\n return _terminatur_data_get_db_creds($site, $destination, $db_user, $db_pass, $db_host, $db_port);\n }\n }\n return _terminatur_data_test_db_connection(_terminatur_data_parse_db_url($db_url, NULL));\n}",
"public function login_title(){\n\t\tglobal $con;\n\n\t\t$info=array();\n\t\t$query=\"SELECT * FROM system WHERE 1\";\n\t\t$info=$this->select($con,$query);\n\n\t\treturn $info;\n\t}",
"public function ObtenerDatos($idsitioweb){\n\t\t\ttry {\n\t\t\t\t$sql=\"select * from sitiosweb where idsitioweb='$idsitioweb'\";\n\t\t\t\tif ($this->CS($sql)) {\n\t\t\t\t\tif ($fila=$this->mDatos->fetch_assoc()) { \t\n\t\t\t\t\t\t//Login correcto, obtenemos el código y nombre:\n\t\t\t\t\t\t$this->nombre=$fila[\"nombre\"];\n\t\t\t\t\t\t$this->url=$fila[\"url\"];\n\t\t\t\t\t}\n\t\t\t\t\t$this->mDatos->close();\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow $e;\n\t\t\t}\t\t\t\t\t\n\t\t}",
"public function getDsLogin()\n\t{\n\t\treturn $this->ds_login;\n\t}",
"public static function get($login) {\n\t\t\n\t\t// verification a faire\n\t\t$conn = Connection::get ();\n\t\t$result = array ();\n\t\t\n\t\t// requete sql preparé\n\t\t$request = $conn->prepare ( \"SELECT id_admin, identifiant_admin, mdp_admin, nom_admin, prenom_admin FROM admin WHERE identifiant_admin=:login\" );\n\t\t$request->execute ( array (\n\t\t\t\t'login' => $login \n\t\t) );\n\t\t\n\t\twhile ( $row = $request->fetch () ) {\n\t\t\t$result [] = $row;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"public function getUsersFromLog()\n\t{\n\t\t$select = parent::select()->from($this,array('username'=>'username'))\n\t\t->distinct()->order(array(\"username asc\"));\n\t\t$results = self::fetchAll($select)->toArray();\n\t\t$res = array();\n\t\t\n\t\treturn $results;\n\t}",
"function odbcadmin_list(){\n\t$sql = \"SELECT * FROM odbcadmin\";\n\t$results= sql($sql, \"getAll\", DB_FETCHMODE_ASSOC);\n\n\tforeach($results as $result){\n\t\t$odbc_records[] = array($result['id'],$result['dsname'],$result['username'],$result['password'],$result['dbtype']);\n\t}\n\treturn isset($odbc_records)?$odbc_records:null;\n}",
"public function getDebugUserAgents() {\n\t\t$sql = 'SELECT * FROM '.$this->tablePrefix.UserAgentThemeSwitcherData::USERAGENTS_TABLE;\n\t\t$results = $this->connection->get_results($sql);\n\n\t\treturn $results;\n\t}",
"function get_login_data($id, $ip_address)\n {\n // 1. Connect to the database.\n $link = connect();\n\n // 2. Protect variables to avoid any SQL injection\n $id = mysqli_real_escape_string($link, $id);\n $ip_address = mysqli_real_escape_string($link, $ip_address);\n\n // 3. Generate a query and return the result.\n $result = mysqli_query($link, \"\n SELECT\n a.id,\n a.email,\n b.name,\n b.surname,\n c.auth_code,\n c.expiration\n FROM\n tbl_users a\n LEFT JOIN\n tbl_user_details b\n ON\n a.id = b.user_id\n LEFT JOIN\n tbl_user_auth c\n ON\n a.id = c.user_id\n WHERE\n a.id = {$id} AND c.ip_address = '{$ip_address}'\n \");\n\n // 4. Disconnect from the database.\n disconnect($link);\n\n // 5. There should only be one row, or FALSE if nothing.\n return mysqli_fetch_assoc($result) ?: FALSE;\n }",
"public static function getConnexionData()\n {\n return SessionUser::getAll();\n }",
"function tenantlogin($username,$password)\n\t{\n\t\t$this->connectToDB();\n\t\t$sql=\"select * from \".DB_PREFIX.\"tanents WHERE `fld_number`='\".$username.\"' OR `fld_whatsapp_no`='\".$username.\"'\";\n\t\t//echo $sql;exit;\n\t\t$result=$this->CustomQuery($sql);\n\t\t$this->DBDisconnect();\n\t\t// print_r($result[0]['fld_is_current_tanent']);\n\t\t// \t\tdie;\n\t\tif($result[0])\n\t\t{\n\t\t\tif($result[0] && ifish_validatePassword($password, $result[0]['fld_password']))\n\t\t\t{\n\n\t\t\t\tif($result[0]['fld_is_current_tanent'] == 1)\n\t\t\t\t{\n\t\t\t\t\treturn $result[0];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn $result[0]['fld_is_current_tanent'] = 'blocked'; \n\t\t\t\t}\n\t\t\t}\t\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn array();\n\t\t\t}\t\t\n\t\t}\n\t}",
"public static function getUsers() {\n\t\t$res = self::$db->query(\"SELECT id, email, username, logins, last_login FROM `\".self::$users_tbl.\"` ORDER BY username\");\n\t\t$row = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\treturn $row;\n\t}",
"function login()\n{\n\tglobal $conf, $json, $resout, $db;\n\n\t$username = cRequest::any('_user');\n\t$password = cRequest::any('_pass');\n\t$p = $password;\n\n\t//die(\"_user: $username | _pass: $password\");\n\t\n\tif ((!$password) || (!$username)) {\n\t\t# XXX: Error page\n\t\tdie(\"Username and Password Required\");\n\t}\n\n\t$dbh = $db->open($conf['db']['host'], $conf['db']['user'],\n\t\t\t $conf['db']['passwd'], $conf['db']['name']);\n\n\t$uname = $db->secure($username);\n\t$passwd = sha1($password);\n\n\t$sql = \"select * from {$conf['tbl']['usermap']}\n\t\twhere username='$uname';\";\n\t$ret = $db->query($sql);\n\tif ($ret) {\n\t\t$res = $db->asfetch($ret);\n\t\t$uid = $res['uid'];\n\t\t$actype = $res['actype'];\n\t\tswitch($actype) {\n\t\tcase 'sa':\n\t\t\t$sql = \"select * from {$conf['tbl']['login']}\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tcase 'a':\n\t\t\t$sql = \"select * from {$conf['tbl']['shopinfo']}\n\t\t\t\tleft join {$conf['tbl']['login']} \n\t\t\t\ton({$conf['tbl']['shopinfo']}.sid = \n\t\t\t\t{$conf['tbl']['login']}.uid )\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tcase 'u':\n\t\t\t$sql = \"select * from {$conf['tbl']['profile']}\n\t\t\t\tleft join {$conf['tbl']['login']} \n\t\t\t\ton({$conf['tbl']['profile']}.uid = \n\t\t\t\t{$conf['tbl']['login']}.uid )\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t/* XXX: ERROR */\n\t\t\tdie(\"[!] Error: No account with Username $uname\");\n\t\t\t/* NOTREACHED */\n\t\t}\n\n\t\t# cmp passwd\n\t\tif ($passwd != $res['passwd']) {\n\t\t\tprint_r($res);\n\t\t\tprint \"Passwords don't match[$passwd | {$res['passwd']}]\";\n\t\t\texit();\n\t\t}\n\n\t\t# get last login\n\t\t$sqll = \"select * from loginhistory where uid='$uid'\";\n\t\t$retl = $db->query($sqll);\n\t\t$resl = $db->asfetch($retl);\n\n\t\t# set up session data\n\t\t$sess = new cSession;\n\t\t$datetime = date('Y/m/d H:i:s');\n\t\t$lastip = cIP::getusrip();\n\t\t$location = cIP::getusrcountry($lastip); # FIXME: need to add ip2ctry dir\n\t\tif (isset($location['country_name'])) {\n\t\t\t$location = $location['country_name'];\n\t\t} else {\n\t\t\t$location = \"Unknown\";\n\t\t}\n\n\t\tif (preg_match('/1996\\/09\\/26 16:00:00/', $resl['lastlogin'], $match)) {\n\t\t\t$ll = $datetime;\n\t\t} else {\n\t\t\t$ll = $resl['lastlogin'];\n\t\t}\n\n\t\tif (preg_match('/0\\.0\\.0\\.0/', $resl['lastip'], $match)) {\n\t\t\t$lip = $lastip;\n\t\t} else {\n\t\t\t$lip = $resl['lastip'];\n\t\t}\n\n\t\t$sess->set('uid', $res['uid']);\n\t\t$sess->set('uname', $username);\n\t\t$sess->set('actype', $actype);\n\t\tif ($actype == 'u') {\n\t\t\t$sess->set('fname', $res['fname']);\n\t\t\t$sess->set('email', $res['email']);\n\t\t}\n\t\tif ($actype == 'a') {\n\t\t\t$sess->set('sname', $res['sname']);\n\t\t\t$sess->set('email', $res['email']);\n\t\t}\n\n\t\t$sess->set('lastlogin', $ll);\n\t\t$sess->set('lastip', $lip);\n\n\t\t# XXX: update login history\n\t\t$sql = \"update {$conf['tbl']['loginhistory']} set lastlogin='$datetime',\n\t\t\tlastip='$lastip', lastlocation='$location'\n\t\t\twhere uid='$uid';\";\n\t\t$db->query($sql);\n\n\t\t$db->close($dbh);\n\t\tunset($db);\n\t\tunset($sess);\n\n\t\theader(\"Location: dashboard.php\");\n\t\texit();\n\t} else {\n\t\t# XXX: Error page\n\t\tdie(\"[!] Fatal Error: No account with Username '$uname'\");\n\t\t/* NOTREACHED */\n\t}\n}",
"public function getAllUsers() {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new SecurityDAO($dbObj);\n return $this->DAO->getAllUsers();\n }",
"public function databases()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/databases');\n }",
"function allAdmin(){\n \t$con = new mysqli('localhost','heng','@powell135','200ok');\n \tif ($con -> connect_errno){\n \t\treturn CONNECTION_FAIL;\n \t}\n\t$permission = ADMIN;\n \t$query = \"select lastLogin, username, email, suspended, lastUpdate from jnjn_user where permission = '$permission'\";\n \t$result = $con -> query($query);\n \t$users = array();\n \twhile($row = mysqli_fetch_array($result)){\n\t\t$users[] = new User($row['username'],$row['email'],$row['lastLogin'],$row['suspended'],$row['lastUpdate']);\n \t}\n \t$result -> close();\n \treturn $users;\n }",
"function userconnection_get_site_settings() {\r\n\tglobal $database;\r\n\t$row = $database->database_query(\"SELECT * FROM userconnection_settings\");\r\n\t$result = $database->database_fetch_assoc($row);\r\n\treturn $result;\r\n}",
"function consult_login($dato){\n\t\t// se crean las variables que tentran la data correspondiente en la posicion que esta cada uno de estos datos\n\t\t$cedula=strip_tags($dato[0]);\n\t\t$contrasena=strip_tags($dato[1]);\n\t\t//se crea una variable que instancia la clase que coneccion a la base de datos\n\t\t$mysqli = new conect_database();\n\t\t// se rea una variable que sea igual a la variable que instancio la clase anterior y se realiza una respectiva consulta y se le mandan los respectivos datos\n\t\t$query = $mysqli->prepare(\"select id_usuarios,nombre_usuario,tipo_usuario from t_usuarios where usuario='\".$cedula.\"' and contrasena='\".$contrasena.\"'\");\n\t\t// se ejecuta lo que esta dentro de la variable anterior \n\t\t$query->execute();\t\n // se llama la una de las variables privadas que se crearon al principio y esta va a ser igual a la variable que contiene los datos de la consulta uy se obtienen los datos con get_result();\n\t\t$this->consult=$query->get_result();\n // se creaun bucle que es igual a data que sea igual al metodo inbocado en este caso la variable que contiela los datos de la consulta y se obtiene una colunma o un array (los datos)\n\t\twhile ($data=$this->consult->fetch_row()) {\n // llamamos a la otra variable privada que sera un array y contendra los datos\n\t\t\t$this->dataAll[]=$data;\n\n\t\t}\n // retornamos los datos \n\t\treturn $this->dataAll;\n\t}",
"public function getUsers()\n\t{\n\t\t$insert = $this->inject();\n\t\t$injectURL = $this->url . $insert . 'user%2c password from users%23&Submit=Submit#';\n\t\treturn $injectURL;\n\t}",
"function getUsers1(){\n\t\t$con = $this->con();\t\n\t\tif (!$con) {\n\t\t\t$e = oci_error();\n\t\t\ttrigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);\n\t\t}\t\t\n\t\t$res='';\n\t\t$sql = 'select username, password from dba_users';\n\t\t$stid = oci_parse($con, $sql);\n\t\toci_execute($stid);\n\t\t$res = '';\n\t\twhile ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) {\n\t\t\t$res[] = $row;\n\t\t}\n\t\toci_close($con);\n\t\treturn $res;\n\t}",
"function get_admin_list()\r\n {\r\n $result = array();\r\n $this->db->select('login');\r\n $this->db->distinct();\r\n $this->db->order_by('login');\r\n $query = $this->db->get(db_prefix.'Admins');\r\n $result[] = 'UNDEFINED';\r\n foreach ($query->result_array() as $row)\r\n {\r\n $result[] = $row['login'];\r\n }\r\n return $result;\r\n }",
"function get_connected_users() {\n global $DB;\n $users = $DB->get_records('report_user_statistics');\n return $users;\n}",
"function GetTousLesUtilisateurs()\n{\n\tglobal $bdd;\n\t$i = 0;\n\t$rep = $bdd -> query(\"SELECT login FROM UTILISATEUR\");\n\twhile ($don = $rep->fetch())\n\t{\n\t\t$login[$i] = $don['login'];\n\t\t$i++;\n\t}\n\t$rep->closeCursor();\n\treturn $login;\n}",
"public function listDatabases(){\n\t\treturn $this->instance->listDatabases();\n\t}",
"public function getSitesList()\n {\n return Db::fetchAll(\"SELECT idsite, name\"\n . \"\\n FROM \" . Common::prefixTable('site')\n . \"\\n ORDER BY idsite\");\n }",
"public static function getList(){\n\t\t$sql = new sql();\n\n\t\treturn $sql->select(\"SELECT * FROM usuarios ORDER BY email;\");\n\n\t}",
"public static function getLogin()\n {\n // Подключаемся к БД.\n $db = Db::getConnection();\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n try{\n $newList = array();\n $i = 0; $c = 0; $f = 0;\n\n $result = $db->prepare('SELECT id, name FROM user_type');\n $result->execute();\n\n $result1 = $db->prepare('SELECT id, country_name FROM countries');\n $result1->execute();\n\n $result2 = $db->prepare('SELECT id, or_name FROM orientation');\n $result2->execute();\n\n if($result2->rowCount() > 0) {\n while ($row = $result2->fetch(PDO::FETCH_OBJ)) {\n /*its getting data in line.And its an object*/\n $newList[2][$f]['or_id'] = $row->id;\n $newList[2][$f]['or_name'] = $row->or_name;\n $f++;\n }\n }\n\n if($result1->rowCount() > 0) {\n while ($row = $result1->fetch(PDO::FETCH_OBJ)) {\n /*its getting data in line.And its an object*/\n $newList[1][$c]['c_id'] = $row->id;\n $newList[1][$c]['c_name'] = $row->country_name;\n $c++;\n }\n }\n\n if($result->rowCount() > 0) {\n while ($row = $result->fetch(PDO::FETCH_OBJ)) {\n /*its getting data in line.And its an object*/\n $newList[0][$i]['id'] = $row->id;\n $newList[0][$i]['name'] = $row->name;\n $i++;\n }\n }\n\n return $newList;\n }\n catch (PDOexception $e) {\n\n echo \"Error is \".$e->getmessage();\n\n }\n }",
"function getLoggedInAdminId(){\r\n $query = \"SELECT * FROM admins WHERE email='\" . getSessionUsername() . \"';\";\r\n $result = performSingleDbQueryGetRow($query);\r\n return $result['id'];\r\n}",
"public static function getList(){\n\t\t\t$sql = new sql();\n\n\t\t\treturn $sql->select(\"SELECT * FROM tb_usuarios ORDER BY deslogim\");\n\t\t}",
"public function getLoggedInHostId();",
"function get_db_session_data()\r\n\t{\r\n\t\t$query = $this->db->select('user_data')->get('ci_sessions');\r\n\t\t$user = array(); /* array to store the user data we fetch */\r\n\t\tforeach ($query->result() as $row)\r\n\t\t{\r\n\t\t $udata = unserialize($row->user_data);\r\n\t\t /* put data in array using username as key */\r\n\t\t $user['user_name'] = $udata['user_name']; \r\n\t\t $user['is_logged_in'] = $udata['is_logged_in']; \r\n\t\t}\r\n\t\treturn $user;\r\n\t}"
] | [
"0.640631",
"0.63273567",
"0.6290196",
"0.6236416",
"0.6202877",
"0.6177106",
"0.6172728",
"0.61563194",
"0.6151138",
"0.60453916",
"0.59426236",
"0.58589494",
"0.5769733",
"0.57232827",
"0.5663981",
"0.5657273",
"0.55869484",
"0.55720323",
"0.5543278",
"0.55284494",
"0.5523941",
"0.5499354",
"0.5467246",
"0.5450024",
"0.54457957",
"0.54397494",
"0.5353638",
"0.5353638",
"0.5353638",
"0.5344078",
"0.53435063",
"0.5342824",
"0.53097165",
"0.52984035",
"0.528969",
"0.5285887",
"0.5271071",
"0.52566606",
"0.5255372",
"0.5243661",
"0.5236243",
"0.5236117",
"0.52180517",
"0.5204031",
"0.5192793",
"0.51895",
"0.5181271",
"0.51702857",
"0.5167843",
"0.51573837",
"0.51522946",
"0.514871",
"0.51458883",
"0.51420563",
"0.5141502",
"0.5129379",
"0.51270294",
"0.5126248",
"0.5122109",
"0.511981",
"0.5112188",
"0.51084244",
"0.51067275",
"0.5104027",
"0.50947446",
"0.5074272",
"0.5062822",
"0.50603694",
"0.5059125",
"0.50536263",
"0.5052406",
"0.50498855",
"0.5048687",
"0.50455034",
"0.50391215",
"0.50380903",
"0.5029217",
"0.5027834",
"0.5021465",
"0.50140154",
"0.5010822",
"0.5009035",
"0.5003491",
"0.49944523",
"0.49815318",
"0.4969432",
"0.49677292",
"0.49662635",
"0.49603888",
"0.49599895",
"0.49597633",
"0.49597493",
"0.49553907",
"0.49503684",
"0.4944507",
"0.49423712",
"0.49371",
"0.49309257",
"0.49294224",
"0.4928462"
] | 0.58009756 | 12 |
Returns database login details | public function getDBDetails($domain_id, $dbnum)
{
$group = "database" . $dbnum;
$sth = self::getConnection()->prepare(
"SELECT `name`,`value` FROM `data` WHERE `domain`=:id AND `group` LIKE :group ORDER BY `name` ASC"
);
$sth->bindValue(":id", $domain_id, PDO::PARAM_INT);
$sth->bindValue(":group", $group, PDO::PARAM_STR);
$sth->execute();
$result = $sth->fetchAll(PDO::FETCH_KEY_PAIR);
if(!$result){
return $result;
}
return array(
'id' => $dbnum,
'group' => $group,
'domain' => $domain_id,
'Hostname' => $result['Hostname'],
'Username' => $result['Username'],
'Password' => $result['Password'],
'Database' => $result['Database'],
'URL' => $result['URL'],
'dbtype' => $result['Database Type'],
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static public function getLogin() {\n //resultat : chaîne de caractère qui correspond au login \n return self::$databases['login'];\n }",
"public function getDsLogin()\n\t{\n\t\treturn $this->ds_login;\n\t}",
"private function getLoginInfos()\r\n\t\t{\t\r\n\t\t\t$request = \"SELECT * FROM `bpcms_users` WHERE Username='\".$this->logInfos['username'].\"'\";\r\n\t\t\t$request = mysql_query($request);\r\n\t\t\t$result = mysql_fetch_assoc($request);\r\n\t\t\t\r\n\t\t\treturn $result;\r\n\t\t}",
"public function info_login()\r\n\t{ \r\n\t\treturn $this->login;\r\n\t}",
"public function getUserLogin() {\n\t\treturn $this->_userLogin;\n\t}",
"public function getUserLogin()\n {\n return $this->userLogin;\n }",
"public function getLogin();",
"public function getLogin();",
"public function getLogin();",
"public function getLogin()\n {\n return $this->__get(\"login\");\n }",
"public function get_login() \n {\n return $this->login;\n }",
"public function get_login_info() {\r\n\t\t// Get user from cached data or from access token\r\n\t\t$user = $this->getUser ();\r\n\t\t\r\n\t\t// If there's bd_sig & bd_user parameter in query parameters,\r\n\t\t// it must be an inside web app(app on baidu) loading request,\r\n\t\t// then we must check whether the uid passed from baidu is the\r\n\t\t// same as we get from persistent data or from access token, \r\n\t\t// if it's not, we should clear all the persistent data and to \r\n\t\t// get an access token again.\r\n\t\tif (isset ( $_REQUEST ['bd_sig'] ) && isset ( $_REQUEST ['bd_user'] )) {\r\n\t\t\t$sig = self::generateSign ( array ('bd_user' => $_REQUEST ['bd_user'] ), $this->apiSecret, 'bd_sig' );\r\n\t\t\tif ($sig != $_REQUEST ['bd_sig'] || $user ['uid'] != $_REQUEST ['bd_user']) {\r\n\t\t\t\t$this->store->remove ( 'session' );\r\n\t\t\t}\r\n\t\t}\r\n\t\t$user = $this->user_data_format($user);\r\n\t\treturn $user;\r\n\t}",
"public function getLogin(){\n $statement = \"SELECT * FROM conf_usuario WHERE username=:Username and pass=:Pass and estado=1\";\n $sql = MainModel::getConection()->prepare($statement);\n $sql->bindParam(\":Username\",$this->getUsername());\n $sql->bindParam(\":Pass\",$this->getPass());\n $sql->execute();\n return $sql;\n }",
"public function getLogin()\n {\n return $this->Login;\n }",
"public function getStoredLogin(): string\n {\n return $this->login;\n }",
"function LoggedIn() {\n\t\treturn $this->Get('UserDetails');\n\t}",
"function get_database_user()\n\t{\n\t\treturn ($this -> database_user);\n\t}",
"function get_userdatabylogin($user_login)\n {\n }",
"public function getLogin()\n {\n return $this->login;\n }",
"public function getLogin()\n {\n return $this->login;\n }",
"public function getLogin()\n {\n return $this->login;\n }",
"public function getLogin()\n {\n return $this->login;\n }",
"public function getLogin()\n {\n return $this->login;\n }",
"public function getLogin()\n {\n return $this->login;\n }",
"public function getLogin()\n {\n return $this->login;\n }",
"public function getLogin()\n {\n return $this->login;\n }",
"public function getLogin()\n {\n return $this->login;\n }",
"public function getDatabaseUsername()\n {\n return $this->settings['db_username'];\n }",
"public function password() {\n return $this->db['password'];\n }",
"function get_database_password()\n\t{\n\t\treturn ($this -> database_password);\n\t}",
"function getUserDetails(){\n if(empty($this->userid)){\n return null;\n } \n $userDetailsQuery = \"SELECT * FROM da_userMaster WHERE da_userMaster.username = '$this->userid'\"; \n $dbqry = new dbquery($userDetailsQuery, $this->connid);\n $user = $dbqry->getrowassocarray();\n return $user;\n }",
"public function getLogin()\n\t{\n\t\treturn $this->login;\n\t}",
"public function getLogin()\n\t{\n\t\treturn $this->login;\n\t}",
"function getLogin() {\n return $this->login;\n }",
"public function getLogin()\n {\n return $this->_login;\n }",
"public function getLogin()\n {\n return $this->_login;\n }",
"public function login_title(){\n\t\tglobal $con;\n\n\t\t$info=array();\n\t\t$query=\"SELECT * FROM system WHERE 1\";\n\t\t$info=$this->select($con,$query);\n\n\t\treturn $info;\n\t}",
"public function getForLogin()\n\t{\n##if @BUILDER.strLoginTableConnectionID.len##\n\t\treturn $this->byId( \"##@BUILDER.strLoginTableConnectionID s##\" );\n##else##\t\t\n\t\treturn $this->getDefault();\n##endif##\n\t}",
"public function getPassword_login()\n {\n return $this->password_login;\n }",
"public function getAuth()\n {\n $db = new db(self::db_auth);\n return unserialize($db->getAuth());\n\n }",
"function getDbCredentials()\n{ \n return getSettings()['database'];\n}",
"function credentials() {\n\t\t return array(PHPLM_DBHOST, PHPLM_DBUSER, PHPLM_DBPASS);\n\t\t}",
"function login()\n{\n\tglobal $conf, $json, $resout, $db;\n\n\t$username = cRequest::any('_user');\n\t$password = cRequest::any('_pass');\n\t$p = $password;\n\n\t//die(\"_user: $username | _pass: $password\");\n\t\n\tif ((!$password) || (!$username)) {\n\t\t# XXX: Error page\n\t\tdie(\"Username and Password Required\");\n\t}\n\n\t$dbh = $db->open($conf['db']['host'], $conf['db']['user'],\n\t\t\t $conf['db']['passwd'], $conf['db']['name']);\n\n\t$uname = $db->secure($username);\n\t$passwd = sha1($password);\n\n\t$sql = \"select * from {$conf['tbl']['usermap']}\n\t\twhere username='$uname';\";\n\t$ret = $db->query($sql);\n\tif ($ret) {\n\t\t$res = $db->asfetch($ret);\n\t\t$uid = $res['uid'];\n\t\t$actype = $res['actype'];\n\t\tswitch($actype) {\n\t\tcase 'sa':\n\t\t\t$sql = \"select * from {$conf['tbl']['login']}\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tcase 'a':\n\t\t\t$sql = \"select * from {$conf['tbl']['shopinfo']}\n\t\t\t\tleft join {$conf['tbl']['login']} \n\t\t\t\ton({$conf['tbl']['shopinfo']}.sid = \n\t\t\t\t{$conf['tbl']['login']}.uid )\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tcase 'u':\n\t\t\t$sql = \"select * from {$conf['tbl']['profile']}\n\t\t\t\tleft join {$conf['tbl']['login']} \n\t\t\t\ton({$conf['tbl']['profile']}.uid = \n\t\t\t\t{$conf['tbl']['login']}.uid )\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t/* XXX: ERROR */\n\t\t\tdie(\"[!] Error: No account with Username $uname\");\n\t\t\t/* NOTREACHED */\n\t\t}\n\n\t\t# cmp passwd\n\t\tif ($passwd != $res['passwd']) {\n\t\t\tprint_r($res);\n\t\t\tprint \"Passwords don't match[$passwd | {$res['passwd']}]\";\n\t\t\texit();\n\t\t}\n\n\t\t# get last login\n\t\t$sqll = \"select * from loginhistory where uid='$uid'\";\n\t\t$retl = $db->query($sqll);\n\t\t$resl = $db->asfetch($retl);\n\n\t\t# set up session data\n\t\t$sess = new cSession;\n\t\t$datetime = date('Y/m/d H:i:s');\n\t\t$lastip = cIP::getusrip();\n\t\t$location = cIP::getusrcountry($lastip); # FIXME: need to add ip2ctry dir\n\t\tif (isset($location['country_name'])) {\n\t\t\t$location = $location['country_name'];\n\t\t} else {\n\t\t\t$location = \"Unknown\";\n\t\t}\n\n\t\tif (preg_match('/1996\\/09\\/26 16:00:00/', $resl['lastlogin'], $match)) {\n\t\t\t$ll = $datetime;\n\t\t} else {\n\t\t\t$ll = $resl['lastlogin'];\n\t\t}\n\n\t\tif (preg_match('/0\\.0\\.0\\.0/', $resl['lastip'], $match)) {\n\t\t\t$lip = $lastip;\n\t\t} else {\n\t\t\t$lip = $resl['lastip'];\n\t\t}\n\n\t\t$sess->set('uid', $res['uid']);\n\t\t$sess->set('uname', $username);\n\t\t$sess->set('actype', $actype);\n\t\tif ($actype == 'u') {\n\t\t\t$sess->set('fname', $res['fname']);\n\t\t\t$sess->set('email', $res['email']);\n\t\t}\n\t\tif ($actype == 'a') {\n\t\t\t$sess->set('sname', $res['sname']);\n\t\t\t$sess->set('email', $res['email']);\n\t\t}\n\n\t\t$sess->set('lastlogin', $ll);\n\t\t$sess->set('lastip', $lip);\n\n\t\t# XXX: update login history\n\t\t$sql = \"update {$conf['tbl']['loginhistory']} set lastlogin='$datetime',\n\t\t\tlastip='$lastip', lastlocation='$location'\n\t\t\twhere uid='$uid';\";\n\t\t$db->query($sql);\n\n\t\t$db->close($dbh);\n\t\tunset($db);\n\t\tunset($sess);\n\n\t\theader(\"Location: dashboard.php\");\n\t\texit();\n\t} else {\n\t\t# XXX: Error page\n\t\tdie(\"[!] Fatal Error: No account with Username '$uname'\");\n\t\t/* NOTREACHED */\n\t}\n}",
"public function user(){\r\n if (!$this->isLogged()){\r\n return false;\r\n }\r\n return $_SESSION['dbauth'];\r\n }",
"public function getLogin () {\n if ($this->donnees !== null and key_exists(self::LOGIN_REF, $this->donnees)) {\n return $this->donnees[self::LOGIN_REF];\n } else {\n return \"\";\n }\n }",
"function login(){\n\t\t$apikey = $this->get_api_key();\n\t\t$apisecret = $this->get_api_secret();\n\t\t$authorization = $this->get_authorization();\n\t\t$user = new \\gcalc\\db\\api_user( $apikey, $apisecret, $authorization );\n\t\tif ( $user->login() ) {\n\t\t\t$credetials = $user->get_credentials();\t\t\t\t\n\t\t} else {\n\t\t\t$credetials = array(\n\t\t\t\t'login' => 'anonymous',\n\t\t\t\t'access_level' => 0\n\t\t\t);\n\t\t}\n\t\treturn $credetials;\n\t}",
"function login() {\n\t $login_parameters = array(\n\t\t \"user_auth\" => array(\n\t\t \"user_name\" => $this->username,\n\t\t \"password\" => $this->hash,\n\t\t \"version\" => \"1\"\n\t\t ),\n\t\t \"application_name\" => \"mCasePortal\",\n\t\t \"name_value_list\" => array(),\n\t );\n\n\t $login_result = $this->call(\"login\", $login_parameters);\n\t $this->session = $login_result->id;\n\t return $login_result->id;\n\t}",
"public function login_user_info($username)\n {\n return $this->db\n ->columns('*')\n ->from('users')\n ->where('username = ?')\n ->select([$username]);\n }",
"public function authentication() {\n return $this->username() . ':' . $this->password();\n }",
"public function getDbUser()\n\t{\n\t\treturn $this->db_user;\n\t}",
"public function getDbPassword()\n\t{\n\t\treturn $this->db_password;\n\t}",
"public static function login($username, $password)\r\n {\r\n\t\t//\\Config::load('db', true);\r\n\t\t//$active_db = \\Config::get('db.active');\r\n\t\t//print_r($active_db); \r\n\t\t$call_to_db = \\quotes\\Model_Quote::get_nmi_section($username, $password);exit;\r\n\t\t$sql\t=\t\"SELECT EM1_Username, EM1_EmployeeID_pk from t_Employee1, EM1_Password where EM1_Username = ? and EM1_Password = ?\";\r\n $sql = \\NMI::Db()->prepare($sql);\r\n\t\tprint_r($sql);log::error($sql); \r\n\t\t\r\n $stmt->execute(array($username,$password));\r\n $meta = $stmt->fetch();\r\n print_r($meta);exit;\r\n foreach ($meta as $u)\r\n {\r\n $user_id = $u['EM1_EmployeeID_pk'];\r\n $user_name = $u['EM1_Username'];\r\n\t\t $password = $u['EM1_Password'];\r\n }\r\n\t\t\r\n \\Session::set('user_id', $user_id);\r\n\t\t\\Session::set('username', $username);\r\n\t\t\\Session::set('password', $password);\r\n\t\t\\Session::set('authed', 'validated');\r\n\t\t\r\n\t\tif(count($user>0)){return 1;}else{return 0;}\r\n }",
"public function getLogin()\n {\n return $this->email;\n }",
"public function getDatabasePassword()\n {\n return $this->settings['db_password'];\n }",
"public static function info()\n {\n $database = Config::get('database.database');\n $host = Config::get('database.host');\n $username = Config::get('database.username');\n //\n return \"\\n\\n-- Database : $database\\n-- Host : $host\\n-- User : $username\\n\";\n }",
"function login() {\n $username = Slim::getInstance()->request()->post('username');\n $password = Slim::getInstance()->request()->post('password');\n\n try {\n $db = getConnection();\n\n\t$sql = \"SELECT userId FROM users WHERE username=:username\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->bindParam(\"username\", $username);\n\t$stmt->execute();\n\t$username_test = $stmt->fetchObject();\n\tif(empty($username_test)) {\n\t\techo \"error_username_doesnt_exists\";\n\t\treturn;\n\t}\n\n\t$sql = \"SELECT password FROM users WHERE username=:username\";\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"username\", $username);\n $stmt->execute();\n $storedPassword = $stmt->fetchObject()->password;\n\n if(empty($storedPassword)) {\n echo \"null\";\n } else if(strcmp($password, $storedPassword) == 0) {\n\t\t $query = \"SELECT userId FROM users WHERE username=:username\";\n\t\t $stmt2 = $db->prepare($query);\n\t\t $stmt2->bindParam(\"username\", $username);\n\t\t $stmt2->execute();\n \t echo '{\"Username\": \"' . $username . '\", \"ID\": ' . $stmt2->fetchObject()->userId . '}'; \n } else {\n\t\techo \"null\";\n\t}\n\n $db = null;\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n }\n}",
"public function getDatabaseInfo();",
"public function getAllFromLogin()\n {\n $sql = \"SELECT * FROM login;\";\n $res = $this->db->executeFetchAll($sql);\n\n return $res;\n }",
"public function getLoginName()\n {\n return $this->loginName;\n }",
"public function read_credentials(){\n $query='SELECT * FROM '.$this->table.' WHERE name=? and password=?';\n\n $stmt = $this->conn->prepare($query);\n\n \n $stmt->bindparam(1,$this->name);\n $stmt->bindparam(2,$this->password);\n\n $stmt->execute();\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n $this->name=$row['name'];\n $this->email=$row['email'];\n $this->status=$row['status'];\n\n if($stmt->execute()) {\n return true;\n }\n \n // Print error \n printf(\"Error: %s.\\n\", \"invalid user\");\n \n return false;\n \n \n }",
"private static function getUserFromDb($login, $password, $authKey = null) {\n $result = null;\n \n $dbResult = System::database()->query('select u.*\n from :table_users u \n where u.`login` = :login \n and u.`password` = :password');\n \n if($authKey) {\n $dbResult->appendQuery('and u.`auth_key` = :auth_key\n and u.`auth_expire` >= UNIX_TIMESTAMP()');\n $dbResult->bindValue(':auth_key', $authKey); \n }\n \n $dbResult->bindTable(':table_users', TABLE_USERS);\n $dbResult->bindValue(':login', $login);\n $dbResult->bindValue(':password', $password);\n \n $dbResult->execute();\n if(System::database()->isError()) {\n throw new Exception(System::database()->getError());\n }\n \n if($dbResult->numberOfRows() > 0) {\n $roles = UserRoles::getInstance();\n $result = $dbResult->toArray();\n $result['role'] = $roles->getRole($dbResult->valueInt('role_id'));\n }\n return $result;\n }",
"function user_details() {\r\n\t\t\t$query = $this->pdo->prepare(\"select * from user_account\");\r\n\t\t\t$query->execute();\r\n\t\t\treturn $query->fetchAll();\r\n\t\t}",
"function doLogin()\n {\n\n //var_dump($sql);exit;\n /*if($res){*/\n //存入session\n /*session_start();\n $_SESSION['user'] = json_encode($res);*/\n\n //展示数据库\n $sql = 'show databases;';\n $res = $GLOBALS['data']->query($sql)->fetchAll();\n foreach ($res as $k=>$v){\n $res[$k] = $v['Database'];\n }\n //var_dump($res);exit;\n\n include \"views/homePage.html\";\n /*}*/\n }",
"public function getLogin()\n {\n return Mage::getStoreConfig('smsnotifier/main_conf/apilogin');\n\n }",
"function login($username) {\n $conn = database::getDB();\n $pass;\n $sql = \"SELECT password FROM admin WHERE email = '\" . $username . \"'\";\n $result = $conn->query($sql);\n while ($row = $result->fetch_assoc()) {\n $pass = $row['password'];\n }\n return $pass;\n }",
"public function getDbUsername(): string\n {\n return (string) Config::get('DB_USERNAME');\n }",
"public function username()\n {\n return backpack_authentication_column();\n }",
"function get_LastLoginDetails($usr, $pwd)\n {\n $sql = \"SELECT * FROM hisusers WHERE username= ? and password= ? \";\n $qry = $this->db->query($sql, array($usr, $pwd));\n // $query = $this->db->query($sql);\n $result = $qry->result();\n// $result = $ndb->query($sql);\n return $result;\n }",
"static function getLogin(&$rsData)\n {\n return $rsData['login'];\n }",
"public function login( )\n\t\t{\n\t\t\treturn $this->get_session();\n\t\t}",
"public function username() {\n return $this->db['username'];\n }",
"public function getDBPassword(){\n\n\t\treturn $this->_password;\n\t}",
"function external_db_show_password_fields()\n{\n return 0;\n}",
"public function getUserLogin() {\n\t\t$default = new Zend_Session_Namespace ( 'default' );\n\t\tif ($default->userLogin)\n\t\t\treturn $default->userLogin;\n\t\telse\n\t\t\treturn null;\n\t}",
"public function getDbPassword(): string\n {\n return (string) Config::get('DB_HOST');\n }",
"public function get_login_data()\n\t{\n\t\tthrow new steam_exception( $this->get_login_user_name(), \"Error: get_login_data is not available using steam_connector_lite\", 980 );\n\t}",
"public function getUserInfo()\n {\n\n if (empty($this->_user))\n return '';\n\n $userInfo = $this->_user;\n\n if (!empty($this->_password))\n $userInfo .= \":{$this->_password}\";\n\n return $userInfo;\n }",
"public function getLoginDetails(string $username)\n {\n $result = [];\n\n $this->logger->info('Database Login Details Requested', ['username' => $username]);\n\n $query = $this->queries->getUserLoginData($username);\n if ($query)\n {\n $queryResult = $this->dbWrapper->executeAndFetch($query);\n $result = $queryResult ?? [];\n } else {\n $this->errors['database'] = 'Database connection couldn\\'t be established, please try again later!';\n }\n\n return $result;\n }",
"function getUser(){\n $db=new connect();\n $select=\"select * from users\";\n return $db->getList($select);\n }",
"public function loginUser()\n {\n $sql = \"SELECT * FROM user WHERE username=\\\"\" . $this->getUsername().\"\\\" AND password=\\\"\" . $this->getPassword().\"\\\"\";\n $result = mysqli_query($this->_connection, $sql);\n if (!$result) {\n print \"Error: \" . $result . \"<br>\" . mysqli_error($this->_connection);\n } else {\n while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) if ($row) {\n return $row;\n }\n }\n }",
"function cek_login($table,$where){\n\t\treturn $this->db->get_where($table,$where); //cek database\n\t}",
"public function getByUsernamePass()\n {\n $sth = $this->db->prepare(\"SELECT id FROM \" . static::tableName() . \" WHERE\n\t\t\t\tusername = :username AND password = MD5(:password)\");\n $sth->execute(array(\n ':username' => $this->username,\n ':password' => $this->password\n ));\n $data = $sth->fetch();\n return $data;\n }",
"function getUser() {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'username', 1 => 'title', 2 => 'first_name', 3 => 'last_name', 4 => 'password', 5 => 'contactemail', 6 => 'contacttelephone', 7 => 'newsletter', 8 =>'pcode', 9 => 'store_owner', 10 => 'house', 11 => 'street', 12 => 'town', 13 => 'county', 14 => 'geolong', 15 => 'geolat', 16 => 'avatar', 17 => 'mobile', 18 => 'optout');\n $idfields = array(0 => 'id');\n $idvals = array(0 => $this->ID);\n $rs = $DBA->selectQuery(DBUSERTABLE, $fields, $idfields, $idvals);\n\n if (!isset($rs[2]))\n {\n while ($res = mysql_fetch_array($rs[0]))\n {\n $this->setUserVar('Username', $res['username']);\n $this->setUserVar('Title', $res['title']);\n $this->setUserVar('FirstName', $res['first_name']);\n $this->setUserVar('LastName', $res['last_name']);\n $this->setUserVar('ContactEmail', $res['contactemail']);\n $this->setUserVar('ContactTelephone', $res['contacttelephone']);\n $this->setUserVar('NewsletterSubscriber', $res['newsletter']);\n $this->setUserVar('Area', $res['pcode']);\n $this->setUserVar('StoreOwner', $res['store_owner']);\n $this->setUserVar('House', $res['house']);\n $this->setUserVar('Street', $res['street']);\n $this->setUserVar('Town', $res['town']);\n $this->setUserVar('County', $res['county']);\n $this->setUserVar('PCode', $res['pcode']);\n $this->setUserVar('Long', $res['geolong']);\n $this->setUserVar('Lat', $res['geolat']);\n $this->setUserVar('Avatar', $res['avatar']);\n $this->setUserVar('Mobile', $res['mobile']);\n $this->setUserVar('DMOptOut', $res['optout']);\n $this->formatAddress();\n $this->formatEmail();\n if ($this->Lat == '')\n {\n $this->GeoLocate();\n }\n }\n }\n }",
"function auth_login($db, $str_username, $str_password)\r\r\n{\r\r\n $result_user = func_db_query($db, 'SELECT user_id FROM @TABLE_PREFIX@nx3_user WHERE username = ? AND password = MD5(?)',\r\r\n array('ss', $str_username, $str_password));\r\r\n if (isset($result_user[0]) && $result_user[0]['user_id'] != '')\r\r\n {\r\r\n $user_id = $result_user[0]['user_id'];\r\r\n $_SESSION['NX3_AUTHENTICATED'] = 'Y';\r\r\n auth_retrieve_user_properties($db, $user_id);\r\r\n log_message($db, __FILE__, 4, 'Logging user IN - user_id = ' . $user_id);\r\r\n }\r\r\n else\r\r\n {\r\r\n // Log user out, set user to 'guest'\r\r\n log_message($db, __FILE__, 5, 'User authentication Failed, username = \"' . $str_username . '\"');\r\r\n auth_logout($db);\r\r\n }\r\r\n}",
"public function getSessionInfo()\n {\n return $this->execute('user/session', 'GET');\n }",
"public function cekLogin($data) {\r\n\t\t\t$query=\t$this->db->query(\"select * from ms_user where user_name='\".$data['username'].\"' and password='\".$data['password'].\"'\");\r\n return $query;\r\n }",
"public function providerLogin()\n {\n return $this->authRepo->providerLogin();\n }",
"public function getUserIdentifier(): string\n {\n return (string) $this->login;\n }",
"public function getLogData(){\n\t\treturn substr($this->getUsername(),0,50);\n\t}",
"public function login();",
"public function login();",
"protected function fetchUserSessionFromDB() {}",
"public function connectionUser($login, $password)\n {\n $dbName = $this->dbConnect();\n $user = $dbName->prepare(\"SELECT login, password,mail,admin FROM user WHERE login=:login AND password=:password\");\n $user->bindValue(\":login\", $login, PDO::PARAM_STR);\n $user->bindValue(\":password\", $password, PDO::PARAM_STR);\n $user->execute();\n return $user;\n }",
"public function readUserAuth(){\n $user = new \\Filebase\\Database([\n 'dir' => $this->getDataSource()\n ]);\n\n if ($user->has($this->username)) {\n $item = $user->get($this->username);\n $data = [\n 'result' => $item->auth,\n 'attribute' => [\n 'username' => $this->username\n ],\n 'status' => 'success',\n 'message' => 'Data found!'\n ];\n } else {\n $data = [\n 'status' => 'error',\n 'message' => 'User not found!'\n ];\n }\n return $data;\n }",
"public function loginUsername()\n {\n return 'username';\n }",
"public function loginUsername()\n {\n return 'username';\n }",
"public static function getUser() {\n return session(\"auth_user\", null);\n }",
"public function getPassword(){\n include('password.php');\n return $DATABASEPASSWORD;\n }",
"function AdminLogin() {\r\n\t\t$this->DB();\r\n\t}",
"public function getUserLogin($userid)\n {\n $user = R::findOne('user', 'id = ?', [$userid]);\n return $user->login;\n }",
"public function user_info($userid){\n\n $sqlQuery= \"select * from Sidhus_Login_credentials where (user_id=$userid)\";\n\n $result=$this->con->query($sqlQuery);\n\n $this->con->close();\n\n \n return $result;\n\n }"
] | [
"0.7665067",
"0.6948516",
"0.69246083",
"0.68912226",
"0.6697252",
"0.66935956",
"0.66146344",
"0.66146344",
"0.66146344",
"0.6598458",
"0.6573401",
"0.65601766",
"0.6548314",
"0.65113217",
"0.64978594",
"0.6496129",
"0.64897007",
"0.64682883",
"0.6410669",
"0.6410669",
"0.6410669",
"0.6410669",
"0.6410669",
"0.6410669",
"0.6410669",
"0.6410669",
"0.639967",
"0.6390843",
"0.6365429",
"0.63612956",
"0.6359898",
"0.63271797",
"0.63271797",
"0.63250244",
"0.6318704",
"0.6318704",
"0.631209",
"0.6307237",
"0.6292998",
"0.6289836",
"0.62740105",
"0.6270302",
"0.6241013",
"0.6222762",
"0.6220107",
"0.62145716",
"0.6202192",
"0.61966616",
"0.6169516",
"0.61692804",
"0.61625195",
"0.6160004",
"0.61593306",
"0.6157371",
"0.615633",
"0.61225367",
"0.6111364",
"0.6110485",
"0.61063486",
"0.6093974",
"0.609268",
"0.6089502",
"0.608075",
"0.6077118",
"0.60753804",
"0.60734916",
"0.6061097",
"0.60597014",
"0.60526454",
"0.60520554",
"0.6050839",
"0.60198534",
"0.60121167",
"0.60048634",
"0.59963214",
"0.59827024",
"0.59771603",
"0.5974486",
"0.5966302",
"0.5957569",
"0.59462816",
"0.5940562",
"0.5931931",
"0.59284145",
"0.59278244",
"0.5923336",
"0.59193283",
"0.589579",
"0.5888902",
"0.588621",
"0.588621",
"0.5878986",
"0.58564335",
"0.58556753",
"0.58529437",
"0.58529437",
"0.5844415",
"0.5843913",
"0.584149",
"0.58273894",
"0.58155113"
] | 0.0 | -1 |
Adds database login credentials | public function addDB($domain_id, array $data)
{
$data = $this->filterData(
$data,
array(
'Hostname',
'Username',
'Password',
'Database',
'URL',
'dbtype'
)
);
$errors = $this->validate($data);
if ($errors->hasErrors()) {
throw new Validate\Exception("Data is invalid", 0, null, $errors);
}
$dbnum = $this->getNextIndex($domain_id);
$group = "database" . $dbnum;
self::getConnection()->beginTransaction();
try{
$sth = self::getConnection()->prepare(
"INSERT INTO `data` (`domain`,`name`,`value`,`group`) VALUES (:id,:name,:value,:group)"
);
$name = "Database Type";
$value = $data['dbtype'];
$sth->bindValue(":id", $domain_id, PDO::PARAM_INT);
$sth->bindParam(":name", $name, PDO::PARAM_STR);
$sth->bindParam(":value", $value, PDO::PARAM_STR);
$sth->bindValue(":group", $group, PDO::PARAM_STR);
$sth->execute();
$name = "Hostname";
$value = $data['Hostname'];
$sth->execute();
$name = "Username";
$value = $data['Username'];
$sth->execute();
$name = "Password";
$value = $data['Password'];
$sth->execute();
$name = "Database";
$value = $data['Database'];
$sth->execute();
$name = "URL";
$value = $data['URL'];
$sth->execute();
self::getConnection()->commit();
return $this->getDBDetails($domain_id, $dbnum);
}catch(\Exception $e){
self::getConnection()->rollBack();
throw $e;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function change_db_credentials()\n\t{\n\t\tif ( !isset($_POST['credentials']) ) return;\n\t\t$credentials = file_get_contents('../credentials.php');\n\t\t$permittedVariables = array('DB_NAME','DB_USER','DB_PASSWORD');\n\t\tforeach ($_POST['credentials'] as $credName => $credVal)\n\t\t{\n\t\t\tif ( in_array($credName, $permittedVariables) )\n\t\t\t{\n\t\t\t\t//Sanitize the value before adding it.\n\t\t\t\t$credVal = str_replace(\"'\", '', $credVal);\n\t\t\t\t$credVal = str_replace(\"\\\"\", '', $credVal);\n\t\t\t\t$credentials = replace_credential($credentials, $credName, $credVal);\n\t\t\t}\n\t\t}\n\t\tfile_put_contents('../credentials.php', $credentials);\n\t}",
"function add_login($user, $password, $type)\n {\n\tglobal $connection;\n\t$query = \"INSERT INTO users3 VALUES('$user', '$password', '$type')\";\n\t$insert = $connection->query($query);\n\tif (!$insert) die($connection->error);\n }",
"function AdminLogin() {\r\n\t\t$this->DB();\r\n\t}",
"function credentials() {\n\t\t return array(PHPLM_DBHOST, PHPLM_DBUSER, PHPLM_DBPASS);\n\t\t}",
"public function cadastrar()\n\t{\n\t\t//conexao com o banco\n\t\t$connect = new Connect('user_login');\n\n\t\t$this->id = $connect->insert([\n\t\t\t\t'login'=> $this->login,\n\t\t\t\t'password'=> $this->password\n\t\t]);\n\n\t}",
"public function addOnDB() {\n\t\t\t$db = mysqli_connect($GLOBALS['host'], $GLOBALS['username'], $GLOBALS['password'], $GLOBALS['dbname']);\n\t\t\t\n\t\t\t$format = \"INSERT INTO `user` \n\t\t\t\t(`username`, `password`, `fullname`, `birthplace`, `birthdate`, `email`, `avatar`) VALUES \n\t\t\t\t('%s', '%s', '%s', '%s', '%s', '%s', '%s');\";\n\t\t\t$stmt = sprintf($format, $this->username, $this->password, $this->fullname, $this->birthplace, $this->birthdate,\n\t\t\t\t$this->email, $this->avatar_path);\n\t\t\t$result = mysqli_query($db, $stmt);\n\t\t\t\n\t\t\t$db->close();\n\t\t}",
"function pdoe_mysql_test_db_credentials() {\n\treturn array( \n\t\t'user' => 'pdoe', \n\t\t'password' => 'moomoo', \n\t\t'host' => 'localhost', \n\t\t'database' => 'pdoe_test'\n\t);\n}",
"public function init_credentials()\n\t{\n\t\tif($this->get_session('admin') != null)\n\t\t{\n\t\t\t$this->credentials['admin'] \t\t\t= $this->get_session('admin');\n\t\t\t$this->credentials['grupo_admin'] \t\t= $this->get_session('admin_grupo');\n\t\t\t$this->credentials['permissoes_admin'] \t= $this->get_session('admin_permissoes');\n\t\t\t\n\t\t\t$this->credentials['workspace_id'] \t\t= $this->get_session('workspace_id');\n\t\t\t$this->credentials['workspace_nome']\t= $this->get_session('workspace_nome');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->credentials = null;\n\t\t}\n\t}",
"public function setDbDetails($name, $user, $pass)\n {\n $this->_dbName = $name;\n $this->_dbUser = $user; \n $this->_dbPassword = $pass;\n }",
"abstract public function credentials();",
"public function UsuarioDAO(){\r\n\t\t\t$dba = new DbAdmin(\"mysqli\");\r\n\t\t\t$dba->connect('localhost', 'root', '', 'inteligencia');\r\n\t\t\t$this->dba = $dba;\t\r\n\t\t}",
"protected function set_db_users(): void\n {\n $this->Root = $this->connexion('root', '');\n }",
"public static function LogIn ($userName = '', $password = '');",
"function getDbCredentials()\n{ \n return getSettings()['database'];\n}",
"private function _loginUser($data) { \n try {\n $username = mb_strtolower($data->username);\n $password = $data->password;\n\n require_once 'DBAdmin_Model.php';\n $this->model = new DBAdmin_Model();\n\n $conf = realpath('config');\n if (!is_file($conf.'/config.json')) {\n throw new Exception('Datei config.json nicht gefunden!');\n }\n\n $config = json_decode(file_get_contents($conf.'/config.json'));\n\n if (!isset($config->host)) {\n throw new Exception('Datei config.json ist fehlerhaft!');\n }\n $host = $config->host; \n \n try {\n $pdo = $this->model->openDbConnection($host, $username, $password);\n } catch (Throwable $ex) {\n throw new Exception('Benutzername oder Passwort falsch!');\n }\n $this->model->closeDbConnection($pdo);\n\n // conf-File für Benutzer erstellen\n $confFile = fopen($conf.'/user_'.$username.'.conf', 'w');\n\n if (!$confFile) {\n throw new Exception('fopen ist fehlgeschlagen!');\n }\n $txt = \"[client]\\r\\nhost=\".$host.\"\\r\\nuser=\".$username.\"\\r\\npassword=\\\"\".$password.\"\\\"\";\n $write = fwrite($confFile, $txt);\n\n if ($write === false) {\n throw new Exception('fwrite ist fehlgeschlagen!');\n }\n fclose($confFile);\n \n $return = array(\n 'username' => $username,\n 'id' => md5($password)\n );\n } catch (Throwable $ex) {\n $return = $ex;\n }\n return $return; \n }",
"function setCredentials($username, $password)\n {\n $this->username = $username;\n $this->password = $password;\n }",
"public function saveToDatabase() {\n if($this->id != 0) {\n $dbResult = System::database()->query('update :table_users \n set `role_id` = :role_id, \n `login` = :login, \n `password` = :password, \n `auth_key` = :auth_key, \n `auth_expire` = :auth_expire, \n `last_login` = :last_login\n where `id` = :id');\n \n $dbResult->bindInt(':id', $this->id);\n $dbResult->bindValue(':auth_key', $this->authKey);\n $dbResult->bindInt(':auth_expire', $this->authExpired);\n $dbResult->bindInt(':last_login', $this->lastLoginTime);\n } else {\n $dbResult = System::database()->query('insert into :table_users (`role_id`, `login`, `password`)\n values (:role_id, :login, :password);');\n }\n $dbResult->bindTable(':table_users', TABLE_USERS);\n $dbResult->bindInt(':role_id', $this->role['id']);\n $dbResult->bindValue(':login', $this->login);\n $dbResult->bindValue(':password', $this->password);\n\n $dbResult->execute();\n }",
"public function login()\n\t{\n\t\t//Compute the hash code of the password submited by user\n\t\t$user_password_hash = $this->passwordEncrypt($this->user_info['user_password']);\n\t\t\n\t\t//Do datebase query to get the hash code of the password\n\t\t$db = BFL_Database :: getInstance();\n\t\t$stmt = $db->factory('select `user_id`,`user_password` from '.DB_TABLE_USER.' WHERE `user_name` = :user_name');\n\t\t$stmt->bindParam(':user_name', $this->user_info['user_name']);\n\t\t$stmt->execute();\n\t\t$rs = $stmt->fetch();\n\t\tif (empty($rs))\n\t\t\tthrow new MDL_Exception_User_Passport('user_name');\n\t\t\n\t\tif ($rs['user_password'] != $user_password_hash)\n\t\t\tthrow new MDL_Exception_User_Passport('user_password');\n\n\t\t//Set user session\n\t\t$auth = BFL_ACL :: getInstance();\n\t\t$auth->setUserID($rs['user_id']);\n\t}",
"private function login(){\n \n }",
"public function setCredentials($login, $password)\n {\n $this->_login = $login;\n $this->_password = $password;\n }",
"public static function login($username, $password)\r\n {\r\n\t\t//\\Config::load('db', true);\r\n\t\t//$active_db = \\Config::get('db.active');\r\n\t\t//print_r($active_db); \r\n\t\t$call_to_db = \\quotes\\Model_Quote::get_nmi_section($username, $password);exit;\r\n\t\t$sql\t=\t\"SELECT EM1_Username, EM1_EmployeeID_pk from t_Employee1, EM1_Password where EM1_Username = ? and EM1_Password = ?\";\r\n $sql = \\NMI::Db()->prepare($sql);\r\n\t\tprint_r($sql);log::error($sql); \r\n\t\t\r\n $stmt->execute(array($username,$password));\r\n $meta = $stmt->fetch();\r\n print_r($meta);exit;\r\n foreach ($meta as $u)\r\n {\r\n $user_id = $u['EM1_EmployeeID_pk'];\r\n $user_name = $u['EM1_Username'];\r\n\t\t $password = $u['EM1_Password'];\r\n }\r\n\t\t\r\n \\Session::set('user_id', $user_id);\r\n\t\t\\Session::set('username', $username);\r\n\t\t\\Session::set('password', $password);\r\n\t\t\\Session::set('authed', 'validated');\r\n\t\t\r\n\t\tif(count($user>0)){return 1;}else{return 0;}\r\n }",
"private static function _addCredentialsConfigurationEntries()\n {\n global $db;\n\n $requiredOptionsAttributes = static::_getRequiredOptionsAttributes();\n\n $db->Execute(\n 'insert into ' . TABLE_CONFIGURATION . \"\n (configuration_title, configuration_key, configuration_value,\n configuration_description, configuration_group_id, sort_order,\n set_function, date_added)\n values\n ('Genesis API Username',\n '\" . EmpCheckoutSettings::getCompleteSettingKey('USERNAME') . \"',\n '', 'Enter your Username, required for accessing the Genesis Gateway',\n '6', '4', 'emp_zfg_draw_input({$requiredOptionsAttributes}, ', now())\"\n );\n $db->Execute(\n 'insert into ' . TABLE_CONFIGURATION . \"\n (configuration_title, configuration_key, configuration_value,\n configuration_description, configuration_group_id, sort_order,\n set_function, date_added)\n values\n ('Genesis API Password',\n '\" . EmpCheckoutSettings::getCompleteSettingKey('PASSWORD') . \"',\n '', 'Enter your Password, required for accessing the Genesis Gateway',\n '6', '4', 'emp_zfg_draw_input({$requiredOptionsAttributes}, ', now())\"\n );\n $db->Execute(\n 'insert into ' . TABLE_CONFIGURATION . \"\n (configuration_title, configuration_key, configuration_value,\n configuration_description, configuration_group_id, sort_order,\n set_function, use_function, date_added)\n values\n ('Live Mode',\n '\" . EmpCheckoutSettings::getCompleteSettingKey('ENVIRONMENT') . \"',\n 'false', 'If disabled, transactions are going through our Staging \" .\n \"(Test) server, NO MONEY ARE BEING TRANSFERRED', '6', '3',\n 'emp_zfg_draw_toggle(', 'emp_zfg_get_toggle_value', now())\"\n );\n }",
"public function executeLogin()\n {\n }",
"function add_user ($username,$password)\n {\n\t\t$insert_query = \"insert into users set username='$username',password = '$password'\";\n return $this->query ($insert_query);\n }",
"function add_user ($User_name, $User_password, $User_email, $user_type)\n\t{\n\t\tglobal $conn;\n\n $sql_i = \"INSERT INTO login_db(user_name, user_password, user_email, user_type) VALUES \" .\n \"('$User_name', '$User_password', '$User_email', '$user_type')\";\n\n run_update($sql_i);\n\t}",
"static public function getLogin() {\n //resultat : chaîne de caractère qui correspond au login \n return self::$databases['login'];\n }",
"function login ($name, $pw)\r\n {\r\n global $firstthingsfirst_admin_passwd;\r\n global $firstthingsfirst_lang;\r\n global $firstthingsfirst_theme;\r\n\r\n $this->_log->trace(\"login (name=\".$name.\")\");\r\n\r\n if ($this->is_login())\r\n $this->logout();\r\n\r\n # create user admin the first time user admin tries to login\r\n if ($name == \"admin\" && !$this->exists(\"admin\"))\r\n {\r\n $this->_log->info(\"first time login for admin\");\r\n $name_value_array = array();\r\n $name_value_array[USER_NAME_FIELD_NAME] = $name;\r\n $name_value_array[USER_PW_FIELD_NAME] = $firstthingsfirst_admin_passwd;\r\n $name_value_array[USER_LANG_FIELD_NAME] = $firstthingsfirst_lang;\r\n $name_value_array[USER_DATE_FORMAT_FIELD_NAME] = DATE_FORMAT_EU;\r\n $name_value_array[USER_DECIMAL_MARK_FIELD_NAME] = DECIMAL_MARK_POINT;\r\n $name_value_array[USER_LINES_PER_PAGE_FIELD_NAME] = 12;\r\n $name_value_array[USER_THEME_FIELD_NAME] = $firstthingsfirst_theme;\r\n $name_value_array[USER_CAN_CREATE_LIST_FIELD_NAME] = 1;\r\n $name_value_array[USER_CAN_CREATE_USER_FIELD_NAME] = 1;\r\n $name_value_array[USER_IS_ADMIN_FIELD_NAME] = 1;\r\n $name_value_array[USER_TIMES_LOGIN_FIELD_NAME] = 0;\r\n\r\n if (!$this->insert($name_value_array))\r\n return FALSE;\r\n }\r\n\r\n # create encoded_key_string\r\n $encoded_key_string = parent::_encode_key_string(USER_NAME_FIELD_NAME.\"='\".$name.\"'\");\r\n\r\n # check if record exists\r\n $record = parent::select_record($encoded_key_string);\r\n if (count($record) == 0)\r\n {\r\n if ($this->error_message_str != \"ERROR_DATABASE_CONNECT\")\r\n {\r\n $this->_handle_error(\"\", \"ERROR_INCORRECT_NAME_PASSWORD\");\r\n $this->error_str = \"\";\r\n }\r\n\r\n return FALSE;\r\n }\r\n\r\n $password = md5($pw);\r\n $db_password = $record[USER_PW_FIELD_NAME];\r\n\r\n if ($db_password == $password)\r\n {\r\n # set session parameters\r\n $this->set_id($record[DB_ID_FIELD_NAME]);\r\n $this->set_name($record[USER_NAME_FIELD_NAME]);\r\n $this->set_current_list_name(\"\");\r\n $this->set_lang($record[USER_LANG_FIELD_NAME]);\r\n $this->set_date_format($record[USER_DATE_FORMAT_FIELD_NAME]);\r\n $this->set_decimal_mark($record[USER_DECIMAL_MARK_FIELD_NAME]);\r\n $this->set_lines_per_page($record[USER_LINES_PER_PAGE_FIELD_NAME]);\r\n $this->set_theme($record[USER_THEME_FIELD_NAME]);\r\n $this->set_can_create_list($record[USER_CAN_CREATE_LIST_FIELD_NAME]);\r\n $this->set_can_create_user($record[USER_CAN_CREATE_USER_FIELD_NAME]);\r\n $this->set_is_admin($record[USER_IS_ADMIN_FIELD_NAME]);\r\n $this->set_times_login($record[USER_TIMES_LOGIN_FIELD_NAME] + 1);\r\n $this->set_login(1);\r\n\r\n $name_values_array = array();\r\n $name_values_array[USER_TIMES_LOGIN_FIELD_NAME] = ($record[USER_TIMES_LOGIN_FIELD_NAME] + 1);\r\n\r\n # update the number of times this user has logged in\r\n if (parent::update($encoded_key_string, $name_values_array) == FALSE)\r\n return FALSE;\r\n else\r\n {\r\n $this->_log->info(\"user logged in (name=\".$name.\")\");\r\n\r\n return TRUE;\r\n }\r\n }\r\n else\r\n {\r\n $this->_log->warn(\"passwords do not match (name=\".$name.\"), user is not logged in\");\r\n $this->error_str = \"\";\r\n $this->_handle_error(\"\", \"ERROR_INCORRECT_NAME_PASSWORD\");\r\n\r\n return FALSE;\r\n }\r\n }",
"function asignar_consulta($log,$pass){\n $this->login = $log;\n $this->password = $pass;\n }",
"function insertAdminUser() {\n // Insert Admin info;\n $userController = new UserController;\n $this->db->exec(\n \"INSERT INTO users (username, password) VALUES (?, ?)\",\n [\n 1 => $this->formValues['adminUsername'],\n 2 => $userController->cryptPassword($this->formValues['adminPassword_1']),\n ]\n );\n }",
"static public function dbConnectAsAdmin() {\r\n\t\t\treturn DBConnector::dbConnect('admin','password');\r\n\t\t}",
"public function addDB()\n {\n $this->model->addDB();\n header('location:index.php?controller=user');\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 function setup(){\n\t\tif(Request::ajax()){\n\t\t\ttry{\n\n\t\t\t\tif (Schema::hasTable('users')){\n\n\t\t\t\t\treturn Redirect::to('/');\n\t\t\t\t\t\n\t\t\t\t} else {\n\n\t\t\t\t\techo $this->add_db_credentials($_POST['database_host'], $_POST['database_name'], $_POST['database_user'], $_POST['database_password']);\n\t\t\t\t}\n\n\t\t\t} catch(Exception $e){\n\n\t\t\t\techo $this->add_db_credentials($_POST['database_host'], $_POST['database_name'], $_POST['database_user'], $_POST['database_password']);\n\t\t\t\n\t\t\t}\n\n\t\t} else {\n\t\t\techo false;\n\t\t}\n\t}",
"public function login();",
"public function login();",
"public function connexionSuperAdminLogin(){\n }",
"public function setMySqlCredentials($host, $user, $pass, $db) {\n $this->host = $host;\n $this->user = $user;\n $this->pass = $pass;\n $this->db = $db;\n }",
"protected function addAdminAccount()\n {\n //disconnect existing DB connection to reconnect with new updated config variables.\n\n $this->line(\"Deleting any existing admin accounts.\");\n //empty users table.\n User::truncate();\n\n $this->line(\"Creating admin account.\");\n $username = 'admin';\n $password = 'AccessManager3';\n\n $user = new User([\n 'username' => $username,\n 'password' => $password,\n 'name' => 'Administrator',\n 'email' => 'access@manager',\n ]);\n $user->saveOrFail();\n\n $this->line(\"Account successfully created.\");\n $this->info(\"Username: $username\");\n $this->info(\"Password: $password\");\n $this->line(\"Run 'php artisan admin:reset' to reset admin password.\");\n }",
"function loginLogger()\n {\n $remote = quote_content($_SERVER['REMOTE_ADDR']);\n $forwar = quote_content($_SERVER['HTTP_X_FORWARDED_FOR']);\n $uagent = quote_content($_SERVER['HTTP_USER_AGENT']);\n $day = date(\"Y-m-d\");\n\t $time = date(\"H:i:s\");\n $type = \"admin\";\n\n $query = \" INSERT INTO log_acesso (login, ip1, ip2, ip3, dia, hora, tipo) \";\n $query.= \" VALUES (?, ?, ?, ?, ?, ?, ?)\";\n\n $q = $this->_con->prepare($query);\n $uname = $this->_object->getUName();\n $q->bindParam(1, $uname);\n $q->bindParam(2, $remote);\n $q->bindParam(3, $forwar);\n $q->bindParam(4, $uagent);\n $q->bindParam(5, $day);\n $q->bindParam(6, $time);\n $q->bindParam(7, $type);\n\n return $q->execute();\n }",
"protected function loginAuthenticate(){\n\n\t\t\n\t}",
"public function run()\n {\n \t\\DB::table('credentials')->truncate();\n\n \t\\DB::table('credentials')->insert([\n \t\t[\n \t\t\t'username' => 'thaodoremon',\n \t\t\t'password' => Hash::make('thaodoremon'),\n \t\t],\n \t\t[\n \t\t\t'username' => 'lawliet',\n \t\t\t'password' => Hash::make('1'),\n \t\t],\n \t]);\n }",
"public function addUser() {\n $db = new ClassDB();\n $db->connect();\n\n $result = $db->getConnection()->prepare('INSERT INTO users (user_email,\n user_password,\n user_first_name,\n user_last_name) \n VALUES (:email,\n :pass,\n :firstName,\n :lastName)');\n\n $result->bindParam(':email', $this->user_email); \n $result->bindParam(':pass', $this->user_password); \n $result->bindParam(':firstName', $this->user_first_name);\n $result->bindParam(':lastName', $this->user_last_name);\n \n $result->execute();\n $db->disconnect();\n }",
"private function setEncryptPassword(){\n // Encode the new users password\n $encrpyt = $this->get('security.password_encoder');\n $password = $encrpyt->encodePassword($this->user, $this->user->getPassword());\n $this->user->setPassword($password);\n }",
"public function connectionUser($login, $password)\n {\n $dbName = $this->dbConnect();\n $user = $dbName->prepare(\"SELECT login, password,mail,admin FROM user WHERE login=:login AND password=:password\");\n $user->bindValue(\":login\", $login, PDO::PARAM_STR);\n $user->bindValue(\":password\", $password, PDO::PARAM_STR);\n $user->execute();\n return $user;\n }",
"function addUser()\n{\n $username = Slim::getInstance()->request()->post('username');\n $password = Slim::getInstance()->request()->post('password');\n\n $sql = \"SELECT username FROM users WHERE username=:username\";\n\n try\n {\n $db = getConnection();\n\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"username\", $username);\n $stmt->execute();\n $db = null;\n $username_test = $stmt->fetchObject();\n\n if($username_test) {\n echo \"error_username\";\n return;\n }\n }\n catch(PDOException $e) \n {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n }\n\n\n $sql = \"INSERT INTO users (username, password) VALUES (:username, :password)\";\n\n try\n {\n $db = getConnection();\n\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"username\", $username);\n $stmt->bindParam(\"password\", $password);\n\n $stmt->execute();\n $db = null;\n\n }\n catch(PDOException $e) \n {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n }\n}",
"public function connectToDatabase($host, $port, $name, $user, $pass, $secureKey) {\n\t\t\t# initialise db stuff\n\t\t\t$this->db_host = $host;\n\t\t\t$this->db_port = $port;\n\t\t\t$this->db_name = $name;\n\t\t\t$this->db_user = $user;\n\t\t\t$this->db_pass = $pass;\n\n\t\t\t# start a new session\n\t\t\tsession_start();\n\n\t\t\t# create connection\n\t\t\ttry {\n\t\t\t\t$this->pdo = new PDO(\"mysql:dbname={$this->db_name};host={$this->db_host};port={$this->db_port}\", $this->db_user, $this->db_pass);\n\t\t\t\t$this->cookie = isset($_COOKIE['logSyslogin']) ? $_COOKIE['logSyslogin'] : false;\n\t\t\t\t$this->session = isset($_SESSION['logSyscuruser']) ? $_SESSION['logSyscuruser'] : false;\n\t\t\t\t$this->remCook = isset($_COOKIE['logSysrememberMe']) ? $_COOKIE['logSysrememberMe'] : false;\n\n\t\t\t\t$encUserId\t = hash(\"sha256\", $this->secureKey . $this->session . $this->secureKey);\n\t\t\t\t$this->loggedIn = $this->cookie == $encUserId ? true : false;\n\n\t\t\t\tif ($this->rememberLoginDetails === true && isset($this->remCook) && $this->loggedIn === false) {\n\t\t\t\t\t$encUserId\t\t= hash(\"sha256\", $this->secureKey . $this->remCook . $this->secureKey);\n\t\t\t\t\t$this->loggedIn = $this->cookie == $encUserId ? true : false;\n\t\t\t\t\tif ($this->loggedIn === true) {\n\t\t\t\t\t\t$_SESSION['logSyscuruser'] = $this->remCook;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->user = $this->session;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch (PDOException $ex) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function setAuth($username, $password);",
"public function createDBUser(){\n $username = ':username'; $password = ':password';\n $sql = str_replace($username, DB_USERNAME, SystemSetupSqlStatement::CREATE_DB_USER);\n $sql = str_replace($password, DB_PASSWORD, $sql);\n $pds = $this->pdo->prepare($sql);\n $check = $pds->execute(array());\n return $check;\n }",
"public function addUserLogin($user, $password, $name, $email)\n {\n $sql = \"INSERT INTO login (\n username,\n password,\n name,\n email,\n admin\n )\n VALUES (?, ?, ?, ?, ?);\";\n $this->db->execute($sql, [$user, $password, $name, $email, \"N\"]);\n }",
"function login() {\n $username = Slim::getInstance()->request()->post('username');\n $password = Slim::getInstance()->request()->post('password');\n\n try {\n $db = getConnection();\n\n\t$sql = \"SELECT userId FROM users WHERE username=:username\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->bindParam(\"username\", $username);\n\t$stmt->execute();\n\t$username_test = $stmt->fetchObject();\n\tif(empty($username_test)) {\n\t\techo \"error_username_doesnt_exists\";\n\t\treturn;\n\t}\n\n\t$sql = \"SELECT password FROM users WHERE username=:username\";\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"username\", $username);\n $stmt->execute();\n $storedPassword = $stmt->fetchObject()->password;\n\n if(empty($storedPassword)) {\n echo \"null\";\n } else if(strcmp($password, $storedPassword) == 0) {\n\t\t $query = \"SELECT userId FROM users WHERE username=:username\";\n\t\t $stmt2 = $db->prepare($query);\n\t\t $stmt2->bindParam(\"username\", $username);\n\t\t $stmt2->execute();\n \t echo '{\"Username\": \"' . $username . '\", \"ID\": ' . $stmt2->fetchObject()->userId . '}'; \n } else {\n\t\techo \"null\";\n\t}\n\n $db = null;\n } catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}'; \n }\n}",
"public function connectDB() {}",
"public function login($name, $password);",
"public function login($userName, $password);",
"function setDbPassword($sessionID, $password){\r\n\t\tif ($this->userCanSetDbPassword()){\r\n\t\t\t// NOT IMPLEMENTED!!!!\r\n\t\t}\r\n\t}",
"public function run()\n {\n $data = [\n 'username' => 'admin',\n 'password' => md5('secret')\n ];\n\n $this->table('admins')->insert($data)->save();\n }",
"private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setDatabaseHost($this->dbHost);\r\r\n\t\t$this->dbHandle->setDatabaseUsername($this->dbUsername);\r\r\n\t\t$this->dbHandle->setDatabasePassword($this->dbPassword);\r\r\n\t\t$this->dbHandle->setDatabaseName($this->db);\r\r\n\t\t$this->dbHandle->sql_pconnect();\r\r\n\t\t$this->dbHandle->sql_select_db();\r\r\n\t}",
"public function __construct($login = null, $password = null) {\n \n if(func_num_args() == 0)\n return;\n \n $this->login = $login;\n $this->password = $password;\n \n $userInfo = self::getUserFromDb($login, $password);\n \n if($userInfo) {\n $this->id = $userInfo['id'];\n $this->role = $userInfo['role'];\n $this->lastLoginTime = $userInfo['last_login'];\n $this->authKey = $userInfo['auth_key'];\n $this->authExpired = $userInfo['auth_expire'];\n }\n }",
"function addNewUser($email, $password)\r\n{\r\n // first time registration\r\n global $dbh;\r\n\r\n // 1. define the query\r\n $sql = \"INSERT INTO loginCredentials (email, password) VALUES (:email, :password)\";\r\n\r\n // 2. prepare the statement\r\n $statement = $dbh->prepare($sql);\r\n\r\n // 3. bind parameters\r\n $statement->bindParam(':email', $email, PDO::PARAM_STR);\r\n $statement->bindParam(':password', sha1($password), PDO::PARAM_STR);\r\n\r\n // 4. execute the statement\r\n $success = $statement->execute();\r\n\r\n return $success;\r\n\r\n}",
"public function connexionAdminStructureLogin(){\n }",
"public function webtestLogin() {\n //$this->open(\"{$this->sboxPath}user\");\n $password = $this->settings->adminPassword;\n $username = $this->settings->adminUsername;\n // Make sure login form is available\n $this->waitForElementPresent('edit-submit');\n $this->type('edit-name', $username);\n $this->type('edit-pass', $password);\n $this->click('edit-submit');\n $this->waitForPageToLoad('30000');\n }",
"function setDatabaseConnection($host,$database,$user,$pass);",
"function dbConnect($app_name, $database) {\n\t$err = null;\n\t// if (!is_file($GLOBALS['instance']['password_file'])) $err = 'Specified password file does not exist.';\n\n\tif (!$err) {\n\t\t// require_once($GLOBALS['instance']['password_file']);\n\n\t\t// if (!is_array($_PASSWD)) $err = 'Password file did not contain password definitions.';\n\t\t// if (!is_array($_PASSWD[$app_name])) $err = 'Password file did not contain an entry for the specified application.';\n\n\t\tif (!$err) {\n\t\t\t$host = $GLOBALS['instance']['host'];\n\t\t\t$login = $GLOBALS['instance']['username'];\n\t\t\t$pass = $GLOBALS['instance']['password'];\n\t\t\tunset($_PASSWD);\n\t\t\t$conn = new mysqli($host, $login, $pass, $database);\n\n\t\t\tif ($conn->connect_errno) {\n\t\t\t\t$err = $conn->connect_error;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ($err) {\n\t\techo str_replace('%%error%%', $err, $this->error_html);\n\t\texit;\n\t}\n\treturn $conn;\n\n}",
"public function login($user, $pass, $persistent);",
"public function storeUserLogin()\r\n{\r\n $query_string = \"INSERT INTO loginlogs \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"userid = :userid, \";\r\n $query_string .= \"loginstatus = :loginstatus\";\r\n\r\n return $query_string;\r\n}",
"public function saveLoginData()\n {\n //Get user data (ip, time, browser)\n $request = \\Yii::$app->getRequest();\n $userData = [\n 'ip' => $request->getUserIP(),\n 'login_time' => time(),\n 'browser' => UserAgent::model()->browser,\n 'user_id' => \\Yii::$app->user->id\n ];\n\n //Save it to DB\n $loginStories = new LoginStories();\n $loginStories->attributes = $userData;\n $loginStories->save();\n }",
"public function connectToDB() {}",
"public function __construct($login, $password)\n {\n $this->_zendDb = Zend_Db_Table::getDefaultAdapter();\n $this->_identity = $login;\n $this->_credential = $password;\n }",
"public function run()\n {\n $defaultUserData = [\n 'user_name' => 'admin',\n 'user_pass' => md5(123456)\n ];\n\n DB::table('vp-users')->insert($defaultUserData);\n\n }",
"public function addToDb()\n {\n\n // make sure this is a valid new entry\n if ($this->isValid()) {\n // check for duplicate\n $vals = sprintf(\"('%s',%d)\",$this->email,$this->level);\n $sql = \" insert into Admins values $vals\";\n Dbc::getReader()->Exec($sql);\n }\n else\n print \"<br> Invalid entry. STOP! ($sql)<br>\";\n }",
"public function setIdentifiers($username, $password);",
"function addAdmin($username, $raw_password, $email, $phone) {\n // TODO\n }",
"public function __construct($host, $dbName, $login, $password) {\n /* $encrypt ; */\n parent::__construct($host, $dbName, $login, $password);\n\n }",
"function login()\n{\n\tglobal $conf, $json, $resout, $db;\n\n\t$username = cRequest::any('_user');\n\t$password = cRequest::any('_pass');\n\t$p = $password;\n\n\t//die(\"_user: $username | _pass: $password\");\n\t\n\tif ((!$password) || (!$username)) {\n\t\t# XXX: Error page\n\t\tdie(\"Username and Password Required\");\n\t}\n\n\t$dbh = $db->open($conf['db']['host'], $conf['db']['user'],\n\t\t\t $conf['db']['passwd'], $conf['db']['name']);\n\n\t$uname = $db->secure($username);\n\t$passwd = sha1($password);\n\n\t$sql = \"select * from {$conf['tbl']['usermap']}\n\t\twhere username='$uname';\";\n\t$ret = $db->query($sql);\n\tif ($ret) {\n\t\t$res = $db->asfetch($ret);\n\t\t$uid = $res['uid'];\n\t\t$actype = $res['actype'];\n\t\tswitch($actype) {\n\t\tcase 'sa':\n\t\t\t$sql = \"select * from {$conf['tbl']['login']}\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tcase 'a':\n\t\t\t$sql = \"select * from {$conf['tbl']['shopinfo']}\n\t\t\t\tleft join {$conf['tbl']['login']} \n\t\t\t\ton({$conf['tbl']['shopinfo']}.sid = \n\t\t\t\t{$conf['tbl']['login']}.uid )\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tcase 'u':\n\t\t\t$sql = \"select * from {$conf['tbl']['profile']}\n\t\t\t\tleft join {$conf['tbl']['login']} \n\t\t\t\ton({$conf['tbl']['profile']}.uid = \n\t\t\t\t{$conf['tbl']['login']}.uid )\n\t\t\t\twhere username='$uname'\";\n\t\t\t$ret = $db->query($sql);\n\t\t\t$res = $db->asfetch($ret);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t/* XXX: ERROR */\n\t\t\tdie(\"[!] Error: No account with Username $uname\");\n\t\t\t/* NOTREACHED */\n\t\t}\n\n\t\t# cmp passwd\n\t\tif ($passwd != $res['passwd']) {\n\t\t\tprint_r($res);\n\t\t\tprint \"Passwords don't match[$passwd | {$res['passwd']}]\";\n\t\t\texit();\n\t\t}\n\n\t\t# get last login\n\t\t$sqll = \"select * from loginhistory where uid='$uid'\";\n\t\t$retl = $db->query($sqll);\n\t\t$resl = $db->asfetch($retl);\n\n\t\t# set up session data\n\t\t$sess = new cSession;\n\t\t$datetime = date('Y/m/d H:i:s');\n\t\t$lastip = cIP::getusrip();\n\t\t$location = cIP::getusrcountry($lastip); # FIXME: need to add ip2ctry dir\n\t\tif (isset($location['country_name'])) {\n\t\t\t$location = $location['country_name'];\n\t\t} else {\n\t\t\t$location = \"Unknown\";\n\t\t}\n\n\t\tif (preg_match('/1996\\/09\\/26 16:00:00/', $resl['lastlogin'], $match)) {\n\t\t\t$ll = $datetime;\n\t\t} else {\n\t\t\t$ll = $resl['lastlogin'];\n\t\t}\n\n\t\tif (preg_match('/0\\.0\\.0\\.0/', $resl['lastip'], $match)) {\n\t\t\t$lip = $lastip;\n\t\t} else {\n\t\t\t$lip = $resl['lastip'];\n\t\t}\n\n\t\t$sess->set('uid', $res['uid']);\n\t\t$sess->set('uname', $username);\n\t\t$sess->set('actype', $actype);\n\t\tif ($actype == 'u') {\n\t\t\t$sess->set('fname', $res['fname']);\n\t\t\t$sess->set('email', $res['email']);\n\t\t}\n\t\tif ($actype == 'a') {\n\t\t\t$sess->set('sname', $res['sname']);\n\t\t\t$sess->set('email', $res['email']);\n\t\t}\n\n\t\t$sess->set('lastlogin', $ll);\n\t\t$sess->set('lastip', $lip);\n\n\t\t# XXX: update login history\n\t\t$sql = \"update {$conf['tbl']['loginhistory']} set lastlogin='$datetime',\n\t\t\tlastip='$lastip', lastlocation='$location'\n\t\t\twhere uid='$uid';\";\n\t\t$db->query($sql);\n\n\t\t$db->close($dbh);\n\t\tunset($db);\n\t\tunset($sess);\n\n\t\theader(\"Location: dashboard.php\");\n\t\texit();\n\t} else {\n\t\t# XXX: Error page\n\t\tdie(\"[!] Fatal Error: No account with Username '$uname'\");\n\t\t/* NOTREACHED */\n\t}\n}",
"function get_database_password()\n\t{\n\t\treturn ($this -> database_password);\n\t}",
"private function connect() {\n $host = $this->dbConfig[$this->selected]['host'];\n $login = $this->dbConfig[$this->selected]['login'];\n $password = $this->dbConfig[$this->selected]['password'];\n $database = $this->dbConfig[$this->selected]['database'];\n try {\n $this->db = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $login, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n//\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } catch (PDOException $e) {\n die('Could not connect to DB:' . $e);\n }\n }",
"public function login() {\n parent::conectarBD();\n\n $queri = parent::query(sprintf(\"select usu_id as codigo, usu_password as senha, \"\n . \"usu_token_sessao as token_sessao, usu_login as login from \"\n . table_prefix . \"usuario where usu_login = '%s' and \"\n . \"usu_password = '%s'\", $this->usu_login, $this->usu_password));\n\n if ($queri) {\n $dados = $queri->fetch_assoc();\n if ($dados) {\n $new_session_id = hash('sha256', $dados['senha'] . time());\n $queri2 = parent::query(\"update \" . table_prefix . \"usuario set usu_token_sessao = '$new_session_id' where usu_id = \" . $dados['codigo']);\n\n if ($queri2) {\n $dados['token_sessao'] = $new_session_id;\n parent::commit();\n parent::desconectarBD();\n return $dados;\n } else {\n parent::rollback();\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n }",
"public function addUser(){\n\n\t\ttry {\n\n\t\t\t$username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\n\t\t\t$password = $_POST['password'];\n\n\t\t\t$password = hash('sha256', $password);\n\n\n\t\t\trequire CONTROLLER_DIR . '/dbConnecterController.php';\n\n\t\t\t$result = $db->query('SELECT * FROM users WHERE username=\"'.$username.'\"');\n\n\t\t\tif ($username && $password) {\n\n\t\t\t\t$row = $result->fetchColumn();\n\t\t\t\tif($row == 0){\n\t\t\t\t\t$statement = $db->query(\"INSERT INTO users (username,password) VALUES ('$username', '$password')\" );\n\t\t\t\t\t$db = null;\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tdie(\"Username already taken, pick something else! <br><a href='/userlist'> Go back to user list\");\n\t\t\t\t}\t\n\t\t\t}\n\n\t\t} catch (PDOException $e) {\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"<br/>\";\n\t\t\tdie();\n\t\t}\n\t}",
"function auth_login($db, $str_username, $str_password)\r\r\n{\r\r\n $result_user = func_db_query($db, 'SELECT user_id FROM @TABLE_PREFIX@nx3_user WHERE username = ? AND password = MD5(?)',\r\r\n array('ss', $str_username, $str_password));\r\r\n if (isset($result_user[0]) && $result_user[0]['user_id'] != '')\r\r\n {\r\r\n $user_id = $result_user[0]['user_id'];\r\r\n $_SESSION['NX3_AUTHENTICATED'] = 'Y';\r\r\n auth_retrieve_user_properties($db, $user_id);\r\r\n log_message($db, __FILE__, 4, 'Logging user IN - user_id = ' . $user_id);\r\r\n }\r\r\n else\r\r\n {\r\r\n // Log user out, set user to 'guest'\r\r\n log_message($db, __FILE__, 5, 'User authentication Failed, username = \"' . $str_username . '\"');\r\r\n auth_logout($db);\r\r\n }\r\r\n}",
"public function user_login() {\n global $db;\n\n //Use path to det user\n if (isset($_POST['login'])) {\n $username = \"\";\n $log_col = $_POST['liwth'];\n $user = $_POST['uname'];\n $pwd = sha1($_POST['pwd']);\n $login = $_POST['lias'];\n\n//Chosing the col of table where to login fron\n switch ($log_col) {\n case \"user\":\n $username = \"uname\";\n break;\n case \"cuser\":\n $username = \"cuname\";\n break;\n case \"employee\":\n $username = \"employee_no\";\n break;\n case\"job_seeker\":\n $username = \"natid\";\n break;\n default :\n echo 'ERROR DETERMINING USER CATEGORY!!!';\n }\n\n// echo '.' . $user . '.' . $pwd . '.' . $login . '.';\n// $query = \"SELECT fname $username, pwd FROM $login WHERE $username='$user' AND pwd='$pwd' \";\n $query = \"SELECT $username, fname, pwd FROM $login WHERE $username = ? AND pwd = ?\";\n $type_array = array('s', 's');\n $data_array = array($user, $pwd);\n\n $res = $db->select($query, $type_array, $data_array);\n if (!empty($res)) {\n foreach ($res as $row) {\n $_SESSION[$username] = $row[$username];\n $empno = $_SESSION[$username];\n $_SESSION['fname'] = $row['fname'];\n echo 'Login success';\n echo 'SESSION NAME' . $_SESSION['fname'];\n Redirect::to(\"index.php?rdr=1\");\n }\n } else {\n $query = \"SELECT fname $username, pwd FROM $login WHERE $username = ?\";\n $type_array = array('s');\n $data_array = array($user);\n\n $res = $db->select($query, $type_array, $data_array);\n if (!empty($res)) {\n echo 'Wrong password for ' . $user;\n// echo '.' . $user . '.' . $pwd . '.' . $login . '.';\n } else {\n echo 'The username does not exist';\n }\n }\n }\n }",
"private function getCrendentials()\n {\n $db = parse_ini_file('db.ini');\n $this->username = $db['user'];\n $this->password = $db['password'];\n $this->host = $db['host'];\n $this->dbname = $db['dbname'];\n }",
"public function login()\n {\n //$this->username = $username; // we are gonnna use the above property: $username here\n //$this->password = $password;\n // we want to call authuser from within login so\n $this->auth_user(); // we don't need to pass any arguments here because we know the class properties above this line\n\n }",
"public function getDatabasePassword()\n {\n return $this->settings['db_password'];\n }",
"function external_db_show_password_fields()\n{\n return 0;\n}",
"public function getDbPassword()\n\t{\n\t\treturn $this->db_password;\n\t}",
"public function login()\n\t{\n\t\t$mtg_login_failed = I18n::__('mtg_login_failed');\n\t\tR::selectDatabase('oxid');\n\t\t$sql = 'SELECT oxid, oxfname, oxlname FROM oxuser WHERE oxusername = ? AND oxactive = 1 AND oxpassword = MD5(CONCAT(?, UNHEX(oxpasssalt)))';\n\t\t$users = R::getAll($sql, array(\n\t\t\tFlight::request()->data->uname,\n\t\t\tFlight::request()->data->pw\n\t\t));\n\t\tR::selectDatabase('default');//before doing session stuff we have to return to db\n\t\tif ( ! empty($users) && count($users) == 1) {\n\t\t\t$_SESSION['oxuser'] = array(\n\t\t\t\t'id' => $users[0]['oxid'],\n\t\t\t\t'name' => $users[0]['oxfname'].' '.$users[0]['oxlname']\n\t\t\t);\n\t\t} else {\n\t\t\t$_SESSION['msg'] = $mtg_login_failed;\n\t\t}\n\t\t$this->redirect(Flight::request()->data->goto, true);\n\t}",
"public function addUser($login, $password, $mail)\n {\n $dbName = $this->dbConnect();\n $user = $dbName->prepare('INSERT INTO user(login,password,mail,admin) VALUES(?,?,?,0)');\n $affectedLines = $user->execute(array($login, $password, $mail));\n return $affectedLines;\n }",
"public function attemptLogin($user_name, $password){\n $this->setTableName(\"users\");\n\n $where = array(\n \"user_name\" => $user_name,\n \"password\" => $password\n );\n\n $result = $this->select($where);\n\n $this->setTableName(\"userAuth\");\n\n return $result;\n\n }",
"public function setLoginId(): void\n {\n }",
"private function setUserPass(){\n if($this->_request->get(login_user)){\n $this->_user = $this->_request->get(login_user);\n }else{\n $this->_user = $this->getCookie();\n }\n $this->_pass = $this->_request->get('login-password');\n }",
"function conectar(){\n global $Usuario;\n global $Clave;\n global $_SESSION;\n $this->dataOrdenTrabajo->SetUserName($Usuario);\n $this->dataOrdenTrabajo->SetUserPassword($Clave);\n $this->dataOrdenTrabajo->SetDatabaseName($_SESSION['database']);\n $this->dataOrdenTrabajo->setConnected(true);\n }",
"public function setCredentials($username, $password)\n {\n $this->username = $username;\n $this->password = $password;\n }",
"public function run()\n {\n //\n $defaultPassword = Hash::make('admin');\n User::create(['login'=>'admin','password'=>$defaultPassword]);\n }",
"protected function getOtherConnectionUser(array &$return)\n {\n $return['connection_username'] = $this->command->ask(\n 'Provide user\\'s login with <comment>CREATE DATABASE</comment> grants',\n 'root'\n );\n $return['connection_password'] = $this->command->secret('Password');\n }",
"function authenticate($username, $password) {\n\n $Fecha = date(\"Y-m-d\");\n $Fecha = date(\"Y-m-d \");\n\n $username = strtoupper($username);\n\n $query = \"SELECT * FROM authuser WHERE uname='$username' AND passwd=MD5('$password') AND status <> 'inactive'\";\n \n $UpdateRecords = \"UPDATE authuser SET lastlogin = NOW(), logincount = logincount + 1 WHERE uname='$username'\";\n\n\n $ipaddress = '';\n\n if (getenv('HTTP_CLIENT_IP')) {\n $ipaddress = getenv('HTTP_CLIENT_IP');\n } elseif (getenv('HTTP_X_FORWARDED_FOR')) {\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n } elseif (getenv('HTTP_X_FORWARDED')) {\n $ipaddress = getenv('HTTP_X_FORWARDED');\n } elseif (getenv('HTTP_FORWARDED_FOR')) {\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n } elseif (getenv('HTTP_FORWARDED')) {\n $ipaddress = getenv('HTTP_FORWARDED');\n } elseif (getenv('REMOTE_ADDR')) {\n $ipaddress = getenv('REMOTE_ADDR');\n } else {\n $ipaddress = 'UNKNOWN';\n }\n\n //$access =\"SELECT * FROM authuser WHERE uname='$username'\";\n //$lUp = \"INSERT INTO logacceso (id,uname,team,level,fechacc,ipacc) VALUES ('$accesso[id]','$accesso[uname]','$accesso[team]','$accesso[level]',NOW(),'$ipaddress')\";\n $link = new mysqli($this->HOST, $this->USERNAME, $this->PASSWORD, $this->DBNAME);\n if ($link->connect_error) {\n die(\"Error al conectarse a la BD $dbname: \" . $mysqli->connect_error);\n }\n\n $result = $link->query($query);\n\n\n $access1 = $link->query(\"SELECT * FROM authuser WHERE uname='$username'\");\n\n $accesso = $access1->fetch_assoc();\n\n $Upinto = $link->query(\"INSERT INTO logacceso (id,uname,team,level,fechacc,ipacc) VALUES ('$accesso[id]','$accesso[uname]','$accesso[team]','$accesso[level]',NOW(),'$ipaddress')\");\n\n $numrows = $result->num_rows;\n\n $row = $result->fetch_assoc();\n\n $Fec = strtotime($Fecha);\n\n //$FecDias = strtotime(\"-30 days\", $Fec); //Le quito 15 dias\n //s$FecUlt = strtotime($row[feclave]);\n // CHECK IF THERE ARE RESULTS\n // Logic: If the number of rows of the resulting recordset is 0, that means that no\n // match was found. Meaning, wrong username-password combination.\n\n\n if ($numrows == 0) {\n\n return 0;\n\n //}elseif( $FecDias > $FecUlt and $username <> 'Admin' and $username <> 'faz'){\n //}elseif( $FecDias > $FecUlt and $username<>'FAZ' and $username<>'ADMIN'){\n //}elseif( $FecDias > $FecUlt and $username<>'admin'){\n //\treturn 2;\n } else {\n\n $Update = $link->query($UpdateRecords);\n\n return $row;\n }\n }",
"public function addLoginPassword()\n {\n $a = new Conn();\n $a->dbChekMake();\n $gump = new GumpCheck();\n if ($gump->checkPostReg()) {\n $user_login = $_POST['registerLogin'];\n $user_password = $_POST['registerPassword'];\n $user_password2 = $_POST['registerConfirm'];\n $ip = $_POST['ip'];\n $record = 27;\n if ($user_password == $user_password2) {\n if (isset($user_login) || isset($user_password)) {\n if (empty($user_login) || empty($user_password)) {\n echo 'Данные введены неверно';\n return false;\n } else {\n $user_login = strip_tags($user_login);\n $user_password = strip_tags($user_password);\n\n $res = Users::where('username', $user_login)->get();\n\n foreach ($res as $item) {\n $record = $item->username;\n }\n\n if ($record != 27) {\n echo 'Такой пользователь уже существует';\n return false;\n } else {\n $user = new Users();\n $user->username = $user_login;\n $user->password = $user_password;\n $user->ip = $ip;\n $user->save();\n\n $res = Users::where('username', $user_login)->get();\n foreach ($res as $item) {\n $_SESSION['id'] = $item->id;\n }\n\n $this->getInfo();\n return true;\n }\n }\n }\n } else {\n echo 'Пароли не совпадают';\n return false;\n }\n } else {\n return false;\n }\n }",
"public function loginDefaultValues(){\n return [\n 'username' => '',\n 'password' => ''\n ];\n }",
"abstract protected function doLogin();",
"public function getLogin(){\n $statement = \"SELECT * FROM conf_usuario WHERE username=:Username and pass=:Pass and estado=1\";\n $sql = MainModel::getConection()->prepare($statement);\n $sql->bindParam(\":Username\",$this->getUsername());\n $sql->bindParam(\":Pass\",$this->getPass());\n $sql->execute();\n return $sql;\n }",
"function addLogin(){\n $file=fopen($this->fHtaccess,\"w+\");\n fputs($file,\"Order allow,deny\\n\");\n fputs($file,\"Allow from all\\n\");\n fputs($file,\"AuthType \".$this->authType.\"\\n\");\n fputs($file,\"AuthUserFile \".$this->fPasswd.\"\\n\\n\");\n fputs($file,\"AuthName \\\"\".$this->authName.\"\\\"\\n\");\n fputs($file,\"require valid-user\\n\");\n fclose($file);\n }",
"function addLogin(){\n $file=fopen($this->fHtaccess,\"w+\");\n fputs($file,\"Order allow,deny\\n\");\n fputs($file,\"Allow from all\\n\");\n fputs($file,\"AuthType \".$this->authType.\"\\n\");\n fputs($file,\"AuthUserFile \".$this->fPasswd.\"\\n\\n\");\n fputs($file,\"AuthName \\\"\".$this->authName.\"\\\"\\n\");\n fputs($file,\"require valid-user\\n\");\n fclose($file);\n }",
"function login($username, $password = null)\n {\n $f3->get('user')->copyfrom('POST');\n k($f3);\n $user = self::load(\"name = $username\");\n k($user);\n }"
] | [
"0.62306887",
"0.59353936",
"0.5931765",
"0.59302866",
"0.5812434",
"0.578837",
"0.577033",
"0.56749547",
"0.56666666",
"0.56390345",
"0.5611627",
"0.56016934",
"0.5586999",
"0.554716",
"0.5516529",
"0.55131924",
"0.5493036",
"0.54753065",
"0.5469915",
"0.54693675",
"0.54651004",
"0.5464854",
"0.54646814",
"0.5463706",
"0.54570425",
"0.5437953",
"0.54225284",
"0.5411526",
"0.5398886",
"0.53916025",
"0.5380212",
"0.53609866",
"0.5353294",
"0.5352725",
"0.5352725",
"0.53490984",
"0.5336474",
"0.5330331",
"0.5310979",
"0.5298122",
"0.529157",
"0.5278394",
"0.5275729",
"0.5274331",
"0.52661866",
"0.5264154",
"0.52498657",
"0.52466077",
"0.5242888",
"0.524216",
"0.5219197",
"0.5219039",
"0.5204408",
"0.5203351",
"0.52022284",
"0.52009445",
"0.5199796",
"0.5196817",
"0.5195013",
"0.5193687",
"0.5193282",
"0.51930636",
"0.51902246",
"0.5188954",
"0.5187823",
"0.5185818",
"0.5180591",
"0.5178114",
"0.5174247",
"0.51711905",
"0.51676154",
"0.5166758",
"0.5165744",
"0.5152954",
"0.51484823",
"0.51474077",
"0.5137677",
"0.513193",
"0.51307285",
"0.51251066",
"0.512399",
"0.5122786",
"0.5122343",
"0.5120055",
"0.51190835",
"0.51155645",
"0.51151097",
"0.511024",
"0.5106951",
"0.5099954",
"0.5088658",
"0.5087196",
"0.5085459",
"0.50834644",
"0.5080322",
"0.5079685",
"0.5078053",
"0.5075933",
"0.50681305",
"0.50681305",
"0.50672776"
] | 0.0 | -1 |
Returns next database index | public function getNextIndex($domain_id)
{
$sth = self::getConnection()->prepare(
"SELECT `group` FROM `data` WHERE `domain`=:id AND `group` LIKE 'database%' ORDER BY `group` DESC LIMIT 1"
);
$sth->bindValue(":id", $domain_id, PDO::PARAM_INT);
$sth->execute();
$group = $sth->fetchColumn();
$sth->closeCursor();
if (!$group) {
return 0;
}
if (preg_match("/^database(\\d+)$/i", $group, $matches)) {
return $matches[1] + 1;
} else {
return 0;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function getNextIndex();",
"public static function GetDatabaseIndex() {\n\t\t\treturn 1;\n\t\t}",
"public static function GetDatabaseIndex() {\n\t\t\treturn 1;\n\t\t}",
"public function nextId()\n {\n return $this->query(\"SHOW TABLE STATUS LIKE ?\", [$this->table])->fetch()->Auto_increment;\n }",
"static public function getNextPrimaryKey()\r\n\t{\r\n\t\t$oTableCells = Core_Entity::factory(\"Table_Cell\");\r\n\t\t$oTableCells\r\n\t\t\t->queryBuilder()\r\n\t\t\t->clearOrderBy()\r\n\t\t\t->orderBy('id', 'DESC')\r\n\t\t\t->limit(1);\r\n\t\t$aTableCells = $oTableCells->findAll(false);\r\n\t\treturn intval(reset($aTableCells)->id);\r\n\t}",
"function get_next_shipto_id(){\n $next = $this->company_db->query(\"SHOW TABLE STATUS LIKE 'tbl_shipto'\");\n $next = $next->row(0);\n return $next->Auto_increment;\n }",
"private function getNextKey()\n\t{\n\t\tif ($this->store->count() == 0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$pk = 0;\n\t\t\tforeach ($this->store as $key => $value)\n\t\t\t{\n\t\t\t\tassert( 'is_int($key)' );\n\t\t\t\t\n\t\t\t\tif ($key > $pk)\n\t\t\t\t{\n\t\t\t\t\t$pk = $key;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn ++ $pk;\n\t\t}\n\t}",
"public function get_next_id() \n\t{\n\t\treturn (int) $this->db->select('AUTO_INCREMENT')\n\t\t\t\t\t\t\t ->from('information_schema.TABLES')\n\t\t\t\t\t\t\t ->where('TABLE_NAME', $this->_table)\n\t\t\t\t\t\t\t ->where('TABLE_SCHEMA', $this->db->database)\n\t\t\t\t\t\t\t ->get()\n\t\t\t\t\t\t\t ->row()\n\t\t\t\t\t\t\t ->AUTO_INCREMENT;\n\n\t}",
"function get_next_mod_index() {\n\t\t$index = $this->mod_index;\n\t\t$this->mod_index++;\n\t\treturn $index;\n\t}",
"public function nextIndex($table, $indexField)\r\n\t\t{\r\n\t\t\t$this->orderby(\"`{$indexField}` DESC\");\r\n\t\t\t$this->query($table);\r\n\t\t\t$row = $this->fetch();\r\n\t\t\t$this->close();\r\n\t\t\treturn($row[$indexField] + 1);\r\n\t\t}",
"public function getNextSeq(): int\n\t{\n\t\treturn (int) (new \\App\\Db\\Query())->from($this->getTableName())->max('sortorderid') + 1;\n\t}",
"function indexing($keyword) {\n if($this->indexing == NULL) {\n $createTable = false;\n if(!file_exists($this->path.DIRECTORY_SEPARATOR.\"indexing\")) {\n $createTable = true;\n }\n\n $PDO = new PDO(\"sqlite:\".$this->path.\"/indexing\");\n $PDO->setAttribute(PDO::ATTR_ERRMODE,\n PDO::ERRMODE_EXCEPTION);\n\n if($createTable == true) {\n $this->initIndexing($PDO);\n }\n $this->indexing = $PDO;\n unset($PDO);\n\n $stm = $this->indexing->prepare(\"SELECT MAX(`db`) as `db` FROM `balancing`\");\n $stm->execute();\n $row = $stm->fetch(PDO::FETCH_ASSOC);\n if(!isset($row['db'])) {\n $db = 1;\n } elseif($row['db'] <=1 ) {\n $db = 1;\n } else {\n $db = $row['db'];\n }\n\n // check file size\n\n $size = file_exists($this->path.DIRECTORY_SEPARATOR.\"db\".$db) ? filesize($this->path.DIRECTORY_SEPARATOR.\"db\".$db) : 1;\n $size = round($size / 1024 / 1024,1);\n\n\n if($size > $this->max_size) {\n $db = $db + 1;\n }\n $this->currentDB = $db;\n }\n\n // look for keyword\n $stm = $this->indexing->prepare(\"SELECT * FROM `balancing` WHERE `keyword`=:keyword LIMIT 1\");\n $stm->execute(array(\n \":keyword\" => $keyword\n ));\n $row = $stm->fetch(PDO::FETCH_ASSOC);\n if(isset($row['db']) && $row['db'] != \"\") {\n $db = $row['db'];\n } else {\n /*\n * Insert new to Indexing\n */\n $db = $this->currentDB;\n $stm = $this->indexing->prepare(\"INSERT INTO `balancing` (`keyword`,`db`) VALUES(:keyword, :db)\");\n $stm->execute(array(\n \":keyword\" => $keyword,\n \":db\" => $db,\n ));\n }\n\n return $db;\n }",
"function getnext($table){\n\t\t$r=mysql_query(\"SHOW TABLE STATUS LIKE '$table'\");\n\t\t$f=mysql_fetch_array($r);\n\t\treturn $f['Auto_increment'];\n\t}",
"function getNextId() {\n\t\t$query = \"select min( $this->pKey ) from $this->table where $this->pKey > $this->id\";\n\t\treturn $this->getDb()->query( $query )->getFirst();\n\t}",
"public function getNext()\n {\n if( $this->db()->profiling && ( ! $this->_cursor || ! $this->is_iterating() ) )\n {\n $this->cursor();\n $bm = $this->db()->profiler_start(\"Mongo_Database::$this->db\", $this->inspect());\n $this->cursor()->next();\n $this->db()->profiler_stop($bm);\n }\n else\n {\n $this->cursor()->next();\n }\n return $this->current();\n }",
"public function _next_val()\n\t{\n\t\t$res\t=\t $this->db-query( \"SELECT AUTO_INCREMENT next_val FROM information_schema.TABLES WHERE table_name='{$this->table}'\" );\n\t\treturn $res->next_val;\n\t}",
"public function nextIndexLookup($table, $indexField)\r\n\t\t{\r\n\t\t\tif($this->_where != \"\"){\r\n\t\t\t\t$this->orderby(\"`{$indexField}` DESC\");\r\n\t\t\t\t$this->query($table);\r\n\t\t\t\t$row = $this->fetch();\r\n\t\t\t\t$this->close();\r\n\t\t\t\treturn($row[$indexField] + 1);\r\n\t\t\t}\r\n\t\t}",
"public function getNextIndex()\n {\n $line = $this->getLastLine();\n\n if (!strlen($line)) {\n return 1;\n }\n\n $boom = explode(',', $line);\n\n if (count($boom) != 4) {\n throw new Exception(\"invalid number of columns\");\n }\n\n return (int)$boom[0] + 1;\n }",
"public function getNextDocumentNumber() {\n \n }",
"function next_record() {\r\n\t\treturn $this->dbh->next_record();\r\n\t}",
"protected function getNextId()\n {\n return Field::max('id') + 1;\n }",
"public function getNextStartRecordIndex()\n {\n if (!$this->xmlRoot) {\n $this->processData();\n }\n return intval((string)$this->xmlRoot->xpath('/searchRetrieveResponse/nextRecordPosition'));\n }",
"public function getNextID()\n {\n try{\n //define the query to get the next ID\n $this->dbQuery = \"SELECT CustomerID FROM customer\n ORDER BY CustomerID DESC LIMIT 0,1\";\n \n $results = $this->dbObj->query($this->dbQuery);\n \n while($row = mysqli_fetch_array($results))\n {\n return $row['CustomerID'] +1;\n }\n }catch(Exception $e)\n {\n echo $e->getMessage();\n }\n }",
"public function getNext()\n {\n $nextIndex = $this->getIndex() + 1;\n\n return $this->offsetGet($nextIndex);\n }",
"static function lastDb($name) { # last id\n $a=iterator_to_array( M($name)->find( [], [\"_id\"=>1] )->sort([\"_id\" => -1])->limit(1) );\n if (! $a)\n return 0;\n return key($a);\n }",
"public static function fetchNextSortOrder()\n {\n $next = Symphony::Database()->fetchVar(\n \"next\",\n 0,\n \"SELECT\n MAX(p.sortorder) + 1 AS `next`\n FROM\n `tbl_fields` AS p\n LIMIT 1\"\n );\n return ($next ? (int)$next : 1);\n }",
"public function next()\n {\n $this->incrIndex();\n\n return $this->getCurrent();\n }",
"public function next($index=1){\n return $this->results()[$index]; //depends on the version of your PHP server\n //return $this->results[0];\n }",
"public function key()\n {\n $pageSize = $this->getDataProvider()->getPagination()->pageSize;\n\n return $this->getCurrentPage() * $pageSize + $this->getCurrentIndex();\n }",
"private function getNextTransactionID(){\n $db = $this->connectDB();\n $query = \"SELECT MAX(id) as curr_max_id FROM transaction;\";\n $stmt = $db->prepare($query);\n $stmt->execute();\n $stmt->store_result();\n $stmt->bind_result($curr_max_id);\n $stmt->fetch();\n // Return the current largest id plus 1 as the new ID.\n return $curr_max_id + 1;\n }",
"public function index(): int\n {\n return $this->index;\n }",
"public function lead_next_auto_id()\n {\n $result = common_select_values('AUTO_INCREMENT', 'INFORMATION_SCHEMA.TABLES', ' TABLE_SCHEMA = database() AND TABLE_NAME = \"leads\"', 'row');\n return $result; \n }",
"public function next(){\n $this->index ++;\n }",
"public function next()\n\t{\n\t\t// Init a query to the first shard\n\t\tif ($this->query === null)\n\t\t\t$this->nextShard();\n\n\t\tdo\n\t\t{\n\t\t\t$this->query->next();\n\t\t}\n\t\t// Move to the next shard after the last row from the current shard\n\t\twhile (!$this->valid() && $this->nextShard());\n\n\t\t$this->index++;\n\t}",
"public function getNextRecord($table) {\n $this->debugLog($table.':returned:'.$this->schema[$table]['id']);\n return $this->schema[$table]['id'];\n }",
"function nextAutoIncrement($table, $link = 0) {\n $this->link = $link ? $link : $this->link;\n $r = $this->query(\"SHOW TABLE STATUS LIKE '{$table}';\", $this->link); \n if ($r !== FALSE) {\n $row = $this->fetchArray(); \n $this->freeResult($r);\n return $row['Auto_increment']; \n } else {\n return FALSE;\n }\n }",
"public static function getIndex(): int\n {\n return static::$index;\n }",
"public function getPrimaryKey()\n\t{\n $indexes = $this->getIndexes();\n\n foreach ($indexes as $index){\n if ($index['Key_name'] == \"PRIMARY\"){\n return $index;\n }\n }\n\n \t\t\n\t}",
"public function key()\n {\n if(is_null($this->paginationVar))\n return 0;\n return $this->curIndex + $this->paginationVar->GetOffset();\n }",
"public static function loadNextCourseID()\n {\n $conn = SQLConnector::createConn();\n $stat = $conn->prepare(\"SELECT MAX(id) FROM course;\");\n $stat->execute();\n $result = $stat->get_result();\n\n $row = $result->fetch_array(MYSQLI_NUM);\n $id = $row[0] + 1;\n $conn->close();\n return $id;\n\n }",
"public function key(): int\n {\n return $this->index;\n }",
"public function sel_next_prog_id()\n\t{\n\t\t$prog_id = null;\n\t\ttry{\n\t\t\t$t_prog = new Model_T_Prog($this->db, $this->client_id);\n\t\t\t$prog_id = $t_prog->sel_next_id();\n\t\t} catch(Exception $e){\n\t\t\tKohana::$log->add(Log::ERROR, Kohana_Exception::text($e))->write();\n\t\t\t$prog_id = null;\n\t\t}\n\t\treturn $prog_id;\n\t}",
"public static function getKeyIndex(): int\n {\n if (self::$keyIndex == PHP_INT_MAX) {\n self::$keyIndex = 0;\n } else {\n self::$keyIndex++;\n }\n\n return self::$keyIndex;\n }",
"function getNextRecord() { return mysql_fetch_array( $this->recordSet ); }",
"public function sel_next_image_id()\n\t{\n\t\t$image_id = null;\n\t\ttry{\n\t\t\t$m_image = new Model_M_Image($this->db, $this->client_id);\n\t\t\t$image_id = $m_image->sel_next_id();\n\t\t} catch(Exception $e){\n\t\t\tKohana::$log->add(Log::ERROR, Kohana_Exception::text($e))->write();\n\t\t\t$image_id = null;\n\t\t}\n\t\treturn $image_id;\n\t}",
"function get_nextitemrecno($itemID, $nextorprev, $debug = false) {\n\t\t$q = (new QueryBuilder())->table('itemsearch');\n\t\t$expression = $nextorprev == 'next' ? \"MAX(recno) + 1\" : \"MIN(recno) - 1\";\n\t\t$q->field($q->expr($expression));\n\t\t$q->where('itemid', $itemID);\n\t\t$sql = DplusWire::wire('database')->prepare($q->render());\n\n\t\tif ($debug) {\n\t\t\treturn $q->generate_sqlquery($q->params);\n\t\t} else {\n\t\t\t$sql->execute($q->params);\n\t\t\treturn $sql->fetchColumn();\n\t\t}\n\t}",
"function NextId($sequencename=false, $idcolumn=false)\n\t{\n\t\tif (!$sequencename) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$query = \"SELECT \".$sequencename.\".nextval FROM dual\";\n\t\t$nextid = $this->FetchOne($query);\n\t\treturn $nextid;\n\t}",
"protected function _get_next_incrementer() {\n\t\t// Get the old integer\n\t\t$channel_id = $this->EE->input->get('channel_id');\n\t\t$old_number = $this->EE->db->select($this->field_name)\n\t\t\t\t\t\t\t\t ->where('channel_id', $this->EE->input->get('channel_id'))\n\t\t\t\t\t\t\t\t ->order_by('entry_id DESC')\n\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t ->get('channel_data')\n\t\t\t\t\t\t\t\t ->row();\n\t\t\n\t\t// Do we have one?\n\t\tif ($old_number) {\n\t\t\t// Increment\n\t\t\t$new_number = (int)$old_number->{$this->field_name} + 1;\n\t\t} else {\n\t\t\t// Start at 1\n\t\t\t$new_number = 1;\n\t\t}\n\t\t\n\t\t// Return it\n\t\treturn $new_number;\n\t}",
"public function getNextId()\n {\n return $this->oMapper->getNextId();\n }",
"public static function get_next_id($table){\n $result = self::query(\"SHOW TABLE STATUS LIKE '$table'\");\n $rows = self::fetch_assoc($result);\n return $rows['Auto_increment'];\n }",
"function getIndex() ;",
"public function next()\r\n {\r\n if ($this->index < $this->aggregate->size()) {\r\n $this->index = $this->index+1;\r\n }\r\n }",
"function getThisBatchId($db) {\n\t\t$batchId=0;\n\t\t$res=$db->query(\"SELECT MIN(id) as id_min FROM batch\");\n\t\twhile($row=$res->fetch_assoc()) {\n\t\t\t$batchId=$row[\"id_min\"];\n\t\t}\n\t\treturn $batchId+1;\n\t}",
"public function getIdx()\n {\n return $this->get(self::_IDX);\n }",
"public function getNextId() {\n \treturn $this->getNextTerm()->getId();\n }",
"public function getNext()\n {\n return $this->hasNext() ? $this->curPage + 1 : null;\n }",
"public function getNextPageNumber(): int;",
"public function key()\n\t{\n\t\t$pageSize = $this->_dataProvider->getPagination()->getPageSize();\n\t\treturn $this->_currentPage * $pageSize + $this->_currentIndex;\n\t}",
"function gen_ID() {\r\n openDB();\r\n global $db;\r\n $query = \"SELECT lpa_inv_no FROM lpa_invoices ORDER BY lpa_inv_no DESC LIMIT 1\";\r\n $result = $db->query($query);\r\n $row = $result->fetch_assoc();\r\n $ID = (int) $row['lpa_inv_no'];\r\n return $ID + 1;\r\n\r\n}",
"public function key()\n {\n return $this->_currentIndex;\n }",
"public function next()\n {\n $this->index++;\n }",
"function nextResult()\n {\n return $this->dbh->nextResult($this->result);\n }",
"public function key() {\n\t\t$this->checkResultSet();\n\n\t\tif (! is_null($this->keyColumn)) {\n\t\t\t$row = $this->fetchRowAssoc($this->index, true);\n\t\t\treturn $row[$this->keyColumn];\n\t\t}\n\n\t\treturn $this->index;\n\t}",
"public function key(){\n return $this->index;\n }",
"function getfactoryIndex()\n\t{\n\t\t$vendorQry = db(\"select * from factories where name = '$this->factory' limit 1\");\n\t\t$this->factoryIndex = $vendorQry[\"tableIndex\"];\n\t\treturn $vendorQry[\"tableIndex\"];\n\t}",
"public function key(): int\n {\n return $this->_index;\n }",
"public function nextval() {\n\t\t\tif ($this->database->isConnected()) {\n\t\t\t\t$query = \"SELECT \" . $this->schema . \".\" . $this->name . \".NEXTVAL FROM DUAL\";\n\t\t\t\t$stid = $this->database->executeRead($query);\n\t\t\t\t$results = $this->database->getResults($stid);\n\t\t\t\tforeach ($results as $row) {\n\t\t\t\t\treturn $row['NEXTVAL'];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}",
"protected function _getNextEntityId()\n {\n if (!$this->_nextEntityId) {\n /** @var $addressResource \\Magento\\Customer\\Model\\ResourceModel\\Address */\n $addressResource = $this->_addressFactory->create()->getResource();\n $addressTable = $addressResource->getEntityTable();\n $this->_nextEntityId = $this->_resourceHelper->getNextAutoincrement($addressTable);\n }\n return $this->_nextEntityId++;\n }",
"public function nextid()\n {\n $args = func_get_args();\n $this->connect('w');\n return call_user_method_array('nextid', $this->m_current_clusternode, $args);\n }",
"public function next()\n\t{\n\t\t$this->current = $this->runFetch();\n\n\t\tif ($this->current) {\n\t\t\t$this->index++;\n\t\t}\n\t}",
"public static function getNextId()\n\t{\n\t\t$redis = GitHQ\\Bundle\\AbstractController::getRedisClient();\n\t\treturn $redis->incr(self::KEY_SEQUENCE);\n\t}",
"function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'leads'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }",
"function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'leads'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }",
"public function getNewIndex()\n {\n return $this->new_index;\n }",
"function nextid($sequence)\n\t{\n\t\t/* first connect */\n\t\tif ($this->connect('w')==DB_SUCCESS)\n\t\t{\n\n\t\t\t/* lock sequence table */\n\t\t\tif ($this->lock($this->m_seq_table))\n\t\t\t{\n\t\t\t\t/* get sequence number (locked) and increment */\n\t\t\t\t$query = \"SELECT \".$this->m_seq_field.\" FROM \".$this->m_seq_table.\" WHERE \".$this->m_seq_namefield.\" = '$sequence'\";\n\n\t\t\t\t$id = $this->_query($query, true);\n\t\t\t\t$result = @mysqli_fetch_array($id);\n\n\t\t\t\t/* no current value, make one */\n\t\t\t\tif (!is_array($result))\n\t\t\t\t{\n\t\t\t\t\t$query = \"INSERT INTO \".$this->m_seq_table.\" VALUES('$sequence', 1)\";\n\t\t\t\t\t$id = $this->_query($query, true);\n\t\t\t\t\t$this->unlock();\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\n\t\t\t\t/* enter next value */\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$nextid = $result[$this->m_seq_field] + 1;\n\t\t\t\t\t$query = \"UPDATE \".$this->m_seq_table.\" SET \".$this->m_seq_field.\" = '$nextid' WHERE \".$this->m_seq_namefield.\" = '$sequence'\";\n\n\t\t\t\t\t$id = $this->_query($query, true);\n\t\t\t\t\t$this->unlock();\n\t\t\t\t\treturn $nextid;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\n\t\t/* cannot connect */\n\t\telse\n\t\t{\n\t\t\t$this->halt(\"cannot connect to \".$this->m_host);\n\t\t}\n\t}",
"public function get_next_nav_position()\n\t{\n\t\t// get the last record\n\t\t$row = $this->db->order_by('position', 'DESC')->limit(1)->get($this->_table['navigation'])->row();\n\n\t\t// return that record position number +1\n\t\treturn $row->position + 1;\n\t}",
"abstract protected function fetchNextPage(): ?int;",
"public function key()\n\t{\n\t\treturn $this->index;\n\t}",
"public function key()\n\t{\n\t\treturn $this->index;\n\t}",
"public function getNext()\n {\n return self::find()->where(['>', 'id', $this->id])->limit(1)->one();\n }",
"public function key() {\n return $this->currentIndex;\n }",
"public function getDbId(): int\n {\n return $this->dbId;\n }",
"public function nextId(){ }",
"private function _get_next_order()\n\t{\n\t\t$result = $this->order_by('order','desc')->limit(1)->get_all();\n\n\t\tif($result)\n\t\t{\n\n\t\t\t$order = $result[0]->order + 1;\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$order = 0;\n\t\t}\t\n\n\t\treturn $order;\n\t}",
"public function next()\n {\n $row = $this->getRow($this->pointer);\n if($row){\n $this->pointer++;\n }\n return $row;\n }",
"function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'leadtransaction'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }",
"public function get_next_object() { \n\n\t\t$tmp_id = Dba::escape($this->id);\n\t\t$order = \" ORDER BY tmp_playlist_data.id DESC\";\n\n\t\t$sql = \"SELECT tmp_playlist_data.object_id FROM tmp_playlist_data \" . \n\t\t\t\"WHERE tmp_playlist_data.tmp_playlist = '$tmp_id' $order LIMIT 1\";\n\t\t$db_results = Dba::query($sql);\n\n\t\t$results = Dba::fetch_assoc($db_results);\n\n\t\treturn $results['object_id'];\n\n\t}",
"function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'country'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }",
"public function next() {\n $this->index++;\n return $this->valid() ? $this->current() : null;\n }",
"public function getNext() \n {\n $page_next = $this->page_current + 1;\n \n if($this->page_current >= $this->num_pages) {\n\t\t $page_next = $this->num_pages;\n } \n \n return $page_next;\n }",
"function getPrimaryKey() {\n\n $count = $this->find('count');\n $primaryKey = $count + 1;\n\n if ($this->find('count', array('conditions' => array($this->name . '.' . $this->primaryKey => $primaryKey))) > 0) {\n\n $i = (int) $count;\n\n while ($i >= 1) {\n\n $i += 1;\n\n $primaryKey = $i;\n\n $returnValue = $this->find('count', array('conditions' => array($this->name . '.' . $this->primaryKey => $primaryKey)));\n\n if ($returnValue == 0) {\n\n break;\n }\n\n $i++;\n }\n\n return $primaryKey;\n } else {\n\n return $primaryKey;\n }\n }",
"public function getNextInitAppDocNumber(){\n $lastDoc = File::orderBy('id', 'desc')->first();\n\n /*\n In a case where no record is found get 1 as a\n virtual record to generate document number.\n */\n if(is_null($lastDoc)){\n /*\n create an object counter (number) to store document ID and\n initialiaze it to 1.\n */\n $id = File::find(1);\n $number = $id;\n\n //assign and add the number with Doc ID\n $number += File::find(1);\n\n /*\n concatenate BRS-DFT- with the last inserted Doc ID\n that will end with 3 numbers.\n */\n\n return 'BRS-DFT-' . sprintf('%03d', intval($number) + 1);\n\n }else{\n /*\n The document exists then\n create variable number to store document ID\n initialiaze it to 0.\n */\n $number = 0;\n\n //assign and add the number with Doc ID\n $number += $lastDoc->id;\n\n /*\n concatenate BRS-DFT- with the last inserted Doc ID\n that will end with 3 numbers.\n */\n return 'BRS-DFT-' . sprintf('%03d', intval($number) + 1);\n }\n\n }",
"function Next()\n\t{\n\t\t// check the file description\n\t\t// Notice: this function not check the write cache.\n\t\tif (!$this->fd || $this->mode != 'r')\n\t\t{\n\t\t\ttrigger_error(\"BDB::Next(), null db handler or writable.\", E_USER_WARNING);\n\t\t\treturn false;\n\t\t}\n\t\t$idx = $this->trac_idx;\n\t\t$off = $this->trac_off;\n\t\t$size = $idx + 9;\n\t\t$valid = false;\n\t\twhile ($idx < $this->max_klen)\n\t\t{\n\t\t\t// check key_index\n\t\t\tif (!isset($this->key_index[$idx])) { $idx++; continue; }\n\n\t\t\t// load the key_buffer\n\t\t\tif (!isset($this->key_buffer[$idx]) && ($this->key_index[$idx]['len'] > 0))\n\t\t\t{\n\t\t\t\tfseek($this->fd, $this->key_index[$idx]['off'], SEEK_SET);\n\t\t\t\t$this->key_buffer[$idx] = fread($this->fd, $this->key_index[$idx]['len']);\n\t\t\t}\n\n\t\t\tif (isset($this->key_buffer[$idx])\n\t\t\t\t&& (($off + $size) <= strlen($this->key_buffer[$idx])))\n\t\t\t{\n\t\t\t\t$valid = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$idx++;\n\t\t\t$size++;\n\t\t\t$off = 0;\n\t\t}\n\t\tif (!$valid) return false;\n\t\t$this->trac_idx = $idx;\n\t\t$this->trac_off = $off + $size;\n\n\t\t$tmp = unpack('Vdoff/Vdlen/a*key', substr($this->key_buffer[$idx], $off, $size));\n\t\tfseek($this->fd, $tmp['doff'], SEEK_SET);\n\t\t$val = fread($this->fd, $tmp['dlen']);\n\n\t\t// return the entry\n\t\t$ret = array('key' => $tmp['key'], 'value' => $val);\n\t\treturn $ret;\n\t}",
"function LastId($seq='')\n\t{\n\t\tif (!$seq) {\n\t\t\treturn false;\n\t\t}\n\t\t$query = \"SELECT \".$seq.\".currval FROM dual\";\n\t\t$nextid = $this->FetchOne($query);\n\t\treturn $nextid;\n\t}",
"public function nextId() {\n\t}",
"public function next_page(){\n if($this->current_page < $this->number_of_pages()){\n return $this->current_page + 1;\n }\n else{\n return NULL;\n }\n }",
"public function key() {\n\t\t\treturn $this->index;\n\t\t}",
"public function Next()\n {\n //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer\n }",
"public function Next()\n {\n //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer\n }",
"public function Next()\n {\n //TODO: SQL Statement passt nach meiner Meinung nach noch nicht immer\n }"
] | [
"0.71962595",
"0.7149222",
"0.7149222",
"0.6560675",
"0.6496156",
"0.64852816",
"0.6434176",
"0.6415332",
"0.6316891",
"0.626444",
"0.6250046",
"0.61785966",
"0.61587477",
"0.6149129",
"0.6135228",
"0.61343473",
"0.6095417",
"0.6050641",
"0.60472506",
"0.60303247",
"0.6004321",
"0.5985034",
"0.59805155",
"0.59681",
"0.59479797",
"0.5943349",
"0.59287846",
"0.5926453",
"0.59205735",
"0.5901305",
"0.58875734",
"0.5812857",
"0.58103216",
"0.58033544",
"0.5794929",
"0.57767105",
"0.5775494",
"0.5752948",
"0.5743394",
"0.57396674",
"0.5733599",
"0.5726818",
"0.57191044",
"0.5717992",
"0.5714552",
"0.5709145",
"0.5668194",
"0.5664605",
"0.56606406",
"0.5659796",
"0.56475043",
"0.56440544",
"0.5629366",
"0.56164116",
"0.55990976",
"0.5595059",
"0.557068",
"0.55692273",
"0.55640274",
"0.55625105",
"0.5562275",
"0.55547726",
"0.5553198",
"0.55456835",
"0.55430126",
"0.55340564",
"0.55338764",
"0.55326825",
"0.552482",
"0.55237645",
"0.5511147",
"0.55106753",
"0.55106753",
"0.55037063",
"0.549367",
"0.5485822",
"0.5484436",
"0.548039",
"0.548039",
"0.5479648",
"0.546871",
"0.546459",
"0.54464793",
"0.54417294",
"0.5441212",
"0.5434829",
"0.5433853",
"0.54258966",
"0.54242146",
"0.5422988",
"0.54176265",
"0.5413134",
"0.54130834",
"0.54024917",
"0.5392777",
"0.53905934",
"0.53896797",
"0.5386936",
"0.5386936",
"0.5386936"
] | 0.6592692 | 3 |
Updates database login credentials | public function updateDB($dbnum, array $data, $domain_id)
{
$group = "database" . $dbnum;
$data = $this->filterData(
$data,
array(
'Hostname',
'Username',
'Password',
'Database',
'URL',
'dbtype'
)
);
$errors = $this->validate($data);
if ($errors->hasErrors()) {
throw new Validate\Exception("Data is invalid", 0, null, $errors);
}
$sth = self::getConnection()->prepare(
"UPDATE `data` SET `value`=:value WHERE `name`=:name AND `domain`=:id AND `group` LIKE :group"
);
$name = "Database Type";
$value = $data['dbtype'];
$sth->bindParam(":name", $name, PDO::PARAM_STR);
$sth->bindParam(":value", $value, PDO::PARAM_STR);
$sth->bindValue(":id", $domain_id, PDO::PARAM_INT);
$sth->bindValue(":group", $group, PDO::PARAM_STR);
$sth->execute();
$name = "Hostname";
$value = $data['Hostname'];
$sth->execute();
$name = "Username";
$value = $data['Username'];
$sth->execute();
$name = "Password";
$value = $data['Password'];
$sth->execute();
$name = "Database";
$value = $data['Database'];
$sth->execute();
$name = "URL";
$value = $data['URL'];
$sth->execute();
return $this->getDBDetails($domain_id, $dbnum);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function change_db_credentials()\n\t{\n\t\tif ( !isset($_POST['credentials']) ) return;\n\t\t$credentials = file_get_contents('../credentials.php');\n\t\t$permittedVariables = array('DB_NAME','DB_USER','DB_PASSWORD');\n\t\tforeach ($_POST['credentials'] as $credName => $credVal)\n\t\t{\n\t\t\tif ( in_array($credName, $permittedVariables) )\n\t\t\t{\n\t\t\t\t//Sanitize the value before adding it.\n\t\t\t\t$credVal = str_replace(\"'\", '', $credVal);\n\t\t\t\t$credVal = str_replace(\"\\\"\", '', $credVal);\n\t\t\t\t$credentials = replace_credential($credentials, $credName, $credVal);\n\t\t\t}\n\t\t}\n\t\tfile_put_contents('../credentials.php', $credentials);\n\t}",
"public function updateLogin() {\n\t\t$params = array();\n\t\t$params['last_login'] = date('Y-m-d H:i:s');\n\t\t\n\t\t$conditions = array();\n\t\t$conditions['id'] = $this->id;\n\t\t\n\t\t$success = ConnectionFactory::updateTableRowAbsoluteBasic(\"users\", $params, $conditions);\n\t\tif ($success) {\n\t\t\t$this->last_login = $params['last_login'];\n\t\t}\n\t\treturn $success;\n\t}",
"public function update(){\n\t\t$sql = \"update user set pass='\".$this->pass.\"' where id='\".$this->id.\"'\";\n\t\treturn\tExecutor::doit($sql);\n\t}",
"public function updateDatabase(){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Get all of the columns in the database table\n\t\t$columns = static::$columns;\n\t\t//Because we dont want the ID to change, remove the ID from the database\n\t\tunset($columns[array_search('id', $columns)]);\n\t\t//If we had a timecreated and timeupdated column, we would unset the timecreated column here\n\n\t\t//Write an Update Query\n\t\t$query = \"UPDATE \" . static::$tableName . \" SET \";\n\t\t$updatecols = [];\n\t\tforeach ($columns as $column){\n\t\t\tarray_push($updatecols, $column . \"=:\" . $column);\n\t\t}\n\t\t$query .= implode(\",\", $updatecols);\n\t\t$query .= \" WHERE id =:id\";\n\t\t$statement = $db->prepare($query);\n\n\t\tforeach(static::$columns as $column){\n\t\t\t//Hash the password\n\t\t\tif($column === 'password'){\n\t\t\t\t$this->$column = password_hash($this->$column, PASSWORD_DEFAULT);\n\t\t\t}\n\t\t\t$statement->bindValue(\":\".$column, $this->$column);\n\t\t}\n\t\t$statement->execute();\n\t}",
"public function saveToDatabase() {\n if($this->id != 0) {\n $dbResult = System::database()->query('update :table_users \n set `role_id` = :role_id, \n `login` = :login, \n `password` = :password, \n `auth_key` = :auth_key, \n `auth_expire` = :auth_expire, \n `last_login` = :last_login\n where `id` = :id');\n \n $dbResult->bindInt(':id', $this->id);\n $dbResult->bindValue(':auth_key', $this->authKey);\n $dbResult->bindInt(':auth_expire', $this->authExpired);\n $dbResult->bindInt(':last_login', $this->lastLoginTime);\n } else {\n $dbResult = System::database()->query('insert into :table_users (`role_id`, `login`, `password`)\n values (:role_id, :login, :password);');\n }\n $dbResult->bindTable(':table_users', TABLE_USERS);\n $dbResult->bindInt(':role_id', $this->role['id']);\n $dbResult->bindValue(':login', $this->login);\n $dbResult->bindValue(':password', $this->password);\n\n $dbResult->execute();\n }",
"private function setEncryptPassword(){\n // Encode the new users password\n $encrpyt = $this->get('security.password_encoder');\n $password = $encrpyt->encodePassword($this->user, $this->user->getPassword());\n $this->user->setPassword($password);\n }",
"function update_login($new_login, $user_id)\n{\n global $DB_connect;\n\n $statement = $DB_connect->prepare(\"UPDATE db.user set login = :new_login WHERE id = :user_id\");\n $statement->execute(['new_login' => $new_login, 'user_id' => $user_id]);\n $_SESSION['login'] = $new_login;\n}",
"public function updateAuthKey() {\n $user = self::login($this->login, $this->password);\n if($user) {\n $this->authKey = $user->authKey;\n $this->authExpired = $user->authExpired;\n }\n }",
"protected function _updatePassword() {\n\t\tif(!check($this->_userid)) return;\n\t\tif(!check($this->_username)) return;\n\t\tif(!check($this->_newPassword)) return;\n\t\tif($this->_md5Enabled) {\n\t\t\t$data = array(\n\t\t\t\t'userid' => $this->_userid,\n\t\t\t\t'username' => $this->_username,\n\t\t\t\t'newpassword' => $this->_newPassword\n\t\t\t);\n\t\t\t$query = \"UPDATE \"._TBL_MI_.\" SET \"._CLMN_PASSWD_.\" = [dbo].[fn_md5](:newpassword, :username) WHERE \"._CLMN_MEMBID_.\" = :userid\";\n\t\t} else {\n\t\t\t$data = array(\n\t\t\t\t'userid' => $this->_userid,\n\t\t\t\t'newpassword' => $this->_newPassword\n\t\t\t);\n\t\t\t$query = \"UPDATE \"._TBL_MI_.\" SET \"._CLMN_PASSWD_.\" = :newpassword WHERE \"._CLMN_MEMBID_.\" = :userid\";\n\t\t}\n\t\t\n\t\t$result = $this->db->query($query, $data);\n\t\tif(!$result) return;\n\t\t\n\t\treturn true;\n\t}",
"public function userPasswordUpdate() {\n $password = Hash::make($this->request->input(\"new_password\"));\n $updateArray = [\n \"password\" => $password\n ];\n $whereArray = [\n [\"user_id\", '=', $this->request->input(\"user_id\")]\n ];\n $this->usersModel->setTableName(\"cvd_users\");\n $this->usersModel->setInsertUpdateData($updateArray);\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->updateData();\n }",
"public function touchLogin() {\n $this->last_login = date( 'Y-m-d H:i:s' );\n $this->save();\n }",
"function AdminLogin() {\r\n\t\t$this->DB();\r\n\t}",
"public function testUpdateNetworkMerakiAuthUser()\n {\n }",
"function update_pass() {\n\n global $conn;\n\n $stmt = $conn->prepare('\n UPDATE Customer SET Pass = :Pass\n WHERE Customer_id = :Customer_id\n ');\n\n $encrypted_pass = sha1($this->Pass);\n\n $stmt->bindParam(':Pass', $encrypted_pass);\n $stmt->bindParam(':Customer_id', $this->Customer_id);\n\n return $stmt->execute();\n }",
"function p_update_row(\n\t\t\t\t$cod_usuario_pk\t,\n\t\t\t\t$cod_usuario\t,\n\t\t\t\t$txt_login\t\t,\n\t\t\t\t$txt_password\n\t\t){\n\t\t\tglobal $db;\n\t\t\t$query =\"\n\t\t\tupdate \tseg_usuario set\n\t\t\t\t\ttxt_login\t\t= '$txt_login'\t\t,\n\t\t\t\t\ttxt_password\t= password(SHA('$txt_password')),\n\t\t\t\t\tcod_usuario\t\t= '$cod_usuario'\n\t\t\twhere\tcod_usuario_pk\t= $cod_usuario_pk\";\n\t\t\t$db->consultar($query);\t\n\t\t}",
"private function updateLastLogin( $login ){\n $user = $this->userReadDb->findUserEmail($login);\n $this->userWriteDb->updateUserLastLogin($user);\n \n // Store user's information in session\n $container = new Container('MosaicSession');\n $container->userId = $user->getId(); \n $container->userEmail = $user->getEmail();\n $container->isAdmin = $user->getIsAdmin(); \n }",
"public function testUpdateCPasswordNotGiven(): void { }",
"function setDbPassword($sessionID, $password){\r\n\t\tif ($this->userCanSetDbPassword()){\r\n\t\t\t// NOT IMPLEMENTED!!!!\r\n\t\t}\r\n\t}",
"function change_passwd($Username, $old_Password, $new_Password){\n $new_Password = encrypt_pwd($new_Password);\n $SQL = \"UPDATE User SET Password = '$new_Password' WHERE Username='$Username'\";\n mysqli_query($this->db_link, $SQL);\n }",
"public function login()\n\t{\n\t\t//Compute the hash code of the password submited by user\n\t\t$user_password_hash = $this->passwordEncrypt($this->user_info['user_password']);\n\t\t\n\t\t//Do datebase query to get the hash code of the password\n\t\t$db = BFL_Database :: getInstance();\n\t\t$stmt = $db->factory('select `user_id`,`user_password` from '.DB_TABLE_USER.' WHERE `user_name` = :user_name');\n\t\t$stmt->bindParam(':user_name', $this->user_info['user_name']);\n\t\t$stmt->execute();\n\t\t$rs = $stmt->fetch();\n\t\tif (empty($rs))\n\t\t\tthrow new MDL_Exception_User_Passport('user_name');\n\t\t\n\t\tif ($rs['user_password'] != $user_password_hash)\n\t\t\tthrow new MDL_Exception_User_Passport('user_password');\n\n\t\t//Set user session\n\t\t$auth = BFL_ACL :: getInstance();\n\t\t$auth->setUserID($rs['user_id']);\n\t}",
"function update_data($loginHash, $passwordHash){\n $bdd = getPdo();\n $insertmdp = $bdd->prepare(\"UPDATE utilisateurs SET login = ? , password = ? WHERE id = ?\");\n $insertmdp->execute(array($loginHash, $passwordHash, $_SESSION['id'])); \n\n}",
"function dbUpdatePassword($pass)\n {\n $this->password = $pass;\n /* Standard replace does not replace passwords */\n $args = [\n 'password%sql' => array('MD5(%s)', $this->password)\n ];\n dibi::query('UPDATE user SET ', $args, 'WHERE `id`=%i', $this->id);\n }",
"function dbUpdatePassword($pass)\n {\n /* Set the password */\n $this->password = $pass;\n /* Standard replace does not replace passwords */\n $args = [\n 'password%sql' => array('MD5(%s)', $this->password)\n ];\n dibi::query('UPDATE `student` SET ', $args, 'WHERE `id`=%i', $this->id);\n }",
"public static function update_user_light($conn, $login, $login_method, $name, $email, $company, $department, \n $language, $first_login, $is_admin = 0, $timezone = '') \n {\n Ossim_db::check_connection($conn);\n \n $params = array(\n $login_method,\n $name,\n $email,\n $company,\n $department,\n $language,\n $first_login,\n $is_admin\n );\n \n if ($timezone != '')\n {\n $params[] = $timezone;\n }\n \n //print_r($params);\n $query = \"UPDATE users SET login_method=?,name=?,email=?,company=?,department=?,language=?,first_login=?,is_admin=?\".(($timezone != '') ? \",timezone=?\" : '').\" WHERE login='$login'\";\n \n $rs = $conn->Execute($query, $params); \n \n if (!$rs) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n \n return -1;\n } \n \n return 0;\n }",
"public function login() {\n parent::conectarBD();\n\n $queri = parent::query(sprintf(\"select usu_id as codigo, usu_password as senha, \"\n . \"usu_token_sessao as token_sessao, usu_login as login from \"\n . table_prefix . \"usuario where usu_login = '%s' and \"\n . \"usu_password = '%s'\", $this->usu_login, $this->usu_password));\n\n if ($queri) {\n $dados = $queri->fetch_assoc();\n if ($dados) {\n $new_session_id = hash('sha256', $dados['senha'] . time());\n $queri2 = parent::query(\"update \" . table_prefix . \"usuario set usu_token_sessao = '$new_session_id' where usu_id = \" . $dados['codigo']);\n\n if ($queri2) {\n $dados['token_sessao'] = $new_session_id;\n parent::commit();\n parent::desconectarBD();\n return $dados;\n } else {\n parent::rollback();\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n } else {\n parent::desconectarBD();\n return false;\n }\n }",
"function change_password($username, $old_password, $new_password) {\n// return true or false\n\n // if the old password is right\n // change their password to new_password and return true\n // else throw an exception\n login($username, $old_password);\n $conn = db_connect();\n $result = $conn->query(\"update user\n set passwd = '\".$new_password.\"'\n where username = '\".$username.\"'\");\n if (!$result) {\n throw new Exception('Password could not be changed.');\n } else {\n return true; // changed successfully\n }\n}",
"public function setCredentials($login, $password)\n {\n $this->_login = $login;\n $this->_password = $password;\n }",
"public function run()\n {\n \t\\DB::table('credentials')->truncate();\n\n \t\\DB::table('credentials')->insert([\n \t\t[\n \t\t\t'username' => 'thaodoremon',\n \t\t\t'password' => Hash::make('thaodoremon'),\n \t\t],\n \t\t[\n \t\t\t'username' => 'lawliet',\n \t\t\t'password' => Hash::make('1'),\n \t\t],\n \t]);\n }",
"public static function update() {\n if ( isset($_POST['nickname']) ) {\n self::setNickname($_POST['nickname']);\n } \n if ( isset($_POST['password'])\n && isset($_POST['password2'])\n && isset($_POST['passwordold'])\n && !empty($_POST['password'])\n && !empty($_POST['password2'])\n && !empty($_POST['passwordold'])\n && $_POST['password'] == $_POST['password2'] ) {\n \n $passwordold = Helper::hash($_POST['passwordold'].self::getEmail());\n \n $result = Database::getUser(self::getEmail(),$passwordold);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Falsches Passwort!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Falsches Passwort!<br>');\n return;\n }\n \n $password = Helper::hash($_POST['password'].self::getEmail());\n $success = Database::setPassword(self::getId(),$passwordold,$password);\n \n self::setError('Passwort geändert!<br>');\n }\n \n }",
"function mysql_auth_change_password($username,$password)\n{\n $encrypted = crypt($password,'$1$' . strgen(8).'$');\n return dbUpdate(array('password' => $encrypted), 'users', '`username` = ?', array($username));\n}",
"public function update_login_time() {\n\t\t$this->last_login = date('Y-m-d H:i:s');\n\t\t$this->db->update('admin_login', $this, array('id' => 1));\n\t}",
"public function UpdateLastLogin() {\r\n\t\t\t$_SESSION[__CLASS__.$this->intId.'_LastLogin'] = $this->dttLastLogin;\r\n\t\t\t$this->dttLastLogin = new QDateTime(QDateTime::Now);\r\n\t\t}",
"function change_password($db, $service_id, $user, $pass){\n $sql = \"UPDATE servicelogins SET username = ?,password = ? WHERE serviceId = ?\";\n $query = $db->prepare($sql);\n $query->bind_param(\"sss\", $user, $pass, $service_id);\n $query->execute();\n}",
"public function autualizar_dados_login()\n {\n \ttry {\n \t\t \n \t\t$con = FabricaDeConexao::conexao();\n \t\t \n \t\t$sqlquery = 'update usuario set usuario = :usuario,senha=md5(:senha),email = :email where id = :id; ';\n \t\t$stmt->$con-> prepare($sqlquery);\n \t\t$stmt->bindValue(':usuario',$dados->usuario);\n \t\t$stmt->bindValue(':senha',$dados->senha);\n \t\t$stmt->bindValue(':email',$dados->email);\n \t\t$stmt->bindValue(':id',$dados->id);\n \t\t\n \t\t$stmt->execute();\n \t\t$rowaf = $stmt->rowCount();\n \t\treturn $rowaf;\n \t}\n \tcatch (PDOException $ex)\n \t{\n \t\techo \"Erro: \".$ex->getMessage();\n \t}\n }",
"public function update_failed_logins(){\n\n\t}",
"function updatePassword($conn){\r\n\t\t@extract($_REQUEST);\r\n\t\t$update=\"update user set password='\".$password.\"',verified_status=1 where id='\".$_SESSION['userId'].\"'\";\r\n\t\tif($conn->query($update)){\r\n\t\t\t$_SESSION['msg'] =\"Account successfully created. Please login to create and view profiles\";\r\n\t\t\theader('Location:index.php?page=loginForm');\r\n\t\t\texit;\r\n\t\t}\r\n\t}",
"public function update() {\n global $database;\n //$properties = $this->properties();\n $properties = $this->clean_properties();\n $properties_pairs = array();\n foreach ($properties as $key =>$value){\n $properties_pairs[] = \"{$key}='{$value}'\";\n \n }\n \n// $sql = \"UPDATE users SET \";\n $sql = \"UPDATE \" .static::$db_table. \" SET \"; // we use the abstract tables\n $sql .=implode(\",\", $properties_pairs);\n// $sql .=\"username = '\" .$database->escape_string($this->username) .\"', \";\n// $sql .=\"password = '\" .$database->escape_string($this->password) .\"', \";\n// $sql .=\"first_name = '\" .$database->escape_string($this->first_name) .\"', \";\n// $sql .=\"last_name = '\" .$database->escape_string($this->last_name) .\"' \";\n $sql .=\" WHERE id =\" .$database->escape_string($this->id);\n \n // Send the query to a databse using iternally instead of if\n $database->query($sql);\n return (mysqli_affected_rows($database->connection) ==1)? true : false;\n }",
"function update_password()\n {\n }",
"public function updateDb($user) {\n $sql = \"UPDATE users SET password = ?, email = ?, Cash = ? WHERE username = ?\";\n $stmt = $this->dbh->prepare($sql);\n $succ = $stmt->execute(array($user->getPassword(), $user->getEmail(), $user->getCash(), $user->getUsername()));\n }",
"public function update() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"UPDATE users SET mail=?, name=?, password=?, state=? WHERE id = ?\");\n\t\t$stmt->execute(array($this->mail, $this->name, $this->password, $this->state, $this->id));\n\t}",
"function update_password($new_pass, $pivot, $data_from_pivot)\n{\n global $DB_connect;\n $new_pass = password_hash($new_pass, PASSWORD_DEFAULT);\n\n $statement = $DB_connect->prepare(\"UPDATE db.user set password = :password WHERE \" . $pivot . \" = :data_from_pivot\");\n $statement->execute(['password' => $new_pass, 'data_from_pivot' => $data_from_pivot]);\n}",
"public function updateAuthenticates($loginUser, $passwordUser)\n {\n $objDataBase = $this->_connectSuperDataBase();\n\n $arraySetVariable = array('@InLogin', '@InPassword');\n $arrayValueVariable = array(sha1($loginUser), sha1($passwordUser));\n $arrayTypeDataVariable = array(Class_Object::DATA_STRING, Class_Object::DATA_STRING);\n $arraySizeDataVariable = array(50, 50);\n\n $result = $objDataBase->executeUpdateStoreProcedure('change_authenticates', $arraySetVariable,\n $arrayValueVariable, $arrayTypeDataVariable, $arraySizeDataVariable);\n\n $result = $objDataBase->numberRowAffected();\n\n return $result;\n }",
"function update() {\n\n\t\t $data = array(\n\t\t\t 'password' => $this->input->post('password'),\n\t\t\t );\n\t\t $this->db->where('email',$this->input->post('email'));\n\t\t $query= $this->db->update('hbp_adminstrators', $data);\n\t\t $this->load->view('loginAdmin/login',$data);\n }",
"function modificationPass($log, $newPass){\n\n $salt = \"svkgjbclkv;:'çzèitughckqz(-wet845dh12\"; //random_bytes(20);\n $hash = crypt($newPass,$salt);\n\n $bdd = connectDBS();\n $req=$bdd->prepare(\"UPDATE administrateur_site SET pass = :pass WHERE login = :log\");\n $req->execute(array(\":log\" => $log, \":pass\" => $hash));\n $bdd = NULL;\n}",
"protected function changePassword() {}",
"public static function login($username, $password)\r\n {\r\n\t\t//\\Config::load('db', true);\r\n\t\t//$active_db = \\Config::get('db.active');\r\n\t\t//print_r($active_db); \r\n\t\t$call_to_db = \\quotes\\Model_Quote::get_nmi_section($username, $password);exit;\r\n\t\t$sql\t=\t\"SELECT EM1_Username, EM1_EmployeeID_pk from t_Employee1, EM1_Password where EM1_Username = ? and EM1_Password = ?\";\r\n $sql = \\NMI::Db()->prepare($sql);\r\n\t\tprint_r($sql);log::error($sql); \r\n\t\t\r\n $stmt->execute(array($username,$password));\r\n $meta = $stmt->fetch();\r\n print_r($meta);exit;\r\n foreach ($meta as $u)\r\n {\r\n $user_id = $u['EM1_EmployeeID_pk'];\r\n $user_name = $u['EM1_Username'];\r\n\t\t $password = $u['EM1_Password'];\r\n }\r\n\t\t\r\n \\Session::set('user_id', $user_id);\r\n\t\t\\Session::set('username', $username);\r\n\t\t\\Session::set('password', $password);\r\n\t\t\\Session::set('authed', 'validated');\r\n\t\t\r\n\t\tif(count($user>0)){return 1;}else{return 0;}\r\n }",
"public function testUpdatePasswordNotGiven(): void { }",
"function authenticate($username, $password) {\n\n $Fecha = date(\"Y-m-d\");\n $Fecha = date(\"Y-m-d \");\n\n $username = strtoupper($username);\n\n $query = \"SELECT * FROM authuser WHERE uname='$username' AND passwd=MD5('$password') AND status <> 'inactive'\";\n \n $UpdateRecords = \"UPDATE authuser SET lastlogin = NOW(), logincount = logincount + 1 WHERE uname='$username'\";\n\n\n $ipaddress = '';\n\n if (getenv('HTTP_CLIENT_IP')) {\n $ipaddress = getenv('HTTP_CLIENT_IP');\n } elseif (getenv('HTTP_X_FORWARDED_FOR')) {\n $ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n } elseif (getenv('HTTP_X_FORWARDED')) {\n $ipaddress = getenv('HTTP_X_FORWARDED');\n } elseif (getenv('HTTP_FORWARDED_FOR')) {\n $ipaddress = getenv('HTTP_FORWARDED_FOR');\n } elseif (getenv('HTTP_FORWARDED')) {\n $ipaddress = getenv('HTTP_FORWARDED');\n } elseif (getenv('REMOTE_ADDR')) {\n $ipaddress = getenv('REMOTE_ADDR');\n } else {\n $ipaddress = 'UNKNOWN';\n }\n\n //$access =\"SELECT * FROM authuser WHERE uname='$username'\";\n //$lUp = \"INSERT INTO logacceso (id,uname,team,level,fechacc,ipacc) VALUES ('$accesso[id]','$accesso[uname]','$accesso[team]','$accesso[level]',NOW(),'$ipaddress')\";\n $link = new mysqli($this->HOST, $this->USERNAME, $this->PASSWORD, $this->DBNAME);\n if ($link->connect_error) {\n die(\"Error al conectarse a la BD $dbname: \" . $mysqli->connect_error);\n }\n\n $result = $link->query($query);\n\n\n $access1 = $link->query(\"SELECT * FROM authuser WHERE uname='$username'\");\n\n $accesso = $access1->fetch_assoc();\n\n $Upinto = $link->query(\"INSERT INTO logacceso (id,uname,team,level,fechacc,ipacc) VALUES ('$accesso[id]','$accesso[uname]','$accesso[team]','$accesso[level]',NOW(),'$ipaddress')\");\n\n $numrows = $result->num_rows;\n\n $row = $result->fetch_assoc();\n\n $Fec = strtotime($Fecha);\n\n //$FecDias = strtotime(\"-30 days\", $Fec); //Le quito 15 dias\n //s$FecUlt = strtotime($row[feclave]);\n // CHECK IF THERE ARE RESULTS\n // Logic: If the number of rows of the resulting recordset is 0, that means that no\n // match was found. Meaning, wrong username-password combination.\n\n\n if ($numrows == 0) {\n\n return 0;\n\n //}elseif( $FecDias > $FecUlt and $username <> 'Admin' and $username <> 'faz'){\n //}elseif( $FecDias > $FecUlt and $username<>'FAZ' and $username<>'ADMIN'){\n //}elseif( $FecDias > $FecUlt and $username<>'admin'){\n //\treturn 2;\n } else {\n\n $Update = $link->query($UpdateRecords);\n\n return $row;\n }\n }",
"function setCredentials($username, $password)\n {\n $this->username = $username;\n $this->password = $password;\n }",
"public function setPass($request)\r\n {\r\n $params = [\r\n 'Password' => password_hash($request['password'], PASSWORD_DEFAULT),\r\n ];\r\n \r\n \r\n $this->primary = 'Activation';\r\n /*\r\n * Update row in user table where Activativon ==$request['activateCode'] with new password (hash code)\r\n */\r\n $this->update($request['activateCode'], $params);\r\n\r\n }",
"public function updateDb()\n {\n\n // make sure this is a valid new entry\n if ($this->isValid()) {\n\n // check for duplicate\n $vals = sprintf(\"Level = %d\",$this->level);\n $sql = \" update Admins set $vals where Email = '$this->email';\";\n Dbc::getReader()->Exec($sql);\n }\n else\n print \"<br> Invalid entry. STOP! ($sql)<br>\";\n }",
"public function UpdateNewUser($old_login, $login, $email, $password, $confirmPW){\n\n $login = htmlspecialchars(trim($login));\n $email = htmlspecialchars(trim($email));\n $password = htmlspecialchars(trim($password));\n $confirmPW = htmlspecialchars(trim($confirmPW));\n\n if (!empty($login) && !empty($email) && !empty($password) && !empty($confirmPW)){\n $logLength = strlen($login);\n $passLength = strlen($password);\n $confirmLength = strlen($confirmPW);\n $mailLength = strlen($email);\n\n if (($logLength >=5) && ($passLength >=5) && ($logLength >=5) && ($logLength >=5)) {\n $select = $this->db->prepare(\"SELECT * FROM utilisateurs WHERE login = :login\");\n $select->bindValue(\":login\", $old_login);\n $select->execute();\n $fetch = $select->fetch();\n\n var_dump($old_login);\n\n if ($confirmPW==$password) {\n $cryptedpass = password_hash($password, PASSWORD_BCRYPT);\n $update = ($this->db)->prepare(\"UPDATE utilisateurs SET login = :login, password = :cryptedpass, email= :mail WHERE id = :old_login\");\n $update->bindParam(\":old_login\", $old_login, PDO::PARAM_INT);\n $update->bindParam(\":login\", $login, PDO::PARAM_STR);\n $update->bindParam(\":cryptedpass\",$cryptedpass, PDO::PARAM_STR);\n $update->bindParam(\":mail\",$email, PDO::PARAM_STR);\n var_dump($login);\n $update->execute();\n }\n else $error_log=\"Confirmation du mot de passe incorrect\";\n }\n else $error_log = \"Veuillez insérer au moins 5 caractères dans chaques champs\";\n }\n else {\n $error_log = \"veuillez remplir les champs\";\n }\n if (isset ($error_log)) {\n return $error_log;\n }\n }",
"public function init_credentials()\n\t{\n\t\tif($this->get_session('admin') != null)\n\t\t{\n\t\t\t$this->credentials['admin'] \t\t\t= $this->get_session('admin');\n\t\t\t$this->credentials['grupo_admin'] \t\t= $this->get_session('admin_grupo');\n\t\t\t$this->credentials['permissoes_admin'] \t= $this->get_session('admin_permissoes');\n\t\t\t\n\t\t\t$this->credentials['workspace_id'] \t\t= $this->get_session('workspace_id');\n\t\t\t$this->credentials['workspace_nome']\t= $this->get_session('workspace_nome');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->credentials = null;\n\t\t}\n\t}",
"function update_password() {\n\t\t$old_password = $_POST['old_password'];\n\t\t$new_password = $_POST['new_password'];\n\t\tif (!empty($old_password) && !empty($new_password)) {\n\t\t\t$admin_records = $this -> conn -> get_table_row_byidvalue('pg_track_admin', 'admin_password', md5($old_password));\n\t\t\tif (!empty($admin_records)) {\n\t\t\t\t$data['admin_password'] = md5($new_password);\n\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('pg_track_admin', 'admin_status', 1, $data);\n\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Password changed successfully\");\n\t\t\t} else {\n\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid Old Password\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\", 'old_password' => $old_password, 'new_password' => $new_password);\n\t\t}\n\t\techo $this -> json($post);\n\t}",
"public function run()\n {\n // DB::table('users')->where('email', '[email protected]')->update(['password' => '789']);\n\n }",
"public function executeLogin()\n {\n }",
"public function changeLoggedUserInfo() {\n try {\n /* Check if for the empty or null id, username and password parameters */\n if (isset($_POST[\"id\"]) && isset($_POST[\"username\"]) && isset($_POST[\"password\"]) && isset($_POST[\"email\"])) {\n // Get the id, username and password parameters from POST request\n $form_data = array(\n ':id' => $_POST[\"id\"],\n ':username' => $_POST[\"username\"],\n ':password' => $_POST[\"password\"],\n ':email' => $_POST[\"email\"]\n );\n // Check for existent data in Database\n $query = \"\n select access\n from tb_user \n where id = ?\n \";\n // Create object to connect to MySQL using PDO\n $mysqlPDO = new MySQLPDO();\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameter id\n $statement->execute([$form_data[':id']]);\n // Get affect rows in associative array\n $row = $statement->fetch(PDO::FETCH_ASSOC);\n // Check if any affected row\n if ($row) {\n // Create a SQL query to update the existent user with a new username and password for this passed id\n $query = \"\n update tb_user\n set username = :username, \n password = :password, \n email = :email\n where id = :id\n \";\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameter id, username and password\n $statement->execute($form_data);\n // Check if any affected row\n if ($statement->rowCount()) {\n // Check for open session\n if (isset($_SESSION['views'])) {\n // Update new logged user info into session\n $_SESSION[$_SESSION['views'].'id'] = $form_data[':id'];\n $_SESSION[$_SESSION['views'].'username'] = $form_data[':username'];\n $_SESSION[$_SESSION['views'].'password'] = $form_data[':password'];\n $_SESSION[$_SESSION['views'].'email'] = $form_data[':email'];\n $_SESSION[$_SESSION['views'].'access'] = $row['access'];\n // data[] is a associative array that return json\n $data[] = array('result' => '1');\n } else {\n $data[] = array('result' => 'There is no such session available!');\n }\n } else {\n $data[] = array('result' => 'No operations performed on the database!');\n }\n } else {\n $data[] = array('result' => 'Nvalid user id!');\n }\n } else {\n // Check for missing parameters\n if (!isset($_POST[\"id\"]) && !isset($_POST[\"username\"]) && !isset($_POST[\"password\"]) && !isset($_POST[\"email\"])) {\n $data[] = array('result' => 'All missing parameters for changing the authenticated user data!');\n } elseif (!isset($_POST[\"id\"])) {\n $data[] = array('result' => 'Missing id parameter !!');\n } elseif (!isset($_POST[\"username\"])) {\n $data[] = array('result' => 'Missing username parameter!!');\n } elseif (!isset($_POST[\"password\"])) {\n $data[] = array('result' => 'Missing password parameter!!');\n } else {\n $data[] = array('result' => 'Missing email parameter !!');\n }\n }\n return $data;\n } catch (PDOException $e) {\n die(\"Error message: \" . $e->getMessage());\n }\n }",
"public function password_update_by_name($username, $randpwd)\n {\n\t $query = \"UPDATE \".$this->db_table_prefix . \"users SET password='\".md5($randpwd).\"' WHERE username = '\".$username.\"'\";\n \n $result = $this->commonDatabaseAction($query);\n //echo $query; exit;\n if ($this->sqlAffected > 0)\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n}",
"public function updateLoginCredentials($currentUsername, $currentPassword, $newUsername, $newPassword)\n {\n $service = craft()->tobiasAx_userConnector;\n $request = $service->updateLoginCredentials($currentUsername, $currentPassword, $newUsername, $newPassword);\n $errorMessage = 'Error updating login credentials. ';\n\n try {\n $service->sendRequest($request);\n } catch (Exception $e) {\n $exception = new Exception($errorMessage.Craft::t(static::UNKNOWN_ERROR, ['message' => $e->getMessage()]), TobiasAX_UserError::UNKOWN, $e);\n\n if (stristr($e->getMessage(), static::EXCEPTION_INVALID_LOGIN)) {\n $exception = new TobiasAx_SoapException($errorMessage.static::ERROR_INVALID_CREDENTIALS, TobiasAX_UserError::INVALID_CREDENTIALS, $e);\n } elseif (stristr($e->getMessage(), static::EXCEPTION_INVALID_PASSWORD_CREDENTIAL)) {\n $exception = new TobiasAx_SoapException($errorMessage.static::ERROR_INVALID_PASSWORD, TobiasAX_UserError::INVALID_PASSWORD, $e);\n }\n\n throw $exception;\n }\n }",
"function User_Changepass(){\r\n\t\tif( ($token = Str_filter($_POST['token'])) && ($old_password = Str_filter($_POST['old_password'])) && ($new_password = Str_filter($_POST['new_password'])) ){\r\n\t\t\tif($username = AccessToken_Getter($token)){\r\n\t\t\t\tif($user = Mongodb_Reader(\"todo_users\",array(\"username\" => $username),1)){\t\t\t\t\r\n\t\t\t\t\tif(md5($old_password) == $user['password']){\r\n\t\t\t\t\t\tMongodb_Updater(\"todo_users\",array(\"username\" => $username),array(\"password\" => md5($new_password)));\r\n\t\t\t\t\t\t$res = Return_Error(false,0,\"修改成功\",array(\"username\" => $username));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$res = Return_Error(true,6,\"密码不正确\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$res = Return_Error(true,5,\"该用户不存在\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$res = Return_Error(true,7,\"token无效或登录超时\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$res = Return_Error(true,4,\"提交的数据为空\");\r\n\t\t}\r\n\t\techo $res;\r\n\t}",
"public function run()\n {\n //\n DB::table('users')->where('id',1)->update([\n \t'username'=>'hoangnguyen',\n \t'password'=>'lts177101'\n ]);\n }",
"function update_Admin($UserName, $passwd, $Name, $Addr, $Email, $Admin) {\r\n// the database to new details in arguments\r\n\r\n $conn = db_connect();\r\n\r\n $query = \"update Users2\r\n set UserName= '\".$UserName.\"',\r\n Password = sha1('\".$passwd.\"'),\r\n Name = '\".$Name.\"',\r\n Addr = '\".$Addr.\"',\r\n Email = '\".$Email.\"'\r\n IsAdmin = FALSE\r\n where UserName = '\".$UserName.\"'\";\r\n \r\n \r\n \r\n\r\n\r\n $result = @$conn->query($query);\r\n if (!$result) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}",
"function changepass_firsttime()\n {\n $userId = $this->userInfo('user_id');\n \n $result = $this->update('user', array('password' => $this->value('password'), 'modified' => date('Y-m-d H:i:s')), \" user_id = \".$userId);\n \n if($result === TRUE)\n {\n //this will prevent user from being logged out automatically. (as it happens in old implementation)\n $_SESSION['password'] = $this->value('password');\n \n //update the patient_history table with \"password change\" action to 'complete'\n $data = array(\n 'patient_id' => $userId,\n 'action_type' => 'first time login',\n 'action' => 'password change', \n 'action_status' => 'complete',\n 'action_time' => date('Y-m-d H:i:s')\n );\n $this->insert('patient_history', $data);\n \n echo \"{success:true, message:'Password updated successfully'}\";\n }\n else\n {\n echo \"{success:false, message:'Password update failure'}\";\n }\n }",
"function update($conn)\n{\n $response[\"loggedIn\"] = getSessionValue(\"user\", \"\") != \"\";\n if (!$response[\"loggedIn\"])\n {\n $response[\"error\"] = \"You must login to edit your user account.\";\n return $response;\n } \n \n // get the logged in user...\n $userID = getSessionValue(\"user\", \"\")[\"userID\"];\n \n // validate input values...\n $userName = getValue(\"userName\", \"\");\n if ($userName == \"\")\n {\n $response[\"error\"] = \"Username is required.\";\n return $response;\n }\n $userFullName = getValue(\"userFullName\", \"\");\n if ($userFullName == \"\")\n {\n $response[\"error\"] = \"User's full name is required.\";\n return $response;\n }\n $userPass = getValue(\"userPass\", \"\");\n if (strlen($userPass) < 8 || strlen($userPass) > 20)\n {\n $response[\"error\"] = \"Password is required and must be at least 8 and no more than 20 characters.\";\n return $response;\n }\n \n // make sure the user exists...\n $stmt = $conn->prepare(\"SELECT USER_ID FROM USER WHERE USER_ID = ?\");\n $stmt->bind_param(\"i\", $userID);\n $stmt->execute();\n if (!$stmt->fetch()) \n {\n $response[\"error\"] = sprintf(\"User %d does not exist.\", $userID);\n return $response;\n }\n $stmt->close();\n\n // hash the password...\n $userPass = password_hash($userPass, PASSWORD_DEFAULT);\n\n // update the user...\n $stmt = $conn->prepare(\"UPDATE USER SET USER_NAME = ?, USER_FULLNAME = ?, USER_PASSWORD = ? WHERE USER_ID = ?\");\n $stmt->bind_param(\"sssi\", $userName, $userFullName, $userPass, $userID);\n $stmt->execute();\n\n // return response...\n $user[\"userID\"] = $userID;\n $user[\"userName\"] = $userName;\n $user[\"userFullName\"] = $userFullName;\n setSessionValue(\"user\", $user);\n $response[\"user\"] = $user;\n\n return $response;\n}",
"protected function update()\n {\n $update = 'UPDATE users SET first_name = :first_name, last_name = :last_name,\n email = :email, password = :password WHERE id = :id';\n $statement = self::$dbc->prepare($update);\n foreach ($this->attributes as $key => $value) {\n $statement->bindValue(\":$key\", $value, PDO::PARAM_STR);\n }\n $statement->execute();\n }",
"function SetPassword ( $p )\n {\n $this->username = isset( $_SESSION [ \"username\" ] ) ? sanitize_string( $_SESSION [ \"username\" ] ) : null;\n if ( !$this->username ) {\n $this->username = isset( $_COOKIE [ \"username\" ] ) ? sanitize_string( $_COOKIE [ \"username\" ] ) : null;\n }\n $this->mongo->setCollection( COLLECTION_ADMINS );\n $this->mongo->dataUpdate( array( \"username\" => $this->username ), array( '$set' => array( \"password\" => sha1( $p ) ) ) );\n }",
"public function setLoginId(): void\n {\n }",
"public function change() {\n $handle = $_POST['handle'];\n $new_password = $_POST['password'];\n $hashed_password = sha1($new_password);\n $this->db->where('handle', $handle);\n $this->db->update('user', array('password' => $hashed_password));\n echo \"success\";\n }",
"public function update($login, $password){\n\n\t\t\t$this->setDeslogim($login);\n\t\t\t$this->setDessenha($password);\n\n\t\t\t$sql = new sql();\n\n\t\t\t$sql->query(\"UPDATE tb_usuarios SET deslogim= :LOGIN, dessenha= :PASSWORD WHERE idusuario= :ID\",array(\n\t\t\t\t\":LOGIN\"=>$this->getDeslogim(),\n\t\t\t\t\":PASSWORD\"=>$this->getDessenha(),\n\t\t\t\t\":ID\"=>$this->getIdusuario()\n\t\t\t));\n\t\t}",
"function updateUserInfo($id, $username, $pass, $first, $last, $email) {\n global $db;\n $pass_hash = password_hash($pass, PASSWORD_DEFAULT);\n\n $query = \"UPDATE user SET username=:username, pass=:pass_hash, first=:first, last=:last, email=:email WHERE id=:id\"; \n $statement = $db->prepare($query);\n $statement->bindValue(':username', $username);\n $statement->bindValue(':pass_hash', $pass_hash);\n $statement->bindValue(':first', $first);\n $statement->bindValue(':last', $last);\n $statement->bindValue(':id', $id); \n $statement->bindValue(':email', $email); \n $statement->execute();\n $results = $statement->fetch();\n $statement->closeCursor();\n return $results;\n}",
"private function update(){\n\t\t$q = Queries::update($this->authkey);\n\t\t$this->internalQuery($q);\n\t}",
"private function login(){\n \n }",
"public function changePassword($username, $password);",
"public function update($login,$password){\n\t\t$this->setDeslogin($login);\n\t\t$this->setDessenha($password);\n\t\t$model=new Model();\n\t\t$model->query(\"UPDATE tb_usuarios SET deslogin=:LOGIN AND dessenha=:PASSWORD WHERE idusuario=:ID\",array(\":LOGIN\"=>$this->getDeslogin(),\":PASSWORD\"=>$this->getDessenha(),\":ID\"=>$this->getIdusuario()));\n\n\t}",
"public function updateKeepLogin(){\n if(Event::checkEventCondition(EventType::KeepLogin)) { \n $Today = $_SERVER['REQUEST_TIME']; \n $NumCanLogin = $this->getNumCanLogin();\n $ConfigGift = Common::getConfig(\"KeepLogin_Gift\");\n $NumConfigGift = count($ConfigGift);\n if($NumCanLogin <= $NumConfigGift){\n if(count($this->Status) <1) { // login first \n $this->NumCurrentLogin = 1; \n $this->Status[$this->NumCurrentLogin] = 1; \n \n } else { // else \n $NumDay = $this->getNumberDays($this->LastLoginTime,$Today); \n if($NumDay >1){ //\n \n $this->NumCurrentLogin += 1; \n if($this->NumCurrentLogin> $NumCanLogin) $this->NumCurrentLogin = $NumCanLogin; \n if(!isset($this->Status[$this->NumCurrentLogin]) ) {\n $this->Status[$this->NumCurrentLogin] = 1; \n } \n } \n } \n $this->LastLoginTime = $Today;\n } else {\n $this->NumCurrentLogin = 0; \n } \n $this->save();\n }\n }",
"static function updateUser() : string\n {\n return \"UPDATE users\n SET nickname = :nickname, password = :password, type = :type, mail = :mail\n WHERE id = :id;\";\n }",
"public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}",
"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 }",
"function modify_user($username, $password, $team, $level, $status, $msj) {\n\n $Fecha = date(\"Y-m-d\");\n\n\n // If $password is blank, make no changes to the current password\n\n if (trim($password == '')) {\n\n $qUpdate = \"UPDATE authuser SET team='$team', level='$level', status='$status',feclave='$Fecha',msj='$msj' WHERE uname='$username'\";\n } else {\n\n $qUpdate = \"UPDATE authuser SET passwd=MD5('$password'), team='$team', level='$level',\n status='$status',feclave='$Fecha',msj='$msj'\n\t\t\t\t\t WHERE uname='$username'\";\n }\n\n\n\n if (trim($level) == \"\") {\n\n return \"blank level\";\n } elseif (($username == \"sa\" AND $status == \"inactive\")) {\n\n return \"sa cannot be inactivated\";\n } elseif (($username == \"admin\" AND $status == \"inactive\")) {\n\n return \"admin cannot be inactivated\";\n } else {\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n $SelectedDB = mysql_select_db($this->DBNAME);\n\n $result = mysql_query($qUpdate);\n\n return 1;\n }\n }",
"private function update() {\n\n if (isset($_POST['sitename']) && isset($_POST['siteemail']) && isset($_POST['user_name'])) {\n\n function user_name_check($username) {\n return !preg_match(\"/^[-0-9A-Z_@\\s]+$/i\", $username);\n }\n\n self::$siteData = $this->validate_SiteData();\n\n self::$userData = $this->validate_UserData();\n\n if (self::$userData['password1'] == self::$userData['admin_password1']) {\n \\defender::stop();\n addNotice('danger', self::$locale['setup_5016']);\n }\n\n if (\\defender::safe()) {\n\n $user_auth = new PasswordAuth(self::INSTALLER_ALGO);\n\n $user_auth->inputNewPassword = self::$userData['password1'];\n $user_auth->inputNewPassword2 = self::$userData['password2'];\n\n switch ($user_auth->isValidNewPassword()) {\n default:\n self::$userData['user_password'] = $user_auth->getNewHash();\n self::$userData['user_salt'] = $user_auth->getNewSalt();\n break;\n case 2:\n \\defender::stop();\n \\defender::setInputError('password2');\n addNotice('danger', self::$locale['setup_5012']);\n\n break;\n case 3:\n \\defender::stop();\n \\defender::setInputError('password1');\n addNotice('danger', self::$locale['setup_5013']);\n break;\n }\n\n $admin_auth = new \\PasswordAuth(self::INSTALLER_ALGO);\n $admin_auth->inputNewPassword = self::$userData['admin_password1'];\n $admin_auth->inputNewPassword2 = self::$userData['admin_password2'];\n switch ($admin_auth->isValidNewPassword()) {\n default:\n self::$userData['user_admin_password'] = $admin_auth->getNewHash();\n self::$userData['user_admin_salt'] = $admin_auth->getNewSalt();\n break;\n case 2:\n \\defender::stop();\n \\defender::setInputError('admin_password2');\n addNotice('danger', self::$locale['setup_5015']);\n break;\n case 3:\n \\defender::stop();\n \\defender::setInputError('admin_password1');\n addNotice('danger', self::$locale['setup_5017']);\n break;\n }\n\n if (\\defender::safe()) {\n\n self::$userData['user_timezone'] = self::$siteData['default_timezone'];\n $batch_core = Batch_Core::getInstance();\n // Create Super Admin\n if (dbcount(\"(user_id)\", DB_PREFIX.\"users\", \"user_id='1'\")) {\n self::$userData['user_id'] = 1;\n dbquery_insert(DB_PREFIX.\"users\", self::$userData, 'update');\n } else {\n dbquery_insert(DB_PREFIX.\"users\", self::$userData, 'save');\n }\n $enabled_lang = implode('.', self::$siteData['enabled_languages']);\n // Update Site Settings\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".self::$siteData['sitename'].\"' WHERE settings_name='sitename'\");\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".self::$siteData['siteemail'].\"' WHERE settings_name='siteemail'\");\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".$enabled_lang.\"' WHERE settings_name='enabled_languages'\");\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".self::$siteData['default_timezone'].\"' WHERE settings_name='default_timezone'\");\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".self::$siteData['default_timezone'].\"' WHERE settings_name='timeoffset'\");\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".self::$siteData['default_timezone'].\"' WHERE settings_name='serveroffset'\");\n dbquery(\"UPDATE \".DB_PREFIX.\"settings SET settings_value='\".self::$siteData['siteusername'].\"' WHERE settings_name='siteusername'\");\n\n if (strpos($enabled_lang, '.')) {\n\n // Update all existing panel and update new enabled language values\n dbquery(\"UPDATE \".DB_PREFIX.\"panels SET panel_languages='\".$enabled_lang.\"'\");\n\n $result = dbquery(\"SELECT link_language FROM \".DB_PREFIX.\"site_links GROUP BY link_language ASC\");\n $installed_languages = [];\n if (dbrows($result) > 0) {\n while ($data = dbarray($result)) {\n $installed_languages[] = $data['link_language'];\n }\n }\n\n $langDiff = array_diff(self::$siteData['enabled_languages'], $installed_languages);\n if (!empty($langDiff)) {\n foreach ($langDiff as $language) {\n $sql_inserts = $batch_core::batch_insert_rows('site_links', $language);\n if ($result = dbquery($sql_inserts)) {\n continue;\n }\n }\n }\n unset($installed_languages);\n\n $result = dbquery(\"SELECT admin_language FROM \".DB_PREFIX.\"admin GROUP BY admin_language ASC\");\n $installed_languages = [];\n if (dbrows($result) > 0) {\n while ($data = dbarray($result)) {\n $installed_languages[] = $data['admin_language'];\n }\n }\n\n $langDiff = array_diff(self::$siteData['enabled_languages'], $installed_languages);\n if (!empty($langDiff)) {\n foreach ($langDiff as $language) {\n $sql_inserts = $batch_core::batch_insert_rows('admin', $language);\n if ($result = dbquery($sql_inserts)) {\n continue;\n }\n }\n }\n unset($installed_languages);\n\n /*\n * Need to run another check with email_templates because installed languages might be different.\n */\n $result = dbquery(\"SELECT template_language FROM \".DB_PREFIX.\"email_templates GROUP BY template_language ASC\");\n $installed_languages = [];\n if (dbrows($result) > 0) {\n while ($data = dbarray($result)) {\n $installed_languages[] = $data['template_language'];\n }\n }\n\n $langDiff = array_diff(self::$siteData['enabled_languages'], $installed_languages);\n if (!empty($langDiff)) {\n\n foreach ($langDiff as $language) {\n $sql_inserts = $batch_core::batch_insert_rows('email_templates', $language);\n if ($result = dbquery($sql_inserts)) {\n continue;\n }\n }\n\n // Update all UF Cat Fields\n $ufc_result = dbquery(\"SELECT field_cat_id, field_cat_name FROM \".DB_PREFIX.\"user_field_cats\");\n if (dbrows($result) && is_array($langDiff) && count($langDiff)) {\n $locale_keys = array_flip(self::$siteData['enabled_languages']);\n while ($ufc_data = dbarray($ufc_result)) {\n $category_name[self::$localeset] = $ufc_data['field_cat_name'];\n // get current locale key\n if (isset($locale_keys[$ufc_data['field_cat_name']])) {\n $lang_key = $locale_keys[$ufc_data['field_cat_name']];\n foreach ($langDiff as $language) {\n $locale = [];\n include LOCALE.$language.'/setup.php';\n $category_name[$language] = $locale[$lang_key]; // bind language = translations value\n }\n }\n if (!empty($category_name)) {\n $new_field_cat_name = serialize($category_name);\n dbquery(\"UPDATE \".DB_PREFIX.\"user_field_cats SET field_cat_name=:field_cat_value WHERE field_cat_id=:field_cat_id\", [':field_cat_value' => $new_field_cat_name, ':field_cat_id' => $ufc_data['field_cat_id']]);\n }\n }\n }\n }\n }\n\n if (\\defender::safe()) {\n require_once BASEDIR.\"config_temp.php\";\n require_once INCLUDES.\"multisite_include.php\";\n self::installer_step(self::STEP_INFUSIONS);\n redirect(FUSION_REQUEST);\n //new \\Authenticate(self::$userData['user_name'], self::$userData['user_password'], TRUE, FUSION_REQUEST);\n } else {\n self::installer_step(self::STEP_PRIMARY_ADMIN_FORM);\n redirect(FUSION_REQUEST);\n }\n }\n }\n }\n }",
"public static function change_pass($conn, $login, $pass, $current_pass = NULL, $log = TRUE) \n {\n Ossim_db::check_connection($conn); \n \n $pass = md5($pass); \n $params = array($pass, $login);\n \n $query = 'UPDATE users SET pass = ?';\n $query .= ($log == TRUE) ? ', last_pass_change=CURRENT_TIMESTAMP()' : ''; \n $query .= \" WHERE login = ?\";\n $query .= (!empty($current_pass)) ? \" AND pass='\".md5($current_pass).\"'\" : '';\n \n $rs = $conn->Execute($query, $params);\n \n if (!$rs) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg());\n \n return FALSE;\n } \n \n //Log = FALSE is used when an user accesses to the system using LDAP authentication\n if ($log == TRUE)\n {\n $infolog = array($login);\n Log_action::log(5, $infolog);\n }\n \n return TRUE;\n }",
"public function saveLoginData()\n {\n //Get user data (ip, time, browser)\n $request = \\Yii::$app->getRequest();\n $userData = [\n 'ip' => $request->getUserIP(),\n 'login_time' => time(),\n 'browser' => UserAgent::model()->browser,\n 'user_id' => \\Yii::$app->user->id\n ];\n\n //Save it to DB\n $loginStories = new LoginStories();\n $loginStories->attributes = $userData;\n $loginStories->save();\n }",
"public function authenticate() {\r\n $db = db_connect();\r\n $statement = $db->prepare(\"select Username, Password from users WHERE Username = :name;\");\r\n $statement->bindValue(':name', $this->username);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n $hash_pwd = $rows[0]['Password'];\r\n $password = $this->password;\r\n\r\n if (!password_verify($password, $hash_pwd)) {\r\n $attempt = 1;\r\n $statement = $db->prepare(\"select * from logfail WHERE Username = :name;\");\r\n $statement->bindValue(':name', $this->username);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n $attempt_number = $rows[0]['Attempt'];\r\n\r\n if ($attempt_number >= 3) {\r\n sleep(60);\r\n $statement = $db->prepare(\"UPDATE logfail SET Attempt = :attempt WHERE Username = :user\");\r\n $statement->bindValue(':user', $this->username);\r\n $statement->bindValue(':attempt', 0);\r\n $statement->execute();\r\n $this->auth = false;\r\n } else if ($rows) {\r\n $attempt = $attempt_number + 1;\r\n $statement = $db->prepare(\"UPDATE logfail SET Attempt = :attempt WHERE Username = :user\");\r\n $statement->bindValue(':user', $this->username);\r\n $statement->bindValue(':attempt', $attempt);\r\n $statement->execute();\r\n } else {\r\n\r\n $statement1 = $db->prepare(\"INSERT INTO logfail (Username, Attempt)\"\r\n . \"VALUES (:username, :attempt); \");\r\n $statement1->bindValue(':username', $this->username);\r\n $statement1->bindValue(':attempts', $attempt);\r\n $statement1->execute();\r\n }\r\n $this->auth = false;\r\n } else {\r\n $this->auth = true;\r\n $_SESSION['username'] = $rows[0]['Username'];\r\n $_SESSION['password'] = $rows[0]['Password'];\r\n }\r\n }",
"private function sessionLogin() {\r\n $this->uid = $this->sess->getUid();\r\n $this->email = $this->sess->getEmail();\r\n $this->fname = $this->sess->getFname();\r\n $this->lname = $this->sess->getLname();\r\n $this->isadmin = $this->sess->isAdmin();\r\n }",
"public function updatePassword()\n {\n $user = User::find(Database::connection(), $_SESSION['id']);\n\n // Update password\n return $user->updatePassword(Database::connection(), $_POST['password']);\n }",
"public function changeUserPassword($uid,$newPassword);",
"function modificarUsuario($usuario,$password,$idUsuario){\n \n $conex=Conexion::getInstance();\n \n $sql=\" UPDATE `usuarios` SET `usuario`='$usuario',`password`='$password' WHERE id=$idUsuario\";\n \n $conex->dbh->prepare($sql);\n $conex->dbh->exec($sql); \n \n\n}",
"public function updateUserDetails()\r\n{\r\n $query_string = \"UPDATE users \";\r\n $query_string .= \"SET \";\r\n $query_string .= \"username = :username, \";\r\n $query_string .= \"password = :password, \";\r\n $query_string .= \"email = :email, \";\r\n $query_string .= \"firstname = :firstname, \";\r\n $query_string .= \"lastname = :lastname \";\r\n $query_string .= \"WHERE userid = :userid\";\r\n\r\n return $query_string;\r\n}",
"public function updateUserPassword($id, $password){\r\n $hashedPass = password_hash($password, PASSWORD_DEFAULT);\r\n $this->setSqlQuery(\"UPDATE users SET password='$hashedPass', token='', firstTimeLogin='false' WHERE id='$id'\");\r\n $statement = $this->_dbHandle->prepare($this->sqlQuery); // prepare a PDO statement\r\n $statement->execute(); // execute the PDO statement\r\n }",
"public function testUpdateUser()\n {\n }",
"public function changePassword($input) {\n $sql = \"UPDATE usertable \n SET password = :password\n WHERE username = :username\";\n\n $stmt = $this->db_connect->prepare($sql);\n $stmt->bindParam(':password', $input['password'], PDO::PARAM_STR);\n $stmt->bindParam(':username', $input['username'], PDO::PARAM_STR);\n $stmt->execute();\n }",
"private function setUserPass(){\n if($this->_request->get(login_user)){\n $this->_user = $this->_request->get(login_user);\n }else{\n $this->_user = $this->getCookie();\n }\n $this->_pass = $this->_request->get('login-password');\n }",
"function _updateUserData()\n {\n $this->lastLogin = $this->currentLogin;\n return true;\n }",
"function update_User($UserName, $passwd, $Name, $Addr, $Email, $Admin, $Where) {\r\n// the database to new details in arguments\r\n $conn = db_connect();\r\n $test2 = $_SESSION['UserName'];\r\n\r\n $query = \"update Users2\r\n set UserName= '\".$UserName.\"',\r\n Password = sha1('\".$passwd.\"'),\r\n Name = '\".$Name.\"',\r\n Addr = '\".$Addr.\"',\r\n Email = '\".$Email.\"',\r\n IsAdmin = '$Admin'\r\n where UserName = '\".$Where.\"'\";\r\n\r\n $result = @$conn->query($query);\r\n if (!$result) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}",
"function userLoginUpdate() {\n\t// old. It also updates the last_action field for the current user, if the current user is logged in. \n\n\tglobal $controller; \n\n\t$time = time();\n\t$time = $time - 86400;\n\t$query = \"DELETE FROM users_logged_in WHERE last_action < $time AND security_level != 'admin'\";\n\t$result = $controller->command(\"makeQuery\", $query, \"userLoginUpdate\"); \n\n\t$time = time(); \n\t$sessionId = session_id(); \n\t$query = \"UPDATE users_logged_in SET last_action=$time WHERE session_id='$sessionId'\";\n\t$result = $controller->command(\"makeQuery\", $query, \"userLoginUpdate\"); \n\t$numberOfRowsUpdated = @ mysql_affected_rows($result); \n\treturn $numberOfRowsUpdated;\n}",
"function update($ID, $Username, $Password, $Fname, $Lname, $Phone, $Email, $Type, $LabID) {\n $SQL = \"UPDATE User \".\n \"SET Username= '$Username', Fname = '$Fname', Lname = '$Lname', Phone = '$Phone', Email = '$Email', Type='$Type', LabID='$LabID'\";\n if($Password){\n $Password = encrypt_pwd($Password);\n $SQL .= \", Password = '$Password'\";\n }\n $SQL .= \" WHERE ID = $ID\";\n //echo $SQL;\n mysqli_query($this->db_link, $SQL);\n $this->ID = $ID;\n $this->fetch();\n }",
"public function resetLogin()\n {\n //\n }",
"private function authCredUser(){\n\t\t\n\t\t// UC 3 1: User wants to authenticate with saved credentials\n\t\t\t// - System authenticates the user and presents that the authentication succeeded and that it happened with saved credentials\n\t\t$inpName = $this->view->getInputName(true);\t\n\t\t$inpPass = $this->view->getInputPassword(true);\n\n\t\t$answer = $this->model->loginCredentialsUser($inpName, $inpPass, $this->view->getServerInfo());\n\t\t\n\t\tif($answer == null){\n\t\t\t$this->view->showLogin(false);\n\t\t\t\n\t\t} else if($answer == true){\t\t\n\t\t\t$this->view->storeMessage(\"Inloggning lyckades via cookies\");\n\t\t\treturn $this->view->showLogin(true);\n\t\t} else {\t\t\n\t\t\t// 2a. The user could not be authenticated (too old credentials > 30 days) (Wrong credentials) Manipulated credentials.\n\t\t\t\t// 1. System presents error message\n\t\t\t\t// Step 2 in UC 1\t\t\t\t\n\t\t\t$this->view->removeCredentials();\n\t\t\t$this->view->storeMessage(\"Felaktig eller föråldrad information i cookie\");\n\t\t\treturn $this->view->showLogin(false);\n\t\t}\n\t}",
"function cvs_change_password($cvs_user, $new_pass, $cvs_project){\r\n $all_cvs_users = cvs_read_passwd($cvs_project);\r\n $cvs_fields = $all_cvs_users[$cvs_user];\r\n if (!is_null($cvs_fields)) {\r\n $cvs_fields[0] = $new_pass;\r\n\t$all_cvs_users[$cvs_user] = $cvs_fields;\r\n\tcvs_write_file($all_cvs_users, $cvs_project);\r\n\tcvs_log(1, \"Updated password for $cvs_user\");\r\n } else {\r\n\tcvs_log(3, \"No such user- $cvs_user\");\r\n }\r\n}",
"private function _loginUser($data) { \n try {\n $username = mb_strtolower($data->username);\n $password = $data->password;\n\n require_once 'DBAdmin_Model.php';\n $this->model = new DBAdmin_Model();\n\n $conf = realpath('config');\n if (!is_file($conf.'/config.json')) {\n throw new Exception('Datei config.json nicht gefunden!');\n }\n\n $config = json_decode(file_get_contents($conf.'/config.json'));\n\n if (!isset($config->host)) {\n throw new Exception('Datei config.json ist fehlerhaft!');\n }\n $host = $config->host; \n \n try {\n $pdo = $this->model->openDbConnection($host, $username, $password);\n } catch (Throwable $ex) {\n throw new Exception('Benutzername oder Passwort falsch!');\n }\n $this->model->closeDbConnection($pdo);\n\n // conf-File für Benutzer erstellen\n $confFile = fopen($conf.'/user_'.$username.'.conf', 'w');\n\n if (!$confFile) {\n throw new Exception('fopen ist fehlgeschlagen!');\n }\n $txt = \"[client]\\r\\nhost=\".$host.\"\\r\\nuser=\".$username.\"\\r\\npassword=\\\"\".$password.\"\\\"\";\n $write = fwrite($confFile, $txt);\n\n if ($write === false) {\n throw new Exception('fwrite ist fehlgeschlagen!');\n }\n fclose($confFile);\n \n $return = array(\n 'username' => $username,\n 'id' => md5($password)\n );\n } catch (Throwable $ex) {\n $return = $ex;\n }\n return $return; \n }",
"function regiomino_user_change_password($account, $password) {\r\n\t//watchdog('pwdaction', '@password', array('@password' => $password));\r\n $edit['pass'] = $password;\r\n user_save($account, $edit);\r\n}"
] | [
"0.6875521",
"0.6625099",
"0.6365808",
"0.6333745",
"0.6304126",
"0.615122",
"0.61174315",
"0.6078172",
"0.59783554",
"0.59759164",
"0.5968799",
"0.59600073",
"0.593282",
"0.59295946",
"0.59282106",
"0.59271485",
"0.5906563",
"0.59033483",
"0.5899072",
"0.58860725",
"0.5883941",
"0.5881699",
"0.5860962",
"0.58606476",
"0.58520085",
"0.5851306",
"0.5839654",
"0.5838333",
"0.5834775",
"0.5787467",
"0.5786137",
"0.578505",
"0.57826036",
"0.57772833",
"0.576655",
"0.5765718",
"0.57555646",
"0.57525605",
"0.5743322",
"0.573013",
"0.5715474",
"0.5700999",
"0.56993717",
"0.56953377",
"0.5662404",
"0.56553483",
"0.56539667",
"0.56537235",
"0.5648562",
"0.5645319",
"0.56424516",
"0.56423223",
"0.56217605",
"0.5620934",
"0.5611241",
"0.56111324",
"0.5610728",
"0.5603468",
"0.5602781",
"0.56027293",
"0.5598505",
"0.55934495",
"0.55928",
"0.55784917",
"0.5576397",
"0.5567933",
"0.55665857",
"0.55641526",
"0.5552313",
"0.55470717",
"0.5542831",
"0.55411494",
"0.5540624",
"0.5539839",
"0.55359435",
"0.55315405",
"0.55305314",
"0.5525551",
"0.5525043",
"0.5524871",
"0.55178934",
"0.551735",
"0.55026144",
"0.55020016",
"0.55011517",
"0.5500927",
"0.54941934",
"0.5489026",
"0.548658",
"0.54855996",
"0.5483483",
"0.5477799",
"0.5475916",
"0.5472019",
"0.54683566",
"0.5466465",
"0.5465245",
"0.5461768",
"0.5459603",
"0.5455505",
"0.54542226"
] | 0.0 | -1 |
string variable to store the log | public function UploadElifesheet($shipmentItemInstance)
{
$log = '';
$shipmentBatchInstances = $shipmentItemInstance->getShipmentBatches();
foreach($shipmentBatchInstances as $shipmentBatchInstance) {
// force it to SK38 for now: to be changed in future
if($shipmentBatchInstance->getProductName() != "SK38") {
$log .= "Error: only SK38 is supported for now... Cannot Upload E-lifesheet\n";
return $log;
}
$serialNumberInstances = $shipmentBatchInstance->getSerialNumbers();
$snArray = array();
foreach($serialNumberInstances as $sn) {
$snArray[] = "'" . $sn->getSerialNumber() . "'";
$sql_query = $this->sql_query_pattern . implode(" OR System_SN like ",$snArray) . " ORDER BY id ASC;";
}
try {
// connect to the database
$bdd = $this->connectProdDB->getPDO();
}
catch(\Exception $e) {
$log .= 'Error: '.$e->getMessage()."\n";
return $log;
}
$req = $bdd->prepare($sql_query);
// execute the request
if($req->execute()) {
// fetch the result
$results = $req->fetchall();
// close the request
$req->closeCursor();
//$log .= "count result= " . count($results) . "\n";
//$log .= "count serial number instance= " . count($serialNumberInstances) . "\n";
// if the number of rows returned is correct then continue
if (count($results) == count($serialNumberInstances)) {
//$log .= var_dump($results);
// connect to FTP site
$conn_id = ftp_connect($this->ftp_server);
if (! @ftp_login($conn_id, $this->ftp_user_name, $this->ftp_user_pass)) {
$log .= "Error: cannot connect to FTP site with current credentials... Upload aborted" ;
return $log;
}
$tempFile2Handle = fopen($this->ftp_temp_file2,"w");;
fwrite($tempFile2Handle, "Assembly date,Manufacturing PN, System S/N,Motherboard S/N,SK38-M S/N,DDR1 S/N,DDR2 S/N,PSU S/N,LCD S/N,MAC ADDR 1,MAC ADDR 2,HDD S/N,SATADOM S/N,CARD USB3 S/N\n");
// get the P/n and the revision
$revisionInstance = $shipmentBatchInstance->getShipmentItem()->getPoItem()->getRevision();
$pn = $revisionInstance->getProduct()->getPn();
foreach($results as $result) {
// check if it is really SK38
if(preg_match("/SK38-SYS (.*)/", $result['System_SN'], $snRegex) !== 1 )
{
// close the connection
ftp_close($conn_id);
$log .= "Error: System S/N does not match SK38... Upload aborted\n";
return $log;
}
// write elifesheet in temp file
$tempFile1Handle = fopen($this->ftp_temp_file1,"w");
// write file
// fwrite($tempFileHandle, "System SK38 S/N;" . $result['System_SN'] . ";\n" );
// fwrite($tempFileHandle, "Assembly date;" . $result['Assembly_date'] . ";\n" );
// fwrite($tempFileHandle, "PSU S/N;" . $result['PSU_SN'] . ";\n" );
// fwrite($tempFileHandle, "Motherboard S/N;" . $result['PSU_SN'] . ";\n" );
// fwrite($tempFileHandle, "MAC ADDR 1;" . $result['MACID1_MB'] . ";\n" );
// fwrite($tempFileHandle, "MAC ADDR 2;" . $result['MACID2_MB'] . ";\n" );
// fwrite($tempFileHandle, "LCD S/N;" . $result['LCD_SN'] . ";\n" );
// fwrite($tempFileHandle, "HDD S/N;" . $result['HDD_SN'] . ";\n" );
// fwrite($tempFileHandle, "SK38-M S/N;" . $result['SK38_M_SN'] . ";\n" );
// fwrite($tempFileHandle, "DDR1 S/N;" . $result['DDR1_SN'] . ";\n" );
// fwrite($tempFileHandle, "DDR2 S/N;" . $result['DDR2_SN'] . ";\n" );
fwrite($tempFile1Handle, "Assembly date,System S/N,Motherboard S/N,SK38-M S/N,DDR1 S/N,DDR2 S/N,PSU S/N,LCD S/N,MAC ADDR 1,MAC ADDR 2,HDD S/N,SATADOM S/N,CARD USB3 S/N\n");
fwrite($tempFile1Handle, $result['Assembly_date'] . "," . $result['System_SN'] . "," . $result['Motherboard_SN'] . "," . $result['SK38_M_SN'] . "," . $result['DDR1_SN'] . "," . $result['DDR2_SN'] . "," . $result['PSU_SN'] . "," . $result['LCD_SN'] . "," . $result['MACID1_MB'] . "," . $result['MACID2_MB'] . "," . $result['HDD_SN'] . "," . $result['SATADOM_SN'] . "," . $result['CARD_USB3_SN'] . "\n");
fwrite($tempFile2Handle, $result['Assembly_date'] . "," . $pn . " Rev " . $revisionInstance->getRevisionCust() . "," . $result['System_SN'] . "," . $result['Motherboard_SN'] . "," . $result['SK38_M_SN'] . "," . $result['DDR1_SN'] . "," . $result['DDR2_SN'] . "," . $result['PSU_SN'] . "," . $result['LCD_SN'] . "," . $result['MACID1_MB'] . "," . $result['MACID2_MB'] . "," . $result['HDD_SN'] . "," . $result['SATADOM_SN'] . "," . $result['CARD_USB3_SN'] . "\n");
fclose($tempFile1Handle);
//push unit file onto FTP site
$remote_file = $this->ftp_remote_path . $snRegex[1] . ".csv";
if (ftp_put($conn_id, $remote_file, $this->ftp_temp_file1, FTP_ASCII))
{
$log .= "successfully uploaded $remote_file\n";
}
else
{
$log .= "Error: There was a problem while uploading $remote_file\n";
}
// delete tmp file
unlink($this->ftp_temp_file1);
}
fclose($tempFile2Handle);
//push unit file onto FTP site
$remote_file = $this->ftp_remote_path . "P32795_LifeSheet_Batch_" . $shipmentBatchInstance->getNum() . ".csv";
if (ftp_put($conn_id, $remote_file, $this->ftp_temp_file2, FTP_ASCII))
{
$log .= "successfully uploaded $remote_file\n";
}
else
{
$log .= "Error: There was a problem while uploading $remote_file\n";
}
// delete tmp file
unlink($this->ftp_temp_file2);
// close the connection
ftp_close($conn_id);
}
else
{
$log .= "Error: prod database query does not return right number of systems (" . count($results) . ")\n" . $sql_query . "\n";
return $log;
}
}
else
{
$req->closeCursor();
$log .= "Error: Fail to execute query on prod database... Upload Aborted\n";
return $log;
}
}
return $log;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function logfile() {\n\t\treturn sprintf(\n\t\t\t'%s.createenv.%s.log',\n\t\t\t$this->Project()->Name,\n\t\t\t$this->ID\n\t\t);\n\t}",
"public function logFilePath();",
"function writeLog($string){\n}",
"protected function log_file() \n {\n return $this->ini['log'];\n }",
"function L($sString)\n\t{\n\t\t//error_log(date(\"H:i:s\").\";\".$sString.\"[END_LOG]\",3,\"c:\\\\xampp\\\\htdocs\\\\EnterSolutions\\\\logs_\".date(\"Ymd\").\".log\");\n\t}",
"function logger($str)\r\n\t\t{\r\n\t\t\t//write log\r\n\t\t\t$log = $str = '' ? PHP_EOL : '[' . date('Y-m-d H:i:s') . '] ' . $str . PHP_EOL;\r\n\t\t\tfile_put_contents('patcher.log', $log, FILE_APPEND | LOCK_EX);\r\n\t\t}",
"private function getStreamName(){\n return Shopware()->Container()->getParameter('kernel.logs_dir') . \"/\" . $this->getFileName() . \"_\". Shopware()->Container()->getParameter('kernel.environment') . \".log\";\n }",
"private static function getLogFile(): string\n {\n return \\sprintf(\n '%s/logs/log_report_%s.txt',\n \\dirname(__DIR__),\n \\date('d-m-Y')\n );\n }",
"public function get_log() {\r\n\t\treturn $this->get_file();\r\n\t}",
"private static function addLog($msg) {\n\t\tself::$log[] = '\"'.formatTimestamp(time()).' - '.$msg.'\"';\n\t}",
"function to_log($vvod)\n{\n $date = date(\"Y_m_d\");\n $filename = \"logs/log_\".$date.\".txt\";\n $string = date(\"d.m.Y H:i:s\").\" => $vvod\".\"\\n\";\n $f = fopen($filename,\"a+\");\n fwrite($f,$string);\n fclose($f);\n}",
"public function applog($str_val) {\n\t\t$log_file = $this->log_file_path;\n\t\t\t\t\n\t\tif(empty($str_val)) {\n\t\t\t$str_val='Empty call (Nothing was provided)';\n\t\t}\n\t\t\n\t\t$str_date_time = date('d-m-Y h:i:s A'); // add timestamp\n\t\t$str_val = $str_date_time.' - '.$str_val.\" \\n\"; // create newline\t\t\n\t\t\n\t\t$handle = fopen($log_file, 'a') or die('Cannot open file: '.$log_file);\t\n\t\tfwrite($handle, $str_val);\n\t\tfclose($handle);\n\t}",
"static function toLog($var,$title='',$logfile=null){\n\t\tif($logfile){\n\t\t\t$fh = fopen($logfile,'a+');\n\t\t}else{\n\t\t\t$fh = fopen(Config::$x['logLocation'],'a+');\n\t\t}\n\t\t\n\t\t$bTrace = debug_backtrace();\n\t\t$file = self::abbreviateFilePath($bTrace[0]['file']);\n\t\t$line = $bTrace[0]['line'];\n\t\tfwrite($fh,\"+=+=+=+ \".date(\"Y-m-d H:i:s\").' | '.Config::$x['instanceName'].\" | TO FILE | \".$file.':'.$line.' | '.$title.\" +=+=+=+\\n\".var_export($var,1).\"\\n\");\n\t\tfclose($fh);\n\t}",
"Public Function LogFileName() {\n\t\treturn $this->logFileName;\n\t}",
"function logge($message, $type=INFO, $dateiName=\"\", $methodName=\"\") {\n\n $str = date(\"Y.m.d H:i:s\") . \" \" . $type;\n\n if ($dateiName !=\"\" || $methodName != \"\") {\n $str .= \"(\";\n if ($dateiName != \"\") {\n $str .= \"File: \" . $dateiName . \" \";\n }\n if ($methodName != \"\") {\n $str .= \"Methode: \" . $methodName;\n }\n $str .= \")\";\n }\n $str .= \": \" . $message . \"\\n\\r\";\n\n if (isset($_ENV[\"LOGFILE\"]) && $_ENV[\"LOGFILE\"] != '') {\n $fd = fopen($_ENV[\"LOGFILE\"], \"a\");\n\n fwrite($fd, $str);\n fclose($fd);\n } else {\n echo \"LOGFILE ist nicht bekannt, um Meldungen in die Log-Datei zu schreiben.<br>\\n\";\n echo $str;\n }\n\n}",
"public function ___log($str = '', array $options = array()) {\n\t\t$log = $this->wire('log');\n\t\tif($log && strlen($str)) {\n\t\t\tif(isset($options['name'])) {\n\t\t\t\t$name = $options['name'];\n\t\t\t\tunset($options['name']);\n\t\t\t} else {\n\t\t\t\t$name = $this->className(array('lowercase' => true));\n\t\t\t}\n\t\t\t$log->save($name, $str, $options);\n\t\t}\n\t\treturn $log; \n\t}",
"function WriteLog($s) {\r\n}",
"public function getLogData(){\n\t\treturn substr($this->getUsername(),0,50);\n\t}",
"public static function getLogid(): string\n {\n $contextData = self::getCoroutineContext(self::DATA_KEY);\n $logid = $contextData['logid'] ?? '';\n return $logid;\n }",
"public function store() {\n $logData = \"=========================================\\n\";\n $logData .= \"Date Time: \".$this->record_date.\"\\n\";\n $logData .= $this->title.\" (\".$this->type.\") \\n\";\n if(!empty($this->data)) {\n $logData .= var_export($this->data, true).\"\\n\";\n }\n \n file_put_contents($this->file, $logData, FILE_APPEND);\n \n }",
"public function log($str, Saveable $item = null) {\n\t\t$logs = $this->wire('config')->logs;\n\t\t$name = $this->className(array('lowercase' => true)); \n\t\tif($logs && in_array($name, $logs)) {\n\t\t\tif($item && strpos($str, \"'$item->name'\") === false) $str .= \" '$item->name'\";\n\t\t\treturn parent::___log($str, array('name' => $name));\n\t\t}\n\t\treturn parent::___log(); \n\t}",
"function setLog( $msg = NULL )\n {\n if( $msg == NULL ){\n \t\t$this->logErro = \n<<<EOT\n =============== *UPLOAD* LOG =============== <br />\n Pasta destino: $this->path <br />\n \tNome do arquivo: {$this->source[ \"name\" ]} <br />\n Tamanho do arquivo: {$this->source[ \"size\" ]} bytes<br />\n Tipo de arquivo: {$this->source[ \"type\" ]} <br />\n\t\t---------------------------------------------------------------<br /><br />\nEOT;\n }else{\n \t\t$this->logErro .= $msg;\n }\n }",
"function getLogFilename()\n {\n return $this->_props['LogFilename'];\n }",
"public function getKnackLogFile();",
"function getLogName($login){\n\t$logName = $login;\n\treturn $logName;\n}",
"protected function initFilePath() {\n \n $result = $this->profiler->getLogsPath();\n \n $result .= $this->key.'.log';\n \n if ( !file_exists( $result ) ) {\n touch( $result );\n }\n \n return $result;\n }",
"public static function add_line(string $log) : string {\n if (empty(self::$taskloginfo)) {\n return $log;\n }\n\n if (empty(self::$fh)) {\n return $log;\n }\n\n if (self::is_current_output_buffer()) {\n fwrite(self::$fh, $log);\n }\n\n if (self::$outputloggedcontent) {\n return $log;\n } else {\n return '';\n }\n }",
"private function add_log($log) {\n $this->log .= \" \" . $log;\n }",
"public function tlogVariable($name, $variable);",
"function write_log($str) {\n $logs = '/var/www/html/mchuob/callback_logs/callback_' . date('Y-m-d') . '.txt';\n $time = \"log_time=\" . date('Y-m-d H:i:s') . \"&\";\n $q = '\"';\n $replace = $q . \"&\" . $q;\n $update_str = $q . $time . $str . $q;\n $update_str = str_replace('&', $replace, $update_str);\n $output_file = fopen($logs, 'a+');\n fwrite($output_file, $update_str . \"\\n\");\n fclose($output_file);\n}",
"public function getLogFile(): string\n\t{\n\t\treturn $this->logFile;\n\t}",
"public function logData() {\n\t\t/* Implement in subclasses */\n\t}",
"private function getFilePath()\n {\n return \\Application::dirLogs() . '/console.log';\n }",
"public static function location()\r\n {\r\n $logDir = Mage::getBaseDir('var') . DIRECTORY_SEPARATOR . 'log';\r\n $logFile = $logDir . DIRECTORY_SEPARATOR . self::DEFAULT_FILE;\r\n\r\n return $logFile;\r\n }",
"public function tlogData($string_data);",
"private static function getLogFileName()\n\t{\n\t\tself::$log_file_subfix = date(\"Ymd\");\n\t\tself::$log_file = self::$log_path . DS . \"service_\" . self::$log_file_subfix . \".log\";\n\t\treturn TRUE;\n\t}",
"public function getLog();",
"public function log(string $str)\n {\n }",
"public function getLogFilePath()\n {\n return $this->getSettingArray()[\"log_file_path\"];\n }",
"public function getLogData(){\n\t\treturn $this->getNewsletterTemplateId();\n\t}",
"static public function getName()\n {\n return 'log';\n }",
"public function getLogPath() \n {\n return Light_Config::get('CTM_Config', 'log_dir') . '/' . $this->id;\n }",
"public function getLogFilePath(){\n\n\t\treturn $this->_log_file_path; \n\t}",
"public static function GetLog($type)\n \t{\n \t\t//Ouverture du fichier\n\t\t$Name =$type.date('dmY');\n\t\t$Directory =\"Log\\\\\".$type.\"\\\\\";\n\n\t\t$File=$Directory.$Name.\".JLog\";\n\t\t$Log = \"\";\n\n\t\tif (!file_exists($File) || !$fp = fopen($File,\"r\"))\n\t\t{\n\t\t\techo \"--Echec de l'ouverture du fichier\";\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile(!feof($fp))\n\t\t\t{\n\t\t\t\t$Ligne = fgets($fp,255);\n\t\t\t\t$Log .= $Ligne;\n\t\t\t}\n\n\t\tfclose($fp); // On ferme le fichier\n\t\treturn $Log;\n\t\t}\n \t}",
"private function send_log() {\n MessageLogger::add_log($this->log);\n $this->log = \"\";\n }",
"public function getLogFile() {}",
"public function addLog ( $keys, $received, $sent, $base_string, $notes, $user_id = null ) { }",
"public function getLogPath() : string\n {\n return $this->logPath;\n }",
"public function writeLog()\n {\n $redis = self::getClient();\n $redis ->lPush('admin_log',$this->data);\n }",
"public static function SaveLog( $message='' ) {\n\t\tself::$_log = '#' . date('Y-m-d H:i:s') . '#' . $message . \"\\n\";\n\t}",
"public function getLogAsString($type = 'info')\n {\n \tif( ! isset($this->log[$type])) return false;\n \n return implode(PHP_EOL, $this->log[$type]);\n }",
"public function getDebugLog()\n {\n // Try to create the log-directory if it does not exist\n $log_dir = Mage::getBaseDir().DS.'var'.DS.'log';\n if(!is_dir($log_dir) && !is_writable($log_dir)) {\n @mkdir(Mage::getBaseDir().DS.'var');\n @mkdir($log_dir);\n }\n\n $log_file = $log_dir.DS.'vm2mage.log';\n if(!file_exists($log_file)) {\n @touch($log_file);\n }\n \n return $log_file;\n }",
"function db_log($query,$executedto){\n\t//$temp = $_SERVER['DOCUMENT_ROOT'].\"\\\\pk\\\\errorlog\\\\\";\n\t//$default_folder = str_replace(\"/\",\"\\\\\",$temp);\t\n\t$file_name = \"./errorlog/querylog.html\";//$default_folder.\"querylog.html\";\n\t$file_handler = fopen($file_name,\"a\");\n\t$serializedPost = serialize($_POST);\n\t$message = \"<br><i>executed at: \".date('l jS \\of F Y h:i:s A').\" details: \".$executedto.\"</i><br><b>\".$query.\" </b>\".$serializedPost.\"<br>\";\t\n\tfwrite($file_handler,$message);\n\tfclose($file_handler);\n}",
"function getRawLogName()\n {\n return $this->_props['RawLogName'];\n }",
"function WriteLog($log_file)\n{\n global $SPECIAL_VALUES;\n\n@\t$log_fp = fopen($log_file,\"a\");\n\n\tif (!$log_fp)\n\t\treturn;\n\t$date = gmdate(\"H:i:s d-M-y T\");\n\t$entry = $date.\":\".$SPECIAL_VALUES[\"email\"].\",\".\n\t\t\t$SPECIAL_VALUES[\"realname\"].\",\".$SPECIAL_VALUES[\"subject\"].\"\\n\";\n\tfwrite($log_fp,$entry);\n\tfclose($log_fp);\n}",
"function log($cxn,$class,$id,$folder=NULL)\r\n {\r\n \r\n }",
"function EventLog($page,$action,$orignal_value,$new_value)\n{\n\t\t$email = $_SESSION['user_email'];\n\t\t$ipaddress = getUserIP();\n\t\t\n\t\t$data = sprintf(\"%s,%s,%s,%s,%s\" . PHP_EOL, $ipaddress,date(\"F j Y g:i a\"), $email, $page, $action);\n\t\t\n\t\t//file_put_contents($_SERVER['DOCUMENT_ROOT'] .'/log.txt', $data, FILE_APPEND);\t\t\n\t\tfile_put_contents('log.txt', $data, FILE_APPEND);\t\t\t\n\t\t\n\t\t\n}",
"function gen_log($username, $message)\r\n{\r\n\t$log = \"LOG - IP address: \".$_SERVER['REMOTE_ADDR'].' -- Date: '.date(\"F j,Y,g:i a\") .PHP_EOL .\r\n \"User: \" .$username .\" -- Action:\" .$message . PHP_EOL .\"----------------------\" .PHP_EOL;\r\n\tfile_put_contents('/home/alexander/github/lpa_ecomms_web/log/lpalog.log',$log,FILE_APPEND);\r\n}",
"private function do_log($log_type, $log_line='') {\n\t\tswitch ($log_type) {\n\t\t\tcase 'auth_code':\n\t\t\t\t$currDay = date('Y-m-d', time());\n\t\t\t\t$log_file = self::LOG_PATH.\"auth_code_{$currDay}.log\";\n\n\t\t\t\t$time = date('Y-m-d H:i:s', time());\n\t\t\t\t$log = \"[$time][$log_line]\\n\";\n\t\t\t\tfile_put_contents($log_file, $log, FILE_APPEND);\n\t\t\t\tbreak;\n\t\t}\n\t\treturn;\n\t}",
"private function set_log_type () {\n\t\t# check settings\n\t\t$this->log_type = $this->settings->log;\n\t}",
"function write_log($msg) {\n global $transaction_ID;\n $todays_date = date(\"Y-m-d H:i:s\");\n $file = fopen(\"process.log\",\"a\");\n fputs($file,$todays_date. \" [\".$transaction_ID.\"] \". $msg.\"\\n\");\n fclose($file);\n}",
"function log_w($path,$str)\n{\n\t$log = '';\n\tif( file_exists($path) ){\n\t\t$log = file_get_contents($path);\n\t}\n\tfile_put_contents($path,$log.date('Y-m-s H:i:s').' '.$str);\n}",
"function logfile() {\n\tglobal $urlpath, $staticFile, $log_file;\n\t$page = \"\";\n\t$buttons = \"\";\n\n\t$page .= hlc(t(\"sweep_title\"));\n\t$page .= hl(t(\"sweep_log\"),4);\n\t$page .= par(t(\"sweep_log_path\").\" $log_file: \");\n\t$page .= '<a href=\"#bottom\">'.t(\"sweep_scroll_down\").'</a>';\n $page .= ptxt(file_get_contents($log_file));\n $page .= '<hr id=\"bottom\" />';\n\n\n $buttons .= addButton(array('label'=>t(\"sweep_button_status\"),'class'=>'btn btn-success', 'href'=>\"$urlpath\", 'divOptions'=>array('class'=>'btn-group')));\n\t$buttons .= addButton(array('label'=>t(\"sweep_button_reload\"),'class'=>'btn btn-success', 'href'=>\"$urlpath/logfile\", 'divOptions'=>array('class'=>'btn-group')));\n\t\t\n\n $page .= $buttons;\n\treturn(array('type' => 'render','page' => $page));\n}",
"function logheader() {\n $str = \"\\n=============================\"\n .\"======================================\";\n $str .= \"\\n============================ \"\n .\"logrecord ============================\";\n $str .= \"\\nstartlogrecord timestamp : \".date(\"Y-m-d H:i:s\",time()).\"\\n\";\n\n $this->prn($str);\n// fwrite($this->fp, $str.\"\\n\");\n }",
"protected function setLogMsg()\n {\n $sReferer = (!empty($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : 'NO HTTP REFERER';\n $sAgent = (!empty($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : 'NO USER AGENT';\n $sQuery = (!empty($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : 'NO QUERY STRING';\n\n $this->_sIp = self::getIp();\n\n $this->_sContents =\n 'Date: ' . date('Y/m/d') . \"\\n\" .\n 'IP: ' . $this->_sIp . \"\\n\" .\n 'QUERY: ' . $sQuery . \"\\n\" .\n 'Agent: ' . $sAgent . \"\\n\" .\n 'Referer: ' . $sReferer . \"\\n\" .\n 'LOGIN - Username: ' . $this->_sUsername . ' - Password: ' . $this->_sPassword . \"\\n\\n\\n\";\n\n return $this;\n }",
"public function logger($var, $text = '')\n {\n // Название файла\n $loggerFile = __DIR__ . '/logger.log';\n if (is_object($var) || is_array($var)) {\n $var = (string)print_r($var, true);\n } else {\n $var = (string)$var;\n }\n $string = date(\"Y-m-d H:i:s\") . \" - \" . $text . ' - ' . $var . \"\\n\";\n file_put_contents($loggerFile, $string, FILE_APPEND);\n }",
"function _logMessage($msg) {\n\t\tif ($msg[strlen($msg) - 1] != \"\\n\") {\n\t\t\t$msg .= \"\\n\";\n\t\t}\n\n\t\tif ($this->debug) debug($msg);\n\n\t\t$this->resultsSummary .= $msg;\n\n\t\tif ($this->useLog) {\n\t\t\t$logfile = $this->writeDir . \"cron.log\";\n\t\t\t$file = fopen($logfile, \"a\");\n\t\t\tfputs($file, date(\"r\", time()) . \" \" . $msg);\n\t\t\tfclose($file);\n\t\t}\n\t}",
"public function getLogMessage()\n {\n return $this->log_message;\n }",
"public function log($msg)\n {\n file_put_contents($this->logFile, $this->shopName.\" \".date('c').\" \".print_r($msg, true).\"\\n\", FILE_APPEND | LOCK_EX);\n }",
"public function saveLog() {\n\n\t\t# Get log file path\n\t\tif(isset(Sky::$config) && isset(Sky::$config[\"locations\"][\"logs\"]))\n\t\t\t$filePath = Sky::$config[\"locations\"][\"logs\"] . \"errorLog_\" . @date(\"d.m\") . \".txt\";\n\n\t\t# If we need to show\n\t\tif(!empty(Sky::$config['development']['traceExceptions']) && Sky::$config['development']['traceExceptions'] == \"screen\")\n\t\t\techo Sky::getType() == Sky::INIT_TYPE_CONSOLE ? \"$this\\n\" : \"<pre>$this</pre>\";\n\n\t\t# Check key\n\t\tif(!empty(Sky::$config['development']['noLog']))\n\t\t\treturn;\n\n\t\t# Try to create file if not exists\n\t\tif(!isset($filePath) || (!file_exists($filePath) && !touch($filePath)) || !is_writable($filePath))\n\t\t\treturn;\n\n\t\t# Log\n\t\terror_log($this->__toString(), 3, $filePath);\n\n\t}",
"public function getLogfile()\n {\n return self::LOG_FILE;\n }",
"static function LogPath( $log )\n\t{\n\t\t$log = str_replace( \"\\\\\", \"/\", $log );\n\t\tif ($log[0] == \"/\" || $log[1] == \":\") {\n\t\t\treturn $log;\n\t\t}\n\t\treturn self::LOGROOT . \"/$log\";\n\t}",
"public function log($msg)\n {\n $this->file->filePutContents($this->logFile, $this->config->x_shop_name.\" \".date('c').\" \".var_export($msg, true).\"\\n\", FILE_APPEND | LOCK_EX);\n }",
"public static function getCurrentErrorLog()\n {\n return ROOT . '/data/logs/log-' . date('Y-m-d') . '.log';\n }",
"function LogVar($msg, &$var)\n {\n if( !CCDebug::IsEnabled() )\n return;\n\n $t =& CCDebug::_textize($var);\n\n CCDebug::Log('[' . $msg . '] ' . $t);\n }",
"function theme_dblog_message($variables) {\n $output = '';\n $event = $variables['event'];\n // Check for required properties.\n if (isset($event->message) && isset($event->variables)) {\n // Messages without variables or user specified text.\n if ($event->variables === 'N;') {\n $output = $event->message;\n }\n // Message to translate with injected variables.\n else {\n $unserialized = unserialize($event->variables);\n if (is_array($unserialized)) {\n $output = t($event->message, $unserialized);\n }\n else {\n $output = t($event->message);\n }\n }\n // If the output is expected to be a link, strip all the tags and\n // special characters by using filter_xss() without any allowed tags.\n // If not, use filter_xss_admin() to allow some tags.\n if ($variables['link'] && isset($event->wid)) {\n // Truncate message to 56 chars after stripping all the tags.\n $output = truncate_utf8(filter_xss($output, array()), 56, TRUE, TRUE);\n $output = l($output, 'admin/reports/event/' . $event->wid, array('html' => TRUE));\n }\n else {\n // Prevent XSS in log detail pages.\n $output = filter_xss_admin($output);\n }\n }\n return $output;\n}",
"public function log()\n\t{\n\t\treturn $this->currentLog;\n\t}",
"public static function log_save()\n {\n if (empty(self::$log) or self::$configuration['core']['log_threshold'] < 1) {\n return;\n }\n\n // Filename of the log\n $filename = self::log_directory().date('Y-m-d').'.log'.EXT;\n\n if (! is_file($filename)) {\n // Write the SYSPATH checking header\n file_put_contents($filename,\n '<?php defined(\\'SYSPATH\\') or die(\\'No direct script access.\\'); ?>'.PHP_EOL.PHP_EOL);\n\n // Prevent external writes\n chmod($filename, 0644);\n }\n\n // Messages to write\n $messages = array();\n\n do {\n // Load the next mess\n list($date, $type, $text) = array_shift(self::$log);\n\n // Add a new message line\n $messages[] = $date.' --- '.$type.': '.$text;\n } while (! empty(self::$log));\n\n // Write messages to log file\n file_put_contents($filename, implode(PHP_EOL, $messages).PHP_EOL, FILE_APPEND);\n }",
"function writeLog(){\n\t\t$logContainer=new LogContainer();\n\t\t$ret = $this->writeLogFromLogContainer($logContainer);\n\t\t//special delivery for v9\n\t\t$old_appid=$logContainer->getAppid();\n\t\tif(substr($old_appid, 0,3)==\"v9-\" && !($old_appid == \"v9-v9\")){\n\t\t\trequire_once APP_ROOT.\"/v9_transforms.php\";\n\t\t\t$logContainer->setAppid(\"v9-v9\");\n\t\t\t$ret = $this->writeLogFromLogContainer($logContainer);\n\t\t}\n\t\treturn $ret;\n\t}",
"function log($str)\n\t{\n\t\tif($this->enable_log)\n\t\t{\n\t\t\techo \"$str<br>\\n\";\n\t\t}\n\t}",
"function getRawLogPath()\n {\n return $this->_props['RawLogPath'];\n }",
"function logToFile($arg1=\"\", $arg2=\"\",$arg3=\"\",$arg4=\"\",$arg5=\"\",$arg6=\"\"){\n\n\t$time = date(\"Y-m-d H:i:s\");\n\t\n\t$date = date(\"Y-m-d\");\n\t\n\t$str = \" $time \\t $arg1 \\t $arg2 \\t $arg3 \\t $arg4 \\t $arg5 \\t $arg6 \\t \\n\"; \n\t\n\terror_log(\"$str\\n\", 3, 'log/test_MoveProspectAccounts_'.$date.'.log'); \n\n}",
"public function setLogText($str , $default = false) {\n $str = ( $default ==true ) ? $this->logText . \" \" . $str : $str ;\n $this->logText=$str;\n\n }",
"public function __toString()\n\t{\n \t$r = \"Object \\\"\".get_class($this).\"\\\"\\n\";\n \t$r .= \"Log of events:\\n\";\n\t\tforeach($this->arrLogMessages as $m)\n\t\t{\n\t\t\t$r .= $m.\"\\n\";\n\t\t}\n\t\treturn $r;\n\t}",
"function sendLog(){\r\n\r\n\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\r\n\r\n\t\t$insertstatement = \"\r\n\t\t\tINSERT INTO\r\n\t\t\t\t`log`\r\n\t\t\t(`type`, `value`, `userid`, `ip`) VALUES (\r\n\t\t\t\t'\".mysqli_real_escape_string($this->db->db_link, $this->type).\"',\r\n\t\t\t\t'\".mysqli_real_escape_string($this->db->db_link, $this->value).\"',\r\n\t\t\t\t'\".mysqli_real_escape_string($this->db->db_link, $this->userid).\"',\r\n\t\t\t\t'\".$ip.\"'\r\n\t\t\t)\";\r\n\r\n\t\t$this->db->query($insertstatement);\r\n\r\n\t}",
"function save_log($g,$p,$file) {\n\t$txt = '';\n\t$txt .= \"GET\\n\";\n\tforeach ($g as $key => $string_value)\t{\n\t\t$txt .= $key.\" = \".$string_value.\"\\n\";\n\t}\n\t$txt .= \"POST\\n\";\n\tforeach ($p as $key => $string_value)\t{\n\t\t$txt .= $key.\" = \".$string_value.\"\\n\";\n\t}\n\n// ECRITURE FICHIER\n\t// ENREGISTREMENT LOG\n\tif ($fp=fopen($file, \"a\")) {\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\");\n\t\tfwrite($fp, $txt);\n\t\tfwrite($fp, \"\\n---------------------------------------------------------\\n\\n\");\n\t\tfclose($fp);\n\t} else {\n\t\techo \"Erreur d'ouverture de \".$file;\n\t}\n}",
"function WriteLogEss($log) {\r\n//echo $log.'<br/>';\r\n/*\r\n $datum=Date('d.m.Y H:i:s');\r\n $tmp = '/tmp/logESS.txt';\r\n $text = $datum . '-'.$log.chr(10);\r\n $fp = fopen($tmp, 'a');\r\n fwrite($fp, $text);\r\n fclose($fp);\r\n*/\r\n}",
"function logThisToTxtFile($logENID,$action)\n{\n\t$detect = new Mobile_Detect();\n\t\n\t$user_browser=user_browser();\n\t$user_os=user_os();\n\t$user_ip=getRealIpAddr();\n\t\t\t\t\n\tif ($detect->isMobile())\n\t{\n\t\t// mobile content\n\t\t$device='Mobile';\n\t} \t\t\t\t\n\telse\n\t{\n\t\t// other content for desktops\n\t\t$device='Desktop';\n\t}\n\tdate_default_timezone_set('UTC');\t\n\t$logDateTime= date('Y-m-d H:i:s');\t\t\n\t$log_this = 'EN client '.$logENID.': '.$action.' on UTC '.$logDateTime.' from '.$user_ip.' using '.$device.' through browser '.$user_browser.' ,OS: '.$user_os;\n\t$filename= 'ENLog_'.date('MY').'.txt';\n \t$myfile = file_put_contents($filename, $log_this.PHP_EOL , FILE_APPEND);\t\n\n}",
"public static function log($str) \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::log($str);\n\t}",
"public function setLog($area, $string, ...$format) {\n $trace_arr = debug_backtrace(FALSE, $this->TraceSteps);\n $trace = end($trace_arr);\n $this->Logs[$area][] = new \\REC1\\Components\\Logger\\Log(\n $trace['class'], $trace['function'], microtime(true), date('m/d/Y h:i:sa', time()), sprintf($string, ...$format)\n );\n }",
"function ilog(){\r\n\t\tif($this->input['action'] != 'mylog'){\r\n\t\t\tif($this->vars['logSavePage'] == 1) $logSavePage = addslashes(serialize($this->page));\r\n\t\t\t// user log\r\n\t\t\t$this->DB->query(\"\r\n\t\t\t\tINSERT INTO `log` (`userid` , `title` , `area` , `module` , `action` , `id` , `ip` , `kinput` , `page` , `dateline`)\r\n\t\t\t\tVALUES (\r\n\t\t\t\t'\".$this->user['userid'].\"', '\".$this->page['title'].\"', '\".$this->vars['area'].\"', '\".$this->input['module'].\"', '\".$this->input['action'].\"', '\".$this->iif($this->input[$this->input['module'].'id'] > 0, $this->input[$this->input['module'].'id'], 0).\"', '\".IP.\"', '\".serialize($this->input).\"', '\".$logSavePage.\"', '\".TIMENOW.\"'\r\n\t\t\t\t)\r\n\t\t\t\");\r\n\t\t}\r\n\t}",
"function log1($msg)\n{\n if(WRITE_LOG == false)\n return;\n date_default_timezone_set('Europe/Vienna');\n $now = date(\"Y-m-d H:i:s\");\n $line = sprintf(\"%s => %s\\r\\n\", $now, $msg);\n file_put_contents(LOG_FILE, $line, FILE_APPEND);\n}",
"function log_file($str, $path=false, $mode='a'){\n\t\t\n\t\t($path) ? $file=\"{$path}/log.txt\\n\" : $file=\"log.txt\\n\";\n\t\t\n\t\t$fp = fopen($file, $mode);\n\t\tfwrite($fp, \"$str\\n\");\n\t\tfclose($fp);\n\t}",
"public function getLog()\n {\n return join_paths($this->getPath(), 'import.log');\n }",
"function getLogMessage(){\r\n $log_string='Exception '.$this->getCode().':'.$this->message.\"\\n\";\r\n if ($this->getCode() != 80){\r\n $log_string .= 'line '.$this->getLine().' file '.$this->getFile().\"\\n\".$this->getTraceAsString().\"\\n\";\r\n }\r\n return $log_string;\r\n }",
"function WriteLog($functionName,$content)\r\n{\r\n\t// $myFile = LOG_FILE;\r\n\t// $fh = fopen($myFile, 'a') or die(\"can't open file\");\r\n\t// $stringData = $today.\" \\t\".$functionName.\"\\t\".$content.\"\\n\\n\";\r\n\t// fwrite($fh, $stringData);\r\n\t// fclose($fh);\r\n}",
"protected function getLogPrefix() {\n\t\t$info = array();\n\t\t$donorData = $this->getRequest()->getSessionData( 'Donor' );\n\t\tif ( is_array( $donorData ) ) {\n\t\t\tif ( isset( $donorData['contribution_tracking_id'] ) ) {\n\t\t\t\t$info[] = $donorData['contribution_tracking_id'];\n\t\t\t}\n\t\t\tif ( isset( $donorData['order_id'] ) ) {\n\t\t\t\t$info[] = $donorData['order_id'];\n\t\t\t}\n\t\t}\n\t\treturn implode( ':', $info ) . ' ';\n\t}",
"function recordToLog($arr, $type='request'){\n $id = time();\n $date = date('Y-m-d H:i:s');\n // create the str\n $str = $id . \"\\t\" . $date . \"\\t\" . $type . \"\\t\";\n foreach ($arr as $key => $value){\n switch ($key){\n case 'CVV2':\n $value = 'xxx';\n break;\n case 'ACCT':\n $len = strlen($value) - 4;\n $value = substr($value, 0, 4) . str_repeat('x', $len);\n break;\n case '3dRequest':\n if(stristr($value, '<CardNumber>')){\n list($before,) = split('<CardNumber>', $value);\n list(,$after) = split('</CardNumber>', $value);\n $value = $before .'<CardNumber>XXXX</CardNumber>'.$after;\n }\n break;\n case '3dResponse':\n break;\n }\n $str .= $key . '::' . $value . \"\\t\";\n }\n // open/write/close the file\n $fp = fopen($this->log_file_location, 'a+');\n fwrite($fp, $str . \"\\n\");\n fclose($fp);\n }",
"protected function createLogFile() {}",
"public static function filePath(string $log) : string\n {\n return app_path('logs', \"{$log}.log\");\n }",
"function addUserLog($content='无内容',$base='pc',$uid='',$uname=''){\r\n}"
] | [
"0.66048926",
"0.6352136",
"0.62873226",
"0.6255181",
"0.6163623",
"0.6149554",
"0.6114811",
"0.6094207",
"0.60902476",
"0.60510826",
"0.60476065",
"0.60244554",
"0.5998856",
"0.5984844",
"0.5982342",
"0.59700495",
"0.5967734",
"0.5967035",
"0.59620446",
"0.59334314",
"0.59293854",
"0.5917092",
"0.59145737",
"0.59115535",
"0.58856934",
"0.5880291",
"0.58728546",
"0.58709997",
"0.5862396",
"0.5857676",
"0.5849185",
"0.584044",
"0.5840149",
"0.58376014",
"0.5836746",
"0.5830262",
"0.57978207",
"0.57968706",
"0.57604986",
"0.5759686",
"0.5753404",
"0.57522064",
"0.57227516",
"0.5717466",
"0.57115483",
"0.57108617",
"0.56796837",
"0.5677085",
"0.5674044",
"0.56582284",
"0.5657345",
"0.56481004",
"0.5647374",
"0.5642033",
"0.56390905",
"0.5634069",
"0.5632665",
"0.5625461",
"0.5603886",
"0.560293",
"0.5597262",
"0.55929065",
"0.55910957",
"0.55898994",
"0.5581861",
"0.5580546",
"0.55762476",
"0.557271",
"0.5556001",
"0.5551144",
"0.555082",
"0.554991",
"0.5538689",
"0.5537252",
"0.5531957",
"0.5527465",
"0.55265975",
"0.5525184",
"0.5523827",
"0.5522415",
"0.55181813",
"0.5517851",
"0.551482",
"0.5514726",
"0.55142945",
"0.55111235",
"0.5508884",
"0.5502722",
"0.5499165",
"0.54886514",
"0.5486603",
"0.54757595",
"0.54716194",
"0.54649967",
"0.54641056",
"0.54637027",
"0.54622275",
"0.5459168",
"0.54537976",
"0.54469794",
"0.544145"
] | 0.0 | -1 |
Execute the console command. | public function fire()
{
$this->info('Stopping containers...');
$this->runInTerminal('docker-compose down');
$this->info('Done!');
} | {
"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\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\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 // 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 $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\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\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 $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 $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 $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 $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\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 // 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 \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 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 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 $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 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 $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 {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }",
"public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\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()\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(Command $command);",
"public function handle(Command $command);",
"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 $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 //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\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 // 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 $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 if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\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 $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\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.6469971",
"0.64641356",
"0.6427384",
"0.6349752",
"0.63188183",
"0.62750113",
"0.6261585",
"0.6261214",
"0.6235854",
"0.6225116",
"0.6222161",
"0.6214144",
"0.6193531",
"0.6191337",
"0.6183868",
"0.61772275",
"0.61766857",
"0.6172786",
"0.6149171",
"0.6148903",
"0.61484134",
"0.61469173",
"0.6138112",
"0.61347705",
"0.61316174",
"0.61158997",
"0.6113888",
"0.6110495",
"0.6108539",
"0.61056405",
"0.6102598",
"0.61022663",
"0.61016774",
"0.6096468",
"0.6094955",
"0.60922974",
"0.6088507",
"0.6083433",
"0.6082336",
"0.6077499",
"0.60767883",
"0.6075641",
"0.6073871",
"0.6072606",
"0.60701466",
"0.60694647",
"0.60693175",
"0.6067332",
"0.6061484",
"0.6059711",
"0.6059688",
"0.60574067",
"0.60503477",
"0.6042625",
"0.6040687",
"0.6032303",
"0.60306066",
"0.602774",
"0.60255086",
"0.60207987",
"0.60190594",
"0.6018816",
"0.60144967",
"0.60144013",
"0.6014115",
"0.6011956",
"0.60092497",
"0.6007996",
"0.60079277",
"0.60061836",
"0.60051036",
"0.6001119",
"0.6001112",
"0.6000026",
"0.5999729",
"0.5991934",
"0.59873074",
"0.5987054",
"0.59868026",
"0.59868026",
"0.59856236",
"0.59836555",
"0.5980716",
"0.5976703",
"0.5976261",
"0.5973673",
"0.5969664",
"0.59683484",
"0.5966431",
"0.5965345",
"0.59645647",
"0.59615767",
"0.5960291",
"0.59555584",
"0.59549415",
"0.5952351",
"0.59519506",
"0.594845",
"0.5946748",
"0.5946337",
"0.5944945"
] | 0.0 | -1 |
Display a listing of the users | public function index(User $model)
{
$user_data = User::all();
return view('users.index', compact('user_data'), ['users' => $model->paginate(15)]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function userList() {\n /** @var User[] $users */\n $users = $this->entityManager->getRepository(\"Entity\\\\User\")->findAll(); // Retrieve all User objects registered in database\n echo $this->twig->render('admin/lists/users.html.twig', ['users' => $users]);\n }",
"public function showListAction() {\n $users = $this->getDoctrine()\n ->getRepository(User::class)\n ->findAll();\n return $this->render(':Security\\User:users.html.twig', [\n 'users' => $users\n ]);\n }",
"public function list()\n {\n $listUsers = AppUser::findAll();\n $this->show('back/user/list', [\"users\" => $listUsers]);\n }",
"public function userlist()\n {\n $filter = Param::get('filter');\n\n $current_page = max(Param::get('page'), SimplePagination::MIN_PAGE_NUM);\n $pagination = new SimplePagination($current_page, MAX_ITEM_DISPLAY);\n $users = User::filter($filter);\n $other_users = array_slice($users, $pagination->start_index + SimplePagination::MIN_PAGE_NUM);\n $pagination->checkLastPage($other_users);\n $page_links = createPageLinks(count($users), $current_page, $pagination->count, 'filter=' . $filter);\n $users = array_slice($users, $pagination->start_index -1, $pagination->count);\n \n $this->set(get_defined_vars());\n }",
"public function showUsers()\n {\n $userRepo = $this->getDoctrine()->getRepository(User::class);\n $users = $userRepo->getUsersOrderByAsc();\n\n return $this->render('admin/list-of-users.html.twig', [\n 'users' => $users\n ]);\n }",
"public function index()\n {\n $this->user_list();\n }",
"public function index()\n {\n $this->userlist();\n }",
"public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\t\t$tUsers = model_user::getInstance()->findAll();\n\n\t\t$oView = new _view('users::list');\n\t\t$oView->tUsers = $tUsers;\n\t\t$oView->showGroup = true;\n\t\t$oView->title = 'Tous les utilisateurs';\n\n\t\t$this->oLayout->add('work', $oView);\n\t}",
"public function userlist()\n\t{\n\t\t$data['page']='Userlist';\n\t\t$data['users_list']=$this->users->get_many_by('userlevel_id',2);\n\t\t$view = 'admin/userlist/admin_userlist_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}",
"public function userlist()\n {\n $users = array('users' => UserModel::getPublicProfilesOfAllUsers(),'dynatable'=>'userlist');\n $this->View->render('user/userlist',$users);\n }",
"public function userlistAction()\n\t{\n\t\t$users = $this->userService->getUserList(array(), false);\n\n\t\t$this->view->roles = za()->getUser()->getAvailableRoles();\n\t\t$this->view->users = $users;\n\t\t$this->renderView('admin/user-list.php');\n\t}",
"public function index() {\n $rows = AdminUser::paginate(10);\n return View::make(\"CoreCms::user.listing\")->with(\"models\", $rows);\n }",
"public function index()\n {\n $users = $this->userService->getUserWithPaginate();\n return view('admin.user.list', compact('users'));\n }",
"public function admin_user_list() {\n $this->paginate = array(\n 'limit' => 10,\n 'order' => array('User.created' => 'desc' ),\n 'conditions' => array('User.status' => 1),\n );\n $data = $this->paginate('User');\n $this->set('user', $data);\n $this->render('/Users/user_list');\n }",
"public function index()\n {\n // show list user\n }",
"public function user_list()\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$this->load->model('User_Profiles', 'up');\n\t\t\t$data['users'] = $this->up->get_all_users();\n\t\t\t$this->load->view('user_list-admin',$data);\n\t\t}",
"public function index() {\n\t\t$this->accessible();\n\t\t$users = User::paginate(5);\n\n\t\treturn view('users.list', compact('users'));\n\t}",
"function userListing()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n { \n $searchText = $this->security->xss_clean($this->input->post('searchText'));\n $data['searchText'] = $searchText;\n \n $this->load->library('pagination');\n \n $count = $this->user_model->userListingCount($searchText);\n\n\t\t\t$returns = $this->paginationCompress ( \"userListing/\", $count, 5 );\n \n $data['userRecords'] = $this->user_model->userListing($searchText, $returns[\"page\"], $returns[\"segment\"]);\n \n $this->global['pageTitle'] = 'Garuda Informatics : User Listing';\n \n $this->loadViews($this->view.\"users\", $this->global, $data, NULL);\n }\n }",
"function user_list()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '运营人员列表';\n $this->global['pageName'] = 'userlist';\n\n $data['searchType'] = '0';\n $data['searchName'] = '';\n\n $this->loadViews(\"user_manage/users\", $this->global, $data, NULL);\n }\n }",
"public function indexAction()\n {\n // Get a query of listing all users from user service\n $pages = $this->get('app.user.service')->getUsers();\n \n // Get pagination\n $pagination = $this->get('app.service')->paginate($pages);\n \n // Render and return the view\n return $this->render(\n '::admin/user/users.html.twig',\n array(\n 'pagination' => $pagination\n )\n );\n }",
"public function index() \n {\n $users = $this->userRepo->listUser();\n return view('backend.pages.user.list', compact('users'));\n }",
"public function index()\n {\n return view('admin.users.index', ['users' => $this->repository->getSortableListViaPagination()]);\n }",
"public function indexAction()\n {\n $listing = $this->listing( 'Panel\\Listing\\Users');\n\n return array( 'listing' => $listing );\n }",
"public function index()\n {\n $count = \\App\\User::count();\n $users = \\App\\User::orderBy('id', 'desc')->paginate(10);\n\n return view('webcontrol.user.list', compact('count', 'users'));\n }",
"public function list ()\n {\n if (User::isLoggedIn() && User::getLoggedInUser()->is_admin === true) {\n\n // Alle User aus der DB laden\n $users = User::all();\n\n // Passenden View laden und User übergeben\n View::load('admin/users', [\n 'users' => $users\n ]);\n } else {\n \n // Wenn kein User eingeloggt ist, dann leider wir auf die Login Seite \n header(\"Location: login\");\n }\n }",
"public function indexAction(){\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $perpage = 2;\n $count = \\R::count('user');\n $pagination = new Pagination($page, $perpage, $count);\n $start = $pagination->getStart();\n $users = \\R::findAll('user', \"LIMIT $start, $perpage\");\n\n $this->setMeta('All users');\n $this->setData(compact('users', 'pagination', 'count'));\n }",
"public function index()\n {\n $users = $this->repository->all($columns = ['*']);\n return $this->success($users, trans('messages.users.getListSuccess'));\n }",
"public function listUsers() {\n \t$data['users'] = User::all();\n \treturn view('backend.users.index', $data);\n }",
"public function index()\n {\n return view('backend.user.list_user');\n }",
"public function index()\n {\n $users = User::order('created_at')->get();\n\n return view('users.list', compact('users'))->with(['mainmenu' => $this->mainmenu, 'submenu' => $this->submenu]);\n }",
"public function listUsers()\n {\n $users = $this->apiHeaderNav();\n return view('user.userListAll',['data'=>$users]);\n }",
"public function user_list()\n {\n \n \t$users = User::all();\n\n $data = array('users' => $users);\n\n return view('manage.user_list')->with($data);;\n }",
"public function listofUser()\n {\n return view('Admin.ShowallUser');\n }",
"public function listUser()\n {\n $user = User::where('id', '=', 1)->first();\n return view('listUser', [\n 'user' => $user\n ]);\n }",
"public function index()\n\t{\n\t\t$users = $this->user->active()->paginate(10);\n\n\t\treturn $this->view->make('users.index', compact('users'));\n\t}",
"public function index() {\n $users = User::select(\"users.*\")->paginate(10);\n return view('layouts.user-list', ['data' => $users]);\n }",
"public function index()\n {\n $users = (new User)->findAll();\n $title = 'Liste des membres';\n\n $data = compact('title', 'users');\n\n return $this->view('user/list', $data);\n\t}",
"public function index()\n {\n $users = User::paginate(15);\n return view('user.list', ['users' => $users]);\n }",
"public function index()\n\t{\n\t\t$searchKeyword = Input::get('q', '');\n\t\t$searchRoles = Input::get('roles', array());\n\n\t\t// Get Users (with roles) and limit it to only 30 results for\n\t\t// pagination. Don't you just love it when pagination simply works.\n\t\t$eloquent = App::make('orchestra.user')->search($searchKeyword, $searchRoles)->paginate();\n\t\t$roles = App::make('orchestra.role')->lists('name', 'id');\n\n\t\t// Build users table HTML using a schema liked code structure.\n\t\t$table = $this->presenter->table($eloquent);\n\n\t\tEvent::fire('orchestra.list: users', array($eloquent, $table));\n\n\t\t// Once all event listening to `orchestra.list: users` is executed,\n\t\t// we can add we can now add the final column, edit and delete \n\t\t// action for users.\n\t\t$this->presenter->actions($table);\n\n\t\tSite::set('title', trans('orchestra/foundation::title.users.list'));\n\n\t\treturn View::make('orchestra/foundation::users.index', array(\n\t\t\t'eloquent' => $eloquent,\n\t\t\t'roles' => $roles, \n\t\t\t'searchKeyword' => $searchKeyword,\n\t\t\t'searchRoles' => $searchRoles,\n\t\t\t'table' => $table, \n\t\t));\n\t}",
"public function index()\n {\n $data['users'] = $this->user->all();\n return view('backend.user.list')->with($data);\n }",
"public function listAction()\n {\n $users = $this->container->get( 'wg.openid.user_manager' )->findUsers();\n return $this->container->get('templating')->renderResponse(\n 'WGOpenIdUserBundle:Profile:list.html.twig', array(\n 'users' => $users,\n ));\n }",
"public function index()\n\t{\n\t\tLog::info('Ingreso al Index');\n\t\t$page = Input::get('page', 1);\n\n\t\t$data = $this->user->getByPage($page, 15);\n\n\t\t$users = Paginator::make($data->items, $data->totalItems, 15);\n\t\t$users = $this->presenter->paginator($users, new UserPresenter);\n\n\t\treturn View::make(\"users.index\", compact(\"users\"));\n\t}",
"public function list() {\n $users = User::orderBy('name')->paginate(10);\n $repository = new Repository(compact('users'));\n \n $layout = Layout::blank([\n Layout::view('vendor.platform.users.list')\n ]);\n \n return $layout->build($repository);\n }",
"public function allUsers()\n\t{\n\t\t$data['users'] = $this->MainModel->selectAll('users', 'first_name');\n\t\t$this->load->view('layout/header');\n\t\t$this->load->view('layout/sidebar');\n\t\t$this->load->view('template/all-users', $data);\n\t\t$this->load->view('layout/footer');\n\t}",
"public function getUsers()\n {\n $title = \"Users\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n\n // Get all the users from db\n $users = $this->di->get(\"user\")->getAllUsers();\n\n $data = [\n //\"items\" => $book->findAll(),\n \"users\" => $users,\n ];\n\n $view->add(\"pages/users\", $data);\n //$view->add(\"blocks/footer\", $data);\n\n $pageRender->renderPage([\"title\" => $title]);\n }",
"public function index() {\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\t$this->User->recursive = 0;\n\t\t$this->set('users', $this->paginate());\n\t\t$this->set('userId', $user['User']['id']);\n\t\t$this->set('userType', $user['User']['type']);\n\t}",
"public function actionIndex()\n {\n $request = Yii::$app->request;\n\n $params = ArrayHelper::merge($request->get(), [\n 'perPage' => $request->get('perPage', Yii::$app->params['per_pages'][0]),\n 'orderCol' => $request->get('orderCol', 'id'),\n 'orderDir' => $request->get('orderDir', 'asc')\n ]);\n\n $pageTitle = Yii::t('app', 'List of users');\n\n $breadcrumbs = [\n ['url' => ['/admin'], 'label' => Yii::t('app', 'Admin panel'), ],\n ['url' => ['/admin/user/list'], 'label' => $pageTitle, 'class' => 'active']\n ];\n\n $data = User::getList($params);\n\n return $this->render('/admin/user/list.twig', [\n 'params' => $params,\n 'pages' => $data['pages'],\n 'users' => $data['models'],\n 'pageTitle' => $pageTitle,\n 'breadcrumbs' => $breadcrumbs,\n ]);\n }",
"public function showUsers()\r\n\t{\r\n\t\t$users = User::paginate(10);\r\n\r\n\t\treturn view('admin/users', compact('users'));\r\n\t}",
"public function index()\n {\n $users = User::all();\n //show the users list, mostly advanced users\n return view('users.index')->with('users', $users);\n }",
"public function index()\n {\n\n $users = $this->user->paginate(10);\n\n return view('admin.users.index', compact('users'));\n }",
"public function index()\n {\n // user search\n\n $name = $this->request->name;\n $email = $this->request->email;\n\n $users = new User;\n\n if (!empty($name)) {\n \t$users = $users->name($name);\n }\n\n if (!empty($email)) {\n \t$users = $users->email($email);\n }\n\n $users = $users->paginate(5);\n\n return view('admin.users.index',compact('users'));\n }",
"public function index()\n {\n $users = Base::user()->paginate();\n\n return view('admin::auth.users.index')->with(compact('users'));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $users = $em->getRepository('AppBundle:User')->findAll();\n\n return $this->render('users_list.html.twig', array('users' => $users));\n }",
"public function index()\n {\n $users = User::all();\n return view('users.userslist')->withUsers($users);\n }",
"public function index()\n {\n $data = [];\n $users = User::paginate(10);\n $data['users'] = $users;\n return view('admin.user.user-list',['data' => $data]);\n }",
"public function index()\n {\n //\n $_users = User::all();\n return view('admin.users.list', ['users' => $_users ]);\n }",
"public function index()\n {\n $users = $this->userRepo->getDataPaginate($this->limit);\n\n return view('admin.user.index', compact('users'));\n }",
"public function list_user()\n\t{\n\t\tcheck_access_level_superuser();\n\t\t$data = [\n\t\t\t'list_user' => $this->user_m->get_cabang(),\n\t\t\t'list_cabang' => $this->data_m->get('tb_cabang')\n\t\t];\n\t\t$this->template->load('template2', 'user/list_user', $data);\n\t}",
"public function index()\n {\n $users = User::orderBy('created_at','DESC')->paginate(env('PAGES'));\n\n $flag = User::count() > env('PAGES') ? true : false;\n\n return view('users.list-user',[\n 'users' => $users,\n 'flag' => $flag,\n ]);\n }",
"public function index()\n {\n $users = $this->userRepository->getPaginate();\n \n return view('admin.users.index', compact('users'));\n }",
"public function index()\n {\n $this->checkPermission();\n\n $this->title = trans('admin.users');\n $users = User::with('roles')->paginate(10);\n\n $this->content = view('admin.users.index')->with(compact('users'))->render();\n return $this->renderOutput();\n }",
"function index() {\n $url = base_url() . \"index.php/users\";\n $total_records = count($this->musers->get_users());\n $config = $this->paginate($url, $total_records);\n $this->pagination->initialize($config);\n $data = $this->get_videos();\n $data['sys_users'] = $this->musers->get_users($config['per_page'], $this->uri->segment(3));\n $this->template->load('default', 'listUsers', $data);\n }",
"public function index()\n {\n $users = $this->userService::getAll();\n\n return view('admin.pages.users')->with(compact('users'));\n }",
"public function index()\n {\n $users = $this->model->paginate();\n return view('menu-maker::users.index', compact('users'));\n }",
"public function index()\n {\n $users = \\App\\User::paginate(20);\n\n return view('admin.users', ['users' => $users]);\n }",
"public function index()\n {\n $pagintaionEnabled = true;\n if ($pagintaionEnabled) {\n $users = User::paginate(config('usersmanagement.paginateListSize'));\n } else {\n $users = User::all();\n }\n $roles = Role::all();\n\n return View('pages.admin.users.show-users', compact('users', 'roles'));\n }",
"public function index()\n {\n $users = $this->userRepository->paginate(10);\n return view('users.index')->with(['users' => $users]);\n }",
"public function index(){\n\t\treturn view(Config::get('boxtar.viewUsers'))->with('users', User::latest()->get());\n\t}",
"public function index()\n {\n $users = DB::table('users')->count();\n $listUser = User::orderBy('id','DESC')->search()->paginate(6);\n return view('admin.user.list',compact('listUser','users'));\n }",
"public function listUsers()\n {\n $users = User::all();\n\n return view('listUsers', ['users' => User::all()]);\n\n }",
"public function index()\n\t{\n\t\t// $users = $this->userRepo->getPaginatedWhere(3, 'disabled', 1);\n\n\t\t$users = $this->userRepo->getUserIndex(Input::all());\n\n\t\treturn View::make('user.index')->with('users', $users);\n\t}",
"public function list_page_content () {\n // Check permissions\n if ( ! current_user_can( 'list_users' ) ) {\n return;\n }\n\n // Main listing query\n $this->list_query_users();\n\n // Set urls for column sorting links.\n $sort_link_username = $this->sort_link( 'user_name', $this->orderby, $this->order );\n $sort_link_displayname = $this->sort_link( 'display_name', $this->orderby, $this->order );\n\n // Include template\n include CTAL_PATH.'/admin/templates/users-page.php';\n }",
"public function index()\n {\n\n $usersList = User::all();\n\n return view('dash.users')->with( compact('usersList') );\n }",
"public function index()\n {\n $users = $this->usersRepo->paginate();\n return view('CMS::users.index', compact('users'));\n }",
"public function index()\n {\n \n return view('users.users_list');\n }",
"public function index()\n {\n $users = User::all();\n return view('backend.user.list', compact(['users']));\n }",
"public function index()\n {\n $users = $this->userRepository->getAllWithPaginate();\n\n return view('admin.users.index', compact('users'));\n }",
"public function listAction()\n\t{\n\t\t$em = $this -> getDoctrine()->getManager();\n\t\t$listUsers = $em -> getRepository('UserBundle:User') -> showNewUsers();\n\n\t\treturn $this -> render('FrontOfficeBundle:User:list.html.twig', \n\t\t\tarray('listUsers'=> $listUsers));\n\t}",
"public function index()\n {\n $users = User::all();\n \n\n return view('admin.user.listar')->with(compact('users'));\n }",
"public function index()\n {\n $users = $this->users->sortable(['created_at' => 'desc'])->paginate(10);\n\n return view('admin.users.index', ['users' => $users]);\n }",
"public function index()\n {\n $users = $this->users->sortable(['created_at' => 'desc'])->paginate(10);\n\n return view('admin.users.index', ['users' => $users]);\n }",
"public function index()\n {\n // Retrieve Users from the database\n\n $userList = User::all();\n \n // Return that to the list view\n return View::make('user.index')->with('users', $userList); \n \n }",
"public function index()\n {\n return view('administration::user.index')\n ->withUsers($this->user->all());\n }",
"public function index()\n {\n return $this->users->getAll('first_name', 'asc', ['departments', 'sectors', 'meta']);\n }",
"public function index()\n {\n $users = User::paginate(10);\n\n return view('backend.users.index')->withUsers($users);\n }",
"public function index()\n {\n $userLists = UserList::where('public', 1)->paginate(12);\n return view('pages.userlist.index', compact('userLists'));\n }",
"public function indexUsersAction()\n {\n $em = $this->getDoctrine()->getManager();\n $members = $em->getRepository('AppBundle:Member')->findAll();\n $users = $em->getRepository('AppBundle:Member')->findAllUsers();\n return $this->render('member/indexUser.html.twig', array(\n 'members' => $members,\n 'users' => $users\n ));\n }",
"function userslist(){\n\t\t\tif(!Auth::check()){\n\t\t\t\tReturn Redirect::to('login');\n\t\t\t}\n\t\t\t$users = AdminUser::where('user_role_id',0)->orderBy('id','desc')->get();\n\t\t\treturn view('admin.pages.users.index', ['records' => $users]);\n\t\t}",
"public function index()\n {\n $client = new Client($this->data);\n\n $response = $client->get('user');\n\n $body = $response->getBody();\n\n $users = json_decode($body);\n\n return view('user.list')->with(compact('users'));\n }",
"public function index()\n {\n $users = User::paginate();\n return view('manage.users.index')->withUsers($users);\n }",
"public function index()\n {\n $users = User::sortable()->orderBy('created_at', 'desc')->paginate(config('paginate.number_users'));\n return view('admin.pages.users.index', compact('users'));\n }",
"public function usersList()\n {\n // hacer query a la DB para pedir los users \n // DB -> USER -> Compact (users) \n $users = User::all() ;\n //dd($users);\n return View('userList', compact(['users']));\n \n\n }",
"public function index()\n {\n $users = $this->users->with('roles')->get();\n return \\View::make('admin.users.index', [\n 'users' => $users,\n 'title' => 'list',\n ]);\n }",
"public function index()\n {\n $users = User::latest()->paginate(10);\n $i = 1;\n return view('user_management.user', compact(['users', 'i']));\n }",
"public function all_londontec_users(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/viewusers';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'londontec LMS users lists',\n\t\t\t'userslist' => $this->setting_model->Get_All('londontec_users'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}",
"public function index()\n {\n $this->authorize('viewAny', User::class);\n $users = User::paginate(40);\n return view('admin.users.index', compact('users'));\n }",
"public function allUsers()\n {\n $users = $this->user->findAll();\n $this->show('admin/allusers', ['users' => $users]);\n }",
"public function indexAction()\n {\n $users = (new UserCollectionModel())->getUsers();\n echo (new View('userIndex'))\n ->addData('users', $users)\n ->render();\n }",
"public function index()\n {\n $this->authorize('access_users_list', User::class);\n $users = User::orderBy('created_at', 'desc')->paginate(10);\n return view('users.index', [ 'users' => $users ]);\n }",
"public function index()\n {\n return $this->showCollectionResponse(User::all(), 200);\n }",
"public function index()\n {\n $users = User::paginate(10);\n return view('admin.user.index', ['users' => $users]);\n }"
] | [
"0.8467428",
"0.84463173",
"0.8393419",
"0.83682805",
"0.8328806",
"0.830487",
"0.8242352",
"0.8221456",
"0.8197339",
"0.81725514",
"0.8159651",
"0.8127423",
"0.8089976",
"0.8059625",
"0.80441093",
"0.8038903",
"0.8031339",
"0.80074406",
"0.79716617",
"0.7961764",
"0.7951219",
"0.79442316",
"0.7932014",
"0.7924355",
"0.7911607",
"0.7895559",
"0.78883606",
"0.78882855",
"0.7848604",
"0.7836107",
"0.78274703",
"0.7826839",
"0.78264517",
"0.78209955",
"0.78192306",
"0.78181434",
"0.7816182",
"0.7796621",
"0.77947164",
"0.77939916",
"0.7787",
"0.7780483",
"0.77778846",
"0.77740943",
"0.7770013",
"0.7769143",
"0.77657574",
"0.775262",
"0.7748843",
"0.77479166",
"0.77452725",
"0.7744622",
"0.77427286",
"0.7741406",
"0.77391946",
"0.7737236",
"0.77334446",
"0.77292085",
"0.7721831",
"0.7720656",
"0.7713392",
"0.7704926",
"0.77025485",
"0.77009344",
"0.770088",
"0.7698716",
"0.7696981",
"0.7696594",
"0.7691964",
"0.76892644",
"0.7684859",
"0.76818776",
"0.7681608",
"0.7681184",
"0.767673",
"0.76741225",
"0.76616895",
"0.7659186",
"0.7654644",
"0.76526207",
"0.76526207",
"0.7648991",
"0.76479757",
"0.7644158",
"0.7643848",
"0.7635488",
"0.76350945",
"0.76286006",
"0.76212925",
"0.7620298",
"0.7617954",
"0.7616274",
"0.7614075",
"0.7612201",
"0.76094866",
"0.7607647",
"0.76068634",
"0.7603967",
"0.7603719",
"0.7602508",
"0.7601222"
] | 0.0 | -1 |
instantiate class with file | public function setVideoParameters(Request $request,$directory, $fieldname_rqst, $filename, $duration_field, $artwork_field) {
$track = new GetId3( request()->file($fieldname_rqst) );
$file_dir = config('app.' . $directory);
$parameters_data = [];
$parameters_data[$duration_field] = $track->getPlaytime();
dd($track, $track->getPlaytime(), $track->getArtwork(true));
dd($track->getPlaytime(), $track->getArtwork(true));
//Optionally you can pass can pass `true` to the method to get a jpeg version. This will return an UploadedFile instance
$file_artwork = $track->getArtwork(true);
if ($file_artwork) {
$file_artwork_name = explode($filename,'.')[0] . '.' . $file_artwork->getClientOriginalExtension();
// Move image to folder
$file_artwork_name->move($file_dir, $file_artwork_name);
$parameters_data[$artwork_field] = $file_artwork_name;
}
$this->update($parameters_data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct($file);",
"public function __construct($filename);",
"function fromFile($file) \n {\n return new self($file);\n }",
"function __construct($class = 'Unknown', $file = \"../../log/heili.log\") {\n\n $this->class = $class;\n $this->file = new File($file);\n $opened = $this->file->open($this->conf[\"mode\"]);\n\n }",
"public function __construct($file)\n {\n }",
"public function __construct($file)\n {\n }",
"public function __construct(string $file_path);",
"function __construct ($filename = NULL) {\n if (isset ($filename))\n $this->load (file_get_contents ($filename));\n }",
"public function __construct(\n\t $filePath\n\t )\n\t{\n\t\t$this->load($filePath);\n\t}",
"function __construct($file_path)\n {\n $this->open($file_path);\n }",
"public function __construct($file='')\n\t{\n\t\tif(!empty($file))\n\t\treturn $this->get($file);\n\t}",
"public function __construct($file) {\n $this->file = $file;\n }",
"public function __construct($file)\n {\n $this->file = $file;\n }",
"public function __construct($file)\n\t{\n\t\t$this->file = $file;\n\t}",
"public function __construct($path);",
"public function load($file);",
"public function load($file);",
"public function load($file);",
"abstract public function load($filename);",
"public function __construct($filename = null){\n\n if(! empty($filename)){\n $this->load($filename);\n }\n }",
"public function __construct($file)\n {\n $this->loadSchema($file);\n }",
"public function __construct()\n {\n //\n\n\t echo new FakeFile( )\n }",
"public function __construct($file = \"\")\n {\n $this->file = $file;\n }",
"function __construct($file = null){\n\t\t$this->file = $file;\n\t}",
"protected function _construct() {\n\t\t$this->_fileObj = $this->fileObj();\n\t}",
"function __construct($path = \"\") {\n\t\tif ($path) $this->load($path);\n\t}",
"private function loadClass($path, $class_name)\n {\n if (file_exists($path)) {\n $instance = new $class_name();\n return $instance;\n } else {\n throw new FileNotFoundException();\n }\n }",
"public static function from($file)\n {\n return new self($file);\n }",
"function __construct($file=null) {\n $this->file = $file;\n }",
"function LoadClassFile($file_name){\n\t// Get file contents\n\t$file_handle = fopen($file_name, 'r');\n\t$file_data = fread($file_handle, filesize($file_name));\n\tfclose($file_handle);\n\treturn $file_data;\n}",
"public function load(string $class);",
"public function loadFromFile($file)\n {\n \n }",
"private function instantiateClass( $pageFilePath ) : Page\n {\n $isDebug = false;\n\n if($isDebug) {\n echo '<span style=\"color:blue;\">instantiateClass()</span> | pageFilePath = ' . $pageFilePath . '<br>';\n }\n // Strip the directories off the filename\n $filePathArray = explode(\n '/',\n $pageFilePath\n );\n\n $filename = $filePathArray[count($filePathArray) - 1];\n\n\n $page = $filePathArray[count($filePathArray) - 1];\n $topic = $this->allPages[$this->stripExtFromFile($filename)][0];\n $course = $this->allPages[$this->stripExtFromFile($filename)][1];\n\n if($isDebug) {\n echo '<span style=\"color:blue;\">Filename</span>: ' . $filename . '<br>';\n }\n\n $class = explode(\n \".\",\n $filename\n\n );\n\n if($this->isDebug) {\n echo 'Class: ' . $class[0] . '<br>';\n// echo $this->modulesAssoc[$_SESSION['page']] . '<br>';\n// echo 'J\\\\ClassNotes\\\\' . $this->stripClassNameFromFilePath($this->modulesAssoc[$_SESSION['module']], true) . '<br>';\n }\n // Instantiate the class with the filePath ( eg. )as param\n $className = 'J\\\\ClassNotes\\\\' . $class[0];\n\n if($isDebug) {\n echo '<span style=\"color:blue;\">ClassName</span>: ' . $className . '<br>';\n }\n // $filepath = $this->stripClassNameFromFilePath([ $_SESSION[ 'module' ]] );\n\n require_once $pageFilePath;\n\n $newPage = new $className( $filename, $topic, $course );\n\n\n return $newPage;\n\n }",
"public function __construct(string $file)\n {\n $this->file = $file;\n }",
"public function __construct(string $file)\n {\n $this->file = $file;\n }",
"public function __construct($filepath)\n\t{\n\t\tif (file_exists($filepath)) \n\t\t{\n\t\t\t$this->filepath = $filepath;\n\t\t\t$this->loadFileInfo();\n\t\t}else{\n\t\t\techo \"File not found.\";\n\t\t}\n\n\t}",
"public function __construct(\n protected string $filename\n ) {\n }",
"function __construct($pathtofile, $fast = false) {\n\t\t$this->fast = $fast;\n\t\t$this->LoadFile($pathtofile);\n\t}",
"public function __construct()\n {\n parent::__construct();\n $this->fileClassFactory = new FileFactory();\n }",
"function __construct ($filename){\n try{\n $this->filename = $filename;\n $xml = simplexml_load_file($filename);\n $this -> keys = get_object_vars($xml); \n } catch (Exception $ex) {\n die(\"invalid XML: \". $ex);\n }\n \n }",
"public function __construct($fp) {\n\n $this->board = new Board();\n $this->filepath = $fp;\n $this->fileSize = filesize($this->filepath);\n }",
"function load_class( $file_name, $class_name, $pass_var=\"\" )\n\t{\n\t\tif ( ! $class_name )\n\t\t{\n\t\t\t$class_name = $file_name;\n\t\t}\n\t\t\n\t\trequire_once( $file_name );\n\t\t\n\t\tif ( $pass_var )\n\t\t{\n\t\t\t$class = new $class_name ( $pass_var );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$class = new $class_name;\n\t\t}\n\t\t\n\t\t$class->ipsclass =& $this;\n\t\treturn $class;\n\t}",
"public function __construct($file = FALSE)\n {\n if($file)\n $this->fileName = $file;\n }",
"function __construct() {\n\t\t$script = $_SERVER['SCRIPT_FILENAME'];\n\t\t$dir = preg_replace('/index.php/', '', $script);\n\t\t$this->_path = preg_replace('/\\//', DIRECTORY_SEPARATOR, $dir . $this->fileName);\n\t\t$this->_fileContent = file_get_contents($this->_path);\n\t\t$this->read();\n\t}",
"public static function load($file) {\r\n \r\n $router = new static;\r\n\r\n require $file;\r\n\r\n return $router;\r\n }",
"public function __construct($file){\n if(!is_array($file)){ //if it is a string, this means that the image name was passed to the instance - therefore file already exists\n $this->file_name = $file;\n }else{\n $this->file = $file; //store file array\n $this->check_exists(); //check file before handling\n }\n }",
"public function __construct($filename=''){\t\t\n\t\t$this->_filename = $filename;\n\t}",
"public function __construct(File $file)\n\t{\n\t\t$this->file = $file;\n\t}",
"public function testFileLoaderClassCanBeCreated()\n {\n $f = new FileLoader;\n }",
"public function __construct($filePath) {\n\t\t$this->filePath = $filePath;\n\t\t$this->vars = array();\n\t}",
"public function instantiate($className);",
"function load($classname)\r\n{\r\n\r\n\r\n if (file_exists($file = dirname (__FILE__) . '/' . $classname .'.class.php'))\r\n require_once $file;\r\n}",
"public function __construct() {\n\t\tforeach ($this->_templates as $key => &$value) {\n\t\t\t$value = file_get_contents(LAYERS_ROOT_PATH . $this->_templateFiles[$key]);\n\t\t}\n\t}",
"public static function load($file) {\r\n\r\n $router = new static;\r\n\r\n require $file;\r\n\r\n return $router;\r\n }",
"public static function load($file)\r\n\t{\r\n\t\treturn (new self)->setinput(realpath($file));\r\n\t}",
"public function __construct($filePath)\n {\n $this->filePath = $filePath;\n }",
"public function __construct(File $file)\n {\n $this->file = $file;\n }",
"public function __construct(File $file)\n {\n $this->file = $file;\n }",
"public function __construct(File $file)\n {\n $this->file = $file;\n }",
"public function __construct(File $file)\n {\n $this->file = $file;\n }",
"public static function class_file($filename, $directory, $init = false)\n {\n $name = ucfirst(strtolower($filename));\n \n $filename = $name;\n $tracker = 'custom';\n $init = (boolean) $init;\n $namespace = 'custom';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }",
"public function __construct($filename)\n {\n $this->filename = $filename;\n }",
"public function __construct( $fileName )\n {\n $this->processors = null;\n $this->valueArray = array();\n $this->readFile( $fileName );\n }",
"public function __construct($filename = null)\n\t{\n\tif (!is_null($filename)) $this->read_file($filename);\n\t}",
"function __construct($file_path, $template_file) {\r\n $this->cachefile = './app/_cache/'.$this->base64_url($file_path);\r\n # collect an md5 of all files\r\n $this->hash = $this->create_hash();\r\n # determine our file type so we know how (and if) to comment \r\n $this->filetype = $this->set_filetype($template_file);\r\n $this->comment_tags = $this->set_comment_tags();\r\n }",
"public static function newObj($name)\n\t{\n\t\t$info = self::getClassInfo($name);\n\n\t\tif ( !file_exists($info['path'])) {\n\t\t\ttrigger_error('Obj \"'.$info['fullname'].'\" could not be instanciated. File was not found', E_USER_ERROR);\n\t\t}\n\n\t\trequire_once($info['path']);\n\n\t\treturn new $info['fullname'] ;\n\t}",
"function __construct($filePath) {\r\n $this->_file = parse_ini_file($filePath, true);\r\n }",
"public function __construct($filename = null)\n\t{\n\t\tif (empty($filename)) {\n\t\t\tthrow new InvalidAgrument(\"No input file was provided.\");\n\t\t}\n\t\n\t\tif (!file_exists($filename)) {\n\t\t\tthrow new InvalidAgrument(\"Input file doesn't exist.\");\n\t\t}\n\t\n\t\t$this->fileContents = file_get_contents($filename);\n\t\t\n\t}",
"function __construct($file){\n\t\t$j = file_get_contents($file); // в примере все файлы в корне\n\t\t$data = json_decode($j,true); \n\t\t$this->schJSON=$data;\n\t\t$this->startLessonDate = new DateTime('2019-02-07');\n\t}",
"public function __construct($filePath, $new = false, $archiveImplementation = null)\n {\n }",
"public function create_from_file($file);",
"function __construct($file){\t\t\n\t\t$this->pathFile = $file;\t\t\t\t\t\t\t\t\t\t// inisialisasi pathFile\n\t\t$this->filename = pathinfo($this->pathFile)['filename'];\t\t//mengambil namafile dari pathFile\n\t\t$this->getTextInside();\t\t\t\t\t\t\t\t\t\t\t//menjalankan fungsi getTextInside\n\t}",
"public function newInstance(\n string $name,\n string $fileName,\n $params = null\n ): object {\n $this->checkService($name);\n\n $definition = $this->mapper[$name];\n $options = [];\n $options[] = $fileName;\n\n if (\"json\" !== $name && \"php\" !== $name) {\n $options[] = $params;\n }\n\n return new $definition(...$options);\n }",
"public static function getInstance($filename)\n {\n $manager = self::getManager();\n\n return $manager->make($filename);\n }",
"public function __construct($filename)\n {\n $this->filename = $filename;\n }",
"public function __construct($filename)\n {\n $this->filename = $filename;\n }",
"public function __construct($filename)\n {\n $this->filename = $filename;\n }",
"public function __construct($filename)\n {\n $this->filename = $filename;\n }",
"abstract public function load();",
"abstract public function load();",
"public function __construct($filepath=null) {\r\n\t\tif($filepath) {\r\n\t\t\t$this->filepath = $filepath;\t\t\t\t\t\r\n\t\t}\r\n\t}",
"public static function load($filePath)\n {\n return new self($filePath);\n }",
"function loader($class)\n{\n $file = $class . '.php';\n if (file_exists($file)) {\n include $file;\n }\n}",
"public function load($className);",
"public function __construct( $fileName ) {\n\n\t\t\tif ( !is_string( $fileName ) || !strlen( $fileName ) ) {\n\t\t\t\tthrow new \\Exception( 'Invalid argument. Expected a non-empty string!' );\n\t\t\t}\n\n\t\t\tif ( !file_exists( $fileName ) ) {\n\t\t\t\tthrow new \\Exception( 'File ' . $fileName . ' not found!' );\n\t\t\t}\n\n\t\t\tif ( !is_readable( $fileName ) ) {\n\t\t\t\tthrow new \\Exception( 'File ' . $fileName . ' is not readable!' );\n\t\t\t}\n\n\t\t\t$buffer = file_get_contents( $fileName );\n\n\t\t\t$this->fileName = $fileName;\n\n\t\t\t$this->parse( $buffer );\n\n\t\t}",
"public function __construct($filePath)\n {\n $this->setFilePath($filePath);\n }",
"public function __construct($file, $data)\n {\n $this->file = $file;\n $this->data = $data;\n }",
"abstract public function load($file, $context);",
"abstract protected function load();",
"abstract protected function load();",
"abstract protected function load();",
"abstract protected function load();",
"public function __construct() {\n\t\trequire_once 'fs.php';\n\t\t$this->a = new Advertikon\\Fs();\n\t}",
"public abstract function load();",
"public function __construct($data, $file)\n {\n $this->data = $data;\n $this->file = $file;\n }",
"function __construct( $ini_file = NULL ){\n if( is_null($ini_file)){\n $this->set_ini_file(NULL);\n $this->ini_file_array = NULL;\n } else {\n if( file_exists( $ini_file )){\n $this->set_ini_file( $ini_file );\n $this->parse();\n } else {\n $this->set_ini_file(NULL);\n $this->ini_file_array = NULL;\n }\n }\n }",
"public static function fromFile($path)\n {\n return new static(Reader::fromFile($path));\n }",
"protected function instance($filename)\n {\n file_put_contents($filename, 'Hello world');\n\n $name = basename($filename);\n\n return new File($filename, $name, UPLOAD_ERR_OK);\n }",
"public function from($file) {\n $this->codegen->source= $file ?? '(unknown)';\n return $this;\n }",
"public function __construct($filePath)\n {\n $this->path = $filePath;\n }",
"function myLoad($className){\n\t$path = MYPHP_SOURCE.'/'.str_replace('\\\\', '/', $className).'.class.php';\n\tif(file_exists($path)){\n\t\trequire_once $path;\n\t}\n}"
] | [
"0.7648509",
"0.74436134",
"0.7272134",
"0.7073296",
"0.700581",
"0.7005409",
"0.7004215",
"0.69614285",
"0.6949047",
"0.6894087",
"0.6807542",
"0.67698514",
"0.6722828",
"0.6695013",
"0.6688118",
"0.66842747",
"0.66842747",
"0.66842747",
"0.66692966",
"0.66649985",
"0.6653729",
"0.6622224",
"0.6611228",
"0.6591945",
"0.6586199",
"0.6573063",
"0.65398",
"0.651725",
"0.64904493",
"0.6484899",
"0.6472369",
"0.64624554",
"0.6456357",
"0.64311427",
"0.64311427",
"0.64175296",
"0.6402024",
"0.63862115",
"0.638478",
"0.6357524",
"0.63553745",
"0.63329923",
"0.62912476",
"0.6287126",
"0.6277492",
"0.6239129",
"0.62375396",
"0.621971",
"0.6206105",
"0.61966246",
"0.6193535",
"0.6192537",
"0.6178639",
"0.6170192",
"0.615398",
"0.61520225",
"0.6150626",
"0.6150626",
"0.6150626",
"0.6150626",
"0.6148728",
"0.6147033",
"0.6128831",
"0.6111142",
"0.6104609",
"0.6102868",
"0.60947263",
"0.60917",
"0.60840696",
"0.6081399",
"0.6080212",
"0.6076555",
"0.6076059",
"0.60609907",
"0.6054381",
"0.6054381",
"0.6054381",
"0.6054381",
"0.60528946",
"0.60528946",
"0.60519445",
"0.6045782",
"0.6030421",
"0.6029558",
"0.60209394",
"0.6012972",
"0.60083383",
"0.600383",
"0.60019195",
"0.60019195",
"0.60019195",
"0.60019195",
"0.5999171",
"0.59945905",
"0.5982743",
"0.59818894",
"0.5976411",
"0.5973351",
"0.5962186",
"0.5959633",
"0.5953178"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//$images = DB::table('images')->where('image_category', '=', 'Profile Pictures')->orderBy('image_name')->get();
$practices = Practice::all();
$roles = Role::all();
return view('users.create', compact('practices', 'roles'));
} | {
"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 é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)
{
$imageId = $request->image_id;
if ($request->image_url) {
$image = new Image;
$image->user_id = Auth::id();
$image->image_name = $request->user_firstname;
$image->image_category = "Profile Pictures";
$image->image_title = $request->user_firstname;
$imageUrl = Cloudinary::upload($request->file('image_url')->getRealPath())->getSecurePath();
$image->image_url = $imageUrl;
$image->save();
$imageId = $image->id;
}
$user = new User;
$user->practice_id = $request->practice_id;
$user->image_id = $imageId;
$user->user_salutation = $request->user_salutation;
$user->user_title = $request->user_title;
$user->user_firstname = $request->user_firstname;
$user->user_lastname = $request->user_lastname;
$user->user_telephone = $request->user_telephone;
$user->user_specialization = $request->user_specialization;
$user->user_description = $request->user_description;
$user->email = $request->email;
$user->password = Hash::make($request->user_firstname);
$user->role_id = $request->role_id;
$user->save();
$token = app(\Illuminate\Auth\Passwords\PasswordBroker::class)->createToken($user);
$currentURL = request()->getHttpHost();
$fullLink = $currentURL . '/password/reset/' . $token . '?email=' . $user->email;
$details = [
'title' => 'You have been added to Informadent portal',
'body' => "click the link to reset your password " . $fullLink
];
Mail::to($user->email)->send(new Gmai($details));
return redirect()->route('users.index')
->with('success', 'Userdata created successfully.');
} | {
"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.72855324",
"0.71447515",
"0.7132799",
"0.6641042",
"0.66208744",
"0.6566955",
"0.65249777",
"0.6509032",
"0.6447701",
"0.63756555",
"0.6373163",
"0.63650846",
"0.63650846",
"0.63650846",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$user = User::where('id', $id)->with('practice', 'image', 'role')->first();
return view('users.show', compact('user'));
} | {
"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 }",
"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 }",
"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 $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 }",
"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 }",
"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 edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\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 showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show(Resena $resena)\n {\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 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 edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"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 display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\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\t{\n\t\tparent::display();\n\t}",
"public function show()\n\t{\n\t\t\n\t}",
"public function get_resource();",
"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 }",
"public function display() {\n echo $this->render();\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 show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"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()\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 abstract function display();",
"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 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}",
"abstract public function resource($resource);",
"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.8232636",
"0.81890994",
"0.68296117",
"0.64987075",
"0.649589",
"0.64692974",
"0.64633286",
"0.63640857",
"0.6307513",
"0.6281809",
"0.621944",
"0.61926234",
"0.61803305",
"0.6173143",
"0.61398774",
"0.6119022",
"0.61085826",
"0.6106046",
"0.60947937",
"0.6078597",
"0.6047151",
"0.60409963",
"0.6021287",
"0.5989136",
"0.5964405",
"0.5962407",
"0.59518087",
"0.59309924",
"0.5921466",
"0.5908002",
"0.5908002",
"0.5908002",
"0.59051657",
"0.5894554",
"0.5871459",
"0.5870088",
"0.586883",
"0.5851384",
"0.58168566",
"0.58166975",
"0.5815869",
"0.58056176",
"0.5799148",
"0.5795126",
"0.5791158",
"0.57857597",
"0.5783371",
"0.5761351",
"0.57592535",
"0.57587147",
"0.5746491",
"0.57460666",
"0.574066",
"0.5739448",
"0.5739448",
"0.57295275",
"0.57293373",
"0.5729069",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57214445",
"0.57149816",
"0.5712036",
"0.5710076",
"0.57073003",
"0.5707059",
"0.5705454",
"0.5705454",
"0.5700382",
"0.56997055",
"0.5693362",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$user = User::where('id', $id)->with('role', 'practice', 'image')->first();
$practices = Practice::all();
$roles = Role::all();
//$images = DB::table('images')->where('image_category', '=', 'Profile Pictures')->orderBy('image_name')->get();
return view('users.edit', compact('user', 'practices', 'roles'));
} | {
"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)
{
$user = User::find($id);
$imageId = $request->image_id;
if ($request->image_url) {
$image = new Image;
$image->user_id = Auth::id();
$image->image_name = $request->user_firstname;
$image->image_category = "Profile Pictures";
$image->image_title = $request->user_firstname;
$imageUrl = Cloudinary::upload($request->file('image_url')->getRealPath())->getSecurePath();
$image->image_url = $imageUrl;
$image->save();
$imageId = $image->id;
}
$user->update([
"user_salutation" => $request->user_salutation,
"user_title" => $request->user_title,
"user_firstname" => $request->user_firstname,
"user_lastname" => $request->user_lastname,
"email" => $request->email,
"user_telephone" => $request->user_telephone,
"user_specialization" => $request->user_specialization,
"user_description" => $request->user_description,
"role_id" => $request->role_id,
"practice_id" => $request->practice_id,
"image_id" => $imageId,
]);
return redirect()->route('users.index')
->with('success', 'Userdata updated successfully');
} | {
"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)
{
$user = User::find($id);
$user->delete();
return redirect()->route('users.index')
->with('success', 'Userdata deleted successfully');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\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 function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\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 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 $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 File::find($id)->remove();\n \n return redirect()->route('files.index');\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 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 delete($path, $data = null);",
"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 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 removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\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 destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function remove($filePath){\n return Storage::delete($filePath);\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 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(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\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 }",
"public function remove($id);",
"public function remove($id);",
"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 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 }",
"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 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 {\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 }",
"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 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.6671365",
"0.6660839",
"0.66361386",
"0.6632988",
"0.6624729",
"0.6542195",
"0.6541645",
"0.6466739",
"0.6288393",
"0.61767083",
"0.6129533",
"0.608954",
"0.6054169",
"0.60443425",
"0.60073143",
"0.59338665",
"0.59317696",
"0.592145",
"0.5920155",
"0.59065086",
"0.5897853",
"0.58968836",
"0.58958197",
"0.58958197",
"0.58958197",
"0.58958197",
"0.58800334",
"0.5869308",
"0.5861188",
"0.5811069",
"0.5774596",
"0.5763277",
"0.5755447",
"0.5747713",
"0.5742094",
"0.573578",
"0.5727048",
"0.57164854",
"0.5712422",
"0.57092893",
"0.57080173",
"0.5707143",
"0.5704078",
"0.5696418",
"0.5684556",
"0.5684556",
"0.56790006",
"0.5678463",
"0.5658492",
"0.564975",
"0.5648406",
"0.56480885",
"0.5641393",
"0.5638992",
"0.56302536",
"0.56228197",
"0.5616424",
"0.5607389",
"0.56033397",
"0.5602035",
"0.55991143",
"0.55988586",
"0.5590501",
"0.5581284",
"0.55681103",
"0.5566215",
"0.55644745",
"0.5563726",
"0.55593926",
"0.55583876",
"0.5548547",
"0.5542015",
"0.5541403",
"0.5541403",
"0.55397224",
"0.55390894",
"0.55376494",
"0.5531044",
"0.5529739",
"0.55279493",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527892",
"0.5527671",
"0.5527155",
"0.5526666",
"0.55245256",
"0.552101",
"0.55183184"
] | 0.0 | -1 |
This will get the project of the domain using the belongTo relationship | public function project(){
return $this->belongsTo('App\Models\Projects\Project');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getProject() {\n return $this->hasOne(Projects::className(), ['id' => 'project_id']);\n }",
"public function getProject()\n {\n return $this->hasOne(Project::className(), ['id' => 'project_id']);\n }",
"public function getProject()\n {\n return $this->hasOne(Project::className(), ['id' => 'project_id']);\n }",
"public function getProject()\n { \n return $this->hasOne('App\\Project', 'id', 'resourse');\n }",
"public function getProjects()\n {\n return $this->hasOne(Project::className(), ['id' => 'project_id']);\n }",
"public function getProject()\n {\n return $this->hasOne(Project::class, ['id' => 'project_id']);\n }",
"public function project()\n {\n return $this->hasOne('App\\Project');\n }",
"public function project()\n\t{\n\t\treturn $this->belongsTo('App\\Project');\n\t}",
"public function get_project(){\n if ( $this->project != NULL){\n $myProject= new Project();\n return $myProject->get_by_ID($this->project);\n }\n }",
"public function project()\n {\n return $this->belongsTo('App\\project');\n }",
"public function project()\n\t{\n\t\treturn $this->belongsTo(Project::class);\n\t}",
"public function project()\n {\n return $this->belongsTo(Project::class);\n }",
"public function project()\n {\n return $this->belongsTo(Project::class);\n }",
"public function project()\n {\n return $this->belongsTo(Project::class);\n }",
"public function project()\n {\n return $this->belongsTo(Project::class);\n }",
"public function project(){\n return $this->belongsTo(\"App\\model\\project\");\n }",
"public function project()\n {\n return $this->belongsTo('App\\Models\\Project');\n }",
"public function project()\n {\n return $this->belongsTo('App\\Project');\n }",
"public function project()\n {\n \treturn $this->belongsTo(Project::class);\n }",
"public function project()\n {\n return $this->belongsTo('App\\Project');\n }",
"public function project(): BelongsTo\n {\n return $this->belongsTo(Project::class, $this->project);\n }",
"public function project()\n {\n return $this->belongsTo('App\\project');\n }",
"public function projects()\n {\n return $this->belongsTo(Projects::class);\n }",
"function project () {\n return $this->belongsTo('App\\Project');\n }",
"public function getProjects()\n {\n return $this->hasMany(Project::class, ['type_id' => 'id']);\n }",
"public function project() {\n return $this->belongsTo('App\\Models\\Project', 'payment_projectid', 'project_id');\n }",
"function get_project()\n {\n return $this->find('all');\n }",
"public function getProjects()\n {\n return $this->hasMany(Project::className(), ['customer_id' => 'id']);\n }",
"private function getProject()\n {\n $url = $this->base_uri.\"project/\".$this->project;\n $project = $this->request($url);\n return $project;\n }",
"public function company()\n {\n return $this->belongsTo(Company::class, 'project_company_id');\n }",
"public function getProjects();",
"public function projects()\n {\n return $this->hasMany('DragonLancers\\Project');\n }",
"public function projects()\n {\n return $this->hasMany('App\\Project');\n }",
"public function getProject()\n\t{\n\t\tif (!$this->projectId)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\t$query = $this->db->getQuery(true);\n\t\t$query->select('id, name, alias, description, url, logo, logo_alt, issue_template')\n\t\t\t->from('#__monitor_projects')\n\t\t->where(\"id = \" . $query->q($this->projectId));\n\n\t\t$this->db->setQuery($query);\n\n\t\treturn $this->db->loadObject();\n\t}",
"public function projects()\n {\n return $this->hasMany(Project::class);\n }",
"public function projects()\n {\n return $this->hasMany(Project::class);\n }",
"public function projects()\n {\n return $this->hasMany(Project::class);\n }",
"public function projects()\n {\n return $this->hasMany(Project::class);\n }",
"public function getProjectOwner() {\n return $this->belongsTo('App\\Models\\User');\n }",
"public function projects() {\n return $this->hasMany(Project::class);\n }",
"public function projects()\n {\n return $this->hasMany('App\\Models\\Projects\\Project');\n }",
"public function proyecto()\n {\n return $this->belongsTo('App\\Proyectos', 'proyecto_fk_rp', 'id_proyecto');\n }",
"function getProjects() {\n\n\tglobal $db;\n\treturn $db->getProjectsByGroup ( $GLOBALS [\"targetId\"] );\n\n}",
"public function getProject()\n {\n return $this->project;\n }",
"public function getProject()\n {\n return $this->project;\n }",
"public function getProject()\n {\n return $this->project;\n }",
"function getProject($projectid)\n\t{\n\t\tforeach($this->Project_List as $project)\n\t\t\tif($project->getProjectID() == $projectid)\n\t\t\t\treturn $project;\n\t}",
"public function getProject($projectId)\n {\n return GPLProject::model()->findByPk($projectId);\n }",
"public function proyecto()\n {\n return $this->belongsTo('App\\Proyecto', 'id_proyecto');\n }",
"public static function project()\n {\n return self::context()->project();\n }",
"public function getProject();",
"protected function getRequestedProject()\n {\n $id = $this->getEvent()->getRouteMatch()->getParam('project');\n $p4Admin = $this->getServiceLocator()->get('p4_admin');\n\n // attempt to retrieve the specified project\n // translate invalid/missing id's into a 404\n try {\n return Project::fetch($id, $p4Admin);\n } catch (NotFoundException $e) {\n } catch (\\InvalidArgumentException $e) {\n }\n\n $this->getResponse()->setStatusCode(404);\n return false;\n }",
"protected function getRequestedProject()\n {\n $id = $this->getEvent()->getRouteMatch()->getParam('project');\n $p4Admin = $this->getServiceLocator()->get('p4_admin');\n\n // attempt to retrieve the specified project\n // translate invalid/missing id's into a 404\n try {\n return Project::fetch($id, $p4Admin);\n } catch (NotFoundException $e) {\n } catch (\\InvalidArgumentException $e) {\n }\n\n $this->getResponse()->setStatusCode(404);\n return false;\n }",
"public function getGathercontentProject();",
"public function project($id)\n {\n $project = Project::find($id);\n $category = $project->category;\n return $project;\n }",
"public function client()\n {\n return $this->hasOneThrough(Client::class, Project::class, 'client_id', 'id');\n }",
"public function getProject()\r\n {\r\n return $this->_params['project'];\r\n }",
"public function getProject($id)\n {\n }",
"public function getProjects()\n {\n }",
"public function get_project_all(){\n }",
"public function getProjectByUserType($loggedUser) { \n $q = Doctrine_Query::create()->from('Project')\n ->where('userId = ?', $loggedUser);\n \n return $q->execute(); \n }",
"public function getProject() {\n\t\treturn $this->project;\n\t}",
"public function clientProjects()\n {\n return $this->hasMany(Project::class, 'project_client_id', 'id');\n }",
"public function model()\n {\n return Project::class;\n }",
"function getProject($id = 0)\n {\n $this->db->where('Id',$id);\n $sql = $this->db->get('projectdetails');\n return $sql->row();\n }",
"public function readProject() \n {\n \n // use the fetch method from Request to get the id parameter\n dump($this->request->fetch('id'));\n \n // Or use the fetch property to from Request to get the id parameter\n dump($this->request->fetch->id);\n \n }",
"public function projects()\n {\n return $this->belongsToMany('App\\Entities\\Projects\\Project', 'jobs', 'worker_id')\n ->groupBy('worker_id')\n ->groupBy('project_id');\n }",
"public function getIdProject()\n {\n return $this->idProject;\n }",
"public function get_project_by_id ($project_id)\n {\n $this->where('project_id', $project_id);\n $project = $this->get('projects');\n //returns an array\n return $project;\n }",
"public function getProjectsDetails()\n {\n $em = $this->getEntityManager();\n $qb = $em->createQueryBuilder();\n $qb->select('p.pid,n.name,c.clientName,pp.phaseName,p.lifeCycleStatus,'\n . 'p.billingStatus,pu.userName,pu.id,p.createDate,p.startDate,'\n . 'p.endDate,p.projectStatus');\n $qb->from('Vlreleases\\UserBundle\\Entity\\Projects', 'p');\n $qb->leftJoin('p.user', 'pu');\n $qb->leftJoin('p.projectName', 'n');\n $qb->leftJoin('p.client', 'c');\n $qb->leftJoin('p.phase', 'pp');\n $result = $qb->getQuery()->getResult();\n \n return $result;\n }",
"public function get_projects_by_owner ($project_owner_id)\n {\n\n }",
"public function getParent () {\n\t\treturn ProjectFactory::getProject($this->idParent);\n\t}",
"public function getProjects()\n {\n return PortfolioProject::get()->filter('ParentID', $this->AllChildren()->column('ID') ?: null);\n }",
"public function query()\n {\n $query = Project::where('service_provider_id', Auth::user()->serviceProvider()->first()->id)->selectRaw('distinct projects.*');\n return $this->applyScopes($query);\n }",
"public function getByID($projectID)\n {\n $project = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch();\n $members = $this->getMembers($projectID); \n\n if(isset($members['manager'])) $project->PM = $members['manager'][0]->account;\n $project->members = array($project->PM);\n if(isset($members['member']))\n {\n foreach($members['member'] as $member)\n {\n $project->members[] = $member->account; \n }\n }\n\n return $project;\n }",
"function get_project_by_id(WP_REST_Request $request) {\n\t\t// Set the initial return status\n\t\t$status = 200;\n\t\t// Get the submitted params\n\t\t$params = json_decode(json_encode($request->get_params()));\n\t\t// Build our return object\n\t\t$return_obj = new stdClass;\n\t\t$return_obj->success = true;\n\n\t\t$project = $this->dbconn->get_results( \"SELECT * FROM $this->project_table WHERE id = $params->id AND deleted = 0;\" );\n\t\t$formatted_return = new stdClass;\n\t\tif (!empty($project)) {\n\t\t\t$formatted_return->id = $params->id;\n\t\t\t$formatted_return->name = $project[0]->name;\n\t\t\t$formatted_return->type = $project[0]->type;\n\t\t\t$formatted_return->address = $project[0]->address;\n\t\t\t$formatted_return->start_timestamp = $project[0]->start_timestamp;\n\t\t} else {\n\t\t\t$this->add_error(\"Project does not exist.\");\n\t\t}\n\t\t// Set up the return object appropriately\n\t\t$return_obj->project = $formatted_return;\n\t\t// Format and return our response\n\t\treturn client_format_return($this, $return_obj, $status);\n\t}",
"public function getProjectId()\n {\n return $this->project_id;\n }",
"public function getProjectId()\n {\n return $this->project_id;\n }",
"public function getProjectId()\n {\n return $this->project_id;\n }",
"static function getProjectById($pid){\n\n\t\trequire_once 'DBO.class.php';\n\t\trequire_once 'Project.class.php';\n\n\t\t$db = DBO::getInstance();\n\n\t\t$statement = $db->prepare('SELECT *\n\t\t\t\tFROM projects\n\t\t\t\tWHERE id = :pid\n\t\t\t\t');\n\t\t$statement->execute(array(\n\t\t\t\t':pid' => $pid));\n\t\tif($statement->errorCode() != 0)\t{\n\t\t\t$error = $statement->errorInfo();\n\t\t\tthrow new Exception($error[2]);\n\t\t}\n\n\t\tif($row = $statement->fetch())\t{\n\t\t\t$project = new Project(\n\t\t\t\t\t$row[id],\n\t\t\t\t\t$row[name],\n\t\t\t\t\t$row[description],\n\t\t\t\t\t$row[start_date],\n\t\t\t\t\t$row[deadline],\n\t\t\t\t\t$row[end_date],\n\t\t\t\t\t$row[owner]);\n\t\t} else\n\t\t\tthrow new Exception(\"no project with such id.\");\n\n\t\treturn $project;\n\n\t}",
"public function projects() {\n return $this->belongsToMany('App\\Project');\n }",
"private function getProject() {\r\n $this->clientOwnsProject();\r\n\r\n $select = ('lpc.landingpage_collectionid, lpc.testtype, lpc.name, lpc.config, lpc.creation_date, lpc.start_date, ' .\r\n ' lpc.end_date, lpc.restart_date, lpc.status, lpc.progress, lpc.autopilot, lpc.allocation, lpc.last_sample_date, lpc.sample_time, ' .\r\n ' lpc.personalization_mode, lpc.smartmessage, lpc.ignore_ip_blacklist, lpc.device_type, lp.rule_id, ' .\r\n ' lp.landing_pageid AS originalid, lp.lp_url, lp.canonical_url ');\r\n\r\n $lpcid = mysql_real_escape_string($this->project);\r\n $lp = \"(SELECT landing_pageid, landingpage_collectionid, lp_url, canonical_url, rule_id, allocation \" .\r\n \" FROM landing_page WHERE landingpage_collectionid = $lpcid AND pagetype = 1 AND page_groupid = -1 \" .\r\n \" GROUP BY landingpage_collectionid ORDER BY landing_pageid ASC LIMIT 1 ) lp \";\r\n\r\n $this->db->select($select)\r\n ->from('landingpage_collection lpc')\r\n ->join($lp, 'lp.landingpage_collectionid = lpc.landingpage_collectionid', 'INNER')\r\n ->where('lpc.landingpage_collectionid', $this->project);\r\n\r\n if ($this->usertype == 'api-tenant') {\r\n $this->db->join('api_client ac', 'ac.clientid = lpc.clientid', 'INNER')\r\n ->where('lpc.clientid', $this->account)\r\n ->where('(ac.api_tenant = ' . $this->apiclientid . ' OR ac.api_clientid = ' . $this->apiclientid . ')');\r\n } else {\r\n $this->db->where('lpc.clientid', $this->clientid);\r\n }\r\n\r\n $query = $this->db->get();\r\n\r\n if ($query->num_rows() <= 0) {\r\n throw new Exception('', 403203);\r\n }\r\n\r\n $row = $query->row();\r\n $res = self::returnPojectFields($row, TRUE);\r\n return $this->successResponse(200, $res);\r\n }",
"public function project_lead()\n {\n return $this->belongsTo(User::class, 'project_lead_id');\n }",
"public static function getByProjectId($projectId) {\n return self::find()->select(['id', 'name'])\n ->andWhere(['project_id' => $projectId])\n ->andCompanyId()\n ->asArray()\n ->all();\n }",
"public function proceso()\n {\n return $this->belongsTo(Proceso::class, 'FK_ECT_Proceso', 'PK_PCS_Id');\n }",
"function get_rel_tasks_project($id)\n {\n return $this->db->get_where('rel_tasks_project',array('id'=>$id))->row_array();\n }",
"public static function getAssignedProject()\n {\n $res_des = Auth::user()->designation;\n $res_id = Auth::user()->id;\n $current_team_id = \"\";\n $result_project = \"\";\n\n if ($res_des == 'Developer' || $res_des == 'Project Manager') {\n\t\t\t// Get Team that current user has been assigned to\n $result_teams = DB::table('dev_team')->where('user_id', '=', $res_id)->get();\n\n foreach ($result_teams as $result_team) {\n $current_team_id = $result_team->team_id;\n }\n\n\t\t\t// Get Project that the Team has been assigned to\n $result_project_ids = DB::table('assign_teams')->where('team_id', '=', $current_team_id)->get();\n\n foreach ($result_project_ids as $result_project_id) {\n $result_projectID = $result_project_id->ProjectID;\n }\n\n }\n\n return $result_projectID;\n }",
"public function getProject(): ProjectContract\n {\n return $this->project;\n }",
"public function getProjects($appraiseId)\n {\n return $this->model->whereHas('appraisalSession', function ($query) {\n $query->where('is_active', 1);\n })->with('appraiseOf.projects')->find($appraiseId);\n }",
"public function curso()\n \t\t{\n \t\t\treturn $this->belongsTo(Curso::class, 'id_curso', 'id');\n \t\t}",
"public function principal()\n {\n return $this->belongsTo(Principal::class);\n }",
"public function projects()\n {\n return $this->belongsToMany(Project::class, 'bsoft_project_logs', 'pl_user_id', 'pl_project_id');\n }",
"public function getProject($id){\n\n\t\t$this->db->select('*');\n\t\t$this->db->where('id', $id);\n\t\t$query = $this->db->get('project');\n\t\t$row = $query->row();\n\n\t\t$project = array(\n\t\t\t'id' => $row->id,\n\t\t\t'name' => $row->name,\n\t\t\t'aggregate_url' => $row->aggregate_url,\n\t\t\t'description' => $row->description,\n\t\t\t'sample_target' => $row->sample_target,\n\t\t\t'sample_target_bs' => $row->sampel_target_bs,\n\t\t\t'sampling_table' => $row->sampling_frame_table,\n\t\t\t'loc_columns' => $row->alloc_unit_columns,\n\t\t\t'start_date' => $row->start_date,\n\t\t\t'end_date' => $row->finish_date,\n\t\t\t'delete_status' => $row->delete_status,\n\t\t\t'date_created' => $row->date_created\n\t\t );\n\t\t return $project;\t\t\t\t\t\t\n\t}",
"public function projects()\n {\n return $this->request('get', 'api/teams/'.Helpers::config('team').'/projects');\n }",
"function getProject($id = null)\n {\n $where = '';\n if($id) $where = \" AND idproject = '{$id}'\";\n $query = $this->db->query(\"SELECT idproject, title, DATE_FORMAT(startdate,'%m/%d/%Y') as startdate,\n\t\t DATE_FORMAT(enddate,'%m/%d/%Y') as enddate, companyname, companyurl, companycontactperson, companycontactpersonemail,\n\t\t note, active\n FROM project\n WHERE active = 1 {$where}\n ORDER BY idproject DESC\");\n\t\treturn $query; \n /*if($query->num_rows() > 1){\n return $query->result_array();\n }else{\n return $query->row_array();\n }*/\t\n }",
"public function show(Project $project): Project\n {\n return $project;\n }",
"function get_projeto($id_projeto)\n {\n return $this->db->get_where('projetos',array('id_projeto'=>$id_projeto))->row_array();\n }",
"public function getProjectById($projectId) {\n\t\treturn $this->projectDao->getProjectById($projectId);\n\t}",
"public function getGathercontentProjectId();",
"public function projects(): HasMany\n {\n return $this->hasMany('App\\Models\\Project');\n }"
] | [
"0.7492956",
"0.7469547",
"0.7469547",
"0.73809063",
"0.73289037",
"0.72824055",
"0.722065",
"0.71292055",
"0.71152204",
"0.70917505",
"0.7080925",
"0.70473534",
"0.70473534",
"0.70473534",
"0.70473534",
"0.7043028",
"0.70425034",
"0.70178974",
"0.700886",
"0.70082694",
"0.69500023",
"0.69134957",
"0.69060373",
"0.68041",
"0.67788666",
"0.6737522",
"0.6686316",
"0.6656302",
"0.6487539",
"0.6471648",
"0.64016837",
"0.6399287",
"0.6362982",
"0.63518393",
"0.632516",
"0.632516",
"0.632516",
"0.632516",
"0.6320395",
"0.63081205",
"0.62912315",
"0.6225613",
"0.6220592",
"0.6154939",
"0.6154939",
"0.6154939",
"0.61215353",
"0.6117599",
"0.6116156",
"0.6101063",
"0.61010027",
"0.60897505",
"0.60897505",
"0.60897166",
"0.6087426",
"0.6055956",
"0.6055715",
"0.60474163",
"0.60421234",
"0.6042031",
"0.602292",
"0.60114944",
"0.60077786",
"0.5991332",
"0.59865475",
"0.598314",
"0.59631175",
"0.5960634",
"0.5954034",
"0.5941378",
"0.59395057",
"0.5916133",
"0.591322",
"0.590543",
"0.5898766",
"0.58985865",
"0.5881284",
"0.5881284",
"0.5881284",
"0.58756757",
"0.5857602",
"0.58555627",
"0.5846951",
"0.584031",
"0.5836695",
"0.583546",
"0.5803484",
"0.58030295",
"0.58015776",
"0.5798338",
"0.5770985",
"0.5765041",
"0.5762651",
"0.57589513",
"0.57561594",
"0.57511455",
"0.5740841",
"0.5739567",
"0.5733455",
"0.5729634"
] | 0.68807566 | 23 |
This will get the domains L.G.A using the belongTo relationship | public function lga(){
return $this->belongsTo('App\Models\Lga');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function domains()\n {\n\t\t// Second argument is the name of pivot table.\n\t\t// Third & forth arguments are the names of foreign keys.\n return $this->belongsToMany('Domain', 'domain_user', 'user_id', 'domain_id')->withTimestamps();\n }",
"function domains() {\n $parameters = array(\n 'method' => __FUNCTION__\n );\n return $this->get_data($parameters);\n }",
"function getAssociatedDomains() {\n\t\t$associateddomain = array();\n\t\tif ( isset( $this->hostInfo[0]['associateddomain'] ) ) {\n\t\t\t$associateddomain = $this->hostInfo[0]['associateddomain'];\n\t\t\tarray_shift( $associateddomain );\n\t\t}\n\n\t\treturn $associateddomain;\n\t}",
"public function getAllDomains();",
"public function get_domains_list() {\n \n }",
"public static function getDomains() {\n $objMainDomain = new \\Cx\\Core\\Net\\Model\\Repository\\DomainRepository();\n $domains = $objMainDomain->findAll();\n $display = array();\n foreach ($domains As $domain) {\n $display[] = $domain->getId() . ':' . $domain->getNameWithPunycode();\n }\n return implode(',', $display);\n }",
"public function get_domains()\n\t{\n\t\treturn $this->domains;\n\t}",
"public function objects()\n {\n return $this->hasMany(LdapObject::class, 'domain_id');\n }",
"public function getDomainList()\r\n\t{\r\n\t\t$request = Requests::get($this->url . '/api/domain/list', array('Api-Session-Token' => $this->session_token));\r\n\t\t$data = json_decode($request->body, TRUE);\t\r\n\t\treturn $data['domains'];\r\n\t}",
"public function actionDomains()\n {\n\n $limit = (isset($_GET['limit']) && $_GET['limit']) ? $_GET['limit'] : 10;\n\n $term = trim($_GET['term']);\n if (!empty($term)) {\n $criteria=new CDbCriteria;\n //$criteria->select='title'; // only select the 'title' column\n $criteria->condition='domain LIKE :qterm';\n //$criteria->params=array(':qterm'=>'%'.$term.'%');\n $criteria->params=array(':qterm'=>$term.'%');\n $criteria->limit=$limit; // only select the 'title' column\n $data = Domain::model()->findAll($criteria);\n //$data = Domain::model()->findAll('domain LIKE :qterm',\n // array(':qterm'=> '%'.$term.'%'));\n } else {\n return ;\n }\n\n $label = isset($_GET['label']) ? trim($_GET['label']) : \"domain\";\n $value = isset($_GET['value']) ? trim($_GET['value']) : \"domain\";\n $id = isset($_GET['id']) ? trim($_GET['id']) : \"domain\";\n\n $rs = array();\n if (!empty($data)) {\n foreach ($data as $p) {\n $rs[] = array(\n // expression to give the string for the autoComplete drop-down\n //'label' => $p->$label,\n 'label' => $p->$label,\n 'value' => $p->$value,\n 'id' => $p->$id, // return value from autocomplete\n );\n }\n }\n\n //$data = CHtml::listData($data, 'domain', 'domain');\n echo CJSON::encode($rs);\n Yii::app()->end();\n }",
"public function getDomainParts();",
"function GetDomains()\n{\n global $oDB;\n $arr = array();\n $oDB->Query( 'SELECT id,title FROM '.TABDOMAIN.' ORDER BY titleorder' );\n while ( $row = $oDB->Getrow() )\n {\n $arr[$row['id']] = $row['title'];\n }\n // search translation\n $arrL = cLang::GetName('domain',$_SESSION[QT]['lang_iso'],'*');\n if ( count($arrL)>0)\n {\n foreach ($arr as $id => $str)\n {\n if ( array_key_exists('d'.$id,$arrL) )\n {\n if ( !empty($arrL['d'.$id]) ) $arr[$id]=$arrL['d'.$id];\n }\n }\n }\n return $arr;\n}",
"function all_domain(){\n\t\t$domainlist = array();\n\t\t//设置缓存失效\n\t\t$key = Cache::key('cdomain');\n\t\t$domainlist = $this->_cache->hGetAll($key);\n\t\tif (empty($domainlist)) {\n\t\t\t$temparr = $this->_db->getAll(\"SELECT c.`domain`,cm.* FROM `company` c LEFT JOIN `company_mysql` cm ON c.`comp_id`=cm.`comp_id` WHERE c.`status`='1'\");\t\n\t\t\t$this->_cache->multi($key);\n\t\t\tforeach ($temparr as $value) {\n\t\t\t\t$resutl = $this->_cache->hset($key,$value['domain'],$value);\n\t\t\t\t$domainlist[$value['domain']] = serialize($value);\n\t\t\t}\n\t\t\t$this->_cache->exec($key);\n\t\t}\n\t\treturn $domainlist;\n\t}",
"public function getDomainObjects()\r\n {\r\n $this->initializeStatement( );\r\n $this->stmt->bindValue( $this->index['max'], $this->max, PDO::PARAM_INT );\r\n $this->stmt->bindValue( $this->index['start'], $this->start, PDO::PARAM_INT );\r\n $this->stmt->execute();\r\n $domainObjects = array();\r\n while ($row = $this->stmt->fetch(PDO::FETCH_OBJ) ) {\r\n $domainObjects[] = $this->dataMapper->doLoad ( $row->id , $row );\r\n }\r\n return $domainObjects;\r\n }",
"abstract public static function domain();",
"function domains_list($how){\n $res = array();\n switch($how){\n case 0: return array_keys($this->domains);\n case 1: \n foreach($this->domains as $key=>$dom) $res[$key] = get_class($dom);\n return $res;\n\n case 2: \n foreach($this->domains as $key=>$dom) $res[$key] = $dom->connected();\n return $res;\n\n case 3: \n foreach($this->domains as $key=>$dom) $res[$key] = $dom->label();\n return $res;\n\n }\n }",
"function domains() {\n\t \treturn $this->hook(\"/{$this->subject_slug}/v1/domains.xml?api_key={$this->api_key}\",\"domain\");\n\t}",
"public function getDomains()\r\n\t{\r\n\t\t$res = $this->doRequest(MogileFS::GET_DOMAINS);\r\n\r\n\t\t$domains = Array();\r\n\t\tfor($i=1; $i <= $res['domains']; $i++)\r\n\t\t{\r\n\t\t\t$dom = 'domain'.$i;\r\n\t\t\t$classes = Array();\r\n\t\t\tfor($j=1; $j <= $res[$dom.'classes']; $j++)\r\n\t\t\t$classes[$res[$dom.'class'.$j.'name']] = $res[$dom.'class'.$j.'mindevcount'];\r\n\t\t\t$domains[] = Array('name' => $res[$dom],'classes' => $classes);\r\n\t\t}\r\n\t\treturn $domains;\r\n\t}",
"public function listDomains() {\n \n $domains = $this->_listDomains(100);\n while($this->nextToken) {\n $ndomains = $this->listDomains(100, true);\n if ($ndomains) $domains = array_merge($domains, $ndmomains);\n }\n return $domains;\n }",
"public function getRelations();",
"public function getRelations();",
"public function getAllDomainsByLocale();",
"public function getDomainForType($propelType);",
"public function conocimiento_idiomas(){\n\t\treturn $this->hasMany('App\\ConocimientoIdioma', 'Idm_ID_Asp');\n\t}",
"public function getDomains($viewId) {\n\t\tif ($this->settings['includeCHServices'] && $this->settings['eCHcommunityID'] !== '00-00') {\n\t\t\t$domainsCommunity = $this->_getDomains($viewId, FALSE);\n\t\t\t$domains = $domainsCommunity;\n\t\t\t$domainsCH = $this->_getDomains($viewId, TRUE);\n\n\t\t\tif (is_array($domainsCH)) {\n\t\t\t\tforeach ($domainsCH as $domain) {\n\t\t\t\t\t\t// Key used to remove duplicates\n\t\t\t\t\t$domains[$domain['id']] = $domain;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$domains = $this->_getDomains($viewId, FALSE);\n\t\t}\n\n\t\t$domains = is_array($domains) ? $domains : array();\n\n\t\t\t// Sort topics by (localized) name\n\t\t$this->sort($domains, 'name');\n\n\t\t$this->callHooks(\n\t\t\t'domains',\n\t\t\tarray(\n\t\t\t\t'viewId' => $viewId,\n\t\t\t),\n\t\t\t$domains\n\t\t);\n\n\t\treturn $domains;\n\t}",
"public function getWithRelations();",
"public function getDomains(): array\n {\n return $this->domainsArray;\n }",
"public function getTLDsWithData()\n {\n $result = $this->findBy([]);\n $domains = [];\n foreach ($result as $tld) {\n if ($tld->getGreenDomains() > 5) {\n $domain = strtolower($tld->getToplevel());\n $domains[$domain] = $domain;\n }\n }\n\n return $domains;\n }",
"public static function getDomainChoiceList(){\n $droptions = DomainChoiceRecord::find()->asArray()->all();\n return Arrayhelper::map($droptions, 'value', 'order');\n }",
"public function companies()\n {\n return $this->hasMany('App\\Company');\n }",
"abstract public function findRelatedRecordsByEmail(): array;",
"private function getDomainList() {\n\t\t$rawDomain = GetGlobalData(\"GoogleDomain\", \"\");\n\t\t$domainList = explode(',', $rawDomain);\n\t\t$result = array();\n\t\tforeach($domainList as $domain) {\n\t\t\t$trimDomain = trim($domain);\n\t\t\tif ( $trimDomain ) {\n\t\t\t\t$result[] = $trimDomain; \n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}",
"public function load()\n {\n return $this->domains;\n }",
"public function getAllDomainsLocale()\n {\n $data = TranslationKeyQuery::create()\n ->joinWithTranslationContent()\n ->select(array('Domain', 'TranslationContent.Locale'))\n ->useTranslationContentQuery()\n ->filterByLocale($this->managedLocales)\n ->endUse()\n ->distinct('Domain')\n ->find();\n\n $return = array();\n foreach ($data as $line) {\n $return[] = array(\n 'locale' => $line['TranslationContent.Locale'],\n 'domain' => $line['Domain']\n );\n }\n\n return $return;\n }",
"public function getDomain()\n {\n\n }",
"public function findAll() {\n $sql = \"select * from praticien\";\n $result = $this->getDb()->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $praticien = array();\n foreach ($result as $row) {\n $praticienID = $row['id_praticien'];\n $praticien[$praticienID] = $this->buildDomainObject($row);\n }\n return $praticien;\n }",
"public function companies()\n {\n return $this->belongsTo(Company::class, 'company_id','id');\n }",
"function get_domains() {\n\t\tif ( !empty( $this->_config['cname'] ) ) {\n\t\t\treturn (array) $this->_config['cname'];\n\t\t} elseif ( !empty( $this->_config['id'] ) ) {\n\t\t\t$domain = sprintf( '%s.cloudfront.net', $this->_config['id'] );\n\n\t\t\treturn array(\n\t\t\t\t$domain\n\t\t\t);\n\t\t}\n\n\t\treturn array();\n\t}",
"public function sub_principles(){\n return $this->hasMany(SubPrinciple::class);\n }",
"public function getDomain()\n {\n if (!$this->_domain) {\n try {\n $this->_domain = \\Ca\\Db\\DomainMap::create()->find($this->getDomainId());\n } catch (\\Exception $e) {}\n }\n return $this->_domain;\n }",
"public function companies(){\n return $this->belongsTo(Company::class);\n }",
"public function companies(){\n return $this->belongsTo(Company::class);\n }",
"public function &getDomains ( ) {\n\n return $this->_domains;\n }",
"public function asDomainEntity()\n {\n return $this->app['company.repository']->find($this->getUID());\n }",
"public function hostels(){\n\t\t//campus has many hostels\n\t\treturn $this->hasMany('App\\Hostel');\n\t}",
"public function condominos()\n {\n return $this->belongsTo('VCCon\\Domains\\Condominos\\Models\\Condomino', 'condomino_id');\n }",
"public function getEmailDomains()\n {\n $domains = array();\n \n foreach(Core_Model_DiFactory::getClientManager()->getClients() as $clientId => $client) {\n if($client->hasService(MazelabVpopqmail_Model_ConfigManager::MODULE_NAME)) {\n $domains = array_merge($domains, $this->getEmailDomainsByOwner($clientId));\n }\n }\n \n return $domains;\n }",
"public function domain()\n {\n return $this->context->getDomainManager();\n }",
"public function companies()\n {\n return $this->belongsToMany('Villato\\Company', 'company_region_product', 'product_id', 'company_id');\n }",
"public function GetDomainCompetitors($domain){\r\n\r\n $url=\"http://widget.semrush.com/widget.php?action=report&type=organic_organic&db=co.in&domain=$domain\";\r\n $google_search = file_get_contents($url);\r\n $seo_data=json_decode($google_search,true);\r\n\r\n $c_array=array();\r\n\r\n if (is_array($seo_data['organic_organic']['data']))\r\n {\r\n foreach ($seo_data['organic_organic']['data'] as $key=>$value)\r\n {\r\n $com=$seo_data['organic_organic']['data'][$key]['Dn'];\r\n array_push($c_array, $com);\r\n\r\n }\r\n return $c_array;\r\n }\r\n return false;\r\n }",
"public function get_domain_controllers()\n {\n return $this->_domain_controllers;\n }",
"public function companies()\n {\n return $this->belongsToMany(Company::class);\n }",
"public function getCampaigns()\n {\n return $this->hasMany('App\\Models\\Campaign', 'creator_id', 'id');\n }",
"public function cuidadores()\n {\n return $this->hasMany('App\\Models\\Cuidador', 'paciente_id', 'id');\n }",
"public function getDistricts()\n {\n return $this->hasMany(Districts::className(), ['regency_id' => 'id']);\n }",
"function getDomainList( $config ) {\n\ttry {\n\t\t$command = Namecheap\\Api::factory( $config, 'domains.getList' );\n\t\t$command->dispatch();\n\t} catch ( \\Exception $e ) {\n\t\tdie( $e->getMessage() );\n\t}\n\n\treturn $command->domains;\n}",
"public function domains()\n {\n return view('developers.domains.index');\n }",
"static function getDomainList()\n {\n $currentuser = ctrl_users::GetUserDetail();\n $res = array();\n $domains = self::ListDomains($currentuser['userid']);\n if (!fs_director::CheckForEmptyValue($domains)) {\n foreach ($domains as $row) {\n $status = self::getDomainStatusHTML($row['active'], $row['id']);\n $res[] = array('name' => $row['name'],\n 'directory' => $row['directory'],\n 'active' => $row['active'],\n 'status' => $status,\n 'id' => $row['id']);\n }\n return $res;\n } else {\n return false;\n }\n }",
"public function sitemapCompanies(){\n $links = array();\n $models = ORM::factory('CatalogCompany')->where('enable','=','1')->find_all();\n foreach($models as $model)\n $links[] = $model->getUri();\n return $links;\n }",
"public function companies()\n {\n return $this->morphedByMany('App\\Company', 'taggable');\n }",
"public function socialAccounts()\n {\n return $this->hasMany(SocialAccount::class);\n }",
"public function peliculas(){\n // Retornar tipo de relacion\n return $this->hasMany('App\\Pelicula');\n }",
"public function getFlatDomain() : array;",
"public function company()\n {\n return ($this->entity_type == 'c') ? $this->belongsTo('App\\Models\\Company\\Company', 'entity_id') : null;\n }",
"public function company()\n {\n return $this->belongsTo(CompanyProxy::modelClass(), 'company_id');\n }",
"public function findAll() {\n $sql = \"select * from organisations\";\n $result = $this->getDb()->fetchAll($sql);\n \n // Convert query result to an array of domain objects\n $organisations = array();\n foreach ($result as $row) {\n $organisationId = $row['id_organisation'];\n $organisations[$organisationId] = $this->buildDomainObject($row);\n }\n return $organisations;\n }",
"public function linkedAccounts()\n {\n return $this->hasMany(LinkedAccount::class);\n }",
"public function categories()\n {\n return $this->belongsToMany(Category::class, 'company_category', 'company_id', 'category_id');\n }",
"public function getHostels()\n {\n return $this->hasMany('App\\Hostel', 'owner_id', 'id');\n }",
"public function companies(){\n\n return $this->belongsTo(Company::class, 'company_id');\n }",
"public function socials() {\n\t\treturn $this->hasMany('Social');\n\t}",
"function competitors($domain) {\n $parameters = array(\n 'method' => __FUNCTION__,\n 'domain' => $domain\n );\n return $this->get_data($parameters);\n }",
"public function personas(){\n\n return $this->morphedByMany(Persona::class, 'cargoable'); //relacion muchos a muchos \"una persona tiene muchos cargos y un cargo tiene muchas personas\"\n }",
"public function getDataDomain();",
"public function companies() {\n return $this->belongsToMany(Company::class, 'company_user', 'user_id', 'company_id');\n }",
"public function getList() {\n\t\t$result = $this->_api(array(\n\t\t\t'cpanel_jsonapi_apiversion' => 2,\n\t\t\t'cpanel_jsonapi_user' => $this->_username,\n\t\t\t'cpanel_jsonapi_module' => 'AddonDomain',\n\t\t\t'cpanel_jsonapi_func' => 'listaddondomains'\n\t\t));\n\n\t\t$json = json_decode($result, true);\n\n\t\t// error found?\n\t\tif ( !isset($json['cpanelresult']['data']) ) {\n\t\t\tthrow new Exception(\"cPanel: Can't get domains list!\");\n\t\t}\n\n\t\treturn $json['cpanelresult']['data'];\n\t}",
"public function grados()\n {\n return $this->hasMany('DSIproject\\Grado');\n }",
"public function grados()\n {\n return $this->hasMany('DSIproject\\Grado');\n }",
"public function getLinks(){\n return $this->hasMany('App\\LinkCircular','id_circular');\n }",
"public function getDependentEntities();",
"function list_domains_for_admin ($username)\n{\n $list = \"\";\n \n $result = db_query (\"SELECT * FROM domain LEFT JOIN domain_admins ON domain.domain=domain_admins.domain WHERE domain_admins.username='$username' AND domain.active='1' ORDER BY domain_admins.domain\");\n if ($result['rows'] > 0)\n {\n $i = 0;\n while ($row = mysql_fetch_array ($result['result']))\n {\n $list[$i] = $row['domain'];\n $i++;\n }\n }\n return $list;\n}",
"public function routes(){\n\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = company_id, localKey = id)\n return $this->hasMany(Route::class);\n }",
"public function businesses()\n {\n return $this->belongsTo(\\Illuminate\\Support\\Facades\\Config::get('sitec.core.models.user', \\App\\Models\\User::class), 'business_id', 'id');\n }",
"public function socialites()\n {\n return $this->hasMany(config('rinvex.fort.models.socialite'));\n }",
"abstract public function findRelatedRecordsBySubject(): array;",
"public function socials()\n {\n return $this->hasManyThrough(Contact::class, Profile::class)\n ->select(['prefix AS social', 'value AS url', 'is_primary'])\n ->where('type', 'social');\n }",
"protected function _getDomains($viewId, $forceCHLevel) {\n\t\t$domains = array();\n\t\t$domainList = $this->callEgovApi('GetDomainList', array(\n\t\t\t'eCHviewID' => $viewId,\n\t\t), $forceCHLevel);\n\t\tif (is_array($domainList) && is_array($domainList['eCHdomainList'])) {\n\t\t\tif (is_array($domainList['eCHdomainList']['domainInfo']) && !isset($domainList['eCHdomainList']['domainInfo'][0])) {\n\t\t\t\t$domainList['eCHdomainList']['domainInfo'] = array($domainList['eCHdomainList']['domainInfo']);\n\t\t\t}\n\t\t\tif (isset($domainList['eCHdomainList']['domainInfo'])) {\n\t\t\t\tforeach ($domainList['eCHdomainList']['domainInfo'] as $domain) {\n\t\t\t\t\t$id = $this->getValue($domain, 'eCHdomainID');\n\t\t\t\t\tif (!$id) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$domains[] = array(\n\t\t\t\t\t\t'id' => $id,\n\t\t\t\t\t\t'name' => $this->getValue($domain, 'eCHdomain'),\n\t\t\t\t\t\t'description' => $this->getValue($domain, 'description'),\n\t\t\t\t\t\t'isParent' => $this->getValue($domain, 'isParent'),\n\t\t\t\t\t\t'versionId' => $this->getValue($domain, 'eCHdomainVersionID'),\n\t\t\t\t\t\t'versionName' => $this->getValue($domain, 'eCHdomainVersionName'),\n\t\t\t\t\t\t'communityId' => $this->getValue($domain, 'eCHcommunityID'),\n\t\t\t\t\t\t'release' => $this->getValue($domain, 'release'),\n\t\t\t\t\t\t'remarks' => $this->getValue($domain, 'remark'),\n\t\t\t\t\t\t'status' => $this->getValue($domain, 'eCHstatus'),\n\t\t\t\t\t\t'author' => $this->getValue($domain, 'author'),\n\t\t\t\t\t\t'dateCreation' => $this->getValue($domain, 'createdDate'),\n\t\t\t\t\t\t'dateLastModification' => $this->getValue($domain, 'lastModificationDate'),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$domains && $this->debug) {\n\t\t\t\tt3lib_div::devLog('Could not process domains for view \"' . $viewId . '\"', 'egovapi', self::DEVLOG_WARNING, $domainList);\n\t\t\t}\n\t\t}\n\n\t\treturn $domains;\n\t}",
"public function acceso_procesamiento_datos(){\n\t\treturn $this->hasMany('App\\AccesoProcesamientoDatos', 'PDa_ID_Asp');\n\t}",
"public function get_company() {\n\t\t\treturn $this->belongsTo(Company::class);\n\t}",
"public function getCompany() {\n return $this->belongsTo(Company::class);\n }",
"public function group_sources_by_domain()\r\n {\r\n //\r\n // The return value is an array, a key in this array is a domain\r\n // and the value is a list of all the sources with this domain.\r\n\r\n $key_function = function($x) {\r\n return $x->domain;\r\n };\r\n return $this->group_sources($key_function);\r\n }",
"public function company()\n {\n return $this->belongsTo('Company');\n }",
"public function getApiDomainsAttribute()\n {\n return @array_column($this->domains, 'domain');\n }",
"public function getDomain($data) {\r\n $tags = array('serviceProviderId', 'groupId');\r\n $info = $this->buildArray($tags, $data);\r\n $command = $this->createCommand('GroupDomainGetAssignedListRequest');\r\n $command->appendChild($this->makeStructure($info));\r\n return $command;\r\n }",
"public function aspirante(){\n return $this->hasMany(Aspirante::class);\n }",
"public function company() \n\t{\n\t\treturn $this->belongsTo('Company', 'object_id')->where('soft_deleted', 0);\n\t}",
"public function corporate()\n {\n return $this->belongsTo('App\\CorporateAccount');\n }",
"protected function getParentObjectName()\n {\n return 'domains';\n }",
"protected function getParentObjectName()\n {\n return 'domains';\n }",
"public function clinicas()\n {\n return $this->belongsToMany(Clinica::class);\n }",
"public function get_contacts($domain) {\n \n }"
] | [
"0.6896356",
"0.66117316",
"0.62982386",
"0.6249514",
"0.6064467",
"0.6056365",
"0.6046916",
"0.60021234",
"0.58143276",
"0.57603365",
"0.5732337",
"0.5728596",
"0.5701817",
"0.56797636",
"0.5674813",
"0.5666665",
"0.56631845",
"0.5634547",
"0.56121534",
"0.5607974",
"0.5607974",
"0.56063884",
"0.5567567",
"0.55512846",
"0.55405146",
"0.55383193",
"0.5529989",
"0.55185187",
"0.5515234",
"0.5514625",
"0.54761815",
"0.546387",
"0.54624915",
"0.54471666",
"0.5440216",
"0.5427453",
"0.5408971",
"0.5375476",
"0.53658545",
"0.53638715",
"0.5363121",
"0.5363121",
"0.53625214",
"0.53547066",
"0.53444844",
"0.5342937",
"0.533448",
"0.5318657",
"0.5313264",
"0.5311566",
"0.53093123",
"0.5305479",
"0.53016204",
"0.5277008",
"0.5268283",
"0.525953",
"0.5253827",
"0.52491343",
"0.5239008",
"0.5229935",
"0.52116066",
"0.52085006",
"0.52078766",
"0.51942825",
"0.51878715",
"0.5180366",
"0.51799196",
"0.51714206",
"0.51696384",
"0.51579",
"0.5156236",
"0.515525",
"0.51370305",
"0.513324",
"0.5120825",
"0.51109177",
"0.5109466",
"0.5109466",
"0.51087624",
"0.5108391",
"0.5106243",
"0.5105248",
"0.50968796",
"0.50964075",
"0.5093245",
"0.5091293",
"0.5090162",
"0.5082457",
"0.50808316",
"0.5067159",
"0.50666726",
"0.50620383",
"0.50598097",
"0.504821",
"0.5047836",
"0.50431585",
"0.50370836",
"0.50354093",
"0.50354093",
"0.5035363",
"0.50294936"
] | 0.0 | -1 |
Collect node geolocation in background via Ajax | public function actionAjaxCollectGeo()
{
$lock = Yii::getAlias('@runtime') . DIRECTORY_SEPARATOR . 'geo.lock';
$response = ['status' => 'warning', 'msg' => $this->module::t('general', 'Geolocation collecting is already running.')];
if (!file_exists($lock)) {
$console = new ConsoleRunner(['file' => '@app/yii']);
$console->run('plugins/geomapping/run/get-geolocation');
$response = [
'status' => 'success',
'msg' => $this->module::t('general', 'Node geolocation collecting started in background. See log for more info.')
];
}
return Json::encode($response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionAjaxRecollectGeo($location, $prepend_location, $node_id)\n {\n try {\n\n $model = new Geolocation();\n\n /** Save node location */\n $prepend_location = (!empty($prepend_location)) ? $prepend_location : null;\n $save_location = $model->saveNodeLocation($location, $prepend_location, $node_id);\n\n if ($save_location) {\n $response = ['status' => 'success', 'msg' => Yii::t('app', 'Action successfully finished')];\n }\n else if (is_null($save_location)) {\n $response = [\n 'status' => 'warning',\n 'msg' => $this->module::t('general', 'Google API cannot find given address {0}', $model->prepareNodeLocation($location, $prepend_location))\n ];\n }\n else {\n $response = ['status' => 'error', 'msg' => Yii::t('app', 'An error occurred while processing your request')];\n }\n\n } catch (\\Exception $e) {\n $response = ['status' => 'error', 'msg' => $e->getMessage()];\n }\n\n return Json::encode($response);\n }",
"private function updateGeoCoords()\n\t{\n\t\t// $this->attributes contains payload of the session\n\t\t// $this->handler->get_table_row() contains extended Row's field like IP and Platform\n\t\t$row = $this->handler->get_table_row();\n\t\t$current_ip = PlatformDetector::getClientIp();\n\n\t\t// define the flag for new re-detection\n\t\t// if no coordinates is set\n\t\t$should_recheck_coords = !isset($this->attributes['geo_coords']);\n\t\t// or if IP address was changed\n\t\t$should_recheck_coords |= $row && $row['ip_address'] != $current_ip;\n\n\t\tif ($should_recheck_coords) {\n\t\t\t//Log::info('Recheck GEO coords for session');\n\t\t\t// we need to update geo coordinates\n\t\t\t$coords = GeoIPLib::get_lat_lon($current_ip);\n\t\t\t$this->attributes['geo_coords'] = [\n\t\t\t\t'latitude' => $coords[0],\n\t\t\t\t'longitude' => $coords[1],\n\t\t\t];\n\t\t}\n\n\t}",
"function venture_geo_process_geocodes() {\n $geocoded = false;\n \n $query = \"SELECT nid FROM {content_type_profile} WHERE LENGTH(IFNULL(field_location_value, '')) = 0\";\n $result = db_query($query);\n \n while ($row = db_fetch_object($result)) {\n $profile = node_load($row->nid);\n $city = $profile->field_city[0]['value'];\n $state = $profile->field_state[0]['value'];\n $country = $profile->field_country[0]['value'];\n \n $geo_location = $city . ',' . $state . ',' . $country;\n $geo_query = array('query' => $geo_location, 'maxRows' => 1);\n $geo_result = geonames_query('search', $geo_query);\n \n $location = 'invalid';\n \n if (!$geo_result) {\n watchdog('venture', \"Unable to geocode $location\");\n continue;\n }\n else if ($geo_result->results) {\n $geocode = $geo_result->results[0];\n $location = $geocode['name'] . '|' . $geocode['lat'] . '|' . $geocode['lng'];\n $geocoded = true;\n }\n \n $profile->field_location[0]['value'] = $location;\n node_save($profile);\n }\n \n return $geocoded;\n}",
"function geolocate($address)\r\n\t{\r\n\t\t$lat = 0;\r\n\t\t$lng = 0;\r\n\t\t\r\n\t\t$data_location = \"http://maps.google.com/maps/api/geocode/json?address=\".str_replace(\" \", \"+\", $address).\"&sensor=false\";\r\n\t\t\r\n\t\tif ($this->region!=\"\" && strlen($this->region)==2) { $data_location .= \"®ion=\".$this->region; }\r\n\t\t$data = file_get_contents($data_location);\r\n\t\tusleep(200000);\r\n\t\t\r\n\t\t// turn this on to see if we are being blocked\r\n\t\t// echo $data;\r\n\t\t\r\n\t\t$data = json_decode($data);\r\n\t\t\r\n\t\tif ($data->status==\"OK\") {\r\n\t\t\t$lat = $data->results[0]->geometry->location->lat;\r\n\t\t\t$lng = $data->results[0]->geometry->location->lng;\r\n\t\t}\r\n\t\t\r\n\t\t// concatenate lat/long coordinates\r\n\t\t$coords['lat'] = $lat;\r\n\t\t$coords['lng'] = $lng;\r\n\t\t\r\n\t\treturn $coords;\r\n\t}",
"function getLocation();",
"public function gr_traceroute_ajax_request()\n\t{\n\t\t$response = '';\n\t\tif (preg_match(\"/^win.*/i\", PHP_OS))\n\t\t{\n\t\t\texec('tracert ' . $this->traceroute_host, $out, $code);\n\t\t}\n\t\telse\n\t\t{\n\t\t\texec('traceroute -m15 ' . $this->traceroute_host . ' 2>&1', $out, $code);\n\t\t}\n\t\tif ($code && is_array($out))\n\t\t{\n\t\t\t$response = __('An error occurred while trying to traceroute: ', 'Gr_Integration') . join(\"\\n\", $out);\n\t\t}\n\t\tif ( !empty($out))\n\t\t{\n\t\t\tforeach ($out as $line)\n\t\t\t{\n\t\t\t\t$response .= $line . \"<br/>\";\n\t\t\t}\n\t\t}\n\t\t$response = json_encode(array('success' => $response));\n\t\theader(\"Content-Type: application/json\");\n\t\techo $response;\n\t\texit;\n\t}",
"public function get_locations($nodes);",
"private function getLocation() {\n $location = false;\n \t$result = new StdClass();\n \t// $result->location = 'http://www.geoplugin.net/extras/location.gp?lat=' . $this->coordinates->latitude . '&long=' . $this->coordinates->longitude . '&format=php';\n \t$result->nearest = 'http://www.geoplugin.net/extras/location.gp?lat=' . $this->coordinates->latitude . '&long=' . $this->coordinates->longitude . '&format=php';\n \t$result->location = 'http://maps.googleapis.com/maps/api/geocode/json?latlng=' . $this->coordinates->latitude . ',' . $this->coordinates->longitude . '&sensor=false';\n\n \t$result = json_decode($this->getUrlContents($result->location));\n \t// $result->nearest = unserialize($this->getUrlContents($result->nearest));\n\n $location = $this->validateLocation($result);\n\n if(is_array($location))\n \t $location = $this->filterLocation($location);\n }",
"function getLocation($xml){\n\t$latitude = $xml->result->geometry->location->lat;\n $longitude = $xml->result->geometry->location->lng;\n $location = array(\"latitude\" => $latitude, \"longitude\" => $longitude);\n return ($location);\n}",
"public function _before_index(){\n// $ip = get_client_ip();\n// $res = $ip_class->getlocation('113.102.162.102');\n// print_r($res);\n \n \n }",
"private function get_json_geo_data()\n {\n $response = false;\n if ($this->ipaddress != 'UNKNOWN') {\n foreach (self::$geo_service_url as $key => $url) {\n $response = wp_remote_get($url . $this->ipaddress);\n if (is_array($response) && array_key_exists('region_code', json_decode($response['body']))) {\n continue;\n }\n }\n }\n\n if (is_array($response)) {\n $this->body = json_decode($response['body']);\n } else {\n $this->body = false;\n }\n }",
"function _get_cloudflare_geolocation() {\n\t\treturn IMFORZA_Utils::get_cloudflare_geolocation();\n\t}",
"function get_lat_long($address)\r\n{\t\r\n\t//sleep(1);\r\n $address = str_replace(\" \", \"+\", $address);\r\n $json = file_get_contents(\"http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false®ion=$region\");\r\n $json = json_decode($json);\r\n\t// echo \"<pre>\"; print_r($json); \r\n\r\n $lat = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};\r\n $long = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};\r\n return $lat.','.$long;\r\n}",
"public function executeAjaxGetLocation($request)\n {\n $this->getResponse()->setContentType('application/json');\n $org = $request->getParameter(\"organization\");\n $result = array();\n \n if ($request->isXmlHttpRequest()) {\n $locationRep = new LocationRepository();\n $locations = $locationRep->getLocationByOrg($org);\n\n if (is_object($locations)) {\n foreach ($locations as $location) {\n array_push($result, $location->getLocation());\n }\n }\n }\n\n $data_json = json_encode($result);\n return $this->renderText($data_json);\n }",
"function updateAllLocations () {\n //updateFacebookCurrentCity();\n //updateOkCupidCurrentCity();\n }",
"public function action_index()\n\t{\n\t\t// Called every minute\n\t\tif ($this->modules['geocoded_addresses'])\n\t\t{\n\t\t\t$requests = Jelly::select('address_geocode_request')->where('status', '=', 'queued')->limit(10)->execute();\n\t\t\tforeach ($requests as $request)\n\t\t\t{\n\t\t\t\t$request->process();\n\t\t\t}\n\t\t}\n\t\texit();\n\t}",
"function whereabouts_addmap_fetch_location_go() {\n\n // Get auth code\n\t$auth_code = get_option( 'whereabouts_swarm_auth_code' );\n\n // Check if file path is set and exists\n if ( isset( $auth_code ) AND ! empty( $auth_code ) ) {\n\n\t\t$url = 'https://api.foursquare.com/v2/users/self/checkins?oauth_token='.$auth_code.'&v=20140806&locale=en&limit=1';\n\n\t\t$response = wp_remote_get( $url );\n\n\t\tif ( is_wp_error( $response ) ) {\n\n\t\t\t$error_messages = $response->get_error_messages();\n\t\t\tforeach( $error_messages as $message ) {\n\t\t\t\techo '<span class=\"error\">' . implode( $error_messages, '<br />' ) . '<br />Maybe the <a href=\"http://where.abouts.io/faq/\">FAQs</a> are helpful?</span>';\n\t\t\t}\n\n\t\t}\n\t\telse {\n \n \t$obj = json_decode( $response['body'] );\n\n\t\t\tif ( isset( $obj->meta->code ) AND $obj->meta->code == 200 ) {\n\n\t\t\t\t$current_location = $obj->response->checkins->items[0];\n\n\t\t\t\tupdate_option( 'whereabouts_swarm_current_location', $current_location );\n\n\t\t\t\treturn '<span class=\"updated\">' . __( 'You current location was updated successfully.', 'whereabouts-swarm' ) . '</span>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn '<span class=\"error\">' . __( '<strong>Error:</strong> The data received from Swarm could not be processed. Please check our <a href=\"https://where.abouts.io/faq\">FAQs</a> for details. ', 'whereabouts-swarm' ) . '</span>';\n\t\t\t}\n\t\t}\n\t}\n}",
"function ip_data()\n {\n if(!$this->input->is_ajax_request()){\n $this->session->set_userdata('timestamp', time());\n $user_data = $this->session->userdata('surfer_info');\n $ip = $_SERVER['REMOTE_ADDR'];\n if (!$user_data) {\n if ($_SERVER['HTTP_HOST'] !== 'localhost') {\n $ip_data = file_get_contents(\"http://ip-api.com/json/\" . $ip);\n $this->session->set_userdata('surfer_info', $ip_data);\n }\n }\n }\n }",
"function rec_regenerate_coordinates() {\n\n\tif( ! isset( $_GET['coord_debug'] ) ) {\n\t\treturn;\n\t}\n\n\t$posts = new WP_Query(\n\t\tarray(\n\t\t\t'post_type'\t\t=>\tepl_get_core_post_types(),\n\t\t\t'post_status'\t=>\t'any',\n\t\t\t'posts_per_page' =>\t-1,\n\t\t\t'meta_query'\t=>\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'key'\t\t=>\t'property_address_coordinates',\n\t\t\t\t\t'value'\t\t=>\tarray(\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'compare'\t=>\t'IN'\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\twhile( $posts->have_posts() ) {\n\t\t$posts->the_post();\n\t\t$coord = get_property_meta( 'property_address_coordinates' );\n\t\t\n\t\t$query_address = epl_property_get_the_full_address();\n\t\t$query_address = trim( $query_address );\n\n\t\tif( $query_address != ',' ) {\n\t\n\t\t\t$googleapiurl = \"https://maps.google.com/maps/api/geocode/json?address=$query_address&sensor=false\";\n\t if( epl_get_option('epl_google_api_key') != '' ) {\n\t $googleapiurl = $googleapiurl.'&key='.epl_get_option('epl_google_api_key');\n\t }\n\n\t $geo_response = wp_remote_get( $googleapiurl );\n\t $geocode = $geo_response['body'];\n\t $output = json_decode($geocode);\n\t /** if address is validated & google returned response **/\n\t if( !empty($output->results) && $output->status == 'OK' ) {\n\n\t $lat = $output->results[0]->geometry->location->lat;\n\t $long = $output->results[0]->geometry->location->lng;\n\t $coord = $lat.','.$long;\n\n\t update_post_meta( get_the_ID(), 'property_address_coordinates', $coord);\n\t update_post_meta( get_the_ID(), 'property_address_display', 'yes');\n\t }\n }\n\t}\n}",
"public static function updateUserLocation() {\r\n $debug = \\Drupal::config('smart_ip.settings')->get('debug_mode');\r\n if (!$debug) {\r\n $ip = \\Drupal::request()->getClientIp();\r\n $smartIpSession = self::getSession('smart_ip');\r\n if (!isset($smartIpSession['location']['ipAddress']) || $smartIpSession['location']['ipAddress'] != $ip) {\r\n $result = self::query();\r\n self::userLocationFallback($result);\r\n /** @var \\Drupal\\smart_ip\\SmartIpLocation $location */\r\n $location = \\Drupal::service('smart_ip.smart_ip_location');\r\n $location->setData($result);\r\n $location->save();\r\n }\r\n }\r\n }",
"function location($gps){\n\tglobal $api;\n\t$lat = $gps['lat'];\n\t$lon = $gps['lon'];\n\t$endpoint = \"https://us1.locationiq.com/v1/reverse.php?key=$api&lat=$lat&lon=$lon&format=json\";\n\techo \"https://www.google.com/maps/search/?q=$lat,$lon\\n\";\n\treturn file_get_contents($endpoint);\n}",
"private function getLocation() {\n }",
"function getLocationByIp($data)\n\t{\n\t\t$passArray = array();\n\t\t\n\t\t$ipAddress = $data['ipAddress'];\n\t\t$ipResult = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$ipAddress));\n\t\tif(sizeof($ipResult)>0)\n\t\t{\n\t\t\t$status =SUCCESS;\n\t\t\t$message = MESSAGE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$status =FAIL;\n\t\t\t$message = ERRORMESSAGE;\n\t\t}\t\t\n\t\t$response = array(\n\t\t\t\t\t\t\t\"Status\" => $status,\n\t\t\t\t\t\t\t\"Message\"=> $message,\n\t\t\t\t\t\t\t\"Result\" =>$ipResult\n\t\t\t\t\t\t);\n\n\t\treturn $response;\n\t}",
"public function getLocation($data) {\n $query = $this->con->prepare(\"SELECT * FROM `location_requests` WHERE id = ?\");\n $query->bind_param('d', $data['id']);\n $query->execute();\n //Getting the student result array\n $result = $query->get_result()->fetch_assoc();\n $query->close();\n if($result['permit_status'] == 'rejected') {\n return 'safe';\n } else {\n if($result['permit_status'] == 'granted' || $result['time'] < strtotime('-30 seconds')) {\n $statement = $this->con->prepare(\"SELECT `location`, `time` FROM `location_details` WHERE (user_id = ? AND time > ?)\");\n $time_lower = strtotime('-6 hours');\n $statement->bind_param('sd', $result['user_id'], $time_lower);\n $statement->execute();\n //Getting the student result array\n $information = $statement->get_result();\n $result_object = array();\n $flag = False;\n while ( $row = $information->fetch_assoc()) {\n $flag = true;\n array_push($result_object, $row);\n }\n $statement->close();\n \n $searchGCM = $this->con->prepare(\"SELECT gcm FROM `user_gcm_details` WHERE user_id = ?\");\n // echo $result['user_id'];\n $searchGCM->bind_param('s', $result['user_id']);\n $searchGCM->execute();\n $resultGCM = $searchGCM->get_result()->fetch_assoc();\n $searchGCM->close();\n if ($flag) {\n sendNotification($resultGCM['gcm'], $result['asker_id'], True);\n }\n return $result_object;\n } else {\n return 'wait';\n }\n }\n }",
"function ping(){\n\t\t$.ajax({url:\"handleajax.php\", success:function(result)\n\t\t{\n\t\t\tstat=false;\n\t\t\tvar obj=$.parseJSON(result);\n\t\t\tvar len=obj.length;\n\t\t\tvar i=0;\n\t\t\twhile(i<len)\n\t\t\t{\n\t\t\t\tvar lat=obj[i].lat;\n\t\t\t\tvar lon=obj[i].lon;\n\t\t\t\tvar status=\"\";\n\t\t\t\tstatus=space_status(obj[i].is_occupied,obj[i].is_reserved);\n\t\t\t\tvar google_latlon= new google.maps.LatLng(lat,lon);\n\t\t\t\tvar nmarker = new google.maps.Marker(\n\t\t\t\t{\n\t\t\t\t\tposition: google_latlon,\n\t\t\t\t\ttitle: \"Here you live!\",\n\t\t\t\t\ticon: status\n\t\t\t\t});\n\t\t\t\tnewmarkers.push(nmarker);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t\t// For the first time oldmarkers is 0\n\t\t\t// This runs for the first time\n\t\t\tif(oldmarkers.length<=0)\n\t\t\t{\n\t\t\t\tfor(b=0;b<newmarkers.length;b++)\n\t\t\t\t{\n\t\t\t\t\tnewmarkers[b].setMap(map);\n\t\t\t\t\tif(newmarkers[b].icon==\"vacant.png\"){\n\t\t\t\t\tgoogle.maps.event.addListener(newmarkers[b],'click',function(){popup.open(map,this)});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toldmarkers=newmarkers;\n\t\t\t\tnewmarkers=[];\n\t\t\t}\n\t\t\t// For rest of the loop oldmarkers will have some objects\n\t\t\t// This is when comparision needed\n\t\t\telse if(oldmarkers.length>0)\n\t\t\t{\n\t\t\tvar rm_ind=[];\n\t\t\tvar map_rm_ind=[];\n\t\t\t\tfor(q=0;q<oldmarkers.length;q++)\n\t\t\t\t{\n\t\t\t\t\tstat=false;\n\t\t\t\t\tfor(w=0;w<newmarkers.length;w++)\n\t\t\t\t\t{\n\t\t\t\t\t\tvar chk=oldmarkers[q].getPosition().equals(newmarkers[w].getPosition());\n\t\t\t\t\t\tstat |=chk;\n\t\t\t\t\t\tif(chk)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\toldmarkers[q].setIcon(newmarkers[w].icon);\n\t\t\t\t\t\t\t// Save these indices in array to remove at end of the loop\n\t\t\t\t\t\t\trm_ind.push(w);\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\tif(stat==false | stat==0)\n\t\t\t\t\t{\n\t\t\t\t\t// Store the indices to remove them from map\n\t\t\t\t\tmap_rm_ind.push(q);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//remove obsolete markers from map\n\t\t\t\tfor(u=0;u<map_rm_ind.length;u++)\n\t\t\t\t{\n\t\t\t\t\toldmarkers[u].setMap(null);\n\t\t\t\t\toldmarkers[u]=null;\n\t\t\t\t\toldmarkers.splice(u,1);\n\t\t\t\t}\n\t\t\t\tmap_rm_ind=[];\n\t\t\t\t// remove existing markers from newmarkers\n\t\t\t\tfor(f=0;f<rm_ind.length;f++)\n\t\t\t\t{\n\t\t\t\t\tnewmarkers.splice(f,1);\n\t\t\t\t}\n\t\t\t\trm_ind=[];\n\t\t\t\tfor(r=0;r<newmarkers.length;r++)\n\t\t\t\t{\n\t\t\t\t\tnewmarkers[r].setMap(map);\n\t\t\t\t\tif(newmarkers[r].icon==\"vacant.png\"){\n\t\t\t\t\tgoogle.maps.event.addListener(newmarkers[r],'click',function(){popup.open(map,this)});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toldmarkers=oldmarkers.concat(newmarkers);\n\t\t\t\tnewmarkers=[];\n\t\t\t}\n\t\t\t\t\n\t}\n\t});\n\t}",
"protected function collectSessionData() {\n\n\t\t$time_started = time();\n\t\t$time_ended = $time_started;\n\n\t\t$user_guid = elgg_get_logged_in_user_guid();\n\n\t\t$ip_address = $this->getIpAddress();\n\n\t\t$geolite = elgg_get_config('geolite_db');\n\t\tif (file_exists($geolite)) {\n\t\t\t$reader = new Reader($geolite);\n\t\t\t$geoip = $reader->get($ip_address);\n\t\t} else {\n\t\t\t$geoip = [];\n\t\t}\n\n\t\t$city = '';\n\t\tif (!empty($geoip['city']['names']['en'])) {\n\t\t\t$city = $geoip['city']['names']['en'];\n\t\t}\n\n\t\t$state = '';\n\t\tif (!empty($geoip['subdivisions'])) {\n\t\t\t$state = array_shift($geoip['subdivisions']);\n\t\t\tif (!empty($state['names']['en'])) {\n\t\t\t\t$state = $state['names']['en'];\n\t\t\t}\n\t\t}\n\n\t\t$country = '';\n\t\tif (!empty($geoip['country']['iso_code'])) {\n\t\t\t$country = $geoip['country']['iso_code'];\n\t\t}\n\n\t\t$latitude = '';\n\t\tif (!empty($geoip['location']['latitude'])) {\n\t\t\t$latitude = $geoip['location']['latitude'];\n\t\t}\n\n\t\t$longitude = '';\n\t\tif (!empty($geoip['location']['longitude'])) {\n\t\t\t$longitude = $geoip['location']['longitude'];\n\t\t}\n\n\t\t$timezone = '';\n\t\tif (!empty($geoip['location']['time_zone'])) {\n\t\t\t$timezone = $geoip['location']['time_zone'];\n\t\t}\n\n\t\treturn [\n\t\t\t'user_guid' => $user_guid,\n\t\t\t'time_started' => $time_started,\n\t\t\t'time_ended' => $time_ended,\n\t\t\t'ip_address' => $ip_address,\n\t\t\t'city' => $city,\n\t\t\t'state' => $state,\n\t\t\t'country' => $country,\n\t\t\t'latitude' => $latitude,\n\t\t\t'longitude' => $longitude,\n\t\t\t'timezone' => $timezone,\n\t\t];\n\t}",
"public function actionProximitycatlist($latitude, $longitude, $radius, $kind)\n {\n \n // clean term\n //$term = str_replace(',', '', $term);\n //$term = str_replace(' ', '', $term);\n //$term = str_replace(' ', '', $term);\n\t\n\t$url = \"http://ec2-54-204-2-189.compute-1.amazonaws.com/api/nearby\";\n\t$params = array('latitude' => $latitude, 'longitude' => $longitude, 'radius' => $radius, 'kind' => $kind);\n\t// Update URL to container Query String of Paramaters \n\t$url .= '?' . http_build_query($params);\n\t\n\t$curl = curl_init();\n\tcurl_setopt($curl, CURLOPT_URL, $url);\n\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t$json = curl_exec($curl);\n\tcurl_close($curl);\n\t\t\n\t$return_array = json_decode($json);\n\t\t\n $location_service_rows = array(); \n \n\tif ($return_array) {\n $location_service_rows = $return_array->message->rows;\n\t}\n\t\t\n // Did we get some results?\n if(empty($location_service_rows)) {\n // No\n $this->_sendResponse(200, \n sprintf('No items where found.') );\n } else {\n // Prepare response\n $rows = array();\n foreach($location_service_rows as $row) {\n $id = $row->id;\n $name = $row->name;\n $address = $row->address->address;\n $address_extended = $row->address->address_extended;\n $po_box = $row->address->po_box;\n $locality = $row->address->locality;\n $region = $row->address->region;\n $post_town = $row->address->post_town;\n $admin_region = $row->address->admin_region;\n $postcode = $row->address->postcode;\n $country = $row->address->country;\n $tel = $row->address->tel;\n $fax = $row->address->fax;\n $neighbourhood = $row->address->neighbourhood;\n $website = $row->website;\n $email = $row->email;\n $category_ids = $row->category_ids;\n\t\t$category_labels = $row->category_labels;\n $status = $row->status;\n $chain_name = $row->chain_name;\n $chain_id = $row->chain_id;\n $row_longitude = $row->longitude;\n $row_latitude = $row->latitude;\n $abslongitude = $row->abslongitude;\n $abslatitude = $row->abslatitude;\n $distance = $row->distance;\n \n \n //$terms_array = explode(' ',$terms);\n //$match_count = 0;\n //foreach ($terms_array as $term) {\n //if(stripos($name, $term) !== false) {\n //$match_count = $match_count + 1;\n //}\n //if(stripos($category_labels, $term) !== false) {\n //$match_count = $match_count + 1;\n //}\n $match_count = 1;\n //}\n //$term_match_count = array('term_match_count' => $match_count);\n //array_push($row, $term_match_count);\n //$row['term_match_count'] = $match_count;\n $new_row = array(\n 'id' => $id,\n 'name' => $name,\n 'address' => $address,\n 'address_extended' => $address_extended,\n 'po_box' => $po_box,\n 'locality' => $locality,\n 'region' => $region,\n 'post_town' => $post_town,\n 'admin_region' => $admin_region,\n 'postcode' => $postcode,\n 'country' => $country,\n 'tel' => $tel,\n 'fax' => $fax,\n 'neighbourhood' => $neighbourhood,\n 'website' => $website,\n 'email' => $email,\n 'category_ids' => $category_ids,\n 'category_labels' => $category_labels,\n 'status' => $status,\n 'chain_name' => $chain_name,\n 'chain_id' => $chain_id,\n 'longitude' => $row_longitude,\n 'latitude' => $row_latitude,\n 'abslongitude' => $abslongitude,\n 'abslatitude' => $abslatitude,\n 'distance' => $distance,\n 'term_match_count' => $match_count\n );\n //if ($match_count > 0) {\n $rows[] = $new_row;\n //}\n } // end foreach location service row\n // Send the response\n $this->_sendResponse(200, CJSON::encode($rows));\n }\n }",
"function plg_ipData($pro) {\r\n global $lib;\r\n $re = \"\";\r\n\r\n\r\n$lib = new Libs;\r\n\r\n\r\n\r\n\r\n\r\n if (isset($_GET['site'])) {\r\n $re = '';\r\n } else {\r\n\r\n\r\n $IP = $_SERVER['REMOTE_ADDR'];\r\n // $tt = file_get_contents('http://geoip.maxmind.com/a?l=hVWzBFybLR8f&i=' . $IP);\r\n\r\n $tt = \"EG\";\r\n // echo $lib->util->cities->urlConvert($tt);\r\n\r\n \r\n\r\n if (!isset($_GET['alias'])) {\r\n $re = ' <script>window.location = \\'/site/' . $lib->util->cities->urlConvert($tt) . '/\\'</script>';\r\n } else {\r\n $url = curPageURL();\r\n $u = explode($_GET['alias'], $url);\r\n\r\n $re = ' <script>window.location = \\'/site/' . $lib->util->cities->urlConvert($tt) . \"/\" . $_GET['alias'] . $u[1] . '\\'</script>';\r\n }\r\n }\r\n return $re;\r\n}",
"function ip_data()\n {\n if(!$this->input->is_ajax_request()){\n $this->session->set_userdata('timestamp', time());\n $user_data = $this->session->userdata('surfer_info');\n $ip = $_SERVER['REMOTE_ADDR'];\n if (!$user_data) {\n if ($_SERVER['HTTP_HOST'] !== 'localhost' OR $_SERVER['HTTP_HOST'] !== 'ebuymazon.dev') {\n $ip_data = file_get_contents(\"http://ip-api.com/json/\" . $ip);\n $this->session->set_userdata('surfer_info', $ip_data);\n }\n }\n }\n }",
"function amap_ma_geocode_location($location) {\n $coords = array();\n $google_api_key = trim(elgg_get_plugin_setting('google_api_key', AMAP_MA_PLUGIN_ID));\n $mapquest_api_key = trim(elgg_get_plugin_setting('mapquest_api_key', AMAP_MA_PLUGIN_ID));\n\n $geocoder = new \\Geocoder\\ProviderAggregator();\n $adapter = new \\Ivory\\HttpAdapter\\CurlHttpAdapter();\n $chain = new \\Geocoder\\Provider\\Chain([\n new \\Geocoder\\Provider\\GoogleMaps($adapter, $google_api_key),\n new \\Geocoder\\Provider\\MapQuest($adapter, $mapquest_api_key),\n ]);\n\n $geocoder->registerProvider($chain);\n\n try {\n $geocode = $geocoder->geocode($location);\n } catch (Exception $e) {\n error_log('amap_maps_api --------->' . $e->getMessage());\n return false;\n }\n\n if ($geocode->count() > 0) {\n $coords['lat'] = $geocode->first()->getLatitude();\n $coords['long'] = $geocode->first()->getLongitude();\n return $coords;\n }\n\n return false;\n}",
"public function getLocation();",
"public function getLocation();",
"function oneclick_google_map_plugin_geolocationpage()\r\r\n{\r\r\n if (!current_user_can('manage_options')) {\r\r\n wp_die('We hereby declarating :You are not authorised to access this plugin');\r\r\n }\r\r\n global $plugin_url;\r\r\n global $options;\r\r\n if (isset($_POST['geolocation_settings_form_submitted'])) {\r\r\n $hidden_field = esc_html($_POST['geolocation_settings_form_submitted']);\r\r\n if ($hidden_field == \"Y\") {\r\r\n $gmap_iconizer_latitude = esc_html($_POST['gmap_iconizer_latitude']);\r\r\n $options_geolocation_page['gmap_iconizer_latitude'] = $gmap_iconizer_latitude;\r\r\n $gmap_iconizer_longitude = esc_html($_POST['gmap_iconizer_longitude']);\r\r\n $options_geolocation_page['gmap_iconizer_longitude'] = $gmap_iconizer_longitude;\r\r\n $gmap_iconizer_zoom_level = esc_html($_POST['gmap_iconizer_zoom_level']);\r\r\n $options_geolocation_page['gmap_iconizer_zoom_level'] = $gmap_iconizer_zoom_level;\r\r\n update_option('oneclick_geolocation', $options_geolocation_page);\r\r\n $url = admin_url('admin.php?page=oneclick-google-map', 'http');\r\r\n echo '<script> window.location=\"';\r\r\n echo $url . '\"; </script> ';\r\r\n }\r\r\n }\r\r\n $options = get_option('oneclick_geolocation');\r\r\n $gmap_iconizer_zoom_level = $options['gmap_iconizer_zoom_level'];\r\r\n $gmap_iconizer_latitude = $options['gmap_iconizer_latitude'];\r\r\n $gmap_iconizer_longitude = $options['gmap_iconizer_longitude'];\r\r\n require ('includes/plugin_geolocation_wrapper.php');\r\r\n}",
"function geoCheckIP($ip){\n $CI =& get_instance();\n\n if(isset($_SESSION['geo_ip_location']) && $_SESSION['geo_ip_location']['ip'] == $ip) {\n return $_SESSION['geo_ip_location'];\n }\n\n log_message('debug', \"geoCheckIP\");\n\t \n\t\t$json_data = file_get_contents(\"http://apinotes.com/ipaddress/ip.php?ip=$ip\");\n\t\t$ip_data = json_decode($json_data, TRUE);\n\t\tif ($ip_data['status'] == 'success') {\n $_SESSION['geo_ip_location'] = array(\n 'ip' => $ip,\n 'country_code' => $ip_data['country_code'],\n 'country_name' => $ip_data['country_name']\n );\n\n\t\t\t/*\n\t\t <p>Ip Address: <?php echo $ip_data['ip'] ?></p>\n\t\t <p>Country Name: <?php echo $ip_data['country_name'] ?></p>\n\t\t <p>Country Code: <?php echo $ip_data['country_code'] ?></p>\n\t\t <p>Country Code (3 digit): <?php echo $ip_data['country_code3'] ?></p>\n\t\t <p>Region Code: <?php echo $ip_data['region_code'] ?></p>\n\t\t <p>Region Name: <?php echo $ip_data['region_name'] ?></p>\n\t\t <p>City Name: <?php echo $ip_data['city_name'] ?></p>\n\t\t <p>Latitude: <?php echo $ip_data['latitude'] ?></p>\n\t\t <p>Longitude: <?php echo $ip_data['longitude'] ?></p>\n\t\t\t*/\n \n\t\t\treturn $ip_data;\n\t\t}\n\t}",
"public function getUserLocation() {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip_note = 'HTTP_CLIENT_IP='.$_SERVER['HTTP_CLIENT_IP'];\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip_note = 'HTTP_X_FORWARDED_FOR='.$_SERVER['HTTP_X_FORWARDED_FOR'];\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip_note = 'REMOTE_ADDR='.$_SERVER['REMOTE_ADDR'];\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n $ip = '117.20.119.245';\n $loc = file_get_contents(\"http://ipinfo.io/\".$ip.\"/loc\");\n\n if($loc) {\n $array_loc = explode(',', $loc);\n return ['lat'=> ((isset($array_loc[0]))? $array_loc[0]:'') ,'lon'=> ((isset($array_loc[1]))? $array_loc[1]:'')];\n }\n\n return ['lat'=>'','lon'=>''];\n\n }",
"function geocode() {\n if ( ! $this->input->is_ajax_request() || ! $this->auth->is_login()) {\n return redirect(config_item('site_url'));\n }\n \n $latitude = filter($this->input->get('lat'), 'float', 20);\n $longitude = filter($this->input->get('lon'), 'float', 20);\n\n if (empty($latitude) || empty($longitude)) {\n return $this->output->set_output(json_encode(array(\n 'code' => 'error'\n )));\n }\n\n $this->load->library('Location');\n \n $geocode = $this->location->get_address($latitude, $longitude);\n\n if ( ! empty($geocode) && is_array($geocode)) {\n return $this->output->set_output(json_encode(array(\n 'code' => 'luck',\n 'address' => $geocode['address']\n )));\n }\n\n log_write(LOG_WARNING, 'Yandex geocode error, USER: ' . $this->auth->get_user_id(), __METHOD__);\n\n return $this->output->set_output(json_encode(array(\n 'code' => 'error',\n 'address' => 'Сервер определения местоположения недоступен. Попробуйте позже.'\n )));\n }",
"public function detectLocation()\n {\n global $reefless, $config, $rlValid, $rlDb, $page_info;\n\n if ($this->geo_filter_data['applied_location']) {\n return false;\n }\n\n if ($reefless->isBot()\n || $_GET['q'] == 'ext'\n || $_POST['xjxfun']\n || !$config['mf_geo_autodetect']\n || isset($_GET['reset_location'])\n || $_COOKIE['mf_geo_location'] == 'reset'\n || $this->detailsPage\n || strtoupper($_SERVER['REQUEST_METHOD']) == 'POST'\n ) {\n return false;\n }\n\n $names = array();\n\n if ($_SESSION['GEOLocationData']->Country_name) {\n $names[] = $_SESSION['GEOLocationData']->Country_name;\n }\n if ($_SESSION['GEOLocationData']->Region) {\n $names[] = $_SESSION['GEOLocationData']->Region;\n }\n if ($_SESSION['GEOLocationData']->City) {\n $names[] = $_SESSION['GEOLocationData']->City;\n }\n\n $parent_key = $this->geo_format['Key'];\n\n foreach ($names as $name) {\n Valid::escape($name);\n\n $sql = \"SELECT `Key` \";\n $sql .= \"FROM `{db_prefix}lang_keys` \";\n $sql .= \"WHERE `Value` = '{$name}' \";\n $sql .= \"AND SUBSTRING(`Key`, 19, '\" . strlen($parent_key) . \"') = '{$parent_key}' \";\n $sql .= \"ORDER BY CHAR_LENGTH(`Key`) ASC \";\n $sql .= \"LIMIT 1\";\n\n $location = $rlDb->getRow($sql);\n\n if ($location) {\n $parent_key = $location['Key'] = str_replace('data_formats+name+', '', $location['Key']);\n $locations[] = $location;\n } else {\n break;\n }\n }\n\n if ($locations) {\n $locations = array_reverse($locations);\n $location_to_apply = $rlDb->fetch('*', array('Key' => $locations[0]['Key'], 'Status' => 'active'), null, null, 'data_formats', 'row');\n\n // Save automatically detected location for 12 hours\n $reefless->createCookie('mf_geo_location', $location_to_apply['Key'], strtotime('+ 12 hours'));\n\n if (!$location_to_apply) {\n return false;\n }\n\n if ($this->geo_filter_data['is_location_url'] && $location_to_apply['Path']) {\n $redirect_url = $this->buildGeoLink($location_to_apply, $this->clean_url, true);\n\n // Redirect using default header function to avoid utilsRedirectURL hook call\n header(\"Location: {$redirect_url}\", true, 301);\n exit;\n } else {\n $_SESSION['geo_filter_location'] = $location_to_apply;\n header('Refresh: 0');\n exit;\n }\n }\n }",
"function regiomino_geolocation_refill_db() {\r\n/* \t$query = new EntityFieldQuery;\r\n\t$tmp = $query\r\n\t\t->entityCondition('entity_type', 'field_collection_item')\r\n\t\t->entityCondition('bundle', 'field_delivery_options')\r\n\t\t->execute();\r\n\t\r\n\t$field_collections = entity_load('field_collection_item', array_keys($tmp['field_collection_item'])); */\r\n\t\r\n\t\r\n\t$query = new EntityFieldQuery;\r\n\t$tmp = $query\r\n\t\t->entityCondition('entity_type', 'field_collection_item')\r\n\t\t->entityCondition('bundle', 'field_delivery_options')\r\n\t\t->execute();\r\n\t$shipperprofileid = array();\r\n\tforeach($tmp['field_collection_item'] as $fckey => $fcinfo) {\r\n\t\t$query = new EntityFieldQuery;\r\n\t\t$tmp2 = $query\r\n\t\t\t->entityCondition('entity_type', 'node')\r\n\t\t\t->entityCondition('bundle', 'shipper_profile')\r\n\t\t\t->propertyCondition('status', 1)\r\n\t\t\t->fieldCondition('field_delivery_options', 'value', $fckey)\r\n\t\t\t->execute();\r\n\t\tforeach($tmp2['node'] as $nkey=>$nval) {\r\n\t\t\t$shipperprofileid[$fckey] = $nkey;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$field_collections = entity_load('field_collection_item', array_keys($shipperprofileid));\r\n\r\n\t$deliveryzips = array();\r\n\tforeach($field_collections as $keys=>$values) {\r\n\t\tforeach($values->field_delivery_areas[LANGUAGE_NONE] as $key=>$value) {\r\n\t\t\tif(!empty($value['value'])) {\r\n\t\t\t\tif(strlen($value['value']) == 5) {\r\n\t\t\t\t\t$deliveryzips[$value['value']] = array();\r\n\t\t\t\t}\r\n\t\t\t\telseif(strlen($value['value']) == 4) {\r\n\t\t\t\t\tfor($i = 0; $i<=9; $i++) {\r\n\t\t\t\t\t\t$deliveryzips[$value['value'] . $i] = array();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telseif(strlen($value['value']) == 3) {\r\n\t\t\t\t\tfor($i = 0; $i<=9; $i++) {\r\n\t\t\t\t\t\tfor($j = 0; $j<=9; $j++) {\r\n\t\t\t\t\t\t\t$deliveryzips[$value['value'] . $i . $j] = array();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telseif(strlen($value['value']) == 2) {\r\n\t\t\t\t\tfor($i = 0; $i<=9; $i++) {\r\n\t\t\t\t\t\tfor($j = 0; $j<=9; $j++) {\r\n\t\t\t\t\t\t\tfor($k = 0; $k<=9; $k++) {\r\n\t\t\t\t\t\t\t\t$deliveryzips[$value['value'] . $i . $j . $k] = array();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telseif(strlen($value['value']) == 1) {\r\n\t\t\t\t\tfor($i = 0; $i<=9; $i++) {\r\n\t\t\t\t\t\tfor($j = 0; $j<=9; $j++) {\r\n\t\t\t\t\t\t\tfor($k = 0; $k<=9; $k++) {\r\n\t\t\t\t\t\t\t\tfor($l = 0; $l<=9; $l++) {\r\n\t\t\t\t\t\t\t\t\t$deliveryzips[$value['value'] . $i . $j . $k . $l] = array();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tforeach($deliveryzips as $zipcode=>$other) {\r\n\t\t$locinfo = regiomino_geolocation_queryinfobyzip($zipcode);\r\n\t\t\r\n\t\tif(empty($locinfo)) {\r\n\t\t\tunset($deliveryzips[$zipcode]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$mainissub = FALSE;\r\n\t\t\tif(isset($locinfo['sub_regions']) && !empty($locinfo['sub_regions'])) {\r\n\t\t\t\tforeach($locinfo['sub_regions'] as $keyno=>$infotype) {\r\n\t\t\t\t\t$subregionname = explode(',',$infotype['name']);\r\n\t\t\t\t\t$mainregionname = explode(',',$locinfo['main_region']['name']);\r\n\t\t\t\t\tif($infotype['name'] != $locinfo['main_region']['name'] && $subregionname[0] != $mainregionname[0]) {\r\n\t\t\t\t\t\t$infotype['name'] = $mainregionname[0] . ' (' . $subregionname[0] . ')';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$deliveryzips[$zipcode][] = $infotype;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$deliveryzips[$zipcode][] = $locinfo['main_region'];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tksort($deliveryzips);\r\n\tforeach($deliveryzips as $zipcode=>$value) {\r\n\t\tusort($deliveryzips[$zipcode], \"regiomino_geolocation_sortdeliveryzips\");\r\n\t}\r\n\r\n\r\n\tvariable_set('regiomino_geodb_avlbregions', $deliveryzips);\r\n\tdrupal_set_message(t('Variable with available zipcodes has been updated: @variable', array('@variable' => 'regiomino_geodb_avlbregions')), 'status');\r\n\t\r\n\t///Retrieve current list of storage profiles\r\n\t$query = new EntityFieldQuery;\r\n\t$tmp = $query\r\n\t\t->entityCondition('entity_type', 'field_collection_item')\r\n\t\t->entityCondition('bundle', 'field_storage_data')\r\n\t\t->execute();\r\n\t$shipperprofileid = array();\r\n\tforeach($tmp['field_collection_item'] as $fckey => $fcinfo) {\r\n\t\t$query = new EntityFieldQuery;\r\n\t\t$tmp2 = $query\r\n\t\t\t->entityCondition('entity_type', 'node')\r\n\t\t\t->entityCondition('bundle', 'storage_profile')\r\n\t\t\t->propertyCondition('status', 1)\r\n\t\t\t->fieldCondition('field_storage_data', 'value', $fckey)\r\n\t\t\t->execute();\r\n\t\tforeach($tmp2['node'] as $nkey=>$nval) {\r\n\t\t\t$shipperprofileid[$fckey] = $nkey;\r\n\t\t}\r\n\t}\r\n\r\n\t//$shipperprofileid now contains all shippers that have matching regions and offer a possibly valid time\r\n\t//now retrieve that time and offer it to the customer as a selection\r\n\t\r\n\t$field_collections = entity_load('field_collection_item', array_keys($shipperprofileid));\r\n\t\r\n\t$pickuppoints = array();\r\n\tforeach($field_collections as $fci=>$fcinfo) {\r\n\t\t$set = FALSE;\r\n\t\t$timetoday = strtotime(date('Y-m-d'));\r\n\t\tforeach($fcinfo->field_delivery_dates[LANGUAGE_NONE] as $dlvdatekey => $dlvdate) {\r\n\t\t\tif(strtotime(date('Y-m-d', strtotime($dlvdate['value']))) > $timetoday) $set = TRUE;\r\n\t\t}\r\n\t\tif($set) $pickuppoints[$fci] = $fcinfo->field_address[LANGUAGE_NONE][0]['postal_code'] . ' ' . $fcinfo->field_address[LANGUAGE_NONE][0]['locality'] . ' ' . $fcinfo->field_address[LANGUAGE_NONE][0]['name_line'];\r\n\t}\r\n\tvariable_set('regiomino_geodb_avlbpoints', $pickuppoints);\r\n\tdrupal_set_message(t('Variable with available Regiomino points has been updated: @variable', array('@variable' => 'regiomino_geodb_avlbpoints')), 'status');\r\n\r\n\t/* $counter = 1;\r\n\tforeach($deliveryzips as $zipcode=>$value) {\r\n\t\tforeach($value as $index=>$values) {\r\n\t\t\techo $counter . ': ' . $zipcode . ' ' . $values['name'] . ' --> ' . $values['lat'] . ',' . $values['lon'] . '<br />';\r\n\t\t\t$counter++;\r\n\t\t}\r\n\t}\r\n\t\r\n\tdie(); */\r\n\t\r\n\t/*\r\n\t//Retrieve and unzip file to private file path\r\n\t$geodb = url('http://download.geonames.org/export/zip/DE.zip');\r\n\t$contents = drupal_http_request($geodb);\r\n\t$filename = 'geodb_tmp.zip';\r\n\t$filepath = \"private://\" . $filename;\r\n\tfile_put_contents($filepath, $contents->data);\r\n\t$drpl_geodb_path = variable_get('file_private_path');\r\n\t$drpl_geodb_path_unzip = $drpl_geodb_path . '/GEODB.txt';\r\n\t$command = 'unzip -p ' . $drpl_geodb_path . '/' . $filename . ' DE.txt > ' . $drpl_geodb_path_unzip;\r\n\tsystem($command);\r\n\t\r\n\t//Retrieve csv data\r\n\tif (($handle = fopen($drpl_geodb_path_unzip, \"r\")) !== FALSE) {\r\n while (($data = fgetcsv($handle, 0, \"\\t\")) !== FALSE) {\r\n\t\t\t$finalarray[] = $data;\r\n }\r\n\t}\r\n\tdrupal_set_message(t('File retrieved, unzipped and csv-parsed from @geodb', array('@geodb' => $geodb)), 'status');\r\n\t\r\n\t$result = db_truncate('regiomino_geodb')->execute();\r\n\tdrupal_set_message(t('Database table regiomino_geodb truncated'), 'status');\r\n\t$avlbregions = array();\r\n \tforeach($finalarray as $key=>$value) {\r\n\t\tdb_query(\"INSERT INTO {regiomino_geodb} (country_code, postal_code, place_name, admin_name1, admin_code1, admin_name2, admin_code2, admin_name3, admin_code3, latitude, longitude, accuracy) VALUES (:country_code, :postal_code, :place_name, :admin_name1, :admin_code1, :admin_name2, :admin_code2, :admin_name3, :admin_code3, :latitude, :longitude, :accuracy)\", array(':country_code' => $value[0], ':postal_code' => $value[1], ':place_name' => $value[2], ':admin_name1' => $value[3], ':admin_code1' => $value[4], ':admin_name2' => $value[5], ':admin_code2' => $value[6], ':admin_name3' => $value[7], ':admin_code3' => $value[8], ':latitude' => $value[9], ':longitude' => $value[10], ':accuracy' => $value[11]));\r\n\t\tif(array_key_exists($value[1], $deliveryzips)) {\r\n\t\t\t$avlbregions[] = $value;\r\n\t\t}\r\n\t}\r\n\tdrupal_set_message(t('Data written to database table regiomino_geodb'), 'status');\r\n\t\r\n\tvariable_set('regiomino_geodb_avlbregions', $avlbregions);\r\n\tdrupal_set_message(t('Variable with available zipcodes has been updated: @variable', array('@variable' => 'regiomino_geodb_avlbregions')), 'status');\r\n\t*/\r\n\t\r\n}",
"public function ajax_load_dashboard_point() {\n\t\twpeo_check_01::check( 'wpeo_nonce_load_dashboard_point_' . $_POST['point_id'] );\n\n\t\tglobal $task_controller;\n\t\tglobal $point_controller;\n\t\tglobal $time_controller;\n\n\t\t$task \t\t\t\t= $task_controller->show( $_POST['task_id'] );\n\t\t$point \t\t\t\t= $point_controller->show( $_POST['point_id'] );\n\t\t$list_time \t\t=\t$time_controller->index( $taks->id, array( 'parent' => $point->id, 'status' => -34070 ) );\n\n\t\tob_start();\n\t\trequire( wpeo_template_01::get_template_part( WPEO_POINT_DIR, WPEO_POINT_TEMPLATES_MAIN_DIR, 'backend', 'window-point' ) );\n\t\twp_send_json_success( array( 'template' => ob_get_clean() ) );\n\t}",
"function _simplegeo_tileservice_get_nodes($x, $y, $zoom, $lang, $layer, $type) {\n $zoom = 21 - $zoom;\n $top_left = _simplegeo_tileservice_tile2coord($x, $y, $zoom);\n $bottom_right = _simplegeo_tileservice_tile2coord($x+1, $y+1, $zoom);\n $nodes = array();\n // Use views as query builder if a view is specified.\n if (module_exists('views') && $layer->conf['view'] && $view = views_get_view($layer->conf['view'])) {\n // Sanity check; make sure the user added the bounding_box argument to the view.\n // TODO: Add support for other displays than \"default\"?.\n $argument_setting = $view->display['default']->display_options['arguments'];\n if (is_array($argument_setting)) {\n $first_argument_setting = current($argument_setting);\n if ($first_argument_setting['id'] == 'bounding_box') {\n // Create the string expected by the bounding box argument.\n $box = $top_left['lat'] . ',' . $top_left['long'] . ',' . $bottom_right['lat'] . ',' . $bottom_right['long'];\n $view->set_arguments(array($box));\n $view->execute();\n foreach ($view->result as $node) {\n $point = explode(' ', simple_geo_clean_wkt('point', $node->simple_geo_point));\n $nodes[] = array('lat' => (float)$point[0], 'lon' => (float)$point[1], 'count' => 1, 'nid' => (int)$node->nid);\n }\n }\n }\n }\n // Build our own query based on layer settings.\n else {\n $sql = \"SELECT n.nid, AsText(ps.position) AS simple_geo_point\n FROM {node} n\n INNER JOIN {simple_geo_position} ps ON n.nid = ps.nid AND ps.type = 'node' \";\n\n // Define the WHERE part of the query. We first define some defaults.\n $wheres = array(\n 'n.status <> 0',\n \"Contains(Envelope(GeomFromText('LineString(%s %s,%s %s)')), ps.position)\",\n \"n.language = '%s'\",\n );\n if (!empty($layer->conf['node_type'])) {\n $wheres[] = \"n.type = '%s'\";\n }\n\n // If max age is defined check so the node isn't older than the specified age.\n if (!empty($layer->conf['max_age'])) {\n $wheres[] = 'n.created >= ' . strtotime('-' . $layer->conf['max_age']);\n }\n\n // If update since is defined check so the node has been updated since the specified time.\n if (!empty($layer->conf['updated_since'])) {\n $wheres[] = 'n.changed >= ' . strtotime('-' . $layer->conf['updated_since']);\n }\n\n // Add the WHEREs to the query.\n $sql .= ' WHERE ' . implode(' AND ', $wheres);\n\n $sql .= \" ORDER BY n.created\";\n\n $params = array($top_left['lat'], $top_left['long'], $bottom_right['lat'], $bottom_right['long'], $lang);\n if (isset($layer->conf['node_type'])) {\n $params[] = $layer->conf['node_type'];\n }\n\n $res = db_query(db_rewrite_sql($sql), $params);\n\n while ($node = db_fetch_object($res)) {\n $point = explode(' ', simple_geo_clean_wkt('point', $node->simple_geo_point));\n $nodes[] = array('lat' => (float)$point[0], 'lon' => (float)$point[1], 'count' => 1, 'nid' => (int)$node->nid);\n }\n }\n\n return $nodes;\n}",
"public function ajaxGetLocations($query = null) {\r\n $xmlElement = new SimpleXMLElement(\"<?xml version='1.0' standalone='yes'?><root></root>\");\r\n $locations = $this->Location->find('all', array(\r\n 'conditions' => array(\r\n 'Location.Deleted' => 0\r\n ), 'fields' => array('Location.LocationID', 'Location.LocationCode'), 'recursive' => 0,\r\n \t\t'order'=>'Location.LocationCode asc'\r\n ));\r\n if ($query == null) {\r\n foreach ($locations as $location) {\r\n $xmlLocation = $xmlElement->addChild('location');\r\n $xmlLocation->addChild('id', $location['Location']['LocationID']);\r\n $xmlLocation->addChild('locationCode', $location['Location']['LocationCode']);\r\n }\r\n } else {\r\n foreach ($locations as $location) {\r\n if (strpos(strtolower($location['Location']['LocationCode']), strtolower($query)) !== false) {\r\n $xmlLocation = $xmlElement->addChild('location');\r\n $xmlLocation->addChild('id', $location['Location']['LocationID']);\r\n $xmlLocation->addChild('locationCode', $location['Location']['LocationCode']);\r\n }\r\n }\r\n }\r\n\r\n\r\n $this->set('xml', $xmlElement);\r\n //$this->set('locations', $Locations);\r\n $this->render('ajaxGetLocations', 'ajax');\r\n }",
"function fetchGoogleLatitudeLocation ($user_id) {\n $r = array();\n $google_latitude_data = json_decode(file_get_contents(\"https://www.google.com/latitude/apps/badge/api?user=$user_id&type=json\"));\n $r['longitude'] = $google_latitude_data->features[0]->geometry->coordinates[0];\n $r['latitude'] = $google_latitude_data->features[0]->geometry->coordinates[1];\n $r['current_city'] = $google_latitude_data->features[0]->properties->reverseGeocode;\n $r['last_updated'] = $google_latitude_data->features[0]->properties->timeStamp;\n $r['raw'] = $google_latitude_data; // So that we have it all, if we need it.\n return $r;\n }",
"function guifi_get_map_info($node) {\n $map_info = array();\n \n // Obtenim les variables de retall del mapa. \n // - (X,Y) ó (UTMx, UTMy) ó (Lon,Lat)\n $map_info['datum'] = 5;\n $map_info['zone'] = 31;\n $map_info['nord'] = 1;\n $map_info['xPixel'] = isset($_GET[\"xPixel\"]) ? $_GET[\"xPixel\"] : $_POST[\"xPixel\"];\n $map_info['yPixel'] = isset($_GET[\"yPixel\"]) ? $_GET[\"yPixel\"] : $_POST[\"yPixel\"];\n $map_info['xUTM'] = isset($_GET[\"xUTM\"]) ? $_GET[\"xUTM\"] : $_POST[\"xUTM\"];\n $map_info['yUTM'] = isset($_GET[\"yUTM\"]) ? $_GET[\"yUTM\"] : $_POST[\"yUTM\"];\n $map_info['londec'] = isset($_GET[\"londec\"]) ? $_GET[\"londec\"] : $_POST[\"londec\"];\n $map_info['latdec'] = isset($_GET[\"latdec\"]) ? $_GET[\"latdec\"] : $_POST[\"latdec\"];\n $map_info['lon'] = isset($_GET[\"lon\"]) ? $_GET[\"lon\"] : $_POST[\"lon\"];\n $map_info['lat'] = isset($_GET[\"lat\"]) ? $_GET[\"lat\"] : $_POST[\"lat\"];\n // - Zoom ó Dist\n $map_info['zoom'] = isset($_GET[\"zoom\"]) ? $_GET[\"zoom\"] : $_POST[\"zoom\"];\n $map_info['dist'] = isset($_GET[\"dist\"]) ? $_GET[\"dist\"] : $_POST[\"dist\"];\n if ( !isset($map_info['xPixel']) || !isset($map_info['yPixel'])) {\n $map_info['xPixel'] = 0;\n $map_info['yPixel'] = 0;\n }\n if ( !isset($map_info['zoom']) )\n $map_info['zoom'] = 0;\n\n \n // Comprovem les dades i les transformem en X, Y, S\n $map_info['width'] = $map_info['height'] = 500; // This variables will are in drupal\n $map_info['quadrants'] = 3; // This variables will are in drupal\n $image_info = guifi_get_image_info ( guifi_get_file_map_zone($node) );\n \n // Find max scale of de map to draw from zoom of this view\n $map_info['maxRel'] = $image_info['width'] / $map_info['width'];\n if ( $map_info['maxRel'] < $image_info['height'] / $map_info['height'] )\n $map_info['maxRel'] = $image_info['height'] / $map_info['height'];\n $map_info['maxScale'] = guifi_get_scale_relation ( $map_info['maxRel'] );\n if ( $node->valid ) {\n // Calcule dist of original map and his relation\n $point_zero = guifi_pixel2UTM ($node->coord, 0, 0);\n $point_right = guifi_pixel2UTM ($node->coord, $image_info['width']-1, 0);\n $point_bottom = guifi_pixel2UTM ($node->coord, 0, $image_info['height']-1);\n \n $map_info['distX'] = guifi_get_dist_UTM($point_zero[0], $point_zero[1], $point_right[0], $point_right[1]);\n $map_info['distY'] = guifi_get_dist_UTM($point_zero[0], $point_zero[1], $point_bottom[0], $point_bottom[1]);\n }\n\n // Find de scale to draw the map\n if ( $node->valid && isset($map_info['dist']) && is_numeric($map_info['dist']) ) {\n // Find scale of de map to draw from dist of this view\n $map_info['maxRel'] = ( $image_info['width'] * $map_info['dist'] ) / ( $map_info['distX'] * $map_info['width'] );\n if ( $map_info['maxRel'] < ( $image_info['height'] * $map_info['dist'] ) / ( $map_info['distY'] * $map_info['height'] ) )\n $map_info['maxRel'] = ( $image_info['height'] * $map_info['dist'] ) / ( $map_info['distY'] * $map_info['height'] );\n \n $map_info['scale'] = guifi_get_scale_relation ( $map_info['maxRel'] );\n if ( $map_info['scale'] > $map_info['maxScale'] ) \n $map_info['scale'] = $map_info['maxScale'];\n $map_info['zoom'] = $map_info['maxScale'] - $map_info['scale'];\n }\n if ( isset($map_info['zoom']) ) {\n // Recalcule de zoom to a correct zoom\n if ( $map_info['zoom'] > $map_info['maxScale'] )\n $map_info['zoom'] = $map_info['maxScale'];\n $map_info['scale'] = $map_info['maxScale'] - $map_info['zoom'];\n }\n \n if ( $node->valid ) {\n if ( isset($map_info['lon']) && isset($map_info['lat']) ) {\n // Transform Geo's corrdinates to UTM Coordinates\n $map_info['londec'] = text2Coord($map_info['lon']);\n $map_info['latdec'] = text2Coord($map_info['lat']);\n }\n if ( isset($map_info['londec']) && isset($map_info['latdec']) ) {\n // Transform Geo's corrdinates to UTM Coordinates\n $point = guifi_WG842UTM ($map_info['londec'], $map_info['latdec'], $map_info['datum'], $map_info['zone'], $map_info['nord']);\n $map_info['xUTM'] = $point[0];\n $map_info['yUTM'] = $point[1];\n }\n if ( isset($map_info['xUTM']) && isset($map_info['yUTM']) ) {\n // Transform UTM's corrdinates to Pixel Coordinates\n $point = guifi_UTM2pixel ($node->coord, $map_info['xUTM'], $map_info['yUTM']);\n $map_info['xPixel'] = $point[0];\n $map_info['yPixel'] = $point[1];\n }\n }\n\n // Find quadrants of de map scaled.\n $map_info['width_quadrant'] = $map_info['width'] / $map_info['quadrants'] ;\n $map_info['height_quadrant'] = $map_info['height'] / $map_info['quadrants'] ;\n $quadrantsX = ceil (( $image_info['width'] / guifi_get_rel_scale( $map_info['scale'] ) ) / $map_info['width_quadrant'] );\n $quadrantsY = ceil (( $image_info['height'] / guifi_get_rel_scale( $map_info['scale'] ) ) / $map_info['height_quadrant'] );\n\n // Find de quadrant center of de map scaled from pixel x,y in center.\n $quadCentX = floor (( $map_info['xPixel'] / guifi_get_rel_scale( $map_info['scale'] ) ) / $map_info['width_quadrant'] );\n $quadCentY = floor (( $map_info['yPixel'] / guifi_get_rel_scale( $map_info['scale'] ) ) / $map_info['height_quadrant'] );\n \n // Find de quadrant top-left of de map scaled from pixel x,y in center.\n $map_info['quadX'] = $quadCentX - floor( $map_info['quadrants'] / 2 );\n $map_info['quadY'] = $quadCentY - floor( $map_info['quadrants'] / 2 );\n if ( $map_info['quadX'] > $quadrantsX - $map_info['quadrants'] )\n $map_info['quadX'] = $quadrantsX - $map_info['quadrants'];\n if ( $map_info['quadY'] > $quadrantsY - $map_info['quadrants'] )\n $map_info['quadY'] = $quadrantsY - $map_info['quadrants'];\n if ( $map_info['quadX'] < 0 ) $map_info['quadX'] = 0;\n if ( $map_info['quadY'] < 0 ) $map_info['quadY'] = 0;\n\n // Recalcule the width and heigth of scaled image\n if ( $map_info['quadX'] >= $quadrantsX - $map_info['quadrants'] ) \n $map_info['width'] = floor( ($image_info['width'] / guifi_get_rel_scale( $map_info['scale'] )) - ( $map_info['quadX'] * $map_info['width_quadrant'] ));\n if ( $map_info['quadY'] >= $quadrantsY - $map_info['quadrants'] ) \n $map_info['height'] = floor( ($image_info['height'] / guifi_get_rel_scale( $map_info['scale'] )) - ( $map_info['quadY'] * $map_info['height_quadrant'] ));\n\n // Calculem la distància de la màxima de la imatge\n if ( $node->valid ) {\n if ( $map_info['width'] < $map_info['height'] )\n $map_info['dist'] = floor($map_info['distX'] * ( $map_info['width'] * guifi_get_rel_scale( $map_info['scale'] ) ) / $image_info['width']);\n else\n $map_info['dist'] = floor($map_info['distY'] * ( $map_info['height'] * guifi_get_rel_scale( $map_info['scale'] ) ) / $image_info['height']);\n }\n \n/*\n echo \"<br />quadrantsX: \".$quadrantsX;\n echo \"<br />quadrantsY: \".$quadrantsY;\n echo \"<br />map_width: \".$image_info['width'];\n echo \"<br />map_height: \".$image_info['height'];\n*/ \n/*\n echo \"<br />datum: \".$map_info['datum'];\n echo \"<br />zone: \".$map_info['zone'];\n echo \"<br />nord: \".$map_info['nord'];\n echo \"<br />zoom: \".$map_info['zoom'];\n echo \"<br />dist: \".$map_info['dist'];\n echo \"<br />scale: \".$map_info['scale'];\n echo \"<br />xPixel: \".$map_info['xPixel'];\n echo \"<br />yPixel: \".$map_info['yPixel'];\n echo \"<br />xUTM: \".$map_info['xUTM'];\n echo \"<br />yUTM: \".$map_info['yUTM'];\n echo \"<br />lon: \".$map_info['londec'];\n echo \"<br />lan: \".$map_info['latdec'];\n\n echo \"<br />quadX: \".$map_info['quadX'];\n echo \"<br />quadY: \".$map_info['quadY'];\n echo \"<br />width: \".$map_info['width'];\n echo \"<br />height: \".$map_info['height'];\n*/ \n\n return $map_info;\n}",
"function venture_geo_process() {\n $geocoded = venture_geo_process_geocodes();\n $existing_map = venture_geo_get_map_path();\n \n if ($geocoded || !$existing_map) {\n venture_geo_process_map($existing_map);\n }\n}",
"function wyz_get_businesses_js_data() {\n\t$nonce = filter_input( INPUT_POST, 'nonce' );\n\t/*if ( ! wp_verify_nonce( $nonce, 'wyz_ajax_custom_nonce' ) ) {\n\t\twp_die( 'busted' );\n\t}*/\n\n\t//$coor = get_post_meta( $l_id, 'wyz_location_coordinates', true );\n\n\t$bus_names = filter_input( INPUT_POST, 'bus-name' );\n\t$cat_id = filter_input( INPUT_POST, 'cat-id' );\n\t$loc_id = filter_input( INPUT_POST, 'loc-id' );\n\t$rad = filter_input( INPUT_POST, 'rad' );\n\t$lat = filter_input( INPUT_POST, 'lat' );\n\t$lon = filter_input( INPUT_POST, 'lon' );\n\t$is_listing_page = filter_input( INPUT_POST, 'is-listing' );\n\t$has_listings = filter_input( INPUT_POST, 'has-listings' );\n\t$is_grid_view = filter_input( INPUT_POST, 'is-grid' );\n\t$posts_per_page = filter_input( INPUT_POST, 'posts-per-page' );\n\t$page = filter_input( INPUT_POST, 'page' );\n\t$page_id = filter_input( INPUT_POST, 'page_id' );\n\n\t$has_near_me = get_post_meta( $page_id, 'wyz_near_me', true );\n\t$has_near_me = $is_listing_page && ! empty( $has_near_me );\n\t$has_listings = $is_listing_page && $has_listings;\n\tif ( $has_near_me ) {\n\t\t$near_me_count = get_post_meta( $page_id, 'wyz_near_me_count', true );\n\t\tif ( is_nan( $near_me_count ) || 1 > $near_me_count )\n\t\t\t$near_me_count = 10;\n\t\t$near_me_radius= get_post_meta( $page_id, 'wyz_near_me_radius', true );\n\t\tif ( is_nan( $near_me_radius ) || 1 > $near_me_radius )\n\t\t\t$near_me_radius = 500;\n\t\t$near_me_list = array();\n\t}\n\n\tif ( $posts_per_page < 0 || is_nan( $posts_per_page ) )\n\t\t$posts_per_page = 10;\n\n\n\t$template_type = '';\n\tif ( function_exists( 'wyz_get_theme_template' ) )\n\t\t\t$template_type = wyz_get_theme_template();\n\n\tif ( $template_type == 1 )\n\t\t$template_type = '';\n\n\n\tif ( ! $rad || '' == $rad || ! is_numeric( $rad ) ) {\n\t\t$rad = 0;\n\t\t$lat = $lon = 0;\n\t}\n\n\t$results = WyzHelpers::wyz_handle_business_search( $bus_names, $cat_id, $loc_id, $rad, $lat, $lon, $page );\n\t$args = $results['query'] ;\n\t$args['posts_per_page'] = 400;\n\t$lat = $results['lat'];\n\t$lon = $results['lon'];\n\t\n\t\n \t$featured_posts_per_page = get_option( 'wyz_featured_posts_perpage', 2 );\n \t\n \t\n \tif ($has_listings && empty($bus_names)) {\n \t\t\n\t\t$sticky_posts = get_option( 'sticky_posts' );\n\n\t\t$cat_feat = array(\n\t\t\t'post_type' => 'wyz_business',\n\t\t\t'post__in' => $sticky_posts,\n\t\t\t'fields' => 'ids',\n\t\t);\n\n \n\t\t$featured_businesses_args = array(\n\t\t\t'post_type' => 'wyz_business',\n\t\t\t//'posts_per_page' => $featured_posts_per_page,\n\t\t\t'post__in' => $sticky_posts,\n\t\t\t'fields' => 'ids',\n\t\t\t'offset' => $page,\n\t\t);\n\n\t\tif ( isset( $args['tax_query'] ) ) {\n\t\t\t$featured_businesses_args['tax_query'] = $args['tax_query'];\n\t\t}\n\n\n\t\t$featured_businesses_args = apply_filters( 'wyz_query_featured_businesses_args_search', $featured_businesses_args, $args );\n\n\n\t\t$query1 = new WP_Query( $featured_businesses_args );\n\n\t\t$sticky_posts = $query1->posts;\n\n\t\tif ( count( $sticky_posts ) > $featured_posts_per_page ) {\n\n\t\t\tWyzhelpers::fisherYatesShuffle( $sticky_posts, rand(10,100) );\n\t\t\t$sticky_posts = array_slice( $sticky_posts, 0, $featured_posts_per_page );\n\t\t}\n\n\t\t$args['fields'] = 'ids';\n\t\t//$args['post__not_in'] = get_option( 'sticky_posts' );\n\t\t$args['post_type'] = 'wyz_business';\n\n\t\t$query2 = new WP_Query( $args );\n\n\t\t$all_the_ids = array_merge( $sticky_posts, $query2->posts );\n\n\t\tif ( empty( $all_the_ids ) ) $all_the_ids = array( 0 );\n\n\t\t$final_query_args = array(\n\t\t\t'post_type' => 'wyz_business',\n\t\t\t'post__in' => $all_the_ids,\n\t\t\t'orderby' => 'post__in',\n\t\t\t'offset' => $page,\n\t\t\t'posts_per_page' => -1,\n\t\t);\n\n\n\t\t $query = new WP_Query( $final_query_args );\n\t\t\n \t}else {\n \t\n \t\t$query = new WP_Query($args);\n \t\n \t}\n\n\n\t$posts_for_nxt_loop = array();\n\n\t$user_favorites = WyzHelpers::get_user_favorites();\n\n\t$favorites = array();\n\n\t$locations = array();\n\t$marker_icons = array();\n\t$business_names = array();\n\t$range_radius = array();\n\t$business_after_names = array();\n\t$business_logoes = array();\n\t$business_permalinks = array();\n\t$business_cat_ids = array();\n\t$business_cat_colors = array();\n\t$business_list = '';\n\t$current_b_ids = array();\n\n\t$i = 0;\n\t$posts_count = 0;\n\t\n\t$def_arch_co = WyzHelpers::get_default_archive_map_coordinates();\n\t$def_marker_coor = array('latitude' => $def_arch_co[0], 'longitude' => $def_arch_co[1] );\n\n\twhile ( $query->have_posts() ) {\n\n\t\t$query->the_post();\n\t\t$b_id = get_the_ID();\n\t\t$temp_loc = get_post_meta( $b_id, 'wyz_business_location', true );\n\n\t\tif ( empty( $temp_loc ) ) {\n\t\t\t$temp_loc = array(\n\t\t\t\t'latitude' => $def_marker_coor['latitude'],\n\t\t\t\t'longitude' => $def_marker_coor['longitude'],\n\t\t\t);\n\t\t}\n\n\t\t$posts_count++;\n\n\t\t// If the business has map coordinates and is within range (in case search radius was provided),\n\t\t// add its id to $posts_for_nxt_loop\n\t\tif ( 0 != $lat && 0 != $lon && 0 != $rad ) {\n\t\t\t$pos = array( 'lat' => $temp_loc['latitude'], 'lon' => $temp_loc['longitude'] );\n\t\t\t$my_pos = array( 'lat' => $lat, 'lon' => $lon );\n\t\t\t$tmp_rad = WyzHelpers::get_distance_between( $pos, $my_pos );\n\t\t\tif(is_array( $tmp_rad )){\n\t\t\t\t$within = false;\n\t\t\t\tforeach ($tmp_rad as $rd) {\n\t\t\t\t\tif($rad>=$tmp_rad){\n\t\t\t\t\t\t$within = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!$within)\n\t\t\t\t\tcontinue;\n\t\t\t}else{\n\t\t\t\tif ( $rad < $tmp_rad )\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tarray_push( $favorites, in_array( $b_id, $user_favorites ) );\n\t\tarray_push( $locations, $temp_loc );\n\t\tarray_push( $business_names, get_the_title() );\n\t\tarray_push( $business_after_names, apply_filters( 'wyzi_after_business_name_info_bubble', '', $b_id ) );\n\t\tarray_push( $business_permalinks, esc_url( get_the_permalink() ) );\n\t\tarray_push( $range_radius, WyzHelpers::get_business_range_radius_in_meters( get_the_ID() ) );\n\t\tarray_push( $posts_for_nxt_loop, $b_id );\n\t\tif ( $has_near_me ) {\n\t\t\t$distance = WyzHelpers::get_user_business_distance( $b_id );\n\t\t\tif (isset( $distance['distance']['value'] ) && is_numeric( $distance['distance']['value'] ) && $distance['distance']['value'] <= $near_me_radius ) {\n\t\t\t\t$near_me_list[] = array(\n\t\t\t\t\t'id' => $b_id,\n\t\t\t\t\t'distance' => $distance['distance']['value']\n\t\t\t\t);\n\t\t\t\tusort($near_me_list,'wyz_cmp_listings_near_me');\n\t\t\t\t$near_me_list = array_slice( $near_me_list, 0, $near_me_count );\n\t\t\t}\n\t\t}\n\n\n\n\t\tif ( $has_listings && $i++ < ( $posts_per_page + $featured_posts_per_page ) ) {\n\n\t\t\tarray_push( $current_b_ids, $b_id );\n\t\t\tif ( $is_grid_view ) {\n\t\t\t\t$business_list .= WyzBusinessPost::wyz_create_business_grid_look();\n\n\t\t\t} else {\n\t\t\t\t$business_list .= WyzBusinessPost::wyz_create_business();\n\t\t\t}\n\t\t}\n\n\t\tarray_push( $business_logoes, wyzHelpers::get_post_thumbnail( $b_id, 'business', 'medium', array( 'class' => 'business-logo-marker' ) ) );\n\n\t\t$temp_term = WyzHelpers::wyz_get_representative_business_category_id( $b_id );\n\n\t\tif ( '' != $temp_term ) {\n\n\t\t\t$col = get_term_meta( $temp_term, 'wyz_business_cat_bg_color', true );\n\t\t\t$holder = wp_get_attachment_url( get_term_meta( $temp_term, \"map_icon$template_type\", true ) );\n\t\t\t\t\n\t\t} else {\n\t\t\t$col = '';\n\t\t}\n\t\tif ( ! isset( $holder ) || false == $holder ) {\n\t\t\t$marker = '';\n\t\t} else {\n\t\t\t$marker = $holder;\n\t\t}\n\n\t\tarray_push( $business_cat_ids, intval( $temp_term ) );\n\t\tarray_push( $business_cat_colors, $col );\n\t\t\t\t\n\n\t\tif ( false == $marker ) {\n\t\t\tarray_push( $marker_icons, '' );\n\t\t\tarray_push( $business_cat_ids, -1 );\n\t\t} else {\n\t\t\tarray_push( $marker_icons, $marker );\n\t\t}\n\t}\n\twp_reset_postdata();\n\n\n\tif ( empty( $posts_for_nxt_loop ) ) {\n\t\t$posts_for_nxt_loop[] = -1;\n\t}\n\t\n\tif ( $has_listings ) {\n\t\t$remaining_pages = ceil( ( sizeof( $posts_for_nxt_loop ) / ( float ) $posts_per_page ) -1 );\n\t} else {\n\t\t$remaining_pages = 0;\n\t}\n\n\twp_reset_postdata();\n\t\n\tif(!$page&&empty($business_list))\n\t $business_list = WyzHelpers::wyz_info( esc_html__('No Businesses match your search.'), true );\n\n\tif ( ! isset( $locations ) || ! isset( $marker_icons ) ) {\n\t\t$locations = array();\n\t\t$marker_icons = array();\n\t}\n// Lets pass Essential Grid Shortcode in case needed\n\t$ess_grid_shortcode ='';\n\n\tif ( function_exists( 'wyz_get_theme_template' ) ) {\n\t\t$template_type = wyz_get_theme_template();\n\t\t\n\t\tif ( $template_type == 2 ) {\n\t\t\t$grid_alias = wyz_get_option( 'listing_archives_ess_grid' );\n\t\t\t$ess_grid_shortcode = do_shortcode( '[ess_grid alias=\"' . $grid_alias .'\" posts='.implode(',',$current_b_ids).']' );\n\t\t}\n\t}\n\n\t$near_me_content = '';\n\t$near_me_content_count = 0;\n\tif ( isset( $near_me_list ) && count( $near_me_list ) > 0 ) {\n\t\t$nm_b_ids = array();\n\t\tforeach ($near_me_list as $b ) {\n\t\t\t$nm_b_ids[] = $b['id'];\n\t\t}\n\t\tif ( ! empty( $nm_b_ids ) ) {\n\t\t\t$near_me_content = WYZISlidersFactory::the_rec_added_slider( apply_filters( 'wyz_nearme_attributes', array( 'loop' => false, 'nav' => false, 'autoplay_timeout' => 1, 'autoplay' => false) ), $nm_b_ids );\n\t\t\t$near_me_content_count = count($nm_b_ids);\n\t\t}\n\t}\n\n\t$global_map_java_data = array(\n\t\t'defCoor' => array(),\n\t\t'radiusUnit' => '',\n\t\t'GPSLocations' => $locations,\n\t\t'markersWithIcons' => $marker_icons,\n\t\t'businessNames' => $business_names,\n\t\t'afterBusinessNames' => $business_after_names,\n\t\t'businessLogoes' => $business_logoes,\n\t\t'businessPermalinks' => $business_permalinks,\n\t\t'businessCategories' => $business_cat_ids,\n\t\t'businessCategoriesColors' => $business_cat_colors,\n\t\t'hasNearMe' => $has_near_me,\n\t\t'nearMeContent' => $near_me_content,\n\t\t'nearMeContentCount' => $near_me_content_count,\n\t\t'isListingPage' => $is_listing_page,\n\t\t'hasLists' => $has_listings,\n\t\t'postsPerPage' =>$posts_per_page,\n\t\t'businessIds' => $posts_for_nxt_loop,\n\t\t'businessList' => $business_list,\n\t\t'hasAfter' => $remaining_pages > 0,\n\t\t'favorites' => $favorites,\n\t\t'hasBefore' => false,\n\t\t'postsCount' => $posts_count,\n\t\t'ess_grid_shortcode' => $ess_grid_shortcode,\n\t\t'range_radius' => $range_radius,\n\t);\n\n\twp_die( wp_json_encode( $global_map_java_data ) );\n}",
"function initMap() {\n\n\t\t// Instantiate the xajax object and configure it\n\t\trequire_once (t3lib_extMgm::extPath('xajax') . 'class.tx_xajax.php');\n\t\t$this->xajax = t3lib_div::makeInstance('tx_xajax'); // Make the instance\n\t\tif ($GLOBALS['TSFE']->metaCharset == 'utf-8') {\n\t\t\t$this->xajax->decodeUTF8InputOn(); // Decode form vars from utf8\n\t\t}\n\t\t$this->xajax->setCharEncoding($GLOBALS['TSFE']->metaCharset); \t\t// Encode of the response to utf-8 ???\n\t\t$this->xajax->setWrapperPrefix($this->prefixId); \t\t// To prevent conflicts, prepend the extension prefix\n\t\t$this->xajax->statusMessagesOn(); \t\t// Do you wnat messages in the status bar?\n\n\t\t// register the functions of the ajax requests\n\t\t$this->xajax->registerFunction(array('infomsg', &$this, 'ajaxGetInfomsg'));\n\t\t$this->xajax->registerFunction(array('activeRecords', &$this, 'ajaxGetActiveRecords'));\n\t\t$this->xajax->registerFunction(array('processCat', &$this, 'ajaxProcessCat'));\n\t\t$this->xajax->registerFunction(array('tab', &$this, 'ajaxGetPoiTab'));\n\t\t$this->xajax->registerFunction(array('search', &$this, 'ajaxSearch'));\n\t\t$this->xajax->registerFunction(array('processCatTree', &$this, 'ajaxProcessCatTree'));\n\t\t$this->xajax->registerFunction(array('getDynamicList', &$this, 'ajaxGetDynamicList'));\n\n\t\t$this->xajax->processRequests();\n\n\t\t// additional output using a template\n\t\t$template['total'] = $this->cObj2->getSubpart($this->templateCode,'###HEADER###');\n\t\t$markerArray = $subpartArray = array();\n\t\t$markerArray['###PATH###'] = t3lib_extMgm::siteRelpath('rggooglemap');\n\n\t\tif ($this->conf['map.']['addLanguage'] == 1) {\n\t\t\tif ($this->conf['map.']['addLanguage.']['override'] != '') {\n\t\t\t\t$markerArray['###MAP_KEY###'] .= '&hl=' . $this->conf['map.']['addLanguage.']['override'];\n\t\t\t} elseif ($GLOBALS['TSFE']->lang != '') {\n\t\t\t\t$markerArray['###MAP_KEY###'] .= '&hl=' . $GLOBALS['TSFE']->lang;\n\t\t\t}\n\t\t}\n\n\t\t$markerArray['###DYNAMIC_JS###'] = $this->getJs();\n\n\t\t// load spefic files if needed for clustering\n\t\tif ($this->conf['map.']['activateCluster'] == 1) { // gxmarkers\n\t\t\t$subpartArray['###CLUSTER_2###'] = '';\n\n\t\t} elseif ($this->conf['map.']['activateCluster'] == 2) { // markerclusterer\n\t\t\t$subpartArray['###CLUSTER_1###'] = '';\n\t\t} else { // no clustering\n\t\t\t$subpartArray['###CLUSTER_1###'] = $subpartArray['###CLUSTER_2###'] = '';\n\t\t}\n\n\t\t$totalJS = $this->cObj2->substituteMarkerArrayCached($template['total'],$markerArray, $subpartArray);\n\t\t$GLOBALS['TSFE']->additionalHeaderData['rggooglemap_xajax'] = $this->xajax->getJavascript(t3lib_extMgm::siteRelPath('xajax'));\n\t\t$GLOBALS['TSFE']->additionalHeaderData['rggooglemap_js'] = $totalJS;\n\t}",
"function parse_request() {\n\t$location_args = array( 'restrict_by_country' => false );\n\n\t// If a precise location is known, use a GET request. The values here should come from the `location` key of the result of a POST request.\n\tif ( isset( $_GET['latitude'], $_GET['longitude'] ) ) {\n\t\t$location_args['latitude'] = $_GET['latitude'];\n\t\t$location_args['longitude'] = $_GET['longitude'];\n\t}\n\n\tif ( isset( $_GET['country'] ) ) {\n\t\t$location_args['country'] = $_GET['country'];\n\t\t$location_args['restrict_by_country'] = true;\n\t}\n\n\t// If a precise location is not known, create a POST request with a bunch of data which can be used to determine a precise location for future GET requests.\n\tif ( isset( $_POST['location_data'] ) ) {\n\t\t$location_args = $_POST['location_data'];\n\t}\n\n\t// Simplified parameters for lookup by location (city) name, with optional timezone and locale params for extra context.\n\tif ( isset( $_REQUEST['location'] ) ) {\n\t\t$location_args['location_name'] = trim( $_REQUEST['location'] );\n\t}\n\n\tif ( isset( $_REQUEST['timezone'] ) ) {\n\t\t$location_args['timezone'] = $_REQUEST['timezone'];\n\t}\n\n\tif ( isset( $_REQUEST['locale'] ) ) {\n\t\t$location_args['locale'] = $_REQUEST['locale'];\n\t}\n\n\tif ( isset( $_REQUEST['ip'] ) ) {\n\t\t/*\n\t\t * In local development environments, the IP sent by the Events widget will typically be\n\t\t * private. In those cases, we can use the web server's IP address, which should be the same\n\t\t * as the dev's browser IP.\n\t\t */\n\t\t$public_ip = filter_var(\n\t\t\t$_REQUEST['ip'],\n\t\t\tFILTER_VALIDATE_IP,\n\t\t\tFILTER_FLAG_IPV4 | FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE\n\t\t);\n\n\t\t$location_args['ip'] = $public_ip ? $public_ip : $_SERVER['REMOTE_ADDR'];\n\t}\n\n\treturn $location_args;\n}",
"function switchglobalsearch() {\r\n global $user;\r\n $user = user_load($user->uid);\r\n\r\n $field = GojiraSettings::CONTENT_TYPE_SEARCH_GLOBAL_FIELD;\r\n $fieldValue = $user->$field;\r\n\r\n if ($_GET['turn'] == 'on') {\r\n $fieldValue[LANGUAGE_NONE][0]['value'] = 1;\r\n $zoom = GojiraSettings::MAP_ZOOMLEVEL_COUNTRY;\r\n } else {\r\n $fieldValue[LANGUAGE_NONE][0]['value'] = 0;\r\n $zoom = GojiraSettings::MAP_ZOOMLEVEL_REGION;\r\n }\r\n\r\n $user->$field = $fieldValue;\r\n\r\n user_save($user);\r\n \r\n if ($_GET['turn'] == 'on') {\r\n $latitude = variable_get('CENTER_COUNTRY_LATITUDE');\r\n $longitude = variable_get('CENTER_COUNTRY_LONGITUDE');\r\n }else{\r\n $location = Location::getCurrentLocationObjectOfUser(); \r\n $latitude = $location->latitude;\r\n $longitude = $location->longitude;\r\n }\r\n \r\n echo json_encode(array('longitude'=>$longitude,'latitude'=>$latitude,'zoom'=> $zoom));\r\n exit;\r\n}",
"private function get_location () {\n try {\n // MaxMind GeoIP lookup\n // See: http://maxmind.github.io/GeoIP2-php/\n $reader = new Reader('assets/GeoLite2-City.mmdb');\n $record = $reader->city($_SERVER['REMOTE_ADDR']);\n return [\n 'lat' => $record->location->latitude,\n 'lng' => $record->location->longitude\n ];\n } catch (Exception $e) {\n return false;\n }\n }",
"public function ajaxpingAction()\r\n\t{\r\n\t\t$sid = $this->request->getParam(\"session\");\r\n\t\t$arr['live'] = $this->engine->ping($sid);\r\n $this->request->setParam(\"format\", \"json\");\r\n $this->request->setParam(\"render\", \"false\");\r\n $response = $this->getResponse(); \r\n $response->setContent(json_encode($arr)); \r\n // returned to View\\Listener\r\n return $response;\r\n\t}",
"function check_geolocation($nameofgeo){\n\t$url = \"https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=\".str_replace(\" \",\"%\",$nameofgeo).\"&inputtype=textquery&fields=photos,formatted_address,name&locationbias=circle:[email protected],-122.2226413&key=AIzaSyDQfsEll4lB-xdxkLXGZA7_a2rMCyVM4Ok\";\n\t$json = file_get_contents($url);\n\t$json_data = json_decode($json, true);\n\tif ($json_data[\"status\"]==\"ZERO_RESULTS\")\n\t\treturn(\"Numele introdus nu este o geolocatie!\");\n\telse{\n\t\t#print_r($json_data['candidates'][0]['name']);\n\t\t#echo \" este nume pentru-> \"; \n\t\t#echo \"<br><br>\";\n\t\treturn($json_data[\"status\"]);\n\t}\n}",
"public function actionAjaxGetGeoInfo($id)\n {\n /** Do not load JqueryAsset in info view */\n Yii::$app->assetManager->bundles['yii\\web\\JqueryAsset'] = false;\n\n return $this->renderAjax('_info', [\n 'data' => Geolocation::find()->where(['id' => $id])->one()\n ]);\n }",
"public function getPostalCodeFromCoords() {\r\n\t\t$this->autoRender = false;\r\n\r\n\t\t$this->layout = 'ajax';\r\n\r\n\t\t$this->response->type('json');\r\n\r\n\t\t$response = $this->StreetAddress->getPostalCodeFromCoords(\r\n\t\t\t$this->request->data('latitude'),\r\n\t\t\t$this->request->data('longitude')\r\n\t\t);\r\n\r\n\t\tif ($response) {\r\n\t\t\t$this->response->body(json_encode($response));\r\n\t\t} else {\r\n\t\t\t$this->response->body(false);\r\n\t\t}\r\n\r\n\r\n\t}",
"function get_ip_address()\n{\n $ip = $_SERVER['REMOTE_ADDR'];\n return $_SERVER['REMOTE_ADDR'];\n //return var_export(unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $ip)));\n}",
"function ww_ajax_get_current_weather() {\n $current_weather = owm_get_current_weather($_POST['city'], $_POST['country']);\n // Send the data our PHP code gets from OWM API\n wp_send_json($current_weather);\n}",
"public function updatelocationAction()\n {\n $userInfo = new UserInfo($_POST);\n if ($userInfo->hasIPUpdated())\n {\n $userInfo->saveIP();\n $userInfo->findLocationFromIP();\n $userInfo->saveLocation();\n }\n }",
"function getLocation(){ return $this->_Location;}",
"function google_map_get_coordinates( $address, $force_refresh = false ) {\n\t$address_hash = md5( $address );\n\t$coordinates = get_transient( $address_hash );\n\tif ($force_refresh || $coordinates === false) {\n\t\t$args = array( 'address' => urlencode( $address ), 'sensor' => 'false', 'key' => 'AIzaSyA4-ZxE3QqrSWpnwsjSke4Bs5DDN1LeFB0' );\n\t\t$url = add_query_arg( $args, 'https://maps.googleapis.com/maps/api/geocode/json' );\n\t\t// var_dump($url);\n\t\t$response \t= wp_remote_get( $url );\n\t\tif( is_wp_error( $response ) )\n\t\t\treturn;\n\t\t$data = wp_remote_retrieve_body( $response );\n\t\tif( is_wp_error( $data ) )\n\t\t\treturn;\n\t\tif ( $response['response']['code'] == 200 ) {\n\t\t\t// var_dump($data);\n\t\t\t$data = json_decode( $data );\n\t\t\tif ( $data->status === 'OK' ) {\n\t\t\t\t$coordinates = $data->results[0]->geometry->location;\n\t\t\t\t$cache_value['lat'] \t= $coordinates->lat;\n\t\t\t\t$cache_value['lng'] \t= $coordinates->lng;\n\t\t\t\t$cache_value['address'] = (string) $data->results[0]->formatted_address;\n\t\t\t\t// // cache coordinates for 3 months\n\t\t\t\t// set_transient($address_hash, $cache_value, 3600*24*30*3);\n\t\t\t\t// $data = $cache_value;\n\t\t\t\t// var_dump($data->status);\n\t\t\t} elseif ( $data->status === 'ZERO_RESULTS' ) {\n\t\t\t\treturn __( 'No location for the address.', 'aletheme' );\n\t\t\t} elseif( $data->status === 'INVALID_REQUEST' ) {\n\t\t\t\treturn __( 'Bad request. Did you enter an address name?', 'aletheme' );\n\t\t\t} else {\n\t\t\t\treturn ($data->status);\n\t\t\t\t// return __( 'Error, please check if you have entered the shortcode correctly.', 'aletheme' );\n\t\t\t}\n\t\t} else {\n\t\t\treturn __( 'Can\\'t connect Google API.', 'aletheme' );\n\t\t}\n\t} else {\n\t\t// return cached results\n\t\t$data = $coordinates;\n\t}\n\t// return (array) $data;\n\t$coords = array();\n\t// var_dump($data);\n\t// print(\"<pre>\".print_r($data,true).\"</pre>\");\n\t// var_dump($data->results[0]->geometry->location->lat);\n\t$coords['lat'] = $data->results[0]->geometry->location->lat;\n\t$coords['lng'] = $data->results[0]->geometry->location->lng;\n\t// var_dump($data->results[0]->geometry->location->lng);\n\treturn $coords;\n}",
"public function run()\n {\n $cs = Yii::app()->getClientScript();\n\n $predefinedLatitude = $this->defaultLatitude;\n $predefinedLongitude = $this->defaultLongitude;\n\n\n if ($this->defaultLatitude == 'null') {\n $predefinedLatitude = self::DEFAULT_LATITUDE;\n }\n\n if ($this->defaultLongitude == 'null') {\n $predefinedLongitude = self::DEFAULT_LONGITUDE;\n }\n\n /* $cs->registerCoreScript('jquery');*/\n //Assign server side value to script\n $cs->registerScript('prepareMapData', \"\n var defaultLatitude = $this->defaultLatitude;\n var defaultLongitude = $this->defaultLongitude;\n var predefinedLatitude = $predefinedLatitude;\n var predefinedLongitude = $predefinedLongitude;\n var zoomLevel = $this->zoomLevel;\n var latitudeInputId = '$this->latitudeInputId';\n var longitudeInputId = '$this->longitudeInputId';\n \", CClientScript::POS_BEGIN);\n\n //Register js and css\n $cs->registerScriptFile(\"https://maps.googleapis.com/maps/api/js?key=\" . $this->apiKey, CClientScript::POS_BEGIN);\n $cs->registerScriptFile($this->assetsDir . '/map.js', CClientScript::POS_END);\n $cs->registerCssFile($this->assetsDir . '/map.css');\n\n $this->render('map', ['displayMode' => $this->displayMode]);\n }",
"function geoRequest($url, $parameters){\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url . \"?\" . http_build_query($parameters));\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\t\t$result = curl_exec($ch);\n\t\treturn $result;\n\t}",
"function location_cmn($lat, $long, $usegeolocation, $customerno = null) {\n $address = NULL;\n $customerno = (!isset($customerno)) ? $_SESSION['customerno'] : $customerno;\n if (isset($lat) && isset($long)) {\n $GeoCoder_Obj = new GeoCoder($customerno);\n $address = $GeoCoder_Obj->get_location_bylatlong($lat, $long);\n }\n return $address;\n}",
"public function indexAction() : object\n {\n $title = \"IP Geo\";\n $page = $this->di->get(\"page\");\n\n // $ip = $_SERVER['HTTP_CLIENT_IP'];\n // $client_ip = $_SERVER['REMOTE_ADDR'] ?? \"127.0.0.1\";\n $client_ip = $this->di->get(\"request\")->getServer(\"REMOTE_ADDR\", \"127.0.0.1\");\n\n \n\n // $module = new IpModule();\n\n // $info = $module->getGeoInfo($ip);\n\n // $info = $_SERVER;\n\n // $ip = $this->di->session->get(\"ip\") ?? null;\n // $result = $this->di->session->get(\"result\") ?? null;\n // $hostname = $this->di->session->get(\"hostname\") ?? null;\n\n\n// http://api.ipstack.com/158.174.140.127?access_key=ceb8dbb476fc421d779317551864704e\n\n// echo 'User IP - '.$_SERVER['REMOTE_ADDR'];\n\n $data = [\n \"client_ip\" => $client_ip,\n // \"result\" => $result,\n // \"hostname\" => $hostname\n ];\n\n $page->add(\"ip/geo\", $data);\n // $page->add(\"ip/validate\");\n\n return $page->render([\n \"title\" => $title\n ]);\n }",
"function ajax_fetchProviderAPIs()\n{\n\n $cc = new CapabilityCheck('fetchProviderAPIs');\n if (!$cc->checkCapability()) {\n return;\n }\n\n check_ajax_referer('CPWP');\n\n $cpjm = new CPJobManager('fetchProviderAPIs', $_POST);\n $cpjm->RunJob();\n}",
"function location_autocomplete_init() {\n\telgg_extend_view('css/elgg', 'location_autocomplete/css');\n \n elgg_register_js('elgg.jquery_min', \"http://code.jquery.com/jquery-1.4.2.min.js\");\n \n elgg_register_js('elgg.google_map', \"http://maps.google.com/maps/api/js?sensor=false\");\n \n $custom_js = elgg_get_simplecache_url('js', 'location_autocomplete/jquery_custom');\n\telgg_register_js('elgg.jquery_custom', $custom_js); \n \n $suggests_js = elgg_get_simplecache_url('js', 'location_autocomplete/geo_suggests');\n\telgg_register_js('elgg.geo_suggests', $suggests_js); \n \n elgg_extend_view(\"forms/profile/edit\", \"location_autocomplete/load_js\");\n \n elgg_extend_view(\"forms/register\", \"location_autocomplete/load_js\"); \n\n\n}",
"public function ajax_updater() {\n\t\tif ( ! isset( $_POST['check'] ) || ! wp_verify_nonce( $_POST['check'], 'timezone-settings' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$updater = new Tribe__Events__Admin__Timezone_Updater;\n\t\t$updater->init_update();\n\n\t\twp_send_json( array(\n\t\t\t'html' => $updater->notice_inner(),\n\t\t\t'continue' => $updater->update_needed(),\n\t\t) );\n\t}",
"function get_gps($mcc, $mnc, $lac, $cellid) {\r\n $gps_data = \"\";\r\n $key = \"f0d88cf6-3a80-4f12-830d-f4b8fd1f06b0\";\r\n\r\n ///JSON CODE\r\n //$URL = \"http://opencellid.org/cell/get?key=\".$key.\"&mcc=\".$mcc.\"&mnc=\".$mnc.\"&lac=\".$lac.\"&cellid=\".$cellid.\"&format=json\"; \r\n $URL = \"http://opencellid.org/cell/get?key=$key&mcc=$mcc&mnc=$mnc&lac=$lac&cellid=$cellid&format=json\";\r\n\r\n $raw = @file_get_contents($URL);\r\n $json_data = json_decode($raw);\r\n\r\n //var_dump($json_data);\r\n echo \"<br>\";\r\n //$json = '{\"foo-bar\": 12345}';\r\n //$obj = json_decode($json);\r\n //echo \"lon=\". $json_data->{'lon'}; // 12345\r\n\r\n $gps_data = $json_data->{'lat'} . \",\" . $json_data->{'lon'};\r\n return $gps_data;\r\n}",
"public function index(Request $request)\n {\n //PRE: The request 'radius' input is optional, but if it is there\n // request MUST have the following\n // latitude = the latitude of the center\n // longitude = the longitude of the center\n // radius = the distance you are looking\n // unit (default = miles) = the unit you are looking for\n // m = miles, n = nautical miles, k = kilometers\n\n // the request may have the following \n // locationType (farm, market, etc)\n // name (filters for the name)\n // operatingTime (check if its open during this time; format is 00:00:00)\n\n // You may also specify, in the URL, GeoJSON = 0 to make it return just the object\n\n \n //POST: returns all geopoints, in a radius is specified, as a GeoJson\n //NOTE: This can take a long time, especially if you aren't using a center\n // Make sure to load this asynchronously to avoid significant lag\n // Also, try to use a radius at all times\n \n //Flags\n $radiusFlag = false;\n $typeFlag = false;\n $nameFlag = false;\n $timeFlag = false;\n if($request->input('radius') != null){\n $latitude = $request->input('latitude');\n $longitude = $request->input('longitude');\n $radius = $request->input('radius');\n $unit = $request->input('unit', 'm');\n $radiusFlag = true;\n }\n if($request->input('locationType') != null){\n $location_type = $request->input('locationType');\n $typeFlag = true;\n }\n if($request->input('name') != null){\n $name = $request->input('name');\n $nameFlag = true;\n }\n if($request->input('operatingTime')){\n $operatingTime = $request->input('operatingTime');\n $timeFlag = true;\n }\n\n //Fetching locations\n if($radiusFlag){\n $geolocations = Geolocation::GetLocationsInRadius(\n $radius, \n ['lat' => $latitude, 'long' => $longitude],\n $unit\n );\n if($typeFlag){\n foreach($geolocations as $geolocation){\n if($geolocation->location_type != $location_type){\n unset($geolocations[array_search($geolocation, $geolocations)]);\n }\n }\n }\n }\n else if($typeFlag){\n $geolocations = Geolocation::where('location_type', '=', $location_type)\n ->get();\n }\n else{\n $geolocations = Geolocation::all();\n } \n\n //Filtering options\n if($nameFlag){\n foreach($geolocations as $geolocation){\n $information = $geolocation->information();\n if(!isset($information['name'])){\n unset($geolocations[array_search($geolocation, $geolocations)]);\n }\n else if(strpos($information['name'], $name) === false){\n unset($geolocations[array_search($geolocation, $geolocations)]);\n }\n }\n }\n if($timeFlag){\n $timeArray = explode( \":\", $operatingTime);\n $operatingTime = 0;\n for($i = 0; $i < count($timeArray); $i++){\n $operatingTime += $timeArray[$i] * (pow(10, $i * -2));\n }\n foreach($geolocations as $geolocation){\n $information = $geolocation->information();\n if(!isset($information['openingTime']) && !isset($information['closingTime'])){\n unset($geolocations[array_search($geolocation, $geolocations)]);\n }\n else{\n $openingTime = explode(\":\", $information['openingTime']);\n $openingTime = $openingTime[0] + ($openingTime[1] * .01) + ($openingTime[2] * .0001);\n $closingTime = explode(\":\", $information['closingTime']);\n $closingTime = $closingTime[0] + ($closingTime[1] * .01) + ($closingTime[2] * .0001);\n $flag = true; //True if we want to get rid of it\n if($closingTime < $openingTime){\n if($operatingTime >= $openingTime || $operatingTime < $closingTime){\n $flag = false;\n }\n }\n else{\n if($operatingTime >= $openingTime && $operatingTime < $closingTime){\n $flag = false;\n }\n }\n if($flag){\n unset($geolocations[array_search($geolocation, $geolocations)]);\n }\n }\n }\n }\n\n //Formatting output\n if($request->input('GeoJSON', 1)){\n $features = array();\n foreach($geolocations as $geolocation){\n $features[] = [\n \"type\" => \"Feature\",\n \"geometry\" => [\"type\" => \"Point\", \"coordinates\" => [\n $geolocation->longitude, \n $geolocation->latitude\n ]\n ],\n \"properties\" => $geolocation->information()\n ];\n }\n return response()->json([\n \"type\" => \"FeatureCollection\",\n \"features\" => $features\n ]);\n }\n else{\n foreach($geolocations as &$geolocation){\n $geolocation->information();\n }\n return response()->json([\"geolocations\" => $geolocations]);\n }\n }",
"function ssc_location_js () {\n\t?>\n\t<script type=\"text/javascript\">\n jQuery(document).ready(function($){\n \tdata = { 'action': 'ssc_location_update_form' };\n \t//$('form.ssc_location_contact #submit').addClass('contact_submit').removeAttr('id').removeAttr('name');\n\n \t$('form.ssc_location_contact .location_submit').click( function( event ) {\n \t\tdata['form'] = 'form.ssc_location_contact';\n\n \t\tevent.preventDefault();\n \t\t//alert( data['form']);\n \t\t/*\n \t\tvar locationFields = new Array();\n \t\tlocationFields['street'] = $('.ssc_admin_location_settings_street').val();\n \t\tlocationFields['city'] = $('.ssc_admin_location_settings_city').val();\n \t\tlocationFields['state'] = $('.ssc_admin_location_settings_state').val();\n \t\tlocationFields['zip'] = $('.ssc_admin_location_settings_zip').val();\n \t\talert ( locationFields['street'] );\n \t\t/**/\n \t\tdata['street'] = $('.ssc_admin_contact_settings_street').val();\n \t\tdata['city'] = $('.ssc_admin_contact_settings_city').val();\n \t\tdata['state'] = $('.ssc_admin_contact_settings_state').val();\n \t\tdata['zip'] = $('.ssc_admin_contact_settings_zip').val();\n \t\t//alert( data['zip'] );\n \t\t$('#wpwrap').addClass('progress');\n \t\tgetLocation( data );\n \t});\n \tfunction formSubmit ( data ) {\n \t\tconsole.log( 'submit form' );\n \t\t$('form.ssc_location_contact').submit();\n \t\t/*\n \t\t$( data['form'] ).submit( function() {\n \t\t\tconsole.log('form submit');\n \t\t});\n/**/\n \t}\n \tfunction getLocation ( data ) {\n \t\t\n \t$.post( ajaxurl, data, function( response ) {\n if ( response ) {\n \t\n var obj = jQuery.parseJSON( response ); //response;\n console.log(obj.type);\n if ( obj.type == 'success' ) { \n \talert( obj.message );\n //updateOptions( data, obj );\n //$('form.ssc_location').submit(); //$(data['form']).submit();\n //return true;\n formSubmit( data );\n }\n else {\n //alert( 'There are no ' + data['data']['type'] + ' please add some.' );\n alert( 'The address ' + data['street'] + ' ' + data['city'] + ' ' + data['state'] + ', ' + data['zip'] + ' could not be found. Please check the address and be sure you entered it exactly as listed by the postal service. (HINT: Use Google Maps )' );\n $('#wpwrap').removeClass('progress');\n return false;\n }\n }\n else {\n \talert( );\n return false;\n }\n });\n }\n });\n </script>\n\t<?php\n}",
"function grabUserLocation($input){\n $user_city = $input;\n $request_url = \"http://maps.googleapis.com/maps/api/geocode/json?address=\".$user_city.\"%20Canada&sensor=false\";\n $USERJSON = file_get_contents($request_url);\n $result = json_decode($USERJSON);\n $lat=$result->results[0]->geometry->location->lat;\n $long=$result->results[0]->geometry->location->lng;\n return compact('lat','long');\n}",
"function request()\r\n {\r\n $searchstring = array();\r\n if ( $this->street )\r\n $searchstring[] = $this->street;\r\n if ( $this->zip and $this->city)\r\n $searchstring[] = $this->zip . ' ' . $this->city;\r\n elseif ( $this->zip )\r\n $searchstring[] = $this->zip;\r\n elseif ( $this->city )\r\n $searchstring[] = $this->city;\r\n if ( $this->state )\r\n $searchstring[] = $this->state;\r\n if ( $this->country )\r\n $searchstring[] = $this->country;\r\n\r\n $searchstring = implode( ', ', $searchstring );\r\n // ini values\r\n $gisini = eZINI::instance( \"gis.ini\" ); \r\n $key = $gisini->variable( \"Google\", \"ApplicationID\" );\r\n $url = $gisini->variable( \"Google\", \"Url\" );\r\n \r\n $requestUrl= $url.\"?q=\".urlencode($searchstring).\"&key=$key&output=xml\"; \r\n\r\n eZDebug::writeDebug( $requestUrl, 'Google GeoCoder Request');\r\n //request the google kml result\r\n $kml = file ( $requestUrl );\r\n\r\n if ( !empty($kml[0]) )\r\n {\r\n eZDebug::writeDebug( $kml[0], 'Google GeoCoder Response');\r\n $xmldomxml = new eZXML();\r\n $xmldom = $xmldomxml->domTree($kml[0]);\r\n\r\n //API Manual: http://www.google.com/apis/maps/documentation/reference.html#GGeoStatusCode\r\n $dom_statuscode = $xmldom->elementsByName( \"code\" );\r\n $dom_statuscode = $dom_statuscode[0]->textContent(); \r\n\r\n if ( $dom_statuscode==\"200\" ) \r\n {\r\n\r\n //API Manual: http://www.google.com/apis/maps/documentation/reference.html#GGeoAddressAccuracy\r\n $dom_adressdetails = $xmldom->elementsByName( \"AddressDetails\" ); \r\n $dom_accuracy = $dom_adressdetails[0]->get_attribute( \"Accuracy\" );\r\n if ( in_array( $dom_accuracy, array( 8,7,6,5 ) ) )\r\n {\r\n $this->accuracy = 'GeoCoder::ACCURACY_STREET';\r\n }\r\n elseif ( in_array( $dom_accuracy, array( 4 ) ) )\r\n {\r\n $this->accuracy = 'GeoCoder::ACCURACY_CITY';\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n if ($xmldom->elementsByName( \"ThoroughfareName\" ))\r\n {\r\n $dom_street= $xmldom->elementsByName( \"ThoroughfareName\" );\r\n $dom_street = $dom_street[0]->textContent(); \r\n }\r\n\r\n if ($xmldom->elementsByName( \"PostalCodeNumber\" ))\r\n {\r\n $dom_zip= $xmldom->elementsByName( \"PostalCodeNumber\" );\r\n $dom_zip = $dom_zip[0]->textContent(); \r\n }\r\n \r\n if ($xmldom->elementsByName( \"LocalityName\" ))\r\n {\r\n $dom_city = $xmldom->elementsByName( \"LocalityName\" );\r\n $dom_city = $dom_city[0]->textContent(); \r\n }\r\n\r\n if ($xmldom->elementsByName( \"AdministrativeAreaName\" ))\r\n {\r\n $dom_state = $xmldom->elementsByName( \"AdministrativeAreaName\" );\r\n $dom_state = $dom_state[0]->textContent(); \r\n }\r\n if ($xmldom->elementsByName( \"CountryNameCode\" ))\r\n {\r\n $dom_country = $xmldom->elementsByName( \"CountryNameCode\" );\r\n $dom_country = $dom_country[0]->textContent();\r\n }\r\n \r\n\r\n $dom_point = $xmldom->elementsByName( \"coordinates\" );\r\n $dom_point = $dom_point[0]->textContent();\r\n\r\n $dom_point = explode(\",\", $dom_point);\r\n $dom_long = $dom_point[0];\r\n $dom_lat = $dom_point[1];\r\n\r\n // Map values to object\r\n $this->accuracy = $dom_accuracy;\r\n $this->street = $dom_street;\r\n $this->zip = $dom_zip;\r\n $this->city = $dom_city;\r\n $this->state = $dom_state;\r\n $this->country = $dom_country;\r\n $this->longitude = $dom_long;\r\n $this->latitude = $dom_lat;\r\n $this->phi = deg2rad($dom_long);\r\n $this->theta = deg2rad($dom_lat); \r\n return true; \r\n }\r\n }\r\n else\r\n {\r\n return false;\r\n } \r\n }",
"function handleGeozone($link,$devid,$lat,$long) {\r\n // Find previous geozone events for devid\r\n $res = mysql_query(\"SELECT geozoneID,statusCode,address FROM EventData WHERE (deviceID='\".$devid.\"' AND (statusCode=61968 OR statusCode=62000) AND geozoneID IS NOT NULL) ORDER BY timestamp DESC LIMIT 1\",$link);\r\n\r\n // If there are events\r\n if(mysql_num_rows($res)>0) {\r\n list($geozoneID,$statusCode,$oldaddr) = mysql_fetch_row($res);\r\n\r\n // If the previous event is an arrival\r\n if($statusCode==61968) {\r\n $res = mysql_query(\"SELECT geozoneID,displayName FROM Geozone WHERE (minLatitude<=\".$lat.\" AND maxLatitude>=\".$lat.\" AND minLongitude<=\".$long.\" AND maxLongitude>=\".$long.\") LIMIT 1\",$link);\r\n if(mysql_num_rows($res)>0) {\r\n list($newgeozoneID,$geodesc) = mysql_fetch_row($res);\r\n if($newgeozoneID<>$geozoneID) { \r\n // Insert departure from previous and arrival in current\r\n $insert = \"INSERT INTO EventData (accountID,deviceID,geozoneID,statusCode,address,timestamp) VALUES (\";\r\n $insert .= \"'gtg','\".$devid.\"','\".$geozoneID.\"',62000,'\".$oldaddr.\"',\".time().\"),(\";\r\n $insert .= \"'gtg','\".$devid.\"','\".$newgeozoneID.\"',61968,'\".$geodesc.\"',\".(time()+10).\")\";\r\n $res = mysql_query($insert,$link);\r\n }\r\n } else {\r\n // Insert departure for current geozone\r\n\t $insert = \"INSERT INTO EventData (accountID,deviceID,geozoneID,statusCode,address,timestamp) VALUES ('gtg','\".$devid.\"','\".$geozoneID.\"',62000,'\".$oldaddr.\"',\".time().\")\";\r\n\t $res = mysql_query($insert,$link);\r\n }\r\n } else {\r\n // Last event was a departure so insert arrival information\r\n $res = mysql_query(\"SELECT geozoneID,displayName FROM Geozone WHERE (minLatitude<=\".$lat.\" AND maxLatitude>=\".$lat.\" AND minLongitude<=\".$long.\" AND maxLongitude>=\".$long.\") LIMIT 1\",$link);\r\n if(mysql_num_rows($res)>0) {\r\n list($newgeozoneID,$geodesc) = mysql_fetch_row($res);\r\n $insert = \"INSERT INTO EventData (accountID,deviceID,geozoneID,statusCode,address,timestamp) VALUES ('gtg','\".$devid.\"','\".$newgeozoneID.\"',61968,'\".$geodesc.\"',\".time().\")\";\r\n\t $res = mysql_query($insert,$link);\r\n }\r\n }\r\n } else {\r\n // First geozone event so insert arrival information\r\n $res = mysql_query(\"SELECT geozoneID,displayName FROM Geozone WHERE (minLatitude<=\".$lat.\" AND maxLatitude>=\".$lat.\" AND minLongitude<=\".$long.\" AND maxLongitude>=\".$long.\") LIMIT 1\",$link);\r\n if(mysql_num_rows($res)>0) {\r\n list($newgeozoneID,$geodesc) = mysql_fetch_row($res);\r\n $insert = \"INSERT INTO EventData (accountID,deviceID,geozoneID,statusCode,address,timestamp) VALUES ('gtg','\".$devid.\"','\".$newgeozoneID.\"',61968,'\".$geodesc.\"',\".time().\")\";\r\n\t $res = mysql_query($insert,$link);\r\n }\r\n };\r\n \r\n if(isset($geodesc)) { return($geodesc); } else { return(\"\"); };\r\n}",
"function cc_update_geocodes(){\n\t\n\t$path = ABSPATH . \"import/\";\n\t$file = FILE_XML_IMMOBILI; // nome del file\n\t$cometa = cc_get_unique_post_meta_values(\"_id_cometa\");\n\n\t$xml = @simplexml_load_file($path.$file);\t\n\n\tif($xml){\t\t\n\t\t\n\t\t$offerte = $xml->Offerte;\n\n\t\tif($offerte){\n\t\t\t\n\t\t\tforeach($offerte as $offerta){\n\t\t\t\t\n\t\t\t\t$idunique = (int) $offerta->Idimmobile; // campo univoco Cometa\n\t\t\t\t$post_id = array_search($idunique, $cometa);\n\t\t\t\t\n\t\t\t\tif(empty($post_id)) continue;\n\t\t\t\t\n\t\t\t\t$latitudine = (string) $offerta->Latitudine;\n\t\t\t\t$longitudine = (string) $offerta->Longitudine;\n\n\t\t\t\tif(!empty($latitudine)) $latitudine = str_replace(\",\", \".\", $latitudine);;\n\t\t\t\tif(!empty($longitudine)) $longitudine = str_replace(\",\", \".\", $longitudine);;\n\n\t\t\t\tif(!empty($latitudine) and !empty($longitudine)){\n\t\t\t\t\t$map_coords = $latitudine .\", \". $longitudine;\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$map_coords = \"\";\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($map_coords)){\n\t\t\t\t\t\n\t\t\t\t\tupdate_post_meta( $post_id, \"fave_property_location\", $map_coords );\n\t\t\t\t\tupdate_post_meta( $post_id, \"houzez_geolocation_lat\", $latitudine );\n\t\t\t\t\tupdate_post_meta( $post_id, \"houzez_geolocation_lon\", $longitudine );\n\t\t\t\t\t\n\t\t\t\t\t$results[] = $post_id.\" => \".$idunique.\" - geocodes \".$map_coords;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$dbg = var_export($results, true);\n\t\n\t\t\tcc_import_immobili_error_log($dbg);\n\n\t\t\t\n\t\t}else{\n\t\t\tcc_import_immobili_error_log(\"no offerte!\");\n\t\t}\n\t\t\n\t}else{\n\t\tcc_import_immobili_error_log(\"no xml!\");\n\t}\n\t\n}",
"function geocode($address)\n{\n $address = urlencode($address);\n\n // google map geocode api url\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?address={$address}&key=AIzaSyAkFXEAzdyEZaQe0ZSSVtaP5yeS4vW1ygE\";\n\n // get the json response\n $resp_json = file_get_contents($url);\n\n // decode the json\n $resp = json_decode($resp_json, true);\n\n // response status will be 'OK', if able to geocode given address \n if ($resp['status'] == 'OK') {\n\n // get the important data\n $lati = isset($resp['results'][0]['geometry']['location']['lat']) ? $resp['results'][0]['geometry']['location']['lat'] : \"\";\n $longi = isset($resp['results'][0]['geometry']['location']['lng']) ? $resp['results'][0]['geometry']['location']['lng'] : \"\";\n $formatted_address = isset($resp['results'][0]['formatted_address']) ? $resp['results'][0]['formatted_address'] : \"\";\n\n // verify if data is complete\n if ($lati && $longi && $formatted_address) {\n\n // put the data in the array\n $data_arr = array();\n\n array_push(\n $data_arr,\n $lati,\n $longi\n );\n\n return $data_arr;\n } else {\n return false;\n }\n } else {\n echo \"<strong>ERROR: {$resp['status']}</strong>\";\n return false;\n }\n}",
"function showlocation() {\r\n drupal_add_js(array('gojira' => array('page' => 'showlocation')), 'setting');\r\n drupal_add_js(array('gojira' => array('loc' => $_GET['loc'])), 'setting');\r\n return theme('showlocation');\r\n}",
"private function getLocation(){\n \n $location = [];\n $node = $this->getNode();\n $locationreference = $node->field_location_reference->entity;\n \n if($locationreference){\n $location = $locationreference->field_location->view(array('type' => 'LocationAddressFormatter', 'label' => 'hidden'));\n $location[0]['#prefix'] = '<i class=\"icon icon-home icon-smaller\"></i>';\n }\n \n return $location;\n \t\n }",
"function ajax_rebuildNow()\n{\n\n $cc = new CapabilityCheck('rebuildNow', $_POST);\n if (!$cc->checkCapability()) {\n return;\n }\n\n check_ajax_referer('CPWP');\n\n $cpjm = new CPJobManager('rebuildNow', $_POST);\n $cpjm->RunJob();\n\n}",
"function geocode($address){\n \n // url encode the address\n $address = urlencode($address);\n \n // google map geocode api url\n $url = \"http://maps.google.com/maps/api/geocode/json?address={$address}\";\n \n // get the json response\n $resp_json = file_get_contents($url);\n \n // decode the json\n $resp = json_decode($resp_json, true);\n ;\n // response status will be 'OK', if able to geocode given address \n if($resp['status']=='OK'){\n \n // get the important data\n $lati = $resp['results'][0]['geometry']['location']['lat'];\n $longi = $resp['results'][0]['geometry']['location']['lng'];\n $formatted_address = $resp['results'][0]['formatted_address'];\n \n // verify if data is complete\n if($lati && $longi && $formatted_address){\n \n // put the data in the array\n $data_arr = array(); \n \n array_push(\n $data_arr, \n $lati, \n $longi, \n $formatted_address\n );\n \n return $data_arr;\n \n }else{\n return false;\n }\n \n }else{\n return false;\n }\n}",
"function apsa_ajax_get_elements_stat() {\n\n $from = $_POST[\"from\"];\n if (empty($from)) {\n $from = FALSE;\n }\n\n $to = $_POST[\"to\"];\n if (empty($to)) {\n $to = FALSE;\n }\n\n $camp_id = $_POST[\"camp_id\"];\n\n $statistics = apsa_get_elements_statistics($camp_id, $from, $to);\n\n echo json_encode($statistics);\n\n wp_die();\n}",
"public function getGeolocation()\n {\n return $this->geolocation;\n }",
"public function index()\n {\n //get user ip address\n $ip_address = $_SERVER['REMOTE_ADDR'];\n //get user ip address details with geoplugin.net\n $geopluginURL = 'http://www.geoplugin.net/php.gp?id='.$ip_address;\n $addrDetailsArr = unserialize(file_get_contents($geopluginURL)); \n //dd($addrDetailsArr['geoplugin_countryName']);\n $geoAlbums = Http::get('http://ws.audioscrobbler.com/2.0/?method=geo.gettoptracks&country='.$addrDetailsArr['geoplugin_countryName'].'&api_key=915e43bd2c345fdb1aa3e2c00aca0c03&format=json')\n ->json()['tracks']['track'];\n //dump($geoAlbums);\n\n return view('geolocation', [\n 'addrDetailsArr' => $addrDetailsArr,\n 'geoAlbums' => collect($geoAlbums)->take(8),\n ]);\n }",
"function get_user_analytics_info() {\n global $wp_version;\n\n $url = 'http://freegeoip.net/json/' . $_SERVER['REMOTE_ADDR'];\n $params = array(\n 'timeout' => 30,\n 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' )\n );\n\n $response = wp_remote_get( $url, $params );\n $user_data = wp_remote_retrieve_body( $response );\n\n if ( is_wp_error( $response ) || $response['response']['code'] != 200 ) {\n return false;\n }\n\n $user_info = (array) json_decode( $user_data );\n $user_analytics_info = array_merge( $user_info, array( 'browser_pc' => $_SERVER['HTTP_USER_AGENT'] ) );\n\n return $user_analytics_info;\n }",
"private function getLocation() {\n $ch = curl_init();\n $timeout = 5;\n curl_setopt($ch, CURLOPT_URL, 'http://widgets.wia.io/embed/wgt_ca2Yvooa/dev_faldy1tg');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n $data = curl_exec($ch);\n curl_close($ch);\n $arr = array('See our Terms and Conditions!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error(\"Segment snippet included twice.\");else{analytics.invoked=!0;analytics.methods=[\"trackSubmit\",\"trackClick\",\"trackLink\",\"trackForm\",\"pageview\",\"identify\",\"reset\",\"group\",\"track\",\"ready\",\"alias\",\"debug\",\"page\",\"once\",\"off\",\"on\"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t',\n 'DeviceTrackerUpdated','Widget'\n );\n $data = strip_tags($data);\n $data = str_replace($arr, '', $data);\n\n $arr2 = array('~var wia = \\'.*\\';~','~var wiaDevice = \\'.*\\';~','~var wiaWidget = \\'.*\\';~','~var wiaEvents = \\'.*\\';~','~var wiaEvent = \\'.*\\';~','~.* .* ago~');\n $data = preg_replace($arr2, '', $data);\n $data = str_replace(array('var wiaLocation = ',';','\\''),'',$data);\n echo trim($data);\n }",
"function get_location( $args = array() ) {\n\t$throttle_geonames = $throttle_ip2location = $location = false;\n\n\t// For a country request, no lat/long are returned.\n\tif ( isset( $args['country'] ) ) {\n\t\t$location = array(\n\t\t\t'country' => $args['country'],\n\t\t);\n\t}\n\n\t// Coordinates provided\n\tif (\n\t\t! $location && (\n\t\t\t! empty( $args['latitude'] ) && is_numeric( $args['latitude'] ) &&\n\t\t\t! empty( $args['longitude'] ) && is_numeric( $args['longitude'] )\n\t\t)\n\t) {\n\t\t$location = array(\n\t\t\t'description' => false,\n\t\t\t'latitude' => $args['latitude'],\n\t\t\t'longitude' => $args['longitude'],\n\t\t);\n\t}\n\n\t// City was provided by the user:\n\tif ( ! $location && isset( $args['location_name'] ) ) {\n\t\t$throttle_geonames = mt_rand( 1, 100 ) <= THROTTLE_GEONAMES;\n\n\t\tif ( $throttle_geonames ) {\n\t\t\treturn 'temp-request-throttled';\n\t\t}\n\n\t\t$country_code = get_country_code_from_locale( $args['locale'] ?? '' );\n\t\t$guess = guess_location_from_city( $args['location_name'], $args['timezone'] ?? '', $country_code );\n\n\t\t$country_types = array(\n\t\t\t// See http://download.geonames.org/export/dump/featureCodes_en.txt\n\n\t\t\t'A.PCL', // political entity\n\t\t\t'A.PCLD', // dependent political entity\n\t\t\t'A.PCLF', // freely associated state\n\t\t\t'A.PCLH', // historical political entity\ta former political entity\n\t\t\t'A.PCLI', // independent political entity\n\t\t\t'A.PCLIX', // section of independent political entity\n\t\t\t'A.PCLS', // semi-independent political entity\n\t\t\t'A.PRSH', // parish an ecclesiastical district\n\t\t\t'A.TERR', // territory\n\t\t\t'A.ZN', // zone\n\t\t);\n\n\t\tif ( $guess && in_array( $guess->type, $country_types, true ) ) {\n\t\t\t$location = array(\n\t\t\t\t'country' => $guess->country,\n\t\t\t\t'description' => $guess->name,\n\t\t\t);\n\t\t} elseif ( $guess ) {\n\t\t\t$location = array(\n\t\t\t\t'description' => $guess->name,\n\t\t\t\t'latitude' => $guess->latitude,\n\t\t\t\t'longitude' => $guess->longitude,\n\t\t\t\t'country' => $guess->country,\n\t\t\t);\n\t\t} else {\n\t\t\t$guess = guess_location_from_country( $args['location_name'] );\n\n\t\t\tif ( $guess ) {\n\t\t\t\t$location = array(\n\t\t\t\t\t'country' => $guess['country_short'],\n\t\t\t\t\t'description' => $guess['country_long'],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( ! $location ) {\n\t\tif ( isset( $args['location_name'] ) || isset( $args['ip'] ) || ! empty( $args['latitude'] ) || ! empty( $args['longitude'] ) ) {\n\t\t\t// If any of these are specified, and no localitity was guessed based on the above checks, bail with no location.\n\t\t\t$location = false;\n\t\t} else {\n\t\t\t// No specific location details.\n\t\t\t$location = array();\n\t\t}\n\t}\n\n\t// IP:\n\tif ( ! $location && isset( $args['ip'] ) && ! isset( $args['location_name'] ) ) {\n\t\t$throttle_ip2location = mt_rand( 1, 100 ) <= THROTTLE_IP2LOCATION;\n\n\t\tif ( $throttle_ip2location ) {\n\t\t\treturn 'temp-request-throttled';\n\t\t}\n\n\t\t$guess = guess_location_from_ip( $args['ip'] );\n\n\t\tif ( $guess ) {\n\t\t\t$location = array(\n\t\t\t\t'description' => $guess->ip_city,\n\t\t\t\t'latitude' => $guess->ip_latitude,\n\t\t\t\t'longitude' => $guess->ip_longitude,\n\t\t\t\t'country' => $guess->country_short,\n\n\t\t\t\t/*\n\t\t\t\t * ip2location's EULA forbids exposing the derived location publicly, so flag the\n\t\t\t\t * data for internal use only.\n\t\t\t\t */\n\t\t\t\t'internal' => true,\n\t\t\t);\n\t\t}\n\t}\n\n\treturn $location;\n}",
"public function getLocationList($return_active_only = TRUE);",
"public function GeoLocate($addr){\n $geoapi = \"http://maps.googleapis.com/maps/api/geocode/json\";\n $params = array(\"address\"=>$addr,\"sensor\"=>\"false\");\n $response = $this->GET($geoapi,$params);\n $json = json_decode($response);\n if ($json->status === \"ZERO_RESULTS\") {\n return NULL;\n } else {\n return array($json->results[0]->geometry->location->lat,$json->results[0]->geometry->location->lng);\n }\n }",
"function wp_ajax_heartbeat()\n {\n }",
"public function collectGeographyData()\n {\n try {\n $this->geography_data = [\n 'lat' => $this->response->geometry->location->lat,\n 'long' => $this->response->geometry->location->lng,\n ];\n } catch (\\Exception $e) {\n $this->geography_data = null;\n }\n\n return $this;\n }",
"function get_map_coordinates($address, $force_refresh = false) {\n\n $address_hash = md5( $address );\n\n $coordinates = get_transient( $address_hash );\n\n if ($force_refresh || $coordinates === false) {\n\n \t$args = array( 'address' => urlencode( $address ), 'sensor' => 'false' );\n \t$url = add_query_arg( $args, 'http://maps.googleapis.com/maps/api/geocode/json' );\n \t$response \t= wp_remote_get( $url );\n\n \tif( is_wp_error( $response ) )\n \t\treturn;\n\n \t$pmc_data = wp_remote_retrieve_body( $response );\n\n \tif( is_wp_error( $pmc_data ) )\n \t\treturn;\n\n\t\tif ( $response['response']['code'] == 200 ) {\n\n\t\t\t$pmc_data = json_decode( $pmc_data );\n\n\t\t\tif ( $pmc_data->status === 'OK' ) {\n\n\t\t\t \t$coordinates = $pmc_data->results[0]->geometry->location;\n\n\t\t\t \t$cache_value['lat'] \t= $coordinates->lat;\n\t\t\t \t$cache_value['lng'] \t= $coordinates->lng;\n\t\t\t \t$cache_value['address'] = (string) $pmc_data->results[0]->formatted_address;\n\n\t\t\t \t// cache coordinates for 3 months\n\t\t\t \tset_transient($address_hash, $cache_value, 3600*24*30*3);\n\t\t\t \t$pmc_data = $cache_value;\n\n\t\t\t} elseif ( $pmc_data->status === 'ZERO_RESULTS' ) {\n\t\t\t \treturn __( 'No location found for the entered address.', 'pw-maps' );\n\t\t\t} elseif( $pmc_data->status === 'INVALID_REQUEST' ) {\n\t\t\t \treturn __( 'Invalid request. Did you enter an address?', 'pw-maps' );\n\t\t\t} else {\n\t\t\t\treturn __( 'Something went wrong while retrieving your map, please ensure you have entered the short code correctly.', 'pw-maps' );\n\t\t\t}\n\n\t\t} else {\n\t\t \treturn __( 'Unable to contact Google API service.', 'pw-maps' );\n\t\t}\n\n } else {\n // return cached results\n $pmc_data = $coordinates;\n }\n\n return $pmc_data;\n}",
"public function geolocalizacion(Request $request, Response $response, $args)\n {\n \n try {\n \n $ruc=\"20131380951\";\n $token=\"8c076ab2d795c792c8dd3749ebe29df1\";\n $fecha=\"20190227\";\n $path1 = $ruc.$token.$fecha;\n $clave=md5($path1);\n \n $url=\"http://190.102.145.252:8001/api/\";\n \n //$url=\"https://digital.miraflores.gob.pe:8443/miraflores/getDocTramiteByWeb.muni\";\n /*recibo los parametros del login*/ \n $dato = array(\n \"token\" => $clave,\n \"format\" => \"json\"\n );\n \n\n $datosM= Acl::curlGET($url,$dato);\n \n //var_dump($datosM);\n //exit;\n \n\n\n\n // $popup = ContenidoControlador::getContenidoPopups();\n // var_dump($popup);\n // exit;\n \n $nroRes=Constante::NOTIC_NRO_RESULTADOS_DEFAULT;\n // $datin[\"contenidos\"] = ContenidoControlador::getListadoNoticiasPortada($nroRes);\n $datin[\"contenidos\"] = GestContenido::getListadoNoticiasPortada($nroRes);\n $datin[\"popups\"] = ContenidoControlador::getContenidoPopups();\n $datin[\"novedades\"] = ContenidoControlador::getNovedadesMiraflores();\n $datin[\"pathmunlima\"]=Constante::PATHMUNLIMA;\n \n $mensaje =\"se elimino correctamente el usuario y la persona\";\n $estado = true;\n \n \n } catch (\\ErrorException $e) {\n $mensaje=\"Algo no salio muy bien\";\n $estado=false;\n }\n \n $datin[\"mensaje\"]= $mensaje;\n $datin[\"success\"] = $estado;\n // $datin[\"parametros\"] = ['title'=>\"Bienvenido :: Overseas Perú\", 'titulo' => \"BIENVENIDO A LOS SERVICIOS DE ATENCIÓN VIRTUAL\" ];\n //$obj1 = JsonRenderer::render($response,200,$datin);\n //var_dump($datin);\n //exit;\n $this->view->render($response, \"weblima/plantilla-map.twig\", $datin);\n return $response;\n \n }",
"public function enqueue_locationpicker() {\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 Points_Of_Sale_Admin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Points_Of_Sale_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}",
"public function getUserLocation();",
"private function getLatLng() {\n\t\tif( $this->getAutomaticLocation() && ( $this->isChanged() || ( !$this->getLat() && !$this->getLng() ) ) ) {\n\t\t\t$addressStr = $this->getAddLine1() . ' ' . $this->getStreetName() . ',' . $this->getTown();\n\t\t\t$addressStr.= ( $this->getCity() ) ? ',' . $this->getCity() : '';\n\t\t\t$addressStr.= ( $this->getRegion() ) ? ',' . $this->getRegion() : '';\n\t\t\t$addressStr.= ',' . $this->getPostalCode() . ',' . $this->getCountryCode();\n\t\t\t$req = sprintf( 'http://maps.googleapis.com/maps/api/geocode/json?address=%s&sensor=false', urlencode( $addressStr ) );\n\t\t\tif( !( $response = @file_get_contents( $req ) ) ) {\n\t\t\t\tthrow new Exception( sprintf( 'Unable to contact (%s)', $req ) );\n\t\t\t}\n\t\t\t$geoCode = json_decode( $response );\n// Do a switch here based on the possible status messages returned\n\t\t\tif( is_object( $geoCode ) ) {\n\t\t\t\tswitch( $geoCode->status ) {\n\t\t\t\t\tcase static::API_RESPONSE_ZERO_RESULTS:\n\t\t\t\t\t\t// ZERO RESULTS\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase static::API_RESPONSE_OK:\n\t\t\t\t\t\t$o = new StdClass();\n\t\t\t\t\t\t$o->Lat = $geoCode->results[0]->geometry->location->lat;\n\t\t\t\t\t\t$o->Lng = $geoCode->results[0]->geometry->location->lng;\n\t\t\t\t\t\treturn $o;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Exception( sprintf( 'Invalid response (%s) from (%s)', $response, $req ) );\n\t\t\t}\n\t\t} else {\n\t\t\t$o = new StdClass();\n\t\t\t$o->Lat = $this->getLat();\n\t\t\t$o->Lng = $this->getLng();\n\t\t\treturn $o;\n\t\t}\n\t}",
"function _param_geowidget_maybeyourcity_form_loadcity_callback() {\n $city = &drupal_static(__FUNCTION__);\n if (!isset($city)) {\n if ($cache = cache_get('geowidget')) {\n $city = $cache->data;\n } else {\n $city = db_select('geowidget_city', 'c')\n ->fields('c', array('id', 'parent_id', 'title', 'geoname_id'))\n ->execute()\n ->fetchAll();\n\n cache_clear_all('geowidget', 'cache', TRUE);\n cache_set('geowidget', $city, 'cache', time() + 360);\n }\n }\n return $city;\n}",
"function getGeoIDGeoNameGeofence($common_id1,$DbConnection)\n{\n $query=\"select * from geofence USE INDEX(geo_uaid_status) WHERE user_account_id='$common_id1' and status='1'\";\t\t\n $result=mysql_query($query,$DbConnection); \t\t\t\t\t\t\t\n while($row=mysql_fetch_object($result))\n {\n /*$geo_id=$row->geo_id; \n $geo_name=$row->geo_name;*/\t\t\t\n $data[]=array('geo_id'=>$row->geo_id,'geo_name'=>$row->geo_name);\t\n }\n return $data;\n}",
"function geocode($address)\n{\n\n // url encode the address\n $address = urlencode($address);\n\n // google map geocode api url\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?key=AIzaSyDZwgb_z_wFGqrzvxbrLri_CXJRjklDoTM&address={$address}\";\n\n // get the json response\n $resp_json = file_get_contents($url);\n\n // decode the json\n $resp = json_decode($resp_json, true);\n // response status will be 'OK', if able to geocode given address\n if ($resp['status'] == 'OK') {\n\n // get the important data\n $lati = $resp['results'][0]['geometry']['location']['lat'];\n $longi = $resp['results'][0]['geometry']['location']['lng'];\n\n // verify if data is complete\n if ($lati && $longi) {\n // put the data in the array\n $data_arr = array();\n\n array_push(\n $data_arr,\n $lati,\n $longi\n );\n\n return $data_arr;\n\n } else {\n return false;\n }\n\n } else {\n return false;\n }\n}",
"function ajax_jobStatus()\n{\n\n $cc = new CapabilityCheck('jobStatus');\n if (!$cc->checkCapability()) {\n return;\n }\n\n check_ajax_referer('CPWP');\n\n $cpjm = new CPJobManager('jobStatus', $_POST);\n $cpjm->RunJob();\n}",
"function geocode($street_address,$city,$state){\n \n $street_address = str_replace(\" \", \"+\", $street_address); //google doesn't like spaces in urls, but who does?\n $city = str_replace(\" \", \"+\", $city);\n $state = str_replace(\" \", \"+\", $state);\n\n $url = \"http://maps.googleapis.com/maps/api/geocode/json?address=$street_address,+$city,+$state&sensor=false\"; \n $google_api_response = wp_remote_get( $url ); \n\n $results = json_decode( $google_api_response['body'] ); //grab our results from Google\n $results = (array) $results; //cast them to an array\n $status = $results[\"status\"]; //easily use our status\n $location_all_fields = (array) $results[\"results\"][0];\n $location_geometry = (array) $location_all_fields[\"geometry\"];\n $location_lat_long = (array) $location_geometry[\"location\"];\n\n // echo \"<!-- GEOCODE RESPONSE \" ;\n // var_dump( $location_lat_long );\n // echo \" -->\";\n\n if( $status == 'OK'){\n $latitude = $location_lat_long[\"lat\"];\n $longitude = $location_lat_long[\"lng\"];\n }else{\n $latitude = '';\n $longitude = '';\n }\n\n $return = array(\n 'latitude' => $latitude,\n 'longitude' => $longitude\n );\n return $return;\n}",
"public function getLocation_get(){\n $user_id = $this->input->get('user_id');\n\n $data = $this->User_model->select_data('latitude,longitude','tbl_users',array('id'=>$user_id));\n\n if(empty($data))\n\n {\n $result = array(\n \"controller\" => \"User\",\n \"action\" => \"getLocation\",\n \"ResponseCode\" => false,\n \"MessageWhatHappen\" => \"Not Found\"\n\n );\n }else{\n $result = array(\n \"controller\" => \"User\",\n \"action\" => \"getLocation\",\n \"ResponseCode\" => true,\n \"getLocationResponse\" => $data\n\n );\n }\n $this->set_response($result, REST_Controller::HTTP_OK);\n }",
"function getLatLong($url){\n\t$contents = \"\";\n\t//Pull in XML data\n\t$xml = simplexml_load_file($url);\n\t//Go get the Latitude\n\t$geoLat = $xml->channel->item->xpath(\"geo:lat\");\n\t$contents .= $geoLat[0].\",\";\n\t//Go get the Longitude\n\t$geoLong = $xml->channel->item->xpath(\"geo:long\");\n\t$contents .= $geoLong[0];\n\t//Return Lat and Long\n\treturn $contents;\n\n}",
"function getLocationInfoByIp() {\n\t\t$client = @$_SERVER['HTTP_CLIENT_IP'];\n\t\t$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t$remote = @$_SERVER['REMOTE_ADDR'];\n\t\t$result = array('country'=>'', 'city'=>'');\n\t\tif(filter_var($client, FILTER_VALIDATE_IP)){\n\t\t\t$ip = $client;\n\t\t}elseif(filter_var($forward, FILTER_VALIDATE_IP)){\n\t\t\t$ip = $forward;\n\t\t}else{\n\t\t\t$ip = $remote;\n\t\t}\n\t\t$ip_data = @json_decode(file_get_contents(\"http://www.geoplugin.net/json.gp?ip=\".$ip));\n\t\tif($ip_data && $ip_data->geoplugin_countryName != null){\n\t\t\t$result['country'] = $ip_data->geoplugin_countryName;\n\t\t\t$result['city'] = $ip_data->geoplugin_city;\n\t\t\t$result['ip'] = $remote;\n\t\t}\n\t\treturn $result;\n }"
] | [
"0.6518053",
"0.5714243",
"0.57016975",
"0.55131465",
"0.5488123",
"0.5484338",
"0.53941697",
"0.5384275",
"0.53001124",
"0.5276162",
"0.52747524",
"0.5263827",
"0.522112",
"0.52108216",
"0.5209827",
"0.51691926",
"0.51688325",
"0.5131373",
"0.5115591",
"0.5107836",
"0.5107835",
"0.50913125",
"0.5089501",
"0.5074535",
"0.5060805",
"0.5050545",
"0.5041478",
"0.5009052",
"0.50071937",
"0.50040245",
"0.5003268",
"0.5003268",
"0.49921733",
"0.49883962",
"0.498339",
"0.4978155",
"0.49773842",
"0.4968617",
"0.4968046",
"0.49672693",
"0.49474043",
"0.4937628",
"0.49296007",
"0.49248692",
"0.4917304",
"0.49112767",
"0.49107334",
"0.48810115",
"0.48755693",
"0.48725438",
"0.48716167",
"0.48651096",
"0.48520082",
"0.4830754",
"0.48277223",
"0.48162138",
"0.48136818",
"0.48135257",
"0.4812591",
"0.4811746",
"0.47982514",
"0.47935766",
"0.47708535",
"0.4770801",
"0.47673386",
"0.47593176",
"0.47566393",
"0.47565553",
"0.47565037",
"0.4755986",
"0.47475109",
"0.47414157",
"0.47376764",
"0.47366804",
"0.4723332",
"0.47207594",
"0.47207358",
"0.47188178",
"0.47141308",
"0.47114474",
"0.4699812",
"0.46946824",
"0.46937323",
"0.46924418",
"0.4692404",
"0.4691373",
"0.4686395",
"0.46853375",
"0.46764436",
"0.4671507",
"0.46700993",
"0.46656945",
"0.46613824",
"0.46611556",
"0.46545625",
"0.4654232",
"0.46519613",
"0.4643791",
"0.46293515",
"0.46254817"
] | 0.8112957 | 0 |
Get single node location via Ajax | public function actionAjaxRecollectGeo($location, $prepend_location, $node_id)
{
try {
$model = new Geolocation();
/** Save node location */
$prepend_location = (!empty($prepend_location)) ? $prepend_location : null;
$save_location = $model->saveNodeLocation($location, $prepend_location, $node_id);
if ($save_location) {
$response = ['status' => 'success', 'msg' => Yii::t('app', 'Action successfully finished')];
}
else if (is_null($save_location)) {
$response = [
'status' => 'warning',
'msg' => $this->module::t('general', 'Google API cannot find given address {0}', $model->prepareNodeLocation($location, $prepend_location))
];
}
else {
$response = ['status' => 'error', 'msg' => Yii::t('app', 'An error occurred while processing your request')];
}
} catch (\Exception $e) {
$response = ['status' => 'error', 'msg' => $e->getMessage()];
}
return Json::encode($response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_node() {\n return \\Drupal::routeMatch()->getParameter('node');\n }",
"private function getLocation(){\n \n $location = [];\n $node = $this->getNode();\n $locationreference = $node->field_location_reference->entity;\n \n if($locationreference){\n $location = $locationreference->field_location->view(array('type' => 'LocationAddressFormatter', 'label' => 'hidden'));\n $location[0]['#prefix'] = '<i class=\"icon icon-home icon-smaller\"></i>';\n }\n \n return $location;\n \t\n }",
"public function get_locations($nodes);",
"public function executeAjaxGetLocation($request)\n {\n $this->getResponse()->setContentType('application/json');\n $org = $request->getParameter(\"organization\");\n $result = array();\n \n if ($request->isXmlHttpRequest()) {\n $locationRep = new LocationRepository();\n $locations = $locationRep->getLocationByOrg($org);\n\n if (is_object($locations)) {\n foreach ($locations as $location) {\n array_push($result, $location->getLocation());\n }\n }\n }\n\n $data_json = json_encode($result);\n return $this->renderText($data_json);\n }",
"function getUrl()\n {\n return partial_url($this->getNodeType(), $this->m_action, $this->m_partial, $this->m_params, $this->m_sessionStatus);\n }",
"function showlocation() {\r\n drupal_add_js(array('gojira' => array('page' => 'showlocation')), 'setting');\r\n drupal_add_js(array('gojira' => array('loc' => $_GET['loc'])), 'setting');\r\n return theme('showlocation');\r\n}",
"public function actionAjaxCollectGeo()\n {\n $lock = Yii::getAlias('@runtime') . DIRECTORY_SEPARATOR . 'geo.lock';\n $response = ['status' => 'warning', 'msg' => $this->module::t('general', 'Geolocation collecting is already running.')];\n\n if (!file_exists($lock)) {\n $console = new ConsoleRunner(['file' => '@app/yii']);\n $console->run('plugins/geomapping/run/get-geolocation');\n $response = [\n 'status' => 'success',\n 'msg' => $this->module::t('general', 'Node geolocation collecting started in background. See log for more info.')\n ];\n }\n\n return Json::encode($response);\n }",
"public function node()\n\t{\n\t\t$registry = Jquarry_Registry::instance();\n\t\t\n\t\treturn $registry->get_node($this->node_id());\n\t}",
"protected function getAjaxUri() {}",
"protected function getAjaxUri() {}",
"function getLocation();",
"public function getNodeFromUrl() {\n\n $path = $this->getCurrentPath();\n $system_path = drupal_lookup_path('source', $path);\n if (!$system_path) {\n $system_path = $path;\n }\n $menu_item = menu_get_item($system_path);\n if ($menu_item['path'] == 'node/%') {\n $node = node_load($menu_item['original_map'][1]);\n }\n else {\n throw \\Exception(sprintf(\"Node could not be loaded from URL '%s'\", $path));\n }\n return $node;\n }",
"public function ajax_load_dashboard_point() {\n\t\twpeo_check_01::check( 'wpeo_nonce_load_dashboard_point_' . $_POST['point_id'] );\n\n\t\tglobal $task_controller;\n\t\tglobal $point_controller;\n\t\tglobal $time_controller;\n\n\t\t$task \t\t\t\t= $task_controller->show( $_POST['task_id'] );\n\t\t$point \t\t\t\t= $point_controller->show( $_POST['point_id'] );\n\t\t$list_time \t\t=\t$time_controller->index( $taks->id, array( 'parent' => $point->id, 'status' => -34070 ) );\n\n\t\tob_start();\n\t\trequire( wpeo_template_01::get_template_part( WPEO_POINT_DIR, WPEO_POINT_TEMPLATES_MAIN_DIR, 'backend', 'window-point' ) );\n\t\twp_send_json_success( array( 'template' => ob_get_clean() ) );\n\t}",
"function getLocation(){ return $this->_Location;}",
"public function getLocation();",
"public function getLocation();",
"function getNodeId($from_lat, $from_lon, $transport){\n // find the closest node_id to ($from_lat, $from_lon) on a way\n global $mysqli;\n $offset = 0.01;\n switch ($transport){\n case \"foot\":\n $sql = \"SELECT id, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_road_nodes\n WHERE lat < $from_lat+$offset AND lat > $from_lat-$offset\n AND lon < $from_lon+$offset AND lon > $from_lon-$offset\n ORDER BY x ASC LIMIT 1\";\n break;\n case \"bicycle\":\n $sql = \"SELECT id, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_road_nodes\n WHERE lat < $from_lat+$offset AND lat > $from_lat-$offset\n AND lon < $from_lon+$offset AND lon > $from_lon-$offset\n ORDER BY x ASC LIMIT 1\";\n break;\n case \"car\":\n $sql = \"SELECT id, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_road_nodes\n WHERE lat < $from_lat+$offset AND lat > $from_lat-$offset\n AND lon < $from_lon+$offset AND lon > $from_lon-$offset\n ORDER BY x ASC LIMIT 1\";\n break;\n }\n $arr = array();\n $result = $mysqli->query($sql);\n while($result && $row = $result->fetch_assoc()){\n $arr[] = $row;\n }\n return (int) $arr[0]['id'];\n}",
"public function getNodeRoute();",
"function getNode($nodeId){\n global $mysqli;\n $sql = \"SELECT id, lat, lon FROM osm_nodes\n WHERE id = $nodeId\n LIMIT 1\";\n $result = $mysqli->query($sql);\n while($result && $row = $result->fetch_assoc()){\n $n = $row;\n }\n return $n ?? null;\n}",
"public function getNodeInfo() {\n return Node::factory($this, $this->get(\"/\")->getJson());\n }",
"function perform()\n {\n // get requested node content\n $this->model->action('navigation','getNode',\n array('result' => & $this->viewVar['node'],\n 'id_node' => (int)$this->current_id_node,\n 'status' => array('>=',2),\n 'fields' => array('title','body','id_node','lang',\n 'media_folder','rewrite_name',\n 'id_sector','id_parent')));\n\n // node dosent exists. wrong request\n if(!isset($this->viewVar['node']['id_node']))\n {\n $this->router->redirect( 'cntr/error' );\n }\n\n if(!empty($this->viewVar['node']['rewrite_name']))\n {\n $this->viewVar['current_url'] = \"/{$this->viewVar['node']['rewrite_name']}\";\n\n $this->model->action('common','historyAddPage',\n array('title' => $this->viewVar['node']['title'],\n 'lang' => $this->viewVar['node']['lang'],\n 'url' => $this->viewVar['node']['rewrite_name'],\n 'type' => 'node',\n 'id' => (int)$this->current_id_node,\n 'num_pages' => & $this->viewVar['num_pages']));\n }\n else\n {\n $this->viewVar['current_url'] = \"/id_node/{$this->viewVar['node']['id_node']}\";\n\n $this->model->action('common','historyAddPage',\n array('title' => $this->viewVar['node']['title'],\n 'lang' => $this->viewVar['node']['lang'],\n 'url' => \"id_node/{$this->viewVar['node']['id_node']}\",\n 'type' => 'node',\n 'id' => (int)$this->current_id_node,\n 'num_pages' => & $this->viewVar['num_pages']));\n }\n\n $this->viewVar['sector'] = $this->viewVar['node']['id_sector'];\n\n // get node meta data\n $this->model->action('navigation','getMeta',\n array('result' => & $this->viewVar['meta'],\n 'id_node' => (int)$this->current_id_node));\n\n // get child nodes content of the requested node\n // only with status=2, means active\n $this->model->action('navigation','getChilds',\n array('result' => & $this->viewVar['childNodes'],\n 'id_node' => (int)$this->current_id_node,\n 'status' => array('>=',2),\n 'fields' => array('title','short_text','lang',\n 'id_node','rewrite_name')));\n\n // get navigation node branch content of the requested node\n $this->model->action('navigation','getBranch',\n array('result' => & $this->viewVar['nodeBranch'],\n 'id_node' => (int)$this->current_id_node,'lang',\n 'fields' => array('title','id_node','rewrite_name')));\n\n if($this->viewVar['node']['id_parent'] != 0)\n {\n // get node related links\n $this->model->action('link','getLinks',\n array('result' => & $this->viewVar['links'],\n 'id_node' => (int)$this->current_id_node,\n 'status' => array('=','2'),\n 'fields' => array('id_link','id_node','lang',\n 'title','url','description')));\n }\n else\n {\n // get node related links\n $this->model->action('link','getLinks',\n array('result' => & $this->viewVar['links'],\n 'id_sector' => (int)$this->current_id_node,\n 'status' => array('=','2'),\n 'limit' => array('perPage' => 5,\n 'numPage' => 0),\n 'order' => array('create_date', 'desc'),\n 'fields' => array('id_link','id_node','lang',\n 'title','url','description')));\n }\n\n // get result of the header, footer, mainnavigation, leftCol and basecss controller\n //\n $this->viewVar['header'] = $this->controllerLoader->header();\n $this->viewVar['footer'] = $this->controllerLoader->footer();\n $this->viewVar['mainNavigation'] = $this->controllerLoader->mainNavigation();\n $this->viewVar['leftCol'] = $this->controllerLoader->leftCol();\n $this->viewVar['baseCss'] = $this->controllerLoader->baseCss();\n }",
"public function getLocation() {\r\n return $this->location;\r\n }",
"public function getSitemapNode()\n\t{\n\t\t$result = $params = array();\n\t\t$Article = new Article();\n\t\t$params = array();\n\t\t$params[] = 'Type = '.$this->getArticleType();\n\t\tforeach ( $Article->findShortList( $params, 'Id desc' ) as $Article )\n\t\t{\n\t\t\t$result[] = URL::get( $Article );\n\t\t}\n\t\treturn $result;\n\t}",
"public function getLocation() { return $this->location; }",
"public function getRootNode() {}",
"public static function getAjaxURL()\r\n\t{\r\n\t\tif (!JLanguageMultilang::isEnabled())\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n \r\n\t\t$lang = JFactory::getLanguage()->getTag();\r\n\t\t$app = JFactory::getApplication();\r\n\t\t$sitemenu= $app->getMenu();\r\n\t\t$thismenuitem = $sitemenu->getActive();\r\n\r\n\t\t// if we haven't got an active menuitem, or we're currently on a menuitem \r\n\t\t// with view=category or note = \"Ajax\", then just stay on it\r\n\t\tif (!$thismenuitem || strpos($thismenuitem->link, \"view=category\") !== false || $thismenuitem->note == \"Ajax\")\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t// look for a menuitem with the right language, and a note field of \"Ajax\"\r\n\t\t$menuitem = $sitemenu->getItems(array('language','note'), array($lang, \"Ajax\"));\r\n\t\tif ($menuitem)\r\n\t\t{\r\n\t\t\t$itemid = $menuitem[0]->id; \r\n\t\t\t$url = JRoute::_(\"index.php?Itemid=$itemid&view=helloworld&format=json\");\r\n\t\t\treturn $url;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public function getLocation()\n\t{\n\t\treturn $this->_location;\n\t}",
"public function getLocation() {\n return $this->location;\n }",
"function getMainNode(){\n\t\treturn $this->nodeppal;\n\t}",
"public function getLocation()\r\n {\r\n return $this->location;\r\n }",
"public function get_location()\n\t{\n\t\treturn $this->location;\n\t}",
"public function ajaxShow()\n {\n return Position::with(['type', 'school', 'supervisor'])->get();\n }",
"public function getLocation()\n {\n return $this->get('location');\n }",
"function getLatLong($url){\n\t$contents = \"\";\n\t//Pull in XML data\n\t$xml = simplexml_load_file($url);\n\t//Go get the Latitude\n\t$geoLat = $xml->channel->item->xpath(\"geo:lat\");\n\t$contents .= $geoLat[0].\",\";\n\t//Go get the Longitude\n\t$geoLong = $xml->channel->item->xpath(\"geo:long\");\n\t$contents .= $geoLong[0];\n\t//Return Lat and Long\n\treturn $contents;\n\n}",
"public function getLocation()\n\t{\n\t\treturn $this->location;\n\t}",
"public function getLocation()\n\t{\n\t\treturn $this->location;\n\t}",
"public function getLocation()\n\t{\n\t\treturn $this->location;\n\t}",
"public function getLocation()\n\t{\n\t\treturn $this->location;\n\t}",
"public function getLocation() {\n\t\treturn($this->location);\n\t}",
"public function actionAjaxGetGeoInfo($id)\n {\n /** Do not load JqueryAsset in info view */\n Yii::$app->assetManager->bundles['yii\\web\\JqueryAsset'] = false;\n\n return $this->renderAjax('_info', [\n 'data' => Geolocation::find()->where(['id' => $id])->one()\n ]);\n }",
"function getLocation($xml){\n\t$latitude = $xml->result->geometry->location->lat;\n $longitude = $xml->result->geometry->location->lng;\n $location = array(\"latitude\" => $latitude, \"longitude\" => $longitude);\n return ($location);\n}",
"public function getNode()\n {\n return parent::getNode();\n }",
"public function getLocation()\n {\n return $this->getParameter('location');\n }",
"public function getLocation()\n {\n return $this->index;\n }",
"private function getLocation() {\n $location = false;\n \t$result = new StdClass();\n \t// $result->location = 'http://www.geoplugin.net/extras/location.gp?lat=' . $this->coordinates->latitude . '&long=' . $this->coordinates->longitude . '&format=php';\n \t$result->nearest = 'http://www.geoplugin.net/extras/location.gp?lat=' . $this->coordinates->latitude . '&long=' . $this->coordinates->longitude . '&format=php';\n \t$result->location = 'http://maps.googleapis.com/maps/api/geocode/json?latlng=' . $this->coordinates->latitude . ',' . $this->coordinates->longitude . '&sensor=false';\n\n \t$result = json_decode($this->getUrlContents($result->location));\n \t// $result->nearest = unserialize($this->getUrlContents($result->nearest));\n\n $location = $this->validateLocation($result);\n\n if(is_array($location))\n \t $location = $this->filterLocation($location);\n }",
"public function getLocation() {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"protected function dispatchNode(){\r\n//\t\t$nodo->setWhere(Db_Helper::like('path_url',null,null,null,true));\r\n//\t\t$nodo->setPathUrl($this->request_path);\r\n//\t\t$nodos = $nodo->search(null,'ASC',null,0,'Granguia_Model_Nodo');\r\n//\t\tif(!$nodos){\r\n//\t\t\tdie(\"no encuentro nada en la linea: \".__LINE__);\r\n//\t\t}\r\n//\t\t$nodo = array_shift($nodos);\r\n\t\t$nodo = Granguia_Model_Nodo::getNodoFromPathUrl($this->request_path);\r\n\t\tif($nodo&&$nodo->getEsActiva()){\r\n\t\t\tif(Core_Http_Header::isAjaxRequest()){\r\n\t\t\t\t//sleep(6);\r\n\t\t\t\tif($pagina_anterior = Core_Http_Header::getRequest('pagina_anterior')){\r\n\t\t\t\t\tif(strpos($pagina_anterior, '#')!==false){\r\n\t\t\t\t\t\t$nodo_anterior = null;\r\n\t\t\t\t\t\t$link_url = array_pop( explode('#', $pagina_anterior) );\r\n\t\t\t\t\t\tif(!$link_url)\r\n\t\t\t\t\t\t\t$nodo_anterior = Granguia_Model_Nodo::getHomeNodo();\r\n\t\t\t\t\t\telse $nodo_anterior = Granguia_Model_Nodo::getNodoFromPathUrl($link_url);\r\n\t\t\t\t\t\tif($nodo_anterior){\r\n\t\t\t\t\t\t\tif($tipo_anterior = $nodo_anterior->getTipoNodo()){\r\n\t\t\t\t\t\t\t\tif($tipo_anterior = $tipo_anterior->getNombre()){\r\n\t\t\t\t\t\t\t\t\t$tipo_anterior = Core_String_Helper::getInstance()->sinAcentos(utf8_decode($tipo_anterior));\r\n\t\t\t\t\t\t\t\t\t$tipo_anterior = str_replace(' ', '_', strtoupper($tipo_anterior));\r\n\t\t\t\t\t\t\t\t\t//ECHO '//'.$tipo_anterior.'_TIPO_NODO_ANTERIOR';\r\n\t\t\t\t\t\t\t\t\tCore_App::getLayout()->addActions($tipo_anterior.'_TIPO_NODO_ANTERIOR');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$gg_click_counter = Core_Http_Header::getRequest('gg_click_counter');\r\n\t\t\t\tif(isset($gg_click_counter)){\r\n\t\t\t\t\tCore_App::getLayout()->addActions('GG_CLICK_COUNTER_EQ_'.($gg_click_counter+0));\r\n\t\t\t\t}\r\n\t\t\t\tif(Core_Http_Header::getRequest('screenblock')){\r\n\t\t\t\t\tCore_App::getLayout()->addActions('screenblock');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tCore_App::getInstance()->setNodo($nodo);\r\n\t\t\t$tipo = $nodo->getTipoNodo();\r\n\t//\t\tCore_Http_Header::ContentType('text/plain');\r\n\t\t\tfalse&&$tipo = new Granguia_Model_TipoNodo();\r\n\t\t\t$clase = $tipo->getClaseControladora();\r\n\t\t\t$controller = new $clase;\r\n\t\t\t$controller->setInstancia($nodo);\r\n\t\t\t$coincidencia = array_shift($x = explode('%', $nodo->getPathUrl()));\r\n\t\t\t//var_dump($coincidencia,$this->request_path);die('conid'); \r\n\t\t\t$resto = array_pop($x = explode($coincidencia, $this->request_path));\r\n\t\t\t$aResto = explode('/',$resto);\r\n\t\t\twhile(isset($aResto[0])&&$aResto[0]=='')// me como los slashs path_url////algomas\r\n\t\t\t\tarray_shift($aResto);\r\n\t\t\t$resto = implode('/', $aResto);\r\n\t\t\t$r = $controller->route($resto);\r\n\t\t\tif(!$r){\r\n\t\t\t\tCore_Http_Header::Redirect('', true);\r\n\t\t\t\tdie(\"no rute2\");\r\n\t\t\t\t//algo al home...\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tCore_Http_Header::Redirect('', true);\r\n\t\t\tdie(\"no rute3\");\r\n\t\t\t//algo al home...\r\n\t\t}\r\n\t\t/* hasta aca llega al router, si continua es que paso el router */\r\n\t\t\r\n\t\t/*<estadisticas>*/\r\n\t\tGranguia_Model_Contador::ContarAccesoSesion(Core_Server::getRemoteAddr(), $this->request_path);\r\n\t\tif(Core_Session::getVarMulticontext('session_contada',array('contador_estadisticas'))==null){\r\n\t\t\tCore_Session::setVarMulticontext('session_contada','1',array('contador_estadisticas'));\r\n\t\t\tGranguia_Model_Contador::ContarInicioSesion(Core_Server::getRemoteAddr());\t\r\n\t\t}\r\n\t\tif(in_array('barrio',Core_App::getLayout()->getActions())){\r\n\t\t\t$id_barrio = null;\r\n\t\t\tif($barrio = Core_App::getInstance()->getBarrio())\r\n\t\t\t\t$id_barrio = $barrio->getId();\r\n\t\t\t$id_categoria = null;\r\n\t\t\tif($categoria = Core_App::getInstance()->getCategoria())\r\n\t\t\t\t$id_categoria = $categoria->getId();\r\n\t\t\tGranguia_Model_Contador::ContarAccesoCategoria($id_categoria, $id_barrio);\r\n\t\t}\r\n\t\t/*</estadisticas>*/\r\n\t\t\r\n\t\t$nodo = Core_App::getInstance()->getNodo();//el nodo puede cambiar de generico a específico en el router\r\n\t\t$head = Core_App::getLoadedLayout()->getBlock('html_head');\r\n\t\tif($head){\r\n\t\t\t$titulo = $nodo->getMetaTitle($head->getTitle());\r\n\t\t\t$favicon = Granguia_Model_Config::findConfigValue('pagina/file_favicon');\r\n\t\t\tif(isset($favicon)){\r\n\t\t\t\t$head->setFavicon($favicon);\r\n\t\t\t}\r\n\t\t\tif($categoria = Core_App::getInstance()->getCategoria()){\r\n\t\t\t\t$titulo = $categoria->getNodo()->getMetaTitle($titulo);\r\n\t\t\t}\r\n\t\t\t$head->setTitle($titulo);\r\n\t\t\t$meta_description = Core_App::getLayout()->appendBlock(utf8_decode('<meta html_name=\"Description\" before=\"\" />'),$head);\r\n\t\t\t$meta_description\r\n\t\t\t\t->setHtmlContent($nodo->getMetaDescription('Guía de comercios de la ciudad de Córdoba'))\r\n\t\t\t;\r\n\t\t\t$meta_description = Core_App::getLayout()->appendBlock(utf8_decode('<meta html_name=\"keywords\" before=\"\" />'),$head);\r\n\t\t\tif($categoria){\r\n\t\t\t\t$meta_description\r\n\t\t\t\t\t->setHtmlContent($categoria->getNodo()->getMetaKeywords('ubicaciones de comercios, mapa comercios, comercios córdoba, listado comercios'))\r\n\t\t\t\t;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t$meta_description\r\n\t\t\t\t\t->setHtmlContent($nodo->getMetaKeywords(''))\r\n\t\t\t\t;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public function get($location);",
"public function getNodeId();",
"public function locate();",
"function getCarParkLoc($from_lat, $from_lon){\n // find the closest node_id to ($from_lat, $from_lon) on a way\n global $mysqli;\n $offset = 0.1;\n $sql = \"SELECT node_id, lat, lon, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_car_parkings\n ORDER BY x ASC LIMIT 1\";\n $arr = array();\n $result = $mysqli->query($sql);\n while($result && $row = $result->fetch_assoc()){\n $arr[] = array($row['lat'],$row['lon']);\n }\n return $arr[0];\n}",
"public function getLocation()\n {\n return $this->getLocationData();\n }",
"public function ajax_get_folder_contents() {\n\n\t\t$path = '#' === rgget( 'path' ) ? '/' : rgget( 'path' );\n\n\t\techo wp_json_encode( $this->get_folder_tree( $path, rgget( 'first_load' ) ) );\n\t\tdie();\n\n\t}",
"public function getAjaxID() {}",
"public function get_district(){\n\t\t$this->layout = 'ajax';\n\t\t$this->Client->load_district($this->request->query['id']);\n\t\t$this->render(false);\n\t\tdie;\n\t}",
"public function GetParentAddress($token);",
"private function getLocation()\n {\n $this->location = null;\n \n if ($this->fingerprint !== null && $this->end_point !== null) {\n $this->location = $this->end_point.$this->fingerprint;\n } else {\n $info = $this->getPost();\n \n if (isset($info['Location']) === true) {\n $this->fingerprint = str_replace($this->end_point, '', $info['Location']);\n $this->location = $info['Location'];\n }\n }\n \n return $this->location;\n }",
"public function _before_index(){\n// $ip = get_client_ip();\n// $res = $ip_class->getlocation('113.102.162.102');\n// print_r($res);\n \n \n }",
"private function getLocation() {\n }",
"public function getUserLocation();",
"function GetCurrentPageNodeID()\r\n{\r\n\tmytrace(\"GetCurrentPageNodeID\");\r\n\t\r\n\t// strip the q=\r\n\t$sCurrentPagePath = GetCurrentPagePath(); // i.e. about/news/press-releases\r\n\tmytrace(\"current path = $sCurrentPagePath\");\r\n\t\r\n\t/*\r\n\t$nPos = strrpos($sPHPSelf,\"/\");\r\n\tif ($nPos===false)\r\n\t{\r\n\t\tmytrace(\"unable to determine current page name\");\r\n\t\treturn \"\";\r\n\t}\r\n\t\r\n\t$sCurrentPage = substr($sPHPSelf,$nPos+1);\r\n\tmytrace(\"Page following last forward slash = $sCurrentPage\");\r\n\t\r\n\t// if we have the node at this point, return. \r\n\t// Otherwise we have an alias so lookup the node\r\n\tif (is_int($sCurrentPage)) \r\n\t{\r\n\t\tmytrace(\"page is node based: node = $sCurrentPage\");\r\n\t\treturn \"node/\" . $sCurrentPage; // returns node/21\r\n\t}\r\n\t*/\r\n\t\r\n\t// make lower case\r\n\t$sCurrentPagePath = strtolower($sCurrentPagePath);\r\n\t\r\n\t// mfindlay 7/1/10 strip &debug=0 or &debug=1 if present, as these are debug strings\r\n\t$sCurrentPagePath = StripDebugQS($sCurrentPagePath);\r\n\tmytrace(\"adjusted path = $sCurrentPagePath\");\r\n\t\r\n\t// is the current path a node/21 type path (admin failed to use url aliasing, so just return the node)\r\n\tif (strpos($sCurrentPagePath,\"node\")===0)\r\n\t{\r\n\t\t// node based \r\n\t\tmytrace(\"returning node based current page: $sCurrentPagePath\");\r\n\t\treturn $sCurrentPagePath; \r\n\t}\r\n\t\r\n\t// read from the url_alias table to fetch the NODE for this alias\r\n\t$sSQL = \"SELECT * FROM url_alias WHERE dst='\" . $sCurrentPagePath . \"'\";\r\n\tmytrace($sSQL);\r\n\t\r\n\t$result = db_query($sSQL);\r\n\t\r\n\t// load each returned row into the return array\r\n\tif ($arg = db_fetch_array($result))\r\n\t{\r\n\t\t$sCurrentNode = $arg['src'];\t\r\n\t\tmytrace(\"page is alias based: src = $sCurrentNode\");\r\n\t\treturn $sCurrentNode; // returns node/21 address\r\n\t} \r\n\t\r\n\tmytrace(\"Returning empty string\");\r\n\treturn \"\";\r\n}",
"function showLocationBox () {\n\t\t$template['list'] = $this->cObj2->getSubpart($this->templateCode,'###TEMPLATE_LOCATIONBOX###');\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['location.']['LL'], 'location');\n\n\t\t$content = $this->cObj2->substituteMarkerArrayCached($template['list'],$markerArray);\n\t\treturn $content;\n\t}",
"public function ajax_url() {\n\t\treturn admin_url( 'admin-ajax.php', 'relative' );\n\t}",
"function GetNodeForPosition( $spr, $level, $lang_id=NULL )\n {\n $db = DBs::getInstance();\n if( empty($lang_id) ) $lang_id = $this->lang_id;\n $q = \"SELECT `node` FROM `\".$spr.\"` WHERE `cod`='\".$level.\"'\";\n if( !empty($lang_id) ) $q = $q.\" AND `lang_id`='\".$lang_id.\"'\";\n $q = $q.\" GROUP BY `cod`\";\n $res = $db->db_Query( $q );\n// echo '<br> $q='.$q.' $res='.$res.' $db->result='.$db->result;\n if( !$res OR !$db->result )return 0;\n $rows = $db->db_GetNumRows();\n if($rows == 0) return 0;\n $row = $db->db_FetchAssoc();\n return ($row['node']+1);\n }",
"public function nearest()\n {\n $lat = Input::get('lat');\n $lon = Input::get('lon');\n\n $location = Location::getNearestLocation($lat, $lon);\n return response()->json($location);\n }",
"private function musGetNodeId(){\n }",
"public function ajaxGetLocations($query = null) {\r\n $xmlElement = new SimpleXMLElement(\"<?xml version='1.0' standalone='yes'?><root></root>\");\r\n $locations = $this->Location->find('all', array(\r\n 'conditions' => array(\r\n 'Location.Deleted' => 0\r\n ), 'fields' => array('Location.LocationID', 'Location.LocationCode'), 'recursive' => 0,\r\n \t\t'order'=>'Location.LocationCode asc'\r\n ));\r\n if ($query == null) {\r\n foreach ($locations as $location) {\r\n $xmlLocation = $xmlElement->addChild('location');\r\n $xmlLocation->addChild('id', $location['Location']['LocationID']);\r\n $xmlLocation->addChild('locationCode', $location['Location']['LocationCode']);\r\n }\r\n } else {\r\n foreach ($locations as $location) {\r\n if (strpos(strtolower($location['Location']['LocationCode']), strtolower($query)) !== false) {\r\n $xmlLocation = $xmlElement->addChild('location');\r\n $xmlLocation->addChild('id', $location['Location']['LocationID']);\r\n $xmlLocation->addChild('locationCode', $location['Location']['LocationCode']);\r\n }\r\n }\r\n }\r\n\r\n\r\n $this->set('xml', $xmlElement);\r\n //$this->set('locations', $Locations);\r\n $this->render('ajaxGetLocations', 'ajax');\r\n }",
"public function getPostalCodeFromCoords() {\r\n\t\t$this->autoRender = false;\r\n\r\n\t\t$this->layout = 'ajax';\r\n\r\n\t\t$this->response->type('json');\r\n\r\n\t\t$response = $this->StreetAddress->getPostalCodeFromCoords(\r\n\t\t\t$this->request->data('latitude'),\r\n\t\t\t$this->request->data('longitude')\r\n\t\t);\r\n\r\n\t\tif ($response) {\r\n\t\t\t$this->response->body(json_encode($response));\r\n\t\t} else {\r\n\t\t\t$this->response->body(false);\r\n\t\t}\r\n\r\n\r\n\t}",
"public function actionAjaxTourFullInfo(){\n $tour_id = Yii::$app->request->getQueryParam('tour_id', null);\n if(!is_null($tour_id)){\n $tour = TourResponse::findOne($tour_id);\n $response = [\n 'status' => 'ok',\n 'tour' => $this->renderAjax('partial/tour-full-info', ['tour' => $tour]),\n 'message' => Yii::t('app', 'Tour was found.')\n ];\n }else{\n $response = [\n 'status' => 'error',\n 'tour' => '',\n 'message' => Yii::t('app', 'Tour was not found.')\n ];\n }\n echo Json::encode($response);\n Yii::$app->end();\n }",
"public function getPageNode() {\n\t\tif ($this->_pageNode === null) {\n\t\t\t$this->analyzeURL();\n\t\t}\n\t\treturn $this->_pageNode;\n\t}",
"public function getLocation()\n {\n return isset($this->location) ? $this->location : null;\n }",
"function getActualNode(){\n\t\treturn $this->anode;\n\t}",
"public function findNodeFromCurrentPath() {\r\n $path = \\Drupal::request()->getRequestUri();\r\n $path_data = explode('/', $path);\r\n\r\n if ($this->currentPathIsValidPrintVariantPath()) {\r\n // By this point, we should be on a PPI Print variant path.\r\n $node_path = '/node/' . $path_data[2];\r\n\r\n return $this->findNodeFromPath($node_path);\r\n }\r\n return NULL;\r\n }",
"public function getNode() {\r\n return $this->node;\r\n }",
"function ajax_render_location_rule()\n {\n }",
"public function getOrigin()\n {\n return $this->send('POST', 'getOrigin');\n }",
"public function executeAjaxGetTagInfo($request)\n {\n $result = array(\"error\" => array(\"status\" => 0, \"msg\" => \"\"), \"data\" => array(), \"orgLocal\" => array());\n $this->getResponse()->setContentType('application/json');\n $id = $request->getParameter('id');\n \n if ($request->isXmlHttpRequest()) {\n $deviceRep = new DeviceRepository();\n $device = $deviceRep->getDevice($id);\n\n $org = $device->getOrganization();\n $locationRep = new LocationRepository();\n $result['orgLocal'] = $locationRep->getAllOrgAndLocation($org);\n $result['data'] = $device->getData();\n }\n \n $data_json = json_encode($result);\n return $this->renderText($data_json);\n }",
"public function get_root_location()\n {\n return $this->m_mptt->get_by_node_id(C__OBJ__ROOT_LOCATION);\n }",
"function getThatJson(){\n return file_get_contents($_SERVER[\"REQUEST_SCHEME\"].\"://\".$_SERVER[\"SERVER_ADDR\"].$_SERVER['PHP_SELF']);\n// echo $_SERVER[\"REQUEST_SCHEME\"].\"://\".$_SERVER[\"SERVER_ADDR\"].$_SERVER['PHP_SELF'];\n}",
"public function list_nodesAction()\n {\n \t$this->params['list_title'] = 'Gestion des formations';\n $parentNodeId = filter_var(@ $_REQUEST['id'], FILTER_SANITIZE_STRING );\n $this->params['show_parent_column'] = false;\n \n if ( $nodes = GestionNotes_Model_Node::fetchByParentNodeId($parentNodeId) )\n {\n $this->params['nodes'] = & $nodes;\n $this->params['parent'] = & $nodes['parent'];\n $this->params['titleNode'] = & $nodes['parent']['title'];\n unset($nodes['parent']);\n }\n else\n {\n \t//Quand il n'y a pas d'enfant \n $parentNode = GestionNotes_Model_Node::fetchOneByNodeId($parentNodeId);\n $this->params['nodes'] = array();\n $this->params['idNode'] = $parentNodeId;\n $this->params['typeNode'] = GestionNotes_Model_Node::typeById($parentNodeId);\n }\n \n return $this->renderPage('admin/list-nodes');\n }",
"public function location()\n {\n $city = $this->city;\n if ($city) {\n $subdivision = $city->subdivision;\n $country = $subdivision->country;\n\n $this->attributes['location'] = $city->name . ' ' . $subdivision->abbreviation . ', ' . $country->name;\n } else {\n $this->attributes['location'] = null;\n }\n }",
"public function getLocation_get(){\n $user_id = $this->input->get('user_id');\n\n $data = $this->User_model->select_data('latitude,longitude','tbl_users',array('id'=>$user_id));\n\n if(empty($data))\n\n {\n $result = array(\n \"controller\" => \"User\",\n \"action\" => \"getLocation\",\n \"ResponseCode\" => false,\n \"MessageWhatHappen\" => \"Not Found\"\n\n );\n }else{\n $result = array(\n \"controller\" => \"User\",\n \"action\" => \"getLocation\",\n \"ResponseCode\" => true,\n \"getLocationResponse\" => $data\n\n );\n }\n $this->set_response($result, REST_Controller::HTTP_OK);\n }",
"public function getLocation()\n\t{\n\t\treturn null;\n\t}",
"function getData($url){\n\t$contents = \"\";\n\t//Pull in XML data\n\t$xml = simplexml_load_file($url);\n\t//Go get our title\n\t$contents .= $xml->channel->item->title.\"<br><br>\";\n\t//Get our weather data\n\t$contents .= $xml->channel->item->description.\"<br>\";\n\t//Go get the Latitude\n\t$geoLat = $xml->channel->item->xpath(\"geo:lat\");\n\t$contents .= \"The Latitude is: \".$geoLat[0].\"<br>\";\n\t//Go get the Longitude\n\t$geoLong = $xml->channel->item->xpath(\"geo:long\");\n\t$contents .= \"The Longitude is: \".$geoLong[0];\n\t//Echo everything out\n\techo $contents;\n\n}",
"public function getNodeOriginalRoute();",
"public function getNode()\n {\n return $this->node;\n }",
"public function getNode()\n {\n return $this->node;\n }"
] | [
"0.5906167",
"0.5764729",
"0.56281376",
"0.5611867",
"0.55687356",
"0.54771507",
"0.5405089",
"0.5400214",
"0.53874135",
"0.53874135",
"0.5376961",
"0.53657025",
"0.5348053",
"0.53348315",
"0.5320373",
"0.5320373",
"0.52781916",
"0.5232992",
"0.5225256",
"0.5212359",
"0.51934135",
"0.5191502",
"0.5189726",
"0.518452",
"0.5172154",
"0.5170085",
"0.5165101",
"0.5152758",
"0.515191",
"0.5140073",
"0.51336664",
"0.5132841",
"0.5126315",
"0.5124871",
"0.5122885",
"0.5122885",
"0.5122885",
"0.5122885",
"0.51183033",
"0.51142865",
"0.5102718",
"0.5098383",
"0.5081193",
"0.5071085",
"0.5070432",
"0.5064825",
"0.5056815",
"0.5056815",
"0.5056815",
"0.5056815",
"0.5056815",
"0.5056815",
"0.5056815",
"0.5056815",
"0.5056815",
"0.5056815",
"0.5056815",
"0.5056815",
"0.5056815",
"0.5054821",
"0.5052639",
"0.50447816",
"0.50418967",
"0.5041693",
"0.5029426",
"0.50203156",
"0.5009852",
"0.49937978",
"0.4980681",
"0.49800354",
"0.49740496",
"0.49726856",
"0.49569035",
"0.4952036",
"0.4934754",
"0.4929045",
"0.49237674",
"0.49234557",
"0.49178427",
"0.4902934",
"0.48931327",
"0.4891662",
"0.4890161",
"0.4872798",
"0.48632318",
"0.484717",
"0.48398036",
"0.48218292",
"0.48055953",
"0.47910342",
"0.4771472",
"0.47629106",
"0.47611699",
"0.4758569",
"0.47483194",
"0.47437242",
"0.4740819",
"0.47392073",
"0.47345296",
"0.47345296"
] | 0.5202803 | 20 |
Load geolocation info via Ajax | public function actionAjaxGetGeoInfo($id)
{
/** Do not load JqueryAsset in info view */
Yii::$app->assetManager->bundles['yii\web\JqueryAsset'] = false;
return $this->renderAjax('_info', [
'data' => Geolocation::find()->where(['id' => $id])->one()
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionAjaxCollectGeo()\n {\n $lock = Yii::getAlias('@runtime') . DIRECTORY_SEPARATOR . 'geo.lock';\n $response = ['status' => 'warning', 'msg' => $this->module::t('general', 'Geolocation collecting is already running.')];\n\n if (!file_exists($lock)) {\n $console = new ConsoleRunner(['file' => '@app/yii']);\n $console->run('plugins/geomapping/run/get-geolocation');\n $response = [\n 'status' => 'success',\n 'msg' => $this->module::t('general', 'Node geolocation collecting started in background. See log for more info.')\n ];\n }\n\n return Json::encode($response);\n }",
"function geocode() {\n if ( ! $this->input->is_ajax_request() || ! $this->auth->is_login()) {\n return redirect(config_item('site_url'));\n }\n \n $latitude = filter($this->input->get('lat'), 'float', 20);\n $longitude = filter($this->input->get('lon'), 'float', 20);\n\n if (empty($latitude) || empty($longitude)) {\n return $this->output->set_output(json_encode(array(\n 'code' => 'error'\n )));\n }\n\n $this->load->library('Location');\n \n $geocode = $this->location->get_address($latitude, $longitude);\n\n if ( ! empty($geocode) && is_array($geocode)) {\n return $this->output->set_output(json_encode(array(\n 'code' => 'luck',\n 'address' => $geocode['address']\n )));\n }\n\n log_write(LOG_WARNING, 'Yandex geocode error, USER: ' . $this->auth->get_user_id(), __METHOD__);\n\n return $this->output->set_output(json_encode(array(\n 'code' => 'error',\n 'address' => 'Сервер определения местоположения недоступен. Попробуйте позже.'\n )));\n }",
"public function getPostalCodeFromCoords() {\r\n\t\t$this->autoRender = false;\r\n\r\n\t\t$this->layout = 'ajax';\r\n\r\n\t\t$this->response->type('json');\r\n\r\n\t\t$response = $this->StreetAddress->getPostalCodeFromCoords(\r\n\t\t\t$this->request->data('latitude'),\r\n\t\t\t$this->request->data('longitude')\r\n\t\t);\r\n\r\n\t\tif ($response) {\r\n\t\t\t$this->response->body(json_encode($response));\r\n\t\t} else {\r\n\t\t\t$this->response->body(false);\r\n\t\t}\r\n\r\n\r\n\t}",
"public function show_map() {\n $restaurant_location = Restaurant::where('id',$_POST['restaurant_id'])->first();\n $html = view('admin.restaurants.map-address')->with('restaurant_location', $restaurant_location)->render();\n if ($html) {\n $res_array = array(\n 'msg' => 'success',\n 'response' => $html,\n );\n echo json_encode($res_array);\n exit;\n } \n }",
"function getLocation();",
"public function getUserLocation() {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip_note = 'HTTP_CLIENT_IP='.$_SERVER['HTTP_CLIENT_IP'];\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip_note = 'HTTP_X_FORWARDED_FOR='.$_SERVER['HTTP_X_FORWARDED_FOR'];\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip_note = 'REMOTE_ADDR='.$_SERVER['REMOTE_ADDR'];\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n $ip = '117.20.119.245';\n $loc = file_get_contents(\"http://ipinfo.io/\".$ip.\"/loc\");\n\n if($loc) {\n $array_loc = explode(',', $loc);\n return ['lat'=> ((isset($array_loc[0]))? $array_loc[0]:'') ,'lon'=> ((isset($array_loc[1]))? $array_loc[1]:'')];\n }\n\n return ['lat'=>'','lon'=>''];\n\n }",
"private function getLocation() {\n $location = false;\n \t$result = new StdClass();\n \t// $result->location = 'http://www.geoplugin.net/extras/location.gp?lat=' . $this->coordinates->latitude . '&long=' . $this->coordinates->longitude . '&format=php';\n \t$result->nearest = 'http://www.geoplugin.net/extras/location.gp?lat=' . $this->coordinates->latitude . '&long=' . $this->coordinates->longitude . '&format=php';\n \t$result->location = 'http://maps.googleapis.com/maps/api/geocode/json?latlng=' . $this->coordinates->latitude . ',' . $this->coordinates->longitude . '&sensor=false';\n\n \t$result = json_decode($this->getUrlContents($result->location));\n \t// $result->nearest = unserialize($this->getUrlContents($result->nearest));\n\n $location = $this->validateLocation($result);\n\n if(is_array($location))\n \t $location = $this->filterLocation($location);\n }",
"private function get_json_geo_data()\n {\n $response = false;\n if ($this->ipaddress != 'UNKNOWN') {\n foreach (self::$geo_service_url as $key => $url) {\n $response = wp_remote_get($url . $this->ipaddress);\n if (is_array($response) && array_key_exists('region_code', json_decode($response['body']))) {\n continue;\n }\n }\n }\n\n if (is_array($response)) {\n $this->body = json_decode($response['body']);\n } else {\n $this->body = false;\n }\n }",
"public function executeAjaxGetLocation($request)\n {\n $this->getResponse()->setContentType('application/json');\n $org = $request->getParameter(\"organization\");\n $result = array();\n \n if ($request->isXmlHttpRequest()) {\n $locationRep = new LocationRepository();\n $locations = $locationRep->getLocationByOrg($org);\n\n if (is_object($locations)) {\n foreach ($locations as $location) {\n array_push($result, $location->getLocation());\n }\n }\n }\n\n $data_json = json_encode($result);\n return $this->renderText($data_json);\n }",
"public function actionAjaxRecollectGeo($location, $prepend_location, $node_id)\n {\n try {\n\n $model = new Geolocation();\n\n /** Save node location */\n $prepend_location = (!empty($prepend_location)) ? $prepend_location : null;\n $save_location = $model->saveNodeLocation($location, $prepend_location, $node_id);\n\n if ($save_location) {\n $response = ['status' => 'success', 'msg' => Yii::t('app', 'Action successfully finished')];\n }\n else if (is_null($save_location)) {\n $response = [\n 'status' => 'warning',\n 'msg' => $this->module::t('general', 'Google API cannot find given address {0}', $model->prepareNodeLocation($location, $prepend_location))\n ];\n }\n else {\n $response = ['status' => 'error', 'msg' => Yii::t('app', 'An error occurred while processing your request')];\n }\n\n } catch (\\Exception $e) {\n $response = ['status' => 'error', 'msg' => $e->getMessage()];\n }\n\n return Json::encode($response);\n }",
"function get_lat_long($address)\r\n{\t\r\n\t//sleep(1);\r\n $address = str_replace(\" \", \"+\", $address);\r\n $json = file_get_contents(\"http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false®ion=$region\");\r\n $json = json_decode($json);\r\n\t// echo \"<pre>\"; print_r($json); \r\n\r\n $lat = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};\r\n $long = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};\r\n return $lat.','.$long;\r\n}",
"function geolocate($address)\r\n\t{\r\n\t\t$lat = 0;\r\n\t\t$lng = 0;\r\n\t\t\r\n\t\t$data_location = \"http://maps.google.com/maps/api/geocode/json?address=\".str_replace(\" \", \"+\", $address).\"&sensor=false\";\r\n\t\t\r\n\t\tif ($this->region!=\"\" && strlen($this->region)==2) { $data_location .= \"®ion=\".$this->region; }\r\n\t\t$data = file_get_contents($data_location);\r\n\t\tusleep(200000);\r\n\t\t\r\n\t\t// turn this on to see if we are being blocked\r\n\t\t// echo $data;\r\n\t\t\r\n\t\t$data = json_decode($data);\r\n\t\t\r\n\t\tif ($data->status==\"OK\") {\r\n\t\t\t$lat = $data->results[0]->geometry->location->lat;\r\n\t\t\t$lng = $data->results[0]->geometry->location->lng;\r\n\t\t}\r\n\t\t\r\n\t\t// concatenate lat/long coordinates\r\n\t\t$coords['lat'] = $lat;\r\n\t\t$coords['lng'] = $lng;\r\n\t\t\r\n\t\treturn $coords;\r\n\t}",
"function getAddressAjax() {\n $this->load->model('Usermodel');\n $this->load->library('form_validation');\n $this->load->helper('form');\n $this->load->helper('string');\n $this->load->library('encrypt');\n\n $id = $this->input->post('id', TRUE);\n if (!$id) {\n show_404();\n }\n $rs = $this->Usermodel->getAddressbyID($id);\n $inner = array();\n $inner['addressdata'] = $rs;\n $page = array();\n $data = $this->load->view('edit-new-address-ajax', $inner, TRUE);\n\n $resArr = array();\n $resArr['type'] = 'true';\n $resArr['userhtml'] = $data;\n echo json_encode($resArr);\n }",
"function location($gps){\n\tglobal $api;\n\t$lat = $gps['lat'];\n\t$lon = $gps['lon'];\n\t$endpoint = \"https://us1.locationiq.com/v1/reverse.php?key=$api&lat=$lat&lon=$lon&format=json\";\n\techo \"https://www.google.com/maps/search/?q=$lat,$lon\\n\";\n\treturn file_get_contents($endpoint);\n}",
"function getLocationByIp($data)\n\t{\n\t\t$passArray = array();\n\t\t\n\t\t$ipAddress = $data['ipAddress'];\n\t\t$ipResult = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$ipAddress));\n\t\tif(sizeof($ipResult)>0)\n\t\t{\n\t\t\t$status =SUCCESS;\n\t\t\t$message = MESSAGE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$status =FAIL;\n\t\t\t$message = ERRORMESSAGE;\n\t\t}\t\t\n\t\t$response = array(\n\t\t\t\t\t\t\t\"Status\" => $status,\n\t\t\t\t\t\t\t\"Message\"=> $message,\n\t\t\t\t\t\t\t\"Result\" =>$ipResult\n\t\t\t\t\t\t);\n\n\t\treturn $response;\n\t}",
"function load_map_full_view($values) {\n $datas = DataManager::searchByData(null, $values['address']);\n \n $tpl = new Template(SiteConfig::templatesPath() . \"views/pages/map-view\");\n $tpl->address = $datas[0]->address.\",+\".$datas[0]->district.\"+\";\n $tpl->search = $datas[0]->lat.\",\".$datas[0]->lang;\n $tpl->id = $datas[0]->id;\n $resp = new AjaxResponse(true);\n $resp->setData($tpl->parse());\n\n if (count($datas) > 1) {\n $tpl = new Template(SiteConfig::templatesPath() . \"views/pages/search-detailed-result\");\n $tpl->datas = $datas;\n $tpl->addr = $values['address'];\n } else {\n $tpl = new Template(SiteConfig::templatesPath() . \"views/pages/search-result\");\n $mgr = new DataManager();\n $arr = array();\n $mgr->setAddress($values['address']);\n array_push($arr, $mgr);\n $tpl->datas = $arr;\n }\n\n\n\n $resp->setCustomData($tpl->parse());\n echo $resp->getOutput();\n exit();\n}",
"public function getLocation();",
"public function getLocation();",
"private function getLocation() {\n }",
"function check_geolocation($nameofgeo){\n\t$url = \"https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=\".str_replace(\" \",\"%\",$nameofgeo).\"&inputtype=textquery&fields=photos,formatted_address,name&locationbias=circle:[email protected],-122.2226413&key=AIzaSyDQfsEll4lB-xdxkLXGZA7_a2rMCyVM4Ok\";\n\t$json = file_get_contents($url);\n\t$json_data = json_decode($json, true);\n\tif ($json_data[\"status\"]==\"ZERO_RESULTS\")\n\t\treturn(\"Numele introdus nu este o geolocatie!\");\n\telse{\n\t\t#print_r($json_data['candidates'][0]['name']);\n\t\t#echo \" este nume pentru-> \"; \n\t\t#echo \"<br><br>\";\n\t\treturn($json_data[\"status\"]);\n\t}\n}",
"function getLocationInfoByIp() {\n\t\t$client = @$_SERVER['HTTP_CLIENT_IP'];\n\t\t$forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t$remote = @$_SERVER['REMOTE_ADDR'];\n\t\t$result = array('country'=>'', 'city'=>'');\n\t\tif(filter_var($client, FILTER_VALIDATE_IP)){\n\t\t\t$ip = $client;\n\t\t}elseif(filter_var($forward, FILTER_VALIDATE_IP)){\n\t\t\t$ip = $forward;\n\t\t}else{\n\t\t\t$ip = $remote;\n\t\t}\n\t\t$ip_data = @json_decode(file_get_contents(\"http://www.geoplugin.net/json.gp?ip=\".$ip));\n\t\tif($ip_data && $ip_data->geoplugin_countryName != null){\n\t\t\t$result['country'] = $ip_data->geoplugin_countryName;\n\t\t\t$result['city'] = $ip_data->geoplugin_city;\n\t\t\t$result['ip'] = $remote;\n\t\t}\n\t\treturn $result;\n }",
"public function getLocation_get(){\n $user_id = $this->input->get('user_id');\n\n $data = $this->User_model->select_data('latitude,longitude','tbl_users',array('id'=>$user_id));\n\n if(empty($data))\n\n {\n $result = array(\n \"controller\" => \"User\",\n \"action\" => \"getLocation\",\n \"ResponseCode\" => false,\n \"MessageWhatHappen\" => \"Not Found\"\n\n );\n }else{\n $result = array(\n \"controller\" => \"User\",\n \"action\" => \"getLocation\",\n \"ResponseCode\" => true,\n \"getLocationResponse\" => $data\n\n );\n }\n $this->set_response($result, REST_Controller::HTTP_OK);\n }",
"function getLocation($xml){\n\t$latitude = $xml->result->geometry->location->lat;\n $longitude = $xml->result->geometry->location->lng;\n $location = array(\"latitude\" => $latitude, \"longitude\" => $longitude);\n return ($location);\n}",
"function ip_data()\n {\n if(!$this->input->is_ajax_request()){\n $this->session->set_userdata('timestamp', time());\n $user_data = $this->session->userdata('surfer_info');\n $ip = $_SERVER['REMOTE_ADDR'];\n if (!$user_data) {\n if ($_SERVER['HTTP_HOST'] !== 'localhost') {\n $ip_data = file_get_contents(\"http://ip-api.com/json/\" . $ip);\n $this->session->set_userdata('surfer_info', $ip_data);\n }\n }\n }\n }",
"function _get_cloudflare_geolocation() {\n\t\treturn IMFORZA_Utils::get_cloudflare_geolocation();\n\t}",
"function getCoordination($address){\r\n $address = str_replace(\" \", \"+\", $address); // replace all the white space with \"+\" sign to match with google search pattern\r\n \r\n $url = \"http://maps.google.com/maps/api/geocode/json?sensor=false&address=$address\";\r\n \r\n $response = file_get_contents($url);\r\n \r\n $json = json_decode($response,TRUE); //generate array object from the response from the web\r\n\r\n $latitude = ($json[\"results\"][0][\"geometry\"][\"location\"][\"lat\"]);\r\n $longitude = ($json[\"results\"][0][\"geometry\"][\"location\"][\"lng\"]);\r\n\r\n return array(\"latitude\" => $latitude, \"longitude\" => $longitude);\r\n }",
"function getLatLong($address, $city, $postalCode) {\n $combinedAddress = $address . \", \" . $postalCode . \" \" . $city;\n\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\" . urlencode($combinedAddress) . \"&key=\" . Config::GOOGLE_API_KEY;\n $context = stream_context_create();\n $result = file_get_contents($url, false, $context);\n\n if (isset($result)) {\n $parsedResult = json_decode($result, true);\n\n if (isset($parsedResult[\"results\"])) {\n $results = $parsedResult[\"results\"];\n $firstLocation = $results[0];\n return $firstLocation[\"geometry\"][\"location\"];\n } else {\n echo($result);\n }\n } else {\n echo \"HELP\";\n }\n}",
"function grabUserLocation($input){\n $user_city = $input;\n $request_url = \"http://maps.googleapis.com/maps/api/geocode/json?address=\".$user_city.\"%20Canada&sensor=false\";\n $USERJSON = file_get_contents($request_url);\n $result = json_decode($USERJSON);\n $lat=$result->results[0]->geometry->location->lat;\n $long=$result->results[0]->geometry->location->lng;\n return compact('lat','long');\n}",
"function geoCheckIP($ip){\n $CI =& get_instance();\n\n if(isset($_SESSION['geo_ip_location']) && $_SESSION['geo_ip_location']['ip'] == $ip) {\n return $_SESSION['geo_ip_location'];\n }\n\n log_message('debug', \"geoCheckIP\");\n\t \n\t\t$json_data = file_get_contents(\"http://apinotes.com/ipaddress/ip.php?ip=$ip\");\n\t\t$ip_data = json_decode($json_data, TRUE);\n\t\tif ($ip_data['status'] == 'success') {\n $_SESSION['geo_ip_location'] = array(\n 'ip' => $ip,\n 'country_code' => $ip_data['country_code'],\n 'country_name' => $ip_data['country_name']\n );\n\n\t\t\t/*\n\t\t <p>Ip Address: <?php echo $ip_data['ip'] ?></p>\n\t\t <p>Country Name: <?php echo $ip_data['country_name'] ?></p>\n\t\t <p>Country Code: <?php echo $ip_data['country_code'] ?></p>\n\t\t <p>Country Code (3 digit): <?php echo $ip_data['country_code3'] ?></p>\n\t\t <p>Region Code: <?php echo $ip_data['region_code'] ?></p>\n\t\t <p>Region Name: <?php echo $ip_data['region_name'] ?></p>\n\t\t <p>City Name: <?php echo $ip_data['city_name'] ?></p>\n\t\t <p>Latitude: <?php echo $ip_data['latitude'] ?></p>\n\t\t <p>Longitude: <?php echo $ip_data['longitude'] ?></p>\n\t\t\t*/\n \n\t\t\treturn $ip_data;\n\t\t}\n\t}",
"function location_cmn($lat, $long, $usegeolocation, $customerno = null) {\n $address = NULL;\n $customerno = (!isset($customerno)) ? $_SESSION['customerno'] : $customerno;\n if (isset($lat) && isset($long)) {\n $GeoCoder_Obj = new GeoCoder($customerno);\n $address = $GeoCoder_Obj->get_location_bylatlong($lat, $long);\n }\n return $address;\n}",
"function plg_ipData($pro) {\r\n global $lib;\r\n $re = \"\";\r\n\r\n\r\n$lib = new Libs;\r\n\r\n\r\n\r\n\r\n\r\n if (isset($_GET['site'])) {\r\n $re = '';\r\n } else {\r\n\r\n\r\n $IP = $_SERVER['REMOTE_ADDR'];\r\n // $tt = file_get_contents('http://geoip.maxmind.com/a?l=hVWzBFybLR8f&i=' . $IP);\r\n\r\n $tt = \"EG\";\r\n // echo $lib->util->cities->urlConvert($tt);\r\n\r\n \r\n\r\n if (!isset($_GET['alias'])) {\r\n $re = ' <script>window.location = \\'/site/' . $lib->util->cities->urlConvert($tt) . '/\\'</script>';\r\n } else {\r\n $url = curPageURL();\r\n $u = explode($_GET['alias'], $url);\r\n\r\n $re = ' <script>window.location = \\'/site/' . $lib->util->cities->urlConvert($tt) . \"/\" . $_GET['alias'] . $u[1] . '\\'</script>';\r\n }\r\n }\r\n return $re;\r\n}",
"private function get_location () {\n try {\n // MaxMind GeoIP lookup\n // See: http://maxmind.github.io/GeoIP2-php/\n $reader = new Reader('assets/GeoLite2-City.mmdb');\n $record = $reader->city($_SERVER['REMOTE_ADDR']);\n return [\n 'lat' => $record->location->latitude,\n 'lng' => $record->location->longitude\n ];\n } catch (Exception $e) {\n return false;\n }\n }",
"function getLocationInfoByIp($ip){\r\n\r\n $ip_data = @json_decode(file_get_contents(\"http://www.geoplugin.net/json.gp?ip=\".$ip));\r\n if($ip_data && $ip_data->geoplugin_countryName != null){\r\n $result['country'] = $ip_data->geoplugin_countryCode;\r\n $result['city'] = $ip_data->geoplugin_city;\r\n }\r\n $country_short=$result['country'];\r\n $country_name=Locale::getDisplayRegion('sl-Latn-'.$country_short.'-nedis', 'en');\r\n return $country_name;\r\n}",
"public function index()\n {\n //get user ip address\n $ip_address = $_SERVER['REMOTE_ADDR'];\n //get user ip address details with geoplugin.net\n $geopluginURL = 'http://www.geoplugin.net/php.gp?id='.$ip_address;\n $addrDetailsArr = unserialize(file_get_contents($geopluginURL)); \n //dd($addrDetailsArr['geoplugin_countryName']);\n $geoAlbums = Http::get('http://ws.audioscrobbler.com/2.0/?method=geo.gettoptracks&country='.$addrDetailsArr['geoplugin_countryName'].'&api_key=915e43bd2c345fdb1aa3e2c00aca0c03&format=json')\n ->json()['tracks']['track'];\n //dump($geoAlbums);\n\n return view('geolocation', [\n 'addrDetailsArr' => $addrDetailsArr,\n 'geoAlbums' => collect($geoAlbums)->take(8),\n ]);\n }",
"function ip_data()\n {\n if(!$this->input->is_ajax_request()){\n $this->session->set_userdata('timestamp', time());\n $user_data = $this->session->userdata('surfer_info');\n $ip = $_SERVER['REMOTE_ADDR'];\n if (!$user_data) {\n if ($_SERVER['HTTP_HOST'] !== 'localhost' OR $_SERVER['HTTP_HOST'] !== 'ebuymazon.dev') {\n $ip_data = file_get_contents(\"http://ip-api.com/json/\" . $ip);\n $this->session->set_userdata('surfer_info', $ip_data);\n }\n }\n }\n }",
"function get_LatLong( $address ) {\n\t\t\t$this->set_geocoding_baseURL();\n\n\t\t\t$fullURL = $this->geocodeURL . urlencode( $address );\n\n\t\t\t$request_args = array(\n\t\t\t\t'timeout' => $this->slplus->options_nojs['http_timeout'],\n\t\t\t);\n\t\t\t$response = wp_remote_get( $fullURL, $request_args );\n\t\t\t$raw_json = is_wp_error( $response ) ? null : $response['body'];\n\n\t\t\treturn $raw_json;\n\t\t}",
"function geowidget_maybeyourcity_form_loadcity_callback($form, &$form_state) {\n return array(\n '#type' => 'ajax',\n '#commands' => array(\n array(\n 'command' => 'selectCity',\n 'arrParam' => _param_geowidget_maybeyourcity_form_loadcity_callback(),\n ),\n ),\n );\n}",
"public function ajaxGetLocations($query = null) {\r\n $xmlElement = new SimpleXMLElement(\"<?xml version='1.0' standalone='yes'?><root></root>\");\r\n $locations = $this->Location->find('all', array(\r\n 'conditions' => array(\r\n 'Location.Deleted' => 0\r\n ), 'fields' => array('Location.LocationID', 'Location.LocationCode'), 'recursive' => 0,\r\n \t\t'order'=>'Location.LocationCode asc'\r\n ));\r\n if ($query == null) {\r\n foreach ($locations as $location) {\r\n $xmlLocation = $xmlElement->addChild('location');\r\n $xmlLocation->addChild('id', $location['Location']['LocationID']);\r\n $xmlLocation->addChild('locationCode', $location['Location']['LocationCode']);\r\n }\r\n } else {\r\n foreach ($locations as $location) {\r\n if (strpos(strtolower($location['Location']['LocationCode']), strtolower($query)) !== false) {\r\n $xmlLocation = $xmlElement->addChild('location');\r\n $xmlLocation->addChild('id', $location['Location']['LocationID']);\r\n $xmlLocation->addChild('locationCode', $location['Location']['LocationCode']);\r\n }\r\n }\r\n }\r\n\r\n\r\n $this->set('xml', $xmlElement);\r\n //$this->set('locations', $Locations);\r\n $this->render('ajaxGetLocations', 'ajax');\r\n }",
"function getLocation(){ return $this->_Location;}",
"public function ajaxgetlocationbyclient(Request $request)\n {\n $client_id = $request->client_id;\n\n $locations = (new Salescenterslocations)->getclientLocationsInfo($client_id);\n $res_options = \"\";\n foreach($locations as $location){\n $res_options.=\"<option value=\\\"{$location->id}\\\" >\".$location->name.\"</option>\";\n }\n $response = array(\n 'status' => 'success',\n 'options' => $res_options,\n );\n return \\Response::json($response);\n }",
"function geocode($address){\n \n // url encode the address\n $address = urlencode($address);\n \n // google map geocode api url\n $url = \"http://maps.google.com/maps/api/geocode/json?address={$address}\";\n \n // get the json response\n $resp_json = file_get_contents($url);\n \n // decode the json\n $resp = json_decode($resp_json, true);\n ;\n // response status will be 'OK', if able to geocode given address \n if($resp['status']=='OK'){\n \n // get the important data\n $lati = $resp['results'][0]['geometry']['location']['lat'];\n $longi = $resp['results'][0]['geometry']['location']['lng'];\n $formatted_address = $resp['results'][0]['formatted_address'];\n \n // verify if data is complete\n if($lati && $longi && $formatted_address){\n \n // put the data in the array\n $data_arr = array(); \n \n array_push(\n $data_arr, \n $lati, \n $longi, \n $formatted_address\n );\n \n return $data_arr;\n \n }else{\n return false;\n }\n \n }else{\n return false;\n }\n}",
"function geocode($address)\n{\n $address = urlencode($address);\n\n // google map geocode api url\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?address={$address}&key=AIzaSyAkFXEAzdyEZaQe0ZSSVtaP5yeS4vW1ygE\";\n\n // get the json response\n $resp_json = file_get_contents($url);\n\n // decode the json\n $resp = json_decode($resp_json, true);\n\n // response status will be 'OK', if able to geocode given address \n if ($resp['status'] == 'OK') {\n\n // get the important data\n $lati = isset($resp['results'][0]['geometry']['location']['lat']) ? $resp['results'][0]['geometry']['location']['lat'] : \"\";\n $longi = isset($resp['results'][0]['geometry']['location']['lng']) ? $resp['results'][0]['geometry']['location']['lng'] : \"\";\n $formatted_address = isset($resp['results'][0]['formatted_address']) ? $resp['results'][0]['formatted_address'] : \"\";\n\n // verify if data is complete\n if ($lati && $longi && $formatted_address) {\n\n // put the data in the array\n $data_arr = array();\n\n array_push(\n $data_arr,\n $lati,\n $longi\n );\n\n return $data_arr;\n } else {\n return false;\n }\n } else {\n echo \"<strong>ERROR: {$resp['status']}</strong>\";\n return false;\n }\n}",
"function getLnt($zip){\r\n $url = \"http://maps.googleapis.com/maps/api/geocode/json?address=\r\n \".urlencode($zip).\"&sensor=false\";\r\n $result_string = file_get_contents($url);\r\n $result = json_decode($result_string, true);\r\n //print_r($result);die();\r\n return $result['results'][0]['geometry']['location'];\r\n }",
"function ajaxPhotographyDetails(){\n\t\n\t\t$this->loadModel('Photographer');\n\t\t$photographer = $this->Photographer->find('first',array('conditions'=>array('Photographer.id'=>$_POST['id'])));\n\t\t$photographerArr[\"name\"]= $photographer['Photographer']['name'];\n\t\t$photographerArr[\"mobile\"]= $photographer['Photographer']['mobile'];\n\t\t$photographerArr[\"website\"]= $photographer['Photographer']['website'];\n\t\t$photographerArr[\"email\"]= $photographer['User']['email'];\n\t\techo json_encode($photographerArr);\n\t\texit;\n\t\n\t}",
"function get_location_ip($ip){\n\t$url = 'http://www.geoplugin.net/php.gp?ip='.$ip;\n\tif($geo = unserialize(file_get_contents($url))){\n\t\t$geo = array(\n\t\t\t'lat' => $geo['geoplugin_latitude'],\n\t\t\t'lon' => $geo['geoplugin_longitude'],\n\t\t\t'city' => $geo['geoplugin_city'],\n\t\t\t'ccode' => $geo['geoplugin_countryCode'],\n\t\t\t'county' => $geo['geoplugin_countryName']\n\t\t);\n\t\treturn $geo;\n\t}\n\telse {\n\t\treturn array();\n\t}\n}",
"private function updateGeoCoords()\n\t{\n\t\t// $this->attributes contains payload of the session\n\t\t// $this->handler->get_table_row() contains extended Row's field like IP and Platform\n\t\t$row = $this->handler->get_table_row();\n\t\t$current_ip = PlatformDetector::getClientIp();\n\n\t\t// define the flag for new re-detection\n\t\t// if no coordinates is set\n\t\t$should_recheck_coords = !isset($this->attributes['geo_coords']);\n\t\t// or if IP address was changed\n\t\t$should_recheck_coords |= $row && $row['ip_address'] != $current_ip;\n\n\t\tif ($should_recheck_coords) {\n\t\t\t//Log::info('Recheck GEO coords for session');\n\t\t\t// we need to update geo coordinates\n\t\t\t$coords = GeoIPLib::get_lat_lon($current_ip);\n\t\t\t$this->attributes['geo_coords'] = [\n\t\t\t\t'latitude' => $coords[0],\n\t\t\t\t'longitude' => $coords[1],\n\t\t\t];\n\t\t}\n\n\t}",
"public function getGeolocation()\n {\n return $this->geolocation;\n }",
"private function getLatLng() {\n\t\tif( $this->getAutomaticLocation() && ( $this->isChanged() || ( !$this->getLat() && !$this->getLng() ) ) ) {\n\t\t\t$addressStr = $this->getAddLine1() . ' ' . $this->getStreetName() . ',' . $this->getTown();\n\t\t\t$addressStr.= ( $this->getCity() ) ? ',' . $this->getCity() : '';\n\t\t\t$addressStr.= ( $this->getRegion() ) ? ',' . $this->getRegion() : '';\n\t\t\t$addressStr.= ',' . $this->getPostalCode() . ',' . $this->getCountryCode();\n\t\t\t$req = sprintf( 'http://maps.googleapis.com/maps/api/geocode/json?address=%s&sensor=false', urlencode( $addressStr ) );\n\t\t\tif( !( $response = @file_get_contents( $req ) ) ) {\n\t\t\t\tthrow new Exception( sprintf( 'Unable to contact (%s)', $req ) );\n\t\t\t}\n\t\t\t$geoCode = json_decode( $response );\n// Do a switch here based on the possible status messages returned\n\t\t\tif( is_object( $geoCode ) ) {\n\t\t\t\tswitch( $geoCode->status ) {\n\t\t\t\t\tcase static::API_RESPONSE_ZERO_RESULTS:\n\t\t\t\t\t\t// ZERO RESULTS\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase static::API_RESPONSE_OK:\n\t\t\t\t\t\t$o = new StdClass();\n\t\t\t\t\t\t$o->Lat = $geoCode->results[0]->geometry->location->lat;\n\t\t\t\t\t\t$o->Lng = $geoCode->results[0]->geometry->location->lng;\n\t\t\t\t\t\treturn $o;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Exception( sprintf( 'Invalid response (%s) from (%s)', $response, $req ) );\n\t\t\t}\n\t\t} else {\n\t\t\t$o = new StdClass();\n\t\t\t$o->Lat = $this->getLat();\n\t\t\t$o->Lng = $this->getLng();\n\t\t\treturn $o;\n\t\t}\n\t}",
"private function getLocationGoogle()\n {\n $url = 'https://maps.googleapis.com/maps/api/geocode/json'; // api url\n $url .= '?address=' . $this->postcode; // postcode to search\n $url .= '&components=country:JP'; // filter by country Japan to prevent from ambiguos results\n $url .= '&key=' . $GLOBALS['apikey_googlemap']; // api key\n $result = $this->callAPI($url);\n // call function to extract api response \n return $result ? $this->extractGoogleResult(json_decode($result)) : false;\n }",
"function get_gps($mcc, $mnc, $lac, $cellid) {\r\n $gps_data = \"\";\r\n $key = \"f0d88cf6-3a80-4f12-830d-f4b8fd1f06b0\";\r\n\r\n ///JSON CODE\r\n //$URL = \"http://opencellid.org/cell/get?key=\".$key.\"&mcc=\".$mcc.\"&mnc=\".$mnc.\"&lac=\".$lac.\"&cellid=\".$cellid.\"&format=json\"; \r\n $URL = \"http://opencellid.org/cell/get?key=$key&mcc=$mcc&mnc=$mnc&lac=$lac&cellid=$cellid&format=json\";\r\n\r\n $raw = @file_get_contents($URL);\r\n $json_data = json_decode($raw);\r\n\r\n //var_dump($json_data);\r\n echo \"<br>\";\r\n //$json = '{\"foo-bar\": 12345}';\r\n //$obj = json_decode($json);\r\n //echo \"lon=\". $json_data->{'lon'}; // 12345\r\n\r\n $gps_data = $json_data->{'lat'} . \",\" . $json_data->{'lon'};\r\n return $gps_data;\r\n}",
"function get_lat_long($address){\r\n\t$API_KEY = 'AIzaSyC70LnMBiqyXcmpnQeryzq0VK12o6P5pnw';\r\n\t$address = str_replace(\" \", \"+\", $address);\r\n\t$url = \"https://maps.googleapis.com/maps/api/geocode/json?address=\".$address.\"&key=\".$API_KEY.\"\";\r\n\t$json = file_get_contents($url);\r\n\t$json = json_decode($json);\r\n\tif($json->status == 'ZERO_RESULTS'){\r\n\t\t$lat = 0;\r\n\t\t$long = 0; \t\r\n\t}else{\r\n\t\t$lat = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};\r\n\t\t$long = $json->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};\t\r\n\t}\r\n\t\r\n\t$location = [$lat,$long];\r\n\treturn $location;\r\n}",
"function wyz_get_businesses_js_data() {\n\t$nonce = filter_input( INPUT_POST, 'nonce' );\n\t/*if ( ! wp_verify_nonce( $nonce, 'wyz_ajax_custom_nonce' ) ) {\n\t\twp_die( 'busted' );\n\t}*/\n\n\t//$coor = get_post_meta( $l_id, 'wyz_location_coordinates', true );\n\n\t$bus_names = filter_input( INPUT_POST, 'bus-name' );\n\t$cat_id = filter_input( INPUT_POST, 'cat-id' );\n\t$loc_id = filter_input( INPUT_POST, 'loc-id' );\n\t$rad = filter_input( INPUT_POST, 'rad' );\n\t$lat = filter_input( INPUT_POST, 'lat' );\n\t$lon = filter_input( INPUT_POST, 'lon' );\n\t$is_listing_page = filter_input( INPUT_POST, 'is-listing' );\n\t$has_listings = filter_input( INPUT_POST, 'has-listings' );\n\t$is_grid_view = filter_input( INPUT_POST, 'is-grid' );\n\t$posts_per_page = filter_input( INPUT_POST, 'posts-per-page' );\n\t$page = filter_input( INPUT_POST, 'page' );\n\t$page_id = filter_input( INPUT_POST, 'page_id' );\n\n\t$has_near_me = get_post_meta( $page_id, 'wyz_near_me', true );\n\t$has_near_me = $is_listing_page && ! empty( $has_near_me );\n\t$has_listings = $is_listing_page && $has_listings;\n\tif ( $has_near_me ) {\n\t\t$near_me_count = get_post_meta( $page_id, 'wyz_near_me_count', true );\n\t\tif ( is_nan( $near_me_count ) || 1 > $near_me_count )\n\t\t\t$near_me_count = 10;\n\t\t$near_me_radius= get_post_meta( $page_id, 'wyz_near_me_radius', true );\n\t\tif ( is_nan( $near_me_radius ) || 1 > $near_me_radius )\n\t\t\t$near_me_radius = 500;\n\t\t$near_me_list = array();\n\t}\n\n\tif ( $posts_per_page < 0 || is_nan( $posts_per_page ) )\n\t\t$posts_per_page = 10;\n\n\n\t$template_type = '';\n\tif ( function_exists( 'wyz_get_theme_template' ) )\n\t\t\t$template_type = wyz_get_theme_template();\n\n\tif ( $template_type == 1 )\n\t\t$template_type = '';\n\n\n\tif ( ! $rad || '' == $rad || ! is_numeric( $rad ) ) {\n\t\t$rad = 0;\n\t\t$lat = $lon = 0;\n\t}\n\n\t$results = WyzHelpers::wyz_handle_business_search( $bus_names, $cat_id, $loc_id, $rad, $lat, $lon, $page );\n\t$args = $results['query'] ;\n\t$args['posts_per_page'] = 400;\n\t$lat = $results['lat'];\n\t$lon = $results['lon'];\n\t\n\t\n \t$featured_posts_per_page = get_option( 'wyz_featured_posts_perpage', 2 );\n \t\n \t\n \tif ($has_listings && empty($bus_names)) {\n \t\t\n\t\t$sticky_posts = get_option( 'sticky_posts' );\n\n\t\t$cat_feat = array(\n\t\t\t'post_type' => 'wyz_business',\n\t\t\t'post__in' => $sticky_posts,\n\t\t\t'fields' => 'ids',\n\t\t);\n\n \n\t\t$featured_businesses_args = array(\n\t\t\t'post_type' => 'wyz_business',\n\t\t\t//'posts_per_page' => $featured_posts_per_page,\n\t\t\t'post__in' => $sticky_posts,\n\t\t\t'fields' => 'ids',\n\t\t\t'offset' => $page,\n\t\t);\n\n\t\tif ( isset( $args['tax_query'] ) ) {\n\t\t\t$featured_businesses_args['tax_query'] = $args['tax_query'];\n\t\t}\n\n\n\t\t$featured_businesses_args = apply_filters( 'wyz_query_featured_businesses_args_search', $featured_businesses_args, $args );\n\n\n\t\t$query1 = new WP_Query( $featured_businesses_args );\n\n\t\t$sticky_posts = $query1->posts;\n\n\t\tif ( count( $sticky_posts ) > $featured_posts_per_page ) {\n\n\t\t\tWyzhelpers::fisherYatesShuffle( $sticky_posts, rand(10,100) );\n\t\t\t$sticky_posts = array_slice( $sticky_posts, 0, $featured_posts_per_page );\n\t\t}\n\n\t\t$args['fields'] = 'ids';\n\t\t//$args['post__not_in'] = get_option( 'sticky_posts' );\n\t\t$args['post_type'] = 'wyz_business';\n\n\t\t$query2 = new WP_Query( $args );\n\n\t\t$all_the_ids = array_merge( $sticky_posts, $query2->posts );\n\n\t\tif ( empty( $all_the_ids ) ) $all_the_ids = array( 0 );\n\n\t\t$final_query_args = array(\n\t\t\t'post_type' => 'wyz_business',\n\t\t\t'post__in' => $all_the_ids,\n\t\t\t'orderby' => 'post__in',\n\t\t\t'offset' => $page,\n\t\t\t'posts_per_page' => -1,\n\t\t);\n\n\n\t\t $query = new WP_Query( $final_query_args );\n\t\t\n \t}else {\n \t\n \t\t$query = new WP_Query($args);\n \t\n \t}\n\n\n\t$posts_for_nxt_loop = array();\n\n\t$user_favorites = WyzHelpers::get_user_favorites();\n\n\t$favorites = array();\n\n\t$locations = array();\n\t$marker_icons = array();\n\t$business_names = array();\n\t$range_radius = array();\n\t$business_after_names = array();\n\t$business_logoes = array();\n\t$business_permalinks = array();\n\t$business_cat_ids = array();\n\t$business_cat_colors = array();\n\t$business_list = '';\n\t$current_b_ids = array();\n\n\t$i = 0;\n\t$posts_count = 0;\n\t\n\t$def_arch_co = WyzHelpers::get_default_archive_map_coordinates();\n\t$def_marker_coor = array('latitude' => $def_arch_co[0], 'longitude' => $def_arch_co[1] );\n\n\twhile ( $query->have_posts() ) {\n\n\t\t$query->the_post();\n\t\t$b_id = get_the_ID();\n\t\t$temp_loc = get_post_meta( $b_id, 'wyz_business_location', true );\n\n\t\tif ( empty( $temp_loc ) ) {\n\t\t\t$temp_loc = array(\n\t\t\t\t'latitude' => $def_marker_coor['latitude'],\n\t\t\t\t'longitude' => $def_marker_coor['longitude'],\n\t\t\t);\n\t\t}\n\n\t\t$posts_count++;\n\n\t\t// If the business has map coordinates and is within range (in case search radius was provided),\n\t\t// add its id to $posts_for_nxt_loop\n\t\tif ( 0 != $lat && 0 != $lon && 0 != $rad ) {\n\t\t\t$pos = array( 'lat' => $temp_loc['latitude'], 'lon' => $temp_loc['longitude'] );\n\t\t\t$my_pos = array( 'lat' => $lat, 'lon' => $lon );\n\t\t\t$tmp_rad = WyzHelpers::get_distance_between( $pos, $my_pos );\n\t\t\tif(is_array( $tmp_rad )){\n\t\t\t\t$within = false;\n\t\t\t\tforeach ($tmp_rad as $rd) {\n\t\t\t\t\tif($rad>=$tmp_rad){\n\t\t\t\t\t\t$within = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!$within)\n\t\t\t\t\tcontinue;\n\t\t\t}else{\n\t\t\t\tif ( $rad < $tmp_rad )\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tarray_push( $favorites, in_array( $b_id, $user_favorites ) );\n\t\tarray_push( $locations, $temp_loc );\n\t\tarray_push( $business_names, get_the_title() );\n\t\tarray_push( $business_after_names, apply_filters( 'wyzi_after_business_name_info_bubble', '', $b_id ) );\n\t\tarray_push( $business_permalinks, esc_url( get_the_permalink() ) );\n\t\tarray_push( $range_radius, WyzHelpers::get_business_range_radius_in_meters( get_the_ID() ) );\n\t\tarray_push( $posts_for_nxt_loop, $b_id );\n\t\tif ( $has_near_me ) {\n\t\t\t$distance = WyzHelpers::get_user_business_distance( $b_id );\n\t\t\tif (isset( $distance['distance']['value'] ) && is_numeric( $distance['distance']['value'] ) && $distance['distance']['value'] <= $near_me_radius ) {\n\t\t\t\t$near_me_list[] = array(\n\t\t\t\t\t'id' => $b_id,\n\t\t\t\t\t'distance' => $distance['distance']['value']\n\t\t\t\t);\n\t\t\t\tusort($near_me_list,'wyz_cmp_listings_near_me');\n\t\t\t\t$near_me_list = array_slice( $near_me_list, 0, $near_me_count );\n\t\t\t}\n\t\t}\n\n\n\n\t\tif ( $has_listings && $i++ < ( $posts_per_page + $featured_posts_per_page ) ) {\n\n\t\t\tarray_push( $current_b_ids, $b_id );\n\t\t\tif ( $is_grid_view ) {\n\t\t\t\t$business_list .= WyzBusinessPost::wyz_create_business_grid_look();\n\n\t\t\t} else {\n\t\t\t\t$business_list .= WyzBusinessPost::wyz_create_business();\n\t\t\t}\n\t\t}\n\n\t\tarray_push( $business_logoes, wyzHelpers::get_post_thumbnail( $b_id, 'business', 'medium', array( 'class' => 'business-logo-marker' ) ) );\n\n\t\t$temp_term = WyzHelpers::wyz_get_representative_business_category_id( $b_id );\n\n\t\tif ( '' != $temp_term ) {\n\n\t\t\t$col = get_term_meta( $temp_term, 'wyz_business_cat_bg_color', true );\n\t\t\t$holder = wp_get_attachment_url( get_term_meta( $temp_term, \"map_icon$template_type\", true ) );\n\t\t\t\t\n\t\t} else {\n\t\t\t$col = '';\n\t\t}\n\t\tif ( ! isset( $holder ) || false == $holder ) {\n\t\t\t$marker = '';\n\t\t} else {\n\t\t\t$marker = $holder;\n\t\t}\n\n\t\tarray_push( $business_cat_ids, intval( $temp_term ) );\n\t\tarray_push( $business_cat_colors, $col );\n\t\t\t\t\n\n\t\tif ( false == $marker ) {\n\t\t\tarray_push( $marker_icons, '' );\n\t\t\tarray_push( $business_cat_ids, -1 );\n\t\t} else {\n\t\t\tarray_push( $marker_icons, $marker );\n\t\t}\n\t}\n\twp_reset_postdata();\n\n\n\tif ( empty( $posts_for_nxt_loop ) ) {\n\t\t$posts_for_nxt_loop[] = -1;\n\t}\n\t\n\tif ( $has_listings ) {\n\t\t$remaining_pages = ceil( ( sizeof( $posts_for_nxt_loop ) / ( float ) $posts_per_page ) -1 );\n\t} else {\n\t\t$remaining_pages = 0;\n\t}\n\n\twp_reset_postdata();\n\t\n\tif(!$page&&empty($business_list))\n\t $business_list = WyzHelpers::wyz_info( esc_html__('No Businesses match your search.'), true );\n\n\tif ( ! isset( $locations ) || ! isset( $marker_icons ) ) {\n\t\t$locations = array();\n\t\t$marker_icons = array();\n\t}\n// Lets pass Essential Grid Shortcode in case needed\n\t$ess_grid_shortcode ='';\n\n\tif ( function_exists( 'wyz_get_theme_template' ) ) {\n\t\t$template_type = wyz_get_theme_template();\n\t\t\n\t\tif ( $template_type == 2 ) {\n\t\t\t$grid_alias = wyz_get_option( 'listing_archives_ess_grid' );\n\t\t\t$ess_grid_shortcode = do_shortcode( '[ess_grid alias=\"' . $grid_alias .'\" posts='.implode(',',$current_b_ids).']' );\n\t\t}\n\t}\n\n\t$near_me_content = '';\n\t$near_me_content_count = 0;\n\tif ( isset( $near_me_list ) && count( $near_me_list ) > 0 ) {\n\t\t$nm_b_ids = array();\n\t\tforeach ($near_me_list as $b ) {\n\t\t\t$nm_b_ids[] = $b['id'];\n\t\t}\n\t\tif ( ! empty( $nm_b_ids ) ) {\n\t\t\t$near_me_content = WYZISlidersFactory::the_rec_added_slider( apply_filters( 'wyz_nearme_attributes', array( 'loop' => false, 'nav' => false, 'autoplay_timeout' => 1, 'autoplay' => false) ), $nm_b_ids );\n\t\t\t$near_me_content_count = count($nm_b_ids);\n\t\t}\n\t}\n\n\t$global_map_java_data = array(\n\t\t'defCoor' => array(),\n\t\t'radiusUnit' => '',\n\t\t'GPSLocations' => $locations,\n\t\t'markersWithIcons' => $marker_icons,\n\t\t'businessNames' => $business_names,\n\t\t'afterBusinessNames' => $business_after_names,\n\t\t'businessLogoes' => $business_logoes,\n\t\t'businessPermalinks' => $business_permalinks,\n\t\t'businessCategories' => $business_cat_ids,\n\t\t'businessCategoriesColors' => $business_cat_colors,\n\t\t'hasNearMe' => $has_near_me,\n\t\t'nearMeContent' => $near_me_content,\n\t\t'nearMeContentCount' => $near_me_content_count,\n\t\t'isListingPage' => $is_listing_page,\n\t\t'hasLists' => $has_listings,\n\t\t'postsPerPage' =>$posts_per_page,\n\t\t'businessIds' => $posts_for_nxt_loop,\n\t\t'businessList' => $business_list,\n\t\t'hasAfter' => $remaining_pages > 0,\n\t\t'favorites' => $favorites,\n\t\t'hasBefore' => false,\n\t\t'postsCount' => $posts_count,\n\t\t'ess_grid_shortcode' => $ess_grid_shortcode,\n\t\t'range_radius' => $range_radius,\n\t);\n\n\twp_die( wp_json_encode( $global_map_java_data ) );\n}",
"function geocode($address)\n{\n\n // url encode the address\n $address = urlencode($address);\n\n // google map geocode api url\n $url = \"https://maps.googleapis.com/maps/api/geocode/json?key=AIzaSyDZwgb_z_wFGqrzvxbrLri_CXJRjklDoTM&address={$address}\";\n\n // get the json response\n $resp_json = file_get_contents($url);\n\n // decode the json\n $resp = json_decode($resp_json, true);\n // response status will be 'OK', if able to geocode given address\n if ($resp['status'] == 'OK') {\n\n // get the important data\n $lati = $resp['results'][0]['geometry']['location']['lat'];\n $longi = $resp['results'][0]['geometry']['location']['lng'];\n\n // verify if data is complete\n if ($lati && $longi) {\n // put the data in the array\n $data_arr = array();\n\n array_push(\n $data_arr,\n $lati,\n $longi\n );\n\n return $data_arr;\n\n } else {\n return false;\n }\n\n } else {\n return false;\n }\n}",
"function fetchGoogleLatitudeLocation ($user_id) {\n $r = array();\n $google_latitude_data = json_decode(file_get_contents(\"https://www.google.com/latitude/apps/badge/api?user=$user_id&type=json\"));\n $r['longitude'] = $google_latitude_data->features[0]->geometry->coordinates[0];\n $r['latitude'] = $google_latitude_data->features[0]->geometry->coordinates[1];\n $r['current_city'] = $google_latitude_data->features[0]->properties->reverseGeocode;\n $r['last_updated'] = $google_latitude_data->features[0]->properties->timeStamp;\n $r['raw'] = $google_latitude_data; // So that we have it all, if we need it.\n return $r;\n }",
"public function afficheMarker(){\r\n \r\n $request = $this->_bdd->query(\"SELECT gps.`id`, gps.id_bateau, gps.latitude, gps.longitude, bateau.nom FROM gps, bateau WHERE gps.id_bateau = bateau.id ORDER BY `gps`.`id` DESC\");\r\n while ($tab = $request->fetch()){ ?>\r\n <script> \r\n \"<?= $tab['nom'] ?>\":{\r\n \"lat\": <?= $tab['latitude'] ?>;\r\n \"lon\": <?= $tab['longitude'] ?>;\r\n };\r\n </script>\r\n <?php\r\n } \r\n}",
"private function getLocation() {\n $ch = curl_init();\n $timeout = 5;\n curl_setopt($ch, CURLOPT_URL, 'http://widgets.wia.io/embed/wgt_ca2Yvooa/dev_faldy1tg');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n $data = curl_exec($ch);\n curl_close($ch);\n $arr = array('See our Terms and Conditions!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error(\"Segment snippet included twice.\");else{analytics.invoked=!0;analytics.methods=[\"trackSubmit\",\"trackClick\",\"trackLink\",\"trackForm\",\"pageview\",\"identify\",\"reset\",\"group\",\"track\",\"ready\",\"alias\",\"debug\",\"page\",\"once\",\"off\",\"on\"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t',\n 'DeviceTrackerUpdated','Widget'\n );\n $data = strip_tags($data);\n $data = str_replace($arr, '', $data);\n\n $arr2 = array('~var wia = \\'.*\\';~','~var wiaDevice = \\'.*\\';~','~var wiaWidget = \\'.*\\';~','~var wiaEvents = \\'.*\\';~','~var wiaEvent = \\'.*\\';~','~.* .* ago~');\n $data = preg_replace($arr2, '', $data);\n $data = str_replace(array('var wiaLocation = ',';','\\''),'',$data);\n echo trim($data);\n }",
"public function getUserLocation();",
"function addAddressAjax() {\n $this->load->model('Usermodel');\n $this->load->library('form_validation');\n $this->load->helper('form');\n $this->load->helper('string');\n $this->load->library('encrypt');\n\n\n $inner = array();\n $page = array();\n $data = $this->load->view('add-new-address-ajax', $inner, TRUE);\n\n $resArr = array();\n $resArr['type'] = 'true';\n $resArr['userhtml'] = $data;\n echo json_encode($resArr);\n }",
"function get_location( $args = array() ) {\n\t$throttle_geonames = $throttle_ip2location = $location = false;\n\n\t// For a country request, no lat/long are returned.\n\tif ( isset( $args['country'] ) ) {\n\t\t$location = array(\n\t\t\t'country' => $args['country'],\n\t\t);\n\t}\n\n\t// Coordinates provided\n\tif (\n\t\t! $location && (\n\t\t\t! empty( $args['latitude'] ) && is_numeric( $args['latitude'] ) &&\n\t\t\t! empty( $args['longitude'] ) && is_numeric( $args['longitude'] )\n\t\t)\n\t) {\n\t\t$location = array(\n\t\t\t'description' => false,\n\t\t\t'latitude' => $args['latitude'],\n\t\t\t'longitude' => $args['longitude'],\n\t\t);\n\t}\n\n\t// City was provided by the user:\n\tif ( ! $location && isset( $args['location_name'] ) ) {\n\t\t$throttle_geonames = mt_rand( 1, 100 ) <= THROTTLE_GEONAMES;\n\n\t\tif ( $throttle_geonames ) {\n\t\t\treturn 'temp-request-throttled';\n\t\t}\n\n\t\t$country_code = get_country_code_from_locale( $args['locale'] ?? '' );\n\t\t$guess = guess_location_from_city( $args['location_name'], $args['timezone'] ?? '', $country_code );\n\n\t\t$country_types = array(\n\t\t\t// See http://download.geonames.org/export/dump/featureCodes_en.txt\n\n\t\t\t'A.PCL', // political entity\n\t\t\t'A.PCLD', // dependent political entity\n\t\t\t'A.PCLF', // freely associated state\n\t\t\t'A.PCLH', // historical political entity\ta former political entity\n\t\t\t'A.PCLI', // independent political entity\n\t\t\t'A.PCLIX', // section of independent political entity\n\t\t\t'A.PCLS', // semi-independent political entity\n\t\t\t'A.PRSH', // parish an ecclesiastical district\n\t\t\t'A.TERR', // territory\n\t\t\t'A.ZN', // zone\n\t\t);\n\n\t\tif ( $guess && in_array( $guess->type, $country_types, true ) ) {\n\t\t\t$location = array(\n\t\t\t\t'country' => $guess->country,\n\t\t\t\t'description' => $guess->name,\n\t\t\t);\n\t\t} elseif ( $guess ) {\n\t\t\t$location = array(\n\t\t\t\t'description' => $guess->name,\n\t\t\t\t'latitude' => $guess->latitude,\n\t\t\t\t'longitude' => $guess->longitude,\n\t\t\t\t'country' => $guess->country,\n\t\t\t);\n\t\t} else {\n\t\t\t$guess = guess_location_from_country( $args['location_name'] );\n\n\t\t\tif ( $guess ) {\n\t\t\t\t$location = array(\n\t\t\t\t\t'country' => $guess['country_short'],\n\t\t\t\t\t'description' => $guess['country_long'],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( ! $location ) {\n\t\tif ( isset( $args['location_name'] ) || isset( $args['ip'] ) || ! empty( $args['latitude'] ) || ! empty( $args['longitude'] ) ) {\n\t\t\t// If any of these are specified, and no localitity was guessed based on the above checks, bail with no location.\n\t\t\t$location = false;\n\t\t} else {\n\t\t\t// No specific location details.\n\t\t\t$location = array();\n\t\t}\n\t}\n\n\t// IP:\n\tif ( ! $location && isset( $args['ip'] ) && ! isset( $args['location_name'] ) ) {\n\t\t$throttle_ip2location = mt_rand( 1, 100 ) <= THROTTLE_IP2LOCATION;\n\n\t\tif ( $throttle_ip2location ) {\n\t\t\treturn 'temp-request-throttled';\n\t\t}\n\n\t\t$guess = guess_location_from_ip( $args['ip'] );\n\n\t\tif ( $guess ) {\n\t\t\t$location = array(\n\t\t\t\t'description' => $guess->ip_city,\n\t\t\t\t'latitude' => $guess->ip_latitude,\n\t\t\t\t'longitude' => $guess->ip_longitude,\n\t\t\t\t'country' => $guess->country_short,\n\n\t\t\t\t/*\n\t\t\t\t * ip2location's EULA forbids exposing the derived location publicly, so flag the\n\t\t\t\t * data for internal use only.\n\t\t\t\t */\n\t\t\t\t'internal' => true,\n\t\t\t);\n\t\t}\n\t}\n\n\treturn $location;\n}",
"public function ajax_load_dashboard_point() {\n\t\twpeo_check_01::check( 'wpeo_nonce_load_dashboard_point_' . $_POST['point_id'] );\n\n\t\tglobal $task_controller;\n\t\tglobal $point_controller;\n\t\tglobal $time_controller;\n\n\t\t$task \t\t\t\t= $task_controller->show( $_POST['task_id'] );\n\t\t$point \t\t\t\t= $point_controller->show( $_POST['point_id'] );\n\t\t$list_time \t\t=\t$time_controller->index( $taks->id, array( 'parent' => $point->id, 'status' => -34070 ) );\n\n\t\tob_start();\n\t\trequire( wpeo_template_01::get_template_part( WPEO_POINT_DIR, WPEO_POINT_TEMPLATES_MAIN_DIR, 'backend', 'window-point' ) );\n\t\twp_send_json_success( array( 'template' => ob_get_clean() ) );\n\t}",
"function ssc_location_js () {\n\t?>\n\t<script type=\"text/javascript\">\n jQuery(document).ready(function($){\n \tdata = { 'action': 'ssc_location_update_form' };\n \t//$('form.ssc_location_contact #submit').addClass('contact_submit').removeAttr('id').removeAttr('name');\n\n \t$('form.ssc_location_contact .location_submit').click( function( event ) {\n \t\tdata['form'] = 'form.ssc_location_contact';\n\n \t\tevent.preventDefault();\n \t\t//alert( data['form']);\n \t\t/*\n \t\tvar locationFields = new Array();\n \t\tlocationFields['street'] = $('.ssc_admin_location_settings_street').val();\n \t\tlocationFields['city'] = $('.ssc_admin_location_settings_city').val();\n \t\tlocationFields['state'] = $('.ssc_admin_location_settings_state').val();\n \t\tlocationFields['zip'] = $('.ssc_admin_location_settings_zip').val();\n \t\talert ( locationFields['street'] );\n \t\t/**/\n \t\tdata['street'] = $('.ssc_admin_contact_settings_street').val();\n \t\tdata['city'] = $('.ssc_admin_contact_settings_city').val();\n \t\tdata['state'] = $('.ssc_admin_contact_settings_state').val();\n \t\tdata['zip'] = $('.ssc_admin_contact_settings_zip').val();\n \t\t//alert( data['zip'] );\n \t\t$('#wpwrap').addClass('progress');\n \t\tgetLocation( data );\n \t});\n \tfunction formSubmit ( data ) {\n \t\tconsole.log( 'submit form' );\n \t\t$('form.ssc_location_contact').submit();\n \t\t/*\n \t\t$( data['form'] ).submit( function() {\n \t\t\tconsole.log('form submit');\n \t\t});\n/**/\n \t}\n \tfunction getLocation ( data ) {\n \t\t\n \t$.post( ajaxurl, data, function( response ) {\n if ( response ) {\n \t\n var obj = jQuery.parseJSON( response ); //response;\n console.log(obj.type);\n if ( obj.type == 'success' ) { \n \talert( obj.message );\n //updateOptions( data, obj );\n //$('form.ssc_location').submit(); //$(data['form']).submit();\n //return true;\n formSubmit( data );\n }\n else {\n //alert( 'There are no ' + data['data']['type'] + ' please add some.' );\n alert( 'The address ' + data['street'] + ' ' + data['city'] + ' ' + data['state'] + ', ' + data['zip'] + ' could not be found. Please check the address and be sure you entered it exactly as listed by the postal service. (HINT: Use Google Maps )' );\n $('#wpwrap').removeClass('progress');\n return false;\n }\n }\n else {\n \talert( );\n return false;\n }\n });\n }\n });\n </script>\n\t<?php\n}",
"public function getLocationByFpo($fpo_id) {\n $location_data = $this->Share_Model->getLocationByFpo( $fpo_id );\n $response = array(\"status\" => 1, \"location_data\" => $location_data);\n echo json_encode($response);\n\t}",
"function getCity(){\r\n\t\t$user_ip = getenv('REMOTE_ADDR');\r\n\t\t$geo = unserialize(file_get_contents(\"http://www.geoplugin.net/php.gp?ip=$user_ip\"));\r\n\t\t$city = $geo[\"geoplugin_city\"];\r\n\t\t\r\n\t\treturn $city;\r\n\t\t/*\r\n\t\t$region = $geo[\"geoplugin_regionName\"];\r\n\t\t$country = $geo[\"geoplugin_countryName\"];\r\n\t\techo \"City: \".$city.\"<br>\";\r\n\t\techo \"Region: \".$region.\"<br>\";\r\n\t\techo \"Country: \".$country.\"<br>\";\r\n\t\tgeoplugin_request\r\n\t\tgeoplugin_status\r\n\t\tgeoplugin_credit\r\n\t\tgeoplugin_city\r\n\t\tgeoplugin_region\r\n\t\tgeoplugin_areaCode\r\n\t\tgeoplugin_dmaCode\r\n\t\tgeoplugin_countryCode\r\n\t\tgeoplugin_countryName\r\n\t\tgeoplugin_continentCode\r\n\t\tgeoplugin_latitude\r\n\t\tgeoplugin_longitude\r\n\t\tgeoplugin_regionCode\r\n\t\tgeoplugin_regionName\r\n\t\tgeoplugin_currencyCode\r\n\t\tgeoplugin_currencySymbol\r\n\t\tgeoplugin_currencySymbol_UTF8\r\n\t\tgeoplugin_currencyConverter\r\n\t\t*/\t\r\n\t}",
"function parse_gis_location() {\n $output = $this->latitude . ';' . $this->longitude;\n if (!empty($this->radius)) {\n $output .= '!' . $this->radius;\n }\n return $output;\n }",
"public function geocode()\n {\n try\n {\n if (is_null($this->httpAdapter))\n {\n $this->httpAdapter = new sfYahooAdapterHttpStream();\n }\n\n $this->httpAdapter->setParameters($this->parameters);\n\n $this->rawResponse = $this->httpAdapter->handle();\n\n return $this->getResults($this->rawResponse);\n }\n catch (Exception $e)\n {\n throw $e;\n }\n }",
"function geocode($address) {\n\t\t// http://maps.google.com/maps/api/geocode/json?address=\n\n\t\t// encodage de l'adresse pour la soumettre par url (remplacer les espaces présents dans l'adresse par des %20)\n\t\t$address = urlencode($address);\n\n\t\t// url de l'API pour géocoder \n\t\t$urlApi = \"http://maps.google.com/maps/api/geocode/json?address=$address\";\n\n\t\t// appel à l'api gmap decode (en GET - réponse en JSON)\n\t\t$responseJson = file_get_contents($urlApi);\n\n\t\t// décodage du json pour le transformer en array php associatif (-> 2ème paramètre : true)\n\t\t$responseArray = json_decode($responseJson, true);\n\n/*\t\techo '<pre>';\n\t\tprint_r($responseArray);\n\t\techo '</pre>';*/\n\n\t\t// on prépare un tableau associatif de retour pcq on 2 infos (lat et lng à retourner alors \n\t\t// qu'une fonction ne peut avoir qu'un seul retour)\n\t\t$response = [];\n\n\t\t// je teste le status de réponse de l'api -> OK (sinon, cela signifie qu'il n'y a pas de correspondance -> 'zero résult')\n\t\tif($responseArray['status'] == 'OK') {\n\t\t\t$lat = $responseArray['results']['0']['geometry']['location']['lat'];\n\t\t\t$lng = $responseArray['results']['0']['geometry']['location']['lng'];\n\n/*\t\t\techo $lat.'</br>';\n\t\t\techo $lng.'</br>';*/\n\n\t\t\t// test facultatif - on vérifie seulement que lat et lng sont bien présentes \n\t\t\tif($lat && $lng) {\n\t\t\t\t$response['lat'] = $lat;\n\t\t\t\t$response['lng'] = $lng;\n\t\t\t}\n\t\t}\n\t\treturn $response;\n\t}",
"function showlocation() {\r\n drupal_add_js(array('gojira' => array('page' => 'showlocation')), 'setting');\r\n drupal_add_js(array('gojira' => array('loc' => $_GET['loc'])), 'setting');\r\n return theme('showlocation');\r\n}",
"function getCityAndCountry($location){\n if ($location == '') return array('city'=>'', 'country'=>'');\n \n $e = Event::model()->findByAttributes(array(\"location\"=>$location));\n if ($e){\n if ($e->country && $e->city) return array('city'=>$e->city, 'country'=>$e->country);\n }\n \n $location = str_ireplace(\"zda\", \"\", $location);\n \n $url = 'https://maps.googleapis.com/maps/api/geocode/json?address='.urlencode($location).'&sensor=false';\n $httpClient = new elHttpClient();\n $httpClient->setUserAgent(\"ff3\");\n $httpClient->setHeaders(array(\"Accept\"=>\"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\"));\n $htmlDataObject = $httpClient->get($url);\n $result = $htmlDataObject->httpBody;\n \n $result = json_decode($result);\n \n $country = '';\n $city = '';\n \n if ($result->status == 'OK'){\n if (isset($result->results[0]->address_components)){\n $components = $result->results[0]->address_components;\n foreach ($components as $component){\n if ($component->types[0] == 'country'){\n $country = $component->long_name;\n }\n //if ($component->types[0] == 'postal_town'){\n if ($component->types[0] == 'locality'){\n $city = $component->long_name;\n }\n }\n }\n }else{\n return array('city'=>'', 'country'=>'');\n //die(print_r($result,true));\n }\n \n //die($city.\"-\".$country.\" | \".print_r($result,true));\n return array('city'=>$city, 'country'=>$country);\n }",
"function geocode($street_address,$city,$state){\n \n $street_address = str_replace(\" \", \"+\", $street_address); //google doesn't like spaces in urls, but who does?\n $city = str_replace(\" \", \"+\", $city);\n $state = str_replace(\" \", \"+\", $state);\n\n $url = \"http://maps.googleapis.com/maps/api/geocode/json?address=$street_address,+$city,+$state&sensor=false\"; \n $google_api_response = wp_remote_get( $url ); \n\n $results = json_decode( $google_api_response['body'] ); //grab our results from Google\n $results = (array) $results; //cast them to an array\n $status = $results[\"status\"]; //easily use our status\n $location_all_fields = (array) $results[\"results\"][0];\n $location_geometry = (array) $location_all_fields[\"geometry\"];\n $location_lat_long = (array) $location_geometry[\"location\"];\n\n // echo \"<!-- GEOCODE RESPONSE \" ;\n // var_dump( $location_lat_long );\n // echo \" -->\";\n\n if( $status == 'OK'){\n $latitude = $location_lat_long[\"lat\"];\n $longitude = $location_lat_long[\"lng\"];\n }else{\n $latitude = '';\n $longitude = '';\n }\n\n $return = array(\n 'latitude' => $latitude,\n 'longitude' => $longitude\n );\n return $return;\n}",
"function get_ip_address()\n{\n $ip = $_SERVER['REMOTE_ADDR'];\n return $_SERVER['REMOTE_ADDR'];\n //return var_export(unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $ip)));\n}",
"function initMap() {\n\n\t\t// Instantiate the xajax object and configure it\n\t\trequire_once (t3lib_extMgm::extPath('xajax') . 'class.tx_xajax.php');\n\t\t$this->xajax = t3lib_div::makeInstance('tx_xajax'); // Make the instance\n\t\tif ($GLOBALS['TSFE']->metaCharset == 'utf-8') {\n\t\t\t$this->xajax->decodeUTF8InputOn(); // Decode form vars from utf8\n\t\t}\n\t\t$this->xajax->setCharEncoding($GLOBALS['TSFE']->metaCharset); \t\t// Encode of the response to utf-8 ???\n\t\t$this->xajax->setWrapperPrefix($this->prefixId); \t\t// To prevent conflicts, prepend the extension prefix\n\t\t$this->xajax->statusMessagesOn(); \t\t// Do you wnat messages in the status bar?\n\n\t\t// register the functions of the ajax requests\n\t\t$this->xajax->registerFunction(array('infomsg', &$this, 'ajaxGetInfomsg'));\n\t\t$this->xajax->registerFunction(array('activeRecords', &$this, 'ajaxGetActiveRecords'));\n\t\t$this->xajax->registerFunction(array('processCat', &$this, 'ajaxProcessCat'));\n\t\t$this->xajax->registerFunction(array('tab', &$this, 'ajaxGetPoiTab'));\n\t\t$this->xajax->registerFunction(array('search', &$this, 'ajaxSearch'));\n\t\t$this->xajax->registerFunction(array('processCatTree', &$this, 'ajaxProcessCatTree'));\n\t\t$this->xajax->registerFunction(array('getDynamicList', &$this, 'ajaxGetDynamicList'));\n\n\t\t$this->xajax->processRequests();\n\n\t\t// additional output using a template\n\t\t$template['total'] = $this->cObj2->getSubpart($this->templateCode,'###HEADER###');\n\t\t$markerArray = $subpartArray = array();\n\t\t$markerArray['###PATH###'] = t3lib_extMgm::siteRelpath('rggooglemap');\n\n\t\tif ($this->conf['map.']['addLanguage'] == 1) {\n\t\t\tif ($this->conf['map.']['addLanguage.']['override'] != '') {\n\t\t\t\t$markerArray['###MAP_KEY###'] .= '&hl=' . $this->conf['map.']['addLanguage.']['override'];\n\t\t\t} elseif ($GLOBALS['TSFE']->lang != '') {\n\t\t\t\t$markerArray['###MAP_KEY###'] .= '&hl=' . $GLOBALS['TSFE']->lang;\n\t\t\t}\n\t\t}\n\n\t\t$markerArray['###DYNAMIC_JS###'] = $this->getJs();\n\n\t\t// load spefic files if needed for clustering\n\t\tif ($this->conf['map.']['activateCluster'] == 1) { // gxmarkers\n\t\t\t$subpartArray['###CLUSTER_2###'] = '';\n\n\t\t} elseif ($this->conf['map.']['activateCluster'] == 2) { // markerclusterer\n\t\t\t$subpartArray['###CLUSTER_1###'] = '';\n\t\t} else { // no clustering\n\t\t\t$subpartArray['###CLUSTER_1###'] = $subpartArray['###CLUSTER_2###'] = '';\n\t\t}\n\n\t\t$totalJS = $this->cObj2->substituteMarkerArrayCached($template['total'],$markerArray, $subpartArray);\n\t\t$GLOBALS['TSFE']->additionalHeaderData['rggooglemap_xajax'] = $this->xajax->getJavascript(t3lib_extMgm::siteRelPath('xajax'));\n\t\t$GLOBALS['TSFE']->additionalHeaderData['rggooglemap_js'] = $totalJS;\n\t}",
"function whereabouts_addmap_fetch_location_go() {\n\n // Get auth code\n\t$auth_code = get_option( 'whereabouts_swarm_auth_code' );\n\n // Check if file path is set and exists\n if ( isset( $auth_code ) AND ! empty( $auth_code ) ) {\n\n\t\t$url = 'https://api.foursquare.com/v2/users/self/checkins?oauth_token='.$auth_code.'&v=20140806&locale=en&limit=1';\n\n\t\t$response = wp_remote_get( $url );\n\n\t\tif ( is_wp_error( $response ) ) {\n\n\t\t\t$error_messages = $response->get_error_messages();\n\t\t\tforeach( $error_messages as $message ) {\n\t\t\t\techo '<span class=\"error\">' . implode( $error_messages, '<br />' ) . '<br />Maybe the <a href=\"http://where.abouts.io/faq/\">FAQs</a> are helpful?</span>';\n\t\t\t}\n\n\t\t}\n\t\telse {\n \n \t$obj = json_decode( $response['body'] );\n\n\t\t\tif ( isset( $obj->meta->code ) AND $obj->meta->code == 200 ) {\n\n\t\t\t\t$current_location = $obj->response->checkins->items[0];\n\n\t\t\t\tupdate_option( 'whereabouts_swarm_current_location', $current_location );\n\n\t\t\t\treturn '<span class=\"updated\">' . __( 'You current location was updated successfully.', 'whereabouts-swarm' ) . '</span>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn '<span class=\"error\">' . __( '<strong>Error:</strong> The data received from Swarm could not be processed. Please check our <a href=\"https://where.abouts.io/faq\">FAQs</a> for details. ', 'whereabouts-swarm' ) . '</span>';\n\t\t\t}\n\t\t}\n\t}\n}",
"public function getLocation()\n {\n if (array_key_exists('location', $this->userInfo)) {\n return $this->userInfo['location'];\n }\n\n elseif (isset($this->response['placesLived']) && is_array($this->response['placesLived']))\n {\n foreach ($this->response['placesLived'] as $location)\n {\n if (isset($location['primary']) && $location['primary'] == 1)\n {\n if (isset($location['value']))\n {\n $loc = preg_replace('/[\\x03-\\x20]{2,}/sxSX', ' ', $location['value']);\n $glue = ',';\n\n if (strpos($location, $glue) === false) {\n $glue = ' ';\n }\n $loc = explode($glue, $loc);\n\n if(count($loc) <= 3) {\n $this->userInfo['city'] = trim($loc[0]);\n $this->userInfo['country'] = isset($loc[1]) ? isset($loc[2]) ? trim($loc[2]) : trim($loc[1]) : null;\n }\n else{\n $this->userInfo['city'] = null;\n $this->userInfo['country'] = null;\n }\n\n return $this->userInfo['location'] = $location['value'];\n }\n break;\n }\n }\n }\n\n $this->userInfo['city'] = null;\n $this->userInfo['country'] = null;\n\n return $this->userInfo['location'] = null;\n }",
"function getGeocodeData($address) {\n $address = urlencode($address);\n $googleMapUrl = \"https://maps.googleapis.com/maps/api/geocode/json?address={$address}&key=AIzaSyCXB6yLq41R_CSfl2saDa1pqqOutnamespace OCFram\\Blog\\Model;PwVNnI\";\n $geocodeResponseData = file_get_contents($googleMapUrl);\n $responseData = json_decode($geocodeResponseData, true);\n if($responseData['status']=='OK') {\n $latitude = isset($responseData['results'][0]['geometry']['location']['lat']) ? $responseData['results'][0]['geometry']['location']['lat'] : \"\";\n $longitude = isset($responseData['results'][0]['geometry']['location']['lng']) ? $responseData['results'][0]['geometry']['location']['lng'] : \"\";\n $formattedAddress = isset($responseData['results'][0]['formatted_address']) ? $responseData['results'][0]['formatted_address'] : \"\";\n if($latitude && $longitude && $formattedAddress) {\n $geocodeData = $latitude . \";\" . $longitude;\n return $geocodeData;\n } else {\n return false;\n }\n } else {\n echo \"ERROR: {$responseData['status']}\";\n return false;\n }\n }",
"private function loadMapa()\n {\n \n $this->evento->id = $this->id;\n $this->evento->pegaInfo();\n \n echo \"<div class='evento-info2-title'>\".$this->evento->nome.\"</div>\";\n echo \"<div class='evento-list-introduction'>Visualize o mapa para chegar ao local do seu evento.</div>\";\n echo \"<input type='hidden' id='adress' value='\".$this->evento->logradouro.\" \".$this->evento->bairro.\", \".$this->evento->cidade.\" ,\" . $this->evento->escolherEstado() . \"' />\";\n echo \"<script type=\\\"text/javascript\\\" src=\\\"http://maps.google.com/maps/api/js?sensor=false\\\"></script>\";\n echo \"<div id=\\\"mapevento\\\"></div>\";\n \n }",
"function oneclick_google_map_plugin_geolocationpage()\r\r\n{\r\r\n if (!current_user_can('manage_options')) {\r\r\n wp_die('We hereby declarating :You are not authorised to access this plugin');\r\r\n }\r\r\n global $plugin_url;\r\r\n global $options;\r\r\n if (isset($_POST['geolocation_settings_form_submitted'])) {\r\r\n $hidden_field = esc_html($_POST['geolocation_settings_form_submitted']);\r\r\n if ($hidden_field == \"Y\") {\r\r\n $gmap_iconizer_latitude = esc_html($_POST['gmap_iconizer_latitude']);\r\r\n $options_geolocation_page['gmap_iconizer_latitude'] = $gmap_iconizer_latitude;\r\r\n $gmap_iconizer_longitude = esc_html($_POST['gmap_iconizer_longitude']);\r\r\n $options_geolocation_page['gmap_iconizer_longitude'] = $gmap_iconizer_longitude;\r\r\n $gmap_iconizer_zoom_level = esc_html($_POST['gmap_iconizer_zoom_level']);\r\r\n $options_geolocation_page['gmap_iconizer_zoom_level'] = $gmap_iconizer_zoom_level;\r\r\n update_option('oneclick_geolocation', $options_geolocation_page);\r\r\n $url = admin_url('admin.php?page=oneclick-google-map', 'http');\r\r\n echo '<script> window.location=\"';\r\r\n echo $url . '\"; </script> ';\r\r\n }\r\r\n }\r\r\n $options = get_option('oneclick_geolocation');\r\r\n $gmap_iconizer_zoom_level = $options['gmap_iconizer_zoom_level'];\r\r\n $gmap_iconizer_latitude = $options['gmap_iconizer_latitude'];\r\r\n $gmap_iconizer_longitude = $options['gmap_iconizer_longitude'];\r\r\n require ('includes/plugin_geolocation_wrapper.php');\r\r\n}",
"function getlatlng($address)\n\t{\n\t\t#perintah pengulangan jika terdapat query limit saat mendapatkan data\n\t\tgetlatlng:\n\t\t$data = json_decode(file_get_contents(\"http://maps.google.com/maps/api/geocode/json?address=\" . urlencode($address)));\n\t\t\n\t\t#berhenti jika data tidak lagi over query limit\n\t\tif($data->status == \"OVER_QUERY_LIMIT\")\n\t\t{\n\t\t\tgoto getlatlng;\n\t\t}else \n\t\t{\n\t\t\treturn \"{$data->results[0]->geometry->location->lat},{$data->results[0]->geometry->location->lng}\";\n\t\t}\n\t}",
"public function getLocation()\n {\n return $this->getLocationData();\n }",
"function getLatLng($address = NULL)\n {\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, 'http://maps.googleapis.com/maps/api/geocode/xml?address='.urlencode($address).'&sensor=true');\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t$xml_response = curl_exec($ch);\n\tcurl_close($ch);\n\n\t$xml = new SimpleXMLElement($xml_response);\n $data = array(\n 'lat' => $xml->result->geometry->location->lat,\n 'lng' => $xml->result->geometry->location->lng\n );\n return $data;\n }",
"function get_latlon_ip($ip){\n\t$url = 'http://www.geoplugin.net/php.gp?ip='.$ip;\n\tif($geo = unserialize(file_get_contents($url))){\n\t\t$lat = $geo['geoplugin_latitude'];\n\t\t$lon = $geo['geoplugin_longitude'];\n\t\treturn sprintf('%s,%s',$lat,$lon);\n\t}\n\telse {\n\t\treturn false;\n\t}\n}",
"public function getLat();",
"public function _before_index(){\n// $ip = get_client_ip();\n// $res = $ip_class->getlocation('113.102.162.102');\n// print_r($res);\n \n \n }",
"function admin_head()\n\t{\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t\t#map {width: 100%; height: 500px; margin-top: 10px;}\n\t\t</style>\n\t\t <script src='http://maps.googleapis.com/maps/api/js?sensor=false' type='text/javascript'></script>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tfunction load() {\n\t\t\t\t\tvar exists = 0, marker;\n\t\t\t\t\t// get the lat and lng from our input field\n\t\t\t\t\tvar coords = jQuery('.location').val();\n\t\t\t\t\t// if input field is empty, default coords\n\t\t\t\t\tif (coords === '') {\n\t\t\t\t\t\tlat = 45.77598686952638; \n\t\t\t\t\t\tlng = 15.985933542251587;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// split the coords by ;\n\t\t\t\t\t\ttemp = coords.split(';');\n\t\t\t\t\t\tlat = parseFloat(temp[0]);\n\t\t\t\t\t\tlng = parseFloat(temp[1]);\n\t\t\t\t\t\texists = 1;\n\t\t\t\t\t}\n\t\t\t\t\t// coordinates to latLng\n\t\t\t\t\tvar latlng = new google.maps.LatLng(lat, lng);\n\t\t\t\t\t// map Options\n\t\t\t\t\tvar myOptions = {\n\t\t\t\t\t zoom: 8,\n\t\t\t\t\t center: latlng,\n\t\t\t\t\t mapTypeId: google.maps.MapTypeId.ROADMAP\n\t\t\t\t\t};\n\t\t\t\t\t//draw a map\n\t\t\t\t\tvar map = new google.maps.Map(document.getElementById(\"map\"), myOptions);\n\t\t\t\t\t\n\t\t\t\t\t// if we had coords in input field, put a marker on that spot\n\t\t\t\t\tif(exists == 1) {\n\t\t\t\t\t\tmarker = new google.maps.Marker({\n\t\t\t\t\t\t\tposition: map.getCenter(),\n\t\t\t\t\t\t\tmap: map,\n\t\t\t\t\t\t\tdraggable: true\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// click event\n\t\t\t\t\tgoogle.maps.event.addListener(map, 'click', function(point) {\n\t\t\t\t\t\tif (exists == 0) {\n\t\t\t\t\t\t\texists = 1;\n\t\t\t\t\t\t\t// drawing the marker on the clicked spot\n\t\t\t\t\t\t\tmarker = new google.maps.Marker({\n\t\t\t\t\t\t\t\tposition: point.latLng,\n\t\t\t\t\t\t\t\tmap: map,\n\t\t\t\t\t\t\t\tdraggable: true\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t//put the coordinates to input field\n\t\t\t\t\t\t\tjQuery('.location').val(marker.getPosition().lat() + ';' + marker.getPosition().lng());\n\t\t\t\t\t\t\t// drag event for add screen\n\t\t\t\t\t\t\tgoogle.maps.event.addListener(marker, \"dragend\", function (mEvent) { \n\t\t\t\t\t\t\t\tjQuery('.location').val(mEvent.latLng.lat() + ';' + mEvent.latLng.lng());\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// only one marker on the map!\n\t\t\t\t\t\t\talert('Marker already on the map! Drag it to desired location.');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t//dragend event for update screen\n\t\t\t\t\tif(exists === 1) {\n\t\t\t\t\t\tgoogle.maps.event.addListener(marker, \"dragend\", function (mEvent) { \n\t\t\t\t\t\t\tjQuery('.location').val(mEvent.latLng.lat() + ';' + mEvent.latLng.lng());\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tjQuery(document).ready(function(){\n\t\t\t\tif (jQuery('.location').length > 0) {\n\t\t\t\t\tload();\n\t\t\t\t}\n\t\t\t});\n\t\t\t</script>\n\n\t\t<?php\n\t}",
"function set_map(){\r\n //setta chiave api nella composizione dell'url\r\n echo \"\r\n <script src=\\\"http://maps.google.com/maps?file=api&v=2&key=\". $this->apikey .\"&sensor=false\\\" type=\\\"text/javascript\\\">\r\n </script>\r\n \";\r\n \r\n //assegna il contenuto alla variabile JScenterMap la quale permette di geolocalizzare un punto sulla mappa tramite indirizzo\r\n \r\n if($this->indirizzo!=\"\"){\r\n \t$JScenterMap = \"\r\n \tvar geocoder = new GClientGeocoder();\r\n \tgeocoder.getLatLng('\".$this->indirizzo.\"',function(point) {\r\n if (!point) {\r\n alert('\".$this->indirizzo.\"' + \\\" not found\\\");\r\n } else {\r\n map.setCenter(point, 13);\r\n var marker = createMarker(point, 'Ciao');\r\n map.addOverlay(marker); \r\n }\r\n });\r\n \t\";\r\n\t } else {\r\n \t\t$JScenterMap = \"map.setCenter(new GLatLng(\".$this->latitudine.\", \".$this->longitudine.\"), 11);\";\r\n /*\r\n $creamarker = \"var marker1 = createMarker(new GLatLng(\".$this->latitudini[$i].\", \".$this->longitudine[$i].\"), '\" .$this->nomi[$i] .\"');\r\n map.addOverlay(marker1);\";*/\r\n \r\n }\r\n \r\n\t \r\n //inizializza il punto sulla mappa in base al contenuto della variabile JScenterMap\r\n //window.onload permette di richiamare il metodo initialize e Gunload (per svuotare la memoria) direttamente da qui senza specificarlo nel body\r\n echo \"\r\n <script type=\\\"text/javascript\\\">\r\n \r\n \t function createMarker(point,html) {\r\n\t\t\t\tvar marker = new GMarker(point);\r\n\t\t\t\tGEvent.addListener(marker, \\\"mouseover\\\", function() { marker.openInfoWindowHtml(html); });\r\n\t\t\t\treturn marker;\r\n\t\t\t }\r\n \r\n \t window.onload = initialize; \r\n window.onunload = GUnload;\r\n function initialize() {\r\n if (GBrowserIsCompatible()) {\r\n var map = new GMap2(document.getElementById(\\\"map_canvas\\\")); \";\r\n echo $JScenterMap; \r\n //CREAZIONE MARKER DINAMICAMENTE\r\n //alert(\\\"ciao\\\" + $i);\r\n for ($i=0;$i<10;$i++){\r\n echo \"\r\n var marker1 = createMarker(new GLatLng(\".$this->latitudini[$i].\", \".$this->longitudini[$i].\"), '\" .$this->nomi[$i] .\"');\r\n \t\t\tmap.addOverlay(marker1); \";\r\n \t\t } \r\n echo \"map.setUIToDefault();\r\n }\r\n }\r\n </script>\r\n \";\r\n\t}",
"function get_user_analytics_info() {\n global $wp_version;\n\n $url = 'http://freegeoip.net/json/' . $_SERVER['REMOTE_ADDR'];\n $params = array(\n 'timeout' => 30,\n 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' )\n );\n\n $response = wp_remote_get( $url, $params );\n $user_data = wp_remote_retrieve_body( $response );\n\n if ( is_wp_error( $response ) || $response['response']['code'] != 200 ) {\n return false;\n }\n\n $user_info = (array) json_decode( $user_data );\n $user_analytics_info = array_merge( $user_info, array( 'browser_pc' => $_SERVER['HTTP_USER_AGENT'] ) );\n\n return $user_analytics_info;\n }",
"function location_autocomplete_init() {\n\telgg_extend_view('css/elgg', 'location_autocomplete/css');\n \n elgg_register_js('elgg.jquery_min', \"http://code.jquery.com/jquery-1.4.2.min.js\");\n \n elgg_register_js('elgg.google_map', \"http://maps.google.com/maps/api/js?sensor=false\");\n \n $custom_js = elgg_get_simplecache_url('js', 'location_autocomplete/jquery_custom');\n\telgg_register_js('elgg.jquery_custom', $custom_js); \n \n $suggests_js = elgg_get_simplecache_url('js', 'location_autocomplete/geo_suggests');\n\telgg_register_js('elgg.geo_suggests', $suggests_js); \n \n elgg_extend_view(\"forms/profile/edit\", \"location_autocomplete/load_js\");\n \n elgg_extend_view(\"forms/register\", \"location_autocomplete/load_js\"); \n\n\n}",
"function getLatLong($url){\n\t$contents = \"\";\n\t//Pull in XML data\n\t$xml = simplexml_load_file($url);\n\t//Go get the Latitude\n\t$geoLat = $xml->channel->item->xpath(\"geo:lat\");\n\t$contents .= $geoLat[0].\",\";\n\t//Go get the Longitude\n\t$geoLong = $xml->channel->item->xpath(\"geo:long\");\n\t$contents .= $geoLong[0];\n\t//Return Lat and Long\n\treturn $contents;\n\n}",
"public function GeoLocate($addr){\n $geoapi = \"http://maps.googleapis.com/maps/api/geocode/json\";\n $params = array(\"address\"=>$addr,\"sensor\"=>\"false\");\n $response = $this->GET($geoapi,$params);\n $json = json_decode($response);\n if ($json->status === \"ZERO_RESULTS\") {\n return NULL;\n } else {\n return array($json->results[0]->geometry->location->lat,$json->results[0]->geometry->location->lng);\n }\n }",
"public function getlocationbimbel(Request $request)\n {\n\n $url = 'https://api.mapbox.com/geocoding/v5/mapbox.places/'.$request->lng.','.$request->lat.'.json?access_token=pk.eyJ1Ijoic2hvcGtsaWVuIiwiYSI6ImNqcWd4MjZpcjJtaW8zeHBiM3R6a3JkaHMifQ.aOg0HE-JWjVyPySLhJC65w&types=locality';\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POST, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $response = curl_exec ($ch);\n $err = curl_error($ch); //if you need\n curl_close ($ch);\n // $as = print_r($response);\n\n $data = json_decode($response, true);\n return $data['features'][0]['place_name'];\n }",
"function geolocate($locations){\n $json_returns_array = array();\n $lat_lng_pairs_array = array();\n\n foreach ($locations as $location) {\n $location = $location.','.$SOC_COUNTRY;\n $url = 'http://maps.googleapis.com/maps/api/geocode/json?address='.$location.'&sensor=false';\n\n $obj = getJSONResponse($url,$location);\n $latlng = ''. $obj['results'][0]['geometry']['location']['lat'].\",\".$obj['results'][0]['geometry']['location']['lng'];\n\n array_push($json_returns_array, $obj);\n array_push($lat_lng_pairs_array, $latlng);\n }\n\n return $lat_lng_pairs_array;\n/*\n // Now that we have the JSONs for all the locations, check if any non-countries exist in there. If yes, then discard the SOC_COUNTRY\n if (count($json_returns_array) > 1){\n $type = $obj['results'][0]['address_components'][0]['types'][0];\n if (strtolower($type) == 'country') {\n }\n } \n*/\n}",
"public function dynamic_map(Request $request){\n $lat = '-24.4228873';\n $lang = '131.5279022';\n if(Cookie::get('user_state')){\n \n $user_state = json_decode(Cookie::get('user_state')); \n \n if($user_state->region){\n $state = States::where('short_name',$user_state->region)->first();\n if($state){\n $lat = $state->lat;\n $lang = $state->lang;\n }\n\n }\n\n\n } \n\n return view('map_test',['lat'=>(float)$lat,'lang'=>(float)$lang]);\n }",
"public function getIpInfo()\n {\n $this->checkAjaxToken();\n $this->throwForbiddenUnless(SecurityUtil::checkPermission('Ztools::', '::', ACCESS_OVERVIEW));\n\n $ip_adr = $this->request->request->get('ip_adr', '');\n $alert = '';\n $content = '';\n \n if (!$ip_adr) {\n $alert .= $this->__('No IP passed.');\n } else {\n ob_start();\n $serviceName = 'ipinfo.io';\n $serviceLinks = 'http://ipinfo.io/' . $ip_adr; // to pass to tpl for visiting site\n @readfile('http://ipinfo.io/' . $ip_adr . '/json');\n $json = ob_get_contents();\n ob_end_clean();\n if ($json) {\n try {\n $item = json_decode($json, true);\n if (false) {\n ob_start();\n pr($item);\n $content .= ob_get_contents();\n ob_end_clean();\n } else {\n if (is_array($item)) {\n // Standardize output\n $item_s = array();\n $item_s['ip'] = isset($item['ip']) ? $item['ip'] : '';\n $item_s['hostname'] = isset($item['hostname']) ? $item['hostname'] : '';\n $item_s['city'] = isset($item['city']) ? $item['city'] : '';\n $item_s['region'] = isset($item['region']) ? $item['region'] : '';\n $item_s['country_code'] = isset($item['country']) ? $item['country'] : '';\n $item_s['country_name'] = (isset($item['country']) && $item['country']) ? ZLanguage::getCountryName($item['country']) : '';\n $item_s['latitude'] = '';\n $item_s['longitude'] = '';\n if (isset($item['loc']) && $item['loc']) {\n $aLatLong = explode(',', $item['loc']);\n if (is_array($aLatLong)) {\n $item_s['latitude'] = $aLatLong[0];\n $item_s['longitude'] = $aLatLong[1];\n }\n }\n $item_s['org'] = isset($item['org']) ? $item['org'] : '';\n // Generate output\n Zikula_AbstractController::configureView();\n $this->view->assign('item', $item_s);\n $this->view->assign('serviceName', $serviceName);\n $this->view->assign('serviceLinks', $serviceLinks);\n $content .= $this->view->fetch('admin/ipinfo.tpl');\n }\n }\n } catch (Exception $e) {\n $content .= $e->getMessage();\n } \n } else {\n $alert .= $this->__f('Could not get info.');\n }\n }\n\n return new Zikula_Response_Ajax(array('ip' => $ip_adr, 'content' => $content, 'alert' => $alert));\n }",
"function new_geo_info(){\n\t\tadd_meta_box( \n\t\t\t'geo_info_section',\n\t\t\t'geo_info',\n\t\t\t'geo_custom_box',\n\t\t\t'post'\n\t\t);\n\t}",
"function google_map_get_coordinates( $address, $force_refresh = false ) {\n\t$address_hash = md5( $address );\n\t$coordinates = get_transient( $address_hash );\n\tif ($force_refresh || $coordinates === false) {\n\t\t$args = array( 'address' => urlencode( $address ), 'sensor' => 'false', 'key' => 'AIzaSyA4-ZxE3QqrSWpnwsjSke4Bs5DDN1LeFB0' );\n\t\t$url = add_query_arg( $args, 'https://maps.googleapis.com/maps/api/geocode/json' );\n\t\t// var_dump($url);\n\t\t$response \t= wp_remote_get( $url );\n\t\tif( is_wp_error( $response ) )\n\t\t\treturn;\n\t\t$data = wp_remote_retrieve_body( $response );\n\t\tif( is_wp_error( $data ) )\n\t\t\treturn;\n\t\tif ( $response['response']['code'] == 200 ) {\n\t\t\t// var_dump($data);\n\t\t\t$data = json_decode( $data );\n\t\t\tif ( $data->status === 'OK' ) {\n\t\t\t\t$coordinates = $data->results[0]->geometry->location;\n\t\t\t\t$cache_value['lat'] \t= $coordinates->lat;\n\t\t\t\t$cache_value['lng'] \t= $coordinates->lng;\n\t\t\t\t$cache_value['address'] = (string) $data->results[0]->formatted_address;\n\t\t\t\t// // cache coordinates for 3 months\n\t\t\t\t// set_transient($address_hash, $cache_value, 3600*24*30*3);\n\t\t\t\t// $data = $cache_value;\n\t\t\t\t// var_dump($data->status);\n\t\t\t} elseif ( $data->status === 'ZERO_RESULTS' ) {\n\t\t\t\treturn __( 'No location for the address.', 'aletheme' );\n\t\t\t} elseif( $data->status === 'INVALID_REQUEST' ) {\n\t\t\t\treturn __( 'Bad request. Did you enter an address name?', 'aletheme' );\n\t\t\t} else {\n\t\t\t\treturn ($data->status);\n\t\t\t\t// return __( 'Error, please check if you have entered the shortcode correctly.', 'aletheme' );\n\t\t\t}\n\t\t} else {\n\t\t\treturn __( 'Can\\'t connect Google API.', 'aletheme' );\n\t\t}\n\t} else {\n\t\t// return cached results\n\t\t$data = $coordinates;\n\t}\n\t// return (array) $data;\n\t$coords = array();\n\t// var_dump($data);\n\t// print(\"<pre>\".print_r($data,true).\"</pre>\");\n\t// var_dump($data->results[0]->geometry->location->lat);\n\t$coords['lat'] = $data->results[0]->geometry->location->lat;\n\t$coords['lng'] = $data->results[0]->geometry->location->lng;\n\t// var_dump($data->results[0]->geometry->location->lng);\n\treturn $coords;\n}",
"public function getMap( $ajax = true ) {\n if( FileManager::isFileAvailable( FileManager::CACHE_JAVASCRIPT_FILE_MAP_VALUES ) \n && FileManager::isFileAvailable( FileManager::CACHE_FILE_MAP_VALUES ) ) {\n $this->mapValues = FileManager::readFromCache( 'mapData', FileManager::CACHE_FILE_MAP_VALUES );\n return;\n }\n $today = $this->getSlice( $this->getLastDate(), 0, 1 );\n $lastWeek = $this->getSlice( $this->getLastDate() - 604800, 0, 1 ); // One week = 7*24*60*60\n $lastWeekReported = array_combine( array_column( $lastWeek, FileManager::HEADER_CITY_CODE ), array_column( $lastWeek, FileManager::HEADER_REPORTED ));\n\n $this->getInhabitantsPerCity();\n\n $dataset = array();\n $i=0;\n foreach( $today as $row ) {\n $citycode = $row[ FileManager::HEADER_CITY_CODE ];\n $dataset[$i][\"citycode\"] = $citycode;\n $dataset[$i][\"cityname\"] = $row[ FileManager::HEADER_CITY_NAME ];\n $dataset[$i][\"reported\"] = $row[ FileManager::HEADER_REPORTED ] - $lastWeekReported[ $citycode ];\n $value = round( 1000000 * ( $row[ FileManager::HEADER_REPORTED ] - $lastWeekReported[ $citycode ] )\n / $this->listOfInhabitants[ $citycode ][FileManager::HEADER_INHABITANTS] ) / 10;\n $dataset[$i][\"value\"] = ( $value < 0 ) ? 0 : $value;\n $i++;\n }\n FileManager::saveToCache( 'mapData', $dataset, FileManager::CACHE_JAVASCRIPT_FILE_MAP_VALUES, 'javascript' );\n FileManager::saveToCache( 'mapData', $dataset, FileManager::CACHE_FILE_MAP_VALUES, 'php' );\n $this->mapValues = $dataset;\n return;\n }",
"public static function get_cloudflare_geolocation() {\n\t\t\treturn ( isset( $_SERVER['HTTP_CF_IPCOUNTRY'] ) ? $_SERVER['HTTP_CF_IPCOUNTRY'] : '' );\n\t\t}",
"function showLocationBox () {\n\t\t$template['list'] = $this->cObj2->getSubpart($this->templateCode,'###TEMPLATE_LOCATIONBOX###');\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['location.']['LL'], 'location');\n\n\t\t$content = $this->cObj2->substituteMarkerArrayCached($template['list'],$markerArray);\n\t\treturn $content;\n\t}",
"public function location()\n {\n $city = $this->city;\n if ($city) {\n $subdivision = $city->subdivision;\n $country = $subdivision->country;\n\n $this->attributes['location'] = $city->name . ' ' . $subdivision->abbreviation . ', ' . $country->name;\n } else {\n $this->attributes['location'] = null;\n }\n }",
"function getForceAndNhood($lat, $lng) {\n\t// My unique username and password, woo! The API requires this on every query.\n\t$userpass = POLICE_API_KEY;\n\t$url = \"http://policeapi2.rkh.co.uk/api/locate-neighbourhood?q=$lat,$lng\";\n\n\t$curl = curl_init();\n\n\t// Gotta put dat password in.\n\tcurl_setopt($curl, CURLOPT_USERPWD, $userpass);\n\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\n\t// Without this, we just get \"1\" or similar.\n\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n\n\t$data = curl_exec($curl);\n\n\tcurl_close($curl);\n\n\t// The API returns JSON, and json_decode produces an interesting mix of objects and arrays.\n\t$dataObj = json_decode($data);\n\t\n\treturn $dataObj;\n\t}",
"function GoogleMap($lat = 0, $long = 0, $location_title = \"course location\")\n\t{\tob_start();\n\t\techo \"<script type='text/javascript'>\n\t\t\twindow.onload=function(){\n\t\t\tgminitialize(\", $lat, \", \", $long, \", \\\"\", $this->InputSafeString($location_title), \"\\\");\n\t\t\t};\n\t\t\tdocument.getElementById('gmap').style.display='block';\n\t\t\t</script>\\n\";\n\t\treturn ob_get_clean();\n\t}"
] | [
"0.66101533",
"0.61367625",
"0.6015483",
"0.60123855",
"0.5960278",
"0.586756",
"0.58545876",
"0.5834137",
"0.58313656",
"0.5772265",
"0.57561314",
"0.571694",
"0.565401",
"0.56371737",
"0.5608076",
"0.55945003",
"0.5571893",
"0.5571893",
"0.55613744",
"0.5553205",
"0.55112016",
"0.5494891",
"0.547919",
"0.5474777",
"0.5467186",
"0.54646283",
"0.54547274",
"0.54529",
"0.5430559",
"0.5420713",
"0.540634",
"0.53864026",
"0.53827274",
"0.5317129",
"0.5302547",
"0.53023803",
"0.52960324",
"0.5292152",
"0.5292058",
"0.52809143",
"0.52807635",
"0.52792954",
"0.5279069",
"0.52551615",
"0.5250206",
"0.52380323",
"0.52300745",
"0.5225684",
"0.52224606",
"0.52194744",
"0.52139",
"0.5204356",
"0.520013",
"0.5198171",
"0.5197137",
"0.51961416",
"0.5186827",
"0.5170039",
"0.5168229",
"0.515842",
"0.51537573",
"0.51513183",
"0.51364106",
"0.5133091",
"0.5129315",
"0.5123562",
"0.5123335",
"0.51174045",
"0.51170224",
"0.51168245",
"0.5112842",
"0.51073825",
"0.5104608",
"0.51040417",
"0.51020706",
"0.50958705",
"0.50831354",
"0.5079975",
"0.5070019",
"0.506831",
"0.5053101",
"0.5053008",
"0.5045458",
"0.50426817",
"0.5040451",
"0.50404453",
"0.5034944",
"0.5027027",
"0.50188273",
"0.501465",
"0.50112826",
"0.50061256",
"0.50057006",
"0.4999054",
"0.4987771",
"0.4983512",
"0.49827003",
"0.49755076",
"0.49738586",
"0.4971991"
] | 0.65096796 | 1 |
Render Geolocation log view | public function actionLog()
{
$searchModel = new LogGeoSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('log', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
'users' => (new User())->getUsers('name'),
'severities' => ArrayHelper::map(Severity::find()->all(), 'name', 'name'),
'actions' => LogGeo::find()->select('action')->indexBy('action')->asArray()->column()
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function render($data) {\n\t\t$this->body->set_template('report_geolocation.tpl');\n\t\t$this->body->set('latest_visits', $this->get('latest_visits'));\n\t\t$this->body->set('site_id', $this->get('site_id') );\n\t\t$this->setjs('jmaps', 'base/js/includes/jquery/jquery.jmap-r72.js');\n\t\t$this->setjs('owa.map', 'base/js/owa.map.js');\n\t}",
"public function displaysGoogleMapWithDatestampedLocation()\n {\n\n // Arrange\n $this->login();\n $org = $this->orgSet[0];\n $loc = json_decode($this->viewLocationSetJson,true)[0];\n $vehicle = $this->vehicleSet[0];\n $expectedDatetime = (new \\DateTime($loc['received_at']))->format('j/m/Y, G:i:s');\n\n // Act\n $this->byCssSelector('#accordion a[href=\"#locate_vehicles_collapsible\"]')->click();\n $this->wait();\n $this->byId('#location'.$loc['_id'])->click();\n $this->wait();\n $this->byCssSelector('button.open-modal-location-view')->click();\n $this->wait(8000);\n\n // Assert\n $this\n ->assertThat($this\n ->byId('view_location_vehicle_registration_number')\n ->text(),$this\n ->equalTo($vehicle['registration_number']));\n $this\n ->assertThat($this\n ->byId('view_location_datetime')\n ->text(),$this->equalTo($expectedDatetime));\n\n $this\n ->assertThat($this\n ->byCssSelector('.gmnoprint[title^=\"'.$vehicle['registration_number'].'\"]')\n ->attribute('title'), $this\n ->equalTo($vehicle['registration_number']));\n\n }",
"function showNoticeLocation()\n {\n $id = $this->notice->id;\n\n $location = $this->notice->getLocation();\n\n if (empty($location)) {\n return;\n }\n\n $name = $location->getName();\n\n $lat = $this->notice->lat;\n $lon = $this->notice->lon;\n $latlon = (!empty($lat) && !empty($lon)) ? $lat.';'.$lon : '';\n\n if (empty($name)) {\n $latdms = $this->decimalDegreesToDMS(abs($lat));\n $londms = $this->decimalDegreesToDMS(abs($lon));\n // TRANS: Used in coordinates as abbreviation of north.\n $north = _('N');\n // TRANS: Used in coordinates as abbreviation of south.\n $south = _('S');\n // TRANS: Used in coordinates as abbreviation of east.\n $east = _('E');\n // TRANS: Used in coordinates as abbreviation of west.\n $west = _('W');\n $name = sprintf(\n // TRANS: Coordinates message.\n // TRANS: %1$s is lattitude degrees, %2$s is lattitude minutes,\n // TRANS: %3$s is lattitude seconds, %4$s is N (north) or S (south) depending on lattitude,\n // TRANS: %5$s is longitude degrees, %6$s is longitude minutes,\n // TRANS: %7$s is longitude seconds, %8$s is E (east) or W (west) depending on longitude,\n _('%1$u°%2$u\\'%3$u\"%4$s %5$u°%6$u\\'%7$u\"%8$s'),\n $latdms['deg'],$latdms['min'], $latdms['sec'],($lat>0? $north:$south),\n $londms['deg'],$londms['min'], $londms['sec'],($lon>0? $east:$west));\n }\n\n $url = $location->getUrl();\n\n $this->out->text(' ');\n $this->out->elementStart('span', array('class' => 'location'));\n // TRANS: Followed by geo location.\n $this->out->text(_('at'));\n $this->out->text(' ');\n if (empty($url)) {\n $this->out->element('abbr', array('class' => 'geo',\n 'title' => $latlon),\n $name);\n } else {\n $xstr = new XMLStringer(false);\n $xstr->elementStart('a', array('href' => $url,\n 'rel' => 'external'));\n $xstr->element('abbr', array('class' => 'geo',\n 'title' => $latlon),\n $name);\n $xstr->elementEnd('a');\n $this->out->raw($xstr->getString());\n }\n $this->out->elementEnd('span');\n }",
"function render_geolocation_comments_table() {\n\t\techo \"<table id='geolocate_table'>\\n\";\n\t\techo \"\\t<tr><td><strong>Location</strong></td><td><strong>Number of Comments</strong></td></tr>\\n\";\n\t\tforeach ( $this->countries as $countryKey => $eachCountry ) {\n\t\t\techo \"\\t<tr><td>$countryKey</td><td align='center'>$eachCountry</td></tr>\\n\";\n\t\t}\n\t\techo \"\\n</table>\\n\";\n\t}",
"public function tracking()\n {\n\n $imeis = ['RIDD0172431', 'RIDD0172248', 'RIDD0172421'];\n\n $object = DB::table('gs_objects')->where('imei', 'RIDD0172431')->get()->first();\n\n return view('map.tracking', [\n 'object' => $object,\n ]);\n }",
"public function render()\n {\n $control = $this->getControl();\n $inner = $this->getInner($this->inner);\n $plugins = $this->getInner($this->plugins);\n \n $body = <<<EOF\n<div style='height: {$this->height}px; '>\n <v-map :zoom=13 :center=\"[$this->Lat,$this->Lon]\" :options='$this->options'>\n $control\n <v-tilelayer url=\"$this->tileServer\" name=\"Cхема\" layer-type='base'></v-tilelayer>\n $plugins\n $inner\n </v-map>\n</div>\nEOF;\n\n return view($this->view, \n [\n $this->mapId => $body,\n ]\n )->render();\n }",
"public function displayMap()\n {\n $buses = User::where('wei', 1)->whereNotNull('latitude')->whereNotNull('longitude')->orderBy('updated_at')->groupBy('bus_id')->get();\n\n $pts = [];\n foreach ($buses as $bus) {\n $pts [] = [\n 'title' => 'Bus '.$bus->bus_id,\n 'lat' => $bus->latitude,\n 'lng' => $bus->longitude,\n ];\n }\n\n return view('dashboard.maps.index', compact('pts'));\n\n }",
"public function index()\n {\n $map = Currentlocation::with('riders')->get();\n \n return view('administrator.riders.map', compact('map'));\n \n }",
"public function location()\n {\n //\n return view('event.location');\n }",
"public function index()\n {\n //get user ip address\n $ip_address = $_SERVER['REMOTE_ADDR'];\n //get user ip address details with geoplugin.net\n $geopluginURL = 'http://www.geoplugin.net/php.gp?id='.$ip_address;\n $addrDetailsArr = unserialize(file_get_contents($geopluginURL)); \n //dd($addrDetailsArr['geoplugin_countryName']);\n $geoAlbums = Http::get('http://ws.audioscrobbler.com/2.0/?method=geo.gettoptracks&country='.$addrDetailsArr['geoplugin_countryName'].'&api_key=915e43bd2c345fdb1aa3e2c00aca0c03&format=json')\n ->json()['tracks']['track'];\n //dump($geoAlbums);\n\n return view('geolocation', [\n 'addrDetailsArr' => $addrDetailsArr,\n 'geoAlbums' => collect($geoAlbums)->take(8),\n ]);\n }",
"public function getLocationIndex()\n {\n return view('admin.world_expansion.locations', [\n 'locations' => Location::orderBy('sort', 'DESC')->get()\n ]);\n }",
"public function show_map() {\n $restaurant_location = Restaurant::where('id',$_POST['restaurant_id'])->first();\n $html = view('admin.restaurants.map-address')->with('restaurant_location', $restaurant_location)->render();\n if ($html) {\n $res_array = array(\n 'msg' => 'success',\n 'response' => $html,\n );\n echo json_encode($res_array);\n exit;\n } \n }",
"function shipments_transit_log()\r\n\t\t{\r\n\t\t\t$this->erpm->auth(PNH_SHIPMENT_MANAGER|CALLCENTER_ROLE);\r\n\t\t\t$data['page']='pnh_shipments_transit_log';\r\n\t\t\t$this->load->view('admin',$data);\r\n\t\t}",
"public function render()\n {\n return view('components.location-actions');\n }",
"public function index()\n {\n //\n $mos_device=mosdevice::all();\n $k=0;\n foreach($mos_device as $key){\n $data[$k]['location']=$key->location;\n $NewString = explode(\",\", $data[$k]['location'] ) ;\n $data[$k]['x_location']= $NewString[0];\n $data[$k]['y_location']= $NewString[1];\n $data[$k]['loc_addr']=$key->device_number;\n $k++;\n }\n //$json=json_encode($data);\n //json_encode($json, JSON_UNESCAPED_UNICODE); \n //return $data;\n //return $data;\n //return $data[1]['device_number'];\n\n //return $data[1]['device_number'];\n //$data=json_encode($data);\n //json_encode($data, JSON_UNESCAPED_UNICODE); \n //$data=urldecode(json_encode($data));\n //return urldecode(json_encode($data));\n return view('mos_web.mos_goolgemap',compact('data'));\n }",
"public function getWeatherMap()\n {\n return $this->renderView(\n __DIR__ . DIRECTORY_SEPARATOR . 'views/weather_map.php',\n [\n 'center_id' => $this->centerID,\n 'token' => $this->token,\n 'wx_base_url' => $this->wxBaseUrl,\n 'wx_map_zones' => $this->wxMapZones,\n 'external_modal_links' => $this->externalModalLinks\n ]\n );\n }",
"function showLocationBox () {\n\t\t$template['list'] = $this->cObj2->getSubpart($this->templateCode,'###TEMPLATE_LOCATIONBOX###');\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['location.']['LL'], 'location');\n\n\t\t$content = $this->cObj2->substituteMarkerArrayCached($template['list'],$markerArray);\n\t\treturn $content;\n\t}",
"public function view_map_target()\n {\n\n return view('admin.gps.gps_target_index');\n }",
"public function format() : void\n {\n $locations = $this->resolveLocations();\n \n foreach($locations as $location)\n {\n $location->format();\n \n $this->log = array_merge($this->log, $location->getLog());\n }\n }",
"public function index()\n {\n $user_id = auth()->user()->id;\n $user = User::find($user_id);\n return view('locations.index')->with('locations', $user->locations->sortBy('title')->values()->all())->with('user', $user);\n }",
"public function overview() {\r\n\r\n // load model\r\n require_once APP_PATH . '/models/LocationsModel.php';\r\n\r\n // get all locations\r\n $locationsModel = new LocationsModel();\r\n $locations = $locationsModel->getAll();\r\n\r\n // show views\r\n loadView('theme/header');\r\n loadView('locations/overview', [\r\n 'locations' => $locations,\r\n ]);\r\n loadView('theme/footer');\r\n }",
"function fumseck_display_exif_geocoord($featured_image_exif) {\n\t\n\t$exif_latitude = $featured_image_exif['image_meta']['latitude_DegDec'];\n\t$exif_longitude = $featured_image_exif['image_meta']['longitude_DegDec'];\n\t\n\tif ( $exif_latitude && $exif_longitude ) {\n\t\t\n\t\t$output = sprintf(\n\t\t\t\t'%d° %d′ %d″ %s, %d° %d′ %d″ %s', \n\t\t\t\t$featured_image_exif['image_meta']['latitude_DMS']['degrees'],\n\t\t\t\t$featured_image_exif['image_meta']['latitude_DMS']['minutes'],\n\t\t\t\t$featured_image_exif['image_meta']['latitude_DMS']['seconds'],\n\t\t\t\t$featured_image_exif['image_meta']['latitude_DMS']['direction'],\n\t\t\t\t$featured_image_exif['image_meta']['longitude_DMS']['degrees'],\n\t\t\t\t$featured_image_exif['image_meta']['longitude_DMS']['minutes'],\n\t\t\t\t$featured_image_exif['image_meta']['longitude_DMS']['seconds'],\n\t\t\t\t$featured_image_exif['image_meta']['longitude_DMS']['direction']\n\t\t\t\t);\n\t\t\n\t\t$output = '(<a '\n\t\t\t\t. 'href=\"http://www.openstreetmap.org/?mlat=' . $exif_latitude . '&mlon=' . $exif_longitude . '\" '\n\t\t\t\t. 'title=\"' . __('View this location on OpenStreetMap (opens in another window)', 'fumseck') . '\" '\n\t\t\t\t. 'target=\"_blank\"'\n\t\t\t\t. '>' . $output . '</a>)';\n\t\t\n\t\techo $output;\n\t}\n}",
"function simple_geo_views_data() {\n // Position Fields\n $data['simple_geo_position']['table']['group'] = t('Simple Geo');\n $data['simple_geo_position']['table']['join']['node'] = array(\n 'left_field' => 'nid',\n 'field' => 'nid',\n 'extra' => array(\n array(\n 'field' => 'type',\n 'value' => 'node',\n ),\n ),\n );\n $data['simple_geo_position']['position'] = array(\n 'title' => t('Position'),\n 'help' => t('The position of the node.'), // The help that appears on the UI,\n // Information for displaying the nid\n 'field' => array(\n 'handler' => 'simple_geo_views_handler_field_point',\n ),\n 'filter' => array(\n 'handler' => 'simple_geo_views_handler_filter_point',\n 'label' => t('Has position'),\n 'type' => 'yes-no',\n 'accept null' => TRUE,\n ),\n );\n\n return $data;\n}",
"public function get_timezone_info_view() {\n $google_calendar_timezone = $this->get_timezone_info();\n\n $args = array(\n 'is_calendar_sync_enabled' => $this->is_calendar_sync_enabled(),\n 'google_calendar_timezone' => $google_calendar_timezone,\n 'current_timezone' => yith_wcbk_get_timezone( 'human' )\n );\n\n return $this->get_view( 'timezone-info.php', $args );\n }",
"public function getUserLocation() {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip_note = 'HTTP_CLIENT_IP='.$_SERVER['HTTP_CLIENT_IP'];\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip_note = 'HTTP_X_FORWARDED_FOR='.$_SERVER['HTTP_X_FORWARDED_FOR'];\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip_note = 'REMOTE_ADDR='.$_SERVER['REMOTE_ADDR'];\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n $ip = '117.20.119.245';\n $loc = file_get_contents(\"http://ipinfo.io/\".$ip.\"/loc\");\n\n if($loc) {\n $array_loc = explode(',', $loc);\n return ['lat'=> ((isset($array_loc[0]))? $array_loc[0]:'') ,'lon'=> ((isset($array_loc[1]))? $array_loc[1]:'')];\n }\n\n return ['lat'=>'','lon'=>''];\n\n }",
"public function index()\n {\n $owner_id = auth()->user()->id;\n $company_id = CarCompany::where('owner_id', '=', $owner_id)->first()->id;\n $locations = Location::where('company_id', '=', $company_id)->get();\n\n return view('/company/location', ['displays' => $locations]);\n }",
"public function show()\n {\n \t$locations = Locations::orderBy('city', 'ASC')->get();\n\n \t$mr = Hours::orderBy('day', 'ASC')->wherelocations_id(1)->get();\n \t$gf = Hours::orderBy('day', 'ASC')->wherelocations_id(2)->get();\n \t$nm = Hours::orderBy('day', 'ASC')->wherelocations_id(3)->get();\n \t$rm = Hours::orderBy('day', 'ASC')->wherelocations_id(4)->get();\n \t$wr = Hours::orderBy('day', 'ASC')->wherelocations_id(5)->get();\n return View::make('locations')\n \t\t\t->with('locations', $locations)\n \t\t\t->with('mr', $mr)\n \t\t\t->with('gf', $gf)\n \t\t\t->with('nm', $nm)\n \t\t\t->with('rm', $rm)\n \t\t\t->with('wr', $wr);\n }",
"public function getLocations()\n\t\t{\n\t\t\t$this->layout = \"index\";\n\t\t\t$this->set('title', 'Location (Linnworks API)');\n\t\t}",
"public function index()\n {\n return view('location');\n }",
"public function show(geoip $geoip)\n {\n //\n }",
"public function index()\n {\n // Mapper::streetview(53.381128999999990000, -1.470085000000040000, 1, 1);\n\n return view('theme.maps.index');\n }",
"public static function printLocation()\n { \n echo '\n <div id=\"navi_location\">\n <p class=\"pfeil\">Sie befinden sich hier: '.self::$siteName.self::$subNav.self::$subSubNav.'</p>\n </div>';\n }",
"public function index()\n {\n $locations = location::get()->toTree();\n $myJSON = json_encode($locations);\n\n return view('locations.index', compact('locations', 'myJSON'));\n }",
"public function _before_index(){\n// $ip = get_client_ip();\n// $res = $ip_class->getlocation('113.102.162.102');\n// print_r($res);\n \n \n }",
"public function location_edit() {\n\t\treturn view( 'provider.location.index' );\n\t}",
"public function display_log() {\n\t\t$log_choices = $this->get_available_logs();\n\t\t$log_engines = $this->get_log_engines();\n\t\t$log_levels = $this->get_logging_levels();\n\t\t$log_entries = $this->get_log_entries();\n\t\t$download_url = $this->get_log_url();\n\n\t\tob_start();\n\t\tinclude trailingslashit( Tribe__Main::instance()->plugin_path ) . 'src/admin-views/event-log.php';\n\t\treturn ob_get_clean();\n\t}",
"function simple_geo_views_handlers() {\n return array(\n 'info' => array(\n 'path' => drupal_get_path('module', 'simple_geo') .'/includes',\n ),\n 'handlers' => array(\n // field handlers\n 'simple_geo_views_handler_field_point' => array(\n 'parent' => 'views_handler_field',\n ),\n 'simple_geo_views_handler_filter_point' => array(\n 'parent' => 'views_handler_filter',\n ),\n ),\n );\n}",
"public function chatlog()\n {\n return view('admin.profile.chatlog');\n }",
"public function index()\n {\n $locations = DB::select('select location.id,location.name from user_location inner join location on location.id = user_location.location_id where user_id = ?', [Auth::user()->id]);\n\n return view('reportes.reportes',compact('locations'));\n }",
"public function viewAction()\n\t{\n\t\t$log = $this->_initLog();\n\t\t\n if (!$log->getId()) {\n $this->_getSession()->addError(Mage::helper('logging')->__('This log no longer exists.'));\n $this->_redirect('*/*/');\n return;\n }\n\n $this->_title( Mage::helper('logging')->__('Showing log entry') );\n\n\t\t$this->loadLayout();\n\t\t\n\t\t$this->getLayout()->getBlock('head')->setCanLoadExtJs(false);\n\t\t$this->renderLayout();\n\t}",
"public function render() {\n\t\t$logs = $this->logger->get_logs();\n\t\tforeach ( $logs as $log_id => $gist ) {\n\t\t\techo '<div class=\"b6go-gist-debug\">';\n\t\t\tforeach ( $gist as $entry ) {\n\t\t\t\t// Don't wpautop tabular data, as it adds <br> between line number spans.\n\t\t\t\techo ( false === strpos( $entry['message'], '<table' ) ) ? wpautop ( $entry['message'] ) : $entry['message'];\n\t\t\t}\n\t\t\techo '</div>';\n\t\t}\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t.b6go-gist-debug { margin: 2em 0; padding: 10px; background: #e8e8e8;}\n\t\t#querylist .b6go-gist-debug .gist .gist-file .gist-data .line_data pre {\n\t\t\toverflow: auto;\n\t\t\tword-wrap: normal;\n\t\t\t-moz-tab-size: 4;\n\t\t\t-o-tab-size: 4;\n\t\t\ttab-size: 4;}\n\t\t.b6go-gist-debug .gist .gist-file .gist-data .line_numbers span {font-size: 12px;}\n\t\t#querylist .b6go-gist-debug h2 {border: 0; float: none; font-size: 22px; text-align: left; margin: 0 !important; padding-left: 0;}\n\t\t</style>\n\t\t<?php\n\t}",
"public function index()\n {\n $logstatus = LogStatus::get();\n $users = User::get();\n $receivecountries = Country::whereIn('id', ZoneCountry::pluck('country_id')->toArray())->get();\n\n return view('upx.bookinghistory.index', compact('logstatus', 'users', 'receivecountries'));\n }",
"private function showStaticMap()\n {\n if ($this->location !== '') {\n $mapurl = \"https://maps.googleapis.com/maps/api/staticmap\";\n $mapurl .= \"?center=\" . $this->location->lat . \",\" . $this->location->lng;\n $mapurl .= \"&size=450x400\"; // image size\n $mapurl .= \"&zoom=15\"; // zoom to town level\n // put marker center of the location\n $mapurl .= \"&markers=|\" . $this->location->lat . \",\" . $this->location->lng; \n $mapurl .= \"&key=\" . $GLOBALS['apikey_googlemap'];\n return \"<img src=\" . $mapurl . \" >\";\n } else {\n return \"\";\n }\n }",
"public function output_map() {\n\n\t\tif ( $this->lat && $this->lng ) {\n\n\t\t\t$this->generate_map_lat_lng();\n\n\t\t} else {\n\n\t\t\t$this->generate_map_address();\n\t\t}\n\n\t\t?>\n\n\t\t<script src=\"https://maps.googleapis.com/maps/api/js?callback=initMap\"\n\t\t async defer></script>\n\n\t\t<div class=\"google-map-outer-wrapper\">\n\n\t\t\t<div id=\"map\"></div>\n\n\t\t</div>\n\n\t<?php }",
"public function showGeoAd()\n {\n }",
"public function footer($maps = false, $location = null, $path = null)\r\n\t{\n\t\tglobal $_sql_counter;\n \t// timing info:\n\t\t$this->timer = microtime() - $this->timer;\r\n\t\t$running_time = _(\"Running time\").\": {$this->timer} \"._(\"seconds\");\r\n\t\t$queries = _(\"Queries\");\n \techo \"\n <div id='footer' style='clear:all;'>{$running_time}<br/>\n \t{$queries}: {$_sql_counter}\n </div>\";\n \n\t\t/* load javascript at the end... */\n\t\tif($maps)\n\t\t{\n\t\t\t?>\r\n\t<script src=\"http://maps.google.com/maps?file=api&v=2.x&[email protected]@\" type=\"text/javascript\"></script> \r\n\t<script src=\"js/fitnessMaps.js\" type=\"text/javascript\"></script>\r\n\t<script type=\"text/javascript\">\n\t<?php\t\n\t\tif($location && $location->get('location_name')\n\t\t\t&& $location->get('lat') && $location->get('lng'))\n\t\t{\n\t\t\t$localStr = addslashes($location->get('location_name'));\n\t\t\t\n\t\t\tif($location->get('lat') && $location->get('lng'))\n\t\t\t{\n\t\t \t\techo \"initialize('{$localStr}', {$location->get('lat')}, {$location->get('lng')});\\n\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"initialize();\\n\";\n\t\t\t\techo \"showAddress(document.getElementById('location_name').value);\\n\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"initialize();\\n\";\n\t\t}\n\t\tif($path)\n\t\t{\n\t\t\t// regex match all the points\n\t\t\t$regex = \"/\\-?[0-9]{0,3}\\.[0-9]*\\,\\-?[0-9]{0,3}\\.[0-9]*/\";\n \tpreg_match_all($regex, $path, $matches);\n\n\t // if there is some result... process it and return it\n\t if(isset($matches[0]))\n\t {\n\t \tforeach($matches[0] as $point)\n\t \t{\n\t\t\t\t\techo \"pathpoints.addPoint(new GLatLng($point));\\n\";\n\t\t\t\t}\n\t } \n\t\t}\n\t?>\r\n </script>\n <?php \n\t\t} // end if: maps\n ?>\r\n</body>\r\n</html> <?php\r\n\t}",
"public function log_view() {\n \\filter_embedquestion\\event\\question_viewed::create(['context' => $this->embedlocation->context,\n 'objectid' => $this->current_question()->id])->trigger();\n }",
"public function index()\n\t{\n\t\t$locations = Location::all();\n\n \treturn View::make('locations.index')\n \t\t->with('locations', $locations);\n\t}",
"public function LogsPanel() {\n\t\treturn $this->renderWith('KapostBridgeLogViewer_Logs');\n\t}",
"function parse_gis_location() {\n $output = $this->latitude . ';' . $this->longitude;\n if (!empty($this->radius)) {\n $output .= '!' . $this->radius;\n }\n return $output;\n }",
"public function index()\n {\n //\n return view('exports.locations.index');\n }",
"public function index()\n\t{\n\t\t$map_options = array(\n\t\t\t\t\t\t'centerLat'\t\t=> '50.3697',\n\t\t\t\t\t\t'centerLng'\t\t=> '-4.1399',\n\t\t\t\t\t\t'zoom'\t\t\t=> '10'\n\t\t);\n\t\t\n\t\t// Create a basic google map\n\t\t$google_map = $this->google_maps->create($map_options);\n\t\t\n\t\t$this->google_maps->extract_lat_lng('latitude', 'longitude');\n\t\t\n\t\t$data['main_view'] = 'extract_lat_lng';\n\t\t\n\t\t$this->load->vars($data);\n\t\t\n\t\t$this->load->view('template');\n\t\t\n\t}",
"function getGeoViewUrl($ar){\n $p = new XParam($ar, array());\n $table = $p->get('table');\n $fieldname = $p->get('fieldname');\n $moid = $this->_moid;\n $templates = 'googlesearch.html';\n return $GLOBALS['TZR_SESSION_MANAGER']::complete_self(true, true).\"skip=1&moid={$moid}&class=XModMap&table={$table}&field={$fieldname}&provider=google&function=geoSearch&template=xmodmap/geosearch.html&readonly=readonly&tplentry=br\";\n }",
"public function display() {\n \t\n \tif($this->userCanVisualize()){\n \t\t\n \t\t$e = $this->buildGraph();\n \t\tif($e){\n\t \techo $e->graph->GetHTMLImageMap(\"map\".$this->getId());\n\t \t$this->displayImgTag();\n \t\t}\n \t}\n }",
"function getLog(){\n\t\t$log = $this->msgHandler->getLog();\n\t\treturn $this->translator->markupAttributes('div', $log, array('style'=>'overflow: scroll; height: 25%; width: 50%; margin: auto;'));\n\t}",
"public function indexAction() : object\n {\n $title = \"IP Geo\";\n $page = $this->di->get(\"page\");\n\n // $ip = $_SERVER['HTTP_CLIENT_IP'];\n // $client_ip = $_SERVER['REMOTE_ADDR'] ?? \"127.0.0.1\";\n $client_ip = $this->di->get(\"request\")->getServer(\"REMOTE_ADDR\", \"127.0.0.1\");\n\n \n\n // $module = new IpModule();\n\n // $info = $module->getGeoInfo($ip);\n\n // $info = $_SERVER;\n\n // $ip = $this->di->session->get(\"ip\") ?? null;\n // $result = $this->di->session->get(\"result\") ?? null;\n // $hostname = $this->di->session->get(\"hostname\") ?? null;\n\n\n// http://api.ipstack.com/158.174.140.127?access_key=ceb8dbb476fc421d779317551864704e\n\n// echo 'User IP - '.$_SERVER['REMOTE_ADDR'];\n\n $data = [\n \"client_ip\" => $client_ip,\n // \"result\" => $result,\n // \"hostname\" => $hostname\n ];\n\n $page->add(\"ip/geo\", $data);\n // $page->add(\"ip/validate\");\n\n return $page->render([\n \"title\" => $title\n ]);\n }",
"function tsuiseki_tracking_view($data) {\n if (!empty($data)) {\n $t_data = (string)(trim($data));\n // We need to cut the first \"ref=\" as it comes from the javascript part\n // and may overlay the partner field.\n if (preg_match('/^ref=.*/', $t_data)) {\n $t_data = mb_substr($t_data, mb_strpos($t_data, '=') + 1);\n }\n $t_parts = preg_split('/;;/', $t_data);\n $src_url = (string)(trim($t_parts[0]));\n $width = (string)(trim($t_parts[1]));\n $height = (string)(trim($t_parts[2]));\n $browser = (string)(trim($t_parts[3]));\n $browser_version = (string)(trim($t_parts[4]));\n $referer = (string)(trim($t_parts[5]));\n if (!empty($referer)) {\n // Wir extrahieren nur die Domain!\n $r_parts = array();\n preg_match('/[a-z]{3,5}:\\/\\/(.+?)[\\/?:]/', $referer, $r_parts);\n if (!empty($r_parts[1])) {\n $referer = 'referer='. (string)trim($r_parts[1]);\n }\n }\n }\n $key = (string)trim($_SESSION['TSUISEKI_TRACKER_KEY']);\n if (!empty($src_url) && !empty($key)) {\n $ref = urldecode($src_url);\n $data = (string)(trim(tsuiseki_tracking_get_data($ref)));\n $data .= '&'. $width .'&'. $height .'&'. $browser .'&'. $browser_version .'&'. $referer;\n $data = urlencode($data);\n $ip = ip2long($_SERVER['REMOTE_ADDR']);\n $url = \"http://tracker.tsuiseki.com/tsuiseki.php?q=$key;0;$ip;$data&ajax=1\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_USERAGENT, (string)trim($_SERVER['HTTP_USER_AGENT']));\n curl_setopt($ch, CURLOPT_REFERER, $src_url);\n $result = curl_exec($ch);\n if (curl_errno($ch) > 0) {\n trigger_error(curl_error($ch), curl_errno($ch));\n }\n curl_close($ch);\n }\n\n // generate the response\n $response = json_encode( array( 'success' => true ) );\n // response output\n header( \"Content-Type: application/json\" );\n echo $response;\n exit;\n //return 0;\n}",
"public static function outputLog() {\n\t\t// If we do not have anything in the log, then there is nothing to output.\n\t\tif(count(self::$log) === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch(self::$log_location) {\n\t\t\tcase 0: break;\n\t\t\t// Empty void.\n\t\t\tcase 1:\n\t\t\t\t// Check to see if we need to log anything to the server\n\t\t\t\tif(self::$log_current_level > 1) {\n\t\t\t\t\t$log_file_handle = fopen(BASEPATH . APP_DIR . \"/\" . \\Config::LOG_FILE, 'a');\n\t\t\t\t\t// Log header.\n\t\t\t\t\tfprintf($log_file_handle, \"[IP:%s TIME:%s USER_ID:%s] BEGIN LOG:\\n\", self::$main->User->Ipv4, time(), self::$main->User->Id);\n\n\t\t\t\t\t// Log body. Just seperate each part of the log with a sepearate line.\n\t\t\t\t\tforeach(self::$log as $log_item) {\n\t\t\t\t\t\tfwrite($log_file_handle, $log_item['value']);\n\t\t\t\t\t\tfwrite($log_file_handle, \"\\n\");\n\t\t\t\t\t}\n\n\t\t\t\t\t// Log footer.\n\t\t\t\t\tfwrite($log_file_handle, \"END LOG;\\n\");\n\n\t\t\t\t\tfclose($log_file_handle);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\t// Output as a javascript object easily read by FireBug\n\t\t\t\techo \"<script type=\\\"text/javascript\\\">\\n\";\n\t\t\t\techo \"if(typeof console == \\\"object\\\" && typeof console.group == \\\"function\\\"){\\n\";\n\t\t\t\techo \"console.\";\n\t\t\t\techo (\\Config::LOG_COLLAPSED_GROUPS) ? \"groupCollapsed\" : \"group\";\n\t\t\t\techo \"(\\\"PHP Server\\\");\\n\";\n\t\t\t\tforeach(self::$log as $log_item) {\n\t\t\t\t\techo 'console.';\n\t\t\t\t\techo $log_item['type'];\n\t\t\t\t\techo '(';\n\t\t\t\t\techo json_encode($log_item['value']);\n\n\t\t\t\t\tif($log_item['type'] === 'error') {\n\t\t\t\t\t\techo ', null';\n\t\t\t\t\t}\n\t\t\t\t\techo \");\\n\";\n\t\t\t\t}\n\t\t\t\techo \"\\nconsole.groupEnd();\\n}\\n</script>\";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t// TODO: Write logging code to write to database\n\t\t\t\t/* @var $model Core\\LogModel */\n\t\t\t\tMain::app()->Loader->model('Core\\LogModel');\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function index()\n\t{\n\t\t$locations = $this->location->getAllPaginated();\n\t\treturn View::make('admin.location.index')->with('locations',$locations);\n\t}",
"public function index()\n {\n $locations = Locations::all();\n return view('admin.locations.index')->with('locations', $locations);\n }",
"public function index(): Response\n {\n $pointingLocations = $this->getUser()->getEnterprise()->getPointingLocations();\n //dd($pointingLocations);\n return $this->render('pointing_location/index.html.twig', [\n 'pointingLocations' => $pointingLocations,\n ]);\n }",
"function index() {\r\n $this->view->render('worldclock/index');\r\n }",
"function display($tpl = null) \n\t{\t\n\t\tJHtml::_('behavior.framework');\n\t\tJHtml::_('script', 'http://openlayers.org/api/OpenLayers.js');\n\t\tJHtml::_('script', 'components/com_ukrgb/proj4js/lib/proj4js-compressed.js');\n\t\tJHtml::_('script', 'components/com_ukrgb/views/map/js/OpenSpace.js');\n\t\tJHtml::_('script', 'components/com_ukrgb/views/map/js/map-openlayers.js');\n\t\tJHtml::_('stylesheet','components/com_ukrgb/views/map/CSS/map.css');\n\t\t\n\t\t//var_dump ($this->get('BasicMapData'));\n\t\t//var_dump($status);\n\t\t$params = json_encode(array(\n\t\t\t\t'url' => JURI::base() . 'index.php?option=com_ukrgb&tmpl=raw&format=json',\n\t\t\t\t'mapdata' => $this->get('BasicMapData')));\n\t\t\n\t\t$document = &JFactory::getDocument();\n\t\t$document->addScriptDeclaration('var params = ' .$params.';');\n\t\t\n\t\t// Assign data to the view\n\t\t$this->message = \"My Map View\";\n\t\t\n\t\t// Check for errors.\n\t\tif (count($errors = $this->get('Errors')))\n\t\t{\n\t\t\n\t\t\tJError::raiseError(500, implode('<br />', $errors));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Display the view\n\t\tparent::display($tpl);\n\t}",
"public function index() {\n $requiredPermissions = ['manage_location'];\n if(!parent::checkPermissions($requiredPermissions))\n {\n return Redirect::back()\n ->with('alert-class', 'error')\n ->with('flash-message', 'You do not have the required permissions to do that!');\n }\n \t$locations = Locations::orderBy('city', 'ASC')->get();\n \treturn View::make('admin.manage.locations')\n \t\t\t\t->with('locations', $locations);\n }",
"public function getLocation();",
"public function getLocation();",
"function LocationList()\n\t{\tif ($this->id)\n\t\t{\techo \"<table><tr class='newlink'><th colspan='2'><a href='locationedit.php?city=\", $this->id, \"'>add new location</a></th></tr>\\n<tr><th>Location name</th><th>Actions</th></tr>\\n\";\n\t\t\tif ($locations = $this->GetLocations())\n\t\t\t{\tforeach ($locations as $location)\n\t\t\t\t{\t\n\t\t\t\t\techo \"<tr>\\n<td>\", $this->InputSafeString($location->details[\"loctitle\"]), \"</td>\\n<td><a href='locationedit.php?id=\", $location->id, \"'>edit</a>\";\n\t\t\t\t\tif ($histlink = $this->DisplayHistoryLink(\"locations\", $location->id))\n\t\t\t\t\t{\techo \" | \", $histlink;\n\t\t\t\t\t}\n\t\t\t\t\tif ($location->CanDelete())\n\t\t\t\t\t{\techo \" | <a href='locationedit.php?id=\", $location->id, \"&delete=1'>delete</a>\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"</td>\\n</tr>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"</table>\\n\";\n\t\t}\n\t}",
"public function index()\n {\n $address = Address::first();\n // $config['center'] = $address->address;\n // $config['zoom'] = '14';\n // $config['map_height'] = '500px';\n // $config['scrollwheel'] = false;\n\n \\Mapper::map($address->lat, $address->lng);\n\n return view('admin.Tools.Address.index', compact('address'));\n }",
"public function show() {\n Logger::debug(\"url:{$this->header}, replace: {$this->replace}, responseCode: {$this->responseCode}\");\n }",
"public function log(){\n return view('log');\n }",
"public function render()\n\t{\n\t\tinclude_once __DIR__ . '/templates/go-profiler-mustache-template.php';\n\t\t?>\n\t\t<table id='debug-aggregate-table'>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"3\"> Filter: <input type='text' class='go-profiler-search'/></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<th>hook</th>\n\t\t\t\t<th>calls</th>\n\t\t\t\t<th>memory usage</th>\n\t\t\t\t<th>time</th>\n\t\t\t</tr>\n\t\t</table>\n\t\t<?php\n\t}",
"private function renderView()\n\t{\n\t\tff_renderView(substr(__CLASS__, 7));\n\t}",
"private function renderView()\n\t{\n\t\tff_renderView(substr(__CLASS__, 7));\n\t}",
"private function getLocation(){\n \n $location = [];\n $node = $this->getNode();\n $locationreference = $node->field_location_reference->entity;\n \n if($locationreference){\n $location = $locationreference->field_location->view(array('type' => 'LocationAddressFormatter', 'label' => 'hidden'));\n $location[0]['#prefix'] = '<i class=\"icon icon-home icon-smaller\"></i>';\n }\n \n return $location;\n \t\n }",
"public function index()\n {\n // parent::index();\n return view('admin.locations',[ \n\n\n ]);\n\n\n }",
"function getLocation(){ return $this->_Location;}",
"public function view_map($email)\n {\nSession::put('d_email',$email);\n return view('admin.gps.gps_index');\n }",
"function ajax_render_location_rule()\n {\n }",
"public function index()\n {\n $locations = Location::all();\n\n return view('locations.index',['locations' => $locations]);\n }",
"function view() {\n\t\treturn '';\n\t}",
"public function getCreateLocation()\n {\n return view('admin.world_expansion.create_edit_location', [\n 'location' => new Location,\n 'types' => LocationType::all()->pluck('name','id')->toArray(),\n 'locations' => Location::all()->pluck('name','id')->toArray(),\n 'ch_enabled' => Settings::get('WE_character_locations'),\n 'user_enabled' => Settings::get('WE_user_locations')\n ]);\n }",
"public function render()\n {\n /** @var LogEntry[] $entries */\n $entries = $this->data['entries'];\n $this->getSharedView('Header')->render();\n $this->getSharedView('TopBar')->render();\n $this->getSharedView('SideBar')->render(); ?>\n<div class=\"container-fluid\">\n <div class=\"page-head bg-main\">\n <h1><i class=\"fa fa-fw fa-th-list\"></i> Log</h1>\n </div>\n <div class=\"panel\">\n <div class=\"table-responsive\">\n <table class=\"table table-bordered\" id=\"log-table\">\n <thead>\n <tr>\n <th data-column-id=\"name\" data-type=\"numeric\">#</th>\n <th data-column-id=\"timestamp\">Time stamp</th>\n <th data-column-id=\"user\">User</th>\n <th data-column-id=\"browser\">Browser</th>\n <th data-column-id=\"platform\">Platform</th>\n <th data-column-id=\"ip\">IP</th>\n <th data-column-id=\"entry\">Entry</th>\n <th data-column-id=\"level\" data-formatter=\"logLevel\">Level</th>\n </tr>\n </thead>\n <tbody>\n<?php foreach ($entries as $entry): ?>\n <tr>\n <td><?php echo $entry->id ?></td>\n <td><?php echo $this->formatSqlDateTime($entry->ts) ?></td>\n <td><?php if ($entry->user !== null) { echo $this->escape($entry->user->firstName . ' ' . $entry->user->lastName); } else { echo 'n/a'; } ?></td>\n <td><?php echo $entry->browser ?></td>\n <td><?php echo $entry->platform ?></td>\n <td><?php echo $this->escape($entry->ip) ?></td>\n <td><?php echo $this->escape($entry->entry) ?></td>\n <td><?php echo $entry->level ?></td>\n </tr>\n<?php endforeach; ?>\n </tbody>\n </table>\n </div>\n <div class=\"row\">\n <div class=\"panel-footer text-right\">\n <a href=\"<?php $this->publicPath() ?>Administration\" class=\"btn btn-link hidden-xs\">Back</a>\n <a href=\"<?php $this->publicPath() ?>Administration\" class=\"btn btn-link btn-block visible-xs\">Back</a>\n </div>\n </div>\n </div>\n</div>\n<script src=\"<?php $this->publicPath() ?>js/administration/log.js\"></script>\n<?php\n $this->getSharedView('Footer')->render();\n }",
"protected function latteView()\n {\n $latte = new Engine();\n \n try {\n $latte->render(__DIR__ . '/../View/' . $this->view . '.latte', $this->latteParameters);\n } catch (\\RuntimeException $exception) {\n //File not found\n echo '[Error] Work in progress.';\n }\n }",
"public function actionView($id) {\n $sql = \"select * from location where customer_id = '\" . $id . \"'\";\n $rs = Yii::$app->db->createCommand($sql)->queryOne();\n\n return $this->render('view', [\n 'model' => $this->findModel($id),\n 'location' => $rs,\n 'img' => CustomersImg::findOne(['customerid' => $id])\n ]);\n }",
"public function actionAjaxCollectGeo()\n {\n $lock = Yii::getAlias('@runtime') . DIRECTORY_SEPARATOR . 'geo.lock';\n $response = ['status' => 'warning', 'msg' => $this->module::t('general', 'Geolocation collecting is already running.')];\n\n if (!file_exists($lock)) {\n $console = new ConsoleRunner(['file' => '@app/yii']);\n $console->run('plugins/geomapping/run/get-geolocation');\n $response = [\n 'status' => 'success',\n 'msg' => $this->module::t('general', 'Node geolocation collecting started in background. See log for more info.')\n ];\n }\n\n return Json::encode($response);\n }",
"function showlocation() {\r\n drupal_add_js(array('gojira' => array('page' => 'showlocation')), 'setting');\r\n drupal_add_js(array('gojira' => array('loc' => $_GET['loc'])), 'setting');\r\n return theme('showlocation');\r\n}",
"public function index()\n {\n $locations = Location::withCount('events')->get();\n\t\t//dd($locations);\n return view('locations.index', compact('locations'));\n }",
"function getLocation();",
"public function run(){\n \t$this->render('application.components.placeMap._placeMap');\n }",
"function calendar_display_location_list() {\n return 1;\n }",
"public function index(){\t\t\n\t\treturn View::make('user.geneology')\n\t\t\t\t\t->with('message',\"\");\n\t}",
"private function getLocation() {\n }",
"function showMap() {\n\t\t$this->initMap();\n\n\t\t$template['list'] = $this->cObj2->getSubpart($this->templateCode,'###MAP###');\n\n\t\t// title, text - markers\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['map.']['LL'], 'map');\n\t\t$markerArray['###CAT_MENU###'] \t\t= $this->displayCatMenu(0);\n\t\t$markerArray['###CAT_LIST###'] \t\t= ($this->config['categoriesActive']!='') ? $this->config['categoriesActive'] : '9999';\n\t\t$markerArray['###MAP_WIDTH###'] \t= $this->config['mapWidth'];\n\t\t$markerArray['###MAP_HEIGHT###']\t= $this->config['mapHeight'];\n\n\t\t$content = $this->cObj2->substituteMarkerArrayCached($template['list'],$markerArray, $subpartArray,$wrappedSubpartArray);\n\t\treturn $content;\n\t}",
"public function index()\n {\n $inventoryLocations = $this->inventoryLocationService->getAllLocationsExceptDefaults();\n return view('ims::inventory_location.index', compact('inventoryLocations'));\n }",
"public function getLocation() { return $this->location; }",
"function load_map_full_view($values) {\n $datas = DataManager::searchByData(null, $values['address']);\n \n $tpl = new Template(SiteConfig::templatesPath() . \"views/pages/map-view\");\n $tpl->address = $datas[0]->address.\",+\".$datas[0]->district.\"+\";\n $tpl->search = $datas[0]->lat.\",\".$datas[0]->lang;\n $tpl->id = $datas[0]->id;\n $resp = new AjaxResponse(true);\n $resp->setData($tpl->parse());\n\n if (count($datas) > 1) {\n $tpl = new Template(SiteConfig::templatesPath() . \"views/pages/search-detailed-result\");\n $tpl->datas = $datas;\n $tpl->addr = $values['address'];\n } else {\n $tpl = new Template(SiteConfig::templatesPath() . \"views/pages/search-result\");\n $mgr = new DataManager();\n $arr = array();\n $mgr->setAddress($values['address']);\n array_push($arr, $mgr);\n $tpl->datas = $arr;\n }\n\n\n\n $resp->setCustomData($tpl->parse());\n echo $resp->getOutput();\n exit();\n}",
"public function locations()\n {\n $locations = Locations::with('Countries:name')->get();\n // dd($locations);\n\n foreach ($locations as $location) {\n $sublocation = Locations::where('location_id', $location->sublocation_id)->get();\n $location['sublocations'] = $sublocation;\n }\n return view('setup.location.locations', compact('locations', 'sublocation'));\n }",
"public function view() {\n //If we're dealing with an ajax request return the form's html\n if(Director::is_ajax()) {\n //If the log cannot be found 404\n if(!$this->currentPage()) {\n return $this->httpError(404);\n }\n \n return $this->getResponseNegotiator()->respond($this->request);\n }\n \n \n //If the log cannot be found redirect to the main screen\n if(!$this->currentPage()) {\n return $this->redirect($this->Link());\n }\n \n \n //Other wise render normally\n return array();\n }",
"public function location()\n {\n $city = $this->city;\n if ($city) {\n $subdivision = $city->subdivision;\n $country = $subdivision->country;\n\n $this->attributes['location'] = $city->name . ' ' . $subdivision->abbreviation . ', ' . $country->name;\n } else {\n $this->attributes['location'] = null;\n }\n }",
"protected function getTrackerString() {\n ob_start();\n?>\nga(function(tracker) {\n var url = tracker.get('location');\n var message = 'Analytics page is: '+ url;\n if(window.console && console.log) console.log(message);\n});\n<?php\n $jsLog = ob_get_clean();\n return $jsLog;\n }"
] | [
"0.6094862",
"0.573639",
"0.5736111",
"0.5702951",
"0.5568251",
"0.55526716",
"0.553553",
"0.55191576",
"0.5502245",
"0.54797536",
"0.54207766",
"0.5406463",
"0.538621",
"0.532568",
"0.5315119",
"0.5235307",
"0.52312756",
"0.5223405",
"0.52166647",
"0.52158874",
"0.5207647",
"0.519355",
"0.51912284",
"0.5159566",
"0.5153467",
"0.51494837",
"0.51186955",
"0.5094601",
"0.508066",
"0.50743747",
"0.50725675",
"0.50621665",
"0.5056078",
"0.503523",
"0.503256",
"0.5025824",
"0.50211406",
"0.5016695",
"0.50050884",
"0.49955493",
"0.49940032",
"0.49846533",
"0.49840793",
"0.4980085",
"0.49725378",
"0.49687406",
"0.49651667",
"0.49298814",
"0.49135014",
"0.49105263",
"0.49095312",
"0.490836",
"0.4892016",
"0.48818055",
"0.4880045",
"0.4879009",
"0.48783606",
"0.48771983",
"0.48765466",
"0.48684365",
"0.4864463",
"0.485772",
"0.48569012",
"0.4853832",
"0.48525375",
"0.48525375",
"0.48511744",
"0.48470777",
"0.4845248",
"0.48446015",
"0.48406723",
"0.48403803",
"0.48403803",
"0.4838755",
"0.48370814",
"0.48334417",
"0.48319948",
"0.48317945",
"0.48293772",
"0.48262972",
"0.48243013",
"0.48114243",
"0.48022032",
"0.47992605",
"0.47974548",
"0.4791692",
"0.47809902",
"0.47804046",
"0.4774518",
"0.47736883",
"0.4765356",
"0.47478628",
"0.4747697",
"0.47463098",
"0.47306108",
"0.47203103",
"0.4718665",
"0.47117612",
"0.47094116",
"0.47088552"
] | 0.5887237 | 1 |
Get the uri of a given cached page | function get_cache_URI($set_uri = null){
$CFG =& load_class('Config');
$URI =& load_class('URI');
$set_uri = (isset($set_uri)) ? $set_uri : $URI->uri_string;
$cache_path = ($CFG->item('cache_path') == '') ? BASEPATH.'cache/' : $CFG->item('cache_path');
if ( ! is_dir($cache_path) OR ! is_writable($cache_path))
{
return FALSE;
}
/*
* Build the file path. The file name is an MD5 hash of the full URI
*
* NOTE: if you use .htaccess to remove your "index.php" file in the url
* you might have to prepend a slash to the submitted$set_uri in order to
* get it working.
*/
$uri = $CFG->item('base_url').
$CFG->item('index_page').
$set_uri;
return array('path'=>$cache_path, 'uri'=>$uri);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function url()\n\t{\n\t\t$id\t\t= $this->attribute('id');\n\t\t$page\t= $this->pyrocache->model('pages_m', 'get', array($id));\n\n\t\treturn site_url($page ? $page->uri : '');\n\t}",
"public function getCachedReturnUrl()\n {\n $key = 'oauth_return_url_'.$this->request->input('oauth_token');\n\n // If we have no return url stored, redirect back to root page\n $url = $this->cache->get($key, Config::get('hosts.app'));\n\n return $url;\n }",
"function get_page_uri($page = 0)\n {\n }",
"public function url() {\n\n if(isset($this->cache['url'])) return $this->cache['url'];\n\n // Kirby is trying to remove the home folder name from the url\n if($this->isHomePage()) {\n // return the base url\n return $this->cache['url'] = $this->site->url();\n } else if($this->parent->isHomePage()) {\n return $this->cache['url'] = $this->site->url() . '/' . $this->parent->uid . '/' . $this->uid;\n } else {\n $purl = $this->parent->url();\n return $this->cache['url'] = $purl == '/' ? '/' . $this->uid : $this->parent->url() . '/' . $this->uid;\n }\n\n }",
"protected function pageURI(): string\n {\n $ssl = (@$_SERVER['HTTPS'] == 'on');\n $link = ($ssl? 'https://' : 'http://') .$_SERVER['HTTP_HOST'];\n if ($_SERVER['SERVER_PORT'] != ($ssl? '443' : '80')) {\n $link .= ':' .$_SERVER[\"SERVER_PORT\"];\n }\n return $link .urldecode($_SERVER['REQUEST_URI']);\n }",
"public function getUrl($page): string;",
"public function getPageUri($entryId);",
"private function getLink(int $page): string\n {\n if (!isset($this->cache[$page]) || empty($this->cache[$page])) {\n throw new Exception(\"Trying to get an uncached Link\");\n }\n\n return $this->cache[$page];\n }",
"function cherry_get_page_URL(){\n\t\tif(!isset($_SERVER['REQUEST_URI'])){\n\t\t\t$site_uri = $_SERVER['PHP_SELF'];\n\t\t} else {\n\t\t\t$site_uri = $_SERVER['REQUEST_URI'];\n\t\t\t$https = empty($_SERVER[\"HTTPS\"]) ? '' : (($_SERVER[\"HTTPS\"] == \"on\") ? \"s\" : \"\");\n\t\t\t$site_protocol = strtolower($_SERVER[\"SERVER_PROTOCOL\"]);\n\t\t\t$site_protocol = substr($site_protocol,0,strpos($site_protocol,\"/\")).$https;\n\t\t\t$site_port = ($_SERVER[\"SERVER_PORT\"] == \"80\") ? \"\" : (\":\".$_SERVER[\"SERVER_PORT\"]);\n\t\t}\n\t\treturn $site_protocol.\"://\".$_SERVER['SERVER_NAME'].$site_port.$site_uri;\n\t}",
"public function getUrl($page);",
"public function getFrontPageUrl();",
"public function getURI();",
"public function getFirstPageUrl();",
"abstract public function getUri();",
"private function curPageURL() {\r\n $pageURL = 'http';\r\n if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\r\n $pageURL .= \"://\";\r\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\r\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\r\n } else {\r\n $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\r\n }\r\n return $pageURL;\r\n }",
"public static function getThisUrl() {}",
"function GetPrewURI() /*added 16_05*/\n\t\t{\n\t\tif($this->history[count($this->history)-1])\n\t\t\t$ret = $this->history[count($this->history)-1];\n\t\telse\n\t\t\t$ret = $_SERVER['SERVER_NAME'];\n//\t\treturn $this->history[count($this->history)-1]; \n\t\treturn $ret;\n\t\t}",
"function href() {\n\t\t$usemodrewrite = polarbear_setting('usemodrewrite');\n\t\tif ($usemodrewrite) {\n\t\t\treturn $this->fullpath();\n\t\t} else {\n\t\t\treturn $this->templateToUse() . '?polarbear-page=' . $this->getId();\n\t\t}\n\t}",
"protected function _url()\n {\n if (!empty($_SERVER['PATH_INFO'])) {\n return $_SERVER['PATH_INFO'];\n }else if (!empty($_SERVER['REQUEST_URI'])) {\n return $_SERVER['REQUEST_URI'];\n }elseif (isset($_SERVER['PHP_SELF']) && isset($_SERVER['SCRIPT_NAME'])) {\n $uri = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['PHP_SELF']);\n } elseif (isset($_SERVER['HTTP_X_REWRITE_URL'])) {\n $uri = $_SERVER['HTTP_X_REWRITE_URL'];\n } elseif ($var = env('argv')) {\n $uri = $var[0];\n }\n return $uri;\n }",
"public function getUri() {}",
"public function getUri() {}",
"function curPageURL()\n{\n\t$pageURL = 'http';\n\n\t$pageURL .= \"://\";\n\n\tif ($_SERVER[\"SERVER_PORT\"] != \"80\")\n\t{\n\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n\t}\n\telse\n\t{\n\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n\t}\n\n\treturn $pageURL;\n}",
"public function url()\n {\n return explode('?' ,$this->uri)[0];\n }",
"public function getUri();",
"public function getUri();",
"public function getUri();",
"public function getUri();",
"static function obtenerUrlActual() {\n $url = Util::crearUrl($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n return $url;\n }",
"public static function _url() {\n\t\treturn self::pw('pages')->get('pw_template=mpm')->url;\n\t}",
"public function getLastPageUrl();",
"function getCurrentUrlFromRoutes()\n {\n $input = &SGL_Registry::singleton();\n $url = $input->getCurrentUrl();\n $currUrl = $url->toString();\n $baseUrl = $url->getBaseUrl($skipProto = false, $includeFc = false);\n return str_replace($baseUrl, '', $currUrl);\n }",
"private function _getContentURI(){\r\n $uri = substr($_SERVER['REQUEST_URI'], strlen(WEBROOT));\r\n if (strstr($uri, '?')) $uri = substr($uri, 0, strpos($uri, '?'));\r\n $uri = str_replace('index.php', '', $uri);\r\n $uri = trim($uri, '/');\r\n\r\n if($uri == ''){\r\n $uri = 'index';\r\n }\r\n\r\n return $uri;\r\n }",
"protected function getUrl(){\n\n\t\t//retornando a url aonde o usuario está\n\t\treturn parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n\n\t}",
"public function get_url();",
"public function getNextPageUrl();",
"public function getNextPageUrl();",
"public function getUri()\n {\n return $this->getUrl();\n }",
"function get_metadata_uri ($metadata_server, $id) {\n\n\t$url = $metadata_server.md5($id).'?Meta[RefURI]='.urlencode($id); // use md5 hash, because not every cms supports special chars as page id\n\n\treturn $url;\n\n}",
"function \nget_php_net ()\n{\n $st = @stat (CACHEFILE);\n if ($st === false) { // fallthrough and download it\n\treturn download_url ();\n }\n\n if (CACHETIME < (time() - $st['mtime'])) {\n\treturn get_cached_data ();\n }\n\n\n return download_url ();\n}",
"function curPageURL() {\n @$pageURL = 'http';\n if (@$_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n @$pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n @$pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n } else {\n @$pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n }\n return @$pageURL;\n}",
"public static function getWebsiteURL(){\n if(Cache::isStored('website_url'))return Cache::get('website_url'); \n $row = getDatabase()->queryFirstRow(\"SELECT `value` FROM `settings` WHERE `setting` = 'website_url'\");\n $url = $row['value'];\n #http:// prefix\n if(!is_numeric(strpos($url, \"http://\"))){\n $url = 'http://' . $url;\n }\n #/ suffix\n if(substr($url, -1) != '/'){\n $url .= '/';\n }\n Cache::store('website_url', $url);\n return $url;\n }",
"public function getCurrentPageURL() {\n\t\t\t$pageURL = 'http';\n\t\t\tif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == \"on\") {\n\t\t\t\t$pageURL .= \"s\";\n\t\t\t}\n\t\t\t$pageURL .= \"://\";\n\t\t\tif ($_SERVER['SERVER_PORT'] != 80) {\n\t\t\t\t$pageURL .= $_SERVER['SERVER_NAME'] . \":\" . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$pageURL .= $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n\t\t\t}\n\t\t\treturn $pageURL;\n\t\t}",
"static function curPageURL() \n\t\t{\n\t\t\t$pageURL = 'http';\n\t\t\tif ($_SERVER[\"HTTPS\"] == \"on\")\n\t\t\t{\n\t\t\t\t$pageURL .= \"s\";\n\t\t\t}\n\t\t\t$pageURL .= \"://\";\n\t\t\tif ($_SERVER[\"SERVER_PORT\"] != \"80\") \n\t\t\t{\n\t\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n\t\t\t}\n\t\t\treturn $pageURL;\n\t\t}",
"function curPageURL()\n{\n $pageURL = 'http';\n if (@$_SERVER[\"HTTPS\"] == \"on\") {\n $pageURL .= \"s\";\n }\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . \":\" . $_SERVER[\"SERVER_PORT\"] . $_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n }\n return $pageURL;\n}",
"function curPageURL() {\n\t$pageURL = 'http';\n\tif ($_SERVER[\"HTTPS\"] == \"on\") {\n\t\t$pageURL .= \"s\";\n\t}\n\t$pageURL .= \"://\";\n\tif ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n\t} else {\n\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n\t}\n\treturn $pageURL;\n}",
"function curPageURL() {\n $pageURL = 'http';\n if (isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n $pageURL .= \"://\";\n \n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n }\n return $pageURL;\n }",
"protected function GetCacheKey()\n\t{\n\t\treturn $this->params['page'];\n\t}",
"protected function get_uri()\n {\n }",
"function curPageURL() {\n\t $pageURL = 'http';\n\t if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n\t $pageURL .= \"://\";\n\t if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n\t $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n\t } else {\n\t $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n\t }\n\t return $pageURL;\n}",
"public function getPageUris();",
"protected function ___url() {\n\t\treturn $this->pagefiles->url . $this->basename;\n\t}",
"public static function getCache() {\n\n if (Config::get('app.cache') != 0 && !Auth::check()) { //\n $page = (Paginator::getCurrentPage() > 1 ? Paginator::getCurrentPage() : '');\n $key = 'route-' . Str::slug(Request::fullurl()) . $page;\n\n if (Cache::has($key)) {\n die(Cache::get($key));\n }\n }\n }",
"function curPageURL()\n{\n\t$pageURL = 'http';\n\tif ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n\t$pageURL .= \"://\";\n\tif ($_SERVER[\"SERVER_PORT\"] != \"80\") \n\t$pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n\telse\n\t$pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n\treturn $pageURL;\n}",
"function curPageURL() {\r\n $pageURL = 'http';\r\n if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\r\n $pageURL .= \"://\";\r\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\r\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\r\n } else {\r\n $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\r\n }\r\n return $pageURL;\r\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}",
"private function get_filename() {\n \n $md5 = md5($_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"]);\n return CACHE_DIR . \"/\" . $md5;\n }",
"function CurrentPageURL() \n{\n\t$pageURL = \"https://\";\n\tif(strpos(strtolower($_SERVER['SERVER_PROTOCOL']),\"https\") === false) $pageURL = \"http://\";\n\t$pageURL .= $_SERVER['SERVER_PORT'] != '80' ? $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"] : $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n\treturn $pageURL;\n}",
"static function get_current_page_url() {\n\t\tif ( isset($_SERVER['REQUEST_URI']) ) {\n\t\t\t$_SERVER['REQUEST_URI'] = preg_replace('/&?offset=[0-9]*/', '', $_SERVER['REQUEST_URI']);\n\t\t}\n\t\treturn wp_kses($_SERVER['REQUEST_URI'], '');\n\t}",
"public function getCurrentUrl();",
"abstract protected function getUri(): string;",
"public static function getURL() {\n $url = self::getHost() . $_SERVER['REQUEST_URI'];\n return $url;\n }",
"abstract public function uri(): string;",
"public function getUrl(): string\n {\n return ($this->prefix ?? '') . $this->uri;\n }",
"function curPageURL() {\n $pageURL = 'http';\n if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n }\n return $pageURL;\n}",
"function curPageURL() {\n $pageURL = 'http';\n if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n }\n return $pageURL;\n}",
"function curPageURL() {\n $pageURL = 'http';\n if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n }\n return $pageURL;\n}",
"function curPageURL() \n\t{\n\t\t$pageURL = 'http';\n\t\tif ($_SERVER[\"HTTPS\"] == \"on\") \n\t\t{\n\t\t\t$pageURL .= \"s\";\n\t\t}\n\t\t$pageURL .= \"://\";\n\t\tif ($_SERVER[\"SERVER_PORT\"] != \"80\") \n\t\t{\n\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n\t\t}\n\t\treturn $pageURL;\n\t}",
"public static function getURI() {\n\n return self::loadUrl();\n }",
"public function get_uri()\n {\n }",
"private function buildCurrentPageURI() {\n $protocol = is_ssl() ? 'https' : 'http';\n $site = $_SERVER['SERVER_NAME'];\n $slug = $_SERVER['REQUEST_URI'];\n\n return urlencode($protocol.'://'.$site.$slug);\n }",
"function get_file_url($file, $nocache = false) {\n if($file = find_file($file)) {\n $url = str_replace(FILES_PATH,FILES_URL,$file);\n } else {\n return false;\n }\n if($nocache) {\n $url .= '?revision='.md5_file($file);\n }\n return $url;\n}",
"private function getURL(){\n if(!empty($_SERVER['REQUEST_URI'])){\n return trim($_SERVER['REQUEST_URI'],'/');\n }\n }",
"public function diruri() {\n if(isset($this->cache['diruri'])) return $this->cache['diruri'];\n return $this->cache['diruri'] = ltrim($this->parent()->diruri() . '/' . $this->dirname(), '/');\n }",
"public abstract function getURL();",
"function getCurrentPageURL() {\n $pageURL = 'http';\n// if ($_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n// $pageURL .= \"://\";\n// if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n// $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n// } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n// }\n return $pageURL;\n}",
"function CurrPageURL() {\n $pageURL = 'http';\n if ($_SERVER[\"HTTPS\"] == \"on\") {\n $pageURL .= \"s\";\n }\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . \":\" . $_SERVER[\"SERVER_PORT\"] . $_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n }\n return $pageURL;\n }",
"public function url()\n\t{\n\t\t$this->buildImage();\n\t\treturn $this->buildCachedFileNameUrl;\n\t}",
"function curPageURL() {\n $pageURL = 'http';\n if (isset($_SERVER[\"HTTPS\"]) AND $_SERVER[\"HTTPS\"] == \"on\") {$pageURL .= \"s\";}\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].$_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"].$_SERVER[\"REQUEST_URI\"];\n }\n return $pageURL;\n}",
"public function uri() {\n\t\treturn $this->getUri();\n\t}",
"public function getUri() : string\n {\n $rtn = $this->data['uri'];\n\n return $rtn;\n }",
"function get_requested_url() {\n\n $requested_url = $_SERVER['REQUEST_URI'];\n $requested_url = str_replace(get_homeurl(), '', $requested_url);\n //$requested_url = ltrim($requested_url, get_homeurl());\n $requested_url = ltrim($requested_url, '/');\n $requested_url = rtrim($requested_url, '.php');\n $requested_url = rtrim($requested_url, '/');\n\n return $requested_url;\n}",
"function getURI() {\n\t\t\t$requestURI = $_SERVER['REQUEST_URI'];\n\n\t\t\tif (strpos($requestURI, '?') !== FALSE) { // hack for IE which does not pass querystring in URI element of Digest string or in response hash\n\t\t\t\t$requestURI = substr($requestURI, 0, strlen($uri[1]));\n\t\t\t}\n\t\t\t\n\t\t\treturn $requestURI;\n\t\t}",
"function fa_get_uri( $rel_path ){\n\t$uri = is_ssl() ? str_replace('http://', 'https://', FA_URL) : FA_URL;\t\n\t$path = path_join( $uri, $rel_path );\n\treturn $path;\n}",
"function GetPageAddress()\n\t{\n\t\t$url =\"http://{$_SERVER['HTTP_HOST']}{$_SERVER['SCRIPT_NAME']}\";\n\t\t$url.=\"?\";\n\t\t$url.=\"{$_SERVER['QUERY_STRING']}\";\n\t\treturn $url;\n\t}",
"function basel_get_compare_page_url() {\n\t\t$page_id = basel_get_opt( 'compare_page' );\n\n\t\tif ( defined( 'ICL_SITEPRESS_VERSION' ) && function_exists( 'wpml_object_id_filter' ) ) {\n\t\t\t$page_id = wpml_object_id_filter( $page_id, 'page', true );\n\t\t}\n\n\t\treturn get_permalink( $page_id );\n\t}",
"function request_uri() {\n\n if (isset($_SERVER[\"REQUEST_URI\"])) {\n $uri = $_SERVER[\"REQUEST_URI\"];\n }\n else {\n $uri = $_SERVER[\"PHP_SELF\"] .\"?\". $_SERVER[\"argv\"][0];\n }\n\n return check_url($uri);\n}",
"public function getUri($code)\n {\n $config = $this->directoryList->getConfig($code);\n return isset($config['uri']) ? $config['uri'] : '';\n }",
"public static function Get($uri,$iSiteId) {\n\n\t\t$p = CACHE_PATH.\"/page/\".md5($uri).\".cache\";\n\t\tif (file_exists($p)) {\n\t\t\tinclude($p);\n\t\t\tdie();\n\t\t} else {\n\t\t if (CACHE_LOG) {\n\n\t\t\t$f = \"/tmp/cache_miss_\".$iSiteId.\".log\";\n\t $fh = fopen($f, 'a');\n \tif (!$fh) return false;\n \t fwrite($fh, $uri.\"\\n\\r\");\n\t fclose($fh);\n\n\t\t }\n\n\t\t}\n\t}",
"public function getURL();",
"public function getURL();",
"public static function getRequestedURL()\n {\n return self::getInstance()->requestedUrl;\n }",
"public function getWebURI()\n {\n\t\treturn $this->response[self::FIELD_RESULT][self::FIELD_WEB_URI];\n\t}",
"private function getUri(){\n return $this->uri = parse_url($_SERVER['REQUEST_URI']);\n }",
"private function getLastURL() {\n\t\tif (!isset($_SERVER['REQUEST_URI'])) {\n\t\t\t$serverrequri = $_SERVER['PHP_SELF'];\n\t\t} else {\n\t\t\t$serverrequri = $_SERVER['REQUEST_URI'];\n\t\t}\n\n\t\t$slcurrentPageName=str_replace('?&no_cache=1', '', $serverrequri);\n\t\t$slcurrentPageName=str_replace('?no_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('&no_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('?&purge_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('?purge_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('&purge_cache=1', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('?&L=0', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('&L=0', '', $slcurrentPageName);\n\t\t$slcurrentPageName=str_replace('?L=0', '', $slcurrentPageName);\n\t\treturn $slcurrentPageName;\n\t}",
"private function uri($page)\n\t{\n\t\t$this->uri->setVar('page', $page);\n\n\t\treturn $this->uri;\n\t}",
"public function getURL() {\n\t\treturn $this->urlStub() .'/' . $this->publicContainer .'/' . $this->getId();\n\t}",
"function get_uri() {\n return urldecode(\n parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)\n );\n }",
"public function getURI()\n {\n return $this->server['REQUEST_URI'];\n }",
"function getCurrentUri()\n\t\t{\n\t\t\t$basepath = implode('/', array_slice(explode('/', $_SERVER['SCRIPT_NAME']), 0, -1)) . '/';\n\t\t\t$uri = substr($_SERVER['REQUEST_URI'], strlen($basepath));\n\t\t\tif (strstr($uri, '?')) $uri = substr($uri, 0, strpos($uri, '?'));\n\t\t\t$uri = '/' . trim($uri, '/');\n\t\t\treturn $uri;\n\t\t}",
"function getCacheFileContent($url, $cacheTime) {\n $fileName = sha1($url);\n $file = Gear_Cache::getFullfile($fileName, $cacheTime);\n if ($file) {\n return $file;\n } else {\n $file = file_get_contents($url);\n Gear_Cache::setFullFile($fileName, $file);\n return $file;\n }\n}"
] | [
"0.6542568",
"0.64650595",
"0.64192945",
"0.6238483",
"0.6209386",
"0.61809",
"0.61567044",
"0.6142795",
"0.6035277",
"0.5979642",
"0.59153503",
"0.58943796",
"0.58651006",
"0.5822515",
"0.5803816",
"0.5798864",
"0.5779232",
"0.5772206",
"0.57657284",
"0.5735613",
"0.5735613",
"0.5732273",
"0.57288325",
"0.57041353",
"0.57041353",
"0.57041353",
"0.57041353",
"0.5691998",
"0.568396",
"0.5680516",
"0.56633204",
"0.5651635",
"0.5638584",
"0.56230927",
"0.56119114",
"0.56119114",
"0.56082416",
"0.5592236",
"0.558632",
"0.5567361",
"0.55647767",
"0.5560151",
"0.55598927",
"0.5559214",
"0.5554753",
"0.55534786",
"0.5547925",
"0.5546918",
"0.55467665",
"0.5546007",
"0.5531507",
"0.5523105",
"0.5519212",
"0.5517278",
"0.5513021",
"0.5512396",
"0.5510355",
"0.55018437",
"0.5495594",
"0.54948574",
"0.5486002",
"0.5485445",
"0.5480616",
"0.54756165",
"0.54756165",
"0.54756165",
"0.54742575",
"0.5469558",
"0.54667777",
"0.5465044",
"0.5463089",
"0.54611313",
"0.5458063",
"0.54561263",
"0.54551935",
"0.5454165",
"0.54515904",
"0.54493076",
"0.54462504",
"0.54451233",
"0.54449946",
"0.5444084",
"0.54437405",
"0.5434392",
"0.5431059",
"0.5430331",
"0.54287595",
"0.54260784",
"0.54254967",
"0.54254967",
"0.5424556",
"0.542161",
"0.5421555",
"0.5421391",
"0.54201615",
"0.5417265",
"0.54153645",
"0.5414144",
"0.5413731",
"0.54099774"
] | 0.6312565 | 3 |
Manually clear a cached file | function clear_page_cache($set_uri = null, $filepath = null){
switch (isset($filepath))
{
case FALSE:
$cacheuri = $this->get_cache_URI($set_uri);
$filepath = $cacheuri['path'];
$filepath .= md5($cacheuri['uri']);
default:
if(file_exists($filepath))
{
touch($filepath);
unlink($filepath);
log_message('debug', "Cache deleted for: ".$cacheuri['uri']);
} else
{
return FALSE;
}
break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function clearCache(){\n if(file_exists($this->file)){\n @unlink($this->file);\n }\n }",
"public function clear()\n {\n if (File::rm($this->cacheFile)) {\n echo 'OK';\n } else {\n echo 'ERROR';\n }\n }",
"public function clear_cache() {\n\t\tif (file_exists($this->cache_path)) {\n\t\t\tunlink($this->cache_path);\n\t\t}\n\t}",
"public function delete_cache()\r\n {\r\n $this->clear_file_cache();\r\n }",
"public function clearCache()\n {\n $files = $this->ls('/', 'cache');\n foreach ($files as $file)\n {\n if (is_dir($this->cachePath . '/' . $file))\n {\n $this->$this->recurciveDelete($this->cachePath . '/' . $file);\n } else\n {\n unlink($this->cachePath . '/' . $file);\n }\n }\n }",
"public function _cacheClear() {\n\t\t$content = null;\n\t\tif ( ZC_CACHE == 'apc' ) {\n\t\t\t$info = apc_cache_info( 'user' );\n\t\t\tforeach ( $info[ 'cache_list' ] as $item ) {\n\t\t\t\tif ( preg_match( '/^\\Q'. ZC_CACHE_PREFIX. '\\E/', $item[ 'info' ] ) )\n\t\t\t\t\tapc_delete( $item[ 'info' ] );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ( ( $dh = opendir( ZC_CACHE_DIR ) ) !== false ) {\n\t\t\t\twhile( ( $file = readdir( $dh ) ) !== false ) {\n\t\t\t\t\tif ( ! preg_match( '/\\.cache$/', $file ) || is_dir( $file ) ) continue;\n\t\t\t\t\tunlink( ZC_CACHE_DIR. '/'. $file );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function clear () {\n array_map('unlink', glob(CACHE.\"*.cache\"));\n /*\n $files = scandir(CACHE);\n foreach ($files as $file){\n if (pathinfo($file, PATHINFO_EXTENSION) == 'cache') @unlink(CACHE.$file);\n }\n */\n }",
"public function clearCachefiles () {\r\n\t\r\n\t}",
"public function removeFromCache()\n {\n Cache::tags('file')->forget(strtolower($this->alias));\n }",
"public static function clear_file_contents_cache() {\n\t\tself::$file_contents = [];\n\t}",
"public function clearCache() {}",
"public function clearCache() {}",
"public function removeCache() {\r\n $files = $this->caches;\r\n while (count($files) > 0) {\r\n @unlink(array_shift($files));\r\n }\r\n\r\n }",
"public function clearCache(): void;",
"public function clear_cache(): void;",
"public function cleanFileCache()\n {\n if (is_callable(array('SugarAutoLoader', 'buildCache'))) {\n SugarAutoLoader::buildCache();\n } else {\n // delete dangerous files manually\n @unlink(\"cache/file_map.php\");\n @unlink(\"cache/class_map.php\");\n }\n }",
"public static function clearCache() {\n $cached=sugar_cached('include/externalAPI.cache.php');\n if ( file_exists($cached) ) {\n unlink($cached);\n }\n $cached=sugar_cached('include/externalAPI.cache.js');\n if ( file_exists($cached) ) {\n unlink($cached);\n }\n }",
"public static function clear_cache() {\n $cacheFolder = self::$cache_folder ? self::$cache_folder : self::relative_client_helper_path() . 'cache/';\n if (!$dh = @opendir($cacheFolder)) {\n return;\n }\n while (FALSE !== ($obj = readdir($dh))) {\n if ($obj != '.' && $obj != '..')\n @unlink($cacheFolder . '/' . $obj);\n }\n closedir($dh);\n }",
"private static function CLEAR_CACHE() {\n\t\tclearstatcache();\n\t}",
"public function clearCacheFiles()\n {\n if (false === $this->cache) {\n return;\n }\n foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->cache), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {\n if ($file->isFile()) {\n @unlink($file->getPathname());\n }\n }\n }",
"public static function removeCacheFiles() {}",
"public function clearstatcache($path = NULL) {\n clearstatcache(TRUE, $path);\n }",
"public function clearCache()\n {\n }",
"abstract protected function clearCache();",
"public function clear($uri = '')\n {\n if ($uri == '') {\n $files = glob($this->getDirectory() . DIRECTORY_SEPARATOR . '*.cache');\n foreach ($files as $file) {\n unlink($file);\n }\n }\n\n $filename = $this->getCacheFilename($uri);\n\n if (file_exists($filename)) {\n unlink($filename);\n }\n }",
"private function clearCache() {\n\t\t\n\t\tCore\\Cache::clear();\n\t\t\n\t}",
"public function clear()\n {\n unlink($this->file);\n }",
"public function clear()\n {\n $iterator = new DirectoryIterator($this->cacheDirectory);\n $extensionPattern = '/' . preg_quote(self::CACHE_SUFFIX) . '$/';\n\n foreach ($iterator as $file) {\n if (false === $file->isFile()) {\n continue;\n }\n\n if (0 === preg_match($extensionPattern, $file->getBaseName())) {\n continue;\n }\n\n unlink($file->getPathName());\n }\n }",
"public function clearCache()\n {\n if (file_exists($this->cacheDir)) {\n foreach (glob($this->cacheDir.DIRECTORY_SEPARATOR.'*') as $file) {\n unlink($file);\n }\n rmdir($this->cacheDir);\n }\n mkdir($this->cacheDir, 0777, true);\n }",
"public function clear()\n {\n file_put_contents($this->getFilepath(), '{}');\n }",
"function clearstatcache($clear_realpath_cache = false, $filename = NULL)\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}",
"public function clearCached()\n {\n $this->cached = null;\n }",
"private static function purgeCache() {\n $cacheFolder = self::$cache_folder ? self::$cache_folder : self::relative_client_helper_path() . 'cache/';\n self::purgeFiles($cacheFolder, self::$cache_timeout * 5, self::$cache_allowed_file_count);\n }",
"function ClearCache()\n\t{\n\t\tglobal $gCms;\n\t\t$smarty =& $gCms->GetSmarty();\n\n\t\t$smarty->clear_all_cache();\n\t\t$smarty->clear_compiled_tpl();\n\n\t\tif (is_file(TMP_CACHE_LOCATION . '/contentcache.php'))\n\t\t{\n\t\t\tunlink(TMP_CACHE_LOCATION . '/contentcache.php');\n\t\t}\n\n\t\t@touch(cms_join_path(TMP_CACHE_LOCATION,'index.html'));\n\t\t@touch(cms_join_path(TMP_TEMPLATES_C_LOCATION,'index.html'));\n\t}",
"public static function clear(): void\n {\n static::getCache()->clear();\n }",
"public function clearCache( $fileType = null ) {\n\t\tif ( !$fileType ) {\n\t\t\t// Update all\n\t\t\t$this->clearCache( FILETYPE_PNG );\n\t\t\t$this->clearCache( FILETYPE_GPML );\n\t\t\t$this->clearCache( FILETYPE_IMG );\n\t\t} else {\n\t\t\t$file = $this->getFileObj( $fileType );\n\t\t\tif ( $file->exists() ) {\n\t\t\t\t// Delete the cached file\n\t\t\t\tunlink( $file );\n\t\t\t}\n\t\t}\n\t}",
"function _clear_cache_files () {\n\t\t// Memcached code\n\t\tif ($this->USE_MEMCACHED) {\n// TODO\n\t\t// Common (files-based) cache code\n\t\t} else {\n\t\t\t$dh = @opendir($this->CACHE_DIR);\n\t\t\tif (!$dh) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\twhile (($f = readdir($dh)) !== false) {\n\t\t\t\tif ($f == \".\" || $f == \"..\" || !is_file($this->CACHE_DIR.$f)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (common()->get_file_ext($f) != \"php\") {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (substr($f, 0, strlen($this->_file_prefix)) != $this->_file_prefix) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// Do delete cache file\n\t\t\t\tif (file_exists($this->CACHE_DIR.$f)) {\n\t\t\t\t\tunlink($this->CACHE_DIR.$f);\n\t\t\t\t}\n\t\t\t}\n\t\t\t@closedir($dh);\n\t\t}\n\t}",
"public function clean()\n {\n $fileSystem = new Filesystem();\n \n if ($fileSystem->exists($this->getCacheDir())) {\n $fileSystem->remove($this->getCacheDir());\n }\n }",
"public function cleanContrexxCaching()\n {\n $this->_deleteAllFiles();\n }",
"function clearCache()\n {\n $cacheDir = $this->container->getParameter('kernel.cache_dir');\n\n $kernel = $this->container->get('kernel');\n\n $cacheDir = realpath($cacheDir.'/../');\n\n\n foreach (array (/*'frontdev','frontprod',*/'dev','prod') as $env)\n {\n foreach (array ('UrlGenerator','UrlMatcher') as $file)\n {\n $cachedFile = $cacheDir.'/'.$env.'/app'.ucfirst($env).$file.'.php';\n //print '<br>'.$cachedFile;\n if (file_exists($cachedFile)) @unlink ($cachedFile);\n\n\n $cachedFile = $cacheDir.'/'.$env.'/app'.$env.$file.'.php';\n //print '<br>'.$cachedFile;\n if (file_exists($cachedFile)) @unlink ($cachedFile);\n }\n }\n\n\n if (function_exists('apc_clear_cache')) apc_clear_cache('user');\n //exit();\n\n }",
"public function clearCache()\n\t{\n\t\t$e107 = e107::getInstance();\n\t\t$e107->ecache->clear_sys(UC_CACHE_TAG);\n\t}",
"function clearPreviewCache () {\n files::deleteFile($this->previewDir . $this->file);\n }",
"private function clear_opcache($path)\n\t{\n\t\tif ( ! file_exists($path))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (function_exists('apc_delete_file'))\n\t\t{\n\t\t\t@apc_delete_file($path) || apc_clear_cache();\n\t\t}\n\n\t\tif (function_exists('opcache_invalidate'))\n\t\t{\n\t\t\tif (($opcache_api_path = (string) ini_get('opcache.restrict_api')) && stripos(SYSPATH, $opcache_api_path) !== 0)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\topcache_invalidate($path);\n\t\t}\n\t}",
"public function flush(): void {\n\t\tif($this->cacheDir && is_dir($this->cacheDir)) {\n\t\t\tsystem(\"find {$this->cacheDir} -name 'cache_*' -delete\");\n\t\t}\n\t}",
"public function flush()\n {\n if (file_exists($this->CacheFolder . \"/\" . $this->CacheIndex)) {\n unlink($this->CacheFolder . \"/\" . $this->CacheIndex);\n touch($this->CacheFolder . \"/\" . $this->CacheIndex);\n }\n if (file_exists($this->CacheFolder . \"/\" . $this->CacheDB)) {\n unlink($this->CacheFolder . \"/\" . $this->CacheDB);\n touch($this->CacheFolder . \"/\" . $this->CacheDB);\n }\n }",
"public function purgeCache()\n\t{\n\t\t$objFolder = new Folder(self::CACHE_DIR);\n\t\t$objFolder->purge();\n\t\t\n\t\tstatic::$arrIsCached = array();\t\t\n\t}",
"protected function ClearKeysCache()\n\t{\n\t\tif(is_file($this->m_sCacheFileName))\n\t\t{\n\t\t\tunlink($this->m_sCacheFileName);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//echo \"<p>Hm, it looks like the file does not exist!!!</p>\";\n\t\t}\n\t\t$this->m_aKeys = array();\n\t\t$this->m_aObjectsCache = array(); \n\t}",
"public static function clearCache(){\n\t\t\n\t\t\\GO::config()->getCacheFolder(false)->delete();\t\t\n\t\t\n\t\t\\GO::cache()->flush();\n\n\t\t\\GO\\Base\\Model::clearCache();\n\t}",
"public function clear()\n {\n $this->_cache->clearByNamespace('/');\n }",
"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 function clear() {\n\t\t$counter = 0;\n\t\t$files = glob( $this->cache_directory . '*' );\n\n\t\tforeach ( $files as $file ) {\n\t\t\tif ( is_file( $file ) ) {\n\t\t\t\tunlink( $file );\n\t\t\t\t$counter ++;\n\t\t\t}\n\t\t}\n\n\t\treturn $counter;\n\t}",
"function remove_cache_file()\n\t{\n\t\tglobal $phpbb_container;\n\n\t\t// Sanitise for future path use, it's escaped as appropriate for queries\n\t\t$p_class = str_replace(array('.', '/', '\\\\'), '', basename($this->module_class));\n\n\t\t$phpbb_container->get('cache.driver')->destroy('_modules_' . $p_class);\n\n\t\t// Additionally remove sql cache\n\t\t$phpbb_container->get('cache.driver')->destroy('sql', MODULES_TABLE);\n\t}",
"public function __destruct() {\n\t\tif (file_exists($this->fileName) && (!$this->cache)) {\n\t\t\tunlink($this->fileName);\n\t\t}\n\t}",
"public function clearCache() {\r\n if ($this->getProperty('clearCache')) {\r\n $this->modx->cacheManager->refresh();\r\n }\r\n }",
"public static function removeCache() {\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 function clearCacheData(){\n $cacheKey = $this->getCacheKey();\n $this->clearCache($cacheKey);\n }",
"public function stop_caching()\n {\n $this->log(1,__FUNCTION__,\"Stopping file cache, deleting file pointer and temp file\");\n if ($this->cache_fp) {\n fclose($this->cache_fp);\n $this->cache_fp = null;\n }\n \n if (file_exists($this->temp_cache_filename)) {\n if (unlink($this->temp_cache_filename) === FALSE)\n $this->log(2,__FUNCTION__,\"Cannot delete temporary cache file: [{$this->temp_cache_filename}]\");\n else\n $this->log(1,__FUNCTION__,\"Temporary cache file deleted\");\n }\n \n $this->cache_filename = $this->temp_cache_filename = null;\n }",
"public function clear(): void\n {\n $app = App::get();\n $list = $app->data->getList()\n ->filterBy('key', '.temp/cache/', 'startWith');\n foreach ($list as $item) {\n $app->data->delete($item->key);\n };\n }",
"public function cache_delete()\n {\n }",
"protected function emptyCache()\n {\n $this->container->get('cache')->clear();\n }",
"public function clearCache()\n {\n // Create the cache object and cleare storage\n $cache = new Cache(new FileStorage());\n $cache->clear();\n\n // Log activity\n $this->logger->debug(\"Cache cleared successfully.\");\n\n return $this->ajax(true);\n }",
"public function handleClearCache()\n {\n if ($dir = $this->getContext()->getParameters()['tempDir'] . '/cache') {\n opcache_reset();\n \\Devrun\\Utils\\FileTrait::purge($dir = dirname(__DIR__) . \"/temp/cache\");\n $this->redirect('this');\n }\n\n }",
"public function deleteCache($url){\n unlink($this->cacheFilename(($url)));\n }",
"public static function clearCache()\n {\n self::$cache = array();\n }",
"public function clear_all_cache()\r\n {\r\n $CI =& get_instance();\r\n\t $path = $CI->config->item('cache_path');\r\n \r\n $cache_path = ($path == '') ? APPPATH.'cache/' : $path;\r\n \r\n $handle = opendir($cache_path);\r\n\r\n\t\t\tif( get_cache() == 1){\r\n\t\t\t\twhile (($file = readdir($handle))!== FALSE) \r\n\t\t\t\t{\r\n\t\t\t\t\t//Leave the directory protection alone\r\n\t\t\t\t\tif ($file != '.htaccess' && $file != 'index.php')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t @unlink($cache_path.'/'.$file);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\r\n closedir($handle);\r\n }",
"function clearCache () {\n $this->clearThumbCache ();\n $this->clearPreviewCache ();\n }",
"public function clearAll()\n {\n $this->clearDir($this->file_path . '/sb_Cache');\n }",
"private function clean_cache()\n\t{\n\t\t//gc probability\n\t\t$gc = rand(1, Kohana::config($this->type.'.cache_gc'));\n\t\tif ($gc != 1) return FALSE;\n\t\t$cache = new DirectoryIterator(Kohana::config($this->type.'.cache_folder'));\n\t\twhile ($cache->valid())\n\t\t{\n\t\t\t// if file is past maximum cache settings delete file\n\t\t\t$cached = date('U', $cache->getMTime());\n\t\t\t$max = time() + Kohana::config($this->type.'.cache_clean_time');\n\t\t\tif ($cache->isFile() AND ($cached > $max))\n\t\t\t{\n\t\t\t\tunlink($cache->getPathname());\n\t\t\t}\n\t\t\t$cache->next();\n\t\t}\n\t}",
"public function forgetCache();",
"public function clearCache($ident, $category = NULL) {\n\t\t$key = $this->getKey($ident);\n\t\t$path = $this->getFilePath($key, $category);\n\t\ttry {\n\t\t\tunlink($path);\n\t\t} catch (Exception $e) {\n\t\t\tutils::log('Err on cleaning cache on file \"' . $path . '\": ' . $e->getMessage(), \"cache-err\");\n\t\t}\n\t}",
"public function clear()\n {\n sfToolkit::clearDirectory($this->getConfigCacheDir());\n }",
"private function clearstatcache() {\n static $cleared = false;\n if ( !$cleared ) {\n clearstatcache();\n $cleared = true;\n }\n }",
"protected function _clearDataCache() {}",
"public function clean() {\n $this->logger->debug('Deleting of all cache files');\n $list = glob($this->cacheFilePath . '*.cache');\n if (!$list) {\n $this->logger->info('No cache files were found skipping');\n return;\n }\n $this->logger->info('Found [' . count($list) . '] cache files to remove');\n foreach ($list as $file) {\n $this->logger->debug('Processing the cache file [' . $file . ']');\n unlink($file);\n }\n }",
"public function clearCache()\n {\n $this->cache->deleteAll();\n }",
"public function flushCache()\n {\n if ($this->cache) {\n $this->cache->forget($this->getCacheKey());\n }\n }",
"function clear_cache() {\n $this->output->set_header(\"cache-control: no-store, no-cache, must-revalidate, no-transform, max-age=0, post-check=0, pre-check=0\");\n $this->output->set_header(\"Pragma:no-cache\");\n }",
"public static function resetCache();",
"public function clearTcaCache() {}",
"function ClearCache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null)\n {\n return $this->_smarty->clear_cache($tpl_file, $cache_id, $compile_id, $exp_time);\n }",
"public function clear_log() {\r\n\t\t@unlink( $this->file );\r\n\t}",
"function wp_opcache_invalidate($filepath, $force = \\false)\n {\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 static function clearCache($file)\n {\n $count = 0;\n $cachePath = ROOT . self::getFilesPath() . self::getCachePath();\n\n if(file_exists($cachePath))\n {\n $rawName = substr($file->name, 0, -4); // Get name without (.jpg/.gif/.png etc)\n $items = scandir($cachePath);\n\n foreach($items as $i)\n {\n if(substr($i, 0, strlen($rawName)) == $rawName) // If the first part of the cached file matches original file, its a cache of it\n {\n @unlink($cachePath . $i);\n $count++;\n }\n }\n }\n\n return $count;\n }",
"function clearCache( $sName = null ){\n global $config;\n\n foreach( new DirectoryIterator( $config['dir_database'].'cache/' ) as $oFileDir ){\n if( $oFileDir->isFile( ) && ( !isset( $sName ) || ( isset( $sName ) && strstr( $oFileDir->getFilename( ), $sName ) ) ) ){\n unlink( $config['dir_database'].'cache/'.$oFileDir->getFilename( ) );\n }\n } // end foreach\n}",
"public function clear()\n {\n $handle = opendir(CACHE_FOLDER);\n while (false !== ($file = readdir($handle))) {\n if ($file !== '.' && $file !== '..') {\n if (is_dir(CACHE_FOLDER . $file)) {\n //purge ($dir.$file.'/');\n //rmdir($dir.$file);\n } else {\n unlink(CACHE_FOLDER . $file);\n }\n }\n }\n closedir($handle);\n\n return true;\n }",
"private function _clearCache()\n {\n Cache::forget(\"roaddamage-resource:{$this->id}\");\n foreach ($this->getReports() as $report) {\n Cache::forget(\"report-resource:{$report->id}\");\n }\n }",
"public function removeCache()\n {\n $this->getHttpClientBuilder()->removeCache();\n }",
"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}",
"public function clearInternalCache()\n {\n $this->_cached = null;\n }",
"protected function _clear_cache() {\n\t\t$this->_attrs = array();\n\t\t$this->_options = array();\n\t}",
"protected static final function clearCache () {\r\n // Do a new FileDirectory, prepended DOCUMENT_ROOT;\r\n \t$cacheFile = new FileDirectory (CACHE_DIR, TRUE);\r\n \t// Clean-up EVERYTHING, except the dots;\r\n \t// Should use DirectoryIterator here, to be implemented soon;\r\n for ($i = 2, $cacheCount = count ($cacheFile = scandir ($cacheFile)); $i < $cacheCount; ++$i) {\r\n // Just do skip over .dirs and .files;\r\n if ($cacheFile[$i][0] != '.') {\r\n UNLINK ($cacheDirectory . _S . $cacheFile[$i]);\r\n }\r\n }\r\n\r\n // Do return ...\r\n return new B (TRUE);\r\n }",
"protected function _resetPersistentCache() {\n $oUtils = Registry::getUtils();\n $sCacheDir = $oUtils->getCacheFilePath(null, true);\n $aDir = glob($sCacheDir.'*');\n if(is_array($aDir)) {\n $aDir = preg_grep(\"/c_fieldnames_|c_tbdsc_|_allfields_/\", $aDir);\n foreach($aDir as $iKey => $sData) {\n if(!is_dir($sData)) {\n @unlink($sData);\n }\n }\n }\n }",
"public function dettachCache()\n {\n if (!is_null($this->_cache)) {\n unset($this->_cache);\n }\n }",
"public function clearCache()\n {\n $this->userAgentCache->clear();\n $this->deviceCache->clear();\n $this->clientCache->clear();\n }",
"public function cacheClear($args, $assoc_args) {\n if (isset($assoc_args['cache'])) {\n $this->cache->remove($assoc_args['cache']);\n } else {\n $this->cache->flush();\n }\n }",
"public static function clearCache()\n\t{\n\t\tparent::clearCache(__CLASS__);\n\t}",
"public function flushCache() {\n\t\t// is deleted. If it cleared our static cache variables\n\t\t// here, they would in effect be useless.\n\t}"
] | [
"0.88258713",
"0.8306952",
"0.83052415",
"0.82834655",
"0.81091696",
"0.80282176",
"0.80165064",
"0.7919461",
"0.7836576",
"0.78239316",
"0.77721596",
"0.77721596",
"0.77662724",
"0.77489334",
"0.77194977",
"0.7714509",
"0.7713158",
"0.7696646",
"0.75856936",
"0.7539011",
"0.75200135",
"0.7493199",
"0.7472318",
"0.74672306",
"0.74456626",
"0.7430911",
"0.7415302",
"0.7414059",
"0.73981863",
"0.7376523",
"0.73704493",
"0.7366417",
"0.7363049",
"0.73494434",
"0.7341752",
"0.7197133",
"0.71936536",
"0.7183007",
"0.71514744",
"0.71494454",
"0.7135829",
"0.71240985",
"0.7122671",
"0.7109667",
"0.7097387",
"0.70970494",
"0.7029608",
"0.7010441",
"0.7007828",
"0.7000177",
"0.6988959",
"0.698582",
"0.69745475",
"0.6973998",
"0.69656813",
"0.69634706",
"0.69464564",
"0.69388866",
"0.69341695",
"0.6918495",
"0.6912073",
"0.6909475",
"0.69038844",
"0.6897556",
"0.68840545",
"0.68808615",
"0.6877926",
"0.6869838",
"0.6868386",
"0.68617934",
"0.68560386",
"0.6855144",
"0.6842717",
"0.68329966",
"0.68293005",
"0.682396",
"0.68137795",
"0.6808569",
"0.68023276",
"0.6791873",
"0.67876726",
"0.678013",
"0.6776426",
"0.6774453",
"0.6757023",
"0.67468953",
"0.6743739",
"0.6741741",
"0.6740338",
"0.67286223",
"0.67138994",
"0.67077494",
"0.6696747",
"0.6693679",
"0.6692764",
"0.66892785",
"0.66851324",
"0.6684544",
"0.66832286",
"0.6682438"
] | 0.6948829 | 56 |
Check for duplicate login ID | function check_name($id = '')
{ $this->db->where('nama', $this->data['nama']); if($id != '') $this->db->where('id !=', $id); $query = $this->db->get('customer');
if ($query->num_rows() > 0) { return FALSE; } else { return TRUE; } } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function is_duplicate () {\n $email = $this->payload['email'];\n $facebook_id = '0';\n if (!empty($this->payload['facebook_id'])) {\n $facebook_id = $this->payload['facebook_id'];\n }\n $sql = \"SELECT id FROM users WHERE email='$email' OR facebook_id='$facebook_id'\";\n $sql = $this->conn->query($sql);\n\n return $sql->num_rows > 0;\n }",
"private function check_for_duplicate_user_ids() {\n foreach($this->data as $course => $rows) {\n $user_ids = null;\n $d_rows = null;\n // Returns FALSE (as in there is an error) when duplicate IDs are found.\n // However, a duplicate ID does not invalidate a course. Instead, the\n // first enrollment is accepted, the other enrollments are discarded,\n // and the event is logged.\n if (validate::check_for_duplicate_user_ids($rows, $user_ids, $d_rows) === false) {\n foreach($d_rows as $user_id => $userid_rows) {\n $length = count($userid_rows);\n for ($i = 1; $i < $length; $i++) {\n unset($this->data[$course][$userid_rows[$i]]);\n }\n }\n\n $msg = \"Duplicate user IDs detected in {$course} data: \";\n $msg .= implode(\", \", $user_ids);\n $this->log_it($msg);\n }\n }\n\n return true;\n }",
"public function checkData()\n\t{\n\t\t$result = parent::checkData();\n\t\t$query = (new \\App\\Db\\Query())->from($this->baseTable)->where(['server_id' => $this->get('server_id'), 'user_name' => $this->get('user_name')]);\n\t\tif ($this->getId()) {\n\t\t\t$query->andWhere(['<>', 'id', $this->getId()]);\n\t\t}\n\t\treturn !$result && $query->exists() ? 'LBL_DUPLICATE_LOGIN' : $result;\n\t}",
"public function chkUserDuplicate() {\n $this->load->model('register_model');\n $user_name = $this->input->post('user_name');\n $table_to_pass = 'mst_users';\n $fields_to_pass = array('user_id', 'user_name');\n $condition_to_pass = array(\"user_name\" => $user_name);\n $arr_login_data = $this->register_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\n if (count($arr_login_data)) {\n echo 'false';\n } else {\n echo 'true';\n }\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 check_duplicate()\n {\n }",
"public function isUniqueLogin($v=null){\r\n\t\treturn !abstractModel::modelCheckFieldDatasExists('users', 'login', $v===null?$this->login:$v, false, $this->isTemporary()?null:$this->PK);\r\n\t}",
"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}",
"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 }",
"static function first_login_of_user($id) {\n global $con;\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `user` WHERE `id` = \".$id.\";\";\n $query = mysqli_query($con, $sql);\n $count = mysqli_fetch_object($query)->count;\n if ($count == 1) {\n return TRUE;\n }\n return FALSE;\n }",
"public function isLoginUsedAlready($login){\n $stmt = $this->databaseConnection->prepare(\"SELECT login FROM users WHERE login = :login\");\n $stmt->bindParam(':login', $login);\n $stmt->execute();\n $result = $stmt->fetch();\n\n if (empty($result[0])) return false;\n else return true;\n }",
"function is_login ()\r\n {\r\n if (($this->get_login()) && ($this->get_id() != USER_ID_RESET_VALUE) && ($this->get_name() != USER_NAME_RESET_VALUE) && ($this->get_name() != \"\"))\r\n return TRUE;\r\n return FALSE;\r\n }",
"private function check_login()\n {\n if (self::exists('user_id')) {\n $this->user_id = self::get('user_id');\n $this->logged_in = true;\n } else {\n unset($this->user_id);\n $this->logged_in = false;\n }\n }",
"private function compare_with_login()\n {\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 isDuplicate() {\r\n\t\treturn ($this->errorNumber === 1062);\r\n\t}",
"public function checkDuplicates(){\n\t\t$db = new database();\n\t\t$gebruiker = $db->select(\"*\", \"klant\", 1, ['this'=>\"gebruikersnaam\", \"that\"=>$this->gebruikersnaam]);\n\t\t//var_dump($gebruiker);\n\t\tif(!empty($gebruiker[0])){\n\t\t\treturn true;\n\t\t}\n\n\t}",
"private function checkSessionId(){\n\t\tif( !$this->isAuth() ){\n\t\t\treturn false;\n\t\t}\n\n\t\t$sql = 'SELECT 1 FROM `users`\n\t\t\t\tWHERE `id` = :user_id\n\t\t\t\tAND `session_id` = :session_id\n\t\t\t\tLIMIT 1';\n\n\t\t$userId = $this->getId();\n\t\t$sessionId = session_id();\n\n\t\t$stmt = $this->pdo->prepare( $sql );\n\t\t$stmt->bindParam(':user_id', $userId, PDO::PARAM_INT );\n\t\t$stmt->bindParam(':session_id', $sessionId, PDO::PARAM_STR);\n\n\t\treturn ($stmt->execute() && $stmt->rowCount() == 1 );\n\t}",
"function has_unique_username($username/*, $current_id=\"0\"*/) {\r\n global $db;\r\n\r\n $sql = \"SELECT * FROM admins \";\r\n $sql .= \"WHERE username='\" . $db->real_escape_string($username) . \"';\";\r\n //$sql .= \"AND id != '\" . $db->real_escape_string($current_id) . \"'\";\r\n\r\n $result = $db->query($sql);\r\n $user_count = $result->num_rows;\r\n $result->free_result();\r\n\r\n return $user_count === 0;\r\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 }",
"private function user_already_logged() {\n echo \"Entro por user_already_logged\";\n return isset($this->session->userdata['logged_in']);\n }",
"function duplicateName(){\n $dup = $this->app['db']->fetchColumn('SELECT id from worlds where name=?', array($this->name));\n if($dup == $this->id || !$dup){\n return false;\n }\n $this->validation_errors[] = 'Name is a duplicate';\n return true;\n }",
"function checkForDuplicateUnique(){\n $_ufields_arr = explode(\",\", $this->listSettings->GetItem(\"MAIN\", \"UNIQUE_FIELDS\"));\n $check_fields = true;\n for ($i = 0; $i < sizeof($_ufields_arr); $i ++) {\n list ($_field[$i], $_value[$i]) = explode(\"=\", $_ufields_arr[$i]);\n if (strlen($_value[$i])) {\n $check_fields = false;\n $_query_arr[$_field[$i]] = $_value[$i];\n if ($this->_data[$_field[$i]] == $_value[$i]) {\n $check_fields = true;\n }\n }\n else {\n $_query_arr[$_field[$i]] = $this->_data[$_field[$i]];\n }\n }\n if ($check_fields) {\n $_data = $this->Storage->GetByFields($_query_arr, null);\n }\n else {\n $_data = array();\n }\n if (! empty($_data)) {\n if (($this->item_id != $_data[$this->key_field])) {\n if ($this->Kernel->Errors->HasItem($this->library_ID, \"RECORD_EXISTS\")) {\n $_error_section = $this->library_ID;\n }\n else {\n $_error_section = \"GlobalErrors\";\n }\n $this->validator->SetCustomError($_ufields_arr, \"RECORD_EXISTS\", $_error_section);\n }\n }\n }",
"public function chkEditUsernameDuplicate() {\r\n\r\n if ($this->input->post('user_name') == $this->input->post('user_name_old')) {\r\n echo 'true';\r\n } else {\r\n $table_to_pass = 'mst_users';\r\n $fields_to_pass = array('user_id', 'user_name');\r\n $condition_to_pass = array(\"user_email\" => $this->input->post('user_name'));\r\n $arr_login_data = $this->user_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\r\n if (count($arr_login_data)) {\r\n echo 'false';\r\n } else {\r\n echo 'true';\r\n }\r\n }\r\n }",
"public function loginUserConditionDoesNotMatchIfNotUserIsLoggedId() {}",
"public function errorDuplicateEntry()\n {\n return $this->errno == 1062;\n }",
"public function check_duplicate_user($id, $user_id){\n\t\t$this->loadModel('FinAdvUser');\n\t\t$count = $this->FinAdvUser->find('count', array('conditions' => array('app_users_id' => $user_id, 'fin_advance_id' => $id)));\n\t\tif($count > 0){\t\n\t\t\t$this->invalid_attempt();\n\t\t}\n\t}",
"public function log_login() {\r\n\t\tif ($this->user_id) {\r\n\t\t\t$sql = \"UPDATE users SET last_seen = NOW() WHERE user_id = '$this->user_id' LIMIT 1\";\r\n\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\tor die ($this->dbc->error);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"function isUserLoggedin() \n {\n $stmt = self::$_db->prepare(\"SELECT count(id_user) AS c FROM user WHERE session=:sid\");\n $sid = session_id();\n $stmt->bindParam(\":sid\", $sid);\n $stmt->execute();\n $count = $stmt->fetch()[\"c\"];\n if($count == 1)\n {\n return \"true\";\n }\n else if($count < 1)\n {\n return \"false\";\n }\n else\n {\n return \"Error: More then one identical User could be logged in!\";\n }\n }",
"function is_unique_username($username, $current_id=null) {\n $users_result = find_users_by_username($username);\n // Loop through all results, return false if username is in use\n while($user = db_fetch_assoc($users_result)) {\n // Make sure username isn't in use by our current user.\n // Use (int) to make sure we are comparing two integers.\n if((int) $user['id'] != (int) $current_id) {\n return false; // username is being used by someone else\n }\n }\n // Returns true at the end, but only if the loop had no records\n // to loop through or if the loop never returned false.\n return true; // username is not used by anyone\n }",
"public function logFailedLogin($username) {\r\n $insert_log = $this->dbConn->stdQuery(\"INSERT IGNORE INTO `failed_logins` (`ip`, `date`, `username`) VALUES ('\".$_SERVER['REMOTE_ADDR'].\"', NOW(), \".$this->dbConn->quoteSmart($username).\")\");\r\n if (!$this->dbConn->insert_id) {\r\n return False;\r\n } else {\r\n return True;\r\n }\r\n }",
"function openid_if_unique_change_account($user, $url)\n{\n global $openid_tmp_login;\n\n if (openid_already_exists($url)) {\n logout_tmpuser_error(get_string('auth_openid_url_exists', 'auth_openid', $url));\n } else if (!openid_change_user_account($user, $url, $openid_tmp_login)) {\n logout_tmpuser_error(get_string('auth_openid_login_error', 'auth_openid'));\n }\n}",
"public function checkLogin()\n\t{\n\t\t$sql = sprintf\n\t\t\t('\n\t\t\t\tSELECT id FROM adminner WHERE username = \"%s\" AND password = \"%s\"',\n\t\t\t\t$this->getUsername(),\n\t\t\t\t$this->getPassword()\n\t\t\t);\n\t\t\t\n\t\t\t$query = $this->db->query($sql);\n\n\t\treturn $query->num_rows();\n\t}",
"public function chkEmailDuplicate() {\n $this->load->model('register_model');\n $user_email = $this->input->post('user_email');\n $user_email_back = $this->input->post('user_email_back');\n if ($user_email == $user_email_back) {\n echo 'true';\n } else {\n $table_to_pass = 'mst_users';\n $fields_to_pass = array('user_id', 'user_email');\n $condition_to_pass = array(\"user_email\" => $user_email);\n $arr_login_data = $this->register_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\n if (count($arr_login_data)) {\n echo 'false';\n } else {\n echo 'true';\n }\n }\n }",
"static public function checkLogin($aLogin, $aId = -1)\n\t{\n\t\t$q = new Bn_query('users');\n\t\t$q->setFields('user_id');\n\t\t$q->addWhere(\"user_login='\" . $aLogin . \"'\");\n\t\tif ($aId > 0) $q->addWhere('user_id<>' . $aId);\n\t\t$id = $q->getOne();\n\t\treturn !is_null($id);\n\t}",
"public function addLoginState(){\r\n\t\t$userId = $this->session->userdata('userId');\r\n\t\t$res = $this->curd_m->get_search(\"SELECT login_validate FROM users WHERE id=\".$userId,'object');\r\n\t\tif($res!==NULL && sizeof($res)==1){\r\n\t\t\tif( (time()-$res[0]->login_validate) > $this->config->item('sess_time_to_update')){\r\n\t\t\t\treturn $this->curd_m->get_update(\"users\",array('id'=>$userId,'login_validate'=>time()));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}",
"public function check_duplicate() {\n $this->db->where ( 'orderID', trim ( $this->input->post ( 'orderID' ) ) );\n\n if ($this->db->count_all_results ( $this->table ))\n echo \"1\"; // duplicate\n else\n echo \"0\";\n }",
"public function verify() {\r\n $stmp = $this->_db->prepare(\"SELECT `id`,`email` FROM `anope_db_NickCore` WHERE `display`= ? AND `pass` = ?;\");\r\n $stmp->execute(array($this->_username,$this->_password));\r\n \r\n if ($stmp->rowCount() == \"1\") {\r\n $row = $stmp->fetch(PDO::FETCH_ASSOC);\r\n $this->_id = $row['id'];\r\n $this->_email = $row['email'];\r\n return $this->_id;\r\n }\r\n else {\r\n return false;\r\n }\r\n }",
"public function ajax_checkduplicate()\r\n {}",
"public function ajax_checkduplicate()\r\n {}",
"function name_exists($name){\n\t\t\t\n\t\t\t//var_dump($name);\n\t\t\tglobal $wpdb;\n\t\t\t$table = $wpdb->prefix.'users' ;\n\t\t\t$user_id = $wpdb->get_var( \"SELECT ID FROM $table WHERE user_login='$name'\" ) ;\n\t\t\t\n\t\t\t//return ($user_id) ? false: true ;\n\t\t\treturn $user_id ;\n\t\t}",
"public function check() {\n $check = $this->mysqli->query(\"SELECT * FROM user_info WHERE email='$this->email' && password ='$this->password' LIMIT 1\") or die($this->mysqli->error);\n $count = $check->num_rows;\n\n if ($count) {\n while($rows = $check->fetch_array(MYSQLI_ASSOC)){\n $this->loginID = $rows['loginID'];\n $_SESSION['loginID'] = $this->loginID;\n }\n $_SESSION['email'] = $this->email;\n $this->result .= \"Successfully Logged In\";\n } else {\n $this->result .= \"Sign In error!! Please try again\";\n }\n }",
"public function unique_username()\n {\n $username = $this->input->post('username');\n $id = $this->input->post('id');\n $user = $this->user->where('username', $username)->first();\n\n if ($user) {\n if ($id == $user->id) {\n return true;\n }\n $this->load->library('form_validation');\n $this->form_validation->set_message('unique_username', '%s has been used!');\n return false;\n }\n\n return true;\n }",
"protected function checkLogin($check = ''){\n $uid = (int) session('uid');\n $username = session('username');\n if($check == '' && !empty($uid) && $uid > 0 ){\n return $uid;\n }elseif($check != '' && $check == $username && !empty($uid) && $uid > 0){\n return $uid;\n }else{\n return false;\n }\n }",
"protected function hasLoginBeenProcessed() {}",
"public function chkEditEmailDuplicate() {\r\n\r\n if ($this->input->post('user_email') == $this->input->post('user_email_old')) {\r\n echo 'true';\r\n } else {\r\n $table_to_pass = 'mst_users';\r\n $fields_to_pass = array('user_id', 'user_email');\r\n $condition_to_pass = array(\"user_email\" => $this->input->post('user_email'));\r\n $arr_login_data = $this->user_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\r\n if (count($arr_login_data)) {\r\n echo 'false';\r\n } else {\r\n echo 'true';\r\n }\r\n }\r\n }",
"function checkLogin($userid) {\n\t$userid = intval($userid);\n\tif($userid != 0) {\n\t\tif(dbResultExists(\"SELECT id FROM users WHERE id=$userid AND sessionid='\".session_id().\"'\")) {\n\t\t\treturn true;\n\t\t}\n\tlogout();\n\t}\n\treturn false;\n}",
"function check_login() {\n\t\t$pdo = new PDO(DB_PATH);\n\n\t\tif (!isset($_SESSION[\"user_id\"]) || !isset($_SESSION[\"nonce\"])) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$stmt = $pdo->prepare(\"SELECT ID, username, password, type FROM users WHERE ID = :userId\");\n\t\t$stmt->bindValue(\":userId\", $_SESSION[\"user_id\"], PDO::PARAM_INT);\n\n\n\t\tif (!$stmt->execute()) {\n\t\t\tthrow new PDOException($stmt->errorInfo()[2]);\n\t\t}\n\n\t\t$user_data = $stmt->fetch();\n\n\n\t\treturn $_SESSION[\"nonce\"] == md5(serialize($user_data)) && intval($_SESSION['user_id']) == intval($user_data['ID']);\n\t}",
"function hasValidUid()\n{\n return isset($_SESSION[\"state\"]) && isUid($_SESSION[\"state\"]);\n}",
"public function unique_id_verification($data) {\n $where_cond = array(\"users_id\"=>$data['users_id'],\"unique_id\"=>$data['unique_id'],\"logs_login_status\"=>1);\n $record_count = $this->db->get_where('ct_user_logs',$where_cond)->num_rows();\n return $record_count;\n }",
"function checkUsername($id){\n\t\n\tglobal $link;\n\t$sql=\"SELECT username FROM user WHERE username='$id'\";\n\t\n\t$result=mysqli_query($link,$sql) or die(mysqli_error($link));\n\t\n\t$num=mysqli_num_rows($result);\n\t\n\tif($num>0){\n\t\treturn false;\t//this means that the user already exists and the user have to choose another one\n\t}else{\n\t\treturn true;\n\t}\n}",
"static public function isLoggedIn(){\n \treturn (self::getInstance()->getId()>1);\n }",
"public function test_create_user_duplicated()\n {\n $last_data=User::latest()->first();\n $response = $this->json('POST', \n '/user_create', \n [\n 'name' => $this->fullname, \n 'email' => $last_data['email'], \n 'password' => $this->password]);\n $response\n ->assertStatus(200)\n ->assertJson([\n $this->all_message => $this->user_create_duplicated,\n ]);\n }",
"function isAlreadyExist(){\n $query = \"SELECT *\n FROM\n \" . $this->db_table . \" \n WHERE\n username='\".$this->username.\"'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n // execute query\n $stmt->execute();\n if($stmt->rowCount() > 0){\n return true;\n }\n else{\n return false;\n }\n }",
"function revalidateUserID() {\n\t\tglobal $pun_user;\n\t\t\n\t\tif($this->getUserRole() === AJAX_CHAT_GUEST && $pun_user['is_guest'] || ($this->getUserID() === $pun_user['id'])) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function loginUserConditionDoesNotMatchSingleLoggedInUser() {}",
"function insert_log_data($login)\r\n\t{\r\n\t\tif($this->db->insert($this->userlog_tbl,$login))\t\r\n\t\t\t\r\n\t\t\treturn $this->db->insert_id();\r\n\t\t\t\r\n\t\treturn false;\r\n\t}",
"public function loginExists() {\n return (bool) $this->local_account;\n }",
"function checkHasLogin(){\n global $Redis;\n $login_success_jump_url = $this->_get('login_success_jump_url','http://sh.'.$this->root_domain);\n\n if( isset($_COOKIE[$this->passport_name]) ){\n $passport_login_status = intval($Redis->get($_COOKIE[$this->passport_name]));\n }else{\n $passport_login_status = 0;\n }\n //这个要改,根据cookie里面的key值来做判断的,自动登录或者自动退出,-1代表退出状态\n if($passport_login_status === -1){\n\n }else if($passport_login_status === 0){\n\n }else if($passport_login_status > 0){\n $this->getView()->assign(\"title\", '登陆提示');\n $this->getView()->assign(\"desc\", '您已经登陆了!');\n $this->getView()->assign(\"url\",$login_success_jump_url);\n $this->getView()->assign(\"type\", 'warning');\n $this->display(VIEW_PATH.'/common/tips');\n exit;\n }\n }",
"abstract public function isDuplicatePIMAddition($id);",
"function _check_duplicate($str)\n\t{\n\t\tee()->load->model('wiki_model');\n\n\t\tif (ee()->wiki_model->check_duplicate(ee()->form_validation->old_value('id'), $str) === FALSE)\n\t\t{\n\t\t\tee()->form_validation->set_message('_check_duplicate', ee()->lang->line('duplicate_short_name'));\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}",
"function checkUserIdBL() {\n\t $isExisting = false;\n\t // If the user exists\n\t if ( checkUserIdDAL($_POST['userId']) )\n\t {\n\t\t $isExisting = true;\n\t }\n\t return $isExisting;\n }",
"public function hasPersistentLogin();",
"static function validateSessionID() {\n\t\t\n\t\t// Connect to the database\n\t\t$db = new Database ();\n\t\t\n\t\t// Figure out that we got a USERID paired to our session\n\t\t// If we got, then we check its format. If wrong then throw it!\n\t\t\n\t\tif ((strlen ( session_id () ) != 32) && isset ( $_SESSION ['userid'] )) {\n\t\t\tthrow new Exception ( \"The session ID is malformed\" );\n\t\t}\n\t\t\n\t\t// Dig deeper into our sessions, fetch the row containing our session ID\n\t\t$query = \"SELECT * FROM user_sessions WHERE session_id = '\" . session_id () . \"'\";\n\t\tforeach ( $db->query ( $query ) as $result ) {\n\t\t\tself::$result = $result;\n\t\t\tself::$valid_session_id = md5 ( $result ['u_id'] . $_SERVER ['HTTP_USER_AGENT'] . self::$salt . $_SERVER ['REMOTE_ADDR'] . $result ['created'] );\n\t\t}\n\t\t\n\t\t// Check whether our sessionID is valid if an userid index is present\n\t\t// If not valid, drop an exception\n\t\tif (session_id () != self::$valid_session_id && isset ( $_SESSION ['userid'] )) {\n\t\t\tself::DestroySession ();\n\t\t}\n\t\t\n\t\t// Destroy our session if its past the time limit\n\t\t\n\t\tif (! is_null ( self::$result ['u_id'] ) && self::$result ['created'] + 1200 < time () && ! self::keepMeLogged ()) {\n\t\t\tself::DestroySession ();\n\t\t\t\n\t\t\t// Update our session if its recent\n\t\t} elseif (! is_null ( self::$result ['u_id'] ) && self::$result ['created'] + 1200 > time ()) {\n\t\t\tself::updateSession ();\n\t\t}\n\t\t// Return the userid\n\t\tRETURN self::$result ['u_id'];\n\t}",
"function __checkDuplicateName()\n {\n $result = $this->find('first', array('conditions' => array('name' => $this->data[$this->name]['name'])));\n if ($result) {\n $this->errorMessage='Duplicate name found. Please change the name.';\n return false;\n }\n\n return true;\n }",
"private function _checkPk() {\n\t\t$result = false;\n\t\t$private_key = Mage::helper ( 'masterpass' )->checkPrivateKey ();\n\t\tif (! $private_key) {\n\t\t\tMage::getSingleton ( 'core/session' )->addError ( Mage::getStoreConfig ( 'masterpass/config/checkouterrormessage' ) );\n\t\t\t// save long access token\n\t\t\t$customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();\n\t\t\t$customerData = Mage::getModel ( 'customer/customer' )->load ( $customer->getId () );\n\t\t\t$longAccessToken = null;\n\t\t\t$customerData->setData ( 'longtoken', $longAccessToken );\n\t\t\t\n\t\t\t$customerData->save ();\n\t\t\t// $this->_redirect('checkout/cart');\n\t\t\t// $this->getResponse()->setRedirect(Mage::helper('customer')->getLoginUrl());\n\t\t\t$result = true;\n\t\t}\n\t\treturn $result;\n\t}",
"function id_matches_db($username, $password)\n{\n global $idStore;\n\n if($idStore->authenticate($username, $password))\n {\n return true;\n }else{\n return false;\n }\n}",
"public function testLoginAgainWithSameUser() : void\n {\n $res = self::$dataService->login( \"login\", null, $this->userA[\"user\"], $this->userA[\"pass\"], [ \"user_agent\" => $this->userA[\"getBrowserName\"], \"time\" => $this->userA[\"getCurrentDateTime\"], \"ip\" => $this->userA[\"getReqIp\"] ] );\n\n $this->assertIsArray( $res, 'testLoginAgainWithSameUser' );\n $this->assertArrayHasKey('status', $res, 'testLoginAgainWithSameUser' );\n $this->assertArrayHasKey('msg', $res, 'testLoginAgainWithSameUser' );\n $this->assertCount(2, $res, 'testLoginAgainWithSameUser' );\n $this->assertEquals( [ \"status\" => false, \"msg\" => \"This user already logged in.\" ], $res, 'testLoginAgainWithSameUser' );\n }",
"function trylogin()\n {\n\t\t$ret = false;\n\t\t\n $err = SHIN_Core::$_models['sys_user_model']->login();\n\n SHIN_Core::$_language->load('app', 'en');\n $err = SHIN_Core::$_language->line($err);\n\t\t\n if ($err != '') {\n SHIN_Core::$_libs['session']->set_userdata('loginErrorMessage', $err);\n } else {\n $this->sessionModel->start(SHIN_Core::$_models['sys_user_model']->idUser);\n\t\t\t$ret = true;\n\t\t\t\n\t\t\t// addons for new field added //////////////////////////\n\t\t\t// request by Stefano. Detail: http://binary-studio.office-on-the.net/issues/5287\n\t\t\t// \"host\" and \"lastlogin\" field \n\t\t\t$data = array('lastlogin' => date('Y-m-d H:i:s'), 'host' => SHIN_Core::$_input->ip_address());\n\t\t\tSHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->where('idUser', SHIN_Core::$_models['sys_user_model']->idUser);\n\t\t\tSHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->update('sys_user', $data); \t\t\n\t\t\t///////////////////////////////////////////////////////\n }\n\n\t\treturn $ret;\n }",
"function checkUniqueUser($reg_user_email='')\n {\n $check_unique = \" SELECT * FROM cart_user WHERE user_email='\".$reg_user_email.\"' \"; \n $res_unique = mysql_query($check_unique);\n //echo '--<br>--'.mysql_num_rows($res_unique); die;\n if($res_unique && mysql_num_rows($res_unique)>0)\n {\n //$row=mysql_fetch_array($res_unique,MYSQL_ASSOC); \n //echo $user_id=$row['user_id'];\n return false; // user is not unique\n }\n return true; // user is unique\n }",
"function checkUserLinkedbyId($id){\n global $db_php_path;\n require_once($db_php_path);\n \n $result = mysql_query(\"select passwd from user where id=\".$id);\n $num = mysql_num_rows($result);\n if($num == 0){\n return false;\n }\n elseif($num == 1){\n $row = mysql_fetch_row($result);\n if($row[0] != NULL){\n return true;\n }else{\n return false;\n }\n }\n else{\n throw new Exception(\"one sina id coresponse to more than one line\");\n }\n}",
"function verify_user($conn, $id, $hash){\n\t$sql = \"SELECT id from Session\n\tWHERE id=$id and hash='$hash'\";\n\n\t$result = $conn->query($sql);\n\n\treturn ($result->num_rows > 0);\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 randomUser_exists()\t{\n\t\treturn $this->recordNumber(self::RNDUSERSC_NAME) > 0;\n\t}",
"private function check_ID($id){\r\n\r\n $query = \"SELECT FROM users WHERE oauth_uid = ?\";\r\n $data = $this->_db->get_Row($query, $id);\r\n\r\n return ($this->_db->count_Rows($data) > 0) ? true : false;\r\n }",
"function is_already_authenticated()\n {\n /**\n * Checks is user already authenticated\n * If it's true, sends to main page\n */\n $session = Session::getInstance();\n $username = $session->username;\n $logged = $session->logged;\n if (self::check($username,$logged))\n {\n header(\"Location: /admin\");\n }\n }",
"function is_unique_username($username)\n\t{\n\t\t$this->ci->db->select('*');\n\t\t$this->ci->db->where('au_username', $username);\n\t\t$query = $this->ci->db->get('auth_user');\n\t\tif($query->num_rows() == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"private function checkDuplicate($pdo)\n {\n $sql = \"SELECT UserName, UserEmail\n FROM users\n WHERE UserName = :UserName\n OR UserEmail = :UserEmail\";\n\n $stmt = $pdo->prepare($sql);\n $stmt->bindParam(':UserName', $this->username);\n $stmt->bindParam(':UserEmail', $this->email);\n $stmt->execute();\n\n if ($stmt->fetch() !== false) {\n return false;\n } else {\n return true;\n }\n }",
"function check_login_IP($id = '')\n\t{ $this->db->where('ip_address', $_SERVER['REMOTE_ADDR']); if($id != '') $this->db->where('id !=', $id);\n\t$query = $this->db->get('login_history'); if ($query->num_rows() > 0) { return FALSE; } else { return TRUE; }\t}",
"public function validateCurrentSession(){$this->lhDB->connect('ibdlhsession');self::getCurrentPhpSid();self::validatePhpSid();$this->lhDB->disconnect();if($this->valid){$uid=$this->uid;return $uid;}else{return false;}}",
"function login_check() {\n if (isset($_SESSION['user_id'], \n $_SESSION['user'], \n $_SESSION['login_string'],$_SESSION['time'])) {\n \n $user_id = $_SESSION['user_id'];\n $login_string = $_SESSION['login_string'];\n $username = $_SESSION['user'];\n\t\t$time=$_SESSION['time'];\n\t\t$key=$_SESSION['key'];\n\t\t\n\t\tif ((time()-$time)>7200) {\n\t\treturn false;\n\t\t}\n \n // Get the user-agent string of the user.\n\t\t\t\t$user_browser = $_SERVER['HTTP_USER_AGENT'];\n \n $login_check = hash('sha512', $username. $user_browser);\n\t\t\t\t\n\t\t\t\t\n if ($login_check == $login_string) {\n // Logged In!!!! \n return true;\n } else {\n // Not logged in \n \n\t\t\t\t\treturn false;\n\t\t\t\t\t\n }\n \n \n \n \n } else {\n // Not logged in \n\t\t\n return false;\n }\n}",
"public function isAlreadyExist(){\n \n $query = \"SELECT *\n FROM \" . $this->table . \" \n WHERE email='\".$this->email.\"'\";\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n // execute query\n $stmt->execute();\n if($stmt->rowCount() > 0){\n return true;\n }else{\n return false;\n }\n }",
"private function valUserExisting(){\n if($this->_personDB->getActive()){\n if($this->logIn()){\n $this->addUserHttpSession();\n $this->_response = 'ok';\n }\n }else{\n $this->_response = '104';\n }\n }",
"public function isValidUserLoginKey($login_key) {\n $stmt = $this->conn->prepare(\"SELECT id FROM `user` where mobile = ?\");\n $stmt->bind_param(\"i\", $login_key);\n $stmt->execute();\n $stmt->store_result();\n $num_rows = $stmt->num_rows;\n $stmt->close();\n return $num_rows > 0;\n }",
"public function onceUsingId($id)\n {\n $user = self::_getUserById($id);\n if (!empty($user)) {\n $this->_session_auth_id = $id;\n return true;\n }\n\n return false;\n }",
"public function testExistingIdentity() {\n\n $session = $this->getSampleProjectSession(true);\n\n $bug = $session->find('sample_Bug')->filterBy('bugId', 521152)->one();\n $project = $session->find('sample_Project')->filterBy('projectId', 12345)->one();\n $user = $session->find('sample_User')->filterBy('userId', '55566')->one();\n\n $this->assertTrue($bug->owner === $project->manager);\n $this->assertTrue($user === $bug->owner);\n $this->assertTrue($user === $project->manager);\n \n }",
"function checkLogin($username, $password)\n\t{\n\t\t\n\t\t//set an empty userId variable\n\t\t$userId = null;\n\t\t\n\t\t//make a call to grab the user id of the row that has a username AND password that match the specified ones\n\t\t$stmt = $this->db -> prepare(\"SELECT user_id FROM user WHERE username=? && password=?\");\n\t\t\n\t\t$stmt -> execute(array($username, $password));\n\t\t\n\t\t$userIdToCheck = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\n\t\t//var_dump($userIdToCheck);\n\t\t\n\t\t\n\t\t//if the username and password do not match up, no rows will be found, and userIdToCheck will equal false\n\t\t//if username and password do not match up, put out error\n\t\tif($userIdToCheck == false)\n\t\t{\n\t\t\t$this->errors['password'] = \"Username and password do not match\";\n\t\t\t\n\t\t\t//var_dump($password, $userIdToCheck);\n\t\t\t//echo \"NOOOO!!!\";\n\t\t}\n\t\t//else, if the username and password do match up, set the user id to the $userId variable\n\t\t else\n\t\t{\n\t\t\t$userIdToCheck = $userIdToCheck['user_id'];\n\t\t} \n\t\t\n\t\t//return the user ID associated with the username and password\n\t\treturn $userIdToCheck;\n\t}",
"static function userIdentifying($login, $password)\n\t{\n\t\t$dataBase = self::dbConnect();\n\t\t$request = $dataBase->prepare('SELECT password FROM users WHERE login = ?');\n\t\t$request->execute(array($login));\n\t\t$dbPassword = $request->fetch();\n\t\t$dbPassword = $dbPassword['password'];\n\t\t$request->closeCursor();\n\t\tif (password_verify($password, $dbPassword))\n\t\t{\n\t\t\t$request = $dataBase->prepare('SELECT id FROM users WHERE login = ?');\n\t\t\t$request->execute(array($login));\n\t\t\t$id = $request->fetch();\n\t\t\treturn $id['id'];\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"function check_login($data){\n /* Codify the password */\n $sha1_password = sha1($data['password']);\n /* Check the login data at the DB table users */\n $this->db->from('users');\n $this->db->where('username', $data['username']);\n $this->db->where('password',$sha1_password);\n $result = $this->db->get();\n if($result->num_rows() > 0){\n /* If it works return the user's id */\n return true;\n } else {\n return false;\n } \n }",
"function StudentAlreadyUser($UPindentify,$conn){\r\n include 'login.php';\r\n $result = query(\"SELECT UP_Number FROM USER WHERE UP_Number = '$UPindentify';\", UP_Number, $conn);\r\n if ($UPindentify == $result) {\r\n popUp(\"Student ID has already been registered\");\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}",
"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 checkLogin(){\n $dbQuery = new DBQuery(\"\", \"\", \"\");\n $this->email = $dbQuery->clearSQLInjection($this->email);\n $this->senha = $dbQuery->clearSQLInjection($this->senha);\n \n // Verificar quantas linhas um Select por Email e Senha realiza \n $resultSet = $this->usuarioDAO->select(\" email='\".$this->email.\"' and senha='\".$this->senha.\"' \");\n $qtdLines = mysqli_num_rows($resultSet);\n \n // Pegar o idUsuario da 1ª linha retornada do banco\n $lines = mysqli_fetch_assoc($resultSet);\n $idUsuario = $lines[\"idUsuario\"];\n \n\n \n // retorna aonde a função foi chamada TRUE ou FALSE para se tem mais de 0 linhas\n if ( $qtdLines > 0 ){\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n $_SESSION[\"idUsuario\"] = $idUsuario;\n $_SESSION[\"email\"] = $this->email;\n return(true);\n }else{\n // Gravar o IdUsuario e o Email em uma Sessão\n session_start();\n unset($_SESSION[\"idUsuario\"]);\n unset($_SESSION[\"email\"]);\n return(false);\n }\n }",
"function logincheck($u_mail,$u_pass)\n{\n\t$sql=\"select * from user_table where u_mail='$u_mail' and u_pass='$u_pass'\";\n\t$key=0; \n\tforeach($GLOBALS['db']->query($sql) as $row)\n\t\t$key++;\n\tif($key==1)\n\t\treturn $row['u_id'];\n\telse\n\t\techo \"<center>Username or Password is incorrect</center>\";\n}",
"public function checkFirstLogin();",
"public function check_login()\n\t{\n\t\tif(isset($_SESSION[\"user_id\"]))\n\t\t{\n\t\t $this->_user_id = $_SESSION[\"user_id\"];\n\t\t\t$this->_client = $_SESSION[\"client\"];\n\t\t\t$this->_loged_in = true;\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_loged_in = false;\n\t\t\t$this->_client = false;\n\t\t\tunset($this->_user_id);\n\t\t}\n\t}",
"public function check_login(){\n\t\t\tif( isset( $_SESSION['user_id'] ) ) {\n\t\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset( $this->user_id );\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}",
"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 }",
"function checkLogin( $sLogin, $sPass, $sKey ){\n \n $sLogin = changeSpecialChars( str_replace( '\"', '"', $sLogin ) );\n $sPass = changeSpecialChars( str_replace( '\"', '"', $sPass ) );\n\n if( $GLOBALS['config']['login'] == $sLogin && $GLOBALS['config']['pass'] == $sPass ){\n $_SESSION[$sKey] = true;\n return 1;\n }\n else{\n file_put_contents( DB_FAILED_LOGS, ( ( is_file( DB_FAILED_LOGS ) ? file_get_contents( DB_FAILED_LOGS ) : 0 ) + 1 ) );\n chmod( DB_FAILED_LOGS, FILES_CHMOD );\n\n return 0;\n }\n}",
"public function _check_login()\n {\n\n }",
"private function checkSessionId() {\r\n\r\n $hijackTest = FALSE;\r\n \r\n if ($this->hijackBlock) {\r\n $this->SQLStatement_GetSessionInfos->bindParam(':sid', $this->sessionId, PDO::PARAM_STR, $this->sid_len);\r\n $this->SQLStatement_GetSessionInfos->execute();\r\n $val = $this->SQLStatement_GetSessionInfos->fetchAll(PDO::FETCH_ASSOC);\r\n //var_dump($val);\r\n //echo \"<br> UA:\".$this->getUa().\"<br>\";\r\n if ($val[0][\"ua\"] ==$this->getUa()) {\r\n $hijackTest = TRUE;\r\n } else {\r\n $hijackTest = FALSE;\r\n }\r\n } else {\r\n $hijackTest = TRUE;\r\n }\r\n\r\n if ($hijackTest==TRUE) return true;\r\n else return false;\r\n \r\n }",
"public function isUnique();"
] | [
"0.7530503",
"0.6838178",
"0.68091637",
"0.6576711",
"0.65532815",
"0.65373707",
"0.6511289",
"0.6499283",
"0.64805126",
"0.64245594",
"0.6346039",
"0.6309231",
"0.62768775",
"0.6271829",
"0.62690926",
"0.6262727",
"0.62552756",
"0.6254653",
"0.6222307",
"0.62195176",
"0.61958945",
"0.6187508",
"0.61447644",
"0.6139858",
"0.6114755",
"0.61006963",
"0.6098206",
"0.6054026",
"0.6048283",
"0.6021867",
"0.60043854",
"0.60030675",
"0.5997794",
"0.59899634",
"0.59871644",
"0.5977162",
"0.5968189",
"0.59574527",
"0.59532595",
"0.59532595",
"0.59428495",
"0.5938955",
"0.5925447",
"0.5921557",
"0.5918301",
"0.59044176",
"0.5902412",
"0.58881587",
"0.58870745",
"0.5877122",
"0.5872638",
"0.58700943",
"0.5860111",
"0.5852526",
"0.58413917",
"0.58403105",
"0.5831652",
"0.58299744",
"0.5818133",
"0.5813218",
"0.5811271",
"0.5806878",
"0.58036727",
"0.5801089",
"0.5800236",
"0.57880455",
"0.578197",
"0.57770765",
"0.57766414",
"0.5775254",
"0.5767939",
"0.5766528",
"0.57649034",
"0.5760461",
"0.5756101",
"0.5755578",
"0.57536256",
"0.5752442",
"0.57479244",
"0.5726374",
"0.57259154",
"0.57207835",
"0.57196075",
"0.5719457",
"0.5718772",
"0.5718278",
"0.57180125",
"0.57147825",
"0.571411",
"0.57109237",
"0.570397",
"0.57035875",
"0.5698447",
"0.5695256",
"0.5693303",
"0.56908053",
"0.5688641",
"0.5686994",
"0.5667856",
"0.56672764",
"0.56619817"
] | 0.0 | -1 |
Returns the fields of the table. | public function getFields() {
return array(
self::FIELD_ID,
self::FIELD_NAME,
self::FIELD_CREATED_AT,
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _fields() {\n if ($this->_table() && empty($this->fields)) {\n $this->fields = $this->db->list_fields($this->_table());\n }\n return $this->fields;\n }",
"public function getTableFields(){\n if(empty($this->tableFields)){\n $this->getTableInfo();\n }\n return $this->tableFields;\n }",
"public function list_fields() {\n return $this->db->list_fields($this->_table());\n }",
"public function getFields($table);",
"public function getFields() {\n $fields = $this->_fields;\n\n if ($this->getJoins() && !$fields && $this->getType() === self::SELECT) {\n return array_keys($this->getRepository()->getSchema()->getColumns());\n }\n\n return $fields;\n }",
"public function getFieldsList()\n {\n return $this->table_fields_names;\n }",
"public function getFields() {\n\t\treturn $this->tca['columns'];\n\t}",
"function getTableFields($table) {\n return $this->select(\"show fields from $table\");\n }",
"private function getAllTableFields()\n {\n $connection = $this->node->getConnection();\n $mainTable = $this->node->getMainTable();\n $fields = $connection->describeTable($mainTable);\n $metadataTable = $this->node->getTable('magento_versionscms_hierarchy_metadata');\n $fields += $connection->describeTable($metadataTable);\n\n return $fields;\n }",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields($table) {\n\t\treturn $this->_list_fields($table);\n\t}",
"public function getAllFields();",
"public function getAllFields()\n {\n return $this->fields;\n }",
"public function fields()\n {\n return $this->fields;\n }",
"public function fields()\n {\n return $this->fields;\n }",
"public static function getAllFields(): array\n {\n $className = get_called_class();\n $table = with(new $className)->getTable();\n $cache_key = self::$cache_prefix.'.ALLFIELDS.' . strtoupper($table);\n\n return self::$use_cache ? Cache::remember($cache_key, 5 * 60, function () use ($table) {\n return \\Schema::getColumnListing($table);\n }) : \\Schema::getColumnListing($table);\n }",
"public function fields()\r\n {\r\n return $this->fields;\r\n }",
"public static function getDbFields()\n {\n global $zdb;\n $columns = $zdb->getColumns(self::TABLE);\n $fields = array();\n foreach ( $columns as $col ) {\n $fields[] = $col->getName();\n }\n return $fields;\n }",
"public function getFields()\n\t\t{\n\t\t\treturn $this->fields;\n\t\t}",
"public function fields_names(){\n $table_meta = array();\n // get fields in the database table\n\n foreach ($this->_meta() as $meta) {\n array_push($table_meta, $meta->name);\n }\n\n return $table_meta;\n }",
"public function getFields()\n {\n if (is_null($this->fields)) {\n $columns = $this->getColumn();\n\n if (empty($columns)) {\n throw new Exception('The table ' . $this->tableName . ' was not found in the ' . $this->databaseName . ' database.');\n }\n\n $this->fields = $this->transfer($columns);\n }\n\n return $this->fields;\n }",
"public function getFields() {}",
"public function getFields() {}",
"public function getFields() {}",
"function get_fields_in_table( ){\n\t\t\t\t $result = mysql_query(\"SHOW COLUMNS FROM \".$this->db.\".\".$this->table.\"\");\n\t\t\t\tif (!$result) {\n\t\t\t\t echo 'Could not run query: ' . mysql_error();\n\t\t\t\t exit;\n\t\t\t\t}\n\t\t\t\tif (mysql_num_rows($result) > 0) {\n\t\t\t\t while ($row = mysql_fetch_assoc($result)) {\n\t\t\t\t \n\t\t\t\t //$a_fields[]=$row;\n\t\t\t\t $a_fields[]=$row['Field'].\" | \".$row['Type'];\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\treturn $a_fields;\n\t\t\t }",
"public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}",
"public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function get_fields() {\r\n\t\treturn $this->fields;\r\n\t}",
"public function fields();",
"public function fields();",
"public function fields();",
"public function fields();",
"public function fields();",
"public function getFields()\r\n {\r\n return $this->fields;\r\n }",
"public function get_fields() {\n\t\treturn $this->fields;\n\t}",
"public function fields() {\n return $this->fields;\n }",
"public function getFields()\n\t{\n\t\treturn $this->_fields;\n\t}",
"public function getFields()\n {\n return $this->_fields;\n }",
"public function getFields()\n {\n return $this->_fields;\n }",
"public function getFields() {\n\t\treturn $this->fields;\n\t}",
"public function getFields() {\n\t\treturn $this->fields;\n\t}",
"protected function getFields()\n {\n return $this->fields;\n }",
"protected function getFields()\n {\n return $this->fields;\n }",
"public function get_fields() {\n return $this->fields;\n }",
"function fields()\n\t{\n\t\treturn $this->_fields;\n\t}",
"public function listFields($table)\r\n {\r\n return $this->fetchItems($this->query(\"SHOW FIELDS FROM $table\"), 0, 'row');\r\n }",
"public static function getFields() {\n return self::$fields;\n }",
"public static function get_fields()\n {\n }",
"public function getListFields();",
"public function getFields(){\n return $this->dbFields;\n }",
"public function getFields()\n\t{\n\t\treturn [];\n\t}",
"public static function getFields(){\n\t\treturn self::$fields;\n\t}",
"private static function fields()\n {\n $fields = static::$fields;\n $primary_key = static::$primary_key;\n\n $rows = [$primary_key, ...$fields];\n\n if(!count($rows)) {\n return ['*'];\n }\n\n return $rows;\n }",
"public function getAllFields() {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t// Query set up\t\n\t\t\t$table\t\t\t= 'tb_field';\n\t\t\t$select_what\t= 'id, vc_field AS vc_name';\n\t\t\t$conditions\t\t= \"1 ORDER BY vc_field ASC\";\n\t\t\t$return\t\t\t= $db->getAllRows_Arr($table, $select_what, $conditions);\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}",
"public function fetchFields();",
"function get_fields(){\n\t\t\t \n\t\t\t // IN: database,table\n\t\t\t //OUT: array of fields\n\t\t\t \n\t\t\t$this->db_connect;\n\t\t\t$result = mysql_query(\"SHOW COLUMNS FROM \".$this->db.\".\".$this->table.\"\" );\n\t\t\t//echo(\"SHOW COLUMNS FROM \".$this->db.\".\".$this->table.\"\" );\n\t\t\tif (!$result) {\n\t\t\t echo 'Could not run query: ' . mysql_error();\n\t\t\t exit;\n\t\t\t}\n\t\t\tif (mysql_num_rows($result) > 0) {\n\t\t\t while ($row = mysql_fetch_assoc($result)) {\n\t\t\t $a_fields[]=$row['Field'];\n\t\t\t }\n\t\t\t}\n\t\t\treturn $a_fields;\n\t}",
"public function fields()\n {\n $fields = array();\n\n foreach ($this->_data as $field => $row)\n {\n $fields[$field] = $row['value'];\n }\n\n return $fields;\n }",
"public function fields()\n {\n $fullResult = $this->client->call(\n 'crm.invoice.fields'\n );\n return $fullResult;\n }",
"public function getFields() {\n $columns = $this->schema();\n if (empty($columns)) {\n trigger_error(__d('cake_dev', '(Model::getColumnTypes) Unable to build model field data. If you are using a model without a database table, try implementing schema()'), E_USER_WARNING);\n }\n\n $results = array();\n foreach ($columns as $key => $col) {\n $results[] = $key;\n }\n unset($columns);\n return $results;\n }",
"public function fields()\n {\n return [ \n ];\n }",
"public function getFields()\n {\n return array(\n 'id' => array('int', 6, array('primary' => true)),\n 'created' => array('datetime', 255, array('null' => false)),\n 'customer_id' => array('int', 8, array('null' => false)),\n 'device_id' => array('int', 8, array('null' => false)),\n );\n }",
"public function fields()\r\n {\r\n return array_keys($this->getKey('schema', true));\r\n }",
"protected function getFields()\n {\n return $this->Fields;\n }",
"public function getFields() {\n\t\treturn array(\n\t\t\tself::FIELD_ID,\n\t\t\tself::FIELD_PHRASE_ID,\n\t\t\tself::FIELD_LANGUAGE_ID,\n\t\t\tself::FIELD_TRANSLATION,\n\t\t\tself::FIELD_CREATED_AT,\n\t\t\tself::FIELD_USER_ID,\n\t\t);\n\t}",
"public function fields(){\n\t\treturn array();\n\t}",
"function getFields();",
"public static function fetch_fields($table){\n $sql = 'SHOW columns FROM '.self::clean($table);\n self::$__querys[] = $sql;\n $result = mysqli_query(self::$__connection, $sql);\n $data = array();\n if ($result) {\n while ($r = $result->fetch_assoc()) {\n $data[] = $r;\n }\n $result->close();\n }\n return $data;\n }",
"public function getFields()\n {\n return $this->arr_defined_fields;\n }",
"public function getFields(){\n\t\treturn $this->Fields;\n\t}",
"public function getFields()\n {\n return array_keys($this->fields);\n }",
"public function getFields() : array {\n\t\treturn $this->fields;\n\t}",
"final public function getAllFields()\r\n {\r\n return array($this->_field);\r\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function getFields()\r\n {\r\n return array_keys($this->fields);\r\n }",
"public function fields(): Fields\n\t{\n\t\treturn $this->blueprint->fields()->addValues($this->raw())->preProcess();\n\t}",
"protected function fetch_fields()\n {\n if(empty($this->table_fields))\n {\n $fields = $this->_database->list_fields($this->table);\n foreach ($fields as $field) {\n $this->table_fields[] = $field;\n }\n }\n }",
"public function listFields()\n {\n return array_keys($this->fields);\n }",
"abstract public function getFields();",
"abstract public function getFields();",
"public function getTableFields()\n {\n return array(\n array(\"Field\" => \"uid_empresa\", \"Type\" => \"int(10)\", \"Null\" => \"NO\", \"Key\" => \"PRI\", \"Default\" => \"\", \"Extra\" => \"auto_increment\"),\n array(\"Field\" => \"endeve_id\", \"Type\" => \"varchar(60)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"pago_no_obligatorio\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"nombre\", \"Type\" => \"varchar(100)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"nombre_comercial\", \"Type\" => \"varchar(200)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"representante_legal\", \"Type\" => \"varchar(512)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cif\", \"Type\" => \"varchar(20)\", \"Null\" => \"NO\", \"Key\" => \"UNI\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"pais\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_pais\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"direccion\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"localidad\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"provincia\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cp\", \"Type\" => \"int(8)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"accion\", \"Type\" => \"timestamp\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"CURRENT_TIMESTAMP\", \"Extra\" => \"\"),\n array(\"Field\" => \"updated\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_provincia\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_municipio\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"convenio\", \"Type\" => \"varchar(255)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"created\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"aviso_caducidad_subcontratas\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"color\", \"Type\" => \"varchar(10)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"email\", \"Type\" => \"varchar(255)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_enterprise\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"logo\", \"Type\" => \"tinytext\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"skin\", \"Type\" => \"varchar(300)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"dokify\", \"Extra\" => \"\"),\n array(\"Field\" => \"lang\", \"Type\" => \"varchar(2)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"es\", \"Extra\" => \"\"),\n array(\"Field\" => \"activo_corporacion\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"pago_aplicacion\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"receive_summary\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"date_last_summary\", \"Type\" => \"int(16)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"license\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_validation_partner\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"partner_validation_price\", \"Type\" => \"float\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"partner_validation_price_urgent\", \"Type\" => \"float\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"validation_languages\", \"Type\" => \"varchar(250)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"cost\", \"Type\" => \"float\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"pay_for_contracts\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"invoice_periodicity\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_attached\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_validated\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_rejected\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"req_expired\", \"Type\" => \"int(9)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_transfer_pending\", \"Type\" => \"int(1)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"kind\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"min_app_version\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"2\", \"Extra\" => \"\"),\n array(\"Field\" => \"prevention_service\", \"Type\" => \"varchar(20)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_idle\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"corporation\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_referrer\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"requirement_count\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"invoice_count\", \"Type\" => \"int(11)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_referrer\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_manager\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"is_self_controlled\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"1\", \"Extra\" => \"\"),\n array(\"Field\" => \"has_custom_login\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n array(\"Field\" => \"header_img\", \"Type\" => \"tinytext\", \"Null\" => \"YES\", \"Key\" => \"\", \"Default\" => \"\", \"Extra\" => \"\"), array(\"Field\" => \"uid_manager\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"uid_referrer\", \"Type\" => \"int(11)\", \"Null\" => \"YES\", \"Key\" => \"MUL\", \"Default\" => \"\", \"Extra\" => \"\"),\n array(\"Field\" => \"requirements_origin_company_cloneables\", \"Type\" => \"int(1)\", \"Null\" => \"NO\", \"Key\" => \"\", \"Default\" => \"0\", \"Extra\" => \"\"),\n );\n }"
] | [
"0.86084634",
"0.8577181",
"0.84243286",
"0.8090999",
"0.80869305",
"0.80757076",
"0.80746907",
"0.80542076",
"0.8046668",
"0.7983244",
"0.7983244",
"0.7983244",
"0.7983244",
"0.7983244",
"0.7983244",
"0.79771996",
"0.7940876",
"0.79192054",
"0.78057575",
"0.78057575",
"0.77996814",
"0.7795002",
"0.7757377",
"0.7744576",
"0.77367723",
"0.7727284",
"0.7724404",
"0.7724404",
"0.7724404",
"0.7709569",
"0.7707214",
"0.7707214",
"0.7695578",
"0.7695578",
"0.7695578",
"0.7695578",
"0.7695578",
"0.7695578",
"0.7695578",
"0.7695578",
"0.7695578",
"0.7695578",
"0.7695578",
"0.7694903",
"0.7688906",
"0.7688906",
"0.7688906",
"0.7688906",
"0.7688906",
"0.7686149",
"0.7679468",
"0.7664637",
"0.7643812",
"0.7641536",
"0.7641536",
"0.7624578",
"0.7624578",
"0.7617412",
"0.7617412",
"0.7611313",
"0.759919",
"0.7578063",
"0.75651693",
"0.75429976",
"0.7529388",
"0.7523885",
"0.75161684",
"0.7514611",
"0.7511252",
"0.75107265",
"0.7494598",
"0.74928206",
"0.74918294",
"0.74710983",
"0.7460585",
"0.74605715",
"0.7459142",
"0.74583846",
"0.7453797",
"0.7450598",
"0.74243987",
"0.7420717",
"0.7417618",
"0.74121064",
"0.7384016",
"0.73826736",
"0.73810357",
"0.7377785",
"0.7374818",
"0.7374818",
"0.7374818",
"0.7374818",
"0.7374818",
"0.73732024",
"0.73680174",
"0.73640287",
"0.73635197",
"0.7363291",
"0.7363291",
"0.7360327"
] | 0.76468265 | 52 |
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 école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}"
] | [
"0.7594622",
"0.7594622",
"0.7588457",
"0.7580005",
"0.75723624",
"0.7499764",
"0.7436887",
"0.74322647",
"0.7387517",
"0.735172",
"0.73381543",
"0.73117113",
"0.72958225",
"0.7280436",
"0.7273787",
"0.72433424",
"0.7230227",
"0.7225085",
"0.71851814",
"0.71781176",
"0.7174025",
"0.7149406",
"0.71431303",
"0.7142905",
"0.7136737",
"0.712733",
"0.7122102",
"0.71148264",
"0.71148264",
"0.71148264",
"0.7111841",
"0.7092733",
"0.70843536",
"0.70822084",
"0.7079442",
"0.70571405",
"0.70571405",
"0.7055195",
"0.70391846",
"0.7039114",
"0.7035626",
"0.7033991",
"0.70300245",
"0.7026507",
"0.7026417",
"0.7019451",
"0.7017105",
"0.7004775",
"0.70031846",
"0.6999904",
"0.6995238",
"0.6994825",
"0.699354",
"0.6988824",
"0.6986871",
"0.6965804",
"0.6965542",
"0.69560695",
"0.69515944",
"0.6950682",
"0.6947703",
"0.69433117",
"0.6941539",
"0.6939613",
"0.69377476",
"0.69377476",
"0.693678",
"0.69344354",
"0.69314486",
"0.6927608",
"0.69264024",
"0.6922966",
"0.69181216",
"0.69150716",
"0.6911192",
"0.69095594",
"0.69092506",
"0.6907887",
"0.69018227",
"0.69008595",
"0.69006085",
"0.6900209",
"0.68949944",
"0.6892768",
"0.6891944",
"0.6891552",
"0.6891552",
"0.6891443",
"0.68886423",
"0.6888326",
"0.68856037",
"0.68835604",
"0.68813664",
"0.6878345",
"0.6876079",
"0.6873206",
"0.6873183",
"0.687048",
"0.687014",
"0.686966",
"0.68695843"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request, Match $match)
{
die($request->all());
// if($request::ajax()) {
// dd('here');
// $goal = new Goal;
// $goal->player_id = $request->get('player_id');
// $goal->match_time = $request->get('time');
// $goal->save();
// }
// dd(json_decode($data));
} | {
"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.7286258",
"0.71454436",
"0.7132821",
"0.6640289",
"0.6621105",
"0.6566493",
"0.65255576",
"0.65087926",
"0.6448317",
"0.63752604",
"0.63736314",
"0.6365631",
"0.6365631",
"0.6365631",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229",
"0.634229"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.