• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP audit函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中audit函数的典型用法代码示例。如果您正苦于以下问题:PHP audit函数的具体用法?PHP audit怎么用?PHP audit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: delete_article

 public static function delete_article($articleid)
 {
     $db = cmsms()->GetDb();
     //Now remove the article
     $query = "DELETE FROM " . cms_db_prefix() . "module_news WHERE news_id = ?";
     $db->Execute($query, array($articleid));
     // Delete it from the custom fields
     $query = 'DELETE FROM ' . cms_db_prefix() . 'module_news_fieldvals WHERE news_id = ?';
     $db->Execute($query, array($articleid));
     // delete any files...
     $config = cmsms()->GetConfig;
     $p = cms_join_path($config['uploads_path'], 'news', 'id', $articleid);
     if (is_dir($p)) {
         recursive_delete($p);
     }
     news_admin_ops::delete_static_route($articleid);
     //Update search index
     $mod = cms_utils::get_module('News');
     $module = cms_utils::get_module('Search');
     if ($module != FALSE) {
         $module->DeleteWords($mod->GetName(), $articleid, 'article');
     }
     @$mod->SendEvent('NewsArticleDeleted', array('news_id' => $articleid));
     // put mention into the admin log
     audit($articleid, 'News: ' . $articleid, 'Article deleted');
 }
开发者ID:RTR-ITF,项目名称:usse-cms,代码行数:26,代码来源:class.news_admin_ops.php


示例2: fetch

 protected function fetch($name, &$source, &$mtime)
 {
     debug_buffer('start global_content_get_template');
     $gCms = cmsms();
     $config = $gCms->GetConfig();
     $gcbops = $gCms->GetGlobalContentOperations();
     $oneblob = $gcbops->LoadHtmlBlobByName($name);
     if ($oneblob) {
         $text = $oneblob->content;
         $source = $text;
         $mtime = $oneblob->modified_date;
         // So no one can do anything nasty, take out the php smarty tags.  Use a user
         // defined plugin instead.
         if (!(isset($config["use_smarty_php_tags"]) && $config["use_smarty_php_tags"] == true)) {
             $source = preg_replace("/\\{\\/?php\\}/", "", $source);
         }
     } else {
         $source = "<!-- Html blob '" . $name . "' does not exist  -->";
         // put mention into the admin log
         audit('', 'Global Content Block: ' . $name, 'Can not open or does not exist!');
         $mtime = time();
     }
     debug_buffer('end global_content_get_template');
     return true;
 }
开发者ID:rainbow-studio,项目名称:cmsms,代码行数:25,代码来源:class.CMSNullTemplateResource.php


示例3: audit

 /**
  * @param array $data
  * @param int   $level
  * @param bool  $deprovisioning
  *
  * @return bool
  */
 protected function audit($data = [], $level = 6, $deprovisioning = false)
 {
     if (function_exists('audit')) {
         //  Put instance ID into the correct place
         isset($data['instance']) && ($data['dfe'] = ['instance_id' => $data['instance']->instance_id_text]);
         return audit($data, $level, ($deprovisioning ? 'de' : null) . 'provision');
     }
     return false;
 }
开发者ID:rajeshpillai,项目名称:dfe-common,代码行数:16,代码来源:BaseProvisioningService.php


示例4: cms_shutdown_function

function cms_shutdown_function()
{
    $error = error_get_last();
    if ($error['type'] == E_ERROR || $error['type'] == E_USER_ERROR) {
        $str = 'ERROR DETECTED: ' . $error['message'] . ' at ' . $error['file'] . ':' . $error['line'];
        debug_to_log($str);
        $db = cmsms()->GetDb();
        if (is_object($db)) {
            // put mention into the admin log
            audit('', 'ERROR', $str);
        }
    }
}
开发者ID:RTR-ITF,项目名称:usse-cms,代码行数:13,代码来源:shutdown.php


示例5: send_recovery_email

/**
 * A function to send lost password recovery email to a specified admin user (by name)
 *
 * @internal
 * @access private
 * @param string the username
 * @return results from the attempt to send a message.
 */
function send_recovery_email($username)
{
    $gCms = cmsms();
    $config = $gCms->GetConfig();
    $userops = $gCms->GetUserOperations();
    $user = $userops->LoadUserByUsername($username);
    $obj = cms_utils::get_module('CMSMailer');
    if ($obj == null) {
        return false;
    }
    $obj->AddAddress($user->email, html_entity_decode($user->firstname . ' ' . $user->lastname));
    $obj->SetSubject(lang('lostpwemailsubject', html_entity_decode(get_site_preference('sitename', 'CMSMS Site'))));
    $url = $config['admin_url'] . '/login.php?recoverme=' . md5(md5($config['root_path'] . '--' . $user->username . md5($user->password)));
    $body = lang('lostpwemail', html_entity_decode(get_site_preference('sitename', 'CMSMS Site')), $user->username, $url);
    $obj->SetBody($body);
    audit('', 'Core', 'Sent Lost Password Email for ' . $username);
    return $obj->Send();
}
开发者ID:Alexkuva,项目名称:Beaupotager,代码行数:26,代码来源:login.php


示例6: deldir

function deldir($dir)
{
    $handle = opendir($dir);
    while (false !== ($FolderOrFile = readdir($handle))) {
        if ($FolderOrFile != "." && $FolderOrFile != "..") {
            if (@is_dir("{$dir}/{$FolderOrFile}")) {
                deldir("{$dir}/{$FolderOrFile}");
            } else {
                unlink("{$dir}/{$FolderOrFile}");
            }
        }
    }
    closedir($handle);
    if (rmdir($dir)) {
        // put mention into the admin log
        audit('', 'Image Manager', 'Removed Directory ' . $dir);
        $success = true;
    }
    return $success;
}
开发者ID:aldrymaulana,项目名称:cmsdepdagri,代码行数:20,代码来源:imagefiles.php


示例7: after_uploaded_file

 protected function after_uploaded_file($fileobject)
 {
     // here we may do image handling, and other cruft.
     if (is_object($fileobject) && $fileobject->name != '') {
         $mod = cms_utils::get_module('FileManager');
         $parms = array();
         $parms['file'] = filemanager_utils::join_path(filemanager_utils::get_full_cwd(), $fileobject->name);
         if ($mod->GetPreference('create_thumbnails')) {
             $thumb = cms_utils::generate_thumbnail($parms['file']);
             if ($thumb) {
                 $params['thumb'] = $thumb;
             }
         }
         $str = $fileobject->name . ' uploaded to ' . filemanager_utils::get_full_cwd();
         if (isset($params['thumb'])) {
             $str .= ' and a thumbnail was generated';
         }
         audit('', $mod->GetName(), $str);
         $mod->SendEvent('OnFileUploaded', $parms);
     }
 }
开发者ID:RTR-ITF,项目名称:usse-cms,代码行数:21,代码来源:action.upload.php


示例8: array

 }
 if ($validinfo) {
     $onetemplate = $templateops->LoadTemplateByID($template_id);
     $onetemplate->name = $template;
     $onetemplate->content = $content;
     $onetemplate->stylesheet = $stylesheet;
     $onetemplate->encoding = $encoding;
     $onetemplate->active = $active;
     Events::SendEvent('Core', 'EditTemplatePre', array('template' => &$onetemplate));
     $result = $onetemplate->Save();
     if ($result) {
         #Make sure the new name is used if this is an apply
         $orig_template = $template;
         Events::SendEvent('Core', 'EditTemplatePost', array('template' => &$onetemplate));
         // put mention into the admin log
         audit($template_id, 'HTML-template: ' . $onetemplate->name, 'Edited');
         if (!$apply) {
             switch ($from) {
                 case 'content':
                     redirect("listcontent.php" . $urlext);
                     break;
                 case 'cssassoc':
                     redirect('templatecss.php' . $urlext . '&id=' . $cssid . '&type=template');
                     break;
                 case 'module_TemplateManager':
                     redirect('moduleinterface.php' . $urlext . '&module=TemplateManager');
                     break;
                 default:
                     redirect("listtemplates.php" . $urlext);
                     break;
             }
开发者ID:rainbow-studio,项目名称:cmsms,代码行数:31,代码来源:edittemplate.php


示例9: ob_get_clean

         //eval('function testfunction'.rand().'() {'.$code.'}');
         $buffer = ob_get_clean();
         //add error
         $error[] = preg_replace('/<br \\/>/', '', $buffer);
         $validinfo = false;
     } else {
         ob_get_clean();
     }
 }
 if ($validinfo) {
     Events::SendEvent('Core', 'EditUserDefinedTagPre', array('id' => $userplugin_id, 'name' => &$plugin_name, 'code' => &$code));
     $query = "UPDATE " . cms_db_prefix() . "userplugins SET userplugin_name = " . $db->qstr($plugin_name) . ", code = " . $db->qstr($code) . ", modified_date = " . $db->DBTimeStamp(time()) . " WHERE userplugin_id = " . $db->qstr($userplugin_id);
     $result = $db->Execute($query);
     if ($result) {
         Events::SendEvent('Core', 'EditUserDefinedTagPost', array('id' => $userplugin_id, 'name' => &$plugin_name, 'code' => &$code));
         audit($userplugin_id, $plugin_name, 'Edited User Defined Tag');
         if (!isset($_POST['apply'])) {
             redirect("listusertags.php" . $urlext . "&message=usertagupdated");
             return;
         }
     } else {
         $error[] = lang('errorupdatingusertag');
     }
 }
 if ($ajax) {
     header('Content-Type: text/xml');
     print '<?xml version="1.0" encoding="UTF-8"?>';
     print '<EditUserPlugin>';
     if (sizeof($error)) {
         print '<Response>Error</Response>';
         print '<Details><![CDATA[';
开发者ID:rasomu,项目名称:chuza,代码行数:31,代码来源:edituserplugin.php


示例10: _SetModuleAdminInterfaces

 /**
  * _SetModuleAdminInterfaces
  *
  * This function sets up data structures to place modules in the proper Admin sections
  * for display on section pages and menus.
  *
  * @since 1.10
  * @access private
  * @ignore
  */
 private function _SetModuleAdminInterfaces()
 {
     if (is_array($this->_sectionCount)) {
         return;
     }
     $this->_sectionCount = array();
     $this->_modulesBySection = array();
     // get the info from the cache
     $usermoduleinfo = $this->_get_user_module_info();
     if (!is_array($usermoduleinfo)) {
         // put mention into the admin log
         audit(get_userid(FALSE), 'Admin Theme', 'No module information found for user');
     }
     // Are there any modules with an admin interface?
     foreach ($usermoduleinfo as $key => $rec) {
         $section = $rec['adminsection'];
         if ($section == '') {
             $section == 'extensions';
         }
         if (!isset($this->_sectionCount[$section])) {
             $this->_sectionCount[$section] = 0;
         }
         $data = array();
         $data['key'] = $key;
         $data['friendlyname'] = isset($rec['friendlyname']) ? $rec['friendlyname'] : $key;
         $data['name'] = $data['friendlyname'];
         $data['description'] = $rec['admindescription'] != '' ? $rec['admindescription'] : '';
         $config = cmsms()->GetConfig();
         $tmp = array("modules/{$key}/images/icon.gif", "modules/{$key}/icons/icons.gif", "modules/{$key}/images/icon.png", "modules/{$key}/icons/icons.png");
         foreach ($tmp as $one) {
             $fn = cms_join_path($config['root_path'], $one);
             if (file_exists($fn)) {
                 $data['icon'] = $config['root_url'] . '/' . $one;
                 break;
             }
         }
         $this->_modulesBySection[$section][] = $data;
         $this->_sectionCount[$section]++;
     }
 }
开发者ID:RTR-ITF,项目名称:usse-cms,代码行数:50,代码来源:class.CmsAdminThemeBase.php


示例11: set_preference

    set_preference($userid, 'syntaxhighlighter', $syntaxhighlighter);
    set_preference($userid, 'default_cms_language', $default_cms_lang);
    set_preference($userid, 'admintheme', $admintheme);
    set_preference($userid, 'bookmarks', $bookmarks);
    set_preference($userid, 'hide_help_links', $hide_help_links);
    set_preference($userid, 'indent', $indent);
    set_preference($userid, 'enablenotifications', $enablenotifications);
    set_preference($userid, 'paging', $paging);
    set_preference($userid, 'date_format_string', $date_format_string);
    set_preference($userid, 'default_parent', $default_parent);
    set_preference($userid, 'homepage', $homepage);
    set_preference($userid, 'ignoredmodules', implode(',', $ignoredmodules));
    set_preference($userid, 'listtemplates_pagelimit', $listtemplates_pagelimit);
    set_preference($userid, 'liststylesheets_pagelimit', $liststylesheets_pagelimit);
    set_preference($userid, 'listgcbs_pagelimit', $listgcbs_pagelimit);
    audit(-1, '', 'Edited User Preferences');
    $page_message = lang('prefsupdated');
    #redirect("index.php");
    #return;
} else {
    if (!isset($_POST["edituserprefs"])) {
        $gcb_wysiwyg = get_preference($userid, 'gcb_wysiwyg', 1);
        $wysiwyg = get_preference($userid, 'wysiwyg');
        $syntaxhighlighter = get_preference($userid, 'syntaxhighlighter');
        $default_cms_lang = get_preference($userid, 'default_cms_language');
        $old_default_cms_lang = $default_cms_lang;
        $admintheme = get_preference($userid, 'admintheme');
        $bookmarks = get_preference($userid, 'bookmarks');
        $indent = get_preference($userid, 'indent', true);
        $enablenotifications = get_preference($userid, 'enablenotifications', 1);
        $paging = get_preference($userid, 'paging', 0);
开发者ID:rasomu,项目名称:chuza,代码行数:31,代码来源:editprefs.php


示例12: cmsms

if ($access && strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {
    try {
        if ($submit || $apply) {
            // Fill contentobj with parameters
            $contentobj->SetAddMode();
            $contentobj->FillParams($_POST);
            $contentobj->SetOwner($userid);
            $error = $contentobj->ValidateData();
            if ($error === FALSE) {
                $contentobj->Save();
                $gCms = cmsms();
                $contentops = $gCms->GetContentOperations();
                $contentops->SetAllHierarchyPositions();
                if ($submit) {
                    // put mention into the admin log
                    audit($contentobj->Id(), 'Content Item: ' . $contentobj->Name(), 'Added');
                    redirect('listcontent.php' . $urlext . '&message=contentadded');
                }
            }
        } else {
            $contentobj->FillParams($_POST);
        }
    } catch (CmsEditContentException $e) {
        $error = $e->getMessage();
    }
}
if (!$access) {
    echo "<div class=\"pageerrorcontainer pageoverflow\"><p class=\"pageerror\">" . lang('noaccessto', array(lang('addcontent'))) . "</p></div>";
} else {
    $tabnames = $contentobj->TabNames();
    // Get a list of content_types and build the dropdown to select one
开发者ID:Alexkuva,项目名称:Beaupotager,代码行数:31,代码来源:addcontent.php


示例13: redirect

				</div>
			</div>
			<?php 
        } else {
            redirect('listtemplates.php' . $urlext);
        }
    } else {
        if ($action == 'dodelete') {
            $userid = get_userid();
            $access = check_permission($userid, 'Remove Templates');
            if ($access) {
                foreach ($nodelist as $node) {
                    $id = $node->id;
                    $title = $node->name;
                    $node->Delete();
                    audit($id, $title, 'Deleted Template');
                }
            }
            redirect("listtemplates.php" . $urlext);
        } else {
            if ($action == 'inactive') {
                $userid = get_userid();
                $permission = check_permission($userid, 'Modify Templates');
                foreach ($nodelist as $node) {
                    if ($permission) {
                        if ($node->active) {
                            $node->active = false;
                            $node->Save();
                        }
                    }
                }
开发者ID:rasomu,项目名称:chuza,代码行数:31,代码来源:multitemplate.php


示例14: error_log

        error_log($msg);
        continue;
    }
    $new[] = $role;
}
$orig = $user->roles;
if ($new != $orig) {
    array_push($audit_changes, sprintf("Roles = <%s>", implode(", ", $new)));
    $user->roles = $new;
}
if (count($audit_changes) == 0) {
    $renderer->flash_success("No changes were made");
    header("Location: user-list.php");
    exit(0);
}
$errors = $user->errors();
if (count($errors) == 0) {
    if (!$user->save()) {
        array_push($errors, "Unknown error trying to save a user!  Try again or contact support.");
    }
}
if (count($errors) == 0) {
    audit($action, sprintf("User %s [%s]", $userid, implode("; ", $audit_changes)));
    $renderer->flash_success("Saved user");
    header("Location: user-list.php");
} else {
    $renderer->variable("errors", $errors);
    $renderer->variable("mod_user", $user);
    $renderer->variable("title", sprintf("Editing %s", $user->login));
    $renderer->render("user-form");
}
开发者ID:uoregon-libraries,项目名称:pdf-to-chronam-admin,代码行数:31,代码来源:user-save.php


示例15: trim

if (isset($params['prefix'])) {
    $prefix = trim($params['prefix']);
}
if (!isset($params['templatecontent']) || empty($params['templatecontent'])) {
    $module->SetError($this->Lang('error_missingparam'));
    $module->RedirectToTab($id, $this->_current_tab, '', $the_action);
    return;
}
if ($template == "" || $prefix == "") {
    $module->SetError($this->Lang('error_missingparam'));
    $module->RedirectToTab($id, $this->_current_tab, '', $the_action);
    return;
}
$newtemplate = $prefix . $template;
// check if this template already exists
$txt = trim($module->GetTemplate($newtemplate));
if ($txt != "") {
    $module->SetError($this->Lang('error_templatenameexists'));
    $module->RedirectToTab($id, $this->_current_tab, '', $the_action);
    return;
}
// we're ready to set it
$text = $params['templatecontent'];
//$text = cms_html_entity_decode($params['templatecontent'],ENT_QUOTES,get_encoding());
$module->SetTemplate($newtemplate, $text);
audit('', $module->GetName(), 'Added Template ' . $newtemplate);
if ($this->_current_tab != '') {
    $module->RedirectToTab($id, $this->_current_tab, '', $the_action);
    return;
}
$module->Redirect($id, $the_action);
开发者ID:rainbow-studio,项目名称:cmsms,代码行数:31,代码来源:action.do_addtemplate.php


示例16: substr

            }
            if ($types != '') {
                $types = substr($types, 0, -2);
                #strip last space and comma
            } else {
                $types = '';
            }
            $newstylesheet->media_type = $types;
            Events::SendEvent('Core', 'AddStylesheetPre', array('stylesheet' => &$newstylesheet));
            $result = $newstylesheet->Save();
            # we now have to check that everything went well
            if ($result) {
                #Sent the post event
                Events::SendEvent('Core', 'AddStylesheetPost', array('stylesheet' => &$newstylesheet));
                # it's ok, we record the operation in the admin log
                audit($newstylesheet->id, 'Stylesheet: ' . $css_name, 'Added');
                # and goes back to the css list
                redirect("listcss.php" . $urlext);
                return;
            } else {
                $error .= "<li>" . lang('errorinsertingcss') . "</li>";
            }
        }
    }
}
include_once "header.php";
#******************************************************************************
# the user does not have access : error message
#******************************************************************************
if (!$access) {
    echo "<div class=\"pageerrorcontainer\"><p class=\"pageerror\">" . lang('noaccessto', array(lang('addstylesheet'))) . "</p></div>";
开发者ID:aldrymaulana,项目名称:cmsdepdagri,代码行数:31,代码来源:addcss.php


示例17: array

        Events::SendEvent('Core', 'ChangeGroupAssignPre', array('group' => $thisGroup, 'users' => $userops->LoadUsersInGroup($thisGroup->id)));
        $query = "DELETE FROM " . cms_db_prefix() . "user_groups WHERE group_id = ? AND user_id != ?";
        $result = $db->Execute($query, array($thisGroup->id, $userid));
        $iquery = "INSERT INTO " . cms_db_prefix() . "user_groups (group_id, user_id, create_date, modified_date) VALUES (?,?,?,?)";
        foreach ($_POST as $key => $value) {
            if (strpos($key, "ug") == 0 && strpos($key, "ug") !== false) {
                $keyparts = explode('_', $key);
                if ($keyparts[2] == $thisGroup->id && $value == '1') {
                    $result = $db->Execute($iquery, array($thisGroup->id, $keyparts[1], $db->DBTimeStamp(time()), $db->DBTimeStamp(time())));
                }
            }
        }
        Events::SendEvent('Core', 'ChangeGroupAssignPost', array('group' => $thisGroup, 'users' => $userops->LoadUsersInGroup($thisGroup->id)));
        audit($group_id, 'Group ID', lang('assignmentchanged'));
    }
    audit($userid, 'Group ID', lang('assignmentchanged'));
    $message = lang('assignmentchanged');
}
$query = "SELECT u.user_id, u.username, ug.group_id FROM " . cms_db_prefix() . "users u LEFT JOIN " . cms_db_prefix() . "user_groups ug ON u.user_id = ug.user_id ORDER BY u.username";
$result = $db->Execute($query);
$user_struct = array();
while ($result && ($row = $result->FetchRow())) {
    if (isset($user_struct[$row['user_id']])) {
        $str =& $user_struct[$row['user_id']];
        $str->group[$row['group_id']] = 1;
    } else {
        $thisUser = new stdClass();
        $thisUser->group = array();
        if (!empty($row['group_id'])) {
            $thisUser->group[$row['group_id']] = 1;
        }
开发者ID:rasomu,项目名称:chuza,代码行数:31,代码来源:changegroupassign.php


示例18: foreach

    foreach ($_POST as $key => $value) {
        if (strpos($key, "pg") == 0 && strpos($key, "pg") !== false) {
            $keyparts = explode('_', $key);
            $keyparts[1] = (int) $keyparts[1];
            if ($keyparts[1] > 0 && $keyparts[2] != '1' && $value == '1') {
                $new_id = $db->GenID(cms_db_prefix() . "group_perms_seq");
                $result = $db->Execute($iquery, array($new_id, $keyparts[2], $keyparts[1]));
                if (!$result) {
                    echo "FATAL: " . $db->ErrorMsg() . '<br/>' . $db->sql;
                    exit;
                }
            }
        }
    }
    // put mention into the admin log
    audit($userid, 'Permission Group ID: ' . $userid, 'Changed');
    $message = lang('permissionschanged');
    $gCms->clear_cached_files();
}
$query = "SELECT p.permission_id, p.permission_text, up.group_id FROM " . cms_db_prefix() . "permissions p LEFT JOIN " . cms_db_prefix() . "group_perms up ON p.permission_id = up.permission_id ORDER BY p.permission_text";
$result = $db->Execute($query);
$perm_struct = array();
while ($result && ($row = $result->FetchRow())) {
    if (isset($perm_struct[$row['permission_id']])) {
        $str =& $perm_struct[$row['permission_id']];
        $str->group[$row['group_id']] = 1;
    } else {
        $thisPerm = new stdClass();
        $thisPerm->group = array();
        if (!empty($row['group_id'])) {
            $thisPerm->group[$row['group_id']] = 1;
开发者ID:rainbow-studio,项目名称:cmsms,代码行数:31,代码来源:changegroupperm.php


示例19: trigger_error

# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Or read it online: http://www.gnu.org/licenses/licenses.html#GPL
#
#-------------------------------------------------------------------------
#END_LICENSE
if (!isset($gCms)) {
    return;
}
$outp = cgsi_utils::process_image($params);
$silent = $this->GetPreference('silent', 0);
if (isset($params['silent'])) {
    $silent = (int) $params['silent'];
}
if (isset($outp['error']) && $outp['error'] != '') {
    if (!$silent) {
        trigger_error($outp['error']);
    }
    audit('', $this->GetName(), $outp['error']);
    return;
}
if (isset($outp['output'])) {
    echo $outp['output'];
}
#
# EOF
#
开发者ID:rainbow-studio,项目名称:cmsms,代码行数:31,代码来源:action.default.php


示例20: get_class

 $classname = "";
 if (is_object($contentobj)) {
     $classname = get_class($contentobj);
 }
 if ($submit || $apply) {
     #Fill contentobj with parameters
     // $contentobj->SetProperties();  // calguy should not be necessary
     $contentobj->FillParams($_POST);
     $error = $contentobj->ValidateData();
     if ($error === FALSE) {
         $contentobj->SetLastModifiedBy(get_userid());
         $contentobj->Save();
         global $gCms;
         $contentops =& $gCms->GetContentOperations();
         $contentops->SetAllHierarchyPositions();
         audit($contentobj->Id(), $contentobj->Name(), 'Edited Content');
         if ($submit) {
             redirect("listcontent.php" . $urlext . "&page=" . $pagelist_id . '&message=contentupdated');
         }
     }
     if ($ajax) {
         header('Content-Type: text/xml');
         print '<?xml version="1.0" encoding="UTF-8"?>';
         print '<EditContent>';
         if ($error !== false) {
             print '<Response>Error</Response>';
             print '<Details><![CDATA[';
             if (!is_array($error)) {
                 $error = array($error);
             }
             print '<li>' . join('</li><li>', $error) . '</li>';
开发者ID:rasomu,项目名称:chuza,代码行数:31,代码来源:editcontent.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP audit_db函数代码示例发布时间:2022-05-24
下一篇:
PHP auction_status函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap