本文整理汇总了PHP中OW::getFeedback方法的典型用法代码示例。如果您正苦于以下问题:PHP OW::getFeedback方法的具体用法?PHP OW::getFeedback怎么用?PHP OW::getFeedback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OW
的用法示例。
在下文中一共展示了OW::getFeedback方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
/**
* Default action
*/
public function index()
{
$language = OW::getLanguage();
$item = new BASE_MenuItem();
$item->setLabel($language->text('gphotoviewer', 'admin_menu_general'));
$item->setUrl(OW::getRouter()->urlForRoute('gphotoviewer.admin_config'));
$item->setKey('general');
$item->setIconClass('ow_ic_gear_wheel');
$item->setOrder(0);
$menu = new BASE_CMP_ContentMenu(array($item));
$this->addComponent('menu', $menu);
$configs = OW::getConfig()->getValues('gphotoviewer');
$configSaveForm = new ConfigSaveForm();
$this->addForm($configSaveForm);
if (OW::getRequest()->isPost() && $configSaveForm->isValid($_POST)) {
$res = $configSaveForm->process();
OW::getFeedback()->info($language->text('gphotoviewer', 'settings_updated'));
$this->redirect(OW::getRouter()->urlForRoute('gphotoviewer.admin_config'));
}
if (!OW::getRequest()->isAjax()) {
$this->setPageHeading(OW::getLanguage()->text('gphotoviewer', 'admin_config'));
$this->setPageHeadingIconClass('ow_ic_picture');
$elem = $menu->getElement('general');
if ($elem) {
$elem->setActive(true);
}
}
$configSaveForm->getElement('enablePhotoviewer')->setValue($configs['enable_photo_viewer']);
$configSaveForm->getElement('downloadable')->setValue($configs['can_users_to_download_photos']);
$configSaveForm->getElement('slideshowTime')->setValue($configs['slideshow_time_per_a_photo']);
}
示例2: index
public function index()
{
$language = OW::getLanguage();
$form = new SELECTGENDER_CLASS_SettingsForm();
$this->addForm($form);
//$form->getElement('sandboxMode')->setValue(OW::getConfig()->getValue('smsverification', 'sandboxMode'));
$form->getElement('disMaleToMaleProfile')->setValue(OW::getConfig()->getValue('selectgender', 'disMaleToMaleProfile'));
$form->getElement('disMaleToFemaleProfile')->setValue(OW::getConfig()->getValue('selectgender', 'disMaleToFemaleProfile'));
$form->getElement('disFemaleToFemaleProfile')->setValue(OW::getConfig()->getValue('selectgender', 'disFemaleToFemaleProfile'));
$form->getElement('sameSexPhotoView')->setValue(OW::getConfig()->getValue('selectgender', 'sameSexPhotoView'));
$form->getElement('oppositeSexPhotoView')->setValue(OW::getConfig()->getValue('selectgender', 'oppositeSexPhotoView'));
$form->getElement('opositeMatchSexJoin')->setValue(OW::getConfig()->getValue('selectgender', 'opositeMatchSexJoin'));
$form->getElement('sameMatchSexJoin')->setValue(OW::getConfig()->getValue('selectgender', 'sameMatchSexJoin'));
$form->getElement('opositeMatchSexSearch')->setValue(OW::getConfig()->getValue('selectgender', 'opositeMatchSexSearch'));
$form->getElement('sameMatchSexSearch')->setValue(OW::getConfig()->getValue('selectgender', 'sameMatchSexSearch'));
$form->getElement('guestRedirectToJoin')->setValue(OW::getConfig()->getValue('selectgender', 'guestRedirectToJoin'));
if (OW::getRequest()->isPost() && $form->isValid($_POST)) {
$values = $form->getValues();
OW::getConfig()->saveConfig('selectgender', 'disMaleToMaleProfile', $values['disMaleToMaleProfile']);
OW::getConfig()->saveConfig('selectgender', 'disMaleToFemaleProfile', $values['disMaleToFemaleProfile']);
OW::getConfig()->saveConfig('selectgender', 'disFemaleToFemaleProfile', $values['disFemaleToFemaleProfile']);
OW::getConfig()->saveConfig('selectgender', 'sameSexPhotoView', $values['sameSexPhotoView']);
OW::getConfig()->saveConfig('selectgender', 'oppositeSexPhotoView', $values['oppositeSexPhotoView']);
OW::getConfig()->saveConfig('selectgender', 'opositeMatchSexJoin', $values['opositeMatchSexJoin']);
OW::getConfig()->saveConfig('selectgender', 'sameMatchSexJoin', $values['sameMatchSexJoin']);
OW::getConfig()->saveConfig('selectgender', 'opositeMatchSexSearch', $values['opositeMatchSexSearch']);
OW::getConfig()->saveConfig('selectgender', 'sameMatchSexSearch', $values['sameMatchSexSearch']);
OW::getConfig()->saveConfig('selectgender', 'guestRedirectToJoin', $values['guestRedirectToJoin']);
OW::getFeedback()->info($language->text('selectgender', 'settings_updated'));
$this->redirect();
}
$this->setPageHeading(OW::getLanguage()->text('selectgender', 'config_page_heading'));
$isSkadate = OW::getPluginManager()->isPluginActive('skadate');
$this->assign('isSkadate', $isSkadate);
}
示例3: index
public function index($params)
{
if (OW::getRequest()->isAjax()) {
exit;
}
$language = OW::getLanguage();
$this->setPageHeading($language->text('base', 'massmailing_unsubscribe'));
$code = null;
$userId = null;
$result = false;
if (isset($params['code']) && isset($params['id'])) {
$result = 'confirm';
if (!empty($_POST['cancel'])) {
$this->redirect(OW_URL_HOME);
}
$code = trim($params['code']);
$userId = $params['id'];
$user = $this->userServise->findUserById($userId);
if ($user !== null) {
if (md5($user->username . $user->password) === $code) {
$result = 'confirm';
if (!empty($_POST['confirm'])) {
BOL_PreferenceService::getInstance()->savePreferenceValue('mass_mailing_subscribe', false, $user->id);
$result = true;
OW::getFeedback()->info($language->text('base', 'massmailing_unsubscribe_successful'));
$this->redirect(OW_URL_HOME);
}
}
}
}
$this->assign('result', $result);
}
示例4: index
/**
* Default action
*/
public function index()
{
$language = OW::getLanguage();
$item = new BASE_MenuItem();
$item->setLabel($language->text('video', 'admin_menu_general'));
$item->setUrl(OW::getRouter()->urlForRoute('video_admin_config'));
$item->setKey('general');
$item->setIconClass('ow_ic_gear_wheel');
$menu = new BASE_CMP_ContentMenu(array($item));
$this->addComponent('menu', $menu);
$configs = OW::getConfig()->getValues('video');
$configSaveForm = new ConfigSaveForm();
$this->addForm($configSaveForm);
if (OW::getRequest()->isPost() && $configSaveForm->isValid($_POST)) {
$configSaveForm->process();
OW::getFeedback()->info($language->text('video', 'settings_updated'));
$this->redirect(OW::getRouter()->urlForRoute('video_admin_config'));
}
if (!OW::getRequest()->isAjax()) {
$this->setPageHeading(OW::getLanguage()->text('video', 'admin_config'));
$this->setPageHeadingIconClass('ow_ic_video');
$menu->getElement('general')->setActive(true);
}
$configSaveForm->getElement('playerWidth')->setValue($configs['player_width']);
$configSaveForm->getElement('playerHeight')->setValue($configs['player_height']);
$configSaveForm->getElement('perPage')->setValue($configs['videos_per_page']);
$configSaveForm->getElement('quota')->setValue($configs['user_quota']);
}
示例5: __construct
/**
* Class constructor
*/
public function __construct()
{
parent::__construct();
if (!OW::getUser()->isAuthenticated()) {
throw new AuthenticateException();
}
$this->avatarService = BOL_AvatarService::getInstance();
$this->ajaxResponder = OW::getRouter()->urlFor('BASE_CTRL_Avatar', 'ajaxResponder');
$avatarUploadForm = new avatarUploadForm();
$this->addForm($avatarUploadForm);
$language = OW::getLanguage();
if (OW::getRequest()->isPost() && !OW::getRequest()->isAjax()) {
$res = $avatarUploadForm->process();
if ($res['result']) {
$this->redirect();
} else {
if (isset($res['error']) && $res['error'] == -1) {
OW::getFeedback()->warning($language->text('base', 'not_valid_image'));
} else {
OW::getFeedback()->warning($language->text('base', 'avatar_select_image'));
}
}
}
if (!OW::getRequest()->isAjax()) {
OW::getDocument()->setHeading($language->text('base', 'avatar_change_avatar'));
OW::getDocument()->setHeadingIconClass('ow_ic_picture');
}
}
示例6: index
/**
* Default action
*/
public function index()
{
$language = OW::getLanguage();
$configSaveForm = new ConfigSaveForm();
$this->addForm($configSaveForm);
$activeModes = MAILBOX_BOL_ConversationService::getInstance()->getActiveModeList();
if (count($activeModes) > 1) {
$selectedMode = 'mailchat';
} else {
$selectedMode = $activeModes[0];
}
$this->assign('selectedMode', $selectedMode);
$mailModeEnabled = in_array('mail', $activeModes);
$this->assign('mailModeEnabled', $mailModeEnabled);
if (OW::getRequest()->isPost() && $configSaveForm->isValid($_POST)) {
$configSaveForm->process();
// clear cache
MAILBOX_BOL_ConversationService::getInstance()->resetAllUsersLastData();
OW::getFeedback()->info($language->text('mailbox', 'settings_updated'));
$this->redirect();
}
if (!OW::getRequest()->isAjax()) {
$this->setPageHeading(OW::getLanguage()->text('mailbox', 'admin_config'));
$this->setPageHeadingIconClass('ow_ic_mail');
}
}
示例7: index
public function index()
{
$language = OW::getLanguage();
$this->setPageHeading($language->text('ynsocialpublisher', 'admin_config'));
$this->setPageHeadingIconClass('ow_ic_picture');
$item = new BASE_MenuItem();
$item->setLabel($language->text('ynsocialpublisher', 'admin_menu_general'));
$item->setUrl(OW::getRouter()->urlForRoute('ynsocialpublisher.admin'));
$item->setKey('general');
$item->setIconClass('ow_ic_gear_wheel');
$item->setOrder(0);
$item->setActive(true);
$menu = new BASE_CMP_ContentMenu(array($item));
$this->addComponent('menu', $menu);
$service = YNSOCIALPUBLISHER_BOL_Service::getInstance();
$plugins = $service->getEnabledPlugins();
$this->assign('plugins', $plugins);
$form_url = OW::getRouter()->urlForRoute('ynsocialpublisher.admin');
$this->assign('form_url', $form_url);
if (OW::getRequest()->isPost()) {
// get plugins data from post
$params = $_POST['params'];
foreach ($params as $key => $settings) {
if (!isset($settings['providers'])) {
$settings['providers'] = array();
}
OW::getConfig()->saveConfig('ynsocialpublisher', $key, json_encode($settings));
}
OW::getFeedback()->info($language->text('ynsocialpublisher', 'settings_updated'));
$this->redirect($form_url);
}
}
示例8: index
public function index()
{
$billingService = BOL_BillingService::getInstance();
$gwKey = OCSBILLINGMONEYBOOKERS_CLASS_MoneybookersAdapter::GATEWAY_KEY;
$language = OW::getLanguage();
$form = new MoneybookersConfigForm();
$this->addForm($form);
if (OW::getRequest()->isPost() && $form->isValid($_POST)) {
$values = $form->getValues();
$billingService->setGatewayConfigValue($gwKey, 'merchantId', $values['merchantId']);
$billingService->setGatewayConfigValue($gwKey, 'merchantEmail', $values['merchantEmail']);
$billingService->setGatewayConfigValue($gwKey, 'secret', $values['secret']);
$billingService->setGatewayConfigValue($gwKey, 'sandboxMode', $values['sandboxMode']);
$billingService->setGatewayConfigValue($gwKey, 'recipientDescription', $values['recipientDescription']);
$billingService->setGatewayConfigValue($gwKey, 'language', $values['language']);
OW::getFeedback()->info($language->text('ocsbillingmoneybookers', 'settings_updated'));
$this->redirect();
}
$adapter = new OCSBILLINGMONEYBOOKERS_CLASS_MoneybookersAdapter();
$this->assign('logoUrl', $adapter->getLogoUrl());
$gateway = $billingService->findGatewayByKey($gwKey);
$this->assign('gateway', $gateway);
$this->assign('activeCurrency', $billingService->getActiveCurrency());
$supported = $billingService->currencyIsSupported($gateway->currencies);
$this->assign('currSupported', $supported);
$logo = OW::getPluginManager()->getPlugin('ocsbillingmoneybookers')->getStaticUrl() . 'img/oxwallcandystore-logo.jpg';
$this->assign('logo', $logo);
$this->setPageHeading(OW::getLanguage()->text('ocsbillingmoneybookers', 'config_page_heading'));
$this->setPageHeadingIconClass('ow_ic_app');
}
示例9: index
/**
* Default action
*/
public function index()
{
$language = OW::getLanguage();
$clipService = VIDEO_BOL_ClipService::getInstance();
$userId = OW::getUser()->getId();
if (!OW::getUser()->isAuthorized('video', 'add')) {
$status = BOL_AuthorizationService::getInstance()->getActionStatus('video', 'add');
throw new AuthorizationException($status['msg']);
}
if (!($clipService->findUserClipsCount($userId) <= $clipService->getUserQuotaConfig())) {
$this->assign('auth_msg', $language->text('video', 'quota_exceeded', array('limit' => $clipService->getUserQuotaConfig())));
} else {
$this->assign('auth_msg', null);
$videoAddForm = new videoAddForm();
$this->addForm($videoAddForm);
if (OW::getRequest()->isPost() && $videoAddForm->isValid($_POST)) {
$values = $videoAddForm->getValues();
$code = $clipService->validateClipCode($values['code']);
if (!mb_strlen($code)) {
OW::getFeedback()->warning($language->text('video', 'resource_not_allowed'));
$this->redirect();
}
$res = $videoAddForm->process();
OW::getFeedback()->info($language->text('video', 'clip_added'));
$this->redirect(OW::getRouter()->urlForRoute('view_clip', array('id' => $res['id'])));
}
}
if (!OW::getRequest()->isAjax()) {
OW::getNavigation()->activateMenuItem(OW_Navigation::MAIN, 'video', 'video');
}
OW::getDocument()->setHeading($language->text('video', 'page_title_add_video'));
OW::getDocument()->setHeadingIconClass('ow_ic_video');
OW::getDocument()->setTitle($language->text('video', 'meta_title_video_add'));
OW::getDocument()->setDescription($language->text('video', 'meta_description_video_add'));
}
示例10: index
/**
* Default action
*/
public function index()
{
$language = OW::getLanguage();
$uploadMaxFilesize = (double) ini_get("upload_max_filesize");
$postMaxSize = (double) ini_get("post_max_size");
$maxUploadMaxFilesize = $uploadMaxFilesize >= $postMaxSize ? $postMaxSize : $uploadMaxFilesize;
$this->assign('maxUploadMaxFilesize', $maxUploadMaxFilesize);
$configSaveForm = new ConfigSaveForm($maxUploadMaxFilesize);
$this->addForm($configSaveForm);
if (OW::getRequest()->isPost() && $configSaveForm->isValid($_POST)) {
$configSaveForm->process();
OW::getFeedback()->info($language->text('mailbox', 'settings_updated'));
$this->redirect();
}
if (!OW::getRequest()->isAjax()) {
$this->setPageHeading(OW::getLanguage()->text('mailbox', 'admin_config'));
$this->setPageHeadingIconClass('ow_ic_mail');
}
/* OW::getDocument()->addOnloadScript("
$(\"form[name='configSaveForm'] input[name='enableAttachments']\").change(
function()
{
if( $(this).attr('checked') )
{
$(\"form[name='configSaveForm'] input[name='uploadMaxFileSize']\").removeAttr('disabled');
}
else
{
$(\"form[name='configSaveForm'] input[name='uploadMaxFileSize']\").attr('disabled','disabled');
}
});
"); */
}
示例11: index
public function index($params)
{
$id = (int) $params['id'];
$menu = BOL_NavigationService::getInstance()->findMenuItemById($id);
$form = new EditPluginPageForm('edit-form', $menu);
$service = BOL_NavigationService::getInstance();
if (OW::getRequest()->isPost() && $form->isValid($_POST)) {
$data = $form->getValues();
$visibleFor = 0;
$arr = !empty($data['visible-for']) ? $data['visible-for'] : array();
foreach ($arr as $val) {
$visibleFor += $val;
}
$service->saveMenuItem($menu->setVisibleFor($visibleFor));
$languageService = BOL_LanguageService::getInstance();
$langKey = $languageService->findKey($menu->getPrefix(), $menu->getKey());
$langValue = $languageService->findValue($languageService->getCurrent()->getId(), $langKey->getId());
$languageService->saveValue($langValue->setValue($data['name']));
$adminPlugin = OW::getPluginManager()->getPlugin('admin');
OW::getFeedback()->info(OW::getLanguage()->text($adminPlugin->getKey(), 'updated_msg'));
$this->redirect();
}
//--
$this->addForm($form);
}
示例12: index
public function index($params = array())
{
$userService = BOL_UserService::getInstance();
$language = OW::getLanguage();
$this->setPageHeading($language->text('hotlist', 'admin_heading_settings'));
$this->setPageHeadingIconClass('ow_ic_gear_wheel');
$settingsForm = new Form('settingsForm');
$settingsForm->setId('settingsForm');
$expiration_time = new TextField('expiration_time');
$expiration_time->setRequired();
$expiration_time->setLabel($language->text('hotlist', 'label_expiration_time'));
$expiration_time_value = (int) OW::getConfig()->getValue('hotlist', 'expiration_time') / 86400;
$expiration_time->setValue($expiration_time_value);
$settingsForm->addElement($expiration_time);
$submit = new Submit('save');
$submit->addAttribute('class', 'ow_ic_save');
$submit->setValue($language->text('hotlist', 'label_save_btn_label'));
$settingsForm->addElement($submit);
$this->addForm($settingsForm);
if (OW::getRequest()->isPost()) {
if ($settingsForm->isValid($_POST)) {
$data = $settingsForm->getValues();
OW::getConfig()->saveConfig('hotlist', 'expiration_time', $data['expiration_time'] * 86400);
OW::getFeedback()->info($language->text('hotlist', 'settings_saved'));
$this->redirect();
}
}
}
示例13: index
public function index()
{
$groups = MODERATION_BOL_Service::getInstance()->getContentGroups();
if (OW::getRequest()->isPost()) {
$selectedGroups = empty($_POST["groups"]) ? array() : $_POST["groups"];
$types = array();
foreach ($groups as $group) {
$selected = in_array($group["name"], $selectedGroups);
foreach ($group["entityTypes"] as $type) {
$types[$type] = $selected;
}
}
OW::getConfig()->saveConfig("moderation", "content_types", json_encode($types));
OW::getFeedback()->info(OW::getLanguage()->text("moderation", "content_types_saved_message"));
$this->redirect(OW::getRouter()->urlForRoute("moderation.admin"));
}
$this->setPageHeading(OW::getLanguage()->text("moderation", "admin_heading"));
$this->setPageTitle(OW::getLanguage()->text("moderation", "admin_title"));
$form = new Form("contentTypes");
$submit = new Submit("save");
$submit->setLabel(OW::getLanguage()->text("admin", "save_btn_label"));
$form->addElement($submit);
$this->addForm($form);
$this->assign("groups", $groups);
}
示例14: index
public function index()
{
$language = OW::getLanguage();
OW::getDocument()->setHeading($language->text('mcompose', 'heading_configuration'));
OW::getDocument()->setHeadingIconClass('ow_ic_gear_wheel');
$this->assign('pluginUrl', 'http://www.oxwall.org/store/item/10');
if (!$this->plugin->isAvaliable()) {
$this->assign('avaliable', false);
return;
}
$this->assign('avaliable', true);
$settingUrl = OW::getRouter()->urlForRoute('mailbox_admin_config');
$this->assign('settingsUrl', $settingUrl);
$configs = OW::getConfig()->getValues('mcompose');
$features = array();
$features["friends"] = MCOMPOSE_CLASS_FriendsBridge::getInstance()->isActive();
$features["groups"] = MCOMPOSE_CLASS_GroupsBridge::getInstance()->isActive();
$features["events"] = MCOMPOSE_CLASS_EventsBridge::getInstance()->isActive();
$form = new MCOMPOSE_ConfigForm($configs, $features);
$this->addForm($form);
$this->assign("configs", $configs);
$this->assign("features", $features);
$this->assign("activeFeatures", array_filter($features));
if (OW::getRequest()->isPost() && $form->isValid($_POST)) {
if ($form->process($_POST)) {
OW::getFeedback()->info($language->text('mcompose', 'admin_settings_updated'));
$this->redirect(OW::getRouter()->urlForRoute('mcompose-admin'));
}
}
}
示例15: settings
public function settings()
{
$adminForm = new Form('adminForm');
$language = OW::getLanguage();
$config = OW::getConfig();
$element = new TextField('autoclick');
$element->setRequired(true);
$validator = new IntValidator(1);
$validator->setErrorMessage($language->text('autoviewmore', 'admin_invalid_number_error'));
$element->addValidator($validator);
$element->setLabel($language->text('autoviewmore', 'admin_auto_click'));
$element->setValue($config->getValue('autoviewmore', 'autoclick'));
$adminForm->addElement($element);
$element = new Submit('saveSettings');
$element->setValue($language->text('autoviewmore', 'admin_save_settings'));
$adminForm->addElement($element);
if (OW::getRequest()->isPost()) {
if ($adminForm->isValid($_POST)) {
$values = $adminForm->getValues();
$config = OW::getConfig();
$config->saveConfig('autoviewmore', 'autoclick', $values['autoclick']);
OW::getFeedback()->info($language->text('autoviewmore', 'user_save_success'));
}
}
$this->addForm($adminForm);
}