Skip to content

Commit

Permalink
made changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zume2020 committed Oct 11, 2018
2 parents 2a7ebfb + 5efc6d6 commit 579e245
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 73 deletions.
2 changes: 0 additions & 2 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
AllowOverride All
ErrorDocument 404 http://localhost/CManager/error.php
1 change: 0 additions & 1 deletion CManager
Submodule CManager deleted from 204bf6
66 changes: 0 additions & 66 deletions index-2.php

This file was deleted.

3 changes: 2 additions & 1 deletion process.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

error_reporting( E_ALL & ~E_DEPRECATED & ~E_NOTICE );
error_reporting( E_ALL );

require_once 'connect.php';

Expand Down Expand Up @@ -31,6 +31,7 @@
}

}
}

// clossing connection
mysqli_close($link);
Expand Down
23 changes: 20 additions & 3 deletions task.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,13 @@
$result = mysqli_query($link, "SELECT `name`, `pirce` FROM `topics` WHERE `id`='".$id."'");
$row = $result->fetch_assoc();
echo "<h3>".$row['name']."</h3>";
echo "<h4>Rs".$row['pirce']."</h5>";
$pirce = $row['pirce'];
echo "<h4>Rs".$pirce."</h5>";

?>

<div id="amt"></div>

<div style="width: 40%" >
<table class="table table-condensed table-bordered table-hover table-striped">
<thead>
Expand All @@ -91,7 +95,7 @@
. " WHERE "
. " topics.id=". $id;

//echo($sql);
echo($sql);
$result = mysqli_query($link, $sql);
$num_rows = mysqli_num_rows($result);

Expand Down Expand Up @@ -151,14 +155,27 @@
<script type="text/javascript">

$(document).ready(function(){

function status() {
var n = $("input:checked").length;
var amt = '<?php echo $pirce;?>';
var str = amt+'x'+n+'='+'<b>'+(amt*n)+'</b>';

$("#amt").html(str);
}


status();


$(".cbx").click(function(){
var usr_id = $(this).attr('usrid');
var top_id = $(this).attr('topid');
var cbstat = $(this).is(':checked') ? 'ON' : 'OFF';


//console.log(ckb);

status();// move to on sucss inside ajax


$.post("process.php",{
Expand Down

0 comments on commit 579e245

Please sign in to comment.