* License.
 *
 * All copies of the Covered Code must include on each user interface screen:
 *    (i) the "Powered by SugarCRM" logo and
 *    (ii) the SugarCRM copyright notice
 * in the same form as they appear in the distribution.  See full license for
 * requirements.
 *
 * The Original Code is: SugarCRM Open Source
 * The Initial Developer of the Original Code is SugarCRM, Inc.
 * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
 * All Rights Reserved.
 * Contributor(s): ______________________________________.
 */
require_once 'modules/Printing/Printing.php';
$sugarbean = new Printing();
// perform the delete if given a record to delete
if (empty($_REQUEST['record'])) {
    $GLOBALS['log']->info('delete called without a record id specified');
} else {
    $record = $_REQUEST['record'];
    $sugarbean->retrieve($record);
    if (!$sugarbean->ACLAccess('Delete')) {
        ACLController::displayNoAccess(true);
        sugar_cleanup(true);
    }
    $GLOBALS['log']->info("deleting record: {$record}");
    $sugarbean->mark_deleted($record);
}
// handle the return location variables
$return_module = empty($_REQUEST['return_module']) ? 'Project' : $_REQUEST['return_module'];
<?php

if (!defined('sugarEntry')) {
    define('sugarEntry', true);
}
require_once 'modules/Printing/Printing.php';
$printing = new Printing();
$quantity = $printing->getQuantity();
$multiplicity = $printing->getMultiplicity();
header('Content-Type: text/xml');
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
//A date in the past
echo '<table><tr>';
echo '<td><input name=color_b id=color_b value=' . $multiplicity['color_side_B'] . '>';
echo '<td><input name=quantity_result id=quantity_result value=' . $quantity . '>';
echo '<td><input name=multiplicity_result id=multiplicity_result value=' . $multiplicity['volume'] . '>';
echo '</td>';
echo '</tr>';
echo '</table>';
Example #3
0
mysql_query("SET NAMES cp1251");
$date1 = $_GET['date1'];
$date2 = $_GET['date2'];
if ($date1 == 0) {
    $date1 = "''";
}
if ($date2 == 0) {
    $date2 = reservation_date;
}
if (isset($_GET['canc'])) {
    echo "<script>\ndocument.location.href='reserved.php';\n</script>";
} else {
    define('FPDF_FONTPATH', 'FPDF/font/');
    require 'FPDF/fpdf.php';
    require 'printing.class.php';
    $printing = new Printing();
    $printing->Open();
    // Подключаем кириллические шрифты
    $printing->AddFont('ArialMT', '', 'arial.php');
    $printing->AddFont('Arial-BoldMT', '', 'arialbd.php');
    $printing->AddFont('Arial-BoldItalicMT', '', 'arialbi.php');
    $printing->AddPage(L);
    //Добавляем страничку в документ
    $printing->Title('Отчет по броням', 'logo2.jpg', 'ООО "Надежда"', 'г. Иваново ул. Бубнова д.22 ', 'тел. 024-263', 'www.hope.ru');
    // Выводим заголовок воспользовавшись новым методом
    $header = array("Номер брони", "Клиент", "Дата брони", "Страна", "Город", "Отель", "Дата вылета", "Стоимость", "Количество");
    // Все заголовки столбцов загоняем в массив
    $query = mysql_query("SELECT reservation_id, client_fio, reservation_date,res_quantity, country_name, city_name, hotel_name, date, cost FROM reservation JOIN client ON reservation.client_id=client.client_id JOIN tour ON reservation.tour_id=tour.tour_id JOIN hotel ON tour.hotel_code=hotel.hotel_code JOIN city ON hotel.city_code=city.city_code JOIN country ON city.country_code=country.country_code WHERE reservation_date>='{$date1}' AND reservation_date<='{$date2}' ORDER BY reservation_id") or die(mysql_error());
    $printing->OutputTable($header, $query);
    $printing->Output();
    // Выводим документ в браузер
 * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
 * All Rights Reserved.
 * Contributor(s): ______________________________________.
 */
require_once 'XTemplate/xtpl.php';
require_once 'data/Tracker.php';
require_once 'modules/Printing/Printing.php';
require_once 'include/time.php';
require_once 'modules/Printing/Forms.php';
global $timedate;
global $app_strings;
global $app_list_strings;
global $current_language;
global $current_user;
global $sugar_version, $sugar_config;
$focus = new Printing();
if (!empty($_REQUEST['record'])) {
    $focus->retrieve($_REQUEST['record']);
}
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'] . ": " . $focus->name, true);
echo "\n</p>\n";
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once $theme_path . 'layout_utils.php';
$GLOBALS['log']->info("Printing detail view");
$xtpl = new XTemplate('modules/Printing/EditView.html');
/// Users Popup
$json = getJSONobj();
$popup_request_data = array('call_back_function' => 'set_return', 'form_name' => 'EditView', 'field_to_name_array' => array('id' => 'product_id', 'name' => 'product_name'));