当前位置: 首页>>代码示例>>PHP>>正文


PHP Categorie::delete_photo方法代码示例

本文整理汇总了PHP中Categorie::delete_photo方法的典型用法代码示例。如果您正苦于以下问题:PHP Categorie::delete_photo方法的具体用法?PHP Categorie::delete_photo怎么用?PHP Categorie::delete_photo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Categorie的用法示例。


在下文中一共展示了Categorie::delete_photo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: restrictedArea

$result = restrictedArea($user, 'categorie', $id, '&category');
$object = new Categorie($db);
if ($id > 0) {
    $result = $object->fetch($id);
    $upload_dir = $conf->categorie->multidir_output[$object->entity];
}
/*
 * Actions
 */
if (isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0 && $_POST["sendit"] && !empty($conf->global->MAIN_UPLOAD_DOC)) {
    if ($object->id) {
        $result = $object->add_photo($upload_dir, $_FILES['userfile']);
    }
}
if ($action == 'confirm_delete' && $_GET["file"] && $confirm == 'yes' && $user->rights->categorie->creer) {
    $object->delete_photo($upload_dir . "/" . $_GET["file"]);
}
if ($action == 'addthumb' && $_GET["file"]) {
    $object->add_thumb($upload_dir . "/" . $_GET["file"]);
}
/*
 * View
 */
llxHeader("", "", $langs->trans("Categories"));
$form = new Form($db);
if ($object->id) {
    $title = $langs->trans("ProductsCategoryShort");
    if ($type == 0) {
        $title = $langs->trans("ProductsCategoryShort");
    } elseif ($type == 1) {
        $title = $langs->trans("SuppliersCategoryShort");
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:photos.php

示例2: Form

 * Actions
 */

if ($_FILES['userfile']['size'] > 0 && $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
{
	if ($id)
	{
		$result = $object->fetch($id);

		$result = $object->add_photo($conf->categorie->dir_output, $_FILES['userfile']);
	}
}

if ($action == 'confirm_delete' && $_GET["file"] && $confirm == 'yes' && $user->rights->categorie->creer)
{
	$object->delete_photo($conf->categorie->dir_output."/".$_GET["file"]);
}

if ($action == 'addthumb' && $_GET["file"])
{
	$object->add_thumb($conf->categorie->dir_output."/".$_GET["file"]);
}


/*
 * View
 */

llxHeader ("","",$langs->trans("Categories"));

$html = new Form($db);
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:photos.php


注:本文中的Categorie::delete_photo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。