Ejemplo n.º 1
0
function getListNameByID($id)
{
    global $characterID, $keyID, $vCode;
    $list = GetValue("SELECT list_name FROM list_names WHERE list_id={$id}");
    if (!$list) {
        $url = "https://api.eveonline.com/char/mailinglists.xml.aspx?characterID={$characterID}&keyID={$keyID}&vCode={$vCode}";
        $xml_object = simplexml_load_string(file_get_contents($url));
        $xml_array = object2array($xml_object);
        foreach ($xml_array["result"]["rowset"]["row"] as $lst) {
            $lstdata = array('list_id' => $lst['@attributes']['listID'], 'list_name' => $lst['@attributes']['displayName']);
            @InsertData($lstdata, 'list_names');
        }
    }
    $list = GetValue("SELECT list_name FROM list_names WHERE list_id={$id}");
    return $list;
}
Ejemplo n.º 2
0
<?php

/**
 * Sensor data push script
 * Handles all the incoming data from various sensors
 *
 * function examples
 * push.php?sid=0&auth=
 */
if (isset($_GET['sid']) && isset($_GET['auth']) && isset($_GET['val'])) {
    include_once 'config.php';
    include_once 'dbfunctions.php';
    $conn = OrclConnect();
    $sid = $_GET['sid'];
    $auth = $_GET['auth'];
    $val = $_GET['val'];
    $token = GetAuthToken($conn, $sid);
    if ($auth == $token) {
        echo "Auth Succeed: ";
        echo InsertData($conn, $sid, $val);
    } else {
        echo "Auth Failed";
    }
}
Ejemplo n.º 3
0
    $name = $_POST['name'];
    $parmalink = generete_permalink($_POST['name']);
    $desc = mysql_real_escape_string(stripcslashes($_POST['desc']));
    $category = $_POST['category'];
    $shortdesc = trim($_POST["shortdesc"]) != "" ? $_POST['shortdesc'] : string_sorter($_POST['desc'], 500);
    $tags = $_POST['tags'];
    $status = isset($_POST["submit_standard"]) ? "publish" : "draft";
    //Adding Featured Image
    if ($_FILES["postimage"]["name"] != "") {
        $newname = image_upload($_FILES["postimage"]["tmp_name"], $_FILES["postimage"]["name"], uniqid(), "images/featured_image/");
    } else {
        $newname = "null.jpg";
    }
    //Adding General information
    $form_data = array('userid' => $_SESSION['userid'], 'type' => "standard", 'name' => mysql_real_escape_string(stripcslashes($name)), 'parmalink' => mysql_real_escape_string(stripcslashes($parmalink)), 'description' => mysql_real_escape_string(stripcslashes($desc)), 'short_description' => mysql_real_escape_string(stripcslashes($shortdesc)), 'tags' => mysql_real_escape_string(stripcslashes($tags)), 'image' => $newname, 'create_date' => date("Y-m-d H:i:s"), 'last_update' => date("Y-m-d H:i:s"), 'status' => $status);
    InsertData(POST, $form_data);
    $id = mysql_insert_id();
    //Adding Category
    foreach ($category as $cat) {
        mysql_query("INSERT INTO `" . POST_CATEGORY . "`(`post_id`, `category_id`) VALUES ('{$id}','{$cat}')");
    }
    //Adding meta
    update_post_meta($id, "meta_title", mysql_real_escape_string($name));
    update_post_meta($id, "meta_description", mysql_real_escape_string($shortdesc));
    //Adding Tags To database
    $tagarr = explode(",", $tags);
    foreach ($tagarr as $eachtag) {
        add_tag($eachtag);
    }
    header("location:user_post.php?success");
}
Ejemplo n.º 4
0
        $hasil2 = bukaquery($sql2);
        $baris2 = mysql_fetch_row($hasil2);
        $nip = $baris2[0];
        $hasil2 = bukaquery($sql2);
        $baris2 = mysql_fetch_row($hasil2);
        if (JumlahBaris($hasil2) == 0) {
            header("Location:index.php");
        } else {
            session_start();
            HapusAll(" sesion ");
            InsertData(" sesion ", "'{$nip}'");
            $ses_pegawai = $hasil2[0];
            session_register("ses_pegawai");
            $url = "index.php?act=HomeAdmin";
            header("Location:" . $url);
        }
    } else {
        session_start();
        HapusAll(" sesion ");
        InsertData(" sesion ", "'{$nip}'");
        /*$ses_admin = $hasil[0];
        		session_register("ses_admin");
        		$url = "index.php?act=HomeAdmin&type=$type";*/
        if ($type == 'ADMIN') {
            $ses_admin = $hasil[0];
            session_register("ses_admin");
            $url = "index.php?act=HomeAdmin";
        }
        header("Location:" . $url);
    }
}
Ejemplo n.º 5
0
<!DOCTYPE html>
<?php 
require_once '.././libs/csv-crud.php';
require_once '.././libs/breadcrumb.php';
require_once '.././libs/header.php';
$Id = $Name = '';
$data = array();
if (!empty($_POST)) {
    $ID = $_POST['month_id'];
    $Name = $_POST['month_name'];
    $_savedata = array('MonthID' => $ID, 'MonthName' => $Name);
    InsertData('.././data/month.csv', $_savedata);
    redirect('month-list.php');
}
?>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="author" content="mmt">

  <title>ANGEL</title>
  <link rel="stylesheet" href="../css/bootstrap.min.css"  />
  <link rel="stylesheet" href="../css/font-awesome.min.css" />
  <link rel="stylesheet" type="text/css" href="../css/animate.min.css">
  <link rel="stylesheet" href="../css/font.css" />
  <link rel="stylesheet" href="../css/style.css" />
  <link rel="stylesheet" href="../css/form.css" />
  <link rel="stylesheet" href="../css/theme.css" />
</head>
Ejemplo n.º 6
0
<!DOCTYPE html>
<html>
<body>

<?php 
echo "<h2>PHP is Fun!</h2>";
echo "Opening Connection to Azure <br>";
$conn = OpenConnection();
echo "Connection Established <br>";
echo "Inserting Data by Executing TSQL Command<br>";
InsertData($conn);
echo "Insert complete";
function OpenConnection()
{
    try {
        $serverName = "tcp:j7luugiwb8.database.windows.net,1433";
        $connectionOptions = array("Database" => "Texting_APP", "Uid" => "arufolo@cardinalsolutions.com@j7luugiwb8", "PWD" => "P@ssw0rd1");
        $conn = sqlsrv_connect($serverName, $connectionOptions);
        if ($conn == false) {
            die(FormatErrors(sqlsrv_errors()));
        }
        return $conn;
    } catch (Exception $e) {
        echo "Error!";
    }
}
function InsertData($conn)
{
    echo "Inside The Insert Function <br>";
    try {
        $tsql = "INSERT INTO TextQueue (PhoneNumber, TextContent) VALUES ('+17047856193', 'This is a test insert' )";
 $xml_array = object2array($xml_object);
 $characterID = $xml_array["result"]["key"]["rowset"]["row"]["@attributes"]["characterID"];
 $characterNAME = getUserNameByID($characterID);
 //get mail headers
 $maildata = "https://api.eveonline.com/char/MailMessages.xml.aspx?characterID={$characterID}&keyID={$keyID}&vCode={$vCode}";
 $xml_object2 = simplexml_load_string(file_get_contents($maildata));
 $xml_array2 = object2array($xml_object2);
 if (isset($xml_array2["result"]["rowset"]["row"]) && count($xml_array2["result"]["rowset"]["row"]) && is_array($xml_array2["result"]["rowset"]["row"])) {
     foreach ($xml_array2["result"]["rowset"]["row"] as $mailitem) {
         $mail = $mailitem["@attributes"];
         $check = GetValue("SELECT `message_id` FROM `processed_mails` WHERE `key_id` = {$keyID} AND `message_id` = {$mail["messageID"]}");
         if (!$check) {
             //init filter state
             $no_send = false;
             //don't send the same message twice
             InsertData(array('key_id' => $keyID, 'message_id' => $mail["messageID"]), 'processed_mails');
             //init mail title
             $mail_title = $mail["title"];
             //init list of mail recipients
             $to_list = '';
             if ($mail["toListID"] > '') {
                 if ($filters[$mail["toListID"]]) {
                     $no_send = true;
                 }
                 $list = getListNameByID($mail["toListID"]);
                 $mail_title = '' . $list . ' // ' . $mail_title;
                 $to_list .= '<a style="font-weight:bold; color: #02FA46; text-decoration: none" href="https://gate.eveonline.com/Mail/MailingList/' . $mail['toListID'] . '/">' . $list . '</a>, ';
             }
             if ($mail["toCorpOrAllianceID"] > '') {
                 $org = getOrgNameByID($mail["toCorpOrAllianceID"]);
                 $name = $org['name'];
Ejemplo n.º 8
0
<?php

include "config/config.php";
include "include/function.php";
include "include/logincheck.php";
if (isset($_POST['submit'])) {
    if ($_POST['parent'] == "0") {
        $label = '0';
    } else {
        $cat_arr = get_the_menu($_POST['parent']);
        $label = intval($cat_arr['label']) + 1;
    }
    $form_data = array('name' => $_POST['name'], 'desc' => mysql_real_escape_string(stripslashes($_POST['desc'])), 'parent' => $_POST['parent'], 'sort_order' => '0', 'label' => $label, 'image' => "null.jpg");
    InsertData(MENU, $form_data);
    add_log_admin("Menu {$_POST['name']}{{" . $id . "}} is added");
    header("location:menu.php?addsuccess");
}
if (isset($_POST['submitupdate'])) {
    if ($_POST['parent'] == "0") {
        $label = '0';
    } else {
        $cat_arr = get_the_menu($_POST['parent']);
        $label = intval($cat_arr['label']) + 1;
    }
    $id = $_GET['edit'];
    $form_data = array('name' => $_POST['name'], 'desc' => mysql_real_escape_string(stripslashes($_POST['desc'])), 'parent' => $_POST['parent'], 'label' => $label);
    UpdateData(MENU, $form_data, "WHERE slno = " . $id . "");
    add_log_admin("Post Category {$_POST['name']}{{" . $id . "}} is updated");
    header("location:menu.php?editsuccess");
}
?>
Ejemplo n.º 9
0
<?php

include "config/config.php";
include "include/function.php";
include "include/logincheck.php";
if (isset($_POST['submit'])) {
    $permalink = str_replace(" ", "-", trim(strtolower($_POST['title'])));
    $form_data = array('user' => $_SESSION['auserid'], 'category' => mysql_real_escape_string($_POST['category']), 'title' => mysql_real_escape_string($_POST['title']), 'permalink' => mysql_real_escape_string($permalink), 'desctiption' => mysql_real_escape_string($_POST['description']), 'image' => "", 'meta_title' => mysql_real_escape_string($_POST['mata_title']), 'meta_tag' => mysql_real_escape_string($_POST['mata_keywords']), 'meta_desc' => mysql_real_escape_string($_POST['mata_description']), 'status' => $_POST['publish'], 'date' => date("Y-m-d H:i:s"), 'last_modified' => date("Y-m-d H:i:s"));
    InsertData(FAQ, $form_data);
    $id = mysql_insert_id();
    header("location:edit-faq.php?id={$id}&addsuccess");
}
?>
<!DOCTYPE html>


<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->

<head>
<meta charset="utf-8"/>
<title><?php 
echo the_option("website_title");
?>
 | Add FAQ</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
Ejemplo n.º 10
0
<!DOCTYPE html>
<?php 
require_once '.././libs/csv-crud.php';
require_once '.././libs/breadcrumb.php';
require_once '.././libs/header.php';
$Id = $Name = '';
$data = array();
if (!empty($_POST)) {
    $ID = $_POST['city_id'];
    $Name = $_POST['city_name'];
    $_savedata = array('CityID' => $ID, 'CityName' => $Name);
    InsertData('.././data/city.csv', $_savedata);
    redirect('city-list.php');
}
?>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="author" content="mmt">

  <title>ANGEL</title>
  <link rel="stylesheet" href="../css/bootstrap.min.css"  />
  <link rel="stylesheet" href="../css/font-awesome.min.css" />
  <link rel="stylesheet" type="text/css" href="../css/animate.min.css">
  <link rel="stylesheet" href="../css/font.css" />
  <link rel="stylesheet" href="../css/style.css" />
  <link rel="stylesheet" href="../css/form.css" />
  <link rel="stylesheet" href="../css/theme.css" />
</head>
Ejemplo n.º 11
0
    $_SESSION['evegate']['loggedin'] = 1;
}
if ($_POST['mode'] == 'login') {
    $_POST['vcode'] = mysql_real_escape_string($_POST['vcode']);
    $_POST['keyid'] = mysql_real_escape_string($_POST['keyid']);
    $api_key = GetRow("SELECT * FROM api_keys WHERE key_id = '{$_POST['keyid']}' AND v_code = '{$_POST['vcode']}' ");
    //if  not in db, try to register
    if (!$api_key['key_id']) {
        $url = 'https://api.eveonline.com/account/APIKeyInfo.xml.aspx?keyID=' . $_POST['keyid'] . '&vCode=' . $_POST['vcode'];
        $xml_object = simplexml_load_string(file_get_contents($url));
        $xml_array = object2array($xml_object);
        $characterID = $xml_array["result"]["key"]["rowset"]["row"]["@attributes"]["characterID"];
        $characterNAME = getUserNameByID($characterID);
        if (strlen($characterNAME) > 3) {
            $regdata = array('key_id' => $_POST['keyid'], 'v_code' => $_POST['vcode'], 'username' => $characterNAME);
            InsertData($regdata, 'api_keys');
            $api_key = GetRow("SELECT * FROM api_keys WHERE key_id = '{$_POST['keyid']}' AND v_code = '{$_POST['vcode']}' ");
        }
    }
    if (!$api_key['key_id']) {
        ?>
        <H3>Error! Bad api key.</H3>

        <?php 
        exit;
    }
    $_SESSION['evegate'][0] = $api_key;
    $_SESSION['evegate']['loggedin'] = 1;
}
// process post requests - end
?>
Ejemplo n.º 12
0
<?php

include "config/config.php";
include "include/function.php";
include "include/logincheck.php";
if (isset($_POST['submit'])) {
    if ($_POST['parent'] == "0") {
        $label = '0';
    } else {
        $cat_arr = get_the_category($_POST['parent']);
        $label = intval($cat_arr['label']) + 1;
    }
    $form_data = array('name' => $_POST['name'], 'desc' => mysql_real_escape_string(stripslashes($_POST['desc'])), 'parent' => $_POST['parent'], 'sort_order' => '0', 'label' => $label, 'image' => "null.jpg");
    InsertData(CATEGORY, $form_data);
    $id = mysql_insert_id();
    if ($_FILES["pic"]["name"] != "") {
        $s = image_upload($_FILES["pic"]["tmp_name"], $_FILES["pic"]["name"], 'logo_' . $id, '../images/category_image/');
        mysql_query("UPDATE `" . CATEGORY . "` SET  `image`='{$s}'  WHERE `slno`='{$id}'");
    }
    add_log_admin("Post Category {$_POST['name']}{{" . $id . "}} is added");
    header("location:post-category.php?addsuccess");
}
?>


<!DOCTYPE html>


<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
Ejemplo n.º 13
0
<?php

/**
 *
 * use it once a day - maybe there is a new alliance
 *
 * |
 * | #cronjob example:
 * | #
 * | # m h d M W
 * |   0 1 * * * www-data /usr/bin/php5 -f /home/www/evegate/cron/cron_ally_add.php
 * |
 * |
 *
 */
include 'include/db.php';
include 'include/api_calls.php';
include 'include/config.php';
$url = 'https://api.eveonline.com/eve/AllianceList.xml.aspx?version=1';
$xml_object = simplexml_load_string(file_get_contents($url));
$xml_array = object2array($xml_object);
foreach ($xml_array['result']['rowset']['row'] as $ally) {
    $temp['org'][$ally['@attributes']['allianceID']] = GetValue("SELECT `name` FROM `corp_ally_names` WHERE `id`=" . $ally['@attributes']['allianceID']);
    if (!$temp['org'][$ally['@attributes']['allianceID']]) {
        $temp['org'][$ally['@attributes']['allianceID']] = $ally['@attributes']['name'];
        InsertData(array('typ' => 'a', 'id' => $ally['@attributes']['allianceID'], 'name' => $ally['@attributes']['name'], 'ticker' => $ally['@attributes']['shortName']), 'corp_ally_names');
    }
}
Ejemplo n.º 14
0
<?php

include "config/config.php";
include "admin/include/function.php";
include "include/common-scripts.php";
global $postid;
$postid = post_name_to_id($_GET["post"]);
$posturl = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
if (isset($_POST["add_comment"])) {
    $name = mysql_real_escape_string(stripcslashes($_POST["name"]));
    $email = mysql_real_escape_string(stripcslashes($_POST["email"]));
    $message = mysql_real_escape_string(stripcslashes($_POST["message"]));
    $parent = mysql_real_escape_string(stripcslashes($_POST["parent"]));
    $form_data = array('post_id' => $postid, 'parent' => $parent, 'user_id' => $_SESSION["userid"], 'name' => $name, 'email' => $email, 'message' => $message, 'date' => date("Y-m-d H:i:s"), 'status' => "active");
    InsertData(POST_COMMENT, $form_data);
    header("location:{$posturl}?success");
}
$posrarr = get_the_post($postid);
$postuser = get_the_user($posrarr["userid"]);
html("START");
?>
<!-- BEGIN HEAD -->
<head>
<?php 
common_head("META");
put_seo(array("title" => $posrarr["name"], "desc" => "", "author" => "", "keywords" => "", "image" => ""));
common_style("MANDATORY_STYLES");
page_style("POST");
common_style("THEME_STYLES");
common_head("FAVICON");
?>
Ejemplo n.º 15
0
<?php

/**
 * This section ensures that Twilio gets a response.
 */
header('Content-type: text/xml');
$from = $_REQUEST['From'];
$body = $_REQUEST['Body'];
$to = "+17049315308";
$caseStudy = "Case Study 2";
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<Response><Message>Thank you for your reply to ' . $caseStudy . '</Message></Response>';
$conn = OpenConnection();
if (!empty($from)) {
    InsertData($from, $body, $to, $caseStudy, $conn);
    sqlsrv_close($conn);
} else {
    sqlsrv_close($conn);
}
function OpenConnection()
{
    try {
        $serverName = "tcp:j7luugiwb8.database.windows.net,1433";
        $connectionOptions = array("Database" => "Texting_APP", "Uid" => "arufolo@cardinalsolutions.com@j7luugiwb8", "PWD" => "P@ssw0rd1");
        $conn = sqlsrv_connect($serverName, $connectionOptions);
        if ($conn == false) {
            die(FormatErrors(sqlsrv_errors()));
        }
        return $conn;
    } catch (Exception $e) {
        echo "Error!";
Ejemplo n.º 16
0
<?php

include "config/config.php";
include "include/function.php";
include "include/logincheck.php";
if (isset($_POST['submit'])) {
    $error = "";
    if (!valid_mail($_POST['email'])) {
        $error .= "Email is already registered<br>";
    }
    if (!valid_username($_POST['username'])) {
        $error .= "Username is already registered<br>";
    }
    if ($error == "") {
        $form_data = array('usertype' => $_POST['usertype'], 'username' => $_POST['username'], 'email' => $_POST['email'], 'fname' => $_POST['fname'], 'lname' => $_POST['lname'], 'phone' => $_POST['phone'], 'password' => $_POST['password'], 'debut' => date("Y-m-d H:i:s"));
        InsertData(USER, $form_data);
        $id = mysql_insert_id();
        log_add_user($id);
        email_add_user($id);
        header("location:add-user.php?addsuccess");
    }
}
?>
<!DOCTYPE html>

<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
Ejemplo n.º 17
0
function addBlogComment($column_array = '')
{
    InsertData('blog_comment', $column_array);
    return true;
}
Ejemplo n.º 18
0
<!DOCTYPE html>
<?php 
require_once '.././libs/csv-crud.php';
require_once '.././libs/breadcrumb.php';
require_once '.././libs/header.php';
$Id = $Name = '';
$data = array();
if (!empty($_POST)) {
    $ID = $_POST['location_id'];
    $Name = $_POST['location_name'];
    $Month = $_POST['month'];
    $_savedata = array('LocationID' => $ID, 'LocationName' => $Name, 'Month' => $Month);
    InsertData('.././data/location.csv', $_savedata);
    redirect('location-list.php');
}
$dataCountry = GetAllData('.././data/country.csv');
//var_dump($data);
$dataCity = GetAllData('.././data/city.csv');
?>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="author" content="mmt">
  <title>ANGEL</title>
  <link rel="stylesheet" href="../css/bootstrap.min.css"  />
  <link rel="stylesheet" href="../css/font-awesome.min.css" />
  <link rel="stylesheet" type="text/css" href="../css/animate.min.css">
  <link rel="stylesheet" href="../css/font.css" />
  <link rel="stylesheet" href="../css/style.css" />
Ejemplo n.º 19
0
            $dansos = 0;
        }
    }
    //selain pocokan dipotong dansos tanggal 03-03012
    $_sqlpot = "SELECT koperasi.wajib, jamsostek.biaya\r\n\t\t     from keanggotaan,jamsostek,koperasi\r\n\t\t     where keanggotaan.koperasi=koperasi.stts\r\n\t             and keanggotaan.jamsostek=jamsostek.stts\r\n\t\t     and keanggotaan.id='{$bariscari['0']}'";
    $hasilpot = bukaquery($_sqlpot);
    $barispot = mysql_fetch_row($hasilpot);
    $simwajib = $barispot[0];
    $jamsostek = $barispot[1];
    if (mysql_num_rows($hasilpot) != 0) {
        $_sqlcari2 = "select potongan.id from potongan where \r\n                       potongan.tahun='{$tahun}'  and\r\n                       potongan.bulan='{$bulan}' and id='{$bariscari['0']}'";
        $hasilvalidasi = bukaquery($_sqlcari2);
        if (mysql_num_rows($hasilvalidasi) != 0) {
            EditData(" potongan ", "jamsostek='{$jamsostek}',dansos='{$dansos}',simwajib='{$simwajib}' where \r\n                       potongan.tahun='{$tahun}'  and\r\n                       potongan.bulan='{$bulan}' and id='{$bariscari['0']}'  ");
        } elseif (mysql_num_rows($hasilvalidasi) == 0) {
            InsertData(" potongan ", "'{$tahun}','{$bulan}','{$bariscari['0']}','{$jamsostek}','{$dansos}','{$simwajib}',\r\n               \t\t\t\t     '0','0','0','0','0','0','-' ");
        }
    }
}
$keyword = trim($_POST['keyword']);
$_sql = "SELECT pegawai.id, \r\n\t\t        pegawai.nik,\r\n\t\t\t\tpegawai.nama,\r\n\t\t\t\tpegawai.departemen,\r\n\t\t\t\tkeanggotaan.koperasi, \r\n\t\t\t\tkeanggotaan.jamsostek, \t\t\t\t \r\n\t\t\t\tpotongan.jamsostek, \r\n\t\t\t\tpotongan.dansos, \r\n\t\t\t\tpotongan.simwajib, \r\n\t\t\t\tpotongan.angkop, \r\n\t\t\t\tpotongan.angla, \r\n\t\t\t\tpotongan.telpri, \r\n\t\t\t\tpotongan.pajak, \r\n\t\t\t\tpotongan.pribadi, \r\n\t\t\t\tpotongan.lain, \r\n\t\t\t\tpotongan.ktg\r\n\t\t\t\tFROM keanggotaan, potongan\r\n\t\t\t\tRIGHT OUTER JOIN pegawai ON potongan.id = pegawai.id\r\n\t\t\t\tAND tahun like '%" . $tahun . "%'  and bulan like '%" . $bulan . "%' \r\n\t\t\t\tWHERE pegawai.stts_aktif<>'KELUAR' and keanggotaan.id=pegawai.id and pegawai.nik like '%" . $keyword . "%' or\r\n\t\t\t\tpegawai.stts_aktif<>'KELUAR' and keanggotaan.id=pegawai.id and pegawai.nama like '%" . $keyword . "%' or\r\n\t\t\t\tpegawai.stts_aktif<>'KELUAR' and keanggotaan.id=pegawai.id and pegawai.departemen like '%" . $keyword . "%' or\r\n\t\t\t\tpegawai.stts_aktif<>'KELUAR' and keanggotaan.id=pegawai.id and keanggotaan.koperasi like '%" . $keyword . "%' or\r\n\t\t\t\tpegawai.stts_aktif<>'KELUAR' and keanggotaan.id=pegawai.id and keanggotaan.jamsostek like '%" . $keyword . "%'\r\n\t\t\t\torder by pegawai.id ASC ";
$hasil = bukaquery($_sql);
$jumlah = mysql_num_rows($hasil);
$jml = 0;
if (mysql_num_rows($hasil) != 0) {
    echo "<table width='2100px' border='0' align='center' cellpadding='0' cellspacing='0' class='tbl_form'>\r\n                    <tr class='head'>\r\n                        <td width='70px'><div align='center'><font size='2' face='Verdana'><strong>Proses</strong></font></div></td>\r\n                        <td width='100px'><div align='center'><font size='2' face='Verdana'><strong>NIK</strong></font></div></td>\r\n                        <td width='250px'><div align='center'><font size='2' face='Verdana'><strong>Nama</strong></font></div></td>\r\n\t\t\t<td width='100px'><div align='center'><font size='2' face='Verdana'><strong>Departemen</strong></font></div></td>\r\n                        <td width='100px'><div align='center'><font size='2' face='Verdana'><strong>Anggota Koperasi</strong></font></div></td>\r\n                        <td width='100px'><div align='center'><font size='2' face='Verdana'><strong>Anggota Jamsostek</strong></font></div></td>\r\n                        <td width='100px'><div align='center'><font size='2' face='Verdana'><strong>Jamsostek</strong></font></div></td>\r\n                        <td width='100px'><div align='center'><font size='2' face='Verdana'><strong>Dana Sosial</strong></font></div></td>\r\n                        <td width='100px'><div align='center'><font size='2' face='Verdana'><strong>Simpanan Wajib</strong></font></div></td>\r\n                        <td width='100px'><div align='center'><font size='2' face='Verdana'><strong>Angsuran Koperasi</strong></font></div></td>\r\n                        <td width='100px'><div align='center'><font size='2' face='Verdana'><strong>Angsuran Lain</strong></font></div></td>\r\n                        <td width='100px'><div align='center'><font size='2' face='Verdana'><strong>Telepon Pribadi</strong></font></div></td>\r\n                        <td width='100px'><div align='center'><font size='2' face='Verdana'><strong>Pajak</strong></font></div></td>\r\n                        <td width='100px'><div align='center'><font size='2' face='Verdana'><strong>Pribadi</strong></font></div></td>\r\n                        <td width='100px'><div align='center'><font size='2' face='Verdana'><strong>Lain-Lain</strong></font></div></td>\r\n                        <td width='100px'><div align='center'><font size='2' face='Verdana'><strong>Total Potongan</strong></font></div></td>\r\n                        <td width='200px'><div align='center'><font size='2' face='Verdana'><strong>Keterangan</strong></font></div></td>\r\n                    </tr>";
    while ($baris = mysql_fetch_array($hasil)) {
        $ttl = $baris[6] + $baris[7] + $baris[8] + $baris[9] + $baris[10] + $baris[11] + $baris[12] + $baris[13] + $baris[14];
        $jml = $jml + $ttl;
        echo "<tr class='isi' title='{$baris['1']} {$baris['2']}'>\r\n                                <td>\r\n                                    <center>\r\n                                        <a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>[Update]</a>\r\n                                    </center>\r\n                               </td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>{$baris['1']}</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>{$baris['2']}</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>{$baris['3']}</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>{$baris['4']}</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>{$baris['5']}</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>" . formatDuit($baris[6]) . "</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>" . formatDuit($baris[7]) . "</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>" . formatDuit($baris[8]) . "</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>" . formatDuit($baris[9]) . "</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>" . formatDuit($baris[10]) . "</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>" . formatDuit($baris[11]) . "</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>" . formatDuit($baris[12]) . "</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>" . formatDuit($baris[13]) . "</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>" . formatDuit($baris[14]) . "</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>" . formatDuit($ttl) . "</a></td>\r\n                                <td><a href=?act=InputPotongan&action=UBAH&id={$baris['0']}>{$baris['15']}</a></td>\r\n                             </tr>";
    }
Ejemplo n.º 20
0
<?php 
require_once './libs/csv-crud.php';
require_once './libs/breadcrumb.php';
require_once './libs/header.php';
$Id = $Name = '';
$data = array();
$errorMsg = '';
if (!empty($_POST)) {
    $Id = $_POST['country_id'];
    $Name = $_POST['country_name'];
    $checkData = GetDataByKey('./data/country.csv', 'CountryID', $Id);
    if ($checkData['CountryID'] == $Id) {
        $errorMsg = 'The Country ID already exists in file!';
    } else {
        $_savedata = array('CountryID' => $Id, 'CountryName' => $Name);
        InsertData('./data/country.csv', $_savedata);
        redirect('country-list.php');
    }
}
?>
<html lang="en">
<head>
    <!-- The below 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="Kyaw Naing">

    <!-- Theme Matter -->
    <title>Tutorial</title>
Ejemplo n.º 21
0
<!DOCTYPE html>
<?php 
require_once '.././libs/csv-crud.php';
require_once '.././libs/breadcrumb.php';
require_once '.././libs/header.php';
$Id = $Name = '';
$data = array();
if (!empty($_POST)) {
    $ID = $_POST['category_id'];
    $Name = $_POST['category_name'];
    $_savedata = array('CategoryID' => $ID, 'CategoryName' => $Name);
    InsertData('.././data/category.csv', $_savedata);
    redirect('category-list.php');
}
?>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="author" content="mmt">

  <title>ANGEL</title>
  <link rel="stylesheet" href="../css/bootstrap.min.css"  />
  <link rel="stylesheet" href="../css/font-awesome.min.css" />
  <link rel="stylesheet" type="text/css" href="../css/animate.min.css">
  <link rel="stylesheet" href="../css/font.css" />
  <link rel="stylesheet" href="../css/style.css" />
  <link rel="stylesheet" href="../css/form.css" />
  <link rel="stylesheet" href="../css/theme.css" />
</head>
Ejemplo n.º 22
0
                }
            }
        }
    }
    $normalized_tax = $sum_normalized_tax - $taxRes[0]['sum_tax'];
    if ($normalized_tax < 0) {
        $normalized_tax = 0;
    }
    //انتصاب ماليات تعديل شده به  payment_items
    $PaymentItems = array('get_value' => $normalized_tax, 'param1' => $PayVal, 'param2' => $sum_normalized_tax, 'param3' => $taxRes[0]['sum_tax'] + $normalized_tax, 'param5' => $tax_table_type_id);
    return $PaymentItems;
}
$task = isset($_POST["task"]) ? $_POST["task"] : (isset($_GET["task"]) ? $_GET["task"] : "");
switch ($task) {
    case "InsertData":
        InsertData();
}
function InsertData()
{
    if (!empty($_FILES['attach']['name'])) {
        $data = new Spreadsheet_Excel_Reader();
        $data->setOutputEncoding('utf-8');
        $data->setRowColOffset(0);
        $data->read($_FILES["attach"]["tmp_name"]);
    }
    $log_obj = new manage_group_pay_get_log();
    $FileType = $_POST["PayType"];
    $PayYear = $_POST["pay_year"];
    $PayMonth = $_POST["pay_month"];
    $SID = $_POST["sid"];
    $success_count = 0;
Ejemplo n.º 23
0
<!DOCTYPE html>
<?php 
require_once './libs/csv-crud.php';
require_once './libs/breadcrumb.php';
require_once './libs/header.php';
$Id = $Name = '';
$data = array();
if (!empty($_POST)) {
    $Id = $_POST['brand_id'];
    $Name = $_POST['brand_name'];
    $checkData = GetDataByKey('./data/brand.csv', 'BrandID', $Id);
    if ($checkData['BrandID'] == $Id) {
        echo 'Duplicate';
    } else {
        $_savedata = array('BrandID' => $Id, 'BrandName' => $Name);
        InsertData('./data/brand.csv', $_savedata);
        redirect('brand-list.php');
    }
}
?>
<html lang="en">
<head>
    <!-- The below 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="Kyaw Naing">

    <!-- Theme Matter -->
    <title>Tutorial</title>