芝麻web文件管理V1.00
\n";
$formcount = $formcount + 1;
$variables['formcount'] = $formcount;
return $text;
}
function cms_module_CreateLabelForInput(&$modinstance, $id, $name, $labeltext='', $addttext='')
{
$text = ''."\n";
$text .= $modinstance->CreateInputText($id, $name, $value, $size, $maxlength, $addttext);
$text .= "\n";
return $text;
}
function cms_module_CreateInputFile(&$modinstance, $id, $name, $accept='', $size='10',$addttext='')
{
$id = cms_htmlentities($id);
$name = cms_htmlentities($name);
$accept = cms_htmlentities($accept);
$size = cms_htmlentities($size);
$text='GetConfig();
$text = ' 0)
{
foreach ($items as $key=>$value)
{
// $value = cms_htmlentities($value);
$text .= '!
$text = '';
$counter = 0;
foreach ($items as $key=>$value)
{
$value = cms_htmlentities($value);
$counter = $counter + 1;
$text .= ''.$key .'' . $delimiter;
}
return $text;
}
function cms_module_CreateLink(&$modinstance, $id, $action, $returnid='', $contents='', $params=array(), $warn_message='', $onlyhref=false, $inline=false, $addttext='', $targetcontentonly=false, $prettyurl='')
{
$id = cms_htmlentities($id);
$action = cms_htmlentities($action);
$returnid = cms_htmlentities($returnid);
$prettyurl = cms_htmlentities($prettyurl);
global $gCms;
$config =& $gCms->GetConfig();
$class = (isset($params['class'])?cms_htmlentities($params['class']):'');
if ($prettyurl != '' && $config['url_rewriting'] == 'mod_rewrite' && $config['use_hierarchy'] == true)
{
$text = $config['root_url'] . '/' . $prettyurl . $config['page_extension'];
}
else if ($prettyurl != '' && $config['url_rewriting'] == 'internal' && $config['use_hierarchy'] == true)
{
$text = $config['root_url'] . '/index.php/' . $prettyurl . $config['page_extension'];
}
else
{
$text = '';
if ($targetcontentonly || ($returnid != '' && !$inline))
{
$id = 'cntnt01';
}
$goto = 'index.php';
if ($returnid == '')
{
$goto = 'moduleinterface.php';
}
if (!$onlyhref)
{
}
$text .= $config['root_url'];
if (!($returnid != '' && $returnid > -1))
{
$text .= '/'.$config['admin_dir'];
}
$secureparam = '';
if( $returnid == '' )
{
$secureparam='&'.CMS_SECURE_PARAM_NAME.'='.$_SESSION[CMS_USER_KEY];
}
#$text .= '/'.$goto.'?module='.$modinstance->GetName().'&id='.$id.'&'.$id.'action='.$action.$secureparam;
$text .= '/'.$goto.'?mact='.$modinstance->GetName().','.$id.','.$action.','.($inline == true?1:0).$secureparam;
foreach ($params as $key=>$value)
{
$key = cms_htmlentities($key);
$value = cms_htmlentities($value);
if ($key != 'module' && $key != 'action' && $key != 'id')
$text .= '&'.$id.$key.'='.rawurlencode($value);
}
if ($returnid != '')
{
$text .= '&'.$id.'returnid='.$returnid;
if ($inline)
{
$text .= '&'.$config['query_var'].'='.$returnid;
}
}
}
if (!$onlyhref)
{
$beginning = '';
}
return $text;
}
function cms_module_CreateContentLink(&$modinstance, $pageid, $contents='')
{
$pageid = cms_htmlentities($pageid);
$contents = cms_htmlentities($contents);
global $gCms;
$config = &$gCms->GetConfig();
$text = 'GetContentOperations();
$alias = $contentops->GetPageAliasFromID( $pageid );
if( $alias == false )
{
return '';
}
else
{
$text .= $config["root_url"]."/".$alias.
(isset($config['page_extension'])?$config['page_extension']:'.shtml');
}
}
else
{
# not mod rewrite
$text .= $config["root_url"]."/index.php?".$config["query_var"]."=".$pageid;
}
$text .= '">'.$contents.'';
return $text;
}
function cms_module_CreateReturnLink(&$modinstance, $id, $returnid, $contents='', $params=array(), $onlyhref=false)
{
$id = cms_htmlentities($id);
$returnid = cms_htmlentities($returnid);
$contents = $contents;
$text = '';
global $gCms;
$config = &$gCms->GetConfig();
$manager =& $gCms->GetHierarchyManager();
$node =& $manager->sureGetNodeById($returnid);
if (isset($node))
{
$content =& $node->GetContent();
if (isset($content))
{
if ($content->GetURL() != '')
{
if (!$onlyhref)
{
$text .= '';
}
}
}
}
return $text;
}
function cms_module_CreateFieldsetStart(&$modinstance, $id, $name, $legend_text='', $addtext='', $addtext_legend='')
{
$id = cms_htmlentities($id);
$name = cms_htmlentities($name);
$legend_text = cms_htmlentities($legend_text);
$text = '