本文整理汇总了PHP中Display::getAllData方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::getAllData方法的具体用法?PHP Display::getAllData怎么用?PHP Display::getAllData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::getAllData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Display
// Edit:
if (isset($_GET['action']) and $_GET['action'] == "edit") {
$id = $_GET['id'];
$tablename = "sections";
$editSecDis = new Display($tablename);
$recSecdata = $editSecDis->getRecordByID($id);
include 'veiws/editSection.php';
}
if (isset($_POST['submit']) && $_POST['submit'] == "Edit") {
//sections: id, sectionName, sectionStaus, sectionLocation, sectionDesc, sectionDate, username
$SecDataedit['sectionName'] = $_POST['sectionName'];
$SecDataedit['sectionStaus'] = $_POST['sectionStaus'];
$SecDataedit['sectionLocation'] = $_POST['sectionLocation'];
$SecDataedit['sectionDesc'] = $_POST['sectionDesc'];
try {
$tablename = "sections";
$SecUpdate = new Update($SecDataedit, $tablename);
$updtSec = $SecUpdate->editData($id);
if ($updtSec) {
echo '<script type="text/javascript"> alert("The Section was updated !"); history.back();</script>';
}
} catch (Exception $exc) {
echo $exc->getMessage();
}
}
} else {
$tablename = "sections";
$displaySec = new Display($tablename);
$SecDataDisplay = $displaySec->getAllData();
include 'veiws/sections.php';
}
示例2: catch
$editPage['page_image'] = $uploadsDirecotry . $upload->getFileUrl();
} catch (Exception $exc) {
$exc->getMessage();
}
} else {
$editPage['page_image'] = 'resources/images/logo.png';
}
$tabename = "pages";
$id = $_GET['id'];
try {
$updatePage = new Update($editPage, $tabename);
$updatedPage = $updatePage->editData($id);
if ($updatedPage) {
echo '<script type="text/javascript"> alert("The New Page was updated !"); history.back();</script>';
}
} catch (Exception $exc) {
echo $exc->getMessage();
}
}
}
} else {
$tablename = "pages";
$displaypages = new Display($tablename);
$PagesDataDisplay = $displaypages->getAllData();
for ($i = 0; $i < count($PagesDataDisplay); $i++) {
$id = $PagesDataDisplay[$i]['sectionId'];
$display = new Display('sections');
$sectionNames[$i] = $display->getRecordByID($id);
}
include 'veiws/pages.php';
}
示例3: unlink
echo 'Bad file, deleted!';
unlink($file);
die();
}
*/
//`id`, `bannerName`, `bannerDesc`, `bannerUrl`, `status`, `createdBy`, `CreatedDate`
$tablename = 'banners';
for ($i = 0; $i < count($filenames); $i++) {
$fileNo[$i]['bannerName'] = $filenames[$i];
$fileNo[$i]['bannerDesc'] = $_POST['desc'];
$fileNo[$i]['bannerUrl'] = $uploadsDirecotry . $filenames[$i];
$fileNo[$i]['status'] = 1;
$fileNo[$i]['createdBy'] = $_SESSION['username'];
$fileNo[$i]['status'] = 1;
$fileNo[$i]['type'] = $_POST['type'];
$cxn = new Add($fileNo[$i], $tablename);
}
} catch (Exception $exc) {
$exc->getMessage();
}
}
}
} else {
// add new banner view
include 'veiws/addNewFile.php';
// display exist banners
$tablename = "banners";
$displaybanner = new Display($tablename);
$BannerDataDisplay = $displaybanner->getAllData();
include './veiws/displayBanners.php';
}