コード例 #1
0
ファイル: seasonserver.php プロジェクト: harieshair/d2derp
<?php

include_once $_SERVER['DOCUMENT_ROOT'] . "/d2dconfig.php";
session_start();
include_once CLASSFOLDER . "/common.php";
include_once CLASSFOLDER . "/season.php";
$season = new seasonclass();
//ob_start("ob_gzhandler");
switch ($_POST['action']) {
    case "updateseason":
        $response = array();
        if (!empty($_POST['seasondetails'])) {
            $params = array();
            parse_str($_POST['seasondetails'], $params);
            $response = $season->updateseason($params);
            if (!empty($response['id'])) {
                $response['Message'] = "Season updated successfully";
            }
            return json_encode($response);
        } else {
            $response['Exception'] = "Please specify season details";
            $response['Severity'] = "high";
            return json_encode($response);
        }
        break;
}
コード例 #2
0
ファイル: updateseason.php プロジェクト: harieshair/d2derp
  <?php 
if (!isset($_SESSION)) {
    session_start();
}
if (isset($_POST['postvalue'])) {
    $seasonid = $_POST['postvalue'];
}
if (!empty($seasonid)) {
    include_once $_SERVER['DOCUMENT_ROOT'] . "/d2dconfig.php";
    include_once CLASSFOLDER . "/season.php";
    $season = new seasonclass();
    if (!empty($seasonid)) {
        $seasondata = $season->getSeasonById($seasonid);
    }
} else {
    $seasonid = 0;
    $seasondata = array('name' => "", 'id' => "0", 'description' => "");
}
?>
      <form  id="updateseason" name="updateseason" action="" method="post" novalidate="novalidate">  
       <input type="hidden" id="id" name="id" value="<?php 
echo !empty($seasonid) ? $seasonid : 0;
?>
" />
       <div class="box box-primary">
       <div class='box-header'><h3 class='box-title'>Update Season</h3></div>
        <div class="box-body"> 
          <div class="row">
            <div class="col-sm-12">
              <div class="form-group margin">
                <label><span class="text-error">*</span> Seaon Name</label>
コード例 #3
0
ファイル: allseasons.php プロジェクト: harieshair/d2derp
<?php

if (!isset($_SESSION)) {
    session_start();
}
include_once $_SERVER['DOCUMENT_ROOT'] . "/d2dconfig.php";
include_once CLASSFOLDER . "/season.php";
$season = new seasonclass();
$rows = 20;
?>

</script>
<div class="actionWizard"><a title="Create Season" class="btn btn-primary pull-right btn-xs " href="javascript:void(0)" onclick="getcontents('pages/configs/season/updateseason.php','content');"><i class="glyphicon  glyphicon-plus-sign"></i>Add New Season</a>
</div>
<div id="gridcontent" class ="content">
	<div class="row">
		<div class="col-xs-12">
			<div class="box">
				<div class="box-header">
					<h3 class="box-title">Seasons</h3>
				</div>
				<div class="box-body">
					<div id="example2_wrapper" class="dataTables_wrapper form-inline" role="grid"><div class="row"><div class="col-xs-6"></div><div class="col-xs-6"></div></div>
					<?php 
$page = 0;
$seasonlist = $season->showAllSeason();
if ($seasonlist != array()) {
    ?>


					<table id="example2" class="table table-bordered table-hover dataTable" aria-describedby="example2_info">