本文整理汇总了PHP中License::getSoftwares方法的典型用法代码示例。如果您正苦于以下问题:PHP License::getSoftwares方法的具体用法?PHP License::getSoftwares怎么用?PHP License::getSoftwares使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类License
的用法示例。
在下文中一共展示了License::getSoftwares方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handler_licenses_final
public function handler_licenses_final($page, $no_reason = false)
{
$softwares = License::getSoftwares();
$keys = array();
if (Post::has('disagree') || !$no_reason && !Post::has('resend') && (!Post::has('reason') || Post::v('reason') == "") || !Post::has('software') || !in_array(Post::v('software'), array_keys($softwares))) {
$this->handler_licenses($page);
} else {
$page->changeTpl('licenses/licenses_final.tpl');
$page->assign('title', "Demande de licence pour {$softwares[Post::v('software')]}");
$page->assign('software', Post::s('software'));
$page->assign('software_name', $softwares[Post::s('software')]);
if (($key = License::adminKey(Post::s('software'))) && License::hasRights(S::user())) {
$key->give(S::user());
$page->assign('direct', true);
} elseif (Post::has('resend')) {
$l = License::fetch(array('id' => Post::i('id')));
if ($l[0]->uid() == S::user()->id()) {
License::send($l);
} else {
die("La license n'appartient pas à l'utilisateur courant");
}
$page->assign('direct', true);
} else {
$lv = new LicensesValidate(Post::s('software'), Post::s('reason'));
$v = new Validate(array('writer' => S::user(), 'group' => Group::from('licenses'), 'item' => $lv, 'type' => 'licenses'));
$v->insert();
$page->assign('direct', false);
}
}
}
示例2: softwareName
public function softwareName()
{
$s = License::getSoftwares();
return $s[$this->software];
}