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); } }
function testCooperation_form() { global $cost, $bx, $t, $sess; $args = $this->_generate_records(array('proid', 'devid'), 2); $cost = 'this is the cost'; $bx = $this->_create_default_box(); $this->capture_call('cooperation_form', 1827 + strlen($sess->self_url()), $args[0]); $this->_checkFor_a_box('Cooperation'); $this->_checkFor_columns(2); $this->_checkFor_a_form('PHP_SELF', array('proid' => $args[0]['proid'], 'devid' => $args[0]['devid'])); $this->_checkFor_column_titles(array('Cost in euro')); $this->_checkFor_column_values(array(html_input_text('cost', 7, 7, $cost))); $this->_checkFor_submit_preview_buttons(); }
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())); }
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); }
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); }
function testDeveloping_modify_form() { global $bx, $t, $sess, $db; global $cost, $license, $cooperation, $valid_day, $valid_month, $valid_year, $start_day, $start_month, $start_year, $duration, $creation, $queries; $cost = 'ths is the cost'; $license = 'thsi is the license'; $cooperation = 'this is the coopeartion'; $valid_day = 'this is the valid_day'; $valid_month = 'thsi si the valid month'; $valid_year = 'this is the valid year'; $start_day = 'this is the start day'; $start_month = 'this is the start month'; $start_year = 'this is the start year'; $duration = 'this is the duration'; $creation = 'tjhis si the creation'; $args = $this->_generate_array(array('proid', 'content_id'), 10); $fname = 'developing_modify_form'; $db_config = new mock_db_configure(2); $qs = array(0 => $queries[$fname]); $db_config->add_query($qs[0], 0); $db_config->add_query($qs[0], 1); $db_config->add_num_row(1, 0); $db_config->add_num_row(1, 1); $db_config->add_record(false, 0); $db_config->add_record(false, 1); $bx = $this->_create_default_box(); capture_reset_and_start(); call_user_func_array($fname, $args); $this->set_text(capture_stop_and_get()); $this->_testFor_string_length(4217 + strlen($sess->self_url())); $this->assertRegexp('/Undefined variable: start/', $GLOBALS['err_msg']); $this->_checkFor_a_form('PHP_SELF', array('proid' => $args['proid']), 'POST'); $this->_checkFor_a_box('Developement proposal modification'); $this->_checkFor_submit_preview_buttons(); $start = ''; $valid = ''; $tv = array(html_input_text('cost', 12, 12, $cost) => array('Cost', '<b>%s</b> (12): '), license($license) => array('License', '<b>%s</b> (12): '), html_input_text('cooperation', 12, 12, $cooperation) => array('Developer cooperation wanted?', '<b>%s</b> (SELECT BOX) '), html_input_text('valid', 14, 14, $valid) => array('Valid until (select box)', '<b>%s</b>: '), html_input_text('start', 14, 14, $start) => array('Start (Select box)', '<b>%s</b>: '), html_input_text('duration', 3, 3, $duration) => array('Duration (Select box)', '<b>%s</b>: ')); while (list($val, $key) = each($tv)) { $this->_checkFor_column_titles(array($key[0]), 'right', '30%', '', $key[1]); $this->_checkFor_column_values(array($val)); } $this->_check_db($db_config); }
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(); }
$bx->box_begin(); $bx->box_title($t->translate("Please enter your Project Data")); $bx->box_body_begin(); $bx->box_columns_begin(4); $bx->box_column("right", "5%", $th_strip_title_bgcolor, "<b>" . $t->translate("No") . "</b>"); $bx->box_column("center", "25%", $th_strip_title_bgcolor, "<b>" . $t->translate("Projectname") . "</b>"); $bx->box_column("center", "25%", $th_strip_title_bgcolor, "<b>" . $t->translate("ProjectURL") . "</b>"); $bx->box_column("center", "25%", $th_strip_title_bgcolor, "<b>" . $t->translate("Comment") . "</b>"); $bx->box_next_row_of_columns(); $bgcolor = "#FFFFFF"; while ($counter != $number_of_projects) { $counter++; $bx->box_column("right", "", $bgcolor, $counter); $bx->box_column("center", "", $bgcolor, html_input_text("projectname[{$counter}]", 25, 64, "")); $bx->box_column("center", "", $bgcolor, html_input_text("projecturl[{$counter}]", 35, 255, "")); $bx->box_column("center", "", $bgcolor, html_input_text("pcomment[{$counter}]", 42, 400, "")); $bx->box_next_row_of_columns(); } $bx->box_column("right", "", $bgcolor, html_form_submit($t->translate("Send"), "")); $bx->box_next_row_of_columns(); $bx->box_columns_end(); $bx->box_body_end(); $bx->box_end(); } ?> <!-- end content --> <?php require "./include/footer.inc"; @page_close();
htmlp_form_action("projects.php", array(), "POST"); htmlp_form_hidden("oldpname", $db->f("projectname")); htmlp_form_hidden("option", "delete"); $bgcolor = "gold"; $bx->box_column("center", "", $bgcolor, html_form_submit($t->translate("Delete"), "")); htmlp_form_end(); $bx->box_next_row_of_columns(); $bgcolor = "#FFFFFF"; } $bgcolor = "gold"; htmlp_form_action("projects.php", array(), "POST"); htmlp_form_hidden("option", "add"); $bx->box_column("right", "", $bgcolor, "--"); $bx->box_column("center", "", $bgcolor, html_input_text("projectname", 25, 64, "")); $bx->box_column("center", "", $bgcolor, html_input_text("projecturl", 35, 255, "")); $bx->box_column("center", "", $bgcolor, html_input_text("pcomment", 35, 400, "")); $bx->box_colspan(2, "center", $bgcolor, html_form_submit($t->translate("Add Project"), "")); $bx->box_columns_end(); htmlp_form_end(); } else { $be->box_begin(); $be->box_title($t->translate("Error")); $be->box_body_begin(); htmlp_link("addproj.php", "", $t->translate("Enter your projects here")); $be->box_body_end(); $be->box_end(); } } ?> <!-- end content -->
$db->query("SELECT * FROM auth_user WHERE username='******'uname'] . "'"); $db->next_record(); $bx->box_column('right', '50%', '', '<b>' . $t->translate('Username') . ':</b>'); $bx->box_column('left', '50%', '', html_input_text('username', 20, 32, $db->f('username'))); $bx->box_next_row_of_columns(); $bx->box_column('right', '50%', '', '<b>' . $t->translate('Password') . ':</b>'); $bx->box_column('left', '50%', '', html_input_password('password', 20, 32, $db->f('password'))); $bx->box_next_row_of_columns(); $bx->box_column('right', '50%', '', '<b>' . $t->translate('Confirm Password') . ':</b>'); $bx->box_column('left', '50%', '', html_input_password('cpassword', 20, 32, $db->f('password'))); $bx->box_next_row_of_columns(); $bx->box_column('right', '50%', '', '<b>' . $t->translate('Realname') . ':</b>'); $bx->box_column('left', '50%', '', html_input_text('realname', 20, 64, $db->f('realname'))); $bx->box_next_row_of_columns(); $bx->box_column('right', '50%', '', '<b>' . $t->translate('E-mail') . ':</b>'); $bx->box_column('left', '50%', '', html_input_text('email_usr', 20, 128, $db->f('email_usr'))); $bx->box_next_row_of_columns(); $bx->box_column('right', '50%', '', '<b>' . $t->translate('Creation') . ':</b>'); $bx->box_column('left', '50%', '', timestr(mktimestamp($db->f('creation_usr')))); $bx->box_next_row_of_columns(); $bx->box_column('right', '50%', '', '<b>' . $t->translate('Last Modification') . ':</b>'); $bx->box_column('left', '50%', '', timestr(mktimestamp($db->f('modification_usr')))); $bx->box_next_row_of_columns(); $bx->box_column('right', '50%', '', '<b>' . $t->translate('Permission') . ':</b>'); $bx->box_column('left', '50%', '', $db->f('perms')); $bx->box_next_row_of_columns(); $bx->box_colspan(2, 'center', '', html_form_submit($t->translate('Change'), 'u_edit')); $bx->box_columns_end(); htmlp_form_hidden('u_id', $db->f('user_id')); htmlp_form_end(); $bx->box_body_end();
$count++; $table = $row; $table = str_replace("##EDITFORMNAME##", "editform" . $count, $table); $table = str_replace("##NID##", $nres["id"], $table); $qpause_hour_time_dropdown = html_drop_down_arrays("pause_hour_time_drop", $qpause_hour_time, $qpause_hour_time, $pause_hour_time_drop); //date("H",time())); $qpause_min_time_dropdown = html_drop_down_arrays("pause_min_time_drop", $qpause_min_time, $qpause_min_time, $pause_min_time_drop); //date("H",time())); $table = str_replace("##PAUSEHOUR##", $qpause_hour_time_dropdown, $table); $table = str_replace("##PAUSEMINUTES##", $qpause_min_time_dropdown, $table); $qrating_dropdown = html_drop_down_arrays("rating_drop", $qrating, $qrating, "3"); //date("H",time())); $table = str_replace("##RATING##", $qrating_dropdown, $table); $nactivitystop_textbox = html_input_text("name_drop", substr($nres[aname], 0, 8) . "... " . $nres[wname], 30, "textbox_red"); $nname_textbox = html_input_text("name_drop", $nres['first'] . " " . $nres['last'], 25, "textbox_red"); $nstart_textbox = html_input_text("name_drop", $nres["begin"], 2, "textbox_red"); $table = str_replace("##NSTART##", $nstart_textbox, $table); $table = str_replace("##ACTIVITYSTOP##", $nactivitystop_textbox, $table); $table = str_replace("##NAMEDROPSTOP##", $nname_textbox, $table); //$name_dropdown = html_drop_down_arrays("name_drop", $names, $values, $nres["person_id"], "dropdown_red"); //$activity_stop_dropdown = html_drop_down_arrays("activity_drop", $ActivityName, $ActivityValue, $nres["work_id"], "dropdown_red"); //$table = str_replace("##NAMEDROPSTOP##", $name_dropdown, $table); //$table = str_replace("##ACTIVITYSTOP##", $activity_stop_dropdown, $table); $table = str_replace("##DDESCRIPTION##", $nres["comm"], $table); $nwhole_table .= $table; } $tem = str_replace("##NLOGS##", $nwhole_table, $tem); $tem = str_replace("##NMESSAGE##", $message, $tem); for ($i = 1; $i < $count + 1; $i++) { if ($_REQUEST['editform' . $i] == "Končaj") { $stop_time = time();
<div class="form-group col-md-4"> <?php echo html_label(array("value" => "Nome", "class" => "control-label requered", "for" => "admin_nome")); ?> <?php echo html_input_text(array("name" => "admin_nome", "value" => $usuario["admin_nome"])); ?> </div> </div> <div class="row"> <div class="form-group col-md-4"> <?php echo html_label(array("value" => "E-mail", "class" => "control-label requered", "for" => "admin_email")); ?> <?php echo html_input_text(array("name" => "admin_email", "value" => $usuario["admin_email"])); ?> </div> </div> </form> </div> <div class="form-actions"> <?php echo html_input_button(array("value" => "Cancelar", "class" => "btn btn-default")); ?> <?php echo html_input_button(array("value" => "Restabelecer Senha", "class" => "btn btn-warning")); ?> <?php echo html_input_button(array("value" => "Remover", "class" => "btn btn-danger"));
htmlp_form_action("adm_langs_tools.php", array(), "POST"); htmlp_form_hidden("code", $db->f("code")); htmlp_form_hidden("old_trans", $db->f("translation")); htmlp_form_hidden("colname", $db->f("colname")); htmlp_form_hidden("option", "abil_delete"); $bgcolor = "gold"; $bx->box_column("center", "", $bgcolor, html_form_submit($t->translate("Delete"), "")); htmlp_form_end(); $bx->box_next_row_of_columns(); $bgcolor = "#FFFFFF"; } $bgcolor = "gold"; htmlp_form_action("adm_langs_tools.php", array(), "POST"); htmlp_form_hidden("option", "abil_add"); //$bx->box_column("right","",$bgcolor,html_input_text("code", 5, 64, "")); $bx->box_column("right", "", $bgcolor, "--"); $bx->box_column("center", "", $bgcolor, html_input_text("ability", 30, 64, "")); $bx->box_column("center", "", $bgcolor, html_input_text("colname", 25, 64, "")); $bx->box_column("center", "", $bgcolor, html_input_text("translation", 15, 64, "")); $bx->box_colspan(2, "center", $bgcolor, html_form_submit($t->translate("Add Ability"), "")); $bx->box_columns_end(); htmlp_form_end(); $bx->box_body_end(); $bx->box_end(); } ?> <!-- end content --> <?php require "./include/footer.inc"; @page_close();
$person_dropdown = html_drop_down_arrays("person_drop", $PersonName, $PersonValue, $last_add_user_id); //activity drop down $sql = "SELECT * FROM `work` WHERE `group`<'11' order by applic"; $result = $db->fetchAll($sql); foreach ($result as $res) { if (!is_array($ActivityName)) { $ActivityName[] = "izberi aktivnost..."; $ActivityValue[] = ""; } $ActivityName[] .= $res["applic"] . " --> " . $res["name"]; $ActivityValue[] .= $res["work_id"]; } /////////// $activity_dropdown = html_drop_down_arrays_multiple("activity_drop", $ActivityName, $ActivityValue, $ActivityName, 10); $aim_name_textbox = html_input_text("aim_name_text", $aim_name_textbox, 25, "default"); $aim_duration_textbox = html_input_text("aim_duration_text", $aim_duration_textbox, 5, '$aim_duration_text'); $aim_description_textbox = html_text_area("aim_description_text", $aim_description_textbox, 20, 50, "htmltextarea"); if ($expireDurationDate == "") { $expireDurationDate = '3000-01-01'; } ///////////////// //For geting from html // if ($_REQUEST['add'] == " Vstavi ") { $data = array('persons_id' => $_REQUEST[ime], 'name' => $_REQUEST[aim_name_text], 'created_by' => $person_id, 'description' => $_REQUEST[aim_description_text], 'expired_at' => $expireDurationDate, 'duration' => $aim_duration_text); $db->insert('aim', $data); //@todo Če slučajno še en vpiše takoj za tem bo prišlo do napake!!!!!!!!!! Popravi!! $getLastAimId = $dal->get_data_from_aim_order_by_id_desc(); $getLastAimIdLast = $getLastAimId[0]; $aim_id = $getLastAimIdLast[id]; $data = array('expired_at' => $expireDurationDate, 'duration' => $aim_duration_text, 'aim_id' => $aim_id);
$bx->box_column("center", "", "", ""); $bx->box_column("center", "", "", ""); $bx->box_column("center", "", "", $perm->perm_sel("perms", "devel")); $bx->box_column("center", "", "", html_form_submit($t->translate("Create User"), "create")); htmlp_form_end(); // Traverse the result set $db->query("SELECT * FROM auth_user ORDER BY username"); while ($db->next_record()) { $bx->box_next_row_of_columns(); htmlp_form_action("PHP_SELF", array(), "POST"); htmlp_form_hidden("u_id", $db->f("user_id")); htmlp_form_hidden("old_username", $db->f("username")); $bx->box_column("center", "", "", html_input_text("username", 12, 32, $db->f("username"))); $bx->box_column("center", "", "", html_input_password("password", 12, 32, $db->f("password"))); $bx->box_column("center", "", "", html_input_text("realname", 12, 32, $db->f("realname"))); $bx->box_column("center", "", "", html_input_text("email_usr", 12, 32, $db->f("email_usr"))); $bx->box_column("center", "", "", timestr_short($db->f("creation_usr"))); $bx->box_column("center", "", "", timestr_short($db->f("modification_usr"))); $bx->box_column("center", "", "", $perm->perm_sel("perms", $db->f("perms"))); $bx->box_column("center", "", "", html_form_submit($t->translate("Delete"), "u_kill") . html_form_submit($t->translate("Change"), "u_edit")); htmlp_form_end(); } $bx->box_columns_end(); $bx->box_body_end(); $bx->box_end(); /* <table border="0" cellspacing="0" cellpadding="0" bgcolor="<?php echo $th_box_frame_color;?>" align="center">