




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
Project2OnlineVotingSystemSchoolofSoftware,ChengduPolytechnicLecturer:MuQichunTask8OnePersonCanOnlyCast5VotesforOneVehicleA
DayProgrammingVotingrestrictions
are
the
functionfoundinmostonlinevotingsystems.Basedondifferentneeds,therewillbedifferentrestrictions.Thebasicroleofvotingrestrictionsistoavoidfactitiously
ballotrigging.Theregularmeansareasfollows:IPrestrictions:Itisthemostcommonanti-ballotriggingmethod,whichcanlimiteachIPtovoteonlyonceduringacertainperiodoftime.BecauseIPwithhighreliability
isdifficulttoforge.It
isrecommendedtoopenit.Makesurethat,ifitisunderthesamelocalareanetwork(forexample,usingthesamerouter'swifi),theremaybesituationswheredifferentterminalshavethesameIP.Anditwillnothappenifweareusingamobilephonecarriernetwork.Devicerestrictions:Thevotingplatformmarksdevicesthathavealready
voted(computers,mobilephones,etc.)
using
technologiessuchasCookie.Thismethodisnotreliable,becausetechnically
cookieis
easily
lostanddeleted
(suchasclearingbrowsercache,clearingWeChatcache,restartingWeChat).However,asanadditionalbarrier,itisstillrecommendedtoopenit.Graphicverificationcode:Theverificationcoderequiresvoterstoinputoranswersomegraphicsorquestionsthataredifficultformachinestorecognize.Inthisway,itcaneffectivelypreventcheatersfromusingcomputerprogramstosimulateautomaticvoting.Votingtimelimit:Forexample,thesameusercanonlycastonevotewithinthetimelimit.Votedobjectrestrictions:Forexample,thesameusercanonlyvoteforaspecifiednumberofvotedobjects.Otherrestrictions:Suchasrestrictinggeographiclocations,requiringuserstouseSMSverificationcodes,
etc.ProgrammingInoursystem,wesimulateseveralcommonvotingrestrictions.Thefirstoneisthatonepersoncanonlycast5votesforonevehicleaday.Whendesigningthedatabase,wespeciallydesignedatabletorecordthedetailsofvoting.Learningfromthisdatatable,wecanunderstandthehistoryofvoting,thereby
judgingwhetherthecurrentvotingmeetstherelevantconditions.
Thequeryguidelineisasfollows:thevotingtimeshouldbethecurrentday,theuserID
shouldbeIDofthecurrentregistrant,andthecarID
shouldbe
IDofthecurrentlyvotedvehicle.
Ifthisnumberofrecordsislessthan5,wecanvote,otherwisewecan'tvote.Thespecificoperationistoaddthefollowingcodebeforetheoriginalvotingcodeinvote.php:ProgrammingSummaryInthiscourse,wehaveaddedalimittovoting,thatis,onepersoncanonlycastamaximumof5votesforonevehicleaday.
Thisisjudgedbytherecordsinthevotedetailtable,queryingthenumberofrecordsthatthecurrentuservotedforthecurrentvehicletoday.Whenjudgingthetime,ifthevotingtimefieldtypeinthedatatableisdate,itcanbedirectly
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年黃河交通學(xué)院單招職業(yè)傾向性測試題庫新版
- 社交平臺中用戶行為的隱私保護(hù)研究
- 科技安全從校園開始-網(wǎng)絡(luò)安全教育的重要性
- 2025年黃岡職業(yè)技術(shù)學(xué)院單招職業(yè)技能測試題庫參考答案
- 科技助力糖尿病并發(fā)癥的早期發(fā)現(xiàn)與干預(yù)
- 2025年撫順職業(yè)技術(shù)學(xué)院單招職業(yè)傾向性測試題庫完整版
- 科技助力老年慢性病管理與治療
- 2025年廣西科技職業(yè)學(xué)院單招職業(yè)傾向性測試題庫參考答案
- 生物科技創(chuàng)新下的醫(yī)療健康產(chǎn)業(yè)鏈變革
- 全媒體運營師模擬考試題與參考答案
- AIGC及ChatGPT保險行業(yè)應(yīng)用白皮書
- 新人教版五年級下冊數(shù)學(xué)(新插圖) 練習(xí)二 教學(xué)課件
- 磚數(shù)量自動計算、換算表
- 【課題】《中學(xué)道德與法治法治意識培養(yǎng)策略的研究》中期檢查表
- 《十萬個為什么》推進(jìn)課(小學(xué)課件)
- 發(fā)展?jié)h語初級綜合1:第28課《長城有八千八百五十多公里》
- YY/T 1619-2018牙科學(xué)種植體系統(tǒng)及相關(guān)過程的術(shù)語
- GB/T 18838.1-2002涂覆涂料前鋼材表面處理噴射清理用金屬磨料的技術(shù)要求導(dǎo)則和分類
- GA/T 1162-2014法醫(yī)生物檢材的提取、保存、送檢規(guī)范
- 紅金大氣商務(wù)風(fēng)領(lǐng)導(dǎo)歡迎會PPT通用模板
- 例談小組合作學(xué)習(xí)在小學(xué)英語教學(xué)中的有效開展(講座)課件
評論
0/150
提交評論