]> git.plutz.net Git - busy/blobdiff - Admin.page
remember ad content choice on admin page, display two ads on home page
[busy] / Admin.page
index e26420f958fd7350b5e7e632d74bc1d0d9cb69ef..e78ce2341195de25c7cd928352523e45e12e6f8a 100644 (file)
@@ -43,7 +43,12 @@ else
          <a href="http://bitcoinadvertisers.com">BitCoinAdvertisers.com</a></div>
           <div class='value'>
           Bitcoin Address: <input type='text' name='btcAdAddress' value='$(sed -rn 's:^btcAddress=(.*)$:\1:p' "$metafile")'><br>
-          Content: <select name=btcAdContent size=1><option value=1>All</option><option value=2>No Gambling</option><option value=3>No Erotic</option><option value=4>Neither</option></select>
+          Content: <select name=btcAdContent size=1>
+            <option value=1 $(grep -q 'btcAdContent=1' project.meta && echo selected)>All</option>
+            <option value=2 $(grep -q 'btcAdContent=2' project.meta && echo selected)>No Gambling</option>
+            <option value=3 $(grep -q 'btcAdContent=3' project.meta && echo selected)>No Erotic</option>
+            <option value=4 $(grep -q 'btcAdContent=4' project.meta && echo selected)>Neither</option>
+          </select>
           </div><br>
       </fieldset>
       <input type='submit'>