public static function primary_input_hidden($comment = null) { $commentId = null; if (isset($comment['pk_i_id'])) { $commentId = $comment['pk_i_id']; } if (Session::newInstance()->_getForm('commentId') != '') { $commentId = Session::newInstance()->_getForm('commentId'); } if (!is_null($commentId)) { parent::generic_input_hidden("id", $commentId); } }
public static function primary_input_hidden($field = null) { if (isset($field['pk_i_id'])) { parent::generic_input_hidden("id", $field["pk_i_id"]); } }
public static function user_data_hidden() { if (isset($_SESSION['userId']) && $_SESSION['userId'] != null) { $user = User::newInstance()->findByPrimaryKey($_SESSION['userId']); parent::generic_input_hidden('contactName', $user['s_name']); parent::generic_input_hidden('contactEmail', $user['s_email']); return true; } else { return false; } }
public static function city_text() { // get params GET (only manageItems) if (Params::getParam('city') != '') { $item['s_city'] = Params::getParam('city'); $item['fk_i_city_id'] = Params::getParam('cityId'); } parent::generic_input_text('city', isset($item['s_city']) ? $item['s_city'] : null, false, false); parent::generic_input_hidden('cityId', isset($item['fk_i_city_id']) && $item['fk_i_city_id'] != null ? $item['fk_i_city_id'] : ''); return true; }
public static function primary_input_hidden($user) { parent::generic_input_hidden("id", isset($user["pk_i_id"]) ? $user['pk_i_id'] : ''); }
public static function primary_input_hidden($category) { parent::generic_input_hidden("id", $category["pk_i_id"]); }
public static function alert_hidden() { parent::generic_input_hidden('alert', osc_search_alert()); return true; }
public static function country_select($countries, $user = null) { if (count($countries) > 1) { parent::generic_select('countryId', $countries, 'pk_c_code', 's_name', __('Select a country...'), isset($user['fk_c_country_code']) ? $user['fk_c_country_code'] : null); } else { parent::generic_input_text('country', !empty($user['s_country']) ? $user['s_country'] : @$countries[0]['s_name']); parent::generic_input_hidden('countryId', ''); } }
public static function primary_input_hidden($locale) { parent::generic_input_hidden("pk_c_code", $locale["pk_c_code"]); }
public static function language_selector($value = NULL) { $name = 'new_item[gn_lang]'; self::setInputValueFor('gn_lang', $value); $locales = osc_all_enabled_locales_for_admin(); if ($value == NULL) { $value = osc_current_user_locale(); } if (count($locales) > 1) { echo '<select name="' . $name . '" id="news_lang_selector">'; foreach ($locales as $locale) { $selected = ''; if ($value == $locale['pk_c_code']) { $selected = 'selected="selected"'; } echo '<option value="' . $locale['pk_c_code'] . '" ' . $selected . '>' . $locale['s_short_name'] . '</option>'; } echo '</select>'; } else { echo $locales[0]['s_short_name']; parent::generic_input_hidden('locale', $locales[0]['pk_c_code']); } }
public static function action_hidden() { parent::generic_input_hidden("action", 'contact_post'); return true; }
public static function city_select($cities, $user = null) { if (count($cities) > 1) { parent::generic_select('cityId', $cities, 'pk_i_id', 's_name', __('Select a city...'), isset($user['fk_i_city_id']) ? $user['fk_i_city_id'] : null); return true; } else { if (count($cities) == 1) { parent::generic_input_hidden('cityId', isset($user['fk_i_city_id']) ? $user['fk_i_city_id'] : null); echo '<span>' . $cities[0]['s_name'] . '</span>'; return false; } else { parent::generic_input_text('city', isset($user['s_city']) ? $user['s_city'] : null); return true; } } }