global $version; $errormsg = SavePassword($version); } if ($_REQUEST['last_login'] != '') { $last_login = portal_purify(stripslashes($_REQUEST['last_login'])); $_SESSION['last_login'] = $last_login; } elseif ($_SESSION['last_login'] != '') { $last_login = $_SESSION['last_login']; } if ($_REQUEST['support_start_date'] != '') { $_SESSION['support_start_date'] = $support_start_date = portal_purify(stripslashes($_REQUEST['support_start_date'])); } elseif ($_SESSION['support_start_date'] != '') { $support_start_date = $_SESSION['support_start_date']; } if ($_REQUEST['support_end_date'] != '') { $_SESSION['support_end_date'] = $support_end_date = portal_purify(stripslashes($_REQUEST['support_end_date'])); } elseif ($_SESSION['support_end_date'] != '') { $support_end_date = $_SESSION['support_end_date']; } ?> <?php include "header.html"; ?> <form name="savepassword" action="MySettings.php" method="post"> <input type="hidden" name="fun" value="savepassword"> <aside class="right-side">
@header("Location: {$Authenticate_Path}/login.php"); exit; } include "index.html"; global $result; $customerid = $_SESSION['customer_id']; $sessionid = $_SESSION['customer_sessionid']; if ($_REQUEST['id'] != '') { $id = $_REQUEST['id']; $status = $_REQUEST['status']; $block = "Invoice"; if ($status != true) { $params = array('id' => "{$id}", 'block' => "{$block}", 'contactid' => "{$customerid}", 'sessionid' => "{$sessionid}"); $filecontent = $client->call('get_pdf', $params, $Server_Path, $Server_Path); if ($filecontent != 'failure') { $filename = "{$Server_Path}/test/product/" . portal_purify($id) . "_Invoice.pdf"; header("Content-type: text/pdf"); header("Cache-Control: private"); header("Content-Disposition: attachment; filename={$filename}"); header("Content-Description: PHP Generated Data"); echo base64_decode($filecontent); exit; } else { echo getTranslatedString('LBL_PDF_CANNOT_GENERATE'); //We have to show the error message like "PDF output cannot be generated. Please contact admin" } } else { include "InvoiceDetail.php"; } } else { include "InvoiceList.php";
function ListFaqsPerProduct($productid) { $list = ''; $product_array = $_SESSION['product_array']; $faq_array = $_SESSION['faq_array']; $list = '<div class="widget-header"><h5><b>' . getTranslatedString('LBL_PRODUCT') . ': ' . getProductname(portal_purify($productid)) . '</b><h5></div>'; $list .= '<div class="table-responsive"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="lvt table table-striped table-bordered table-hover">'; for ($i = 0; $i < count($faq_array); $i++) { if ($productid == $faq_array[$i]['product_id']) { $flag = true; $list .= ' <tr> <td><img src="images/faq.gif" valign="absmiddle"> <a class="faqQues" href=index.php?module=Faq&action=index&fun=faq_detail&faqid=' . $faq_array[$i]['id'] . '>' . $faq_array[$i]['question'] . '</a></td> </tr> <tr> <td class="small">' . $faq_array[$i]['answer'] . '</td> </tr> <tr> <td height="10"></td> </tr>'; } } if (!$flag) { $list .= getTranslatedString('LBL_NO_FAQ_IN_THIS_PRODUCT'); } $list .= '</table>'; return $list; }
<?php /********************************************************************************* ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 * ("License"); You may not use this file except in compliance with the License * The Original Code is: vtiger CRM Open Source * The Initial Developer of the Original Code is vtiger. * Portions created by vtiger are Copyright (C) vtiger. * All Rights Reserved. * ********************************************************************************/ @(include "../PortalConfig.php"); if (!isset($_SESSION['customer_id']) || $_SESSION['customer_id'] == '') { @header("Location: {$Authenticate_Path}/login.php"); exit; } include "index.html"; global $result; $sessionid = $_SESSION['customer_sessionid']; $customerid = $_SESSION['customer_id']; $assetid = portal_purify($_REQUEST['id']); $block = 'Assets'; if ($assetid == '') { include "AssetsList.php"; } else { include "AssetDetail.php"; } echo '</table> </td></tr></table></td></tr></table>';