Skip to content
Permalink
Browse files

fill in email subjects while processing admin reports

  • Loading branch information...
following5 committed Mar 23, 2016
1 parent 39784f0 commit 7ba3fecc052090882c2390afcd99def11c0b9211
@@ -47,11 +47,12 @@
}
elseif (isset($_REQUEST['contact']) && $ownerid > 0)
{
$tpl->redirect('mailto.php?userid=' . urlencode($ownerid));
$wp_oc = sql_value("SELECT `wp_oc` FROM `caches` WHERE `cache_id`='&1'", '', $cacheid);
$tpl->redirect('mailto.php?userid=' . urlencode($ownerid) . '&wp=' . $wp_oc);
}
elseif (isset($_REQUEST['contact_reporter']) && $reporterid > 0)
{
$tpl->redirect('mailto.php?userid=' . urlencode($reporterid));
$tpl->redirect('mailto.php?userid=' . urlencode($reporterid) . '&reportid=' . $rid);
}
elseif (isset($_REQUEST['done']) && $adminid == $login->userid)
{
@@ -2868,6 +2868,8 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2606', 'Picture
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2607', 'Title:', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2608', 'move up', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2609', 'Description is unusable', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2610', 'Your geocache', '2015-06-17 10:09:14');
INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('2611', 'Your geocache report for', '2015-06-17 10:09:14');

-- Table sys_trans_ref
SET NAMES 'utf8';
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2607', 'DE', 'Titel:', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2608', 'DE', 'nach oben', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2609', 'DE', 'Beschreibung ist unbrauchbar', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2610', 'DE', 'Dein Cache', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2611', 'DE', 'Deine Cachemeldung für', '2015-06-17 10:09:14');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1', 'EN', 'Reorder IDs', '2010-09-02 00:15:30');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('2', 'EN', 'The database could not be reconnected.', '2010-08-28 11:48:07');
INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('3', 'EN', 'Testing – please do not login', '2010-08-28 11:48:07');
@@ -25,7 +25,25 @@
if ($user->getEMail() === null || $user->getEMail() == '')
$tpl->error(ERROR_USER_NO_EMAIL);
$subject = isset($_REQUEST['subject']) ? $_REQUEST['subject'] : '';
$subject = '';
if (isset($_REQUEST['subject'])) {
$subject = $_REQUEST['subject'];
} elseif (isset($_REQUEST['wp'])) {
$wp = $_REQUEST['wp'];
$cachename = sql_value("SELECT `name` FROM `caches` WHERE `wp_oc`='&1'", '', $wp);
if ($cachename)
$subject = $translate->t('Your geocache', '', 0, 0) . ' "'.$cachename.'" ('.$wp.')';
} elseif (isset($_REQUEST['reportid']) && $login->admin) {
$rs = sql("
SELECT wp_oc, name FROM caches
JOIN cache_reports ON cache_reports.cacheid = caches.cache_id
WHERE cache_reports.id='&1'",
$_REQUEST['reportid']);
if ($r = sql_fetch_assoc($rs))
$subject = $translate->t('Your geocache report for', '', 0, 0) . ' '.$r['wp_oc'].' ('.$r['name'].')';
sql_free_result($rs);
}
$text = isset($_REQUEST['text']) ? $_REQUEST['text'] : '';
if (isset($_REQUEST['emailaddress']))
$bEmailaddress = ($_REQUEST['emailaddress']==1);
@@ -560,7 +560,7 @@ input { border:1px solid #555; background-color:white; padding:1px 2px 1px 2px;
*.input300 {width:300px;}
*.input350 {width:350px;} /* overwrite saved query */
*.input400 {width:400px;} /* short cachedescription */
*.input500 {width:500px;} /* cache list wp inputs */
*.input500 {width:500px;} /* cache list wp inputs, Email subject */

input.checkbox {width:12px; height:12px; font-size:12px; border:0;}

@@ -162,7 +162,7 @@ function editcomment(edit)
{if !$ownreport}
<input type="submit" name="assign" value="{t}Assign to me{/t}" class="formbutton" onclick="submitbutton('assign')" />
{else}
&nbsp;<input type="submit" name="contact" value="{t}Contact owner{/t}" class="formbutton" onclick="submitbutton('contact')" />&nbsp;<input type="submit" name="contact_reporter" value="{t}Contact reporter{/t}" class="formbutton" onclick="submitbutton('contact_reporter')" />&nbsp;&nbsp;<input type="submit" name="done" value="{t}Mark as finished{/t}" class="formbutton" onclick="submitbutton('done')" />
&nbsp;<input type="submit" name="contact" value="{t}Contact owner{/t}" class="formbutton" onclick="submitbutton('contact')" />&nbsp;&nbsp;<input type="submit" name="contact_reporter" value="{t}Contact reporter{/t}" class="formbutton" onclick="submitbutton('contact_reporter')" />&nbsp;&nbsp;<input type="submit" name="done" value="{t}Mark as finished{/t}" class="formbutton" onclick="submitbutton('done')" />
</p>
<div class="content2-container bg-blue02">
@@ -46,7 +46,7 @@
{/if}

<tr>
<td colspan="2">{t}Subject:{/t} <input type="text" name="subject" value="{$subject|escape}" class="input400" /></td>
<td colspan="2">{t}Subject:{/t}&nbsp; <input type="text" name="subject" value="{$subject|escape}" class="input500" /></td>
</tr>
<tr><td class="spacer" colspan="2"></td></tr>

0 comments on commit 7ba3fec

Please sign in to comment.
You can’t perform that action at this time.