예제 #1
0
파일: cost.php 프로젝트: netSys0/MoneyIO
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 * 
 * 
 */
require_once __DIR__ . "/../../../../session.php";
require_once __DIR__ . "/../../../../moneyio.php";
require_once __DIR__ . "/../../../../mio-cost/update/cost_func.php";
open_session();
if (isset($_SESSION) && !empty($_SESSION)) {
    //$wallet_user_id = $_GET["wallet_id"];
    $wallet_id = $_GET["wallet_id"];
    $cost_id = $_GET["cost_id"];
    //$cost_user_id = $_SESSION["mio-username_id"];
    $cost_info = get_cost($cost_id, $wallet_id);
    ?>
	<!DOCTYPE html>

<html>
	<head>
		<meta charset="utf8">
		<meta keywords="user">
		<meta author="netSys">
		<meta description="This example test">
		<title>Create cost </title>
	</head>
	<body>
	<form action="../../../../mio-cost/update/cost.php?c_id=<?php 
    echo $cost_info->cost_id;
    ?>
예제 #2
0
function display_edit_form($objid, $object_general, $object_rights, $object_lifecycle, $object_tech)
{
    echo $object_general['title'];
    ?>
  <form method="post" action="edit_this_metadata.php">
  <table>
    <tr>
      <td>Hidden:</td>
      <td><input type="hidden" name="objid" value="<?php 
    echo $objid;
    ?>
" /></td></tr>
    <tr>
      <td>Title:</td>
      <td><input type="text" name="newtitle" value="<?php 
    echo $object_general['title'];
    ?>
" /></td></tr>
    <tr>
      <td>Author:</td>
      <td><input type="text" name="newauthor" value="<?php 
    echo $object_general['author'];
    ?>
"/></td></tr>
     <tr>
              <td>Discipline</td>
              <td valign="top">
                <select name="newdiscipline" size="1">
                  <?php 
    $disc_array = get_discipline();
    foreach ($disc_array as $thisdisc) {
        echo "<option value=\"" . $thisdisc['discname'] . "\"";
        if ($thisdisc['discname'] == $object_general['discipline']) {
            echo "selected";
        }
        echo ">" . $thisdisc['discname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
         <tr>
              <td>Language</td>
              <td valign="top">
                <select name="newlanguage" size="1">
                  <?php 
    $lang_array = get_language();
    foreach ($lang_array as $thislang) {
        echo "<option value=\"" . $thislang['langname'] . "\"";
        if ($thislang['langname'] == $object_general['language']) {
            echo "selected";
        }
        echo ">" . $thislang['langname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
    <tr>
      <td>Keyword:</td>
      <td><input type="text" name="newkeyword" value="<?php 
    echo $object_general['keyword'];
    ?>
" /></td></tr> 
    <tr>
              <td>Structure</td>
              <td valign="top">
                <select name="newstructure" size="1">
                  <?php 
    $struct_array = get_structure();
    foreach ($struct_array as $thisstruct) {
        echo "<option value=\"" . $thisstruct['structname'] . "\"";
        if ($thisstruct['structname'] == $object_general['structure']) {
            echo "selected";
        }
        echo ">" . $thisstruct['structname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
     <tr>
              <td>Aggregation Level</td>
              <td valign="top">
                <select name="newaggrelvl" size="1">
                  <?php 
    $aggrelvl_array = get_aggrelvl();
    foreach ($aggrelvl_array as $thisaggrelvl) {
        echo "<option value=\"" . $thisaggrelvl['aggrelvlname'] . "\"";
        if ($thisaggrelvl['aggrelvlname'] == $object_general['aggregation_level']) {
            echo "selected";
        }
        echo ">" . $thisaggrelvl['aggrelvlname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
    <tr>
      <td>Version:</td>
      <td><input type="text" name="newversion" value="<?php 
    echo $object_lifecycle['version'];
    ?>
" /></td></tr>
     <tr>
              <td>Status</td>
              <td valign="top">
                <select name="newstatus" size="1">
                  <?php 
    $status_array = get_status();
    foreach ($status_array as $thisstatus) {
        echo "<option value=\"" . $thisstatus['statusname'] . "\"";
        if ($thisstatus['statusname'] == $object_lifecycle['status']) {
            echo "selected";
        }
        echo ">" . $thisstatus['statusname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr> 
    <tr>
              <td>Interactivity Type</td>
              <td valign="top">
                <select name="newinteracttype" size="1">
                  <?php 
    $intertype_array = get_intertype();
    foreach ($intertype_array as $thisintertype) {
        echo "<option value=\"" . $thisintertype['intertypename'] . "\"";
        if ($thisintertype['intertypename'] == $object_general['interactivity_type']) {
            echo "selected";
        }
        echo ">" . $thisintertype['intertypename'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>            
    <tr>
              <td>Learning Resource Type</td>
              <td valign="top">
                <select name="newresourcetype" size="1">
                  <?php 
    $resourcetype_array = get_resourcetype();
    foreach ($resourcetype_array as $thisresourcetype) {
        echo "<option value=\"" . $thisresourcetype['resourcetypename'] . "\"";
        if ($thisresourcetype['resourcetypename'] == $object_general['learning_res_type']) {
            echo "selected";
        }
        echo ">" . $thisresourcetype['resourcetypename'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>    
   <tr>
              <td>Interactivity Level</td>
              <td valign="top">
                <select name="newinteractlvl" size="1">
                  <?php 
    $interactlvl_array = get_interactlvl();
    foreach ($interactlvl_array as $thisinteractlvl) {
        echo "<option value=\"" . $thisinteractlvl['interactlvlname'] . "\"";
        if ($thisinteractlvl['interactlvlname'] == $object_general['interactivity_level']) {
            echo "selected";
        }
        echo ">" . $thisinteractlvl['interactlvlname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>    
   <tr>
              <td>Intended End User Role</td>
              <td valign="top">
                <select name="newenduserrole" size="1">
                  <?php 
    $enduserrole_array = get_enduserrole();
    foreach ($enduserrole_array as $thisenduserrole) {
        echo "<option value=\"" . $thisenduserrole['enduserrolename'] . "\"";
        if ($thisenduserrole['enduserrolename'] == $object_general['intended_end_user_role']) {
            echo "selected";
        }
        echo ">" . $thisenduserrole['enduserrolename'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>
   <tr>
      <td>Typical Learning Time:</td>
      <td><input type="text" name="newlearningtime" value="<?php 
    echo $object_general['typical_learning_time'];
    ?>
" /></td></tr>        
   <tr>
              <td>Cost</td>
              <td valign="top">
                <select name="newcost" size="1">
                  <?php 
    $cost_array = get_cost();
    foreach ($cost_array as $thiscost) {
        echo "<option value=\"" . $thiscost['costname'] . "\"";
        if ($thiscost['costname'] == $object_rights['cost']) {
            echo "selected";
        }
        echo ">" . $thiscost['costname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr>  
   <tr>
              <td>Copyrights and Other Restrictions</td>
              <td valign="top">
                <select name="newcopyright" size="1">
                  <?php 
    $copyright_array = get_copyright();
    foreach ($copyright_array as $thiscopyright) {
        echo "<option value=\"" . $thiscopyright['copyrightname'] . "\"";
        if ($thiscopyright['copyrightname'] == $object_rights['copyrights_and_other_res']) {
            echo "selected";
        }
        echo ">" . $thiscopyright['copyrightname'] . "</option>";
    }
    ?>
                  </select>
              </td></tr> 
                                             
   </table>
   <div class="page-header">
   <p></p>
   </div>
   <button class="btn btn-primary" type="submit">Update Object</button>
   </form>
   
   
 <?php 
}
예제 #3
0
        $error_str .= make_table(array($cw['item_name'], $cw['notes'], $cw['item_cost']), "75%");
        $error_str .= $eng_text . "</table>";
    }
    /**************************
     * Misc Items
     **************************/
    $misc_text = "";
    if (avail_check(2003)) {
        $misc_text .= make_row(array($cw['shrouding_unit'], $st[657], $cloak_cost, "<a href='{$filename}?buy=4'>" . $cw['buy'] . "</a>", popup_help("help.php?upgrades=1&popup=1&chosen=ls", 350, 315)));
    }
    if (avail_check(2004)) {
        $cost_temp = get_cost("sc");
        $misc_text .= make_row(array($cw['scanner'], $st[658], $cost_temp['cost'], "<a href='{$filename}?buy=7'>" . $cw['buy'] . "</a>", popup_help("help.php?upgrades=1&popup=1&chosen=sc", 350, 315)));
    }
    if (avail_check(2005)) {
        $cost_temp = get_cost("sh");
        $misc_text .= make_row(array($st[659], $st[660], $cost_temp['cost'], "<a href='{$filename}?buy=5'>" . $cw['buy'] . "</a>", popup_help("help.php?upgrades=1&popup=1&chosen=sh", 350, 315)));
    }
    if (!empty($misc_text)) {
        $error_str .= "<br /><br />" . $cw['misc'];
        $error_str .= make_table(array($cw['item_name'], $cw['notes'], $cw['item_cost']), "75%");
        $error_str .= $misc_text . "</table>";
    }
    $error_str .= "<p /><a href='help.php?topic=Upgrades' target='_blank'>" . $st[661] . "</a>";
}
$rs = "<p /><a href='earth.php'>" . $cw['return_to_earth'] . "</a>";
print_page($cw['accessories_upgrades'], $error_str);
#function for adding 'normal' upgrades to a ship.
function make_basic_upgrade($upgrade_str, $upgrade_sql, $inc_amount, $cost)
{
    global $user, $user_ship, $db_name;
예제 #4
0
    }
}
$error_str .= sprintf($st[417], $upgrade_pods[upgrade_slots]);
$error_str .= $st[418];
$error_str .= $st[419];
$error_str .= make_table(array($cw['item_name'], $cw['notes'], $cw['credits_cost'], $cw['tech_cost']), "75%");
if (avail_check(5000)) {
    $buy_many = "";
    $num = $max_pc - $user_ship['num_pc'];
    if ($user_ship['upgrade_slots'] > 1 && $num > 1) {
        $buy_many .= "<a href='{$filename}?buy=3&many_pc={$num}'>Acheter {$num}</a>";
    }
    $error_str .= make_row(array($cw['plasma_cannon'], sprintf($st[420], $max_pc), $plasma_cannon_c, $plasma_cannon_t, "<a href='{$filename}?buy=3'>" . $cw['buy'] . "</a>", $buy_many, popup_help("help.php?upgrades=1&popup=1&chosen=pc", 350, 315)));
}
if (avail_check(5002)) {
    $cost_temp = get_cost("ew");
    $buy_many = "";
    $num = $max_ew - $user_ship['num_ew'];
    if ($user_ship['upgrade_slots'] > 1 && $num > 1) {
        $buy_many .= "<a href='{$filename}?buy=5&many_ew={$num}'>Acheter {$num}</a>";
    }
    $error_str .= make_row(array($cw['electronic_warfare_pod'], "Max of {$max_pc} per ship.", $cost_temp['cost'], $cost_temp['tech_cost'], "<a href='{$filename}?buy=5'>" . $cw['buy'] . "</a>", $buy_many, popup_help("help.php?upgrades=1&popup=1&chosen=ew", 350, 315)));
}
$error_str .= "</table>";
$error_str .= "<br /><br />" . $cw['misc'] . "";
$error_str .= make_table(array($cw['item_name'], $cw['notes'], $cw['credits_cost'], $cw['tech_cost']), "75%");
if (avail_check(5003)) {
    if ($GAME_VARS['ship_warp_cost'] == -1) {
        $engine_changes = $st[421];
    } else {
        $engine_changes = "";
예제 #5
0
 if (isset($changed_factor['config'])) {
     //work out upgrade costs && upgrade names within the config
     if (config_check("sc", $changed_factor)) {
         $temp_cost = get_cost("sc");
         $scanner_cost = $temp_cost['cost'];
         $xtra_cost += $scanner_cost;
         $up_txt .= "1 " . $cw['scanner'] . ": <b>{$scanner_cost}</b><br />";
     }
     if (config_check("sh", $changed_factor)) {
         $temp_cost = get_cost("sh");
         $shield_charger = $temp_cost['cost'];
         $xtra_cost += $shield_charger;
         $up_txt .= "1 " . $st[715] . ": <b>{$shield_charger}</b><br />";
     }
     if (config_check("ws", $changed_factor)) {
         $temp_cost = get_cost("ws");
         $stabiliser_upgrade = $temp_cost['cost'];
         $xtra_cost += $stabiliser_upgrade;
         $up_txt .= "1 " . $st[716] . ": <b>{$stabiliser_upgrade}</b><br />";
     }
     if (config_check("ls", $changed_factor)) {
         $f_cloak_cost = round($cloak_cost * ($user_ship['size'] / 100)) * 15;
         $xtra_cost += $f_cloak_cost;
         $up_txt .= "1 " . $st['cloak'] . ": <b>{$f_cloak_cost}</b><br />";
     }
     if (config_check("e1", $changed_factor)) {
         $f_engine_cost = round($engine_upgrade * ($user_ship['size'] / 100)) * 15;
         $xtra_cost += $f_engine_cost;
         $up_txt .= "1 " . $cw['engine_upgrade'] . ": <b>{$f_engine_cost}</b><br />";
     }
 }