예제 #1
0
function editBannerClient($clientid, $option)
{
    global $database, $my;
    $row = new mosBannerClient($database);
    $row->load((int) $clientid);
    // fail if checked out not by 'me'
    if ($row->checked_out && $row->checked_out != $my->id) {
        $msg = 'O Cliente [ ' . $row->name . ' ] está, sendo editado atualmente por outra pessoa.';
        mosRedirect('index2.php?option=' . $option . '&task=listclients', $msg);
    }
    if ($clientid) {
        // do stuff for existing record
        $row->checkout($my->id);
    } else {
        // do stuff for new record
        $row->published = 0;
        $row->approved = 0;
    }
    HTML_bannerClient::bannerClientForm($row, $option);
}
예제 #2
0
function editBannerClient($clientid, $option)
{
    global $database, $my;
    $row = new mosBannerClient($database);
    $row->load($clientid);
    // fail if checked out not by 'me'
    if ($row->checked_out && $row->checked_out != $my->id) {
        $msg = sprintf(T_('The client [ %s ] is currently being edited by another person.'), $row->name);
        mosRedirect('index2.php?option=' . $option . '&task=listclients', $msg);
    }
    if ($clientid) {
        // do stuff for existing record
        $row->checkout($my->id);
    } else {
        // do stuff for new record
        $row->published = 0;
        $row->approved = 0;
    }
    HTML_bannerClient::bannerClientForm($row, $option);
}
예제 #3
0
파일: admin.banners.php 프로젝트: cwcw/cms
function editBannerClient($clientid, $option)
{
    global $database, $my, $adminLanguage;
    $row = new mosBannerClient($database);
    $row->load($clientid);
    // fail if checked out not by 'me'
    if ($row->checked_out && $row->checked_out != $my->id) {
        mosRedirect("index2.php?option={$option}&task=listclients", $adminLanguage->A_COMP_BANNERS_COMP . " " . $row->title . " " . $adminLanguage->A_COMP_BANNERS_EDITED);
    }
    if ($clientid) {
        // do stuff for existing record
        $row->checkout($my->id);
    } else {
        // do stuff for new record
        $row->published = 0;
        $row->approved = 0;
    }
    HTML_bannerClient::bannerClientForm($row, $option);
}