'.$avatar.''; } else { $avatar = ''; } // Filter direction if($direction != 'rtl') { $direction = 'ltr'; } // Generates an human-readable date $date = explode('T', $date); $date = explode('-', $date[0]); $date = $date[2].'/'.$date[1].'/'.$date[0]; // Generate some values $content_dir = '../tmp/archives/'; $filename = 'jappix-chat-'.md5($xid.time()); $filepath = $content_dir.$filename.'.html'; // Generate Jappix logo Base64 code $logo = base64_encode(file_get_contents(JAPPIX_BASE.'/app/images/sprites/archives.png')); // Create the HTML code $new_text_inter = ' '.$nick.' ('.$xid.')
'.$original.'
' ; $new_text = stripslashes($new_text_inter); // Write the code into a file file_put_contents($filepath, $new_text, LOCK_EX); // Security: remove the file and stop the script if too bit (+6MiB) if(filesize($filepath) > 6000000) { unlink($filepath); exit; } // Return to the user the generated file ID exit($filename); } ?>