} else { echo "<br />"; echo "<p style='text-align:center'><img src='res\\mmex.ico' alt='Money Manager EX Logo' height='150' width='150' /></p>"; echo "<h3 class='text_align_center'>Insert new settings to start use Money Manager</h3>"; } ?> <br /> <form id="login" method="post" action="settings.php"> <?php $const_disable_authentication = costant::disable_authentication(); $const_username = costant::login_username(); $const_password = costant::login_password(); $const_desktop_guid = costant::desktop_guid(); $const_disable_payee = costant::disable_payee(); $const_disable_category = costant::disable_category(); $const_defaultaccountname = costant::transaction_default_account(); //SECTION AUTHENTICATION design::section_legened("Authentication"); if ($const_disable_authentication == True) { design::settings_checkbox("Set_Disable_authentication", True, "Disable authentication (Not recommended)"); } else { design::settings_checkbox("Set_Disable_authentication", False, "Disable authentication (Not recommended)"); } if (isset($const_username) && $const_disable_authentication == False) { design::settings("Username", $const_username, "", "Text", True); } else { design::settings("Username", "", "Insert a new username", "Text", True); } if (isset($const_password) && $const_disable_authentication == False) { design::settings_password("Password", "To change insert a new password", False); } else {
<?php attachments::delete_zero(); if (isset($_GET["TrEditNr"])) { $TrEditNr = $_GET["TrEditNr"]; $FlagNew = False; } else { $TrEditNr = 0; $FlagNew = True; } if ($FlagNew) { $resultarray = array(); $TransactionHeaderText = "Insert new transcation"; $TransactionDate = "2014-01-01"; $TransactionStatus = costant::transaction_default_status(); $TransactionType = costant::transaction_default_type(); $TransactionAccount = costant::transaction_default_account(); $TransactionToAccount = "None"; $TransactionPayee = ""; $TransactionCategory = ""; $TransactionSubCategory = ""; $TransactionAmount = "0"; $TransactionNotes = "Empty"; $TransactionSubmit = "Insert transaction"; } else { $resultarray = db_function::transaction_select_one($TrEditNr); $TransactionHeaderText = "Edit transcation"; $TransactionDate = $resultarray["Date"]; $TransactionStatus = $resultarray["Status"]; $TransactionType = $resultarray["Type"]; $TransactionAccount = $resultarray["Account"]; $TransactionToAccount = $resultarray["ToAccount"];
public static function to_0_9_9() { $parameterarray = array("disable_authentication" => costant::disable_authentication() ? "True" : "False", "user_username" => costant::login_username(), "user_password" => costant::login_password(), "disable_payee" => costant::disable_payee() ? "True" : "False", "disable_category" => "False", "defaultaccountname" => costant::transaction_default_account(), "desktop_guid" => costant::desktop_guid()); various::update_configuration_file($parameterarray); $const_dbpath = costant::database_path(); $db = new PDO("sqlite:{$const_dbpath}"); $db->exec("ALTER TABLE Payee_List ADD DefCateg TEXT"); $db->exec("ALTER TABLE Payee_List ADD DefSubCateg TEXT"); $db->exec("UPDATE Payee_List SET DefCateg = 'None', DefSubCateg = 'None'"); $db->exec("UPDATE New_Transaction SET Category = 'None', SubCategory = 'None'"); $db->exec("UPDATE Parameters SET Value = '0.9.9' WHERE Parameter = 'Version';"); $db = null; }