本文整理汇总了PHP中Warn函数的典型用法代码示例。如果您正苦于以下问题:PHP Warn函数的具体用法?PHP Warn怎么用?PHP Warn使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Warn函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PageLink2
print '<p>' . PageLink2("adminimport", $GLOBALS['I18N']->get("Import some more emails"));
} else {
echo formStart('enctype="multipart/form-data" name="import"');
if ($GLOBALS["require_login"] && !isSuperUser()) {
$access = accessLevel("importadmin");
if ($access == "owner") {
$subselect = " where owner = " . $_SESSION["logindetails"]["id"];
} elseif ($access == "all") {
$subselect = "";
} elseif ($access == "none") {
$subselect = " where id = 0";
}
}
$req = Sql_Query("select * from {$tables["admin_task"]} where adminid = 0");
if (!Sql_Affected_Rows()) {
Warn($GLOBALS['I18N']->get("No default permissions have been defined, please create default permissions first, by creating one dummy admin and assigning the default permissions to this admin"));
}
?>
</ul>
<table border="1">
<tr><td colspan=2><?php
echo $GLOBALS['I18N']->get('importadmininfo');
?>
</td></tr>
<tr><td><?php
echo $GLOBALS['I18N']->get('File containing emails');
?>
:</td><td><input type="file" name="import_file"></td></tr>
<tr><td><?php
echo $GLOBALS['I18N']->get('Field Delimiter');
示例2: getenv
if (USEFCK) {
$imgdir = getenv("DOCUMENT_ROOT").$GLOBALS["pageroot"].'/'.FCKIMAGES_DIR.'/';
if (!is_dir($imgdir) || !is_writeable ($imgdir)) {
Warn("The FCK image directory does not exist, or is not writable");
}
}
*/
if (defined("USE_PDF") && USE_PDF && !defined('FPDF_VERSION')) {
Warn($GLOBALS['I18N']->get('nofpdf'));
}
$this_doc = getenv("REQUEST_URI");
if (preg_match("#(.*?)/admin#i", $this_doc, $regs)) {
$check_pageroot = $pageroot;
$check_pageroot = preg_replace('#/$#', '', $check_pageroot);
if ($check_pageroot != $regs[1] && WARN_ABOUT_PHP_SETTINGS) {
Warn($GLOBALS['I18N']->get('warnpageroot'));
}
}
clearstatcache();
if (checkAccess($page, "") || $page == 'about') {
if (!$_GET['pi'] && (is_file($include) || is_link($include))) {
# check whether there is a language file to include
if (is_file("lan/" . $_SESSION['adminlanguage']['iso'] . "/" . $include)) {
include "lan/" . $_SESSION['adminlanguage']['iso'] . "/" . $include;
}
# print "Including $include<br/>";
# hmm, pre-parsing and capturing the error would be nice
#$parses_ok = eval(@file_get_contents($include));
$parses_ok = 1;
if (!$parses_ok) {
print Error("cannot parse {$include}");
示例3: formatBytes
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('size'), formatBytes($row['size']));
$totalSize += $row['size'];
$phys_file = $GLOBALS['attachment_repository'] . '/' . $row['filename'];
if (is_file($phys_file) && filesize($phys_file)) {
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('file'), $GLOBALS['img_tick']);
} else {
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('file'), $GLOBALS['img_cross']);
}
$ls->addColumn($row['id'], $GLOBALS['I18N']->get('del'), sprintf('<input type="checkbox" name="deleteattachments[]" value="%s"/>', $row['linkid']));
}
$ls->addButton(s('Delete checked'), 'javascript:document.sendmessageform.submit()');
$att_content .= '<div>' . $ls->display() . '</div>';
}
if (defined('MAX_MAILSIZE') && 3 * $totalSize > MAX_MAILSIZE) {
## the 3 is roughly the size increase to encode the string
$att_content .= Warn(s('The total size of attachments is very large. Sending this campaign may fail due to resource limits.'));
}
for ($att_cnt = 1; $att_cnt <= NUMATTACHMENTS; ++$att_cnt) {
$att_content .= sprintf('<div>%s</div><div><input type="file" name="attachment%d"/> <input class="submit" type="submit" name="save" value="%s"/></div>', $GLOBALS['I18N']->get('New Attachment'), $att_cnt, $GLOBALS['I18N']->get('Add (and save)'));
if (FILESYSTEM_ATTACHMENTS) {
$att_content .= sprintf('<div><b>%s</b> %s:</div><div><input type="text" name="localattachment%d" size="50"/></div>', $GLOBALS['I18N']->get('or'), $GLOBALS['I18N']->get('Path to file on server'), $att_cnt, $att_cnt);
}
$att_content .= sprintf('<div>%s:</div>
<div><textarea name="attachment%d_description" cols="65" rows="3" wrap="virtual"></textarea></div>', $GLOBALS['I18N']->get('Description of attachment'), $att_cnt);
}
$att_content .= '</div>';
# $shader = new WebblerShader("Attachments");
# $shader->addContent($att_content);
# $shader->initialstate = 'closed';
# print $shader->display();
}
示例4: accessLevel
<?=formStart('enctype="multipart/form-data" name="import"')?>
<?php
if ($GLOBALS["require_login"] && !isSuperUser()) {
$access = accessLevel("import2");
if ($access == "owner")
$subselect = " where owner = ".$_SESSION["logindetails"]["id"];
elseif ($access == "all")
$subselect = "";
elseif ($access == "none")
$subselect = " where id = 0";
}
$req = Sql_Query("select * from {$tables["admin_task"]} where adminid = 0");
if (!Sql_Affected_Rows())
Warn("No default permissions have been defined, please create default permissions first, by creating one dummy admin and assigning the default permissions to this admin");
?>
</ul>
<table border="1">
<tr><td colspan=2>The file you upload will need to contain the administrators
you want to add to the system. The columns need to have the following headers: <b>email</b>, <b>loginname</b>, <b>password</b>. Any other columns will be added as admin attributes.
<b>Warning</b>: the file needs to be plain text. Do not upload binary files like a Word Document.</td></tr>
<tr><td>File containing emails:</td><td><input type="file" name="import_file"></td></tr>
<tr><td>Field Delimiter:</td><td><input type="text" name="import_field_delimiter" size=5> (default is TAB)</td></tr>
<tr><td>Record Delimiter:</td><td><input type="text" name="import_record_delimiter" size=5> (default is line break)</td></tr>
<tr><td colspan=2>If you check "Test Output", you will get the list of parsed emails on screen, and the database will not be filled with the information. This is useful to find out whether the format of your file is correct. It will only show the first 50 records.</td></tr>
<tr><td>Test output:</td><td><input type="checkbox" name="import_test" value="yes"></td></tr>
<tr><td colspan=2>Check this box to create a list for each administrator, named after their loginname <input type=checkbox name="createlist" value="yes" checked></td></tr>
<tr><td><input type="submit" name="import" value="Import"></td><td> </td></tr>
</table>
示例5: explode
$values = explode($_SESSION["import_field_delimiter"], $line);
$system_values = array();
foreach ($system_attribute_mapping as $column => $index) {
# print '<br/>'.$column . ' = '. $values[$index];
if (!empty($values[$index])) {
$system_values[$column] = $values[$index];
} else {
$system_values[$column] = '';
}
}
## Check completeness
$index = clean($system_values["email"]);
$invalid = 0;
if (!$index) {
if ($_SESSION["show_warnings"]) {
Warn($GLOBALS['I18N']->get('Record has no email') . ": {$c} -> {$line}");
}
$index = $GLOBALS['I18N']->get('Invalid Email') . " {$c}";
$system_values["email"] = $_SESSION["assign_invalid"];
$invalid = 1;
$count["invalid_email"]++;
}
//if (sizeof($values) != (sizeof($_SESSION["import_attribute"]) + sizeof($system_attributes) - sizeof($unused_systemattr)) && !empty($_SESSION['test_import']) && !empty($_SESSION["show_warnings"]))
//Warn("Record has more values than header indicated (" .
//sizeof($values) . "!=" .
//(sizeof($_SESSION["import_attribute"]) + sizeof($system_attributes) - sizeof($unused_systemattr)) .
//"), this may cause trouble: $index");
if (!$invalid || $invalid && $_SESSION["omit_invalid"] != "yes") {
$user["systemvalues"] = $system_values;
reset($_SESSION["import_attribute"]);
$replace = array();
示例6: getenv
if (USEFCK) {
$imgdir = getenv("DOCUMENT_ROOT").$GLOBALS["pageroot"].'/'.FCKIMAGES_DIR.'/';
if (!is_dir($imgdir) || !is_writeable ($imgdir)) {
Warn("The FCK image directory does not exist, or is not writable");
}
}
*/
if (defined("USE_PDF") && USE_PDF && !defined('FPDF_VERSION')) {
Warn($GLOBALS['I18N']->get('You are trying to use PDF support without having FPDF loaded'));
}
$this_doc = getenv("REQUEST_URI");
if (preg_match("#(.*?)/admin?\$#i", $this_doc, $regs)) {
$check_pageroot = $pageroot;
$check_pageroot = preg_replace('#/$#', '', $check_pageroot);
if ($check_pageroot != $regs[1] && WARN_ABOUT_PHP_SETTINGS) {
Warn($GLOBALS['I18N']->get('The pageroot in your config does not match the current locationCheck your config file.'));
}
}
clearstatcache();
if (checkAccess($page, "") || $page == 'about') {
if (empty($_GET['pi']) && (is_file($include) || is_link($include))) {
# check whether there is a language file to include
if (is_file("lan/" . $_SESSION['adminlanguage']['iso'] . "/" . $include)) {
include "lan/" . $_SESSION['adminlanguage']['iso'] . "/" . $include;
}
if (is_file('ui/' . $GLOBALS['ui'] . '/pages/' . $include)) {
$include = 'ui/' . $GLOBALS['ui'] . '/pages/' . $include;
}
# print "Including $include<br/>";
# hmm, pre-parsing and capturing the error would be nice
#$parses_ok = eval(@file_get_contents($include));
示例7: clean
}
}
## Check completeness
$index = clean($system_values["email"]);
$invalid = 0;
if (!$index) {
if ($_SESSION["show_warnings"]) {
Warn($GLOBALS['I18N']->get('Record has no email') . ": {$c} -> {$line}");
}
$index = $GLOBALS['I18N']->get('Invalid Email') . " {$c}";
$system_values["email"] = $_SESSION["assign_invalid"];
$invalid = 1;
$count["invalid_email"]++;
}
if (sizeof($values) != sizeof($_SESSION["import_attribute"]) + sizeof($system_attributes) - sizeof($unused_systemattr) && !empty($_SESSION['test_import']) && !empty($_SESSION["show_warnings"])) {
Warn("Record has more values than header indicated (" . sizeof($values) . "!=" . (sizeof($_SESSION["import_attribute"]) + sizeof($system_attributes) - sizeof($unused_systemattr)) . "), this may cause trouble: {$index}");
}
if (!$invalid || $invalid && $_SESSION["omit_invalid"] != "yes") {
$user["systemvalues"] = $system_values;
reset($_SESSION["import_attribute"]);
$replace = array();
while (list($key, $val) = each($_SESSION["import_attribute"])) {
if (!empty($values[$val["index"]])) {
$user[$val["index"]] = addslashes($values[$val["index"]]);
$replace[$key] = addslashes($values[$val["index"]]);
}
}
} else {
# Warn("Omitting invalid one: $email");
}
$user["systemvalues"]["email"] = parsePlaceHolders($system_values["email"], array_merge($replace, $system_values, array("number" => $c)));
示例8: flush
# output some stuff to make sure it's not buffered in the browser, hmm, would be nice to find a better way for this
for ($i = 0; $i < 10000; ++$i) {
print ' ' . "\n";
}
flush();
@ob_end_flush();
}
flush();
}
$dbversion = getConfig('version');
if (!$dbversion) {
$dbversion = 'Older than 1.4.1';
}
output('<p class="information">' . $GLOBALS['I18N']->get('Your database version') . ': ' . $dbversion . '</p>');
if ($GLOBALS['database_module'] == 'mysql.inc') {
print Warn(s('Please edit your config file and change "mysql.inc" to "mysqli.inc" to avoid future PHP incompatibility') . resourceLink('http://resources.phplist.com/system/mysql-mysqli-update'));
}
if ($dbversion == VERSION) {
output($GLOBALS['I18N']->get('Your database is already the correct version, there is no need to upgrade'));
print '<p>' . PageLinkAjax('upgrade&update=tlds', s('update Top Level Domains'), '', 'button') . '</p>';
print subscribeToAnnouncementsForm();
} elseif (isset($_GET['doit']) && $_GET['doit'] == 'yes') {
$success = 1;
# once we are off, this should not be interrupted
ignore_user_abort(1);
# rename tables if we are using the prefix
include dirname(__FILE__) . '/structure.php';
while (list($table, $value) = each($DBstruct)) {
set_time_limit(500);
if (isset($table_prefix)) {
if (Sql_Table_exists($table) && !Sql_Table_Exists($tables[$table])) {
示例9: soa_editor
//.........这里部分代码省略.........
<?php
/* Output error message, if any */
if ($error_message) {
ErrBox($error_message);
}
/* If there's an 'xfer' column in the soa table, allow it */
if ($soa_use_xfer && !$new_soa) {
?>
<FORM method=POST action="<?php
echo $_SERVER['PHP_SELF'];
?>
">
<INPUT type=hidden name="zone" value="<?php
echo ent($values['id']);
?>
">
<DIV align=center>
<TABLE class=xferBox>
<TR title="Comma-separated list of IP addresses allowed to transfer this zone via AXFR. Wildcards are OK.">
<TD><B>Zone transfer access list:</B>
<TD>
<TD><INPUT class=mono type=text name="xfer" value="<?php
echo ent($values['xfer']);
?>
" size=60>
<TD>
<TD><?php
echo formbutton("Update list", "Click this button to save changes to the zone transfer access list.", $soa_bgcolor);
?>
</TABLE>
</DIV>
</FORM>
<?php
}
/* If there's an 'update_acl' column in the soa table, allow it */
if ($soa_use_update_acl && !$new_soa) {
?>
<FORM method=POST action="<?php
echo $_SERVER['PHP_SELF'];
?>
">
<INPUT type=hidden name="zone" value="<?php
echo ent($values['id']);
?>
">
<DIV align=center>
<TABLE class=updateAclBox>
<TR title="Comma-separated list of IP addresses allowed to update this zone. Wildcards are OK.">
<TD><B>Update access list:</B>
<TD>
<TD><INPUT class=mono type=text name="update_acl" value="<?php
echo ent($values['update_acl']);
?>
" size=60>
<TD>
<TD><?php
echo formbutton("Update ACL for updates", "Click this button to save changes to the update access list.", $soa_bgcolor);
?>
</TABLE>
</DIV>
</FORM>
<?php
}
/* If there's an 'also_notify' column in the soa table, allow it */
if ($soa_use_also_notify && !$new_soa) {
?>
<FORM method=POST action="<?php
echo $_SERVER['PHP_SELF'];
?>
">
<INPUT type=hidden name="zone" value="<?php
echo ent($values['id']);
?>
">
<DIV align=center>
<TABLE class=alsoNotifyBox>
<TR title="Comma-separated list of IP addresses to be notified in addition to listed NS records. '*' indicates just NS entries">
<TD><B>Also notify list:</B>
<TD>
<TD><INPUT class=mono type=text name="also_notify" value="<?php
echo ent($values['also_notify']);
?>
" size=60>
<TD>
<TD><?php
echo formbutton("Update Also Notify", "Click this button to save changes to the also notify list.", $soa_bgcolor);
?>
</TABLE>
</DIV>
</FORM>
<?php
}
/* If the user's trying to delete a zone, let them know that everything'll be deleted */
if ($delete_confirm) {
Warn("<B>Deleting this zone will also delete " . nf($rrct) . " resource record" . S($rrct) . " associated with this zone.</B>\n" . "<P>" . "To confirm deletion of this zone, click the <B>Really delete zone</B> button above.");
}
}
示例10: foreach
foreach ($import_attribute as $item) {
if (!empty($data['values'][$item["index"]])) {
$attribute_index = $item["record"];
$value = $data['values'][$item["index"]];
# check whether this is a textline or a selectable item
$att = Sql_Fetch_Row_Query("select type,tablename,name from " . $tables["adminattribute"] . " where id = {$attribute_index}");
switch ($att[0]) {
case "select":
case "radio":
$query = "select id from {$table_prefix}adminattr_{$att['1']} where name = ?";
$val = Sql_Query_Params($query, array($value));
# if we don't have this value add it '
if (!Sql_Num_Rows($val)) {
$tn = $table_prefix . 'adminattr_' . $att[1];
Sql_Query_Params("insert into {$tn} (name) values (?)", array($value));
Warn($GLOBALS['I18N']->get("Value") . " {$value} " . $GLOBALS['I18N']->get("added to attribute") . " {$att['2']}");
$att_value = Sql_Insert_Id($tn, 'id');
} else {
$d = Sql_Fetch_Row($val);
$att_value = $d[0];
}
break;
case "checkbox":
if ($value) {
$val = Sql_Fetch_Row_Query("select id from {$table_prefix}" . "adminattr_{$att['1']} where name = \"Checked\"");
} else {
$val = Sql_Fetch_Row_Query("select id from {$table_prefix}" . "adminattr_{$att['1']} where name = \"Unchecked\"");
}
$att_value = $val[0];
break;
default:
示例11: sendMail
function sendMail($to, $subject, $message, $header = "", $parameters = "")
{
# global function to capture sending emails, to avoid trouble with
# older (and newer!) php versions
if (TEST) {
return 1;
}
if (!$to) {
logEvent("Error: empty To: in message with subject {$subject} to send");
return 0;
} elseif (!$subject) {
logEvent("Error: empty Subject: in message to send to {$to}");
return 0;
}
$v = phpversion();
$v = preg_replace("/\\-.*\$/", "", $v);
if ($GLOBALS["message_envelope"]) {
$header = rtrim($header);
if ($header) {
$header .= "\n";
}
$header .= "Errors-To: " . $GLOBALS["message_envelope"];
if (!$parameters || !ereg("-f" . $GLOBALS["message_envelope"], $parameters)) {
$parameters = '-f' . $GLOBALS["message_envelope"];
}
}
if (WORKAROUND_OUTLOOK_BUG) {
$header = rtrim($header);
if ($header) {
$header .= "\n";
}
$header .= "X-Outlookbug-fixed: Yes";
$message = preg_replace("/\r?\n/", "\r\n", $message);
}
# version 4.2.3 (and presumably up) does not allow the fifth parameter in safe mode
# make sure not to send out loads of test emails to ppl when developing
if (!ereg("dev", VERSION)) {
if ($v > "4.0.5" && !ini_get("safe_mode")) {
if (mail($to, $subject, $message, $header, $parameters)) {
return 1;
} else {
return mail($to, $subject, $message, $header);
}
} else {
return mail($to, $subject, $message, $header);
}
} else {
# send mails to one place when running a test version
$message = "To: {$to}\n" . $message;
if ($GLOBALS["developer_email"]) {
return mail($GLOBALS["developer_email"], $subject, $message, $header, $parameters);
} else {
print Warn("Running CVS version, but developer_email not set");
}
}
}
示例12: ob_end_flush
ob_end_flush();
#foreach ($_POST as $key => $val) {
# print "$key = ".print_r($val)."<br/>";
#}
#return;
print '<script language="Javascript" src="js/progressbar.js" type="text/javascript"></script>';
if (isset($_POST["action"])) {
if (isset($_POST["name"])) {
print '<script language="Javascript" type="text/javascript"> document.write(progressmeter); start();</script>';flush();
while (list($id,$val) = each ($_POST["name"])) {
if (!$id && isset($_POST["name"][0]) && $_POST["name"][0] != "") {
# it is a new one
$lc_name = getNewAttributeTablename($_POST["name"][0]);
if ($lc_name == "email") { print Warn($GLOBALS['I18N']->get('warnemailattribute')); }
#print "New attribute: ".$_POST["name"][0]."<br/>";
$query = sprintf('insert into %s (name,type,listorder,default_value,required,tablename) values("%s","%s",%d,"%s",%d,"%s")',
$tables["attribute"],addslashes($_POST["name"][0]),$_POST["type"][0],$_POST["listorder"][0],addslashes($_POST["default"][0]),$_POST["required"][0],$lc_name);
Sql_Query($query);
$insertid = Sql_Insert_id();
# text boxes and hidden fields do not have their own table
if ($_POST["type"][$id] != "textline" && $_POST["type"]["id"] != "hidden") {
$query = "create table $table_prefix"."listattr_$lc_name (id integer not null primary key auto_increment, name varchar(255) unique,listorder integer default 0)";
Sql_Query($query);
} else {
# and they cannot currently be required, changed 29/08/01, insert javascript to require them, except for hidden ones :-)
if ($_POST["type"]["id"] == "hidden")
Sql_Query("update {$tables['attribute']} set required = 0 where id = $insertid");
示例13: Warn
}
if (defined("ENABLE_RSS") && ENABLE_RSS && !function_exists("xml_parse") && WARN_ABOUT_PHP_SETTINGS) {
Warn("XML is not supported");
}
if (ALLOW_ATTACHMENTS && (!is_dir($GLOBALS["attachment_repository"]) || !is_writeable($GLOBALS["attachment_repository"]))) {
Warn("The attachment repository doesn't seem writable");
}
if (defined("USE_PDF") && USE_PDF && !defined('FPDF_VERSION')) {
Warn("You are trying to use PDF support without having FPDF loaded");
}
$this_doc = getenv("REQUEST_URI");
if (preg_match("#(.*?)/admin#i", $this_doc, $regs)) {
$check_pageroot = $pageroot;
$check_pageroot = preg_replace('#/$#', '', $check_pageroot);
if ($check_pageroot != $regs[1] && WARN_ABOUT_PHP_SETTINGS) {
Warn("The pageroot in your config doesn't seem to match the current location<br/>Check your config file");
}
}
clearstatcache();
if (checkAccess($page, "")) {
if (is_file($include) || is_link($include)) {
# check whether there is a language file to include
if (is_file("lan/" . $adminlanguage["iso"] . "/" . $include)) {
include "lan/" . $adminlanguage["iso"] . "/" . $include;
}
# print "Including $include<br/>";
if (!@(include "{$include}")) {
#print "Error including $include";
}
# print "End of inclusion<br/>";
} elseif ($_GET["pi"] && is_object($GLOBALS["plugins"][$_GET["pi"]])) {
示例14: ignore_user_abort
ignore_user_abort();
set_time_limit(500);
ob_end_flush();
?>
<p>
<?php
if (!isset($GLOBALS["tmpdir"])) {
$GLOBALS["tmpdir"] = ini_get("upload_tmp_dir");
}
if (!is_dir($GLOBALS["tmpdir"]) || !is_writable($GLOBALS["tmpdir"])) {
$GLOBALS["tmpdir"] = ini_get("upload_tmp_dir");
}
#if (ini_get("open_basedir")) {
if (!is_dir($GLOBALS["tmpdir"]) || !is_writable($GLOBALS["tmpdir"])) {
Warn($GLOBALS['I18N']->get('temp_dir_not_writeable') . " (" . $GLOBALS["tmpdir"] . ")");
}
if (isset($_REQUEST['import'])) {
$test_import = isset($_POST["import_test"]) && $_POST["import_test"] == "yes";
/*
if (!is_array($_POST["lists"]) && !$test_import) {
Fatal_Error($GLOBALS['I18N']->get('select_list'));
return;
}
*/
if (empty($_FILES["import_file"])) {
Fatal_Error($GLOBALS['I18N']->get('none_specified'));
return;
}
if (!$_FILES["import_file"]) {
Fatal_Error($GLOBALS['I18N']->get('too_large_inexistant'));
示例15: reset
}
reset($import_attribute);
foreach ($import_attribute as $item) {
if (!empty($data['values'][$item['index']])) {
$attribute_index = $item['record'];
$value = $data['values'][$item['index']];
# check whether this is a textline or a selectable item
$att = Sql_Fetch_Row_Query('select type,tablename,name from ' . $tables['adminattribute'] . " where id = {$attribute_index}");
switch ($att[0]) {
case 'select':
case 'radio':
$val = Sql_Query("select id from {$table_prefix}" . "adminattr_{$att['1']} where name = \"{$value}\"");
# if we don't have this value add it
if (!Sql_Affected_Rows()) {
Sql_Query("insert into {$table_prefix}" . "adminattr_{$att['1']} (name) values(\"{$value}\")");
Warn($GLOBALS['I18N']->get('Value') . " {$value} " . $GLOBALS['I18N']->get('added to attribute') . " {$att['2']}");
$att_value = Sql_Insert_Id();
} else {
$d = Sql_Fetch_Row($val);
$att_value = $d[0];
}
break;
case 'checkbox':
if ($value) {
$val = Sql_Fetch_Row_Query("select id from {$table_prefix}" . "adminattr_{$att['1']} where name = \"Checked\"");
} else {
$val = Sql_Fetch_Row_Query("select id from {$table_prefix}" . "adminattr_{$att['1']} where name = \"Unchecked\"");
}
$att_value = $val[0];
break;
default: