$frm = str_replace('@company@', $company, $frm);
$frm = str_replace('@email@', $email, $frm);
$frm = str_replace('@stdate@', $stdate, $frm);
$frm = str_replace('@enddate@', $enddate, $frm);
$frm = str_replace('@all@', $fall, $frm);
switch ($action) {
    case 'remove':
        RemoveMarketingUser($entryid);
}
if ($stdate != '') {
    $stdate = convertFromDateToUnixTimestamp($stdate);
} else {
    $stdate = -1;
}
if ($enddate != '') {
    $enddate = convertFromDateToUnixTimestamp($enddate);
} else {
    $enddate = -1;
}
$rowsperpage = GetMarketingListCountFor(2, $company, $email, $stdate, $enddate, $product);
if ($pg < 1) {
    $pg = 1;
}
$first = ($pg - 1) * $rowsperpage;
$no = $first + 1;
$articles = GetMarketingListForSource($first, $rowsperpage, 2, $company, $email, $stdate, $enddate, $product);
$content = '<section id="adm_container">
	<div class="container"><p class="pressEdit-list">';
$content .= $frm;
if ($all == 1) {
    $rowsperpage = -1;
     }
     break;
 case 'updnews':
     $imgupd = 0;
     if ($pressid != -1) {
         if (isset($_FILES['image'])) {
             $imgfiledesc = $_FILES['image'];
             if ($imgfiledesc['error'] == 0) {
                 $imgname = $imgfiledesc['name'];
                 $imgfile = file_get_contents($imgfiledesc['tmp_name']);
                 if (UpdateNewsImg($pressid, $imgfile, $imgname)) {
                     $imgupd = 1;
                 }
             }
         }
         $ts = convertFromDateToUnixTimestamp($date);
         //echo $ts;
         $author = '';
         if (UpdateNews($pressid, $title, $subtitle, $author, $lead, $body, $ts, $flags, $imgalt, $meta, $source)) {
             if ($imgupd) {
                 $status = 'Changes have been saved :)';
             } else {
                 $status = 'Article has been updated!';
             }
             //$showform = false;
         } else {
             if ($imgupd == 0) {
                 $status = 'Changes have not been saved :(';
             } else {
                 $status = 'Image has been updated';
             }