Esempio n. 1
0
</head>
<body>
	<div id="background"></div>
	<button id="show-menu" type="button">Show Menu</button>
	<div id="pop-up-menu">
		<div id="menu-close"></div>
		<div id="header">
			<div id="cc-manage"><span class="active"></span></div>
			<div id="cc-history"><span class=""></span></div>
			<div id="redbux-balance"></div>
		</div>
		<div id="manage-page">
			<h3 class="page-header">Manage Payment Methods</h3>
			<div id="manage-container">
				<?php 
manage();
?>
			</div>
			<div id="manage-btn-container">
				<button id="cancel" type="button">Cancel</button>
				<button id="add-payment" type="button">Add Another Payment Method</button>
			</div>
		</div>
		<div id="new-cc-page">
			<h3 class="page-header">Create New a Payment Method.</h3>
			<div class="cc-container">
				<form id="myform" action="#" class="inline-form" name="new-panyment-method" onsubmit='new Ajax.Updater("api_results", "submit.php", { parameters:$("#myform").serialize(this) }); return false'>
					<div class="inner-container">
						<div class="field dark">
							<label class="field-label">Accepted Card Types:</label>
							<input id="cc-type" class="field-input hide" name="cc-type" value="" />
function updatecsc($_POST)
{
    extract($_POST);
    $cat += 0;
    $listcat += 0;
    $qteam += 0;
    # validate input
    require_lib("validate");
    $v = new validate();
    $v->isOk($id, "num", 1, 9, "Invalid Query ID.");
    $v->isOk($sub, "string", 1, 300, "Invalid subject.");
    $v->isOk($notes, "string", 0, 500, "Invalid notes.");
    $v->isOk($name, "string", 1, 300, "Invalid name.");
    $v->isOk($con, "string", 0, 300, "Invalid contact.");
    $v->isOk($tel, "string", 0, 300, "Invalid tel.");
    $v->isOk($cel, "string", 0, 300, "Invalid cell.");
    $v->isOk($fax, "string", 0, 300, "Invalid fax.");
    $v->isOk($email, "email", 0, 300, "Invalid email.");
    $v->isOk($address, "string", 0, 300, "Invalid address.");
    $v->isOk($oaction, "string", 0, 100, "Invalid action .");
    $v->isOk($action, "string", 0, 100, "Invalid action.");
    # display errors, if any
    if ($v->isError()) {
        $confirm = "";
        $errors = $v->getErrors();
        foreach ($errors as $e) {
            $confirm .= "<li class=err>" . $e["msg"];
        }
        return manage($_POST, $confirm . "</li>");
    }
    $date = date("Y-m-d");
    db_conn('crm');
    $Sl = "SELECT * FROM tokens WHERE id='{$id}'";
    $Ry = db_exec($Sl) or errDie("Unable to get query information from system.");
    if (pg_numrows($Ry) < 1) {
        return manage($_POST, "<li class=err>Invalid query</li>");
    }
    $tokendata = pg_fetch_array($Ry);
    $Sl = "SELECT * FROM crms WHERE userid='" . USER_ID . "'";
    $Ri = db_exec($Sl) or errDie("Unable to get data.");
    $cdata = pg_fetch_array($Ri);
    $teams = explode("|", $cdata['teams']);
    if (!in_array($tokendata['teamid'], $teams)) {
        return "The query number you typed in does not belong to your team." . seltoken();
    }
    $Sl = "SELECT * FROM tcats WHERE id='{$cat}'";
    $Ry = db_exec($Sl) or errDie("Unable to get cat from system.");
    if (pg_numrows($Ry) < 1) {
        return "Invalid cat.";
    }
    $catdata = pg_fetch_array($Ry);
    $catname = $catdata['name'];
    $Sl = "UPDATE tokens SET name='{$name}',con='{$con}',tel='{$tel}',cell='{$cel}',fax='{$fax}',email='{$email}',address='{$address}',cat='{$catname}',catid='{$cat}',\r\n\tsub='{$sub}',notes='{$notes}',lastuser='******',lastdate='{$date}',teamid='{$qteam}' WHERE id='{$id}'";
    $Ry = db_exec($Sl) or errDie("Unable to update query information.");
    $Sl = "UPDATE crms SET listcat='{$listcat}' WHERE userid='" . USER_ID . "'";
    $Ry = db_exec($Sl) or errDie("Unable to update crm.");
    $time = date("H:i:s");
    if (strlen($oaction) > 0) {
        $Sl = "INSERT INTO token_actions(token,action,donedate,donetime,doneby,donebyid)\r\n\t\tVALUES ('{$id}','{$oaction}','{$date}','{$time}','" . USER_NAME . "','" . USER_ID . "')";
        $Ry = db_exec($Sl) or errDie("Unable to insert record.");
    }
    if ($action != "0") {
        $Sl = "INSERT INTO token_actions(token,action,donedate,donetime,doneby,donebyid)\r\n\t\tVALUES ('{$id}','{$action}','{$date}','{$time}','" . USER_NAME . "','" . USER_ID . "')";
        $Ry = db_exec($Sl) or errDie("Unable to insert record.");
    }
    if (isset($closetoken)) {
        header("Location: tokens-close.php?id={$id}");
        exit;
    }
    db_conn('crm');
    if (isset($search)) {
        $find += 0;
        $Sl = "SELECT * FROM tokens WHERE id='{$find}'";
        $Ry = db_exec($Sl) or errDie("Unable to find query.");
        if (pg_numrows($Ry) < 1) {
            return manage($_POST, "<li class=err>Query number: '{$find}' cannnot be found</li>");
        }
        header("Location: tokens-manage.php?id={$find}");
        exit;
    }
    header("Location: tokens-manage.php?id={$id}");
    exit;
    return manage($_POST, "<li>Query information updated.</li>");
}
Esempio n. 3
0
        $error = false;
    }
}
if (!$error) {
    switch ($do) {
        case 'add':
            add($pdo);
            break;
        case 'manage':
            echo manage($pdo);
            break;
        case 'sort':
            echo manage($pdo);
            break;
        case 'search':
            echo manage($pdo);
            break;
        case 'edit':
            edit($pdo);
            break;
        case 'status':
            status($pdo);
            break;
        case 'chmail':
            chmail($pdo);
            break;
        case 'logout':
            logout();
            break;
        case 'chpassword':
            chpassword($pdo);
Esempio n. 4
0
if(!empty($dl)){
	if(REFCHECK){
		$c_okurl=count($okurl);
		$is_okurl=false;
		for($i=0; $i<$c_okurl; $i++){
			if(isset($_SERVER['HTTP_REFERER']) && ($is_okurl = strstr($_SERVER['HTTP_REFERER'],$okurl[$i]) !== FALSE))
				break;
			if(!$is_okurl && $i==$c_okurl-1)
				die("指定URL以外からはDLできません");
		}
	}
	count_dl($dl);
	exit;
}
switch($job){
case 'detail':
	if($detail) show_detail($detail);
	break;
case 'admin':
	if($admin_submit) $admin = md5($admin_submit);
	validation($admin);
	if($act) manage($act,$id,$new);
	if($submit=="Add Entry") add_data($new_loc,$new_id,$description,$new_ref);
	show_track();
	break;
default:
	if(time()-filemtime(LOGFILE) > 3600) @copy(LOGFILE,LOGFILE.".bak");
	show_table($top,$option);
}
?>
Esempio n. 5
0
        }
        ?>
					</table>
	    
			<?php 
        if ($pages->rspaginateTotal > 20) {
            ?>
			<table border="0" width="650" class="mt-10" align="center" cellpadding="5">
				<tr>
				<td align="center">
                <div class="pagenation">
				<?php 
            echo $pages->display_pages();
            ?>
                </div>
				</td>
				</tr>
			</table>

		
		<?php 
        }
    } else {
        echo '<p class="nodata">No Discussion Available</p>';
    }
} else {
    echo manage($url_arr[2]);
}
?>
</div>
Esempio n. 6
0
<?php

include "./config.php";
session_start();
switch ($do) {
    case "login":
        login();
        break;
    case "logout":
        logout();
        break;
    case "manage":
        manage($manga, $chapter);
        break;
    case "resize":
        resize_chapter($manga, $chapter);
        echo '<meta http-equiv="refresh" content="0; URL=admin.php?do=manage&manga=' . $manga . '&chapter=' . $chapter . '">';
        die;
        break;
    case "massresize":
        mass_resize($manga);
        break;
    case "addmanga":
        //mass_resize($manga);
        break;
    case "buildsite":
        mksite();
        break;
    case "scrach":
        from_scrach();
        break;