コード例 #1
0
ファイル: genreadmes.php プロジェクト: luyaotsung/framework
ini_set("date.timezone", "Asia/Kolkata");
global $licenses;
$licenses = array('standard' => array('license_name' => "Standard License", 'purchase' => true, 'wsource' => false, 'license_id' => 'standard'), 'pro' => array('license_name' => "Pro License", 'purchase' => true, 'wsource' => false, 'license_id' => 'pro'), 'devdirect' => array('license_name' => "DevDirect License", 'purchase' => true, 'wsource' => false, 'license_id' => 'devdirect'), 'trial' => array('verb' => "DOWNLOADING", 'license_name' => "Trial Version", 'wsource' => false, 'license_id' => 'trial', 'purchase' => false));
function write_items($lang, $langName)
{
    global $licenses;
    foreach ($licenses as $key => $item) {
        $filePath = "../razorflow_license_" . $key . "/" . $lang . ".html";
        if (file_exists($filePath)) {
            unlink($filePath);
        }
        global $data, $version;
        $data = $item;
        $data['lang'] = $lang;
        $data['version'] = $version;
        $data['langName'] = $langName;
        ob_start();
        require "template.php";
        $contents = ob_get_contents();
        ob_end_clean();
        file_put_contents($filePath, $contents);
        echo "Successfully wrote: {$filePath}\n";
    }
}
global $version;
$version = $argv[1];
write_items('js', "JavaScript");
write_items('php', "PHP");
write_items('suite', "Suite");
コード例 #2
0
 }
 switch ($type) {
     case $l_customers:
         list($CustName, $cust_ref, $address, $tax_id, $curr_code, $dimension_id, $dimension2_id, $credit_status, $payment_terms, $discount, $pymt_discount, $credit_limit, $sales_type, $notes, $name, $name2, $phone, $phone2, $fax, $email, $salesman) = $data;
         $address = convert_address_lines($address);
         write_customer($CustName, $cust_ref, $address, $tax_id, $curr_code, $dimension_id, $dimension2_id, $credit_status, $payment_terms, $discount, $pymt_discount, $credit_limit, $sales_type, $notes, $name, $name2, $phone, $phone2, $fax, $email, $salesman);
         break;
     case $l_suppliers:
         list($supp_name, $supp_ref, $address, $supp_address, $gst_no, $website, $supp_account_no, $bank_account, $credit_limit, $dimension_id, $dimension2_id, $curr_code, $payment_terms, $payable_account, $purchase_account, $payment_discount_account, $notes, $tax_group_id, $tax_included, $contact, $phone, $phone2, $fax, $email, $rep_lang, $inactive) = $data;
         $address = convert_address_lines($address);
         $supp_address = convert_address_lines($supp_address);
         write_supplier($supp_name, $supp_ref, $address, $supp_address, $gst_no, $website, $supp_account_no, $bank_account, $credit_limit, $dimension_id, $dimension2_id, $curr_code, $payment_terms, $payable_account, $purchase_account, $payment_discount_account, $notes, $tax_group_id, $tax_included, $contact, $phone, $phone2, $fax, $email, $rep_lang, $inactive);
         break;
     case $l_items:
         list($stock_id, $description, $long_description, $category_id, $tax_type_id, $units, $mb_flag, $sales_account, $inventory_account, $cogs_account, $adjustment_account, $assembly_account, $dimension_id, $dimension2_id, $no_sale, $editable, $sales_type_id, $curr_abrev, $price, $material_cost, $labour_cost, $overhead_cost, $last_cost) = $data;
         write_items($stock_id, $description, $long_description, $category_id, $tax_type_id, $units, $mb_flag, $sales_account, $inventory_account, $cogs_account, $adjustment_account, $assembly_account, $dimension_id, $dimension2_id, $no_sale, $editable, $sales_type_id, $curr_abrev, $price, $material_cost, $labour_cost, $overhead_cost, $last_cost);
         break;
     case $l_shipping:
         list($shipper_name, $contact, $phone, $phone2, $address) = $data;
         $address = convert_address_lines($address);
         write_shipping($shipper_name, $contact, $phone, $phone2, $address);
         break;
     case $l_payterms:
         list($from_now, $terms, $days) = $data;
         write_payterms($from_now, $terms, $days);
         break;
     case $l_salespersons:
         list($salesman_name, $salesman_phone, $salesman_fax, $salesman_email, $provision, $break_pt, $provision2) = $data;
         write_salesperson($salesman_name, $salesman_phone, $salesman_fax, $salesman_email, $provision, $break_pt, $provision2);
         break;
     case $l_glaccounts: