getSettings();
if (isset($_POST['save']) AND !empty($_POST['description']))
{
$new_description = str_replace("\\r\\n", "
", $_POST['description']);
$service = $_POST['service_id'];
$change_description = "UPDATE OGP_DB_PREFIXbilling_services
SET description ='".$db->realEscapeSingle($new_description)."'
WHERE service_id=".$db->realEscapeSingle($service);
$save = $db->query($change_description);
}
?>
resultQuery($qry_services);
if (isset($_REQUEST['service_id']) && $services === false) {
$view->refresh('home.php?m=simple-billing&p=shop');
return;
}
if(is_array($services) && count($services) > 0){
foreach ($services as $key => $row) {
$service_id[$key] = $row['service_id'];
$home_cfg_id[$key] = $row['home_cfg_id'];
$mod_cfg_id[$key] = $row['mod_cfg_id'];
$service_name[$key] = $row['service_name'];
$remote_server_id[$key] = $row['remote_server_id'];
$slot_max_qty[$key] = $row['slot_max_qty'];
$slot_min_qty[$key] = $row['slot_min_qty'];
$price_hourly[$key] = $row['price_hourly'];
$price_monthly[$key] = $row['price_monthly'];
$price_year[$key] = $row['price_year'];
$description[$key] = $row['description'];
$img_url[$key] = $row['img_url'];
$ftp[$key] = $row['ftp'];
$install_method[$key] = $row['install_method'];
$manual_url[$key] = $row['manual_url'];
$access_rights[$key] = $row['access_rights'];
}
array_multisort($service_name,
$service_id,
$home_cfg_id,
$mod_cfg_id,
$remote_server_id,
$slot_max_qty,
$slot_min_qty,
$price_hourly,
$price_monthly,
$price_year,
$description,
$img_url,
$ftp,
$install_method,
$manual_url,
$access_rights, SORT_DESC, $services);
}
?>
";
$isAdmin = $db->isAdmin($_SESSION['user_id'] );
if($isAdmin)
{
if(!isset($_POST['edit']))
{
echo "
$row[description]
";
echo "
";
}
else
{
echo "
";
}
}
else
echo "
$row[description]
";
?>