function testFaqmod()
 {
     global $sess, $t, $bx;
     $db_config = new mock_db_configure(1);
     $d = $this->_generate_records(array('question', 'answer', 'faqid'), 1);
     $db_config->add_query('fubar', 0);
     $db_config->add_record($d[0], 0);
     $db = new DB_SourceAgency();
     $db->query('fubar');
     $db->next_record();
     $bx = $this->_create_default_box();
     $this->capture_call('faqmod', 2356 + strlen($sess->self_url()), array(&$db));
     $this->_checkFor_a_box('Modify a Frequently Asked Question');
     $this->_checkFor_a_form('PHP_SELF');
     $this->_checkFor_columns(2);
     $v = array('Question' => html_textarea('question', 40, 4, 'virtual', 255, $d[0]['question']), 'Answer' => html_textarea('answer', 40, 7, 'virtual', 255, $d[0]['answer']));
     while (list($key, $val) = each($v)) {
         $this->push_msg("Test {$key}");
         $this->_checkFor_column_titles(array($key), 'right', '30%', '', "<b>%s</b> (*): ");
         $this->_checkFor_column_values(array($val));
         $this->pop_msg();
     }
     $this->_testFor_html_form_hidden('modify', 2);
     $this->_testFor_html_form_hidden('faqid', $d[0]['faqid']);
     $this->_testFor_html_form_submit($t->translate('Modify'));
     $this->_check_db($db_config);
 }
Beispiel #2
0
    public function displayEditor($field_id, $content = '')
    {
        $lang = cmsConfig::get('language');
        $user = cmsUser::getInstance();
        cmsTemplate::getInstance()->addJS('wysiwyg/tinymce/tinymce.min.js');
        $dom_id = str_replace(array('[', ']'), array('_', ''), $field_id);
        echo html_textarea($field_id, $content, array('id' => $dom_id));
        ?>
<script type="text/javascript" >
$(document).ready(function(){
 	tinymce.init({mode : "exact", 
	              elements : "<?php 
        echo $field_id;
        ?>
",
				  language : "ru",
				 plugins: [
         "link image lists media responsivefilemanager "
   ],
    relative_urls: false,
   
    filemanager_title:"Responsive Filemanager",
    external_filemanager_path:"/filemanager/",
    external_plugins: { "filemanager" : "/filemanager/plugin.min.js"},
    
				  image_advtab: true,
   toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect",
   toolbar2: "| responsivefilemanager | image | media | link unlink anchor | "
	   			  
				  });
				  });
</script>
<?php 
    }
 function testSponsoring_form()
 {
     global $sponsoring_text, $budget, $valid_day, $valid_month, $valid_year, $begin_day, $begin_month, $begin_year, $finish_day, $finish_month, $finish_year, $sess, $bx, $t;
     $sponsoring_text = "this is the sponsoring text";
     $budget = "this is the budget";
     $valid_day = 3;
     $begin_day = 4;
     $finish_day = 5;
     $valid_month = 4;
     $begin_month = 5;
     $finish_month = 6;
     $valid_year = 2001;
     $begin_year = 2002;
     $finish_year = 2003;
     $proid = 'proid';
     $bx = $this->_create_default_box();
     $this->capture_call('sponsoring_form', 8389 + strlen($sess->self_url()), array(&$proid));
     $this->set_msg('test 1');
     $this->_checkFor_a_box('Sponsoring involvement');
     $this->_checkFor_a_form('PHP_SELF', array('proid' => $proid));
     $this->_checkFor_columns(2);
     $this->_checkFor_column_titles(array("Valid until", "Begin", "Finish", "Budget (in euro)", "Sponsoring Comment"));
     foreach (array(select_date('valid', $valid_day, $valid_month, $valid_year), select_date('begin', $begin_day, $begin_month, $begin_year), select_date('finish', $finish_day, $finish_month, $finish_year), html_input_text('budget', 12, 12, $budget), html_textarea('sponsoring_text', 40, 7, 'virtual', 255, $sponsoring_text), html_form_submit($t->translate('Preview'), 'preview') . html_form_submit($t->translate('Submit'), 'submit')) as $val) {
         $this->_testFor_box_column('left', '70%', '', $val);
     }
 }
    public function displayEditor($field_id, $content = '')
    {
        $lang = cmsConfig::get('language');
        $user = cmsUser::getInstance();
        cmsTemplate::getInstance()->addCSS('wysiwyg/ckeditor/samples/sample.css');
        cmsTemplate::getInstance()->addJS('wysiwyg/ckeditor/ckeditor.js');
        $dom_id = str_replace(array('[', ']'), array('_', ''), $field_id);
        echo html_textarea($field_id, $content, array('id' => $dom_id));
        ?>
<script type="text/javascript" >

            <?php 
        if ($user->is_admin) {
            ?>

            $(document).ready(function(){
                CKEDITOR.replace('<?php 
            echo $dom_id;
            ?>
',{
                });
            });

            <?php 
        }
        ?>
        </script>
    <?php 
    }
    public function displayEditor($field_id, $content = '')
    {
        $lang = cmsConfig::get('language');
        $user = cmsUser::getInstance();
        $template = cmsTemplate::getInstance();
        $template->addCSSFromContext('wysiwyg/redactor/css/redactor.css');
        $template->addJSFromContext('wysiwyg/redactor/js/redactor.js');
        $template->addJSFromContext('wysiwyg/redactor/js/video.js');
        $template->addJSFromContext('wysiwyg/redactor/js/fullscreen.js');
        $template->addJSFromContext('wysiwyg/redactor/js/fontsize.js');
        $template->addJSFromContext('wysiwyg/redactor/js/fontfamily.js');
        $template->addJSFromContext('wysiwyg/redactor/js/fontcolor.js');
        $template->addJSFromContext("wysiwyg/redactor/lang/{$lang}.js");
        $dom_id = str_replace(array('[', ']'), array('_', ''), $field_id);
        echo html_textarea($field_id, $content, array('id' => $dom_id));
        ?>

            <script type="text/javascript">
                $(document).ready(function(){
                    $('#<?php 
        echo $dom_id;
        ?>
').redactor({
                        lang: '<?php 
        echo $lang;
        ?>
',
                        plugins: ['video', 'fontfamily', 'fontsize', 'fontcolor', 'fullscreen'],
                        imageUpload: '<?php 
        echo href_to('redactor/upload');
        ?>
',
						minHeight: 250,
						<?php 
        if ($user->is_admin) {
            ?>
                            buttonSource: true
						<?php 
        }
        ?>
                    });
                });
            </script>

        <?php 
    }
 function testNews_modify_form()
 {
     global $text, $subject, $creation, $sess, $bx, $t;
     $text = "this is the text";
     $subject = "this is the subject";
     $creation = "asdasd";
     $proid = 'proid';
     $bx = $this->_create_default_box();
     capture_reset_and_start();
     news_modify_form($proid);
     $this->set_text(capture_stop_and_get());
     $this->_checkFor_a_box('Modifying News');
     $this->_checkFor_a_form('PHP_SELF', array('proid' => $proid));
     $this->_testFor_html_form_hidden('creation', $creation);
     $this->_checkFor_columns(2);
     $this->_checkFor_column_titles(array('Subject', 'Body'));
     $this->_checkFor_column_values(array(html_textarea('text', 40, 7, 'virtual', 255, $text), html_input_text('subject', 40, 128, $subject)));
     $this->_checkFor_submit_preview_buttons();
     $this->_testFor_string_length(2366 + strlen($sess->self_url()));
 }
Beispiel #7
0
 private function view_customer()
 {
     $id = $_GET['id'];
     if ($_POST) {
         $update = $this->customer->update_blocked_status_customer($id);
         if ($update) {
             redirect($this->base_link);
         } else {
             parent::alert('error', 'Gagal !', 'Gagal merubah status pelanggan !');
         }
     }
     $customer = $this->customer->get_customer('', $id);
     $detail = $this->customer->get_customer('detail', $id);
     if ($customer['blocked'] == 'N') {
         $status = $this->radio_config('blocked', 'checked', '');
     } else {
         $status = $this->radio_config('blocked', '', 'checked');
     }
     $customer_data = array(array('label' => '<img src="' . $this->img_dir . 'no_image.jpg" />', 'input' => ''), array('label' => 'Tgl registrasi', 'input' => html_input('text', array('value="' . $customer['reg_date'] . '"', 'class="span3"', 'disabled'))), array('label' => 'Nama lengkap', 'input' => html_input('text', array('value="' . $detail['fullname'] . '"', 'class="span3"', 'disabled'))), array('label' => 'Status', 'input' => $status), array('label' => 'Jenis kelamin', 'input' => html_input('text', array('value="' . $detail['sex'] . '"', 'class="span3"', 'disabled'))), array('label' => 'Alamat', 'input' => html_textarea(array('class="span6"', 'disabled'), $detail['address'])), array('label' => 'Provinsi', 'input' => html_input('text', array('value="' . $detail['state'] . '"', 'class="span3"', 'disabled'))), array('label' => 'Kota', 'input' => html_input('text', array('value="' . $detail['city'] . '"', 'class="span3"', 'disabled'))), array('label' => 'Kode pos', 'input' => html_input('text', array('value="' . $detail['postal_code'] . '"', 'class="span3"', 'disabled'))), array('label' => 'No.Telp', 'input' => html_input('text', array('value="' . $detail['phone_number'] . '"', 'class="span3"', 'disabled'))), array('label' => 'Email', 'input' => html_input('text', array('value="' . $detail['email'] . '"', 'class="span3"', 'disabled'))));
     $button = array(html_input('submit', array('value="Simpan"', 'class="btn btn-success"')), html_input('button', array('value="Kirim Pesan"', 'onClick="window.location.go(-1)"', 'class="btn btn-success"')));
     parent::form_config('', '', $customer_data, 'Data pelanggan', $button);
 }
 function testDoco_mod()
 {
     global $sess, $t, $bx;
     $d = $this->_generate_records(array('page', 'header', 'doco', 'docoid'), 1);
     $db_config = new mock_db_configure(1);
     $db_config->add_query('fubar', 0);
     $db_config->add_record($d[0], 0);
     $db = new DB_SourceAgency();
     $db->query('fubar');
     $db->next_record();
     $bx = $this->_create_default_box();
     $this->capture_call('doco_mod', 2811 + strlen($sess->self_url()), array(&$db));
     $v = array('Page (without extension)' => html_input_text('page', 40, 64, $d[0]['page']), 'Header' => html_input_text('header', 40, 64, $d[0]['header']), 'doco' => html_textarea('doco', 40, 7, 'virtual', 255, $d[0]['doco']));
     while (list($key, $val) = each($v)) {
         $this->push_msg("Test {$key}");
         $this->_checkFor_column_titles(array($key));
         $this->_checkFor_column_values(array($val));
         $this->pop_msg();
     }
     $this->_testFor_html_form_hidden('docoid', $d[0]['docoid']);
     $this->_testFor_html_form_hidden('modify', 2);
     $this->_testFor_html_form_submit($t->translate('Modify'));
     $this->_check_db($db_config);
 }
Beispiel #9
0
	<?php 
html_separator();
?>
	<?php 
html_titleline(gettext("Advanced settings"));
?>
	<?php 
html_checkbox("alertemail", gettext("Alert email"), isset($pconfig['alertemail']) ? true : false, gettext("Send email if error"));
?>
				
	<?php 
html_inputbox("alertemailto", gettext("Email to"), $pconfig['alertemailto'], gettext("Where email alert will be send."), true, 40);
?>
					
	<?php 
html_textarea("auxparam", gettext("Auxiliary parameters"), $pconfig['auxparam'], sprintf(gettext("These parameters are added to %s."), "hast.conf") . " " . sprintf(gettext("Please check the <a href='%s' target='_blank'>documentation</a>."), "http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-hast.html"), false, 65, 5, false, false);
?>
	</table>
	<div id="submit">
	  <input name="Submit" type="submit" class="formbtn" value="<?php 
echo gettext("Save and Restart");
?>
" />
	</div>
	<div id="remarks">
	  <?php 
html_remark("note", gettext("Note"), sprintf("<div id='enumeration'><ul><li>%s</li><li>%s</li><li>%s</li></ul></div>", gettext("When HAST is enabled, the local devices, the local services and the additional packages which do not support HAST volume cannot be used."), gettext("The HAST volumes can not be accessed until HAST node becomes Primary."), gettext("Dynamic IP (DHCP) can not be used for HAST resources.")));
?>
	</div>
	<?php 
include "formend.inc";
Beispiel #10
0
<?php

if ($field->title) {
    ?>
<label for="<?php 
    echo $field->id;
    ?>
"><?php 
    echo $field->title;
    ?>
</label><?php 
}
echo html_textarea($field->element_name, $value, array('rows' => $field->getOption('size'), 'id' => $field->id, 'required' => array_search(array('required'), $field->getRules()) !== false));
if ($field->getOption('show_symbol_count')) {
    ?>
<script type="text/javascript">
$(function(){
    icms.forms.initSymbolCount('<?php 
    echo $field->id;
    ?>
', <?php 
    echo $field->getOption('max_length') ? (int) $field->getOption('max_length') : 0;
    ?>
, <?php 
    echo $field->getOption('min_length') ? (int) $field->getOption('min_length') : 0;
    ?>
);
});
</script>
<?php 
}
?>
 />
			        <?php 
echo gettext("Enable compression.");
?>
<br />
			        <span class="vexpl"><?php 
echo gettext("Compression is worth using if your connection is slow. The efficiency of the compression depends on the type of the file, and varies widely. Useful for internet transfer only.");
?>
</span></td>
			    </tr>
					<?php 
html_textarea("key", gettext("Private Key"), $pconfig['key'], gettext("Paste a DSA PRIVATE KEY in PEM format here."), false, 65, 7, false, false);
?>
			    <?php 
html_textarea("auxparam", gettext("Extra options"), $pconfig['auxparam'], gettext("Extra options to /etc/ssh/sshd_config (usually empty). Note, incorrect entered options prevent SSH service to be started.") . " " . sprintf(gettext("Please check the <a href='%s' target='_blank'>documentation</a>."), "http://www.freebsd.org/cgi/man.cgi?query=sshd_config&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+{$os_release}-RELEASE&amp;format=html"), false, 65, 5, false, false);
?>
			  </table>
				<div id="submit">
					<input name="Submit" type="submit" class="formbtn" value="<?php 
echo gettext("Save and Restart");
?>
" onclick="enable_change(true)" />
				</div>
			</td>
		</tr>
	</table>
	<?php 
include "formend.inc";
?>
</form>
			      <td width="22%" valign="top" class="vncell"><?php 
echo gettext("Volume Size Limit");
?>
</td>
			      <td width="78%" class="vtable">
			        <input name='volsizelimit' type='text' class='formfld' id='volsizelimit' size='10' value="<?php 
echo htmlspecialchars($pconfig['volsizelimit']);
?>
" /> <?php 
echo gettext("MiB");
?>
			      </td>
			    </tr>
				<tr>
					<?php 
html_textarea("auxparam", gettext("Auxiliary parameters"), $pconfig['auxparam'], sprintf(gettext("add any supplemental parameters")) . " " . sprintf(gettext("Please check the <a href='%s' target='_blank'>documentation</a>."), "http://netatalk.sourceforge.net/3.1/htmldocs/afp.conf.5.html"), false, 65, 5, false, false);
?>
                                        </tr>
			  </table>
				<div id="submit">
					<input name="Submit" type="submit" class="formbtn" value="<?php 
echo isset($uuid) && FALSE !== $cnid ? gettext("Save") : gettext("Add");
?>
" />
					<input name="Cancel" type="submit" class="formbtn" value="<?php 
echo gettext("Cancel");
?>
" />
					<input name="uuid" type="hidden" value="<?php 
echo $pconfig['uuid'];
?>
Beispiel #13
0
						</td>
					</tr>
				<?php 
html_combobox("type", gettext("Type"), $pconfig['type'], $type, '', true, false, 'toggle_type($(this).val())');
?>
				<?php 
html_inputbox("ldaphostname", gettext("URI"), $pconfig['ldaphostname'], gettext("The space-separated list of URIs for the LDAP server."), true, 60);
?>
				<?php 
html_inputbox("ldapbase", gettext("Base DN"), $pconfig['ldapbase'], sprintf(gettext("The default base distinguished name (DN) to use for searches, e.g. %s"), "dc=test,dc=org"), true, 40);
?>
				<?php 
html_textarea("ldapauxparam", gettext("Ldap auxiliary parameters"), $pconfig['ldapauxparam'], sprintf(gettext("These parameters are added to %s."), "ldap.conf"), false, 65, 5, false, false);
?>
				<?php 
html_textarea("sssdauxparam", gettext("Sss auxiliary parameters"), $pconfig['sssdauxparam'], sprintf(gettext("These parameters are added to %s."), "sssd.conf"), false, 65, 5, false, false);
?>
				<?php 
html_checkbox("sssclearcache", gettext("Clear sss cache"), !empty($pconfig['sssclearcache']) ? true : false, gettext("Clear sss cache on each restart"));
?>
				</table>
				<div id="submit">
					<input name="Submit" type="submit" class="formbtn" value="<?php 
echo gettext("Save");
?>
" onclick="enable_change(true)" />
				</div>
			</td>
		</tr>
	</table>
	<?php 
Beispiel #14
0
?>
" /></a>
									</td>
								</tr>
							</table>
							<span class="vexpl"><?php 
echo gettext("Define directories/URL's that require authentication.");
?>
</span>
						</td>
					</tr>
					<?php 
html_checkbox("dirlisting", gettext("Directory listing"), !empty($pconfig['dirlisting']) ? true : false, gettext("Enable directory listing."), gettext("A directory listing is generated if a directory is requested and no index-file (index.php, index.html, index.htm or default.htm) was found in that directory."), false);
?>
					<?php 
html_textarea("auxparam", gettext("Auxiliary parameters"), !empty($pconfig['auxparam']) ? $pconfig['auxparam'] : "", sprintf(gettext("These parameters will be added to %s."), "websrv.conf") . " " . sprintf(gettext("Please check the <a href='%s' target='_blank'>documentation</a>."), "http://redmine.lighttpd.net/projects/lighttpd/wiki"), false, 85, 7, false, false);
?>
			  </table>
				<div id="submit">
					<input name="Submit" type="submit" class="formbtn" value="<?php 
echo gettext("Save and Restart");
?>
" onclick="enable_change(true)" />
				</div>
				<?php 
include "formend.inc";
?>
			</form>
		</td>
	</tr>
</table>
Beispiel #15
0
?>

<h3>Company Details</h3>
<?php 
html_text("Company Name", "co_name", $_POST['co_name']);
if (!isset($_POST['custid'])) {
    $_POST['custid'] = $_GET['custid'];
}
customer_select("Or", "custid", $_POST['custid']);
if (!isset($_POST['suppid'])) {
    $_POST['suppid'] = $_GET['suppid'];
}
supplier_select("Or", "suppid", $_POST['suppid']);
html_text("Role", "role", $_POST['role']);
include "/srv/athenace/lib/shared/adds.add.form.php";
html_textarea("Notes", "notes", $_POST['notes'], "body");
?>

	</fieldset>

	<fieldset class="buttons">

		<?php 
html_button("Save changes");
?>

		or <a href="/contacts/" class="cancel" title="Cancel">Cancel</a>

	</fieldset>

</form>
Beispiel #16
0
html_inputbox("username", gettext("Username"), $pconfig['username'], "", true, 20);
?>
					<?php 
html_passwordbox("password", gettext("Password"), $pconfig['password'], "", true, 20);
?>
					<?php 
html_inputbox("updateperiod", gettext("Update period"), $pconfig['updateperiod'], gettext("How often the IP is checked. The period is in seconds (max. is 10 days)."), false, 20);
?>
					<?php 
html_inputbox("forcedupdateperiod", gettext("Forced update period"), $pconfig['forcedupdateperiod'], gettext("How often the IP is updated even if it is not changed. The period is in seconds (max. is 10 days)."), false, 20);
?>
					<?php 
html_checkbox("wildcard", gettext("Wildcard"), !empty($pconfig['wildcard']) ? true : false, gettext("Enable domain wildcarding."), "", false);
?>
					<?php 
html_textarea("auxparam", gettext("Auxiliary parameters"), !empty($pconfig['auxparam']) ? $pconfig['auxparam'] : "", sprintf(gettext("These parameters will be added to global settings in %s."), "inadyn.conf"), false, 65, 3, false, false);
?>
			  </table>
				<div id="submit">
					<input name="Submit" type="submit" class="formbtn" value="<?php 
echo gettext("Save and Restart");
?>
" onclick="enable_change(true)" />
				</div>
			</td>
		</tr>
	</table>
	<?php 
include "formend.inc";
?>
</form>
html_inputbox("read", gettext("Community"), $pconfig['read'], gettext("In most cases, 'public' is used here."), true, 40);
?>
					<?php 
html_checkbox("trapenable", gettext("Traps"), $pconfig['trapenable'] ? true : false, gettext("Enable traps."), "", false, "trapenable_change()");
?>
					<?php 
html_inputbox("traphost", gettext("Trap host"), $pconfig['traphost'], gettext("Enter trap host name."), true, 40);
?>
					<?php 
html_inputbox("trapport", gettext("Trap port"), $pconfig['trapport'], gettext("Enter the port to send the traps to (default 162)."), true, 5);
?>
					<?php 
html_inputbox("trap", gettext("Trap string"), $pconfig['trap'], gettext("Trap string."), true, 40);
?>
					<?php 
html_textarea("auxparam", gettext("Auxiliary parameters"), $pconfig['auxparam'], sprintf(gettext("These parameters will be added to %s."), "snmpd.config") . " " . sprintf(gettext("Please check the <a href='%s' target='_blank'>documentation</a>."), "http://www.freebsd.org/cgi/man.cgi?query=bsnmpd&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+{$os_release}-RELEASE&amp;format=html"), false, 65, 5, false, false);
?>
					<?php 
html_separator();
?>
					<?php 
html_titleline(gettext("Modules"));
?>
					<tr>
						<td width="22%" valign="top" class="vncell"><?php 
echo gettext("SNMP Modules");
?>
</td>
						<td width="78%" class="vtable">
							<input name="mibii" type="checkbox" id="mibii" value="yes" <?php 
if ($pconfig['mibii']) {
	      </ul>
	    </td>
	  </tr>
	  <tr>
	    <td class="tabcont">
				<?php 
if (!empty($input_errors)) {
    print_input_errors($input_errors);
}
?>
				<table width="100%" border="0" cellpadding="6" cellspacing="0">
				<?php 
html_inputbox("tag", gettext("Tag number"), $pconfig['tag'], gettext("Numeric identifier of the group."), true, 10, isset($uuid) && FALSE !== $cnid);
?>
				<?php 
html_textarea("portals", gettext("Portals"), $pconfig['portals'], gettext("The portal takes the form of 'address:port'. for example '192.168.1.1:3260' for IPv4, '[2001:db8:1:1::1]:3260' for IPv6. the port 3260 is standard iSCSI port number. For any IPs (wildcard address), use '0.0.0.0:3260' and/or '[::]:3260'. Do not mix wildcard and other IPs at same address family."), true, 65, 7, false, false);
?>
				<?php 
html_inputbox("comment", gettext("Comment"), $pconfig['comment'], gettext("You may enter a description here for your reference."), false, 40);
?>
				</table>
				<div id="submit">
					<input name="Submit" type="submit" class="formbtn" value="<?php 
echo isset($uuid) && FALSE !== $cnid ? gettext("Save") : gettext("Add");
?>
" />
					<input name="Cancel" type="submit" class="formbtn" value="<?php 
echo gettext("Cancel");
?>
" />
					<input name="uuid" type="hidden" value="<?php 
Beispiel #19
0
html_combobox("pam_password", gettext("Password encryption"), $pconfig['pam_password'], array("clear" => "clear", "crypt" => "crypt", "md5" => "md5", "nds" => "nds", "racf" => "racf", "ad" => "ad", "exop" => "exop"), gettext("The password encryption protocol to use."), true);
?>
					<?php 
html_inputbox("user_suffix", gettext("User suffix"), $pconfig['user_suffix'], sprintf(gettext("This parameter specifies the suffix that is used for users when these are added to the LDAP directory, e.g. %s"), "ou=Users"), true, 20);
?>
					<?php 
html_inputbox("group_suffix", gettext("Group suffix"), $pconfig['group_suffix'], sprintf(gettext("This parameter specifies the suffix that is used for groups when these are added to the LDAP directory, e.g. %s"), "ou=Groups"), true, 20);
?>
					<?php 
html_inputbox("password_suffix", gettext("Password suffix"), $pconfig['password_suffix'], sprintf(gettext("This parameter specifies the suffix that is used for passwords when these are added to the LDAP directory, e.g. %s"), "ou=Users"), true, 20);
?>
					<?php 
html_inputbox("machine_suffix", gettext("Machine suffix"), $pconfig['machine_suffix'], sprintf(gettext("This parameter specifies the suffix that is used for machines when these are added to the LDAP directory, e.g. %s"), "ou=Computers"), true, 20);
?>
					<?php 
html_textarea("auxparam", gettext("Auxiliary parameters"), $pconfig['auxparam'], sprintf(gettext("These parameters are added to %s."), "ldap.conf"), false, 65, 5, false, false);
?>
				</table>
				<div id="submit">
					<input name="Submit" type="submit" class="formbtn" value="<?php 
echo gettext("Save");
?>
" onclick="enable_change(true)" />
				</div>
			</td>
		</tr>
	</table>
	<?php 
include "formend.inc";
?>
</form>
echo gettext("Hosts deny");
?>
</td>
			      <td width="78%" class="vtable">
			        <input name="hostsdeny" type="text" class="formfld" id="hostsdeny" size="60" value="<?php 
echo htmlspecialchars($pconfig['hostsdeny']);
?>
" /><br />
			        <span class="vexpl"><?php 
echo gettext("This option is a comma, space, or tab delimited set of host which are NOT permitted to access this share. Where the lists conflict, the allow list takes precedence. In the event that it is necessary to deny all by default, use the keyword ALL (or the netmask 0.0.0.0/0) and then explicitly specify to the hosts allow parameter those hosts that should be permitted access. Leave this field empty to use default settings.");
?>
</span>
			      </td>
			    </tr>
			    <?php 
html_textarea("auxparam", gettext("Auxiliary parameters"), !empty($pconfig['auxparam']) ? $pconfig['auxparam'] : "", sprintf(gettext("These parameters are added to [Share] section of %s."), "smb.conf") . " " . sprintf(gettext("Please check the <a href='%s' target='_blank'>documentation</a>."), "http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html"), false, 65, 5, false, false);
?>
			  </table>
				<div id="submit">
					<input name="Submit" type="submit" class="formbtn" value="<?php 
echo isset($uuid) && FALSE !== $cnid ? gettext("Save") : gettext("Add");
?>
" />
					<input name="Cancel" type="submit" class="formbtn" value="<?php 
echo gettext("Cancel");
?>
" />
					<input name="uuid" type="hidden" value="<?php 
echo $pconfig['uuid'];
?>
" />
Beispiel #21
0
    public function displayEditor($field_id, $content = '')
    {
        $lang = cmsConfig::get('language');
        if ($lang == 'en') {
            $lang = 'en-US';
        }
        $template = cmsTemplate::getInstance();
        $user = cmsUser::getInstance();
        $template->addJSFromContext("wysiwyg/live/scripts/language/{$lang}/editor_lang.js");
        $template->addJSFromContext('wysiwyg/live/scripts/innovaeditor.js');
        $dom_id = str_replace(array('[', ']'), array('_', ''), $field_id);
        echo html_textarea($field_id, $content, array('id' => $dom_id));
        ?>

            <div id="innovaajax<?php 
        echo $dom_id;
        ?>
"></div>

            <script type="text/javascript">
                <?php 
        if ($user->is_admin) {
            ?>
                    groups = [
                        ["group1", "", ["Paragraph", "FontName", "FontSize", "Superscript", "ForeColor", "BackColor", "BRK", "Bold", "Italic", "Underline", "Strikethrough", "TextDialog", "RemoveFormat"]],
                        ["group2", "", ["JustifyLeft", "JustifyCenter", "JustifyRight", "Line", "BRK", "Bullets", "Numbering", "Indent", "Outdent"]],
                        ["group3", "", ["Table","TableDialog", "Emoticons", "BRK", "LinkDialog", "ImageDialog", "YoutubeDialog"]],
                        ["group4", "", ["SearchDialog", "SourceDialog", "CharsDialog", "BRK", "Undo", "Redo", "FullScreen"]]
                    ];
                <?php 
        } else {
            ?>
                    groups = [
                        ["group1", "", ["Paragraph", "FontName", "FontSize", "Superscript", "ForeColor", "BackColor", "BRK", "Bold", "Italic", "Underline", "Strikethrough", "TextDialog", "RemoveFormat"]],
                        ["group2", "", ["JustifyLeft", "JustifyCenter", "JustifyRight", "Line", "BRK", "Bullets", "Numbering", "Indent", "Outdent"]],
                        ["group3", "", ["Table","TableDialog", "Emoticons", "BRK", "LinkDialog", "ImageDialog", "YoutubeDialog"]],
                        ["group4", "", ["SearchDialog", "CharsDialog", "BRK", "Undo", "Redo", "FullScreen"]]
                    ];
                <?php 
        }
        ?>
                window["le_<?php 
        echo $dom_id;
        ?>
"] = new InnovaEditor("le_<?php 
        echo $dom_id;
        ?>
");
                window["le_<?php 
        echo $dom_id;
        ?>
"].width = '100%';
                window["le_<?php 
        echo $dom_id;
        ?>
"].height = 290;
                window["le_<?php 
        echo $dom_id;
        ?>
"].css = '<?php 
        echo cmsConfig::get('root') . 'wysiwyg/live/styles/simple.css';
        ?>
';
                window["le_<?php 
        echo $dom_id;
        ?>
"].enableTableAutoformat = true;
                window["le_<?php 
        echo $dom_id;
        ?>
"].fileBrowser = '/live_editor/upload';
                window["le_<?php 
        echo $dom_id;
        ?>
"].groups = groups;
                window["le_<?php 
        echo $dom_id;
        ?>
"].btnSave=false;
                window["le_<?php 
        echo $dom_id;
        ?>
"].REPLACE('<?php 
        echo $dom_id;
        ?>
', 'innovaajax<?php 
        echo $dom_id;
        ?>
');
            </script>
        <?php 
    }
" border="0" alt="<?php 
        echo gettext("Remove device");
        ?>
" /></a></td>
						</tr>
						<?php 
    }
    ?>
						<?php 
    html_separator();
    ?>
					<?php 
}
?>
					<?php 
html_textarea("storageauxparam", gettext("Auxiliary parameters"), $pconfig['storageauxparam'], sprintf(gettext("These parameters are added to %s."), "bacula_sd.conf"), false, 65, 5, false, false);
?>
					<tr>
						<td class="list" colspan="3"></td>
						<td class="list"><a href="#" id="add_device"><img src="plus.gif" title="<?php 
echo gettext("Add device");
?>
" border="0" alt="<?php 
echo gettext("Add device");
?>
" /></a></td>
					</tr>

				</table>
				<div id="submit">
					<input name="Submit" type="submit" class="formbtn" value="<?php 
}
?>
					<?php 
html_checkbox("disablebeep", gettext("System Beep"), $pconfig['disablebeep'] ? true : false, gettext("Disable speaker beep on startup and shutdown"));
?>
					<?php 
html_checkbox("tune_enable", gettext("Tuning"), $pconfig['tune_enable'] ? true : false, gettext("Enable tuning of some kernel variables"));
?>
					<?php 
html_checkbox("powerd", gettext("Power Daemon"), $pconfig['powerd'] ? true : false, gettext("Enable the system power control utility"), gettext("The powerd utility monitors the system state and sets various power control options accordingly."));
?>
					<?php 
html_checkbox("zeroconf", gettext("Zeroconf/Bonjour"), $pconfig['zeroconf'] ? true : false, gettext("Enable Zeroconf/Bonjour to advertise services of this device"));
?>
					<?php 
html_textarea("motd", gettext("MOTD"), $pconfig['motd'], gettext("Message of the day."), false, 65, 7, false, false);
?>
				</table>
				<div id="submit">
					<input name="Submit" type="submit" class="formbtn" value="<?php 
echo gettext("Save");
?>
" />
				</div>
				<?php 
include "formend.inc";
?>
			</form>
		</td>
	</tr>
</table>
Beispiel #24
0
            ?>
							</div>
							<div class="email field">
								<label><?php 
            echo LANG_COMMENTS_AUTHOR_EMAIL;
            ?>
:</label> <?php 
            echo html_input('text', 'author_email', $email);
            ?>
							</div>
						</div>
					<?php 
        }
        ?>
                    <?php 
        echo $user->is_logged ? html_editor('content') : html_textarea('content');
        ?>
                    <div class="buttons">
						<?php 
        echo html_button(LANG_PREVIEW, 'preview', 'icms.comments.preview()');
        ?>
                        <?php 
        echo html_button(LANG_SEND, 'submit', 'icms.comments.submit()');
        ?>
                    </div>
                    <div class="loading">
                        <?php 
        echo LANG_LOADING;
        ?>
                    </div>
                </form>
Beispiel #25
0
?>
								<tr>
									<td class="list" colspan="3"></td>
									<td class="list"><a href="system_hosts_edit.php"><img src="plus.gif" title="<?php 
echo gettext("Add Host");
?>
" border="0" alt="<?php 
echo gettext("Add Host");
?>
" /></a></td>
								</tr>
							</table>
						</td>
					</tr>
					<?php 
html_textarea("hostsacl", gettext("Host access control"), $pconfig['hostsacl'], gettext("The basic configuration usually takes the form of 'daemon : address : action'. Where daemon is the daemon name of the service started. The address can be a valid hostname, an IP address or an IPv6 address enclosed in brackets. The action field can be either allow or deny to grant or deny access appropriately. Keep in mind that configuration works off a first rule match semantic, meaning that the configuration file is scanned in ascending order for a matching rule. When a match is found the rule is applied and the search process will halt.") . " " . sprintf(gettext("To get detailed informations about TCP Wrappers check the FreeBSD <a href='%s' target='_blank'>documentation</a>."), "http://www.freebsd.org/doc/en/books/handbook/tcpwrappers.html"), false, 80, 8, false, false);
?>
				</table>
				<div id="submit">
					<input name="Submit" type="submit" class="formbtn" value="<?php 
echo gettext("Save and Restart");
?>
" />
				</div>
				<?php 
include "formend.inc";
?>
			</form>
		</td>
	</tr>
</table>
 function testComments_modify_form()
 {
     global $bx, $t, $sess;
     global $subject, $text, $number, $creation;
     $subject = 'this is the subkecct';
     $text = 'this isteh text';
     $number = 'this is the number ';
     $creation = 'this is the cration';
     $args = $this->_generate_records(array('proid'), 1);
     $bx = $this->_create_default_box();
     $this->capture_call('comments_modify_form', 2453 + strlen($sess->self_url()), $args[0]);
     $this->_checkFor_a_box('Modifying Comments');
     $this->_checkFor_a_form('PHP_SELF', array('proid' => $args[0]['proid']), 'POST');
     $this->_testFor_html_form_hidden('creation', $creation);
     $this->_testFor_html_form_hidden('number', $number);
     $this->_checkFor_columns(2);
     $this->_checkFor_column_titles(array('Subject'), 'right', '30%', '', '<b>%s</b> (128): ');
     $this->_checkFor_column_titles(array('Body'), 'right', '30%', '', '<b>%s</b> (*): ');
     $v = array(html_textarea('text', 40, 7, 'virtual', 255, stripslashes($text)), html_input_text('subject', 40, 128, stripslashes($subject)));
     $this->_checkFor_column_values($v);
     $this->_checkFor_submit_preview_buttons();
 }
Beispiel #27
0
	enctype="multipart/form-data" method="post">



	<fieldset>

	

			<?php 
html_text("First Name", "fname", $r->fname, 'required');
html_text("Surname", "sname", $r->sname);
html_text("Company Name", "co_name", $r->co_name);
customer_select("Customer", "custid", $r->custid);
supplier_select("Supplier", "suppid", $r->suppid);
html_text("Role", "role", $r->role);
html_textarea("Notes", "notes", $r->notes, "notes");
include "/srv/athenace/lib/shared/adds.edit.form.php";
?>

	</fieldset>

	<fieldset class="buttons">

		<?php 
html_button("Save changes");
?>

		or <a href="/contacts/" class="cancel" title="Cancel">Cancel</a>

	</fieldset>
Beispiel #28
0
 private function site_data($values = '')
 {
     return array(array('label' => 'Terakhir Di update', 'input' => html_input('text', array('value="' . $values[0] . '"', 'disabled')) . html_input('hidden', array('name="id"', 'value="' . $values[1] . '"'))), array('label' => 'Nama website', 'input' => html_input('text', array('name="site_name"', 'id="site_name"', 'value="' . $values[2] . '"', 'class="span3"'))), array('label' => 'Nama pemilik', 'input' => html_input('text', array('name="site_author"', 'value="' . $values[3] . '"', 'class="span3"'))), array('label' => 'Slogan', 'input' => html_input('text', array('name="site_slogan"', 'value="' . $values[4] . '"', 'class="span6"'))), array('label' => 'Teks footer', 'input' => html_input('text', array('name="site_footer"', 'value="' . $values[5] . '"', 'class="span6"'))), array('label' => 'Status', 'input' => $values[6]), array('label' => 'Pesan Offline', 'input' => html_textarea(array('name="offline_message"', 'class="span6"'), $values[7])), array('label' => 'Meta Description', 'input' => html_textarea(array('name="site_meta_desc"', 'class="span6"'), $values[8])), array('label' => 'Meta Keywords', 'input' => html_textarea(array('name="site_meta_key"', 'class="span6"'), $values[9])));
 }
    <td class="tabcont">
      <form action="services_hast_resource_edit.php" method="post" name="iform" id="iform">
        <?php 
if ($input_errors) {
    print_input_errors($input_errors);
}
?>
	<table width="100%" border="0" cellpadding="6" cellspacing="0">
	<?php 
html_titleline(gettext("HAST resource"));
?>
	<?php 
html_inputbox("name", gettext("Resource name"), $pconfig['name'], "", false, 30);
?>
	<?php 
html_textarea("auxparam", gettext("Auxiliary parameters"), $pconfig['auxparam'], sprintf(gettext("These parameters are added to %s."), "hast.conf") . " " . sprintf(gettext("Please check the <a href='%s' target='_blank'>documentation</a>."), "http://www.freebsd.org/cgi/man.cgi?query=hast.conf&sektion=5"), false, 65, 5, false, false);
?>
	<?php 
html_separator();
?>
	<?php 
html_titleline(gettext("Node A settings"));
?>
	<?php 
html_inputbox("aname", gettext("Node Name"), $pconfig['aname'], "", false, 40);
?>
	<?php 
html_inputbox("apath", gettext("Path"), $pconfig['apath'], sprintf(gettext("Path to the local device. (e.g. %s)"), "/dev/da1"), false, 40);
?>
	<?php 
html_inputbox("aremoteaddr", gettext("Node B IP address"), $pconfig['aremoteaddr'], gettext("Address of the remote hastd daemon. It must be a static IP address."), false, 40);
 function testContent_modify_form()
 {
     global $bx, $t, $sess, $skills, $platform, $architecture;
     global $environment, $docs, $specification, $creation;
     $proid = 'this isth proid';
     $skills = 'this is the shill';
     $platform = 'this is the platfomr';
     $architecture = 'this is the architecture';
     $environment = 'this is the envoronment';
     $docs = 'this is the doxcs';
     $specification = 'tis is he speictifion';
     $creation = 'tis is the creation';
     $bx = $this->_create_default_box();
     $this->capture_call('content_modify_form', 5178 + strlen($sess->self_url()), array($proid));
     $this->_checkFor_a_box('Modifying a technical content suggestion');
     $this->_checkFor_a_form('PHP_SELF', array('proid' => $proid), 'POST');
     $this->_testFor_html_form_hidden('creation', $creation);
     $this->_checkFor_columns(2);
     $this->_checkFor_submit_preview_buttons();
     $titles = array('Specification' => '<b>%s</b> (*): ', 'Skills' => '<b>%s</b> (64): ', 'Platform' => '<b>%s</b> (SELECT): ', 'Architecture' => '<b>%s</b> (SELECT): ', 'Environment' => '<b>%s</b> (SELECT): ', 'Docs' => '<b>%s</b> (255): ');
     while (list($title, $temp) = each($titles)) {
         $this->_checkFor_column_titles(array($title), 'right', '30%', '', $temp);
     }
     $v = array(html_textarea('specification', 40, 7, 'virtual', 255, $specification), html_input_text('skills', 40, 64, $skills), select_from_config('platform', 'platform_array', $platform), select_from_config('architecture', 'architecture_array', $architecture), select_from_config('environment', 'environment_array', $environment), html_input_text('docs', 40, 255, $docs));
     $this->_checkFor_column_values($v);
 }