示例#1
0
										}
									?>
									</div>
								</td>
								<td width="20%" valign="top" align="center">
									<div class="tinytext_class"><?php echo date ("M j, Y - g:ia", $mdata['datesent']); ?></div>
								</td>
								<td width="20%" valign="top" align="center">
									<div class="tinytext_class"><?php echo date ("M j, Y - g:ia", $mdata['dateveiwed']); ?></div>
								</td>
								<td width="20%" valign="top" align="center">
									<div class="tinytext_class"><a href="messages/archive/process_unread.php?indid=<?php echo $mdata['messageid']; ?>">Unread</a></div>
								</td>
								</tr>
								<?php 							}
						?>
					</table>
					<?php 				}
			} else {
				DoError(1,"");
			}

			if ($numpages > 0){
				?><br />Page: <?php 				for ($i = 1; $i <= $numpages; $i++){
					if ($i == $mid){echo $i;} else {?><a href="index.php?page=messages/archive/index.php&mid=<?php echo $i; ?>"><?php echo $i; ?></a><?}
				}
			}


	}
?>
示例#2
0
<?php

/****************************************************************************/
/* {The Code Shoppe}                                                        */
/* DataPages Version 1.0                                                    */
/* File Name: content.php                                                   */
/* Last Updated: March 10th, 2004                                           */
/* Author: Lee Babin <www.leebabin.com><*****@*****.**>              */
/* Copyright {The Code Shoppe}. All Rights Reserved.                        */
/* www.thecodeshoppe.com <403.255.9767>                                     */
/****************************************************************************/
//Page content.
if (!isset($_GET['page'])) {
    //Default content.
    include "homepage/index.php";
} else {
    if (!is_file($_GET['page'])) {
        DoError(0, $dynamic_notfound, "");
    } else {
        include $_GET['page'];
    }
}
示例#3
0
                    ?>
<p>Added: <?php 
                    echo date("l F j, Y - g:i:s A", $validdata['dateadded']);
                    ?>
</p><?php 
                }
                if ($thepage->getallowedit() == "true") {
                    ?>
						<div class="mainfiftywrapper">
							<div class="<?php 
                    echo $dynamic_maintextclass;
                    ?>
"><a href="index.php?page=<?php 
                    echo $thepage->getfoldername();
                    ?>
/edit/index.php&indid=<?php 
                    echo $indid;
                    ?>
">Edit</a></div>
						</div>
						<?php 
                }
            }
        } else {
            DoError(1, "", mysql_error());
        }
    }
} else {
    //Security breach, contain it.
    DoError(0, "Sorry, you do not have access to this section.", "");
}
示例#4
0
<?php

if ($testquery = mysql_query("SELECT * FROM testimonial ORDER BY displayorder ASC")) {
    while ($testdata = mysql_fetch_array($testquery)) {
        ?>
			<p><?php 
        echo stripslashes(nl2br($testdata['testimonial']));
        ?>
</p>
			<div style="text-align: right;"><em><?php 
        echo stripslashes($testdata['thefrom']);
        ?>
</em><br />
            <hr noshade="noshade" style="margin-bottom:30px;" />
</div>
			<?php 
    }
} else {
    DoError(1, "", mysql_error());
}
示例#5
0
} elseif ($message == "passworderror") {
    DoError(0, "This client's password must be at least 5 characters in length and contain only letters and numbers.");
} elseif ($message == "passmatcherror") {
    DoError(0, "The two passwords must match.");
}
$yesno = checkcookies();
if ($_GET['yesno'] == "full") {
    $yesno = "bad";
}
$seclevel = getsecurity($cookie_id);
if ($_GET['seclevel'] == 1) {
    $seclevel = 2;
}
//Make sure the user is logged in.
if ($yesno != "full" || $seclevel != 1) {
    DoError(0, "Sorry, you must be logged in as an administrator to view this page.");
} else {
    ?>
		<form action="clients/add/process_add.php" method="post" onSubmit="return validateForm(this)">
		<p>Client Contact Information.</p>
		<table width="100%" border="0">
			<tr>
			<td valign="top" width="30%">
				<div class="tinytext_class">Name (<span class="star_class">*</span>):</div>
			</td>
			<td valign="top" width="70%">
				<input type="text" name="clientname" maxlength="150" />
			</td>
			</tr>
			<tr>
			<td valign="top" width="30%">
示例#6
0
/* {TheCodeShoppe}                                                          */
/* DataPages Version 1.0                                                    */
/* File Name: errors.php                                                    */
/* Last Updated: March 5th, 2004                                            */
/* Author: Lee Babin <www.leebabin.com><*****@*****.**>              */
/* Copyright {TheCodeShoppe}. All Rights Reserved.                          */
/* www.thecodeshoppe.com <403.255.9767>                                     */
/****************************************************************************/
if (isset($_GET['message'])) {
    //Cycle through all elements and check for then output the proper response code.
    $found = "false";
    while ($element = each($dynamic_errorlisting)) {
        if ($element['key'] == $_GET['message']) {
            DoError(0, $element['value'], "");
            $found = "true";
        }
    }
    if ($found == "false") {
        if ($_GET['message'] == "success") {
            DoError(0, "Record processed successfully", "");
        } elseif ($_GET['message'] == "dataerror") {
            DoError(1, "", $_GET['merror']);
        } elseif ($_GET['message'] == "nomatcherror") {
            DoError(0, "No match found.", "");
        } elseif ($_GET['message'] == "loginerror") {
            DoError(0, "Sorry, you must be logged in to view this section.", "");
        } else {
            DoError(0, $_GET['message'], "");
        }
    }
}
示例#7
0
function checkthesecurity($tempid, $levelcheck, $levelsallowed)
{
    opendatabase();
    $areweclear = false;
    if ($seccheckquery = mysql_query("SELECT " . $levelcheck . " FROM stafflogin WHERE staffloginid='{$tempid}'")) {
        $seccheckdata = mysql_fetch_array($seccheckquery);
        //Now, check the id within the array.
        $secid = $seccheckdata[$levelcheck];
        if (in_array($secid, $levelsallowed)) {
            $areweclear = true;
        }
    } else {
        DoError(1, "", mysql_error());
    }
    return $areweclear;
}
示例#8
0
switch ($mode) {
    case 'init':
        // 初始化
        DoConstruct() ? DoOK() : DoError();
        break;
    case 'transload':
        // 遠端抓取
        DoTransload($imgname) ? DoOK() : DoError();
        break;
    case 'upload':
        // 上傳檔案
        DoUpload($imgname) ? DoOK() : DoError();
        break;
    case 'delete':
        // 刪除檔案
        DoDelete($imgname) ? DoOK() : DoError();
        break;
    default:
        DoNotFound();
}
/* 初始化 */
function DoConstruct()
{
    global $Tkey;
    if ($Tkey != TRANSPORT_KEY) {
        return false;
    }
    // 金鑰不符
    if (!is_dir(STORAGE_DIRECTORY)) {
        mkdir(STORAGE_DIRECTORY);
        @chmod(STORAGE_DIRECTORY, 0777);
示例#9
0
										</td>
										</tr>
										<tr>
										<td colspan="2" align="left">
											<input type="submit" value="Login" />
										</td>
										</tr>
									</table>
									</form>
									<?php 
    }
} else {
    if (is_file($page)) {
        include $page;
    } else {
        DoError(0, "Sorry, the page you requested cannot be found.  Please contact support with details.");
    }
}
?>
						</div>
					</td>
					</tr>
				</table>
			</td>
			</tr>
			<tr>
			<td class="bg_class" align="left">
				<!-- Bottom Navigation. -->
				<table width="100%" border="0">
					<tr>
					<td width="50%" valign="top">
示例#10
0
function findadmin($theid)
{
    opendatabase();
    if ($findadminquery = mysql_query("SELECT a.whosclient FROM useraccount a, userlogin b WHERE b.userloginid='{$theid}' AND a.useraccountid=b.useraccountid")) {
        $admindata = mysql_fetch_array($findadminquery);
        return $admindata['whosclient'];
    } else {
        DoError(1, "");
    }
}
示例#11
0
} elseif ($message == "filetypeerror") {
    DoError(0, "File must be of type .xls (MS Excel), .doc (MS Word), .pdf (Adobe), .gif (Image), or .jpg (Image).");
} elseif ($message == "clienterror") {
    DoError(0, "You must select a client to send the file to.");
}
$yesno = checkcookies();
if ($_GET['yesno'] == "full") {
    $yesno = "bad";
}
$seclevel = getsecurity($cookie_id);
if ($_GET['seclevel'] == 1) {
    $seclevel = 2;
}
//Make sure the user is logged in.
if ($yesno != "full") {
    DoError(0, "Sorry, you must be logged in to view this page.");
} else {
    ?>
		<form action="userfiles/add/process_add.php" method="post" onSubmit="return validateForm(this)" enctype="multipart/form-data">
		<p>Please enter the details and upload a file.</p>
		<table width="100%" border="0">
			<tr>
			<td valign="top" width="30%">
				<div class="tinytext_class">Name (<span class="star_class">*</span>):</div>
			</td>
			<td valign="top" width="70%">
				<input type="text" name="thefilename" maxlength="150" />
			</td>
			</tr>
			<tr>
			<td valign="top" width="30%">