add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error'); else if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error'); ?> >
''.BOX_REWARD_POINTS.'');
if(isset($_GET['pID']))
{
$reward_point_record=GetRewardPointRecord(SCOPE_PRODUCT,$_GET['pID']);
$header=TEXT_PRODUCT_REWARD_POINTS_HEADER;
$ident=zen_get_products_name($_GET['pID'],$_SESSION['languages_id']);
$prompt=TEXT_PRODUCT_REWARD_POINT_PROMPT;
$passvar="&pID=".$_GET['pID'];
}
else
if(isset($_GET['cID']))
{
$reward_point_record=GetRewardPointRecord(SCOPE_CATEGORY,$_GET['cID']);
$header=TEXT_CATEGORY_REWARD_POINTS_HEADER;
$ident=zen_get_category_name($_GET['cID'],$_SESSION['languages_id']);
$prompt=TEXT_CATEGORY_REWARD_POINT_PROMPT;
$passvar="&cID=".$_GET['cID'];
}
else
{
$reward_point_record=GetRewardPointRecord(SCOPE_GLOBAL);
$header=TEXT_GLOBAL_REWARD_POINTS_HEADER;
$ident="";
$prompt=TEXT_GLOBAL_REWARD_POINT_PROMPT;
$passvar="";
}
$contents=array('form' => zen_draw_form('set_reward_points', FILENAME_ADMIN_REWARD_POINTS, 'cPath='.$cPath.$passvar.'&action=set_reward_points','post', 'enctype="multipart/form-data"'));
$contents[]=array('text' => ''.$header.' '); $contents[]=array('align' => 'center', 'text' => ' '.$ident.' '); $contents[]=array('text' => $prompt.' '.zen_draw_input_field('reward_point_ratio',$reward_point_record->fields[FIELD_POINT_RATIO],zen_set_field_length(TABLE_REWARD_MASTER,FIELD_POINT_RATIO)).' '); $contents[]=array('align' => 'center', 'text' => ($reward_point_record->fields?zen_image_submit('button_update.gif', IMAGE_UPDATE):zen_image_submit('button_save.gif', IMAGE_SAVE))); $contents[]=array('text' => ''); // check for which buttons to show for categories and products $check_categories = zen_has_category_subcategories($current_category_id); $check_products = zen_products_in_category_count($current_category_id, false, false, 1); $zc_skip_products = false; $zc_skip_categories = false; if($check_products == 0) { $zc_skip_products = false; $zc_skip_categories = false; } if ($check_categories == true) { $zc_skip_products = true; $zc_skip_categories = false; } if ($check_products > 0) { $zc_skip_products = false; $zc_skip_categories = true; } if ($zc_skip_products == true) $categories_products_sort_order_array = array(array('id' => '0', 'text' => TEXT_SORT_CATEGORIES_SORT_ORDER_PRODUCTS_NAME),array('id' => '1', 'text' => TEXT_SORT_CATEGORIES_NAME)); else // toggle switch for display sort order $categories_products_sort_order_array=array(array('id' => '0', 'text' => TEXT_SORT_PRODUCTS_SORT_ORDER_PRODUCTS_NAME),array('id' => '1', 'text' => TEXT_SORT_PRODUCTS_NAME),array('id' => '2', 'text' => TEXT_SORT_PRODUCTS_MODEL),); echo TEXT_CATEGORIES_PRODUCTS_SORT_ORDER_INFO . zen_draw_form('set_categories_products_sort_order_form', FILENAME_ADMIN_REWARD_POINTS, '', 'get') . ' ' . zen_draw_pull_down_menu('reset_categories_products_sort_order', $categories_products_sort_order_array, $reset_categories_products_sort_order, 'onChange="this.form.submit();"') . zen_hide_session_id() . zen_draw_hidden_field('cID', $cPath) . zen_draw_hidden_field('cPath', $cPath) . zen_draw_hidden_field('pID', $_GET['pID']) . zen_draw_hidden_field('page', $_GET['page']) . zen_draw_hidden_field('action', 'set_categories_products_sort_order'); echo ' '; echo zen_draw_form('search', FILENAME_ADMIN_REWARD_POINTS,'','get'); echo HEADING_TITLE_SEARCH_DETAIL.' '.zen_draw_input_field('search',zen_db_input(zen_db_prepare_input($_GET['search']))).zen_hide_session_id(); echo ' '; echo zen_draw_form('goto',FILENAME_ADMIN_REWARD_POINTS,'','get').zen_hide_session_id(); echo HEADING_TITLE_GOTO.' '.zen_draw_pull_down_menu('cPath',zen_get_category_tree(),$current_category_id,'onChange="this.form.submit();"'); echo ''; ?> |
|
0) for($i=0, $n=sizeof($cPath_array)-1; $i<$n; $i++) if (empty($cPath_back)) $cPath_back.= $cPath_array[$i]; else $cPath_back.='_'.$cPath_array[$i]; $cPath_back = (zen_not_null($cPath_back)) ? 'cPath=' . $cPath_back . '&' : ''; echo (sizeof($cPath_array)>0?''.zen_image_button('button_back.gif', IMAGE_BACK).'':" "); ?> | fields[FIELD_POINT_RATIO],zen_set_field_length(TABLE_REWARD_MASTER,FIELD_POINT_RATIO)); echo ''; ?> |
|
infoBox($heading, $contents); ?> |