/Sistem Informasi Sekolah Online - Server/soap_sis_entry_siswa_spp.php
PHP | 159 lines | 106 code | 24 blank | 29 comment | 4 complexity | 1cc162336229e518321a512cf39dcc2a MD5 | raw file
- <?php
-
- /**
- * Ini adalah project open source yang dikembangkan oleh Impossible Team
- *
- * Copyright (c) 2011 ekoindri. <ekoindri@ekoindri.com>
- *
- * Versi: 1.2
- * Developed by: Impossible Team
- * Leader: Eko Indriyawan
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- *
- */
-
- require_once("rpcl/rpcl.inc.php");
- require_once("soap_sis_common.php");
- require_once("soap_sis_common_input.php");
- //Includes
- use_unit("webservices.inc.php");
- use_unit("forms.inc.php");
- use_unit("extctrls.inc.php");
- use_unit("stdctrls.inc.php");
-
- function DATA_SISWA(
- $connection_string){
- mysql_connect($connection_string[server_host], $connection_string[server_username], $connection_string[server_password]);
- mysql_select_db($connection_string[server_database]) or die(mysql_error());
-
- $sql = "
- SELECT ID,
- SISWA_KODE,
- SISWA_NAMA_AWAL,
- SISWA_NAMA_TENGAH,
- SISWA_NAMA_AKHIR
- FROM TABEL_SISWA
- ORDER BY SISWA_NAMA_AWAL ASC
- ";
- $result = mysql_query($sql);
-
- $numrows = mysql_num_rows($result);
- $siswalist = array();
- for($x = 0; $x < $numrows; $x++){
- $siswalist[] = mysql_fetch_array($result);
- }
-
- mysql_close();
- return array('Berhasil', $siswalist);
- }
-
- function SISWA_SIMPAN_SPP_DATASET($connection_string, $daftarspp){
-
- mysql_connect($connection_string[server_host], $connection_string[server_username], $connection_string[server_password]);
- mysql_select_db($connection_string[server_database]) or die(mysql_error());
-
- for($x = 0; $x < 100; $x++){
- $spp = $daftarspp[$x];
- if($spp[SISWA_ID] != '') {
-
- $query = "
- INSERT INTO TABEL_SISWA_SPP
- (
- SISWA_ID,
- SPP_TGL,
- SPP_NILAI,
- SPP_KETERANGAN
- )
- VALUES
- (
- '" . $spp[SISWA_ID] . "',
- '" . $spp[SPP_TGL] . "',
- '" . $spp[SPP_NILAI] . "',
- '" . $spp[SPP_KETERANGAN] . "'
- )
- ";
-
- $result = mysql_query($query);
-
- $query = "
- INSERT INTO TABEL_JURNAL
- (
- SUBJECT_ID,
- JURNAL_SUMBER,
- JURNAL_TGL,
- JURNAL_DEBIT,
- JURNAL_KETERANGAN
- )
- VALUES
- (
- '" . $spp[SISWA_ID] . "',
- 'UANG SPP',
- '" . $spp[SPP_TGL] . "',
- '" . $spp[SPP_NILAI] . "',
- '" . $spp[SPP_KETERANGAN] . "'
- )
- ";
-
- $result = mysql_query($query);
-
- }
- }
- }
-
- //Class definition
- class DM_ENTRY_SISWA_SPP extends DataModule{
- public $SIS_ENTRY_SISWA_SPP = null;
- function SIS_ENTRY_SISWA_SPPAddComplexTypes($sender, $params){
- RegisterCommonComplexType_InfoServer($this->$SIS_ENTRY_SISWA_SPP);
- RegisterCommonComplexType_InfoSiswa_Combo($this->$SIS_ENTRY_SISWA_SPP);
- RegisterCommonComplexType_DataSPPInput($this->$SIS_ENTRY_SISWA_SPP);
- }
-
- function SIS_ENTRY_SISWA_SPPRegisterServices($sender, $params){
-
- $this->$SIS_ENTRY_SISWA_SPP->register(
- "DATA_SISWA",
- array(
- 'connection_string'=>'tns:TInfoServer'),
- array('return'=>'xsd:string',
- 'siswalist'=>'tns:TInfoDaftarSiswa')
- );
-
- $this->$SIS_ENTRY_SISWA_SPP->register
- (
- "SISWA_SIMPAN_SPP_DATASET",
- array(
- 'connection_string'=>'tns:TInfoServer',
- 'daftarspp'=>'tns:TDataSPPInput'),
- array('return'=>'xsd:string'),
- 'http://localhost/'
- );
-
- }
- }
-
- global $application;
-
- global $DM_ENTRY_SISWA_SPP;
-
- //Creates the form
- $DM_ENTRY_SISWA_SPP = new DM_ENTRY_SISWA_SPP($application);
-
- //Read from resource file
- $DM_ENTRY_SISWA_SPP->loadResource(__FILE__);
-
- ?>