\$('#surcharge').text('{$surstr}'); } }); EOS; } $jsloads[] = <<<EOS \$('#pplus_submit').click(function() { lock_inputs(); \$('#pplus_container input').blur(); //trigger sanitize/validate functions unlock_inputs(); if (\$('input.error').length > 0) { \$('input.error:first').focus(); return false; } return true; }); \$('.watermark').watermark(); EOS; $jsincs[] = '<script type="text/javascript" src="' . $baseurl . '/include/jquery.watermark.min.js"></script>'; if ($jsloads) { $jsfuncs[] = '$(document).ready(function() { '; $jsfuncs = array_merge($jsfuncs, $jsloads); $jsfuncs[] = '}); '; } $tplvars['jsfuncs'] = $jsfuncs; echo StripeGate\Utils::ProcessTemplate($this, 'payplus.tpl', $tplvars);
$tplvars['title_updir'] = $this->Lang('title_updir'); $tplvars['input_updir'] = $this->CreateInputText($id, 'uploads_dir', $this->GetPreference('uploads_dir'), 30, 60) . '<br />' . $this->Lang('help_updir'); $tplvars['title_password'] = $this->Lang('title_password'); $pw = $this->GetPreference('masterpass'); if ($pw) { $pw = StripeGate\Utils::unfusc($pw); } $tplvars['input_password'] = $this->CreateTextArea(false, $id, $pw, 'masterpass', 'cloaked', $id . 'passwd', '', '', 40, 2); $jsincs[] = '<script type="text/javascript" src="' . $baseurl . '/include/jquery-inputCloak.min.js"></script>'; $jsloads[] = <<<EOS \$('#{$id}passwd').inputCloak({ type:'see4', symbol:'\\u25CF' }); EOS; if ($padm) { $tplvars['submit'] = $this->CreateInputSubmit($id, 'submit', $this->Lang('submit')); $tplvars['cancel'] = $this->CreateInputSubmit($id, 'cancel', $this->Lang('cancel')); } if ($jsloads) { $jsfuncs[] = '$(document).ready(function() { '; $jsfuncs = array_merge($jsfuncs, $jsloads); $jsfuncs[] = '}); '; } $tplvars['jsfuncs'] = $jsfuncs; $tplvars['jsincs'] = $jsincs; echo StripeGate\Utils::ProcessTemplate($this, 'adminpanel.tpl', $tplvars);
$mtype = mime_content_type($tmpname); $img = strpos($mtype, 'image/') === 0; } if (!$img) { $message = $this->Lang('err_file'); } } if (empty($message)) { $fp = StripeGate\Utils::GetUploadsPath($this); if ($fp) { $fp = cms_join_path($fp, $file_data['name']); if (!chmod($file_data['tmp_name'], 0644) || !cms_move_uploaded_file($file_data['tmp_name'], $fp)) { $message = $this->Lang('err_upload'); } else { //all good $sql = 'UPDATE ' . $pref . 'module_sgt_account SET iconfile=? WHERE account_id=?'; $db->Execute($sql, array($file_data['name'], $params['account_id'])); } } else { $message = $this->Lang('err_upload'); } } if (empty($message)) { $message = FALSE; } $this->Redirect($id, 'update', $returnid, array('account_id' => $params['account_id'], 'message' => $message)); } $name = $db->GetOne('SELECT name FROM ' . $pref . 'module_sgt_account WHERE account_id=?', array($params['account_id'])); $tplvars = array('start_form' => $this->CreateFormStart($id, 'upload_icon', $returnid, 'post', 'multipart/form-data'), 'end_form' => $this->CreateFormEnd(), 'hidden' => $this->CreateInputHidden($id, 'account_id', $params['account_id']), 'title' => $this->Lang('title_iconfile2', $name), 'chooser' => $this->CreateInputFile($id, 'iconfile', 'image/*', 48, 64), 'apply' => $this->CreateInputSubmit($id, 'upstart', $this->Lang('upload')), 'cancel' => $this->CreateInputSubmit($id, 'upcancel', $this->Lang('cancel')), 'help' => $this->Lang('help_iconupload')); echo StripeGate\Utils::ProcessTemplate($this, 'chooser.tpl', $tplvars);
/* $oneset = new stdClass(); $oneset->title = $this->Lang(''); if ($pmod) $oneset->input = $this->CreateInput(); elseif () $oneset->input = else $oneset->input = $empty; $oneset->help = $this->Lang(''); $settings[] = $oneset; */ $tplvars['settings'] = $settings; if ($pmod) { $tplvars['submit'] = $this->CreateInputSubmit($id, 'submit', $this->Lang('submit')); $tplvars['cancel'] = $this->CreateInputSubmit($id, 'cancel', $this->Lang('cancel')); } else { $tplvars['submit'] = NULL; $tplvars['cancel'] = $this->CreateInputSubmit($id, 'cancel', $this->Lang('close')); } if ($jsloads) { $jsfuncs[] = '$(document).ready(function() { '; $jsfuncs = array_merge($jsfuncs, $jsloads); $jsfuncs[] = '}); '; } $tplvars['jsfuncs'] = $jsfuncs; $tplvars['jsincs'] = $jsincs; echo StripeGate\Utils::ProcessTemplate($this, 'update.tpl', $tplvars);