false);$uploaded = wp_handle_upload($files_one,$overrides);if (isset($uploaded['url'])) { $image_info = getimagesize($uploaded['file']);$the_value['file' ] = $uploaded['file'];$the_value['url' ] = $uploaded['url' ];$the_value['width' ] = $image_info[0]; $the_value['height'] = $image_info[1];if (((empty($the_value['width'])) || (empty($the_value['height']))) && ($_FILES[$option['id']]['type'] == 'image/x-icon')) { $the_value['width' ] = '16';$the_value['height'] = '16';}$_REQUEST[$option['id']] = true;}}}}else {if (!isset($_REQUEST[$option['id']])) { if (($option['type'] == 'checkbox') || ($option['type'] == 'void_checkbox')) {$_REQUEST[$option['id']] = '';}}if (!is_array($_REQUEST[$option['id']])) $the_value = stripslashes($_REQUEST[$option['id']]);else $the_value = serialize($_REQUEST[$option['id']]);}if (isset($_REQUEST[$option['id']])) {if (isset($the_value)) {if ($option['type'] == 'color') {$len = strlen($the_value);if ((($len != 4) && ($len != 7)) || ($the_value{0} != '#')) $the_value = '';}$arrOptions[$option['id']] = $the_value;}}}update_option('sumakweb',$arrOptions);sumakweb_update_options_css();header('Location: admin.php?page=sumakweb_admin.php&saved=true');die;}else if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'reset')) {$arrOptionsOld = get_option('sumakweb');$arrOptions = array();foreach ($options as $option) {if (($option['type'] == 'open') || ($option['type'] == 'close') || ($option['type'] == 'displayonly')) continue;if ((isset($option['reset'])) && ($option['reset'] == false)&& (!empty($arrOptionsOld[$option['id']]))) { $arrOptions[$option['id']] = $arrOptionsOld[$option['id']];}else $arrOptions[$option['id']] = $option['std'];}update_option('sumakweb',$arrOptions); sumakweb_update_options_css(); header("Location: admin.php?page=sumakweb_admin.php&reset=true");die;}else if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'delete')) {delete_option('sumakweb');header("Location: themes.php");die;}}if (get_option('sk_transient_is_val')=='true'){add_theme_page(__('SumakWeb - Options','sumakweb'),__('Theme Options','sumakweb'),'edit_theme_options',basename(__FILE__),'sumakweb_options_menu_form');}}function sumakweb_options_menu_form(){global $sumakweb_options;$menubar_html = '';$fields_html = '';include get_template_directory() . '/options/init_fields.php';include get_template_directory() . '/options/get_fields.php'; $the_content_width = SumakWeb_HEADER_DEFAULT_WIDTH;if (($sumakweb_options['sumakweb_header_image_enable'] == 'on') && (!empty($sumakweb_options['sumakweb_header_image']['width']))) $the_content_width = $sumakweb_options['sumakweb_header_image']['width' ];if (isset($sumakweb_options['sumakweb_sidebar_left_width' ])){$width_left = floor($the_content_width * ((int)$sumakweb_options['sumakweb_sidebar_left_width' ] ) / 100);}else{$width_left = floor($the_content_width * (33) / 100);}$width_right = floor($the_content_width * ((int)$sumakweb_options['sumakweb_sidebar_right_width']) / 100);$width_middle = floor($the_content_width - $width_left - $width_right);$fields_html = str_replace('***LEFT_SIDEBAR_WIDTH***' ,$width_left . 'px',$fields_html);$fields_html = str_replace('***CONTENT_AREA_WIDTH***' ,$width_middle . 'px',$fields_html);$fields_html = str_replace('***RIGHT_SIDEBAR_WIDTH***',$width_right . 'px',$fields_html);$save_button = '
'. ' '. ' '. '
';?>' ?>