Example #1
0
     if ($_global_info->cover != '') {
         unlink('../' . $_global_general->icon);
     }
 } else {
     if (isset($cover_delete) && $cover_delete == '1') {
         $icon = '';
         unlink('../' . $_global_general->icon);
     } else {
         $icon = $_global_general->icon;
     }
 }
 $validation = $_get->get_general_validation();
 if ($validation->rows > 0) {
     $_update->update_general($url, $title, $description, $keywords, $analytics, $phone, $address, $country, $province, $city, $postal, $facebook, $twitter, $instagram, $currency, $logo, $cover, $icon);
 } else {
     $_update->insert_general($url, $title, $description, $keywords, $analytics, $phone, $address, $country, $province, $city, $postal, $facebook, $twitter, $instagram, $currency, $logo, $cover, $icon);
 }
 /* --- MAILGUN --- */
 $_mailgun_key = filter_var($_POST['mailgun_key'], FILTER_SANITIZE_SPECIAL_CHARS);
 $_mailgun_domain = filter_var($_POST['mailgun_domain'], FILTER_SANITIZE_URL);
 $_mailgun_status = filter_var($_POST['mailgun_status'], FILTER_SANITIZE_URL);
 if ($_global_count_mailgun->rows > 0) {
     $_update->update_mailgun($_mailgun_key, $_mailgun_domain, $_mailgun_status, '1');
 } else {
     $_update->insert_mailgun($_mailgun_key, $_mailgun_domain, $_mailgun_status);
 }
 $page = 'general';
 $type = 'success';
 $msg = 'Changes has been successfully saved';
 set_alert($type, $msg);
 safe_redirect($page);