本文整理汇总了PHP中oledrion_utils::IP方法的典型用法代码示例。如果您正苦于以下问题:PHP oledrion_utils::IP方法的具体用法?PHP oledrion_utils::IP怎么用?PHP oledrion_utils::IP使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oledrion_utils
的用法示例。
在下文中一共展示了oledrion_utils::IP方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: implode
$msgCommande .= implode("\n", $discountsDescription);
$msgCommande .= "\n";
}
$msg = array();
$msg['COMMANDE'] = $msgCommande;
$msg['NUM_COMMANDE'] = $commande->getVar('cmd_id');
$msg['NOM'] = $commande->getVar('cmd_lastname');
$msg['PRENOM'] = $commande->getVar('cmd_firstname');
$msg['ADRESSE'] = $commande->getVar('cmd_adress', 'n');
$msg['CP'] = $commande->getVar('cmd_zip');
$msg['VILLE'] = $commande->getVar('cmd_town');
$msg['PAYS'] = $countries[$commande->getVar('cmd_country')];
$msg['TELEPHONE'] = $commande->getVar('cmd_telephone');
$msg['EMAIL'] = $commande->getVar('cmd_email');
$msg['URL_BILL'] = OLEDRION_URL . 'invoice.php?id=' . $commande->getVar('cmd_id') . '&pass=' . $password;
$msg['IP'] = oledrion_utils::IP();
if ($commande->getVar('cmd_bill') == 1) {
$msg['FACTURE'] = _YES;
} else {
$msg['FACTURE'] = _NO;
}
// Envoi du mail au client
oledrion_utils::sendEmailFromTpl('command_client.tpl', $commande->getVar('cmd_email'), sprintf(_OLEDRION_THANKYOU_CMD, $xoopsConfig['sitename']), $msg);
// Envoi du mail au groupe de personne devant recevoir le mail
oledrion_utils::sendEmailFromTpl('command_shop.tpl', oledrion_utils::getEmailsFromGroup(oledrion_utils::getModuleOption('grp_sold')), _OLEDRION_NEW_COMMAND, $msg);
// Présentation du formulaire pour envoi à la passerelle de paiement
// Présentation finale avec panier en variables cachées ******************************
$registry = new oledrion_registryfile();
$text = $registry->getfile(OLEDRION_TEXTFILE7);
$xoopsTpl->assign('text', xoops_trim($text));
if (oledrion_utils::getModuleOption('offline_payment') == 1 && isset($_POST['offline_payment']) && intval($_POST['offline_payment']) == 0 || $commandAmountTTC == 0) {
示例2: md5
}
}
if ($product->getVar('product_online') && $product->getVar('product_stock') > 0) {
// Set parameter
$password = md5(xoops_makepass());
$passwordCancel = md5(xoops_makepass());
$uid = oledrion_utils::getCurrentUserID();
$cmd_total = $product_price;
$cmd_shipping = 0;
// Save command
$commande = $h_oledrion_commands->create(true);
$commande->setVar('cmd_uid', $uid);
$commande->setVar('cmd_date', date("Y-m-d"));
$commande->setVar('cmd_create', time());
$commande->setVar('cmd_state', OLEDRION_STATE_NOINFORMATION);
$commande->setVar('cmd_ip', oledrion_utils::IP());
$commande->setVar('cmd_lastname', $cmd_lastname);
$commande->setVar('cmd_firstname', $cmd_firstname);
$commande->setVar('cmd_adress', $cmd_adress);
$commande->setVar('cmd_zip', $cmd_zip);
$commande->setVar('cmd_town', $cmd_town);
$commande->setVar('cmd_country', $cmd_country);
$commande->setVar('cmd_telephone', $cmd_telephone);
$commande->setVar('cmd_mobile', $cmd_mobile);
$commande->setVar('cmd_email', $cmd_email);
$commande->setVar('cmd_articles_count', 1);
$commande->setVar('cmd_total', oledrion_utils::formatFloatForDB($cmd_total));
$commande->setVar('cmd_shipping', oledrion_utils::formatFloatForDB($cmd_shipping));
$commande->setVar('cmd_packing_price', $cmd_packing_price);
$commande->setVar('cmd_bill', $cmd_bill);
$commande->setVar('cmd_password', $password);
示例3: createRating
/**
* Crée un vote pour un produit
*
* @param integer $vote_product_id L'identifiant du produit
* @param integer $vote_uid L'identifiant de l'utilisateur
* @param integer $vote_rating Le vote
* @return le résultat de la création du vote
*/
function createRating($vote_product_id, $vote_uid, $vote_rating)
{
$product = $this->create(true);
$product->setVar('vote_product_id', $vote_product_id);
$product->setVar('vote_uid', $vote_uid);
$product->setVar('vote_rating', $vote_rating);
$product->setVar('vote_ratinghostname', oledrion_utils::IP());
$product->setVar('vote_ratingtimestamp', time());
return $this->insert($product);
}