本文整理汇总了PHP中payment::mod_info方法的典型用法代码示例。如果您正苦于以下问题:PHP payment::mod_info方法的具体用法?PHP payment::mod_info怎么用?PHP payment::mod_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类payment
的用法示例。
在下文中一共展示了payment::mod_info方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pay_settings
function pay_settings()
{
$this->output->admin();
$f = $this->input->f;
// Set the default to be PayPal
if (!$this->default[adrevenue][payment_module]) {
$this->default[adrevenue][payment_module] = "paypal";
}
$mod = "pay." . $this->default[adrevenue][payment_module] . ".php";
include_once $mod;
$opt = payment::mod_vars();
$info = payment::mod_info();
if (count($f) > 0) {
reset($f);
while (list($key, $val) = each($f)) {
$this->save($key, $val);
}
$this->output->redirect("The payment settings were updated", "index.php?section=settings&action=pay_settings", 1);
exit;
}
// Show the form
$form = new formgen();
$form->comment("<b>" . lib_lang("Enter the settings for your {$info['name']} payment module") . "</b><br> ");
if ($info[extern] == TRUE) {
$form->comment(lib_lang($info[extern_description]) . ": <font color=red>" . $this->default[adrevenue][hostname] . "ipn.php<p>" . "</font>");
}
foreach ($opt as $rec) {
$name = $rec[name];
$v = $this->db->getsql("SELECT value FROM adrev_settings WHERE name=?", array($name));
$form->input(lib_lang($rec[label]), "f[{$name}]", stripslashes($v[0][value]), $rec[length]);
}
$form->hidden("submit", "1");
$this->title = lib_lang("Edit {$info['name']} Payment Settings");
$this->content = $form->generate("post", lib_lang("Save Payment Settings"));
$this->display();
$this->printpage();
exit;
}