本文整理汇总了PHP中Check::Confirm方法的典型用法代码示例。如果您正苦于以下问题:PHP Check::Confirm方法的具体用法?PHP Check::Confirm怎么用?PHP Check::Confirm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Check
的用法示例。
在下文中一共展示了Check::Confirm方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Buy
function Buy($f3)
{
$server = $this->loadServer();
$account = new \Webmin($server);
if (($saldo = $this->me->saldo) < $server->price) {
$this->flash('Saldo Anda Kurang, Hub Admin utk Deposit');
$f3->reroute($f3->get('URI'));
}
if (!$account->check($f3->get('POST.user'))) {
$this->flash('User Sudah Terdaftar, Coba yang Lain');
$f3->reroute($f3->get('URI'));
}
$account->copyFrom('POST');
$account->real = $this->me->username;
if ($f3->exists('POST.pass', $pass)) {
if (!\Check::Confirm('POST.pass')) {
$this->flash('Konfirmasi Password Tidak Cocok');
$f3->reroute($f3->get('URI'));
}
$account->pass = $account->crypt($pass);
}
$active = date("Y/m/d", strtotime("+30 days"));
$account->expire = \Webmin::exp_encode($active);
if (!$account->save()) {
$this->flash('Gagal, Coba Beberapa Saat Lagi');
$f3->reroute($f3->get('URI'));
}
$this->me->saldo = $this->me->saldo - $server->price;
$this->me->save();
$this->flash('Pembelian Account Berhasil', 'success');
$f3->set('SESSION.uid', $account->uid);
$f3->set('SESSION.pass', $pass);
$f3->reroute($f3->get('URI') . '/success');
}
示例2: Set
function Set($f3)
{
$seller = $this->loadSeller();
if ($seller->dry()) {
$seller->load(array('username=?', $f3->get('POST.username')));
if (!$seller->dry()) {
$this->flash('User sudah terdaftar');
$f3->reroute('/home/admin/seller/add');
}
}
$seller->copyFrom('POST');
if ($f3->exists('POST.password', $pass)) {
if (!\Check::Confirm('POST.password')) {
$this->flash('Konfirmasi Password Tidak Cocok');
$f3->reroute($f3->get('URI'));
}
$seller->password = $pass;
}
$seller->save();
$this->flash('Berhasil Disimpan', 'success');
$f3->reroute('/home/admin/seller/' . $seller->id);
}
示例3: Apply
function Apply($f3)
{
$server = $this->loadServer();
$account = $this->loadUser($server);
if ($account->dry()) {
if (!$account->check($f3->get('POST.user'))) {
$this->flash('User Sudah Terdaftar');
$f3->reroute($f3->get('URI'));
}
$account->real = $this->me->username;
}
$account->copyFrom('POST');
if ($f3->exists('POST.pass', $pass)) {
if (!\Check::Confirm('POST.pass')) {
$this->flash('Konfirmasi Password Tidak Cocok');
$f3->reroute($f3->get('URI'));
}
$account->pass = $account->crypt($pass);
}
if ($f3->exists('POST.exp', $exp)) {
$account->expire = \Webmin::exp_encode($exp);
}
$account->save();
$this->flash('Berhasil Disimpan', 'success');
$f3->reroute('/home/admin/server/' . $server->id . '/account/' . $account->uid);
}