コード例 #1
0
ファイル: stext.php プロジェクト: philum/cms
function st_paste($d)
{
    $ret = hidden('', 'cka', 'm' . $d);
    $ret .= ljb('" title="copy" id="cka1', 'mem_storage', '_m1___cka0', picto('copy')) . ' ';
    $ret .= ljb('" title="paste" id="ckb1', 'mem_storage', '_m1_1__ckb0', picto('paste'));
    return btn('nbp', $ret) . ' ';
}
コード例 #2
0
ファイル: material.php プロジェクト: jozefvasko/kraf-app
function edit($table, $vyber, $id)
{
    $error_msg = array();
    if ($_POST[submit]) {
        $meno = sec_sql(sec_input($_POST["meno"]));
        $hodnota = sec_sql(sec_input($_POST["hodnota"]));
        if (strlen($meno) > 30 or strlen($meno) < 3) {
            $error_msg[] = "Meno môže mať od 4 do 30 znakov";
        }
        if (strlen($hodnota) > 30 or strlen($hodnota) < 3) {
            $error_msg[] = "Hodnota môže mať od 4 do 30 znakov";
        }
        //var_dump($error_msg);
        if (empty($error_msg)) {
            echo "ok";
        } else {
            echo "<div id=error_message>" . implode("<br>", $error_msg) . "</div>";
        }
    }
    $id = sec_sql($id);
    $query = "Select id, hodnota, meno from " . PREFIX . "{$table} WHERE id={$id}";
    $value = sql_query($query);
    $value = $value[0];
    echo "<form method=\"POST\">";
    hidden("id", $value[id]);
    textfield("meno", $value[meno], "Meno", 50, 20);
    textfield("hodnota", $value[hodnota], "Hodnota", 40, 20);
    submit("submit", "Odoslať");
    echo "</form>";
}
コード例 #3
0
ファイル: edit_profile.php プロジェクト: jozefvasko/benap-app
function delete($table, $vyber, $id, $sub)
{
    $id = sec_sql(sec_input($id));
    $query = "Select vymaz from {$table} WHERE id={$id}";
    $value = sql_query($query);
    if ($value[0][vymaz] == 0) {
        $vymaz = 1;
    } else {
        $vymaz = 0;
    }
    if ($table == "uzivatel" and $id == 1) {
        echo "<strong>Nie je možné upravovať hlavného administrátora!</strong>";
        exit;
    }
    //echo $table;
    if (!is_numeric($id) or empty($id)) {
        $error_msg[] = "ID ma nesprávnu hodnotu";
    }
    //var_dump($error_msg);
    if (empty($error_msg)) {
        $query = "UPDATE {$table}\r\n                      SET vymaz = {$vymaz}\r\n                      WHERE id = {$id}";
        sql_update($query);
        header("location: index.php?vyber=nastavenia&sub={$table}");
    } else {
        echo "<div id=error_message>" . implode("<br>", $error_msg) . "</div>";
    }
    echo "<h2>Skutočne chcete vymazať položku " . $value[0][meno] . "?</h2>";
    echo "<form method=\"POST\">";
    echo hidden("id", $value[id]);
    echo submit("submit", "Vymazať");
    echo "</form>";
}
コード例 #4
0
function display_rate_edit()
{
    global $selected_id, $Ajax, $xr_providers, $dflt_xr_provider;
    $xchg_rate_provider = isset($xr_providers) && isset($dflt_xr_provider) ? $xr_providers[$dflt_xr_provider] : 'ECB';
    start_table(TABLESTYLE2);
    if ($selected_id != "") {
        //editing an existing exchange rate
        $myrow = get_exchange_rate($selected_id);
        $_POST['date_'] = sql2date($myrow["date_"]);
        $_POST['BuyRate'] = maxprec_format($myrow["rate_buy"]);
        hidden('selected_id', $selected_id);
        hidden('date_', $_POST['date_']);
        label_row(_("Date to Use From:"), $_POST['date_']);
    } else {
        $_POST['date_'] = Today();
        $_POST['BuyRate'] = '';
        date_row(_("Date to Use From:"), 'date_');
    }
    if (isset($_POST['get_rate'])) {
        $_POST['BuyRate'] = maxprec_format(retrieve_exrate($_POST['curr_abrev'], $_POST['date_']));
        $Ajax->activate('BuyRate');
    }
    amount_row(_("Exchange Rate:"), 'BuyRate', null, '', submit('get_rate', _("Get"), false, _('Get current rate from') . ' ' . $xchg_rate_provider, true), 'max');
    end_table(1);
    submit_add_or_update_center($selected_id == '', '', 'both');
    display_note(_("Exchange rates are entered against the company currency."), 1);
}
コード例 #5
0
ファイル: txt.php プロジェクト: philum/cms
function st_paste($d)
{
    $ret = hidden('', 'cka', 'm' . $d);
    $ret .= ljb('" title="' . nms(57) . '" id="cka1', 'mem_storage', '_m1___cka0', picto('save')) . ' ';
    $ret .= ljb('" title="' . nms(95) . '" id="ckb1', 'mem_storage', '_m1_1__ckb0', picto('refresh')) . ' ';
    $ret .= hlpbt('memstorage');
    return btn('nbp', $ret) . ' ';
}
コード例 #6
0
function rec_checkbox($row)
{
    $name = "rec_" . $row['id'];
    $hidden = 'last[' . $row['id'] . ']';
    $value = $row['reconciled'] != '';
    // save also in hidden field for testing during 'Reconcile'
    return checkbox(null, $name, $value, true, _('Reconcile this transaction')) . hidden($hidden, $value, false);
}
コード例 #7
0
ファイル: ViewToNewMap.php プロジェクト: rlugojr/nagvis
 public function parse($orig_name)
 {
     global $CORE;
     ob_start();
     if (is_action()) {
         try {
             $name = post('name');
             if (!$name) {
                 throw new FieldInputError('name', l('Please provide a map name.'));
             }
             if (!preg_match(MATCH_MAP_NAME, $name)) {
                 throw new FieldInputError('name', l('This is not a valid map name (need to match [M])', array('M' => MATCH_MAP_NAME)));
             }
             if (count($CORE->getAvailableMaps('/^' . $name . '$/')) > 0) {
                 throw new FieldInputError('name', l('A map with this name already exists.'));
             }
             // Read the old config
             $MAPCFG = new GlobalMapCfg($orig_name);
             $MAPCFG->readMapConfig();
             // Create a new map config
             $NEW = new GlobalMapCfg($name);
             $NEW->createMapConfig();
             foreach ($MAPCFG->getMapObjects() as $object_id => $cfg) {
                 $NEW->addElement($cfg['type'], $cfg, $perm = true, $object_id);
             }
             success(l('The map has been created.'));
             reload(cfg('paths', 'htmlbase') . '/frontend/nagvis-js/index.php?mod=Map&show=' . $name, 1);
         } catch (FieldInputError $e) {
             form_error($e->field, $e->msg);
         } catch (NagVisException $e) {
             form_error(null, $e->message());
         } catch (Exception $e) {
             if (isset($e->msg)) {
                 form_error(null, $e->msg);
             } else {
                 throw $e;
             }
         }
     }
     echo $this->error;
     echo '<div class="simple_form">' . N;
     js_form_start('to_new_map');
     input('name');
     submit(l('Save'));
     focus('name');
     // Keep the view parameters the users has set
     $params = ltrim(req('view_params'), '&');
     if ($params) {
         $parts = explode('&', $params);
         foreach ($parts as $part) {
             list($key, $val) = explode('=', $part);
             hidden($key, $val);
         }
     }
     form_end();
     echo '</div>' . N;
     return ob_get_clean();
 }
コード例 #8
0
ファイル: notepad.php プロジェクト: philum/cms
function np_sav($d, $id)
{
    $ret = hidden('', 'cka', 'm' . $d);
    for ($i = 1; $i <= 7; $i++) {
        $c = $i == $d ? 'active' : '';
        $ret .= ljb($c . '" id="ckb' . $i, 'mem_storage', $id . '_m' . $i . '_1_1_ckb' . $i . '_memnu', $i);
    }
    $ret .= ljb('" id="ckc', 'mem_storage', $id . '_cka__1_ckc', 'save');
    return span(atc('nbp') . atd('memnu'), $ret) . hlpbt('memstorage');
}
コード例 #9
0
ファイル: pad.php プロジェクト: philum/cms
function np_sav($d, $id)
{
    $ret = hidden('', 'cka', 'm' . $d);
    for ($i = 1; $i <= 9; $i++) {
        $c = $i == $d ? 'active' : '';
        $ret .= ljb('' . $c . '" id="ckb' . $i, 'mem_storage', $id . '_m' . $i . '_1_1_ckb' . $i . '_memnu', $i);
    }
    $ret .= ljb('" id="ckc', 'mem_storage', $id . '_cka__1_ckc', nms(57));
    $ret .= lj('', 'popup_plup___pad_pad*write___' . $id . '', picto('export'));
    return divc('nb_pages', divd('memnu', $ret . hlpbt('memstorage')));
}
コード例 #10
0
 function main()
 {
     hidden('gp_page', 'x_emailblast');
     hidden('gp_table', CleanGet('gp_table', '', false));
     hidden('gp_posted', 1);
     $table = CleanGet('gp_table', '', false);
     if ($table == '') {
         ErrorAdd('Incorrect call to x_emailblast, no table parameter.' . 'This is a programming error, please contact your ' . 'technical support department');
         return;
     }
     // Get an object for the page we need.  Then
     // pull the list of skeys in the current search
     // and pull the rows.
     //
     $obj = DispatchObject($table);
     $a_skeys = ContextGet("tables_" . $obj->table_id . "_skeys", array());
     $l_skeys = implode(',', $a_skeys);
     // get this little detail taken care of
     //
     $this->PageSubtitle = 'Email blast to ' . $obj->table['description'];
     // Get the list of columns of interest, and pull them
     // and slot them by skey, so the list of skeys can be
     // used to order them
     //
     $lDisplayColumns = $obj->table['projections']['email'];
     $aDisplayColumns = explode(',', $lDisplayColumns);
     $EmailColumn = $obj->table['projections']['emailaddr'];
     $sql = 'SELECT skey,' . $EmailColumn . ',' . $lDisplayColumns . ' FROM ' . $table . ' WHERE skey IN (' . $l_skeys . ')';
     $DBRes = SQL($sql);
     $rows = array();
     while ($row = SQL_FETCH_Array($DBRes)) {
         $rows[$row['skey']] = $row;
     }
     $okToSend = false;
     if (CleanGet('gp_posted', '', false) == 1) {
         if (CleanGet('txt_subject', '', false) == '') {
             ErrorAdd('Please fill in a subject first');
         }
         if (trim(CleanGet('txt_email', '', false)) == '') {
             ErrorAdd('Please fill in an email body');
         }
         if (!Errors()) {
             $okToSend = true;
         }
     }
     // Now that we have the results, decide whether we
     // are sending out the email or
     if ($okToSend) {
         $this->EmailBlast($rows, $a_skeys, $EmailColumn, $aDisplayColumns);
     } else {
         $this->EmailHTML($rows, $a_skeys, $aDisplayColumns);
     }
 }
コード例 #11
0
ファイル: ftp.php プロジェクト: philum/cms
function ftp_ops($p, $f)
{
    $rid = 'inp' . randid();
    $j = 'ops' . $rid . '_plug__2_ftp_ftp*act_' . ajx($p) . '_' . ajx($f) . '_' . $rid;
    if ($p == 'rename' or $p == 'copy') {
        $ret = input(1, $rid, $f, '', '', 16) . ' ';
    } else {
        $ret = hidden('', $rid, $f) . btn('txtx', $f) . ' ';
    }
    $ret .= lj('popbt', $j, pictxt('reload', $p));
    return $ret . divd('ops' . $rid, '');
}
コード例 #12
0
ファイル: media.php プロジェクト: sydlawrence/SocialFeed
 public function new_form()
 {
     $form = '<div class="hide" id="new_image_form">';
     $form .= form::open_multipart('admin/media/add', array('onsubmit' => "('#image_upload_button').attr('value','Uploading...')"));
     $form .= input(array('title', 'Title'), '');
     $form .= input(array('image_category', 'Category'), '', array('class' => 'media_category_complete'));
     $form .= hidden('media_type_id', 1);
     $form .= '<input class="submit" type="submit" value="Upload" id="image_upload_button">';
     $form .= form::close();
     $form .= "</div>";
     echo $form;
     exit;
 }
 function end_form($breaks = 0)
 {
     global $Ajax;
     $_SESSION['csrf_token'] = hash('sha256', uniqid(mt_rand(), true));
     // 		if ($breaks)
     // 			br($breaks);
     hidden('_focus');
     hidden('_modified', get_post('_modified', 0));
     hidden('_token', $_SESSION['csrf_token']);
     View::get()->render();
     // In case there are any controls between the end of table and the end of form.
     echo ThemeBootstrap::get()->renderBlock('controls.twig.html', 'form_end', array());
     $Ajax->activate('_token');
 }
コード例 #14
0
ファイル: sticky.php プロジェクト: philum/cms
function plug_sticky($d)
{
    $d = $d != '' ? $d : 1;
    $id = 'np' . randid();
    $ret = hidden('', 'cka', 'm' . $d);
    $ret .= ljb('poph" id="ckb', 'mem_storage', $id . '_m' . $d . '_1_1_ckb' . $d, picto('reload'));
    //$ret.=ljb('popbt" id="ckc','mem_storage',$id.'_m'.$d.'__1_ckc','save');
    //$ret.=ljb('popbt" id="ckb'.$d,'mem_storage',$id.'_m'.$d.'_1_1_ckb'.$d.'_memnu','restore');
    $ret .= ljb('poph" id="ckc', 'mem_storage', $id . '_cka__1_ckc', pictit('save', 'save'));
    $ret = divs('float:right;', $ret);
    $ret .= divedit($id, '', 'height:240px; overflow:auto; padding:10px;', $j, $txt);
    $ret .= js_code('document.getElementById(\'' . $id . '\').innerHTML=localStorage[\'m' . $d . '\']');
    return popup_stick($ret);
}
コード例 #15
0
ファイル: androX6.php プロジェクト: KlabsTechnology/andro
 function androX6()
 {
     # KFD 1/14/09. copied this from androX4
     # KFD 8/7/08.  Grab any "hold" variables and
     # attach them to the current object.  This was
     # put in for the wholdist application to carry
     # context from screen to screen.
     #
     # KFD 3/20/09 Sourceforge 2697962
     #             Moved this to index_hidden so it works with
     #             androPage w/o modifying androPage
     #$this->hld = aFromGp('hld_');
     # If the x6exit variable was passed in, put it out
     hidden('x6exit', gp('x6exit', 'N'));
 }
コード例 #16
0
    /**
     * Rendering WP File field
     * @package Skip
     * @since 1.0
     * @return string $html Returns The HTML Code.
     */
    public function render()
    {
        global $skip_javascripts;
        $skip_javascripts[] = '	
			$("#skip_filebutton_' . $this->params['id'] . '").click(function() {
				
				if ( typeof wp !== "undefined" && wp.media && wp.media.editor ){
   		   			wp.media.editor.open( "#skip_filebutton_' . $this->params['id'] . '" );
					
					wp.media.editor.send.attachment = function( props, attachment ) {
						console.log( attachment );

						if( attachment.url.match(/\\.jpg$/i) || attachment.url.match(/\\.gif$/i) || attachment.url.match(/\\.png$/i) ){
							preview_file = attachment.url;
			        	}else{
			        		preview_file = attachment.icon;
			        	}
						
						$( "#skip_file_' . $this->params['id'] . '" ).val( attachment.url );
						$( "#skip_filepreview_' . $this->params['id'] . '" ).attr( "src", preview_file );	
						$( "#skip_filename_' . $this->params['id'] . ' a" ).text( preview_file.replace( /.*\\//, "" ) );
						$( "#skip_filename_' . $this->params['id'] . ' a" ).attr( "href", preview_file );	
						$( "#skip_filepreview_src_' . $this->params['id'] . '" ).val( preview_file );
			    	}
		    	}

   			});
   			
			$( "#skip_filepreview_' . $this->params['id'] . '" ).attr( "src", $( "#skip_filepreview_src_' . $this->params['id'] . '" ).val() );
			
   			';
        $html = $this->before_element;
        $html .= '<div class="skip_file ui-state-default ui-corner-all">';
        $html .= '<div class="skip_filepreview">';
        $html .= '<img id="skip_filepreview_' . $this->params['id'] . '" class="skip_filepreview_image" />';
        if (isset($this->value)) {
            $html .= '<div class="skip_filename" id="skip_filename_' . $this->params['id'] . '"><a href="' . $this->value . '" target="_blank">' . basename($this->value) . '</a></div>';
        }
        $html .= '</div>';
        $html .= '<div class="skip_fileuploader">';
        $html .= '<input id="skip_file_' . $this->params['id'] . '" class="skip_file_name" type="text" name="' . $this->params['name'] . '" value="' . $this->value . '" />';
        $html .= '<input id="skip_filebutton_' . $this->params['id'] . '" class="skip_file_button" type="button" value="' . $this->wp_browse . '" />';
        $html .= hidden($this->name . '_icon_src', array('id' => 'skip_filepreview_src_' . $this->params['id']));
        $html .= '</div>';
        $html .= '</div>';
        $html .= $this->after_element;
        return $html;
    }
コード例 #17
0
ファイル: revistas.php プロジェクト: plamencurso/myphpinc
function etable($datos, $tablea = [], $tha = [], $tra = [], $tda = [])
{
    global $d, $t, $columnas;
    $res = "\n" . t("tr", tarray("th", $columnas, $tha), $tra);
    // aqui acumulamos el resultado parcial - los headings + rows
    // intentamos hacer una fila de edit controls
    $edits = "";
    foreach ($columnas as $i) {
        $edits .= "\n" . t("td", input(["name" => $i]), $tda);
    }
    $res .= t("tr", $edits . t("td", submit("Insertar") . hidden("d", $d) . hidden("t", $t) . hidden("c", "i"), $tda), $tra);
    foreach ($datos[1] as $arr) {
        $res .= "\n" . t("tr", tarray("td", $arr, $tda), $tra);
    }
    return t("table", $res, $tablea);
}
コード例 #18
0
ファイル: x_pkc.php プロジェクト: KlabsTechnology/andro
 function prepareRow()
 {
     // Prepare for the insert
     // Get all of the columns and the table that we are working with
     $this->columns = aFromGP('gp_upd_');
     $this->table = gp('gp_table_upd');
     if (!$this->table) {
         echo "No table supplied\n<br>";
         return;
     }
     hidden('gp_table_upd', $this->table);
     hidden('gp_submit', 1);
     hidden('gp_page', 'x_pkc');
     // Get the flat table def
     $table_dd = dd_TableRef($this->table);
     $tabflat = ArraySafe($table_dd, 'flat');
     //hprint_r($tabflat);
     $retval = '';
     $retval .= $this->dynamicVal(&$table_dd, $this->columns);
     echo $retval;
 }
コード例 #19
0
ファイル: tracks.php プロジェクト: philum/cms
function f_inp_track($id, $msg = '')
{
    $w = currentwidth() - 100;
    $user = $_GET['user'];
    if ($_SESSION['USE']) {
        $use = $_SESSION['USE'];
    } else {
        list($use, $ml) = sql('name,mail', 'qdi', 'r', 'host="' . hostname() . '" ORDER BY id DESC LIMIT 1');
    }
    $gn = '" onkeyup="log_goodname(\'trkname\');';
    if ($user) {
        $ret .= btn("txtred", nms(29) . ' ' . nms(34) . ': ' . $user);
    }
    $ret .= ljb('popsav', 'SaveBbd', 'track_' . ($user ? $user : $id) . '_1', nms(28)) . btd('bts', '') . ' ';
    if (rstr(2) && !auth(4)) {
        $ret .= btn('small', helps('tracks_moderation'));
    }
    if ($_SESSION['USE']) {
        $ret .= hidden('name', 'trkname', $use) . hidden('mail', 'trkmail', '');
        $ret .= hidden('sb', 'trkscr', '') . hidden('sc', 'trkscrvrf', '');
    } else {
        $ret .= autoclic('name" id="trkname' . $gn, $use, '8', '50', '', 1) . ' ';
        //name
        $ret .= autoclic('mail" id="trkmail', $ml ? $ml : 'mail', '13', '50', '', 1) . ' ';
        //mail
        if (!$user && $id != $_SESSION['qb']) {
            $ret .= hlpbt('track_follow') . ' ';
        }
        $ret .= secure_tracks() . br();
    }
    //$ret.=balc('button','txtx" onclick="embed(\'video\')',picto('video'));
    $ret .= btd('bts' . $id, $sav) . ' ' . hlpbt('trackhelp') . ' ';
    //.hlpbt('track_orth').' ';
    $ret .= lj('" title="' . nms(65), 'popup_trkpreview_txtarea_', picto('view')) . ' ';
    //$ret.=divedit('txtarea','track','min-height:100px; min-width:320px;','',$d?$d:$msg);
    $ret .= micro_connedit('txtarea') . br() . txarea('txtarea', $d ? $d : $msg, 80, 16, atc('console')) . br();
    return $ret . $r['html'];
}
コード例 #20
0
ファイル: bom_edit.php プロジェクト: knjy24/FrontAccounting
            $_POST['loc_code'] = $myrow["loc_code"];
            $_POST['component'] = $myrow["component"];
            // by Tom Moulton
            $_POST['workcentre_added'] = $myrow["workcentre_added"];
            $_POST['quantity'] = number_format2($myrow["quantity"], get_qty_dec($myrow["component"]));
            label_row(_("Component:"), $myrow["component"] . " - " . $myrow["description"]);
        }
        hidden('selected_id', $selected_id);
    } else {
        start_row();
        label_cell(_("Component:"), "class='label'");
        echo "<td>";
        echo stock_component_items_list('component', $selected_parent, null, false, true);
        if (get_post('_component_update')) {
            $Ajax->activate('quantity');
        }
        echo "</td>";
        end_row();
    }
    hidden('stock_id', $selected_parent);
    locations_list_row(_("Location to Draw From:"), 'loc_code', null);
    workcenter_list_row(_("Work Centre Added:"), 'workcentre_added', null);
    $dec = get_qty_dec(get_post('component'));
    $_POST['quantity'] = number_format2(input_num('quantity', 1), $dec);
    qty_row(_("Quantity:"), 'quantity', null, null, null, $dec);
    end_table(1);
    submit_add_or_update_center($selected_id == -1, '', 'both');
    end_form();
}
// ----------------------------------------------------------------------------------
end_page();
コード例 #21
0
    $close_wo = 0;
    if (isset($_POST['ProcessAndClose']) && $_POST['ProcessAndClose'] != "") {
        $close_wo = 1;
    }
    // if unassembling, negate quantity
    if ($_POST['ProductionType'] == 0) {
        $_POST['quantity'] = -$_POST['quantity'];
    }
    $id = work_order_produce($_POST['selected_id'], $_POST['ref'], $_POST['quantity'], $_POST['date_'], $_POST['memo_'], $close_wo);
    meta_forward($_SERVER['PHP_SELF'], "AddedID={$id}");
}
//-------------------------------------------------------------------------------------
display_wo_details($_POST['selected_id']);
//-------------------------------------------------------------------------------------
start_form();
hidden('selected_id', $_POST['selected_id']);
//hidden('WOReqQuantity', $_POST['WOReqQuantity']);
if (!isset($_POST['quantity']) || $_POST['quantity'] == '') {
    $_POST['quantity'] = max($wo_details["units_reqd"] - $wo_details["units_issued"], 0);
}
start_table();
ref_row(tr("Reference:"), 'ref', references::get_next(29));
if (!isset($_POST['ProductionType'])) {
    $_POST['ProductionType'] = 1;
}
yesno_list_row(tr("Type:"), 'ProductionType', $_POST['ProductionType'], tr("Produce Finished Items"), tr("Return Items to Work Order"));
text_row(tr("Quantity:"), 'quantity', $_POST['quantity'], 13, 15);
date_row(tr("Date:"), 'date_');
textarea_row(tr("Memo:"), 'memo_', null, 40, 3);
end_table(1);
submit_center_first('Process', tr("Process"));
コード例 #22
0
ファイル: sales_groups.php プロジェクト: pthdnq/ivalley-svn
$th = array(_("ID"), _("Group Name"), "", "");
inactive_control_column($th);
table_header($th);
$k = 0;
while ($myrow = db_fetch($result)) {
    alt_table_row_color($k);
    label_cell($myrow["id"]);
    label_cell($myrow["description"]);
    inactive_control_cell($myrow["id"], $myrow["inactive"], 'groups', 'id');
    edit_button_cell("Edit" . $myrow["id"], _("Edit"));
    delete_button_cell("Delete" . $myrow["id"], _("Delete"));
    end_row();
}
inactive_control_row($th);
end_table(1);
//-------------------------------------------------------------------------------------------------
start_table(TABLESTYLE2);
if ($selected_id != -1) {
    if ($Mode == 'Edit') {
        //editing an existing group
        $myrow = get_sales_group($selected_id);
        $_POST['description'] = $myrow["description"];
    }
    hidden("selected_id", $selected_id);
    label_row(_("ID"), $myrow["id"]);
}
text_row_ex(_("Group Name:"), 'description', 30);
end_table(1);
submit_add_or_update_center($selected_id == -1, '', 'both');
end_form();
end_page();
コード例 #23
0
ファイル: cp.php プロジェクト: jozefvasko/benap-app
function send_email_revision_cp($revision, $cp)
{
    require_once 'include/PHPMailer/PHPMailerAutoload.php';
    $email_to_default = def_value("default_email", "hodnota");
    mysql_query("BEGIN");
    $data = sql_query("SELECT id_obj, meno, adresa, mesto, psc, ico, dic, telefon, email, komentar,\r\n                                vystavil, vlastne_cislo_obj, doruc_meno, doruc_adresa, doruc_mesto, \r\n                                doruc_psc,\r\n                                    DATE_FORMAT(datum, '%d. %m. %Y, %H:%i') AS datum\r\n                                    FROM revizia \r\n                                    WHERE id={$revision} \r\n                                    LIMIT 1");
    $data_row = sql_query("SELECT id, ks, id_product_type, id_product, id_product_delivery, atyp_text\r\n                                    FROM objednavka_row \r\n                                    WHERE id_revizia={$revision}");
    $data = $data[0];
    $fieldsets_c = count($data_row);
    for ($i = 0; $i < $fieldsets_c; $i++) {
        $ks[$i] = $data_row[$i][ks];
        $product_type[$i] = $data_row[$i][id_product_type];
        $product[$i] = $data_row[$i][id_product];
        $product_delivery[$i] = $data_row[$i][id_product_delivery];
        $atyp_text[$i] = $data_row[$i][atyp_text];
        $data_row_option = sql_query("SELECT id_product_atribute, id_product_atribute_option \r\n                                    FROM objednavka_row_atribute \r\n                                    WHERE id_revizia=\"{$revision}\" AND id_objednavka_row=\"{$data_row[$i][id]}\"");
        //dd($form_data_row_option);
        foreach ($data_row_option as $option) {
            $data_rows[$i][$option["id_product_atribute"]] = $option["id_product_atribute_option"];
        }
    }
    $data[ks_all] = $ks;
    $data[product_type_all] = $product_type;
    $data[product_all] = $product;
    $data[product_delivery_all] = $product_delivery;
    $data[atyp_text_all] = $atyp_text;
    $data[product_atribute_options_all] = $data_rows;
    $files = sql_query("SELECT meno, meno_old, pripona \r\n                                FROM subor\r\n                                WHERE id_obj=" . $data["id_obj"] . "");
    //var_dump($data);
    $data_obj = sql_query("SELECT DATE_FORMAT(datum, '%d. %m. %Y, %H:%i') AS datum, c_obj, status,\r\n                                    DATE_FORMAT(datum, '%Y') AS rok\r\n                                    FROM objednavka \r\n                                    WHERE id=" . $data["id_obj"] . " LIMIT 1");
    $data_obj = $data_obj[0];
    $secure_key = sql_query("SELECT secure_key\r\n                                    FROM objednavka_secure\r\n                                    WHERE id_obj=" . $data["id_obj"] . " AND \r\n                                          id_revizia={$revision} LIMIT 1");
    $secure_key = $secure_key[0][secure_key];
    $message = "<html>";
    $message .= "<head>";
    $message .= "<style>\r\n                    table.items {\r\n                        border-collapse: collapse;\r\n                        border-spacing: 0;\r\n                    }\r\n                    table.items td {\r\n                         border: 1px solid #c1c1c1;\r\n                    }\r\n                    </style>";
    $message .= "</head>";
    $message .= "<body>";
    $message .= "<img src=\"http://" . $_SERVER['HTTP_HOST'] . "/assets/images/logo.jpg\">";
    $message .= "<h1>Cenová ponuka k objednávke č. " . $data_obj["c_obj"] . "/" . $data_obj["rok"] . "</h1>";
    if (!empty($data["vlastne_cislo_obj"])) {
        $message .= "Vaše číslo objednávky: " . $data["vlastne_cislo_obj"] . "<br>";
    }
    $message .= "zo dňa: " . $data_obj["datum"] . "<br><br>";
    $message .= "<table><tr>";
    $message .= "<td style=\"width: 400px;\"><strong>Dodávateľ</strong><br>";
    $message .= "<table><tr><td>" . def_value("default_firma", "hodnota") . "</td></tr>";
    $message .= "<tr><td>" . def_value("default_adresa", "hodnota") . "<br>" . def_value("default_mesto", "hodnota") . "</td></tr>";
    $message .= "<tr><td>IČO: " . def_value("default_ico", "hodnota") . "<br> DIČ: " . def_value("default_dic", "hodnota") . "</td></tr>";
    $message .= "<tr><td>" . def_value("default_telefon", "hodnota") . "<br> " . def_value("default_mobil", "hodnota") . "</td></tr>";
    $message .= "<tr><td>" . def_value("default_email", "hodnota") . "<br> " . def_value("default_email_2", "hodnota") . "</td></tr>";
    $message .= "</table><br><br></td>";
    $message .= "<td style=\"width: 50%;\"><strong>Objednávateľ:</strong>";
    $message .= "<table><tr><td></td><td>" . $data["meno"] . "</td></tr>";
    $message .= "<tr><td></td><td>" . $data["adresa"] . "</td></tr>";
    $message .= "<tr><td></td><td>" . $data["psc"] . " " . $data["mesto"] . "</td></tr>";
    $message .= "<tr><td>IČO</td><td>" . $data["ico"] . "</td></tr>";
    $message .= "<tr><td>DIČ</td><td>" . $data["dic"] . "</td></tr>";
    $message .= "<tr><td>tel.</td><td>" . $data["telefon"] . "</td></tr>";
    $message .= "<tr><td>email:</td><td>" . $data["email"] . "</td></tr>";
    $message .= "<tr><td>vystavil:</td><td>" . $data["vystavil"] . "</td></tr>";
    $message .= "</table><br><strong>Adresa doručenia:</strong>";
    $message .= "<table><tr><td>" . $data["doruc_meno"] . "</td></tr>";
    $message .= "<tr><td>" . $data["doruc_adresa"] . "</td></tr>";
    $message .= "<tr><td>" . $data["doruc_psc"] . " " . $data["doruc_mesto"] . "</td></tr>";
    $message .= "</table><br></td>";
    $message .= "</tr></table><br><br>";
    $fieldsets_c = count($data_row);
    for ($i = 0; $i < $fieldsets_c; $i++) {
        $ks[$i] = $data_row[$i][ks];
        $id[$i] = $data_row[$i][id];
        $product_type[$i] = $data_row[$i][id_product_type];
        $product[$i] = $data_row[$i][id_product];
        $product_delivery[$i] = $data_row[$i][id_product_delivery];
        $atyp_text[$i] = $data_row[$i][atyp_text];
        $data_row_option = sql_query("SELECT id_product_atribute, id_product_atribute_option \r\n                                    FROM objednavka_row_atribute \r\n                                    WHERE id_revizia=\"{$revision}\" AND id_objednavka_row=\"{$data_row[$i][id]}\"");
        //dd($form_data_row_option);
        foreach ($data_row_option as $option) {
            $data_rows[$i][$option["id_product_atribute"]] = $option["id_product_atribute_option"];
        }
        $query = "SELECT * from cp_row WHERE id_cp=" . sec_input(sec_sql($_GET["cp"])) . " AND id_objednavka_row=" . $data_row[$i][id] . "";
        $cp_row = sql_query($query)[0];
        $cena[$i] = $cp_row[cena];
        $zlava[$i] = $cp_row[zlava];
        //var_dump($cp_row);
    }
    $data[id_all] = $id;
    $data[ks_all] = $ks;
    $data[product_type_all] = $product_type;
    $data[product_all] = $product;
    $data[product_delivery_all] = $product_delivery;
    $data[atyp_text_all] = $atyp_text;
    $data[product_atribute_options_all] = $data_rows;
    $data[product_price_all] = $cena;
    $data[zlava_all] = $zlava;
    $message .= "<div class=\"print_hlavicka3\">\r\n            <table style=\"font-size: 80%;\" class=\"items\">\r\n               <tr style=\"background-color: #efefef; font-size: 9pt;\">\r\n               <th></th>\r\n               <th style=\"width: 380px;\">produkt</th>\r\n               <th style=\"width: 40px;\">množstvo</th>\r\n               <th style=\"width: 100px;\">doprava</th>              \r\n               <th style=\"width: 50px;\">j.cena</th>\r\n               <th style=\"width: 50px;\">Spolu</th>\r\n               <th style=\"width: 100px;\">zľava %</th>\r\n               <th style=\"width: 80px;\">po zľave</th>\r\n               </tr>";
    //var_dump(sql_query("SELECT * from cp WHERE id=$cp"));
    //var_dump($data);
    $fieldsets_c = count($data["ks_all"]);
    for ($i = 0; $i < $fieldsets_c; $i++) {
        $poradie = 0;
        $poradie = $i + 1;
        $message .= "<tr>\r\n                     <td class=\"form_poradie\">{$poradie}. </td>\r\n                     ";
        $product_type = sql_query("SELECT meno FROM product_type WHERE id=" . sec_sql(sec_input($data["product_type_all"][$i])) . " LIMIT 1");
        $product_type = $product_type[0];
        $product = sql_query("SELECT id, meno FROM product WHERE id=" . sec_sql(sec_input($data["product_all"][$i])) . " LIMIT 1")[0];
        $message .= hidden("id[]", $data["id_all"][$i]);
        $options_str = array();
        //var_dump($data);
        if (!isset($data["product_atribute_options_all"][$i]) or empty($data["product_atribute_options_all"][$i])) {
            $data["product_atribute_options_all"][$i] = array();
        }
        $option_c_hladina = 1;
        foreach ($data["product_atribute_options_all"][$i] as $option) {
            //var_dump($option);
            $options = sql_query("SELECT id, meno, id_c_hladina FROM product_atribute_option WHERE id=" . sec_sql(sec_input($option)) . " LIMIT 1");
            $options_str[] = $options[0]["meno"];
            if ($options[0]["id_c_hladina"] > $option_c_hladina) {
                $option_c_hladina = $options[0]["id_c_hladina"];
            }
            //$options["price"] = sql_query("SELECT id, cena FROM product_atribute_option WHERE id=".sec_sql(sec_input($option))." LIMIT 1");
        }
        $options_str = empty($options_str) ? "" : " (" . join(", ", $options_str) . ")";
        $message .= "<td class=\"form_nazov_siroky\">" . $product_type["meno"] . " " . $product["meno"] . "" . $options_str . "" . (empty($data["atyp_text_all"][$i]) ? "" : "<br>Atyp: " . sec_input($data["atyp_text_all"][$i])) . "</td>";
        $product_delivery = sql_query("SELECT meno FROM product_delivery WHERE id=" . sec_sql(sec_input($data["product_delivery_all"][$i])) . " LIMIT 1");
        $product_delivery = $product_delivery[0];
        $message .= "<td class=\"form_ks\">" . sec_input($data["ks_all"][$i]) . " ks</td>";
        $message .= "<td class=\"form_hrana\">" . $product_delivery["meno"] . "</td>";
        $message .= hidden("ks[]", $data["ks_all"][$i]);
        if (empty($data[product_price_all][$i])) {
            $product_prices = sql_query("SELECT id, cena FROM cp_product WHERE id_c_hladina=" . $option_c_hladina . " AND id_product=" . $product["id"] . " ORDER BY id DESC LIMIT 1")[0];
            $product_price = $product_prices[cena];
        } else {
            $product_price = $data[product_price_all][$i];
        }
        $product_ks_sum = $product_ks_sum + sec_input($data["ks_all"][$i]);
        $product_price_sum = $product_price * sec_input($data["ks_all"][$i]);
        $message .= hidden("id_cp_product[]", $product_prices[id]);
        // spocitanie ceny spolu za vsetky produkty
        $products_prices_sums = $products_prices_sums + $product_price_sum;
        $zlava_E = $product_price_sum * $data[zlava_all][$i] / 100;
        $po_zlave = $product_price_sum - $zlava_E;
        $po_zlave_sum = $po_zlave_sum + $po_zlave;
        if (!empty($data["atyp_text_all"][$i])) {
            $product_price = $data[product_price_all][$i] . " €";
        } else {
            $product_price = $product_price . " €";
        }
        $message .= "<td class=\"form_nazov ali-center product-price\">" . $product_price . "</td>";
        $message .= "<td class=\"form_nazov ali-center\"><span class=\"cena-spolu-product\">" . $product_price_sum . "</span> €</td>";
        $message .= "<td class=\"form_nazov ali-center\"><span class=\"zlava-E bold\">" . ($zlava_E > 0 ? "-" . $zlava_E . " €" : "") . "</span>" . ($data[zlava_all][$i] > 0 ? " (" . $data[zlava_all][$i] . "%)" : "") . "</td>";
        $message .= "<td class=\"form_nazov ali-center po-zlave-sum bold\">" . $po_zlave . " €</td>";
        $message .= "</tr>";
    }
    $message .= "<tr class=\"cp_spolu bold\">\r\n                            <td></td>\r\n                            <td>Spolu:</td>\r\n                            <td class=\"ali-center\">" . $product_ks_sum . " ks</td>\r\n                            <td></td>\r\n                            <td></td>\r\n                            <td class=\"ali-center\">" . $products_prices_sums . " €</td>\r\n                            <td></td>\r\n                            <td class=\"ali-center po-zlave-sum-all\">" . $po_zlave_sum . " €</td>\r\n                            \r\n                    <tr>";
    $message .= "</table></div>";
    $message .= "</table><br><br>";
    $message .= "email vytvorený: " . date("j. n. Y - H:i") . "<br>";
    $message .= "</body></html>";
    mysql_query("COMMIT");
    //echo $message;
    //dd("");
    if ($data["email"] != $email_to) {
        $email_to = $data["email"];
        $email_subject = "Cenová ponuka k objednávke č. " . $data_obj["c_obj"] . " / " . $data_obj["rok"] . " - " . def_value("default_firma", "hodnota") . "";
        $headers = "From: \"" . def_value("default_firma", "hodnota") . "\" <" . def_value("default_email", "hodnota") . ">\r\n";
        $headers .= "Reply-To: " . def_value("default_email", "hodnota") . "\r\n";
        //$headers .= "CC: scooti@stonline.sk\r\n";
        $headers .= "MIME-Version: 1.0\r\n";
        $headers .= "Content-Type: text/html; charset=UTF-8\r\n";
        $mail = new PHPMailer();
        $mail->IsSMTP();
        $mail->CharSet = "UTF-8";
        $mail->SMTPDebug = 0;
        $mail->SMTPAuth = true;
        //$mail->SMTPSecure = 'ssl';
        $mail->Host = def_value("default_email_host", "hodnota");
        $mail->Port = def_value("default_email_port", "hodnota");
        $mail->Username = def_value("default_email_username", "hodnota");
        $mail->Password = def_value("default_email_password", "hodnota");
        $mail->isHTML(true);
        $mail->setLanguage('sk', 'language/');
        $mail->SetFrom(def_value("default_email", "hodnota"), def_value("default_firma", "hodnota"));
        $mail->Subject = $email_subject;
        $mail->Body = $message;
        $mail->AddAddress($email_to);
        $mail->Send();
        //mail($email_to, $email_subject, $message, $headers);
        //var_dump($email_to);
        //var_dump($data["email"]);
    }
    echo "Email bol úspešne odoslaný na adresu: {$email_to}";
}
コード例 #24
0
//-----------------------------------------------------------------------------------------
if (isset($_POST['grn_item_id']) && $_POST['grn_item_id'] != "") {
    $myrow = get_grn_item_detail($_POST['grn_item_id']);
    echo "<br>";
    display_heading2(tr("Delivery Item Selected For Adding To A Supplier Invoice"));
    start_table("{$table_style} width=80%");
    $th = array(tr("Sequence #"), tr("Item"), tr("Description"), tr("Quantity Outstanding"), tr("Quantity to Invoice"), tr("Order Price"), tr("Actual Price"));
    table_header($th);
    start_row();
    label_cell($_POST['grn_item_id']);
    label_cell($myrow['item_code']);
    label_cell($myrow['description']);
    qty_cell($myrow['QtyOstdg']);
    qty_cells(null, 'this_quantity_inv', qty_format($myrow['QtyOstdg']));
    amount_cell($myrow['unit_price']);
    small_amount_cells(null, 'ChgPrice', price_format($myrow['unit_price']));
    end_row();
    end_table(1);
    submit_center('AddGRNToTrans', tr("Add to Invoice"));
    hidden('GRNNumber', $_POST['grn_item_id']);
    hidden('item_code', $myrow['item_code']);
    hidden('item_description', $myrow['description']);
    hidden('qty_recd', $myrow['qty_recd']);
    hidden('prev_quantity_inv', $myrow['quantity_inv']);
    hidden('order_price', $myrow['unit_price']);
    hidden('std_cost_unit', $myrow['std_cost_unit']);
    hidden('po_detail_item', $myrow['po_detail_item']);
}
//----------------------------------------------------------------------------------------
end_form();
end_page();
コード例 #25
0
     $adv_sal = $tds = 0;
     $total_ded = $pf + $staff_loan + $adv_sal + $tds + $lop_amount;
     $net_sal = $gross - $total_ded;
     $total_net = $net_sal;
 }
 //hidden('pay_array', implode(', ', array_map(function ($v, $k) { return $k . '=' . $v; }, $pay_array, array_keys($pay_array))));
 hidden('basic', $basic_pay);
 hidden('da', $da_pay);
 hidden('hra', $hra_pay);
 hidden('convey_allow', $convey_allow);
 hidden('edu_other_allow', $edu_other_allow);
 hidden('pf', $pf);
 hidden('lop_amount', $lop_amount);
 hidden('tds', $tds);
 hidden('total_ded', $total_ded);
 hidden('total_net', $total_net);
 start_outer_table(TABLESTYLE2);
 table_section(1);
 table_section_title(_("Earning Details"));
 if (db_has_employee_payslip($_POST['year'], $_POST['month'], $_POST['empl_id'])) {
     label_row(_(" Date of Paid :"), $date_of_paid);
 }
 label_row(_(" Basic:"), $basic_pay, null, 30, 30);
 label_row(_(" DA:"), $da_pay, null, 30, 30);
 label_row(_(" HRA:"), $hra_pay, null, 30, 30);
 label_row(_(" Conveyance:"), $convey_allow, null, 30, 30);
 label_row(_(" Education/ Other Allowance:"), $edu_other_allow, null, 30, 30);
 table_section_title(_(""));
 label_row(_(" Gross Earning"), $gross, 'style="color:#A86A0B; background-color:#F2F6D5;"', 'style="color:#A86A0B; background-color:#F2F6D5;"');
 table_section(2);
 table_section_title(_("Deduction"));
コード例 #26
0
ファイル: changepassword.php プロジェクト: hetznerZA/ipplan
            insert($w, text(my_("Password changed")));
        } else {
            $formerror .= my_("Password could not be changed") . "\n";
        }
    }
}
if (!$_POST || $formerror) {
    myError($w, $p, $formerror, FALSE);
    if ($user) {
        insert($w, heading(3, sprintf(my_("Change password for user %s"), $user)));
    } else {
        insert($w, heading(3, sprintf(my_("Change password for user %s"), getAuthUsername())));
    }
    // start form
    insert($w, $f = form(array("method" => "post", "action" => $_SERVER["PHP_SELF"])));
    insert($f, $con = container("fieldset", array("class" => "fieldset")));
    insert($con, $legend = container("legend", array("class" => "legend")));
    insert($legend, text($title));
    // display opening text
    if ($user) {
        insert($con, hidden(array("name" => "user", "value" => "{$user}")));
    }
    insert($con, textbr(my_("New password (case sensitive!):")));
    insert($con, password(array("name" => "password1", "value" => "{$password1}", "size" => "40", "maxlength" => "40")));
    insert($con, textbrbr(my_("New password (again):")));
    insert($con, password(array("name" => "password2", "value" => "{$password2}", "size" => "40", "maxlength" => "40")));
    insert($con, generic("br"));
    insert($con, submit(array("value" => my_("Submit"))));
    insert($con, freset(array("value" => my_("Clear"))));
}
printhtml($p);
コード例 #27
0
ファイル: sales_people.php プロジェクト: ravenii/guardocs
end_table();
//------------------------------------------------------------------------------------------------
hyperlink_no_params($_SERVER['PHP_SELF'], tr("New Sales Person"));
//------------------------------------------------------------------------------------------------
start_form();
if (isset($selected_id)) {
    //editing an existing Sales-person
    $sql = "SELECT *  FROM salesman WHERE salesman_code='{$selected_id}'";
    $result = db_query($sql, "could not get sales person");
    $myrow = db_fetch($result);
    $_POST['salesman_name'] = $myrow["salesman_name"];
    $_POST['salesman_phone'] = $myrow["salesman_phone"];
    $_POST['salesman_fax'] = $myrow["salesman_fax"];
    $_POST['salesman_email'] = $myrow["salesman_email"];
    $_POST['provision'] = percent_format($myrow["provision"]);
    $_POST['break_pt'] = price_format($myrow["break_pt"]);
    $_POST['provision2'] = percent_format($myrow["provision2"]);
    hidden('selected_id', $selected_id);
}
start_table("{$table_style2} width=60%");
text_row_ex(tr("Sales person name:"), 'salesman_name', 30);
text_row_ex(tr("Telephone number:"), 'salesman_phone', 20);
text_row_ex(tr("Fax number:"), 'salesman_fax', 20);
text_row_ex(tr("Email:"), 'salesman_email', 40);
percent_row(tr("Provision"), 'provision');
amount_row(tr("Break Pt.:"), 'break_pt');
percent_row(tr("Provision") . " 2", 'provision2');
end_table(1);
submit_add_or_update_center(!isset($selected_id));
end_form();
end_page();
コード例 #28
0
ファイル: gl_budget.php プロジェクト: ravenii/guardocs
 start_table($table_style2);
 $showdims = $dim == 1 && $_POST['dim1'] == 0 || $dim == 2 && $_POST['dim1'] == 0 && $_POST['dim2'] == 0;
 if ($showdims) {
     $th = array(tr("Period"), tr("Amount"), tr("Dim. incl."), tr("Last Year"));
 } else {
     $th = array(tr("Period"), tr("Amount"), tr("Last Year"));
 }
 table_header($th);
 $year = $_POST['fyear'];
 $sql = "SELECT * FROM fiscal_year WHERE id={$year}";
 $result = db_query($sql, "could not get current fiscal year");
 $fyear = db_fetch($result);
 $begin = sql2date($fyear['begin']);
 $end = sql2date($fyear['end']);
 hidden('begin', $begin);
 hidden('end', $end);
 $total = $btotal = $ltotal = 0;
 for ($i = 0, $date_ = $begin; date1_greater_date2($end, $date_); $i++) {
     start_row();
     $_POST['amount' . $i] = number_format2(get_only_budget_trans_from_to($date_, $date_, $_POST['account'], $_POST['dim1'], $_POST['dim2']), 0);
     label_cell($date_);
     if (!isset($_POST['amount' . $i])) {
         $_POST['amount' . $i] = '0';
     }
     amount_cells(null, 'amount' . $i, null, 15, null, 0);
     if ($showdims) {
         $d = get_budget_trans_from_to($date_, $date_, $_POST['account'], $_POST['dim1'], $_POST['dim2']);
         label_cell(number_format2($d, 0), "nowrap align=right");
         $btotal += $d;
     }
     $lamount = get_gl_trans_from_to(add_years($date_, -1), add_years(end_month($date_), -1), $_POST['account'], $_POST['dim1'], $_POST['dim2']);
コード例 #29
0
ファイル: modifybaseform.php プロジェクト: hetznerZA/ipplan
insert($h, script("", array("type" => "text/javascript", "src" => "../phpserializer.js")));
insert($h, script("", array("type" => "text/javascript", "src" => "../ipplanlib.js")));
$w = myheading($p, $title, true);
// explicitly cast variables as security measure against SQL injection
list($cust, $areaindex) = myRegister("I:cust I:areaindex");
// display opening text
insert($w, heading(3, "{$title}."));
$ds = new IPplanDbf() or myError($w, $p, my_("Could not connect to database"));
// start form
insert($w, $f1 = form(array("name" => "THISFORM", "method" => "post", "action" => $_SERVER["PHP_SELF"])));
$cust = myCustomerDropDown($ds, $f1, $cust, $grps) or myError($w, $p, my_("No customers"));
$areaindex = myAreaDropDown($ds, $f1, $cust, $areaindex);
insert($w, $f2 = form(array("name" => "ENTRY", "method" => "get", "action" => "modifybase.php")));
// save customer name for actual post of data
insert($f2, hidden(array("name" => "cust", "value" => "{$cust}")));
insert($f2, hidden(array("name" => "areaindex", "value" => "{$areaindex}")));
myRangeDropDown($ds, $f2, $cust, $areaindex);
insert($f2, block("<p>"));
insert($f2, $con = container("fieldset", array("class" => "fieldset")));
insert($con, $legend = container("legend", array("class" => "legend")));
insert($legend, text(my_("Search criteria")));
myFocus($p, "ENTRY", "ipaddr");
insert($con, textbr(my_("Subnet address (leave blank if range selected)")));
insert($con, span(my_("Partial subnet addresses can be used eg. 172.20"), array("class" => "textSmall")));
insert($con, input_text(array("name" => "ipaddr", "size" => "15", "maxlength" => "15")));
if (DBF_TYPE == "mysql" or DBF_TYPE == "maxsql" or DBF_TYPE == "postgres7") {
    insert($con, textbrbr(my_("Description (only display networks matching the regular expression)")));
} else {
    insert($con, textbrbr(my_("Description (only display networks containing)")));
}
insert($con, input_text(array("name" => "descrip", "size" => "80", "maxlength" => "80")));
コード例 #30
0
    gl_all_accounts_list_row(_("C.O.G.S. Account:"), 'cogs_account', $_POST['cogs_account']);
    hidden('inventory_account', $_POST['inventory_account']);
    hidden('adjustment_account', $_POST['adjustment_account']);
} else {
    gl_all_accounts_list_row(_("Inventory Account:"), 'inventory_account', $_POST['inventory_account']);
    gl_all_accounts_list_row(_("C.O.G.S. Account:"), 'cogs_account', $_POST['cogs_account']);
    gl_all_accounts_list_row(_("Inventory Adjustments Account:"), 'adjustment_account', $_POST['adjustment_account']);
}
if (is_manufactured($_POST['mb_flag'])) {
    gl_all_accounts_list_row(_("Item Assembly Costs Account:"), 'assembly_account', $_POST['assembly_account']);
} else {
    hidden('assembly_account', $_POST['assembly_account']);
}
$dim = get_company_pref('use_dimension');
if ($dim >= 1) {
    dimensions_list_row(_("Dimension") . " 1", 'dim1', null, true, " ", false, 1);
    if ($dim > 1) {
        dimensions_list_row(_("Dimension") . " 2", 'dim2', null, true, " ", false, 2);
    }
}
if ($dim < 1) {
    hidden('dim1', 0);
}
if ($dim < 2) {
    hidden('dim2', 0);
}
end_table(1);
div_end();
submit_add_or_update_center($selected_id == -1, '', 'both', true);
end_form();
end_page();