/**
  * Draw HTML output
  */
 function draw()
 {
     global $c, $sid;
     echo '<td colspan="' . $this->cells . '"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>';
     $widget = new Cell("clc", "", 1, $this->width, 40);
     $widget->draw();
     echo "</tr><tr>\n";
     $widget = new Label("lbl", $this->headline, "headbox", 1);
     $widget->draw();
     echo "</tr><tr>\n";
     $widget = new FormImage($c["docroot"] . "modules/stats/widgets/statsimage.php?sid={$sid}&diagram=" . $this->diagramType . "&width=" . $this->width . "&height=" . $this->height . "&spid=" . $this->spid, $this->width, $this->height, 1);
     $widget->draw();
     // Draw Legend...
     echo "</tr><tr>\n";
     $widget = new Cell("clc", "", 1, $this->width, 10);
     $widget->draw();
     $colors[0] = __RED;
     $colors[1] = __BLUE;
     $colors[2] = __YELLOW;
     $colors[3] = __GREEN;
     for ($i = 0; $i < count($this->legend); $i++) {
         echo "</tr><tr><td>";
         echo '<table width="100%" border="0" cellpadding="2" cellspacing="0"><tr>';
         echo '<td width="10">' . ($i + 1) . '.</td>';
         echo '<td width="11">';
         echo '<table width="11" height="11" border="0" cellspacing="0" cellpadding="0"><tr><td style="background-color:' . $colors[$i] . ';">' . drawSpacer(11, 11) . '</td></tr></table>';
         echo '</td>';
         echo '<td>' . $this->legend[$i] . '</td>';
         echo '</tr></table></td>';
     }
     echo "</tr></table></td>";
     return $this->cells;
 }
		/**
		   * Standard constructor
		   * @param boolean $onlySave Display only the save button
		   */
		function FormButtons($onlySave = false, $resetButton=false, $formname="form1") {
			global $lang;

			$container = new HTMLContainer("con1", "", 2);
			$container->add('<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td align="right">');
			
			if ($resetButton) {
			  $lb4 = new ButtonInline("rst", $lang->get("reset"), "navelement", "reset");
			  $container->add($lb4->draw(). '&nbsp;&nbsp;');
			}
			
			if (!$onlySave) {
				$lb3 = new ButtonInline("action", $lang->get("back"), "navelement", "submit", getWaitupScreen($formname));
				$container->add($lb3->draw(). drawSpacer(50,1));
				$lb2 = new ButtonInline("action", $lang->get("save_back", "Save and Back"), "navelement", "submit", getWaitupScreen($formname));
				$container->add($lb2->draw(). '&nbsp;&nbsp;');
				
			}
			$lb1 = new ButtonInline("action", $lang->get("save", "Save"), "navelement", "submit", getWaitupScreen($formname));
			$container->add($lb1->draw());

			$actionField = new ActionField();
			$container->add($actionField->get());
			$container->add('&nbsp;&nbsp;&nbsp;</td></tr></table>');
			$this->add($container);
		}
Esempio n. 3
0
 /**
  * Draw the radios
  */
 function draw()
 {
     echo "<td>";
     echo tableStart();
     echo "<td colspan=\"2\">" . drawSpacer(2, 5) . "</td>";
     tr();
     $checked = "";
     if ($this->value == "") {
         $checked = "checked";
     }
     for ($i = 0; $i < count($this->nameValueArray); $i++) {
         if ($this->nameValueArray[$i][1] == $this->value) {
             $checked = "checked";
         }
         echo '<td valign="middle" class="standardlight" align="right">';
         echo "<input type=\"radio\" name=\"{$this->name}\" id=\"{$this->name}\" value=\"" . $this->nameValueArray[$i][1] . "\" {$checked} >&nbsp;";
         echo "</td>";
         echo '<td width="95%" valign="middle" class="standardlight">';
         echo $this->nameValueArray[$i][0];
         echo '</td>';
         tr();
         $checked = "";
     }
     echo "<td colspan=\"2\">" . drawSpacer(1, 5) . "</td>";
     echo tableEnd();
     echo "</td>";
 }
Esempio n. 4
0
		/**
		 * Write HTML for the WUI-Object.
		 */
		function draw() {
			$output = WUIObject::std_header();
			$output .= drawSpacer($this->width, $this->height);
			$output .= WUIObject::std_footer();
			echo $output;
			return $this->columns;
		}
Esempio n. 5
0
 /**
  * draw the submit button.
  */
 function draw_buttons()
 {
     echo "<tr><td class=\"informationheader\" colspan=\"2\" align=\"center\">";
     echo drawSpacer(5, 5) . "<br>";
     $submitbutton = new LinkButtonInline("goon", "Login", "navelement", "submit", "document.loginform.passwd.value=hex_md5(document.loginform.passwd.value);", "loginform");
     echo $submitbutton->draw();
     retain("goon");
     echo "<br>" . drawSpacer(5, 5);
     echo "</td></tr>";
 }
		/**
		 * internal. Draws the buttons of your form.
		 */
		function draw_buttons() {
			global $lang;

			echo "<tr><td class=\"informationheader\" colspan=\"2\">";
			echo drawSpacer(400, 1);
			$submitbutton = new LinkButtonInline("ok", $lang->get("ok", "Ok"), "navelement", "button", "document.location.href='" . $this->forward . "';");
			echo $submitbutton->draw();
			echo '<input type="hidden" name="ok" value="">';
			echo "</td></tr>";
		}
Esempio n. 7
0
 /**
  * Draw the radios
  */
 function draw()
 {
     td($this->css);
     echo drawSpacer(2, 5);
     tde();
     tr();
     td($this->css);
     echo $this->label;
     tde();
 }
Esempio n. 8
0
		/**
		* Adds a link to the menu. The link ist static here. NO parameters
		* will be automatically added! Use this Function, to create Links with
		* new Filtermenues.
		*
		* @param string text, that will appear as link
		* @param string page, that will be called when link is active
		* @param string page, that will cause highlight on this menu also.
		*/
		function addMenuEntry($label, $href, $highlightmenu="xplqkjnxe", $function="") {
			global $sid, $auth;

            if (($function == "") || ( $auth->checkAccessToFunction($function))) {
                $this->menuentries[$this->counter][0] = "<nobr>".drawSpacer(10,1).clrSPC($label)."</nobr>";
                if (!stristr($href, "?"))
		  		    $href .= "?sid=$sid";

  			    $this->menuentries[$this->counter][1] = $href;
  			    $this->menuentries[$this->counter][2] = 0;
			    $this->menuentries[$this->counter][3] = $highlightmenu;
			    $this->counter++;
            }
		}
Esempio n. 9
0
		/**
		  * Draws the layout-element
		  */
		function draw() {
			global $c;
			$output = WUIObject::std_header();
			$date = substr($this->value, 0, 10);
			$showDate = str_replace("-", "/", $date);
			$output.="<span style=\"width:90px;\" id=\"".$this->name."div\">".$showDate."</span>";
			$output.="<input type=\"hidden\" id=\"".$this->name."\" name=\"".$this->name."\" value=\"".$date."\"/>";
			$output.='<a href="#" onclick="document.getElementById(\''.$this->name.'\').value=\'\';document.getElementById(\''.$this->name.'div\').innerHTML=\'--------\';return false;">'.drawImage('delete.gif', 12, 12).'</a>';
			$output.='&nbsp;&nbsp;';
			$output.="<image src=\"".$c["docroot"]."ext/jscalendar/img.gif\" id=\"".$this->name."trigger\" style=\"cursor:hand;\">";
			$output.='<script type="text/javascript">';
			$output.='Calendar.setup({displayArea: "'.$this->name.'div",inputField : "'.$this->name.'", button : "'.$this->name.'trigger"});';
			$output.='</script>';			
			$output.=drawSpacer(10,1);
			$output .= WUIObject::std_footer();
			echo $output;
			return $this->columns;
		}
Esempio n. 10
0
 /**
  * Draw the radios
  */
 function draw()
 {
     echo "<td>";
     echo tableStart();
     td($this->css);
     echo drawSpacer(2, 5);
     tde();
     tr();
     td($this->css);
     echo $this->label;
     tde();
     tr();
     if ($this->type == "TEXTAREA") {
         $tb = new Textarea($this->name, $this->value, $this->css, 4, "width:250", 260);
     } else {
         $tb = new Input($this->name, $this->value, $this->css, 256, "width:250", 260);
     }
     $tb->draw();
     echo tableEnd();
     echo "</td>";
 }
Esempio n. 11
0
 /**
  * Draw the widget
  */
 function draw()
 {
     $css = "standardlight";
     if ($this->error) {
         $css = 'error';
     }
     echo "<td class=\"{$css}\">";
     echo tableStart();
     echo "<td colspan=\"2\">" . drawSpacer(2, 5) . "</td>";
     tr();
     if ($this->value == "") {
         $checked = "checked";
     }
     echo '<td class="' . $css . '">' . $this->label . $this->errortext;
     echo "</td>";
     tr();
     $sb = new Dropdown($this->name, $this->nameValueArray, "{$css}", $this->value, "200");
     $sb->draw();
     tr();
     echo "<td colspan=\"2\">" . drawSpacer(1, 5) . "</td>";
     echo tableEnd();
     echo "</td>";
 }
Esempio n. 12
0
 /**
  * Create the HTML for the step
  */
 function _draw()
 {
     global $lang;
     echo tableStart();
     echo '<td colspan="">' . drawSpacer(5, 5) . '</td>';
     tr();
     echo '<td colspan="3" class="informationheader">' . $this->parent->titleText . '</td>';
     tr();
     echo '<td colspan="3">' . drawSpacer(12, 12) . '</td>';
     tr();
     echo '<td colspan="3" class="headbox">';
     echo '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr>';
     echo '<td width="70%"><b>' . drawSpacer(10, 10) . $this->title . '</b></td>';
     echo '<td width="30%" align="right"><b>' . $lang->get("step", "Step") . " " . $this->parent->displayStep . " " . $lang->get('of') . " " . count($this->parent->container) . drawSpacer(10, 10) . '</b></td>';
     echo '</tr></table></td>';
     tr();
     echo '<td colspan="3">' . drawSpacer(10, 10) . '</td>';
     tr();
     echo '<td width="45%" valign="top" class="informationheader">' . $this->explanation . '</td>';
     echo '<td width="20">' . drawSpacer(20, 250) . '</td>';
     echo '<td width="50%" valign="top" class="standardlight">';
     echo tableStart();
     for ($i = 0; $i < count($this->container); $i++) {
         $this->container[$i]->draw();
         tr();
     }
     echo "<td>" . drawSpacer(5) . "</td>";
     tr();
     echo '<td>' . $this->addDrawString . '</td>';
     echo tableEnd();
     echo '</td>';
     tr();
     echo '<td colspan="3">' . drawSpacer(10) . drawLine(590) . '</td>';
     tr();
     echo tableEnd();
 }
Esempio n. 13
0
		/**
		 * Draws the submenu. Do not call directly. Use the
		 * class draw() method.
		 */
		function draw_submenu() {
			global $sid, $auth;

			$sm = $this->selectedMenu;
			$submenues = count($this->submenucontainer[$sm]);
			//create container for menu-entires
			echo '<table border="0" cellpadding="2" cellspacing="0" width="100%">';

			for ($i = 1; $i <= $submenues; $i++) {
				if ($auth->checkPermission($this->submenucontainer[$sm][$i][2], $this->submenucontainer[$sm][$i][3])) {
					// draw icon
					echo '<tr><td valign="middle" align="center">';

					echo '<a href="' . $this->submenucontainer[$sm][$i][1] . '?sid=' . $sid . '" target="contentset" class="cmsmenu_submenu">';
					echo '<img src="' . $c["docroot"] . "img/icons/" . $this->submenucontainer[$sm][$i][4] . '" border="0">';
					echo '</a>';
					echo '</td></tr>';
					//draw text
					echo '<tr><td valign="middle" align="center">';
					echo '<a href="' . $this->submenucontainer[$sm][$i][1] . '?sid=' . $sid . '" target="contentset" class="cmsmenu_submenu">' . $this->submenucontainer[$sm][$i][0] . '</a>';
					echo '</td></tr>';
					//spacer
					echo '<tr><td valign="middle" align="center">';
					echo drawSpacer(10, 10);
					echo '</td></tr>';
				}
			}

			echo '</table>';
		}
Esempio n. 14
0
 /**
  * Add vertical space (40px)
  */
 function addSpacer()
 {
     $this->container .= '<tr><td colspan="2">' . drawSpacer(40, 40) . '</td></tr>';
 }
Esempio n. 15
0
		/**
			* add ClusterTemplates as folders in order to cary the corresponding cluster instances later on			
			* @param integer ID of the parent of the tree
			* @param integer level of menu
			*/
		function addStaticCLTFolders($parentID, $ident) {
			global $db, $sid, $c, $lang, $aclf;
			if ($c["clustertemplatebrowser"] && $aclf->checkAccessToFunction("NEW_CL_TEMP")) {
				echo '<nobr>'.drawSpacer($ident*10, 1).'<a href="'.$this->action.'?pnode='.$parentID.'&sid='.$sid.'&action=newobject&go=insert" class="wcopy">'.drawTreeImage("clt_add2.gif").'&nbsp;'.$lang->get("new").'</a></nobr><br/>';				    
			}	
			
			$sql = "SELECT NAME, CLT_ID FROM cluster_templates WHERE CATEGORY_ID = $parentID AND DELETED = 0 AND VERSION = 0 ORDER BY NAME";
			$query = new query($db, $sql);
			if ($c["clustertemplatebrowser"]) {
				$action = "&action=editobject";	
			} else {
				$action ="";
			}
			
			while ($query->getrow()) {				
				$name = $query->field("NAME");
				$clt = $query->field("CLT_ID");
				
				if ($c["clustertemplatebrowser"]) {
					$href = $this->action . "?sid=$sid&pnode=$parentID&oid=$clt&action=editobject";	
				} else {
					$href = $this->action . "?sid=$sid&pnode=$parentID&clt=$clt";
				}
				
				echo '<nobr>'.drawSpacer($ident*10, 1).'<a href="'.$href.'" class="wcopy">'.drawTreeImage("clt2.gif").'&nbsp;'.$name.'</a></nobr><br/>';				    			

			}
		}
Esempio n. 16
0
		/** 
		 * Draw the control body
		 */
		function draw_body($parent = "0", $depth = 0) {
			$data = $this->getFunctionData($parent);

			for ($i = 0; $i < count($data); $i++) {
				echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">";

				echo "<tr>";
				echo "<td width=\"25\">" . drawSpacer(1, 1). "</td>";
				echo "<td width=\"" . (250 - $depth * 25) . "\">" . drawSpacer(1, 1). "</td>";
				echo "<td width=\"300\">" . drawSpacer(1, 1). "</td>";
				echo "</tr>";

				if ($depth == 0) {
					echo "<tr>";

					echo "<td width=\"25\" style=\"border-bottom:1px solid black;\">" . drawSpacer(1, 1). "</td>";
					echo "<td width=\"250\" style=\"border-bottom:1px solid black;\">" . drawSpacer(1, 1). "</td>";
					echo "<td width=\"300\" style=\"border-bottom:1px solid black;\">" . drawSpacer(1, 1). "</td>";
					echo "</tr>";
				}

				echo "<tr>";

				if (in_array($data[$i][ID], $this->configData)) {
					$checked = true;
				} else {
					$checked = false;
				}

				$chkbox = new Checkbox($data[$i][ID], "1", "embedded", $checked);
				$chkbox->draw();
				$lbl = new Label("lbl", $data[$i][NAME], "bcopy");
				$lbl->draw();
				$lbl = new Label("lbl", $data[$i][DESC], "bcopy");
				$lbl->draw();
				echo "</tr>";

				echo "<tr>";
				echo "<td width=\"15\">" . drawSpacer(1, 1). "</td>";
				echo "<td colspan=\"2\">" . drawSpacer(1, 1);
				$this->draw_body($data[$i][ID], ($depth + 1));
				echo "</td>";
				echo "</tr>";
				echo "</table>";
			}
		}
		/**
		* internal. Draws the buttons of your form.
		*/
		function draw_mybuttons() {
			global $lang;

			if ($this->drawPage == "editing") {
				echo "<tr><td class=\"informationheader\" colspan=\"2\">";
				tableStart("100%", "informationheader");
				echo "<tr>";
				echo '<td align="right">';
				br();
				retain ("goon");
				$resetbutton = new  ButtonInline("reset", $lang->get("reset_form", "Reset Form"), "navelement", "reset", "", $this->name);
				echo $resetbutton->draw();			
				echo drawSpacer(50,1);
				$value = "Update";
				$backbutton = new ButtonInline("back", $lang->get("back"), "navelement", "submit", "",$this->name );
				echo $backbutton->draw();				
				retain("back", "");
				echo '&nbsp;&nbsp;';
				$submitbutton = new ButtonInline("goon", $value, "navelement", "submit", $this->submitButtonAction, $this->name);
				echo $submitbutton->draw();				
				br();
				br();
				tde();
				echo ('</tr>');
				tableEnd();
				echo "</td></tr>";
			}
		}
	/**
	 * Draw the input boxes needed for editing the contents in the envelope.
	 * @param integer id of cluster_content.CLCID
	 */
	function getSingleEdit($id) {
		global $specialID, $lang, $c, $sid, $aclf, $db, $lang;
        global $forceLoadFromDB, $auth;

       $clt = getDBCell("cluster_template_items", "FKID", "CLTI_ID = ".$this->clti);

       if ($this->saction == "createCluster" && $id == value("id")) {
                $name = parseSQL(value("cluster_node_NAME".$id));
                if ($name=="0") $name = "Cluster";
                $name = makeCopyName("cluster_node", "NAME", $name, "1", "", false);
                $clnid = createClusterNode($name, $clt);
                $variations = createDBCArray("variations", "VARIATION_ID");
                for ($varX=0; $varX < count($variations); $varX++) {
                        $clid = createCluster($clnid, $variations[$varX], $auth->userName);
                }

                $sql = "UPDATE cluster_content SET FKID = $clnid WHERE CLCID = $id";
                $query = new query($db, $sql);
                $query->free();
                $forceLoadFromDB = "yes";
        }

        if ($this->editState && $this->editor) {
            $chclbox = new Container(4);
				$compoundEnvelope = new Container(3);
				$compoundContainer = new Container(3);

                $specialID = $id;
                $cpselector = new CPCLSelector($lang->get("select_cl"), "cluster_content", "FKID", "CLCID=$id", getModuleFromCLC($id), "", "");
                $cpselector->additionalAttribute = "onchange=\" if ( !confirm('".$lang->get("confirm_unsaved_changes_linkedcluster", "Note: When changing the linked cluster, any changes you apply on the currently linked cluster will be lost. If you want to save these canges, save your work first and change the linked cluster then. Proceed ?")."') ) { for(i=0; i<document.form1.cluster_content_FKID$specialID.length; i++)  if(document.form1.cluster_content_FKID$specialID.options[i].defaultSelected == true) document.form1.cluster_content_FKID$specialID.options[i].selected=true; }\"";
                $variation = variation();
                // force save in dbo.
                //$clnid = getDBCell("cluster_content", "FKID", "CLCID = ".$id);
                if (!isset($clnid)) {
                    $clnid = $cpselector->value;
                } else {
                    $cpselector->value = $clnid;
                }
                $clid = getClusterFromNode($clnid, $variation);
                $chclbox->add( $cpselector );
                $forceLoadFromDB = "no";


                if ($clnid != "" && $clnid != "0") {
				    $clid = getClusterFromNode($clnid, $variation);
                    $name = getDBCell("cluster_node", "NAME", "CLNID = $clnid");
                }
                
				$infoboxid = $id;
				$chclboxid = $id;

				$table = '<table width="100% border="0" cellpadding="0" cellspacing="0"><tr><td>';
				$table.= $lang->get("cllink", "This box is linked to ")."&nbsp; <b>".$name."</b>";
				$table.= '</td><td align="right">';
				// Add-Button
				$ShowInfoButton = new LinkButtonInline("toggle_info_".$infoboxid, "show info", "box", "button", "toggle('showinfo_".$infoboxid."')");
				$CHCLButton = new LinkButtonInline("toggle_chcl_".$chclboxid, "change cluster", "box", "button", "toggle('chcl_".$chclboxid."')");
				$table.= $ShowInfoButton->draw()."&nbsp;".$CHCLButton->draw();
				$table.= '</td></tr></table>';
				
				$this->add(new Label("lbl", $table, "headbox", 2));

				if (getDBCell("cluster_content", "FKID", "CLCID = ".$id) != $clnid)
					$forceLoadFromDB = "yes";
	

			    $chclbox->add(new Cell("spacer", "standardlight", 1));
			    $chclbox->add(new Label("lbl", "or create a new instance called", "standardlight"));
			    $chclbox->add(new Input("cluster_node_NAME$id", "", "standardlight", 32));
			    $chclbox->add(new SingleHidden("clt", ""));
			    $chclbox->add(new SingleHidden("id", ""));
			    $chclbox->add(new LinkButtonInCell("neueInstanz", "Create Instance", "standardlight navelement", "button", "javascript:if (confirm('".$lang->get("confirm_unsaved_changes")."')) { document.form1.saction.value='createCluster';document.form1.id.value='$id';document.form1.clt.value='$clt';document.form1.submit(); };", "form1", 1));

			    $sql = "SELECT * FROM variations WHERE 1";
			    $variations = new query($db, $sql);
			    while ($variations->getrow()) {
				    $chclbox->add(new Hidden("cluster_variations_VARIATION_ID_".$variations->field("VARIATION_ID"), "1"));
			    }

			    $specialID = "";
                $compoundContainer->add(new IDWrapper("chcl_".$chclboxid, $chclbox, "embedded", ' style="display:'.(($clid == 0) ? "" : "none" ).';" ', 3));

                if ($clid != "0" && $clid != "") {
        			// GET CONTENT OF THE CLUSTER
    				// set variables that will contain the content later to null.
    				$clusters = null;
    				$plugins = null;
    				$types = null;

    				// get the structure of the content.
    				$sql = "SELECT CLTI_ID, CLTITYPE_ID FROM cluster_template_items WHERE CLT_ID = $clt AND FKID!=0 ORDER BY POSITION";

    				$query = new query($db, $sql);

    				while ($query->getrow()) {
    					$cltitype = $query->field("CLTITYPE_ID");

    					$ni = count($plugins);
    					$plugins[$ni] = $query->field("CLTI_ID");
    					$types[$ni] = $cltitype;
    				}

    				$query->free();

    				// we don't want to draw an additional back link in clusters-editor
    				// if (! $sitepage && ! $isArticle) {
    				//	$compoundContainer->add(new LinkLabel("link1", $lang->get("back_to_cv", "Back to cluster overview"), "modules/cluster/clusterbrowser.php?sid=$sid&clt=$clt", "_self", "informationheader", 2));
    				// }

    				$infobox = new Container(3);

    				// draw some cluster-information.
    				$infobox->add(new Subtitle("", $lang->get("cluster_information", "Information about this record"), 3));
    				$infobox->add(new ClusterInformation($clid));

    				$compoundContainer->add(new IDWrapper("showinfo_".$infoboxid, $infobox, "embedded", ' style="display:none;" ', 3));
    				// draw plugin preview.

    				$len = count($plugins);
    				if ($clid) {
    					for ($i = 0; $i < $len; $i++) {

                            if ($types[$i] == 2)
    							$compoundContainer->add(new ContentEnvelope($plugins[$i], $clid, true));

    						if ($types[$i] == 4)
    							$compoundContainer->add(new ClusterEnvelope($plugins[$i], $clid, true));

    						if ($types[$i] == 5)
    							$compoundContainer->add(new LibraryEnvelope($plugins[$i], $clid, true));

    						if ($types[$i] == 6)
    							$compoundContainer->add(new CompoundClusterEnvelope($plugins[$i], $clid, true));

    				        if ($types[$i] == 8)
    				          $compoundContainer->add(new ChannelEnvelope($plugins[$i], $clid, true));
    					}
    					if ($isArticle || $action == $lang->get("edit_all") || ($action == $lang->get("save")) || $action == $lang->get("save_back")) {
    				       	$compoundContainer->add(new NonDisplayedValue("cluster_variations", "LAST_CHANGED", "CLID = ".$clid, "(NOW()+0)", "NUMBER"));
    						$compoundContainer->add(new NonDisplayedValue("cluster_variations", "LAST_USER", "CLID = ".$clid, $auth->userName, "TEXT"));
    					}
    				}
                }
                $compoundEnvelope->add(new IDWrapper("compoundEnvelope_$id", $compoundContainer, "embedded sub", '', 3));
                $this->add(new IDWrapper("compoundCluster_$id", $compoundEnvelope, "boxed", '', 3));

		} else {
			$name = "&lt;" . $lang->get("not_selected", "No item selected yet."). "&gt;";
			$myfk = getDBCell("cluster_content", "FKID", "CLCID = " . $id);
			if ($myfk != 0 && $myfk != "") {
				$clt = getDBCell("cluster_node", "CLT_ID", "CLNID = " . $myfk);
				$cltname = getDBCell("cluster_templates", "NAME", "CLT_ID = ".$clt);
				$cat = getDBCell("cluster_templates", "CATEGORY_ID", "CLT_ID = " . $clt);
				$name = "<br><b>" . $lang->get("cli"). "</b> " .$cltname."/".getDBCell("cluster_node", "NAME", "CLNID = " . $myfk);
				$buttons = "<br><a href=\"" . $c["docroot"] . "modules/cluster/clusterbrowser.php?sid=$sid&action=editobject&go=update&oid=$myfk&pnode=$cat&clt=$clt\" class=\"box\">".$lang->get("goto_cl", "Goto Cluster")."</a>";
				if ($aclf->checkAccessToFunction("B_PREVIEW_PAGE")) $buttons .= drawSpacer(10, 1). "<a href=\"#\" onClick=\"window.open('" . $c["docroot"] . "modules/cluster/previewcpcl.php?sid=$sid&oid=$myfk', 'cppreview', 'width=400,height=400,location=no,menubar=no,toolbar=no');return false;\"  class=\"box\">".$lang->get("preview")."</a>";
			}
			$this->add(new Label("lbl", $name, "", 1));
			$this->add(new AlignedLabel('lbl', $buttons, 'right', '', 1));
		}

	}
		function draw() {
			global $lang, $c, $sid, $aclf;

			echo '<td colspan="' . $this->cells . '">';			
			echo '<table cellpadding="0" cellspacing="0" height="140" border="0" width="190">';
			echo '<tr>';
			echo '<td width="190" height="1">' . drawSpacer(190, 1). '</td>';			
			echo '</tr>';
			echo '<tr>';
			echo '<td class="headbox">';
			echo '<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td>';
			echo '<b>'.$this->name.'</b>&nbsp;&nbsp;&nbsp;('.$this->module_name.')';						
			echo '</td><td align="right"><b>';
			// draw Links depending on $linkset
			
			$ref = createPGNRef($this->module_id, $this->fkid);

			$preview = "";
			if ($ref != null) {
				if ($ref->management_table == "pgn_image") $ref_array = $ref->draw("ALL");			
			}
			
			// draw information on the content
			echo '</b>';			
			echo '</td></tr></table>';
			echo '</td></tr>';
			echo '<tr><td class="standardlight">';
			if (stristr($this->linkset, "LIB") || stristr($this->linkset, "EDIT")) {
				if ($aclf->checkAccessToFunction("EDIT_OBJECT") || $aclf->checkAccessToFunction("OBJECT_PROPS"))
					echo buttonLink($lang->get("edit"), $c["docroot"] . "modules/content/object_edit.php?go=update&sid=$sid&oid=" . $this->oid). "&nbsp;";
			}

			
			if (stristr($this->linkset, "LIB") || stristr($this->linkset, "LAUNCH")) {				
				if ($aclf->checkAccessToFunction("OBJECT_LAUNCH"))
					echo buttonLink($lang->get("launch", "Launch"), "?action=launch&sid=$sid&oid=" . $this->oid). "&nbsp;&nbsp;";
			}

			if (stristr($this->linkset, "LIB") || stristr($this->linkset, "DELETE")) {
				if ($aclf->checkAccessToFunction("DELETE_OBJECT"))
					echo buttonLink($lang->get("Delete"), "?action=delobject&sid=$sid&oid=" . $this->oid). "&nbsp;&nbsp;";
			}


			if (stristr($this->linkset, "SELECT")) {
				echo drawSpacer("10", "1");
				if ($aclf->checkAccessToFunction("EDIT_CL_CONTENT")) {
					global $sname;
					if ($sname != "0" && $sname!="") {	
						$jsAction="javascript:window.opener.document.getElementById('".$sname."').value='".$this->oid."';window.opener.document.getElementById('disp_".$sname."').innerHTML='".$lang->get("prev_avail", "You selected an object. A preview will be available after saving.")."';window.close();";						
					} else {
						$jsAction = "javascript:getImage('" . $ref_array["path"] . "');ok();";
					}
					echo buttonLink($lang->get("select", "Select"), "$jsAction"). "&nbsp;&nbsp;";
				}
			}			
			echo '</td></tr>';
			echo '<tr>';
			echo '<td valign="top" align="center" class="standardlight">';
			echo  $ref->preview();
			echo '</td></tr>';
			
			echo '<tr><td valign="top" class="standardlight">';		
			echo '<b>'.$lang->get("ackey", 'Access Key'). ":</b> ";
			echo "[".$this->accesskey."]";
			echo "</td>";
			echo "</tr>";			
			
			echo '<tr><td class="line">'.drawSpacer(1,1).'</td></tr>';			
			echo "</table>";
			br();
			echo "</td>";
			unset($ref);
			return 1;
		}
Esempio n. 20
0
 /**
  * Draw the Header
  */
 function getHeader()
 {
     global $cds;
     echo '<div id="main"><table width="100%" border="0" cellpadding="0" cellspacing="0">';
     echo '<tr><td rowspan="2" width="318" valign="middle" align="left" height="180" style="padding-left:20px; background-repeat:no-repeat;background-image:url(' . $this->docroot() . 'logoplaceholder.jpg)">';
     echo $cds->content->getByAccessKey("logo");
     echo '</td>';
     echo '<td height = "30" valign="middle" align="right">';
     // headerlinks
     $links = $cds->menu->getMenuByPath('/HeaderLinks');
     if (is_object($links)) {
         $links = $links->lowerLevel();
         if (is_array($links)) {
             for ($i = 0; $i < count($links); $i++) {
                 echo $links[$i]->getTag() . '&nbsp;&nbsp;';
             }
         }
     }
     echo '</td></tr>';
     echo '<tr><td valign="middle" align="center">';
     include $cds->path . 'inc/side2.php';
     echo '</td></tr>';
     echo '</table>';
     // draw mainmenu
     echo '<table width="990" border="0" cellpadding="0" cellspacing="0">';
     echo '<tr>';
     echo '<td width="200">' . drawSpacer(200, 1) . '</td>';
     // get the first menu level.
     $startMenu = $this->cds->menu->getMenuByPath("/");
     $firstLevelMenues = $startMenu->sameLevel();
     for ($i = 0; $i < count($firstLevelMenues); $i++) {
         echo '<td class="mainmenu" align="center">';
         $title = $firstLevelMenues[$i]->getTitle();
         $link = $firstLevelMenues[$i]->getLink();
         $isPopup = $firstLevelMenues[$i]->isPopup();
         echo '<a class="mainmenu" href="' . $link . '" ';
         if ($isPopup) {
             echo 'target="_blank"';
         }
         echo '><nobr>' . strtoupper($title) . '</nobr></a>';
         echo '</td>';
     }
     echo '<td width="40%" class="mainmenu">&nbsp;</td>';
     echo '</tr>';
     echo '</table>';
     echo '<br>';
     // submenu
     $this->pathToRoot = $this->cds->menu->getPathToRoot();
     $topMenu = array_pop($this->pathToRoot);
     if ($topMenu == null) {
         $topMenu = $startMenu;
     }
     echo '<table width="" cellpadding="0" cellspacing="0" border="0">';
     echo '<tr><td width="180" height="400" class="cellsubmenu" valign="top">';
     echo '<table width="180" border="0" cellpadding="0" cellspacing="1">';
     // submenu malen.
     echo $this->drawSubMenu($topMenu);
     echo '</table>';
     echo '</td><td width="30">&nbsp;&nbsp;</td><td valign="top" width="600">';
 }
Esempio n. 21
0
 /**
  * Draws the next and previous buttons.
  */
 function draw_buttons()
 {
     global $lang;
     if (!$this->finished) {
         echo "<tr><td align=\"right\" colspan=\"2\">";
         echo '<input type="hidden" name="step" value="' . $this->activeStep . '">';
         retain("pdo");
         echo drawSpacer(5, 5) . "<br>";
         if ($this->displayStep > 1 && !$this->container[$this->activeStep]->forbidBack) {
             $prevbutton = new ButtonInline("pdo", $lang->get("back", "Back"), "navelement", "submit", "", $this->name);
             echo $prevbutton->draw();
             echo "&nbsp;&nbsp;";
         }
         if ($this->displayStep < count($this->container)) {
             $nextbutton = new ButtonInline("pdo", $lang->get("next", "Next"), "navelement", "submit", "", $this->name);
             echo $nextbutton->draw();
         }
         echo "<br>" . drawSpacer(5, 5);
         echo "</td></tr>";
     }
 }
Esempio n. 22
0
		/**
		 * internal. draw filter results.
		 */
		function draw_list() {
			global $db, $sid, $go, $page_action, $lang, $c;

			$this->fillRecordSet();
			$rssize = $this->recordset->count();
			$pages = ceil($rssize / $this->listsize);

			// modified to filter_page sessions.
			if ($pages > 1) {
				for ($i = 0; $i < (($this->presentation_page - 1) * $this->listsize); $i++) {
					$this->recordset->getrow();
				}
			}


			echo '<div id="explore">';
			echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">';
			echo '<tr><td>' . drawSpacer(5, 5). '</td></tr>';
			echo "<tr><td>" . drawSpacer(14, 11). "<a href=\"" . $this->new_action . "?sid=$sid&go=create\" class=\"list\">";
			echo "<b>" . $this->newLabel. "</b></a></td></tr>";
			$counter = 0;

			while ($this->recordset->getrow()) {
				// tried working with urlencode. Did not work here!
				$curl = $this->link_action . "?sid=$sid&go=update&oid=" . $this->recordset->field($this->pk);

				echo "<tr><td class=\"embedded\">";
				echo "<a href=\"" . $curl . "\" class=\"searchresult\"><img src=\"" . $c["docroot"] . "img/icons/" . $this->icon . "\" border=\"0\">" . $this->recordset->field($this->filter_presentation). "</a>";
				echo "</td></tr>";

				$counter++;
			}

			echo '<tr><td><br/> <br/></td></tr>';
			echo '</table>';
			echo '</div>';
			

			if ($this->filter_rule != "") {			
				echo '<div class="headerinformation" style="width:165px;">';
				echo $lang->get("is_filtered", "Note: You may not display all records because you are using a filter!");
				echo "</div>";			
			}
			
		}
Esempio n. 23
0
		/**
		 * Draw an overview of dates by the given array created wether by dispatchCalenar or getEvents.
		 * @param mixed Event-data input.
		 * @param boolean Want to display time?
		 * @param boolean Want to display end-Date and time?
		 * @param string CSS-Style class for Event-Title
		 * @param string CSS-Style class for Event-Description
		 * @param string CSS-Style class for Links
		 */
		function drawEventData($events, $displayTime=true, $displayEndDate=false,$titleStyle="", $descriptionStyle="", $dateStyle="", $linkStyle="") {
			global $cds;
			if (count($events) > 0) {
				echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">'."\n";
				for ($i=0; $i < count($events); $i++) {				   	
					$data = $this->getEventData($events[$i]);
				   	$color = getDBCell("pgn_cal_categories", "COLOR", "CATID = ".$data["CATID"]);
					if ($color != "") {
			    		 	$color = "background-color:$color;";	
			   	    	}
			   				
			   		echo '<tr><td style="'.$color.'" valign="top">'."\n";
			   		$dispTime = "";			   		
			   		var_dump($data);
			   		$startTS = strtotime($data["STARTDATE"]);
					$endTS = strtotime($data["ENDDATE"]);
			   		$startT = strtotime($data["STARTTIME"]);
					$endT = strtotime($data["ENDTIME"]);
			   		
			   		$dispTime = date($this->dateFormat, $startTS);
			   		if ($displayTime && ($startT != $endT || $startTS != $endTS) && $startT!=0) {
			   			$dispTime.=" ".date($this->timeFormat, $startT);
			   		} 
			   		$dash = false;
			   		if ($displayEndDate && ($startTS != $endTS)) {
			   		  	$dispTime.= " - ".date($this->dateFormat, $endTS);
			   		  	$dash = true;
			   		}
			   		if ($displayEndDate && $displayTime  && ($startTS != $endTS || $startT != $endT)) {
			   			if (! $dash) $dispTime.=" - ";
			   			$dispTime.=" ".date($this->timeFormat, $endT);
			   		}
			   		echo '<span class="'.$dateStyle.'">'.$dispTime.': </span>'."\n";		   		
			   		echo '<span class="'.$titleStyle.'">'.$data["TITLE"].'</span>'."\n";
			   		br();
			   		if (is_array($data["IMAGE"])) {
			 			echo '<span style="float:left;">';
			 			echo $cds->layout->getImageTag($data["IMAGE"], false);	
			 			echo '</span>';
			   		}
			   		echo '<span class="'.$descriptionStyle.'">'.$data["DESCRIPTION"].'</span>'."\n";			   				
			   		br();
			   		if (is_array($data["LINK"])) {
			   			echo '<span>';
			   			echo $cds->layout->getLinkTag($data["LINK"], $linkStyle);
			   			echo '</span>';
			   		}
			   		echo '</td></tr>';
			   		echo '<tr><td colspan="2" style="background-color:#ffffff;">'.drawSpacer(2,2)."</td></tr>\n";
				}
				echo '</table>'."\n";
			}
		}
Esempio n. 24
0
		/**
		 * Draw the timeframe selection
		 */
		function draw_timeframemenu() {
			global $lang, $sid, $statsinfo;
			echo getFormHeadline($lang->get("tf", "Time Frame"));
			echo "<tr><td>";
			echo "<table width=\"100%\" cellpadding=\"3\" cellspacing=\"3\" class=\"sidebar_menubox\"><tr><td>";
			echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>";
			$selected = ($statsinfo->dateview=="predefined")? 'checked': '';
			echo '<tr><td class="bcopy" style="border-bottom:#e0e0e0 solid 1px;"><input type="radio" name="dateview" value="predefined" id="def1" onClick="document.getElementById(\'predef\').style.display=\'block\';document.getElementById(\'individual\').style.display=\'none\';" '.$selected.'>&nbsp;'.$lang->get('predef_time', 'Predefined timeframe').'</td></tr>';
			$visible = ($statsinfo->dateview=="predefined")? '': ' style="display:none" ';
			echo '<tr><td id="predef" '.$visible.'>';
			echo '<table width="100%" border="0" cellpadding="1" cellspacing="0" class="bcopy" style="background-color:#f8f8f8;">';			
			//$checked = ($statsinfo->preDefRange=="total")? 'checked': '';
			//echo '<tr><td>'.drawSpacer(20,1).'<input type="radio" name="itf" value="total" '.$checked.'>'.$lang->get('total', 'Total').'</td></tr>';
			$checked = ($statsinfo->preDefRange=="today")? 'checked': '';
			echo '<tr><td>'.drawSpacer(20,1).'<input type="radio" name="itf" value="today" '.$checked.'>'.$lang->get('today', 'Today').'</td></tr>';
			$checked = ($statsinfo->preDefRange=="yesterday")? 'checked': '';
			echo '<tr><td>'.drawSpacer(20,1).'<input type="radio" name="itf" value="yesterday" '.$checked.'>'.$lang->get('yesterday', 'Yesterday').'</td></tr>';
			$checked = ($statsinfo->preDefRange=="current_week")? 'checked': '';
			echo '<tr><td>'.drawSpacer(20,1).'<input type="radio" name="itf" value="current_week" '.$checked.'>'.$lang->get('thisweek', 'This Week').'</td></tr>';
			$checked = ($statsinfo->preDefRange=="previous_week")? 'checked': '';
			echo '<tr><td>'.drawSpacer(20,1).'<input type="radio" name="itf" value="previous_week" '.$checked.'>'.$lang->get('lastweek', 'Last Week').'</td></tr>';
			$checked = ($statsinfo->preDefRange=="current_month")? 'checked': '';
			echo '<tr><td>'.drawSpacer(20,1).'<input type="radio" name="itf" value="current_month" '.$checked.'>'.$lang->get('thismonth', 'This Month').'</td></tr>';
			$checked = ($statsinfo->preDefRange=="previous_month")? 'checked': '';
			echo '<tr><td>'.drawSpacer(20,1).'<input type="radio" name="itf" value="previous_month" '.$checked.'>'.$lang->get('lastmonth', 'Last Month').'</td></tr>';
			$checked = ($statsinfo->preDefRange=="current_year")? 'checked': '';
			echo '<tr><td>'.drawSpacer(20,1).'<input type="radio" name="itf" value="current_year" '.$checked.'>'.$lang->get('thisyear', 'This Year').'</td></tr>';
			$checked = ($statsinfo->preDefRange=="previous_year")? 'checked': '';
			echo '<tr><td style="border-bottom:#e0e0e0 solid 1px;">'.drawSpacer(20,1).'<input type="radio" name="itf" value="previous_year" '.$checked.'>'.$lang->get('lastyear', 'Last Year').'</td></tr>';
			echo '</table>';
			echo '</td></tr>';
			$selected = ($statsinfo->dateview=="individual")? 'checked': '';
			echo '<tr><td class="bcopy" style="border-bottom:#e0e0e0 solid 1px;"><input type="radio" name="dateview" value="individual" id="def2" onClick="document.getElementById(\'predef\').style.display=\'none\';document.getElementById(\'individual\').style.display=\'block\';" '.$selected.'>&nbsp;'.$lang->get('ind_time', 'Individual timeframe').'</td></tr>';
			$visible = ($statsinfo->dateview=="individual")? '': ' style="display:none" ';
			echo '<tr><td id="individual"'.$visible.'>';
			echo '<table width="100%" border="0" cellpadding="1" cellspacing="0" class="bcopy" style="background-color:#f0f0f0; border-bottom:#e0e0e0 1px solid;">';			
			$ds = new DateBox("startdate", $statsinfo->indStart, "bcopy", 1);
			echo '<tr><td>'.drawSpacer(20,1).'</td>';
			$ds->draw();
			echo '</tr>';
			$ds = new DateBox("enddate", $statsinfo->indEnd, "bcopy", 1);
			echo '<tr><td>'.drawSpacer(20,1).'</td>';
			$ds->draw();
			echo '</tr>';
			echo '</table>';
			echo '</td></tr>';
			echo '<tr><td align="center" style="padding:4px; margin:4px;"><br>';
			$lbi = new ButtonInline("changedate", $lang->get('change','Change'), 'navelement', 'submit', '', 'filter');
			echo $lbi->draw();
			echo '</td></tr>';
			echo "</table>";
			echo "</td></tr></table>";
			echo '<input type="hidden" name="changedate" value="0"><br>';
			echo "</td></tr>";			
		}
Esempio n. 25
0
		/**
		 * Writes the HTML-Code for any Top-Text you added with the addToTopText-function.
		 */
		function draw_toptext() {
			global $formErrors;

			if ($formErrors != "")
				$this->toptext = $formErrors;

			if ($this->toptext != "") {
				echo '<tr><td colspan="2">'.drawSpacer(10,10).'</td></tr>';
				echo '<tr><td colspan="2" align="center">';				
				echo getBoxedText($this->toptext, $this->topstyle);
				echo "</td></tr>";
				echo '<tr><td colspan="2">'.drawSpacer(10,10).'</td></tr>';				
			}
		}
 /**
  * Draw the radios
  */
 function draw()
 {
     global $lang;
     echo "<td>";
     echo tableStart();
     td($this->css);
     echo drawSpacer(2, 5);
     tde();
     tr();
     td($this->css);
     echo $lang->get("sel_file", "Select a file");
     echo $this->errortext;
     tde();
     tr();
     $ul = new Filebox($this->name, $this->css, "", 128, 280);
     $ul->draw();
     if ($this->value != "") {
         tr();
         td($this->css);
         echo drawSpacer(5, 1);
         tde();
         tr();
         td($this->css);
         echo $lang->get("file_already_uploaded", "You have already uploaded a file. You can go on by pressing Next.");
         tde();
     }
     echo tableEnd();
     echo "</td>";
 }
Esempio n. 27
0
} else {
    $clt = value("clt", "NUMERIC");
    $clnid = "-1";
}
td($style);
echo $lang->get("sel_clt");
tde();
tr();
$clts = array();
createCLTTree($clts);
$sb = new Dropdown("clt", $clts, $style, $clt, $width);
$sb->params = 'onChange="if (this.value != \'-1\') document.ifoform.submit();"';
$sb->draw();
tr();
td($style);
echo drawSpacer(5);
echo '<script language="JavaScript">';
echo '  parent.document.getElementById("' . $callback . '").value = "' . $clnid . '";';
echo '</script>';
tde();
if ($clt != "-1" && $clt != "0" && $clt != "") {
    $clusters = createNameValueArray("cluster_node", "NAME", "CLNID", "CLT_ID = {$clt} AND VERSION=0 AND DELETED=0");
    tr();
    td($style);
    echo $lang->get("sel_cluster", "Select Cluster") . " (" . (count($clusters) - 1) . ")";
    tde();
    tr();
    $sb2 = new Dropdown("clnid", $clusters, $style, $clnid, $width);
    $sb2->params = 'onChange="' . drawIfoSave($callback, "clnid") . '"';
    $sb2->draw();
}