当前位置: 首页>>代码示例>>PHP>>正文


PHP beginPrettyTable函数代码示例

本文整理汇总了PHP中beginPrettyTable函数的典型用法代码示例。如果您正苦于以下问题:PHP beginPrettyTable函数的具体用法?PHP beginPrettyTable怎么用?PHP beginPrettyTable使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了beginPrettyTable函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: session_start

<?php

# Show a list of thedesired ac-codes. Which ac_code is set by the variable "showac". I am not sure
# why this variable has not to be defined as global
require "accrp.php";
session_start();
require "security/secure.php";
beginDocument($lCustomerProfile, $sess_user);
$db = getDBConnection();
if (!$showac) {
    $showac = 1;
}
$lastditch_result = mysql_query("select * from AC_CODE{$showac} order by AC_ID{$showac}", $db);
checkMySQLError();
if ($lastditch_row = mysql_fetch_array($lastditch_result)) {
    beginPrettyTable("4", "AC_CODE{$showac}");
    beginBorderedTable("4");
    echo "<tr>\n";
    echo " <td><b>AC_ID</b></td> <td><b>AC_DESC</b></td> \n <td><b>{$lActions}</b></td>\n </tr>\n";
    do {
        if ($class == "odd") {
            $class = "even";
        } else {
            $class = "odd";
        }
        printf(" <tr class='{$class}'>\n  <td><a href='%s?CustomerID=%s'>%s</td> <td>%s</td>\n <td align='center'><a href='confirm.php?action=deletecustomer&CustomerID=%s'><img src='images/delete.gif' height=24 width=24 border=0 alt='Delete this Customer'></a></td></tr>\n", $PHP_SELF, $lastditch_row["AC_ID1"], $lastditch_row["AC_ID{$showac}"], $lastditch_row["AC{$showac}_DESC"], "empty", $lastditch_row["AC_ID1"]);
    } while ($lastditch_row = mysql_fetch_array($lastditch_result));
    endPrettyTable();
    endBorderedTable();
} else {
    echo "{$lNoProfilesFound}...\n";
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:list_acs.php

示例2: session_start

<?php

# This form allows to enter a date. After submitting, all Bank and Cash Account-balances get
# printed seperated by Projects.
session_start();
require "accrp.php";
require "security/secure.php";
beginDocument("list Cash and Bank", $sess_user);
if ($date) {
    $ac1 = get_ac_array(1);
    foreach ($ac1 as $key => $prj_desc) {
        $accounts = new BankAndCashAccounts_byProject($key, $date, "c");
        beginPrettyTable(4, "{$prj_desc}");
        printRow(array("Account", "Balance"));
        while ($row = $accounts->getNext()) {
            printRow(array($row["AC5_DESC"], $accounts->getActualBalance() . "&nbsp;"), "irgendwas");
        }
        printRow(array("Sum", $accounts->getSum()));
        endPrettyTable();
    }
} else {
    openForm("enter Date", $PHP_SELF);
    beginPrettyTable("2", "list bank and cash");
    makeTextField("date", get_today_hrd_string(), "Date:");
    makeSubmitter();
    endPrettyTable();
    closeForm();
}
endDocument();
开发者ID:k9ert,项目名称:ac4ngos,代码行数:29,代码来源:list_bank_cash.php

示例3: endPrettyTable

?>
       		<tr>
 		 <td><a href='index.php'><?php 
echo $lLogout;
?>
</a></td>
   <?php 
endPrettyTable();
?>
  </td>
  <td valign=top align=center width='65%'>
   <table cellpadding=0 cellspacing=0 border=0 width='75%'>
    <tr>
     <td>
      <?php 
beginPrettyTable("1", "News");
?>
      <tr><td>
	<b>Yeah!</b><br>
	<li>And here, one can give special Informations about Reports !<br>
      </td></tr>
      <?php 
endPrettyTable();
?>
     </td>
    </tr>
   </table>
  </td>
   </tr>
</table>
<?php 
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:reports.php

示例4: get_new_vrno

        }
        $amount = $_POST[$field_name];
        $vr_no = get_new_vrno();
        # insert voucher
        $query = $query_part1 . "('{$vr_no}','{$today}','CR','{$ac1}', '{$ac2}','{$ac3}','{$ac4}','{$ac5}','D','','{$amount}','','opening Balance','{$today}','')";
        $result = mysql_query($query, $db);
        checkMySQLError();
        # insert counterbooking
        $query = $query_part1 . "('{$vr_no}','{$today}','CR','0', '5','0','0','0','C','','{$amount}','','opening Balance','{$today}','')";
        $result = mysql_query($query, $db);
        checkMySQLError();
    }
    report(1, "Everything seems to be fine. Check via Bank and Cash Report!");
} else {
    $db = getDBConnection();
    $result = mysql_query("Select * FROM TRANS");
    if (mysql_num_rows($result) != 0) {
        report(0, "Sorry, opening balance can only be performed when you have no Vouchers entered");
    }
    $accounts_array = get_ac5_sc_array("5(1)", "B");
    beginPrettyTable("2", "enter opening balances");
    openForm("openingbalance", $PHP_SELF);
    makeHiddenField("submitnow", 0);
    foreach ($accounts_array as $ac5 => $desc) {
        makeTextField("account_field_" . $ac5, "", $desc);
    }
    makeSpecialSubmitter("submit", "onClick='this.form.submitnow.value=\"1\"'");
    closeForm();
    endPrettyTable();
}
endDocument();
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:enter_openingbalance.php

示例5: beginDocument

} else {
    beginDocument("Login", "Not Logged In");
    session_destroy();
    ?>
<form name='login' method='POST' action='<?php 
    $PHP_SELF;
    ?>
'>
<?php 
    openForm("login", $PHP_SELF);
    ?>
<table width='100%' height='50%' cellpadding=0 cellspacing=0 border=0>
 <tr>
  <td valign='center' align='center'>
<?php 
    beginPrettyTable("2", $lLogin);
    ?>
<tr>
 <td>Username:</td>
 <td><input type='text' name='username' value=''></td>
</tr>
<tr>
 <td>Password:</td>
 <td><input type='password' name='password' value=''></td>
</tr>
<?php 
    makeSubmitter();
    endPrettyTable();
    ?>
  </td>
 </tr>
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:index.php

示例6: endPrettyTable

    ?>
	   </tr>
	   <tr>
	    <td><hr color='black'></td>
	   </tr>
	   <?php 
    endPrettyTable();
    # it just print out some HTML
    ?>
	  </td>
	  <td valign=top align=center width='65%'>
	<?php 
    $db = getDBConnection();
    $employer_array = get_personal_array();
    openForm("loan_form", $PHP_SELF, "onSubmit=\"return confirmSubmit()\"");
    beginPrettyTable("2", "enter {$loan_type} entry");
    makeHiddenField("type", $type);
    makeDropBox("emp_id3", $employer_array, "Employers Name");
    startRow();
    makePlainTextField("loan_dt", "", "Loan Santion Dt.", 10);
    makePlainTextField("loan_start", "", "Deduction Start Dt.", 10, "onChange=\"checkdate(this.value) && updateFields()\"");
    endRow();
    startRow();
    makePlainTextField("inst_no", "", "Instalment No", 6, "onChange=\"updateFields()\"");
    makePlainStaticField("loan_end", "", "Loan End Dt.", 10);
    endRow();
    makeStaticField("interest_rate", "{$interest_rate}" . "%", "Interest Rate", 6);
    startRow();
    makePlainTextField("loan_amt", "", "Loan Amount", 10, "onChange=\"updateFields()\"");
    makePlainStaticField("int_amt", "", "Total Interest", 10);
    endRow();
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:enter_loan.php

示例7: beginDocument

<?php

# This chunk of code checks to see if a customer has been registered in the
# session, if not, it dies.  Security!
if (!session_is_registered("sess_customer") and !session_is_registered("sess_user")) {
    beginDocument("Security", "Not Logged In");
    beginPrettyTable(1, "Security");
    echo "<tr><td class='data'>You are not logged in.  Please <a href='index.php'>Login</a></td></tr>";
    endPrettyTable();
    die;
}
开发者ID:k9ert,项目名称:ac4ngos,代码行数:11,代码来源:hybrid.php

示例8: session_start

<?php

# List all Employees-salary
require "accrp.php";
session_start();
require "security/secure.php";
beginDocument($lCustomerProfile, $sess_user);
$db = getDBConnection();
$sal_el_array = get_salary_elements_array();
$sal_el_count = get_salary_elements_count();
reset($sal_el_array);
$personal_array = get_personal_array();
beginPrettyTable("5", "PERSONAL SALARY");
#$header["EMP_ID3"] = "ID";
#$header["EMP_NAME"] = "NAME";
$query = "select * FROM PERSONAL LEFT JOIN EMP_SAL USING (EMP_ID3) ORDER BY EMP_SAL.EMP_ID3, EMP_SAL.SAL_ID";
$result = mysql_query($query, $db);
$printrow = array();
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    if (!isset($emp_name)) {
        $emp_name = $row["EMP_NAME"];
    }
    # ToDo: should get treated as well
    #if ($row["SAL_ID"]==NULL) {
    #	#continue;
    #	for ($i=0;$i<14;$i++) $printrow[]="0";
    #	printRow($printrow);
    #	reset($sal_el_array);
    #	unSet($printrow);
    #
    #	continue;
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:list_personal_salary.php

示例9: mysql_query

    $orderby = "EMP_ID3";
}
# calculate received money by Employees
$result = mysql_query("select SUM(AMOUNT),AC_ID5 from TRANS WHERE AC_ID3=30 AND DR_CR='C' GROUP BY AC_ID5 order by PARTY", $db);
checkMySQLError();
while ($row = mysql_fetch_array($result)) {
    $receive_array[$row["AC_ID5"]] = $row["SUM(AMOUNT)"];
}
# calculate paid_back money
$result = mysql_query("select SUM(AMOUNT),PARTY, AC_ID5 from TRANS WHERE AC_ID3=30 AND DR_CR='D' GROUP BY PARTY order by PARTY", $db);
checkMySQLError();
while ($row = mysql_fetch_array($result)) {
    if (array_key_exists($row["AC_ID5"], $receive_array)) {
        $receive_array[$row["AC_ID5"]] -= $row["SUM(AMOUNT)"];
    }
}
beginPrettyTable("1", "Schedule of Advance as on " . get_today_hrd_string());
if (isset($receive_array)) {
    printRow(array("Code", "Employer's name", "Amount"));
    foreach ($receive_array as $key => $value) {
        if ($value != 0) {
            printRow(array("{$key}", get_ac5_desc_of($key), 0 - $value), "something");
        }
        $sum += 0 - $value;
    }
    printRow(array("", "Sum", $sum));
} else {
    printRow(array("No Advance-money at anybody!"), "");
}
endPrettyTable();
endDocument();
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:list_advance.php

示例10: get_personal_array

$personal_array = get_personal_array();
echo "<h2>Centre for the rehabilitation of the paralysed - CRP</h2>";
echo "<div align=center>" . ($type == "PF" ? "Provident " : "Credit Union ") . "Fund Statement for the month of ";
echo get_month_name($ref_date) . " " . get_year($ref_date) . "</div>";
if ($type == "PF") {
    $loan_table = "PF_LOAN";
} else {
    if ($type == "CUF") {
        $loan_table = "CUF_LOAN";
    } else {
        die("Loantype unspecified !");
    }
}
$result = mysql_query("select * from {$loan_table}", $db);
checkMySQLError();
beginPrettyTable("4", "{$loan_table}");
printRow(array("Emp_ID3", "Emp. Name", "LoanStart", "LoanEnd", "Loan-Amt", "Instalment", "Tot_Amt", "Due", "Balance"));
while ($row = mysql_fetch_array($result)) {
    $name = $personal_array[$row["EMP_ID3"]];
    $rest_inst_no = datediff("m", $ref_date, $row["LOAN_END"]);
    $rest_amount = $rest_inst_no * $row["INT_RATE"];
    if ($rest_inst_no < 0) {
        continue;
    }
    $inst_sum += $rest_inst_no;
    $rest_amount_sum += $rest_amount;
    $loan_amount_sum += $row["LOAN_AMT"];
    printRow(array($row["EMP_ID3"], $name, conv_to_hrd($row["LOAN_START"]), conv_to_hrd($row["LOAN_END"]), $row["LOAN_AMT"], $row["INT_RATE"], $row["TOT_AMT"], $rest_inst_no, $rest_amount), "fluct");
}
printRow(array("", "", "Loan-Amt-Sum: ", $loan_amount_sum), "", "3,2");
printRow(array("", "", "Inst-Sum: ", "", $inst_sum), "", "3,2");
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:list_loan.php

示例11: endPrettyTable

           <tr>
            <td><input type='text' name='tosearch' value=''></td>
            <td><input type='image' src='images/go.gif' value='submit' border=0></td>
           </tr>
         <?php 
endPrettyTable();
?>
         </form>
        </td>
       </tr>
       <tr>
        <td valign=top>
         <form name='getuser' action='search.php'>
				 <input type='hidden' name='searcher' value='address'>
         <?php 
beginPrettyTable("2", $lSearchByAddress);
?>
          <tr>
           <td><input type='text' name='tosearch' value=''></td>
           <td><input type='image' src='images/go.gif' value='submit' border=0></td>
          </tr>
         <?php 
endPrettyTable();
?>
         </form>
        </td>
       </tr>
      </table>
     </td>
    </tr>
   </table>
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:main.php

示例12: session_start

session_start();
require "accrp.php";
require "security/secure.php";
beginDocument($lCustomerProfile, $sess_user);
$db = getDBConnection();
$ac1_array = get_ac_array(1);
$ac2_array = get_ac_array(2);
$ac3_array = get_ac_array(3);
$ac4_array = get_ac_array(4);
if (!isset($orderby)) {
    $orderby = "AC_ID5";
}
$lastditch_result = mysql_query("select * from AC_CODE5 order by {$orderby}", $db);
checkMySQLError();
if ($lastditch_row = mysql_fetch_array($lastditch_result)) {
    beginPrettyTable("4", "AC_CODE5");
    beginBorderedTable("4");
    ?>
		<tr>
		
		
		<td><b><a href='<?php 
    echo "{$PHP_SELF}";
    ?>
?orderby=AC_ID5<?php 
    if ($orderby == "AC_ID5") {
        echo " DESC";
    }
    ?>
'>AC_ID5</a></b></td> 
		<td><b><a href='<?php 
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:list_ac5.php

示例13: deldir

    deldir("/tmp/ac4ngosdata/");
    # 0333 does not work properly :-( so chmod ...
    $filename = $_FILES['dbdumpfile']['tmp_name'];
    move_uploaded_file($filename, "/tmp/ac4ngosimport.tar.gz") || die("Something wrong with the uploaded file ...");
    exec("cd /tmp; tar -xzf ac4ngosimport.tar.gz;chmod -R o+r ac4ngosdata");
    $result = mysql_query("SHOW TABLES FROM {$DBNAME}");
    checkMySQLError();
    while ($row = mysql_fetch_array($result, $db)) {
        $tablename = $row["Tables_in_{$DBNAME}"];
        $query = "DELETE FROM {$tablename}";
        $result2 = mysql_query($query, $db);
        checkMySQLError($query);
        $filename = "/tmp/accrpdata/" . $tablename . ".txt";
        if (file_exists($filename)) {
            $query = "LOAD DATA INFILE '{$filename}' INTO TABLE `{$tablename}`";
            $result2 = mysql_query($query, $db);
            checkMySQLError($query);
        }
    }
    deldir("/tmp/ac4ngosdata/");
    die("finished");
} else {
    beginPrettyTable(2, "Restore Backup");
    openForm("uploadfile", "{$PHP_SELF}", "form enctype=\"multipart/form-data\" accept\"application/x-tgz\"");
    makeHiddenField("MAX_FILE_SIZE", "30000");
    echo "Send this file: <input name=\"dbdumpfile\" type=\"file\">";
    makePlainSpecialSubmitter("Send File");
    closeForm();
    endPrettyTable();
}
endDocument();
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:restore_backup.php

示例14: session_start

<?php

# List all Employees
require "accrp.php";
session_start();
require "security/secure.php";
beginDocument($lCustomerProfile, $sess_user);
$desig_array = get_designation_array();
if (!isset($orderby)) {
    $orderby = "EMP_ID3";
}
$db = getDBConnection();
$result = mysql_query("select * from PERSONAL order by {$orderby}", $db);
checkMySQLError();
beginPrettyTable("5", "PERSONAL");
#we have the following columns
$columns = array("EMP_ID3" => "EMP_ID3", "EMP_NAME" => "EMP_NAME", "DESIG_ID" => "DESIG_ID", "STATUS" => "STATUS", "AC_NO" => "AC_NO", "CONF_DT" => "CONF_DT", "JOIN_DT" => "JOIN_DT");
# now a very fancy piece of code :-)
$columns[$orderby] .= " DESC";
# wasn't it fancy ;-)
# now something not very fancy :-(
$id = $columns["EMP_ID3"];
$name = $columns["EMP_NAME"];
$desig = $columns["DESIG_ID"];
$status = $columns["STATUS"];
$conf_dt = $columns["CONF_DT"];
$join_dt = $columns["JOIN_DT"];
$ac_no = $columns["AC_NO"];
printRow(array("<b><a href='{$PHP_SELF}?orderby={$id}'>EMP_ID3</a></b>", "<b><a href='{$PHP_SELF}?orderby={$name}'>EMP_NAME</a></b>", "<b><a href='{$PHP_SELF}?orderby={$desig}'>DESIGNATION</a></b>", "<b><a href='{$PHP_SELF}?orderby={$status}'>STATUS</a></b>", "<b><a href='{$PHP_SELF}?orderby={$ac_no}'>AC_NO</a></b>", "<b><a href='{$PHP_SELF}?orderby={$conf_dt}'>CONF_DT</a></b>", "<b><a href='{$PHP_SELF}?orderby={$join_dt}'>JOIN_DT</a></b>"));
while ($row = mysql_fetch_array($result)) {
    printRow(array("<a href=enter_personal.php?EMP_ID3='" . $row["EMP_ID3"] . "'>" . $row["EMP_ID3"] . "</a>", $row["EMP_NAME"], $desig_array[$row["DESIG_ID"]], $row["STATUS"], $row["AC_NO"], $row["CONF_DT"], $row["JOIN_DT"]), "fluct");
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:list_personal.php

示例15: beginPrettyTable

	  <td valign=top width='15%'>
	
           <?php 
    beginPrettyTable("1");
    ?>
	   <tr>
	    <?php 
    echo "<td><a href='list_desig.php'>show List</a></td>";
    ?>
	   </tr>
	   <tr>
	    <td><hr color='black'></td>
	   </tr>
	   <?php 
    endPrettyTable();
    ?>
	  </td>
	  <td valign=top align=center width='65%'>
	     <?php 
    openForm("enterDESIGNATION", $PHP_SELF);
    beginPrettyTable("2", "enter Designation");
    makeTextField("desig_desc", "", "Designation");
    makeSubmitter();
    endPrettyTable();
    closeForm();
    ?>
	</td>
	  </table>
	  <?php 
}
endDocument();
开发者ID:k9ert,项目名称:ac4ngos,代码行数:31,代码来源:enter_desig.php


注:本文中的beginPrettyTable函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。