コード例 #1
0
ファイル: withdraw.php プロジェクト: dev4profesion/mmpawning
		<td></td>
		<td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
		&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
		<INPUT type="submit" name="button" value="Enter" style="padding:4px" /></td>
	</tr>


</table>
</form>
</legend></fieldset>

<?php 
$today = date('Y-m-d');
if ($_GET['submitted']) {
    $genericInsert = "INSERT INTO withdrawals(trans_id,source,amount,description,date,entryDate) " . "VALUES('','{$_POST['type']}','{$_POST['amount']}','{$_POST['description']}','{$_POST['date']}','{$today}');";
    $withdrawResult = mysql_query($genericInsert);
    if ($withdrawResult != null) {
        echo '<p>Data entered successfully</p>';
    } else {
        echo '<p>Failed to enter data</p>';
    }
    displayToday('withdraw');
}
if ($_GET['func'] == 'delete') {
    $id = $_GET['ref'];
    $deleted = deleteRecord($id, 'withdraw');
    if ($deleted) {
        echo '<p>Item deleted successfully.</p>';
    }
    displayToday('withdraw');
}
コード例 #2
0
    <li class="TabbedPanelsTab" tabindex="0">Sinna</li>
  </ul>
  <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent"><?php 
    displayToday('pawning', $date);
    ?>
</div>
    <div class="TabbedPanelsContent"><?php 
    displayToday('redeem', $date);
    ?>
</div>
     <div class="TabbedPanelsContent"><?php 
    displayToday('expences', $date);
    ?>
</div>
    <div class="TabbedPanelsContent"><?php 
    displayToday('sinna', $date);
    ?>
</div>
  </div>
</div>
<?php 
}
?>

<script type="text/javascript">
<!--
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>
コード例 #3
0
ファイル: sinna.php プロジェクト: dev4profesion/mmpawning
		<td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
		&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<INPUT
			type="submit" name="button" value="Update" /></td>
	</tr>

	</form>
	
</table>
</legend></fieldset>
<?php 
$dataSubmitted = $_GET['submitted'];
if ($dataSubmitted == "yes") {
    $genericInsert = "INSERT INTO sinna(ref_no,date) " . "VALUES('{$_SESSION['ref_no']}','{$_POST['date']}');";
    $sinnaResult = mysql_query($genericInsert);
    $goldUpdate = "UPDATE gold SET status='sinna' WHERE ref_no='{$_SESSION['ref_no']}'";
    $goldUpdate = mysql_query($goldUpdate);
    if ($sinnaResult && $goldUpdate) {
        echo '<p>Data entered successfully</p>';
    } else {
        echo '<p>Failed to enter data</p>';
    }
    displayToday('sinna');
}
if ($_GET['func'] == 'delete') {
    $id = $_GET['ref'];
    $deleted = deleteRecord($id, 'sinna');
    if ($deleted) {
        echo '<p>Item deleted successfully.</p>';
    }
    displayToday('sinna');
}
コード例 #4
0
ファイル: deposit.php プロジェクト: dev4profesion/mmpawning
	<tr>
		<td></td>
		<td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
		&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
		<INPUT type="submit" name="button" value="Enter" style="padding:4px" /></td>
	</tr>

	
</table>
</form>
</legend></fieldset>
<?php 
$today = date('Y-m-d');
if ($_GET['submitted']) {
    $genericInsert = "INSERT INTO deposit(trans_id,source,amount,discription,date,entryDate) " . "VALUES('','{$_POST['type']}','{$_POST['amount']}','{$_POST['description']}','{$_POST['date']}','{$today}');";
    $depositResult = mysql_query($genericInsert);
    if ($depositResult != null) {
        echo '<p>Data entered successfully</p>';
    } else {
        echo '<p>Failed to enter data</p>';
    }
    displayToday('deposit');
}
if ($_GET['func'] == 'delete') {
    $id = $_GET['ref'];
    $deleted = deleteRecord($id, 'deposit');
    if ($deleted) {
        echo '<p>Item deleted successfully.</p>';
    }
    displayToday('deposit');
}
コード例 #5
0
ファイル: pawning.php プロジェクト: dev4profesion/mmpawning
    $updatedCash = $cash['cash'] - $_POST['amount'];
    $cashUpdate = mysql_query("UPDATE hand_cash SET cash='{$updatedCash}' WHERE branch='{$_SESSION['branch']}'");
    if (($pawningResult && $referenceResult && $cashUpdate) != null) {
        echo '<p>Data entered successfully</p>';
    } else {
        echo '<p>Failed to enter data</p>';
    }
    displayToday('pawning');
}
//session_start();
if ($_GET['func'] == 'delete') {
    $id = $_GET['ref'];
    $deleted = deleteRecord($id, 'pawning');
    if ($deleted) {
        echo '<p>Item deleted successfully.</p>';
    }
    displayToday('pawning');
}
?>
<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur"]});
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {validateOn:["blur"]});
var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1", {validateOn:["blur"]});
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {validateOn:["blur"]});
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "real", {validateOn:["change"]});
var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "integer", {validateOn:["blur"]});
var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6", "none", {validateOn:["blur"]});
//-->
</script>
コード例 #6
0
ファイル: redeem.php プロジェクト: dev4profesion/mmpawning
</fieldset>

<?php 
if ($_GET['submitted']) {
    $ref = $_SESSION['ref_no'];
    $today = date('Y-m-d');
    $genericInsert = "INSERT INTO redeem(redeem_id,ref_no,date,amount,interest_gained,branch,entryDate) " . "VALUES('','{$ref}','{$_POST['date']}','{$_POST['amount']}','{$_POST['interest']}','{$_SESSION['branch']}','{$today}');";
    $redeemResult = mysql_query($genericInsert);
    $redeemTotal = mysql_fetch_assoc(mysql_query("SELECT SUM(amount) AS total FROM redeem WHERE ref_no='{$ref}'"));
    $pawnedAmount = mysql_fetch_assoc(mysql_query("SELECT amount FROM pawning WHERE ref_no='{$ref}'"));
    if ($pawnedAmount['amount'] <= $redeemTotal['total']) {
        $goldDelete = "DELETE FROM gold WHERE ref_no='{$ref}'";
        $goldResult = mysql_query($goldDelete);
    }
    $cashResult = mysql_query("SELECT cash FROM hand_cash WHERE branch='{$_SESSION['branch']}'");
    $cash = mysql_fetch_array($cashResult);
    $updatedCash = $cash['cash'] + $_POST['amount'];
    $cashUpdate = mysql_query("UPDATE hand_cash SET cash='{$updatedCash}' WHERE branch='{$_SESSION['branch']}'");
    if ($redeemResult && $cashUpdate != null) {
        echo '<p>Redeem entered successfully</p>';
    }
    displayToday('redeems');
}
if ($_GET['func'] == 'delete') {
    $id = $_GET['ref'];
    $deleted = deleteRecord($id, 'redeem');
    if ($deleted) {
        echo '<p>Item deleted successfully.</p>';
    }
    displayToday('redeems');
}
コード例 #7
0
ファイル: expences.php プロジェクト: dev4profesion/mmpawning
<?php 
$today = date('Y-m-d');
//displayToday('expenses');
$dataSubmitted = $_GET['submitted'];
if ($dataSubmitted == "yes") {
    $genericInsert = "INSERT INTO expenses(discription,ex_id,branch,date,amount,entryDate)" . "VALUES('{$_POST['dis']}','','{$_POST['branch']}','{$_POST['date']}','{$_POST['amount']}','" . $today . "');";
    $exResult = mysql_query($genericInsert);
    $cashResult = mysql_query("SELECT cash FROM hand_cash WHERE branch='{$_POST['branch']}'");
    $cash = mysql_fetch_assoc($cashResult);
    $updatedCash = $cash['cash'] - $_POST['amount'];
    $cashUpdate = mysql_query("UPDATE hand_cash SET cash='{$updatedCash}' WHERE branch='{$_POST['branch']}'");
    if (($exResult && $cashUpdate) != null) {
        echo '<p>Data entered successfully</p>';
    } else {
        echo '<p>Failed to enter data</p>';
    }
    displayToday('expences');
}
//session_start();
if ($_GET['func'] == 'delete') {
    $id = $_GET['ref'];
    $deleted = deleteRecord($id, 'expences');
    if ($deleted) {
        echo '<p>Item deleted successfully.</p>';
    }
    displayToday('expences');
}
?>