예제 #1
0
 include_once $root . "/include/rdbmsConfig.inc.php";
 include_once $root . "/include/vermieterFunctions.inc.php";
 include_once $root . "/include/sessionFunctions.inc.php";
 include_once $root . "/include/uebersetzer.inc.php";
 $sprache = getSessionWert(SPRACHE);
 $gastro_id = getSessionWert(GASTRO_ID);
 //function to generate a table card:
 include_once $root . '/include/tischkartenFunctions.inc.php';
 //create a new pdf object:
 $pageOrientation = getTableCardProperty(TC_PAGE_ORIENTATION, $tableCardId);
 $measureUnit = getTableCardProperty(TC_MEASURE_UNIT, $tableCardId);
 $dimension = getTableCardProperty(TC_DIMENSION, $tableCardId);
 if ($dimension == TC_CUSTOM_FORMAT) {
     $size = array();
     $size[] = getTableCardProperty(TC_CUSTOM_FORMAT_Y, $tableCardId);
     $size[] = getTableCardProperty(TC_CUSTOM_FORMAT_X, $tableCardId);
 } else {
     $size = $dimension;
 }
 //create the pdf with constructor:
 $pdf = new FPDF($pageOrientation, $measureUnit, $size);
 $pdf->AddPage();
 //raender setzen: $pdf->SetMargins(float left, float top [, float right])
 $pdf->SetMargins(5.0, 5.0);
 //SetFont(string family [, string style [, float size]])
 /*
 # Courier (fixed-width)
 # Helvetica or Arial (synonymous; sans serif)
 # Times (serif) 
 Font style. Possible values are (case insensitive):
 
예제 #2
0
 $gastro_id = getSessionWert(GASTRO_ID);
 $tableCardId = $_POST['tableCardId'];
 if (isset($_FILES['bild']['tmp_name'])) {
     $bild = $_FILES['bild']['tmp_name'];
     $mimeType = $_FILES['bild']['type'];
     $fileExtension = getFileExtension($mimeType);
     if (!($fileExtension == ".png" || $fileExtension == ".jpg")) {
         $nachricht = "Sie können nur .png oder .jpg hochladen. Sie versuchten " . $fileExtension . " hochzuladen.";
         $nachricht = getUebersetzung($nachricht);
         $fehler = true;
         include_once "./index.php";
         exit;
     }
 }
 //add constans to db
 if (getTableCardProperty("TC_PAGE_ORIENTATION", $tableCardId) == FALSE) {
     setTableCardProperty("TC_PAGE_ORIENTATION", 'TC_PAGE_ORIENTATION', $tableCardId);
     setTableCardProperty("TC_PORTRAIT", 'TC_PORTRAIT', $tableCardId);
     setTableCardProperty("TC_LANDSCAPE", 'TC_LANDSCAPE', $tableCardId);
     setTableCardProperty("TC_MEASURE_UNIT", 'TC_MEASURE_UNIT', $tableCardId);
     setTableCardProperty("TC_MILLIMETER", 'TC_MILLIMETER', $tableCardId);
     setTableCardProperty("TC_CENTIMETER", 'TC_CENTIMETER', $tableCardId);
     setTableCardProperty("TC_DIMENSION", 'TC_DIMENSION', $tableCardId);
     setTableCardProperty("TC_A4", 'TC_A4', $tableCardId);
     setTableCardProperty("TC_A5", 'TC_A5', $tableCardId);
     setTableCardProperty("TC_CUSTOM_FORMAT_X", 'TC_CUSTOM_FORMAT_X', $tableCardId);
     setTableCardProperty("TC_CUSTOM_FORMAT_Y", 'TC_CUSTOM_FORMAT_Y', $tableCardId);
     setTableCardProperty("font_heading", 'font_heading', $tableCardId);
     setTableCardProperty("TC_FONT_TEXT", 'TC_FONT_TEXT', $tableCardId);
     setTableCardProperty("TC_FONT_COURIER", 'TC_FONT_COURIER', $tableCardId);
     setTableCardProperty("TC_FONT_ARIAL", 'TC_FONT_ARIAL', $tableCardId);
예제 #3
0
 require_once $root . '/include/fpdf153/fpdf.php';
 include_once $root . "/include/rdbmsConfig.inc.php";
 include_once $root . "/include/vermieterFunctions.inc.php";
 include_once $root . "/include/sessionFunctions.inc.php";
 include_once $root . "/include/uebersetzer.inc.php";
 $sprache = getSessionWert(SPRACHE);
 $gastro_id = getSessionWert(GASTRO_ID);
 //create a new pdf object:
 $pageOrientation = getTableCardProperty(TC_PAGE_ORIENTATION, $tableCardId);
 if (!$pageOrientation) {
     //set default properties if
     setTableCardDefaultProperties($tableCardId);
     $pageOrientation = getTableCardProperty(TC_PAGE_ORIENTATION, $tableCardId);
 }
 $measureUnit = getTableCardProperty(TC_MEASURE_UNIT, $tableCardId);
 $dimension = getTableCardProperty(TC_DIMENSION, $tableCardId);
 if ($dimension == TC_CUSTOM_FORMAT) {
     $size = array();
     //$size[]= getTableCardProperty(TC_CUSTOM_FORMAT_Y,$tableCardId);
     //$size[]= getTableCardProperty(TC_CUSTOM_FORMAT_X,$tableCardId);
     $size[] = $y;
     $size[] = $x;
 } else {
     $size = $dimension;
 }
 //create the pdf with constructor:
 $pdf = new FPDF($pageOrientation, $measureUnit, $size);
 $pdf->AddPage();
 //raender setzen: $pdf->SetMargins(float left, float top [, float right])
 //$pdf->SetMargins(5.0, 5.0);
 //SetFont(string family [, string style [, float size]])
예제 #4
0
		  <tr>
		  	<td>
		  		<?php 
echo getUebersetzung("Schriftgröße Text");
?>
		  	</td> 	  	  		  	
		  	<td>
		  		<select name="font_size_text">
		  			<?php 
for ($i = 6; $i <= 36; $i++) {
    ?>
		  			<option value="<?php 
    echo $i;
    ?>
" <?php 
    if ($i == getTableCardProperty(TC_FONT_TEXT_SIZE, $tableCardId)) {
        ?>
			  				selected="selected"
			  				<?php 
    }
    ?>
><?php 
    echo $i;
    ?>
</option>
		  			<?php 
}
?>
		  		</select> Punkt
		  	</td>  	
		  </tr> 	
/**
 * @author coster
 * @date 01.08.2007
 * set a value for a property 
 * */
function setTableCardProperty($label, $value, $tableCard_id)
{
    global $db;
    if (empty($db)) {
        die("Error on global variable!");
    }
    if (empty($tableCard_id)) {
        die("Table card id failes!");
    }
    $temp = getTableCardProperty($label, $tableCard_id);
    if ($temp === FALSE) {
        $query = "INSERT INTO \n\t\t   BOOKLINE_TISCHKARTE_PROPERTIES\n\t\t   (LABEL,TISCHKARTE_ID,VALUE)\n\t\t   VALUES\n\t\t   ('{$label}','{$tableCard_id}','{$value}')\n\t\t  ";
    } else {
        $query = "UPDATE \n\t\t   BOOKLINE_TISCHKARTE_PROPERTIES\n\t\t   SET\n\t\t   VALUE = '{$value}'\n\t\t   where\n\t\t   TISCHKARTE_ID = '{$tableCard_id}'\n\t\t   and\n\t\t   LABEL = '{$label}'\n\t\t  ";
    }
    $res = $db->Execute($query);
    if (!$res) {
        print $db->ErrorMsg();
        die("<br/>Die Anfrage <br/>{$query}<br/> scheiterte.");
    } else {
        return true;
    }
}