addBreakerToken(); break; case "deletebreakertoken": doDeleteBreakerToken(); break; case "addmessage": doAddMessage(); break; case "addnudge": doAddNudge(); break; case "getmsgall": getAllMessagesList(); break; case "getconversation": getConversation(); break; case "addbreakergallery": addBreakerGallery(); break; case "listbreakergallery": listBreakerGalleryDetails(); break; case "deletegalleryimage": deleteBreakerGalleryImage(); break; case "updatebreaker": updateBreakerDetails(); break; case "getprofile": getProfileDetails();
<?php @session_start(); require_once('vars.php'); require_once('config.php'); require_once('db.class.php'); $id=$_SESSION['chatUserId']; $ref=$_GET['r']; $data=getConversation(); if($data){ $package=packageConversation($data); $file='Conversation-'.$id.'___'.date("Y-m-d_H-i",time()); // tell the browser what kind of file is come in header("Content-type: text/plain"); header('Content-Disposition: text; filename='.$file.'.txt'); header('Content-Length: ' . strlen($package)); header("Content-Transfer-Encoding: binary"); echo $package; exit; }else{ header("Content-type: text/plain"); header('Content-Disposition: text; filename=Empty.txt'); header('Content-Length:1 '); header("Content-Transfer-Encoding: binary"); echo 'No conversation was found !.'; exit; } function getConversation() // Generate the conversation ! {