Exemplo n.º 1
0
// $Id$
require_once "inc/stdLib.php";
include "inc/template.inc";
include "inc/crmLib.php";
include_once "inc/UserLib.php";
if ($_POST["holen"]) {
    $msg = getCustMsg($_POST["cp_cv_id"], true);
} else {
    if ($_POST["reset"]) {
        $msg = false;
        $_POST["cp_cv_id"] = "";
        $_POST["name"] = "";
    } else {
        if ($_POST["sichern"]) {
            $rc = saveCustMsg($_POST);
            $msg = getCustMsg($_POST["cp_cv_id"], true);
        }
    }
}
$fid = $_POST["cp_cv_id"];
$name = $_POST["name"];
$t = new Template($base);
doHeader($t);
$t->set_file(array("msg" => "user4.tpl"));
$t->set_var(array(FID => $fid, Firma => $name));
$t->set_block("msg", "Selectbox", "Block");
if ($msg) {
    foreach ($msg as $zeile) {
        $nr = $zeile["prio"];
        $t->set_var(array("R{$nr}" => $zeile["akt"] == "t" ? "checked" : "", "mid{$nr}" => $zeile["id"], "MSG{$nr}" => $zeile["msg"]));
        $t->parse("Block", "Selectbox", true);
Exemplo n.º 2
0
<?php

require "inc/stdLib.php";
include "inc/template.inc";
include "inc/FirmenLib.php";
include "inc/crmLib.php";
$Vars = false;
$fid = isset($_GET['fid']) ? $_GET['fid'] : false;
$Q = isset($_GET['Q']) ? $_GET['Q'] : '';
$id = isset($_GET['id']) ? $_GET['id'] : false;
$kdhelp = getWCategorie(true);
$fa = getFirmenStamm($id, true, $Q);
$start = isset($_GET["start"]) ? $_GET["start"] : 0;
$cmsg = getCustMsg($id);
$tmp = getVariablen($id);
$variablen = '';
$t = new Template($base);
doHeader($t);
$t->set_file(array("fa1" => "firma1.tpl"));
if (count($tmp) > 0) {
    $t->set_block("fa1", "vars", "BlockS");
    $variablen = count($tmp) . " Variablen";
    $Vars = "<table>\n";
    foreach ($tmp as $row) {
        switch ($row["type"]) {
            case "textfield":
                //ToDo:  Es sollte dann natürlich auch ein Textfeld zu sehen sein ....
                preg_match("/width[ ]*=[ ]*(\\d+)/i", $row["options"], $hit);
                $w = isset($hit[1]) && $hit[1] > 5 ? $hit[1] : 30;
                $txt = '';
                while (strlen($row["text_value"]) > $w) {