isMobile() ? 'mobile' : 'desktop'); setcookie("device", $layout, time() + 604800, "/"); // if layout mobile - workout mobile layout if($layout=='mobile'){$device = MobileLayout($detect->isMobile());} }else{ $isMobile = ($_COOKIE['device']=='mobile' ? true : false); if($isMobile==true){$device = MobileLayout($isMobile);} } $content = "

Complaint Letter

The complaint letter should be written in the business letter format . When writing a complaint letter you want to keep it short and to the point to help ensure that your letter will be read in its entirety, if you write a seven page complaint letter, it's highly unlikely that someone will sit down and read all seven pages.

The complaint letter should be addressed to the customer service/consumer affairs department or the head office if there is no customer service department. The address and contact information of the customer service department should be available on the company's products or website.

Complaint Letter Writing
In the first paragraph you should identify what the issue is and any relevant information that you believe is important. Be sure to include the following information if it's applicable to the situation: the date/time of the issue, location, name of person on duty, name of product, what the problem was, your account number, model number, price, warranty information and reference number. Be sure to stick with the facts and avoid putting emotions into your letter.

The next paragraph should state what you would like done to resolve the situation. If you received poor service, you could request an apology or a coupon. If a product malfunctioned, you could request that you could exchange the product for a new one or request a refund.

The last paragraph should thank the reader for the time. You can also throw in some compliments about something you liked about their company's product or service.

You should include your telephone number/e-mail address after your printed name so that they can contact you ASAP if necessary.

Be sure to keep a copy of the letter for yourself and include photocopies of any relevant documents and enclose them with your letter. "; $title = "Complaint Letter"; $desc = "Complaint letters should be kept brief and simple to ensure it is read completely. Customer service departments are the ideal place to send the complaint letter."; $tplbody= file_get_contents($index_tpl); $header= file_get_contents($header_tpl); $footer= file_get_contents($footer_tpl); $guide= file_get_contents("../guide_writing.html"); $tplbody = str_replace("{header}", $header, $tplbody); $tplbody = str_replace("{footer}", $footer, $tplbody); $tplbody = str_replace("{ft_year}", date('Y'), $tplbody); $tplbody = str_replace("{guide_writing}", $guide, $tplbody); $tplbody = str_replace("{content}", $content, $tplbody); $tplbody = str_replace("{title}", $title, $tplbody); $tplbody = str_replace("{desc}", $desc, $tplbody); echo $tplbody; /* ########### MOBILE FUNCTIONS --- START ############ */ /* *************************************************** */ // function to manage the template layouts for either desktop or mobile function MobileLayout($isMobile, $test = ""){ // assign global variables, retrieve detection class global $index_tpl;global $header_tpl;global $footer_tpl;global $mob_index_tpl;global $mob_header_tpl;global $mob_footer_tpl;global $device_switch;global $request_uri; $request_uri = ($request_uri ? $request_uri : $_SERVER['REQUEST_URI']); $layouts_arr=array('desktop', 'mobile'); // determining layout if(isset($_GET['layout'])){$layout = $_GET['layout'];}else{if(empty($_COOKIE['layout'])){$layout=($isMobile ? 'mobile' : 'desktop');}else{$layout=$_COOKIE['layout'];$dont_set_cookie = true;}} // if fails choose desktop as default if (!in_array($layout, $layouts_arr)){$layout='desktop';} // setting layout COOKIE if needed if($dont_set_cookie!=true){setcookie("layout", $layout, time() + 604800, "/");} // determine which layout depending on COOKIE $cssSelected="font-weight:bold;text-decoration:none!important;"; if($layout=='mobile' || $test=="test"){$index_tpl=$mob_index_tpl;$header_tpl=$mob_header_tpl;$footer_tpl=$mob_footer_tpl;$mobClass=$cssSelected;$deskClass='';}else{$mobClass='';$deskClass=$cssSelected;} // show device switch if mobile only if($isMobile){$qs = $request_uri;$device_switch = '
mobile site | desktop site
';} return array("type"=>$layout,"mobile"=>$isMobile); } // function to add query string or replace value if exists function addQueryString($url, $key, $value) {$urlarray = explode('?',$url);$query = '';if(isset($urlarray[1])) {$query = $urlarray[1];}parse_str($query,$queryarray);$queryarray[$key]=$value;$queryarray = http_build_query($queryarray);return $urlarray[0].'?'.$queryarray;} /* *************************************************** */ /* ########### MOBILE FUNCTIONS --- END ############## */ ?>