$args['keyword'] = addslashes($_POST['keyword']); $args['htta'] = $_POST['htta'] == 'on' ? 1 : 0; $args['htda'] = $_POST['htda'] == 'on' ? 1 : 0; $args['htka'] = $_POST['htka'] == 'on' ? 1 : 0; $args['htca'] = $_POST['htca'] == 'on' ? 1 : 0; if (($pos = strpos($args['page'], ".php")) !== FALSE) { //remove .php from page $args['page'] = substr($args['page'], 0, $pos); } //if present $fp = file($filenameEng); $checkOnce = true; $lastSection = ''; $insertPoint = 0; $markPoint = count($fp) - 1; if (NotDuplicatePage($fp, $args['page'])) { /*********************** ENGLISH SECTION ************************/ for ($idx = 0; $idx < count($fp); ++$idx) { if ($checkOnce && strpos($fp[$idx], "// DEFINE TAGS FOR INDIVIDUAL PAGES") === FALSE) { continue; } $checkOnce = false; $section = GetSectionName($fp[$idx]); if (!empty($section)) { if (strcasecmp($section, $args['page']) < 0) { $lastSection = $section; $markPoint = $idx; } else { if (strcasecmp($section, $args['page']) > 0) { if ($insertPoint == 0) { $insertPoint = $idx;
$args['keyword'] = addslashes($_POST['keyword']); $args['htta'] = $_POST['htta'] == 'on' ? 1 : 0; $args['htda'] = $_POST['htda'] == 'on' ? 1 : 0; $args['htka'] = $_POST['htka'] == 'on' ? 1 : 0; $args['htca'] = $_POST['htca'] == 'on' ? 1 : 0; if (($pos = strpos($args['page'], ".php")) !== FALSE) { //remove .php from page $args['page'] = substr($args['page'], 0, $pos); } //if present $fp = file($filenameEng); $checkOnce = true; $lastSection = ''; $insertPoint = 0; $markPoint = count($fp) - 1; if (ValidPageName($args['page']) && NotDuplicatePage($fp, $args['page'])) { /*********************** ENGLISH SECTION ************************/ for ($idx = 0; $idx < count($fp); ++$idx) { if ($checkOnce && strpos($fp[$idx], "// DEFINE TAGS FOR INDIVIDUAL PAGES") === FALSE) { continue; } $checkOnce = false; $section = GetSectionName($fp[$idx]); if (!empty($section)) { if (strcasecmp($section, $args['page']) < 0) { $lastSection = $section; $markPoint = $idx; } else { if (strcasecmp($section, $args['page']) > 0) { if ($insertPoint == 0) { $insertPoint = $idx;