56 if (is_dir(LEPTON_PATH.
'/templates/'.$directory) && file_exists(LEPTON_PATH.
'/templates/'.$directory.
'/info.php'))
58 global $template_license, $template_directory, $template_author, $template_version, $template_function, $template_description, $template_platform, $template_name, $template_guid;
59 require LEPTON_PATH.
'/templates/'.$directory.
'/info.php';
61 if(!isset($template_delete))
63 $template_delete =
true;
67 $sqlwhere =
"`type` = 'template' AND `directory` = '" . $template_directory .
"'";
68 $sql =
"SELECT COUNT(*) FROM `" . TABLE_PREFIX .
"addons` WHERE " . $sqlwhere;
80 'directory' => $template_directory,
81 'name' => $template_name,
82 'description' => $template_description,
84 'function' => strtolower( $template_function ),
85 'to_delete' => intval( $template_delete ),
86 'version' => $template_version,
87 'platform' => $template_platform,
88 'author' => $template_author,
89 'license' => $template_license
92 if (isset($template_guid))
94 $fields[
'guid'] = $template_guid;
99 TABLE_PREFIX .
"addons",